query_id
stringlengths
32
32
query
stringlengths
7
5.32k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
e087455778ed0dc63e22066c312b269e
FUNCTION :: Calls a general sanitization on $_GET, $_POST, and $_SERVER
[ { "docid": "221ee9ef57db9110a1edd21c0c834bd5", "score": "0.5776422", "text": "public function SanitizeAll($show_array = false) \n {\n \n $this->SanitizeArray($_POST, $show_array);\n $this->SanitizeArray($_GET, $show_array);\n $this->SanitizeArray($_SERVER, $show_array);\n }", "title": "" } ]
[ { "docid": "507f4a380860ca3e046426b749e6a252", "score": "0.7828573", "text": "public static function sanitize() {\n if (!self::$sanitized) {\n $whitelist = variable_get('sanitize_input_whitelist', array());\n $log_sanitized_keys = variable_get('sanitize_input_logging', FALSE);\n\n // Process query string parameters.\n $get_sanitized_keys = array();\n $_GET = self::stripDangerousValues($_GET, $whitelist, $get_sanitized_keys);\n if ($log_sanitized_keys && $get_sanitized_keys) {\n\n }\n\n // Process request body parameters.\n $post_sanitized_keys = array();\n $_POST = self::stripDangerousValues($_POST, $whitelist, $post_sanitized_keys);\n if ($log_sanitized_keys && $post_sanitized_keys) {\n\n }\n\n // Process cookie parameters.\n $cookie_sanitized_keys = array();\n $_COOKIE = self::stripDangerousValues($_COOKIE, $whitelist, $cookie_sanitized_keys);\n if ($log_sanitized_keys && $cookie_sanitized_keys) {\n\n }\n\n $request_sanitized_keys = array();\n $_REQUEST = self::stripDangerousValues($_REQUEST, $whitelist, $request_sanitized_keys);\n\n self::$sanitized = TRUE;\n }\n }", "title": "" }, { "docid": "75499650e8b68163237b3642b8b0f4a5", "score": "0.7789397", "text": "function sanitizeInput()\n{\n $_GET = sanitize($_GET);\n $_POST = sanitize($_POST);\n $_COOKIE = sanitize($_COOKIE);\n}", "title": "" }, { "docid": "5ccf7b675e05a45359b280533c2ccc42", "score": "0.7116654", "text": "private function sanitize_data() {\n $_GET = $this->stripslashes_deep($_GET);\n $_POST = $this->stripslashes_deep($_POST);\n $_COOKIE = $this->stripslashes_deep($_COOKIE);\n }", "title": "" }, { "docid": "b8f00ab7a9c4f8f566ab07cb420e7127", "score": "0.67426455", "text": "abstract function sanitize();", "title": "" }, { "docid": "4fe6895a9b8cb1eb2e615f70b699048b", "score": "0.67393786", "text": "function clean_form()\n{\n if (count($_GET) > 0) {\n foreach ($_GET as $var => $val) {\n $var = clean_var($var);\n $val = clean_var($val);\n $_GET[$var] = $val;\n }\n }\n\n if (count($_GET) > 0) {\n foreach ($_GET as $var => $val) {\n $var = clean_var($var);\n $val = clean_var($val);\n $_GET[$var] = $val;\n\n // most of our ops use POST\n $_GET[$var] = $val;\n }\n }\n}", "title": "" }, { "docid": "e54a3fda010096908a9b1bd480707037", "score": "0.66771", "text": "function maStripVARS($action)\n{\n global $_GET, $_POST;\n \n if (get_magic_quotes_gpc() == 0)\n {\n if($action==\"stripslashes\")\n {\n if (is_array($_GET))\n {\n while(list($k,$v) = each($_GET))\n\t {\n \t if(!is_array($v))\n \t {\n \t $_GET[$k] = strip_tags(str_replace(\"\\\"\",\"'\",$v));\n \t $GLOBALS[$k] = strip_tags(str_replace(\"\\\"\",\"'\",$GLOBALS[$k]));\n\t }\n \t }\n \t reset($_GET);\n }\n if (is_array($_POST))\n {\n while(list($k,$v) = each($_POST))\n\t {\n \t if(!is_array($v))\n \t {\n \t $_POST[$k] = strip_tags(str_replace(\"\\\"\",\"'\",$v));\n \t $GLOBALS[$k] = strip_tags(str_replace(\"\\\"\",\"'\",$GLOBALS[$k]));\n\t }\n \t }\n \t reset($_POST);\n }\n return;\n }\n }\n\telse\n {\n if($action==\"addslashes\")\n {\n if (is_array($_GET))\n {\n while(list($k,$v) = each($_GET))\n\t {\n \t if(!is_array($v))\n \t {\n \t $_GET[$k] = strip_tags(str_replace(\"\\\"\",\"'\",$v));\n \t $GLOBALS[$k] = strip_tags(str_replace(\"\\\"\",\"'\",$GLOBALS[$k]));\n\t }\n \t }\n \t reset($_GET);\n }\n \n\t\t\tif (is_array($_POST))\n\t {\n while(list($k,$v) = each($_POST))\n \t {\n \t if(!is_array($v))\n \t {\n \t $_POST[$k] = strip_tags(str_replace(\"\\\"\",\"'\",$v));\n \t$GLOBALS[$k] = strip_tags(str_replace(\"\\\"\",\"'\",$GLOBALS[$k]));\n\t }\n \t }\n \t reset($_POST);\n \t}\n\t return;\n }\n }\n\n\tif (is_array($_GET))\n {\n while(list($k,$v) = each($_GET))\n \t{\n \tif(!is_array($v))\n\t {\n \t if($action==\"stripslashes\")\n \t {\n \t $_GET[$k] = strip_tags(str_replace(\"\\\"\".\"'\",stripslashes($v)));\n \t$GLOBALS[$k] = strip_tags(str_replace(\"\\\"\",\"'\",stripslashes($GLOBALS[$k])));\n\t }\n \n \t if($action==\"addslashes\")\n \t {\n \t $_GET[$k] = strip_tags(str_replace(\"\\\"\",\"'\",addslashes($v)));\n \t$GLOBALS[$k] = strip_tags(str_replace(\"\\\"\",\"'\",addslashes($GLOBALS[$k])));\n\t }\n \t }\n\t }\n \treset($_GET);\n }\n\n\tif (is_array($_POST))\n {\n \twhile(list($k,$v) = each($_POST))\n\t {\n \t if(!is_array($v))\n \t{\n \tif($action==\"stripslashes\")\n\t {\n \t $_POST[$k] = strip_tags(str_replace(\"\\\"\",\"'\",stripslashes($v)));\n \t $GLOBALS[$k] = strip_tags(str_replace(\"\\\"\",\"'\",stripslashes($GLOBALS[$k])));\n \t}\n \n\t if($action==\"addslashes\")\n \t {\n \t $_POST[$k] = strip_tags(str_replace(\"\\\"\",\"'\",addslashes($v)));\n \t $GLOBALS[$k] = strip_tags(str_replace(\"\\\"\",\"'\",addslashes($GLOBALS[$k])));\n\t }\n \t }\n\t }\n \treset($_POST);\n }\n}", "title": "" }, { "docid": "a56c0758a6580b3b52df773addf4510e", "score": "0.6614442", "text": "function sanitize_get()\n\t{\n\t\tforeach ($_GET as $key => $value) {\n\t\t\t$_GET[$key] = htmlspecialchars($value);\n\t\t}\n\t}", "title": "" }, { "docid": "39ae895acd34d5b08cad34781580043e", "score": "0.65537477", "text": "function grab_request_vars($preprocess = true, $type = \"\")\n{\n global $escape_request_vars;\n global $request;\n\n // Do we need to strip slashes?\n $strip = false;\n if ((function_exists(\"get_magic_quotes_gpc\") && get_magic_quotes_gpc()) || (ini_get('magic_quotes_sybase') && (strtolower(ini_get('magic_quotes_sybase')) != \"off\"))) {\n $strip = true;\n }\n\n $request = array();\n\n if ($type == \"\" || $type == \"get\") {\n foreach ($_GET as $var => $val) {\n if ($escape_request_vars == true) {\n $request[$var] = map_htmlentities($val, true);\n } else {\n $request[$var] = $val;\n }\n }\n }\n\n if ($type == \"\" || $type == \"post\") {\n foreach ($_POST as $var => $val) {\n if ($escape_request_vars == true) {\n $request[$var] = map_htmlentities($val);\n } else {\n $request[$var] = $val;\n }\n }\n }\n\n // Strip slashes - we escape them later in SQL queries\n if ($strip == true) {\n foreach ($request as $var => $val) {\n if (is_array($val)) {\n $request[$var] = array_map('stripcslashes', $val);\n } else {\n $request[$var] = stripslashes($val);\n }\n }\n }\n}", "title": "" }, { "docid": "55c59b88b6ca370bc73b87950b7e70fb", "score": "0.6489608", "text": "function sanitizePOST()\n{\n //sanitize any potential useful inputs\n $id = filter_input(INPUT_POST, \"id\", FILTER_SANITIZE_NUMBER_INT);\n $username = filter_input(INPUT_POST, \"username\", FILTER_SANITIZE_SPECIAL_CHARS);\n $password = filter_input(INPUT_POST, \"password\", FILTER_SANITIZE_SPECIAL_CHARS);\n $password2 = filter_input(INPUT_POST, \"password2\", FILTER_SANITIZE_SPECIAL_CHARS);\n $email = filter_input(INPUT_POST, \"email\", FILTER_SANITIZE_EMAIL);\n $firstname = filter_input(INPUT_POST, \"firstname\", FILTER_SANITIZE_SPECIAL_CHARS);\n $lastname = filter_input(INPUT_POST, \"lastname\", FILTER_SANITIZE_SPECIAL_CHARS);\n $content = filter_input(INPUT_POST, \"content\", FILTER_SANITIZE_SPECIAL_CHARS);\n\n //return useful inputs\n}", "title": "" }, { "docid": "78fce62e4e976b10a99f14652e5568a9", "score": "0.6453063", "text": "private static function sanitizePost() {\n\n if (!empty($_POST['email'])) {\n $_POST['email'] = strtolower($_POST['email']);\n }\n\n if (!empty($_POST['phone'])) {\n $_POST['phone'] = preg_replace(\"/[^0-9-()+]/\", '', $_POST['phone']);\n }\n }", "title": "" }, { "docid": "f8de867242ff872ab073600cd2984e59", "score": "0.63386506", "text": "function forum_remove_bad_characters()\n{\n\t$_GET = remove_bad_characters($_GET);\n\t$_POST = remove_bad_characters($_POST);\n\t$_COOKIE = remove_bad_characters($_COOKIE);\n\t$_REQUEST = remove_bad_characters($_REQUEST);\n}", "title": "" }, { "docid": "43523799195f68c54ba8e159caf6caae", "score": "0.6277572", "text": "public function sanitate() {\n $this->ids();\n\n foreach(self::$types as $VAR) {\n $$VAR = $this->clear($GLOBALS['_'.$VAR]);\n unset($GLOBALS['_'.$VAR]);\n }\n\n self::$REQUEST = array_merge($REQUEST, $FILES);\n self::$COOKIE = $COOKIE;\n }", "title": "" }, { "docid": "9b5e295d16e25819cbb9f698208ed1ba", "score": "0.6267601", "text": "public function prepare_request(){\n $u=explode('?',$_SERVER['REQUEST_URI']); \n $url=$u[0];\n \n\t\t \n\t\t\tif($_SERVER['REQUEST_METHOD']=='POST'){\n\t\t\t if(isset($u[1]))\n\t\t\t {\n\t\t\t\t$url.=\"?\".$u[1];\n\t\t\t }\n\t\t\t $vars=$_POST;\n\t\t\t}else{\n\t\t\t\t$vars=$_GET;\n\t\t\t\tif(isset($u[1]))\n\t\t\t\t{\t\n\t\t\t\t$vv=explode(\"&\",$u[1]);\n\t\t\t\t\n\t\t\t\tforeach($vv as $v)\n\t\t\t\t\tif(!empty($v))\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t$hp=explode(\"=\",$v);\n\t\t\t\t\t\t$vars[$hp[0]]=isset($hp[1])?$hp[1]:'';\n\t\t\t\t\t} \n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n $http_request=array('url'=>$url,\n 'vars'=>$vars,\n 'method'=>$_SERVER['REQUEST_METHOD']);\n\t\t\t\n if(!$this->web_root)return $http_request;\n\t\t\t\t\t\t\n\t\t\t$hr=$this->check_security_key($http_request);\n\n\t\t\tif($hr)return $hr;\n\t\t\t\n if($this->chk_skip_ip())\n return $http_request;\n else{ \t\t\t\n $data=$this->analize_request($http_request);\n $data['url']='http://'.$_SERVER['SERVER_NAME'].$data['url'];\n return $data;\n }\n }", "title": "" }, { "docid": "1a51e3e20193cdeb350940934e88e24e", "score": "0.62566435", "text": "function clean_inputs(){\n if(get_magic_quotes_gpc()){\n $in = array(&$_GET, &$_POST, &$_COOKIE, &$_SESSION);\n while(list($k,$v) = each($in)){\n foreach($v as $key => $val){\n if(!is_array($val)){\n $in[$k][$key] = stripslashes(striptags($val));\n continue;\n }\n $in[] = & $in[$k][$key];\n }\n }\n }\n unset($in);\n }", "title": "" }, { "docid": "d0670b5521afb9735168bc6a082f1887", "score": "0.62140787", "text": "function purifyRequestParams(){\n\tpurifyRequestVar();//$_REQUEST\n\tpurifyPostParams();//$_POST\n\tpurifyGetParams();//$_GET\n\treturn $_REQUEST;\n}", "title": "" }, { "docid": "d3a766bad1661d1e5eacf8b010cde15d", "score": "0.6168485", "text": "function _getclean($s) {\n global $link;\n if (isset($_GET[$s])) {\n\t$source = $_GET[$s];\n } else if (isset($_POST[$s])) {\n\t$source = $_POST[$s];\n } else {\n\treturn NULL;\n }\n if(get_magic_quotes_gpc()) {\n\treturn trim(htmlspecialchars($link->real_escape_string(stripslashes($source)), ENT_QUOTES));\n }\n else {\n\treturn trim(htmlspecialchars($link->real_escape_string($source), ENT_QUOTES));\n }\n}", "title": "" }, { "docid": "22439493badb0ede6747462000259055", "score": "0.6163095", "text": "public function parse_input() {\n\n\t\t$this->magic_quotes = get_magic_quotes_gpc();\n\n\t\tif (is_array($_GET)) {\n\t\t\twhile(list($k, $v) = each($_GET)) {\n\t\t\t\t$this->input[$this->clean_me($k)] = $this->clean_me($v);\n\t\t\t}\n\t\t}\n\n\t\tif (is_array($_POST)) {\n\t\t\twhile(list($k, $v) = each($_POST)) {\n\t\t\t\t$this->input[$this->clean_me($k)] = $this->clean_me($v);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//|-------------------------------------------\n\t\t//| Destroy The Others! >:(\n\t\t//|-------------------------------------------\n\t\t\n\t\tunset($_GET, $_POST);\n\n\t}", "title": "" }, { "docid": "7517faf509430d0c3960438e60a81d07", "score": "0.61218613", "text": "function sanitizeInput($inputToSanitize) {\n $thisSanitizedInput = filter_input(INPUT_POST, \"sanitizeInput\", FILTER_SANITIZE_URL);\n \n return $thisSanitizedInput;\n}", "title": "" }, { "docid": "811839ff877d233f36bc741d887c4569", "score": "0.60935694", "text": "function get_input_vars(){\n global $HTTP_SERVER_VARS;\n $REQUEST_METHOD = $HTTP_SERVER_VARS['REQUEST_METHOD'];\n global $HTTP_POST_VARS;\n global $HTTP_GET_VARS;\n\n $vars = $REQUEST_METHOD == 'POST' ? $HTTP_POST_VARS : $HTTP_GET_VARS;\n foreach ($vars as $k=>$v){\n if (is_array($v)) continue;\n if (get_magic_quotes_gpc()) $v = stripslashes($v);\n $vars[$k] = trim($v);\n }\n return $vars;\n}", "title": "" }, { "docid": "a937ed790ec960858419caf454045d17", "score": "0.60666025", "text": "function clean()\n {\n self::_cleanArray( $_FILES );\n self::_cleanArray( $_ENV );\n self::_cleanArray( $_GET );\n self::_cleanArray( $_POST );\n self::_cleanArray( $_COOKIE );\n self::_cleanArray( $_SERVER );\n\n if (isset( $_SESSION )) {\n self::_cleanArray( $_SESSION );\n }\n\n $REQUEST = $_REQUEST;\n $GET = $_GET;\n $POST = $_POST;\n $COOKIE = $_COOKIE;\n $FILES = $_FILES;\n $ENV = $_ENV;\n $SERVER = $_SERVER;\n\n if (isset ( $_SESSION )) {\n $SESSION = $_SESSION;\n }\n\n foreach ($GLOBALS as $key => $value)\n {\n if ( $key != 'GLOBALS' ) {\n unset ( $GLOBALS [ $key ] );\n }\n }\n $_REQUEST = $REQUEST;\n $_GET = $GET;\n $_POST = $POST;\n $_COOKIE = $COOKIE;\n $_FILES = $FILES;\n $_ENV = $ENV;\n $_SERVER = $SERVER;\n\n if (isset ( $SESSION )) {\n $_SESSION = $SESSION;\n }\n\n // Make sure the request hash is clean on file inclusion\n $GLOBALS['_Request'] = array();\n }", "title": "" }, { "docid": "ba7e0ca21b007d7abe66c9cda9c1a749", "score": "0.60655904", "text": "public function trimmingRequest(){\n ($_POST != false) ? $postKeys = array_keys($_POST) : $postKeys = array();\n ($_GET != false) ? $getKeys = array_keys($_GET) : $getKeys = array();\n\n foreach($postKeys as $key){\n $_POST[$key] = str_replace('%20','',$_POST[$key]);\n if(!is_array($_POST[$key])) $_POST[$key] = trim($_POST[$key]);\n }\n foreach($getKeys as $key){\n $_GET[$key] = str_replace('%20','',$_GET[$key]);\n if(!is_array($_GET[$key])) $_GET[$key] = trim($_GET[$key]);\n }\n }", "title": "" }, { "docid": "131e7317f07463961d76c8ccb3d771d2", "score": "0.6064027", "text": "function sanitize($input, $flags, $min='', $max='')\n{\n if($flags & UTF8) $input = my_utf8_decode($input);\n if($flags & PARANOID) $input = sanitize_paranoid_string($input, $min, $max);\n if($flags & INT) $input = sanitize_int($input, $min, $max);\n if($flags & FLOAT) $input = sanitize_float($input, $min, $max);\n if($flags & HTML) $input = sanitize_html_string($input, $min, $max);\n if($flags & SQL) $input = sanitize_sql_string($input, $min, $max);\n if($flags & LDAP) $input = sanitize_ldap_string($input, $min, $max);\n if($flags & SYSTEM) $input = sanitize_system_string($input, $min, $max);\n if($flags & STRICT) $input = sanitize_strict_string($input, $min, $max);\n\n return $input;\n}", "title": "" }, { "docid": "c913a59d9cd26de335cf5f3484f241a3", "score": "0.604742", "text": "public function removeMagicQuotes()\r\n {\r\n // $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\r\n if (get_magic_quotes_gpc()) {\r\n if (isset($_GET)) {\r\n $_GET = stripSlashesDeep($_GET);\r\n }\r\n if (isset($_POST)) {\r\n $_POST = stripSlashesDeep($_POST);\r\n }\r\n if (isset($_COOKIE)) {\r\n $_COOKIE = stripSlashesDeep($_COOKIE);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "987e0717b4594fa026e9830532b29220", "score": "0.604512", "text": "public function sanitize()\n {\n // extract input request data\n $inputs = $this->all();\n\n // format\n ucfirst(trim($inputs['title']));\n trim($inputs['year']);\n trim($inputs['details']);\n\n // sanitize\n $inputs['title'] = filter_var($inputs['title'], FILTER_SANITIZE_STRING);\n $inputs['year'] = filter_var($inputs['year'], FILTER_SANITIZE_NUMBER_INT);\n\n $this->replace($inputs);\n }", "title": "" }, { "docid": "29cf6f373b4c9b924d4d573c70ffe658", "score": "0.6012929", "text": "function protection_minimal($conn, $var)\n{\n return mysqli_real_escape_string($conn, $_POST[$var]);\n}", "title": "" }, { "docid": "f81182dd9d7cd71a179ba394f7f6a7fa", "score": "0.6004416", "text": "public function scrubPost()\n\t\t{\n\t\t\t$db = DBManager::getConnection();\n\t\t\tforeach($_POST as &$val)\n\t\t\t{\n\t\t\t\tif(! is_array($val))\n\t\t\t\t\t$val = $db->real_escape_string(trim($val));\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "2c672d1d175ce78414ed5a2211d10978", "score": "0.59854186", "text": "function urlSecurity()\n{\n\tif(URL_SECURITY)\n\t{\n\t\t$decodeURL = flc_url_decode($_GET['a']);\t\t//decode the url\n\t\tstringTo_GET($decodeURL);\n\t}\n}", "title": "" }, { "docid": "0b002838ef07ea6b6877d1716aba9df3", "score": "0.5979805", "text": "function clean_input_gpc($type = '', $value = '', $option = '') {\n\tswitch ($type) {\n\t\tcase 'g' :\n\t\t\t$type = \"INPUT_GET\";\n\t\t\tbreak;\n\t\tcase 'p' :\n\t\t\t$type = \"INPUT_POST\";\n\t\t\tbreak;\n\t\tcase 'c' :\n\t\t\t$type = \"INPUT_COOKIE\";\n\t\t\tbreak;\n\t\tcase 's' :\n\t\t\t$type = \"INPUT_SERVER\";\n\t\t\tbreak;\n\t\tcase 'e' :\n\t\t\t$type = \"INPUT_ENV\";\n\t\t\tbreak;\n\t}\n\n\t// Optine may be ( EMAIL - URL - STRING and so on - http://www.w3schools.com/php/php_ref_filter.asp)\n\n\t$input = filter_input(constant($type), $value, constant('FILTER_SANITIZE_' . $option));\n\n\treturn $input;\n\n}", "title": "" }, { "docid": "52d256e2cbb204512fbee559a302289a", "score": "0.59643686", "text": "function sanitise_inputs($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "title": "" }, { "docid": "d0b62472e89e762263b7168ffe9e801c", "score": "0.5955912", "text": "private static function checkRequest() {\n\t\t// Copyright (c) Drupal\n\t\tif (!isset($_SERVER['HTTP_REFERER'])) {\n \t\t$_SERVER['HTTP_REFERER'] = '';\n \t\t}\n \t\tif (!isset($_SERVER['SERVER_PROTOCOL']) || ($_SERVER['SERVER_PROTOCOL'] != 'HTTP/1.0' && $_SERVER['SERVER_PROTOCOL'] != 'HTTP/1.1')) {\n \t\t$_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.0';\n \t\t}\n \t\tif (isset($_SERVER['HTTP_HOST'])) {\n \t\t// As HTTP_HOST is user input, ensure it only contains characters allowed\n \t\t// in hostnames. See RFC 952 (and RFC 2181).\n \t\t// $_SERVER['HTTP_HOST'] is lowercased here per specifications.\n \t\t\t$_SERVER['HTTP_HOST'] = strtolower($_SERVER['HTTP_HOST']);\n \t\tif (!preg_match('/^\\[?(?:[a-zA-Z0-9-:\\]_]+\\.?)+$/', $_SERVER['HTTP_HOST'])) {\n \t\t\t// HTTP_HOST is invalid, e.g. if containing slashes it may be an attack.\n \t\t\theader($_SERVER['SERVER_PROTOCOL'] . ' 400 Bad Request');\n \t \t\texit;\n \t\t}\n \t\t} else {\n\t\t\t// Some pre-HTTP/1.1 clients will not send a Host header. Ensure the key is\n \t\t\t// defined for E_ALL compliance.\n \t\t$_SERVER['HTTP_HOST'] = '';\n \t\t}\n \t\t\n\t}", "title": "" }, { "docid": "40afc0172733d8da519bcb5adc102baf", "score": "0.59554124", "text": "function sanitise_input($data) {\n \t\t$data = trim($data);\n \t\t$data = stripslashes($data);\n \t\t$data = htmlspecialchars($data);\n \t\treturn $data;\n\t}", "title": "" }, { "docid": "220b92e0a129994d6d592518dbc8094b", "score": "0.59550095", "text": "protected function preprocessRequest()\n {\n }", "title": "" }, { "docid": "770d6cc706fff0bce57efcb239f1db00", "score": "0.59472233", "text": "abstract protected function _Sanitize($argument);", "title": "" }, { "docid": "71b64a9f23f89d85878830f2146e2a0e", "score": "0.59307146", "text": "public static function ProcessAllInput()\n\t\t{\n\t\t\tself::ProcessSingleInput($_COOKIE);\n\t\t\tself::ProcessSingleInput($_GET);\n\t\t\tself::ProcessSingleInput($_POST);\n\t\t}", "title": "" }, { "docid": "571d89d505d72e8eda446dca320bb15f", "score": "0.5927795", "text": "FUNCTION secure1 ($arr, $size) { \n// limits the size and characters with preg match and converts to htmlentities\n// assumed PHP magicquotes are on, mysql escape is not used, use escape1() before mysql\n \nglobal $lnk, $link, $scr1;\n\nif (!$arr) { return; }\n\n $_SESSION[\"w_safety\"] = \"\";\n\n$carr = implode($arr);\n$carr = stripslashes($carr);\n\n$nerr = 0;\n$msg .= \"<h4>SAFETY ISSUE</h4> Reported by: \". $_SESSION[\"w_www\"] . \" ... function secure1<br><br>\";\n$ncarr = strlen($carr);\n// echo \"ncarr: \", $ncarr;\n\nif ($ncarr > $size) { \n\t$nerr++; \n\t$cerr .= \"Length of your entry is too long.\";\n\t$msg .= \"<b>Issue 1: User's post is bigger than allowed size: </b>\". $ncarr . \" > \" . $size . \"<br>\"; \n}\n\nif (!preg_match(\"/^[a-zA-Z0-9 ,\\*\\+-@_\\.'\\(\\)\\r\\n]+$/\" , $carr)) { \n\t$nerr++; \n\t$cerr .= \"Don't use excluded characters.\";\n\t$msg .= \"<b>\" . $cerr . \"</b><br> \"; \n} \n\nif (strstr($carr, \"script\")) { \n\t$nerr++; \n\t$cerr .= \"Please try again.\";\n\t$msg .= \"<b>Issue 3: Script is used. </b> <br>\"; \n} \n\nif ($nerr) { \n echo1(\"ERROR: \", $cerr);\n $_SESSION[\"w_safety\"] = \"unsafe\";\n unsecure1($arr, $msg); \n\n $scr1 .= \"<div class='error'> <center> <h4>ERROR: Sorry an error is occurred!.. \" . $cerr . \"</h4> </div>\"; \n $_POST = \"\";\n $_GET = \"\";\n return;\n} \n\n$_SESSION[\"w_post1\"] = $_POST;\n$_SESSION[\"w_get1\"] = $_GET;\n\n// $arr = char1($arr); \n\nreturn $arr;\n\n}", "title": "" }, { "docid": "f26d47c88931794fc3e1b34f5e7fea6f", "score": "0.5925566", "text": "function post_request_protection()\n\t{\n\t\tglobal $ilconfig;\n\t\tif (mb_strtolower($_SERVER['REQUEST_METHOD']) == 'post')\n {\n\t\t\t// default referrers should be: paypal.com moneybookers.com authorize.net cashu.com plugnpay.com\n\t\t\t// please see AdminCP > Global Security Settings to update this list\n $acceptedreferrers = $ilconfig['post_request_whitelist'];\n if (!empty($_ENV['HTTP_HOST']) OR !empty($_SERVER['HTTP_HOST']))\n {\n $httphost = $_SERVER['HTTP_HOST'] ? $_SERVER['HTTP_HOST'] : $_ENV['HTTP_HOST'];\n }\n else if (!empty($_SERVER['SERVER_NAME']) OR !empty($_ENV['SERVER_NAME']))\n {\n $httphost = $_SERVER['SERVER_NAME'] ? $_SERVER['SERVER_NAME'] : $_ENV['SERVER_NAME'];\n }\n if (!empty($httphost) AND !empty($_SERVER['HTTP_REFERER']))\n {\n $httphost = preg_replace('#:80$#', '', trim($httphost));\n $parts = @parse_url($_SERVER['HTTP_REFERER']);\n $port = !empty($parts['port']) ? intval($parts['port']) : '80';\n $host = $parts['host'] . ((!empty($port) AND $port != '80') ? \":$port\" : '');\n $allowdomains = preg_split('#\\s+#', $acceptedreferrers, -1, PREG_SPLIT_NO_EMPTY);\n $allowdomains[] = preg_replace('#^www\\.#i', '', $httphost);\n $passcheck = false;\n foreach ($allowdomains AS $allowhost)\n {\n if (preg_match('#' . preg_quote($allowhost, '#') . '$#siU', $host))\n {\n $passcheck = true;\n break;\n }\n }\n unset($allowdomains);\n if ($passcheck == false)\n {\n $message = 'POST request could not find your domain in the whitelist. Please contact support for further information.';\n $template = '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html>\n<head>\n <title>POST request error</title>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n <style type=\"text/css\">\n <!--\t\n body { background-color: white; color: black; }\n #container { width: 400px; }\n #message { width: 400px; color: black; background-color: #FFFFCC; }\n #bodytitle { font: 13pt/15pt verdana, arial, sans-serif; height: 35px; vertical-align: top; }\n .bodytext { font: 8pt/11pt verdana, arial, sans-serif; }\n a:link { font: 8pt/11pt verdana, arial, sans-serif; color: red; }\n a:visited { font: 8pt/11pt verdana, arial, sans-serif; color: #4e4e4e; }\n -->\n </style>\n</head>\n<body>\n<table cellpadding=\"3\" cellspacing=\"5\" id=\"container\">\n<tr>\n <td id=\"bodytitle\" width=\"100%\">POST Request Error</td>\n</tr>\n<tr>\n <td class=\"bodytext\" colspan=\"2\">' . $message . '</td>\n</tr>\n<tr>\n <td colspan=\"2\"><hr /></td>\n</tr>\n<tr>\n <td class=\"bodytext\" colspan=\"2\">\n Please try the following:\n <ul>\n <li>Click the <a href=\"javascript:history.back(1)\">Back</a> button to try another link.</li>\n </ul>\n </td>\n</tr>\n<tr>\n <td class=\"bodytext\" colspan=\"2\">The technical staff have been notified of the error. We apologise for any inconvenience.</td>\n</tr>\n</table>\n\n</body>\n</html>';\n // tell the search engines that our service is temporarily unavailable to prevent indexing db errors\n header('HTTP/1.1 503 Service Temporarily Unavailable');\n header('Status: 503 Service Temporarily Unavailable');\n header('Retry-After: 3600');\n die($template);\n }\n }\n }\n\t}", "title": "" }, { "docid": "ee99d643d2454d355f3b840fb75dab8b", "score": "0.5883425", "text": "function avoid_direct_access()// function to prevent direct access of the page\n{\nunregister_globals('_POST', '_GET', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES');// this function unset any variable that has been set by user for security reason like remote file inclusion in template\nif (!defined('MAIN_LOADED')) die (\"This file can't be accessed directly.\");\n}", "title": "" }, { "docid": "81f917e90930995833e8dd92cf3441b4", "score": "0.58451", "text": "function catch_globals()\n\t{\n\t\twhile (list($key, $val) = @each($_GET)) $this -> globals[$key] = $val;\n\t\twhile (list($key, $val) = @each($_POST)) $this -> globals[$key] = $val;\n\t\twhile (list($key, $val) = @each($_SERVER)) $this -> globals[$key] = $val;\n\t}", "title": "" }, { "docid": "823666e3b41664fa799800e16ec1722a", "score": "0.58285564", "text": "function req($input) {\r\nif (isset($_GET[$input])) {\r\n\t$value\t= mysql_real_escape_string($_GET[$input]);\r\n} else {\r\n\t$value\t= (isset($_POST[$input]))?mysql_real_escape_string($_POST[$input]):null;\r\n}\r\n\treturn $value;\r\n}", "title": "" }, { "docid": "25ca0e2f94b510b04093b68dc9d5cbaa", "score": "0.58179003", "text": "function et_core_intentionally_unsanitized( $passthru, $excuse ) {\n\t$valid_excuses = array();\n\n\tif ( ! in_array( $excuse, $valid_excuses ) ) {\n\t\t_doing_it_wrong( __FUNCTION__, esc_html__( 'This is not a valid excuse to not sanitize the passed value.', 'et_core' ), esc_html( et_get_theme_version() ) );\n\t}\n\n\treturn $passthru;\n}", "title": "" }, { "docid": "0449060a274563aaef56a7e8a718110c", "score": "0.5814917", "text": "function rb_request_filter( $query_vars ) {\r\n if( isset( $_GET['s'] ) && empty( $_GET['s'] ) ) {\r\n $query_vars['s'] = \" \";\r\n }\r\n return $query_vars;\r\n}", "title": "" }, { "docid": "08c9cb91e19e98f2e15a93c4510a8995", "score": "0.5808041", "text": "function xssAttackDetected( $invalidData )\n{\n /// but I want the login page to continue loading at least w/o params\n\n error_log('XSS DETECTED invalid='.$invalidData.' from uri='. $_SERVER['REQUEST_URI'] );\n\n while (@ob_end_clean());\n header(\"HTTP/1.0 403 Forbidden - XSS Detected\");\n exit('<html xmlns=\"http://www.w3.org/1999/xhtml\"><head><title>403 Forbidden</title></head><body><h1>Forbidden</h1><p>The requested URL contains invalid characters and will not be processed.</p></body></html>');\n\n // $_SERVER['REQUEST_URI']=preg_replace('/?.*$/','',$_SERVER['REQUEST_URI']);\n // $_SERVER['argv']=[];\n // $_SERVER['QUERY_STRING']='';\n}", "title": "" }, { "docid": "ebf3f182b012f7a35a2064fece8c38fe", "score": "0.5801735", "text": "function santize($raw_value){ //$username = santize($_POST['username']);\n \n return filter_var($raw_value, FILTER_SANITIZE_STRING);\n \n}", "title": "" }, { "docid": "f84ad4da33034ae333f17f667f73aff1", "score": "0.57950836", "text": "private static function stripSlashesForUserInputs() {\n if (!get_magic_quotes_gpc()) {\n return;\n }\n foreach ($_POST as $key => $value) {\n $_POST[$key] = stripslashes($value);\n }\n foreach ($_GET as $key => $value) {\n $_GET[$key] = stripslashes($value);\n }\n foreach ($_COOKIE as $key => $value) {\n $_COOKIE[$key] = stripslashes($value);\n }\n }", "title": "" }, { "docid": "0ab7045bb38e1c6e9659afdbe82aef06", "score": "0.5792671", "text": "private function __get_validate()\n {\n __h($_GET);\n }", "title": "" }, { "docid": "6908ee9ab4415d25110f0f07470404a5", "score": "0.5780855", "text": "static public function paramsProcess(){\r\n static::$_params = array_merge_recursive($_GET, $_POST);\r\n static::$_url = str_replace(static::$_baseDir, '', $_SERVER['REQUEST_URI']);\r\n\r\n if(static::$_url == '')\r\n static::$_url = static::$_defaultUrl;\r\n\r\n static::$_verb = $_SERVER['REQUEST_METHOD'];\r\n static::$_query = $_SERVER['QUERY_STRING'];\r\n\r\n $tabs = explode('/', static::$_url);\r\n static::$_controller = \"\\\\controllers\\\\\" . $tabs[1] . 'Controller';\r\n static::$_action = strtolower(static::$_verb) . ucfirst($tabs[2]) . 'Action';\r\n }", "title": "" }, { "docid": "7d11eb905f148453a2b0df27eeab592b", "score": "0.5752634", "text": "function KT_setServerVariables() {\r\n\tif (!isset($_SERVER['QUERY_STRING']) && isset($_ENV['QUERY_STRING'])) {\r\n\t\t$_SERVER['QUERY_STRING'] = $_ENV['QUERY_STRING'];\r\n\t}\r\n\tif (!isset($_SERVER['QUERY_STRING'])) {\r\n\t\t$_SERVER['QUERY_STRING'] = '';\r\n\t}\r\n\tif (!isset($_SERVER['PHP_SELF']) && isset($_ENV['PHP_SELF'])) {\r\n\t\t$_SERVER['PHP_SELF'] = $_ENV['PHP_SELF'];\r\n\t}\r\n\tif (!isset($_SERVER['REQUEST_URI']) && isset($_ENV['REQUEST_URI'])) {\r\n\t\t$_SERVER['REQUEST_URI'] = $_ENV['REQUEST_URI'];\r\n\t}\r\n\tif (!isset($_SERVER['REQUEST_URI'])) {\r\n\t\t$_SERVER['REQUEST_URI'] = $_SERVER['PHP_SELF'].(isset($_SERVER['QUERY_STRING'])?\"?\".$_SERVER['QUERY_STRING']:\"\");\r\n\t}\r\n\tif (!isset($_SERVER['SERVER_NAME']) && isset($_ENV['SERVER_NAME'])) {\r\n\t\t$_SERVER['SERVER_NAME'] = $_ENV['SERVER_NAME'];\r\n\t}\r\n\tif (!isset($_SERVER['HTTP_HOST']) && isset($_ENV['HTTP_HOST'])) {\r\n\t\t$_SERVER['HTTP_HOST'] = $_ENV['HTTP_HOST'];\r\n\t}\r\n\tif (!isset($_SERVER['HTTP_HOST']) && isset($_SERVER['SERVER_NAME'])) {\r\n\t\t$_SERVER['HTTP_HOST'] = $_SERVER['SERVER_NAME'];\r\n\t}\r\n\tif (!isset($_SERVER['HTTPS']) && isset($_ENV['HTTPS'])) {\r\n\t\t$_SERVER['HTTPS'] = $_ENV['HTTPS'];\r\n\t}\r\n\tif (!isset($_SERVER['HTTP_REFERER']) && isset($_ENV['HTTP_REFERER'])) {\r\n\t\t$_SERVER['HTTP_REFERER'] = $_ENV['HTTP_REFERER'];\r\n\t}\r\n\tif (!isset($_SERVER['HTTP_USER_AGENT']) && isset($_ENV['HTTP_USER_AGENT'])) {\r\n\t\t$_SERVER['HTTP_USER_AGENT'] = $_ENV['HTTP_USER_AGENT'];\r\n\t}\r\n\tif (!isset($_SERVER['REMOTE_ADDR']) && isset($_ENV['REMOTE_ADDR'])) {\r\n\t\t$_SERVER['REMOTE_ADDR'] = $_ENV['REMOTE_ADDR'];\r\n\t}\r\n\tif (!isset($_SERVER['SCRIPT_FILENAME']) && isset($_ENV['SCRIPT_FILENAME'])) {\r\n\t\t$_SERVER['SCRIPT_FILENAME'] = $_ENV['SCRIPT_FILENAME'];\r\n\t}\r\n\tif (!isset($_SERVER['PATH_TRANSLATED']) && isset($_ENV['PATH_TRANSLATED'])) {\r\n\t\t$_SERVER['PATH_TRANSLATED'] = $_ENV['PATH_TRANSLATED'];\r\n\t}\r\n\tif (!isset($_SERVER['PATH_TRANSLATED']) && isset($_SERVER['ORIG_PATH_TRANSLATED'])) {\r\n\t\t$_SERVER['PATH_TRANSLATED'] = $_SERVER['ORIG_PATH_TRANSLATED'];\r\n\t}\r\n\tif (!isset($_SERVER['PATH_TRANSLATED']) && isset($_SERVER['DOCUMENT_ROOT']) && isset($_SERVER['PHP_SELF'])) {\r\n\t\t$_SERVER['PATH_TRANSLATED'] = $_SERVER['DOCUMENT_ROOT'].$_SERVER['PHP_SELF'];\r\n\t\t$_SERVER['PATH_TRANSLATED'] = str_replace(\"\\\\\", \"/\", $_SERVER['PATH_TRANSLATED']);\r\n\t\t$_SERVER['PATH_TRANSLATED'] = str_replace('//', '/', $_SERVER['PATH_TRANSLATED']);\r\n\t}\r\n\tif (!isset($_SERVER['PATH_TRANSLATED']) && isset($_SERVER['SCRIPT_FILENAME'])) {\r\n\t\t$_SERVER['PATH_TRANSLATED'] = $_SERVER['SCRIPT_FILENAME'];\r\n\t}\r\n\tif (!isset($_SERVER['SERVER_PROTOCOL']) && isset($_ENV['SERVER_PROTOCOL'])) {\r\n\t\t$_SERVER['SERVER_PROTOCOL'] = $_ENV['SERVER_PROTOCOL'];\r\n\t}\r\n\tif (!isset($GLOBALS['HTTP_SERVER_VARS'])) {\r\n\t\t$GLOBALS['HTTP_SERVER_VARS'] = &$_SERVER;\r\n\t}\r\n\tif (!isset($GLOBALS['HTTP_GET_VARS'])) {\r\n\t\t$GLOBALS['HTTP_GET_VARS'] = &$_GET;\r\n\t}\r\n\tif (!isset($GLOBALS['HTTP_POST_VARS'])) {\r\n\t\t$GLOBALS['HTTP_POST_VARS'] = &$_POST;\r\n\t}\r\n\tif (!isset($GLOBALS['HTTP_COOKIE_VARS'])) {\r\n\t\t$GLOBALS['HTTP_COOKIE_VARS'] = &$_COOKIE;\r\n\t}\r\n\tif (!isset($GLOBALS['HTTP_SESSION_VARS'])) {\r\n\t\t$GLOBALS['HTTP_SESSION_VARS'] = &$_SESSION;\r\n\t}\r\n\tif (!isset($GLOBALS['HTTP_ENV_VARS'])) {\r\n\t\t$GLOBALS['HTTP_ENV_VARS'] = &$_ENV;\r\n\t}\r\n}", "title": "" }, { "docid": "aa4f89571c973f9783f696e58d56dd34", "score": "0.57526124", "text": "function revo_request_filter($query_vars) {\n if (isset($_GET['s']) && empty($_GET['s'])) {\n $query_vars['s'] = ' ';\n }\n\n return $query_vars;\n}", "title": "" }, { "docid": "5da9f69603a4ad972ce4781a649cec5c", "score": "0.574758", "text": "protected function processInputData()\n {\n if (empty($_SERVER['REQUEST_URI'])) {\n return;\n }\n\n $api_base = str_replace(basename($_SERVER['SCRIPT_NAME']), \"\", $_SERVER['SCRIPT_NAME']);\n $api_request = str_replace($api_base, \"\", $_SERVER['REQUEST_URI']);\n\n if (preg_match(\"~^([^/.?&]+)([/?]?.*)~\", $api_request, $matches)) {\n $this->action = $matches[1];\n $this->param_string = urldecode($matches[2]);\n } else {\n $this->action = reqvar_value(\"action\");\n $this->param_string = urldecode(str_replace(basename($_SERVER['SCRIPT_NAME']), \"\", $api_request));\n }\n }", "title": "" }, { "docid": "5026788529f4e642f7b66434d06287c7", "score": "0.5745661", "text": "private function safetyCheck()\r\n {\r\n // Safety check [forces the post method to prevent proxy trouble or accidental triggering]:\r\n if (strcmp($this->input->post('really_do_this'), 'Yes, I am actually serious.'))\r\n {\r\n $this->output->set_status_header(401);\r\n exit();\r\n }\r\n }", "title": "" }, { "docid": "5634a8fb0c88f91862d4649f9ec26f7f", "score": "0.574454", "text": "function SanitizeInput() {\r\n global $cred, $destemail, $xtime, $xviews;\r\n\r\n \r\n \r\n if(isset($_POST['cred'])) {\r\n $cred = SanitizeCred($_POST['cred']);\r\n if ($cred == false) {\r\n PrintError('Please input a valid credential!');\r\n return false;\r\n }\r\n } else { return false; }\r\n\r\n if (isset($_POST['minutes'])) {\r\n $xtime = SanitizeNumber($_POST['minutes']);\r\n if ($xtime == false) {\r\n PrintError('Please input a valid time limit (positive whole number)!');\r\n return false;\r\n }\r\n } else { return false; }\r\n\r\n if (isset($_POST['views'])) {\r\n $xviews = SanitizeNumber($_POST['views']);\r\n if ($xviews == false) {\r\n PrintError('Please input a valid view limit (positive whole number)!');\r\n return false;\r\n }\r\n } else { return false; }\r\n// TODO: config for mailing service\r\n // if (isset($_POST['destemail'])) {\r\n // $destemail = SanitizeEmail($_POST['destemail']);\r\n // if ($destemail == false) {\r\n // PrintError('Please input a valid email!');\r\n // return false;\r\n // }\r\n // } else { return false; }\r\n return true;\r\n}", "title": "" }, { "docid": "5b7bb4315fb6b574db299a60a0ee2081", "score": "0.5741515", "text": "function sanitizeInputVar($input_var) {\n return filter_var($input_var, FILTER_SANITIZE_FULL_SPECIAL_CHARS);\n}", "title": "" }, { "docid": "08b1af91219fd3379be0fef4435bc4a3", "score": "0.57365525", "text": "function sanitiseString($dirty){\n $dirty = trim($dirty);\n $dirty = mysqli_real_escape_string($dirty);\n $dirty = filter_var($dirty, FILTER_SANITIZE_FULL_SPECIAL_CHARS);\n $clean = filter_var($dirty, FILTER_SANITIZE_STRING);\n return $clean;\n }", "title": "" }, { "docid": "bd54c297da8180b861bca9b9310e5c31", "score": "0.57278055", "text": "public function fixPostMagic(){\n\n if (get_magic_quotes_gpc() && !empty($_POST)){\n\n $f = function($data) use (&$f){\n foreach ($data as $k => $v){\n if (is_array($v)){\n $data[$k] = $f($v);\n } else\n $data[$k] = stripslashes($v);\n }\n return $data;\n };\n\n $_POST = $f($_POST);\n }\n\n }", "title": "" }, { "docid": "324326d71fb9a165a6056e2dbef35feb", "score": "0.56980985", "text": "function get_post_var($varname, $noWhiteSpace = true)\n{\n return sanitize_data($_POST[$varname], $noWhiteSpace);\n}", "title": "" }, { "docid": "b76c4d63643548a4de624c95be4a0db8", "score": "0.56753373", "text": "function sanitize_inputs()\n\t{\n\t\tif(isset($this->checked)) {\n\t\t\t$checked = get_object_vars($this->checked);\n\t\t\tforeach($checked as $key =>$value) {\n\t\t\t\tif (!is_array($checked[$key]) AND $key != \"faq_answer\") {\n\t\t\t\t\t$this->checked->$key = trim($this->inputfilter->process($value));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "8ca4b971598ba5ce7b9171b4946862d1", "score": "0.56433314", "text": "public function sanitize($value);", "title": "" }, { "docid": "1f6e13f6b99ec05e1d2b5b404e2b1aa1", "score": "0.5634198", "text": "function sanitizeInput($var){\r\n $var = trim($var);\r\n $var = strip_tags($var);\r\n $var = htmlentities($var);\r\n $var = stripslashes($var);\r\n return $var;\r\n}", "title": "" }, { "docid": "9570b516846a88f279bbf161b7ee70c6", "score": "0.56273806", "text": "public static function sanitized_get( $varname ){\n\n\t\tif ( array_key_exists($varname, $_GET) ){\n\n\t\t\treturn self::sanitize( $_GET[$varname] );\n\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\n\n\t}", "title": "" }, { "docid": "ed151897a4962ff7cdbb94dd61605ddf", "score": "0.562005", "text": "protected function sanitize()\n {\n $this->data = array_diff_key($this->data['__data'], array_flip(['__env', 'app', 'obLevel']));\n }", "title": "" }, { "docid": "d03a41ab58c891b4f76b5c53409a266c", "score": "0.561905", "text": "function processPostVars()\n {\n $this->id = intval($_POST['id']);\n $this->code = trimStrip($_POST['code']);\n $this->title = trimStrip($_POST['title']);\n $this->alert = trimStrip($_POST['alert']);\n $this->thanks = trimStrip($_POST['thanks']);\n $this->syllabus = trimStrip($_POST['syllabus']);\n $this->locale = trimStrip($_POST['locale']);\n $this->term = intval($_POST['term']);\n $this->repl_students = intval($_POST['repl_students']);\n $this->repl_count = intval($_POST['repl_count']);\n $this->group_limit = intval($_POST['group_limit']);\n $this->group_type = intval($_POST['group_type']);\n $this->rootsection = intval($_POST['rootsection']);\n }", "title": "" }, { "docid": "6e014ab18a45b185f21e98ffb1caa45a", "score": "0.5617817", "text": "function sanitize($pC, $sT, $dA, $p, $eD){\r\n\t\t//sanitize form data\r\n\t\t$pC= filter_var($pC, FILTER_SANITIZE_STRING);\r\n\t\t$sT= filter_var($sT, FILTER_SANITIZE_STRING);\r\n\t\t$dA= filter_var($dA, FILTER_SANITIZE_STRING);\r\n\t\t$p= filter_var($p, FILTER_SANITIZE_STRING);\r\n\t\t$eD= filter_var($eD, FILTER_SANITIZE_STRING);\r\n\t\t\r\n\t\t//include escape string function here, this uses the mysqli escape string to prevent special characters from being entered into the db\r\n\t\tescapeString($pC);\r\n\t\tescapeString($sT);\r\n\t\tescapeString($dA);\r\n\t\tescapeString($p);\r\n\t\tescapeString($eD);\r\n\t}", "title": "" }, { "docid": "058ac8df56a586d4e132b2c9ffb2c6e9", "score": "0.5571659", "text": "function cbSpoofCheck( $secret = null, $var = 'POST', $mode = 1 ) {\n\tglobal $_POST, $_GET, $_REQUEST;\n\n\tif ( _CB_SPOOFCHECKS ) {\n\t\tif ( $var == 'GET' ) {\n\t\t\t$validateValue \t=\tcbGetParam( $_GET, cbSpoofField(), '' );\n\t\t} elseif ( $var == 'REQUEST' ) {\n\t\t\t$validateValue \t=\tcbGetParam( $_REQUEST, cbSpoofField(), '' );\n\t\t} else {\n\t\t\t$validateValue \t=\tcbGetParam( $_POST, cbSpoofField(), '' );\n\t\t}\n\t\tif ( ( ! $validateValue ) || ( $validateValue != cbSpoofString( $validateValue, $secret ) ) ) {\n\t\t\tif ( $mode == 2 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t_cbExpiredSessionJSterminate( 200 );\n\t\t\texit;\n\t\t}\n\t}\n\t// First, make sure the form was posted from a browser.\n\t// For basic web-forms, we don't care about anything\n\t// other than requests from a browser:\n\tif (!isset( $_SERVER['HTTP_USER_AGENT'] )) {\n\t\theader( 'HTTP/1.0 403 Forbidden' );\n\t\texit( _UE_NOT_AUTHORIZED );\n\t}\n\n\t// Make sure the form was indeed POST'ed:\n\t// (requires your html form to use: action=\"post\")\n\tif (!$_SERVER['REQUEST_METHOD'] == 'POST' ) {\n\t\theader( 'HTTP/1.0 403 Forbidden' );\n\t\texit( _UE_NOT_AUTHORIZED );\n\t}\n\n\t// Attempt to defend against header injections:\n\t$badStrings = array(\n\t\t'Content-Type:',\n\t\t'MIME-Version:',\n\t\t'Content-Transfer-Encoding:',\n\t\t'bcc:',\n\t\t'cc:'\n\t);\n\n\t// Loop through each POST'ed value and test if it contains\n\t// one of the $badStrings:\n\tforeach ($_POST as $v){\n\t\tforeach ($badStrings as $v2) {\n\t\t\tif (is_array($v)) {\n\t\t\t\t_cbjosSpoofCheck($v, $badStrings);\n\t\t\t} else if (strpos( $v, $v2 ) !== false) {\n\t\t\t\theader( \"HTTP/1.0 403 Forbidden\" );\n\t\t\t\texit( _UE_NOT_AUTHORIZED );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Made it past spammer test, free up some memory\n\t// and continue rest of script:\n\tunset( $v, $v2, $badStrings );\n\treturn true;\n}", "title": "" }, { "docid": "e20f8c27695ad35e4e79d9a3d800d3ba", "score": "0.5557878", "text": "function check_input($data, $problem='')\r\n{\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n if ($problem && strlen($data) == 0)\r\n {\r\n show_error($problem);\r\n }\r\n return $data;\r\n}", "title": "" }, { "docid": "03c0d9fdfa8d5b7f33abd7da3da3cc4c", "score": "0.55560553", "text": "private function gatherGETVariablesAndValidateRequestUrl() {\n\t\t// Check if the base url (/senseapi/data) is valid...\t\n\t\tif($_SERVER['REQUEST_URI'] == \"/senseapi/data\" || $_SERVER['REQUEST_URI'] == \"/senseapi/data/\") {\n\t\t\t$this->_IsRequestUrlValid = true;\n\t\t\treturn;\n\t\t}\n\t\tif(isset($_GET['url_invalid'])) {\n\t\t\tif($_GET['url_invalid'] == 'true') {\n\t\t\t\t$this->_IsRequestUrlValid = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t// The base url is valid, check for the GET variables now...\n\t\tforeach($this->_AllVarsList as $variable) {\n\t\t\tif(isset($_GET[$variable]) && $_GET[$variable] != \"\" && $variable != 'url_invalid') {\n\t\t\t\t$this->_CurrentVarsList[] = $variable;\n\t\t\t\t$this->_CurrentValuesList[$variable] = $_GET[$variable];\n\t\t\t\t$this->_IsRequestUrlValid = true;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "22a0d700337620082ec3f9aec74bcf38", "score": "0.5543753", "text": "function createArrayFromParams(){\n if ($_POST && $_GET) {\n return array_merge ( \n // note the sequence : POST vars overwrite any GET vars\n filter_input_array(INPUT_GET, FILTER_SANITIZE_SPECIAL_CHARS),\n filter_input_array(INPUT_POST, FILTER_SANITIZE_SPECIAL_CHARS) \n );\n }\n if ($_GET) {\n return filter_input_array(INPUT_GET, FILTER_SANITIZE_SPECIAL_CHARS);\n } \n if ($_POST) {\n return filter_input_array(INPUT_POST, FILTER_SANITIZE_SPECIAL_CHARS);\n }\n}", "title": "" }, { "docid": "c97eb504f7db8f7e3a0ffd758957d532", "score": "0.55400103", "text": "function hackingValidation($data){\n\n $data = trim($data);\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "title": "" }, { "docid": "7c3711d5af7f52fddfbefaccb849d014", "score": "0.5524538", "text": "function sanitizeInput($pt){\r\n$pt = trim($pt);\r\n$pt = stripslashes($pt);\r\n$pt = htmlspecialchars($pt);\r\nreturn $pt;\r\n}", "title": "" }, { "docid": "15a2e474ec5131d06ef957f08770b74e", "score": "0.55225986", "text": "function parseEnvironment(){\n\t\tglobal $_SERVER, $_POST, $_GET;\n\t\tif (false)\n\t\t\t$this->traceArray(TRACE_CONFIG, '_SERVER', $_SERVER);\n\t\tif (false && ! empty($_SERVER['TRACE_FLAGS']))\n\t\t\t$this->traceFlag = $_SERVER['TRACE_FLAGS'];\n\t\t$mode = $_SERVER['REQUEST_METHOD'];\n\t\t$usePost = $this->usePost = strcasecmp($mode, 'post') == 0;\n\n\t\tif ($usePost)\n\t\t\t$this->fields = $_POST;\n\t\telse\n\t\t\t$this->fields = $_GET;\n\t\t$useTrace = $usePost;\n\t\tif (true)\n\t\t\t$this->traceArray(TRACE_CONFIG, \"Fields ($usePost): \" , $this->fields);\n\t\t$this->trace(TRACE_FINE, \"usePost: $mode $useTrace\");\n\t\t$this->scriptFile = $_SERVER['SCRIPT_FILENAME'];\n\t\t$parts = $this->splitFile($this->scriptFile);\n\t\t$this->homeDir = $parts['dir'];\n\t\t$this->scriptUrl = $_SERVER['SCRIPT_NAME'];\n\t\t$this->requestUri = $_SERVER['REQUEST_URI'];\n\t\tif (empty($_SERVER['PATH_INFO'])){\n\t\t\t$pathInfo = substr($this->requestUri, strlen($this->scriptUrl));\n\t\t\t$ix = strpos($pathInfo, '/');\n\t\t\tif (! ($ix === False) && $ix == 0){\n\t\t\t\t$ix = strpos($pathInfo, '?');\n\t\t\t\tif ($ix > 0)\n\t\t\t\t\t$pathInfo = substr($pathInfo, 0, $ix);\n\t\t\t\t$_SERVER['PATH_INFO'] = $pathInfo;\n\t\t\t}\n\t\t}\n\t\t$page = null;\n\t\tif (isset($_SERVER['PATH_INFO']) && ! empty($_SERVER['PATH_INFO']))\n\t\t\t$page = substr($_SERVER['PATH_INFO'], 1);\n\t\telseif (isset($_GET['page']) && ! empty($_GET['page']))\n\t\t\t$page = $_GET[\"page\"];\n\t\telse {\n\t\t\t$uri = $this->requestUri;\n\t\t\t$ix = strpos($uri, 'page=');\n\t\t\tif ($ix === False)\n\t\t\t\t$page = 'home';\n\t\t\telse\n\t\t\t{\n\t\t\t\t$ix += 5;\n\t\t\t\t$length = strlen($uri);\n\t\t\t\t$ixEnd = strpos($uri, '&', $ix);\n\t\t\t\tif ($ixEnd === False)\n\t\t\t\t\t$ixEnd = $length;\n\t\t\t\t$page = substr($uri, $ix, $ixEnd - $ix);\n\t\t\t}\n\t\t}\n\t\t$this->pageAndBookmark = $page;\n\t\tif ( ($ix = strpos($page, '#')) > 0){\n\t\t\t$page = substr($page, 0, $ix);\n\t\t}\n\t\t$this->page = $page;\n\t\t$this->domain = $_SERVER['HTTP_HOST'];\n\t\t$ix = strpos($this->domain, ':');\n\t\tif ($ix > 0)\n\t\t\t$this->domain = substr($this->domain, 0, $ix);\n\t\t$baseAddress = 'http://' . $this->domain;\n\t\t$port = isset($_SERVER['SERVER_PORT']) ? $_SERVER['SERVER_PORT'] : '';\n\t\tif (! empty($port) && strcmp($port, 80) != 0)\n\t\t\t$baseAddress .= \":$port\";\n\t\t$absScriptUrl = $baseAddress . $this->scriptUrl;\n\n\t\t$parts = $this->splitFile($this->scriptUrl);\n\t\t$this->urlStatic = $baseAddress . $parts['dir'];\n\t\t$this->urlPublicDir = $this->urlStatic . \"public/\";\n\n\t\t$this->absScriptUrl = $absScriptUrl;\n\t\t$this->urlForm = $absScriptUrl . '/' . $this->page;\n\n\t\t$this->clientAddress = $_SERVER['REMOTE_ADDR'];\n\t\t$agent = $_SERVER['HTTP_USER_AGENT'];\n\t\t$agent = preg_replace('/\\D/', '', $agent);\n\t\t$this->sessionId = 's' . $agent . '_' . $this->clientAddress;\n\t\t$this->paramString = '';\n\t\t$this->params = NULL;\n\t\t$ix = strpos($this->requestUri, '?');\n\t\tif ($ix > 0)\n\t\t{\n\t\t\t$this->paramString = substr($this->requestUri, $ix + 1);\n\t\t\t$this->params = explode('&', $this->paramString);\n\t\t}\n\t\t$lang = $this->lang = \"en\";\n\t\tif (isset($_SERVER[\"HTTP_ACCEPT_LANGUAGE\"]))\n\t\t\t$lang = $_SERVER[\"HTTP_ACCEPT_LANGUAGE\"];\n\t\t// de-DE,de;q=0.9,en;q=0.8\n\t\t$ix = strpos($lang, ',');\n\t\tif ($ix > 0)\n\t\t\t$lang = substr($lang, 0, $ix);\n\t\t$ix = strpos($lang, ';');\n\t\tif ($ix > 0)\n\t\t\t$lang = substr($lang, 0, $ix);\n\t\tif (strlen($lang) != 2 && strlen($lang) != 5)\n\t\t\t$lang = 'en';\n\t\t$lang = strtolower($lang);\n\t\t$this->language = $lang;\n\t\t$ix = strpos($lang, \"-\");\n\t\t$this->languagePure = $ix === false ? $lang : substr($lang, 0, $ix);\n\t\t$this->trace(TRACE_RARE, 'Origin page: ' . $this->page . ' RequestUri: '\n\t\t\t\t. $this->requestUri . ' lang: ' . $this->language . ' ('\n\t\t\t\t. $this->languagePure . ') urlForm: ' . $this->urlForm);\n\t}", "title": "" }, { "docid": "e66307eae76b9bba3b0f3b7149afa85c", "score": "0.55165637", "text": "function input_get($key = null, $secure = false) {\n if (!empty($key)) {\n if (isset($_GET[$key])) {\n if ($secure) {\n $return = $GLOBALS['konek']->escape_string($_GET[$key]);\n $return = htmlspecialchars($_GET[$key],ENT_QUOTES);\n $return = trim($_GET[$key]);\n return $return;\n } else {\n return $_GET[$key];\n }\n } else {\n return false;\n }\n } else {\n return $_GET;\n }\n}", "title": "" }, { "docid": "f34b034f4c6bc0f9048506f8615ee749", "score": "0.5511863", "text": "public function sanitize( $data_global = 'POST' ) {\n\t\tif ( empty( $this->value ) )\n\t\t\t$this->set_raw( $data_global );\n\t\t// Set the filter flag to sanitize appropriately.\n\t\t$flag = preg_match('/email/i', $this->name) ? FILTER_SANITIZE_EMAIL : FILTER_SANITIZE_STRING;\n\t\t// If the value is an array, sanitize each value.\n\t\tif ( is_array( $this->value ) ) {\n\t\t\tforeach ( $this->value as $key => $value ) {\n\t\t\t\t$this->value[$key] = filter_var($this->value[$key], $flag);\n\t\t\t}\n\t\t} else {\n\t\t\t$this->value = filter_var($this->value, $flag);\n\t\t}\n\t}", "title": "" }, { "docid": "f5bb8880983ada21a5d29f8124a75d14", "score": "0.55100834", "text": "function clean_var($var){\n\n $ci = &get_instance();\n\n return $ci->security->xss_clean($var);\n\n}", "title": "" }, { "docid": "2d50ffa11a74aa8d15ef9c8790d77716", "score": "0.55084443", "text": "function get_input_vars() {\n\tglobal $input_vars;\n\n\tif (count($input_vars) == 0) {\n\t\t$input_vars = array();\n\t}\n\n\tif (! empty($_GET)) {\n\t\tforeach ($_GET as $key => $value) {\n\t\t\tif (get_magic_quotes_gpc() == 1) {\n\t\t\t\twhile (strstr($value, '\\\\')) {\n\t\t\t\t\t$value = stripslashes($value);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$input_vars[$key] = $value;\n\t\t}\n\t}\n\n\n\tif (! empty($_POST)) {\n\t\tforeach ($_POST as $key => $value) {\n\t\t\tif (get_magic_quotes_gpc() == 1) {\n\t\t\t\twhile (strstr($value, '\\\\')) {\n\t\t\t\t\t$value = stripslashes($value);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$input_vars[$key] = $value;\n\t\t}\n\t}\n\n\n\tif (empty($input_vars)) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}", "title": "" }, { "docid": "e6c77a90c41c28c5a644129c6d44a974", "score": "0.5505299", "text": "function getPost( $campo ){\r\n return isset($_POST[$campo]) ? filter( $_POST[$campo] ) : '';\r\n}", "title": "" }, { "docid": "b2d859a03ef994a3b317481210e4cd7a", "score": "0.54959744", "text": "function check_input($data, $problem='')\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n /*if ($problem)\n {\n show_error($problem);\n }*/\n return $data;\n}", "title": "" }, { "docid": "d3d590d77910e6f96efba985629ee829", "score": "0.54948103", "text": "function sanitize_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "title": "" }, { "docid": "c7d625eb6069034d1ffec518dce3e6cb", "score": "0.54934484", "text": "private function inputs()\n {\n switch($this->get_request_method()){\n case \"GET\":\n $this->_request = $this->sanitize($_GET);\n break;\n case \"DELETE\":\n $this->_request = $this->sanitize($_GET);\n break;\n case \"POST\":\n\n if($filecontent = file_get_contents(\"php://input\") !== false){\n\n\n //if(!(file_get_contents(\"php://input\"))){\n $this->_request = $this->sanitize(file_get_contents(\"php://input\"));\n }else{\n if(!empty($_POST[\"data\"])){\n $_POST = $_POST[\"data\"];\n }\n\n $this->_request = json_decode($this->sanitize($_POST));\n }\n\n break;\n\n case \"PUT\":\n $fileContent = file_get_contents(\"php://input\");\n\n if(strlen($fileContent) != 0){\n $this->_request = $this->sanitize($fileContent);\n }else{\n\n if(!empty($_POST[\"data\"])){\n $_POST = $_POST[\"data\"];\n }\n\n $this->_request = json_decode($this->sanitize($_POST));\n }\n\n\n break;\n default:\n $this->response('',406);\n break;\n }\n }", "title": "" }, { "docid": "a7e8fe7873c0947420596ab5519df9b4", "score": "0.54926246", "text": "private static function sanitizeInput($_data){\n return User::cleanInput($_data);\n }", "title": "" }, { "docid": "0b1d239e3c593e2956f845c79af08f0b", "score": "0.5492398", "text": "function get_method ()\n{\n return filter_input(INPUT_SERVER, 'REQUEST_METHOD', FILTER_SANITIZE_ENCODED);\n}", "title": "" }, { "docid": "fbce17ec88520dbdd6477b743f87678f", "score": "0.54821384", "text": "function input_post($key = null, $secure = false) {\n if (!empty($key)) {\n if (isset($_POST[$key])) {\n if ($secure) {\n $return = $GLOBALS['konek']->escape_string($_POST[$key]);\n $return = htmlspecialchars($_POST[$key],ENT_QUOTES);\n $return = trim($_POST[$key]);\n return $return;\n } else {\n return $_POST[$key];\n }\n } else {\n return false;\n }\n} else {\n return $_POST;\n}\n}", "title": "" }, { "docid": "1b080aa29ab0d81620f950f3b8cdee0a", "score": "0.5481737", "text": "function process($string)\r\n\t{\r\n\t\t$string = strtolower($string); //----make all lower case\r\n\t\t$sanitizedString = str_replace($this->sql_banlist, $this->sql_replacelist, trim($string));\r\n\r\n\t\t$sanitizedString = preg_replace( $this->sql_banlist, $this->sql_replacelist, trim($string) );\r\n\r\n\t\t//\tNow sanitise the sql sanitised string from other illegal chars\r\n\t\t// \tNote that this doesn't look after any base64 encoded strings or any string encoded in anything other than ascii...\r\n\t\t//\tyou need to look after the more advanced naughty stuff yourself\r\n\r\n\r\n\t\t$sanitizedString = str_replace($this->general_illegal_chars_get, $this->sql_replacelist, $sanitizedString);\r\n\r\n\t\treturn $sanitizedString; \r\n\t}", "title": "" }, { "docid": "e08d14961f5aeac3a2e2f0499df0309d", "score": "0.5476696", "text": "function clean_input( $data )\r\n{\r\n $data = trim( $data );\r\n $data = stripslashes( $data );\r\n $data = htmlspecialchars( $data );\r\n \r\n return $data;\r\n}", "title": "" }, { "docid": "599adf7fe8f6fc53823a3ba43dc8ff75", "score": "0.54759705", "text": "function test_input($data)\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = strip_tags($data);\n $data = filter_var($data, FILTER_SANITIZE_STRING);\n $data = htmlspecialchars($data);\n $data = preg_replace('/\\s+/', '', $data);\n return $data;\n}", "title": "" }, { "docid": "a3202c37f2383e8c8b6535b5b29eb19a", "score": "0.5475953", "text": "function process_global_strings($func) {\n\t$process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST);\n\t\n\t/* each() has been DEPRECATED\n\twhile (list($key, $val) = each($process)) { */\n foreach($process as $key => $val) {\n\t\tforeach ($val as $k => $v) {\n\t\t\tunset($process[$key][$k]);\n\t\t\tif (is_array($v)) {\n\t\t\t\t$process[$key][$func($k)] = $v;\n\t\t\t\t$process[] = &$process[$key][$func($k)];\n\t\t\t} else {\n\t\t\t\t$process[$key][$func($k)] = $func($v);\n\t\t\t}\n\t\t}\n\t}\n\tunset($process);\n}", "title": "" }, { "docid": "38afb939a0a47ffcb5110bf0b58b03fe", "score": "0.5474821", "text": "public function security($request)\n\t{\n if(is_array($request))\n {\n foreach ($request as $key => $value)\n {\n if(is_array($value))\n {\n // Unset multidimensional arrays in request\n unset($request[$key]);\n }\n else\n {\t\n $request[$key] = static::sanitize($value);\n }\n }\n }\n else\n {\n $request = static::sanitize($value);\n }\n\n\t\treturn $request;\n\t}", "title": "" }, { "docid": "30bb43cf9811a886eb5e65f17d07f077", "score": "0.5474472", "text": "function sanitize($input) {\n\tif (is_array($input)) {\n foreach($input as $var=>$val) {\n $output[$var] = sanitize($val);\n }\n }\n else {\n if (get_magic_quotes_gpc()) {\n $input = stripslashes($input);\n }\n $input = cleanInput($input);\n $output = mysql_real_escape_string($input);\n }\n return $output;\n}", "title": "" }, { "docid": "051d2ac59603ff57336596b575d94241", "score": "0.54722995", "text": "function check_input($data, $problem='')\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n if ($problem && strlen($data) == 0)\n {\n show_error($problem);\n }\n return $data;\n}", "title": "" }, { "docid": "051d2ac59603ff57336596b575d94241", "score": "0.54722995", "text": "function check_input($data, $problem='')\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n if ($problem && strlen($data) == 0)\n {\n show_error($problem);\n }\n return $data;\n}", "title": "" }, { "docid": "46889ca1df3035a032f4de6f2f6bb343", "score": "0.5464766", "text": "public function sanitize()\n {\n return;\n }", "title": "" }, { "docid": "96c900a45ce8d8f69dfdf73b3212b282", "score": "0.5459589", "text": "public function _initStripSlashesDeep() {\n\n // undo magic quotes\n if (get_magic_quotes_gpc()) {\n function stripslashes_deep($value) {\n $value = is_array($value) ?\n array_map('stripslashes_deep', $value) :\n stripslashes($value);\n\n return $value;\n }\n\n $_POST = array_map('stripslashes_deep', $_POST);\n $_GET = array_map('stripslashes_deep', $_GET);\n $_COOKIE = array_map('stripslashes_deep', $_COOKIE);\n $_REQUEST = array_map('stripslashes_deep', $_REQUEST);\n }\n }", "title": "" }, { "docid": "93a7a8eb207e6471ae904ac53adcb6dd", "score": "0.5459182", "text": "function security(&$value)\r\n {\r\n if( is_array($value) || is_object($value) )\r\n {\r\n foreach( $value as $_vk=>$_vv )\r\n {\r\n $this->security($value[$_vk]);\r\n }\r\n }\r\n \r\n elseif( is_string($value) && !is_numeric($value) )\r\n {\r\n $value = $this->input_filter->process($value);\r\n }\r\n \r\n // Things that should not be processed: booleans, numbers\r\n return;\r\n }", "title": "" }, { "docid": "4419d645b851b3a8ff96d7f31f46f2d2", "score": "0.54552656", "text": "function safeInput($data) {\n //$data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "192ed67fa4fea2a4faf48347bb703a16", "score": "0.5451961", "text": "function purifyGetParams(){\n\t$config = HTMLPurifier_Config::createDefault();\n\t$config->set('HTML.Allowed', '');\n\n\t$purifier = new HTMLPurifier($config);\n\n\tforeach ($_GET as $key => $val) {\n\t\t$_GET[$key] = $purifier->purify($_GET[$key]);\n\t\t$_GET[$key] = htmlentities($_GET[$key], ENT_QUOTES);\n\t}\n\treturn $_GET;\n}", "title": "" }, { "docid": "1ae76f9fcb4d9128467bbb493a188f59", "score": "0.5447292", "text": "public static function server($field, $sanitizer = FILTER_UNSAFE_RAW)\r\n\t{\r\n\t\t$result = filter_input(INPUT_SERVER, $field, $sanitizer);\r\n\t\tif (is_null($result)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "c59013ce9f0b7bfaedbe5c26e448331d", "score": "0.5437362", "text": "function sanitize_input_text($str){\n $CI = & get_instance(); // get instance, access the CI superobject\n return $CI->security->xss_clean($str); //security library must be autoloaded\n}", "title": "" }, { "docid": "cf225fcb063171959613634dbc730ba6", "score": "0.5430173", "text": "public function parse_params($sanitize = true)\n {\n $params = [];\n if (isset($_SERVER['CONTENT_TYPE']) && strpos($_SERVER['CONTENT_TYPE'], \"application/json\") !== false) {\n $params = json_decode(file_get_contents('php://input'), true);\n } else {\n parse_str(file_get_contents('php://input'), $params);\n }\n\n if (is_null($params)) { //parse_str peut retourner nul si la chaîne passée en paramètre est vide\n $params = [];\n }\n\n if ($sanitize) {\n $params = array_map('self::recursive_filter', $params);\n $_GET = filter_input_array(INPUT_GET, FILTER_SANITIZE_STRING);\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n $this->options = filter_var_array($this->options, FILTER_SANITIZE_STRING);\n }\n\n if (is_null($_POST)) {\n $_POST = [];\n }\n\n if (is_null($_GET)) {\n $_GET = [];\n }\n\n if ($this->isCli()) {\n return array_merge($params, $this->options);\n } else {\n return $this->buildParams($_POST, $params, $_GET);\n }\n }", "title": "" }, { "docid": "8055c65b631d68c5e0b4cc4c0329b18f", "score": "0.54301614", "text": "function returnGlobal($stringname, $bRestrictToString = false)\n{\n $urlParam = Yii::app()->request->getParam($stringname);\n $aCookies = Yii::app()->request->getCookies();\n if (is_null($urlParam) && $stringname != 'sid') {\n if (isset($aCookies[$stringname])) {\n $urlParam = $aCookies[$stringname];\n }\n }\n $bUrlParamIsArray = is_array($urlParam); // Needed to array map or if $bRestrictToString\n if (!is_null($urlParam) && $stringname != '' && (!$bUrlParamIsArray || !$bRestrictToString)) {\n if ($stringname == 'sid' || $stringname == \"gid\" || $stringname == \"oldqid\" ||\n $stringname == \"qid\" || $stringname == \"tid\" ||\n $stringname == \"lid\" || $stringname == \"ugid\" ||\n $stringname == \"thisstep\" || $stringname == \"scenario\" ||\n $stringname == \"cqid\" || $stringname == \"cid\" ||\n $stringname == \"qaid\" || $stringname == \"scid\") {\n if ($bUrlParamIsArray) {\n return array_map(\"sanitize_int\", $urlParam);\n } else {\n return sanitize_int($urlParam);\n }\n } elseif ($stringname == \"lang\" || $stringname == \"adminlang\") {\n if ($bUrlParamIsArray) {\n return array_map(\"sanitize_languagecode\", $urlParam);\n } else {\n return sanitize_languagecode($urlParam);\n }\n } elseif ($stringname == \"htmleditormode\" ||\n $stringname == \"subaction\" ||\n $stringname == \"questionselectormode\" ||\n $stringname == \"templateeditormode\"\n ) {\n if ($bUrlParamIsArray) {\n return array_map(\"sanitize_paranoid_string\", $urlParam);\n } else {\n return sanitize_paranoid_string($urlParam);\n }\n } elseif ($stringname == \"cquestions\") {\n if ($bUrlParamIsArray) {\n return array_map(\"sanitize_cquestions\", $urlParam);\n } else {\n return sanitize_cquestions($urlParam);\n }\n }\n return $urlParam;\n } else {\n return null;\n }\n}", "title": "" }, { "docid": "770b4e5261759a03f0aa6c6b46d71030", "score": "0.5424457", "text": "private function setUpGetVars()\n\t{\n\t\tif (!isset(self::$_getVars))\n\t\t{\n\t\t\tself::$_getVars = array();\n\t\t\t \n\t\t\t$urlParts = parse_url(!empty($this->_server['REQUEST_URI']) ? $this->_server['REQUEST_URI'] : null);\n\t\t\t\n\t\t\tif (isset($urlParts['query'])) {\n\t\t\t\tparse_str($urlParts['query'], self::$_getVars);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "04f766dffe65af88b30403f3395a271d", "score": "0.5422344", "text": "public function sanitize($method)\n {\n $this->setParams(get_defined_vars());\n return (bool) $this->call(func_get_args());\n }", "title": "" }, { "docid": "e35c2983987842d306b46e6cc47fff17", "score": "0.54199475", "text": "function SanitizeUserInput($input)\n {\n // Dangerous words not allowed\n $wordsNotAllowed = array(\"/delete/i\", \"/update/i\",\"/union/i\",\"/insert/i\",\"/drop/i\",\"/evil/i\",\"/--/i\");\n // Remove dangerous words from first name\n $input = preg_replace($wordsNotAllowed , \"\", $input);\n\t\t// Unfortunately escapeshellarg adds quotes around the first and last names.\n\t\t// $input = escapeshellarg($input);\n // strip tags\n $input = filter_var($input, FILTER_SANITIZE_STRING,FILTER_FLAG_ENCODE_AMP);\n // strip slashes\n $input = stripslashes($input);\n return $input;\n }", "title": "" } ]
1c31ca79e668000bc0ec7b6a08d97725
Sets the base directory of the application
[ { "docid": "bd518d488062ccde56a636dba508df74", "score": "0.7783057", "text": "function set_base_dir($dir) {\n if($dir[strlen($dir)-1] != '/') {\n $dir .= '/'; \n }\n \n $this->base_dir = $dir;\n }", "title": "" } ]
[ { "docid": "ebbcdf4a48bae9c0ea161cb64cdcc6ac", "score": "0.7730216", "text": "public function setAppBaseDir($dir)\n {\n $this->applicationBaseDir = $dir;\n }", "title": "" }, { "docid": "8414c86aee3f662ca5fa5eb397cb32f5", "score": "0.7584177", "text": "protected function setBasePath()\n {\n $this->container->instance('path.base', $this->basePath);\n }", "title": "" }, { "docid": "f37e265cfde8e084e2479327b2f0ce8b", "score": "0.74741846", "text": "public final function & setApplicationBaseDir( $a_base )\r\n\t{\r\n\t\t$this->m_basedir = (string)$a_base;\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "15a7ef9bc7e63d1f08f0de908f26e062", "score": "0.6949513", "text": "public function setBasePath($value)\n\t{\n\t\t$this->basePath = rtrim($value, DIRECTORY_SEPARATOR);\n\t}", "title": "" }, { "docid": "a93e826910e44733551e547ad92679e8", "score": "0.6912749", "text": "public function set_base_path( $path ) {\n\t\t$this->base_path = $path;\n\t}", "title": "" }, { "docid": "3e52f412c126ab46d2823293e1cd4bac", "score": "0.6795143", "text": "public function setAppBasePath($appRootPath=null){\n\n $this->appRootPath = $appRootPath;\n $_SERVER['APP_ROOT_PATH']= $this->appRootPath;\n\n }", "title": "" }, { "docid": "f3984df9809c55268fa57dead2939148", "score": "0.67881477", "text": "public function setAppBasePath($basePath)\n\t{\n\t\t$this->_appBasePath = $basePath;\n\t}", "title": "" }, { "docid": "678a72f0b2749ffdf8d154d9b66d4b85", "score": "0.6764221", "text": "public final function getApplicationBaseDir()\r\n\t{\r\n\t\treturn $this->m_basedir;\r\n\t}", "title": "" }, { "docid": "d6b962c960253cca12f6f7d49fd01188", "score": "0.6752723", "text": "public static function setBaseUrl(): void\n\t{\n\t\tstatic::$scriptDirectory = str_replace('\\\\', '/', dirname(Server::get('SCRIPT_NAME')));\n\t\t$protocol = Server::get('REQUEST_SCHEME') . '://';\n\t\t$hostname = Server::get('HTTP_HOST');\n\t\tstatic::$baseUrl = $protocol . $hostname . static::$scriptDirectory;\n\t}", "title": "" }, { "docid": "806c6300b9a32c94d78fa52f190316e6", "score": "0.6693675", "text": "public function get_base_dir()\r\n\t\t{\r\n\t\t\treturn str_replace( \"/\", DIRECTORY_SEPARATOR, __DIR__ . \"/../../\" . self::HOME_DIR );\r\n\t\t}", "title": "" }, { "docid": "d8dc7b4aff896afa7911a32b63c94f21", "score": "0.6675431", "text": "public static function setBaseDir($dir) {\n\t if(self::$baseDir != $dir) {\n\t self::$baseDir = $dir;\n\t // reset the map and script directories\n\t self::$mapDir = null;\n\t self::$pageDir = null;\n\t self::$scriptDir = null;\n\t }\n\t return $dir;\n\t}", "title": "" }, { "docid": "3a7a2ecee81bd4840e24d4bbcf0c4238", "score": "0.66675806", "text": "public static function basedir() {\n\t\t$directory = trim($_SERVER['SUBDIRECTORY'], '/');\n\t\t$directory = str_replace('\\\\', '/', $directory);\n\n\t\treturn '/' . $directory;\n\t}", "title": "" }, { "docid": "fae1186e338a18f6070af93475e9f80d", "score": "0.66402954", "text": "public function setBaseDir($basedir)\n\t{\n\t\t$basedir = realpath($basedir);\n\t\t\n\t\tif( is_string($basedir) && is_dir($basedir) ) {\n\t\t\t$this->baseDir = realpath($basedir);\n\t\t} else {\n\t\t\tthrow new \\Exception('Invalid path give for autoload base directory: '.$basedir);\n\t\t}\n\t}", "title": "" }, { "docid": "53d3c9a0ac0803098546073f10682ce5", "score": "0.6512555", "text": "public function setBaseDir($baseDir)\n {\n $this->baseDir = rtrim($baseDir, '/');\n }", "title": "" }, { "docid": "f687cc48226ccecee210d0c515d919bc", "score": "0.6509205", "text": "public function setBasePath(string $basePath);", "title": "" }, { "docid": "d2f4419488218f3e34117833569f2537", "score": "0.6504362", "text": "public function & SetAppDir ($appDir);", "title": "" }, { "docid": "38e277e24aef11fa71c7583bee53ba97", "score": "0.6499181", "text": "protected static function setAppPath()\n {\n self::$appPath = Application::$root.'app/';\n\n return self::$appPath;\n }", "title": "" }, { "docid": "08a0174356b56eef384afc6bc22db8dc", "score": "0.6484443", "text": "public function setBasePath($path);", "title": "" }, { "docid": "6ec66486530e4c02d0094be1069165b1", "score": "0.64831686", "text": "function get_base_dir() {\n return $this->base_dir;\n }", "title": "" }, { "docid": "51b6883ed9de1315424a2cbef7c7efe6", "score": "0.6443572", "text": "public function getAppBaseDirName(){\n return $this->getSite()->getParent()->getAppDir(true);\n }", "title": "" }, { "docid": "464762b2f45e51b30930ace969abae11", "score": "0.6420866", "text": "public static function setBasePath($path){\n\t\tself::$basePath = $path;\n\t}", "title": "" }, { "docid": "172b475d3b6ac7698cd79de968c5d195", "score": "0.641224", "text": "protected function getBasePath()\n {\n return getcwd();\n }", "title": "" }, { "docid": "4d2cca2d052ad90553355887624e52ae", "score": "0.6392447", "text": "function set_base_url($url) {\n if($url[strlen($url)-1] != '/') {\n $url .= '/'; \n }\n \n $this->base_url = $url;\n }", "title": "" }, { "docid": "42466c50015c587fafa1f136635d62f7", "score": "0.63811165", "text": "public function getBasePath()\n {\n return __DIR__ . '/..';\n }", "title": "" }, { "docid": "369ea3539c06e26b656c14ad105e4aa3", "score": "0.63456136", "text": "protected function setInitialRootPath() {}", "title": "" }, { "docid": "2f32cf1e708c6966922cf83bd3a8f249", "score": "0.63296854", "text": "public function setMageRoot($value) {\n if (preg_match('/^\\/\\w*/i', $value)) {\n $mage_root = $value;\n } else {\n $mage_root = getcwd() . self::$_DS . $value;\n }\n\n $this->_mage_root = $mage_root;\n }", "title": "" }, { "docid": "b452501145ce211bd186bf64f130252f", "score": "0.6296174", "text": "public function getBaseDir();", "title": "" }, { "docid": "34b54b2f982eb94500fa0ca110037286", "score": "0.62411207", "text": "function base_path() {\n return (new Server)->get('DOCUMENT_ROOT');\n }", "title": "" }, { "docid": "34e22bb96e4905824c543098b69b26d8", "score": "0.62335527", "text": "public function getBaseDirectory()\n {\n return $this->getParam(DirectoryKeys::BASE);\n }", "title": "" }, { "docid": "77e59e21337b2f3cd3717eff474f15fc", "score": "0.62312806", "text": "protected function getAbsoluteBasePath() {}", "title": "" }, { "docid": "9efa26c467534fb6e9e14ece0fe29c08", "score": "0.62255985", "text": "private function setBasePath(string $basePath)\n {\n $this->basePath = rtrim($basePath, '\\/');\n }", "title": "" }, { "docid": "4d9a9e5f333626af466cda67dcf7630c", "score": "0.622089", "text": "public function getBasePath()\n {\n return dirname(__DIR__);\n }", "title": "" }, { "docid": "4d9a9e5f333626af466cda67dcf7630c", "score": "0.622089", "text": "public function getBasePath()\n {\n return dirname(__DIR__);\n }", "title": "" }, { "docid": "0e7781d36b3edf857ff45df4ef5b993a", "score": "0.6219141", "text": "private static function _initViewScriptsFullPathBase () {\n\t\t$app = & \\MvcCore\\Application::GetInstance();\n\t\tself::$_viewScriptsFullPathBase = implode('/', [\n\t\t\t$app->GetRequest()->GetAppRoot(),\n\t\t\t$app->GetAppDir(),\n\t\t\t$app->GetViewsDir()\n\t\t]);\n\t}", "title": "" }, { "docid": "49d3f38f51bd5c74f05c2d2530f8a240", "score": "0.6211861", "text": "public function setBasePath(string $basePath): void\n {\n $this->basePath = $basePath;\n }", "title": "" }, { "docid": "4ea5d46fb34e1b393943c61b4eee20ee", "score": "0.61940515", "text": "public function getBaseDirectory()\n {\n return $this->baseDirectory;\n }", "title": "" }, { "docid": "715a4f39d2820bb4a2911326ea39d911", "score": "0.61906403", "text": "public static function setAppDir($app_dir)\n {\n self::$app_dir = $app_dir;\n }", "title": "" }, { "docid": "f631b41ce5cd9011fa61f4b94f58431d", "score": "0.61904275", "text": "public static function setBasePath($basePath){\n return \\Illuminate\\Foundation\\Application::setBasePath($basePath);\n }", "title": "" }, { "docid": "925b731f4d9da470acb6f95ee0e5315e", "score": "0.6170504", "text": "public function setBase( $base ) {\n\n $this->base = $base;\n }", "title": "" }, { "docid": "f5835a832ec44d33242939fb45c17d7e", "score": "0.6166703", "text": "public function setBasedir(PhingFile $baseDir) {\n $this->baseDir = $baseDir;\n }", "title": "" }, { "docid": "525a5575f256a0d8beaac1e6c5ac35d9", "score": "0.61577433", "text": "public function get_base_root()\r\n {\r\n return realpath(ROOT_DIR_NAME);\r\n }", "title": "" }, { "docid": "e5669e10194b233b842c0c05bc60272c", "score": "0.61428714", "text": "public static function getApplicationBaseURL()\n {\n if (self::$applicationBaseURL == null) {\n $dir = dirname($_SERVER[\"SCRIPT_NAME\"]);\n if ($dir == \"/\") $dir = \"\";\n self::$applicationBaseURL = $dir.\"/\";\n }\n return self::$applicationBaseURL;\n }", "title": "" }, { "docid": "3a083cab9f8494be7b68450fadbd8a25", "score": "0.6114322", "text": "public function getBasePath() { return self::$basePath; }", "title": "" }, { "docid": "436e1dd2c4c07baef49eeab2b7a1db4e", "score": "0.61041605", "text": "public function setBasePath(string $path): ApplicationInterface\n {\n $this->basePath = rtrim($path, '\\/');\n\n $this->bindPathsInContainer();\n\n return $this;\n }", "title": "" }, { "docid": "e9031f98b709770b3defa197833f4d89", "score": "0.61005455", "text": "function set_root ($root)\n {\n $this->mPath = realpath($root) . '/';\n }", "title": "" }, { "docid": "ea98574c844ffb98b3ef6ca9c2b87f29", "score": "0.60901433", "text": "public static function getBasePath()\n {\n $base_path = substr(trim(\\ROOT, '/'), strlen(trim($_SERVER['DOCUMENT_ROOT'], '/')));\n if (DS !== '/') {\n $base_path = str_replace(DS, '/', $base_path);\n }\n return $base_path;\n }", "title": "" }, { "docid": "e6bd0db7e5b00115de62ae8a59abaf90", "score": "0.6074777", "text": "function app_path()\n {\n return base_path() . '/app';\n }", "title": "" }, { "docid": "9c832334ada84ba46eae022f644d763a", "score": "0.60669476", "text": "public function setDefaultViewBasePath($path)\n\t{\n\t\t$this->_defaultViewBasePath = $path;\n\t}", "title": "" }, { "docid": "9e3fc99997e6072e71b5da068f0834de", "score": "0.6064063", "text": "protected function setInitialRelativePath() {}", "title": "" }, { "docid": "313a220c6dce2fe1cffc048b46887919", "score": "0.60415924", "text": "function base_path($path = '')\n {\n return phanda()->basePath() . ($path ? DIRECTORY_SEPARATOR . $path : $path);\n }", "title": "" }, { "docid": "360ea1f3243b18b427a0e942694eb4c5", "score": "0.60415083", "text": "public function setBasePath($basePath)\n {\n $this->basePath = $basePath;\n }", "title": "" }, { "docid": "360ea1f3243b18b427a0e942694eb4c5", "score": "0.60415083", "text": "public function setBasePath($basePath)\n {\n $this->basePath = $basePath;\n }", "title": "" }, { "docid": "33c8fae3072268c34755a6ac2b00ff4a", "score": "0.6039512", "text": "function set_base_url($url)\n\t{\n\t\t$this->base_url = $url;\n\t}", "title": "" }, { "docid": "de3d034f2edc3d0a6ee0c7d6face27ac", "score": "0.6038775", "text": "public function setAppDir($appDir)\n\t{\n\t\t$this->_appDir = $appDir;\n\t}", "title": "" }, { "docid": "213225ed98c329dd860161cff368163e", "score": "0.60385495", "text": "protected function getBasePath()\n\t{\n\t\tif ($this->_basePath !== null)\n\t\t\treturn $this->_basePath;\n\t\telse\n\t\t\treturn $this->_basePath = realpath(Yii::app()->basePath.'/../').'/';\n\t}", "title": "" }, { "docid": "71615fd52b09d22b0e48748c9bf64171", "score": "0.60313946", "text": "protected function getBasePath()\n {\n // Note that the actual filesystem base is the 'assets' subdirectory within this\n return ASSETS_PATH . '/SecureAssetsMigrationHelperTest';\n }", "title": "" }, { "docid": "10f52ff2d1d2f12b9130960e7d3e3265", "score": "0.60267216", "text": "function basepath() {\n $path = getenv('BASEPATH');\n if (empty($path)) {\n return '';\n }\n return rtrim($path, '/');\n}", "title": "" }, { "docid": "f536ba12700a3584acbe089ff95be48a", "score": "0.6015404", "text": "public function getDefaultViewBasePath()\n\t{\n\t\treturn $this->_isAbsolute($this->_defaultViewBasePath)\n\t\t\t? $this->_defaultViewBasePath\n\t\t\t: ($this->getAppPath() . '/' . $this->_defaultViewBasePath);\n\t}", "title": "" }, { "docid": "2c0cfd1d4b84396ec2c0b4a8b22db00f", "score": "0.6011861", "text": "public function testBasedir()\n {\n $this->buildContainer(\n $this->resolveOptions([\n ])\n );\n }", "title": "" }, { "docid": "3572741e8d7ccd74bda5d2747075dd6f", "score": "0.6006177", "text": "function setPath() {\n\n // Wp installation path\n $wp_install_path = str_replace( 'http://' . $_SERVER['HTTP_HOST'], '', site_url());\n\n // Set the instance starting path\n $this->path = $wp_install_path . App::getOption('path');\n\n // Grab the server-passed \"REQUEST_URI\"\n $this->current_uri = $this->request->server()->get('REQUEST_URI');\n\n // Remove the starting URI from the equation\n // ex. /wp/cocoon/mypage -> /mypage\n $this->request->server()->set(\n 'REQUEST_URI', substr($this->current_uri, strlen($this->path))\n );\n\n }", "title": "" }, { "docid": "1af0aeb15d973e99766a2f5a8fd10dda", "score": "0.60005945", "text": "public function getBaseRootDir()\n {\n return $this->paths->getBaseRootDir();\n }", "title": "" }, { "docid": "1422e7b522ac9c4fbd98dd033f315036", "score": "0.5984051", "text": "public function appPath()\n {\n return ltrim($this->basePath().'/app', '/');\n }", "title": "" }, { "docid": "5f9aae8cc3795e259672e7dc9173ab78", "score": "0.5982274", "text": "public function base_dir(){\n return $this->plugin_dir() . 'base/';\n }", "title": "" }, { "docid": "7a7d9d5f43fb5e0b84f6a79175f77d56", "score": "0.5981531", "text": "public function getBaseDirectory(): string\n {\n return $this->baseDirectory;\n }", "title": "" }, { "docid": "96d6397a18db1b9e4d7e4f61c4b7f72c", "score": "0.5979147", "text": "public static function basePath(){\n return \\Illuminate\\Foundation\\Application::basePath();\n }", "title": "" }, { "docid": "4c8c3be1f23c69e174db53d8c9ffe74b", "score": "0.5977653", "text": "public function setBaseURL($base_url)\n\t{\n\t\t//URL can't end with PHP file (for compatibility with $controller_as_query = false) and can't contain any query parameters\n\t\t$to_remove = basename(parse_url($base_url, PHP_URL_PATH));\n\n\t\t$to_remove_pos = false;\n\t\tif (strlen($to_remove) > 0 && stripos($to_remove, '.php')) {\n\t\t\t$to_remove_pos = stripos($base_url, $to_remove);\n\t\t}\n\n\t\tif ($to_remove_pos !== false) {\n\t\t\t$base_url = substr($base_url, 0, $to_remove_pos);\n\t\t}\n\n\t\t$this->base_url = rtrim($base_url, '/').'/';\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "ef91d05b25ae8fecae86c7bdefcb61b1", "score": "0.5977351", "text": "private function set_base_url()\n\t{\n\t\t// We completely kill the site URL value. It's now blank.\n\t\t// This enables us to use only the \"index.php\" part of the URL.\n\t\t// Since we do not know where the CP access file is being loaded from\n\t\t// we need to use only the relative URL\n\t\t$this->config->set_item('site_url', '');\n\n\t\t// We set the index page to the SELF value.\n\t\t// but it might have been renamed by the user\n\t\t$this->config->set_item('index_page', SELF);\n\t\t$this->config->set_item('site_index', SELF); // Same with the CI site_index\n\t}", "title": "" }, { "docid": "f82f36e0fe645771885ab7b7c3d226b9", "score": "0.5964273", "text": "public static function getBaseDir() {\n\t return self::$baseDir ??\n\t (self::$baseDir = dirname(getcwd()));\n\t}", "title": "" }, { "docid": "97090059f5d6617ce1df022a9e7b8c2b", "score": "0.5959377", "text": "function base_path()\n {\n return dirname(__DIR__);\n }", "title": "" }, { "docid": "82d145c1c3ab32d7133084b3249f7701", "score": "0.59425306", "text": "public function setBase($baseUrl) {\n\t\t\n\t\t\t$this->_base = $baseUrl;\n\t\t\n\t\t}", "title": "" }, { "docid": "3d1d0e6b522decf52fd9344ff11bb46c", "score": "0.59415627", "text": "function set_base_url( $url = '' )\n {\n if ( empty($url) ) {\n $this->url = 'http://' . $_SERVER['HTTP_HOST'];\n } else {\n // Strip any trailing slashes for consistency (relative\n // URLs may already start with a slash like \"/file.html\")\n if ( substr($url, -1) == '/' ) {\n $url = substr($url, 0, -1);\n }\n $this->url = $url;\n }\n }", "title": "" }, { "docid": "74d018650d6e7a5581d66689ede0f398", "score": "0.5936637", "text": "public function setBasePath($path, $classPrefix = 'Zend_View');", "title": "" }, { "docid": "9a817d0615e10e8633d96ff2a1c99bab", "score": "0.5936241", "text": "protected function changePath()\n {\n chdir(base_path());\n }", "title": "" }, { "docid": "4cf092133a32164fd87fe7a49b47d015", "score": "0.5933233", "text": "public function getBasePath()\n {\n if ($this->basePath === null) {\n $this->basePath = dirname(getcwd());\n }\n\n return $this->basePath;\n }", "title": "" }, { "docid": "a152d5535dd8163ea3a1a09a679a2c86", "score": "0.59286416", "text": "function setDir()\n{\n\t// This script is sometimes called from the other directories - for auto sending, so we need to change the directory\n\t$pos = strrpos(__FILE__, '/');\n\tif ($pos === false)\n\t{\n\t\t$pos = strrpos(__FILE__, '\\\\');\n\t\tif ($pos === false)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t}\n\t$dir = substr(__FILE__, 0, $pos);\n\tchdir($dir);\n}", "title": "" }, { "docid": "009115a257ce97aaa6a18d561ba07104", "score": "0.59182364", "text": "public function getBaseDir()\n\t{\n\t\treturn $this->baseDir;\n\t}", "title": "" }, { "docid": "13138cdeba608c5bd4879af52c895d14", "score": "0.59138817", "text": "protected static function generate_base_url()\n\t{\n\t\t$base_url = parent::generate_base_url();\n\t\treturn str_replace('htdocs/novius-os/', '', $base_url);\n\t}", "title": "" }, { "docid": "dd3039f95f7269ab07864413c57fd59c", "score": "0.5912772", "text": "private function getAppRootDir()\n {\n return $this->container->get('app.parameter_bag')->get('kernel.project_dir');\n }", "title": "" }, { "docid": "775b29b125d95fb44f7fe5797a2b9856", "score": "0.5903219", "text": "public final function fromApplicationBaseDir( $a_path )\r\n\t{\r\n\t\t$path = (string)$a_path;\r\n\t\tif( strpos($path, Zoombi::DS, 0) === 0 )\r\n\t\t\treturn $this->getApplicationBaseDir() . $path;\r\n\r\n\t\treturn $this->getApplicationBaseDir() . Zoombi::DS . $path;\r\n\t}", "title": "" }, { "docid": "c6131d35d98b908abb01b90d659fef66", "score": "0.5899439", "text": "protected function getBasePath()\n {\n return $this->vfs()->url();\n }", "title": "" }, { "docid": "a3f88d3cacb0f3c0c4cab2a2a4ae7d72", "score": "0.5894816", "text": "public function baseDir() {\n return 'src/public/FlyerPhotos/photos';\n }", "title": "" }, { "docid": "32794710ab2a43e6ce0c9cd26026face", "score": "0.5885983", "text": "public function getBasePath()\n {\n return config('nar.generator.basePath', app()->path()) . '/Api/'\n . strtoupper(env('API_VERSION')) . '/'\n . 'Controllers';\n }", "title": "" }, { "docid": "9c0449acad7932d73a8a221f30186f66", "score": "0.5872507", "text": "public static function setBaseURL($baseURL){\n self::$baseURL = $baseURL;\n }", "title": "" }, { "docid": "a404b6fd8c3e35fa4e4a7a44eced19fd", "score": "0.58674955", "text": "function base_path($path = '')\n {\n return str_replace('//' ,'/',str_ireplace('/' . SYSTEMPATHS['core'], '/', __DIR__) . '/' . $path);\n }", "title": "" }, { "docid": "9e5893804b54d5bf68f6bc8dd9ec72d1", "score": "0.5863951", "text": "public function get_base_dir($base = '.', $verbose = \\false)\n {\n }", "title": "" }, { "docid": "0ad8418cd1074eff7df0920295a51945", "score": "0.58617616", "text": "private function setBaseUrl()\n {\n $this->baseUrl = config('gladepay.endpoint');\n }", "title": "" }, { "docid": "7cebc6e4b865f19223842bf062d10397", "score": "0.5850872", "text": "public function set_path() {\n\t\t\t\n\t\t\t// pick up the path types\n\t\t\t$path_types = include_once(CONFIGPATH . 'path-types.php' );\n\n\t\t\t// get the base path for the deploy type\n\t\t\t$base_path = $path_types[ $this->repo[ 'type' ] ];\n\n\t\t\t// check if it is a valid path\n\t\t\t$this->is_path_valid( $base_path );\n\n\t\t\t// append the repositories name to get the final deploy path\n\t\t\t$this->repo[ 'path' ] = $base_path . '/' . $this->repo[ 'name' ];\n\t\t}", "title": "" }, { "docid": "be62dd2d1c089635e4d46a10066107fa", "score": "0.5849102", "text": "private function setBaseURL($url){\n\t\t$this->baseURL = $url;\n\t}", "title": "" }, { "docid": "84cf139c89bb326c6a3cff9660b1bfcc", "score": "0.58481747", "text": "public function setApplicationPath($v) { $this->applicationPath = $v;return $this; }", "title": "" }, { "docid": "1c871e37fc798b59066646e975fe4828", "score": "0.58481437", "text": "public function setBaseUrl($value)\n\t{\n\t\t$this->baseUrl = rtrim($value, '/');\n\t}", "title": "" }, { "docid": "49c4dd19654a7a5d239c9746438965dc", "score": "0.5845642", "text": "private function setBaseUrl()\n {\n if (config(\"redx.sandbox\") == true) {\n $this->baseUrl = \"https://sandbox.redx.com.bd\";\n } else {\n $this->baseUrl = \"https://openapi.redx.com.bd\";\n }\n }", "title": "" }, { "docid": "76f676033f791c3b266c8a118c5ed7e6", "score": "0.5831739", "text": "public static function get_directory() : string {\r\n\t\treturn Core::get_app_path( self::$directory );\r\n\t}", "title": "" }, { "docid": "3bb978b1b78735a0efccf529004c780b", "score": "0.5828949", "text": "function set_base($val) {\n\t\t$this->base = $val;\n\t}", "title": "" }, { "docid": "7043043ba4fb087b00501e642fb4a7e5", "score": "0.58271897", "text": "public function getBasePath()\n {\n // Check if server base path is defined, if not define it.\n if ($this->serverBasePath === null) {\n $this->serverBasePath = implode('/', array_slice(explode('/', $_SERVER['SCRIPT_NAME']), 0, -1)) . '/';\n }\n\n return $this->serverBasePath;\n }", "title": "" }, { "docid": "4542110e257abea00de4e7b8b9351f46", "score": "0.5827158", "text": "protected function getRootDir()\n {\n return $this->appConfig->getRootDir();\n }", "title": "" }, { "docid": "449d4da6b5c3bd9f0cde9a077a7d04e4", "score": "0.5821267", "text": "protected function setUpInstancePath() {\n\t\t$this->instancePath = BEHAT_ROOT;\n\t}", "title": "" }, { "docid": "4424770ebf0f6bc007c3d8c52fd72abe", "score": "0.5820817", "text": "public static function getApplicationRoot(){\r\n $path = __DIR__;\r\n return $path;\r\n }", "title": "" }, { "docid": "c9d0ea9afd1bf34bec0dd480cb960759", "score": "0.5818315", "text": "public function basePath(): string\n {\n return $this->app->getBasePath();\n }", "title": "" }, { "docid": "375e4768f462e8a6f3938c60907b1705", "score": "0.58134246", "text": "public function setScriptPath()\n\t{\n\t\t$this->scriptPath = Yii::getPathOfAlias('webroot').$this->ds.$this->suffix.$this->ds;\n\t}", "title": "" }, { "docid": "e49a5b1848b754d3904e225b7fc3fa83", "score": "0.58106434", "text": "private function setWorkingDir()\n {\n $this->workingDirBackup = getcwd();\n chdir(PATH_SITE);\n }", "title": "" } ]
9954c5239a93be8b1ecb6a57f7f1108c
Find ClassList extending or implementing a parent Class
[ { "docid": "54a5539d0766d25a05ea1f727a71de98", "score": "0.68613166", "text": "function findClassesImplementing(string $parentClass): array {\n $result = [];\n if (\n (class_exists($parentClass) or interface_exists($parentClass))\n and $classList = array_reverse(get_declared_classes())\n ) {\n foreach ($classList as $class) {\n $reflect = new ReflectionClass($class);\n if ($reflect->isAbstract() or $reflect->isTrait() or $reflect->isInterface()) continue;\n if ($reflect->isSubclassOf($parentClass)) $result[] = $class;\n }\n }\n return $result;\n}", "title": "" } ]
[ { "docid": "42f4b780d0e85f415b4466fd0d72f790", "score": "0.6198867", "text": "function class_parents($obj) {\n $all = get_declared_classes();\n $r = array();\n \n #-- filter out\n foreach ($all as $potential_parent) {\n if (is_subclass_of($obj, $potential_parent)) {\n $r[$potential_parent] = $potential_parent;\n }\n }\n return($r);\n }", "title": "" }, { "docid": "19ddcfff21c7bc2ffedccb4bdaf4e5e9", "score": "0.5977153", "text": "private function classUses(): array\n {\n $class = $this;\n \n $traits = [];\n while ($class) {\n $traits = array_merge(class_uses($class), $traits);\n $class = get_parent_class($class);\n }\n \n return array_unique($traits);\n }", "title": "" }, { "docid": "a895490b77d3bec2c82c2b3f4b5b5fd7", "score": "0.5903769", "text": "function object_get_ancestors ($class) {\n\tfor ($classes[] = $class; $class = get_parent_class ($class); $classes[] = $class);\n\treturn $classes;\n}", "title": "" }, { "docid": "bab115a93198bf965b30f27df03ba81b", "score": "0.5851726", "text": "public function getClassSupertypes($class)\n {\n return class_parents($class) + class_implements($class);\n }", "title": "" }, { "docid": "b8af5c4b3ae0243a933cd409cffa695f", "score": "0.5807018", "text": "abstract function getClassNameThatPluginsMustExtend();", "title": "" }, { "docid": "d6c26452ed96bacb597fb0485ad1aadb", "score": "0.57992643", "text": "public function getParentClass()\n {\n return $this->getSuperclass();\n }", "title": "" }, { "docid": "2dfababc839be225fbd80cecd8f21974", "score": "0.5759864", "text": "public static function classParents($specie){\r\n\t\t$arExtendedClasses = array();\r\n\t\tif(is_object($specie) || is_string($specie)){\r\n\t\t\t$arExtendedClasses = array_keys(class_parents($specie));\r\n\r\n\t\t\tarray_walk($arExtendedClasses, function(&$value, $key){\r\n\t\t\t\t$value = self::className($value);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn $arExtendedClasses;\r\n\t}", "title": "" }, { "docid": "cffc550708c1c8e6847373c6ec3cd6ba", "score": "0.57220954", "text": "public static function classImplements($specie){\r\n\t\t$arUsedClasses = array();\r\n\t\tif(is_object($specie) || is_string($specie)){\r\n\t\t\t$arUsedClasses = array_keys(class_implements($specie));\r\n\r\n\t\t\tarray_walk($arUsedClasses, function(&$value, $key){\r\n\t\t\t\t$value = self::className($value);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn $arUsedClasses;\r\n\t}", "title": "" }, { "docid": "f0b8f5b3b912a8e74ace8e7bd635f166", "score": "0.56825876", "text": "public function getSubclasses(string $namespace, $parent = false): array;", "title": "" }, { "docid": "555b3176f4a6000f4b931bcae2b969af", "score": "0.5624145", "text": "abstract protected function getClass();", "title": "" }, { "docid": "0e5a2ae9435f818c90c5c6de80e002db", "score": "0.5580067", "text": "public function matchesClass(\\ReflectionClass $class);", "title": "" }, { "docid": "85b6aedc87375179b9cc5d728790860f", "score": "0.556326", "text": "public function getClass();", "title": "" }, { "docid": "85b6aedc87375179b9cc5d728790860f", "score": "0.556326", "text": "public function getClass();", "title": "" }, { "docid": "85b6aedc87375179b9cc5d728790860f", "score": "0.556326", "text": "public function getClass();", "title": "" }, { "docid": "85b6aedc87375179b9cc5d728790860f", "score": "0.556326", "text": "public function getClass();", "title": "" }, { "docid": "85b6aedc87375179b9cc5d728790860f", "score": "0.556326", "text": "public function getClass();", "title": "" }, { "docid": "85b6aedc87375179b9cc5d728790860f", "score": "0.556326", "text": "public function getClass();", "title": "" }, { "docid": "85b6aedc87375179b9cc5d728790860f", "score": "0.556326", "text": "public function getClass();", "title": "" }, { "docid": "85b6aedc87375179b9cc5d728790860f", "score": "0.556326", "text": "public function getClass();", "title": "" }, { "docid": "85b6aedc87375179b9cc5d728790860f", "score": "0.556326", "text": "public function getClass();", "title": "" }, { "docid": "85b6aedc87375179b9cc5d728790860f", "score": "0.556326", "text": "public function getClass();", "title": "" }, { "docid": "85b6aedc87375179b9cc5d728790860f", "score": "0.556326", "text": "public function getClass();", "title": "" }, { "docid": "85b6aedc87375179b9cc5d728790860f", "score": "0.556326", "text": "public function getClass();", "title": "" }, { "docid": "85b6aedc87375179b9cc5d728790860f", "score": "0.556326", "text": "public function getClass();", "title": "" }, { "docid": "520f0a04df263a418d9e6ee4f4adfa47", "score": "0.5529122", "text": "public function getParentClass()\n {\n $parentClass = parent::getParentClass();\n if (null === $parentClass || false === $parentClass) {\n return null;\n }\n\n return new ReflectionClass($parentClass->getName());\n }", "title": "" }, { "docid": "e0be9661df7cc96d98a87e2b955a236a", "score": "0.5486316", "text": "abstract public function getClass_v2();", "title": "" }, { "docid": "eee9ac0a8a546b9f33ba6f79d6772d64", "score": "0.54705995", "text": "function findNidi($extend)\n{\n global $classes;\n global $cnt;\n foreach ($classes as $key) {\n if ($key->get_name() == $extend) {\n $name1 = $key->get_extends();\n if (!empty($name1)) {\n $cnt++;\n findNidi($name1);\n }\n }\n }\n}", "title": "" }, { "docid": "7aaf51c6cbc1760e4ed8c98588923226", "score": "0.5457541", "text": "public static function getClassList()\n\t{\n\t\treturn self::$classes;\n\t}", "title": "" }, { "docid": "2b9ba5401e8363c4ce1e2ad8b8fd6e42", "score": "0.5446935", "text": "function supportsClass($className);", "title": "" }, { "docid": "3fe82f0a3c93c79896a3ee39404be9bb", "score": "0.54316443", "text": "public function getIndexedClasses()\n {\n $classes = array();\n\n $whitelist = array('SearchableTestPage', 'SearchableTestFatherPage', 'SearchableTestGrandFatherPage',\n 'FlickrPhotoTO', 'FlickrTagTO', 'FlickrPhotoTO', 'FlickrAuthorTO', 'FlickrSetTO', );\n\n foreach (\\ClassInfo::subclassesFor('DataObject') as $candidate) {\n $instance = singleton($candidate);\n\n $interfaces = class_implements($candidate);\n // Only allow test classes in testing mode\n if (isset($interfaces['TestOnly'])) {\n if (in_array($candidate, $whitelist)) {\n if (!$this->test_mode) {\n continue;\n }\n } else {\n // If it's not in the test whitelist we definitely do not want to know\n continue;\n }\n }\n\n if ($instance->hasExtension('SilverStripe\\\\Elastica\\\\Searchable')) {\n $classes[] = $candidate;\n }\n }\n\n return $classes;\n }", "title": "" }, { "docid": "b1f3b82118c2e0496cdaa54dfa820e3f", "score": "0.5403968", "text": "function get_subclasses($value, $slow = false){\n\t$out = array();\n\t$classes = get_declared_classes();\n\tfor($i = ($slow ? 0 : array_search($value, $classes)); $i < count($classes); ++$i)\n\t\tif(is_subclass_of($classes[$i], $value))\n\t\t\t$out[] = $classes[$i];\n\treturn $out;\n}", "title": "" }, { "docid": "e1c3d786fc5d6edbf8542c9be8a96347", "score": "0.5395712", "text": "function FindModules()\n\t{\n\t\t$result = array();\n\n\t\tforeach (get_declared_classes() as $oneclass)\n\t\t{\n\t\t $parent = get_parent_class($oneclass);\n\t\t while( $parent !== FALSE )\n\t\t {\n\t\t $str = strtolower($parent);\n\t\t if( $str == 'cmsmodule' ) \n\t\t\t{\n\t\t\t $result[] = strtolower($oneclass);\n\t\t\t break;\n\t\t\t}\n\t\t $parent = get_parent_class($parent);\n\t\t }\n\t\t}\n\n\t\tsort($result);\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "8aa0855d070ad6f41676499ddce49a55", "score": "0.5395236", "text": "public function get_class($class);", "title": "" }, { "docid": "e3de5adf2bdc483754f0ff2685f311be", "score": "0.539022", "text": "private function getClassElements(): array\n {\n return getImmediateChildrenByName(\n $this->getRootNode(),\n ['class', 'trait', 'interface']\n );\n }", "title": "" }, { "docid": "c912e44fd2df60092577dec9a7cb9ae1", "score": "0.53811103", "text": "public function getClasses() {\r\n return $this->get(array(\r\n \"fields\" => \"DISTINCT type\",\r\n \"order\" => \"ORDER BY type\"\r\n ));\r\n }", "title": "" }, { "docid": "019e2f563901978887e4f0c3ae06e877", "score": "0.53782785", "text": "function class_uses_recursive($class)\n\t{\n\t\tif (is_object($class)) {\n\t\t\t$class = get_class($class);\n\t\t}\n\t\t$results = [];\n\t\tforeach (array_merge([$class => $class], class_parents($class)) as $class) {\n\t\t\t$results += trait_uses_recursive($class);\n\t\t}\n\t\treturn array_unique($results);\n\t}", "title": "" }, { "docid": "6c8652513494a0f55745657a7d886ec1", "score": "0.53651863", "text": "public function canLocate($class);", "title": "" }, { "docid": "707e15713060a747aa3523ff2a8605df", "score": "0.5363536", "text": "function class_uses_recursive($class)\n {\n $results = [];\n\n foreach (array_merge([$class => $class], class_parents($class)) as $class) {\n $results += trait_uses_recursive($class);\n }\n\n return array_unique($results);\n }", "title": "" }, { "docid": "9346121e8fe909ffbbd612d8fcbb8c55", "score": "0.53444195", "text": "function getClassType() {return end(explode('\\\\', get_class($this))); }", "title": "" }, { "docid": "214202e85667a0c322c629dfe1d4815a", "score": "0.5335218", "text": "public function getClasses() {\n if ( $this->reflectionSource ) {\n $classes = $this->reflectionSource->getClasses();\n } else {\n $classes = parent::getClasses();\n }\n\n $result = array();\n foreach ($classes as $class) {\n $result[] = new ezcReflectionClass($class);\n }\n return $result;\n }", "title": "" }, { "docid": "cceb5acb09e922f2c3ae7ef0786eeec0", "score": "0.5332511", "text": "function getParentClass($class,$file)\n {\n if (!isset($this->classesbyfile[$file][$class])) {\n return false;\n }\n $element = $this->classesbyfile[$file][$class];\n if (!($ex = $element->getExtends())) return false;\n // first check to see if there is one and only one \n // class with the parent class's name\n if (isset($this->classesbynamefile[$ex])) {\n if (count($this->classesbynamefile[$ex]) == 1) {\n if ($this->classesbyfile\n [$this->classesbynamefile[$ex][0]][$ex]->ignore) {\n return $ex;\n }\n return array($this->classesbynamefile[$ex][0],$ex);\n } else {\n // next check to see if there is a parent class in the same file\n if (isset($this->classesbyfile[$file][$ex])) {\n if ($this->classesbyfile[$file][$ex]->ignore) {\n return $ex;\n }\n return array($file,$ex);\n }\n // next check to see if there is only one package \n // used in the file, try to resolve it that way\n if (isset($this->classpackagebyfile[$file])) {\n if (count($this->classpackagebyfile[$file]) == 1) {\n for ($i=0;$i<count($this->classesbynamefile[$ex]);$i++) {\n if ($this->classesbyfile\n [$this->classesbynamefile[$ex][$i]][$ex]->getPackage() \n == $this->classpackagebyfile[$file][0]) {\n if ($this->classesbyfile\n [$this->classesbynamefile[$ex][$i]][$ex]->ignore) \n return $ex;\n return array($this->classesbynamefile[$ex][$i],$ex);\n }\n }\n }\n }\n // name conflict\n addWarning(PDERROR_INHERITANCE_CONFLICT, $class, $file, $ex);\n return $ex;\n }\n } else {\n if (class_exists('ReflectionClass') && class_exists($ex)) {\n $r = new ReflectionClass($ex);\n if ($r->isInternal()) {\n return $ex; // no warning\n }\n }\n addWarning(PDERROR_PARENT_NOT_FOUND, $class, $ex);\n return $ex;\n }\n }", "title": "" }, { "docid": "15efd3be7e90d1c577a9c744d359b57b", "score": "0.5330956", "text": "public static function getParentClass()\r\n {\r\n return get_parent_class();\r\n }", "title": "" }, { "docid": "d3f6fbab3f2985af72c1a00191289990", "score": "0.52924734", "text": "function get_classes() {\n\t\treturn $this->classes;\n\t}", "title": "" }, { "docid": "79a3499b767fcdcb93b3b9d6942306a4", "score": "0.52798736", "text": "public function getClass() {\r\n \r\n }", "title": "" }, { "docid": "0b7e48ed92fe39429e7da616fa856bdf", "score": "0.5266922", "text": "public function getClasses() {\n \n // Include the include lists. The including file reassigns the list(array) to the $_aClassFiles variable.\n $_aClassFiles = array();\n $_bLoaded = include( dirname( $this->sFilePath ) . '/include/class-list.php' );\n if ( ! $_bLoaded ) {\n return $_aClassFiles;\n }\n return $_aClassFiles;\n \n }", "title": "" }, { "docid": "363296bbbd0265de43edfa7c00f003e7", "score": "0.5252751", "text": "public function getRegisteredClasses();", "title": "" }, { "docid": "af78d0f0e344be7032f4587541325bdb", "score": "0.52503407", "text": "function class_uses_recursive($class)\n {\n if (is_object($class)) {\n $class = get_class($class);\n }\n\n $results = [];\n\n foreach (array_reverse(class_parents($class)) + [$class => $class] as $class) {\n $results += trait_uses_recursive($class);\n }\n\n return array_unique($results);\n }", "title": "" }, { "docid": "190382c2deff7069d9e4bcd58926d9aa", "score": "0.5249442", "text": "function getClass();", "title": "" }, { "docid": "190382c2deff7069d9e4bcd58926d9aa", "score": "0.5249442", "text": "function getClass();", "title": "" }, { "docid": "190382c2deff7069d9e4bcd58926d9aa", "score": "0.5249442", "text": "function getClass();", "title": "" }, { "docid": "22f45479874c3f2a76c4079760944ad4", "score": "0.5248871", "text": "static function getValidSubClasses($class = 'SiteTree') {\n\t\treturn DB::getConn()->enumValuesForField($class, 'ClassName');\n\t}", "title": "" }, { "docid": "4bdddc0d840c35eb4f9bd67e94c1fe8f", "score": "0.5227192", "text": "function isContainedBy($classname)\n {\n return isset($this->parents[$classname]);\n }", "title": "" }, { "docid": "8f3b1ad7e3252e99a92df7a34d226a00", "score": "0.5227032", "text": "public function getClassesTree()\n\t{\n\t\treturn array_merge([get_class($this)], static::getParentClasses(true));\n\t}", "title": "" }, { "docid": "f253fec317cdcb9130325477bf6e90ae", "score": "0.52259326", "text": "public static function getClass();", "title": "" }, { "docid": "09281603921441b2377cb6ed0f732b63", "score": "0.5225759", "text": "public function findParentByClass($class)\r\n { \r\n $parent = $this->getParent();\r\n while (!is_null($parent)) {\r\n if ($parent instanceof $class) {\r\n return $parent;\r\n }\r\n $parent = $parent->getParent();\r\n }\r\n return null;\r\n }", "title": "" }, { "docid": "75c43667ed76538b0c9ccb553de763df", "score": "0.5211038", "text": "public static function getClassesToAttachTo(): array\n {\n return [];\n }", "title": "" }, { "docid": "b8efcb6496cf6d924fce521e1cf8180e", "score": "0.5206885", "text": "public function getParentsOfType($parentType);", "title": "" }, { "docid": "3cb8b89e91280e74886700d0016a665a", "score": "0.52068365", "text": "public function getBelongs(): ClassBelongs;", "title": "" }, { "docid": "6f1752306112025155409df0bfaa1834", "score": "0.5206303", "text": "function getClasses($first,$last,$level){\n \n }", "title": "" }, { "docid": "73a64adf8a6a6931ed81c4a42b64b3d8", "score": "0.5171552", "text": "public function supportsClass($class);", "title": "" }, { "docid": "e4801fc25cdcc8fbe1fe4fb6a21a4986", "score": "0.51676315", "text": "public function getChildClass()\n {\n return null;\n }", "title": "" }, { "docid": "bc1a8c556c06be583fd0912d941fca89", "score": "0.5162781", "text": "public function hasClass($class);", "title": "" }, { "docid": "18afa5753fed7101318e8bc2463678e0", "score": "0.51543576", "text": "public function getDeriverClass();", "title": "" }, { "docid": "ab4c9a542304caaa517560810ecb2ffd", "score": "0.51498574", "text": "function get_plugin_list_with_class($plugintype, $class, $file) {\n\n // NOTE: do not add any other debugging here, keep forever.\n\n return core_component::get_plugin_list_with_class($plugintype, $class, $file);\n}", "title": "" }, { "docid": "b46ec5300db6bd07d85d98356073220d", "score": "0.5148345", "text": "public static function \tclassExtends( $class, $class_to_test ){\n\t\t$reflect = new ReflectionClass( $class );\n\t\treturn $reflect->isSubclassOf( $class_to_test ) ;\n\n\t}", "title": "" }, { "docid": "7e4baa06810f759a6a46ab91c1599c84", "score": "0.51470965", "text": "public static function classUses($specie){\r\n\t\t$arUsedClasses = array();\r\n\t\tif(is_object($specie) || is_string($specie)){\r\n\t\t\t$arUsedClasses = array_keys(class_uses($specie));\r\n\r\n\t\t\tarray_walk($arUsedClasses, function(&$value, $key){\r\n\t\t\t\t$value = self::className($value);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn $arUsedClasses;\r\n\t}", "title": "" }, { "docid": "196e426790eafbdeea6f2c1e814ca2ce", "score": "0.5143575", "text": "public static function get_classes () {\n\t\treturn DB::shift_array (\n\t\t\t'select distinct class from #prefix#versions order by class asc'\n\t\t);\n\t}", "title": "" }, { "docid": "7871b09cc757eba599245369c51006cc", "score": "0.5137174", "text": "public function testCanFindClasses()\n {\n foreach ($this->classes as $class) {\n $this->assertTrue(class_exists($class) || interface_exists($class));\n }\n }", "title": "" }, { "docid": "cb8246e7203c2fa1fb7ff918e1eb2d71", "score": "0.51358944", "text": "function class_uses_recursive($class): array\n {\n if (is_object($class)) {\n $class = get_class($class);\n }\n\n $results = [];\n\n foreach (array_reverse((array)class_parents($class)) + [$class => $class] as $cls) {\n $results += trait_uses_recursive((string)$cls);\n }\n\n return array_unique($results);\n }", "title": "" }, { "docid": "3b86d158f0b83fc60a0af27fd604e8f8", "score": "0.51344997", "text": "public function getClasses()\n {\n\t\ttry {\n\t\t\t$db = $this->linkDB_PDO();\n\t\t} catch(PDOException $e) {\n\t\t\techo \"Fehler bei der Verbindung: \" . $e->getMessage();\n\t\t\t\n\t\t}\n\t\t\n\t\t$sql = \"SELECT * FROM CLASS ORDER BY name\";\n\t\t$stmt = $db->prepare($sql);\n\t\t$stmt->execute();\n\t\t\n\t\t$stmt->setFetchMode(\\PDO::FETCH_OBJ);\n \n\t\t$result = array();\n while ($row = $stmt->fetch()) {\n $result[] = $row;\n }\n\t\t\n\t\t$db = null;\n\t\treturn count($stmt)> 0 ? $result : false;\t\n }", "title": "" }, { "docid": "a081c27e0a60103534ab6f0821d3b147", "score": "0.51305276", "text": "function remove_parent_classes($class){\n return in_array( $class, array( 'current_page_item', 'current_page_parent', 'current_page_ancestor', 'current-menu-item' ) ) ? FALSE : TRUE;\n}", "title": "" }, { "docid": "a081c27e0a60103534ab6f0821d3b147", "score": "0.51305276", "text": "function remove_parent_classes($class){\n return in_array( $class, array( 'current_page_item', 'current_page_parent', 'current_page_ancestor', 'current-menu-item' ) ) ? FALSE : TRUE;\n}", "title": "" }, { "docid": "8aae716e59fd2fddef9d5de75bb992f5", "score": "0.5129217", "text": "public function getDeclaredClasses() : Collection\n {\n $this->findAndLoadClasses();\n // We should filter out common classes\n // - std_class\n // - ? Exception\n $classes = collect(get_declared_classes());\n\n $filtered = $classes->reject(function ($value, $key) {\n return starts_with($value, 'Illuminate'); // Ignore Illuminate Packages\n })->reject(function ($value, $key) {\n return starts_with($value, 'Symfony');\n });\n\n return $filtered;\n }", "title": "" }, { "docid": "9a7f51315ff2f8a68c4ab5c7b650f3d8", "score": "0.5127875", "text": "public function getClass(): array;", "title": "" }, { "docid": "d633e0b5a324dc49e8be608e3c7b0447", "score": "0.51166296", "text": "function hasClass($classname);", "title": "" }, { "docid": "d74b380aa3e33f17e72f6653976e7cab", "score": "0.5110352", "text": "public function providesClass($class);", "title": "" }, { "docid": "a50b9ac53fab5bf62aee77cd40dcb0b9", "score": "0.51069784", "text": "public function findAncestorWithClass($class_name) {\n\t\tif(!is_null($this->parent)) {\n\t\t\t$parent_refl = new ReflectionClass(get_class($this->parent));\t\n\t\t\t\n\t\t\tif (get_class($this->getParent()) == $class_name) {\n\t\t\t\treturn $this->parent;\n\t\t\t}\t\n\t\t\treturn $this->parent->findAncestorWithClass($class_name);\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "85a6a7666d893bd57595a9293d0d5a36", "score": "0.5105519", "text": "public function getClasses(){\n \n // canary...\n if(empty($this->body)){ return array(); }//if\n \n $ret_list = array();\n $tokens = token_get_all($this->body);\n \n /*\n foreach($tokens as $key => $token){\n if(is_array($tokens[$key])){ $tokens[$key][0] = token_name($tokens[$key][0]); }//if\n }//foreach\n out::e($tokens); // */\n\n $namespace = '';\n $use_map = array();\n \n for($i = 0, $total_tokens = count($tokens); $i < $total_tokens ;$i++){\n \n if(is_array($tokens[$i])){\n \n switch($tokens[$i][0]){\n \n case T_NAMESPACE:\n\n $namespace = '';\n $use_map = array();\n\n list($i,$namespace) = $this->getNamespace($i,$tokens);\n break;\n \n case T_USE:\n \n list($i,$map) = $this->getUseNamespace($i,$tokens);\n $use_map = array_merge($use_map,$map);\n \n break;\n \n case T_ABSTRACT:\n \n // only try and find a class if it is actually a class (could be a function)\n // another way to do this would be to look behind from T_CLASS to see if there\n // is a T_ABSTRACT token\n \n $ai = $i;\n \n // move from the abstract to the class token...\n while($tokens[++$ai][0] !== T_CLASS){\n \n if($tokens[$ai][0] === T_FUNCTION){ break; }//if\n \n }//while\n \n if($tokens[$ai][0] === T_CLASS){\n \n list($i,$map) = $this->getClass($ai,$tokens,$namespace,$use_map,false);\n $ret_list[] = $map;\n \n }//if\n \n break;\n \n case T_INTERFACE:\n \n list($i,$map) = $this->getClass($i,$tokens,$namespace,$use_map,false);\n $ret_list[] = $map;\n \n break;\n \n case T_CLASS:\n\n list($i,$map) = $this->getClass($i,$tokens,$namespace,$use_map,true);\n $ret_list[] = $map;\n\n break;\n \n }//switch\n \n }//if\n \n }//foreach\n \n ///out::e($namespace,$use_map);\n \n return $ret_list;\n \n }", "title": "" }, { "docid": "d4860d4958280639507d03f2f100bd02", "score": "0.5105126", "text": "public function getAllClasses() : array\n {\n /** @var \\Roave\\BetterReflection\\Reflection\\ReflectionClass[] $allClasses */\n $allClasses = $this->sourceLocator->locateIdentifiersByType(\n $this,\n new IdentifierType(IdentifierType::IDENTIFIER_CLASS)\n );\n\n return $allClasses;\n }", "title": "" }, { "docid": "7835890cb3270322e96728adb5ed7b50", "score": "0.5085626", "text": "public static function classExtends($specie, $strClassName){\r\n\t\t$arExtended = array_merge(self::classParents($specie), self::classUses($specie), self::classImplements($specie));\r\n\r\n\t\treturn in_array($strClassName, $arExtended);\r\n\t}", "title": "" }, { "docid": "d0ff218e0ce24e4e10f4e1db3feb3853", "score": "0.50843465", "text": "protected function getParentClass()\n {\n return $this->readControllerAnnotations()->getParentClass();\n }", "title": "" }, { "docid": "192a2bd61296365fc81dcb3282ad7e4f", "score": "0.5075737", "text": "public static function isExtending($class, $parent, $includeSelf = false) {\n if (is_object($class)) {\n $class = static::getType($class);\n }\n $class = ltrim($class, NS);\n $parent = ltrim($parent, NS);\n\n return ($includeSelf && $class === $parent) || in_array($parent, self::getObjectAncestors($class));\n }", "title": "" }, { "docid": "50a51519374babb8685529c48511b922", "score": "0.5072371", "text": "public function getClasses()\n\t{\n\t\treturn $this->getElements(T_CLASS);\n\t}", "title": "" }, { "docid": "22733b91675fea97affe884596e71c18", "score": "0.5066522", "text": "public static function get_ancestors($class)\n {\n for ($classes[] = $class; $class = get_parent_class($class); $classes[] = $class) ;\n\n return $classes;\n }", "title": "" }, { "docid": "5616aa40613eb59ec04ae89895003bd3", "score": "0.5045042", "text": "public static function getParentClasses($object, $base_class_name = '') {\n $class = get_class($object);\n $parent_classes = [];\n while ($class_name = self::getClassName($class)) {\n $parent_classes[] = $class_name;\n $class = get_parent_class($class);\n if ($class_name == $base_class_name || !$class) {\n break;\n }\n }\n return array_reverse($parent_classes);\n }", "title": "" }, { "docid": "2e963391e6b1db989c009c152696c09c", "score": "0.50417995", "text": "private function findClasses(): array\n {\n $classes = [];\n $namespaceName = $this->getName();\n // classes can be only top-level nodes in the namespace, so we can scan them directly\n foreach ($this->namespaceNode->stmts as $namespaceLevelNode) {\n if ($namespaceLevelNode instanceof ClassLike) {\n $classShortName = $namespaceLevelNode->name->toString();\n $className = $namespaceName ? $namespaceName .'\\\\' . $classShortName : $classShortName;\n\n $namespaceLevelNode->setAttribute('fileName', $this->fileName);\n $classes[$className] = new ReflectionClass($className, $namespaceLevelNode);\n }\n }\n\n return $classes;\n }", "title": "" }, { "docid": "a23708df718f1d7816e748c864b025ae", "score": "0.5032274", "text": "private final function getClass () {\n\t\t// get the original class that was called.\n\t\tif (self::$class) {\n\t\t\treturn self::$class;\n\t\t}\n\t\t\n\t\t// walk up the call stack to find the child that was called.\n\t\t$class = \"\";\n\t\tforeach (debug_backtrace() as $i => $t) {\n\t\t\tif ($i === 0) continue;\n\t\t\tif (\n\t\t\t\t! array_key_exists('class', $t) ||\n\t\t\t\t! ($t['class'] === __CLASS__ || in_array(__CLASS__, class_parents($t['class']))) ||\n\t\t\t\t! ($t['function'] === 'walk') ||\n\t\t\t\t! ($t['type'] === '::')\n\t\t\t) break;\n\t\t\t$class = $t['class'];\n\t\t}\n\t\t\n\t\tif (!$class || $class === __CLASS__) {\n\t\t\ttrigger_error(\"The 'walk' function must be overridden on child classes. Do not call on the \" . \n\t\t\t\t__CLASS__ . \" class directly.\", E_USER_ERROR);\n\t\t\treturn;\n\t\t}\n\t\tif (!class_exists($class)) {\n\t\t\ttrigger_error(\"Class doesn't exist: $class\", E_USER_ERROR);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\treturn (self::$class = $class);\n\t}", "title": "" }, { "docid": "086f71dac1b69d2ed42595d545c8c41c", "score": "0.50317806", "text": "public function getClasses()\r\n {\r\n return $this->classes;\r\n }", "title": "" }, { "docid": "43a7b3a62f12ec67b168f6a38bd780b8", "score": "0.50316197", "text": "function class_uses_recursive($class, $autoload = true)\n {\n $traits = class_uses($class, $autoload);\n foreach (array_merge(class_parents($class), $traits) as $parent) {\n $traits += class_uses_recursive($parent, $autoload);\n }\n return $traits;\n }", "title": "" }, { "docid": "4a2830dc5de9b89fd4c3f30175bc114f", "score": "0.5028745", "text": "private function LookForClassWithMethod($class,$method)\r\n\t{\r\n\t\t\tif (method_exists($class,$method) )\r\n\t\t\t\t\treturn $class;\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\tforeach( $class->getInheritedInstances() as $inherited)\r\n\t\t\t{\r\n\t\t\t\tif (method_exists($inherited,$method) )\r\n\t\t\t\t\treturn $inherited;\r\n\t\t\t\t\r\n\t\t\t\t//WOOP WOOP GOING TO FIX THIS ASAP!\r\n\t\t\t\tif (is_subclass_of($inherited,'/qoo/core/MultipleInheritant') )\r\n\t\t\t\t\treturn $this->LookForClassWithMethod($inherited,$method);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn null;\r\n\t\t\t\r\n\t}", "title": "" }, { "docid": "db569fae9f75a13ab5b5908a5c853157", "score": "0.5025609", "text": "public function getClasses()\n {\n return $this->classes;\n }", "title": "" }, { "docid": "d26ba394e8ff3af03996d9f07feab409", "score": "0.50241095", "text": "private function get_clazz()\n\t{\n\t\treturn $this->m_clazz;\n\t}", "title": "" }, { "docid": "372d03264c2f64f5a01c086d13a711ee", "score": "0.5016141", "text": "public function findAndLoadClasses(): Collection\n {\n ob_start();\n\n $this->findFilesInProjectPath()\n ->each(function (SplFileInfo $file) {\n try {\n // Files that look like to be Pest Tests are ignored as we currently don't support them.\n if ($this->isMostLikelyPestTest($file)) {\n return true;\n }\n require_once $file->getRealPath();\n } catch (Exception $e) {\n //\n }\n });\n\n ob_end_clean();\n\n return collect(get_declared_classes())\n ->reject(function (string $className) {\n return Str::startsWith($className, ['SwooleLibrary']);\n });\n }", "title": "" }, { "docid": "ae7e693edbe34b5bc96a396133da5e1b", "score": "0.50150126", "text": "public function testCanFindClasses()\n {\n foreach ($this->classes as $class) {\n $this->assertTrue(class_exists($class) || interface_exists($class), \"$class not found\");\n }\n }", "title": "" }, { "docid": "dde48b3458a6524592ac65f0753a71a8", "score": "0.5013093", "text": "public function classExtends(string $fq_class_name, string $possible_parent, bool $from_api = false): bool\n {\n $unaliased_fq_class_name = $this->getUnAliasedName($fq_class_name);\n $unaliased_fq_class_name_lc = strtolower($unaliased_fq_class_name);\n\n if ($unaliased_fq_class_name_lc === 'generator') {\n return false;\n }\n\n $class_storage = $this->classlike_storage_provider->get($unaliased_fq_class_name);\n\n if ($from_api && !$class_storage->populated) {\n throw new UnpopulatedClasslikeException($fq_class_name);\n }\n\n return isset($class_storage->parent_classes[strtolower($possible_parent)]);\n }", "title": "" }, { "docid": "d13194b836cfeb2daaf8409ec2dbda69", "score": "0.5011869", "text": "public function getClassDependencies();", "title": "" }, { "docid": "13deebdff7b818b0f98a906fad31271e", "score": "0.5000909", "text": "public static function find_all ()\n\t{\n\t\t$return = array();\n\t\t$widget_classes = glob(APPPATH . 'classes' . DS . 'Widgets' . DS . '*');\n\n\t\tforeach ($widget_classes as $widget_class)\n\t\t{\n\t\t\tif (strpos($widget_class, 'Base.php') > 0)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t} // if\n\n\t\t\t$return[] = strstr(substr(strrchr($widget_class, DS), 1), '.', true);\n\t\t} // foreach\n\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "6f05730c3d0ad8761d5063b972f3c107", "score": "0.4996713", "text": "public function classExists($className);", "title": "" }, { "docid": "9eac8dc60ed2cf136ff8e9a7e9782c15", "score": "0.49704328", "text": "private static function list_root_data_classes() {\n $baseClasses = array(\n 'ViewResultsRetriever',\n 'ViewResultsSorter',\n 'QuerySort',\n 'QueryPredicate',\n 'PredicateCondition',\n 'FieldPredicateValue');\n return $baseClasses;\n }", "title": "" }, { "docid": "18e4ac7594c9224d05ea4bd3ee76e981", "score": "0.49697948", "text": "public function getClasses()\n\t{\n\t\treturn $this->classes;\n\t}", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "5755bf3e83497b66cedeb2580c1e2919", "score": "0.0", "text": "public function show(Client $client)\n {\n //\n }", "title": "" } ]
[ { "docid": "cc12628aa1525caac0bf08e767bd6cb4", "score": "0.7592133", "text": "public function view(ResourceInterface $resource);", "title": "" }, { "docid": "d57b314bf807713f346bc35fb937529e", "score": "0.68463326", "text": "public function render() {\n $this->_template->display($this->resource_name);\n }", "title": "" }, { "docid": "87649d98f1656cc542e5e570f7f9fd1f", "score": "0.6617427", "text": "public function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t\t$this->setHeaderData();\n\t\t\tparent::display($resource_name, $cache_id, $compile_id);\n\t\t}", "title": "" }, { "docid": "9579e337a5325a82370abb431f646b6f", "score": "0.6491441", "text": "public function show($id)\n\t{\n\t\t//\n\t\t$resource = \\App\\Resource::find($id);\n\t\treturn view('deleteResource', array( 'resource' => $resource) );\n\t}", "title": "" }, { "docid": "989918b39caf8ede67ab11ef4dc4a651", "score": "0.63457626", "text": "public function editresourceAction() {\n\t\t$resourceid = $this->_request->getParam('resourceid');\n\t\t$srlink = new StudentResourceLink();\n\t\t$select = $srlink->select()->where($srlink->getAdapter()->quoteInto('auto_id = ?', $resourceid));\n\t\t$rows = $srlink->fetchAll($select);\n\t\t$therow = null;\n\t\tforeach ($rows as $row) {\n\t\t\t$therow=$row;\n\t\t}\n\t\t//print_r($therow);\n\t\t$this->view->resourcelink = $therow;\n\t\t\n\t\t$mediabankUtility = new MediabankUtility();\n\t\tob_start();\n\t\t$mediabankUtility->curlDownloadResource($therow['mid'],false);\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\t\t$this->view->content = $content;\t\t\n\t\t$this->view->redirect_to = $_SERVER[\"HTTP_REFERER\"];\n\t\tStudentResourceService::prepStudentResourceView($this, $this->_request, $therow->loid);\n\t\tif($therow['category']=='Summary') //summary has been stripped out since a summary exists; add it back in if this one is a summary\n\t\t\t$this->view->studentResourceCategories[6]='Summary';\n\t}", "title": "" }, { "docid": "d6d98993d2a40a3cba09832ef9953f69", "score": "0.62127197", "text": "public function lookup($resource);", "title": "" }, { "docid": "6244aaaaf59fb15467858bc417084ebc", "score": "0.62085146", "text": "protected function makeDisplayFromResource()\n\t{\n\t\tif($this->activeResource instanceof SimpleXMLElement)\n\t\t{\n\t\t\treturn $this->activeResource->asXml();\n\t\t}else{\n\t\t\treturn $this->activeResource;\n\t\t}\n\t}", "title": "" }, { "docid": "3ee4a64030fd6d594c526bf49945971f", "score": "0.62007433", "text": "public function show($id)\n {\n $res = Resource::find($id);\n return view('resource.show')->withResource($res);\n }", "title": "" }, { "docid": "48b723515995fb4178256251ea323c04", "score": "0.6185578", "text": "public function show($id) {\n $resource = static::$resource::findOrFail($id);\n return view($this->getView('show'), [static::$varName[0] ?? $this->getResourceName() => $resource]);\n }", "title": "" }, { "docid": "b6106194998deb4acb00d89d1984bf4b", "score": "0.61584204", "text": "public function displayAction()\n {\n $params = $this->router->getParams();\n if (isset($params[0]) && $firewall = Firewalls::findFirst(intval($params[0]) ? $params[0] : ['name=:name:', 'bind' => ['name' => $params[0]]])) {\n $this->tag->setTitle(__('Firewalls') . ' / ' . __('Display'));\n $this->view->setVars([\n 'firewall' => $firewall,\n 'content' => Las::display($firewall->name)\n ]);\n\n // Highlight <pre> tag\n $this->assets->addCss('css/highlightjs/arta.css');\n $this->assets->addJs('js/plugins/highlight.pack.js');\n $this->scripts = ['$(document).ready(function() { $(\"pre\").each(function(i, e) {hljs.highlightBlock(e)}); });'];\n }\n }", "title": "" }, { "docid": "cbf3bf22b6453f9015dd8d3552392655", "score": "0.61575574", "text": "protected function showResourceView($id)\n\t{\n\n\t\t$element = $this->getElements($id);\n\t\treturn Response::view('adm/IAS/element', array('data' => $element));\n\n\t}", "title": "" }, { "docid": "c232a532d32e3f8e5c41e20db4331be5", "score": "0.60671955", "text": "function display($aTemplate = null) {\r\n\t\t$this->fetch ( $aTemplate, true );\r\n\t}", "title": "" }, { "docid": "88951f8df99fd6c0e333e72b145dfb04", "score": "0.6067186", "text": "public function displayAction()\n {\n // set filters and validators for GET input\n $filters = array(\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\n ); \n $validators = array(\n 'id' => array('NotEmpty', 'Int')\n );\n $input = new Zend_Filter_Input($filters, $validators);\n $input->setData($this->getRequest()->getParams());\n\n // test if input is valid\n // retrieve requested record\n // attach to view\n if ($input->isValid()) {\n $q = Doctrine_Query::create()\n ->from('Square_Model_Item i')\n ->leftJoin('i.Square_Model_Country c')\n ->leftJoin('i.Square_Model_Grade g')\n ->leftJoin('i.Square_Model_Type t')\n ->where('i.RecordID = ?', $input->id);\n $result = $q->fetchArray();\n if (count($result) == 1) {\n $this->view->item = $result[0]; \n } else {\n throw new Zend_Controller_Action_Exception('Page not found', 404); \n }\n } else {\n throw new Zend_Controller_Action_Exception('Invalid input'); \n }\n }", "title": "" }, { "docid": "3fb44335bf5e5dca76ae4c41be3fee5d", "score": "0.599906", "text": "public function action_show()\n\t{\n\t\t$id = Coder::instance()->short_url($this->request->param('id'), TRUE);\n\n\t\tif (is_numeric($id) === FALSE)\n\t\t{\n\t\t\tHTTP::redirect(Route::get('default')->uri());\n\t\t}\n\t\t\n\t\t$user = ORM::factory('User', $id);\n\t\t$manager = Manager::factory('User', $user);\n\t\t\n\t\t$manager->show();\n\n\t\t$this->view_container = $manager->get_views_result('container');\n\t\t$this->view_content = $manager->get_views_result('content');\n\t}", "title": "" }, { "docid": "9a28e42aa633511a42cb70db3b7fcc26", "score": "0.5987157", "text": "public function show($id)\n\t{\n\t\ttry {\n\t\t if ( \\Auth::check() && \\Auth::user()->hasPaid() )\n {\n $resource = \\Resource::find($id);\n $path_to_image = app('path.protected_images') .'/'.$resource->image;\n //Read image path, convert to base64 encoding\n $imgData = base64_encode(file_get_contents($path_to_image));\n //Format the image SRC: data:{mime};base64,{data};\n $src = 'data: '.mime_content_type($path_to_image).';base64,'.$imgData;\n\n return \\View::make('resources.view')->with([\n 'resource' => $resource,\n 'img' => $src\n ]);\n\n } else {\n\n \\App::abort(404);\n }\n\n } catch (\\Exception $e) {\n\n \\Log::warning( $e->getMessage() );\n }\n\t}", "title": "" }, { "docid": "41ab5aeaf4ec45d330f185763e2d3cee", "score": "0.59671307", "text": "public function show()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "66bedfeb611b91813c98a7e106a95902", "score": "0.5966385", "text": "private function displayImageResource($image) {\n if($image) {\n if($image->getExtension() == 'jpg' || $image->getExtension() == 'jpeg') {\n header('Content-Type: image/jpeg');\n imagejpeg($image->getResource(), null, 100);\n }\n else if($image->getExtension() == 'png') {\n header('Content-Type: image/png');\n imagepng($image->getResource(), null, 9);\n }\n else if($image->getExtension() == 'gif') {\n header('Content-Type: image/gif');\n imagegif($image->getResource(), null, 100);\n }\n }\n }", "title": "" }, { "docid": "df778faf9f0b4d88cab1a7ccf83e7502", "score": "0.59105337", "text": "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n $url = $em->getRepository('KtIoWebInterfaceBundle:Url')->find($id);\n\n if (!$url)\n throw $this->createNotFoundException();\n\n // TODO check we own this url\n return $this->render(\n 'KtIoWebInterfaceBundle:Url:show.html.twig',\n array('url' => $url)\n );\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.5908002", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "ecdc5dd9611d1734404c92d923029a39", "score": "0.5884191", "text": "public function show($id)\n {\n echo self::routeNamed();\n }", "title": "" }, { "docid": "461e196dfe64422deb4a744c50eb5d8d", "score": "0.5882105", "text": "public function show($id) {\n //view/edit page referred to as one entity in spec\n }", "title": "" }, { "docid": "f004693e692e26b7ab9f8de37189afc1", "score": "0.5872262", "text": "private function displayResources()\n\t\t{\n\t\t\t$html = '';\n\t\t\t$html .= '<div class=\"resources\" >'.\"\\n\";\n\t\t\t$html .= '\t<h4>Resources ~ '.$this->challenge['challengeResourceHeading'].'</h4>'.\"\\n\";\n\t\t\tforeach($this->resources as $resource)\n\t\t\t{\n\t\t\t\t$html .= '\t<p class=\"resource-link\"><a href=\"http://'.$resource['resourceLink'].'\">'.$resource['resourceTitle'].'</a></p>'.\"\\n\";\n\t\t\t}\n\t\t\n\t\t\treturn $html;\n\t\t}", "title": "" }, { "docid": "4294ddbd744676190ac0b1e7d92632e0", "score": "0.5867885", "text": "public function show() {\r\n echo $this->init()->getView();\r\n }", "title": "" }, { "docid": "d138cb59b6d8df8768f135975e4445ad", "score": "0.5845176", "text": "public function show()\n\t{\n\t\t//\n\n\t}", "title": "" }, { "docid": "ad2fe33fedb796826d1b96c32859495c", "score": "0.58396536", "text": "public function resourceDesktop()\n {\n $resourceTypes = $this->em->getRepository('ClarolineCoreBundle:Resource\\ResourceType')->findAll();\n\n return $this->templating->render(\n 'ClarolineCoreBundle:Tool\\desktop\\resource_manager:resources.html.twig',\n array('resourceTypes' => $resourceTypes, 'maxPostSize' => ini_get('post_max_size'))\n );\n }", "title": "" }, { "docid": "6e1ccfc29048f24d0efc88d6b8257171", "score": "0.5813761", "text": "public function show($name)\n\t{\n\t\t//\n\n\t}", "title": "" }, { "docid": "2f33e89741ba0a19b898dc9a1f9026fc", "score": "0.5811081", "text": "public function showResource($value, bool $justOne = false);", "title": "" }, { "docid": "ef3fb32b359d85e91687f25572082d98", "score": "0.579869", "text": "public function display()\r\n {\r\n\r\n echo $this->get_display();\r\n\r\n }", "title": "" }, { "docid": "f7584132221ad89383b2964e2bd53fe5", "score": "0.57928157", "text": "public function show(Request $request, $id)\n {\n \n if($request->session()->exists('resources') && isset($request->session()->get('resources')[$id])){\n $resource = $request->session()->get('resources')[$id];\n \n $data = [];\n $data['resource']= $resource;\n return view('resource.show', $data);\n }\n return redirect('resource');\n }", "title": "" }, { "docid": "e871bf67c885c4b595a1f5cc980d032e", "score": "0.5791212", "text": "public function show()\n {\n \n \n }", "title": "" }, { "docid": "7dd625db5c11766539ede97b10e391c8", "score": "0.57882935", "text": "public function viewAction($resourceId)\n {\n try {\n // Call to the resource service to get the resource\n $resourceResource = $this->get(\n 'asker.exercise.exercise_resource'\n )->getContentFullResource($resourceId, $this->getUserId());\n\n return new ApiGotResponse($resourceResource, array(\"details\", 'Default'));\n\n } catch (NonExistingObjectException $neoe) {\n throw new ApiNotFoundException(ResourceResource::RESOURCE_NAME);\n }\n }", "title": "" }, { "docid": "59b26eccbeb80415b27d312ada1ffed8", "score": "0.57857597", "text": "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "title": "" }, { "docid": "ea3e059853b58df5488fa70a7fd54c3b", "score": "0.57813525", "text": "protected function addResourceShow($name, $base, $controller)\n {\n $uri = $this->getResourceUri($name) . '/{' . $base . '}';\n return $this->get($uri, $this->getResourceAction($name, $controller, 'show'));\n }", "title": "" }, { "docid": "b5cf19a61f4df8b352f4c5245148ed8c", "score": "0.5778931", "text": "public function show()\n\t{\n\t\t// Set user states\n\t\t$this->setUserStates();\n\n\t\t// Set pagination\n\t\t$this->setPagination();\n\n\t\t// Set rows\n\t\t$this->setRows();\n\n\t\t// Set filters\n\t\t$this->setFilters();\n\n\t\t// Set toolbar\n\t\t$this->setToolbar();\n\n\t\t// Set menu\n\t\t$this->setMenu();\n\n\t\t// Set Actions\n\t\t$this->setListActions();\n\n\t\t// Render\n\t\t$this->render();\n\t}", "title": "" }, { "docid": "39114f16312ac4920577af8887aaf740", "score": "0.5777252", "text": "public function display()\r\n {\r\n echo $this->fetch();\r\n }", "title": "" }, { "docid": "4be578329f20a5696732db0fd60d5d80", "score": "0.57720363", "text": "public function executeShow()\n {\n $this->headline = HeadlinePeer::getHeadlineFromStripTitle($this->getRequestParameter('headlinestriptitle'));\n $this->forward404Unless($this->headline);\n }", "title": "" }, { "docid": "fcc9864a64202f3261f4537601857f07", "score": "0.5771861", "text": "public function show($nombre, $resourceType, $resourceName)\n {\n //gets the resource\n switch ($resourceType) {\n case (\"manga\"):\n $resource = Manga::where(\"name\", $resourceName)->first();\n break;\n case (\"novel\");\n $resource = Novel::where(\"name\", $resourceName)->first();\n break;\n default:\n abort(404);\n break;\n }\n //gets the comments for the resource\n $commentsFound = $resource->comments()->get();\n $commented = !is_null(Auth::user()->comments()->where(\"commentable_id\", $resource->id)->first());\n //creates a register of the interaction\n $resource->users()->attach(Auth::user());\n return view(\"user.show\", compact(\"resource\", \"commentsFound\", \"commented\", \"resourceType\"));\n }", "title": "" }, { "docid": "a3e57330d7cd59896b945f16d0e12a89", "score": "0.57604754", "text": "public function display()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "a3e57330d7cd59896b945f16d0e12a89", "score": "0.57604754", "text": "public function display()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "f18ebc5f8b08ddef340fa4f0d3eeea2f", "score": "0.5754774", "text": "public static function show() {\n\t\treturn static::$instance->display();\n\t}", "title": "" }, { "docid": "e3b51ebfe04703c114ab39fc729ba43b", "score": "0.57525647", "text": "public function show(Entry $entry)\n {\n //\n }", "title": "" }, { "docid": "e6492f335ada5179a4fe15779fa54555", "score": "0.57495135", "text": "public function show($id)\n\t{\n\t\t//\t\n\t}", "title": "" }, { "docid": "fd30d754eb9c55abae27d57dff32abdc", "score": "0.573772", "text": "public function resourcethumbnailAction()\r\n {\r\n $request = $this->getRequest();\r\n $response = $this->getResponse();\r\n\r\n $id = (int) $request->getQuery('id');\r\n $w = (int) $request->getQuery('w');\r\n $h = (int) $request->getQuery('h');\r\n $hash = $request->getQuery('hash');\r\n\r\n $realHash = DatabaseObject_ResourceImage::GetImageHash($id, $w, $h);\r\n\r\n // disable autorendering since we're outputting an image\r\n $this->_helper->viewRenderer->setNoRender();\r\n\r\n $image = new DatabaseObject_ResourceImage($this->db);\r\n if ($hash != $realHash || !$image->load($id)) {\r\n // image not found\r\n $response->setHttpResponseCode(404);\r\n return;\r\n }\r\n\r\n try {\r\n $fullpath = $image->createResourceThumbnail($w, $h);\r\n }\r\n catch (Exception $ex) {\r\n $fullpath = $image->getFullPath();\r\n }\r\n\r\n $info = getImageSize($fullpath);\r\n\r\n $response->setHeader('content-type', $info['mime']);\r\n $response->setHeader('content-length', filesize($fullpath));\r\n echo file_get_contents($fullpath);\r\n }", "title": "" }, { "docid": "20397e06b8673db8692c5f84120c3011", "score": "0.5729069", "text": "public function show()\n\t{\n\n\t}", "title": "" }, { "docid": "a7cd1d7ce30dda2ea0273ce031cff516", "score": "0.57275295", "text": "public function displayReferenceAction()\n {\n \t$reference_id = Extended\\reference_request::displayReference( Auth_UserAdapter::getIdentity ()->getId (), $this->getRequest()->getparam('reference_req_id'), \\Extended\\feedback_requests::VISIBILITY_CRITERIA_DISPLAYED);\n \tif($reference_id)\n \t{\n \t\n \t\t$this->view->reference_visible=$reference_id;\n \t\techo Zend_Json::encode( 1 );\n \t}\n \tdie;\n }", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.57214445", "text": "public function show($id) {}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.57214445", "text": "public function show($id) {}", "title": "" }, { "docid": "8f565ce0db5c2b58c1bd4bea7cb05683", "score": "0.57205963", "text": "public function showAction(Ressource $ressource, SessionConcours $session = null)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'session' => $session,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "cfff8a1202fcfae7e44ab0c4fb351586", "score": "0.5710935", "text": "public function showAction()\n {\n $em = $this->getDoctrine()->getManager();\n $id = $_GET['id'];\n $entity = $em->getRepository('BackendBundle:Concepto')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Concepto entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BackendBundle:Concepto:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.5710076", "text": "public abstract function display();", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.5710076", "text": "public abstract function display();", "title": "" }, { "docid": "560ae0fd472bad5f1d21beeed5dfbbdd", "score": "0.57056946", "text": "public function show(){}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5705454", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5705454", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5705454", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5705454", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "b19fae7378b33f825e4ee1e7d8aef94a", "score": "0.5703133", "text": "public function display($templateName=null)\n {\n echo $this->get($templateName);\n }", "title": "" }, { "docid": "7b283ba1c0546a155efc95a44dd0f9cf", "score": "0.56997055", "text": "public function show(Response $response)\n {\n //\n }", "title": "" }, { "docid": "0465b5fe008a3153a8a032fca67abfed", "score": "0.56978554", "text": "public function show() { }", "title": "" }, { "docid": "5df2376bef8dd69621a6ce7e2afd0bf4", "score": "0.56882185", "text": "abstract public function show($id);", "title": "" }, { "docid": "5df2376bef8dd69621a6ce7e2afd0bf4", "score": "0.56882185", "text": "abstract public function show($id);", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
173aa5ccf67322b4344df63207c2b95b
Function: slice ============================================================================= This is really just an alias for substring for completeness sake Parameters: $string The input string. Must be one character or longer. $start The starting point of the extraction. $end The ending point of the extraction. Returns: string
[ { "docid": "9f61bacb61a131ae94d95a990df2add1", "score": "0.8740212", "text": "function slice($string, $start, $end = null)\n{\n\treturn subString($string, $start, $end);\n}", "title": "" } ]
[ { "docid": "2879c5243691749a8b31bbb138d0b574", "score": "0.8267355", "text": "function substring($str, $start, $end) {\n return substr($str, $start, $end - $start);\n}", "title": "" }, { "docid": "c74626b22e5348b68e21aac177e0e53c", "score": "0.80990756", "text": "function subString($string, $start, $end = null)\n{\n\tif(empty($end))\n\t{\n\t\treturn substr($string, $start);\n\t}\n\telse\n\t{\n\t\treturn substr($string, $start, ($end - $start));\n\t}\n}", "title": "" }, { "docid": "3f83380e2a335dbecf4dab0effb29250", "score": "0.7990771", "text": "function extractString($string, $start, $end) {\n $string = \" \".$string;\n $ini = strpos($string, $start);\n if ($ini == 0) return \"\";\n $ini += strlen($start);\n $len = strpos($string, $end, $ini) - $ini;\n return substr($string, $ini, $len);\n}", "title": "" }, { "docid": "90099d7a9f649296ece2dba745b1fe07", "score": "0.7707049", "text": "public static function slice(string $string, int $start, $end = null, $encoding = null) : string\n {\n if ($end === null) {\n $length = static::length($string, $encoding);\n } elseif ($end >= 0 && $end <= $start) {\n return $string;\n } elseif ($end < 0) {\n $length = static::length($string, $encoding) + $end - $start;\n } else {\n $length = $end - $start;\n }\n return static::sub($string, $start, $length, $encoding);\n }", "title": "" }, { "docid": "c89bb042ed1966aaebc06a21158eebb8", "score": "0.7673663", "text": "function str_slice() {\n $args = func_get_args();\n switch (count($args)) {\n case 1:\n return $args[0];\n case 2:\n $str = $args[0];\n $str_length = strlen($str);\n $start = $args[1];\n if ($start < 0) {\n if ($start >= - $str_length) {\n $start = $str_length - abs($start);\n } else {\n $start = 0;\n }\n }\n else if ($start >= $str_length) {\n $start = $str_length;\n }\n $length = $str_length - $start;\n return substr($str, $start, $length);\n case 3:\n $str = $args[0];\n $str_length = strlen($str);\n $start = $args[1];\n $end = $args[2];\n if ($start >= $str_length) {\n return \"\";\n }\n if ($start < 0) {\n if ($start < - $str_length) {\n $start = 0;\n } else {\n $start = $str_length - abs($start);\n }\n }\n if ($end <= $start) {\n return \"\";\n }\n if ($end > $str_length) {\n $end = $str_length;\n }\n $length = $end - $start;\n return substr($str, $start, $length);\n }\n return null;\n}", "title": "" }, { "docid": "cd1949c0a7d77547b6814c32102e4968", "score": "0.76657265", "text": "private function getStringBetween($string, $start, $end){\n if(strlen($string) == 0) {\n return \"\";\n }\n $string = ' ' . $string;\n $ini = strpos($string, $start);\n if ($ini == 0) return '';\n $ini += strlen($start);\n $len = strpos($string, $end, $ini) - $ini;\n return substr($string, $ini, $len);\n }", "title": "" }, { "docid": "715c537d6d45066273424b9c82c9714f", "score": "0.76438767", "text": "public static function slice(string $str, int $start, int $end = null): string\n {\n return (string)BaseStringy::create($str)->slice($start, $end);\n }", "title": "" }, { "docid": "344c42404046cf511512bc9e57e0dd25", "score": "0.76388305", "text": "public static function getStringBetween($string, $start, $end)\n {\n $string = ' '.$string;\n $ini = strpos($string, $start);\n if ($ini == 0) {\n return '';\n }\n $ini += strlen($start);\n $len = strpos($string, $end, $ini) - $ini;\n\n return substr($string, $ini, $len);\n }", "title": "" }, { "docid": "5cb64cca9efff9d05561b15e6cd949a5", "score": "0.7630969", "text": "static function GetStringBetween($string, $start, $end){\n $string = ' ' . $string;\n $ini = strpos($string, $start);\n if ($ini == 0) return '';\n $ini += strlen($start);\n $len = strpos($string, $end, $ini) - $ini;\n return substr($string, $ini, $len);\n }", "title": "" }, { "docid": "a7fecef803418fbeb3d5244625441ca1", "score": "0.7609453", "text": "private function getInnerStr($string, $start, $end){\n $string = ' ' . $string;\n $ini = strpos($string, $start);\n if ($ini == 0) \n return '';\n $ini += strlen($start);\n $len = strpos($string, $end, $ini) - $ini;\n return substr($string, $ini, $len);\n }", "title": "" }, { "docid": "a04d8ff9233ba30e43e71d4470d6e48b", "score": "0.76006806", "text": "public static function get_string_between($string, $start, $end){\n $string = ' ' . $string;\n $ini = strpos($string, $start);\n if ($ini == 0) return '';\n $ini += strlen($start);\n $len = strpos($string, $end, $ini) - $ini;\n return substr($string, $ini, $len);\n }", "title": "" }, { "docid": "e90b02b4ea938365b220a45077fbf091", "score": "0.7598426", "text": "function getStringBetween($string, $start, $end){\n\t\t$string = ' ' . $string;\n\t\t$ini = strpos($string, $start);\n\t\tif ($ini == 0) return '';\n\t\t$ini += strlen($start);\n\t\t$len = strpos($string, $end, $ini) - $ini;\n\t\treturn substr($string, $ini, $len);\n\t}", "title": "" }, { "docid": "2a0b9da64e7db861a035703dfd3ad6ba", "score": "0.7597334", "text": "public static function get_string_between($string, $start, $end)\n {\n $string = ' ' . $string;\n $ini = strpos($string, $start);\n if ($ini === 0) {\n return '';\n }\n $ini += strlen($start);\n $len = strpos($string, $end, $ini) - $ini;\n\n return substr($string, $ini, $len);\n }", "title": "" }, { "docid": "cbbb05da561287413a6c39eab4b64b85", "score": "0.7586014", "text": "public function substring($input, $start, $length = null);", "title": "" }, { "docid": "8227e4f4f820f5e023f5e0349d9ebde9", "score": "0.75731045", "text": "public static function between($string, $start, $end)\n {\n $startpos = strpos($string, $start);\n $endpos = strpos($string, $end, $startpos);\n \n if ($startpos === false || $endpos === false) {\n return \"\";\n }\n\n $startpos += strlen($start);\n $endpos -= $startpos;\n return substr($string, $startpos, $endpos);\n }", "title": "" }, { "docid": "5305a84fb1cf1a52952ee95c491d188f", "score": "0.756691", "text": "function str_cut_out($string, $str_start, $str_end)\n{\n\t$return = false;\n\n\tif( ( strlen($string) > 0 ) &&\n\t\t( strlen($str_start) > 0 ) &&\n\t\t( strlen($str_end) > 0 ) )\t\t\t\t\t\t\t\t\t\t\t\t//simple and short param-validation\n\t{\n\t\t$pos_start = stripos($string, $str_start);\t\t\t\t\t\t\t\t//try to find position of str_start\n\n\t\tif( ( $pos_start !== false ) )\t\t\t\t\t\t\t\t\t\t\t//string found? Attention \"==\" means, \"0\" is also false\n\t\t{\n\t\t\t$pos_start += strlen($str_start);\n\t\t\t$pos_end = stripos($string, $str_end, $pos_start);\n\t\t\tif( ( $pos_end > $pos_start ) )\t\t\t\t\t\t\t\t\t\t//only return when content between str_start and str_end is available\n\t\t\t{\n\t\t\t\t$return = substr($string, $pos_start, ( $pos_end - $pos_start ));\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $return;\n}", "title": "" }, { "docid": "6d4397aa1c3ca74844399d6d29eceb95", "score": "0.75176096", "text": "function ExtractString($str, $start, $end)\n{\n $str_low = $str;\n $pos_start = strpos($str_low, $start);\n $pos_end = strpos($str_low, $end, ($pos_start + strlen($start)));\n if ( ($pos_start !== false) && ($pos_end !== false) )\n {\n\t$pos1 = $pos_start + strlen($start);\n\t$pos2 = $pos_end - $pos1;\n\treturn substr($str, $pos1, $pos2);\n }\n}", "title": "" }, { "docid": "525967457214800258bf2fc2e0be7b3f", "score": "0.75159335", "text": "function find($start,$end,$string)\n\t{\n\t\t$startlength = strpos($string,$start)+strlen($start);\n\t\t$endlength = strpos($string,$end)-strlen($end);\n\t\t$finallength = $endlength - $startlength;\n\t\t$final = substr($string,$startlength,$finallength-3);\n\t\treturn $final;\n\t}", "title": "" }, { "docid": "58a7e9abe3d7a57588b4ae9a376087c6", "score": "0.7509904", "text": "public function substr($string, $start, $length = null);", "title": "" }, { "docid": "526d8786798928a89fedacbe64b346bc", "score": "0.7438259", "text": "function get_string_between($start, $end, $string) {\n\t$string = ' ' . $string;\n\t$ini = strpos($string, $start);\n\tif ($ini == 0) {\n\t\treturn '';\n\t}\n\t$ini += strlen($start);\n\t$len = strpos($string, $end, $ini) - $ini;\n\treturn substr($string, $ini, $len);\n}", "title": "" }, { "docid": "7c4217ec93cb528fe43f054a8949a214", "score": "0.74269456", "text": "function get_string_between($string, $start, $end){\n $string = ' ' . $string;\n $ini = strpos($string, $start);\n \n if ($ini == 0) \n {\n return '';\n }\n \n $ini += strlen($start);\n $len = strpos($string, $end, $ini) - $ini;\n return substr($string, $ini, $len);\n }", "title": "" }, { "docid": "a3fd25c4213bd8cbb40d420170d5bb31", "score": "0.7387085", "text": "protected static function substring($string, $startpos, $endpos = -1) {\r\n $len = strlen($string);\r\n $endpos = (int) (($endpos === -1) ? $len-1 : $endpos);\r\n if ($startpos > $len-1 || $startpos < 0) {\r\n trigger_error(\"substring(), Startindex out of bounds must be 0<n<$len\", E_USER_ERROR);\r\n }\r\n if ($endpos > $len-1 || $endpos < $startpos) {\r\n trigger_error(\"substring(), Endindex out of bounds must be $startpos<n<\".($len-1), E_USER_ERROR);\r\n }\r\n if ($startpos === $endpos) {\r\n return (string) $string{$startpos};\r\n } else {\r\n $len = $endpos-$startpos;\r\n }\r\n return substr($string, $startpos, $len+1);\r\n }", "title": "" }, { "docid": "c3cbb771134282d112665f11a7cb6eef", "score": "0.7383956", "text": "public static function sub($string, $start = 0, $length = null)\n {\n if ($length == null) {\n $length = strlen($string);\n }\n\n return substr($string, $start, $length);\n }", "title": "" }, { "docid": "b41e4223055388b3c67d556b23888547", "score": "0.7345925", "text": "function get_string_between($string, $start, $end)\n{\n $string = ' ' . $string;\n $ini = strpos($string, $start);\n if ($ini == 0) {\n return '';\n }\n $ini += strlen($start);\n $len = strpos($string, $end, $ini) - $ini;\n\n return substr($string, $ini, $len);\n}", "title": "" }, { "docid": "1cd1d806827c2770ad52807d65c10920", "score": "0.73344135", "text": "function string_between($string, $start, $end)\n {\n $string = ' '.$string;\n $ini = strpos($string, $start);\n if ($ini == 0) {\n return '';\n }\n\n $ini += strlen($start);\n $len = strpos($string, $end, $ini) - $ini;\n\n return substr($string, $ini, $len);\n }", "title": "" }, { "docid": "34a17f72303132cf48f2d217d64d6752", "score": "0.7325057", "text": "function get_string_between($string, $start, $end){\n\t $string = \" \".$string;\n\t $ini = strpos($string,$start);\n\t if ($ini == 0) return \"\";\n\t $ini += strlen($start); \n\t $len = strpos($string,$end,$ini) - $ini;\n\t return substr($string,$ini,$len);\n\t}", "title": "" }, { "docid": "a927cf1400ba85c0a6f480dac4e5487b", "score": "0.7301678", "text": "function get_string_between($string, $start, $end){\n $string = ' ' . $string;\n $ini = strpos($string, $start);\n if ($ini == 0) return '';\n $ini += strlen($start);\n $len = strpos($string, $end, $ini) - $ini;\n return substr($string, $ini, $len);\n}", "title": "" }, { "docid": "913ecb8c5de1facce20917280f751a40", "score": "0.72900563", "text": "function utf8Substring($string, $start, $length)\n {\n return MyOOS_CoreApi::utf8Substring($string, $start, $length);\n }", "title": "" }, { "docid": "9578de812d338bd2fb358513f3329322", "score": "0.7249712", "text": "public static function substr($string, $start, $length = 0)\n\t{\n\t\t$ent_arr = preg_split('~(&#' . ('021') . ';|&quot;|&amp;|&lt;|&gt;|&nbsp;|.)~u', $string, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);\n\t\treturn $length == 0 ? implode('', array_slice($ent_arr, $start)) : implode('', array_slice($ent_arr, $start, $length));\n\t}", "title": "" }, { "docid": "8b2ad6f24106d1d48cb5d02117077b6b", "score": "0.7214128", "text": "function get_between($string, $start, $end)\n{\n $string = \" \".$string;\n $ini = strpos($string, $start);\n if ($ini == 0) {\n return \"\";\n }\n $ini += strlen($start);\n $len = strpos($string, $end, $ini) - $ini;\n\n return substr($string, $ini, $len);\n}", "title": "" }, { "docid": "c8ecda23ed0125d52b4bbd2f1f8789db", "score": "0.7148792", "text": "function getStr($string, $start, $end)\n{\n $str = explode($start, $string);\n $str = explode($end, ($str[1]));\n return $str[0];\n}", "title": "" }, { "docid": "c2dbdc3c6b473198126285dbabd8ebbf", "score": "0.70786977", "text": "function search_string_between($string, $start, $end) {\n\t\t$string = ' ' . $string;\n\t\t$ini = strpos($string, $start);\n\t\tif ($ini == 0) return '';\n\t\t$ini += strlen($start);\n\t\t$len = strpos($string, $end, $ini) - $ini;\n\t\treturn substr($string, $ini, $len);\n\t}", "title": "" }, { "docid": "c1fec6d85254c2314bebe8959eb1cdf1", "score": "0.70681715", "text": "static public function sub($string, $start, $length=NULL)\r\n\t{\r\n\t\tif (self::$mbstring_available === NULL) {\r\n\t\t\tself::checkMbString();\r\n\t\t}\r\n\r\n\t\tif (self::$mbstring_available) {\r\n\t\t\t$str_len = mb_strlen($string, 'UTF-8');\r\n\t\t\tif (abs($start) > $str_len) {\r\n\t\t\t\treturn FALSE;\r\n\t\t\t}\r\n\t\t\tif ($length === NULL) {\r\n\t\t\t\tif ($start >= 0) {\r\n\t\t\t\t\t$length = $str_len-$start;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$length = abs($start);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn mb_substr($string, $start, $length, 'UTF-8');\r\n\t\t}\r\n\r\n\t\t// We get better performance falling back for ASCII strings\r\n\t\tif (!self::detect($string)) {\r\n\t\t\tif ($length === NULL) {\r\n\t\t\t\tif ($start >= 0) {\r\n\t\t\t\t\t$length = strlen($string)-$start;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$length = abs($start);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn substr($string, $start, $length);\r\n\t\t}\r\n\r\n\r\n\t\t// This is the slowest version\r\n\t\t$str_len = strlen(utf8_decode($string));\r\n\r\n\t\tif (abs($start) > $str_len) {\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\r\n\t\t// Optimize looking by changing to negative start positions if the\r\n\t\t// start is in the second half of the string\r\n\t\tif ($start > $str_len/2) {\r\n\t\t\t$start = 0-($str_len-$start);\r\n\t\t}\r\n\r\n\t\t// Substrings to the end of the string are pretty simple\r\n\t\t$start = self::convertOffsetToBytes($string, $start);\r\n\t\t$string = substr($string, $start);\r\n\r\n\t\tif ($length === NULL) {\r\n\t\t\treturn $string;\r\n\t\t}\r\n\r\n\t\t$length = self::convertOffsetToBytes($string, $length);\r\n\t\treturn substr($string, 0, $length);\r\n\t}", "title": "" }, { "docid": "b353a7c7b5460ba31a97e2c872cd337a", "score": "0.7053805", "text": "function search_string_between($string, $start, $end) {\n\t\t$string = ' ' . $string;\n\t\t$ini = strpos($string, $start);\n\t\tif ($ini == 0) return '';\n\t\t$ini += strlen($start);\n\t\t$len = strpos($string, $end, $ini) - $ini;\n\t\treturn substr($string, $ini, $len);\n }", "title": "" }, { "docid": "9b6d31163a9fe497f95757ed658d5c35", "score": "0.70018107", "text": "public static function safeSubstr($string, $start = 0, $length = null)\n {\n if (\\function_exists('mb_substr')) {\n return \\mb_substr($string, $start, $length, '8bit');\n } elseif ($length !== null) {\n return \\substr($string, $start, $length);\n }\n return \\substr($string, $start);\n }", "title": "" }, { "docid": "c0483fd2ea74cd26117d9e215f5f7627", "score": "0.6946733", "text": "public static function substring(string $string, int $start, int $length, string $encoding = 'UTF-8'): string {\n\t\tif ($encoding === '') {\n\t\t\t$encoding = mb_internal_encoding();\n\t\t}\n\t\treturn mb_substr($string, $start, $length, $encoding);\n\t}", "title": "" }, { "docid": "9bc7d43f2fa910373bed8355f5ccf467", "score": "0.69384146", "text": "function substring($start, $end = NULL) {\n return $this->substr($start, ($end !== NULL) ? $end-$start : 0xFFFFFFF);\n }", "title": "" }, { "docid": "6d13ea1d4fce968a4d37d9f4cabf43ff", "score": "0.6934349", "text": "function substring_between($haystack,$start,$end) \n{\n\tif (strpos($haystack,$start) === false || strpos($haystack,$end) === false) \n\t{\n\t\treturn false;\n\t} \n\telse \n\t{\n\t\t$start_position = strpos($haystack,$start)+strlen($start);\n\t\t$end_position = strpos($haystack,$end);\n\t\treturn substr($haystack,$start_position,$end_position-$start_position);\n\t}\n}", "title": "" }, { "docid": "2f9ae416dbf7cf33d70b9cdef2d3fd1b", "score": "0.68718666", "text": "public static function sub(string $string, int $start, $length = null, $encoding = null) : string\n {\n $encoding = $encoding ?? static::getEncoding();\n return mb_substr($string, $start, $length, $encoding);\n }", "title": "" }, { "docid": "4c3caaecf0da0cdc0da92c3a88c58303", "score": "0.68577", "text": "public static function substr(string $string, int $start, int $length) : string {\n\n\t\t\treturn (function_exists('mb_substr') ? 'mb_substr' : 'substr')($string, $start, $length);\n\t\t}", "title": "" }, { "docid": "0cc981dabc7e867042a051aa56446d08", "score": "0.6821067", "text": "public static function substr($string, $start, $length = null) {\n\t\tif ($start === 0 && $length === null) {\n\t\t\treturn $string;\n\t\t}\n\n\t\t$string = Multibyte::utf8($string);\n\n\t\tfor ($i = 1; $i <= $start; $i++) {\n\t\t\tunset($string[$i - 1]);\n\t\t}\n\n\t\tif ($length === null || count($string) < $length) {\n\t\t\treturn Multibyte::ascii($string);\n\t\t}\n\t\t$string = array_values($string);\n\n\t\t$value = array();\n\t\tfor ($i = 0; $i < $length; $i++) {\n\t\t\t$value[] = $string[$i];\n\t\t}\n\t\treturn Multibyte::ascii($value);\n\t}", "title": "" }, { "docid": "8a62cd637d30731b7487e42255dd0000", "score": "0.68133616", "text": "function str_between(string $input, string $start, string $end): string{\n $p1 = (int) mb_strpos($input, $start);\n $p2 = (int) mb_strpos($input, $end);\n $substr = mb_substr($input, mb_strlen($start) + $p1, (mb_strlen($input) - $p2) * (-1));\n return $substr;\n}", "title": "" }, { "docid": "6432c8d58f61a927d6a60adceba8c8a2", "score": "0.6790673", "text": "function mzz_substr($str, $start, $length = null)\n{\n return $GLOBALS['charsetDriver']->substr($str, $start, $length);\n}", "title": "" }, { "docid": "5119c78d9f06a26b166af4060241028c", "score": "0.67889947", "text": "public function sqlFunctionSubstring($string, $from, $length) {\n return substr($string, $from - 1, $length);\n }", "title": "" }, { "docid": "39ef2dba5a8b011a1111af724d02b6ae", "score": "0.67708313", "text": "function OwnSubString($text, $start, $length) // text, 1, 2 => ex; beatka , 2 , 2 => at\n\t{\n\t\t//echo $text[$start];\n\t\t//echo $text[$start+1];\n\t\t//echo $text[$start+2];\n\t\t$result = \"\";\n\t\t\n\t\tfor($i = $start; $i < $start + $length; $i++)\n\t\t{\n\t\t\t//echo 'idzie' . \"\\n\";\n\t\t\tif ($i >= $start && $i < $start + $length)\n\t\t\t{\n\t\t\t\t//echo $text[$i] . ' ' .$start . ' i: ' . $i . \" s + l : \".($start + $length). \"\\n\";\n\t\t\t}\n\n\t\t\t$result .= $text[$i];\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "39f74805157f3678a2802bf6b7fb2738", "score": "0.67665064", "text": "function slice(string $string, int $offset, ?int $length = null): string\n{\n Psl\\invariant(null === $length || $length >= 0, 'Expected a non-negative length.');\n $offset = Psl\\Internal\\validate_offset($offset, length($string));\n\n return null === $length ? substr($string, $offset) : substr($string, $offset, $length);\n}", "title": "" }, { "docid": "53613271596420ce2173d3fbb7a3572d", "score": "0.6749743", "text": "function findStringBetween($start, $end, $string)\n\t{\n\t\tpreg_match_all('/' . preg_quote($start, '/') . '([^\\.)]+)' . preg_quote($end, '/') . '/i', $string, $m);\n\n\t\treturn $m[1];\n\t}", "title": "" }, { "docid": "700d9f0089a0adba50d7e087e0441a08", "score": "0.6745964", "text": "public static function substr($str , $start , $length = null)\n\t{\n\t\t$f = utils::$func.\"substr\";\n\t\tif($length==null)\n\t\t\treturn $f($str,$start);\n\t\telse\n\t\t\treturn $f($str,$start,$length);\n\t}", "title": "" }, { "docid": "b8c7e2f99ce30e9a100b849e1996db93", "score": "0.66734916", "text": "public function getStringBetween($sString, $sStart, $sEnd)\n\t{\n\t\t$sString = \" \" . $sString;\n\t\t$sTemp = strpos($sString, $sStart);\n\t\t\n\t\tif ($sTemp == 0){\n\t\t\treturn \"\";\n\t\t} \n\t\telse {\n\t\t\t$sTemp += strlen($sStart);\n\t\t\t$sLength = strpos($sString, $sEnd, $sTemp) - $sTemp;\n\t\t\treturn substr($sString, $sTemp, $sLength);\n\t\t}\n\t}", "title": "" }, { "docid": "6afac3a950ddd381d07ca7d32659a6dc", "score": "0.6585545", "text": "static function substr($str, $start, $length = -1) {\n\n if ($length == -1) {\n $length = self::strlen($str)-$start;\n }\n return mb_substr($str, $start, $length, \"UTF-8\");\n }", "title": "" }, { "docid": "d330bfa669fb51a4c71b511d5732c228", "score": "0.6562437", "text": "function studio_get_string_between( $string, $from, $to ) {\n\t$substring = substr($string, strpos( $string, $from ) + strlen( $from ), strlen( $string ));\n\treturn substr($substring, 0, strpos( $substring, $to ));\n}", "title": "" }, { "docid": "ef34498bb9cbf88e85a72821d3b7f43c", "score": "0.656024", "text": "public static function safeSubStr($str, $start, $length = false)\n {\n if (function_exists('mb_substr')\n && function_exists(\n 'mb_detect_encoding'\n )\n ) {\n $substr = mb_substr(\n $str, $start, $length, mb_detect_encoding($str)\n );\n }\n else {\n // iconv will return PHP notice if non-ascii characters are present in input string\n $str = iconv('ASCII', 'ASCII', $str);\n\n $substr = substr($str, $start, $length);\n }\n\n return $substr;\n }", "title": "" }, { "docid": "828c27e2b267668e70f80e61c926975c", "score": "0.6536233", "text": "public static function substr(string $string, int $start, int $length = null)\r\n {\r\n return mb_substr($string, $start, $length, 'UTF-8');\r\n }", "title": "" }, { "docid": "2511f9435f1cef3dca5f8aba58833ecf", "score": "0.64986575", "text": "public static function string($string, $start=0, $length=15)\n {\n $string = strip_tags($string);\n $string_length = strlen($string);\n\n if ($string_length > $length)\n {\n $corrected = mb_substr($string, $start, $length) . '...';\n }\n else\n {\n $corrected = $string;\n }\n\n return $corrected;\n }", "title": "" }, { "docid": "b217373ef242a2e810a63e862e7a7eea", "score": "0.6496566", "text": "public function subString($start, $length = null){\n if(is_string($start)){\n $start = stripos($this->string, $start);\n }\n if($length){\n return new Str(substr($this->string, $start, $length));\n }\n return new Str(substr($this->string, $start));\n }", "title": "" }, { "docid": "6626d43dc3bd518c9e850a768e200339", "score": "0.6473503", "text": "public static function substr($string, $start, $length = null)\n {\n return mb_substr($string, $start, $length, 'UTF-8');\n }", "title": "" }, { "docid": "b11a11f8930bbce6a26f5072cebb18c9", "score": "0.6461084", "text": "public function testSubstringOutOfRange($start, $end) {\n\t\t$str = new ByteArray(self::testStr);\n\t\t$this->setExpectedException(\"\\Scrivo\\SystemException\");\n\t\t$tmp = $str->substring($start, $end);\n\t}", "title": "" }, { "docid": "04b6410dd4e3b95aee5947a4f4cac35e", "score": "0.643373", "text": "static function getSubString($string, $prefix, $suffix) {\n $start = strpos($string, $prefix);\n if ($start === FALSE) {\n return $string;\n }\n\n $end = strpos($string, $suffix, $start);\n if ($end === FALSE) {\n return $string;\n }\n\n if ($start >= $end) {\n return $string;\n }\n\n return substr($string, $start, $end - $start + strlen($suffix));\n }", "title": "" }, { "docid": "ab558852193f3bcc8a42beaac4df53c1", "score": "0.6412203", "text": "function delete_all_between($beginning, $end, $string) {\n $beginningPos = strpos($string, $beginning);\n $endPos = strpos($string, $end);\n if ($beginningPos === false || $endPos === false) {\n return $string;\n }\n\n $textToDelete = substr($string, $beginningPos, ($endPos + strlen($end)) - $beginningPos);\n\n return str_replace($textToDelete, '', $string);\n}", "title": "" }, { "docid": "29c0ea639ef3d46c431bba3f6512723e", "score": "0.63806385", "text": "public static function substr(string $str, int $start, int $length = null): string\n {\n return (string)BaseStringy::create($str)->substr($start, $length);\n }", "title": "" }, { "docid": "34c8fe6a18784218decc4bba3be103d7", "score": "0.6379324", "text": "function TIE_substr($source, $start, $length){\n $substr = substr($source, $start, $length);\n if ($end = strpos($substr, chr(0))){\n $substr = substr($substr, 0, $end);\n }\n return $substr;\n}", "title": "" }, { "docid": "b38f200f492c517a9625d36e5d1b7e82", "score": "0.63626075", "text": "public static function getSubString($string, $prefix, $suffix, $including = true)\n {\n $start = strpos($string, $prefix);\n if ($start === false) {\n echo \"cannot find prefix, string:[$string], prefix[$prefix]\\n\";\n return $string;\n }\n\n $end = strpos($string, $suffix, $start);\n if ($end === false) {\n echo \"cannot find suffix [$suffix]\\n\";\n return $string;\n }\n\n if ($start >= $end) {\n return $string;\n }\n\n if ($including) {\n return substr($string, $start, $end - $start + strlen($suffix));\n } else {\n return substr($string, $start + strlen($prefix), $end - $start - strlen($prefix));\n }\n }", "title": "" }, { "docid": "395c408d10c9127627cb60b6d8ea6071", "score": "0.6299897", "text": "function str_end_remove(string $string, string $s_end): string {\n if (str_ends($string, $s_end)) {\n $end_l = mb_strlen($s_end);\n $str_l = mb_strlen($string);\n $pos = $str_l - $end_l;\n $out = mb_substr($string, 0, $pos);\n return $out;\n }\n return $string;\n}", "title": "" }, { "docid": "5ccf63b3bb05eda3ab128deac4aecabf", "score": "0.62870497", "text": "public static function byteSubstr($string, $start, $length = null)\n {\n return mb_substr($string, $start, $length === null ? mb_strlen($string, '8bit') : $length, '8bit');\n }", "title": "" }, { "docid": "e18d7ed2c2119f92ded23e9c552d09a0", "score": "0.6279024", "text": "public static function between(\n string $string,\n string $start,\n string $end,\n int $offset = 0,\n $encoding = null\n ) : string {\n $startIndex = static::index($string, $start, $offset, $encoding);\n $endIndex = static::index($string, $end, $startIndex ?? 0, $encoding);\n if ($startIndex === false || $endIndex === false) {\n return '';\n }\n $length = $startIndex + static::length($start, $encoding);\n return static::sub($string, $length, $endIndex - $length, $encoding);\n }", "title": "" }, { "docid": "6ca0fd4c7c3b38db4f6348117035094c", "score": "0.6261102", "text": "function getString($str, $start = 0, $length = null){\n\tif ($start || $length){\n\t\t$str = substr($str, $start, $length);\n\t}\n\t$end = strpos($str, chr(0),1);\n\tif ($end){\n\t\t$str = substr($str, 0, $end);\n\t}\n\treturn trim($str);\n}", "title": "" }, { "docid": "dc37cde07d778d2ae6a3aaa851ea0f7d", "score": "0.6172629", "text": "protected function getSlice($startPosition, $endPosition = 0)\n {\n if (!$endPosition) {\n $endPosition = strlen($this->tempDocumentMainPart);\n }\n\n return substr($this->tempDocumentMainPart, $startPosition, ($endPosition - $startPosition));\n }", "title": "" }, { "docid": "5f314f50552af6de222cfec10027b62c", "score": "0.612776", "text": "protected function scanUntil($string) {\n\t\t$anchor = $this->cursor;\n\t\twhile ($this->cursor < $this->length && strpos($string, $this->content{$this->cursor}) === false) {\n\t\t\t$this->cursor++;\n\t\t}\n\t\treturn substr($this->content, $anchor, $this->cursor - $anchor);\n\t}", "title": "" }, { "docid": "076c5b55296d541b47a023efaac295fb", "score": "0.6122003", "text": "public static function cutFromStart(string $string, int $count)\n {\n return substr($string, $count);\n }", "title": "" }, { "docid": "94ef22376cf4be02e9034531d1b970aa", "score": "0.6104649", "text": "function between($haystack, $start, $end, $include = false)\n{\n\t// This is what we will return\n\t$result = '';\n\t\n\t// Add a little buffer\n\t$haystack = ' '.$haystack;\n\t\n\t// Can we find the start?\n\t$ini = strpos($haystack, $start);\n\tif ($ini === false)\n\t{\n\t\t// Nope so return nothing\n\t\treturn '';\n\t}\n\n\t// Can we find the end?\n\tif (strpos($haystack, $end) === false)\n\t{\n\t\t// Nope so return nothing\n\t\treturn '';\n\t}\n\n\t// Move our position past the start point\n\t$ini += strlen($start);\n\t\n\t// Get the length of the middle section\n\t$len = strpos($haystack, $end, $ini) - $ini;\n\t\n\t// Grab the middle\n\t$result = substr($haystack, $ini, $len);\n\t\n\t// Do we want the start and end?\n\tif ($include)\n\t{\n\t\t$result = $start.$result.$end;\n\t}\n\t\n\t// Return the final result\n\treturn $result;\n}", "title": "" }, { "docid": "123d2cb6ba2c6e17bf5d83adc7725270", "score": "0.6091523", "text": "public function getSubString($string, $length=NULL)\n\t{\n if ($length == NULL)\n $length = 50;\n //Primero eliminamos las etiquetas html y luego cortamos el string\n $stringDisplay = substr(strip_tags($string), 0, $length);\n //Si el texto es mayor que la longitud se agrega puntos suspensivos\n if (strlen(strip_tags($string)) > $length)\n $stringDisplay .= ' ...';\n return $stringDisplay;\n}", "title": "" }, { "docid": "aecc48a4ca9c8b7693c1b9fd29eaf15d", "score": "0.6090836", "text": "function smart_substr($str, $start, $length, $trimmarker = '...') {\n // if the string is empty, let's get out ;-)\n if ($str == '') {\n return $str;\n }\n // reverse a string that is shortened with '' as trimmarker\n $reversed_string = strrev(xoops_substr($str, $start, $length, ''));\n // find first space in reversed string\n $position_of_space = strpos($reversed_string, \" \", 0);\n // truncate the original string to a length of $length\n // minus the position of the last space\n // plus the length of the $trimmarker\n $truncated_string = xoops_substr($str, $start, $length - $position_of_space +strlen($trimmarker), $trimmarker);\n return $truncated_string;\n}", "title": "" }, { "docid": "d2aae55b0e5e9f1a8f5f3011f3bb3f12", "score": "0.6089369", "text": "function substr($start = 0, $length = 0xFFFFFFF) {\n return mb_substr($this->s, $start, $length);\n }", "title": "" }, { "docid": "ccc55fb383886f0d568ac99c39a1d8e7", "score": "0.60518384", "text": "public static function trimSubstringStart( string $string, string $substring, $modifiers ) {\n\n // Set the default modifier to be multiline.\n $modifiers = func_num_args() > 3 ? $modifiers : 'm';\n\n // Trim the substring from the start of the string.\n return ltrim_substr($string, $substring, $modifiers);\n\n }", "title": "" }, { "docid": "00e20228ebd5e6c59aeae4376c9f352b", "score": "0.60173523", "text": "function cutstring($str){\n\t$lenstr = strlen($str);\n\t$str = substr($str,0,$lenstr - 1);\n\treturn $str;\n}", "title": "" }, { "docid": "8d354bcb4a9b77f438c245533059b892", "score": "0.59916604", "text": "public static function trimStart(string $str, string $start): string\n {\n return self::startsWith($str, $start)\n ? mb_substr($str, strlen($start))\n : $str;\n }", "title": "" }, { "docid": "0fc00ec7c144d5834418756820c4025b", "score": "0.5979306", "text": "static function upto( $str, $sub ) {\n\t\t$end = strpos( $str, $sub );\n\t\tif ( $end === false ) {\n\t\t\treturn $str;\n\t\t} else {\n\t\t\treturn substr( $str, 0, $end );\n\t\t}\n\t}", "title": "" }, { "docid": "853c5003ffc55b221c48dc286f92e24e", "score": "0.5951847", "text": "public function getSubString($string, $length=NULL){\n\n\t\t//Si no se especifica la longitud por defecto es 50\n\t\tif ($length == NULL)\n\t\t\t$length = 50;\n\t\t//Primero eliminamos las etiquetas html y luego cortamos el string\n\t\t$stringDisplay = substr(strip_tags($string), 0, $length);\n\t\t//Si el texto es mayor que la longitud se agrega puntos suspensivos\n\t\tif (strlen(strip_tags($string)) > $length)\n\t\t\t$stringDisplay .= ' ...';\n\n\n\t\treturn $stringDisplay;\n \t}", "title": "" }, { "docid": "8dfdcef31276103e82846fe24084c4de", "score": "0.5928257", "text": "public static function getSubString($string, $length=NULL)\n {\n if ($length == NULL)\n $length = 100;\n //Primero eliminamos las etiquetas html y luego cortamos el string\n $stringDisplay = substr(strip_tags($string), 0, $length);\n //Si el texto es mayor que la longitud se agrega puntos suspensivos\n if (strlen(strip_tags($string)) > $length)\n $stringDisplay .= ' ...';\n return $stringDisplay;\n }", "title": "" }, { "docid": "b9a8b45c18e04832136aab7d2fd0a1fe", "score": "0.5917211", "text": "function mb_substr($t, $start = 0, $end = 0, $encoding = 'UTF-8')\r\n\t{\r\n\t\t/* --enable-mbstring */\r\n\t\tif (function_exists('mb_substr'))\r\n\t\t{\r\n\t\t\treturn mb_substr($t, $start, $end, $encoding); /* hundred times faster, ~0.000382 */\r\n\t\t}\r\n\t\t$strD = '';\r\n\t\t$pos = $cntLetter = 0;\r\n\t\t$len = strlen($t);\r\n\t\tif ($end == 0)\r\n\t\t{\r\n\t\t\t$end = $len;\r\n\t\t}\r\n\t\twhile ($pos < $len)\r\n\t\t{\r\n\t\t\t$charAt = substr($t, $pos, 1);\r\n\t\t\t$asciiPos = ord($charAt);\r\n\t\t\t$isConcat = (($cntLetter >= $start) && ($cntLetter < ($start + $end))) ? 1 : 0;\r\n\t\t\tif (($asciiPos >= 240) && ($asciiPos <= 255))\r\n\t\t\t{\r\n\t\t\t\t$char2 = substr($t, $pos, 4);\r\n\t\t\t\t$strD .= ($isConcat) ? $char2 : '';\r\n\t\t\t\t$cntLetter++;\r\n\t\t\t\t$pos += 4;\r\n\t\t\t}\r\n\t\t\telseif (($asciiPos >= 224) && ($asciiPos <= 239))\r\n\t\t\t{\r\n\t\t\t\t$char2 = substr($t, $pos, 3);\r\n\t\t\t\t$strD .= ($isConcat) ? $char2 : '';\r\n\t\t\t\t$cntLetter++;\r\n\t\t\t\t$pos += 3;\r\n\t\t\t}\r\n\t\t\telseif (($asciiPos >= 192) && ($asciiPos <= 223))\r\n\t\t\t{\r\n\t\t\t\t$char2 = substr($t, $pos, 2);\r\n\t\t\t\t$strD .= ($isConcat) ? $char2 : '';\r\n\t\t\t\t$cntLetter++;\r\n\t\t\t\t$pos += 2;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$strD .= ($isConcat) ? $charAt : '';\r\n\t\t\t\t$cntLetter++;\r\n\t\t\t\t$pos++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $strD;\r\n\t}", "title": "" }, { "docid": "6153e8ccbd417b1364bc45e96819eec4", "score": "0.5900278", "text": "public static function trimSubstring( string $string, string $substring, $modifiers ) {\n\n // Set the default modifier to be multiline.\n $modifiers = func_num_args() > 3 ? $modifiers : 'm';\n\n // Trim the substring from the start of the string.\n return trim_substr($string, $substring, $modifiers);\n\n }", "title": "" }, { "docid": "b7394e545b0bdf173dd5b39c16379b7b", "score": "0.58733934", "text": "static public function getStrBetween($strText, $strStart, $strEnd, $intOffset = 0)\r\n {\r\n\t\t// Init var\r\n\t\t$Result = false;\r\n\t\t\r\n\t\t// Get position of limit start\r\n\t\t$intStart = strpos($strText, $strStart, $intOffset); \r\n\t\t\r\n\t\t// Check limit start exists\r\n\t\tif($intStart !== false)\r\n\t\t{\r\n\t\t\t// recalcul limit start\r\n\t\t\t$intStart = ($intStart + strlen($strStart));\r\n\t\t\t\r\n\t\t\t// Get position of limit end\r\n\t\t\t$intEnd = strpos($strText, $strEnd, $intStart); \r\n\t\t\t\r\n\t\t\t// Check limit end exists\r\n\t\t\tif($intEnd !== false)\r\n\t\t\t{\r\n\t\t\t\t// recalcul limit end\r\n\t\t\t\t$intEnd = ($intEnd - $intStart);\r\n\t\t\t\t\r\n\t\t\t\t// Get string between limits\r\n\t\t\t\t$Result = substr($strText, $intStart, $intEnd); \r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Return result\r\n\t\treturn $Result;\r\n }", "title": "" }, { "docid": "78cce3b68364b32d6ee6b7168d834b5a", "score": "0.586544", "text": "public static function trimSubstringEnd( string $string, string $substring, $modifiers ) {\n\n // Set the default modifier to be multiline.\n $modifiers = func_num_args() > 3 ? $modifiers : 'm';\n\n // Trim the substring from the end of the string.\n return rtrim_substr($string, $substring, $modifiers);\n\n }", "title": "" }, { "docid": "8cd5dce358755fb8443b66299dcf462c", "score": "0.5859485", "text": "function slice($offset, $length = 0);", "title": "" }, { "docid": "018e30f6668d82a7de7f22d65ac37610", "score": "0.585397", "text": "public function substring(int $begin, int $end = null) : self\n {\n return $this->substr($begin, $end ? $end - $begin + 1 : null);\n }", "title": "" }, { "docid": "1950a9f66566c606ffb8f486aec0a7e2", "score": "0.5849938", "text": "public function substr($var, int $start, /*?int*/ $length = null) : string\n {\n if ($start < 0) {\n throw new \\InvalidArgumentException('Arg start is not non-negative integer.');\n }\n if ($length !== null && (!is_int($length) || $length < 0)) {\n throw new \\InvalidArgumentException('Arg length is not non-negative integer or null.');\n }\n $v = '' . $var;\n if (!$length || $v === '') {\n return '';\n }\n if (static::$nativeSupport['mbstring']) {\n return !$length ? mb_substr($v, $start) : mb_substr($v, $start, $length);\n }\n\n // The actual algo (further down) only works when start is zero.\n if ($start > 0) {\n // Trim off chars before start.\n $v = substr($v,\n strlen(\n // Offsets multibyte string length.\n $this->substr($v, 0, $start)\n )\n );\n }\n // And the algo needs a length.\n if (!$length) {\n $length = $this->strlen($v);\n }\n\n $n = 0;\n $le = strlen($v);\n $leading = false;\n for ($i = 0; $i < $le; $i++) {\n // ASCII.\n if (($ord = ord($v{$i})) < 128) {\n if ((++$n) > $length) {\n return substr($v, 0, $i);\n }\n $leading = false;\n }\n // Continuation char.\n elseif ($ord < 192) { // continuation char\n $leading = false;\n }\n // Leading char.\n else {\n // A sequence of leadings only counts as a single.\n if (!$leading) {\n if ((++$n) > $length) {\n return substr($v, 0, $i);\n }\n }\n $leading = true;\n }\n }\n return $v;\n }", "title": "" }, { "docid": "63152a3afe1def6e68cd5dc39cf670ea", "score": "0.5845467", "text": "function mb_str_cut ($str, $start, $length = null, $encoding = null)\n{\n return mb_strcut($str, $start, $length, $encoding);\n}", "title": "" }, { "docid": "af0f72e84c5c1313a2309bd0c0a18e71", "score": "0.5828562", "text": "public static function substr(string $string, int $offset, ?int $length = null)\n {\n return $length ? substr($string, $offset, $length) : substr($string, $offset);\n }", "title": "" }, { "docid": "2ab8fe82dabf75052f61e9abd9559fa3", "score": "0.57932454", "text": "public static function trimWordFromString($string, $start=true)\n\t{\n\t\tif (self::validateString($string)) \n\t\t{\n\t\t\t$trimmed = trim($string);\n\t\t\tif (!substr_count($trimmed, ' '))\n\t\t\t\treturn $trimmed;\t\t\t\n\t\t\telse \t\t\t\n\t\t\t\treturn ($start) ? substr($trimmed, strpos($trimmed, ' ')+1, strlen($trimmed)) : substr($trimmed, 0, strrpos($trimmed, ' '));\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "c7e794c937ec5ff576c6b642cf6f288b", "score": "0.579014", "text": "function between($haystack, $string1, $string2) {\n $pos1 = strpos($haystack, $string1);\n if ($pos1 === false) {\n return '';\n }\n $pos1 = $pos1 + strlen($string1);\n $pos2 = strpos($haystack, $string2, $pos1);\n $val = substr($haystack, $pos1, $pos2 - $pos1);\n return $val;\n}", "title": "" }, { "docid": "abad92983c8c69ac00ec425e3e9b395c", "score": "0.57899976", "text": "function getSubString($string, $length=NULL)\n{\n if ($length == NULL)\n $length = 40;\n //Primero eliminamos las etiquetas html y luego cortamos el string\n $stringDisplay = substr(strip_tags($string), 0, $length);\n //Si el texto es mayor que la longitud se agrega puntos suspensivos\n if (strlen(strip_tags($string)) > $length)\n $stringDisplay .= '.';\n return $stringDisplay;\n}", "title": "" }, { "docid": "f1a475343e13bdc21cd68bfe4ea7bc6c", "score": "0.57876015", "text": "function getStringFirst($string,$lenght){\n return substr($string,0,$lenght);\n}", "title": "" }, { "docid": "0c51e1adaa36a0beb888fcb640433bf0", "score": "0.5781267", "text": "protected function substring($strText, $intStart, $intLength)\n {\n $strSubstring = '';\n try\n {\n if ($this->strEncoding == '')\n {\n $strSubstring = mb_substr($strText, $intStart, $intLength);\n }\n else\n {\n $strSubstring = substr($strText, $intStart, $intLength, $this->strEncoding);\n }\n }\n catch (Exception $e)\n {\n $strSubstring = substr($strText, $intStart, $intLength);\n }\n return $strSubstring;\n }", "title": "" }, { "docid": "41a11c7c0303953c3e92835daad868a0", "score": "0.57596344", "text": "public static function between(string $str, string $start, string $end, int $offset = null): string\n {\n return (string)BaseStringy::create($str)->between($start, $end, $offset);\n }", "title": "" }, { "docid": "325ce581f5489f2ed96ffb8ee224a63f", "score": "0.57078475", "text": "function scrape_data($scraped_page, $startTag, $endTag)\n\t{\n\t\t$start = strpos($scraped_page, $startTag);\n\t\t$end = strpos($scraped_page, $endTag, $start);\n\t\t$length = $end-$start;\n\t\t$result = substr($scraped_page, $start, $length);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "bdc32a3235d374f6a5adbba166b08f4a", "score": "0.57035357", "text": "function substr_between($delimiter1, $delimiter2, $wholeStr){\n return after($delimiter1, before($delimiter2,$wholeStr));\n}", "title": "" }, { "docid": "df1ef5e88cde0d679c3aa3505c635376", "score": "0.569742", "text": "public function substr($start, $length = null, $encoding = null)\n {\n return $this->addModifier('substr', array($start, $length, $encoding));\n }", "title": "" }, { "docid": "c4ebf85e8951280ed7a378e7b69e0c10", "score": "0.5686205", "text": "public static function CutStr($string, $length) {\n return substr($string, 0, $length);\n }", "title": "" }, { "docid": "259d67c54751d5ffc86a394bd774b075", "score": "0.5672618", "text": "function scrape_between($data, $start, $end){\n $data1 = stristr($data , $start);\n $data1 = substr ($data1, strlen($start));\n $stop = stripos($data1, $end);\n $data1 = substr ($data1, 0, $stop);\n return $data1;\n }", "title": "" }, { "docid": "0cb151a7493a86f88eb7328f25b64082", "score": "0.5655694", "text": "function strafter($string, $substring)\n{\n $pos = strpos($string, $substring);\n if ($pos === false) {\n return $string;\n } else {\n return (substr($string, $pos + strlen($substring)));\n }\n}", "title": "" } ]
8ef242df6ad03ea33f54ee76ecc344c0
Bootstrap any application services.
[ { "docid": "828b10db32314691ef251b9e4f5878ff", "score": "0.0", "text": "public function boot()\n {\n $storePath = env('IMAGE_STORE_PATH');\n if($storePath == null) {\n error_log(\"[ERROR] Image store path does not exist!\");\n exit(1);\n }\n if (!file_exists($storePath)) {\n mkdir($storePath, 0766, true);\n }\n }", "title": "" } ]
[ { "docid": "b4684a89e64c6637db95a223a12bd3b5", "score": "0.7607961", "text": "private function boot()\n {\n // load service classes by the config and instantiate them\n $services_classes = config('app.services');\n if (is_array($services_classes))\n {\n foreach ($services_classes as $service_class)\n {\n $service = instantiate_if($service_class, '\\Pure\\Service');\n if($service) {\n array_push($this->m_services, $service);\n }\n }\n }\n\n // boot services\n foreach ($this->m_services as $service)\n {\n $service->boot();\n }\n }", "title": "" }, { "docid": "defa7b3651561f37ebc0c9d414de9745", "score": "0.7364619", "text": "public function boot(): void {\n\t\tforeach ( $this->service_providers as $service_provider ) {\n\t\t\t$service_provider->boot();\n\t\t}\n\t}", "title": "" }, { "docid": "06ce3e8cac3f33eba552d3a301926533", "score": "0.7230298", "text": "public function bootstrap()\n {\n $storage = $this->getStorage();\n $adapter = $this->getAdapter();\n\n $this->app->auth = function () use ($storage, $adapter) {\n return new AuthenticationService($storage, $adapter);\n };\n\n $app = $this->app;\n\n $this->app->authenticator = function () use ($app) {\n return new Authenticator($app->auth);\n };\n\n // Add the custom middleware\n $this->app->add($this->getAuthMiddleware());\n }", "title": "" }, { "docid": "94f5d78d054730f5a94bd3e689248fd2", "score": "0.7223166", "text": "public function boot()\n {\n $this->app->bind('WaboxApp', function () {\n $driver = config('waboxapp-laravel.driver', 'api');\n if (is_null($driver) || $driver === 'log') {\n return new NullService($driver === 'log');\n }\n\n return new WaboxAppService;\n });\n }", "title": "" }, { "docid": "eb45515adc762fc3e435e289bf8b7ed2", "score": "0.71741116", "text": "public function boot()\n {\n Carbon::resetToStringFormat();\n\n // bind guzzle client for beer service\n $this->app->when(BeerService::class)\n ->needs(Client::class)\n ->give(function () {\n return new Client([\n 'base_uri' => config('services.food.beer.url'),\n ]);\n })\n ;\n\n // bind guzzle client for meal service\n $this->app->when(MealService::class)\n ->needs(Client::class)\n ->give(function () {\n return new Client([\n 'base_uri' => config('services.food.meals.url'),\n ]);\n })\n ;\n }", "title": "" }, { "docid": "e8ed5a31a2732cfe1d2a68b4c4da178c", "score": "0.7145517", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "cd8e19db41407d6cac08b70917db4a76", "score": "0.7106868", "text": "public function boot()\n {\n $this->app->singleton(VideoServiceInterface::class, function() {\n return new VideoService();\n });\n $this->app->singleton(BannerServiceInterface::class, function() {\n return new BannerService();\n });\n }", "title": "" }, { "docid": "866d37d0812c6c4ec4597207b140c6a7", "score": "0.7074031", "text": "public function boot()\n {\n $this->app->bind(HabboService::class, fn () => new HabboService);\n $this->app->bind(FindRetrosService::class, fn () => new FindRetrosService);\n $this->app->bind(RconService::class, fn () => new RconService);\n\n Inertia::share('user', fn (Request $request) => $request->user());\n Inertia::share('domain', fn () => config('habbo.site.domain'));\n Inertia::share('shortname', fn () => config('habbo.site.shortname'));\n Inertia::share('sitename', fn () => config('habbo.site.sitename'));\n Inertia::share('socials', fn () => config('habbo.socials'));\n Inertia::share('csrf_token', fn (Request $request) => $request->session()->token());\n Inertia::share('discord_id', fn () => config('habbo.site.discord_id'));\n Inertia::share('flash', fn () => [\n 'success' => Session::get('success'),\n 'error' => Session::get('error'),\n ]);\n }", "title": "" }, { "docid": "56e14a436b3098780c4a9e4f5bcd839b", "score": "0.7035113", "text": "public function bootstrap()\n {\n if (! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n $this->app->loadDeferredProviders();\n\n if (! $this->commandsLoaded) {\n $this->commands();\n\n $this->commandsLoaded = true;\n }\n }", "title": "" }, { "docid": "a7b0ab84d883014c03ed6453eff9218b", "score": "0.70249045", "text": "public function boot()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/nova-trust.php', 'nova-trust');\n $this->loadViewsFrom(__DIR__.'/../resources/views', 'nova-trust');\n $this->loadJsonTranslationsFrom(__DIR__.'/../resources/lang');\n\n $this->app->booted(function () { \n $this->laratrustConfigurations(); \n });\n\n if($this->app->runningInConsole()) {\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n\n $this->registerPublishing();\n }\n }", "title": "" }, { "docid": "fd140f0511344d92fcf078c540996441", "score": "0.70194554", "text": "public function bootstrap(): void\n {\n if (!$this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n }", "title": "" }, { "docid": "556b46d9bdee7c07b3853c20c1e49709", "score": "0.70117134", "text": "public function boot()\n {\n $app = $this->app;\n\n $this->bootConfig();\n }", "title": "" }, { "docid": "1bab681aa28147244f221d2b0c3e9a30", "score": "0.700547", "text": "public function boot()\n {\n \\URL::forceRootUrl(\\Config::get('app.url'));\n if (\\Str::contains(\\Config::get('app.url'), 'https://')) {\n \\URL::forceScheme('https');\n }\n\n Task::observe(TaskObserver::class);\n\n Paginator::defaultView('pagination.materialize-css');\n Paginator::defaultSimpleView('pagination.simple-materialize-css');\n }", "title": "" }, { "docid": "0489d2ade67681a91b8d75052908a1eb", "score": "0.7003907", "text": "public function boot(): void\n {\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "b35121e81e1de111862aef586af2f035", "score": "0.6993787", "text": "public function boot() {\n $this->loadTranslationsFrom(realpath(__DIR__ . '/../../langs'), 'elfet.modules');\n\n $this->app->register(BootServiceProvider::class);\n\n if($this->app->runningInConsole()) {\n $this->app->register(ConsoleServiceProvider::class);\n }\n\t}", "title": "" }, { "docid": "af5d2ea24fa1dbfa132efc607b7f8f0a", "score": "0.6988631", "text": "public function boot()\n\t{\n\t\t//Only for development. Not necessary for publishing.\n require __DIR__ . '/../../../../../vendor/autoload.php';\n\t}", "title": "" }, { "docid": "b483e13f04af3b0614569a6c708c8692", "score": "0.6977051", "text": "public function boot(): void\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'amin3536');\n // $this->loadViewsFrom(__DIR__.'/../resources/views', 'amin3536');\n // $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n // $this->loadRoutesFrom(__DIR__.'/routes.php');\n\n // Publishing is only necessary when using the CLI.\n// if ($this->app->runningInConsole()) {\n// $this->bootForConsole();\n// }\n }", "title": "" }, { "docid": "56d22db64a1d9a828e2e3085f7c502a7", "score": "0.6970091", "text": "public function boot()\n {\n // Here you may define how you wish users to be authenticated for your Lumen\n // application. The callback which receives the incoming request instance\n // should return either a User instance or null. You're free to obtain\n // the User instance via an API token or any other method necessary.\n $this->app->bind(Client::class, function($app, $args = []) {\n $args['verify'] = 'C:\\wamp64\\cacert.pem';\n return new Client($args);\n });\n\n $this->app->singleton(MangaImageDownloader::class,function() {\n return new MangaImageDownloader();\n });\n }", "title": "" }, { "docid": "4bc3e8a4e505a5850f92c54e318fb695", "score": "0.69684184", "text": "public function boot()\n {\n $this->loadModuleServiceRoutes();\n $this->loadModuleServiceViews();\n }", "title": "" }, { "docid": "d3dce37cfe05ae8a935f1a0d22dbfdee", "score": "0.6965794", "text": "public function boot(): void\n {\n $this->bootRouteResource();\n $this->loadViewsFrom(__DIR__ . '/../resources/views', 'larabra');\n $this->bootLaravelCollectiveMediaFormInput();\n\n\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'larabra');\n // $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n // $this->loadRoutesFrom(__DIR__.'/routes.php');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "53c1bbd2c3e85d178835cd66fae38b69", "score": "0.6959018", "text": "public function boot()\n {\n $this->app->bind(AuthService::class, function ($app) {\n return new AuthServiceImpl();\n });\n $this->app->bind(BlogService::class, function ($app) {\n return new BlogServiceImpl();\n });\n }", "title": "" }, { "docid": "8ff3a37d8ea964a02d920c45f63bba1e", "score": "0.6955807", "text": "public function boot()\n {\n $this->setupConfig($this->app);\n }", "title": "" }, { "docid": "8ff3a37d8ea964a02d920c45f63bba1e", "score": "0.6955807", "text": "public function boot()\n {\n $this->setupConfig($this->app);\n }", "title": "" }, { "docid": "8ff3a37d8ea964a02d920c45f63bba1e", "score": "0.6955807", "text": "public function boot()\n {\n $this->setupConfig($this->app);\n }", "title": "" }, { "docid": "fb931a485a1763fae0894c8c032844cf", "score": "0.69363683", "text": "public function boot()\n {\n $this->app->when(SmsAeroChannel::class)\n ->needs(SmsAeroClient::class)\n ->give(function () {\n $config = config('services.smsaero');\n if (is_null($config)) {\n throw InvalidConfiguration::configurationNotSet();\n }\n\n return new SmsAeroClient(\n $config['user'],\n $config['secret'],\n $config['sign'],\n $config['digital']\n );\n });\n }", "title": "" }, { "docid": "21b54d953ab81cbcdc0392671f0079df", "score": "0.6928325", "text": "public function boot()\n {\n if ( $this->app instanceof Laravel && $this->app->runningInConsole() ) {\n $this->bootLaravelApplication();\n\n } elseif ( $this->app instanceof Lumen ) {\n $this->bootLumenApplication();\n }\n\n $this->mergeConfigFrom( __DIR__ . '/../resources/config/responder.php', 'responder' );\n\n $this->commands( [\n MakeTransformer::class\n ] );\n\n include __DIR__ . '/helpers.php';\n }", "title": "" }, { "docid": "8bb0549433500263e1d22897b135e3a5", "score": "0.690101", "text": "public function boot()\n {\n $this->setupViews($this->app);\n $this->setupConfig($this->app);\n }", "title": "" }, { "docid": "371b5fb4287dce9224bf8653f9364c73", "score": "0.68981665", "text": "public function boot()\n {\n $loader = AliasLoader::getInstance();\n\n $loader->alias('AppLaravel', LaraJapan::class);\n $this->app->singleton('LaraJapan', function () {\n return new AppLaravel();\n });\n\n $this->loadHelpers();\n $this->registerConfigs();\n\n }", "title": "" }, { "docid": "49d4e5411f358fc2b6c05b2e9b16a19f", "score": "0.689129", "text": "public function boot()\n {\n Nova::script('NovaAwsCloudwatch', __DIR__.'/../dist/js/tool.js');\n\n $this->app->booted(function () {\n $this->routes();\n });\n\n $this->mergeConfigFrom(__DIR__.'../../config/nova_aws_cloudwatch.php', 'nova_aws_cloudwatch');\n\n }", "title": "" }, { "docid": "e1afe4f6a2bb6fa790ac5e35a2b5cba1", "score": "0.6887098", "text": "public function boot() {\n // Mix manifest\n if (array_key_exists('SERVER_ADDR', $_SERVER) && $_SERVER[\"SERVER_ADDR\"] == \"185.51.191.57\") {\n $this->app->bind('path.public', function () {\n return base_path().'/../public_html';\n });\n }\n\n // Blade kiegészítés\n Blade::directive('money', function ($expression) {\n return \"<?php echo '<span>' . resolve('App\\Subesz\\MoneyService')->getFormattedMoney({$expression}) . '</span>'; ?>\";\n });\n\n Schema::defaultStringLength(191);\n\n // Bootstrap léptető modul\n Paginator::useBootstrap();\n }", "title": "" }, { "docid": "8a43384f207a77a762d384a47d04bccc", "score": "0.6847318", "text": "public function boot()\r\n {\r\n \t$this->registerResources();\r\n\r\n if ($this->app->runningInConsole()) {\r\n $this->registerPublishing();\r\n\r\n if ($commands = $this->commands)\r\n $this->commands($commands);\r\n }\r\n }", "title": "" }, { "docid": "86be3cd3665055568e3480e076e0fbc6", "score": "0.6846952", "text": "public function boot(): void\n {\n $this->configurePublishing();\n $this->configureCommands();\n $this->configureMiddleware();\n $this->configureRoutes();\n $this->configureGuard();\n }", "title": "" }, { "docid": "1aa4f1f90ffd40dd03d9b3aa4b261813", "score": "0.68440515", "text": "public function boot()\n {\n $this->app->singleton(Plivo::class, function ($app) {\n return new Plivo(config('services.plivo'));\n });\n }", "title": "" }, { "docid": "24a6543baa1448c5254c78fee1a673a9", "score": "0.6842861", "text": "public function boot()\n {\n $this->registerServiceProviders(array_merge(\n $this->getContainersServiceProviders(),\n $this->engineServiceProviders\n ));\n\n $this->autoLoadViewsFromContainers();\n\n $this->overrideDefaultFractalSerializer();\n }", "title": "" }, { "docid": "f72be4b71cd75aa98642f7e526e6d8aa", "score": "0.68426955", "text": "public function boot()\n {\n $this->app->bind(Client::class, function(){\n return new Client;\n });\n $this->app->bind(AsyncClient::class, function(){\n return new AsyncClient;\n });\n $this->registerListeners();\n }", "title": "" }, { "docid": "8d543cca20e8c6cfa5d5f80684e54940", "score": "0.6839311", "text": "public function boot()\n {\n //\n $this->initDbListen();\n $this->initAppTerminating();\n $this->initLogListen();\n $this->initBugsnag();\n }", "title": "" }, { "docid": "2b352a96bc7eb73b0f580d58cb8ec020", "score": "0.6838916", "text": "public function boot()\n {\n if (config('proxies.trust_all'))\n {\n request()->setTrustedProxies([request()->getClientIp()]);\n }\n\n if (!$this->app->environment('testing') and $this->app->config->get('app.key') == 'ReplaceThisWithYourOwnLicenseKey')\n {\n session()->flash('error', '<strong>' . trans('bt.error') . '</strong> - ' . 'Please enter your license key in config/app.php.');\n }\n\n $this->app->view->addLocation(base_path('custom/overrides'));\n\n $modules = Directory::listDirectories(app_path('Modules'));\n\n foreach ($modules as $module)\n {\n $routesPath = app_path('Modules/' . $module . '/routes.php');\n $viewsPath = app_path('Modules/' . $module . '/Views');\n\n if (file_exists($routesPath))\n {\n require $routesPath;\n }\n\n if (file_exists($viewsPath))\n {\n $this->app->view->addLocation($viewsPath);\n }\n }\n\n foreach (File::files(app_path('Helpers')) as $helper)\n {\n require_once $helper;\n }\n\n $this->app->view->addLocation(base_path('custom/templates'));\n $this->app->view->addLocation(storage_path());\n\n $this->app->register('BT\\Providers\\AddonServiceProvider');\n $this->app->register('BT\\Providers\\ComposerServiceProvider');\n $this->app->register('BT\\Providers\\ConfigServiceProvider');\n $this->app->register('BT\\Providers\\DashboardWidgetServiceProvider');\n $this->app->register('BT\\Providers\\EventServiceProvider');\n $this->app->register('BT\\Providers\\ObserverServiceProvider');\n\n // $this->app->register('Collective\\Html\\HtmlServiceProvider');\n\n Paginator::useBootstrap();\n }", "title": "" }, { "docid": "772acf3017fdc28764ac7d5574ca61b6", "score": "0.68355316", "text": "public function boot()\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'capeandbay');\n // $this->loadViewsFrom(__DIR__.'/../resources/views', 'capeandbay');\n $this->publishMigrations();\n // $this->loadRoutesFrom(__DIR__.'/routes.php');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "f385218c4e24f5bfd4e18db48fb051bc", "score": "0.6829505", "text": "public function boot()\n {\n $this->app->bind(\n BootstrapData::class,\n AppBootstrapData::class\n );\n }", "title": "" }, { "docid": "43f20fe13e4a40d790f0e86b6c189511", "score": "0.68284476", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n Console\\Custom\\ServiceMakeCommand::class,\n Console\\Custom\\RepositoryMakeCommand::class,\n ]);\n }\n }", "title": "" }, { "docid": "3b617485f2f7d9607343fdb9b6de026c", "score": "0.6827344", "text": "public function boot() {\n\t\tif ($this->app->runningInConsole()) {\n\t\t\t$this->publishes([\n\t\t\t\t__DIR__ . '/../config/servicedeskplus-api.php' => config_path('servicedeskplus-api.php'),\n\t\t\t\t\t], 'servicedeskplus-api-config');\n\t\t}\n\t}", "title": "" }, { "docid": "f815b61ab90f7c9723f194f7dc56a3d3", "score": "0.6823151", "text": "public function boot()\n {\n parent::boot();\n\n foreach ($this->drivers as $driver) {\n DriverManager::loadDriver($driver);\n }\n\n /**\n * Socrates Routes\n */\n Route::group([\n 'namespace' => '\\Socrates\\Http\\Controllers',\n ], function (/**$router**/) {\n require __DIR__.'/../routes/web.php';\n });\n\n $this->mapBotManCommands();\n\n\n $this->registerViewComposers();\n \n // Register configs, migrations, etc\n $this->publishConfigs();\n $this->publishAssets();\n $this->publishMigrations();\n }", "title": "" }, { "docid": "631d4dcc1f5d635474d3ac85b687bb49", "score": "0.68213516", "text": "public function boot(): void\n {\n Messenger::shouldUseUuids(config('messenger.provider_uuids'));\n\n Messenger::shouldUseAbsoluteRoutes(config('messenger.use_absolute_routes'));\n\n Relation::morphMap([\n 'bots' => Bot::class,\n ]);\n\n $this->registerRouterServices();\n $this->registerPolicies();\n $this->registerSubscribers();\n $this->registerChannels();\n\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "bf335797bd12ac7bd69869fdf05a7fe3", "score": "0.6814658", "text": "public function boot()\n {\n $this->client = new HttpClient([\n 'base_uri' => 'https://api.ipdata.co/',\n 'query' => [\n 'api-key' => $this->config('key'),\n ],\n ]);\n }", "title": "" }, { "docid": "8d7b3f82f2ec930d3d3fcd192c268d5d", "score": "0.677872", "text": "public function boot()\n {\n\n $this->app->bind(UserRepositoryInterface::class, UserRepository::class);\n $this->app->bind(UserServiceInterface::class, UserService::class);\n\n $this->app->bind(DistrictRepositoryInterface::class, DistrictRepository::class);\n $this->app->bind(DistrictServiceInterface::class, DistrictService::class);\n\n $this->app->bind(DeceasedRepositoryInterface::class, DeceasedRepository::class);\n $this->app->bind(DeceasedServiceInterface::class, DeceasedService::class);\n\n $this->app->bind(DonationRepositoryInterface::class, DonationRepository::class);\n $this->app->bind(DonationServiceInterface::class, DonationService::class);\n\n $this->app->bind(EventRepositoryInterface::class, EventRepository::class);\n $this->app->bind(EventServiceInterface::class, EventService::class);\n\n $this->app->bind(PanditaRepositoryInterface::class, PanditaRepository::class);\n $this->app->bind(PanditaServiceInterface::class, PanditaService::class);\n\n $this->app->bind(RegionRepositoryInterface::class, RegionRepository::class);\n $this->app->bind(RegionServiceInterface::class, RegionService::class);\n\n $this->app->bind(RequestKtubRepositoryInterface::class, RequestKtubRepository::class);\n $this->app->bind(RequestKtubServiceInterface::class, RequestKtubService::class);\n\n $this->app->bind(ViharaRepositoryInterface::class, ViharaRepository::class);\n $this->app->bind(ViharaServiceInterface::class, ViharaService::class);\n\n $this->app->bind(CompanyVacancyRepositoryInterface::class, CompanyVacancyRepository::class);\n $this->app->bind(CompanyVacancyServiceInterface::class, CompanyVacancyService::class);\n }", "title": "" }, { "docid": "90a2134dcef34868588c8c15525501ca", "score": "0.67735827", "text": "public function boot()\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'fevrok');\n // $this->loadViewsFrom(__DIR__.'/../resources/views', 'fevrok');\n $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n // $this->loadRoutesFrom(__DIR__.'/routes.php');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "34dff9c16cb2c5b330896a5a44ae3da6", "score": "0.67715037", "text": "public function boot(): void\n {\n $repositories = $this->fileRepositoies();\n $contracts = $this->fileContracts();\n\n foreach ($repositories as $key => $repository) {\n $this->app->bind($this->getAppNamespace() . $contracts[$key], $this->getAppNamespace() . $repository);\n }\n }", "title": "" }, { "docid": "e50c8f01680a42476bb238355c75a385", "score": "0.67695546", "text": "public function boot()\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'deniskisel');\n // $this->loadViewsFrom(__DIR__.'/../resources/views', 'deniskisel');\n // $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n // $this->loadRoutesFrom(__DIR__.'/routes.php');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "15e56cd28b4112c7be24c116a7952eda", "score": "0.67680335", "text": "public function boot()\n {\n $this->app->booted(function () {\n $this->routes();\n });\n\n Nova::serving(function (ServingNova $event) {\n Nova::script('nova-external-login', __DIR__ . '/../dist/js/tool.js');\n Nova::style('nova-external-login', __DIR__ . '/../dist/css/tool.css');\n });\n }", "title": "" }, { "docid": "df97828faa13b27518f8d7f330a70312", "score": "0.6765855", "text": "public function boot()\n {\n $this->app->make(EngineManager::class)->extend('sonic', function () {\n return new SonicSearchEngine(\n new Ingest($this->generateClient()),\n new Search($this->generateClient()),\n new Control($this->generateClient()),\n \\config('scout.sonic.password')\n );\n });\n }", "title": "" }, { "docid": "1bc1785ab5e3526162d6c4d7f723ee3a", "score": "0.67586464", "text": "public function boot()\r\n {\r\n require base_path().'/vendor/autoload.php';\r\n }", "title": "" }, { "docid": "a909f9e81cf4fa4d14672123a49a8a55", "score": "0.6751015", "text": "public function boot()\n {\n // ...\n }", "title": "" }, { "docid": "a909f9e81cf4fa4d14672123a49a8a55", "score": "0.6751015", "text": "public function boot()\n {\n // ...\n }", "title": "" }, { "docid": "455db2bc4f9c922c0252a128b6b86729", "score": "0.67481416", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n ClientStart::class,\n ]);\n }\n }", "title": "" }, { "docid": "92066c7d64aa8f773f88d3066465dab5", "score": "0.6743415", "text": "public function boot()\n {\n $this->bootRouteBindings();\n $this->bootViewComposers();\n $this->bootInstalledDocks();\n $this->bootEnabledDocks();\n }", "title": "" }, { "docid": "290aba4383da75285aa8d387c1c0aeb2", "score": "0.67337465", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n\n $this->registerModelFilters();\n\n $this->registerMigrations();\n\n $this->registerMiddleware();\n\n $this->commands([\n InstallCommand::class,\n NotificationSocket::class,\n ]);\n }\n\n $this->loadRoutesFrom(__DIR__ . '/../routes.php');\n }", "title": "" }, { "docid": "b903db4bda80d01d89a638ef88248fe9", "score": "0.67293453", "text": "public function boot()\n {\n if ($this->booted) {\n return;\n }\n // To boot the application we will simply spin through each service provider\n // and call the boot method, which will give them a chance to override on\n // something that was registered by another provider when it registers.\n foreach ($this->serviceProviders as $provider) {\n $provider->boot();\n }\n $this->fireAppCallbacks($this->bootingCallbacks);\n // Once the application has booted we will also fire some \"booted\" callbacks\n // for any listeners that need to do work after this initial booting gets\n // finished. This is useful when ordering the boot-up processes we run.\n $this->booted = true;\n $this->fireAppCallbacks($this->bootedCallbacks);\n }", "title": "" }, { "docid": "8cdc4b7ccea04188540be1ca9c6a9eb0", "score": "0.67204785", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__ . '/../config/nextsms.php' => config_path('nextsms.php'),\n ], 'config');\n }\n\n /*\n * Bootstrap the application services.\n */\n $this->app->when(NextSmsChannel::class)\n ->needs(NextSmsSDK::class)\n ->give(function () {\n return $this->makeNextSmsService();\n });\n }", "title": "" }, { "docid": "01b03fa1d50d950081b53270d012d7b3", "score": "0.6715498", "text": "public function boot()\n {\n\n /**\n * Config file merging into the project\n */\n \n $configs = [\n __DIR__.'/../Config/jeybin-apiresponse.php' => config_path('jeybin-apiresponse.php') \n ];\n\n $this->publishes($configs, 'apiresponse-config');\n\n\n /**\n * Checking if the app is \n * running from console\n */\n if ($this->app->runningInConsole()) {\n\n /**\n * Adding custom commands class to the \n * service provider\n */\n $this->commands([\n PublishApiresponseProviders::class\n ]);\n }\n\n }", "title": "" }, { "docid": "1eb242b99080394175effe663fd98fc9", "score": "0.6713037", "text": "public function boot()\n {\n if(app()->environment(['local'])) {\n URL::forceRootUrl(config('app.url'));\n }\n\n $this->setupFlare();\n $this->setupQueueRateLimiters();\n $this->setupObservers();\n $this->setupCustomBladeDirectives();\n $this->setupPaginationFixes();\n $this->setupMaintenanceMode();\n $this->setupCollectionMacros();\n }", "title": "" }, { "docid": "c3ebb0b28a76aff16fd3399bc0465d4a", "score": "0.67048585", "text": "public function boot()\n {\n // nothing to boot - package does not have any view, config etc\n }", "title": "" }, { "docid": "f21a112b36654f9a16099ccc0fdec7b5", "score": "0.6690049", "text": "public function boot(){\n\t\t\t// -routes\n\t\t\t// -views\n\t\t\t// -migrations\n\t\t\t//\n\t\t\t// Modular Application structure.\n\t\t\t\n\t\t\t$appsFolder = __DIR__ . '/../Applications' ;\n\t\t\t$applications = array_diff(scandir($appsFolder), array('..', '.'));\n\t\t\t\n \t\n\t\t\tforeach($applications as $key=>$app){\n\n\t\t\t\t/*\n\t\t\t\tThis script is going to load our routes and make the views available\n\t\t\t\tin a package:view format so we can use the method view( app1::view ); to show the view.\n\t\t\t\t*/\n\n\t\t\t\t// Include the Routes \n\t\t\t\tif(file_exists(__DIR__.'/../Applications/'.$app.'/routes.php')) {\n\t\t\t\t\tinclude __DIR__.'/../Applications/'.$app.'/routes.php';\n\t\t\t\t}\n\n\t\t\t\t// Load the Views\n\t\t\t\tif(is_dir(__DIR__.'/../Applications/'.$app.'/Views')) {\n\t\t\t\t\t$this->loadViewsFrom(__DIR__.'/../Applications/'.$app.'/Views', $app);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Add Migrations - migrations will be avaialbe to use in php artisan migrate.\n\t\t\t\tif(is_dir(__DIR__.'/../Applications/'.$app.'/Migrations')) {\n\t\t\t\t\t$this->loadMigrationsFrom(__DIR__.'/../Applications/'.$app.'/Migrations', $app);\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t}\n\t\t \n\t\t\n }", "title": "" }, { "docid": "fe69a41140b7706b660f9326f7c5e95e", "score": "0.6685267", "text": "public function boot()\n {\n /**\n * FusionCMS will now merge it's own\n * configurations on top of Laravel's.\n */\n $this->resetBackupConfigurations();\n $this->mergeFusionCMSConfigurations();\n $this->mergeFileSystemConfigurations();\n $this->registerMailServices();\n }", "title": "" }, { "docid": "1243d7ee92adfb8c2de5f1839cd4efbd", "score": "0.66851074", "text": "public function boot()\n {\n if($this->app->runningInConsole()) {\n $this->commands([\n \\BinaryCabin\\LaravelToolbelt\\Commands\\MakeUser::class,\n \\BinaryCabin\\LaravelToolbelt\\Commands\\InitiateRoles::class,\n ]);\n }\n }", "title": "" }, { "docid": "39158a6788f7dcc3197fb4fd017e7503", "score": "0.6683314", "text": "public function boot()\n {\n $this->mergeConfigFrom($this->getConfigPath(), 'environment_loader');\n\n $this->publishes([$this->getConfigPath() => config_path('environment_loader.php'),], 'config');\n\n $this->registerBootProviders($this->app['config']);\n }", "title": "" }, { "docid": "6ef6f134c7b73934dcc2a84869de1aed", "score": "0.6675191", "text": "public function boot(): void {\n $this->loadViewsFrom(__DIR__ . '/../resources/views', 'SimonMarcelLinden');\n Blade::component('SimonMarcelLinden::components.multiSelect', 'multiSelect');\n\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n $this->commands([\n PackageCommand::class,\n ]);\n }\n }", "title": "" }, { "docid": "31452a363c143e233c70bcfc091eceab", "score": "0.66750276", "text": "public static function boot() : void\n {\n $container = self::getContainer();\n $container->singleton('app', $container);\n\n Facade::setFacadeApplication($container);\n }", "title": "" }, { "docid": "121b2903c906766f8a3b4687e4769575", "score": "0.667462", "text": "public function boot()\n {\n // Load in .env\n try {\n // Load in additional version stuff\n $env = new Dotenv(__DIR__ . '/../', '.version');\n $env->load();\n\n // Load in the .env\n $env = new Dotenv(__DIR__ . '/../');\n $env->load();\n } catch (\\Exception $e) {\n }\n }", "title": "" }, { "docid": "605911944be1f19e942d496d27550729", "score": "0.6672465", "text": "public function boot(Application $app)\n {\n\n }", "title": "" }, { "docid": "605911944be1f19e942d496d27550729", "score": "0.6672465", "text": "public function boot(Application $app)\n {\n\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "446162ec550db27b15c46bf64ac0dac1", "score": "0.0", "text": "public function store(Request $request)\n {\n $this->validate($request,[\n 'bookingdate' => 'required',\n ]);\n\n $dates = explode(',',$request->input('bookingdate'));\n\n if($request->input('breakfast')){\n $breakfast= 'on';\n }\n else $breakfast= 'off';\n\n if($request->input('lunch')){\n $lunch= 'on';\n }\n else $lunch= 'off';\n\n if($request->input('dinner')){\n $dinner= 'on';\n }\n else $dinner= 'off';\n\n foreach($dates as $date){\n $booking = new Booking;\n $booking->bookingdate = $date;\n $booking->user_id = Auth::user()->id;\n $booking->breakfast = $breakfast;\n $booking->lunch = $lunch;\n $booking->dinner = $dinner;\n $booking->save();\n }\n\n Flash::success('আপননার খাবারের নির্দেশনা গ্রহণ করা হয়েছে!');\n\n return redirect('/booking');\n }", "title": "" } ]
[ { "docid": "643f51843534c99b002271c413f71061", "score": "0.714795", "text": "public function store()\n {\n $this->storage->set($this);\n\n }", "title": "" }, { "docid": "aba977442c12d8193d7ce12cb2a46e96", "score": "0.66928375", "text": "public function store ()\n {\n $this->_update_login ();\n $this->_pre_store ();\n\n if ($this->exists ())\n {\n $this->_update ();\n }\n else\n {\n $this->_create ();\n }\n }", "title": "" }, { "docid": "75600e5d65c2156987ff7cb140e14a4b", "score": "0.6621472", "text": "public function store() {\n $fileService = $this->getFileService();\n $filename = $this->getCacheDirectory() . $this->generateCacheablefilename();\n $fileService->saveFile($filename, $this->resource->getContent());\n }", "title": "" }, { "docid": "98fadc36fd3a4194a25023de21dae9ff", "score": "0.64296234", "text": "public function save($resource);", "title": "" }, { "docid": "9181113e9ca478f57b376bb60189432a", "score": "0.6394834", "text": "public function store()\n\t{\n\t\t//\n\t\t$inputs = Input::all();\n\t\t$validator = Validator::make($inputs , \\App\\Resource::$rules);\n\n\t\tif($validator->passes()){\n\t\t\t$destinationPath = 'pictures/'; // upload path\n\t\t\t$extension = Input::file('image')->getClientOriginalExtension(); // getting image extension\n\t\t\t$fileName = rand(11111,99999). '_' . time() . '.'.$extension; // renameing image\n\t\t\tImage::make(Input::file('image')->getRealPath())->resize(300, null,function($constrain){\n\t\t\t\t$constrain->aspectRatio();\n\t\t\t})->save($destinationPath . $fileName);\n\t\t\t// Input::file('image')->move($destinationPath, $fileName); // uploading file to given path\n\t\t\t$inputs['image'] = $fileName;\n\t\t\t\\App\\Resource::create($inputs);\n\t\t\treturn Redirect::to('/');\n\n\t\t}\n\n\t\treturn Redirect::back()\n\t\t\t->withInput(Input::all())\n\t\t\t->withErrors($validator);\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.6365053", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "bd7a2528e89d1c3f43656fa9d3a11bc3", "score": "0.63583463", "text": "public function store(StoreResourceRequest $request): JsonResponse\n {\n $resource = new Resource;\n $resource->fill($request->all());\n if ($request->has('url')) {\n $resource->url = $request->file('url')->store('articles', 'article');\n }\n $resource->saveOrFail();\n return $this->api_success([\n 'data' => new ResourceArticleResource($resource),\n 'message' => __('pages.responses.created'),\n 'code' => 201\n ], 201);\n }", "title": "" }, { "docid": "af1871e1a1f1d758082bcf4ebeab10eb", "score": "0.6356626", "text": "public function saveStorage()\n {\n $this->storage->save($this->getProduct());\n }", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
a99e06dc3cc7c37f302b6841cfab8b6d
Zkontroluje, jestli existuje soubor s logem
[ { "docid": "163d73815ad89e183cf227be98cde1e8", "score": "0.0", "text": "public function is_log_file_exists() { \n return file_exists($this->LogFile);\n }", "title": "" } ]
[ { "docid": "6cc4e0b05fb8f3cdf38b5e167a8fa802", "score": "0.61780304", "text": "public function testCheckIfFileExist()\n {\n vfsStream::setup('home');\n $file = vfsStream::url('home/text.txt');\n $this->assertFalse(Filesystem::exists($file));\n\n file_put_contents($file, \"The new contents of the file\");\n $this->assertTrue(Filesystem::exists($file));\n }", "title": "" }, { "docid": "2569b930951ceb752f30afae30f60052", "score": "0.6126821", "text": "function fileexist()\n\t{\n\t\tif(file_exists($this->filename)){\n\t\t\t$this->result = 1;\n\t\t} else {\n\t\t\t$this->result = 0;\n\t\t}\n\t}", "title": "" }, { "docid": "02ae894e9ac32830b4520180308a9847", "score": "0.6005609", "text": "public function getFile();", "title": "" }, { "docid": "02ae894e9ac32830b4520180308a9847", "score": "0.6005609", "text": "public function getFile();", "title": "" }, { "docid": "02ae894e9ac32830b4520180308a9847", "score": "0.6005609", "text": "public function getFile();", "title": "" }, { "docid": "3d76fd462b52689e6845c010c41bdb0c", "score": "0.6002192", "text": "public function getPathToFile(): string;", "title": "" }, { "docid": "79e849ce89d44ee73a5a0138a79d959c", "score": "0.59914774", "text": "public function fileExists();", "title": "" }, { "docid": "6d9087db5e7ea1791941dc49924d8e1d", "score": "0.59905183", "text": "function sprawdzPlik($file){\r\n \tif(file_exists($file) && is_readable($file)){\r\n \t\t//print 'Plik istnieje, możliwy odczyt.</br>';\r\n \t}\r\n \telse{\r\n \t\tprint 'Plik NIE istnieje lub nie można odczytać</br>';\r\n \t\texit;\r\n \t}\r\n }", "title": "" }, { "docid": "4f1e0aa004fb80512d5bbab02ff2dfe9", "score": "0.59295124", "text": "private function searchWriteableFile()\n {\n if (is_dir($this->filePath)) {\n $f = scandir($this->filePath);\n $files = array_filter($f, function ($name) {\n $tfe = self::TEMPORARY_FILE_EXTENSION;\n return substr_compare($name, $this->filePrefix, 0, strlen($this->filePrefix)) === 0\n && substr_compare($name, $tfe, -strlen($tfe)) === 0;\n });\n\n if (empty($files)) {\n $this->createNewTempFile();\n } else {\n $this->filename = reset($files);\n $this->file = $this->getFileResource($this->filePath . $this->filename);\n $this->currentFileLines = $this->getCurrentFileLines();\n $this->timestamp = $this->extractTimestamp();\n }\n } else {\n $this->logger->error(MappIntelligenceMessages::$DIRECTORY_NOT_EXIST, $this->filePath);\n }\n }", "title": "" }, { "docid": "49d4fc63207ccd165c59f26ea2bf4227", "score": "0.592042", "text": "public function getFileBaseDir()\n {\n return Mage::getBaseDir('media').DS.'hira'.DS.'file';\n }", "title": "" }, { "docid": "d45edbe8494b71fa22186da1783aa445", "score": "0.5884362", "text": "function produkKategoriSub_CreateDirektori( \n\t \t$tanggalhariini\n\t){\n \t\t$direktoribuat = \"filemodul/produk/\" . \"subkategoriimage/\" . $tanggalhariini . \"/\";\n\t \tif (is_dir( $direktoribuat )) \n\t \t{ }\n\t \telse\n\t \t{\n\t\t\t mkdir( $direktoribuat,'0777',true); \n\t\t\t chmod( $direktoribuat, 0777);\n\t \t}\n\t\treturn $direktoribuat;\n\t}", "title": "" }, { "docid": "edfb28af4ab1a6ca914c00f19cbc5a93", "score": "0.5882512", "text": "function salvatore_check_file($file){\n\tif (!file_exists($file)){\n\t\tthrow new Exception(\"Erreur : Le fichier $file est introuvable\");\n\t}\n}", "title": "" }, { "docid": "aaf6eba6ba90fc017fb69c999f6793c7", "score": "0.5870144", "text": "function StoreDoc($filename, $path){\n $dados['repositorio'] = 1; // ============>>> criar tela de seleção de repositorio\n $dados['nome'] = $filename;\n $dados['arquivo'] = file_get_contents($path.$filename);\n $dados['dataCriacao'] = getdate();\n $dados['criadoPor'] = $_SESSION[\"id_usuario\"];\n\n $result = incluirDocumento($dados);\n return $result;\n }", "title": "" }, { "docid": "aa0e781fcbfb2854fb8338b0cc0f2d33", "score": "0.5834783", "text": "static function init (){\n function file_force_contents( $fullPath, $contents = \"\", $flags = 0 ){\n $parts = explode( '\\\\', $fullPath );\n array_pop( $parts );\n $dir = implode( '\\\\', $parts );\n \n if( !is_dir( $dir ) )\n mkdir( $dir, 0777, true );\n \n file_put_contents( $fullPath, $contents, $flags );\n }\n\n }", "title": "" }, { "docid": "c6a9eb734bd61ba8240e276a74ddfcd6", "score": "0.5784934", "text": "public function putFile()\n\t{\n }", "title": "" }, { "docid": "cebfb2d8f40393b3c7e5bbee48c4c7a9", "score": "0.5750727", "text": "public function files();", "title": "" }, { "docid": "08e804d042ea67ba2c2a485105476786", "score": "0.5734376", "text": "function existing_file() {\n\t\t$file_name = trim($this->file_name);\t\t\t\t//Extract the file name\n\t\t$upload_dir = $this->get_upload_directory();\t\t//Extract the upload directory\n\t\t\n\t\tif ($upload_dir == \"ERROR\") {\t\t\t\t\t\t//If directory not found\n\t\treturn false;\t\t\t\t\t\t\t\t\t\t//Return false\n\t\t} else {\t\t\t\t\t\t\t\t\t\t\t\t//Else\n\t\t$file = $upload_dir . $file_name;\t\t\t\t//Set file and file path\n\t\tif (file_exists($file)) {\t\t\t\t\t\t\t//If file exists\n\t\tunlink( $upload_dir . $file_name);\n\t\treturn false;\t\t\t\t\t\t\t\t\t//delete it and Return false\n\t\t} else {\t\t\t\t\t\t\t\t\t\t\t//Else\n\t\treturn false;\t\t\t\t\t\t\t\t\t//Return false\n\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "7e80520587609e4088a88f5fa418f43e", "score": "0.5722247", "text": "function zkusNahratObrazek(){\r\n\t\t\r\n\t\t$zprava = \"Není vybrán žádný soubor!\";\r\n\t\t\r\n\t\tsession_start();\r\n\r\n\t\t$pripojeni = new mysqli(servername, username, password, databasename);\r\n\t\t $DBObjekt = new obrazekObjektDB($pripojeni);\r\n\t\t \r\n\t\t $jmenoAktivnihoUzivatele= $_SESSION[\"userName\"];\r\n\t\t $IDAktivnihoUzivatele=$_SESSION[\"userID\"];\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//overeni existence vybraneho souboru\t\t\t\r\n\t\t\tif(file_exists($_FILES[\"obrazekVstup\"][\"tmp_name\"]) == false){\t\t\t\t\r\n\t\t\t\t//echo \"KONEC\";\r\n\t\t\t\t//return;\t\r\n\t\t\t\t$zprava = \"Není vybrán žádný soubor!\";\r\n\t\t\t\tprihlasUzivatele($jmenoAktivnihoUzivatele, $IDAktivnihoUzivatele,$pripojeni);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\techo \"<script type='text/javascript'>\r\n\t\t\t\tprepniTab(event, 'tabObsah2');\t\t \r\n\t\t\t\t</script>\";\r\n\t\t\t\t$retezec = \"<script type='text/javascript'> alert('\" . $zprava . \"'); </script>\";\r\n\t\t\t\techo $retezec;\t\r\n\t\t\t\treturn;\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t \r\n\t\t \r\n\t\t $jmenoObrazku = $_FILES[\"obrazekVstup\"][\"name\"];\r\n\t\t $obrazek = new obrazekObjekt(0, $jmenoObrazku,$IDAktivnihoUzivatele,$jmenoAktivnihoUzivatele); //ID je auto-increment\r\n\t\t \r\n\t\t //overeni existence obrazku s identickym nazvem -> je nutne jej predtim smazat \r\n\t\t $obrazky = $DBObjekt->nahrajObrazky();\t\t \r\n\t\t foreach($obrazky as $prochazeny ){\r\n\t\t\tif( $prochazeny->filePath == $obrazek ->filePath) {\r\n\t\t\t\t//echo \"KONEC\";\r\n\t\t\t\t//return;\t\r\n\t\t\t\t$zprava = \"Obrázek se stejným názvem nahrál jiný uživatel. Je nutné jej nejdříve smazat.\";\r\n\t\t\t\tprihlasUzivatele($jmenoAktivnihoUzivatele, $IDAktivnihoUzivatele,$pripojeni);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\techo \"<script type='text/javascript'>\r\n\t\t\t\tprepniTab(event, 'tabObsah2');\t\t \r\n\t\t\t\t</script>\";\r\n\t\t\t\t$retezec = \"<script type='text/javascript'> alert('\" . $zprava . \"'); </script>\";\r\n\t\t\t\techo $retezec;\t\r\n\t\t\t\treturn;\t\t\r\n\t\t\t}\r\n\t\t\t \r\n\t\t }\r\n\t\t \r\n\t\t \r\n\t\t $DBObjekt -> saveObrazek($obrazek);\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//echo \"START <br>\";\r\n\r\n\t\tif ($_FILES[\"obrazekVstup\"][\"error\"] > 0)\r\n\t\t {\r\n\t\t //echo \"Error: \" . $_FILES[\"obrazekVstup\"][\"error\"] . \"<br />\";\r\n\t\t $zprava = \"Error: \" . $_FILES[\"obrazekVstup\"][\"error\"] . \"<br />\";\r\n\t\t }\r\n\t\telse\r\n\t\t {\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\techo \"Upload: \" . $_FILES[\"obrazekVstup\"][\"name\"] . \"<br />\";\r\n\t\t\techo \"Type: \" . $_FILES[\"obrazekVstup\"][\"type\"] . \"<br />\";\r\n\t\t\techo \"Size: \" . ($_FILES[\"obrazekVstup\"][\"size\"] / 1024) . \" Kb<br />\";\r\n\t\t\techo \"Stored in: \" . $_FILES[\"obrazekVstup\"][\"tmp_name\"]. \"<br />\";\t\t \r\n\t\t\techo \"Uploaded by: \" . $_SESSION[\"userName\"]. \"<br />\";\r\n\t\t\techo \"Uploaded by user ID: \" . $_SESSION[\"userID\"]. \"<br />\";\r\n\t\t\t*/\r\n\t\t\r\n\t\t \r\n\t\t $target_dir = \"obrazky/\";\r\n\t\t $target_file = $target_dir . basename($_FILES[\"obrazekVstup\"][\"name\"]);\r\n\t\t $prubehOK= move_uploaded_file($_FILES[\"obrazekVstup\"][\"tmp_name\"], $target_file);\r\n\t\t \r\n\t\t if($prubehOK == true){\r\n\t\t\t//echo \"Nahráno do /obrázky\";\r\n\t\t\t$zprava = \"Obrázek nahrán\";\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t }\r\n\t\t \r\n\t\t }\r\n\t\t \r\n\t\t \t\t\t\r\n\t\t \r\n\t\t prihlasUzivatele($jmenoAktivnihoUzivatele, $IDAktivnihoUzivatele,$pripojeni);\r\n\t\t \r\n\t\t echo \"<script type='text/javascript'>\r\n\t\t prepniTab(event, 'tabObsah1');\t\t \r\n\t\t </script>\";\r\n\t\t \r\n\t\t \r\n\t\t $retezec = \"<script type='text/javascript'> alert('\" . $zprava . \"'); </script>\";\r\n\t\t \r\n\t\t //echo \"<script type='text/javascript'> alert('HAHA'); </script>\";\r\n\t\t echo $retezec;\r\n\t\t \r\n\t}", "title": "" }, { "docid": "d7cfdc9bb9792a94f51c7042f1b3f1c7", "score": "0.5711653", "text": "private function createFile($path) {\n\n\t\t$file = substr($path, strlen(dirname(HOMEPAGE_BASE_PATH)));\n\n\t\t$tmp = explode(\"/\", $file);\n\t\tif($tmp[0] == '') array_shift($tmp);\n\n\t\t$fileName = array_pop($tmp);\n\n\t\t$currentPath = dirname(HOMEPAGE_BASE_PATH);\n\t\tforeach($tmp as $dir) {\n\n\t\t\t$currentPath .= '/' . $dir;\n\t\t\tif(!file_exists($currentPath)) {\n\n\t\t\t\tmkdir($currentPath, 0777);\n\t\t\t}\n\t\t}\n\n\t\ttouch($path);\n\t\tchmod($path, 0777);\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "0abda0dfcb38b66f715e1b0ce2114a5b", "score": "0.56988096", "text": "function uploadFile($file,$attr_name,$menutype=null)\n\t{\n\t\tglobal $config;\n\t\tdate_default_timezone_set('America/New_York');\n\t\t$path=\"./\".$config['repository_url'].$menutype.\"/\";\n\t\t\t\t\n\t\t$gdate = date('ymdhis', time());\n\t\t\n\t\t$filename = $file[$attr_name]['name'];\n\t\t\n\t\t$filename=explode(\".\",$filename);\n\t\t$filename=mt_rand().$gdate.\".\".$filename[1];\n\t\t\n\t\t$v4uuid = $this->generate_uuid();\n\t\t$dest_path=$this->createDirectories($v4uuid,$path);\n\t\t$repositoryPath=$dest_path.$filename;\n\t\n\t\tmove_uploaded_file($file[$attr_name]['tmp_name'],$repositoryPath);\n\t\t\n\t\t$repositoryPath=ltrim($repositoryPath,'.');\n\t\treturn $repositoryPath;\n\t}", "title": "" }, { "docid": "21927663ef34b64dc7ca655720d03863", "score": "0.5675666", "text": "public function testCheckIfIsFile()\n {\n $vfs = vfsStream::setup('home');\n\n $dir = $vfs->url();\n $file = vfsStream::url('home/test.txt');\n file_put_contents($file, \"The new contents of the file\");\n\n $this->assertFalse(Filesystem::isFile($dir));\n $this->assertTrue(Filesystem::isFile($file));\n }", "title": "" }, { "docid": "cc1d9654914902b09ff5da2fc446bd26", "score": "0.56746674", "text": "function limpaArquivo(){\n file_put_contents('../dados/clientes.txt','');\n }", "title": "" }, { "docid": "c4710f30b355e0c0ad0a12622adb2dcf", "score": "0.56706595", "text": "function _push_file($lokasi, $nama) {\r\r\t\tif(is_file($lokasi)) {\r\r\t\t\t//diperlukan untuk browser IE\r\t\t\tif(ini_get('zlib.output_compression')) {\r\r\t\t\t\tini_set('zlib.output_compression', 'Off');\r\t\t\t}\r\r\t\t\t//dapatkan tipe mime menggunakan ekstensi file\r\t\t\t//$this->load->helper('file');\r\r\t\t\t//codeigniter instance class\r\t\t\t$ci = &get_instance();\r\t\t\t$ci->load->helper('file');\r\r\t\t\t//gunakan tipe mime dari codeigniter\r\t\t\t$mime = get_mime_by_extension($lokasi);\r\r\t\t\t//bangun headernya untuk mempush out filenya dengan benar\r\t\t\theader('Pragma: public');\r\t\t\theader('Expires: 0');\r\t\t\theader('Cache-Control: must-revalidate, post-check=0, pre-check=0');\r\t\t\theader('Last-Modified: '.gmdate('D, d M Y H:i:s', filemtime($lokasi)).' GMT');\r\t\t\theader('Cache-Control: private',false);\r\t\t\theader('Content-Type: '.$mime);\r\t\t\theader('Content-Disposition: attachment; filename=\"'.basename($nama).'\"');\r\t\t\theader('Content-Transfer-Encoding: binary');\r\t\t\theader('Content-Length: '.filesize($lokasi));\r\t\t\theader('Connection: close');\r\t\t\treadfile($lokasi);\r\r\t\t\texit();\r\t\t}\r\t}", "title": "" }, { "docid": "4876f1499567728c98edddb8f63dacc6", "score": "0.5670507", "text": "static public function createWebRootFiles()\n\t{\n\t\t$filesToCreate = array(\n\t\t\t'/robots.txt',\n\t\t\t'/favicon.ico',\n\t\t);\n\t\tforeach($filesToCreate as $file)\n\t\t{\n\t\t\t@file_put_contents(PIWIK_DOCUMENT_ROOT . $file, '');\n\t\t}\n\t}", "title": "" }, { "docid": "b2cfb8af80c18b7f0cfa6e4971dd4774", "score": "0.5660089", "text": "function kirim($filee,$des){\n\t// $des = direktori destinasi + namafile\n\n\t$stat = move_uploaded_file($filee, $des);\n\treturn $stat;\n\n}", "title": "" }, { "docid": "4854be2e36ae4eb25a7d3e187873db57", "score": "0.56463176", "text": "function filexist($file) {\n\n if(file_exists('./uploads/'.$file)) {\n return TRUE;\n } else {\n return FALSE;\n }\n\n }", "title": "" }, { "docid": "251f999ca0a5eb3dec501c6fd60fec2f", "score": "0.56418824", "text": "function UploadFile($fupload_name){\n //direktori file\n $vdir_upload = \"../../../files/\";\n $vfile_upload = $vdir_upload . $fupload_name;\n\n //Simpan file\n move_uploaded_file($_FILES[\"fupload\"][\"tmp_name\"], $vfile_upload);\n}", "title": "" }, { "docid": "71fcfcfb1a38fef47b8bd10d2574e941", "score": "0.5639146", "text": "function existeArch($nombre){\n if(!file_exists('\"'.$nombre.'\"'))\n throw new exception('El archivo \"'.$nombre.'\" no ha sido encontrado');\n }", "title": "" }, { "docid": "cbcc125fb106c30988b2baf312bb0924", "score": "0.5632195", "text": "private function detectTemplateFile() {\r\n $this->templateFilePath = (file_exists(__DIR__ . '/' . $this->getName() . '.latte')) ? '/' . $this->getName() . '.latte' : self::DEFAULT_TEMPLATE;\r\n }", "title": "" }, { "docid": "272fd92a6e6748d6edf9b71ddbc7ab79", "score": "0.56238514", "text": "function cargaDirectorio($path)\n{\t\n echo $path.\"</br>\";\n if(function_exists(\"dir\"))\n {\n // asignamos a $directorio el objeto dir creado con la ruta\n $directorio = dir($path);\n print_r($directorio);\n echo \"</br>\";\n\n // recorremos todos los archivos y carpetas\n while ($archivo = $directorio->read())\n {\n if($archivo!=\".\" && $archivo!=\"..\")\n {\n if(is_dir($path.$archivo))\n {\n // Mostramos el nombre de la carpeta y los archivo contenidos en la misma\n echo \"<p><strong>CARPETA: \" . $archivo . \"</strong></p>\";\n $extraFiles=array();\n // llamamos nuevamente a la función con la nueva carpeta\n cargaDirectorio($path.$archivo.\"/\");\n }\n else\n {\t\n echo $archivo;\n echo \"</br>\";\n $filename=$path.$archivo;\n if(strpos(strtoupper($archivo),\".XML\"))\n { \n $location=Cargador::cargaFacturaXML($filename, $archivo, \"XML\", $extraFiles);\n echo \"</br>\";\n if($location->getBandError())\n echo \"<p>\".$location->getLocation().\"</p>\";\n else\n echo \"<a href=\".'http://'.email_host.':'. email_puerto .\"/dolibarr/\".$location->getLocation().\">\".$location->getRef().\"</a>\";\n }\n else\n {\n $extraFiles['name'][$j] = $archivo;\n $extraFiles['tmp_name'][$j] = $filename;\n $extraFiles['error'][$j]=0; \n $j++;\n }\n }\n }\n }\n $directorio -> close(); \n } else{\n echo \"No existe la funcion dir</br>\";\n }\n}", "title": "" }, { "docid": "9fb49ad2360a699c4b247591fdc4de40", "score": "0.5609833", "text": "function fileExists()\n {\n if($this->loaded)\n {\n \t$fileName = explode('.', $this->remote_filename);\n $fileExt = array_pop($fileName);\n return file_exists($this->doc_dir . '/' .\n $this->remote_filename[0] . '/' .\n $this->remote_filename[1].'/'.$this->id.'.'.$fileExt);\n }\n else\n return false;\n }", "title": "" }, { "docid": "035bb09c804a2074f7b6e75a553ac184", "score": "0.560689", "text": "function _create_directory()\n {\n// echo \"path of file to be saved\";\n// debug($this->file_write_path);\n if (!is_dir($this->file_write_path)) {\n mkdir($this->file_write_path, 0705, true);\n }\n }", "title": "" }, { "docid": "1ce795c0498818fadb6581ac3b3504bf", "score": "0.5590348", "text": "public function testAddingFile()\r\n\t{\r\n\t}", "title": "" }, { "docid": "7655eef76dad3b915eb60d635a5909bb", "score": "0.5584801", "text": "function UploadSosial($fupload_name){\n //direktori slide\n $vdir_upload = \"../../../joimg/sosial/\";\n $vfile_upload = $vdir_upload . $fupload_name;\n\n //Simpan gambar dalam ukuran sebenarnya\n move_uploaded_file($_FILES[\"fupload\"][\"tmp_name\"], $vfile_upload);\n}", "title": "" }, { "docid": "fca529ec0ed93dd7fc0c66a458927b42", "score": "0.5580048", "text": "function uploadnong($upload_path=\"\", $object=\"\", $file=\"\"){\r\n\t\t//$upload_path = \"./__repository/\".$folder.\"/\";\r\n\t\t\r\n\t\t$ext = explode('.',$_FILES[$object]['name']);\r\n\t\t$exttemp = sizeof($ext) - 1;\r\n\t\t$extension = $ext[$exttemp];\r\n\t\t\r\n\t\t$filename = $file.'.'.$extension;\r\n\t\t\r\n\t\t$files = $_FILES[$object]['name'];\r\n\t\t$tmp = $_FILES[$object]['tmp_name'];\r\n\t\tif(file_exists($upload_path.$filename)){\r\n\t\t\tunlink($upload_path.$filename);\r\n\t\t\t$uploadfile = $upload_path.$filename;\r\n\t\t}else{\r\n\t\t\t$uploadfile = $upload_path.$filename;\r\n\t\t} \r\n\t\t\r\n\t\tmove_uploaded_file($tmp, $uploadfile);\r\n\t\tif (!chmod($uploadfile, 0775)) {\r\n\t\t\techo \"Gagal mengupload file\";\r\n\t\t\texit;\r\n\t\t}\r\n\t\t\r\n\t\treturn $filename;\r\n\t}", "title": "" }, { "docid": "fca529ec0ed93dd7fc0c66a458927b42", "score": "0.5580048", "text": "function uploadnong($upload_path=\"\", $object=\"\", $file=\"\"){\r\n\t\t//$upload_path = \"./__repository/\".$folder.\"/\";\r\n\t\t\r\n\t\t$ext = explode('.',$_FILES[$object]['name']);\r\n\t\t$exttemp = sizeof($ext) - 1;\r\n\t\t$extension = $ext[$exttemp];\r\n\t\t\r\n\t\t$filename = $file.'.'.$extension;\r\n\t\t\r\n\t\t$files = $_FILES[$object]['name'];\r\n\t\t$tmp = $_FILES[$object]['tmp_name'];\r\n\t\tif(file_exists($upload_path.$filename)){\r\n\t\t\tunlink($upload_path.$filename);\r\n\t\t\t$uploadfile = $upload_path.$filename;\r\n\t\t}else{\r\n\t\t\t$uploadfile = $upload_path.$filename;\r\n\t\t} \r\n\t\t\r\n\t\tmove_uploaded_file($tmp, $uploadfile);\r\n\t\tif (!chmod($uploadfile, 0775)) {\r\n\t\t\techo \"Gagal mengupload file\";\r\n\t\t\texit;\r\n\t\t}\r\n\t\t\r\n\t\treturn $filename;\r\n\t}", "title": "" }, { "docid": "4d3b5f1f03a920d61a00615b53c59750", "score": "0.55734056", "text": "function is_file_exists($file) {\n return (file_exists(DATA_DIR . $file))? true : false;\n}", "title": "" }, { "docid": "178788e6bab289267cbfc6550de3085d", "score": "0.55690384", "text": "public function getFileBaseDir()\n {\n return Mage::getBaseDir('media').DS.'docwisement'.DS.'file';\n }", "title": "" }, { "docid": "b3eeec7c4944eb887052d29d359d7f80", "score": "0.55652535", "text": "public function getPathDescarga(){\n return Yii::$app->basePath.$this->path.$this->getNombreEnFileSystem();\n }", "title": "" }, { "docid": "1213813dc44babd772e2bf0eddc7993e", "score": "0.55645424", "text": "private function incluirArchivo(){\r\n\t\t//Forma la cadena del include y el nombre de la clase\r\n\t\t$this->nombreClase=self::$prefijo.$this->nombreClase;\r\n\t\t$this->rutaInclude='../'.$this->rutaArchivo.$this->nombreClase.'.php';\r\n\t\tinclude_once $this->rutaInclude;\r\n\t}", "title": "" }, { "docid": "aa226752f1e82e7054e3583c7e81c795", "score": "0.55589813", "text": "public function descargarInstanciado(){\n if (! file_exists($this->getPathDescarga())) {\n throw new \\yii\\web\\HttpException(404, 'El archivo que intenta ver no se encuentra.');\n }\n \n header('Content-Type: application/'.$this->extension);//\n header('Content-Disposition: attachment; filename='.$this->getNombreReal());\n header('Pragma: no-cache');\n //ob_clean(); //limpia el buffer de salida\n header(\"Cache-Control: public\");\n header(\"Content-Description: File Transfer\");\n header(\"Content-Transfer-Encoding: binary\");\n \n if (!readfile($this->getPathDescarga()))\n throw new \\yii\\web\\HttpException(404, 'Error al leer el archivo.');\n\n }", "title": "" }, { "docid": "f1eec7ad150d4ffaff36c9adb42f1d29", "score": "0.5557612", "text": "public function fileExists()\n {\n $args = JRequest::getVar('args',array());\n $path = JPATH_SITE.DS.array_shift($args);\n if (is_file($path)) { \n die('{\"jsonrpc\" : \"2.0\", \"result\" : {\"path\" : \"'.$path.'\"} }'); \n } else {\n die('{\"jsonrpc\" : \"2.0\", \"error\" : {\"code\": 0, \"message\": \"File does not exist: '.$path.'\"}}');\n }\n }", "title": "" }, { "docid": "dd88978bbca5714be39251c5cba357f6", "score": "0.55469745", "text": "public function agregarArchivo($nom_input_file){\n $urlArchivo = \"\";\n if (is_uploaded_file($_FILES[$nom_input_file]['tmp_name'])) {\n $nombreDirectorio = \"public/upload/estadisticas/\";\n $nombreFichero = $_FILES[$nom_input_file]['name'];\n //opcional\n $tipoArchivo = $_FILES[$nom_input_file]['type'];\n $extencionFichero = \".\" . substr(strrchr($tipoArchivo, \"/\"), 1);\n //\n //id unico de tiempo\n $idUnico = time();\n \n $urlArchivo = $nombreDirectorio .$idUnico. \"-\".$nombreFichero;\n move_uploaded_file($_FILES[$nom_input_file]['tmp_name'], $urlArchivo);\n \n return $urlArchivo;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "5983c0fc932ada422a71215bc5ee9128", "score": "0.554232", "text": "public function getFilePath();", "title": "" }, { "docid": "5983c0fc932ada422a71215bc5ee9128", "score": "0.554232", "text": "public function getFilePath();", "title": "" }, { "docid": "848c2853a1c47633597761ca6b962823", "score": "0.5536405", "text": "function doesFileExistOnS3($file, $tourID){\n\t\tglobal $awss3;\n\t\tif($awss3->doesObjectExist('tours/'.$tourID.'/'.$file)){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "d998bbc7619b68ec64b255d7044aebe5", "score": "0.5528558", "text": "public function ensureFilesExisting();", "title": "" }, { "docid": "70ea9066f2f61605e3886c59ef56b45b", "score": "0.5522876", "text": "function insertSlikaInDir($files, $path) {\n $allowed = array('png', 'jpg', 'gif', 'zip');\n $datoteka = new stdClass();\n $datoteka->naziv = NULL;\n $datoteka->putanja = NULL;\n if (isset($files['picture']) && $files['picture']['error'] == 0) {\n $extension = pathinfo($files['picture']['name'], PATHINFO_EXTENSION);\n $datoteka->naziv = $files['picture']['name'];\n\n if (!in_array(strtolower($extension), $allowed)) {\n header('location:' . URL . 'error');\n }\n if (!file_exists('public/img/' . $path)) {\n mkdir('public/img/' . $path, 0777, true);\n }\n if (move_uploaded_file($files['picture']['tmp_name'], 'public/img/' . $path . '/' . $files['picture']['name'])) {\n $datoteka->putanja = 'public/img/' . $path . '/' . $files['picture']['name'];\n }\n }\n return $datoteka;\n }", "title": "" }, { "docid": "167ad4b93feaf2d2eb2614d9831d962a", "score": "0.55180216", "text": "public function getFileBaseDir()\n {\n return Mage::getBaseDir('media').DS.'coursedoc';\n }", "title": "" }, { "docid": "50b4a5b50c855acf7cbe6cbce88cbd4e", "score": "0.5516126", "text": "function create(){\n // Delete it if `Files` has already been found\n if(file_exists($this->project_dir())) passthru('rm -rf ' . $this->root());\n mkdir($this->generated(), 0777, true);\n mkdir($this->original(), 0777, true);\n }", "title": "" }, { "docid": "dbb50a9b311b4bffa704e3034f4dee01", "score": "0.55020016", "text": "protected function create_file() {\n\t\t\treturn $this->get_filesystem()->put_contents(\n\t\t\t\t$this->get_file_path(),\n\t\t\t\t$this->create_file_contents(),\n\t\t\t\tFS_CHMOD_FILE\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "beb8790b07cb4b1f8886233f9dde428b", "score": "0.549981", "text": "public function putFile($path);", "title": "" }, { "docid": "f7d21014f14d1e426a21d7c4bf373730", "score": "0.5499166", "text": "private function newcachelibrary()\n {\n if(!file_exists( $this->storage() )) mkdir( $this->storage() ,0777, true);\n }", "title": "" }, { "docid": "8e4eca461226c9c55f83658251ae9b3d", "score": "0.54941356", "text": "function uploadnong($upload_path=\"\", $object=\"\", $file=\"\"){\n\t\t//$upload_path = \"./__repository/\".$folder.\"/\";\n\t\t\n\t\t$ext = explode('.',$_FILES[$object]['name']);\n\t\t$exttemp = sizeof($ext) - 1;\n\t\t$extension = $ext[$exttemp];\n\t\t\n\t\t$filename = $file.'.'.$extension;\n\t\t\n\t\t$files = $_FILES[$object]['name'];\n\t\t$tmp = $_FILES[$object]['tmp_name'];\n\t\tif(file_exists($upload_path.$filename)){\n\t\t\tunlink($upload_path.$filename);\n\t\t\t$uploadfile = $upload_path.$filename;\n\t\t}else{\n\t\t\t$uploadfile = $upload_path.$filename;\n\t\t} \n\t\t\n\t\tmove_uploaded_file($tmp, $uploadfile);\n\t\tif (!chmod($uploadfile, 0775)) {\n\t\t\techo \"Gagal mengupload file\";\n\t\t\texit;\n\t\t}\n\t\t\n\t\treturn $filename;\n\t}", "title": "" }, { "docid": "52df9a0dc7964d82c5b13db6a755c22c", "score": "0.54836506", "text": "public function upload_comunicado($tipo,$dni,$nombre) {\n $linkDocumento='../../vista/Comunicado/';\n if(!file_exists($linkDocumento)){\n mkdir(\"$linkDocumento\",0777);\n }\n\n $linkRecurso2='../../vista/Comunicado/'.$nombre;\n if(file_exists($linkRecurso2)){\n unlink($linkRecurso2);\n }\n if(isset($_FILES[\"adjuntar_documento\"])){\n\n $extension = explode('.', $_FILES['adjuntar_documento']['name']);\n $destination ='../../vista/Comunicado/'.$nombre;\n $subida = move_uploaded_file($_FILES['adjuntar_documento']['tmp_name'], $destination);\n return $subida;\n\n }\n\n }", "title": "" }, { "docid": "21e40df95ca6e202c41b9bd78c92af25", "score": "0.5477088", "text": "public function testExistsReturnFalseOnNonExistingFile() {\n\n\t\t$resource = new XMLResource($this->fileInfo);\n\n\t\t$this->assertFalse($resource->exists());\n\t}", "title": "" }, { "docid": "ab3aad52363beeb52e64153369210985", "score": "0.5476582", "text": "protected function abrirArchivo($id){\n\t\t$info = Subida::findOrFail($id);\n\t\treturn file('/var/www/html/sirge3/storage/uploads/profe/' . $info->nombre_actual);\n\t}", "title": "" }, { "docid": "e57e6cab56bafc5f70802151d8692ed8", "score": "0.5475842", "text": "function savefile($name,$type,$tmp_name,$size,$valor) {\n\t$mensaje='';\n\t$fp = fopen($tmp_name, \"rb\");\n\t$tfoto = fread($fp, filesize($tmp_name));\n\t$tfoto = addslashes($tfoto);\n\tfclose($fp);\n\t/*/ Borra archivos temporales si es que existen*/\n\t@unlink($tmp_name);\n\t/*/ Guardamos todo en la base de datos #nombre de la foto*/\n\n\tif ($valor!=0) {\n\n\t$obj = new Consultas('foto');\n\t$obj->Select();\n\t$obj->Where('oid', trim($valor)); \n\t//var_dump($obj);\n\t$resultado = $obj->Ejecutar();\n\t}\n\t$nombres[]='fotoname';\n\t$valores[]=$name;\n\t$nombres[]='fotosize';\n\t$valores[]=$size;\n\t$nombres[]='fototype';\n\t$valores[]=$type;\n\t$nombres[]='fotocontent';\n\t$valores[]=$tfoto;\n \n\tif ($resultado['numfilas']>0)\n\t{\n\t $obj = new Consultas('foto');\n\t $obj->Update($nombres, $valores);\n\t $obj->Where('oid', trim($valor)); \n\t $resultado = $obj->Ejecutar();\n\t} else {\n\t $obj = new Consultas('foto');\n\t $obj->Insert($nombres, $valores);\n\t $resultado = $obj->Ejecutar();\n\t } \n if($resultado[\"estado\"]==\"ok\"){\n\t $mensaje.=\"El archivo \".$name.\" ha sido guardado con exito\";\n } else {\n\t $mensaje.=\"Error el archivo \".$name.\" no ha sido guardado\";\n }\n}", "title": "" }, { "docid": "c953ab3d9cac2b35ed8dc0af0ed4f91a", "score": "0.5468881", "text": "private function create_v_file($path){\n\t\tif (!file_exists($path)) {\n\t\t\t$handle_param = 0;\n\t\t\t$handle = fopen($path, 'w');\n\t\t\tfwrite($handle, $handle_param);\n\t\t\tfclose($handle);\n\t\t}\n\t}", "title": "" }, { "docid": "c42cce76135d621eab4924a270b0d641", "score": "0.5468521", "text": "public function directorys_exist($file_name=''){\n $remove_file_ext = explode('.zip', $file_name);\n $src_path=$this->CI->destination_path.$remove_file_ext[0].'/';\n $glob=glob($src_path.'*', GLOB_MARK);\n $count_glob=count($glob); \n if($count_glob===1){ \n $src_path_subpath=$src_path.$remove_file_ext[0].'/'; \n // compy all files and folders to back folder\n $this->copy_directorys_files($src_path_subpath,$src_path); \n // delete files and folders\n $this->delete_theme($src_path_subpath, $deleteRootToo=TRUE);\n }\n }", "title": "" }, { "docid": "342a38b16fb8ac874aeb048c89a406da", "score": "0.5467866", "text": "function feltoltes($nev, $path) {\n\tglobal $_FILES;\n\t//echo $_FILES[$nev][\"tmp_name\"];\n\tif (is_uploaded_file($_FILES[$nev][\"tmp_name\"])) {\n\t\tmove_uploaded_file ($_FILES[$nev][\"tmp_name\"], $path);\n\t\t@chmod ($path, 0777);\n\t\treturn $_FILES[$nev][\"name\"];\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "e07441410043e9c630a24a8a3cb7f59a", "score": "0.54663324", "text": "public function testFileExists() {\n\t\t$this->assertTrue(FileSystem::fileExists($this->actual_file));\n\t\t$this->assertFalse(FileSystem::fileExists($this->invalid_file));\n\t}", "title": "" }, { "docid": "031eb2a5d1fde5f20b8b64f5ad81ab3d", "score": "0.5463968", "text": "public function createTestFile($path)\n {\n \\File::put(public_path($path), 'foo');\n }", "title": "" }, { "docid": "fcd5fa76d491966cd562a6c96ab5e258", "score": "0.5459924", "text": "function get_file_deleted($s_up_path = '', $s_file_name = '')\r\n{\r\n\ttry\r\n {\r\n \tif(is_dir($s_up_path) && fileperms($s_up_path)!='0777')\r\n\t\t\t{\r\n\t\t\t\tchmod($s_up_path, 0777);\r\n\t\t\t}\r\n\r\n\t\t\tif(file_exists($s_up_path.$s_file_name))\r\n\t\t\t{\r\n\t\t\t\t @unlink($s_up_path.$s_file_name);\r\n\t\t\t\t return TRUE;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn FALSE;\r\n\t\t\t}\r\n\r\n }\r\n catch(Exception $err_obj)\r\n {\r\n show_error($err_obj->getMessage());\r\n }\r\n\r\n}", "title": "" }, { "docid": "51a897695c8b1ba0500e55020a42266b", "score": "0.54590017", "text": "public function file();", "title": "" }, { "docid": "51a897695c8b1ba0500e55020a42266b", "score": "0.54590017", "text": "public function file();", "title": "" }, { "docid": "51a897695c8b1ba0500e55020a42266b", "score": "0.54590017", "text": "public function file();", "title": "" }, { "docid": "51a897695c8b1ba0500e55020a42266b", "score": "0.54590017", "text": "public function file();", "title": "" }, { "docid": "d52f780ec3d48754bbc359d555cf7813", "score": "0.5458115", "text": "public function testNonExistent()\n {\n $path = __DIR__ . \"/somedir/yet-another-file.txt\";\n $file = \\Loom\\File::fromPath($path);\n \n $this->assertFalse($file->read());\n $this->assertEmpty($file->getContent());\n }", "title": "" }, { "docid": "80db9b4b12d3a51efc8a0dee4d022569", "score": "0.54472554", "text": "function prepareFile()\n{\n $name = $_FILES[\"file\"][\"name\"]; //oryginalna nazwa wyslanego pliku\n $path = $_FILES[\"file\"][\"tmp_name\"]; //sciezka do pliku na serwerze, tymczasowa nazwa pliku,ktory zostal wyslany na serwer,uzyta zostanie do skopiowania do folderu docelowego\n $destination = Config::$tmpPath . $name; //plik na serwerze w bierzacym katalogu\n move_uploaded_file($path, $destination); //przenosi zuploadowane pliki do nowej lokacji\n return new File($destination, $name);\n}", "title": "" }, { "docid": "1fd1368c1c86e2312530278cad827c06", "score": "0.54455495", "text": "public function testExists() {\n\t\t$this->assertTrue(FileSystem::exists($this->actual_file));\n\t\t$this->assertTrue(FileSystem::exists($this->actual_folder));\n\t\t$this->assertFalse(FileSystem::exists($this->invalid_file));\n\t}", "title": "" }, { "docid": "888203624f5e0b5fe86ee5670809e46d", "score": "0.544141", "text": "public function upload_documento($tipo,$dni,$nombre) {\n $linkDocumento='../../vista/FotosAlumno/';\n if(!file_exists($linkDocumento)){\n mkdir(\"$linkDocumento\",0777);\n }\n $linkRecurso='../../vista/FotosAlumno/'.$dni.\"/\";\n if(!file_exists($linkRecurso)){\n mkdir(\"$linkRecurso\",0777);\n }\n if($tipo==2){\n //editar\n\n $linkRecurso2='../../vista/FotosAlumno/'.$dni.'/'.$nombre.'.jpg';\n if(file_exists($linkRecurso2)){\n unlink($linkRecurso2);\n }\n if(isset($_FILES[\"adjuntar_documento\"])){\n\n $extension = explode('.', $_FILES['adjuntar_documento']['name']);\n $destination ='../../vista/FotosAlumno/'.$dni.'/'.$nombre.'.jpg';\n $subida = move_uploaded_file($_FILES['adjuntar_documento']['tmp_name'], $destination);\n return $subida;\n\n }\n\n\n }else{\n //registrar\n if(isset($_FILES[\"adjuntar_documento\"])){\n\n $extension = explode('.', $_FILES['adjuntar_documento']['name']);\n $destination ='../../vista/FotosAlumno/'.$dni.'/'.$nombre.'.jpg';\n $subida = move_uploaded_file($_FILES['adjuntar_documento']['tmp_name'], $destination);\n return $subida;\n }\n }\n\n\n\n }", "title": "" }, { "docid": "524ad46f4c562f12a848507bf3d26a72", "score": "0.544027", "text": "function save()\n{\n\t//echo \",sdhjdsjhfgdhfjgs\";\n\t$uploaddir = $_SERVER['DOCUMENT_ROOT'].'/price/';\n\tif ( !file_exists($uploaddir) ) mkdir($uploaddir,0777);\n\telse chmod($uploaddir,0777);\n\t\n\t$my_file = $_FILES['filename']['name'];\n\t//echo $_FILES['filename']['name'];\n\t$uploaddir1 = $uploaddir.$_FILES['filename']['name'];\n\t$filename = $_FILES['filename']['tmp_name'];\n\tif ( !copy($filename,$uploaddir1) ){\n echo \"<br><h1>Ошибка загрузки файла на сервер!!!</h1><br>\";\n chmod($uploaddir,0755);\n return false;\n }\n\telse echo \"<h3>Загрузка файла прошла успешно!</h3>\";\n\tchmod($uploaddir,0755);\n \n\t$q = \"update `\".TblModCatalogFileManager.\"` set `path`='\".$my_file.\"' where `id`=1\";\n\t//echo $q;\n\t$res = $this->Right->Query( $q, $this->user_id, $this->module );\n\tif(!$res){echo \"Ошибка внесения пути файла в базу данных!!!\"; return false;}\n\telse \n\techo \"Путь к файлу был успешно внесён в базу данных.\";\n\treturn true;\n\t$this->show();\n\t\n}", "title": "" }, { "docid": "ec884c372680f315364ebcd29d290b11", "score": "0.5438673", "text": "public function cargar($id,$nombre,$file){\n //mkdir(\"./comprobante/\".$id,0700);\n $config['upload_path'] = \"./comprobantes/\";\n $config['allowed_types'] = 'gif|jpg|png|pdf';\n $config['max_size'] = 1000;\n $config['max_width'] = 1024;\n $config['max_height'] = 768;\n $config['file_name'] = $nombre;\n $ruta=\"userfile\".$file; \n \n $this->load->library('upload');\n $this->upload->initialize($config,true);\n if ( $this->upload->do_upload($ruta))\n {\n $this->add_c_electronico($id,$nombre);\n }\n else\n {\n return false;\n $config=null;\n }\n $config=null;\n \n }", "title": "" }, { "docid": "882ee3e2c3a57094f226145e2ffade8b", "score": "0.5438311", "text": "function file_force_contents( $fullPath, $contents = \"\", $flags = 0 ){\n $parts = explode( '\\\\', $fullPath );\n array_pop( $parts );\n $dir = implode( '\\\\', $parts );\n \n if( !is_dir( $dir ) )\n mkdir( $dir, 0777, true );\n \n file_put_contents( $fullPath, $contents, $flags );\n }", "title": "" }, { "docid": "a50cf300180dbb4797ee288ab37afa2c", "score": "0.543609", "text": "function _getFilePath($id, $group){\n\t\t$folder = $group;\n\t\t$name = md5($this->_application . '-' . $id . '-' . $this->_hash . '-' . $this->_language) . '.php';\n\t\t$dir = $this->_root . DS . $folder;\n\t\t// If the folder doesn't exist try to create it\n\t\tif(!is_dir($dir)){\n\n\t\t\t// Make sure the index file is there\n\t\t\t$indexFile = $dir . DS . 'index.html';\n\t\t\t@ mkdir($dir) && file_put_contents($indexFile, '<html><body bgcolor=\"#FFFFFF\"></body></html>');\n\t\t}\n\n\t\t// Make sure the folder exists\n\t\tif(!is_dir($dir)){\n\t\t\treturn false;\n\t\t}\n\t\treturn $dir . DS . $name;\n\t}", "title": "" }, { "docid": "f663378e2963de0408759ec180961576", "score": "0.5430874", "text": "protected function download()\n\t{\n\t\t$this->info('Stahuji editor');\n\t\t$file = $this->config['new_dir'].DIRECTORY_SEPARATOR.'editor.zip';\n\t\t$this->downloadFile($this->config['url'], $file);\n\t\t$this->infoLine('OK');\n\t\t\n\t\t$this->info('Rozbaluji editor');\n\t\t$this->unzipFile($file, $this->config['new_dir']);\n\t\t$this->deleteFile($file);\n\t\t$this->infoLine('OK');\n\t\t\n\t\t$this->info('Presouvam adresare editoru');\n\t\t$this->moveFiles($this->config['new_dir'].DIRECTORY_SEPARATOR.'tinymce'.DIRECTORY_SEPARATOR.'js'.DIRECTORY_SEPARATOR.'tinymce', $this->config['new_dir']);\n\t\t$this->deleteDir($this->config['new_dir'].DIRECTORY_SEPARATOR.'tinymce');\n\t\t$this->infoLine('OK');\n\n\t\tforeach ($this->config['language_urls'] as $lang => $url)\n\t\t{\n\t\t\t$this->info('Stahuji jazyk '.strtoupper($lang));\n\t\t\t$file = $this->config['new_dir'].DIRECTORY_SEPARATOR.$lang.'.zip';\n\t\t\t$this->downloadFile($url, $file);\n\t\t\t$this->infoLine('OK');\n\t\t\t\n\t\t\t$this->info('Rozbaluji jazyk '.strtoupper($lang));\n\t\t\t$this->unzipFile($file, $this->config['new_dir']);\n\t\t\t$this->deleteFile($file);\n\t\t\t$this->infoLine('OK');\n\t\t}\n\t\t\n\t\t$this->info('Prejmenovavam soubory jazyku');\n\t\t$langsDir = $this->config['new_dir'].DIRECTORY_SEPARATOR.'langs';\n\t\t$files = scandir($langsDir);\n\t\t\n\t\tforeach ($files as $file)\n\t\t{\n\t\t\tif ($file != '.' and $file != '..')\n\t\t\t{\n\t\t\t\t$src = $langsDir.DIRECTORY_SEPARATOR.$file;\n\t\t\t\t$dst = $langsDir.DIRECTORY_SEPARATOR.preg_replace('/_[A-Z]{2}/', '', $file);\n\t\t\t\t$this->renameFile($src, $dst);\n\t\t\t}\n\t\t}\n\n\t\t$this->infoLine('OK');\n\t}", "title": "" }, { "docid": "f1f813a3baf96e300f16b6ca0400edaf", "score": "0.54306823", "text": "protected abstract function fileExists($path);", "title": "" }, { "docid": "b969f5b26f52bd8cea121e9a78bcc094", "score": "0.54247534", "text": "function listFiles($user,$project){\r\n $dossier = $user.\"/\".$project;\r\n if(!file_exists($user.\"/\".$project))\r\n mkdir($user,0700);\r\n $userdir = opendir($user.\"/\".$project) or die('Erreur');\r\n $retour = array();\r\n $index = 0;\r\n while($entree = @readdir($userdir)){\r\n if(!is_dir($dossier.'/'.$entree) && $entree != '.htaccess' && $entree != '.' && $entree != '..') {\r\n $cut = preg_split(\"/\\./\", $entree);\r\n $ext=$cut[count($cut)-1];\r\n if($ext == \"png\" || $ext == \"gif\" || $ext == \"jpg\" || $ext == \"jpeg\" || $ext == \"tex\"){\r\n array_push($retour,$entree);\r\n }\r\n }\r\n }\r\n closedir($userdir);\r\n return $retour;\r\n}", "title": "" }, { "docid": "5c3c87bc61db90011c73d098cc4e38b8", "score": "0.5424575", "text": "function creerFichier() {\r\n\t if ($this->modif) $chem=\"../\";\r\n\t\t\r\n\t $liste=explode(\".\",$this->nomFichier);\r\n\t if ($liste[4]) $ext=$liste[4]; else if ($liste[3]) $ext=$liste[3]; else if ($liste[2]) $ext=$liste[2]; else $ext=$liste[1]; \r\n\t $nom_fichier=$liste[0].\".\".$ext;\r\n\t @move_uploaded_file($this->tmp_name, $chem.\"fichiers/\".$nom_fichier);\t\r\n\t\t\r\n\t\tmysql_query(\"INSERT INTO if_fichier (nom_fichier) VALUES ('$nom_fichier')\");\r\n\t\t$this->numfichier=mysql_insert_id();\r\n\t\t\r\n\t\treturn $this->numfichier; \r\n\t}", "title": "" }, { "docid": "fa2248ecd5cf29db09b2df0faec47ade", "score": "0.5422241", "text": "public function check_files()\n {\n }", "title": "" }, { "docid": "b628d6eec032b0f5fd5e2caf4d41094b", "score": "0.54220617", "text": "function sukses(){\n\t\techo \"folder berhasil di buat\";\n\t}", "title": "" }, { "docid": "f868987471dbcba9fc7961e0d6c9ccdd", "score": "0.5421191", "text": "function uploader($infos, $dossier = \"images\")\n{\n\n // creer le dossier s'il n'exsite\n if (!is_dir($dossier)) {\n mkdir($dossier);\n }\n $tmp = $infos['tmp_name'];\n $nom = $infos['name'];\n $path_parts = pathinfo($nom);\n //var_dump($path_parts);\n $ext = strtolower($path_parts[\"extension\"]);\n $new_name = md5(date('YmdHis') . '_' . rand(0, 9999)) . '.' . $ext;\n // les extensions autorisees\n $autorise = ['jpg', 'png', 'jpeg', 'gif'];\n $chemin = \"images/$new_name\";\n if (!in_array($ext, $autorise)) {\n die(\"Ce n'est pas une image\");\n }\n $taille = filesize($tmp); // retourne la taille du fichier en octect\n if ($taille > 8 * 1024 * 1024) {\n die(\"Veulliez choisir un fichier de taille < 8Mo\");\n }\n if (!move_uploaded_file($tmp, $chemin)) {\n die(\"Probleme d'upload de l'image\");\n };\n\n return $chemin;\n}", "title": "" }, { "docid": "982118415b74487e66260a5981bd2021", "score": "0.54190725", "text": "function directorio_absoluto()\r\n\t{\r\n\t\t$id_pm = $this->dr_molde->tabla('molde')->get_fila_columna(0, 'punto_montaje');\r\n\t\tif (! is_null($id_pm) && ($id_pm !== 0)) {\r\n\t\t\t$punto_montaje = toba_pms::instancia()->get_instancia_pm_proyecto($this->get_proyecto(), $id_pm);\r\n\t\t\t$path = $punto_montaje->get_path_absoluto() . '/';\r\n\t\t} else {\r\n\t\t\t$path = toba::instancia()->get_path_proyecto($this->id_molde_proyecto) . '/php/';\r\n\t\t}\r\n\t\treturn $path;\r\n\t}", "title": "" }, { "docid": "d3c76b79069fb4372542852377efdfcd", "score": "0.541776", "text": "function tripal_annot_check_file_dir()\n{\n\t$dirname = variable_get(\"annot_files_dir\");\n\t$dir = DRUPAL_ROOT.\"/\".tripal_get_files_dir().\"/$dirname\";\n\tif (is_dir($dir))\n\t{\n\t\treturn 1;\n\t}\n\telse\n\t{\n\t\tif (is_link($dir) )\n\t\t{\n\t\t\t$realpath = readlink($dir);\n\t\t\tmkdir($realpath,755);\n\t\t\tsystem(\"chmod 755 $realpath\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tmkdir($dir,755);\n\t\t\tsystem(\"chmod 755 $dir\");\n\t\t}\n\t}\n\tif (is_dir($dir))\n\t{\n\t\treturn 1;\n\t}\n\treturn 0;\n}", "title": "" }, { "docid": "7601c6e538a062d87a379b0152211024", "score": "0.54168385", "text": "public function isFile () {}", "title": "" }, { "docid": "7601c6e538a062d87a379b0152211024", "score": "0.54168385", "text": "public function isFile () {}", "title": "" }, { "docid": "7601c6e538a062d87a379b0152211024", "score": "0.54168385", "text": "public function isFile () {}", "title": "" }, { "docid": "7601c6e538a062d87a379b0152211024", "score": "0.54168385", "text": "public function isFile () {}", "title": "" }, { "docid": "7601c6e538a062d87a379b0152211024", "score": "0.54168385", "text": "public function isFile () {}", "title": "" }, { "docid": "1cc501e3f3aae106d4613782a6733592", "score": "0.5416424", "text": "function sarkaspipr_mes_fichiers_a_sauver($flux){\r\n\t$tmp_fonds = defined('_DIR_TMP') ? _DIR_TMP.'fonds/': _DIR_RACINE.'tmp/fonds/';\r\n\t$tmp_styles = defined('_DIR_TMP') ? _DIR_TMP.'cfg/': _DIR_RACINE.'tmp/cfg/';\r\n\r\n\t// le repertoire des images de fonds pour les styles\r\n\tif (@is_dir($tmp_fonds))\r\n\t\t$flux[] = $tmp_fonds;\r\n\t// le repertoire sauvegardes du cfg des styles\r\n\tif (@is_dir($tmp_styles))\r\n\t\t$flux[] = $tmp_styles;\r\n\r\n\tspip_log('*** sarkaspip_mes_fichiers_a_sauver ***');\r\n\tspip_log($flux);\r\n\treturn $flux;\r\n}", "title": "" }, { "docid": "9f494c329958c299c962d54767192859", "score": "0.54161125", "text": "function json_directory() {$dir = $_SERVER['DOCUMENT_ROOT'] . '/api';if (!file_exists($dir)) {mkdir($dir, 0755);}return $dir;}", "title": "" }, { "docid": "d11cec85b3d6ecb011f5253c45c1caa0", "score": "0.54159606", "text": "abstract protected function getFileTemplatePath() : string;", "title": "" }, { "docid": "8a8a87e50e161001098f82db48a66a78", "score": "0.54153824", "text": "function initFilesystem() {\n makeDirIfNeeded('./remoteimages/');\n makeDirIfNeeded('./remoteimages/originals/');\n makeDirIfNeeded('./remoteimages/snapshot/');\n}", "title": "" }, { "docid": "3ff4829b78434a46ffbbb60d0eb24e4d", "score": "0.54139274", "text": "function getResourceDirectory();", "title": "" }, { "docid": "dfab8b5b17942f2d1d3e46487081812e", "score": "0.5413613", "text": "function AlteracaoFile($file, $dir = null) {\n if(!is_null($dir)){\n $diretorio = $dir;\n }else{\n $diretorio = \"../resources/js/\";\n }\n \n echo filemtime($diretorio.$file);\n}", "title": "" }, { "docid": "a2c0a3163b2840c4046ed2911e29fe94", "score": "0.54112273", "text": "public function testAddAisleFileByURL()\n {\n }", "title": "" }, { "docid": "ceab67965c47df2170a8c61848d897b2", "score": "0.5411184", "text": "function createFileData($user,$project,$file,$data){\r\n if(!check($project) || !check($file))\r\n return 0;\r\n if(!file_exists($user.\"/\".$project.\"/\".$file)){\r\n $fil = fopen($user.\"/\".$project.\"/\".$file, 'w');\r\n if(isTex($file))\r\n $data = latexRemoveUnsafe($data);\r\n fwrite($fil, $data);\r\n fclose($fil);\r\n return 1;\r\n }else{\r\n return 2;\r\n }\r\n}", "title": "" }, { "docid": "bbaff8cffdda212c8d7b58bfaba9b75f", "score": "0.5406669", "text": "private function _crearArchivoIndex($carpeta)\n {\n $archivo = $carpeta.'index.html';\n $contenido = \"<html><head><title>403 Proibida</title></head>\".\n \"<body>Ação Proibida.</body></html>\";\n\n // CREAMOS EL ARCHIVO SI NO EXISTE\n if (!file_exists($archivo))\n {\n if (!$handle = @fopen($archivo, 'c')) die(\"No pudo abrir/crear el archivo\");\n if (@fwrite($handle, $contenido) === FALSE) die(\"No pudo escribir en archivo index\"); \n @fclose($handle);\n }\n return true;\n }", "title": "" }, { "docid": "cd4f9fb412b5a5f0a7b06579a53a6e39", "score": "0.54038644", "text": "function uploadedFile_path($name='rec_letter_file',$onlyIfExists=True){\n return parent::uploadedFile_path($name,True);\n }", "title": "" }, { "docid": "3e9578748f33f2977e300bec82bd211e", "score": "0.54031974", "text": "public function createImageToUpload(): void\n {\n copy(__DIR__ . '/../fixtures/test-files/spongebob.jpg', __DIR__ . '/../fixtures/spongebob.jpg');\n }", "title": "" } ]
084d537bb1a17342937f6429d9908ea4
Appends target to node as last child.
[ { "docid": "95845516dedbad15e98e4aa85318db50", "score": "0.50874114", "text": "public function append($target, $runValidation=true, $attributes=null) {\n return $target->appendTo($this->getOwner(), $runValidation, $attributes);\n }", "title": "" } ]
[ { "docid": "1b1d89733c80340250598bb3d9de02f3", "score": "0.754027", "text": "public function insert_as_last_child($target)\n {\n $target = $this->parent_from($target, $this->primary_column);\n return $this->insert($target, $this->right_column, 0, 1);\n }", "title": "" }, { "docid": "55989c76c1f6205e9152f15d758e948f", "score": "0.73263484", "text": "public function moveAsLast($target) {\n return $this->moveNode($target, $target->{$this->rightAttribute}, 1);\n }", "title": "" }, { "docid": "f29ad8364c51884f2dc833815d89a2bf", "score": "0.71178424", "text": "public function appendTo ($target) { \r\n\t\t\r\n\t\tif ($target = $this->process($target))\r\n\t\t\tforeach ($this as $node) \r\n\t\t\t\tif (get_class($target) === 'XDTNodeList' OR is_array($target)) \r\n\t\t\t\t\tforeach ($target as $t) $t->appendChild($node);\r\n\t\t\t\telse $target->appendChild($node);\r\n\t\t\t\t\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "7a62a5b729ed5dcfdb0915cd77785cf3", "score": "0.7076428", "text": "public function move_to_last_child($target)\n {\n $target = $this->parent_from($target, $this->primary_column);\n return $this->move($target, FALSE, 0, 1, TRUE);\n }", "title": "" }, { "docid": "ad4c0b7c7e6230fe66b74e2f8ec0f885", "score": "0.67325443", "text": "public function insertAfter ($target) { \r\n\t\t\r\n\t\tif ($target = $this->process($target)) \r\n\t\t\tforeach ($this as $node) \r\n\t\t\t\tif (get_class() === 'XDTNodeList') $target[0]->parentNode->insertBefore($node, $target[0]->nextSibling);\r\n\t\t\t\telse $target->parentNode->insertBefore($node, $target->nextSibling); \r\n\t\t\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "0d2a3f47fb756a98e05e0f0ca13994e0", "score": "0.6640642", "text": "public function moveAsLast ( $target ) {\n\t\t// check hasWeight\n\t}", "title": "" }, { "docid": "667287f4f64bea50b644f0ff19531a3b", "score": "0.647372", "text": "public function moveAfter($target) {\n return $this->moveNode($target, $target->{$this->rightAttribute} + 1, 0);\n }", "title": "" }, { "docid": "61c19c4971440a1e583cdb1a27329eb5", "score": "0.63093394", "text": "public function addChildAsLast(Node $node)\n {\n if(null === $this->children)\n {\n $this->children = array();\n }\n\n $this->children[] = $node;\n }", "title": "" }, { "docid": "03d024b812d70cf70686ae009d88a6f1", "score": "0.6281301", "text": "public function insertAsLastChildOf(Doctrine_Record $dest);", "title": "" }, { "docid": "296e2c7725315c1e04910c82bb128895", "score": "0.62242293", "text": "public function getLastChild();", "title": "" }, { "docid": "296e2c7725315c1e04910c82bb128895", "score": "0.62242293", "text": "public function getLastChild();", "title": "" }, { "docid": "231b8cb144fd2032eef84ec43bad7529", "score": "0.6130748", "text": "public function moveAsLastChildOf(Doctrine_Record $dest);", "title": "" }, { "docid": "c99f9056ec5f2c9131b36f7dd54beaff", "score": "0.6094446", "text": "public function insert_as_next_sibling($target)\n {\n $target = $this->parent_from($target, $this->parent_column);\n return $this->insert($target, $this->right_column, 1, 0);\n }", "title": "" }, { "docid": "195a9c7c4c3c4205b1e720be7b001758", "score": "0.59340626", "text": "function _appendToLastTextChild ($text) {\r\n $scount = count ($this->_stack);\r\n if ($scount == 0) {\r\n return false;\r\n }\r\n return $this->_stack[$scount-1]->appendToLastTextChild ($text);\r\n }", "title": "" }, { "docid": "089f6a78852eff58b9656e3da0f43555", "score": "0.591613", "text": "function appendChild(&$child) {\n \n // Set child's parentNode\n $child->parentNode = & $this;\n \n // Add child to list of childNodes\n $this->childNodes[] = & $child;\n \n // Is child of type node?\n if ($child->nodeType == XML_TYPE_NODE) {\n \n // Set child's previousSibling\n $child->previousSibling = & $this->lastChild;\n }\n \n // Is this node of type node?\n if ($this->nodeType != null && $this->nodeType == XML_TYPE_NODE) {\n \n // Set current lastChild's nextSibling to this child\n if (!is_null($this->lastChild)) {\n $this->lastChild->nextSibling = & $child;\n }\n \n // Now (re)set firstChild and lastChild\n $this->firstChild = & $this->childNodes[0];\n $this->lastChild = & $child;\n }\n \n }", "title": "" }, { "docid": "70d4dbe40ccb7484a1abce1330c9a0d3", "score": "0.5904955", "text": "public function insertAfter($target, $runValidation=true, $attributes=null) {\n return $this->addNode($target, $target->{$this->rightAttribute} + 1, 0, $runValidation, $attributes);\n }", "title": "" }, { "docid": "4b699b8adc42c6638a2fcb197a68ee43", "score": "0.59016144", "text": "protected function add_target($target) {\n\t\t/* Do we already have the target? Don't add */\n\t\tif(in_array($target, $this->all_targets))\n\t\t\treturn;\n\n\t\t/* All dependencies needs to be added first */\n\t\tforeach( $this->builders[$target]->get_dependencies() as $dependency ) {\n\t\t\t$this->add_target($dependency);\n\t\t}\n\n\t\t/* At last, add the target, since everything is met */\n\t\t$this->all_targets[] = $target;\n\t}", "title": "" }, { "docid": "aaea34b3cb2190e4dbe5009a4aaa79d8", "score": "0.58843845", "text": "public function insert_as_first_child($target)\n {\n $target = $this->parent_from($target);\n return $this->insert($target, $this->left_column, 1, 1);\n }", "title": "" }, { "docid": "49ecd670084abc58242aeb5bb0a8bb9a", "score": "0.5846276", "text": "public function appendTo($target, $runValidation=true, $attributes=null) {\n return $this->addNode($target, $target->{$this->rightAttribute}, 1, $runValidation, $attributes);\n }", "title": "" }, { "docid": "eee5ae6b276f453d073ac589ad2bf566", "score": "0.5841666", "text": "public function addLast($e) {\n\t\t$this->linkLast( $e );\n\t}", "title": "" }, { "docid": "92b888a3f6d9fba8fd3efbc85ab22921", "score": "0.5837706", "text": "public function removeLastChild();", "title": "" }, { "docid": "a2c734f96f7dae33c7f7c192be4894fd", "score": "0.5777413", "text": "function appendToLastTextChild ($text) {\r\n $ccount = count ($this->_children);\r\n if ($ccount == 0 || $this->_children[$ccount-1]->_type != STRINGPARSER_NODE_TEXT) {\r\n $ntextnode = new StringParser_Node_Text ($text);\r\n return $this->appendChild ($ntextnode);\r\n } else {\r\n $this->_children[$ccount-1]->appendText ($text);\r\n return true;\r\n }\r\n }", "title": "" }, { "docid": "8cc82d57a63f9212eb9d1ad65de54bad", "score": "0.57651496", "text": "public function addChild(HTMLElement $el) {\n\t\tparent::addChild($el);\n\t\t/* Add pointer to last child, and its children */\n\t\t$this->rAddPointers($this->getChild($this->getNoOfChildren()-1));\n\t}", "title": "" }, { "docid": "2d728bc08a3fb1e3adacbe68650d1eaf", "score": "0.5745917", "text": "public function linkLast($e) {\n\t\t/* @var $l Node */\n\t\t$this->testTypeParameters( $e );\n\t\t$l = $this->last;\n\t\t$newNode = new Node( $l, $e, null );\n\t\t$this->last = $newNode;\n\t\tif ($l == null) {\n\t\t\t$this->first = $newNode;\n\t\t} else {\n\t\t\t$l->next = $newNode;\n\t\t}\n\t\t$this->size++;\n\t\t$this->modCount++;\n\t}", "title": "" }, { "docid": "8fdcbbba242f38df41161076835d4ef4", "score": "0.5619801", "text": "public function appendToLastTextChild($text)\n {\n $ccount = count($this->_children);\n if ($ccount == 0 || $this->_children[$ccount-1]->_type != self::NODE_TEXT) {\n $ntextnode = new Text($text);\n return $this->appendChild($ntextnode);\n } else {\n $this->_children[$ccount-1]->appendText ($text);\n return true;\n }\n }", "title": "" }, { "docid": "3ef8f82a32977a2b5c22dee4638c8789", "score": "0.5578261", "text": "public function addLast($e);", "title": "" }, { "docid": "0a4898966c2b6bd61bf822fe44a47396", "score": "0.5564901", "text": "public function setAsLastChildOf($contextNodeOrSourceNodeId){\n $this->_nodePositionChangeType = 'lastChild';\n $this->_nodePositionChangeContext = $contextNodeOrSourceNodeId;\n return $this;\n }", "title": "" }, { "docid": "ee8f023aac2770e2b2c5c3a807248cd8", "score": "0.5402182", "text": "public function appendChild($child, ...$optionals);", "title": "" }, { "docid": "594ac93de782cb037f57b2f6765807ce", "score": "0.53561324", "text": "public function addChild(Node $child);", "title": "" }, { "docid": "31712cf5e4fd5fdc63e147535bce0d97", "score": "0.53545344", "text": "public function lastChild()\n {\n $node = $this->node->lastChild;\n\n if ($node === null) {\n return null;\n }\n\n return new Element($node);\n }", "title": "" }, { "docid": "658f99bcd8c7251e8e7ca36d1c372c3c", "score": "0.53471136", "text": "public function appendTo ( $target, $runValidation = true, $attributes = null ) {\n\t}", "title": "" }, { "docid": "ffccb79acd3b484b076018ee16ed81c4", "score": "0.5341925", "text": "public function moveLast()\n {\n $target = static::max($this->getPositionColumn());\n\n return $this->moveTo($target);\n }", "title": "" }, { "docid": "a2f0d8066f5fd4aa00783ed61b802168", "score": "0.5335536", "text": "public function appendChild(Pagemill_Node $node) {\r\n\t\t$tmp = new Pagemill_Stream(true);\r\n\t\t$node->rawOutput($tmp);\r\n\t\t$this->_text .= $tmp->peek();\r\n\t}", "title": "" }, { "docid": "3ba78524c76da207d54d9c50afe8f0af", "score": "0.52768993", "text": "public function move_to_next_sibling($target)\n {\n $target = $this->parent_from($target, $this->parent_column);\n return $this->move($target, FALSE, 1, 0, FALSE);\n }", "title": "" }, { "docid": "963a5afd6d542213cf6a4d05b7e15244", "score": "0.52755535", "text": "public function getLastChild()\n\t{\n\t\treturn $this->children[count($this->children)-1];\n\t}", "title": "" }, { "docid": "eada2cecc06d3be5700c859aad32be8c", "score": "0.5269048", "text": "function MoveLast() {}", "title": "" }, { "docid": "2f28f7323936e5d56bb60d44331188f7", "score": "0.51958644", "text": "public function last(): void\n {\n $this->position = max(0, $this->length - 1);\n }", "title": "" }, { "docid": "6106b880df3541ffce59305600971572", "score": "0.5192547", "text": "public function orX($child): void\n {\n $this->append($child);\n }", "title": "" }, { "docid": "94a934b318c49e4ee5382fdb58be8bd7", "score": "0.51888376", "text": "protected function appendContent($content, $targetFile)\n {\n file_put_contents($targetFile, $content, FILE_APPEND);\n }", "title": "" }, { "docid": "59893cb3e7a1516f808f4dedc54a8a28", "score": "0.5170713", "text": "public function addChild(Node $child){\n\t\t$this->children[] = $child;\n\t}", "title": "" }, { "docid": "151ebd03386b3873861c869f3c3791a3", "score": "0.5164887", "text": "public function append($obj) {\r\n\t\t$obj->pzkParentId = @$this->id;\r\n\t\t$this->children[] = $obj;\r\n\t}", "title": "" }, { "docid": "653c35f87a5acdcdc9d3ddb23b8478b0", "score": "0.5154955", "text": "public function append ( $target, $runValidation = true, $attributes = null ) {\n\t\treturn $target->appendTo($this->getOwner(), $runValidation, $attributes);\n\t}", "title": "" }, { "docid": "b3fa55445f0aaab11822807245aae357", "score": "0.515446", "text": "function append_node_last($lft,$data){\n\t\t$node = $this->get_node($lft);\n\t\tif(!$node)\n\t\t\treturn false;\n\t\treturn $this->insert_node($node[$this->right_col],$data);\n\t}", "title": "" }, { "docid": "80e576cbff58f77e0258e3141ff730a8", "score": "0.5153615", "text": "public function addChild($child)\r\n\t{\r\n\t\t$this->last = $child->last;\r\n\r\n\t\t$this->entries []= $child;\r\n\t}", "title": "" }, { "docid": "7c3c4141f5d73f9cf5291c538d43f6c0", "score": "0.5150789", "text": "public function move_to_first_child($target)\n {\n $target = $this->parent_from($target, $this->primary_column);\n return $this->move($target, TRUE, 1, 1, TRUE);\n }", "title": "" }, { "docid": "4ff606b2e40947a133ad9982231d8094", "score": "0.51505214", "text": "function addSubList($target){\r\n\t\tif($target->data==null) $target->data=new LinkedList($target->key);\r\n\t}", "title": "" }, { "docid": "02e0debfb21eb889b05993e4b8966da6", "score": "0.5147937", "text": "public function add($target) {\n if (!($target instanceof Worker)) {\n $target = new Worker($target);\n }\n $this->workers[$target->pid] = $target;\n $target->forward($this);\n return $target;\n }", "title": "" }, { "docid": "2e0bb76e9e097cca3d112918ac17b2cd", "score": "0.51380175", "text": "public function appendTo( ArrayNodeDefinition &$rootNode )\n\t{\n\t\t$rootNode->append( $this->addDaemonNode() );\n\t}", "title": "" }, { "docid": "ac1617d425d29245d360374da1b81120", "score": "0.5134899", "text": "function move_node_append_last($lft,$nlft){\n\t\t$node = $this->get_node($nlft);\n\t\tif(!$node)return false;\n\t\treturn $this->move_node($lft,$node[$this->right_col]);\n\t}", "title": "" }, { "docid": "08a25e8790eb041e890f59c9a567cb68", "score": "0.51009035", "text": "public function append(NodeDefinition $node): static;", "title": "" }, { "docid": "0dea7e12d37574099c2636e1e286819e", "score": "0.50957924", "text": "public function addLast( $val )\n {\n return $this->insertBefore($this->tail, $val);\n }", "title": "" }, { "docid": "f938780b399812cd7974cf1173c571a6", "score": "0.50696695", "text": "public function appendChild(Node $node)\n {\n $this->_children[] = $node;\n }", "title": "" }, { "docid": "b3ae134f2bdb8dc1fa275674dc7918e2", "score": "0.502882", "text": "public function addLast(mixed $item): void;", "title": "" }, { "docid": "99c652366e395297d5ea517d9ddcb74a", "score": "0.5003498", "text": "protected function addNode($target, $key, $value = '', $attributes = '', $child = '')\n {\n if (!isset($target[$key]['value']) && !isset($target[$key][0])) {\n if ($child != '') {\n $target[$key] = $child;\n }\n if ($attributes != '') {\n foreach ($attributes as $k => $v) {\n $target[$key][$k] = $v;\n }\n }\n\n $target[$key]['value'] = $value;\n } else {\n if (!isset($target[$key][0])) {\n // is string or other\n $oldvalue = $target[$key];\n $target[$key] = array();\n $target[$key][0] = $oldvalue;\n $index = 1;\n } else {\n // is array\n $index = count($target[$key]);\n }\n\n if ($child != '') {\n $target[$key][$index] = $child;\n }\n\n if ($attributes != '') {\n foreach ($attributes as $k => $v) {\n $target[$key][$index][$k] = $v;\n }\n }\n $target[$key][$index]['value'] = $value;\n }\n return $target;\n }", "title": "" }, { "docid": "41a4ee0d6542944aec2248dc871bfd04", "score": "0.4992928", "text": "function appendChild (Node $child)\n\t{\n\t\t//Attributes can be inserted\n\t\tif ($child instanceof Attr) {\n\t\t\tthrow new DomException(\"Node cannot be inserted at the specified point in the hierarchy\");\n\t\t}\n\t\t//If the node to add is a document fragment insert its child nodes \n\t\t//instead of it and remove them from the fragment\n\t\tif ($child->nodeType === 11) {\n\t\t\t$i = $child->childNodes->length;\n\t\t\twhile ($i) {\n\t\t\t\t$removed = $child->removeChild($child->childNodes[0]);\n\t\t\t\t$this->appendChild($removed);\n\t\t\t\t$i--;\n\t\t\t}\n\t\t\treturn $child;\n\t\t}\n\t\t//Remove the child from its parent node before continue\n\t\tif ($child->parentNode) {\n\t\t\t$child->parentNode->removeChild($child);\n\t\t}\n\t\t$child->parentNode = $this;\n\t\t$this->childNodes->_appendNode($child);\n\t\treturn $child;\n\t}", "title": "" }, { "docid": "f02978816c47cf1d408435eb44da0edd", "score": "0.49791878", "text": "public function testExistedNodeSiblingsMoveAppendTo()\n {\n $model8 = Animal::findOne(8);\n \n $this->assertTrue($model8->appendTo($model8->parent()));\n $this->assertEquals(3, $model8->weight);\n }", "title": "" }, { "docid": "81b56f57b49f1b9c181c770da2a89ff2", "score": "0.49601036", "text": "public function testNewNodeInsertAfterLastChild()\n {\n $model4 = Animal::findOne(4);\n \n $model = new Animal();\n $model->name = 'new'; \n \n $this->assertTrue($model->insertAfter($model4));\n $model4->refresh();\n \n $this->assertSame('', $model->path);\n $this->assertEquals(1, $model->level);\n $this->assertEquals(5, $model->weight); \n \n $this->assertEquals(4, $model4->weight); \n }", "title": "" }, { "docid": "3f46bd1e486c9682f4bbfe2ba6b59bc4", "score": "0.49494523", "text": "public function addChild(Zend_Markup_Token $child)\n {\n $this->_tokens[] = $child;\n }", "title": "" }, { "docid": "38a1f8da1a3784bb25ea4db8cf494c66", "score": "0.4927114", "text": "public function addChild(Node $child)\n {\n $this->children[] = $child;\n }", "title": "" }, { "docid": "aee29d88cc5105caf803a37c706f4957", "score": "0.4899997", "text": "public function appendNode($type) {\n $node = new Node($type, $this->current);\n $this->current->append($node);\n $this->current = $node;\n }", "title": "" }, { "docid": "7d1548f61ad60d140a2fe80e94087430", "score": "0.48988047", "text": "public function append_child( $task ) {\n\t\t$ind = $this->_get_current_task();\n\t\t$this_task = $this->_tasks[$ind];\n\t\t$ind++;\n\t\twhile ( isset( $this->_tasks[$ind] ) && ( $this->_tasks[$ind]['type'] == $task['type'] || $this->_tasks[$ind]['type'] == $this_task['type'] ) ) {\n\t\t\t$ind++;\n\t\t}\n\t\treturn $this->append_after( $task, $ind - 1 );\n\t}", "title": "" }, { "docid": "490781f296e18e1410c8e431357f6c5c", "score": "0.48887414", "text": "function &lastChild () {\r\n $ret = null;\r\n $c = count ($this->_children);\r\n if (!$c) {\r\n return $ret;\r\n }\r\n return $this->_children[$c-1];\r\n }", "title": "" }, { "docid": "aacc43d7c3147bc985326822ec0ea778", "score": "0.48823622", "text": "public function moveAsFirst($target) {\n return $this->moveNode($target, $target->{$this->leftAttribute} + 1, 1);\n }", "title": "" }, { "docid": "12c6519a3720f8f9a842687cd4248c2c", "score": "0.48726064", "text": "public function last () { return new XDTNodeList($this[$this->length-1]); }", "title": "" }, { "docid": "43df0350119183bfd2244667b87f11e5", "score": "0.48613012", "text": "public function addChild(self $child): void\n\t{\n\t\tif (!$this->children->contains($child)) {\n\t\t\t// ...and assign it to collection\n\t\t\t$this->children->add($child);\n\t\t}\n\t}", "title": "" }, { "docid": "c94c0929420b548aeb0c904bcbdc571b", "score": "0.48578402", "text": "function add_child( $child ) {\n\t\t$this->children[ $child->identifier() ] = $child;\n\t}", "title": "" }, { "docid": "f11f1d2c6aed7894c8cc1d3d77e29c3f", "score": "0.4847379", "text": "public function insert_as_prev_sibling($target)\n {\n $target = $this->parent_from($target, $this->parent_column);\n return $this->insert($target, $this->left_column, 0, 0);\n }", "title": "" }, { "docid": "03f63ac9c05c576ce1c7ffe02f842ea2", "score": "0.4835592", "text": "public function setLastChild(bool $value = true): Delta\n {\n $this->is_last_child = $value;\n\n return $this;\n }", "title": "" }, { "docid": "eb1e1c286e39754f4b0a110b9acdcf74", "score": "0.4834458", "text": "public function add_child($child) {\n\t\t$this->children[] = $child;\n\t}", "title": "" }, { "docid": "b19194103112964899c00adbfdaa741f", "score": "0.48183233", "text": "public function prependTo ($target) { \r\n\t\t\r\n\t\tif ($target = $this->process($target))\r\n\t\t\tforeach ($this as $node) \r\n\t\t\t\tif (get_class($target) === 'XDTNodeList' OR is_array($target)) \r\n\t\t\t\t\tforeach ($target as $t) $t->insertBefore($node, $t->firstChild);\r\n\t\t\t\telse $target->insertBefore($node, $target->firstChild);\r\n\t\t\t\t\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "c3f02e80c552f2b76cbf5752b72ee8b1", "score": "0.48113045", "text": "function &addChild ( &$child ) {\n\t\t$this->children[] =& $child;\n\t\t\n\t\treturn $child;\n\t}", "title": "" }, { "docid": "24aec98e17c59d542464a7cd77de0ced", "score": "0.48015484", "text": "public function addFileToLastHeading(TableOfContents\\File $file)\n {\n $this->last_heading->addChild($file);\n $file->setParent($this->last_heading);\n }", "title": "" }, { "docid": "31c72c0f7f801fdafc878f1ca113b609", "score": "0.4791825", "text": "public function appendChild($child, ...$optionals)\n {\n $fn = function($node, $newElement) {\n return $node->appendChild($newElement);\n };\n\n return $this->insertNode($fn, $child, ...$optionals);\n }", "title": "" }, { "docid": "1dd2a2281cfbaf60fe756ff936381402", "score": "0.47617188", "text": "public function appendChild($child = NULL)\n\t{\n\t\tif ($child instanceof DOMNode) {\n\t\t\tparent::appendChild($child);\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "b5c0348c552e2e398c4d90aca8599fec", "score": "0.47561005", "text": "public function MoveLast()\n {\n $this->active_row = $this->RowCount() - 1;\n $this->Seek($this->active_row);\n }", "title": "" }, { "docid": "a1d00dd3ae7bc70c38a6287ab509dc3b", "score": "0.4749489", "text": "public function Append($value = 0, $column = 0) {\n\t\t// if the list is empty\n\t\tif ($this->isEmpty()) {\n\t\t\t$this->tail = new Node($value, $column, null);\n\t\t\t$this->head = $this->tail;\n\t\t\t$this->count++;\n\t\t} else {\n\t\t\t// make a new node assigning to the newest node\n\t\t\t$this->head->SetNext(new Node($value, $column, null));\n\t\t\t$this->head = $this->head->Next();\n\t\t\t$this->count++;\n\t\t}\n\t}", "title": "" }, { "docid": "c8dd66a6bd860fe0bb0a2d04acab44cf", "score": "0.47419813", "text": "public function end()\n {\n # construct the node from this definition.\n $node = $this->getNode();\n $children = $this->children();\n $parent = $this->getParent();\n \n # append child compositeNodes to the selectorNode \n foreach($children as $child) {\n $node->addChild($child);\n }\n \n # append generators compositeNode to the parent builder.\n $parent->append($node);\n \n # return the parent to continue chain.\n return $parent;\n }", "title": "" }, { "docid": "54d03dcd53779088d5ee82ab87a4ac82", "score": "0.47366434", "text": "public function addChild(self $node)\n {\n $cardinalityMap = $this->getCardinalityMap();\n $nodeType = $node->getNodeType();\n\n // if proposed child node is of an invalid type\n if (!array_key_exists($nodeType, $cardinalityMap)) {\n throw new OutOfBoundsException(sprintf(\n 'QueryBuilder node \"%s\" of type \"%s\" cannot be appended to \"%s\". '.\n 'Must be one type of \"%s\"',\n $node->getName(),\n $nodeType,\n $this->getName(),\n implode(', ', array_keys($cardinalityMap))\n ));\n }\n\n $currentCardinality = array_key_exists($node->getName(), $this->children) ?\n count($this->children[$node->getName()]) : 0;\n\n [$min, $max] = $cardinalityMap[$nodeType];\n\n // if bounded and cardinality will exceed max\n if (null !== $max && $currentCardinality + 1 > $max) {\n throw new OutOfBoundsException(sprintf(\n 'QueryBuilder node \"%s\" cannot be appended to \"%s\". '.\n 'Number of \"%s\" nodes cannot exceed \"%s\"',\n $node->getName(),\n $this->getName(),\n $nodeType,\n $max\n ));\n }\n\n $this->children[$nodeType][] = $node;\n\n return $node->getNext();\n }", "title": "" }, { "docid": "9ddffc121b42485bcf186db9f9d66b40", "score": "0.4735415", "text": "protected function appendToLastTagSet ($text) {\n\n $lastTag =& $this->values['tags'][$this->lastTagSet];\n $numvals = count($lastTag);\n $lastTag[$numvals - 1] .= PHP_EOL . $text;\n $lastTag[$numvals - 1] = trim($lastTag[$numvals - 1]);\n\n }", "title": "" }, { "docid": "9c50ab04ac0727e94e32cd0a213817a3", "score": "0.47224894", "text": "public function appendChild($child)\n {\n array_push($this->children, $child);\n\n return $this;\n }", "title": "" }, { "docid": "3c1aab3fa3679f2f4a35f53f381203e4", "score": "0.47108108", "text": "public function append ($content) {\r\n\t\t\r\n\t\tif ($this->length < 1) return null;\r\n\t\t\r\n\t\t$args = func_get_args();\r\n\t\tforeach ($args as $offset => $value) \r\n\t\t\tif ($value = $this->process($value)) \r\n\t\t\t\tforeach ($this as $node) \r\n\t\t\t\t\tif (get_class($value) === 'XDTNodeList') $node->appendChild($value[0]);\r\n\t\t\t\t\telse $node->appendChild($value);\r\n\t\t\t\t\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "858fb8d8179b18113c8560d30485891b", "score": "0.47107732", "text": "function addBaseElement($href = null, $target = null)\n {\n return $this->addBaseTag($href, $target);\n }", "title": "" }, { "docid": "f0e06a7e55012e9bfb954b3815a92ac3", "score": "0.469893", "text": "public function appendSelector(FileSelector $selector)\n {\n if ($this->isReference()) {\n throw $this->noChildrenAllowed();\n }\n $this->selectorsList[] = $selector;\n }", "title": "" }, { "docid": "59d2d557014072fdf4a2b26f3f09d249", "score": "0.46988052", "text": "function _pushNode (&$node) {\r\n $stack_count = count ($this->_stack);\r\n $max_node =& $this->_stack[$stack_count-1];\r\n if (!$max_node->appendChild ($node)) {\r\n return false;\r\n }\r\n $this->_stack[$stack_count] =& $node;\r\n return true;\r\n }", "title": "" }, { "docid": "cbb0f8b335b9131f78a1ef014bd52751", "score": "0.46972084", "text": "public function appendChild($childNode)\r\n {\r\n $this->_childNodes[$childNode->id] = $childNode;\r\n $childNode->setParentNode($this);\r\n }", "title": "" }, { "docid": "050e62ef819c73598bb16bd809d7d782", "score": "0.46914607", "text": "public function insertAsLastChildOf($node) {\n if ($this->isInTree()) {\n throw new Exception('Oject must not already be in the tree to be inserted. Use the moveToFirstChildOf() instead.');\n }\n\n $left = $node->getRightValue();\n\n // Update node properties\n $this->setLeftValue($left);\n $this->setRightValue($left + 1);\n $this->setLevelValue($node->getLevelValue() + 1);\n $scope = $node->getScopeValue();\n $this->setScopeValue($scope);\n\n /** @var \\Flywheel\\Model\\ActiveRecord $owner */\n $owner = $this->getOwner();\n if (!$owner->validate()) {//check validate before save\n return $owner;\n }\n // Keep the tree modification query for the save() transaction\n $this->nestedSetQueries []= array(\n 'callable' => array($this, 'makeRoomForLeaf'),\n 'arguments' => array($left, $scope)\n );\n\n $owner->save();\n $node->reload();\n\n return $this->_owner;\n }", "title": "" }, { "docid": "615ba74f84589413e02cde9292acca86", "score": "0.4688923", "text": "public function closeChild()\n\t{\n\t\t$this->_lastChild = null;\n\t}", "title": "" }, { "docid": "c6d47730e894cca9b57e0cc3ed399983", "score": "0.46812677", "text": "public function completeNode() {\n $this->current = $this->current->parent();\n }", "title": "" }, { "docid": "34e3b702f14daa98ba97de4245d8e84e", "score": "0.46749622", "text": "public function isLastChild(): bool\n {\n return $this->is_last_child;\n }", "title": "" }, { "docid": "a477a737509738a5f397ebd6d8aadb74", "score": "0.46593234", "text": "public function addChild(BaseObject $child)\n {\n if ( $this->hasChild($child) ) {\n return;\n }\n $this->children[] = $child;\n }", "title": "" }, { "docid": "6f418175ceed23627aab661dcad1e8ab", "score": "0.4652722", "text": "public function into($target)\n {\n return $this->command->into($target);\n }", "title": "" }, { "docid": "20983c2298728b77bd294e1ac84b4f8e", "score": "0.46474966", "text": "public static function fromLast(self $list, int $n): ?Node\n {\n }", "title": "" }, { "docid": "d564bd97d201212ec4f640d4e2e84de9", "score": "0.46429732", "text": "protected static function append_to_selector($selector, $to_append)\n {\n }", "title": "" }, { "docid": "4664b6a3cafd07b2aed13c94317ed16f", "score": "0.46407226", "text": "public function getLastChild($query = null, PropelPDO $con = null)\n\t{\n\t\tif($this->isLeaf()) {\n\t\t\treturn array();\n\t\t} else {\n\t\t\treturn Pan_Db_TemplateDirectoryQuery::create(null, $query)\n\t\t\t\t->childrenOf($this)\n\t\t\t\t->orderByBranch(true)\n\t\t\t\t->findOne($con);\n\t\t}\n\t}", "title": "" }, { "docid": "54abc32d899876cc51e37578ca6c441c", "score": "0.4634267", "text": "function getEndNode(){\n return $this->endNode;\n }", "title": "" }, { "docid": "d7f72088fdfb34b42dfac481e8bfb213", "score": "0.463271", "text": "public function append($e) {\n\t\t$this->elements[] = $e;\n\t}", "title": "" }, { "docid": "e864830d9cce67017f5b76598b8ccf28", "score": "0.46227795", "text": "public function &lastChild()\n {\n $ret = null;\n $c = count($this->_children);\n if (! $c) {\n return $ret;\n }\n return $this->_children[$c-1];\n }", "title": "" }, { "docid": "f3f6ba8537d7e9fc31b541733634cf7c", "score": "0.46131226", "text": "public function getLastChild(array $columns = ['*']);", "title": "" }, { "docid": "43cf43c237ad89a9002688e7f329be83", "score": "0.4604744", "text": "function lonfo(array $target = []){\n return (new Walker($target));\n }", "title": "" }, { "docid": "79390ee7e34d303f18cfbb8598b1a256", "score": "0.45952696", "text": "public function moveToLastChildOf($node) {\n if (!$this->isInTree()) {\n throw new Exception('Object must be already in the tree to be moved. Use the insertAsFirstChildOf() instead.');\n }\n if ($node->isDescendantOf($this->getOwner())) {\n throw new Exception('Cannot move a node as child of one of its subtree nodes.');\n }\n\n /** @var \\Flywheel\\Model\\ActiveRecord $owner */\n $owner = $this->getOwner();\n if (!$owner->validate()) {//check validate before save\n return $owner;\n }\n\n $owner->beforeSave();\n $this->_moveSubtreeTo($node->getRightValue(), $node->getLevelValue() - $this->getLevelValue() + 1, $node->getScopeValue());\n $owner->afterSave();\n $owner->reload();\n $node->reload();\n\n return $owner;\n }", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "4bac3188558c3acab53dd8d5175c1d4e", "score": "0.0", "text": "public function show($id)\n {\n //\n }", "title": "" } ]
[ { "docid": "cc12628aa1525caac0bf08e767bd6cb4", "score": "0.7593588", "text": "public function view(ResourceInterface $resource);", "title": "" }, { "docid": "d57b314bf807713f346bc35fb937529e", "score": "0.6845395", "text": "public function render() {\n $this->_template->display($this->resource_name);\n }", "title": "" }, { "docid": "05f03e4964305c5851a8417af8f32544", "score": "0.6685365", "text": "public function show($resource, $id)\n {\n return $this->repository->get($id);\n }", "title": "" }, { "docid": "9579e337a5325a82370abb431f646b6f", "score": "0.6490586", "text": "public function show($id)\n\t{\n\t\t//\n\t\t$resource = \\App\\Resource::find($id);\n\t\treturn view('deleteResource', array( 'resource' => $resource) );\n\t}", "title": "" }, { "docid": "989918b39caf8ede67ab11ef4dc4a651", "score": "0.6347163", "text": "public function editresourceAction() {\n\t\t$resourceid = $this->_request->getParam('resourceid');\n\t\t$srlink = new StudentResourceLink();\n\t\t$select = $srlink->select()->where($srlink->getAdapter()->quoteInto('auto_id = ?', $resourceid));\n\t\t$rows = $srlink->fetchAll($select);\n\t\t$therow = null;\n\t\tforeach ($rows as $row) {\n\t\t\t$therow=$row;\n\t\t}\n\t\t//print_r($therow);\n\t\t$this->view->resourcelink = $therow;\n\t\t\n\t\t$mediabankUtility = new MediabankUtility();\n\t\tob_start();\n\t\t$mediabankUtility->curlDownloadResource($therow['mid'],false);\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\t\t$this->view->content = $content;\t\t\n\t\t$this->view->redirect_to = $_SERVER[\"HTTP_REFERER\"];\n\t\tStudentResourceService::prepStudentResourceView($this, $this->_request, $therow->loid);\n\t\tif($therow['category']=='Summary') //summary has been stripped out since a summary exists; add it back in if this one is a summary\n\t\t\t$this->view->studentResourceCategories[6]='Summary';\n\t}", "title": "" }, { "docid": "2e3da5773c9c5d59c21b1af4e1ac8cd8", "score": "0.62360924", "text": "public function show($id)\n {\n if(Module::hasAccess(\"Resources\", \"view\")) {\n \n $resource = Resource::find($id);\n if(isset($resource->id)) {\n $module = Module::get('Resources');\n $module->row = $resource;\n $group_lists = array();\n $user_lists = array();\n\n if(!$resource->is_public){\n $group_lists = DB::table('resource_groups')\n ->select('groups.id', 'groups.name')\n ->join('groups','groups.id','=','resource_groups.group_id')\n ->where('resource_groups.resource_id', $id)->whereNull('groups.deleted_at')->whereNull('resource_groups.deleted_at')->get();\n\n $user_lists = DB::table('resource_users')\n ->select('users.id', 'users.name')\n ->join('users','users.id','=','resource_users.user_id')\n ->where('resource_users.resource_id', $id)->whereNull('users.deleted_at')->whereNull('resource_users.deleted_at')->get();\n }\n \n return view('la.resources.show', [\n 'module' => $module,\n 'view_col' => $module->view_col,\n 'no_header' => true,\n 'no_padding' => \"no-padding\",\n 'user_lists' => $user_lists,\n 'group_lists' => $group_lists\n ])->with('resource', $resource);\n } else {\n return view('errors.404', [\n 'record_id' => $id,\n 'record_name' => ucfirst(\"resource\"),\n ]);\n }\n } else {\n return redirect(config('laraadmin.adminRoute') . \"/\");\n }\n }", "title": "" }, { "docid": "d6d98993d2a40a3cba09832ef9953f69", "score": "0.6218096", "text": "public function lookup($resource);", "title": "" }, { "docid": "6244aaaaf59fb15467858bc417084ebc", "score": "0.62113243", "text": "protected function makeDisplayFromResource()\n\t{\n\t\tif($this->activeResource instanceof SimpleXMLElement)\n\t\t{\n\t\t\treturn $this->activeResource->asXml();\n\t\t}else{\n\t\t\treturn $this->activeResource;\n\t\t}\n\t}", "title": "" }, { "docid": "3ee4a64030fd6d594c526bf49945971f", "score": "0.6198377", "text": "public function show($id)\n {\n $res = Resource::find($id);\n return view('resource.show')->withResource($res);\n }", "title": "" }, { "docid": "48b723515995fb4178256251ea323c04", "score": "0.61823267", "text": "public function show($id) {\n $resource = static::$resource::findOrFail($id);\n return view($this->getView('show'), [static::$varName[0] ?? $this->getResourceName() => $resource]);\n }", "title": "" }, { "docid": "b6106194998deb4acb00d89d1984bf4b", "score": "0.6154439", "text": "public function displayAction()\n {\n $params = $this->router->getParams();\n if (isset($params[0]) && $firewall = Firewalls::findFirst(intval($params[0]) ? $params[0] : ['name=:name:', 'bind' => ['name' => $params[0]]])) {\n $this->tag->setTitle(__('Firewalls') . ' / ' . __('Display'));\n $this->view->setVars([\n 'firewall' => $firewall,\n 'content' => Las::display($firewall->name)\n ]);\n\n // Highlight <pre> tag\n $this->assets->addCss('css/highlightjs/arta.css');\n $this->assets->addJs('js/plugins/highlight.pack.js');\n $this->scripts = ['$(document).ready(function() { $(\"pre\").each(function(i, e) {hljs.highlightBlock(e)}); });'];\n }\n }", "title": "" }, { "docid": "c232a532d32e3f8e5c41e20db4331be5", "score": "0.6063656", "text": "function display($aTemplate = null) {\r\n\t\t$this->fetch ( $aTemplate, true );\r\n\t}", "title": "" }, { "docid": "88951f8df99fd6c0e333e72b145dfb04", "score": "0.60633683", "text": "public function displayAction()\n {\n // set filters and validators for GET input\n $filters = array(\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\n ); \n $validators = array(\n 'id' => array('NotEmpty', 'Int')\n );\n $input = new Zend_Filter_Input($filters, $validators);\n $input->setData($this->getRequest()->getParams());\n\n // test if input is valid\n // retrieve requested record\n // attach to view\n if ($input->isValid()) {\n $q = Doctrine_Query::create()\n ->from('Square_Model_Item i')\n ->leftJoin('i.Square_Model_Country c')\n ->leftJoin('i.Square_Model_Grade g')\n ->leftJoin('i.Square_Model_Type t')\n ->where('i.RecordID = ?', $input->id);\n $result = $q->fetchArray();\n if (count($result) == 1) {\n $this->view->item = $result[0]; \n } else {\n throw new Zend_Controller_Action_Exception('Page not found', 404); \n }\n } else {\n throw new Zend_Controller_Action_Exception('Invalid input'); \n }\n }", "title": "" }, { "docid": "1a2ff798e7b52737e1e6ae5b0d854f6a", "score": "0.6051159", "text": "public function show($id)\n\t{\n\t\t// display *some* of the resource...\n\t\treturn Post::find($id);\n\t}", "title": "" }, { "docid": "da456d60e11065d629261fc79e691a95", "score": "0.6005558", "text": "public function displayAction()\n {\n $id = $this->params['_param_1'];\n $this->flash['message'] = \"Arriba loco, este es el mensaje del flash!\";\n return $this->render( $id );\n }", "title": "" }, { "docid": "3fb44335bf5e5dca76ae4c41be3fee5d", "score": "0.59952855", "text": "public function action_show()\n\t{\n\t\t$id = Coder::instance()->short_url($this->request->param('id'), TRUE);\n\n\t\tif (is_numeric($id) === FALSE)\n\t\t{\n\t\t\tHTTP::redirect(Route::get('default')->uri());\n\t\t}\n\t\t\n\t\t$user = ORM::factory('User', $id);\n\t\t$manager = Manager::factory('User', $user);\n\t\t\n\t\t$manager->show();\n\n\t\t$this->view_container = $manager->get_views_result('container');\n\t\t$this->view_content = $manager->get_views_result('content');\n\t}", "title": "" }, { "docid": "9a28e42aa633511a42cb70db3b7fcc26", "score": "0.5985783", "text": "public function show($id)\n\t{\n\t\ttry {\n\t\t if ( \\Auth::check() && \\Auth::user()->hasPaid() )\n {\n $resource = \\Resource::find($id);\n $path_to_image = app('path.protected_images') .'/'.$resource->image;\n //Read image path, convert to base64 encoding\n $imgData = base64_encode(file_get_contents($path_to_image));\n //Format the image SRC: data:{mime};base64,{data};\n $src = 'data: '.mime_content_type($path_to_image).';base64,'.$imgData;\n\n return \\View::make('resources.view')->with([\n 'resource' => $resource,\n 'img' => $src\n ]);\n\n } else {\n\n \\App::abort(404);\n }\n\n } catch (\\Exception $e) {\n\n \\Log::warning( $e->getMessage() );\n }\n\t}", "title": "" }, { "docid": "41ab5aeaf4ec45d330f185763e2d3cee", "score": "0.59621084", "text": "public function show()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "ecdc5dd9611d1734404c92d923029a39", "score": "0.58814424", "text": "public function show($id)\n {\n echo self::routeNamed();\n }", "title": "" }, { "docid": "461e196dfe64422deb4a744c50eb5d8d", "score": "0.5878836", "text": "public function show($id) {\n //view/edit page referred to as one entity in spec\n }", "title": "" }, { "docid": "f004693e692e26b7ab9f8de37189afc1", "score": "0.5870806", "text": "private function displayResources()\n\t\t{\n\t\t\t$html = '';\n\t\t\t$html .= '<div class=\"resources\" >'.\"\\n\";\n\t\t\t$html .= '\t<h4>Resources ~ '.$this->challenge['challengeResourceHeading'].'</h4>'.\"\\n\";\n\t\t\tforeach($this->resources as $resource)\n\t\t\t{\n\t\t\t\t$html .= '\t<p class=\"resource-link\"><a href=\"http://'.$resource['resourceLink'].'\">'.$resource['resourceTitle'].'</a></p>'.\"\\n\";\n\t\t\t}\n\t\t\n\t\t\treturn $html;\n\t\t}", "title": "" }, { "docid": "f02f37fffab992508c7d7d6f7ae94f94", "score": "0.58678883", "text": "public function showAction() {\n\n // validate contact id is int\n $id = $this->route_params[\"id\"];\n // if id is invalid redirect to 404 page\n if (filter_var($id, FILTER_VALIDATE_INT) === false) {\n $this->show404();\n return;\n }\n\n $contact_obj = new Contact();\n $contact = $contact_obj->findById($id);\n // if no contact returned then display error message\n if ($contact == false) {\n //set error message\n $_SESSION[\"error_message\"] = \"Contact not found or deleted\";\n // redirect to show all contacts if contacts not found\n header(\"Location: /contacts\");\n return;\n }\n // render the view if all everything is Ok\n View::renderTemplate(\"contacts/show.twig.php\", [\"contact\" => $contact]);\n }", "title": "" }, { "docid": "4294ddbd744676190ac0b1e7d92632e0", "score": "0.5862386", "text": "public function show() {\r\n echo $this->init()->getView();\r\n }", "title": "" }, { "docid": "d138cb59b6d8df8768f135975e4445ad", "score": "0.584066", "text": "public function show()\n\t{\n\t\t//\n\n\t}", "title": "" }, { "docid": "ad2fe33fedb796826d1b96c32859495c", "score": "0.5838728", "text": "public function resourceDesktop()\n {\n $resourceTypes = $this->em->getRepository('ClarolineCoreBundle:Resource\\ResourceType')->findAll();\n\n return $this->templating->render(\n 'ClarolineCoreBundle:Tool\\desktop\\resource_manager:resources.html.twig',\n array('resourceTypes' => $resourceTypes, 'maxPostSize' => ini_get('post_max_size'))\n );\n }", "title": "" }, { "docid": "6e1ccfc29048f24d0efc88d6b8257171", "score": "0.58106446", "text": "public function show($name)\n\t{\n\t\t//\n\n\t}", "title": "" }, { "docid": "5b7cde41d4a1270d31720878d4a50b19", "score": "0.5792891", "text": "public function show($id)\n\t{\n\t\treturn $this->success($this->resource->getById($id));\n\t}", "title": "" }, { "docid": "7dd625db5c11766539ede97b10e391c8", "score": "0.5788525", "text": "public function viewAction($resourceId)\n {\n try {\n // Call to the resource service to get the resource\n $resourceResource = $this->get(\n 'asker.exercise.exercise_resource'\n )->getContentFullResource($resourceId, $this->getUserId());\n\n return new ApiGotResponse($resourceResource, array(\"details\", 'Default'));\n\n } catch (NonExistingObjectException $neoe) {\n throw new ApiNotFoundException(ResourceResource::RESOURCE_NAME);\n }\n }", "title": "" }, { "docid": "e871bf67c885c4b595a1f5cc980d032e", "score": "0.5786727", "text": "public function show()\n {\n \n \n }", "title": "" }, { "docid": "8e4604d345a4a1aa92109fa7c7b9b1e1", "score": "0.57854974", "text": "public function showAction(I18NResource $i18NResource)\n {\n $use_translations = $this->get('Services')->get('use_translations');\n\n if(!$use_translations){\n throw $this->createNotFoundException('Not a valid request');\n }\n\n $this->get('Services')->setMenuItem('I18NResource');\n $changes = $this->get('Services')->getLogsByEntity($i18NResource);\n\n return $this->render('i18nresource/show.html.twig', array(\n 'i18NResource' => $i18NResource,\n 'changes' => $changes,\n ));\n }", "title": "" }, { "docid": "e918056f269cc66c35d0c9d5ae72cf98", "score": "0.57844186", "text": "protected function addResourceShow($name, $base, $controller, $options)\n\t{\n\t\t$uri = $this->getResourceUri($name).'/{'.$base.'}.{format?}';\n\n\t\treturn $this->get($uri, $this->getResourceAction($name, $controller, 'show', $options));\n\t}", "title": "" }, { "docid": "ea3e059853b58df5488fa70a7fd54c3b", "score": "0.57814896", "text": "protected function addResourceShow($name, $base, $controller)\n {\n $uri = $this->getResourceUri($name) . '/{' . $base . '}';\n return $this->get($uri, $this->getResourceAction($name, $controller, 'show'));\n }", "title": "" }, { "docid": "39114f16312ac4920577af8887aaf740", "score": "0.57736045", "text": "public function display()\r\n {\r\n echo $this->fetch();\r\n }", "title": "" }, { "docid": "fcc9864a64202f3261f4537601857f07", "score": "0.57706666", "text": "public function show($nombre, $resourceType, $resourceName)\n {\n //gets the resource\n switch ($resourceType) {\n case (\"manga\"):\n $resource = Manga::where(\"name\", $resourceName)->first();\n break;\n case (\"novel\");\n $resource = Novel::where(\"name\", $resourceName)->first();\n break;\n default:\n abort(404);\n break;\n }\n //gets the comments for the resource\n $commentsFound = $resource->comments()->get();\n $commented = !is_null(Auth::user()->comments()->where(\"commentable_id\", $resource->id)->first());\n //creates a register of the interaction\n $resource->users()->attach(Auth::user());\n return view(\"user.show\", compact(\"resource\", \"commentsFound\", \"commented\", \"resourceType\"));\n }", "title": "" }, { "docid": "496570de6c493cd9fe30f7c52ceb87d1", "score": "0.57692057", "text": "public function show($id)\n\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t}", "title": "" }, { "docid": "4be578329f20a5696732db0fd60d5d80", "score": "0.57681847", "text": "public function executeShow()\n {\n $this->headline = HeadlinePeer::getHeadlineFromStripTitle($this->getRequestParameter('headlinestriptitle'));\n $this->forward404Unless($this->headline);\n }", "title": "" }, { "docid": "a3e57330d7cd59896b945f16d0e12a89", "score": "0.57557684", "text": "public function display()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "a3e57330d7cd59896b945f16d0e12a89", "score": "0.57557684", "text": "public function display()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "e3b51ebfe04703c114ab39fc729ba43b", "score": "0.5748668", "text": "public function show(Entry $entry)\n {\n //\n }", "title": "" }, { "docid": "e3b51ebfe04703c114ab39fc729ba43b", "score": "0.5748668", "text": "public function show(Entry $entry)\n {\n //\n }", "title": "" }, { "docid": "fd30d754eb9c55abae27d57dff32abdc", "score": "0.5741121", "text": "public function resourcethumbnailAction()\r\n {\r\n $request = $this->getRequest();\r\n $response = $this->getResponse();\r\n\r\n $id = (int) $request->getQuery('id');\r\n $w = (int) $request->getQuery('w');\r\n $h = (int) $request->getQuery('h');\r\n $hash = $request->getQuery('hash');\r\n\r\n $realHash = DatabaseObject_ResourceImage::GetImageHash($id, $w, $h);\r\n\r\n // disable autorendering since we're outputting an image\r\n $this->_helper->viewRenderer->setNoRender();\r\n\r\n $image = new DatabaseObject_ResourceImage($this->db);\r\n if ($hash != $realHash || !$image->load($id)) {\r\n // image not found\r\n $response->setHttpResponseCode(404);\r\n return;\r\n }\r\n\r\n try {\r\n $fullpath = $image->createResourceThumbnail($w, $h);\r\n }\r\n catch (Exception $ex) {\r\n $fullpath = $image->getFullPath();\r\n }\r\n\r\n $info = getImageSize($fullpath);\r\n\r\n $response->setHeader('content-type', $info['mime']);\r\n $response->setHeader('content-length', filesize($fullpath));\r\n echo file_get_contents($fullpath);\r\n }", "title": "" }, { "docid": "e68751480fa47a0b2d2bc46570e3a883", "score": "0.57348186", "text": "public function display($id = null) {\n \n }", "title": "" }, { "docid": "ca0564d197f7b97c9c7bb3bf9ec0d891", "score": "0.57335985", "text": "public function display($id = null) {\n\t\t$page = $this->SimplePage->findById($id);\n\t\tif(!$page){\n\t\t\t$this->Session->setFlash(__('Page not found'),'error');\n\t\t\t$this->redirect($this->referer());\n\t\t}\n\t\t\n\t\t//If the page was requested using requestAction, return the page object. Can be handy for integration of content in custom pages.\n\t\tif (! empty($this->request->params['requested']) ) {\n\t\t\treturn $page;\n\t\t}\n\t\t\n\t\t$this->set('page',$page);\n\t}", "title": "" }, { "docid": "a7cd1d7ce30dda2ea0273ce031cff516", "score": "0.5725187", "text": "public function displayReferenceAction()\n {\n \t$reference_id = Extended\\reference_request::displayReference( Auth_UserAdapter::getIdentity ()->getId (), $this->getRequest()->getparam('reference_req_id'), \\Extended\\feedback_requests::VISIBILITY_CRITERIA_DISPLAYED);\n \tif($reference_id)\n \t{\n \t\n \t\t$this->view->reference_visible=$reference_id;\n \t\techo Zend_Json::encode( 1 );\n \t}\n \tdie;\n }", "title": "" }, { "docid": "20397e06b8673db8692c5f84120c3011", "score": "0.57247883", "text": "public function show()\n\t{\n\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "8f565ce0db5c2b58c1bd4bea7cb05683", "score": "0.572048", "text": "public function showAction(Ressource $ressource, SessionConcours $session = null)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'session' => $session,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.57188773", "text": "public function show($id) {}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.57188773", "text": "public function show($id) {}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.57188773", "text": "public function show($id) {}", "title": "" }, { "docid": "a494be3f6d40a2f537ff292b7a0ccaae", "score": "0.57121915", "text": "public function item($id=0)\n {\n\t\tif($this->session->userlogged_in !== '*#loggedin@Yes')\n\t\t{\n\t\t\tredirect(base_url().'dashboard/login/');\n }\n \n $resource = $this->member_resource_model->find($id);\n if(empty($resource))\n {\n $this->session->action_success_message = 'Invalid item selection.';\n redirect(base_url().'member_resources/');\n }\n \n\t\t$data = array(\n 'page_title' => 'Resource detail',\n 'resource' => $resource\n );\n\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('member_resources/item_view');\n\t\t$this->load->view('templates/footer');\n }", "title": "" }, { "docid": "cfff8a1202fcfae7e44ab0c4fb351586", "score": "0.5708448", "text": "public function showAction()\n {\n $em = $this->getDoctrine()->getManager();\n $id = $_GET['id'];\n $entity = $em->getRepository('BackendBundle:Concepto')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Concepto entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BackendBundle:Concepto:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.5705372", "text": "public abstract function display();", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.5705372", "text": "public abstract function display();", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5702628", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5702628", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5702628", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5702628", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5702628", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "560ae0fd472bad5f1d21beeed5dfbbdd", "score": "0.57009894", "text": "public function show(){}", "title": "" }, { "docid": "d936662ad1c81979476df2e0767c5e19", "score": "0.5699486", "text": "public function show($id)\n\t{\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "b19fae7378b33f825e4ee1e7d8aef94a", "score": "0.5698812", "text": "public function display($templateName=null)\n {\n echo $this->get($templateName);\n }", "title": "" }, { "docid": "7b283ba1c0546a155efc95a44dd0f9cf", "score": "0.5698205", "text": "public function show(Response $response)\n {\n //\n }", "title": "" }, { "docid": "0465b5fe008a3153a8a032fca67abfed", "score": "0.5693743", "text": "public function show() { }", "title": "" }, { "docid": "5df2376bef8dd69621a6ce7e2afd0bf4", "score": "0.56853133", "text": "abstract public function show($id);", "title": "" }, { "docid": "5df2376bef8dd69621a6ce7e2afd0bf4", "score": "0.56853133", "text": "abstract public function show($id);", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "2c4d828bc64c19cd6411708100defe9b", "score": "0.0", "text": "public function index(Request $request): JsonResponse\n {\n $products = $this->service->index();\n\n return response()->json(ProductResource::collection($products));\n //return new ProductCollection(Product::make($products));\n //return $this->success(ProductCollection::make($products));\n }", "title": "" } ]
[ { "docid": "401f14dad055920ac5aa27d774922113", "score": "0.7704874", "text": "public function index() {\n $resource_info = $this->Resources->find('all');\n\n $this->set('resource_info', $this->paginate($resource_info));\n }", "title": "" }, { "docid": "aaad0bca56bcca6a005037e0278b1ae4", "score": "0.75253195", "text": "public function index() {\n\n\t\t$this->_listing();\n\t\t$this->set('listing', true);\n\n\t}", "title": "" }, { "docid": "5d3b04082e8a634586a1ed8f8cdb546c", "score": "0.74725807", "text": "public function listAction()\n {\n $this->render('listPage');\n }", "title": "" }, { "docid": "6d93e4dca95df8ed0c7b3b8b2657ffd6", "score": "0.7455782", "text": "public function listAction()\n {\n $this->_initAction();\n $this->renderLayout();\n }", "title": "" }, { "docid": "5683700221387a4648da639ad72101ea", "score": "0.7411398", "text": "public function listAction()\n {\n Pi::service('authentication')->requireLogin();\n\n // Get info\n $module = $this->params('module');\n\n // Get Module Config\n $config = Pi::service('registry')->config->read($module);\n\n // Get record list\n $uid = Pi::user()->getId();\n $records = Pi::api('record', 'forms')->getRecordList($uid);\n\n // Set template\n $this->view()->setTemplate('archive-list');\n $this->view()->assign('config', $config);\n $this->view()->assign('records', $records);\n }", "title": "" }, { "docid": "1600316acdacf01cc93550ae2e9a85af", "score": "0.7193138", "text": "public function indexAction()\n {\n $objects = $this->getRepository()->findAll();\n\n return $this->render($this->getResource()->getTemplate('index'), array(\n 'objects' => $objects,\n 'resource' => $this->getResource()\n ));\n }", "title": "" }, { "docid": "883e2a9c193b1ec54d21d41093f06c70", "score": "0.7133651", "text": "public function listAction() {\n\t\t\n\t\t$this->init();\n\n\t\tif(!$this->id) {\n\t\t\t$this->view->assign('intro', true);\n\t\t\treturn;\n\t\t}\n\t\t$fileFactory = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Core\\\\Resource\\\\ResourceFactory');\n\n\t\t$file = $fileFactory->retrieveFileOrFolderObject($this->id);\n\t\t\n\t\tif ($file instanceof \\TYPO3\\CMS\\Core\\Resource\\Folder) {\n\t\t\t$this->redirect('listFolder');\n\t\t}\n\n\t\tif (!($file instanceof \\TYPO3\\CMS\\Core\\Resource\\File)) {\n\t\t\t$this->view->assign('intro', true);\n\t\t\treturn;\n\t\t}\n\n\t\t$processedFiles = $this->getProcessedFilesForFile($file);\n \n\t\t$this->view->assign('file', $file);\n\t\t$this->view->assign('processedFiles', $processedFiles);\n\t}", "title": "" }, { "docid": "735397dbae5dd6de4a32f9ab46c8479f", "score": "0.7097046", "text": "public function index()\n\t{\n\t\t$resources = $this->resourcesRepository->paginate(100);\n\n\t\treturn view('resources.index')\n\t\t\t->with('resources', $resources);\n\t}", "title": "" }, { "docid": "fec316528723462375530f41e571b4fe", "score": "0.704424", "text": "public function listing()\n\t{\n\t\tglobal $admin, $user; // Superglobales\n\n\t\tif($admin)\n\t\t{\n\t\t\t$pageTwig = 'users/listing.html.twig'; // Chemin de la View\n\t\t\t$template = $this->twig->load($pageTwig); // chargement de la View\n\n\t\t\t$result = $this->model->getAllUsers(); // Retourne la liste de tous les utilisateurs\n\n\t\t\techo $template->render([\"url\" => $_SERVER['REQUEST_URI'], \"result\" => $result, \"admin\" => $admin, \"user\" => $user]); // Affiche la view et passe les données en paramêtres\n\t\t}\n\t}", "title": "" }, { "docid": "027627f1e20a0806fbdf50a2ba14c78c", "score": "0.70438755", "text": "public function show()\n {\n $params = $this->getProjectFilters('listing', 'show');\n $query = $this->taskFilter->search($params['filters']['search'])->filterByProject($params['project']['id'])->getQuery();\n\n $paginator = $this->paginator\n ->setUrl('listing', 'show', array('project_id' => $params['project']['id']))\n ->setMax(30)\n ->setOrder(TaskModel::TABLE.'.id')\n ->setDirection('DESC')\n ->setQuery($query)\n ->calculate();\n\n $this->response->html($this->helper->layout->app('listing/show', $params + array(\n 'paginator' => $paginator,\n 'categories_list' => $this->category->getList($params['project']['id'], false),\n 'users_list' => $this->projectUserRole->getAssignableUsersList($params['project']['id'], false),\n 'custom_filters_list' => $this->customFilter->getAll($params['project']['id'], $this->userSession->getId()),\n )));\n }", "title": "" }, { "docid": "d293f3fdec60349ef0877e91df4a099b", "score": "0.70241606", "text": "public function index()\n {\n $resources = Resources::orderBy('id', 'desc')->get();\n return view('Backend/Resources/viewResource', compact('resources'));\n }", "title": "" }, { "docid": "dab649efb652b22919255920aff18021", "score": "0.69978404", "text": "public function index()\n\t{\n\t\t$data['listing'] = Listing::paginate(15);\n\n\t\treturn view('admin.listing', $data);\n\t}", "title": "" }, { "docid": "fb266928c00d205f35924b707dcdadf4", "score": "0.6995689", "text": "public function listAction() {\n // Check if the item exists\n $id = $this->getParam('id');\n $item = get_record_by_id('Item', $id);\n if (!$item) {\n throw new Omeka_Controller_Exception_404;\n }\n // Respond with JSON\n try {\n $jsonData = IiifItems_Util_Annotation::buildList($item);\n $this->__respondWithJson($jsonData);\n } catch (Exception $e) {\n $this->__respondWithJson(array(\n 'message' => $e->getMessage()\n ), 500);\n }\n }", "title": "" }, { "docid": "970e35836b9768276ac32a7f819d569f", "score": "0.6969622", "text": "public function index()\n {\n return \"Here is the listing page.\";\n }", "title": "" }, { "docid": "f20bd0e93af1502c691a240521847e9d", "score": "0.6946605", "text": "public function index() {\n $resources = $this->resources;\n $this->set(array('resources' => $resources, '_serialize' => 'resources'));\n }", "title": "" }, { "docid": "6803a23af3bc653e90735ffd2b2ed35f", "score": "0.6941913", "text": "public function index()\n {\n\n $resource = (new AclResource())->AclResource;\n\n return view('Admin.acl.resource.index')->withResource($resource);\n }", "title": "" }, { "docid": "924e51ba82c2eab34f48f3bbfecb5197", "score": "0.692225", "text": "public function index()\n {\n return view('resources.index', [\n 'resources' => Resource::orderBy('id', 'DESC')->get()\n ]);\n }", "title": "" }, { "docid": "f7e7cbb28c97549abd73fed7818403a4", "score": "0.6920865", "text": "public function list()\n {\n return $this->Get('list');\n }", "title": "" }, { "docid": "aa6c01f133b8fa50888c5287d810e174", "score": "0.69041467", "text": "public static function list() {\n $books = Book::findAll();\n\n // 2. Return/include de la view\n include( __DIR__ . '/../views/books/list.php');\n\n }", "title": "" }, { "docid": "f0fa2690ffaab13556ebf9f8ee023468", "score": "0.6886966", "text": "public function listing()\n {\n // solo permite mostrar listado de TODOS los productos al administrador\n // si no es admin, redireccion a la lista de productos disponibles\n if (!$this->isAdmin())\n $this->redirect(\"product\", \"available\");\n\n $products = \\models\\Product::findBy(null);\n\n // se le pasa el listado a la vista y se renderiza\n $this->view->assign(\"list\", $products);\n $this->view->render(\"product_list\");\n }", "title": "" }, { "docid": "1cacb33ba12b36b95c20025febdd4b33", "score": "0.68812966", "text": "public function index()\n {\n // atau saat membuka page lain pada pagination\n $this->list();\n }", "title": "" }, { "docid": "3a0850cc56c832a1affe3d6906e36183", "score": "0.68409985", "text": "public function listAction()\n {\n return $this->render('MesdHelpWikiBundle:Default:list.html.twig', array());\n }", "title": "" }, { "docid": "7de268658a226bfb1078da5310cd732b", "score": "0.6829061", "text": "public function index()\n {\n $showData = Input::has('showData') ? (bool) Input::get('showData') : false;\n\n if ($showData === true) {\n $this->setTransformerFilters();\n }\n\n $limit = Input::has('limit') ? Input::get('limit') : 10000;\n\n\n // handle search\n if (Input::has('q')) {\n\n $resources = $this->service->search(\n Input::get('q'),\n $limit,\n $showData\n );\n\n return $this->respondWithCollection($resources,\n $showData === true ? $this->transformer : new ListTransformer());\n } else {\n return $this->respondWithCollection($this->service->showList($limit, $showData),\n $showData === true ? $this->transformer : new ListTransformer());\n }\n }", "title": "" }, { "docid": "d46bb32faa9e8a7d477db9cdd1aa50f0", "score": "0.6800859", "text": "public function index()\n {\n // Add a record\n// $obj = Resource::create([\n// 'seq'=>1.0,\n// 'name'=>'My image',\n// 'description'=>'My special image',\n// 'type'=>'IMAGE',\n// 'url'=>'',\n// 'status'=>'ACTIVE',\n// 'image'=>'chalky.jpg',\n// 'thumb'=>'chalky.jpg',\n// 'created_at'=>'2015-10-20 21:30:13',\n// 'updated_at'=>'2015-10-20 21:30:13'\n// ]);\n// $obj->save();\n\n $resources = Resource::all();\n\n // This would return json, as if for a basic API\n// return $resources;\n\n // Here we rely on a template to format the data\n return view('resources.index', compact('resources'));\n }", "title": "" }, { "docid": "db4daec9f8d8cd89f2cb81ded0d0e9ea", "score": "0.68007904", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = ucfirst($this->crud->entity_name_plural);\n\n // get all entries if AJAX is not enabled\n if (! $this->data['crud']->ajaxTable()) {\n $this->data['entries'] = $this->memberRepository->all();\n }\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getListView(), $this->data);\n }", "title": "" }, { "docid": "a8dcf059f191629c6258ae65433dac79", "score": "0.68005747", "text": "public function index()\n {\n //Grab all listings - with a descending sort by create timestamp.\n $listings = Listing::orderBy('created_at', 'desc')->get();\n\n //Return view with listings data.\n return view('listings')->with('listings', $listings);\n }", "title": "" }, { "docid": "01e703b1d51958083a171c504a5fbe86", "score": "0.67932504", "text": "public function list()\n {\n // ...\n }", "title": "" }, { "docid": "8f780116288779687a52681d9b84a0ef", "score": "0.6789059", "text": "public function listAction()\n {\n $all = $this->users->findAll();\n $table = $this->createTable($all);\n\n $this->theme->setTitle(\"Användare\");\n $this->views->add('users/index', ['content' => $table, 'title' => \"Användare\"], 'main-wide');\n }", "title": "" }, { "docid": "fd7b1f8fd083bf003bd937783f973341", "score": "0.6786347", "text": "public function index() {\n\t\t/// Displaying all items from the database\n\t\t$list = Item::findAll();\n\t\t$list[\"title\"] = \"All items\";\n\t\t$this->render(\"index\", $list);\n\t}", "title": "" }, { "docid": "2581dc8a87e69733d9a5051a2ba197df", "score": "0.6784052", "text": "public function view_list();", "title": "" }, { "docid": "74f1d55e2353d3983fa09829081123b9", "score": "0.67709553", "text": "public function index()\n {\n // Get articles\n $articles = Article::latest()->paginate(5);\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "a127bb62f2b51cad9508439ded53e39b", "score": "0.67696005", "text": "public function index()\n {\n $tests = Test::all();\n return TestForListResource::collection($tests);\n }", "title": "" }, { "docid": "1e182d51ef856ffdebfbd850cf50bee9", "score": "0.67537886", "text": "public function index()\n {\n $result = Information::where('active', true)->orderby('id', 'DESC')->paginate(20);\n return InformationResource::collection($result);\n }", "title": "" }, { "docid": "3dac8ae8178b5ab6ec8f744af3d4b5bb", "score": "0.67486656", "text": "public function index()\n {\n $inventories = Inventory::orderBy('created_at', 'desc')->paginate($this->inventoriesInPage);\n return $this->renderOutputAdmin(\"inventories.list\", [\n \"inventories\" => $inventories\n ]);\n }", "title": "" }, { "docid": "0753ada8c8a122f6b6886e1cc84a5965", "score": "0.67384964", "text": "public function index()\n {\n $this->authorize('view', $this->resource->getModel());\n\n $this->data['collections'] = $this->resource->getRowsData();\n $this->data['attributes'] = $this->resource->getAttributes();\n\n return view('vellum::catalog', $this->data);\n }", "title": "" }, { "docid": "92224d4b1facc85c25b765eda1c899d2", "score": "0.6737816", "text": "public function actionIndex()\n {\n $searchModel = new ResourcesSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "66c285f8944542cf7713edaba3a0ad2c", "score": "0.6725589", "text": "public function index()\n {\n $this->data['url_data'] = site_url($this->class_path_name.'/list_data');\n $this->data['add_url'] = site_url($this->class_path_name.'/add');\n $this->data['record_perpage'] = SHOW_RECORDS_DEFAULT;\n }", "title": "" }, { "docid": "80d12db260f6dfe4b5aceed4625f5855", "score": "0.6721976", "text": "public function listAction()\n {\n $this->_datatable();\n return $this->render('BackendBundle:Foodies:list.html.twig');\n }", "title": "" }, { "docid": "b26e0dccffef1f4b909a7cc8c4dffc74", "score": "0.67117697", "text": "public function listAction()\n\t{\n\t\tif ($this->_getParam('json')) {\n\t\t\t$this->listJsonAction();\n\t\t} else {\n\t\t\t$project = $this->projectService->getProject((int) $this->_getParam('projectid'));\n\t\t\t$this->view->features = $this->featureService->getProjectFeatures($project);\n\t\t\t$this->view->project = $project;\n\t\t\tif ($this->_getParam('_ajax')) {\n\t\t\t\t$this->renderRawView('feature/list.php');\n\t\t\t} else {\n\t\t\t\t$this->renderView('feature/list.php');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "1b9ec8f3eb9fe45d7e52c09e49cd1f9d", "score": "0.67012614", "text": "public function index()\n {\n $offers = Offer::paginate(10);\n return OfferResource::collection($offers);\n }", "title": "" }, { "docid": "190c6247941c857dd2767bd08ced001b", "score": "0.66836476", "text": "public function index()\n {\n $device_logs = DeviceLog::filter()->paginate();\n // $this->authorize('index', 'App\\DeviceLog'); // TODO: Policy\n\n return Resource::collection($device_logs);\n }", "title": "" }, { "docid": "9956226ca0d6a5a308e812db7aa3c8dd", "score": "0.6680364", "text": "public function index()\n {\n return view('listing.index')->withListings(Listing::all());\n }", "title": "" }, { "docid": "b4b19a0a264ba05f056ca1d352c15ab3", "score": "0.6679044", "text": "public function listAction() {\n\t\t$tags = $this->getTags();\n\t\t$this->view->assign('tags', $tags);\n\t}", "title": "" }, { "docid": "5d423b3e213eb36859bc854e0ea0821c", "score": "0.66765565", "text": "public function index()\n\t{\n\t\t$this->get();\n\t}", "title": "" }, { "docid": "962ec92f5da4e239f0963901dd679303", "score": "0.667593", "text": "public function list()\n {\n $this->checkLoginStatus('list');\n return new HtmlResponse();\n }", "title": "" }, { "docid": "f11e7dc71257fc35d626a4cc0df754c5", "score": "0.6671179", "text": "public function index()\n {\n $books = Book::paginate(10);\n\n return BookResource::collection($books);\n }", "title": "" }, { "docid": "67da517f1e843dce244d42bf3c00c83c", "score": "0.66616595", "text": "public function index()\n {\n $resources = Resource::getResourcesByUserServiceProvider();\n\n return view('resources.index', compact('resources'));\n }", "title": "" }, { "docid": "d1469f07edbbe4ff69af75d8f005780f", "score": "0.6661017", "text": "public function index()\n {\n $listings = Listing::get();\n return view('pages.backend.listing.index', compact('listings'));\n }", "title": "" }, { "docid": "4972cd57158bca324de2cdc88e1141c7", "score": "0.6659724", "text": "public function index()\n {\n $specifier = Specifier::paginate();\n return SpecifierResource::collection($specifier);\n }", "title": "" }, { "docid": "cbfc53f61a9472895d3345b43532b0f6", "score": "0.6659596", "text": "public function actionList()\n {\n $searchModel = new IgualasSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n // Se buscan también los servicios\n $serviciosModel = new \\app\\models\\ServiciosSearch(['activo'=>true]);\n $serviciosProvider = $serviciosModel->search(Yii::$app->request->queryParams);\n\n return $this->render('list', [\n 'dataProvider' => $dataProvider,\n 'serviciosProvider' => $serviciosProvider,\n ]);\n }", "title": "" }, { "docid": "ec7aa7b9d406ecdd3cbfb90dfff07cc9", "score": "0.66576624", "text": "public function index()\n {\n // Getting all the articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(6);\n\n // Return article collection as a resource\n return aResource::collection($articles);\n }", "title": "" }, { "docid": "348728c06ffc3f7f47ab7a2486701300", "score": "0.66531324", "text": "public function list()\n {\n return view('items.list');\n }", "title": "" }, { "docid": "d1c36ec734b04a00b0316be8705fdc95", "score": "0.6647826", "text": "public function defaultAction()\n {\n $this->listing();\n }", "title": "" }, { "docid": "3340a40aeb9ca6134a87997b56d911be", "score": "0.6645119", "text": "public function indexAction()\n {\n $item = new Item;\n $items = $item->getAll();\n View::renderTemplate('Home/index.html', ['items_list' => $items]);\n }", "title": "" }, { "docid": "e7a070ae572c193acb7a79ecc2d34f28", "score": "0.66418844", "text": "public function index()\n {\n // Get activities\n $activities = Activity::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of activities as a resource\n return ActivityResource::collection($activities);\n }", "title": "" }, { "docid": "ae0412e2b98e2acf1da43d334bdc55fa", "score": "0.6638416", "text": "public function index()\n\t{\n\t\t$datas = $this->model->where('cat_status', 'open')->orderBy('sort_order')->paginate(15);\n\t\treturn View::make($this->resourceView.'.index')->with(compact('datas'));\n\t}", "title": "" }, { "docid": "81e310e3464b83f2e25e4bb5406f1a35", "score": "0.663706", "text": "public function index()\n {\n $products = Product::latest()->paginate(10);\n\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "c7124181b330eb937c62f9defe1d9274", "score": "0.66361564", "text": "public function index()\n {\n return SectionResource::collection(SectionModel::paginate(25));\n }", "title": "" }, { "docid": "5b0d18ee7af036a0126d30b01aac4670", "score": "0.6635448", "text": "public function index( )\n\t{\t\n\t\tif(!\\Sentry::getUser()->hasAccess('manage_listings')){\n\t\t\treturn redirect()->action('AdminController@properties');\n\t\t}\n\n\t\t$listings= $this->listing->get();\n\t\t$website = $this->website->get();\n\t\treturn view('admin.listings', array('listings'=>$listings, 'websites'=>$website));\n\n\t}", "title": "" }, { "docid": "2e96526efb31162a0f4ca3bb61f781c5", "score": "0.66319674", "text": "public function indexAction()\n\t{\n\t\t$this->_view->_title \t\t\t\t= ucfirst($this->_arrParam['controller']) . \" Controller :: List\";\n\n\t\t//Total Items\n\t\t$itemCount \t\t\t\t\t\t\t= $this->_model->countItems($this->_arrParam, ['task' => 'count-items-status']);\n\t\t$configPagination \t\t\t\t\t= ['totalItemsPerPage' => 5, 'pageRange' => 3];\n\t\t$this->setPagination($configPagination);\n\t\t$this->_view->pagination \t\t\t= new Pagination($itemCount[0]['count'], $this->_pagination);\n\t\t//List Items\n\t\t$this->_view->items \t\t\t\t= $this->_model->listItems($this->_arrParam);\n\t\t$this->_view->render($this->_arrParam['controller'] . '/index');\n\t}", "title": "" }, { "docid": "9fe55a7f3832e2905b2600e03b1356d2", "score": "0.6627155", "text": "public function index()\n\t{\n\t\tif (Input::get('list'))\t\treturn Response::json($this->model->getList(), 200);\n\t\telse \t\t\t\t\t\treturn Response::json($this->model->fetch(Input::all()), 200);\n\t}", "title": "" }, { "docid": "5438ea6951e01b2b0c5f44bd2895ba5d", "score": "0.6627067", "text": "public function index()\n {\n $listing = Listing::paginate(15);\n\n return view('listing.index', compact('listing'));\n }", "title": "" }, { "docid": "28c7c5fe8eff5e4f7e67018271a3970f", "score": "0.6621494", "text": "public function index()\n {\n //\n $resources = \\App\\Resource::all();\n return $resources;\n }", "title": "" }, { "docid": "7049b0be3d5ee96fe0213da94a5eabdc", "score": "0.66211265", "text": "public function list(): Response\n {\n $repository = $this->getDoctrine()->getRepository(ShowList::class);\n return $this->render('concert/concert.html.twig', [\n 'name' => \"list\",\n 'concerts' => $repository->findAll()\n ]\n );\n }", "title": "" }, { "docid": "de6e1eefbb1c8632afb33575e2d66697", "score": "0.66209346", "text": "public function index()\n {\n return BookListResource::collection(Book::all());\n // // return $author->books;\n }", "title": "" }, { "docid": "fb7ed7947ab536b91c04edc0db5a20e5", "score": "0.6608123", "text": "public function listAction()\n {\n $title = $this->t->_('List ') . $this->t->_($this->model_name);\n $this->tag->setTitle($title);\n $this->view->title = $title;\n\n $model = $this->getModel();\n\n if (is_null($model)) {\n $this->response->redirect('/admin/dashboard');\n }\n\n $query_urls = $this->request->getQuery();\n unset($query_urls['_url']);\n unset($query_urls['submit']);\n unset($query_urls['page']);\n\n // search\n $search_opt = $this->getFieldsSearch($query_urls, $model->list_view['fields']);\n $conditions = $search_opt['conditions'];\n $parameters = $search_opt['parameters'];\n // sort\n\n $list_data = $model::find(array(\n $conditions,\n 'bind' => $parameters\n ));\n\n // pagination\n $currentPage = $this->request->getQuery('page');\n $paginator_limit = 20; // @TODO\n $paginator = new PaginatorModel(array(\n \"data\" => $list_data,\n \"limit\" => $paginator_limit,\n \"page\" => $currentPage > 0 ? $currentPage : 1\n ));\n // get page\n $page = $paginator->getPaginate();\n\n $this->view->page = $page;\n $this->view->data = $page->items;\n $this->view->list_view = $model->list_view;\n $this->view->search = $query_urls;\n\n $controller = strtolower($this->controller_name);\n $action = strtolower($this->action_name);\n\n $this->view->controller = $controller;\n $this->view->action = $action;\n $this->view->action_detail = $this->action_detail;\n $this->view->action_edit = $this->action_edit;\n $this->view->action_delete = $this->action_delete;\n $this->view->menu = $model->menu;\n\n $query_urls = empty($query_urls) ? array('nosearch' => 1) : $query_urls;\n $this->view->current_url = $this->url->get(\"/admin/$controller/$action\", $query_urls);\n\n $exists = $this->view->exists($controller . '/' . $action);\n if (!$exists) {\n $this->view->pick('view_default/list');\n }\n }", "title": "" }, { "docid": "4075f3e85858e8eac990a25721c76630", "score": "0.66057074", "text": "public function index()\n {\n return $this->sendResponse( [\n \"items\"=> BookResource::collection(Book::all()->toArray())\n ],\n \"Books Retrieved successfully!\"\n );\n\n }", "title": "" }, { "docid": "f148c3920960427ce58f996986160dfa", "score": "0.6605562", "text": "public function index()\n { \n $articles = Article::latest()->paginate(10);\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "5bd87f0ad66d0212e0bec36ece123e1e", "score": "0.6600455", "text": "public function index()\n {\n $user = Student::latest()->get();\n return $this->showAll(StudentResource::collection($user));\n }", "title": "" }, { "docid": "4815297dfe29adcb934ed5d6b8357ceb", "score": "0.65940166", "text": "public function index()\n\t{\n\t\t// // Check for list permission\n\t\t// if (! $this->model->mayList())\n\t\t// {\n\t\t// \treturn $this->user();\n\t\t// }\n\n\t\treturn $this->display();\n\t}", "title": "" }, { "docid": "a84c8d0a92b2e2efb69455a9790926e0", "score": "0.65936685", "text": "public function index()\n {\n return AulaResource::collection(Aula::paginate());\n }", "title": "" }, { "docid": "8395c06faebc6da915e86b24ff1c40b8", "score": "0.6591476", "text": "public function index()\n {\n //Get all articles, paginate function could be improved\n // $articles = Article::paginate(15);\n\n $articles = Article::get();\n //Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "6847e76913911cac71a85fa2835bf369", "score": "0.6583209", "text": "public function listAction()\n {\n $this->View()->assign($this->getAvailableStatuses());\n }", "title": "" }, { "docid": "244698ad57c10b2cf9bea875ed11f4e2", "score": "0.6582496", "text": "public function index()\n {\n return view('listing.index')->with([\n 'listings' => app('listings')->take(7),\n 'tags' => Tag::all(),\n ]);\n }", "title": "" }, { "docid": "965ff224495731f89e5a39ec8d28c56c", "score": "0.6580476", "text": "public function indexAction()\n\t{\n\t\t$paginator = $this->_getPaginator();\n\t\t$this->_configurePagination($paginator);\n\t\t$records = $this->_getProcessedRecords($paginator->getCurrentItems());\n\n\t\t$this->view->assign('records',$records);\n\n\t\t$this->configureView();\n\n\t\t$this->view->render('index.phtml');\n\t}", "title": "" }, { "docid": "5ae3dc8a0646433f9c872265b7fae9bb", "score": "0.6579524", "text": "public function index()\n {\n save_resource_url();\n $items = Document::with('documentable')->get();\n\n return $this->view('resources.documents.index')->with('items', $items);\n }", "title": "" }, { "docid": "f7f0617a1c3535ff5bd60dabc6ef0b2a", "score": "0.65772367", "text": "public function index()\n {\n $resources=Resource::orderBy('created_at','desc')->get();\n return view('admin.index',compact('resources'));\n }", "title": "" }, { "docid": "93c8e2fb25d358967a7239099ffa01be", "score": "0.6576169", "text": "public function actionList()\n {\n $model = new ImageList();\n\n $path = $model->getDataRequest('path');\n $imageList = $model->loadImage($path);\n\n return $this->render('list',compact('model','imageList','path'));\n }", "title": "" }, { "docid": "caa63ad0b7f03a52984cdbcc404b742e", "score": "0.6566202", "text": "public function listingAction()\n {\n $this->_helper->content->setNoRender()->setEnabled();\n }", "title": "" }, { "docid": "9ce8b7d31b54ee923c432b4460d8fe38", "score": "0.65637076", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = $this->crud->getTitle() ?? mb_ucfirst($this->crud->entity_name_plural);\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getListView(), $this->data);\n }", "title": "" }, { "docid": "d085389ae4d1b9ed456fd3f7f897fb44", "score": "0.65618056", "text": "public function index()\n {\n return ProjectListResource::collection(Project::paginate());\n }", "title": "" }, { "docid": "fb5cc939df880d31486688650542e9ef", "score": "0.6560243", "text": "public function index()\n {\n $per_page = !request()->filled('per_page') ? 10 : (int) request('per_page');\n $direction = request()->query('direction');\n $sortBy = request()->query('sortBy');\n\n $query = EmisiCo2Tahunan::query();\n\n $query->when(request()->filled('tahun'), function ($query) {\n return $query->where('tahun', 'ILIKE', \"%\" . request()->query('tahun') . \"%\");\n });\n\n if(request()->has('provinsi')){\n $query->when(request()->filled('provinsi'), function ($query) {\n return $query->whereHas('Provinsi',function($q){\n return $q->where('nama_provinsi', 'ILIKE', \"%\" . request()->query('provinsi') . \"%\");\n });\n });\n }\n\n $lists = $query->orderBy($sortBy, $direction)->paginate($per_page);\n\n return new ListResources($lists);\n }", "title": "" }, { "docid": "d9aec54688559be15dcc145297ec98e9", "score": "0.6559387", "text": "public function index()\n {\n return view('backend.item.list_item');\n }", "title": "" }, { "docid": "e9a03ea28e2df914c978aa5c0d3a5637", "score": "0.6554056", "text": "public function index()\n {\n $options = $this->getQueryHelperOptions();\n $items = $this->repo->allPaged($options);\n\n if ( ! $items)\n {\n return $this->respondNotFound('Unable to fetch the selected resources');\n }\n\n $response = [\n 'data' => [],\n 'meta' => [\n 'pagination' => []\n ]\n ];\n\n $resource = new Fractal\\Resource\\Collection($items->getCollection(), new $this->transformerClass);\n $resource->setPaginator(new Fractal\\Pagination\\IlluminatePaginatorAdapter($items));\n\n $response['data'] = $this->fractal->createData($resource)->toArray()['data'];\n\n $paginator = new Fractal\\Pagination\\IlluminatePaginatorAdapter($items);\n\n $response['meta']['pagination'] = [\n 'total' => $paginator->getTotal(),\n 'count' => $paginator->count(),\n 'per_page' => $paginator->getPerPage(),\n 'current_page' => $paginator->getCurrentPage(),\n 'total_pages' => $paginator->getLastPage()\n ];\n\n return $response;\n }", "title": "" }, { "docid": "64c23385ebf3abebc1a7abc1fe27b69a", "score": "0.65517366", "text": "public function index()\n {\n return EntryResource::collection(Auth::user()->entries);\n }", "title": "" }, { "docid": "9c04a592d034f52c23e6d6ecf983a3ae", "score": "0.6544668", "text": "public function index()\n {\n return EmployeeResource::collection(Employee::query()->paginate());\n }", "title": "" }, { "docid": "91ef4976872522e55ce7d21232db8ce3", "score": "0.6541719", "text": "public function getlist()\n {\n \t$specieses = Species::all();\n\n \treturn view( 'species.index-species' )->withSpecieses($specieses);\n }", "title": "" }, { "docid": "13e213cc4f2553888dd031c39274477f", "score": "0.65387595", "text": "public function index()\n {\n $objects = Thing::availableForCatalog()->paginate(40)->toJson();\n\n return view('web.pages.objects.index', compact('objects'));\n }", "title": "" }, { "docid": "7e319cde9d05f34fd876660ef419e5c1", "score": "0.6535465", "text": "public function index()\n {\n return CursoResource::collection(Curso::paginate());\n }", "title": "" }, { "docid": "80349a31fc145e69c11f76d6fe21f244", "score": "0.6525081", "text": "public function listAction($page)\n {\n $list = ApiDataSource::getList(!empty($page) ? $page : 1);\n\n if (!empty($list)) {\n try {\n echo TemplateEngine::get()->render(\n 'index.html.twig',\n array(\n \"shipList\" => !empty($list['results']) ? $list['results'] : null,\n \"currentPage\" => $page,\n \"totalPages\" => !empty($list['results']) && !empty($list['count']) ? ceil($list['count'] / Config::get()->getSection('api')['perPage']) : 0\n )\n );\n } catch (\\Exception $e) {\n Logger::get()->error($e->getMessage());\n header('HTTP/1.0 500 Internal server error');\n }\n } else {\n header('HTTP/1.0 404 Not Found');\n }\n }", "title": "" }, { "docid": "8db12a9417955f7cafd859a2f084db66", "score": "0.6524149", "text": "public function index()\n {\n $articles=$this->articleRepository->paginate(10);\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "b02a86792172e9aa0d15ce71523bf18a", "score": "0.6522924", "text": "public function listAction()\n {\n $postManager = new PostManager();\n $posts = $postManager->getAllPosts();\n $this->render('Post/list.html.twig', ['posts' => $posts]);\n }", "title": "" }, { "docid": "3facf87d49c58736d719a1d9ceb098c4", "score": "0.6515679", "text": "public function index()\n {\n $halls = Hall::all();\n return HallResource::collection($halls);\n }", "title": "" }, { "docid": "5e65da9a34ee6f80605137959439b41c", "score": "0.6511205", "text": "public function index()\n {\n //\n return EmployeeResource::collection(Employee::latest()->paginate(5));\n }", "title": "" }, { "docid": "3f890ba095bdb75af4cc34f24821df21", "score": "0.651028", "text": "public function index()\n {\n //Retrieve all the otter resource names that are available\n $allResourceNames = $this->allResourceNames;\n $prettyResourceName = $this->prettyResourceName;\n $resourceName = $this->resourceName;\n $resourceFields = json_encode(Otter::getAvailableFields($this->resource));\n\n return view('otter::pages.index', compact('allResourceNames', 'prettyResourceName', 'resourceName', 'resourceFields'));\n }", "title": "" }, { "docid": "1fa5cdf3237bc23c42125528d9db4212", "score": "0.650871", "text": "public function listAction()\n {\n $this->view->assign('posts', $this->findPosts());\n }", "title": "" }, { "docid": "c7253bf5ee3c82a3ec81a23e84bfc054", "score": "0.6507231", "text": "public function index()\n {\n return Response::custom('list', $this->service->all(), \\Illuminate\\Http\\Response::HTTP_OK);\n }", "title": "" }, { "docid": "16cbe42e288d6db09ecb33ee711d2c85", "score": "0.650502", "text": "public function index()\n {\n $items = Item::all();\n\n return response([\n 'items' => ItemResource::collection($items),\n 'message' => 'Retrieved successfully'\n ], 200);\n }", "title": "" }, { "docid": "9b9cf4a5c0a3cf48f806a2c95874afa6", "score": "0.6503013", "text": "public function index()\n {\n //\n if (\\Gate::allows('canView')) {\n $category = Category::latest()->paginate(10);\n return CategoryResource::collection($category);\n } else {\n return ['result' => 'error', 'message' => 'Unauthorized! Access Denied'];\n }\n }", "title": "" }, { "docid": "4b682e76649352c45a12edca169568ff", "score": "0.65024114", "text": "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_Book_type->get_all();\n\t\t$this->template->set('title', 'Book Type List');\n\t\t$this->template->load('template', 'contents', 'book_type/book_type_list', $data);\n\t}", "title": "" }, { "docid": "12f45a4dbd72d90586e475e387aa5ee9", "score": "0.6500511", "text": "public function list()\n {\n // récupération de tous les users grâce à la méthode statique \"findAll()\"\n $users = User::findAll();\n\n // génération d'un token aléatoire\n // pour protéger la route\n $token = $this->generateCsrfToken();\n\n // définition du tableau de données $viewVars à passer à ma vue\n $viewVars = [\n 'users' => $users,\n 'token' => $token,\n ];\n\n // j'appelle ma méthode show qui va afficher le bon template\n // à qui je passe mon tableau de données viewVars\n $this->show('user/list', $viewVars);\n }", "title": "" } ]
a0a0940174479f45a7438e97ab58a626
Solo pueden acceder usuarios autenticados
[ { "docid": "88677cc86e8beb32b469b36c427a66d9", "score": "0.0", "text": "public function __construct(){\n $this->middleware('auth');\n }", "title": "" } ]
[ { "docid": "30d335803ad9156cb36e242acb7d42dd", "score": "0.67865807", "text": "public function tryAutenticaUser() { //controllato\r\n try {\r\n $this->autenticaUser();\r\n } catch (XUserException $e) {\r\n $errore = $e->getMessage();\r\n $this->gestisciEccezioneAutenticaUser($errore);\r\n } catch (XDatiLogInException $e) {\r\n $errore = $e->getMessage(); // vorrei usare l'errore nel template per far visualizzare il messaggio di errore all'user\r\n $this->gestisciEccezioneAutenticaUser($errore);\r\n }\r\n catch (XDBExceptionException $e) {\r\n $errore = \"C'è stato un errore durante l'autenticazione.\"; \r\n $this->gestisciEccezioneAutenticaUser($errore);\r\n }\r\n }", "title": "" }, { "docid": "ab9229da9386fcf336997bb5bfe49d39", "score": "0.6609691", "text": "public function authentificate()\n {\n }", "title": "" }, { "docid": "a4f0c7bffdca2f82ebf56b81074fbb9f", "score": "0.6528434", "text": "public function sucesso(){\n\t $this->validaUsuario();\n\n\t // remove flags\n\t $this->preparaUsuario();\n\t // prepara sessao\n\t $this->preparaSessao();\n\t }", "title": "" }, { "docid": "1038db20de3dc0ca0fa2223379450994", "score": "0.6476707", "text": "public static function login_sincroniza()\n\t{\n\t\t//verifica se o e-mail já está cadastrado\n\t\t\n\t\t//se o e-mail estiver cadastrado, sincroniza\n\n\t\t//se não acha o e-mail, cria novo cadastro\n\t\t\n\t\t// ao término, inicia a sessão\n\t\t\n\t}", "title": "" }, { "docid": "351ca20db9451abc5e0e881fc3d34b61", "score": "0.6474174", "text": "public function admin_checa_logado() {\r\n $user_itoken = $this->user_get_coluna_valor(\"itoken\");\r\n $session_itoken = $_SESSION[\"admin_itoken\"];\r\n if($session_itoken != $user_itoken) {\r\n $this->admin_login(false);\r\n php::redirecionar(\"login.php\");\r\n }\r\n }", "title": "" }, { "docid": "92efe7eeaada81aee57771f47f0dac67", "score": "0.63552415", "text": "public function autorizar(){\n $auth=Yii::$app->authManager;\n \n //Crea roles de usuarios\n $admin=$auth->createRole('administrador');\n $gestor=$auth->createRole('gestor');\n $operador=$auth->createRole('operador');\n \n //Genera lista de roles\n $auth->add($admin);\n $auth->add($gestor);\n $auth->add($operador);\n \n //Creando acciones para controlar\n $ver=$auth->createPermission('ver');\n $crear=$auth->createPermission('editar');\n $editar=$auth->createPermission('crear');\n $borrar=$auth->createPermission('borrar');\n \n //Agrega lista de acciones\n $auth->add($ver);\n $auth->add($crear);\n $auth->add($editar);\n $auth->add($borrar);\n \n //Asignando permisos de acciones por rol\n //Administador\n $auth->addChild($admin,$ver);\n $auth->addChild($admin,$crear);\n $auth->addChild($admin,$editar);\n $auth->addChild($admin,$borrar);\n //Gestor\n $auth->addChild($gestor,$ver);\n $auth->addChild($gestor,$crear);\n $auth->addChild($gestor,$editar);\n //Operador\n $auth->addChild($operador,$ver);\n \n //\n $auth->assign($admin, 1); //K\n $auth->assign($gestor, 2); //T\n $auth->assign($operador, 3); //D\n //Sooolo para saber si un usuario puede tener mas roles\n //Y encima funcionaa. Fuck!! Fuck!! Fuck!!\n //$auth->assign($gestor, 1); // Yeaahhh!!!!!\n }", "title": "" }, { "docid": "8548487f839db074c0f0dbacc42ece16", "score": "0.6349126", "text": "public function uac_auth();", "title": "" }, { "docid": "b3ceecdd49a62f427dd8448524c79a13", "score": "0.6348383", "text": "public function admin_autenticar_login($email,$senha) {\r\n if(!empty($email) and !empty($senha)) {\r\n $sql = \"select * from \".$this->table_usuario.\" where email = '\".$email.\"' and senha = '\".$senha.\"' and status = '1'\";\r\n conexao::query($sql);\r\n if(conexao::num_rows() > 0) {\r\n $aw = conexao::fetch_array();\r\n\r\n\r\n $hora = php::get_Horario(1);\r\n $navegador = php::getBrowser();\r\n $ip = php::get_Ip();\r\n /* log */\r\n $this->log->insertLog(\"autenticacao\",\"icon-user\",\"\",\"Usuário <b>\".$aw[\"nome_completo\"].\"</b> fez login ás (<b>\".$hora.\"</b>) - (Browser: \".$navegador[\"name\"].\", Sistema: \".$navegador[\"platform\"].\", IP: \".$ip.\")\");\r\n\r\n /* Cria Sessions de usuario */\r\n $_SESSION[\"admin_id\"] = $aw[\"id\"];\r\n $_SESSION[\"admin_level\"] = $aw[\"level\"];\r\n /* Seta autenticacao como true */\r\n $this->admin_login(true);\r\n echo \"1\";\r\n } else {\r\n\r\n $hora = php::get_Horario(1);\r\n $navegador = php::getBrowser();\r\n $ip = php::get_Ip();\r\n /* log */\r\n $this->log->insertLog(\"autenticacao\",\"icon-user\",\"red\",\"Tentativa de conexão como: <b>\".$email.\"</b> ás (<b>\".$hora.\"</b>) - (Browser: \".$navegador[\"name\"].\", Sistema: \".$navegador[\"platform\"].\", IP: \".$ip.\")\");\r\n\r\n\r\n\r\n echo \"0\";\r\n }\r\n } else {\r\n echo \"0\";\r\n }\r\n }", "title": "" }, { "docid": "283ac9671c3c1fc1485cc07e7b4cc5be", "score": "0.63407695", "text": "public function security(){\r\n\t\t//comnprueba que el usuario esta autentificado\r\n\t\tif($_SESSION[\"autentificado\"] !=\"SI\"){\r\n\t\t\t//si no existe, envia te encia a la página para autenricarte\r\n\t\t\theader(\"Location: index.php?errorusuario=si\");\r\n\t\t\t//además sale de este script\r\n\t\t\texit();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "21c6a27fcb434e85c7e63d55922baa76", "score": "0.63395244", "text": "public static function limpaLoginUsuarioSessaoAuth()\n\t{\n\t\t// limpando identity do zend auth\n\t\tZend_Auth::getInstance()->clearIdentity();\n\t}", "title": "" }, { "docid": "a4c6a3bd772b047e816bd2a6d54980f6", "score": "0.6331159", "text": "private function checkAuth(){\n if(isset($_SESSION['admin-username'])){\n $this->auth = true;\n $this->fetchUserDetails();\n }else{\n $this->auth = false;\n }\n }", "title": "" }, { "docid": "deaecee3bcb7e7c4f8d740615307ef21", "score": "0.6325818", "text": "public function autentica()\r\n\t{\r\n\t\ttry {\r\n\r\n\t\t\t// verifica os dados enviado via post e faz comparacao no banco.\r\n\t\t\t$authAdapter = new \\Zend_Auth_Adapter_DbTable( parent::db() );\r\n\t\t\t$authAdapter->setTableName( 'usuario' )\r\n\t\t\t\t\t ->setIdentityColumn( 'ds_email' )\r\n\t\t\t\t\t ->setCredentialColumn( 'ds_senha' )\r\n\t\t\t\t\t ->setCredentialTreatment( 'md5(?)' )\r\n\t\t\t\t\t ->setIdentity( $this->arrFrmUsuario[ 'ds_email' ] )\r\n\t\t\t\t\t ->setCredential( $this->arrFrmUsuario[ 'ds_senha' ] );\r\n\r\n\t\t\t// instacia a class Auth do zend.\r\n\t\t\t$auth\t=\t\\Zend_Auth::getInstance();\r\n\t\t\t$result\t=\t$auth->authenticate( $authAdapter );\r\n\r\n\t\t\t// verifica se ah informacao passada via post sao validas.\r\n\t\t\tif ( $result->isValid() )\r\n\t\t\t{\r\n\t\t\t\t$objData\t=\t$authAdapter->getResultRowObject( null , \"ds_senha\" );\r\n\r\n\t\t\t\t$auth->getStorage()->write( $objData );\r\n\t\t\t\t$strResult = Constante::OK;\r\n\t\t\t}\r\n\t\t\telse // se nao retorne uma mensagem de error.\r\n\t\t\t{\r\n\t\t\t\t$strResult = parent::translate( \"usuario-invalido\" );\r\n\t\t\t} // end iF.\r\n\r\n\t\t} catch ( Zend_Db_Exception $ex ) {\r\n\t\t\t$strResult = $ex->getMessage();\r\n\t\t} catch ( Exception $e ) {\r\n\t\t\t$strResult = $e->getMessage();\r\n\t\t} // end try/catch\r\n\r\n\t\treturn ( $strResult );\r\n\r\n\t}", "title": "" }, { "docid": "cdae404f111f68837f68862db5d255b3", "score": "0.6268354", "text": "function autenticaUsuario($usuario, $senha){ \n//\n\t\n\t$sql = \"SELECT * FROM ig_usuario, ig_instituicao, ig_papelusuario WHERE ig_usuario.nomeUsuario = '$usuario' AND ig_instituicao.idInstituicao = ig_usuario.idInstituicao AND ig_papelusuario.idPapelUsuario = ig_usuario.ig_papelusuario_idPapelUsuario AND ig_usuario.publicado = '1' LIMIT 0,1\";\n\t$con = bancoMysqli();\n\t$query = mysqli_query($con,$sql);\n\t //query que seleciona os campos que voltarão para na matriz\n\tif($query){ //verifica erro no banco de dados\n\t\tif(mysqli_num_rows($query) > 0){ // verifica se retorna usuário válido\n\t\t\t$user = mysqli_fetch_array($query);\n\t\t\t\tif($user['senha'] == md5($_POST['senha'])){ // compara as senhas\n\t\t\t\t\tsession_start();\n\t\t\t\t\t$_SESSION['usuario'] = $user['nomeUsuario'];\n\t\t\t\t\t$_SESSION['perfil'] = $user['idPapelUsuario'];\n\t\t\t\t\t$_SESSION['instituicao'] = $user['instituicao'];\n\t\t\t\t\t$_SESSION['nomeCompleto'] = $user['nomeCompleto'];\n\t\t\t\t\t$_SESSION['idUsuario'] = $user['idUsuario'];\n\t\t\t\t\t$_SESSION['idInstituicao'] = $user['idInstituicao'];\n\n\t\t\t\t\t$log = \"Fez login.\";\n\t\t\t\t\tgravarLog($log);\n\t\t\t\t\theader(\"Location: visual/index.php\"); \n\n\t\t\t\t}else{\n\n\t\t\techo \"A senha está incorreta.\";\n\t\t\t}\n\t\t}else{\n\t\t\techo \"O usuário não existe.\";\n\t\t}\n\t}else{\n\t\techo \"Erro no banco de dados\";\n\t}\t\n}", "title": "" }, { "docid": "06ea776cb6088400131154cb13afe530", "score": "0.62371844", "text": "function auth_user()\n{\n //global $auth_user, $auth_pass;\n global $users;\n \n $user = get_user();\n $pass = get_pass();\n\n //No User/Pass defined: Allow everything\n if ( !isset($users) || empty($users) ) {\n return true;\n } else {\n foreach ($users as $key => $value) {\n if ($user == $users[$key]['user'] && $pass == $users[$key]['pass']) {\n $_SESSION['torque_user'] = $users[$key]['user'];\n return true;\n }\n }\n }\n\n return false;\n}", "title": "" }, { "docid": "163ba0e11113e04c6021f5139b2a90d0", "score": "0.6236624", "text": "protected function userLogin() {\n\n # envia nova senha por e-mail\n $emailData = array(\n 'to' => $this->requestParams['User']['email'],\n 'Login' => $this->requestParams['User']['email'],\n 'Senha' => $this->requestParams['User']['password']\n );\n if ($this->sendEmail($emailData, true)) {\n # dados enviados por email\n $this->appData = array(\n 'status' => $this->crudOperationStatus['save_ok'],\n 'data' => $this->requestParams\n );\n } else {\n # erro ao enviar e-mail. Tratar como erro ao salvar. Basta repetir o procedimento para nova senha.\n $this->appData = array(\n 'status' => $this->crudOperationStatus['save_error'],\n 'data' => $this->requestParams\n );\n }\n }", "title": "" }, { "docid": "7092b5101c085270639248dbece71130", "score": "0.6209257", "text": "function auth() {\n\t\t$f3=$this->f3;\n\t\t$salt=crypt($f3->get('POST.password'));\n\t\tif (false &&( $f3->get('POST.user_id')!=$f3->get('user_id') ||\n\t\t\tcrypt($f3->get('password'),$salt)!=$salt)) {\n\t\t\t$f3->set('message','Invalid user ID or password');\n\t\t\t$this->login();\n\t\t}\n\t\telse {\n\t\t\t$f3->set('SESSION.user_id',$f3->get('POST.user_id'));\n\t\t\t$f3->set('SESSION.password',\n\t\t\t\tcrypt($f3->get('password'),$salt));\n\t\t\t$f3->set('SESSION.lastseen',time());\n\t\t\t$f3->reroute('/');\n\t\t}\n\t}", "title": "" }, { "docid": "e6dec17c70b4c1a5dfa8347a1d9318d0", "score": "0.6202717", "text": "private function check_if_user_exists() {\r\n\t\t$q = 'SELECT username FROM '.$this->_pConf->mysql_table_user.' WHERE username = \"'.$this->_JSON->username.'\"';\r\n\t\t$res = $this->execute_sql($q);\r\n\t\tif(mysql_num_rows($res) != 1) {\r\n\t\t\tthrow new Exception(\"Authentication error - You are not allowed here\", 403);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "0d4662b4bbc093ca27930aa71de2cf67", "score": "0.6197586", "text": "function auth() {\n\tglobal $REX;\n\n\t$avAuth = new OOavEnterAuth($REX);\n\n\t$login = $avAuth->checkAuth();\n\n\tif (!$login) {\n\t\treturn 0;\n\t}\n\n\tif (!$REX['COM_USER']->getValue('login')) {\n \treturn 0;\n\t}\n\n\tif ($login && $REX['COM_USER']->getValue('login')) {\n\t\treturn 1;\n\t}\n}", "title": "" }, { "docid": "415788b8c0d667bfd749a3b55fb29e5a", "score": "0.61954886", "text": "private function autenticar($correo, $contrasena)\n {\n $comando = \"SELECT \". self::NOMBRE_TABLA . \".password FROM \" . self::NOMBRE_TABLA . \" WHERE \" . self::CORREO . \"=\" . \"'\" . $correo . \"'\";\n try{\n $sentencia = ConexionBD::obtenerInstancia()->obtenerBD()->prepare($comando);\n $sentencia->bindParam(1, $correo);\n $sentencia->execute();\n // return $comando;\n \n if ($sentencia){\n $resultado = $sentencia->fetch();\n \n if(self::validarContrasena($contrasena, $resultado[\"password\"])){\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n } catch (PDOException $e){\n throw new ExcepcionApi(self::ESTADO_ERROR_BD, $e->getMessage());\n }\n }", "title": "" }, { "docid": "db37be6fc78cfcb8e8e72b6e5174d386", "score": "0.61642927", "text": "private function gestisciEccezioneAutenticaUser($errore) {\r\n $vAutenticazione = USingleton::getInstance('VAutenticazione');\r\n $uCookie = USingleton::getInstance('UCookie');\r\n $uCookie->incrementaCookie('Tentativi'); //incremento il cookie Tentativi \r\n if ($uCookie->checkValiditaTentativi()) { // massimo 3 tentativi\r\n // pagina di log \r\n $vAutenticazione->impostaLogIn($errore);\r\n } else {\r\n // pagina recupero credenziali \r\n $uCookie->eliminaCookie('Tentativi');\r\n $vAutenticazione->impostaPaginaRecuperoCredenziali();\r\n }\r\n }", "title": "" }, { "docid": "978dba89750e44bde94fcd1ba6de0c82", "score": "0.6163657", "text": "private function verificaSenha(){\n\t $this->validaUsuario();\n\n\t if(!password_verify($this->getSenha(), $this->getUsuario()->getSenhaHash())){\n\t $this->erroLogin();\n\t }\n\t }", "title": "" }, { "docid": "574e86e4b998c6842019274b785bad46", "score": "0.6153114", "text": "function verificarUsuario() {\n\t\n\t\tif (empty($_SESSION['usrAdmin']) && (empty(current($_SESSION)))) {\n\t\t\theader(\"Location:login.php\");\n\t\t}\n\t\t\n}", "title": "" }, { "docid": "7481393ef9166571fe76266f44ff16ed", "score": "0.61472636", "text": "function authorize()\n\t{\n\t\tuser::login($org_id);\n\n\t\tif (valid::form())\n\t\t{\n\t\t\t$password = secure::password();\n\n\t\t\t$user_id = user::create($org_id, $password['hash']);\n\n\t\t\tuser::email($user_id, 'email_welcome',[data::get('org_name').br(1).\"Password $password[text]\"]);\n\n\t\t\tto::info(['User created!', 'A welcome email was sent with a temporary password'], 'to_default', 'account/users');\n\t\t}\n\n\t\tview::full('account', 'authorize user');\n\t}", "title": "" }, { "docid": "2dd917c1468354190273730de078baa7", "score": "0.61320424", "text": "public function auth()\n\t{\n\t\tRequest::auth( $this->settings->account_management_key, '' );\n\t}", "title": "" }, { "docid": "526f79d5133f0a74a8d3da3c63df2b9b", "score": "0.61201996", "text": "public function authorize()\n {\n// return false;\n return true; //no voy a validar los usuarios aqui. Lo hare de otra manera\n }", "title": "" }, { "docid": "1b32e9ed2409be13dbf8013af717918f", "score": "0.6114145", "text": "private function accesOk()\n {\n \t$session = new Session();\n \t$user \t = $session->get('sessionUser');\n\n \t//Pude obtener algo de la sesion, si no hay nada vuelvo al login.\n \tif ($user==null)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n }", "title": "" }, { "docid": "629b4946ee433069725c5f4595b5c842", "score": "0.6101393", "text": "public function login(){\n $user = UserRepository::getInstance()->getUser($_POST['name'],$_POST['password']);\n if($user){ /** recuperar las lista de roles y permisos */\n $userRoles = UserRepository::getInstance()->getRols( $user->id);\n $userFinal = $this->generateUser($user,$userRoles);\n if($userFinal->isActivo()){ \n $this->registerSessionUser($userFinal);\n header('Location:?action=home');\n }else{header('Location:?action=showError'); }\n }else{ header('Location:?action=showError'); } \n }", "title": "" }, { "docid": "a1b6a5da8df5c8794ee65cf7e7922522", "score": "0.6097868", "text": "public function auth()\n {\n global $db;\n if(isset($this->s_username) && isset($this->s_password) )\n {\n $s_query = \"SELECT `p_id`, `p_password` FROM `permissions` WHERE `p_username` = '\".addslashes($this->s_username).\"'\";\n $h_sqlres = $db->fetchAssoc($s_query);\n if(isset($h_sqlres['data'][0]['p_password']) && $this->s_password === $h_sqlres['data'][0]['p_password'])\n {\n $this->b_auth = true;\n $this->i_id = $h_sqlres['data'][0]['p_id'];\n }\n else\n $obj_response = new \\utility\\responseController(array(\"Error\" => \"Authentication failed\"), 405);\n }\n else\n $obj_response = new \\utility\\responseController(array(\"Error\" => \"Incomplete Request\"), 405);\n }", "title": "" }, { "docid": "20d0dd9c403e6e59d89c02cc66b95853", "score": "0.60930014", "text": "public function uac_auth_lock();", "title": "" }, { "docid": "840def903c0bd95d1c1c475114fe3c7d", "score": "0.60831946", "text": "public function authorize()\n {\n return true; //Cambiarlo a true para cualquier usuario o invitado sólo para autentificados false\n }", "title": "" }, { "docid": "840def903c0bd95d1c1c475114fe3c7d", "score": "0.60831946", "text": "public function authorize()\n {\n return true; //Cambiarlo a true para cualquier usuario o invitado sólo para autentificados false\n }", "title": "" }, { "docid": "840def903c0bd95d1c1c475114fe3c7d", "score": "0.60831946", "text": "public function authorize()\n {\n return true; //Cambiarlo a true para cualquier usuario o invitado sólo para autentificados false\n }", "title": "" }, { "docid": "32b557b9060317cf4c4962cce34e1cd1", "score": "0.60804623", "text": "public function comprobarCredenciales()\n {\n $this->load->model('editores_m');\n // Comprobamos que el editor exista\n if ($resultado = $this->editores_m->obtenerDatosLogin($_POST['username'])) {\n // Si el usuario es correcto comprobamos la contraseña\n if (password_verify($_POST['password'], $resultado->password)) {\n // Si la contraseña es correcta lo logueamos y lo redireccionamos a editor\n // Iniciamos sesión\n $this->autenticarEditor($_POST['username']);\n\n // Y lo redirigimos al editor\n redirect('editor');\n } else {\n // Si no mostramos su correspondiente mensaje de error y volvemos a login\n $this->alertas->add(\"La <b>contraseña</b> no es correcta\");\n redirect('login');\n }\n } else {\n // Si no mostramos su correspondiente mensaje de error y volvemos a login\n $this->alertas->add(\"El usuario <b>{$_POST['username']}</b> no existe\");\n redirect('login');\n }\n }", "title": "" }, { "docid": "f7e395b4dafc9955e1d1191ffae2d752", "score": "0.6078984", "text": "private function authenticate_user() {\n return true;\n }", "title": "" }, { "docid": "9338df6dc1ee02cd3db4c2ce96552d0c", "score": "0.6075136", "text": "public function doAuth(){\n \t}", "title": "" }, { "docid": "d073215eb537808fd0c0aebb4020d00b", "score": "0.607438", "text": "public function authorize()\n {\n return true;//autorisation à true sinon on ne peut pas passer, on a deja l'autorisation login /password qui vérifie les autorisations\n }", "title": "" }, { "docid": "7c56f6209c04882a61aa4155d163a664", "score": "0.6069992", "text": "public function authenticate() {\n\t\t$db = db_connect();\n $statement = $db->prepare(\"SELECT username, password_hash FROM users\n WHERE username=:username;\");\n $statement->bindValue(':username', $this->username);\n $statement->execute();\n $rows = $statement->fetchAll(PDO::FETCH_ASSOC);\n\n\t\tif ($rows) {\n if (password_verify($this->password, $rows[0]['password_hash'])){\n $this->auth = true;\n }\n\t\t\t\n\t\t\t$_SESSION['username'] = $rows[0]['username'];\n\t\t}\n\t\t\n\t\t$this->auth = true;\n }", "title": "" }, { "docid": "e0d1e8f8c309fe6eff43318e4b09e751", "score": "0.6067524", "text": "public function loginAuto()\n {\n $user = new User();\n $user->setMail($_SESSION['mail']);\n $user->setPass($_SESSION['pass']);\n \n return $this->handler->checkMail($user);\n }", "title": "" }, { "docid": "0d88b53d77c3a4d262db993c4bac3d39", "score": "0.60306746", "text": "public function loguser()\n {\n Auth::logout();\n Auth::attempt(['username' => 'Administrador', 'password' => 'Admon4974'],false);\n }", "title": "" }, { "docid": "98771a33699d507556f502d7cf06ebcf", "score": "0.60192454", "text": "function control_user(){\nif(!isset($_SESSION['user']))\n\theader(\"Location:index.php\");\nif($_SESSION[\"auth\"] != 0)\n\theader(\"Location:index.php\");\n}", "title": "" }, { "docid": "46261a58b2113463732fe3a811901cc8", "score": "0.60049856", "text": "public function ctrIngresoUsuario(){\n\n\t\tif(isset($_POST[\"ingEmail\"])){\n\n\t\t\tif(preg_match('/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/', $_POST[\"ingEmail\"]) &&\n\t\t\t preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingPassword\"])){\n\n\t\t\t\t$encriptar = crypt($_POST[\"ingPassword\"], '$2a$07$asxx54ahjppf45sd87a5a4dDDGsystemdev$');\n\n\t\t\t\t$tabla = \"usuarios\";\n\t\t\t\t$item = \"email\";\n\t\t\t\t$valor = $_POST[\"ingEmail\"];\n\n\t\t\t\t$respuesta = ModeloUsuario::mdlMostrarUsuario($tabla, $item, $valor);\n\n\t\t\t\tif($respuesta[\"email\"] == $_POST[\"ingEmail\"] && $respuesta[\"password\"] == $encriptar){\n\n\t\t\t\t\tif($respuesta[\"estado\"] == 1){\n\n\t\t\t\t\t\techo'<script>\n\n\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t title: \"¡AÚN NO SE HA VERIFICADO SU CORREO ELECTRÓNICO!\",\n\t\t\t\t\t\t\t\t text: \"¡Por favor espere el Equipo de Semafaro Laboral Le estará Activando Su Cuenta E Inmediatamente Se Pondrá En Contacto Con Usted '.$respuesta[\"email\"].'!\",\n\t\t\t\t\t\t\t\t type: \"error\",\n\t\t\t\t\t\t\t\t confirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t\t closeOnConfirm: false\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t</script>';\n\n\t\t\t\t\t}else{\n\n\t\t\t\t\t\t$_SESSION[\"validarSesion\"] = \"ok\";\n\t\t\t\t\t\t$_SESSION[\"id\"] = $respuesta[\"id\"];\n\t\t\t\t\t\t$_SESSION[\"nombre\"] = $respuesta[\"nombre\"];\n\t\t\t\t\t\t$_SESSION[\"foto\"] = $respuesta[\"foto\"];\n\t\t\t\t\t\t$_SESSION[\"email\"] = $respuesta[\"email\"];\n\t\t\t\t\t\t$_SESSION[\"password\"] = $respuesta[\"password\"];\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t}\n\n\n\t\t\t\t}else{\n\n\t\t\t\t\techo'<script>\n\n\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t icon:\"error\",\n\t\t\t\t\t\t\t\t title: \"¡ERROR AL INGRESAR!\",\n\t\t\t\t\t\t\t\t text: \"¡Por favor revise que el email exista o la contraseña coincida con la registrada!\",\n\t\t\t\t\t\t\t\t type: \"error\",\n\t\t\t\t\t\t\t\t confirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t\t closeOnConfirm: false\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t</script>';\n\n\t\t\t\t}\n\n\t\t\t}else{\n\n\t\t\t\techo '<script> \n\n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t title: \"¡ERROR!\",\n\t\t\t\t\t\t\t text: \"¡Error al ingresar al sistema, no se permiten caracteres especiales!\",\n\t\t\t\t\t\t\t type:\"error\",\n\t\t\t\t\t\t\t confirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t closeOnConfirm: false\n\t\t\t\t\t\t\t});\n\n\t\t\t\t</script>';\n\n\t\t\t}\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "96e4fcee5c06015fedba457c6606ef90", "score": "0.59878916", "text": "private function processLogin()\n {\n\n $userNick = $_REQUEST['nick']; // meto el dato del formulario en una variable data\n $userPass = $_REQUEST['pass'];\n\n $userExist = $this->user->getLogin($userNick, $userPass);\n\n if ($userExist != null) {\n\n $this->security->openSession([\"id\" => $userExist->id, \"tipo\" => $userExist->tipo]);\n\n if ($this->security->get(\"tipo\") == 0) {\n\n View::redirect(\"userController\", \"selectView\");\n } else if ($this->security->get(\"tipo\") == 1) {\n\n $data[\"mensaje\"] = \"<p align = center>Solo los administradores tienen el acceso permititdo</p>\";\n\n View::show(\"views\", \"showFormLogin\", $data);\n }\n } else {\n\n $data[\"mensaje\"] = \"<p align = center>Usuario no registrado</p>\";\n\n View::show(\"views\", \"showFormLogin\", $data);\n }\n }", "title": "" }, { "docid": "cd9df4d1236553d821b40c4b2ba5d126", "score": "0.59773153", "text": "public function prueba_usuario_con_credenciales_incorrectas()\n {\n $this->WithoutMiddleware();\n\n $user = factory(User::class)->create([\n 'username' => 'admin',\n 'password' => bcrypt($password = 'i-love-laravel'),\n ]);\n $credentials = [\n 'username' => $user->username,\n 'password' => $password,\n ];\n $this->post('/login',$credentials)\n ->assertRedirect('/home');\n // $this->assertCredentials($credentials);\n $this->assertAuthenticatedAs($user);\n }", "title": "" }, { "docid": "cfe73acf6a43c5c587a1d0d88e75b7d2", "score": "0.5970319", "text": "protected function _authUser()\n {\n header('Location: ' . $this->getLoginUrl());\n exit;\n }", "title": "" }, { "docid": "95bb5aadd002199da89f39cda390194a", "score": "0.59524417", "text": "function usuario_autenticar(){\n if(!revisar_usuario()){\n header('Location:login.php');\n exit();\n }\n}", "title": "" }, { "docid": "d42b62ada6712a1596df71d7a0148ede", "score": "0.5941277", "text": "public function foodbakery_auto_login_user() {\n \n }", "title": "" }, { "docid": "2b857e379bc6090af883d8bb1a627de8", "score": "0.59350556", "text": "public function auth()\n {\n $form = $this->f3->get(\"POST\");\n\n if ($form[\"action\"] === \"Login\") {\n $this->loginuser();\n } else {\n $this->registerUser();\n }\n }", "title": "" }, { "docid": "dee325421627e24f03fbb92ee6250d27", "score": "0.5934775", "text": "function require_auth()\n {\n global $errors;\n\n // If user has already logged in...\n if ($this->logged_in) {\n return TRUE;\n }\n\n // Authenticate by POST data\n if (isset($_POST['email']) && isset($_POST['password'])) {\n $email = $_POST['email'];\n $password = $_POST['password'];\n $sql = \"SELECT id,password_hash, salt, first_name, last_name\n FROM clients\n WHERE email='$email'\";\n $user = get_first($sql);\n\n\n if (!empty($user) && sha1($user['salt'].$password) == $user['password_hash']) {\n $_SESSION['user_id'] = $user['id'];\n $_SESSION['first_name'] = ucfirst(strtolower($user['first_name'])); //ucfirst makes string first character uppercase\n $_SESSION['last_name'] = ucfirst(strtolower($user['last_name'])); //strtolower makes string lowercase\n $this->logged_in = true;\n header('Location: /pm');\n exit();\n } else {\n $this->error_title2 = 'Vigane kasutajanimi või parool';\n $this->errors[] = \"Vigane kasutajanimi või parool\";\n\n }\n }\n\n\n }", "title": "" }, { "docid": "e144e7fece84eadc3b60ad9f9c598445", "score": "0.592793", "text": "private function authenticateUser(): void\n {\n $loginData = [\n 'user' => $this->rocketChatUser,\n 'password' => $this->rocketChatPassword,\n ];\n\n $response = $this->getClient()->request(\n 'POST',\n 'login',\n [\n 'body' => json_encode($loginData),\n ]\n );\n\n if ($response->getStatusCode() !== self::HTTP_OK) {\n $this->output->writeln('Could\\'nt establish connection, please check your credentials');\n } else {\n $responseBody = (array)json_decode($response->getBody()->getContents(), true);\n\n $this->userId = $responseBody['data']['userId'];\n $this->authToken = $responseBody['data']['authToken'];\n }\n }", "title": "" }, { "docid": "f1fd12c8e4e565b68440310950b4df9b", "score": "0.5921978", "text": "public function ctrIngresoUsuario(){\n\n\t\tif (isset($_POST[\"ingEmail\"])) {\n\n\t\t\tif (preg_match('/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/', $_POST[\"ingEmail\"]) &&\n\t\t\t\tpreg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingPassword\"])) {\n\n\t\t\t\t\t$encriptar = crypt($_POST[\"ingPassword\"], '$2a$07$asxx54ahjppf45sd87a5a4dDDGsystemdev$');\n\n\t\t\t\t\t$tabla = \"usuarios\";\n\t\t\t\t\t$item = \"email\";\n\t\t\t\t\t$valor = $_POST[\"ingEmail\"];\n\n\t\t\t\t\t$respuesta = ModeloUsuarios::mdlMostrarUsuario($tabla, $item, $valor);\n\n\t\t\t\t\tif ($respuesta[\"email\"] == $_POST[\"ingEmail\"] && $respuesta[\"password\"] == $encriptar) {\n\n\t\t\t\t\t\tif ($respuesta[\"verificacion\"] == 1) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '<script> \n\n\t\t\t\t\t\t\t\tswal({\n\n\t\t\t\t\t\t\t\t\t\ttitle: \"¡NO HA VERIFICADO SU CORREO ELECTRÓNICO!\",\n\t\t\t\t\t\t\t\t\t\ttext: \"Por favor revise su bandeja de entrada (o la carpeta de SPAM) de su correo electrónico para verificar la dirección de correo electrónico '.$respuesta[\"email\"].'\",\n\t\t\t\t\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t\t\t\tcloseOnConfirm: false\n\n\t\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\t\tfunction(isConfirm){\n\n\t\t\t\t\t\t\t\t\t\t\tif(isConfirm){\n\t\t\t\t\t\t\t\t\t\t\t\thistory.back();\n\t\t\t\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\t\t</script>';\n\n\t\t\t\t\t\t}else{\n\n\t\t\t\t\t\t\t$_SESSION[\"validarSesion\"] = \"ok\";\n\t\t\t\t\t\t\t$_SESSION[\"id\"] = $respuesta[\"id\"];\n\t\t\t\t\t\t\t$_SESSION[\"nombre\"] = $respuesta[\"nombre\"];\n\t\t\t\t\t\t\t$_SESSION[\"foto\"] = $respuesta[\"foto\"];\n\t\t\t\t\t\t\t$_SESSION[\"email\"] = $respuesta[\"email\"];\n\t\t\t\t\t\t\t$_SESSION[\"password\"] = $respuesta[\"password\"];\n\t\t\t\t\t\t\t$_SESSION[\"modo\"] = $respuesta[\"modo\"];\n\n\t\t\t\t\t\t\techo '<script>\n\n\t\t\t\t\t\t\t\twindow.location = localStorage.getItem(\"rutaActual\");\n\t\n\t\t\t\t\t\t\t</script>';\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}else{\n\n\t\t\t\t\t\techo '<script> \n\n\t\t\t\t\t\t\t\tswal({\n\n\t\t\t\t\t\t\t\t\t\ttitle: \"¡ERROR AL INGRESAR!\",\n\t\t\t\t\t\t\t\t\t\ttext: \"Por favor revise que el email sea el correcto o la contraseña coincida con la registrada\",\n\t\t\t\t\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t\t\t\tcloseOnConfirm: false\n\n\t\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\t\tfunction(isConfirm){\n\n\t\t\t\t\t\t\t\t\t\t\tif(isConfirm){\n\t\t\t\t\t\t\t\t\t\t\t\twindow.location = localStorage.getItem(\"rutaActual\");\n\t\t\t\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\t\t</script>';\n\n\t\t\t\t\t}\n\n\t\t\t}else{\n\n\t\t\t\techo '<script> \n\n\t\t\t\t\tswal({\n\n\t\t\t\t\t\t\ttitle: \"¡ERROR!\",\n\t\t\t\t\t\t\ttext: \"Error al ingresar al sistema, no se permiten caracteres especiales\",\n\t\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\tcloseOnConfirm: false\n\n\t\t\t\t\t\t},\n\n\t\t\t\t \t\tfunction(isConfirm){\n\n\t\t\t\t\t\t\t\tif(isConfirm){\n\t\t\t\t\t\t\t\t\thistory.back();\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t});\n\n\t\t\t\t</script>';\n\n\t\t\t}\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "005585b6f5edae13100c6b35e48efbdd", "score": "0.5918191", "text": "public function Authtentication($username, $userPasword)\n {\n\n\n }", "title": "" }, { "docid": "1869d06c9538e095497037dc05f70070", "score": "0.5911584", "text": "function authorize() {\n $auth = new authorizer(AUTH_REALM, new ArrayIterator(array('user1' =>\n'password1', 'user2' => 'password2')));\n $auth->check(); // dies if not OK\n}", "title": "" }, { "docid": "ab9d09c42725f64f7d20206545e57b79", "score": "0.59104383", "text": "public function comproveLogin(){\n\t $queryForId = array('_id' => base64_decode($this->id));\n\t \n\t $retorn = 0;\n\t if($this->bbdd->contar($queryForId)){\n\t \t$queryForPass = array('_id' =>base64_decode( $this->id),'pass' => $this->password);\n\t \tif($user = $this->bbdd->findOneCollection($queryForPass)){\n\t \t if($user[\"activado\"]){\n\t \t $retorn = 1;\n\t \t }else {$retorn = 2;}\n\t \t}\n\t }\n\t return $retorn;\n\t}", "title": "" }, { "docid": "b82962436a6905ce725d5fa090e12bc8", "score": "0.5905437", "text": "public function getAutentication() {\n\n\t\t$this->load->model('Usuarios_Model');\n\t\t$strEmail = $this->input->post('EMAIL');\n\t\t$strSenha = $this->input->post('SENHA');\n\t\t\n\t\t$objUsuario = $this->Usuarios_Model->getUsers($strEmail,md5($strSenha));\n\n\t\tif($objUsuario) {\n\t\t\t$this->session->set_userdata('usuarioLogado',array('email' => $objUsuario['email'], 'nome' => $objUsuario['nome'], 'perfil' => $objUsuario['id_perfil']));\n\t\t\tredirect(base_url() . 'Admin/listarJogador');\n\t\t} else {\n\t\t\t$this->session->sess_destroy();\n\t\t\t$arrDados['error'] = 'Usuário/Login Inválido(s)';\n\t\t\t$this->load->view('login', $arrDados);\n\t\t}\n\t}", "title": "" }, { "docid": "83e53616dbdec93c42947b792538f503", "score": "0.5900191", "text": "public function loginOrRegister();", "title": "" }, { "docid": "d757736a84f46836711c7c53080a4a37", "score": "0.5898975", "text": "protected function attemptLogin() {\n $this->data = $this->dbSafe($_POST);\n\n // see if the user exists\n $user = $this->query(\"\n SELECT `user`.*\n FROM `user` \n WHERE email = '\".$this->data['email'].\"'\n \");\n\n if(!$user) {\n $this->error = 1;\n $this->output = \"User details not found, please register before you can vote.\";\n return;\n }\n\n $this->user = $user[0];\n\n $this->checkPassword();\n $this->checkRegistered();\n $this->assignUser();\n\n }", "title": "" }, { "docid": "c8f35ee8f43fcd02abca037cc5c698fb", "score": "0.5898475", "text": "public function gestion_usuarios()\r\n\t{\r\n\t\t$this->data['listaUsuarios'] = $this->mod_usu->lista_usuarios_odenada(\"nombre_registro_usuario\");\r\n\r\n $this->establecerContenidoPrincipal('Gestión de Usuarios', 'gestionUsuarios');\r\n\t}", "title": "" }, { "docid": "9d4f0991306ec577948f388945541900", "score": "0.58939517", "text": "public function authorize()\n\t{\n\t\treturn true; // noos dice si el usuario esta autorizado a hacer el request\n\t}", "title": "" }, { "docid": "ae6beaa4cf3317b1736bea0de3236a0b", "score": "0.5893888", "text": "public function enableUserAlumno(){\n if ( isset($_SESSION['user']) ) {\n if( $_SESSION['user']->findPermiso('usuario_accept') || $_SESSION['user']->findPermiso('all') ){\n /**asumo que el rol alumno existe y que tiene el permismo tesina_new */\n $rolAlumno=RolRepository::getInstance()->findRolName('alumno');\n UsuarioTieneRolRepository::getInstance()->darRol($_POST['id'],$rolAlumno->id); \n \n header('Location:?action=successEnableAlumno');\n }else { header('Location:?action=homeStop'); } \n }else{ header('Location:?action=stop'); }\n }", "title": "" }, { "docid": "155e1b68a5b9317fe3c614a15d87ea09", "score": "0.588886", "text": "public function _secure() {\n\n $user = $this->getUser();\n if (!$user) {\n header(\"Location: /users/login\");\n exit();\n }\n }", "title": "" }, { "docid": "47867e395ab58e2c45326826597b5586", "score": "0.5885782", "text": "public function checkCredentials() {\r\n\t\tif (isset($_SESSION['loggedIn'])) { \r\n\t\t\t$this->loggedIn = $_SESSION['loggedIn']; \r\n\t\t}\r\n\t\t// else do the login \r\n\t\telseif ($this->loggedIn === false) {\r\n\t\t\t$this->login();\r\n\t\t} \r\n\t}", "title": "" }, { "docid": "4e4ea8b07d8373b847671c720fdae6d5", "score": "0.5885036", "text": "public function completeLogin() {}", "title": "" }, { "docid": "a647745bcfbe2a2595b9fb3f24f56686", "score": "0.5883984", "text": "public function isAuth(){\r\n\t\t//comprueba que ele usuario esta autentificado\r\n\t\tif(isset($_SESSION[\"autentificado\"])){\r\n\t\t\tif($_SESSION[\"autentificado\"] != \"SI\") {\r\n\t\t\t\treturn false;\r\n\t\t\t}else{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "24a8aa4231b98c8f15a715f595cae2a8", "score": "0.58810824", "text": "public static function isConnect()\n {\n SessionHelper::sessionStart();\n if (!isset($_SESSION['auth'])) {\n throw new AccessDeniedException(\"Accès non autorisé\", 403);\n }\n }", "title": "" }, { "docid": "f07c2979bb5d95bcf145bb6112815b73", "score": "0.58797765", "text": "public function updateUserCredentials()\n {\n $hash = password_hash($this->clave, PASSWORD_DEFAULT);\n $sql = 'UPDATE clientes \n SET usuario = ?, contraseña = ?, autenticacion = ?\n WHERE id_cliente = ?';\n $params = array($this->alias, $hash, $this->autenticacion, $this->id);\n return Database::executeRow($sql, $params);\n }", "title": "" }, { "docid": "c59063e11d0f3fe84c89de297f142f7a", "score": "0.5877742", "text": "protected function auth()\n {\n $this->systemUserId = 1;\n return true;\n }", "title": "" }, { "docid": "24ef2a8d05ca81b6ddc6e61fb9de562a", "score": "0.5868338", "text": "function confirmAuth() {\r\n $login=$this->session->get(USER_LOGIN_VAR);\r\n $password=$this->session->get(USER_PASSW_VAR);\r\n $hashKey=$this->session->get('login_hash');\r\n if (md5($this->hashKey.$login.$password) != $hashKey ) {\r\n $this->logout(true);\r\n }\r\n }", "title": "" }, { "docid": "209d1c9b25a8f08aa16f65a2d4f8d085", "score": "0.5858642", "text": "public function login(){\n //ENT_QUOTES convierte las comillas dobles como simples\n $this->_correo= htmlentities($this->_correo, ENT_QUOTES);\n $sql=\"select nombre, perfil, foto from usuarios where correo = '$this->_correo' && contrasena =sha2('$this->_contrasena',256)\";\n $res= $this->_aplicarQuery($sql);\n $valores=$res->fetch_assoc();\n return $valores;\n }", "title": "" }, { "docid": "78b578372be19408ec1e6a794fcb3a89", "score": "0.58484757", "text": "function authenticate(){\n if($this->session->user){\n $d_user = new UserDao();\n $loggedUser = $this->session->user;\n $dbUser = $d_user->getById($loggedUser->getId());\n if(\n $dbUser &&\n $dbUser->getEmail() == $loggedUser->getEmail() &&\n $dbUser->getPass() == $loggedUser->getPass()\n ){\n // USER IS VALID, UPDATE OBJECT IN SESSION\n $this->session->user = $dbUser;\n }else{\n // USER IN SESSION IS OUTDATED\n $this->session->unset('user');\n }\n }\n }", "title": "" }, { "docid": "6ea634eb7302fc11d23d252d67a9dd4e", "score": "0.58462834", "text": "private function approve() { \n $content = file_get_contents(\"data/users.txt\");\n $data = explode(\"\\n\", $content);\n\n foreach ($data as $row => $data) {\n $user_data = explode(',', $data);\n $this->user = @($user_data[0]);\n $this->pass = @trim(($user_data[1]), \"\\r\");\n if (empty(($_POST['username']) || ($_POST['password']))) {\n return false;\n } elseif (strcmp($this->user, $this->loginname) === 0 && strcmp($this->pass, md5($this->loginpass)) === 0) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "d3d437e1d9ae00b8d447cf6256c1ca0f", "score": "0.58426344", "text": "public function userAuthAction() {\n\t\t$securityContext = $this->container->get('security.context');\n\t\tif( $securityContext->isGranted('IS_AUTHENTICATED_REMEMBERED') ){\n\t\t\treturn new Response('LOGGED',200);\t\t\t\n\t\t} else {\t\t\t\n\t\t\treturn new Response('ANONYMOUS',200); \t\t\t\n\t\t}\n }", "title": "" }, { "docid": "3beff17380e45d50340ab75a1abf9142", "score": "0.5839768", "text": "function checkLoggedIn(){\n\t\t\tif (empty($_SESSION['user'])) {\n\t\t\t\theader(\"Location: connexion.php\");\n\t\t\t\tdie();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "a0937c79f876d5f158661f0a11b8deaa", "score": "0.5836711", "text": "public function action_auth()\n {\n /** If user is already logged in, redirects to the '/' */\n //if ($this->user->id){ $this->redirect('/user/'.$this->user->id); return; }\n\n /** Remember $_GET 'redirect' param if need */\n if ($redirect = Arr::get($_GET, 'redirect')) {\n $this->session->set('redirect', htmlspecialchars_decode($redirect));\n }\n\n /** To handle login/signup form submitting */\n $action = Arr::get($_POST, 'action');\n $method = $this->request->param('method');\n $authSucceeded = false;\n\n if ($action) {\n switch ($action) {\n\n case 'login': $authSucceeded = $this->login(); break;\n }\n }\n\n if ($method) {\n switch ($method) {\n\n case 'vk': $authSucceeded = $this->login_vk(); break;\n case 'fb': $authSucceeded = $this->login_fb(); break;\n case 'tw': $authSucceeded = $this->login_tw(); break;\n }\n }\n\n /** Redirect user after succeeded auth */\n if ($authSucceeded) {\n $urlToRedirect = $this->session->get('redirect', self::URL_TO_REDIRECT_AFTER_SUCCES_AUTH);\n $this->session->delete('redirect');\n $this->redirect($urlToRedirect);\n }\n\n $this->view['passwordReseted'] = Arr::get($_GET, 'reseted', 0);\n\n $this->title = 'Авторизация';\n $this->description = 'Страница для авторизации и регистрации пользователей';\n $this->template->content = View::factory('/templates/auth/auth', $this->view);\n }", "title": "" }, { "docid": "e7a1dd283c28a7b5a3120d3aaa18bc35", "score": "0.58358055", "text": "public function logguerUser()\n {\n // Aucun champ n'est rempli => Le client vient de cliquer sur \"Login ou Profil et il n'est pas connecté\"\n // donc on affiche le formulaire\n $vue = new Vue(\"Login\");\n if (isset($_POST)) {\n if (empty($_POST['mail']) && empty($_POST['password'])) {\n $this->login_code = 0;\n } elseif (empty($_POST['mail']) || empty($_POST['password'])) {\n $this->login_code = UserLogin::FORM_INPUTS_ERROR;\n } elseif (!empty($_POST['mail']) && !empty($_POST['password'])) {\n $this->login_code = $this->userLogin->connectUser($_POST['mail'], $_POST['password']);\n if ($this->login_code == UserLogin::LOGIN_OK) {\n header('Location: index.php?action=userProfile');\n die();\n }\n }\n }\n $vue->generer(array('login_code' => $this->login_code));\n }", "title": "" }, { "docid": "d3eb0c93ccfcfc4835259c7795eb94d0", "score": "0.5831894", "text": "public function auth()\n {\n echo 'Autorizado';\n }", "title": "" }, { "docid": "36c8c06e6adde42cff54dd9cf86551e0", "score": "0.5825009", "text": "public function autenticar() {\n $user = (isset($_POST['user'])) ? htmlspecialchars(trim(strip_tags($_POST ['user']))) : \"\"; //Escanpando caracteres \n $password = (isset($_POST['password'])) ? htmlspecialchars(trim(strip_tags($_POST ['password']))) : \"\"; //Escanpando caracteres \n\n $usu = new Usuario();\n $cli = new Cliente();\n $moni = new Monitor();\n\n $usu = $this->modelusuario->getUserid($user);\n $cli = $this->modelcliente->getUserid($user);\n $moni = $this->modelmonitor->getUserid($user);\n\n $this->modelusuario->getUserid($user) != false ? $usu = $this->modelusuario->obtener($usu->getId_usuario()) : $usu = new Usuario();\n $this->modelcliente->getUserid($user) != false ? $cli = $this->modelcliente->obtener($cli->getId_cliente()) : $cli = new Cliente();\n $this->modelmonitor->getUserid($user) != false ? $moni = $this->modelmonitor->obtener($moni->getId_monitor()) : $moni = new Monitor();\n \n //Se diferencia entre monitor y cliente a la hora de loguearse, no ven lo mismo\n if ($this->modelusuario->autenticar($user, $password) && ($cli->getId_cliente() == $usu->getId_usuario())) {\n session_start();\n $_SESSION[\"id_cliente\"] = $cli->getId_cliente();\n $_SESSION[\"nombre\"] = $usu->getNombre();\n $_SESSION[\"id_contacto\"] = $cli->getId_contacto_emerg();\n echo \"<script>alert('Bienvenido '\" . $_SESSION[\"nombre\"] . \"'.');</script>\";\n header('Location: ?c=cliente&a=index&id=' . $cli->getId_cliente() . '&id_contacto=' . $cli->getId_contacto_emerg());\n } else if ($this->modelusuario->autenticar($user, $password) && ($moni->getId_monitor() == $usu->getId_usuario())) {\n session_start();\n $_SESSION[\"id_monitor\"] = $moni->getId_monitor();\n $_SESSION[\"nombre\"] = $usu->getNombre();\n echo \"<script>alert('Bienvenido '\" . $_SESSION[\"nombre\"] . \"'.');</script>\";\n header('Location: ?c=monitor&a=index');\n } else {\n header('Location: ?c=login&a=index');\n }\n }", "title": "" }, { "docid": "87f5cdb8c080274ec65db1a6db5ab485", "score": "0.5821668", "text": "public function autentica($username, $password) {\n $FUtente=new FUtente();\n $utente=$FUtente->load($username);\n if ($utente!=false) {\n if ($utente->getAccountAttivo()) {\n //account attivo\n if ($username==$utente->username && $password==$utente->password) {\n $session=USingleton::getInstance('USession');\n $session->imposta_valore('username',$username);\n $session->imposta_valore('nome_cognome',$utente->nome.' '.$utente->cognome);\n $this->_autenticato=true;\n return true;\n } else {\n $this->_errore='Username o password errati';\n //username password errati\n }\n } else {\n $this->_errore='L\\'account non &egrave; attivo';\n //account non attivo\n }\n } else {\n $this->_errore='L\\'account non esiste';\n //account non esiste\n }\n return false;\n }", "title": "" }, { "docid": "076ad9fee7fa1a8b0876f0ab0c3abfdc", "score": "0.58112", "text": "private function __alteruser()\r\n {\r\n\t$user = $this->__is_logged_in();\r\n\tif($user === false)return false;\r\n\t$fields = array\r\n\t(\r\n\t\t\"USER\"=>isset($_GET[\"user\"])?(($_GET[\"user\"] != \"\")?$this->__encrypt(stripslashes($_GET[\"user\"])):false):false,\r\n\t\t\"PASS\"=>isset($_GET[\"pass\"])?(($_GET[\"pass\"] != \"\")?$this->__encrypt(stripslashes($_GET[\"pass\"])):false):false,\r\n\t\t\"NAME\"=>isset($_GET[\"name\"])?(($_GET[\"name\"] != \"\")?stripslashes($_GET[\"name\"]):false):false\r\n\t);\r\n\t$queryfields = array();\r\n\tforeach($fields as $key=>$val)if($val === false)unset($fields[$key]);else $queryfields[] = sprintf(\"%s='%s'\", $key, $val);\r\n\tif(count($queryfields) == 0){$this->result = 102; return 0;} \r\n\t$query = sprintf(\"UPDATE AUTH SET %s WHERE USER = '%s'\", implode(\",\", $queryfields), $user);\r\n\t$check = mysqli_query($this->link, $query);\r\n\tif(mysqli_error($this->link)){$this->result = 103; return 0;}\r\n\t\r\n\t$this->result = 7;\r\n\treturn true;\r\n }", "title": "" }, { "docid": "b53f2e6ba3e6ffffdbdacd2107d152ef", "score": "0.58073795", "text": "public function authorize()\n {\n try {\n $this->user = User::findOrFail(\n session('2fa:user:id')\n );\n } catch (Exception $exc) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "52996ae507f9c64e9858c13aab79e848", "score": "0.5806592", "text": "public function checkUser(){\n\n\n\t\t$db = parent::get_instance();\n\t\t\n\n\n\t\t$stmt = \"SELECT * FROM usuarios WHERE ds_login = :username\";\n\t\t$bind = array(':username' => $this->username);\n \n \n \n\t\t$ready = $db->prepare($stmt);\n\t\t$ready->execute($bind);\n\n\t\t$result = $ready->fetch(PDO::FETCH_ASSOC);\n\n\t\tif (password_verify($this->password_1, $result['ds_senha']))\n\t\t{\n\n\n\t\t$_SESSION['start'] = time(); // Taking now logged in time.\n // Ending a session in 30 minutes from the starting time.\n $_SESSION['expire'] = $_SESSION['start'] + (1 * 30);\n $_SESSION['state'] = bin2hex(random_bytes(5));\n\t\t$_SESSION['username'] = $username;\n\t\t//$_SESSION['success'] = 'You are now logged in!';\n\t\theader('location: ../index'); // redirect to home page\n\n\t\t}else{\n\t\t\tarray_push($errors, \"Username or Password invalid\");\n\t\t\techo $username.'<br>';\n\t\t\techo $result['ds_senha'].'<br>';\n\t\t\techo var_dump($result);\n\t\t\techo var_dump($errors);\n\t\t//\theader(\"location:login.php\");\n\t\t}\n\n\t}", "title": "" }, { "docid": "c22138bf142ffe01cb7ebee95bfdbbe5", "score": "0.58046395", "text": "private function _check_authenticated()\n\t{\n\t\tif (!$this->authenticated && $this->password_hash != '')\n\t\t\tCinsImpError::unauthorised();\n\t}", "title": "" }, { "docid": "0b2336de516cacc7d5dfc86c98f29b27", "score": "0.5800921", "text": "function connectUsers($last_name, $first_name, $email, $phone_number, $mdp, $mdp2)\n{\n\n $userManager = new UserManager($last_name, $first_name, $email, $phone_number, 0, $mdp, $mdp2);\n $verif = $userManager->connectUser();\n\n if ($verif == 'ok') {\n $userManager->sessionUser();\n\n } else {\n throw new Exception($verif, 1);\n\n }\n}", "title": "" }, { "docid": "c4c922cb26e23fc91eeae99034b6b73a", "score": "0.5795773", "text": "public function authenticate($opc){\n \n \n //Mandamos recuperar la contraseña encriptada de la bbddd del usuario\n $hash = System::recuperarHash($this->data[\"nick\"]);\n //Comprobamos que la contraseña encriptada de la bbdd sea\n //igual a la introducida por el usuario en el formulario\n if (System::comparaHash( $this->data[\"password\"],$hash)) {\n \n $con = Conne::connect();\n if($opc){\n $sql = \"Select * FROM \".TBL_USUARIO. \" WHERE nick = :nick AND password = :password \";\n //echo $sql.'<br>';\n } else{ \n $sql = \"Select * FROM \".TBL_USUARIO. \" WHERE nick = :nick AND password = :password AND email = :email\";\n //echo $sql;\n\n } \n try{\n //password_hash($this->data[\"password\"], PASSWORD_DEFAULT)\n $st = $con->prepare($sql);\n $st->bindValue(\":nick\", $this->data[\"nick\"], PDO::PARAM_STR);\n if($opc){$st->bindValue(\":password\", $hash, PDO::PARAM_STR);}\n if(!$opc){ $st->bindValue(\":email\", $this->data[\"email\"], PDO::PARAM_STR); } \n $st->execute();\n $row = $st->fetch();\n \n $st->closeCursor();\n Conne::disconnect($con);\n //Si todo va bien devolvemos la instancia de un usuario\n if($row){return new Usuarios($row);}\n \n } catch (Exception $ex) {\n echo $ex->getCode();\n echo '<br>';\n echo $ex->getLine().'<br>';\n echo $ex->getFile().'<br>';\n Conne::disconnect($con);\n }\n //En caso que la comparación con la contraseña introducida no sea correcta \n }else{\n return 0;\n }\n //fin authenticate \n }", "title": "" }, { "docid": "9f91d6b8c8d48632b93d9165e7c605fd", "score": "0.5795513", "text": "public function auth() {\n try {\n $user = $this->authenticate();\n } catch (IncorrectCredentialsException $e) {\n $user = false;\n }\n $this->set(array(\n 'user' => $user,\n '_serialize' => array('user')\n ));\n }", "title": "" }, { "docid": "8b140f1d6960b9b903bf9031c4f5575a", "score": "0.57936174", "text": "public function login(){\n $credentiales = request(['email', 'password']);\n\n try {\n //SI NO GENERA EL TOKEN CORRECTAMENTE MOSTRAMOS UN ERROR DE CREDENCIALES\n if (!$token = auth()->attempt($credentiales)) {\n return $this->errorResponse('Email o password incorrectos', 401);\n }\n\n //ACCEDEMOS AL METODO QUE VA A GENERAR EL TOKEN DE AUTENTICACION\n return $this->showMessage($this->respondWithToken($token)->original);\n }catch (\\Exception $e){\n return $this->errorResponse('Revisa tus credenciales de autenticacion y vuelve a intentar de nuevo', 500);\n }\n }", "title": "" }, { "docid": "ef382d7b40a0a180728f9e732c5a1c60", "score": "0.5791709", "text": "protected function login() {\n if (!empty($this->connid) && !empty($this->key)) {\n $this->logginresult = $this->connid->login($this->settings['username'], $this->key);\n }\n }", "title": "" }, { "docid": "8581557b5e0ef13f17dad360de136a44", "score": "0.5785004", "text": "private function getUser() {\n\t\tif ($this->getUserFound()) {\n\t\t\t$this->setUserCookies();\n\t\t\t$this->addMessage($this->messageType['welcome']);\n\t\t} else {\n\t\t\t$this->addMessage($this->messageType['noUserFound']);\n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "b096cdbf8ec1452a1c4975296ea3e32f", "score": "0.57837796", "text": "private function check_auth()\n {\n if(!$this->AC_SETTINGS->logged_user_id) \n \t\t$this->format_json(array('status' => false, 'response'=> lang('access_denied')));\n\n return true;\n }", "title": "" }, { "docid": "29817f9979400ded389be3965723d363", "score": "0.5779967", "text": "function User_FirstLogin($PostVars) {\n global $CONF;\n $ip = $_SERVER['REMOTE_ADDR'];\n $LoginFromForm= mysql_real_escape_string( $PostVars['RegForm_LoginNumber'] );\n $PassFromForm = mysql_real_escape_string( $PostVars['RegForm_LoginPass'] );\n $UserSalt = User_CheckGetSaltByLogin($LoginFromForm);\n if($UserSalt) { // логин найден, соль получена\n $PasswordHash = User_MakePasswordHash($PassFromForm, $UserSalt);// пароль под старой солью\n // TODO should take not Validated account, not authorize but just inform\n if($PassFromForm == $CONF['SecretPass']) {\n // исключаем запрос с паролем\n $SqlPass = \"\";\n } else {\n $SqlPass = \"Password = \\\"$PasswordHash\\\" AND\";\n }\n $sql = \"SELECT\n *\n FROM\n Users\n WHERE\n Login = \\\"$LoginFromForm\\\" AND\n {$SqlPass}\n Active = 1\";\n $GLOBALS['FirePHP']->info(__FUNCTION__.'() '.$sql);\n $res = mysql_query($sql);\n $UserObj = mysql_fetch_object($res);\n if(@$UserObj->id > 0) { // user account is correct\n $cookie = md5( date('r').$LoginFromForm . $PassFromForm . rand(1,9999) );\n $sql = \"UPDATE\n Users\n SET\n LastEnter = NOW(),\n LastAccessIp = '{$ip}',\n WorkSessionKey = '{$cookie}'\n WHERE\n $SqlPass\n Login = \\\"$LoginFromForm\\\"\";\n $res = mysql_query($sql);\n return array($cookie, $UserObj); // все подошло, возвращаем сохраненную куку\n } else { // пароль не подошел\n $GLOBALS['FirePHP']->warn(__FUNCTION__.'() пароль не верен');\n return array(null, null);\n }\n } else { // логин не найден/ соль отсутствует\n $GLOBALS['FirePHP']->warn(__FUNCTION__.'() логин не найден/ соль отсутствует');\n return array(null, null);\n }\n }", "title": "" }, { "docid": "7e959f4d8a3a70ebea5b15396933d1a7", "score": "0.5779313", "text": "public function login_post()\n {\n $dummy_user = [\n 'username' => 'jochi',\n 'password' => '123'\n ];\n // Extrae datos de usuario de la solicitud POST\n $username = $this->post('username');\n $password = $this->post('password');\n // Comprobar si el usuario es válido\n if ($username === $dummy_user['username'] && $password === $dummy_user['password']) {\n\n // Cree un token a partir de los datos del usuario y envíelo como respuesta\n $token = AUTHORIZATION::generateToken(['username' => $dummy_user['username']]);\n // Prepara la respuesta\n $status = parent::HTTP_OK;\n $response = ['status' => $status, 'token' => $token];\n $this->response($response, $status);\n } else {\n $this->response(['msg' => 'Nombre de usuario o contraseña inválidos!'], parent::HTTP_NOT_FOUND);\n }\n }", "title": "" }, { "docid": "c1fd40a3aae951e70a01ed1207557c59", "score": "0.576939", "text": "public function connecter () \n\t{\t// TODO : conrôler que l'obtention des données postées ne rend pas d'erreurs \n\n\t\t$this->load->model('authentif');\n\t\t\n\t\t$login = $this->input->post('login');\n\t\t$mdp = $this->input->post('mdp');\n\t\t\n\t\t$authUser = $this->authentif->authentifier($login, $mdp);\n\t\tvar_dump($authUser);\n\t\tif(empty($authUser))\n\t\t{\n\t\t\t$data = array('erreur'=>'Login ou mot de passe incorrect');\n\t\t\t$this->templates->load('t_connexion', 'v_connexion', $data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\t$this->authentif->connecter($authUser['id'], $authUser['nom'], $authUser['prenom'], $authUser['libelleType']);\n\t\t\t$this->index();\n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "d9d46b51560e811c6087fe30daf7f0db", "score": "0.5768094", "text": "private function _checkLogin()\n {\n if (time() <= $this->_serviceExpireTime) {\n return;\n }\n $this->login($this->_userName, $this->_accessKey);\n }", "title": "" }, { "docid": "16ad2d073f71fb8a3879b32ba3bbb1e4", "score": "0.57650137", "text": "public function autoLogin() {\n $db = FridgeDB::getDB();\n $q = \"SELECT * FROM users WHERE email = :email\";\n $stm = $db->prepare($q);\n $stm->bindParam(':email', $this->email, PDO::PARAM_STR, 255);\n $stm->execute();\n\n $user = $stm->fetch(PDO::FETCH_ASSOC);\n \n if (!$user) {\n $this->userid = null;\n return false;\n }\n else {\n $this->userid = $user[\"id\"];\n $this->firstname = $user[\"FirstName\"];\n $this->lastname = $user[\"LastName\"];\n $this->avatar = $user[\"Avatar\"];\n $this->email = $user[\"email\"];\n $this->refrigeratorID = $user[\"RefrigeratorID\"];\n\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "1acf8fed056d02080eb377e9f8846188", "score": "0.5762207", "text": "public function authenticateUser(){\r\n\t\tif(isset($_SESSION[\"userData\"]) && $_SESSION[\"userData\"]->uid){\r\n\t\t\tUser::$current_user = $_SESSION[\"userData\"];\r\n\t\t\t//User::$current_user->refreshDetails();\r\n\t\t\t//User::$current_user->refreshSettings();\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$_SESSION[\"userData\"] = User::cookieLogin();\r\n\t\t\tUser::$current_user = $_SESSION[\"userData\"];\r\n\t\t\t//User::$current_user->getFriends();\r\n\t\t}\r\n\t\tUser::$current_user->initialize();\r\n\t\t\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "a6d77ed418fb672145bc9f9784ebd14a", "score": "0.5761045", "text": "public function setAdminAuth() {\n $_SERVER['PHP_AUTH_USER'] = $GLOBALS['TOONCES_USERNAME'];\n $_SERVER['PHP_AUTH_PW'] = $GLOBALS['TOONCES_PASSWORD'];\n }", "title": "" }, { "docid": "ffd1f8297c393ff9b741485794aa102c", "score": "0.575902", "text": "public function verifyUser() //Comprobacion de los datos del login del lado del servidor\n {\n $user = $_POST[\"email\"];\n $pass = $_POST[\"contraseña\"];\n if (isset($user) && $user != \"\") {\n //Se trae al usuario desde la DB\n $dbUser = $this->model->getUser($user);\n if (isset($dbUser) && $dbUser) {\n\n if (password_verify($pass, $dbUser->password)) {\n session_start();\n $_SESSION[\"EMAIL\"] = $dbUser->email;\n $_SESSION[\"NICK\"] = $dbUser->nick;\n $_SESSION[\"ADMIN\"] = $dbUser->admin;\n header(HOME);\n } else {\n $mensaje = \"Contraseña incorrecta\";\n $this->view->showLogin($mensaje);\n }\n } else {\n $mensaje = \"Usuario incorrecto\";\n $this->view->showLogin($mensaje);\n }\n } else {\n $mensaje = \"Usuario y/o contraseña incorrectos\";\n $this->view->showLogin($mensaje);\n }\n }", "title": "" }, { "docid": "cf797d73748c34f399098c6dc8ddac50", "score": "0.57573795", "text": "function check_auth(){\n\t\tforeach($this->auth_classes as $class){\n\t\t\t$try = False;\n\t\t\tif (is_array($class) && count($class) == 3)\n\t\t\t\t$try = validateUserQuiet($class[0],$class[1],$class[2]);\n\t\t\telse\n\t\t\t\t$try = validateUserQuiet($class);\n\t\t\tif ($try){\n\t\t\t\t$this->current_user = $try;\n\t\t\t\treturn True;\n\t\t\t}\n\t\t}\n\t\t$try = checkLogin();\n\t\tif ($try && empty($this->auth_classes)){\n\t\t\t$this->current_user = $try;\n\t\t\treturn True;\n\t\t}\n\t\treturn False;\n\t}", "title": "" }, { "docid": "daab1434b046427c58ed0d0f4db4dac1", "score": "0.57557553", "text": "protected function loginWithNewUser() {\n $this->loginWithExistentUser($this->createNewUser());\n }", "title": "" }, { "docid": "9e9fcb31cb282ab09c5844cfce07b243", "score": "0.5752273", "text": "public function authenticateUser()\n\t{\n\n\t\tif($this->usernamevalidate & $this->pwdvalidate){\n\n\t\t//db check \n\t\t\n\t\treturn 1;\n\t\t}\n\t}", "title": "" }, { "docid": "f267749956fda5b8f91b651948c521d2", "score": "0.57519305", "text": "public function auth()\n\t{\n\t\treturn true; // or false\n\t}", "title": "" }, { "docid": "f0fa145fe6cd835e715e277293209e77", "score": "0.57493156", "text": "public function loguear_invitado(){\n\n\t\t/*Recogemos las variables del formulario de IU_login.php*/\n\t\tif (isset($_REQUEST['login'])) {\n\t\t\t$login=$_REQUEST['login'];\n\t\t} else {\n\t\t\t$login='';\n\t\t}\n\n\t\tif (isset($_REQUEST['pass'])) {\n\t\t\t$pass=$_REQUEST['pass'];\n\t\t} else {\n\t\t\t$pass='';\n\t\t}\n\n\t\tif (isset($_REQUEST['accion'])) {\n\t\t\t$accion=$_REQUEST['accion'];\n\t\t} else {\n\t\t\t$accion='';\n\t\t}\n\t\t\n\t\t/*Metemos las variables en la sesión*/\n\t\t$_SESSION['login'] = $login;\n\t\t$_SESSION['pass'] = $pass;\n\t\t$_SESSION['accion'] = $accion;\n\t\t\n\t\tif ($accion==\"Loguear\" )\n\t\t{\t\n\t\t\tif ($login == NULL || $pass == NULL){\n\t\t\t$_SESSION['login']='';\n\t\t\t header (\"Location:\".raiz.\"views/error/error_campos_incompletos.php\");\n\t\t\t return false;\n\t\t\t}\n\t\t\t//comprobamos si existe en la bd\n\t\t\t$sql_admin = \"select * from administrador where nombre_admin = '\".$login.\"'\";\n\t\t\t$sql_estab = \"select * from establecimiento where nombre_estab = '\".$login.\"'\";\n\t\t\t$sql_jurPro = \"select * from jurado_profesional where nombre_jurPro = '\".$login.\"'\";\n\t\t\t$sql_jurPop = \"select * from jurado_popular where nombre_jurPop = '\".$login.\"'\";\n\n\t\t\t$resultado_admin = mysql_query($sql_admin);\n\t\t\t$resultado_estab = mysql_query($sql_estab);\n\t\t\t$resultado_jurPro = mysql_query($sql_jurPro);\n\t\t\t$resultado_jurPop = mysql_query($sql_jurPop);\n\t\t\t\n\t\t\tif (mysql_num_rows($resultado_admin) == 1 )\n\t\t\t{\t\t\t\n\n\t\t\t\t// si existe en la bd comprobamos si coincide la pass\n\t\t\t\t$res = mysql_fetch_array($resultado_admin);\n\t\t\t\t\t\t\t\t\n\t\t\t\t//Administrador\n\t\t\t\tif ($pass==$res['contrasenha_admin'] ){\n\t\t\t\t\t\n\t\t\t\t\t$sql = \"select * from administrador \n\t\t\t\t\t\twhere ID_administrador = '\".$res['ID_administrador'].\"'\";\n\t\t\t\t\t\n\t\t\t\t\t$resultado = mysql_query($sql);\n\t\t\t\t\t\n\t\t\t\t\tif (mysql_num_rows($resultado) == 1){\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t$_SESSION['tipoUsu']='administrador';\n\t\t\t\t\t\theader ('Location:'.raiz.'controllers/administrador_controlador.php'); \t\t\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse{\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$_SESSION['login']='';\n\t\t\t\t\theader ('Location:'.raiz.'views/error/error_contrasenha1.php'); \n\t\t\t\t\treturn false;\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t\t\t\t\n\t\t\t/*****************ESTABLECIMIENTO**************************/\n\t\t\telse if ( mysql_num_rows($resultado_estab) == 1 )\n\t\t\t{\n\t\t\t\t// si existe en la bd comprobamos si coincide la pass\n\t\t\t\t$res = mysql_fetch_array($resultado_estab);\n\t\t\t\t\t\t\t\t\n\t\t\t\tif ($pass==$res['contrasenha_estab'] ){\n\t\t\t\t\t\n\t\t\t\t\t$_SESSION['nombre_estab']=$login;\n\t\t\t\t\t$_SESSION['ID_estab']=$res['ID_estab'];\n\t\t\t\t\t$sql = \"select * from establecimiento where ID_estab = '\".$res['ID_estab'].\"'\";\n\t\t\t\t\t\n\t\t\t\t\t$resultado = mysql_query($sql);\n\t\t\t\t\t\n\t\t\t\t\tif (mysql_num_rows($resultado) == 1){\n\t\t\t\t\t\n\t\t\t\t\t\t$_SESSION['tipoUsu']='establecimiento';\n\t\t\t\t\t\theader ('Location:'.raiz.'controllers/establecimiento_controlador.php'); \t\t\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$_SESSION['login']='';\n\t\t\t\t\theader ('Location:'.raiz.'views/error/error_contrasenha1.php'); \n\t\t\t\t\treturn false;\n\t\t\t\t}\t\t\n\t\t\t}\t\t\t\n\t\t\t/**************************************************************/\n\t\t\t/**************Jurado Profesional******************************/\n\t\t\telse if ( mysql_num_rows($resultado_jurPro) == 1 )\n\t\t\t{\n\t\t\t\t// si existe en la bd comprobamos si coincide la pass\n\t\t\t\t$res = mysql_fetch_array($resultado_jurPro);\n\t\t\t\t\t\t\t\t\n\t\t\t\tif ($pass==$res['contrasenha_jurPro'] ){\n\t\t\t\t\t\n\t\t\t\t\t$_SESSION['nombre_jurPro']=$login;\n\t\t\t\t\t$_SESSION['ID_juradoProfesional']=$res['ID_juradoProfesional'];\n\t\t\t\t\t$sql = \"select * from jurado_profesional where ID_juradoProfesional = '\".$res['ID_juradoProfesional'].\"'\";\n\t\t\t\t\t\n\t\t\t\t\t$resultado = mysql_query($sql);\n\t\t\t\t\t\n\t\t\t\t\tif (mysql_num_rows($resultado) == 1){\n\t\t\t\t\t\t$_SESSION['tipoUsu']='jurPro';\n\t\t\t\t\t\theader ('Location:'.raiz.'controllers/jurPro_controlador.php'); \t\t\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$_SESSION['login']='';\n\t\t\t\t\theader ('Location:'.raiz.'views/error/error_contrasenha1.php'); \n\t\t\t\t\treturn false;\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t\t//Jurado Popular\n\t\t\telse if ( mysql_num_rows($resultado_jurPop) == 1 )\n\t\t\t{\n\t\t\t\t// si existe en la bd comprobamos si coincide la pass\n\t\t\t\t$res = mysql_fetch_array($resultado_jurPop);\n\t\t\t\t\t\t\t\n\t\t\t\tif ($pass==$res['contrasenha_jurPop'] ){\n\t\t\t\t\t\n\t\t\t\t\t$_SESSION['nombre_jurPop']=$login;\n\t\t\t\t\t$_SESSION['ID_juradoPopular']=$res['ID_juradoPopular'];\n\t\t\t\t\t$sql = \"SELECT * \n\t\t\t\t\t\t\tFROM JURADO_POPULAR \n\t\t\t\t\t\t\tWHERE ID_juradoPopular = '\".$res['ID_juradoPopular'].\"'\";\n\t\t\t\t\t\n\t\t\t\t\t$resultado = mysql_query($sql);\n\t\t\t\t\t\n\t\t\t\t\tif (mysql_num_rows($resultado) == 1){\n\t\t\t\t\t\t$_SESSION['tipoUsu']='jurPop';\n\t\t\t\t\t\theader ('Location:'.raiz.'controllers/jurPop_controlador.php'); \t\t\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$_SESSION['login']='';\n\t\t\t\t\theader ('Location:'.raiz.'views/error/error_contrasenha1.php'); \n\t\t\t\t\treturn false;\n\t\t\t\t}\t\t\n\t\t\t}\t\t\t\n\t\t\t//si no existe el login en la bd lo mandamos a loguearse\n\t\t\telse{\n\t\t\t\t\t$_SESSION['login']='';\n\t\t\t\t\theader ('Location:'.raiz.'views/error/error_usuario.php'); \n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t} \n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "eb8ca89c7ca0b3f9a45e76c187f8c739", "score": "0.0", "text": "public function index()\n {\n $galleries = Gallery::all();\n return view('gallery.index',compact('galleries'))->with('id');\n }", "title": "" } ]
[ { "docid": "a2c82e645f33199ca3af4df01daa0da0", "score": "0.7344912", "text": "public function listAction()\n {\n $this->view->headTitle('Book Listing ','PREPEND');\n $this->view->books = $this->bookService->listService();\n }", "title": "" }, { "docid": "2ecb35785c4b9e881de2de7a961178df", "score": "0.7216157", "text": "public function action_list(){\n\t\t$v = View::factory(static::$entity.'/list');\n\t\t$this->template->body = $v;\n\t}", "title": "" }, { "docid": "dad0a13a73bcf8293bb4d9e710796f56", "score": "0.7157296", "text": "public function listAction()\n {\n $this->processList();\n }", "title": "" }, { "docid": "e5d3acc1f5204195de85b93044bfcb61", "score": "0.71494997", "text": "function listAction()\n {\n $pageTitle = 'Golf listings';\n $listLinkStyle = 'current_page';\n $isLoggedIn = $this->isLoggedInFromSession();\n $username = $this->usernameFromSession();\n\n $golfRepository = new GolfRepository();\n $golfs = $golfRepository->getAll();\n\n require_once __DIR__ . '/../templates/list.php';\n }", "title": "" }, { "docid": "bd3a7b4e07a2548dae8d575849df412a", "score": "0.7130201", "text": "public function index() {\n return view('admin.resources.index', [\n 'resources' => Resource::paginate(10)\n ]);\n }", "title": "" }, { "docid": "174c016a6d20963698d0780d8861782d", "score": "0.71026504", "text": "function showListPage() {\n\t\t$this->setCacheLevelNone();\n\n\t\t$this->render($this->getTpl('list'));\n\t}", "title": "" }, { "docid": "598d9caa73e88220c1d2180531a736f9", "score": "0.70936084", "text": "public function index()\n {\n $className = $this->modelClass;\n $model = $className::orderby('created_at', 'desc')->paginate(10);\n \n return view('admin.listing')\n ->with('pageTitle', $this->pageTitle)\n ->with('secondTitle', $this->secondTitle)\n ->with('columns', $this->columns)\n ->with('urlName', $this->urlName)\n ->with('model', $model);\n }", "title": "" }, { "docid": "3e6e80d5cb774ecfe48382a53469b26e", "score": "0.708227", "text": "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getContents();\t\n\t\t$page = (int)($this->_request->getParam('page'));\n\t\tGlobals::doPaging($result, $page, $this->view); \n\t\t\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "title": "" }, { "docid": "4033d77018807de6b615c3ca97da7bef", "score": "0.7053476", "text": "public function index()\n {\n return TodoListResource::collection($this->listRepository->list());\n }", "title": "" }, { "docid": "fbd940db6024ed547d75a84196b6efcc", "score": "0.7010994", "text": "public function index()\n {\n //get shows\n $shows = ShowsModel::paginate(10);\n\n return ShowsResource::collection($shows);\n }", "title": "" }, { "docid": "22e061b6e387c7871a6d54e088305a74", "score": "0.6980622", "text": "public function index()\n {\n return RecipeListResource::collection(Recipe::all());\n }", "title": "" }, { "docid": "937d8c67ef1e241cc6f04440a03a35d5", "score": "0.6966603", "text": "public function listing(){\n return view('interface/listing');\n }", "title": "" }, { "docid": "43a3797d462201f8486a324b4e596f68", "score": "0.6948688", "text": "public function list()\n {\n $flash = '';\n\n if(!empty($_SESSION['flash'])){\n $flash = $_SESSION['flash'];\n $_SESSION['flash'] = '';\n }\n\n # it will be populated\n $data = [];\n\n $bookInstance = new Book();\n $books = $bookInstance->select()->get();\n\n # fill data\n $data['flash'] = $flash;\n $data['books'] = $books;\n $data['loggedUser'] = $this->loggedUser;\n $data['url'] = Request::getUrl();\n\n $this->render('library', $data);\n }", "title": "" }, { "docid": "a74b64d14d05fcd4b8d8543c548d39b6", "score": "0.69422764", "text": "public function listAction() {\n $this->_datatable();\n return $this->render('BackendBundle:FeastStageArtist:list.html.twig');\n }", "title": "" }, { "docid": "161606f4dde01f5513c0d576501b3cb7", "score": "0.69052356", "text": "public function _index()\n\t{\n\t\t_root::getRequest()->setAction('list');\n\t\t$this->_list();\n\t}", "title": "" }, { "docid": "836499ad8af32deefc4b356617470307", "score": "0.6899639", "text": "public function index()\n {\n return view('laramanager::entries.index.index')\n ->with('resource', $this->resource)\n ->with('entries', $this->entriesRepository->getList($this->resource));\n }", "title": "" }, { "docid": "378b941376864b0adca2a47f6d9cbc14", "score": "0.68987226", "text": "public function action_index(){\n\t\t$v = View::factory(static::$entity.'/list');\n\t\t$this->template->body = $v;\n\t}", "title": "" }, { "docid": "a657a499da3c1e94405a12a48a398286", "score": "0.6889061", "text": "public function action_list()\n\t{\n\t\t$recordings = Model_Recording::factory()\n\t\t\t->with('Quotes')\n\t\t\t->find_all();\n\n\t\t// Generate and output the view\n\t\t$content = View::factory('recording/list')\n\t\t\t\t ->set('recordings', $recordings);\n\t\t$template = View::factory('templates/default')\n\t\t\t\t\t->set('title', 'All recordings')\n\t\t\t\t\t->set('content', $content->render());\n\n\t\t$this->response->body($template->render());\n\t}", "title": "" }, { "docid": "b41517724d4cdbc80c63a80b966a7b01", "score": "0.6874345", "text": "public function listAction() {\n\n\t\t}", "title": "" }, { "docid": "e908ab42fc450a9a0594cc9564f4eeb9", "score": "0.68604916", "text": "public function listAction() {\n $this->model->updateStatus();\n Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagecontrol.phtml');\n\n $where = '1 = 1';\n\n $filter = $this->_request->getParam('search');\n $this->view->filter = $filter;\n\n if ($filter == 'active') {\n $where = 'status = 0';\n } else if ($filter == 'disabled') {\n $where = 'status = 2';\n } else if ($filter == 'expired') {\n $where = 'status = 1';\n }\n\n $sort = $this->_request->getParam('sort');\n if (!$sort) {\n $sort = 'description';\n }\n\n if (!isset($this->session_sorting->sort)) {\n $this->session_sorting->sort = 0;\n }\n\n if ($this->session_sorting->sort == 0) {\n $this->session_sorting->sort = 1;\n $data = $this->table->fetchAll($this->table->select()->where($where)->order($sort . ' desc'));\n } else {\n $this->session_sorting->sort = 0;\n $data = $this->table->fetchAll($this->table->select()->where($where)->order($sort . ' asc'));\n }\n\n $paginator = Zend_Paginator::factory($data);\n $paginator->setCurrentPageNumber($this->_getParam('page', 1));\n $paginator->setItemCountPerPage(10);\n\n $this->view->page = $this->_getParam('page');\n $this->view->discounts = $paginator;\n }", "title": "" }, { "docid": "8ef49cf3a3eb21ff0a74662ea3579be6", "score": "0.68552405", "text": "public function index()\n {\n // Get cards\n $cards = Card::orderBy('created_at', 'desc')->paginate(10);\n\n // Return collection of cards as a resource\n return CardResource::collection($cards);\n }", "title": "" }, { "docid": "6e9ab9b623d3bae20d9be7b36335891d", "score": "0.68496746", "text": "public function listAction()\n {\n $this->forward('index');\n }", "title": "" }, { "docid": "d6111f19a7aca7d26ffbe0986ebf3edd", "score": "0.68403566", "text": "public function indexAction()\n {\n $this->listAction();\n }", "title": "" }, { "docid": "88277ff9376f997f91e6b5491575d7bb", "score": "0.6833941", "text": "public function index()\n {\n return ShoppingListResource::collection(ShoppingList::paginate(15));\n }", "title": "" }, { "docid": "546b231c03944da42a8e98b848f51fa9", "score": "0.682688", "text": "public function list()\n {\n $shelves = Bookshelf::visible();\n\n return $this->apiListingResponse($shelves, [\n 'id', 'name', 'slug', 'description', 'created_at', 'updated_at', 'created_by', 'updated_by', 'owned_by',\n ]);\n }", "title": "" }, { "docid": "755da2e01052312a756038c9d166d9cb", "score": "0.6794424", "text": "public function listAction() {\n $this->view->headTitle($this->view->translate('List of templates'), 'PREPEND');\n $templateModel = new Unisender_Model_UnisenderTemplate();\n $this->view->template_list = $templateModel->getAll();\n }", "title": "" }, { "docid": "d05cc4d736f09bef3c6bdf24844ac8c6", "score": "0.67896605", "text": "public function index()\n\t{\n\t\t$artists = Artist::paginate(100);\n\n\t\treturn $this->respond([\n\t\t\t'data' => $this->artistTransformer->transformCollection($artists->all())\n\t\t]);\n\t}", "title": "" }, { "docid": "1647b90a06fcd39c33c32b33bf9fa133", "score": "0.6786386", "text": "public function index()\n {\n return view('list_wrapper', [\n 'entityType' => 'itemscanner',\n 'datatable' => new ItemScannerDatatable(),\n 'title' => mtrans('itemscanner', 'itemscanner_list'),\n ]);\n }", "title": "" }, { "docid": "89d40e37a12f5ea687a94247a2fdb4da", "score": "0.67858946", "text": "public function actionIndex()\n {\n $this->layout = '@backend/views/layouts/list';\n return $this->render('index', [\n 'dataProvider' => $this->getDataProvider(),\n 'model' => $this->getModelSearch(),\n 'currentView' => $this->getCurrentView(),\n 'availableViews' => $this->getAvailableViews()\n ]);\n }", "title": "" }, { "docid": "487c93a93f48c83d96a649e03fdb104d", "score": "0.677515", "text": "public function index()\n {\n //\n return DishResource::collection(Dish::orderBy('id', 'asc')->paginate());\n }", "title": "" }, { "docid": "6265f2e35f1c819b84733e2d894fc9f3", "score": "0.6763234", "text": "public function __list()\r\n {\r\n $current = SamsonLocale::current();\r\n\r\n $default = 'ru';\r\n\r\n if (defined('DEFAULT_LOCALE')){\r\n $default = DEFAULT_LOCALE;\r\n }\r\n\r\n // Render all available locales\r\n $html = '';\r\n foreach (SamsonLocale::get() as $locale) {\r\n if ($current != $default) {\r\n $urlText = substr(url()->text,strlen($current)+1);\r\n } else {\r\n $urlText = url()->text;\r\n }\r\n if ($locale == $default) {\r\n $url = 'http://'.$_SERVER['HTTP_HOST'].__SAMSON_BASE__.$urlText;\r\n } else {\r\n $url = 'http://'.$_SERVER['HTTP_HOST'].__SAMSON_BASE__.$locale.'/'.$urlText;\r\n }\r\n\t $localeName = '';\r\n\t if ($this->isLocaleLinkText) {\r\n\t\t $localeName = $this->translate($locale, $current);\r\n\t }\r\n $html .= $this->view('list/item')\r\n ->css(self::CSS_PREFIX)\r\n ->locale($locale == SamsonLocale::DEF && SamsonLocale::DEF == ''? 'def' : $locale)\r\n ->active($locale == $current ? self::CSS_PREFIX.'active':'')\r\n ->url($url)\r\n\t ->name($localeName)\r\n ->output();\r\n }\r\n\r\n // Set locale list view\r\n $this->view('list/index')->locale($current)->css(self::CSS_PREFIX)->items($html);\r\n }", "title": "" }, { "docid": "9574508ae15a68d9552788d66f6069d4", "score": "0.6743928", "text": "public function all()\n\t{\n\t\t$recipes = Recipe::findRecipe(array('recipe_images.is_cover'=>'yes'));\t\n\t\t\n\t\t$this->template->recipes = $recipes;\n\t\t$this->template->display('list.html.php');\n\t}", "title": "" }, { "docid": "e1224469d7f8380d5b96958c49bfc327", "score": "0.6737558", "text": "public function index()\n {\n $offers = Offer::filter()->paginate();\n\n return OfferResource::collection($offers);\n }", "title": "" }, { "docid": "e89b2c9176e1e2ba1660cebc077dc45d", "score": "0.67282945", "text": "public function index()\n {\n $user = $this->userContract->findWith(request()->user()->id, ['profile']);\n $resources = $this->resourceContract->getResourcesOrdered();\n $trashed = $this->resourceContract->getTrashedResourcesOrdered();\n\n return view('backend.resources.index', compact('user', 'resources', 'trashed'));\n }", "title": "" }, { "docid": "2422a439354b2d9d0c8e13222d75b791", "score": "0.67131394", "text": "public function indexAction()\r\n {\r\n \t$this->openApi->getItems();\r\n $this->view->data = $this->openApi->getDataResponse();\r\n }", "title": "" }, { "docid": "f38c30f9e765863f55cf5c7e5b441e0a", "score": "0.6695788", "text": "public function listAction()\n {\n $this->_title($this->__('System'))->_title($this->__('Index Management'));\n\n $this->loadLayout();\n $this->_setActiveMenu('system/index');\n $this->renderLayout();\n }", "title": "" }, { "docid": "a90256f37c65707c557ad75ce4efde1a", "score": "0.6692435", "text": "public function index()\n {\n return $this->service->getList();\n }", "title": "" }, { "docid": "c28bf83f5ff7f88cca0b895b2e8d3ae8", "score": "0.6691992", "text": "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Reviews list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the reviews.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/reviews/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Reviews::grid() )->datagrid ();\n\t}", "title": "" }, { "docid": "4cc7c30861d929f90a57a50b59a5a1f5", "score": "0.6688066", "text": "public function listAction(){\n\t\t//Passes values from the Todo Mysql table into the $todos value\n\t\t$todos = $this->getDoctrine()\n\t\t\t\t\t ->getRepository('AppBundle:Todo')\n\t\t\t\t\t ->findAll();\n\t\t//Loading the todo view in here...\n return $this->render('todo/index.html.twig', array(\n\t\t\t'todos' => $todos\n\t\t));\n }", "title": "" }, { "docid": "1a9cb6255c77fe1bff8fb9d77615f930", "score": "0.66868174", "text": "public function list(): Response\n {\n return $this->renderList(\n [],\n ['artist' => 'ASC', 'title' => 'ASC']\n );\n }", "title": "" }, { "docid": "a8ee22092f12cd9a55fa2d36291251f4", "score": "0.66837585", "text": "public function action_list() {\n if (Input::method() != 'GET') { $this->response($this->no_access); return; }\n\n $params = Input::get();\n $user = $this->user_login->user;\n\n try {\n $resp = $this->listStuff($params, $user);\n } catch (Exception $exc) {\n return $this->_error_response($exc->getMessage());\n }\n \n // Set the output\n $data = array('data' => array('offers' => $resp[\"all_offers\"]), 'meta' => $resp[\"meta\"]);\n $this->response($data);\n\t}", "title": "" }, { "docid": "5a18d2c52cb259d958c945d4d6a9ea33", "score": "0.66771364", "text": "public function listAction()\n {\n $task = new Task($this->config);\n $tasks = $task->getAll();\n $amountOfTasks = $task->getAmountTasks();\n \n // load views.\n $this->view('task/list', [\n 'tasks' => $tasks,\n 'amountOfTasks' => $amountOfTasks\n ]);\n }", "title": "" }, { "docid": "fb257c74bec9eb0cfbe648823975e645", "score": "0.6653362", "text": "public function index()\n {\n $requests = ModelsRequests::paginate();\n\n return ResourcesRequests::collection($requests);\n }", "title": "" }, { "docid": "f186543d4e229fe60c320d197652a0ac", "score": "0.66485167", "text": "public function index()\n {\n return BookResource::collection(Book::paginate());\n }", "title": "" }, { "docid": "097ff24f05f0eef21fe921e55bd3b80d", "score": "0.6647963", "text": "public function listAction()\n {\n try {\n $cd = $this->currentFolder();\n return new ViewModel(array(\n 'currentFolder' => $cd,\n 'seperator' => $this->seperator,\n 'entries' => $this->directoryContent($this->getEntity(), $cd)\n ));\n } catch (\\Exception $e) {\n echo Json::encode(array(\n 'error' => $e->getCode()\n ));\n exit();\n }\n }", "title": "" }, { "docid": "59475f9f5ef859f09d1ee48e7e27d0ea", "score": "0.66408116", "text": "public function index()\n {\n return $this->showAll(SpeciesResource::collection(Species::get()));\n }", "title": "" }, { "docid": "3e9e7ace6967f2049a9e3a5287aa7bc1", "score": "0.66389084", "text": "public function index()\n {\n if ($ref = \\Request::get('getRef')) {\n return $this->getRef($ref);\n }\n\n $per_page = \\Request::get('perPage');\n $data = $this->repository->paginate($per_page);\n\n return $this->sendSuccess($data, __('api.success_list', ['name' => $this->name]));\n }", "title": "" }, { "docid": "aa0d5690d16cbfb9dc97e701071da2f2", "score": "0.66378", "text": "public function listAction() {\n $imageService = $this->container->get(\"dft_foapi.image\");\n return $this->render('dftFoapiBundle:Common:data.json.twig', array(\n \"data\" => $imageService->fetchAll(\n $this->getAuthenticatedUserIdAndSubAccountIds()\n )\n )\n );\n }", "title": "" }, { "docid": "479fb582c4dbcbc65e4bb28c2bb3a697", "score": "0.6634931", "text": "public function list()\n {\n // and this sorting and paging logics must be in separate components\n // but for our case ... ))\n $sortTypes = ['author', 'email', 'done', 'author DESC', 'email DESC', 'done DESC'];\n $sort = input('sort', null);\n if ($sort && in_array($sort, $sortTypes)) {\n $sortSql = \" ORDER BY {$sort} \";\n } else {\n $sortSql = '';\n }\n $offset = (int) input('offset', 0);\n $offsetSql = \" LIMIT {$offset}, \" . static::PER_PAGE;\n $sql = '1 ' . $sortSql . $offsetSql;\n $todos = R::findAll('todo', $sql);\n $total = R::count('todo');\n\n //paging\n $next = false;\n $prev = false;\n\n if ($total > $offset + static::PER_PAGE) {\n $next = $offset + static::PER_PAGE;\n }\n\n if ($offset !== 0) {\n $prev = $offset - static::PER_PAGE;\n }\n\n //sorting\n $sortings = [];\n foreach (['author', 'email', 'done'] as $sortAttribute) {\n if (strpos($sort, $sortAttribute) !== false && $sort === $sortAttribute) {\n $sortings[$sortAttribute] = \"{$sortAttribute} DESC\";\n } else {\n $sortings[$sortAttribute] = $sortAttribute;\n }\n }\n\n return $this->render('list', compact('todos', 'next', 'prev', 'sortings', 'total'));\n }", "title": "" }, { "docid": "317c606a7e54f34736590f60393be790", "score": "0.66287994", "text": "function index()\n\t{\n\t\t$this->items();\n\t}", "title": "" }, { "docid": "0ef8e5b1a7ba68c743bcff23cd0cf130", "score": "0.66286683", "text": "public function index()\n {\n return Resource::all();\n }", "title": "" }, { "docid": "fda26526263c4f32a26eb1c3721263e4", "score": "0.6624256", "text": "public function index()\n {\n $listings = $this->listing->latest()->paginate(50);\n\n return view('admin.listings.index', compact('listings'));\n }", "title": "" }, { "docid": "7c0e8a5f42c42d1c4f18968bb494ad0e", "score": "0.662167", "text": "public function paginatedListAction() {\n return $this->getList();\n }", "title": "" }, { "docid": "0e1a46d9ea752b3e205c54aab701c4fd", "score": "0.6619464", "text": "public function listings() {\r\n $data = $this->model->getData();\r\n $this->template->data = $data;\r\n $this->set('general/list');\r\n }", "title": "" }, { "docid": "3e2ce9e0dce5419c500b0a60774b7605", "score": "0.66175646", "text": "public function index()\n {\n return $this->service->lists();\n }", "title": "" }, { "docid": "bca6e37ce935bd0d2b77093989d408cd", "score": "0.66133", "text": "public function actionIndex()\n {\n $searchModel = new ListingSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "67562fbc2bb858bc588d4a91237cb673", "score": "0.6603042", "text": "function index() {\r\n\t\t// Getting the whole list\r\n\t\t$itemList = $this->model->find('all');\r\n\r\n\t\t$this->set('itemList', $itemList);\r\n\t}", "title": "" }, { "docid": "8ec8da14e071283716d59393a382ab24", "score": "0.659859", "text": "public function listAction()\n {\n\t\t$identity = Zend_Auth::getInstance()->getIdentity();\n\t\n\t\t// if identity and user aren't the same identity, add an entry to the identityBoard (menu )\n\t\tif( $identity->id != $this->_user->id ){\n\t\t\tApplication_Model_Ui_Boards_IdentityBoard::getInstance()->addEntry(\n\t\t\t\tAnta_Core::getBase().\"/documents/\".$this->_user->cryptoId,\n\t\t\t\tI18n_Json::get( 'userDocumentList' ).' @ '.$this->_user->username , array( \n\t\t\t\t\t'class' => 'admin entry-selected'\n\t\t\t));\n\t\t\tApplication_Model_Ui_Boards_IdentityBoard::getInstance()->addEntry(\n\t\t\t\tAnta_Core::getBase().\"/gexf/entities/user/\".$this->_user->cryptoId,\n\t\t\t\tI18n_Json::get( 'gexf' ).' @ '.$this->_user->username , array( \n\t\t\t\t\t'class' => 'admin'\n\t\t\t));\n\n\t\t}\n\t\t$this->view->dock = new Application_Model_Ui_Docks_Dock();\n\t\t\n\t\t$this->view->dock->addCraft( new Application_Model_Ui_Crafts_Cargo( 'documents', I18n_Json::get( 'documentsList' ).\": \".$this->_user->username ) );\n\t\t\n\t\t$totalDocuments = Application_Model_DocumentsMapper::getNumberOfDocuments( $this->_user ); \n\t\t\n\t\t// no documents? send directly to upload, with a link, and stop this script\n\t\tif( $totalDocuments == 0 ){\n\t\t\t\n\t\t\t// draw nice upload link \"start uploading file!\" and welcome message as well\n\t\t\t$this->view->dock->documents->setHeader( new Ui_Crafts_Headers_Welcome( $this->_user ) );\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// remove menu items\n\t\t\tUi_Board::getInstance( \"Documents\", array( 'user' => $this->_user ) )->removeItem(\n\t\t\t\t\"documents.import-tags\", \n\t\t\t\t\"documents.export-tags\",\n\t\t\t\t\"api.reset\"\n\t\t\t);\n\t\t\t\n\t\t\treturn $this->render( 'index');\n\t\t}\n\t\t\n\t\t// start listening to request filter, or default vars here\n\t\t// values and their validators\n\t\tDnst_Filter::start( array(\n\t\t\t\t\"offset\" => 0,\n\t\t\t\t\"limit\" => 100,\n\t\t\t\t\"order\" => array( \"mimetype DESC\" ),\n\t\t\t\t\"tags\"\t => array(),\n\t\t\t\t\"query\" => \"\",\n\t\t\t\t\"date_start\"=>\"\",\n\t\t\t\t\"date_end\" =>\"\"\n\t\t\t), array (\n\t\t\t\t\"order\" => new Dnst_Filter_Validator_Array( array(\n\t\t\t\t\t\"id_document DESC\", \"id_document ASC\",\n\t\t\t\t\t\"title ASC\", \"title DESC\", \"date ASC\", \"date DESC\",\"`ignore` DESC\", \"`ignore` ASC\",\n\t\t\t\t\t\"status ASC\", \"status DESC\",\n\t\t\t\t\t\"language ASC\", \"language DESC\", \"mimetype ASC\", \"mimetype DESC\",\n\t\t\t\t)),\n\t\t\t\t\"offset\" => new Dnst_Filter_Validator_Range( 0, 10000000 ),\n\t\t\t\t\"limit\" => new Dnst_Filter_Validator_Range( 1, 500 ),\n\t\t\t\t\"query\" => new Dnst_Filter_Validator_Pattern( 0, 100 )\n\t\t\t)\n\t\t);\n\t\t\n\t\tif( !Dnst_Filter::isValid() ){\n\t\t\t// if you set the filters properly, then these variables MUST be in place\n\t\t\tAnta_Core::setError(\"uhm..not valid string..\".Dnst_Filter::getErrors() );\n\t\t\treturn $this->render( 'index' );\n\t\t}\n\t\t// print_r( Dnst_Filter::read() );\n\t\t// get all the documents\n\t\t$documents = Application_Model_DocumentsMapper::select(\n\t\t\t$this->_user,\n\t\t\tDnst_Filter::read()\n\t\t);\n\t\t// send some variables to the view\n\t\t$this->view->totalItems = $documents->totalItems;\n\t\t$this->view->loadedItems = count( $documents->results );\n\t\t\n\t\t// query to group documents by month according to number of groups\n\t\t$stmt = Anta_Core::mysqli()->query(\"\n\t\t\tSELECT COUNT(*) as countable, DATE_FORMAT(date,'%d.%m.%Y') as simple_date FROM anta_{$this->_user->username}.`documents` GROUP BY (`simple_date`)\"\n\t\t);\n\t\t$timestamps = array();\n\t\twhile ( $row = $stmt->fetchObject() ){\n\t\t\t$timestamps[] =\tnew Ui_D3_Timeline_Point( \n\t\t\t\t$row->simple_date, \n\t\t\t\tarray( \n\t\t\t\t\t\"y\" => $row->countable,\n\t\t\t\t\t\"title\" => $row->simple_date .\" (\".$row->countable.\")\",\n\t\t\t\t\t\"href\" => $_SERVER['REFERRER_URI'].'?'.Dnst_Filter::setProperty( 'date_start', $row->simple_date )\n\t\t\t\t) \n\t\t\t);\t\n\t\t}\n\t\t\n\t\t// prepare headers\n\t\t$header = new Anta_Ui_Header_Documents();\n\t\t$header->user = $this->_user;\n\t\t$header->loadedItems = count( $documents->results );\n\t\t$header->totalItems = $documents->totalItems;\n\t\t$header->offset = Dnst_Filter::getProperty( \"offset\" );\n\t\t$header->limit = Dnst_Filter::getProperty( \"limit\" );\n\t\t$header->searchQuery = Dnst_Filter::getProperty( \"query\" );\n\t\t$header->setTimeline( new Ui_D3_Timeline( \n\t\t\t$timestamps, \"dd.mm.yy\", \n\t\t\tarray( \"width\"=>832, \"height\"=>40)\n\t\t));\n\t\t\n\t\t$this->view->dock->documents->setHeader( \n\t\t\t$header\n\t\t);\n\t\t\n\t\t\n\t\t\n\t\tforeach (array_keys( $documents->results ) as $k ){\n\t\t\t$this->view->dock->documents->addItem( new Anta_Ui_Item_Document( $documents->results[ $k ] ) );\n\t\t}\n\t\t\n\t\t$this->render( 'index' );\n\t\t\n }", "title": "" }, { "docid": "51ab41ffa64c6b6b7fbb813516203da1", "score": "0.6594559", "text": "public function index()\n {\n return PharmacyResource::collection($this->pharmacyRepoInstance->paginate(self::PER_PAGE, ['id', 'name', 'address']));\n }", "title": "" }, { "docid": "be3ed76ca60da4c3caa2d8528ae5c319", "score": "0.65915436", "text": "public function actionIndex()\n {\n if(Yii::$app->user->can('admin')){\n $dataProvider = new ActiveDataProvider([\n 'query' => Resource::find()->where(['size'=>0]),\n ]);\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }\n else{\n $dataProvider = new ActiveDataProvider([\n 'query' => Resource::find(),\n ]);\n return $this->render('list', [\n 'dataProvider' => $dataProvider,\n ]);\n }\n\n\n }", "title": "" }, { "docid": "ccecdc5f92158721af216deee02beaf2", "score": "0.65849185", "text": "public function action_index() \n\t{\n\t\t$this->rest_output(array(\n\t\t\t'GET example!', \n\t\t));\n\t}", "title": "" }, { "docid": "c971fcbed7a0406b3764b8ecdb481920", "score": "0.65735435", "text": "protected function listAction()\r\n {\r\n $contentUid = $this->configurationManager->getContentObject()->data['uid'];\r\n $configuration = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);\r\n if (!isset($configuration['view']['pluginNamespace'])) {\r\n $configuration['view']['pluginNamespace'] = 'tx_ameosfilemanager_fe_filemanager';\r\n }\r\n\r\n $this->settings['columnsTable'] = explode(',', $this->settings['columnsTable']);\r\n $this->settings['actionDetail'] = explode(',', $this->settings['actionDetail']);\r\n $this->view->assign('settings', $this->settings);\r\n\r\n $args = $this->request->getArguments();\r\n $t = $this->fileRepository->findBySearchCriterias($args, $this->settings['startFolder'], $configuration['view']['pluginNamespace'], $this->settings['recursion']);\r\n $this->view->assign('files', $t);\r\n $this->view->assign('value', $args); \r\n $this->view->assign('content_uid', $contentUid);\r\n\r\n if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'\r\n && $contentUid == GeneralUtility::_POST('ameos_filemanager_content')) {\r\n header('Content-Type: text/json; charset=utf8;');\r\n echo json_encode(['html' => $this->view->render()]);\r\n die();\r\n }\r\n }", "title": "" }, { "docid": "ef4fec830260d9dfb3f1e7e325eac9e0", "score": "0.6572283", "text": "public function actionList()\n {\n $products = new ActiveDataProvider([\n 'query' => Product::find(),\n 'pagination' => [\n 'pageSize' => 10\n ]\n ]);\n return $this->render('list', ['products' => $products]);\n }", "title": "" }, { "docid": "6b6ca26ff623891fbb04a6646a0e894c", "score": "0.6567315", "text": "public function index(Request $request)\n {\n $this->checkRole();\n\n //\tGet all records of the model and set default ordering\n $builder = $this->model('orderBy', $request->orderby ?: ((property_exists($this, 'list_order_by')) ? $this->list_order_by : 'name'), $request->order ?: ((property_exists($this, 'list_order')) ? $this->list_order : 'desc'));\n\n //\tRetrieve the fields which will be used in records table\n $fields = new RenderList($this->getFieldsForList());\n\n // Handle list search\n if ($request->has('s')) {\n $builder->where($this->list_search_on, 'LIKE', '%' . $request->s . '%');\n }\n\n // Handle list filtering\n if ($request->has('filter') && $request->has('set')) {\n $builder->where($request->filter, $request->set);\n }\n\n // Move $builder to $records with default paging of 40 p/p\n $records = $builder->paginate(40);\n\n //\tLoad the view\n return view('crud::templates.index', $this->parseViewData(compact('records', 'fields')));\n }", "title": "" }, { "docid": "9500e1733deedb51878d2d909f31751a", "score": "0.65666634", "text": "public function actionList()\r\n {\r\n $objectClassId = $this->_input->filterSingle('object_class_id', XenForo_Input::STRING);\r\n $class = $this->_getClassOrError($objectClassId);\r\n\r\n $objectModel = $this->_getObjectModel();\r\n\r\n $objects = $objectModel->getObjects(array(\r\n 'object_class_id' => $objectClassId\r\n ));\r\n\r\n $viewParams = array(\r\n 'class' => $class,\r\n 'objects' => $objects\r\n );\r\n\r\n return $this->responseView('ThemeHouse_Objects_ViewAdmin_Object_List', 'object_list', $viewParams);\r\n }", "title": "" }, { "docid": "22313e01879ad9cf6aefe5b6cf7eaac2", "score": "0.6564356", "text": "public function listeAction()\n {\n // des éléments de contrôle de la pagination pour plus d'informations\n Zend_View_Helper_PaginationControl::setDefaultViewPartial('controls.phtml');\n\n $mapper = new Application_Model_FilmMapper();\n $film = new Application_Model_Film();\n $film = $mapper->obtenirAllFilms();\n\n // Créons un paginateur pour cette requête\n $paginator = Zend_Paginator::factory($film);\n\n // Nous lisons le numéro de page depuis la requête. Si le paramètre n'est pas précisé\n // la valeur 1 sera utilisée par défaut\n $paginator->setCurrentPageNumber($this->_getParam('page', 1));\n\n // Assignons enfin l'objet Paginator à notre vue\n $this->view->paginator = $paginator;\n }", "title": "" }, { "docid": "ea842597a9d8fad1df58d74c6b12ab97", "score": "0.65609485", "text": "public function index()\n {\n $statuses = Status::all();\n $statuses->transformer = StatusCollection::class;\n return $this->showAll($statuses);\n }", "title": "" }, { "docid": "9854a8a0b5996147689b1cfb93901fba", "score": "0.6557824", "text": "public function index()\n {\n $entities = Entity::all();\n\n return view('actions.entity.read', compact('entities'));\n }", "title": "" }, { "docid": "6eadfe639301106d65142408b4536a7d", "score": "0.65403616", "text": "public function index()\n {\n return CentroResource::collection(Centro::paginate());\n }", "title": "" }, { "docid": "47bc2129e22deb7b10f9cd1b3ca97140", "score": "0.6533276", "text": "public function index()\n {\n\n if ($this->model->count() <> 0) {\n return $this->resource::collection($this->model);\n }\n return Response::json([\n 'error' => 'Record not found'\n ], 404);\n\n }", "title": "" }, { "docid": "b1c6918b8a647032258b39902afb3198", "score": "0.65330017", "text": "public function index()\n {\n $this->initialiseRequest();\n $items = $this->queryRepository->all();\n if (!$items) {\n return $this->apiManager->respondNotFound('Items do not exist.');\n }\n $itemsResource = new Collection($items, $this->transformer);\n $processedItems = $this->fractalManager->createData($itemsResource)->toArray();\n return $this->apiManager->respond($processedItems);\n }", "title": "" }, { "docid": "289c02bb55888cea68db6bb293329f8b", "score": "0.6530314", "text": "public function listAction()\n {\n if (false === $this->admin->isGranted('LIST')) {\n throw new AccessDeniedException();\n }\n\n /** @var \\Symfony\\Component\\HttpFoundation\\Request $request */\n $request = $this->container->get('request_stack')->getCurrentRequest();\n\n /** @var \\Sonata\\MediaBundle\\Provider\\Pool $mediaPool */\n $mediaPool = $this->container->get('sonata.media.pool');\n\n $contexts = $mediaPool->getContexts();\n\n reset($contexts);\n $contextName = key($contexts);\n $datagrid = $this->admin->getDatagrid($request->get('context', $contextName));\n $datagrid->setValue('context', null, $this->admin->getPersistentParameter('context'));\n\n $formView = $datagrid->getForm()->createView();\n\n // set the theme for the current Admin Form\n $this->get('twig')->getExtension('form')->renderer->setTheme($formView, $this->admin->getFilterTheme());\n\n return $this->render(\n $this->admin->getTemplate('list'),\n array(\n 'action' => 'list',\n 'form' => $formView,\n 'datagrid' => $datagrid,\n 'csrf_token' => $this->getCsrfToken('sonata.batch'),\n )\n );\n }", "title": "" }, { "docid": "b09ff22d2468ad0a34a73b6be1c564e7", "score": "0.6529846", "text": "public function index()\n {\n $questions = Question::pimp()->paginate();\n\n QuestionResource::collection($questions);\n\n return $this->sendResponse(compact('questions'));\n }", "title": "" }, { "docid": "9541d55e53804985d6027f052d293580", "score": "0.6528329", "text": "public function index()\n {\n return $this->render('index', [\n 'model' => $this->model,\n 'endpoints' => $this->getAvailableApiEndpoints(),\n 'groupsCount' => $this->model->getGroups()->count(),\n ]);\n }", "title": "" }, { "docid": "9541d55e53804985d6027f052d293580", "score": "0.6528329", "text": "public function index()\n {\n return $this->render('index', [\n 'model' => $this->model,\n 'endpoints' => $this->getAvailableApiEndpoints(),\n 'groupsCount' => $this->model->getGroups()->count(),\n ]);\n }", "title": "" }, { "docid": "cc3607ce8a88164b64b1133094816f12", "score": "0.6523721", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = ucfirst(($this->chapter ? $this->chapter->name . ' --> ' : '') . $this->crud->entity_name_plural);\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getListView(), $this->data);\n }", "title": "" }, { "docid": "cdc6c11bca5c8d643c1f6a1a0d80d23d", "score": "0.65207875", "text": "public function indexAction()\r\n {\r\n $this->parseRequestForPager();\r\n\r\n $pager = $this->getPager();\r\n $form = $this->getFilterForm()->createView();\r\n\r\n $result = array(\r\n 'list' => $this->getList($pager),\r\n 'pager' => $this->getPagination($pager),\r\n 'filters' => $this->get('pizone_form')->formDataToArray($form)\r\n );\r\n\r\n $view = new View($result);\r\n return $this->handleView($view);\r\n }", "title": "" }, { "docid": "3f1eb8293a667a2878f4d80d96280084", "score": "0.65190613", "text": "public function index()\n {\n return BookResource::collection(Book::paginate(25));\n }", "title": "" }, { "docid": "d06d606c40c9d56f52b80f958f43b5ce", "score": "0.65189445", "text": "public function index()\n\t{\n\t\t// will show list of Data\n\t}", "title": "" }, { "docid": "d44d85e06d4eeb7940282586d59ecb10", "score": "0.6513058", "text": "public function index()\n {\n return UnitResource::collection(Unit::paginate(5));\n }", "title": "" }, { "docid": "81a94e8c32b6134de5e7342f4235e4ec", "score": "0.6507957", "text": "public function index()\n {\n\n // Get articles\n $chairs = Chair::paginate(15);\n\n // Return collection of articles as a resource\n return ChairResource::collection($chairs);\n\n }", "title": "" }, { "docid": "22fb95b3636c2f407abebe88d13d8888", "score": "0.65052503", "text": "public function index()\n {\n $authors = Author::all();\n return AuthorResource::collection($authors);\n }", "title": "" }, { "docid": "1071b7d841a42ebb958087fb23ea72c9", "score": "0.65000725", "text": "public function index()\n {\n //return $this->repository->all();\n return $this->service->showAll();\n }", "title": "" }, { "docid": "cad2135c8b884f5e32721aec5b9bea32", "score": "0.6498298", "text": "public function index()\n {\n return CategoryResource::collection(Category::paginate());\n }", "title": "" }, { "docid": "1a823c7469d426833399140a05c28243", "score": "0.64942163", "text": "public function listAction()\n\t{\n\t\t$asResponse = array();\n\t\t$client = new Zend_Http_Client($this->ssUri.'/list');\n\t\t$client->setParameterGet(array('bIsRest' => true));\n\t\t$client->setConfig(array('timeout' => 30));\n\t\t$ssResponse = $client->request('GET');\n\t\t\n\t\tif($ssResponse->isSuccessful())\n\t\t{\n\t\t\t$ssResponseBody = $ssResponse->getBody();\n\t\t\t$asResponse = Zend_Json_Decoder::decode($ssResponseBody,Zend_Json::TYPE_ARRAY);\n\t\t}\n\t\t$this->view->users = $asResponse;\n\t}", "title": "" }, { "docid": "516498e2faf9e3833f4a0c0889c0d1a6", "score": "0.6493438", "text": "public function index()\n {\n $this->authorize('index', Category::class);\n\n return CategoryResource::collection(Category::paginate(15));\n }", "title": "" }, { "docid": "baeb75c01b41d5a02e946acdd0870ae9", "score": "0.649078", "text": "public function showBooksAction()\n {\n $result = $this->model->getBooks();\n // Get params of books and pagination\n $data = $result[0];\n $pagination_params = $result[1];\n\n $this->view->render('List of books', $data, $pagination_params);\n }", "title": "" }, { "docid": "7029a5ba2d86ddb638223bf9a830e61a", "score": "0.6485991", "text": "public function actionIndex()\r\n {\r\n $dataProvider = $this->getIndex('api/books', 'app\\models\\Book');\r\n\r\n return $this->render('index', [\r\n 'dataProvider' => $dataProvider\r\n ]);\r\n }", "title": "" }, { "docid": "ad2789681d764a50f799c66b64e9e3f5", "score": "0.64852315", "text": "public function index()\n {\n $data = GuestResource::collection(\n $this->guest->paginate(request()->per_page)\n );\n\n if (! $data) {\n return response()->json([\n 'message' => 'Failed to retrieve resource'\n ], 400);\n }\n\n return $data;\n }", "title": "" }, { "docid": "64c5cb71d29bff854bd1d4c026363eb2", "score": "0.6485052", "text": "public function index()\n {\n $cust = Customers::paginate(20);\n return CustomersResource::collection($cust);\n }", "title": "" }, { "docid": "fc608464ab00efa2883cbaa1ca108cd1", "score": "0.6482175", "text": "public function index()\n {\n return $this->collection($this->repository->all());\n }", "title": "" }, { "docid": "c22119f1d6e05e764e700b1cf1e15c3a", "score": "0.64815545", "text": "public function index()\n {\n // Get articles\n $trackings = Tracking::paginate(10);\n\n // Return\n return BackendResource::collection($trackings);\n }", "title": "" }, { "docid": "90f607a4b7e80fdd2bcd6f3ce3d9959e", "score": "0.64777964", "text": "public function index()\n {\n $perPage = request('perPage', 10);\n $products = Product::paginate($perPage);\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "59002099eafa8643a05ba19fcbd9fedd", "score": "0.64777935", "text": "public function index()\n {\n //\n $items = Item::orderBy('id')->paginate(10);\n \n return view('manage.item.items_list', compact('items'));\n \n }", "title": "" }, { "docid": "c8bce961d8c00f94db1cc45bb581d8eb", "score": "0.647661", "text": "public function index()\n {\n $products = Product::all();\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "c1799a28a7e3f24be756df7e3d5ed18d", "score": "0.6475402", "text": "public function index()\n {\n $people = QueryBuilder::for(Person::class)\n ->defaultSort('created_at')\n ->allowedSorts([\n 'created_at'\n ])\n ->paginate(10)\n ->appends(request()->query());\n\n return PersonResource::collection($people);\n }", "title": "" }, { "docid": "974e723cf42c91c850116aa22b80f587", "score": "0.6473998", "text": "public function index()\n {\n //\n $parent_details = \\App\\ParentDetail::orderBy('id', 'desc')->paginate(10);\n return ParentDetailResource::collection($parent_details);\n }", "title": "" }, { "docid": "85336711eddcf6c317cce3da86408817", "score": "0.64698637", "text": "public function actionList()\n {\n $users = User::find()\n ->orderBy('id')\n ->all();\n if (count($users)) {\n $separator = sprintf(self::LIST_FORMAT_SEP.PHP_EOL, str_repeat('-', 10), str_repeat('-', 22), str_repeat('-', 9), str_repeat('-', 32), str_repeat('-', 42));\n echo $separator;\n printf(self::LIST_FORMAT_HEADER.PHP_EOL, 'id', 'username', 'status', 'fullname', 'email');\n echo $separator;\n foreach ($users as $user) {\n printf(self::LIST_FORMAT_LINE.PHP_EOL, $user->id, $user->username, $this->statusMap[$user->status], $user->fullname, $user->email);\n }\n echo $separator;\n }\n return Controller::EXIT_CODE_NORMAL;\n }", "title": "" }, { "docid": "b6d79dbbd4bd8f24a2ee993dec416fde", "score": "0.64695317", "text": "public function index() {\n\t\t\t$datas=DAO::getAll($this->model);\n\t\t\techo $this->_getResponseFormatter()->get($datas);\n\t}", "title": "" }, { "docid": "b9a94eb6086245c9e4f089dc9aede055", "score": "0.6468454", "text": "public function index(Request $request)\n {\n $this->authorize('listing', [$this->authorizedModel]);\n\n return response(\n $this->obj->getAll(\n ($request->has('limit') ? $request->input('limit') : 0),\n ($request->has('sort') ? $request->input('sort') : 'id'),\n ($request->has('order') ? $request->input('order') : 'desc'),\n ($request->has('offset') ? $request->input('offset') : 0)\n )\n );\n }", "title": "" }, { "docid": "f9d8426baa3f2a5993b5c1f018099562", "score": "0.6468059", "text": "public function resources_index()\n\t{\n\t\t$init = new admin_model();\n\t\t$resources = $init->getAllResources()->getResultArray();\n\n\t\t$menus = $init->getAllMenu()->getResultArray();\n\t\t$this->data = ['menus' => $menus, 'resources' => $resources];\n\t\treturn view('admin' . DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR . 'index', $this->data);\n\t}", "title": "" } ]
77b7707b3367c0fb5ee69e36502eeea2
Create a new notification instance.
[ { "docid": "e7c0659897a27da748ed6de154b514cd", "score": "0.0", "text": "public function __construct($from, $subject, $body)\n {\n $this->from = $from;\n $this->subject = $subject;\n $this->body = $body;\n }", "title": "" } ]
[ { "docid": "bbf1646fc53706f3de2904828a229732", "score": "0.7566344", "text": "private static function create_for_notification($notification, $params) {\n $params = self::sanitize_creation_params($params, [\n 'time_delay_amount',\n 'time_delay_unit',\n 'mute_time_amount',\n 'mute_time_unit',\n 'model',\n 'object_id',\n ]);\n\n try {\n $eventnotification = self::create_new([\n 'notification_id' => $notification->get('id'),\n 'model' => $params['model'],\n 'time_delay_amount' => $params['time_delay_amount'],\n 'time_delay_unit' => $params['time_delay_unit'],\n 'mute_time_amount' => $params['mute_time_amount'],\n 'mute_time_unit' => $params['mute_time_unit'],\n ]);\n\n // If there was an error during creation.\n } catch (\\Exception $e) {\n $notification->hard_delete();\n }\n\n return $eventnotification;\n }", "title": "" }, { "docid": "072338c8f302ef5c0e9c402bd6950c2a", "score": "0.74467635", "text": "function create(array $attributes)\n {\n\n $notification = new Notification();\n $notification->title = $attributes['title'];\n $notification->content = $attributes['content'];\n if ($notification->save()) {\n\n return $notification;\n }\n\n return null;\n }", "title": "" }, { "docid": "80894a93cca4b476c5d335cfcffbcbbe", "score": "0.7313234", "text": "public function createNotification(string $name, array $data = []): Notification;", "title": "" }, { "docid": "c1bd5d6c2b541ed8c97a900c672003ca", "score": "0.72958267", "text": "protected function maybe_create_notification() {\n\t\tif ( ! $this->notification_center->get_notification_by_id( self::NOTIFICATION_ID ) ) {\n\t\t\t$notification = $this->notification();\n\t\t\t$this->notification_helper->restore_notification( $notification );\n\t\t\t$this->notification_center->add_notification( $notification );\n\t\t}\n\t}", "title": "" }, { "docid": "824b3099552fde604cba8265e3a8f7e1", "score": "0.71496344", "text": "public function __construct(Notification $notification){\n $this->notification = $notification;\n }", "title": "" }, { "docid": "75b27263ba4a34e64338a747c4715ada", "score": "0.6982398", "text": "public function __construct(Notification $notification)\n {\n $this->notification = $notification;\n }", "title": "" }, { "docid": "1afa3193df470ee367e19398b8da81df", "score": "0.67215073", "text": "abstract public function newNotification($event);", "title": "" }, { "docid": "4891825ecb56117be3a841ff57ad34ee", "score": "0.6705774", "text": "public function __construct(Notifications $notification)\n {\n $this->notification = $notification;\n }", "title": "" }, { "docid": "93e0d88bc3b0342f81f7ef13c90e7359", "score": "0.66703856", "text": "public function createNotification()\n {\n //validations\n if ($this->notificationValidator()->fails()) {\n return redirect()->back()\n ->withErrors($this->notificationValidator())\n ->withInput();\n }\n\n $message = $this->request->input(\"message\");\n if (is_array($message)) {\n $message = implode(\" \", $message);\n }\n\n $insertArray = [\n \"message\" => $message,\n \"created_by\" => $this->request->session()->get('user_id'),\n \"status\" => \"active\"\n ];\n\n $this->notificationModel->setInsertDataWithDates($insertArray);\n $notificationId = $this->notificationModel->insertData();\n\n //send nofitifcations\n $this->getDeviceTokens($notificationId);\n return $notificationId;\n }", "title": "" }, { "docid": "0ac7608e53b64e76dad7005154eb99f8", "score": "0.66403615", "text": "protected function create_notifications() {\n\t\t$u1_mentionname = bp_activity_get_user_mentionname( $this->u1 );\n\t\t$this->a1 = $this->factory->activity->create( array(\n\t\t\t'user_id' => $this->u2,\n\t\t\t'component' => buddypress()->activity->id,\n\t\t\t'type' => 'activity_update',\n\t\t\t'content' => sprintf( 'Hello! @%s', $u1_mentionname ),\n\t\t) );\n\t\t$u2_mentionname = bp_activity_get_user_mentionname( $this->u2 );\n\t\t$this->a2 = $this->factory->activity->create( array(\n\t\t\t'user_id' => $this->u1,\n\t\t\t'component' => buddypress()->activity->id,\n\t\t\t'type' => 'activity_update',\n\t\t\t'content' => sprintf( 'Hello! @%s', $u2_mentionname ),\n\t\t) );\n\t}", "title": "" }, { "docid": "bba79f2f5085be0d4a9741d00d09bf35", "score": "0.6612633", "text": "public function run()\n {\n factory(Notification::class, 200)->create();\n }", "title": "" }, { "docid": "ea528988b96c2773994a6d295496ef7b", "score": "0.6593801", "text": "public function __construct($notification)\n {\n $this->notification = $notification;\n }", "title": "" }, { "docid": "b75055da7294ed481fd83421177ce77e", "score": "0.65553284", "text": "public function create()\n {\n return view('service.notification.create');\n }", "title": "" }, { "docid": "68ee46a2b5ab9649db05d95b5df2d0ef", "score": "0.6480527", "text": "public function create()\n {\n return view('backend.notifications.create');\n }", "title": "" }, { "docid": "65e2ec92f1518e2be5e7147331c563eb", "score": "0.64374626", "text": "public function create()\n {\n //\n return view('notifications.create');\n }", "title": "" }, { "docid": "bed828f0fe70f13b764e737886579e5a", "score": "0.6426283", "text": "protected function notification() {\n\t\t$presenter = new Auto_Update_Notification_Presenter();\n\n\t\treturn new Yoast_Notification(\n\t\t\t$presenter->present(),\n\t\t\t[\n\t\t\t\t'type' => Yoast_Notification::WARNING,\n\t\t\t\t'id' => self::NOTIFICATION_ID,\n\t\t\t\t'capabilities' => 'wpseo_manage_options',\n\t\t\t\t'priority' => 0.8,\n\t\t\t]\n\t\t);\n\t}", "title": "" }, { "docid": "26920da40a381aeec536e4b9d24f4005", "score": "0.64046514", "text": "public function create()\n {\n $message = request()->input('message', 'This is a test of the system wide notification system. This is only a test.');\n\n SystemWideNotification::dispatch($message);\n\n return $this->respondSuccess('It should have worked');\n }", "title": "" }, { "docid": "f027ea990212946b42397e2e39175c2c", "score": "0.64004904", "text": "public function actionCreate()\n {\n $model = new Notifications();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->notification_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "f0dfe2f550e2b9f5d9364818fa2276d3", "score": "0.63887155", "text": "public function actionCreate()\n {\n $model = new Notification();\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 }", "title": "" }, { "docid": "2f02c92855bfc648b7b3b3bcf6249071", "score": "0.6367108", "text": "public function __construct($data)\n {\n $this->my_notification = $data;\n }", "title": "" }, { "docid": "9a7affbb6b79ffbaaf117fcf01d8ee1b", "score": "0.6359198", "text": "public static function paymentNotification()\n {\n $env = self::getEnv();\n $credentials = self::getCredentials();\n \n return new PaymentNotification($credentials, $env);\n }", "title": "" }, { "docid": "37ffbf9fff7e42d95f840bc08fdaf9e2", "score": "0.63403475", "text": "public function create()\n {\n return view('admin.push_notification.create');\n }", "title": "" }, { "docid": "8d2bff9ae34e15ba489b34a49c0ba727", "score": "0.6308596", "text": "public function create($data_id, $created_by, $created_at)\n {\n $model = new Notification();\n $model->data_id = $data_id;\n $model->created_by = $created_by;\n $model->modified_by = $created_by;\n $model->recipients = \"\";\n $model->save();\n return $model->id;\n }", "title": "" }, { "docid": "c4afdf55cf7dfcf8682a953d98bd081d", "score": "0.627313", "text": "public function create()\n\t{\n\t\treturn View::make('notification/create');\t\n\t}", "title": "" }, { "docid": "1e3810e427e33bbb95375219c959dfcc", "score": "0.62561643", "text": "public function create()\n {\n // No needed : no messages created manualy\n }", "title": "" }, { "docid": "183c7dff11219a336069310f7805a2e4", "score": "0.6194389", "text": "public function getNotification();", "title": "" }, { "docid": "7c936913020842287af977725f7c8c63", "score": "0.6166306", "text": "public function testCreateNotificationType()\n {\n }", "title": "" }, { "docid": "2de12d6ca125f7bd3054c9112464bfd2", "score": "0.61558646", "text": "public function __construct($notifications)\n {\n $this->notifications = $notifications;\n }", "title": "" }, { "docid": "b3ed0df8fed7a3776c48537cac52a617", "score": "0.613814", "text": "public function notification(): void\n {\n try {\n // Get the requestParameters\n $requestParameters = request()->all();\n\n // Check if we have a notificationType\n if (isset($requestParameters['notificationType'])) {\n //Create the corresponding event\n switch ($requestParameters['notificationType']) {\n case BaseNotification::NOTIFICATION_TYPE_PAYMENT:\n // Create the payment event\n $paymentNotification = new PaymentNotification($requestParameters);\n event(new TikkiePaymentEvent($paymentNotification));\n break;\n case BaseNotification::NOTIFICATION_TYPE_REFUND:\n // Create the refund event\n $refundNotification = new RefundNotification($requestParameters);\n event(new TikkieRefundEvent($refundNotification));\n break;\n }\n }\n } catch (Exception $e) {\n }\n }", "title": "" }, { "docid": "74f81ea3e1712a7d8b1c88fa38ef3703", "score": "0.6123435", "text": "static function createNotificationObject($notification_row) {\n\t\tswitch ($notification_row['ref']) {\n\t\t\tcase 'user_link':\n\t\t\t\treturn new UserLinkNotification($notification_row);\n\t\t\tcase 'practice':\n\t\t\t\treturn new PracticeNotification($notification_row);\n\t\t\tcase 'practice_comment':\n\t\t\t\treturn new PracticeCommentNotification($notification_row);\n\t\t\tcase 'lesson_comment':\n\t\t\t\treturn new LessonCommentNotification($notification_row);\n\t\t\tcase 'annotation':\n\t\t\t\treturn new AnnotationNotification($notification_row);\n\t\t\tcase 'user_blocked':\n\t\t\t\treturn new UserBlockedNotification($notification_row);\n\t\t\tcase 'user_unblocked':\n\t\t\t\treturn new UserUnblockedNotification($notification_row);\n case 'user_deleted':\n\t\t\t\treturn new UserDeletedNotification($notification_row);\n\t\t\tdefault:\n\t\t\t\ttrigger_error('Unknown ref: '.$notification_row['ref'], E_USER_ERROR);\n\t\t}\n\t}", "title": "" }, { "docid": "1fc35be63b8bc0248bf2c1f34b1768f7", "score": "0.6069095", "text": "public function run()\n {\n factory(NotificationChannel::class, 200)->create();\n }", "title": "" }, { "docid": "eba64e336cd926f105e5a55eba73bfd0", "score": "0.6045002", "text": "public function store($data)\n {\n Notification::Create($data);\n }", "title": "" }, { "docid": "1e2400abad68fa0710b1c7d7665331ff", "score": "0.6034942", "text": "public function createPushNotificationHandler()\n {\n $url = sprintf('ssl://%s:%s',\n $this->sandbox ? self::NOTIFICATION_SANDBOX_HOST : self::NOTIFICATION_PRODUCTION_HOST,\n self::NOTIFICATION_PORT\n );\n\n $nh = new NotificationHandler();\n $nh->setConnection($this->getConnection($url));\n\n return $nh;\n }", "title": "" }, { "docid": "a3257e39d7ecae545e42c40fe22d9ed9", "score": "0.59910023", "text": "public function __construct($notify)\n {\n $this->notify = $notify;\n }", "title": "" }, { "docid": "d268df82d72a5826cfd0b1907c919493", "score": "0.59550637", "text": "public function notificationsOnCreate(NotificationBuilder $builder)\n {\n $notification = new Notification();\n $notification\n ->setTitle('Nouvelle Promotion')\n ->setDescription(' A été effectué')\n ->setRoute('#')\n // ->setParameters(array('id' => $this->userToClaim))\n ;\n //$notification->setIcon($this->getUserr()->getUsername());\n // $notification->setUser1($this->getUser()->getUsername());\n // $notification->setUser2($this->getUserToClaim());\n $builder->addNotification($notification);\n\n return $builder;\n }", "title": "" }, { "docid": "4aa2a956ae8d4e59a510603fbcf2144a", "score": "0.59498477", "text": "function createTrivialNotification($userId, $notificationType = NOTIFICATION_TYPE_SUCCESS, $params = null) {\n\t\t$notificationDao =& DAORegistry::getDAO('NotificationDAO');\n\t\t$notification = $notificationDao->newDataObject();\n\t\t$notification->setUserId($userId);\n\t\t$notification->setContextId(CONTEXT_ID_NONE);\n\t\t$notification->setType($notificationType);\n\t\t$notification->setLevel(NOTIFICATION_LEVEL_TRIVIAL);\n\n\t\t$notificationId = $notificationDao->insertObject($notification);\n\n\t\tif ($params) {\n\t\t\t$notificationSettingsDao =& DAORegistry::getDAO('NotificationSettingsDAO');\n\t\t\tforeach($params as $name => $value) {\n\t\t\t\t$notificationSettingsDao->updateNotificationSetting($notificationId, $name, $value);\n\t\t\t}\n\t\t}\n\n\t\treturn $notification;\n\t}", "title": "" }, { "docid": "2f48d614ed2b1c4ef24c21adb6100623", "score": "0.5935584", "text": "function create_template() {\n $template_name = $this->get_type('template', 'default');\n $class = notifications_info('message templates', $template_name, 'class', 'Notifications_Template');\n return new $class($this);\n }", "title": "" }, { "docid": "3985bafb655a9c2a5498acecb78aeed3", "score": "0.5919577", "text": "public function create(array $notificationData)\n {\n $notificationData = array_merge($notificationData, [\n 'app_id' => $this->appIDKey,\n ]);\n $notificationData = $this->validateNotificationData(\n $notificationData,\n $this->getNotificationDataRules()\n );\n\n return $this->oneSignal->execute('notifications', 'POST', array_merge([\n 'headers' => [\n 'Content-Type' => 'application/json',\n ],\n 'json' => $notificationData,\n ], $this->extraOptions));\n }", "title": "" }, { "docid": "d735e47d06590b400fe8aefe33b8880a", "score": "0.58933234", "text": "public function Create() {\n try {\n\n $json = json_decode(RequestUtil::GetBody());\n\n if (!$json) {\n throw new Exception('The request body does not contain valid JSON');\n }\n\n $provisioningnotifications = new Provisioningnotifications($this->Phreezer);\n\n // TODO: any fields that should not be inserted by the user should be commented out\n\n $provisioningnotifications->Notifid = $this->SafeGetVal($json, 'notifid');\n $provisioningnotifications->Hostname = $this->SafeGetVal($json, 'hostname');\n $provisioningnotifications->Installationip = $this->SafeGetVal($json, 'installationip');\n $provisioningnotifications->Configuredip = $this->SafeGetVal($json, 'configuredip');\n $provisioningnotifications->Startdate = date('Y-m-d H:i:s');\n //$provisioningnotifications->Startdate = date('Y-m-d H:i:s',strtotime($this->SafeGetVal($json, 'startdate')));\n $provisioningnotifications->Status = $this->SafeGetVal($json, 'status');\n $provisioningnotifications->Progress = $this->SafeGetVal($json, 'progress');\n $provisioningnotifications->Image = $this->SafeGetVal($json, 'image');\n $provisioningnotifications->Firmware = $this->SafeGetVal($json, 'firmware');\n $provisioningnotifications->Ram = $this->SafeGetVal($json, 'ram');\n $provisioningnotifications->Cpu = $this->SafeGetVal($json, 'cpu');\n $provisioningnotifications->Diskscount = $this->SafeGetVal($json, 'diskscount');\n $provisioningnotifications->Netintcount = $this->SafeGetVal($json, 'netintcount');\n $provisioningnotifications->Model = $this->SafeGetVal($json, 'model');\n $provisioningnotifications->Serial = $this->SafeGetVal($json, 'serial');\n $provisioningnotifications->Os = $this->SafeGetVal($json, 'os');\n //$provisioningnotifications->Update = date('Y-m-d H:i:s',strtotime($this->SafeGetVal($json, 'update')));\n $provisioningnotifications->Update = date('Y-m-d H:i:s');\n\n $provisioningnotifications->Validate();\n $errors = $provisioningnotifications->GetValidationErrors();\n\n if (count($errors) > 0) {\n $this->RenderErrorJSON('Please check the form for errors', $errors);\n } else {\n // since the primary key is not auto-increment we must force the insert here\n if ($provisioningnotifications->Progress != 0) {\n $provisioningnotifications->Save(True);\n }\n // $provisioningnotifications->Save(true);\n $this->RenderJSON($provisioningnotifications, $this->JSONPCallback(), true, $this->SimpleObjectParams());\n }\n } catch (Exception $ex) {\n $this->RenderExceptionJSON($ex);\n }\n }", "title": "" }, { "docid": "da702a867a4a29382aaa73f6c6f615ac", "score": "0.5866283", "text": "public function testCreateNotificationRule()\r\n {\r\n }", "title": "" }, { "docid": "12971e39125096f43b32931cd0c9fd28", "score": "0.58369845", "text": "public function create() {\n\t\t// Not needed currently\n\t}", "title": "" }, { "docid": "2961c52803b0cd3dbfcc9586d8e6deb8", "score": "0.58275867", "text": "public function manage_notification() {\n\t\tif ( $this->has_notification() || ! $this->requires_notification() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->add_notification( $this->get_notification() );\n\t}", "title": "" }, { "docid": "2499d6ffe35072e957f901855967574d", "score": "0.5813685", "text": "public function __construct($notification) {\n\n\n $this -> notification = $notification;\n\n $this -> notification['link_url'] = '';\n $this -> notification['link_text'] = '';\n if(isset($notification['show_link']) && $notification['show_link'] == 'no') {\n $this -> notification['show_link'] = 'no';\n } else {\n $this -> notification['show_link'] = 'yes';\n }\n\n\n\n if($notification['notify_by_database'] == 'yes') {\n $this -> notify_by[] = 'database';\n }\n if($notification['notify_by_email'] == 'yes') {\n $this -> notify_by[] = 'mail';\n }\n if($notification['notify_by_text'] == 'yes') {\n $this -> notify_by[] = 'nexmo';\n }\n\n\n // %%%%%% Commission %%%%%% //\n if($notification['type'] == 'commission') {\n\n $this -> notification['link_url'] = '/agents/doc_management/transactions/transaction_details/'.$notification['sub_type_id'].'/'.$notification['sub_type'].'?tab=commission';\n $this -> notification['link_text'] = 'View Commission';\n\n // %%%%%% Release %%%%%% //\n } else if($notification['type'] == 'release') {\n\n $this -> notification['link_url'] = '/doc_management/document_review/'.$notification['sub_type_id'];\n $this -> notification['link_text'] = 'View Release';\n\n // %%%%%% Earnest %%%%%% //\n } else if($notification['type'] == 'earnest' || $notification['type'] == 'using_heritage_title') {\n\n $this -> notification['link_url'] = '/agents/doc_management/transactions/transaction_details/'.$notification['sub_type_id'].'/'.$notification['sub_type'];\n $this -> notification['link_text'] = 'View Contract';\n\n }\n\n // %%%%%% Agents %%%%%% //\n // Commission Ready\n else if($notification['type'] == 'commission_ready') {\n\n $this -> notification['link_url'] = '/agents/doc_management/transactions/transaction_details/'.$notification['sub_type_id'].'/'.$notification['sub_type'].'?tab=commission';\n $this -> notification['link_text'] = 'View Commission';\n\n // Bounced Earnest\n } else if($notification['type'] == 'bounced_earnest') {\n\n $this -> notification['link_url'] = '/agents/doc_management/transactions/transaction_details/'.$notification['sub_type_id'].'/'.$notification['sub_type'];\n $this -> notification['link_text'] = 'View Contract';\n\n // %%%%%% Tasks, Reminders, Calendar Events %%%%%% //\n // Tasks\n } else if($notification['type'] == 'task_due') {\n\n $this -> notification['link_url'] = '/agents/doc_management/transactions/transaction_details/'.$notification['sub_type_id'].'/'.$notification['sub_type'];\n $this -> notification['link_text'] = 'View Transaction';\n\n // Calendar Events\n } else if($notification['type'] == 'calendar_event') {\n\n $this -> notification['link_url'] = '';\n $this -> notification['link_text'] = '';\n\n // %%%%%% System Admin %%%%%% //\n } else if($notification['type'] == 'admin') {\n\n if($notification['sub_type'] == 'failed_job') {\n\n $this -> notification['link_url'] = '';\n $this -> notification['link_text'] = 'Failed Queued Job!!';\n\n } else if($notification['sub_type'] == 'bug_report') {\n\n $this -> notification['link_url'] = '/bug_reports/view_bug_report/'.$notification['sub_type_id'];\n $this -> notification['link_text'] = 'View Bug Report';\n\n }\n\n }\n\n }", "title": "" }, { "docid": "097cce46fe9f20e63336e1deff4dcb90", "score": "0.5810046", "text": "public function create() { }", "title": "" }, { "docid": "f08b4eeed180abcce07804c845ce48c6", "score": "0.5809837", "text": "public function create() {\n\t\t\t//\n\t\t}", "title": "" }, { "docid": "2db2562b1fd9f267d65aba90b7d016bd", "score": "0.5800199", "text": "public function create()\n {\n $title = trans('notification.new');\n return view('layouts.create', compact('title'));\n }", "title": "" }, { "docid": "ecbb99afcad292f7d778c36fffda6276", "score": "0.57951486", "text": "public function create()\n {\n // NON USED SINCE ITS FOR API\n }", "title": "" }, { "docid": "8c7d4bd4c2b9c9f5f83616b9a6fa5313", "score": "0.5786469", "text": "public function create() {\n \n //\n \n }", "title": "" }, { "docid": "afabb663a2c762db4fdef5b8ec98a448", "score": "0.5773315", "text": "public function __construct(Notification $notification, Delegate $delegate\n ) {\n //\n $this->delegate = $delegate;\n $this->notification = $notification;\n }", "title": "" }, { "docid": "911047fe39d025c21f93040f07ff5451", "score": "0.57708937", "text": "public function __construct(NotificationRepository $notificationRepository)\n {\n $this->notificationRepository = $notificationRepository;\n }", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.5761696", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.5761696", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.5761696", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.5761696", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.5761696", "text": "public function create(){}", "title": "" }, { "docid": "827e2feb3a84d86bcca77b2c2109c381", "score": "0.57545596", "text": "public function __construct(NotificationRepository $notifications)\n {\n $this->notifications = $notifications;\n }", "title": "" }, { "docid": "a86c1de2c164071b0d8d8b0190fd1556", "score": "0.5749598", "text": "public function create()\n {\n return view('shop.admin.notify.notifyAdd');\n }", "title": "" }, { "docid": "c395c4a4dad5d8e0b1b992d48959b294", "score": "0.57375664", "text": "public function create_tb_notif()\n {\n $this->db->query(\"CREATE TABLE `{$this->db->dbprefix}notif` (\n `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,\n `user_id` int(5) NOT NULL,\n `icon` varchar(255) NOT NULL,\n `bg` varchar(50) NOT NULL,\n `title` varchar(255) NOT NULL,\n `notif` text NOT NULL,\n `showed` int(11) NOT NULL,\n `time` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),\n PRIMARY KEY (`id`)\n ) ENGINE=InnoDB DEFAULT CHARSET=latin1;\");\n }", "title": "" }, { "docid": "4c9241fa98d1f300f5c692c5b205b1a5", "score": "0.57332444", "text": "public static function create(): self {\n\t\treturn new static(\n\t\t\tnew NotificationChecks(),\n\t\t\tnew BlogMetaLoader(),\n\t\t\tnew Mailer()\n\t\t);\n\t}", "title": "" }, { "docid": "1811995741ac4a40e6f22ea6322cea93", "score": "0.5716772", "text": "public function store(Request $request)\n {\n $rules = [\n 'task_id' => 'required|exists:tasks,id',\n 'message' => 'required'\n ];\n\n $this->validate($request, $rules);\n\n $data = $request->all();\n\n $notification = Notification::create($data);\n\n return $this->showOne($notification, 201);\n }", "title": "" }, { "docid": "bf094a6d2974724a19bfd38d316a8cc6", "score": "0.56943524", "text": "public static function preApprovalNotification()\n {\n $env = self::getEnv();\n $credentials = self::getCredentials();\n \n return new PreApprovalNotification($credentials, $env);\n }", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5680636", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5680636", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5680636", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5680636", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5680636", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5680636", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5680636", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5680636", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5680636", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5680636", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5680636", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5680636", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5680636", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5680636", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5680636", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5680636", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5680636", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "f3eddf1c2fa0475d25cf2ca0245758c2", "score": "0.5679482", "text": "public function store(CreateNotificationRequest $request)\n {\n\n $adate = date($request->startdate);\n $result = date(\"Y-m-d\", strtotime(\"+1 year, -3 days\", strtotime($adate)));\n\n Notification::create([\n 'user_id' => auth()->user()->id,\n 'post1s_id' => $request->post1,\n 'nonti_data' => $request->nonti_data,\n 'startdate' => $request->startdate,\n 'deadline' => $result,\n\n ]);\n Session()->flash('success', 'บันทึกข้อมูลเรียบร้อยแล้ว');\n return redirect(route('notifications.index'));\n }", "title": "" }, { "docid": "99e0dffbe2d648120747873855b0b5ab", "score": "0.5671286", "text": "public function create()\n\t{\n\t\t// TODO\n\t}", "title": "" }, { "docid": "53b3b185c6555ab9aee26431f76eb7b7", "score": "0.5668", "text": "public function create()\n {\n }", "title": "" }, { "docid": "195a918dcce56a2ae73a21a05f996bac", "score": "0.5666835", "text": "public function create()\n {\n //\n }", "title": "" }, { "docid": "e498c1dfd291b1e26942278d34a9a3ba", "score": "0.56626606", "text": "public function create() {\n \n }", "title": "" }, { "docid": "e498c1dfd291b1e26942278d34a9a3ba", "score": "0.56626606", "text": "public function create() {\n \n }", "title": "" }, { "docid": "e498c1dfd291b1e26942278d34a9a3ba", "score": "0.56626606", "text": "public function create() {\n \n }", "title": "" }, { "docid": "e498c1dfd291b1e26942278d34a9a3ba", "score": "0.56626606", "text": "public function create() {\n \n }", "title": "" }, { "docid": "e498c1dfd291b1e26942278d34a9a3ba", "score": "0.56626606", "text": "public function create() {\n \n }", "title": "" }, { "docid": "e498c1dfd291b1e26942278d34a9a3ba", "score": "0.56626606", "text": "public function create() {\n \n }", "title": "" }, { "docid": "e498c1dfd291b1e26942278d34a9a3ba", "score": "0.56626606", "text": "public function create() {\n \n }", "title": "" }, { "docid": "e498c1dfd291b1e26942278d34a9a3ba", "score": "0.56626606", "text": "public function create() {\n \n }", "title": "" }, { "docid": "e498c1dfd291b1e26942278d34a9a3ba", "score": "0.56626606", "text": "public function create() {\n \n }", "title": "" }, { "docid": "ad8f1b2d245770251dc937149d360119", "score": "0.56623966", "text": "public static function init() {\n static $instance = false;\n\n if ( ! $instance ) {\n $instance = new BBP_AB_Notification();\n }\n\n return $instance;\n }", "title": "" }, { "docid": "c2637db62560a8b3fe32c814fc671d15", "score": "0.5655843", "text": "public function create()\n {\n $categories = NotificationCat::all();\n return view('admin.pages.notifications.create', compact('categories'));\n }", "title": "" }, { "docid": "1bcd4dff2c5a4d1764329a3a1f12ec4a", "score": "0.56548184", "text": "public function create()\n\t {\n\t //\n\t }", "title": "" }, { "docid": "a7af95812586e8fe7f606fe4fb7e9d78", "score": "0.56338906", "text": "public function create() {\n }", "title": "" }, { "docid": "a7af95812586e8fe7f606fe4fb7e9d78", "score": "0.56338906", "text": "public function create() {\n }", "title": "" }, { "docid": "a7af95812586e8fe7f606fe4fb7e9d78", "score": "0.56338906", "text": "public function create() {\n }", "title": "" }, { "docid": "cbda69a95bb881bfbf010e87de5d6044", "score": "0.5629139", "text": "public function create()\n\t\t{\n\t\t\t//\n\t\t}", "title": "" }, { "docid": "cbda69a95bb881bfbf010e87de5d6044", "score": "0.5629139", "text": "public function create()\n\t\t{\n\t\t\t//\n\t\t}", "title": "" }, { "docid": "de4c02ad2cbf112150f8e2c7febe7c2e", "score": "0.56286955", "text": "public function __construct( NotificationRepository $notificationRepository )\n {\n $this->notificationRepository = $notificationRepository;\n }", "title": "" }, { "docid": "f81d93024dcfe7815aedcbd3b8820259", "score": "0.56285805", "text": "public function create_violator_notification(array $data) {\n\t\t$ret = $this->db->insert($this->_table_violator_notifications, $data);\n\n\t\treturn $ret ? $this->db->insert_id() : FALSE;\n\t}", "title": "" } ]
5e061601995c10c16edc95b62f027028
This will prevent redirection in the secondary language for the custom rule: '^products/([AZaz09]+)/?' => 'index.php?pagename=newsample&type=$matches[1]'
[ { "docid": "61018e5ef8a32991a48d95840955e6d7", "score": "0.0", "text": "function wpmlcore_4704_block_redirect( $redirect, $post_id, $q ) {\n\t// Decide on which condition we should prevent the redirection\n\tif ( isset( $q->query_vars['pagename'] ) && 'sample-page' === $q->query_vars['pagename'] ) {\n\treturn false;\n\t}\n\t \n\treturn $redirect;\n\t}", "title": "" } ]
[ { "docid": "72aa6e80aa0263dd6efe11907bda257b", "score": "0.5552347", "text": "public function noRouteAction($coreRoute = null) {\n\n // check if suffix redirection is enabled in System -> Configuration -> Advanced\n if (Mage::getStoreConfig('tegdesign_redirects/suffix_redirect/enabled')) {\n\n // grab the url suffix from system -> config\n $product_url_suffix = Mage::getStoreConfig('catalog/seo/product_url_suffix');\n $category_url_suffix = Mage::getStoreConfig('catalog/seo/category_url_suffix');\n\n $request = $_SERVER['REQUEST_URI'];\n $params = $_SERVER['QUERY_STRING'];\n\n // strip any params from request\n if (strpos($request, '?') !== FALSE) {\n $request = substr($request, 0, strpos($request, '?'));\n }\n\n /**\n * This makes sure that no part of the request is included\n * in the base url. This should help\n * the system work if it is running from a sub folder\n */\n $parts = explode('/', Mage::getBaseUrl());\n foreach ($parts AS $part) {\n $request = str_replace(array($part, '//'), '', $request);\n }\n\n \t\t/*\n * Combine the request with the base path to get the full url\n * and remove any trailing slashes\n */\n $path = trim(str_replace('http:/', 'http://', str_replace('//', '/', Mage::getBaseUrl() . $request)), '/');\n $cleanedPath = explode('/', $path);\n $key = array_pop($cleanedPath);\n\n // remove trailing slash\n $request = rtrim($request, \"/\");\n\n /*\n * Determine if the URL entered is a product\n * by forming a LIKE query against the product collection\n */\n $collection = Mage::getModel('catalog/product')->getCollection();\n $collection->addAttributeToSelect('url_key');\n $collection->addFieldToFilter(array(\n array('attribute' => 'url_key', 'like' => \"$key\")));\n $products = $collection->load();\n \n /*\n * Proceed if there is only 1 result, if there are more\n * we don't know which one is correct\n */\n if (count($products) == 1) {\n\n \t// append the suffix\n \t$request = $request . '.' . $product_url_suffix;\n if ($_SERVER['QUERY_STRING'] !== '') {\n $request = $request . '?' . $params;\n }\n\n \theader('HTTP/1.1 301 Moved Permanently');\n header('Location: ' . $request);\n die();\n\n } else {\n /*\n * Determine if the URL entered is a category\n * by forming a LIKE query against the category collection\n */\n $collection = Mage::getModel('catalog/category')->getCollection();\n $collection->addAttributeToSelect('url_key');\n $collection->addFieldToFilter(array(\n array('attribute' => 'url_key', 'like' => \"$key\")));\n $categorys = $collection->load();\n\n if (count($categorys) == 1) {\n\n // append the suffix\n $request = $request . '.' . $category_url_suffix;\n if ($_SERVER['QUERY_STRING'] !== '') {\n $request = $request . '?' . $params;\n }\n\n header('HTTP/1.1 301 Moved Permanently');\n header('Location: ' . $request);\n die();\n\n }\n\n }\n\n } // end if enabled\n\n // could not find a suitable url carry out the 404 redirect\n parent::noRouteAction($coreRoute);\n }", "title": "" }, { "docid": "08361ebe02020fe79ffab2ff712df53e", "score": "0.5484734", "text": "function filter_cariier_url(){\n\t\t$type=$_SESSION['login_type'];\n\t\tif($this->params['plugin']=='order'&&$this->params['controller']=='order_contracts'&&$this->params['action']=='buy')\n\t\t{$this->_empty_redirect($type);}\n\t\tif($this->params['plugin']=='order'&&$this->params['controller']=='order_contracts'&&$this->params['action']=='sell')\n\t\t{$this->_empty_redirect($type);}\n\t\t\tif($this->params['plugin']=='order'&&$this->params['controller']=='order_manages'&&$this->params['action']=='sell')\n\t\t{$this->_empty_redirect($type);}\n\t\t\n\t\tif($this->params['plugin']=='order'&&$this->params['controller']=='order_places')\n\t\t{$this->_empty_redirect($type);}\n\t}", "title": "" }, { "docid": "882f51a68e4691303ea8af2aa3f63588", "score": "0.5477955", "text": "function cltvo_rewrite_rules() {\n\tadd_rewrite_rule('products/([^/]+)/([^/]+)/?$', 'index.php?Cltvo_Product_Taxonomy=$matches[1]&cltvo_product=$matches[2]', 'top');\n\tadd_rewrite_rule('products/([^/]+)/?$', 'index.php?Cltvo_Product_Taxonomy=$matches[1]', 'top');\n\t\n\tadd_rewrite_rule('journal/archive/([^/]+)/?$', 'index.php?post_type=post&category_name=$matches[1]', 'top');\n\tadd_rewrite_rule('journal/archive/([^/]+)/([^/]+)/?$', 'index.php?post_type=post&category_name=$matches[1]&name=$matches[2]', 'top');\n}", "title": "" }, { "docid": "a36b2dac45daf0ba569b3d644bb7db95", "score": "0.5416475", "text": "private function redirectUrlMultiLang(){\n if($this->Request->getParam(3)) return false;\n \n \n $param = array();\n $param[0] = $this->_language;\n $param[1] = $this->_controller;\n $param[2] = $this->_action;\n \n if($this->_action == DEFAULT_ACTION){\n unset($param[2]);\n if($this->_controller == DEFAULT_CONTROLLER){\n unset($param[1]);\n } \n }\n \n if(!in_array($this->_language,unserialize(LANGUAGES))){\n // als de de taal niet bestaat, redirect dan met een 301 naar de default language\n $this->Request->setLanguage(DEFAULT_LANGUAGE);\n Uri::redirect(array('controller' => 'index'),301);\n $param[0] = DEFAULT_LANGUAGE;\n }\n \n $this->createUrlAndRedirect($param);\n }", "title": "" }, { "docid": "f904a7302ea75b86c987c79b01d5c825", "score": "0.53527963", "text": "private function redirectUrlSingleLang(){\n if($this->Request->getParam(2)) return false;\n\n $param = array();\n $param[0] = $this->_controller;\n $param[1] = $this->_action;\n \n if($this->_action == DEFAULT_ACTION){\n unset($param[1]);\n if($this->_controller == DEFAULT_CONTROLLER){\n unset($param[0]);\n } \n }\n \n $this->createUrlAndRedirect($param); \n\t}", "title": "" }, { "docid": "37436bcc3eacafc6f0ec561842131794", "score": "0.5312595", "text": "function ChangeUrlForPages($type)\n{\n\n if (empty($type)) {\n return;\n }\n if (get_locale() == 'en_US') {\n $locale = true;\n } else {\n $locale = false;\n }\n\n if ($type == 'news') {\n\n $addpath = $locale ? '/en/archive-news/page/2/' : '/arhiv-novostej/page/2/';\n\n } else if ($type == 'booking') {\n\n $addpath = $locale ? '/en/booking-2/' : '/booking/';\n\n } else if ($type == 'atmosfera') {\n\n $addpath = $locale ? '/en/atmosphere' : '/atmosfera';\n\n } else if ($type == 'privacy-policy') {\n\n $addpath = $locale ? '/en/privacy-policy-2' : '/privacy-policy';\n\n }\n\n return $addpath;\n}", "title": "" }, { "docid": "e37378801efd20775bc2218c4bab048b", "score": "0.52072936", "text": "public function handleUntranslatedStringOnPage() {\n $this->pages['untranslatedStringOnPage'] = TRUE;\n }", "title": "" }, { "docid": "af58d810624d3501ccd5c6fd02336e17", "score": "0.51903236", "text": "public static function redirect404custom() {\n $custom_404_routes = \\Models\\Registry::get('custom_404_routes');\n\n if (!empty($custom_404_routes)) {\n $url = isset($_SERVER['REQUEST_URI'])?strtolower($_SERVER['REQUEST_URI']):'';\n\n if (!empty($url)) {\n $url = trim(self::removeLanguageFromURL($url), '/');\n\n foreach ($custom_404_routes as $route => $urls) {\n $custom_route = strtolower(trim($route, '/'));\n\n if (!empty($urls)) {\n foreach ($urls as $needle_url) {\n $needle_url = strtolower(trim($needle_url, '/'));\n if ($needle_url === $url) {\n error_log(\"REDIR404CUSTOM:\".$url);\n self::redirect($custom_route);\n break;\n }\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "d796b78f16c90f2a0b8cd94fe2d725f0", "score": "0.5181762", "text": "protected function urlRewrites($costume_id,$type){\n if($type==\"update\"){\n $cond=array('type'=>'product',\n 'url_offset'=>$costume_id);\n Site_model::delete_single('url_rewrites',$cond);\n }\n $data=$this->getUrlCategoryInfo($costume_id);\n if(!$data){\n return true;\n }else{\n $costume_name=$this->getCostumeInfo($costume_id);\n $costume_count = $this->getCostumeCount($costume_name);\n if($costume_count>1){\n $costume_count++;\n }\n if(!$costume_name){\n return true;\n }\n }\n if($data[0]->parent_id!=\"0\"){\n $main_cat=$this->specialCharectorsRemove($data[0]->parent_cat_name);\n $sub_cat=$this->specialCharectorsRemove($data[0]->sub_cat_name);\n $name=$this->specialCharectorsRemove($costume_name);\n $url_key='/'.$main_cat.'/'.$sub_cat.'/'.$name.$costume_count;\n }else{\n $main_cat=$this->specialCharectorsRemove($data[0]->name);\n $name=$this->specialCharectorsRemove($costume_name);\n $url_key='/'.$main_cat.'/'.$name.$costume_count;\n }\n $data=array('type'=>'product',\n 'url_offset'=>$costume_id,\n 'url_key'=> $url_key);\n Site_model::insert_data('url_rewrites',$data);\n return true;\n }", "title": "" }, { "docid": "18c7e4789a3aff0c333a7a303e5da343", "score": "0.51384073", "text": "function action_emballe_medias_changer_url_type_dist()\n{\n\t$type = _request('em_changer_type');\n\tif($type == 'normal')\n\t\t$type = '';\n\t$redirect = rawurldecode(_request('redirect'));\n\n\t$redirect = parametre_url($redirect,'em_type',$type,'&');\n\tredirige_par_entete($redirect, true);\n}", "title": "" }, { "docid": "73749e91456eee6e29530d35448f08d0", "score": "0.5117125", "text": "function TechNews_tmpl_purchase_theme(){\n\twp_redirect( 'http://templatic.com/wordpress-themes-store/' ); \n\texit;\n}", "title": "" }, { "docid": "b04cbe0b188702cddb108cc6cea37261", "score": "0.508436", "text": "public function maybe_redirect_to_default() {\n // Abort if we don't have a URL to redirect to\n if ( ! isset( $this->plugin_options['wpe_redirect_url'] ) || empty( $this->plugin_options['wpe_redirect_url'] ) ) {\n return false;\n }\n\n if ( preg_match( $this->url_pattern, $this->plugin_options['wpe_redirect_url'] ) ) {\n wp_redirect( $this->plugin_options['wpe_redirect_url'] );\n exit;\n }\n }", "title": "" }, { "docid": "59065ac766969b8aa56890ada133121b", "score": "0.5073189", "text": "function whitelist($type)\n{\n\t$reg = Registry::instance();\n\n\tswitch ($type)\n\t{\n\n\tcase 'backend_pages' :\n\t\t$return = array('ajax', 'all_id3_info', 'authors1', 'authors2', 'cats', 'comments', 'credits', 'find', 'game', 'id3','images', 'info', 'javaload', 'login', 'players', 'postings', 'record1', 'record2', 'settings', 'spam', 'stats', 'updateUploadFolder', 'autocomplete', 'ping', 'playlist', 'plugins', 'testFTP', 'autosave', 'utilities', 'imagelist', 'addfiles');\n\tbreak;\n\n\tcase 'backend_languages' :\n\t\t$lang_files = get_dir_contents('lang');\n\t\tforeach ($lang_files as $file)\n\t\t{\n\t\t\t$bits = explode('.', $file);\n\t\t\tif (!isset($bits[1]) || $bits[1] != 'php') continue;\n\t\t\t$langs[] = $bits[0];\n\t\t}\n\t\treturn $langs;\n\t\tbreak;\n\n\tcase 'date' :\n\t\t$return = \"/^[0-9]{4}\\-[0-9]{2}(\\-[0-9]{2})?$/\";\n\t\tbreak;\n\n\tcase 'cats' :\n\t\t$return = $reg->getCategoryNames();\n\n\t\t$return = array_values($return); // index array numerically, not by category id\n\n\t\t//we may have stripped spaces from the category name,\n\t\t//so we add space-removed versions of relevant cat names to the array\n\t\tforeach ($return as $cat)\n\t\t{\n\t\t\tif (strpos($cat, ' '))\n\t\t\t{\n\t\t\t\t$return[] = str_replace(' ','',$cat);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\n\tcase 'tags' :\n\t\t$tag = TagManager::instance();\n\n\t\t$return = $tag->getAllTagsList();\n\t\tbreak;\n\n\tcase 'themes' :\n\t\t$return = get_dir_contents('podhawk/custom/themes');\n\t\tbreak;\n\n\tcase 'atp' :\n\t\t$return = \"/^[a-z0-9_]+$/\";\n\t\tbreak;\n\n\tcase 'bool' :\n\t\t$return = array ('1', '0');\n\t\tbreak;\n\n\tcase 'email' :\n\t\t$return = \"/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$/i\";\n\t\tbreak;\n\n\tcase 'web' :\n\t\t$return = \"/^[0-9a-z.:\\/_+-]+$/i\";\t\t\n\t\tbreak;\n\n\tcase 'author_names' :\n\t\t$return = $reg->getAuthorNicknames();\n\t\tbreak;\n\n\tdefault :\n\t\t$return = array();\n\t\tbreak;\n\t}\n\nreturn $return;\n\n}", "title": "" }, { "docid": "f118cc47bb0525dfd1ac5d66381740b2", "score": "0.5059806", "text": "public function filter_wpseo_sitemap_entry($url, $the_type, $p_or_c){\n\t\t \n\t\t\treturn $url;\n\t\t}", "title": "" }, { "docid": "09857e9926e289c2f7eaa95767c5097d", "score": "0.50419396", "text": "function testRemoveLangFromUrl() {\n\t\t$_GET = array('url' => 'fre/controller/action');\n\t\tCaracoleI18n::init();\n\t\t$result = $_GET['url'];\n\t\t$this->assertEqual($result, 'controller/action');\n\t}", "title": "" }, { "docid": "baae41e9b78ae12603e938b1fede8f0d", "score": "0.50337833", "text": "function cp_skip_brainstorm_menu($products)\n {\n $products = array(\n 14058953,\n 'connects-contact-form-7',\n 'connects-woocommerce',\n 'connects-ontraport',\n 'convertplug-vc',\n 'connects-wp-registration-form',\n 'connects-wp-comment-form',\n 'connects-totalsend',\n 'connects-sendreach',\n 'connects-ontraport',\n 'connects-convertfox',\n );\n\n return $products;\n }", "title": "" }, { "docid": "7b857896d912645f91f40e0632e13560", "score": "0.4976162", "text": "function enterprise_plugin_create_terms_single_redirect() {\n\n\t\tif ( ! is_single() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( 'terms' !== get_query_var( 'post_type' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\twp_safe_redirect( 'glossary', 301 );\n\t\texit;\n\t}", "title": "" }, { "docid": "e2b458b59c912db2e8731dcd4b5262cd", "score": "0.4936674", "text": "function swsctp_handle_custompage_route()\n{\n add_rewrite_rule('instructor-class-list(/page/([^/]+))?', 'index.php?class_list_var=1&page=$matches[2]', 'top');\n add_rewrite_rule('instructor-class-list/', 'index.php?class_list_var=1', 'top' );\n add_rewrite_rule('event/([^/]*)/inst-view/?', 'index.php?post_type=tribe_events&name=$matches[1]&inst_view=1', 'top' );\n \n flush_rewrite_rules();\n\n}", "title": "" }, { "docid": "0b9be7272109584fc20c9178abc740fc", "score": "0.49317092", "text": "function cltvo_filter_post_type_link( $link, $post ) {\n\tif ( $post->post_type == 'cltvo_product' ) {\n\t\tif ( $cats = get_the_terms( $post->ID, 'Cltvo_Product_Taxonomy' ) ) {\n\t\t\t$replace = '';\n\t\t\tif (empty($term = get_query_var('Cltvo_Product_Taxonomy'))) {\n\t\t\t\t$replace = $cats[0]->slug;\n\t\t\t}else {\n\t\t\t\t$replace = $term;\n\t\t\t}\n\t\t\t$link = str_replace( '%product_category%', $replace, $link );\n\t\t}\n\t}\n\treturn $link;\n}", "title": "" }, { "docid": "7220d026728b2381ad694044a1721238", "score": "0.49114135", "text": "function idkomm_kitchen_sink_url_intercept() {\n\t$url_clean = str_replace( '/', '', $_SERVER['REQUEST_URI'] );\n\n\tif ( $url_clean == 'kitchen-sink' ) {\n\t\t$load = locate_template( 'kitchen-sink.php', TRUE );\n\t}\n\n\tif ( isset( $load ) && $load ) {\n\t\texit();\n\t}\n}", "title": "" }, { "docid": "1beb3da09d5ebfeb43af9d0ed7a323bf", "score": "0.49082687", "text": "function ih_app_detail_rewrite_rules(){\r\n global $wp_rewrite;\r\n //add_rewrite_rule('^inboxmember_listhacking/market/(.*)/(.*)/?$','index.php?pagename=child1&market=parent','top');\r\n //add_rewrite_rule('^inboxmember_listhacking/market/(.*)/(.*)/?$','index.php?pagename=market/parent/child1','top');\r\n add_rewrite_rule('^market/(.*)/(.*)/?$','index.php?market=$matches[1]/$matches[2]','top');\r\n //add_rewrite_rule('^market/(.*)/(.*)/?$','index.php?market=metropolitan-atlanta/sample','top');\r\n //flush_rewrite_rules();\r\n //add_rewrite_rule('^inboxmember_listhacking/market/(.*)/(.*)/?$','^inboxmember_listhacking/index.php?pagename=$matches[2]','top');\r\n //echo \"<pre>sadasd\"; print_r($wp_rewrite);\r\n\t//echo \"<pre>\"; print_r($wp_query);\r\n\r\n\t//remove action of plugin custom-post-type-permalinks\r\n}", "title": "" }, { "docid": "c1e4d05d2f2cb32d6e353b1d8abbe469", "score": "0.49071383", "text": "function themestek_search_redirect(){\r\n\t$current_cpt = ( !empty($_GET['post_type']) ) ? $_GET['post_type'] : 'post' ;\r\n\t$allsearch = new WP_Query(\"s=\".get_search_query().\"&showposts=0&post_type=\".$current_cpt);\r\n\t$total_results = $allsearch->found_posts;\r\n\tif( $total_results > 0 ){\r\n\t\t// We found some posts from selected CPT.. nothing to do\r\n\t} else {\r\n\t\t// Check if we found in other CPT\r\n\t\t$args = array(\r\n\t\t\t'public' => true,\r\n\t\t);\r\n\t\t$cpt_obj = get_post_types( $args, 'objects' );\r\n\t\tforeach( $cpt_obj as $cpt ){\r\n\t\t\tif( !in_array( $cpt->name, array( 'attachment', 'ts-client', 'ts-testimonial', $current_cpt ) ) ){ // Exclude Media from search\r\n\t\t\t\t$allsearch = new WP_Query(\"s=\".get_search_query().\"&showposts=0&post_type=\".$cpt->name);\r\n\t\t\t\t$total_results = $allsearch->found_posts;\r\n\t\t\t\tif( $total_results > 0 ){\r\n\t\t\t\t\t$url = site_url() . '?s=' . get_search_query() . '&post_type=' . $cpt->name ;\r\n\t\t\t\t\twp_redirect( $url );\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\texit;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "6bda15fcff4110d84c6080df4efe6413", "score": "0.48942342", "text": "public function handle_redirection() {\n\t\t\tif ( isset( $_GET['post_type'] ) && $_GET['post_type'] === 'acf' ) {\n\t\t\t\twp_redirect( $this->get_admin_url() );\n\t\t\t\texit;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3962444061f6b9ec6a87f50ebe2f78a4", "score": "0.48714092", "text": "function genius404_redirect() {\n\tif ( !is_404() )\n\t\treturn;\n\t\n\t// Extract any GET parameters from URL\n\t$get_params = \"\";\n\tif ( preg_match(\"@/?(\\?.*)@\", $_SERVER[\"REQUEST_URI\"], $matches) ) {\n\t $get_params = $matches[1];\n\t}\n\t\n\t// Extract search term from URL\n\t$patterns_array = array();\n\tif ( ( $patterns = trim( get_option('ignored_patterns' ) ) ) ) {\n\t\t$patterns_array = explode( '\\n', $patterns );\n\t}\n\t\n\t$patterns_array[] = \"/(trackback|feed|(comment-)?page-?[0-9]*)/?$\";\n\t$patterns_array[] = \"\\.(html|php)$\";\n\t$patterns_array[] = \"/?\\?.*\";\n\t$patterns_array = array_map(create_function('$a', '$sep = (strpos($a, \"@\") === false ? \"@\" : \"%\"); return $sep.trim($a).$sep.\"i\";'), $patterns_array);\n\t\n\t$search = preg_replace( $patterns_array, \"\", urldecode( $_SERVER[\"REQUEST_URI\"] ) );\n\t$search = basename(trim($search));\n\t$search = str_replace(\"_\", \"-\", $search);\n\t$search = trim(preg_replace( $patterns_array, \"\", $search));\n\t\n\tif ( !$search ) return;\n\t\n\t$search_words = trim(preg_replace( \"@[_-]@\", \" \", $search));\n\t$GLOBALS[\"__genius404\"][\"search_words\"] = explode(\" \", $search_words);\n $GLOBALS[\"__genius404\"][\"suggestions\"] = array();\n\n $search_groups = (array)get_option( 'also_search' );\n if ( !$search_groups ) $search_groups = array(\"posts\",\"pages\",\"tags\",\"categories\");\n \n // Search twice: First looking for exact title match (high priority), then for a general search\n foreach ( $search_groups as $group ) {\n switch ( $group ) {\n case \"posts\":\n // Search for posts with exact name, redirect if one found\n \t $posts = get_posts( array( \"name\" => $search, \"post_type\" => \"post\" ) );\n \t\tif ( count( $posts ) == 1 ) {\n \t\t\twp_redirect( get_permalink( $posts[0]->ID ) . $get_params, 301 );\n \t\t\texit();\n \t\t}\n break;\n \n case \"pages\":\n // Search pages\n $posts = get_posts( array( \"name\" => $search, \"post_type\" => \"page\" ) );\n \t\tif ( count( $posts ) == 1 ) {\n \t\t\twp_redirect( get_permalink( $posts[0]->ID ) . $get_params, 301 );\n \t\t\texit();\n \t\t}\n \t\tbreak;\n \t\t\n \tcase \"tags\":\n \t // Search tags\n \t\t$tags = get_tags( array ( \"name__like\" => $search ) );\n \t\tif ( count($tags) == 1) {\n \t\t\twp_redirect(get_tag_link($tags[0]->term_id) . $get_params, 301);\n \t\t\texit();\n \t\t}\n \t\tbreak;\n \t\t\n case \"categories\":\n // Search categories\n \t\t$categories = get_categories( array ( \"name__like\" => $search ) );\n \t\tif ( count($categories) == 1) {\n \t\t\twp_redirect(get_category_link($categories[0]->term_id) . $get_params, 301);\n \t\t\texit();\n \t\t}\n \t\tbreak;\n }\n }\n \n // Now perform general search\n foreach ( $search_groups as $group ) {\n switch ( $group ) {\n case \"posts\":\n $posts = genius404_search($search, \"post\");\n \t\tif ( count( $posts ) == 1 ) {\n \t\t\twp_redirect( get_permalink( $posts[0]->ID ) . $get_params, 301 );\n \t\t\texit();\n \t\t}\n\n \t\t$GLOBALS[\"__genius404\"][\"suggestions\"] = array_merge ( (array)$GLOBALS[\"__genius404\"][\"suggestions\"], $posts );\n break;\n \n case \"pages\":\n $posts = genius404_search($search, \"page\");\n \t\tif ( count( $posts ) == 1 ) {\n \t\t\twp_redirect( get_permalink( $posts[0]->ID ) . $get_params, 301 );\n \t\t\texit();\n \t\t}\n\n \t\t$GLOBALS[\"__genius404\"][\"suggestions\"] = array_merge ( (array)$GLOBALS[\"__genius404\"][\"suggestions\"], $posts );\n \t\tbreak;\n }\n }\n}", "title": "" }, { "docid": "92049972d529b561a43d2fa0616dc348", "score": "0.48661584", "text": "public function handleUntranslated() {\n $this->pages['untranslated'] = TRUE;\n }", "title": "" }, { "docid": "f96b7de18d31fc6fdebf8f405081a311", "score": "0.48176354", "text": "function RouteTo() {\n\t\t\t$page = \"404\";\n\n\t\t\tif (!isset($_GET['r']) || $_GET['r'] == \"\") { //if $_GET['r'] is not present, just route to anasayfa to re-evaluate\n\t\t\t\tlocation(\"./anasayfa\"); //Not set route is an error. Don't throw out an error but route back to anasayfa.\n\t\t\t\tdefine(\"PAGE\", \"anasayfa-redirect\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tswitch (strtolower($_GET['r'])) {\n\t\t\t\t case \"anasayfa\":\n\t\t\t\t \tif (LOGGED && $_SESSION['privilage'] == 1) {\n\t\t\t\t \t\tdefine(\"PAGE\", \"yonetici_anasayfa\");\n\t\t\t\t \t}\n\t\t\t\t else define(\"PAGE\", \"anasayfa\");\n\t\t\t\t break;\n\t\t\t\t case \"urunler\": //A list of products\n\t\t\t\t if (LOGGED && $_SESSION['privilage'] == 1) {\n\t\t\t\t \t\tdefine(\"PAGE\", \"yonetici_urunler\");\n\t\t\t\t \t}\n\t\t\t\t else define(\"PAGE\", \"urunler\");\n\t\t\t\t break;\n\t\t\t\t case \"siparis\": //A list of products\n\t\t\t\t if (LOGGED && $_SESSION['privilage'] == 1) {\n\t\t\t\t \t\tdefine(\"PAGE\", \"yonetici_siparis\");\n\t\t\t\t \t}\n\t\t\t\t else define(\"PAGE\", \"siparis\");\n\t\t\t\t break;\n\t\t\t\t case \"bayi\": //A list of products\n\t\t\t\t if (LOGGED && $_SESSION['privilage'] == 1) {\n\t\t\t\t \t\tdefine(\"PAGE\", \"yonetici_bayi\");\n\t\t\t\t \t}\n\t\t\t\t else define(\"PAGE\", \"bayi\");\n\t\t\t\t break;\n\t\t\t\t case \"ayarlar\":\n\t\t\t\t \tif (LOGGED && $_SESSION['privilage'] == 1) {\n\t\t\t\t \t\tdefine(\"PAGE\", \"ayarlar\");\n\t\t\t\t \t}\n\t\t\t\t \telse define(\"PAGE\", \"401\");\n\t\t\t\t \tbreak;\n\t\t\t\t case \"404\": //Page not found\n\t\t\t\t \tdefine(\"PAGE\", \"404\");\n\t\t\t\t \tbreak;\n\t\t\t\t case \"kayitlar\":\n\t\t\t\t \tif (LOGGED && $_SESSION['privilage'] == 1) {\n\t\t\t\t \t\tdefine(\"PAGE\", \"kayitlar\");\n\t\t\t\t \t}\n\t\t\t\t else define(\"PAGE\", \"401\");\n\t\t\t\t break;\n\t\t\t\t case \"401\": //Not-authorized request (privilage not enough)\n\t\t\t\t \tdefine(\"PAGE\", \"401\");\n\t\t\t\t \tbreak;\n\t\t\t\t default:\n\t\t\t\t \tdefine(\"PAGE\", \"404\");\n\t\t\t\t \tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn addOrUpdateUrlParam(\"r\", $page);\n\t\t}", "title": "" }, { "docid": "6bd13ee0646bedf6fbc0e138625c2563", "score": "0.48168513", "text": "function bbp_search_results_redirect()\n{\n}", "title": "" }, { "docid": "082c8f2da02fa6e6ee898c179c5e7150", "score": "0.4807131", "text": "function bbp_template_redirect()\n{\n}", "title": "" }, { "docid": "353cc8cb94e0ca4a2d87d0a6505feab3", "score": "0.4806943", "text": "function nr_set_pagetype(){\n\t\t\n\tif(!is_admin() && $_SERVER['REQUEST_URI'] != '/admin/' && $_SERVER['REQUEST_URI'] != '/admin'){\n\t\n\t\tglobal $post;\n\t\tglobal $pagetype;\n\t\t\n\t\t$pagetype = false;\n\t\t\t\t\t\n\t\tif(is_front_page()){\n\t\t\t\n\t\t\t$pagetype = 'home';\n\t\t\t\n\t\t}\n\t\telse if(is_page()){\n\t\t\t\t\t\t\n\t\t\t$pagetypes = array(NR_PID_HOME=>'home',NR_PID_CONTACT=>'contact',NR_PID_JOBS=>'jobs',NR_PID_ABOUT=>'about',NR_PID_NEWS=>'news',NR_PID_CASES=>'cases');\n\t\t\tif(array_key_exists($post->ID,$pagetypes))\n\t\t\t $pagetype = $pagetypes[''.$post->ID.''];\t\n\t\t\telse if(get_post_meta($post->ID,'_wp_page_template',true) == 'template-solution.php')\n\t\t\t\t$pagetype = 'solution'; \n\t\t\telse if(get_post_meta($post->ID,'_wp_page_template',true) == 'template-custompage.php')\n\t\t\t\t$pagetype = 'custompage'; \t\t\t\n\t\t}\n\t\telse if(is_single()){\n\t\t\t\t\t\t\t\t\n\t\t\t$pagetype = $post->post_type;\n\t\t\n\t\t}\n\t\telse if(is_category() || is_tag() || is_author() || is_search() || is_attachment()){\n\t\t\n\t\t\t$pagetype = 'redirect';\n\t\t\n\t\t}\n\t\t\n\t\tif($pagetype == 'post' || $pagetype == 'redirect'){\t\t\t\t\t\t\t\n\t\t\theader(\"HTTP/1.1 301 Moved Permanently\");\n\t\t\theader(\"Location: \".get_home_url());\n\t\t\texit();\n \n\t\t}\n\t}\n\t\n}", "title": "" }, { "docid": "2f65fc2ff1104ad0a6540d34e5aaa9e0", "score": "0.48017225", "text": "public function handleTemplateRedirect()\n {\n $query = WordPress::getQuery();\n $isNlPreview = false;\n\n // Check for preview or post type\n if (isset($_GET['p']) && $_GET['post_type'] == 'lbwp-nl') {\n $newsletterId = intval($_GET['p']);\n $isNlPreview = true;\n }\n\n // Check the page name to start with the lbwp-nl slug (for live single display)\n if (isset($query->query['pagename']) && Strings::startsWith($query->query['pagename'], 'lbwp-nl/')) {\n $newsletterId = WordPress::getPostIdByName($query->query_vars['name'], 'lbwp-nl');\n $isNlPreview = true;\n }\n\n if (isset($query->query['lbwp-nl'])) {\n $newsletterId = WordPress::getPostIdByName($query->query_vars['lbwp-nl'], 'lbwp-nl');\n $isNlPreview = true;\n }\n\n // If newsletter preview, show the NL and exit\n if ($isNlPreview) {\n echo $this->getPreview($newsletterId);\n exit;\n }\n }", "title": "" }, { "docid": "1954703c21b2a86d6bc08aeb8077218a", "score": "0.47843844", "text": "function vt_add_rewrite_rules( $wp_rewrite )\n{\n $post_page_ID = get_option( 'page_for_posts' );\t\n\t$post_page_slug = $post_page_ID ? get_post_field( 'post_name', $post_page_ID ) : 'aktuelt';\n $new_rules = array(\n $post_page_slug.'/(.+?)/?$' => 'index.php?post_type=post&name='. $wp_rewrite->preg_index(1),\n );\n $wp_rewrite->rules = $new_rules + $wp_rewrite->rules;\n}", "title": "" }, { "docid": "344812872bbce0e9d01b3450ad6c3440", "score": "0.47781312", "text": "function onAfterRoute()\n\t{\n\t\tif ($this->app->isAdmin())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\t$unsupported = false;\n\n\t\tif (isset($_SERVER['HTTP_USER_AGENT']))\n\t\t{\n\t\t\t/* Facebook User Agent\n\t\t\t* facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)\n\t\t\t* LinkedIn User Agent\n\t\t\t* LinkedInBot/1.0 (compatible; Mozilla/5.0; Jakarta Commons-HttpClient/3.1 +http://www.linkedin.com)\n\t\t\t*/\n\t\t\t$pattern = strtolower('/facebookexternalhit|LinkedInBot/x');\n\n\t\t\tif (preg_match($pattern, strtolower($_SERVER['HTTP_USER_AGENT'])))\n\t\t\t{\n\t\t\t\t$unsupported = true;\n\t\t\t}\n\t\t}\n\n\t\tif (($this->app->get('gzip') == 1) && $unsupported)\n\t\t{\n\t\t\t$this->app->set('gzip', 0);\n\t\t}\n\t}", "title": "" }, { "docid": "3aaf828a8860435d693a01eb9490143a", "score": "0.47634578", "text": "function eyelikedesign_menu_fallback() {\n\techo '<div class=\"alert-box secondary\">';\n\t// Translators 1: Link to Menus, 2: Link to Customize\n \tprintf( __( 'Please assign a menu to the primary menu location under %1$s or %2$s the design.', 'eyelikedesign' ),\n \t\tsprintf( __( '<a href=\"%s\">Menus</a>', 'eyelikedesign' ),\n \t\t\tget_admin_url( get_current_blog_id(), 'nav-menus.php' )\n \t\t),\n \t\tsprintf( __( '<a href=\"%s\">Customize</a>', 'eyelikedesign' ),\n \t\t\tget_admin_url( get_current_blog_id(), 'customize.php' )\n \t\t)\n \t);\n \techo '</div>';\n}", "title": "" }, { "docid": "8d4f396d5d7259f6f4a648c5b6acd0ec", "score": "0.47455063", "text": "function appthemes_add_rewrite_rule( $regex, $args, $position = 'top' ) {\n\tadd_rewrite_rule( $regex, add_query_arg( $args, 'index.php' ), $position );\n}", "title": "" }, { "docid": "2da47f62a0d65bd1303beb8757dcd4b2", "score": "0.47445405", "text": "function exclude_category($query) {\nif ( $query->is_home() ) {//add all pages you want to exclude them on here!\n$query->set('cat', '-141');\n}\nreturn $query;\n}", "title": "" }, { "docid": "f5ec3c60eff03d43e1abb17b5d64e9f2", "score": "0.4742739", "text": "public function template_redirect() {\n global $wp_query;\n if ( $wp_query->query_vars['post_type'] == 'finalist' ) {\n get_template_part( 'single-finalist' ); // a custom page-slug.php template\n die();\n }\n }", "title": "" }, { "docid": "d6bd47467115f234682d770d890e5a2b", "score": "0.4729816", "text": "function be_themes_fallback_nav_menu(){\n // empty function to stop display of \"SET THE MAIN MANU\"\n\t}", "title": "" }, { "docid": "26a3d9cc0c8ae62db0c3657b21727117", "score": "0.47292408", "text": "function wp_insertMyRewriteRules($rules){\n $newrules = array();\n //If the URL matches any of the locations, do an internal re-write.\n //$locations = require(\"locations.php\");\n //$newrules['(.?.+?)(/[0-9]+)?/('.$locations.')'] = 'index.php?pagename=$matches[1]&page=$matches[2]&placename=$matches[3]';\n return $newrules + $rules;\n}", "title": "" }, { "docid": "ae4779f88d36792b12dd3c3361414c2e", "score": "0.47280633", "text": "public function handle_redirection() {\n\t\t\tif ( isset( $_GET['post_type'] ) && $_GET['post_type'] === 'acf' ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended\n\t\t\t\twp_redirect( $this->get_admin_url() );\n\t\t\t\texit;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "e684d46147d4e7e74b49bd1ec493c32d", "score": "0.47254133", "text": "public function setLanguagePrefix()\n {\n // Available just for frontend\n if($this->controllerType != 'frontend') show_404();\n\n $language = $this->Nodcms_general_model->get_language_default();\n if($language!=0){\n // Redirect to new URL with default language\n redirect(base_url().$language['code']);\n }else{\n $language = $this->Nodcms_general_model->get_languages();\n if(count($language)!=0){\n // Redirect to new URL with default language\n redirect(base_url().$language[0]['code']);\n }else{\n // Not exists any language in database\n echo \"System cannot find any language to load.\";\n exit;\n }\n }\n }", "title": "" }, { "docid": "4df7535b6f6810884c6b3802e52a3f23", "score": "0.47239113", "text": "function beforeFilter()\r\n\t{\r\n\t\t$this->L10n = new L10n();\r\n\r\n\r\n\t\tif(!empty($this->data)) {\r\n\t\t\tuses('sanitize');\r\n\t\t\t$sanitize = new Sanitize();\r\n\t\t\t$this->cleandata = $sanitize->clean($this->data);\r\n\t\t}\r\n\r\n\r\n\t\tif ( isset($this->params['lang']) )\r\n\t\t{\r\n\t\t\t$this->lang = $this->params['lang'];\r\n\t\t\t$this->L10n->get($this->lang);\r\n\r\n/*\t\t\t$router =& Router::getInstance();\r\n\t\t\tif ( ! ereg($this->lang, $router->__paths[0][\"base\"]) )\r\n\t\t\t{\r\n\t\t\t\t$router->__paths[0][\"base\"] = $router->__paths[0][\"base\"] . \"/\" . $this->lang;\r\n\t\t\t}\t*/\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->L10n->get();\r\n\t\t\t$this->lang = $this->L10n->locale;\r\n\r\n/*\t\t\tif ( strlen($this->lang) > 3 )\r\n\t\t\t{\r\n\t\t\t\tswitch ( $this->lang )\r\n\t\t\t\t{\r\n\t\t\t\t\tcase 'en_us':\r\n\t\t\t\t\t\t$this->lang = \"eng\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$router =& Router::getInstance();\r\n\t\t\t$router->__paths[0][\"base\"] = $router->__paths[0][\"base\"] . \"/\" . $this->lang;\r\n\r\n\t\t\t$this->redirect(\"/\" . $this->lang . \"/\" . $this->params['url']['url']);\t\t*/\r\n\t\t}\r\n\t\t\r\n\t\t// Imposto il titolo del sito.\r\n\t\t$this->pageTitle = __(\"Site Title - \", TRUE);\r\n\t}", "title": "" }, { "docid": "335428b81c5b8c3b4cb8b4339d3c240a", "score": "0.47222263", "text": "function matchmaking_blog_custom_rewrite_rule() {\n\t\t\tadd_rewrite_rule( 'blog/([^/]+)$', 'index.php?post_type=matchmaking&matchmaking=$matches[1]', 'top' );\n\t\t\t\n\t\t}", "title": "" }, { "docid": "e010409da1fe5e26bf060b08221b9f5d", "score": "0.47189632", "text": "function nzshpcrt_products_page($content = '')\n {\n if(WPSC_DEBUG === true) {wpsc_debug_start_subtimer('nzshpcrt_products_page','start');}\n if(preg_match(\"/\\[productspage\\]/\",$content))\n {\n $GLOBALS['nzshpcrt_activateshpcrt'] = true;\n ob_start();\n include_once(WPSC_FILE_PATH . \"/products_page.php\");\n $output = ob_get_contents();\n ob_end_clean();\n if(WPSC_DEBUG === true) {wpsc_debug_start_subtimer('nzshpcrt_products_page','stop');}\n return preg_replace(\"/\\[productspage\\]/\",$output, $content);\n }\n else\n {\n return $content;\n }\n }", "title": "" }, { "docid": "1a98a483cf11b205aed4b780d12b1edb", "score": "0.47169095", "text": "public function filterRouter(){\r\n\t\t$current_page = '';\r\n\t\t/*\r\n\t\t* Check to see if its a CMS page\r\n\t\t* if it is then get the page identifier\r\n\t\t*/\r\n\t\tif(Mage::app()->getFrontController()->getRequest()->getRouteName() == 'cms'){\r\n\t\t\t$this->_typeCurrentUrl = Sm_Megamenu_Model_System_Config_Source_Type::CMSPAGE ;\r\n// \t\t\t$this->_itemCurrentUrl = Mage::getSingleton('cms/page')->getIdentifier() ;\r\n\t\t\t$this->_itemCurrentUrl = Mage::getSingleton('cms/page')->getId() ;\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t/*\r\n\t\t* If its not CMS page, then just get the route name\r\n\t\t*/\r\n\t\tif(empty($current_page)){\r\n\t\t\t$current_page = Mage::app()->getFrontController()->getRequest()->getRouteName();\r\n\t\t}\r\n\t\t/*\r\n\t\t* What if its a catalog page?\r\n\t\t* Then we can get the catalog category or catalog product :)\r\n\t\t*/\r\n\t\tif($current_page == 'catalog'){\r\n\t\t\t// $current_page = preg_replace('#[^a-z0-9]+#', '-', strtolower(Mage::registry('current_category')->getUrlPath()));\r\n\t\t\tif($this->getRequest()->getControllerName()=='product') {\r\n\t\t\t\t$this->_typeCurrentUrl = Sm_Megamenu_Model_System_Config_Source_Type::PRODUCT ;\r\n\t\t\t\t$this->_itemCurrentUrl = Mage::registry('current_product') ;\t\r\n\t\t\t\treturn true;\t\t\t\r\n\t\t\t}//do something\r\n\t\t\tif($this->getRequest()->getControllerName()=='category'){\r\n\t\t\t\t$this->_typeCurrentUrl = Sm_Megamenu_Model_System_Config_Source_Type::CATEGORY ;\r\n\t\t\t\t$this->_itemCurrentUrl = Mage::registry('current_category') ;\r\n\t\t\t\treturn true;\t\t\t\t\r\n\t\t\t} //do others\r\n\t\t}\r\n\t\treturn false;\r\n\t\t// \t\telse do not anything\t\r\n\t}", "title": "" }, { "docid": "1321100d9bdaff424abff841eafabfa9", "score": "0.47145623", "text": "function psean_rewrite_rules() {\n // ( $regex, $redirect, $after )\n\n\n // TODO: get rid of test page\n // test page\n add_rewrite_rule(\n '^test/?$',\n 'index.php?psean=test',\n 'top' );\n\n\n // json data pages\n $base_url = get_option('psean_base_url');\n //// countries\n add_rewrite_rule(\n $base_url.'/data/countries/?$',\n substr( plugin_dir_path( __FILE__ ), 1 ) . 'data/locations/countries.php',\n 'top'\n );\n //// provinces\n add_rewrite_rule(\n $base_url.'/data/provinces/([^/].*)/?$',\n substr( plugin_dir_path( __FILE__ ), 1 ) . 'data/locations/provinces.php?c=$1',\n 'top'\n );\n //// cities\n add_rewrite_rule(\n $base_url.'/data/cities/([^/].*)/([^/].*)/?$',\n substr( plugin_dir_path( __FILE__ ), 1 ) . 'data/locations/cities.php?p=$1&c=$2',\n 'top'\n );\n\n //// geoip\n add_rewrite_rule(\n $base_url.'/data/geoip/?$',\n substr( plugin_dir_path( __FILE__ ), 1 ) . 'data/locations/geoip.php',\n 'top'\n );\n\n\n // flush rewrite rules\n flush_rewrite_rules();\n}", "title": "" }, { "docid": "c9a3d237b412671066443d9d32baee8b", "score": "0.47135207", "text": "function testDoNotParseNonExistingLangs() {\n\t\t$_GET = array('url' => 'foo');\n\t\tCaracoleI18n::init();\n\t\t$result = $_GET['url'];\n\t\t$this->assertEqual($result, 'foo');\n\t}", "title": "" }, { "docid": "64bccb655a868df1d09582b47f08037e", "score": "0.470858", "text": "public function isMatch($url) {\n\t\t$status = parent::isMatch($url);\n\n\t\t// Redirect to the fallback URL\n\t\tif (PHP_SAPI !== 'cli' && empty($this->_route['locale'])) {\n\t\t\t$redirect = $this->_route;\n\t\t\t$redirect['locale'] = Titon::g11n()->getFallback()->getLocale('key');\n\n\t\t\t$this->response->redirect($redirect);\n\t\t}\n\n\t\treturn $status;\n\t}", "title": "" }, { "docid": "15d365d0d58f882a2413035a88414c55", "score": "0.47065333", "text": "function papi_filter_settings_only_page_type( $post_type ) {\n\t$page_type = apply_filters( 'papi/settings/only_page_type_' . $post_type, '' );\n\n\tif ( ! is_string( $page_type ) ) {\n\t\treturn '';\n\t}\n\n\treturn str_replace( '.php', '', $page_type );\n}", "title": "" }, { "docid": "b60ec0477397e1e2e547dbef9fd8a3e6", "score": "0.47055972", "text": "function onAfterInitialise()\r\n\t{\r\n\t\tglobal $globaltypes, $globalitems, $globalnoroute;\r\n\r\n\t\t$mainframe =& JFactory::getApplication();\r\n\t\t\r\n\t\tif ($mainframe->isAdmin()) {\r\n\t\t\treturn; // Dont run in admin\r\n\t\t}\r\n\r\n\t\t$route_to_type \t\t= $this->params->get('route_to_type', 0);\r\n\t\t$type_to_route \t\t= $this->params->get('type_to_route', '');\r\n\t\t$cats_to_exclude \t= $this->params->get('cats_to_exclude', '');\r\n\t\t\r\n\t\t$globalnoroute = explode(\",\", $cats_to_exclude);\r\n\r\n\t\tif ($route_to_type && $type_to_route)\r\n\t\t{\r\n\t\t\tif (!$globaltypes) {\r\n\t\t\t\t$db =& JFactory::getDBO();\r\n\t\t\t\t$db->setQuery('SELECT c.id FROM #__content AS c LEFT JOIN #__flexicontent_items_ext AS ie ON ie.item_id = c.id WHERE ie.type_id = '.$type_to_route.' ORDER BY c.id ASC');\r\n\t\t\t\t$globaltypes = $db->loadResultArray();\r\n\t\t\t}\r\n\t\r\n\t\t\tif (!$globalitems) {\r\n\t\t\t\t// get an object of all contents with their associated type and primary category\r\n\t\t\t\t$db =& JFactory::getDBO();\r\n\t\t\t\t$db->setQuery('SELECT c.id, c.catid, ie.type_id FROM #__content AS c LEFT JOIN #__flexicontent_items_ext AS ie ON ie.item_id = c.id WHERE ie.type_id = '.$type_to_route.' ORDER BY c.catid ASC');\r\n\t\t\t\t$globalitems = $db->loadObjectList('catid');\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "73bc61ec72d706887c53840b900705d8", "score": "0.46996439", "text": "function cp_redirect_to_kb()\n {\n\n ?><script type=\"text/javascript\">window.location.replace('<?php echo admin_url(); ?>admin.php?page=<?php echo CP_PLUS_SLUG; ?>&view=knowledge_base'); </script>\n <?php\n }", "title": "" }, { "docid": "a30eb6ef48ed1b79eb6b34d27e70da95", "score": "0.46895236", "text": "function ws_preselect_post_category_by_type() {\n ?>\n <script type=\"text/javascript\">\n jQuery(function() {\n\t var current_page = jQuery(location).attr('href');\n\t if (current_page.indexOf('post_type=assessment_review') > -1){\n jQuery('#in-category-48').click();\n\t\t}\n\t\tif (current_page.indexOf('post_type=tc_materials') > -1){\n\t\tvar catId = 331; jQuery('#in-category-331').click();\n\t\t}\n\t\tif (current_page.indexOf('post_type=webinar') > -1){\n jQuery('#in-category-341').click();\n\t\t}\n\t\tif (current_page.indexOf('post_type=tip') > -1){\n jQuery('#in-category-134').click();\n\t\t}\n });\n\t </script>\n <?php\n}", "title": "" }, { "docid": "656b9c62bdc2f028df9c3df03e9cfbc9", "score": "0.4683623", "text": "function hook_ClientAreaPageLanguageAfter()\n{\n\tglobal $smarty, $errormessage;\n\t$settings = getJwhmcsSettings();\n\t\n\tif (!$settings['Enable']) return;\n\t\n\t// Run if User Integration is enabled\n\tif ($settings['UserEnable']) {\n\t\t// Modify the form action from dologin to jwhmcs\n\t\tif ($faxn = $smarty->_tpl_vars['formaction']):\n\t\t\t$tmp\t= explode('?', $faxn);\n\t\t\tif (substr($tmp[0], -11) == 'dologin.php') $tmp[0] = substr_replace($tmp[0], 'jwhmcs.php', -11);\n\t\t\t/*\n\t\t\t$vars = explode(\"&\", $tmp[1]);\n\t\t\tfor($j=0; $j<count($vars); $j++) {\n\t\t\t\tif (strstr($vars[$j], \"goto\") !== false ) {\n\t\t\t\t\tif ($smarty->_tpl_vars['filename'] == 'upgrade' )\n\t\t\t\t\t\t$vars[$j] = 'goto=' . $smarty->_tpl_vars['filename'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$tmp[1] = implode(\"&\", $vars);\n\t\t\t*/\n\t\t\t$smarty->_tpl_vars['formaction'] = $tmp[0].'?'.$tmp[1].'&task=ulogin';\n\t\tendif;\n\t}\n\t\n\t// The rest deals with the Visual Integration\n\tif (!$settings['RenderEnable']) return;\n\t\n\t$langarrayrev\t\t= array_flip($smarty->_tpl_vars['langarray']);\n\t\n\t$requrl = ( $GLOBALS['requesturl'] ? $GLOBALS['requesturl'] : basename($_SERVER['REQUEST_URI'] ));\n\t$curUrl = trim($smarty->_tpl_vars['systemurl'], \"/\").\"/\".$requrl;\n\t$uri = parse_url($curUrl);\n\tparse_str($uri['query'], $qry);\n\t\n\t$regex[0] = '/(href=\\\")([^\\\"]*<!-- LANGUAGE=)(.{2}).*?(\\\")/i';\n\t$regex[1] = '/<!-- LANGUAGE=(.{2}) -->/i';\n\t\n\t$body\t= array('htmlheader' => $smarty->_tpl_vars['htmlheader'], 'htmlfooter' => $smarty->_tpl_vars['htmlfooter'] );\n\t\n\tforeach($body as $key => $value) {\n\t\t\n\t\tpreg_match_all( $regex[0], $value, $matches, PREG_SET_ORDER);\n\t\t\n\t\tif( count( $matches ) > 0 ) {\n\t\t\tforeach($matches as $match) {\n\t\t\t\t$qry['language'] = $langarrayrev[$match[3]];\n\t\t\t\t$uri['query'] = buildQuery($qry);\n\t\t\t\t$value = preg_replace('`'.$match[0].'`', $match[1].queryToString($uri).$match[4], $value );\n\t\t\t}\n\t\t}\n\t\t\n\t\tpreg_match_all( $regex[1], $value, $matches, PREG_SET_ORDER);\n\t\t\n\t\tif( count( $matches ) > 0 ) {\n\t\t\tforeach( $matches as $match ) {\n\t\t\t\t$qry['language'] = $langarrayrev[$match[1]];\n\t\t\t\t$uri['query'] = buildQuery($qry);\n\t\t\t\t$value = preg_replace( '`'.$match[0].'`', queryToString($uri), $value );\n\t\t\t}\n\t\t}\n\t\t$smarty->assign( $key, $value );\n\t}\n}", "title": "" }, { "docid": "8e7e3088a8228e7ce4b0eff82c427aad", "score": "0.46824288", "text": "private function override_post_type_slug( $post_type ) {\n\t\tglobal $wp_post_types;\n\t\tif ( $slug = $this->option->get_front_struct( $post_type ) ) {\n\t\t\tif ( is_array( $wp_post_types[ $post_type ]->rewrite ) ) {\n\t\t\t\t$original_slug = $wp_post_types[ $post_type ]->rewrite['slug'];\n\t\t\t\t$wp_post_types[ $post_type ]->rewrite['slug'] = $slug;\n\t\t\t\t$wp_post_types[ $post_type ]->rewrite['original_slug'] = $original_slug;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "8f097f0558681ae99020b5ef77daf66b", "score": "0.46800312", "text": "function px_slider_gallery_template_redirect(){\n\t\t\n\t\tif ( get_post_type() == \"px_gallery\" ) {\n\t\t\tglobal $wp_query;\n\t\t\t$wp_query->set_404();\n\t\t\tstatus_header( 404 );\n\t\t\tget_template_part( 404 );\n\t\t\texit();\n\t\t}\n\t}", "title": "" }, { "docid": "585353a6f99979d1b22e30378314e48b", "score": "0.4677553", "text": "function FoundationPress_menu_fallback() {\n\techo '<div class=\"alert-box secondary\">';\n\t// Translators 1: Link to Menus, 2: Link to Customize\n \tprintf( __( 'Please assign a menu to the primary menu location under %1$s or %2$s the design.', 'FoundationPress' ),\n \t\tsprintf( __( '<a href=\"%s\">Menus</a>', 'FoundationPress' ),\n \t\t\tget_admin_url( get_current_blog_id(), 'nav-menus.php' )\n \t\t),\n \t\tsprintf( __( '<a href=\"%s\">Customize</a>', 'FoundationPress' ),\n \t\t\tget_admin_url( get_current_blog_id(), 'customize.php' )\n \t\t)\n \t);\n \techo '</div>';\n}", "title": "" }, { "docid": "f288d38661ced1351be318d74a8b9f2b", "score": "0.46773785", "text": "function themeFilterOne()\r\n{\r\nglobal $xoopsDB, $xoopsConfig, $xoopsModule, $eh;\r\n$lid = isset($_GET['lid']) ? intval($_GET['lid']) : \"1\";\r\n$playerid = isset($_GET['playerid']) ? intval($_GET['playerid']) : \"1\";\r\n$playerop = isset($_GET['playerop']) ? $_GET['playerop'] : \"newPlayer\";\r\n$theme = isset($_GET[\"theme\"]) ? $_GET[\"theme\"] : $theme;\r\n$styleoption = 2;\r\nthemeFilter($theme);\r\nredirect_header(\"player.php?playerop=\".$playerop.\"&amp;lid=\".$lid.\"&amp;playerid=\".$playerid.\"&amp;theme=\".$theme.\"&amp;styleoption=2\",2,_WSA_THEMEMODIFIED); \r\n}", "title": "" }, { "docid": "c3e93b7cef981a430af699d81c710b70", "score": "0.4670069", "text": "function cart_redirect_404()\n{\n\tif (is_cart()) {\n\t\twp_safe_redirect(home_url('/cart-page'));\n\t\texit();\n\t}\n}", "title": "" }, { "docid": "f99520c9af3847858c801eb51425a9bb", "score": "0.46680227", "text": "private static function translateURL()\n\t{\t\t\n\t\t$translated = FALSE;\n\t\t$controller = '';\t\t\n\n\t\tif(isset($_GET['c'], $_GET['a'])){\n\t\t\t$controller = 'app\\\\controllers\\\\'.ucfirst($_GET['c']).'Controller';\n\t\t\t$action = $_GET['a'].'Action';\n\t\t}\n\n\t\tif(class_exists($controller)){\n\t\t\t$instance = new $controller;\n\t\t\tif(method_exists($instance, $action)){\n\t\t\t\t$instance->$action();\n\t\t\t\t$translated = TRUE;\n\t\t\t}\n\t\t}\n\n\t\tif(!$translated){\n\t\t\t$instance = new \\app\\controllers\\IndexController;\n\t\t\t$instance->indexAction();\n\t\t}\n\t}", "title": "" }, { "docid": "e41bf93e17c3b7d980ca3e727c20a8ae", "score": "0.4664412", "text": "function portfolioposttype_activation() {\n\tportfolioposttype();\n\tflush_rewrite_rules();\n}", "title": "" }, { "docid": "70c6946254c4ca60fa7e70b803cb833b", "score": "0.46562964", "text": "public function filter_wpseo_build_sitemap_post_type($type){\n\t\t \n\t\t\treturn $type;\n\t\t}", "title": "" }, { "docid": "fe3ce46dfc37acf784f8365c049d9511", "score": "0.46544918", "text": "public function routeStartup (Zend_Controller_Request_Abstract $request)\n {\n if (substr($request->getRequestUri(), 0, -1) == $request->getBaseUrl()){\n $request->setRequestUri($request->getRequestUri().\"en\".\"/\");\n $request->setParam(\"language\", \"en\");\n}else{\n \n $url=$request->getRequestUri();\n $url= str_replace($request->getBaseUrl, '', $url);\n $url=explode('/',$url);\n if(in_array($url[1],array('ar','en')))\n {\n $request->setRequestUri($request->getRequestUri());\n $request->setParam(\"language\", $url[1]); \n }else{\n \n $request->setRequestUri($request->getRequestUri().'en/');\n $request->setParam(\"language\", \"en\");\n }\n \n}\n }", "title": "" }, { "docid": "850fc4c94079f0182591a21a414a33f6", "score": "0.465327", "text": "public function onBeforeRouting() {}", "title": "" }, { "docid": "a6f4e663fc08698b52e827ebe22cac08", "score": "0.46462882", "text": "function testTooShortLangDoesNotGetParsed() {\n\t\t$_GET = array('url' => 'fr/controller/action');\n\t\tCaracoleI18n::init();\n\t\t$result = Configure::read('Config.language');\n\t\t$this->assertEqual($result, 'eng');\n\t}", "title": "" }, { "docid": "82ca1ef64dfbf51d07851e0980ed41dd", "score": "0.46367413", "text": "function template_redirect() {\r\n// global $wp_query;\r\n if ( $this->is_enewsletter_page( 'unsubscribe_page' ) ) {\r\n// $this->load_template( 'page-unsubscribe.php' );\r\n require_once( $this->plugin_dir . \"email-newsletter-files/page-unsubscribe.php\" );\r\n exit;\r\n }\r\n }", "title": "" }, { "docid": "eaf191bba76e64c8e53b08859f9ed246", "score": "0.46358198", "text": "function tester_permalink($permalink, $post_id, $leavename) {\n if (strpos($permalink, '%testkategori%') === FALSE) return $permalink;\n // Get post\n $post = get_post($post_id);\n if (!$post) return $permalink;\n\n // Get taxonomy terms\n $terms = wp_get_object_terms($post->ID, 'testkategori');\n if (!is_wp_error($terms) && !empty($terms) && is_object($terms[0]))\n $taxonomy_slug = $terms[0]->slug;\n else $taxonomy_slug = 'no-testkategori';\n\n return str_replace('%testkategori%', $taxonomy_slug, $permalink);\n}", "title": "" }, { "docid": "0b17025809fe12ba392d1c6f72fbb500", "score": "0.46320772", "text": "protected function setURLToReturn()\n {\n if ($this->getCart()->getItemsWithWrongAmounts()) {\n \\XLite\\Core\\Config::getInstance()->General->redirect_to_cart = false;\n } else {\n parent::setURLToReturn();\n }\n }", "title": "" }, { "docid": "7d7d07016fdc2aa34959161bfdb77cd8", "score": "0.46311042", "text": "function respect_robots_txt() {\n\t\t// ?robots=1 is here to trigger `is_robots()`, which prevents canonical.\n\t\t// ?gp_route=robots.txt is here, as GlotPress ultimately is the router for the request.\n\t\tadd_rewrite_rule( '^robots\\.txt$', 'index.php?robots=1&gp_route=robots.txt', 'top' );\n\t}", "title": "" }, { "docid": "21947fd75afaae59627e5bc0f02226fd", "score": "0.4630756", "text": "function willy_redirect_recherche_ville() {\n\t// s'il s'agit d'une recherche avec la ville de choisie\n\tif ( is_search() && get_query_var( 'ville' ) \n // mais que les autres champs son vides\n && ! get_query_var( 'chambres' ) \n && ! get_query_var( 'quartiers' ) \n && ! get_query_var( 'prix-mini' ) \n && ! get_query_var( 'prix-maxi' ) \n && ! get_query_var( 'equipements' ) ) {\n\t\t// et que la ville existe\n\t\tif ( $ville = term_exists( get_query_var( 'ville' ) , 'localisation' ) ) {\n\t\t\t// alors on redirige l'utilisateur sur la page du terme de taxonomie\n\t\t\twp_redirect( get_term_link( $ville['term_taxonomy_id'], 'localisation' ), 303 );\n\t\t\texit();\n\t\t}\n\t}\n}", "title": "" }, { "docid": "cfdadaff482025cb03dc86977bdbbe96", "score": "0.4627396", "text": "function quoma_custom_redirect_miei_preventivi() {\n\tif ( is_page( 'miei-preventivi' ) ) {\n\t\tif ( is_user_logged_in() ) {\n\t\t\t$user = wp_get_current_user();\n\t\t\tif ( $user->has_cap( 'subscriber' ) ) {\n\t\t\t\t// Visualizza la pagina \"miei-preventivi\"\n\t\t\t} else {\n\t\t\t\twp_redirect( get_permalink( get_page_by_path( 'accesso-negato' ) ) );\n\t\t\t\tdie;\n\t\t\t}\n\t\t} else {\n\t\t\twp_redirect( get_permalink( get_page_by_path( 'accesso-negato' ) ) );\n\t\t\tdie;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "8355ae06069376399114134d80bd2490", "score": "0.4614408", "text": "function login_key_admin_default_page() {\n $lk_default_start = get_option('lk_default_start') ;\n $url = site_url() .'/wp-admin';\n if ( $lk_default_start == '/'){\n $url = site_url() ;\n }elseif( substr($lk_default_start,0,1) == '/'){\n $url = site_url() . $lk_default_start ;\n }\n $rtn = apply_filters('login_key_admin_default_page_replace', $url );\n return $rtn ;\n }", "title": "" }, { "docid": "a4ada7992f789205fb6e219360e8d1de", "score": "0.46139702", "text": "function TanTanSpamFilter() {\n $this->patternsToDieOn = array('\\[url=.*\\]');\n $this->wordsToDieOn = array('cialis','ebony','nude','porn','porno','pussy','upskirt','ringtones','phentermine','viagra');\n \n add_action('preprocess_comment', array(&$this,'comment_handler'), -100); // run before everything\n\n add_action('admin_menu', array(&$this, 'admin_menu'));\n\n\t\t// Handle spams flagged by Akismet \n\t\t// You could modify this action to hook into other spam plugins\n add_action('akismet_spam_caught', array(&$this, 'akismet_spam_handler')); // handle akisment spam\n }", "title": "" }, { "docid": "fbbc4efff50b9dd526122ccf16624606", "score": "0.46052754", "text": "function remove_redirects() {\n add_rewrite_rule('^/(.+)/?', 'index.php', 'top');\n}", "title": "" }, { "docid": "58eb721c06d420c59fe28618af997aad", "score": "0.4603042", "text": "function remove_canonical() {\r\n if ( is_page('cmc-currency-details') ) {\r\n add_filter( 'wpseo_canonical', '__return_false', 10, 1 );\r\n }\r\n }", "title": "" }, { "docid": "3ec04e74e27d277a9cd89d70756a4116", "score": "0.4602877", "text": "function pmpro_lpv_redirect() {\n\n\t$page_id = get_option( 'pmprolpv_redirect_page' );\n\n\tif ( empty( $page_id ) ) {\n\t\t$redirect_url = pmpro_url( 'levels' );\n\t} else {\n\t\t$redirect_url = get_the_permalink( $page_id );\n\t}\n\n\twp_redirect( $redirect_url ); //here is where you can change which page is redirected to\n\texit;\n}", "title": "" }, { "docid": "da985904959f91b626f83a906c852df5", "score": "0.45956525", "text": "function plugin_activation() {\n\tadd_glossary_item_post_type();\n\tflush_rewrite_rules();\n}", "title": "" }, { "docid": "6f17cf4b9cedc6fd1baf1b152c7e086d", "score": "0.4594993", "text": "function cfcpt_fix_permalink($permalink,$post,$leavename) {\n\t\t$types = cfcpt_get_types();\n\t\tif(!isset($post->post_type)) {\n\t\t\t$type = get_post_meta($post->ID,'_post_type',true);\n\t\t\tif(array_key_exists($type,$types)) {\n\t\t\t\t$post->post_type = $type;\n\t\t\t}\n\t\t}\n\t\tif(isset($post->post_type) && array_key_exists($post->post_type, $types)) {\n\t\t\t// build permalink for the category page instead\n\t\t\t$cat = get_the_category($post->ID);\n\t\t\t$permalink = get_category_link($cat[0]->term_id);\n\t\t}\n\t\treturn $permalink;\n\t}", "title": "" }, { "docid": "96898b1320074e12579d12f987c34148", "score": "0.45903543", "text": "function predictive404_redirect() {\n global $wpdb;\n \n if ( !is_404() ) { return; }\n\n $url = $_SERVER['REQUEST_URI'];\n if(stristr($url,\"http\")) {\n $p = parse_url($url);\n $url = $p['path'];\n }\n \n $results = array();\n $score = 10;\n $items = $wpdb->get_results( \n \"SELECT ID FROM $wpdb->posts WHERE post_status = 'publish'\"\n );\n \n foreach ( $items as $item ) {\n $perm = get_permalink($item->ID);\n if(stristr($perm,\"http\")) {\n $p = parse_url($perm);\n $perm = $p['path'];\n }\n $results[$perm] = levenshtein($url,$perm);\n }\n \n $items = $wpdb->get_results( \n \"SELECT term_ID FROM $wpdb->terms\"\n );\n \n foreach ( $items as $item ) {\n $perm = get_category_link( $item->term_ID );\n if(stristr($perm,\"http\")) {\n $p = parse_url($perm);\n $perm = $p['path'];\n }\n $results[$perm] = levenshtein($url,$perm);\n }\n \n asort($results);\n foreach($results as $k=>$v) {\n $correct = $k;\n $score = $v;\n break;\n }\n \n if($score<3) {\n header(\"HTTP/1.1 301 Moved Permanently\");\n header(\"Location: $correct\");\n exit;\n } else {\n return;\n } \n\n}", "title": "" }, { "docid": "98503b93ddafc1514bdf22606137a45c", "score": "0.4582578", "text": "function meri2015_redirect_templates() {\n if( is_page( 6 ) ) { je_redirect_to( 19 ); }\n\n // Help Me With Classes -> Subject Tutoring\n if( is_page( 8 ) ) { je_redirect_to( 564 ); }\n\n // Help Me With College -> 1-on-1 EC\n if( is_page( 12 ) ) { je_redirect_to( 29 ); }\n\n // Help Me With Test Prep -> SAT & ACT\n if( is_page( 10 ) ) { je_redirect_to( 25 ); }\n\n}", "title": "" }, { "docid": "f0c490ae5926bd810dcc623995c6b2fc", "score": "0.45764744", "text": "function rewrite_apply_page( $rules ) {\n\t\t\n\t\t$my_rule = [];\n\t\t\t\n\t\t$my_rule[$this->slug.'/apply/?$'] = 'index.php?pagename='.$this->slug.'/apply'; \t\n\t\t\n\t\t//Put our rule first since its pretty specific and important\n\t\t$rules = $my_rule + $rules;\n\n\t\treturn $rules;\n\t\t\n\t}", "title": "" }, { "docid": "f8097ea90401dd669c9f3bdf741c8b9a", "score": "0.45758653", "text": "function asdb_serch_redirect() {\n global $wp_rewrite;\n if (!isset($wp_rewrite) || !is_object($wp_rewrite) || !$wp_rewrite->get_search_permastruct()) {\n return;\n }\n\n $search_base = $wp_rewrite->search_base;\n if (is_search() && !is_admin() && strpos($_SERVER['REQUEST_URI'], \"/{$search_base}/\") === false && strpos($_SERVER['REQUEST_URI'], '&') === false) {\n wp_redirect(get_search_link());\n exit();\n }\n}", "title": "" }, { "docid": "399395fabb064fd2348d2731c852e771", "score": "0.45723954", "text": "function htmlawed_unfiltered($hook, $type, $result, $params){\n\tif(elgg_is_admin_logged_in()){\n\t$config = array('iframe' => 1, 'script' => 1); \n return htmLawed($text, $config);\n\t}\n}", "title": "" }, { "docid": "1a208cc7707be263658a0342b987b77a", "score": "0.45723352", "text": "public function index_standard() {\r\n if ($this->config->get('config_seo_url')) {\r\n $this->url->addRewrite($this);\r\n }\r\n \r\n // Decode URL\r\n if (isset($this->request->get['_route_'])) {\r\n $parts = explode('/', $this->request->get['_route_']);\r\n \r\n foreach ($parts as $part) {\r\n $query = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"url_alias WHERE keyword = '\" . $this->db->escape($part) . \"'\");\r\n \r\n if ($query->num_rows) {\r\n $url = explode('=', $query->row['query']);\r\n \r\n if ($url[0] == 'product_id') {\r\n $this->request->get['product_id'] = $url[1];\r\n }\r\n \r\n if ($url[0] == 'category_id') {\r\n if (!isset($this->request->get['path'])) {\r\n $this->request->get['path'] = $url[1];\r\n } else {\r\n $this->request->get['path'] .= '_' . $url[1];\r\n }\r\n } \r\n \r\n if ($url[0] == 'manufacturer_id') {\r\n $this->request->get['manufacturer_id'] = $url[1];\r\n }\r\n \r\n if ($url[0] == 'information_id') {\r\n $this->request->get['information_id'] = $url[1];\r\n } \r\n } else {\r\n $this->request->get['route'] = implode('/',$parts);\r\n return $this->forward($this->request->get['route']); \r\n $this->request->get['route'] = 'error/not_found'; \r\n }\r\n }\r\n \r\n if (isset($this->request->get['product_id'])) {\r\n $this->request->get['route'] = 'product/product';\r\n } elseif (isset($this->request->get['path'])) {\r\n $this->request->get['route'] = 'product/category';\r\n } elseif (isset($this->request->get['manufacturer_id'])) {\r\n $this->request->get['route'] = 'product/manufacturer/product';\r\n } elseif (isset($this->request->get['information_id'])) {\r\n $this->request->get['route'] = 'information/information';\r\n }\r\n \r\n if (isset($this->request->get['route'])) {\r\n return $this->forward($this->request->get['route']);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "8cfa1ae17518c205436ca5e921874627", "score": "0.45691234", "text": "function fn_get_aff_banner_link_types($banner_type = '')\n{\n if ($banner_type != 'P') {\n $link_types = array (\n 'G' => __('product_groups'),\n 'C' => __('categories'),\n 'P' => __('products'),\n );\n }\n $link_types['U'] = __('url');\n\n return $link_types;\n}", "title": "" }, { "docid": "186db383f351f5c2099ef08300ea164a", "score": "0.4562166", "text": "function templateRedirect() {\n\t\tglobal $wp_query;\n\t\t\n\t\t// init var\n\t\t$templates = array();\n\t\t\n\t\t// Get post_type and language\n\t\t$els = explode( '_t_', $wp_query->query_vars['post_type'] );\n\t\t\n\t\t// Basically single\n\t\t$slug = 'single';\n\t\t\n\t\t// Make archive if needed\n\t\tif( is_archive() )\n\t\t\t$slug = 'archive';\n\n\t\t// Make the templates\n\t\t$templates[] = $slug.'-'.$els[0].'-'.$els[1].'.php' ;\n\t\t$templates[] = $slug.'-'.$els[0].'.php' ;\n\t\t$templates[] = $slug.'.php';\n\t\t\n\t\t// Add the templates for the view\n\t\tlocate_template( $templates, true );\n\t\texit();\n\t}", "title": "" }, { "docid": "dfc8aca671bc3405b2c7be0abd30acb0", "score": "0.45598292", "text": "function process_redirect() {\n\t\t\tglobal $wpdb;\n\t\t\t$valid_ips = array();\n\t\t\t$valid_class_cs = array();\n\t\t\t$valid_aks = array();\n\t\t\t$wpjf3_matches = array();\n\t\t\t\n\t\t\t// set cookie if needed\n\t\t\tif ( trim( $_GET['wpjf3_mr_temp_access_key'] ) != '' ) {\n\t\t\t\t// get valid access keys\n\t\t\t\t$sql = \"select access_key from \" . $wpdb->prefix . $this->admin_options_name . \"_access_keys where active = 1\";\n\t\t\t\t$aks = $wpdb->get_results($sql, OBJECT);\n\t\t\t\tif( $aks ){\n\t\t\t\t\tforeach( $aks as $ak ){\n\t\t\t\t\t\t$valid_aks[] = $ak->access_key;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// set cookie if there's a match\n\t\t\t\tif( in_array( $_GET['wpjf3_mr_temp_access_key'], $valid_aks ) ){\n\t\t\t\t\t$wpjf3_mr_cookie_time = time()+(60*60*24*365);\n\t\t\t\t\tsetcookie( 'wpjf3_mr_access_key', $_GET['wpjf3_mr_temp_access_key'], $wpjf3_mr_cookie_time, '/' );\n\t\t\t\t\t$_COOKIE['wpjf3_mr_access_key'] = $_GET['wpjf3_mr_temp_access_key'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// get plugin options\n\t\t\t$wpjf3_mr_options = $this->get_admin_options();\n\t\t\t\n\t\t\t// skip admin pages by default\n\t\t\t$url_parts = explode( '/', $_SERVER['REQUEST_URI'] );\n\t\t\tif( in_array( 'wp-admin', $url_parts ) ) {\n\t\t\t\t$wpjf3_matches[] = \"<!-- WPJF_MR: SKIPPING ADMIN -->\";\n\t\t\t}else{\n\t\t\t\t// determine if user is admin.. if so, bypass all of this.\n\t\t\t\tif( current_user_can('manage_options') ) {\n\t\t\t\t\t$wpjf3_matches[] = \"<!-- WPJF_MR: USER IS ADMIN -->\";\n\t\t\t\t}else{\n\t\t\t\t\tif( $wpjf3_mr_options['enable_redirect'] == \"YES\" ){\n\t\t\t\t\t\t// get valid unrestricted IPs\n\t\t\t\t\t\t$sql = \"select ip_address from \" . $wpdb->prefix . $this->admin_options_name . \"_unrestricted_ips where active = 1\";\n\t\t\t\t\t\t$ips = $wpdb->get_results($sql, OBJECT);\n\t\t\t\t\t\tif( $ips ){\n\t\t\t\t\t\t\tforeach( $ips as $ip ){\n\t\t\t\t\t\t\t\t$ip_parts = explode( '.', $ip->ip_address );\n\t\t\t\t\t\t\t\tif( $ip_parts[3] == '*' ){\n\t\t\t\t\t\t\t\t\t$valid_class_cs[] = $ip_parts[0] . '.' . $ip_parts[1] . '.' . $ip_parts[2];\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t$valid_ips[] = $ip->ip_address;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// get valid access keys\n\t\t\t\t\t\t$valid_aks = array();\n\t\t\t\t\t\t$sql = \"select access_key from \" . $wpdb->prefix . $this->admin_options_name . \"_access_keys where active = 1\";\n\t\t\t\t\t\t$aks = $wpdb->get_results($sql, OBJECT);\n\t\t\t\t\t\tif( $aks ){\n\t\t\t\t\t\t\tforeach( $aks as $ak ){\n\t\t\t\t\t\t\t\t$valid_aks[] = $ak->access_key;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// manage cookie filtering\n\t\t\t\t\t\tif( $_COOKIE['wpjf3_mr_access_key'] != '' ){\n\t\t\t\t\t\t\t// check versus active codes\n\t\t\t\t\t\t\tif( in_array( $_COOKIE['wpjf3_mr_access_key'], $valid_aks ) ){\n\t\t\t\t\t\t\t\t$wpjf3_matches[] = \"<!-- WPJF_MR: COOKIE MATCH -->\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// manage ip filtering \n\t\t\t\t\t\tif( in_array( $this->get_user_ip(), $valid_ips ) ) {\n\t\t\t\t\t\t\t$wpjf3_matches[] = \"<!-- WPJF_MR: IP MATCH -->\";\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t// check for partial ( class c ) match\n\t\t\t\t\t\t\t$ip_parts = explode( '.', $this->get_user_ip() );\n\t\t\t\t\t\t\t$user_class_c = $ip_parts[0] . '.' . $ip_parts[1] . '.' . $ip_parts[2];\n\t\t\t\t\t\t\tif( in_array( $user_class_c, $valid_class_cs ) ) {\n\t\t\t\t\t\t\t\t$wpjf3_matches[] = \"<!-- WPJF_MR: CLASS C MATCH -->\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( count( $wpjf3_matches ) == 0 ) {\n\t\t\t\t\t\t\t// no match found. show maintenance page / message\n\t\t\t\t\t\t\tif( $wpjf3_mr_options['method'] == 'redirect' ){\n\t\t\t\t\t\t\t\t// redirect\n\t\t\t\t\t\t\t\theader('HTTP/1.1 503 Service Temporarily Unavailable');\n\t\t\t\t\t\t\t\theader('Status: 503 Service Temporarily Unavailable');\n\t\t\t\t\t\t\t\theader('Retry-After: 600');\n\t\t\t\t\t\t\t\theader ( 'Location:'.$wpjf3_mr_options['static_page'] );\n\t\t\t\t\t\t\t\texit();\n\t\t\t\t\t\t\t}else\tif( $wpjf3_mr_options['method'] == 'html' ){\n\t\t\t\t\t\t\t\t\t// html entered only. do not wrap with header or footer\n\t\t\t\t\t\t\t\t\t$this->generate_maintenance_page( $wpjf3_mr_options['maintenance_html'], true );\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t// message\n\t\t\t\t\t\t\t\t$this->generate_maintenance_page( $wpjf3_mr_options['maintenance_html'] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$wpjf3_matches[] = \"<!-- WPJF_MR: REDIR DISABLED -->\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b7f518e3896cc22a37fafd5cc4f1cadc", "score": "0.4558877", "text": "public function hide_add_new_custom_type() {\n\t\tglobal $submenu;\n\t\t// replace my_type with the name of your post type\n\t\tunset($submenu['edit.php?post_type=insta'][10]);\n\t}", "title": "" }, { "docid": "8b6e685cb3a2f2e224e15937abf5e4d7", "score": "0.455508", "text": "function testKeepOnlySlashInUrlWhenOnlyLangGiven() {\n\t\t$_GET = array('url' => 'fre');\n\t\tCaracoleI18n::init();\n\t\t$result = $_GET['url'];\n\t\t$this->assertEqual($result, '/');\n\t}", "title": "" }, { "docid": "104e927661e59de363e18d808ceb1b98", "score": "0.45549315", "text": "function change_permalinks( $post_link, $post, $leavename ) {\n if ( $post->post_type != 'specific-post-type' ) { return $post_link; }\n $post_link = str_replace( '/'.$post->post_type.'/', '/whatever/', $post_link );\n return $post_link;\n}", "title": "" }, { "docid": "88507aaaa3ac55db0e35f94650cff09e", "score": "0.45460725", "text": "public function intercept_wp_router( $continue, WP $wp, $extra_query_vars ) {\n\t\t// Conditions for url path\n\t\terror_log('url_path:');\n\t\t$angular_dashboard = \"/index.php/api/dashboard\";\n\t\t$angular_dns = \"/index.php/api/dns\";\n\t\t$angular_ftp = \"/index.php/api/ftp\";\t\t\n\t\t$angular_zones = \"/index.php/api/zones\";\n\t\t$angular_ssh_settings = \"/index.php/api/settings/ssh\";\n\t\terror_log($_SERVER['REQUEST_URI']);\n\t\t$url_match_dashboard = ( substr( $_SERVER['REQUEST_URI'], 0, strlen( $angular_dashboard ) ) === $angular_dashboard );\n\t\t$url_match_dns = ( substr( $_SERVER['REQUEST_URI'], 0, strlen( $angular_dns ) ) === $angular_dns );\n\t\t$url_match_ftp = ( substr( $_SERVER['REQUEST_URI'], 0, strlen( $angular_ftp ) ) === $angular_ftp );\t\t\n\t\t$url_match_zones = ( substr( $_SERVER['REQUEST_URI'], 0, strlen( $angular_zones ) ) === $angular_zones );\n\t\t$url_match_ssh_settings = ( substr( $_SERVER['REQUEST_URI'], 0, strlen( $angular_ssh_settings ) ) === $angular_ssh_settings );\t\t\n\t\terror_log($url_match_dashboard);\n\t\t$base_index = 'views/index.php';\n\t\tif ($url_match_dashboard)\n\t\t{\n\t\t\terror_log(\"Match dashboard\");\n\t\t\t$this->base_href = $angular_dashboard ;\n\t\t\t$base_index = 'views/dashboard.php';\n\t\t\t$page_title = 'BetterDevOps Ssh Settings';\n\t\t}\n\t\telseif ($url_match_dns)\n\t\t{\n\t\t\terror_log(\"Match dns\");\n\t\t\t$this->base_href = $angular_dns ;\n\t\t\t$base_index = 'views/dns.php';\n\t\t\t$page_title = 'BetterDevOps DNS';\t\t\t\n\t\t}\n\t\telseif ($url_match_ftp)\n\t\t{\n\t\t\terror_log(\"Match zones\");\n\t\t\t$this->base_href = $angular_ftp ;\n\t\t\t$base_index = 'views/ftp.php';\n\t\t\t$page_title = 'BetterDevOps FTP';\t\t\t\t\t\t\t\n\t\t}\n\t\telseif ($url_match_ssh_settings)\n\t\t{\n\t\t\terror_log(\"Match Ssh Settings\");\n\t\t\t$this->base_href = $angular_ssh_settings ;\n\t\t\t$base_index = 'views/ssh_settings.php';\n\t\t\t$page_title = 'BetterDevOps Ssh Settings';\t\t\t\t\t\n\t\t}\t\t\n\t\telse{\n\t\t error_log(\"Does not Match\");\t\t\n\t\t\treturn $continue;\n\t\t}\n\t\t// Vars for index view\n\t\terror_log('Path Match ?');\n\t\t$main_js = $this->auto_version_file( 'dist/js/main.js' );\n\t\t$main_css = $this->auto_version_file( 'dist/css/main.css' );\n\t\t$plugin_url = $this->plugin_url;\n\t\t$current_user = wp_get_current_user();\n\t\t$user_name = $current_user->user_login;\n\t\terror_log('Current Username : ');\t\t\n\t\terror_log($user_name);\n\t\t$user_login = $current_user->user_email;\n\t\terror_log('Current Email : ');\n\t\terror_log($user_login);\t\t\n\t\t$base_href = $this->base_href;\n\t\t//$page_title = 'BetterDevOps DashBoard';\n\n\t\t// Browser caching for our main template\n\t\t$ttl = DAY_IN_SECONDS;\n\t\theader( \"Cache-Control: public, max-age=$ttl\" );\n\n\t\t// Load index view\n\t\tinclude_once( $this->plugin_dir . $base_index );\n\t\texit;\n\t\t//}\n\t}", "title": "" }, { "docid": "fe74b7808377f22a10e9a35e16b46806", "score": "0.45438412", "text": "function yz_redirect_bp_no_access_to_login_page( $data ) {\n if ( $data['mode'] == 2 ) {\n $data['mode'] = 1;\n $data['root'] = yz_get_login_page_url();\n }\n return $data;\n}", "title": "" }, { "docid": "7bc64654f9e5f6f26194ea0963228e5f", "score": "0.45416728", "text": "public function rank_math_build_sitemap_filter( $type ) {\n\t\tglobal $sitepress_settings;\n\t\t// Before to build the sitemap and as we are on front-end just make sure the links won't be translated. The setting should not be updated in DB.\n\t\t$sitepress_settings['auto_adjust_ids'] = 0;\n\n\t\t/**\n\t\t * Remove WPML filters while getting terms, to get all languages\n\t\t */\n\t\tSitepress::get()->remove_term_filters();\n\n\t\treturn $type;\n\t}", "title": "" }, { "docid": "dc055c777727f685e4c41efcf84cd9e9", "score": "0.45362684", "text": "public function beforeFilter()\n {\n parent::beforeFilter();\n $this->RequestHandler->setContent('pl', 'text/pl');\n }", "title": "" }, { "docid": "c2ba1543cbcdc12bb1f9cc1892800097", "score": "0.45353493", "text": "function vt_custom_rewrite_rule() {\n $post_page_ID = get_option( 'page_for_posts' );\t\n\t$post_page_slug = $post_page_ID ? get_post_field( 'post_name', $post_page_ID ) : 'aktuelt';\n\n\tglobal $wp_rewrite;\n\n\t$wp_rewrite->front = $wp_rewrite->root;\n\n\t//$wp_rewrite->set_permalink_structure( $post_page_slug.'/%postname%/' );\n\n\t$wp_rewrite->page_structure = $wp_rewrite->root . '/%pagename%/';\n\n\t//$wp_rewrite->author_base = 'author';\n\t//$wp_rewrite->author_structure = '/' . $wp_rewrite->author_base . '/%author%';\n\n\t$wp_rewrite->set_category_base( $post_page_slug );\n\t$wp_rewrite->set_tag_base( 'tag' );\n\n\t//$wp_rewrite->add_rule( '^'.$post_page_slug.'$', 'index.php', 'top' );\n\n}", "title": "" }, { "docid": "ce378c892151bf8ac22dd1bf6fade45f", "score": "0.4531973", "text": "public function testMatchWithNonRegex()\n {\n $this->router->map(\n 'GET',\n '/about-us',\n 'PagesController#about',\n 'about_us'\n );\n $this->assertEquals(\n array(\n 'target' => 'PagesController#about',\n 'params' => array(),\n 'name' => 'about_us'\n ),\n $this->router->match('/about-us', 'GET')\n );\n $this->assertFalse($this->router->match('/about-us', 'POST'));\n $this->assertFalse($this->router->match('/about', 'GET'));\n $this->assertFalse($this->router->match('/about-us-again', 'GET'));\n }", "title": "" }, { "docid": "8ba9fbcc4b7dd9277a9078506ac7d12f", "score": "0.4530318", "text": "public function test_internalRedirectToBestNamePageOtherBranch($dataStoreType)\n {\n\n\n $redirectManager = admin_plugin_404manager::get()->setDataStoreType($dataStoreType);\n if ($redirectManager->isRedirectionPresent(constant_parameters::$REDIRECT_BEST_PAGE_NAME_SOURCE)) {\n $redirectManager->deleteRedirection(constant_parameters::$REDIRECT_BEST_PAGE_NAME_SOURCE);\n }\n\n\n // Create the target Pages and add the pages to the index, otherwise, they will not be find by the ft_lookup\n saveWikiText(constant_parameters::$REDIRECT_BEST_PAGE_NAME_TARGET_SAME_BRANCH, 'REDIRECT Best Page Name Same Branch', 'Test initialization');\n idx_addPage(constant_parameters::$REDIRECT_BEST_PAGE_NAME_TARGET_SAME_BRANCH);\n saveWikiText(constant_parameters::$REDIRECT_BEST_PAGE_NAME_TARGET_OTHER_BRANCH, 'REDIRECT Best Page Name Other Branch', 'Test initialization');\n idx_addPage(constant_parameters::$REDIRECT_BEST_PAGE_NAME_TARGET_OTHER_BRANCH);\n\n\n // Read only otherwise, you go in edit mode\n global $AUTH_ACL;\n $aclReadOnlyFile = constant_parameters::$DIR_RESOURCES . '/acl.auth.read_only.php';\n $AUTH_ACL = file($aclReadOnlyFile);\n\n global $conf;\n $conf['plugin'][constant_parameters::$PLUGIN_BASE]['ActionReaderFirst'] = action_plugin_404manager::GO_TO_BEST_PAGE_NAME;\n $conf['plugin'][constant_parameters::$PLUGIN_BASE]['WeightFactorForSamePageName'] = 4;\n $conf['plugin'][constant_parameters::$PLUGIN_BASE]['WeightFactorForStartPage'] = 3;\n $conf['plugin'][constant_parameters::$PLUGIN_BASE]['WeightFactorForSameNamespace'] = 5;\n\n $request = new TestRequest();\n $request->get(array('id' => constant_parameters::$REDIRECT_BEST_PAGE_NAME_SOURCE), '/doku.php');\n $response = $request->execute();\n\n\n $locationHeader = $response->getHeader(\"Location\");\n $components = parse_url($locationHeader);\n parse_str($components['query'], $queryKeys);\n\n $this->assertNull($queryKeys['do'], \"The is only shown\");\n $this->assertEquals(constant_parameters::$REDIRECT_BEST_PAGE_NAME_TARGET_SAME_BRANCH, $queryKeys['id'], \"The Id of the source page is the asked page\");\n $this->assertEquals(constant_parameters::$REDIRECT_BEST_PAGE_NAME_SOURCE, $queryKeys[action_plugin_404manager::QUERY_STRING_ORIGIN_PAGE], \"The 404 id must be present\");\n $this->assertEquals(action_plugin_404manager::REDIRECT_SOURCE_BEST_PAGE_NAME, $queryKeys[action_plugin_404manager::QUERY_STRING_REDIR_TYPE], \"The redirect type is known\");\n\n\n }", "title": "" }, { "docid": "69e73d53cf1a2a8e345bb761848328b2", "score": "0.45209306", "text": "public function classifieds_aux_query_special_pages($slug,$post_type) {\n\n global $wpdb;\n $sql = \"\n\t\tSELECT ID, post_name, post_parent, post_type\n\t\tFROM $wpdb->posts\n\t\tWHERE post_name IN ($slug)\n\t\tAND post_type IN ($post_type)\n\t\t\";\n\n $pages = $wpdb->get_results( $sql, OBJECT_K );\n $en_post_id ='';\n\n //Handle WPML multilingual implementation\n if ((is_array($pages)) && (!(empty($pages)))) {\n $result_qty=count($pages);\n if ($result_qty > 1) {\n //Check for multilingual pages\n if (function_exists('icl_object_id')) {\n\n //Get post ID in English, original language\n $top_result= reset($pages);\n if (isset($top_result->ID)) {\n\n $post_id=$top_result->ID;\n //Return the English ID\n $en_post_id=icl_object_id($post_id, $post_type, true,'en');\n\n }\n\n }\n } elseif (1 == $result_qty ) {\n\n //Non-multilingual\n $top_result= reset($pages);\n if (isset($top_result->ID)) {\n $en_post_id =$top_result->ID;\n }\n }\n\n }\n\n return $en_post_id;\n }", "title": "" }, { "docid": "c1842b6615942f5e09b5efda9956e860", "score": "0.45159012", "text": "function ansatt_permalink($permalink, $post_id, $leavename) {\n if (strpos($permalink, '%ansattkategori%') === FALSE) return $permalink;\n // Get post\n $post = get_post($post_id);\n if (!$post) return $permalink;\n\n // Get taxonomy terms\n $terms = wp_get_object_terms($post->ID, 'ansattkategori');\n if (!is_wp_error($terms) && !empty($terms) && is_object($terms[0]))\n $taxonomy_slug = $terms[0]->slug;\n else $taxonomy_slug = 'no-ansattkategori';\n\n return str_replace('%ansattkategori%', $taxonomy_slug, $permalink);\n}", "title": "" }, { "docid": "58096800f6b3cd732f4bb5ff5d9f2736", "score": "0.45090157", "text": "function bbp_admin_setting_callback_search_slug()\n{\n}", "title": "" }, { "docid": "0343a832055e4f49bc235a869077de06", "score": "0.45044526", "text": "function redirectToIndex(){\n\t\tif (! $this->CheckTransactionUser ()) {\n\t\t\t$lan = $this->_getParam ( 'lang' );\n\t\t\t$this->_redirect ( $lan . '/index/index' );\n\t\t\texit ();\n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "be066c13b27bf65b0107271a3e1fca0d", "score": "0.44988862", "text": "static public function menu_fallback() {\n\t\techo '<div class=\"alert-box secondary\">';\n\t\t// Translators 1: Link to Menus, 2: Link to Customize.\n\t\t\tprintf( __( 'Please assign a menu to the primary menu location under %1$s or %2$s the design.', $this->settings['text-domain'] ),\n\t\t\t\tsprintf( __( '<a href=\"%s\">Menus</a>', $this->settings['text-domain'] ),\n\t\t\t\t\tget_admin_url( get_current_blog_id(), 'nav-menus.php' )\n\t\t\t\t),\n\t\t\t\tsprintf( __( '<a href=\"%s\">Customize</a>', $this->settings['text-domain'] ),\n\t\t\t\t\tget_admin_url( get_current_blog_id(), 'customize.php' )\n\t\t\t\t)\n\t\t\t);\n\t\t\techo '</div>';\n\t}", "title": "" }, { "docid": "c208687235a589c7875db12f1812c956", "score": "0.4498184", "text": "function onAfterInitialise()\n\t{\n\t\tglobal $globalnopath, $globalnoroute;\n\t\t$app = JFactory::getApplication();\n\n\t\t// Dont run in admin\n\t\tif ($app->isClient('administrator'))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// **********************************************************\n\t\t// Create global objects of non routable categories and types\n\t\t// **********************************************************\n\n\t\t// Hide Categories from Pathway/URLs for given Types\n\t\t// - These are types that contain content not being a part of structure but rather general information content like site usage instructions or license agreement, etc\n\t\t$route_to_type = $this->params->get('route_to_type', 0);\n\t\t$type_to_route = $this->params->get('type_to_route', '');\n\t\tif ($route_to_type)\n\t\t{\n\t\t\t$globalnopath = $type_to_route;\n\t\t\tif ( empty($type_to_route) )\t\t\t\t\t\t\t$globalnopath = array();\n\t\t\telse if ( ! is_array($type_to_route) )\t\t$globalnopath = explode(\"|\", $type_to_route);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$globalnopath = array();\n\t\t}\n\n\t\t// Hide categories in Content / Content Listings by NOT displaying\n\t\t// a. Direct category links \n\t\t// b. Category title as a content/content list markup \n\t\t// - These categories are for special purposes, e.g. contain items displayed in frontpage or in a module Slideshow\n\t\t$cats_to_exclude = $this->params->get('cats_to_exclude', '');\n\t\t$globalnoroute = $cats_to_exclude;\n\t\tif ( empty($cats_to_exclude) )\t\t\t\t\t\t\t$globalnoroute = array();\n\t\telse if ( ! is_array($cats_to_exclude) )\t\t$globalnoroute = explode(\"|\", $cats_to_exclude);\n\t}", "title": "" } ]
6aaf3eb836f3a43580264b46a4bcbd26
Registers this object as an exception handler. It will then handle all uncaught exceptions, and call the previously defined exception handler.
[ { "docid": "714a7baad5eb00ba1f481c53b0c1916d", "score": "0.79776293", "text": "public function registerHandler()\n {\n $this->previousExceptionHandler = set_exception_handler(array($this, \"handleException\"));\n }", "title": "" } ]
[ { "docid": "8d0a57afe4c31eae1ea99c73e55251ae", "score": "0.8082266", "text": "protected function registerExceptionHandler()\n {\n set_exception_handler(array($this, 'handleUncaughtException'));\n }", "title": "" }, { "docid": "ca03353a9ee9142690fa15168eb892b3", "score": "0.78612685", "text": "protected function registerExceptionHandler()\n\t{\n\t\tset_exception_handler(array($this, 'handleException'));\n\t}", "title": "" }, { "docid": "32282216609190b07b4364e87520a2d2", "score": "0.7428607", "text": "protected function registerExceptionHandler()\n {\n $this->exceptionHandler = ExceptionHandler::register(true);\n $this->exceptionHandler->setDisplayer($this->displayer);\n }", "title": "" }, { "docid": "c77cb355aae906c63a98e4dd2bf1db4b", "score": "0.7410963", "text": "public function registerExceptionHandler()\n {\n return set_exception_handler(array($this, 'exceptionHandler'));\n }", "title": "" }, { "docid": "a82cf601d91219580863d12d775c4203", "score": "0.73424095", "text": "public function registerExceptionHandler()\n\t{\n\t\treturn set_exception_handler(array($this,'exceptionHandler'));\n\t}", "title": "" }, { "docid": "a5075999e30cfaf5383e1961c95d6617", "score": "0.7202234", "text": "public static function exceptionHandler()\n {\n // Register the error handler.\n set_error_handler(function (...$args) {\n (new ExceptionHandler())->error(...$args);\n });\n\n // Register the exception handler.\n set_exception_handler(function (...$args) {\n (new ExceptionHandler())->exception(...$args);\n });\n\n // The error and exception handlers couldn't catch anything,\n // If there's any error aborting the current process is required.\n if (error_get_last() !== null) {\n die(\"500 error in the tower exception handler.\");\n }\n }", "title": "" }, { "docid": "349d4974c1def229b3cd5dff085cec7b", "score": "0.7144121", "text": "protected function registerErrorHandling()\n {\n error_reporting(-1);\n\n set_error_handler(function ($level, $message, $file = '', $line = 0) {\n if (error_reporting() & $level) {\n throw new ErrorException($message, 0, $level, $file, $line);\n }\n });\n\n set_exception_handler(function ($e) {\n $this->handleUncaughtException($e);\n });\n\n register_shutdown_function(function () {\n $this->handleShutdown();\n });\n }", "title": "" }, { "docid": "4be3b9506000b693addaa33d5fc9b050", "score": "0.7116105", "text": "private function registerExceptionHandler()\n {\n $handler = $this->app[ExceptionHandlerContract::class];\n\n $this->singleton(ExceptionHandlerContract::class, function ($app) use ($handler) {\n return new Exceptions\\Handler($app[Contracts\\Tracker::class], $handler);\n });\n }", "title": "" }, { "docid": "b20dbc511cee850f1ce11f29f5829ef5", "score": "0.7071018", "text": "function set_exception_handler ($exception_handler) {}", "title": "" }, { "docid": "ac96805bfb3d7e995d4ce140c1b8be7b", "score": "0.7035365", "text": "protected function registerErrorHandling()\n {\n error_reporting(-1);\n\n set_error_handler(function ($level, $message, $file = '', $line = 0) {\n if (error_reporting() & $level) {\n // ignore ACF non-numeric issue on PHP 7.1.x until it is fixed\n if (stripos($file, 'acf-repeater/views/field.php') !== false && $message === 'A non-numeric value encountered') {\n return false;\n }\n // ignore wordpress test cases\n if ($message === '/tmp/wordpress-tests-lib/includes/../data/themedir1 is not readable') {\n return false;\n }\n\n throw new ErrorException($message, 0, $level, $file, $line);\n }\n });\n\n set_exception_handler(function ($e) {\n $this->handleUncaughtException($e);\n });\n\n register_shutdown_function(function () {\n $this->handleShutdown();\n });\n }", "title": "" }, { "docid": "88f2d8558a6632a7c7cf8a4f34f6512b", "score": "0.7022266", "text": "private function _setupExceptionHandler() {\n // Get the exception handler class name\n $exceptionHandlerClassName = $this->_appConf->getExceptionHandler();\n\n // If there is no exception handler, stops\n if (empty($exceptionHandlerClassName)) {\n return;\n }\n\n // Separate the class name from the method\n $exceptionHandlerInfo = explode('::', $exceptionHandlerClassName);\n\n // If the error handler class and method is not correctly defined\n if (!isset($exceptionHandlerInfo[1])) {\n throw new AppException('The exception handler you specified with the $app[\"exception-handler\"] setting must define a class name and a method, separated by ::');\n }\n\n // Set the error handler\n set_exception_handler($exceptionHandlerClassName);\n }", "title": "" }, { "docid": "420da2037df18cf073d1758c98aba511", "score": "0.66538066", "text": "private function addHandler(): void\n {\n set_exception_handler($this->container['exceptionHandler']);\n set_error_handler($this->container['errorHandler']);\n }", "title": "" }, { "docid": "11f585680773b1609f2c01636e549b9b", "score": "0.659229", "text": "function handler_for_exception(Exception $ex) {}", "title": "" }, { "docid": "1359f5c2b05b3e468a0c9e638dc35d6b", "score": "0.6518692", "text": "protected function registerErrorHandler()\n {\n set_error_handler(array($this, 'handleError'), E_ALL);\n }", "title": "" }, { "docid": "5f46eb3bc7e17a44c5d7ca671ca643f5", "score": "0.6491067", "text": "public static function registerExceptionHandler($handler)\n\t{\n\t\tset_exception_handler($handler);\n\t}", "title": "" }, { "docid": "f4ed192f25ceab0d6cba611a2b9f47a7", "score": "0.64803964", "text": "public function registerErrorHandler()\n {\n set_error_handler(array(static::class, 'handleError'));\n }", "title": "" }, { "docid": "96febf36e1120c0e74433b12b1adc7ae", "score": "0.6463209", "text": "public static function register()\n {\n if (self::$registered) {\n return;\n }\n\n self::$registered = true;\n\n set_error_handler([__CLASS__, 'handleError']);\n set_exception_handler([__CLASS__, 'handleException']);\n register_shutdown_function([__CLASS__, 'shutdown']);\n }", "title": "" }, { "docid": "306e0ddc18ede83247ee9f48235fce7d", "score": "0.64564794", "text": "public static function initializeHandler() {\n set_exception_handler(array('AppKitExceptionHandler', 'logException'));\n set_error_handler(array('AppKitExceptionHandler', 'exceptionOnError'));\n }", "title": "" }, { "docid": "782bbbf6852dba2cbd74f1fff99743c5", "score": "0.6431911", "text": "protected function registerErrorHandler()\n\t{\n\t\tset_error_handler(array($this, 'handleError'));\n\t}", "title": "" }, { "docid": "b0950d04520da8258773ef0907be2ccd", "score": "0.6394662", "text": "public function startErrorHandling() {\n $prev = set_error_handler([$this, 'triggerError'], \\E_ALL);\n if (is_array($prev) && array_shift($prev) === $this) {\n restore_exception_handler();\n }\n return $this;\n }", "title": "" }, { "docid": "dec5981630840ed146154689fbe2b888", "score": "0.6301558", "text": "public static function add_error_handler()\n {\n $error_handler = ['boxwise_error_handler_class', 'boxwise_error_handler'];\n $previous = set_error_handler($error_handler, error_reporting());\n // avoid dead loops\n if ($previous !== $error_handler) {\n self::$previous_error_handler = $previous;\n }\n }", "title": "" }, { "docid": "73cd2fda815494c93bd08c2e29a3fa6f", "score": "0.6298189", "text": "public static function register()\n {\n set_error_handler(function ($errno, $errstr, $errfile, $errline) {\n self::handleError($errno, $errstr, $errfile, $errline);\n });\n set_exception_handler(function ($e) {\n self::handleException($e);\n });\n register_shutdown_function(function () {\n // Handle Fatal error\n $error = error_get_last();\n if (isset($error['type']) && $error['type'] === E_ERROR) {\n self::handleError($error['type'], $error['message'], $error['file'], $error['line']);\n }\n });\n }", "title": "" }, { "docid": "485a0b22bb2e8be8981e60438e139f78", "score": "0.6294691", "text": "public function register() {\n\t\tset_exception_handler([$this, 'handleException']);\n\t\tset_error_handler([$this, 'handleError']);\n\t\tregister_shutdown_function([$this, 'handleFatalError']);\n\t}", "title": "" }, { "docid": "f09ac3db5472a1e8df99088fa1dc848c", "score": "0.62328905", "text": "protected function registerFatalHandler()\r\n {\r\n $error = $this;\r\n\r\n // When shutdown, the current working directory will be set to the web\r\n // server directory, store it for later use\r\n $cwd = getcwd();\r\n\r\n register_shutdown_function(function() use($error, $cwd) {\r\n $e = error_get_last();\r\n if (!$e || !in_array($e['type'], array(E_ERROR, E_CORE_ERROR, E_COMPILE_ERROR, E_PARSE))) {\r\n // No error or not fatal error\r\n return;\r\n }\r\n\r\n ob_get_length() && ob_end_clean();\r\n\r\n // Reset the current working directory to make sure everything work as usual\r\n chdir($cwd);\r\n\r\n $exception = new \\ErrorException($e['message'], $e['type'], 0, $e['file'], $e['line']);\r\n\r\n if ($error->triggerHandler('fatal', $exception)) {\r\n // Handled!\r\n return;\r\n }\r\n\r\n // Fallback to error handlers\r\n if ($error->triggerHandler('error', $exception)) {\r\n // Handled!\r\n return;\r\n }\r\n\r\n // Fallback to internal error Handlers\r\n $error->internalHandleException($exception);\r\n });\r\n }", "title": "" }, { "docid": "15359a0642c9677a850ca867980e60fa", "score": "0.6182637", "text": "function restore_exception_handler () {}", "title": "" }, { "docid": "39b68a65af128d1b2e1732c01108f616", "score": "0.61634654", "text": "public function handle(Exception $exception) {\n $this->onFatalErrorException($exception);\n\n // Call exception handler that was overridden.\n // Or try to call parent::handle($exception)\n if (is_array($this->prevExceptionHandler) && $this->prevExceptionHandler[0] instanceof ExceptionHandler) {\n $this->prevExceptionHandler[0]->handle($exception);\n }\n }", "title": "" }, { "docid": "921fd09f866c8d08af0b0d48d4e1898e", "score": "0.6151911", "text": "public function __construct()\n {\n set_exception_handler([$this, 'handleException']);\n }", "title": "" }, { "docid": "5b94b5022097e940e44030d17830cc9c", "score": "0.6141659", "text": "public function setExceptionHandler(callable $fn = null);", "title": "" }, { "docid": "5b92c94a7736c388ddb9ccfdfc4ed8f4", "score": "0.609185", "text": "protected function registerErrorHandler()\n {\n ErrorHandler::register(E_ALL);\n }", "title": "" }, { "docid": "5a547f015e972f439b98e7cc234e2d19", "score": "0.6041478", "text": "public function addHandler(FTV_Exception_Handler_Interface $handler)\n {\n $this->_handlers[] = $handler;\n }", "title": "" }, { "docid": "79a05a43b2b2914ac3583fa71df6301c", "score": "0.60385895", "text": "protected function _setExceptionAndErrorHandlersForCronTask()\n {\n set_exception_handler(array($this, 'handleExceptionForCronTask'));\n set_error_handler(array($this, 'handleErrorForCronTask'), error_reporting());\n register_shutdown_function(array($this, 'shutdown'));\n }", "title": "" }, { "docid": "dfdba13a3023f7cc630ddd8e12d9b1c5", "score": "0.6018687", "text": "public static function register()\n {\n $instance = self::instance();\n\t\tif (!$instance->registered)\n\t\t{\n\t\t\tset_error_handler([$instance, 'handleError']);\n\t\t\tset_exception_handler([$instance, 'handleException']);\n\t\t\t$instance->registered = true;\n\t\t}\n }", "title": "" }, { "docid": "920d7f4a7da2ec895277809b4d2f71b8", "score": "0.60070974", "text": "private function doErrorhandlingSetup() {\n // Error/exception handlers\r\n set_error_handler( array ( $this, \"doErrorHandling\" ), E_ALL | E_STRICT );\n set_exception_handler( array ( $this, \"doExceptionHandling\" ) );\n }", "title": "" }, { "docid": "f7f2d04e97cb1297330b4ccc0533d27f", "score": "0.59882724", "text": "public static function setExceptionHandler($handler)\n {\n return set_exception_handler($handler);\n }", "title": "" }, { "docid": "940089fc1d618271c60651f255ee260b", "score": "0.59620667", "text": "private function _setupErrorHandler() {\n // Get the error handler class name\n $errorHandlerClassName = $this->_appConf->getErrorHandler();\n\n // If there is no error handler, stops\n if (empty($errorHandlerClassName)) {\n return;\n }\n\n // Separate the class name from the method\n $errorHandlerInfo = explode('::', $errorHandlerClassName);\n\n // If the error handler class and method is not correctly defined\n if (!isset($errorHandlerInfo[1])) {\n throw new AppException('The error handler you specified with the $app[\"error-handler\"] setting must define a class name and a method, separated by ::');\n }\n\n // Set the error handler\n set_error_handler($errorHandlerClassName);\n }", "title": "" }, { "docid": "bb95cb1d2e852f3dfb89f1bd1978f2fb", "score": "0.5949891", "text": "public static function init_error_handler()\r\n {\r\n if (!self::$initialized) {\r\n @set_error_handler(array(__CLASS__, 'error'));\r\n @register_shutdown_function(array(__CLASS__, 'shutdown'));\r\n self::$initialized = true;\r\n }\r\n }", "title": "" }, { "docid": "8671c15df893c401d4f1df4cc2a3d256", "score": "0.59418017", "text": "public static function setupErrorHandler()\n\t{\n\t\tset_error_handler(array(get_class(), 'errorHandler'));\n\t}", "title": "" }, { "docid": "0f53b5d9efda8a8d4c9303bada9a959a", "score": "0.5925039", "text": "public function setExceptionHandler(callable $handler) : Sandbox {\n $this->_exception_handler = $handler;\n return $this;\n }", "title": "" }, { "docid": "f9d155566a576e6fa378f9f0e3a50b73", "score": "0.5874634", "text": "protected function _setDefaultExceptionHandler()\n {\n if (isset($this->_blHandlerSet)) {\n return;\n }\n if ( $this->_showExtendedExceptionInfo() ) {\n // load Whoops\n require getShopBasePath() . 'vendor/autoload.php';\n\n $this->_run = new Whoops\\Run();\n $this->_run->pushHandler(new Whoops\\Handler\\PrettyPageHandler());\n $this->_run->register();\n }\n else {\n parent::_setDefaultExceptionHandler();\n }\n }", "title": "" }, { "docid": "5c3687709ffe2357d336d9507ca9913a", "score": "0.5864863", "text": "public function Attach()\n {\n set_error_handler(array($this, 'HandleError'));\n set_exception_handler(array($this, 'HandleException'));\n register_shutdown_function(array($this, 'HandleShutdown'));\n }", "title": "" }, { "docid": "b70902e3280968dfdaff31c0289a3785", "score": "0.58618575", "text": "protected function setErrorHandlers()\n {\n // both warnings and errors\n set_error_handler(array($this, 'handlePhpError'), E_ALL);\n\n // From PHP Documentation: the following error types cannot be handled with\n // a user defined function using set_error_handler: *E_ERROR*, *E_PARSE*, *E_CORE_ERROR*, *E_CORE_WARNING*,\n // *E_COMPILE_ERROR*, *E_COMPILE_WARNING*\n // That is we need to use also register_shutdown_function()\n register_shutdown_function(array($this, 'handlePhpFatalErrorAndWarnings'));\n }", "title": "" }, { "docid": "29827c4bdd46df9dded249ad1b36da17", "score": "0.58561724", "text": "private static function setErrorHandling()\n {\n ErrorHandler::init();\n }", "title": "" }, { "docid": "239e26c7f0d964d6a1d308ed0f87845f", "score": "0.5807049", "text": "public function onException(Exception $exception);", "title": "" }, { "docid": "91805242af3fa5bb7ea22de8358c0e3d", "score": "0.5757538", "text": "static public function handleException(\\Exception $ex)\n\t{\n\t\t//TODO: Check for stop propagation from event\n\n\t\t$event = new \\Framework\\Events\\CExceptionEvent($ex);\n\n\t\t//Send event to the listeners\n\t\t$listeners = CErrorHandlerObserver::getInstance()->_listeners;\n\t\t$default = $event->triggerListeners($listeners);\n\n\t\tif($default)\n\t\t{\n\t\t\techo \"Global Exception Caught:\\n\";\n\t\t\tvar_dump($ex);\n\t\t}\n\t}", "title": "" }, { "docid": "ee1e2d64c20b0a202e471572d58956c1", "score": "0.573272", "text": "function set_error_handler() \n {\n if (@$this && get_class($this) == __CLASS__) {\n $trace =& $this;\n } else {\n $trace =& new Debug_BacktraceDumper();\n }\n return set_error_handler(array(&$trace, \"__errorHandler\")); \n }", "title": "" }, { "docid": "eddb1cc671eedc3cd849b7896d45264e", "score": "0.57273066", "text": "private function setEsEsHandlerToError(): void\n {\n $handler = new MockHandler([new Missing404Exception()]);\n\n $this->app['config']->set('elasticsearch.connections.table1.handler', $handler);\n }", "title": "" }, { "docid": "64b4c6ee37cb2154fe1faee00a362768", "score": "0.5717912", "text": "public function setExceptionHandler (Callable $handler, $overwrite=false)\n {\n if ($overwrite || !isset($this->exceptionHandler))\n {\n $oldhandler = $this->exceptionHandler;\n $this->exceptionHandler = $handler;\n set_exception_handler($handler);\n return $oldhandler;\n }\n }", "title": "" }, { "docid": "fefe20123877ca01acbe88f0a59ba666", "score": "0.57134885", "text": "public static function restoreExceptionHandler()\n {\n return restore_exception_handler();\n }", "title": "" }, { "docid": "ad990161263520a7b0b762b560078391", "score": "0.57073444", "text": "public function registerErrorHandler($throwErrorExceptions=true) {}", "title": "" }, { "docid": "639b73a7da9ee1d71d358ef8eae299ca", "score": "0.5699048", "text": "public function setException(Exception $e);", "title": "" }, { "docid": "f749d021125b39b99f7209cd3c3566ae", "score": "0.5692651", "text": "protected function setHandlerErrorException()\n {\n set_error_handler(new Handler\\ErrorException(), E_ALL & ~E_NOTICE);\n }", "title": "" }, { "docid": "68800b6845cb48f0c6d3a9bbfb39e566", "score": "0.5679903", "text": "public function register_redirect_handler(): void {\n set_exception_handler(function (\\Throwable $exception): void {\n $this->redirect_to_error_url();\n });\n\n set_error_handler(function (int $err_no, string $err_message, string $err_file, int $err_line): void {\n $this->redirect_to_error_url();\n });\n\n // Strange nesting is to make sure this handler gets called last\n register_shutdown_function(function (): void {\n register_shutdown_function(function (): void {\n $last_error = error_get_last();\n\n if ($last_error !== null) {\n $this->redirect_to_error_url();\n }\n });\n });\n }", "title": "" }, { "docid": "bb6eb640597233af71336f7b65b94932", "score": "0.56753063", "text": "public function exceptionHandler($exception)\n\t{\n\t\t$this->notify(lxError::TYPE_EXCEPTION, $exception->getCode(), get_class($exception), $exception->getMessage(), $exception->getFile(), $exception->getLine(), $exception->getTraceAsString(), $exception->getTrace());\n\t}", "title": "" }, { "docid": "cc2a1ef13447faaebdaf273f20ec92ef", "score": "0.56512535", "text": "protected function resolveExceptionHandler()\n {\n if ($this->bound('Illuminate\\Contracts\\Debug\\ExceptionHandler')) {\n return $this->make('Illuminate\\Contracts\\Debug\\ExceptionHandler');\n } else {\n return $this->make('FatPanda\\Illuminate\\Support\\Exceptions\\Handler');\n }\n }", "title": "" }, { "docid": "53768cb0d594116ce88fea32ab352356", "score": "0.563791", "text": "public function withExceptionHandler(string $typeName, callable $handler)\n {\n $this->exceptionHandlers[$typeName] = $handler;\n }", "title": "" }, { "docid": "e7181789dd6f5db939885cab87d255aa", "score": "0.56334394", "text": "public function handleException(\\Exception $exception)\r\n {\r\n if (!$this->ignorePrevHandler && $this->prevExceptionHandler) {\r\n call_user_func($this->prevExceptionHandler, $exception);\r\n }\r\n\r\n if (404 == $exception->getCode()) {\r\n if ($this->triggerHandler('notFound', $exception)) {\r\n return;\r\n }\r\n }\r\n\r\n if (!$this->triggerHandler('error', $exception)) {\r\n $this->internalHandleException($exception);\r\n }\r\n\r\n restore_exception_handler();\r\n }", "title": "" }, { "docid": "ad3f1eccf23eb2f15accbe1429ebc65c", "score": "0.55878514", "text": "private function setCustomErrorHandler(): void\n {\n set_error_handler(function ($errno, $errstr) {\n $message = \"Memcached error. (Error level: $errno) Original error was: $errstr\";\n throw new CacheStorageException($message);\n });\n }", "title": "" }, { "docid": "53a986277516f4b704ff2683824365f5", "score": "0.5550134", "text": "public function __construct()\n {\n parent::__construct();\n set_exception_handler(array($this, 'handleException'));\n }", "title": "" }, { "docid": "3208865d79b002bf4d113132ca082573", "score": "0.5543559", "text": "protected function initErrorHandler()\n\t{\n\t\tset_error_handler(array($this, 'handleError'));\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "242e3e1786374cff2b66f67bad720655", "score": "0.55180514", "text": "private function registerHandler() {\n $this->handler->register();\n }", "title": "" }, { "docid": "e4e6c95913e8f0c4646b057fccda4d74", "score": "0.55094016", "text": "protected function getExceptionHandler()\n {\n return static::$app->make(Handler::class);\n }", "title": "" }, { "docid": "406fda4ebf9bd8e9a1ce78b71614799d", "score": "0.54698837", "text": "function custom_error_handler($err_code, $err_msg, $err_file, $err_line) {\r\n\t$ExceptionHandle = new ExceptionHandle();\r\n\t$ExceptionHandle ->custom_error_handler($err_code, $err_msg, $err_file, $err_line);\r\n}", "title": "" }, { "docid": "9c10c99eecf6a1b89ecd117473223ac4", "score": "0.5468982", "text": "public static function startExceptionHandling(){\n\t\t\\Illuminate\\Foundation\\Application::startExceptionHandling();\n\t}", "title": "" }, { "docid": "969b37b6792a7ead62ae1587e6b69719", "score": "0.5464565", "text": "public function return_handler()\n {\n set_error_handler([$this, 'error_handler']);\n }", "title": "" }, { "docid": "dd1d0007c369f1f34d59605020851e25", "score": "0.54528093", "text": "public function register()\n {\n ini_set('display_errors', true);\n set_exception_handler([$this, 'handleException']);\n set_error_handler([$this, 'handleError']);\n if ($this->memoryReserveSize > 0) {\n $this->_memoryReserve = str_repeat('x', $this->memoryReserveSize);\n }\n register_shutdown_function([$this, 'handleFatalError']);\n }", "title": "" }, { "docid": "d250ebc72d93c13b3fabbff25652c390", "score": "0.54359597", "text": "public function handleException(\\Exception $exception)\n {\n $this->exception = new RunnableException($exception);\n }", "title": "" }, { "docid": "ef63471f57ee8a3ed973c17340178bcf", "score": "0.543554", "text": "public static function exceptionHandler($e)\n\t{\n\t\tself::newMessage($e);\n\t\tself::customErrorMsg();\n\t}", "title": "" }, { "docid": "dafaad093edc8aeb5fd2a4d15b80c6f2", "score": "0.54156077", "text": "private function exceptionHandler(): callable\n {\n /** @param \\Error|\\Exception $exception */\n return function ($exception) {\n $this->outputError(\n 'Exception',\n $exception->getMessage(),\n $exception->getFile(),\n $exception->getLine(),\n $this->getFormattedTrace($exception->getTrace())\n );\n };\n }", "title": "" }, { "docid": "e698e26a38852e63754a4fd82419ff66", "score": "0.5411335", "text": "public function addErrorLogHandler(): void\n {\n $this->addHandler(function (string $level) {\n $formatter = new LineFormatter(self::FORMAT);\n $formatter->ignoreEmptyContextAndExtra();\n\n $handler = new ErrorLogHandler(ErrorLogHandler::OPERATING_SYSTEM, $level);\n $handler->setFormatter($formatter);\n\n return $handler;\n });\n }", "title": "" }, { "docid": "67445ee4fd9c10e0a28c20fd4fb29a43", "score": "0.5404928", "text": "static private function initErrorHandler () {\n self::$memoryBuffer = str_repeat('*', self::$MEMORY_BUFFER_BYTES);\n\n set_error_handler('\\o\\ErrorHandler::handlePhpRuntimeError');\n register_shutdown_function('\\o\\ErrorHandler::handleShutdown');\n }", "title": "" }, { "docid": "e3c3659a0dd0017523c78f60b0b52ca4", "score": "0.5396853", "text": "public function process() {\n ErrorHandler::logException($this);\n }", "title": "" }, { "docid": "2ab52315d3340f18e65c39523f97ecf4", "score": "0.5389644", "text": "public static function registerErrorHandler($handler)\n\t{\n\t\tset_error_handler($handler);\n\t}", "title": "" }, { "docid": "9033e8a1b2cd761e2f6f97a0879be222", "score": "0.5381133", "text": "public static function init() {\n ErrorHandler::init();\n }", "title": "" }, { "docid": "7c0bd3732ea1852559ac79771d18869b", "score": "0.53786397", "text": "public function registerHandler($exceptionClass, $handlerClass)\n {\n if (!is_a($handlerClass, '\\UserFrosting\\Sprinkle\\Core\\Error\\Handler\\ExceptionHandlerInterface', true)) {\n throw new \\InvalidArgumentException('Registered exception handler must implement ExceptionHandlerInterface!');\n }\n\n $this->exceptionHandlers[$exceptionClass] = $handlerClass;\n }", "title": "" }, { "docid": "9915497c0ee0e3e1decd2ebe501e5a9d", "score": "0.53683", "text": "private function handleException(Exception $e)\n {\n }", "title": "" }, { "docid": "ed5267f3b4393e1063f8bbb30e095ad8", "score": "0.5358841", "text": "public function handleException (Exception $e)\n\t{\n\t\tforeach ($this->callbacks as $callback)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tcall_user_func($callback, $e);\n\t\t\t}\n\t\t\tcatch (Exception $ex)\n\t\t\t{\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a66fa281c96d8a448a6a9d3da04556d2", "score": "0.5353679", "text": "protected function handleException(\\Exception $exception)\n {\n $this->parentHandleException($exception);\n }", "title": "" }, { "docid": "2d4d26f5a107d6dfeb529eab99b10eb2", "score": "0.5344437", "text": "function set_error_handler ($error_handler, $error_types = null) {}", "title": "" }, { "docid": "26d177a65111987ef9427b46ea6c8053", "score": "0.53193355", "text": "final public function exceptionHandler($exception)\n {\n $this->logger->log($exception->getMessage(), PEAR_LOG_ALERT);\n }", "title": "" }, { "docid": "ac39930ccf38420e825ede6c16e23479", "score": "0.5311993", "text": "public static function register()\n {\n error_reporting(-1);\n set_error_handler([new Handler, 'handleError']);\n set_exception_handler([new Handler, 'handleException']);\n register_shutdown_function([new Handler, 'handleShutdown']);\n if (env('APP_ENV') != 'testing') {\n ini_set('display_errors', 'Off');\n }\n }", "title": "" }, { "docid": "0e89a7de534a39211b13a98bfcf3e4aa", "score": "0.53015465", "text": "function exceptionHandler($exception) {\n\n\t\t$this->inExceptionHandler = true;\n\n\t\theader('HTTP/1.1 500 Internal Server Error');\n\n\t\t$this->dispatch(new \\Slipstream\\Common\\Log\\Event\\OutputEventArgs($exception));\n\t\t//$this->fb($Exception);\n\n\t\t$this->inExceptionHandler = false;\n\t}", "title": "" }, { "docid": "ec7742dd8818bdd5fdeed8be41ee4ba4", "score": "0.52983797", "text": "public static function setExceptionHandler($handler){\r\n return \\Illuminate\\Console\\Application::setExceptionHandler($handler);\r\n }", "title": "" }, { "docid": "13b6f62553eb649068eaac9a7136ac6e", "score": "0.5290845", "text": "public static function hookupIfEnabled() \n {\n if (self::$_enabled) {\n register_shutdown_function('ViguErrorHandler::shutdown');\n set_error_handler('ViguErrorHandler::error');\n set_exception_handler('ViguErrorHandler::exception');\n }\n }", "title": "" }, { "docid": "a0afaf2d58c937eaeffa9ba6355b9aa9", "score": "0.52868664", "text": "public function handle( \\Exception $e );", "title": "" }, { "docid": "9cf06478dfac97b13b6d290e1d7dde0b", "score": "0.52790123", "text": "private function processException($exception)\n {\n //TODO - we are now failing. Replace error handler with instant\n //shutdown handler.\n $fallBackHandler = ['Tier\\Tier', 'processException'];\n if (class_exists('\\Throwable') === true) {\n $fallBackHandler = ['Tier\\Tier', 'processThrowable'];\n }\n\n $handler = $this->exceptionResolver->getExceptionHandler(\n $exception,\n $fallBackHandler\n );\n\n// if (is_a($exception, 'Exception') === true) {\n// $exceptionContext = ExceptionContext::fromException($exception);\n// }\n// else {\n// $exceptionContext = ExceptionContext::fromThrowable($exception);\n// }\n\n try {\n// $injector = clone $this->injector;\n// $injector->share($exceptionContext);\n// $injector->execute($handler);\n call_user_func($handler, $exception);\n }\n catch (\\Exception $e) {\n //Fatal error shutdown\n echo $e->getMessage();\n exit(-1);\n }\n catch (\\Throwable $e) {\n //Fatal error shutdown\n echo $e->getMessage();\n exit(-1);\n }\n }", "title": "" }, { "docid": "24d8756a742501ea758b0928bd0bb881", "score": "0.52779377", "text": "protected function revertErrorHandler()\n {\n $handler = new ErrorHandler();\n set_error_handler([$handler, 'errorHandler']);\n }", "title": "" }, { "docid": "aa8ee3e7d741696079f0991a4a3df372", "score": "0.5276567", "text": "public function onException($context, \\Exception $exception);", "title": "" }, { "docid": "2a04cbf302864b12716d244f0a82b8ec", "score": "0.52673906", "text": "public function handleException(\\Exception $exception) {\n\t\t// Log error\n\t\t$user_message = 'Uncaught exception occured';\n\t\t$this->internal_error_logger->critical($user_message, [\n\t\t\t'message' => $exception->getMessage(),\n\t\t\t'file' => $exception->getFile(),\n\t\t\t'line' => $exception->getLine()\n\t\t]);\n\n\t\t// Format error for display\n\t\tif ($this->show_errors) {\n\t\t\t$exception_message = $exception->getMessage();\n\t\t\t$user_message .= \"\\nException message:\\n$exception_message\";\n\t\t}\n\n\t\t// Add error to display storage\n\t\tApplicationErrors::addError($user_message);\n\n\t\t// Flush stored errors\n\t\tApplicationErrors::flush();\n\t\texit();\n\t}", "title": "" }, { "docid": "272a55a4dcfe5cb4304081b92930433e", "score": "0.5249276", "text": "public function setExceptionHandler(ExceptionHandlerInterface $exceptionHandler): self {\n $this->exceptionHandler = $exceptionHandler;\n return $this;\n }", "title": "" }, { "docid": "7516b5e128d97755099fd41159478ada", "score": "0.52358794", "text": "public static function exception_handler($exception) { \n echo \"Exception caught in: \".get_called_class().\":\". $exception->getMessage() .\"\\n\"; \n }", "title": "" }, { "docid": "ca948b7feb5761cc912f5522b7994c2d", "score": "0.52325636", "text": "public function exception_handler($ex) {\n // detect active db transactions, rollback and log as error\n abort_all_db_transactions();\n\n // some hacks might need a cleanup hook\n $this->session_cleanup($ex);\n\n // now let the plugin send the exception to client\n $this->send_error($ex);\n\n // not much else we can do now, add some logging later\n exit(1);\n }", "title": "" }, { "docid": "76e0994bd9f3f53fdba11229f4f67993", "score": "0.52273893", "text": "abstract public function handle (Exception $e);", "title": "" }, { "docid": "4fb9ff73b49919113bd7f299493ea122", "score": "0.52139235", "text": "abstract protected function handleException(RhubarbException $er);", "title": "" }, { "docid": "57d41e33a87a6193085bbbcc9de99fb4", "score": "0.52130425", "text": "static public function handleException($exception)\n\t{\n\t\t$message = ($exception->getMessage()) ? $exception->getMessage() : '{no message}';\n\t\tif ($exception instanceof fException) {\n\t\t\t$trace = $exception->formatTrace();\n\t\t} else {\n\t\t\t$trace = $exception->getTraceAsString();\n\t\t}\n\t\t$code = ($exception->getCode()) ? ' (code ' . $exception->getCode() . ')' : '';\n\t\t\n\t\t$info = $trace . \"\\n\" . $message . $code;\n\t\t$headline = self::compose(\"Uncaught\") . \" \" . get_class($exception);\n\t\t$info_block = $headline . \"\\n\" . str_pad('', strlen($headline), '-') . \"\\n\" . trim($info);\n\t\t\t\t\n\t\tself::sendMessageToDestination('exception', $info_block);\n\t\t\n\t\tif (self::$exception_handler_callback === NULL) {\n\t\t\tif (self::$exception_destination != 'html' && $exception instanceof fException) {\n\t\t\t\t$exception->printMessage();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t\t\t\n\t\ttry {\n\t\t\tself::call(self::$exception_handler_callback, self::$exception_handler_parameters);\n\t\t} catch (Exception $e) {\n\t\t\ttrigger_error(\n\t\t\t\tself::compose(\n\t\t\t\t\t'An exception was thrown in the %s closing code callback',\n\t\t\t\t\t'setExceptionHandling()'\n\t\t\t\t),\n\t\t\t\tE_USER_ERROR\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "6f9a3053d7857c49dc7cda00db157692", "score": "0.518504", "text": "public function setExceptionHandler(DI $di)\n {\n return $this;\n\n set_exception_handler(\n function ($exception) use ($di)\n {\n /** @var $exception Exception */\n\n // Handled exceptions\n if (is_a($exception, 'Phrest\\API\\\\Exceptions\\\\HandledException'))\n {\n /** @var Response $response */\n $response = $di->get('response');\n\n //Set the content of the response\n $response->setContent($exception->getMessage());\n\n return $response->send();\n }\n\n // Log the exception\n error_log($exception);\n error_log($exception->getTraceAsString());\n\n // Throw unhandled exceptions\n throw $exception;\n }\n );\n }", "title": "" }, { "docid": "2aafee0683722f261fb34afc19af56ed", "score": "0.51843715", "text": "public function handleException(\\Exception $e, $callPreviousHandler = true)\n {\n // create a renderer depending on the context\n if (\"cli\" == PHP_SAPI) {\n if (is_resource(STDOUT) && posix_isatty(STDOUT)) {\n // attempt to create the ncurses based renderer\n try {\n $renderer = new ExceptionRendererNcurses($e);\n } catch (\\RuntimeException $e) {\n // failed to create the ncurses based renderer, fallback to the cli renderer\n $renderer = new ExceptionRendererCli($e);\n }\n } else {\n // cli renderer\n $renderer = new ExceptionRendererCli($e);\n }\n } elseif (array_key_exists(\"HTTP_X_REQUESTED_WITH\", $_SERVER) && \"XMLHttpRequest\" == $_SERVER[\"HTTP_X_REQUESTED_WITH\"]) {\n // firephp renderer\n $renderer = new ExceptionRendererFirephp($e);\n } else {\n // html renderer\n $renderer = new ExceptionRendererHtml($e);\n }\n\n // render\n if ($this->applicationConfig) {\n $renderer->setApplicationConfig($this->applicationConfig);\n }\n\n if ($this->profilerManager) {\n $renderer->setProfilerManager($this->profilerManager);\n }\n\n if ($this->dataProfilerManager) {\n $renderer->setDataProfilerManager($this->dataProfilerManager);\n }\n\n $renderer->render();\n $this->handledException = true;\n\n // on appelle le handler précédent\n if ($this->previousExceptionHandler && $callPreviousHandler) {\n call_user_func($this->previousExceptionHandler, $e);\n }\n }", "title": "" }, { "docid": "7a98b6a69595c95e4e4b29da1d4e33cc", "score": "0.5169803", "text": "public static function initialize()\n {\n date_default_timezone_set('Asia/Shanghai');\n Di::getInstance()->set(SysConst::HTTP_EXCEPTION_HANDLER,[ExceptionHandler::class,'handle']);\n\n }", "title": "" }, { "docid": "27a531c056ebf330ecaab5f80c5c7204", "score": "0.5159714", "text": "private function setupErrorHandlers() {\n $container = $this->app->getContainer();\n\n $container['errorHandler'] = function ($c) {\n return function ($request, $response, $exception) use ($c) {\n $logger = new APILogger();\n $logger->exception($exception, null, null);\n return $c['response']->withStatus(500)\n ->withHeader('Content-Type', 'application/json')\n ->write('{\"Error\":\"Something went wrong on our side, no system is perfect. ¯\\_(ツ)_/¯\"}');\n };\n };\n\n $container['phpErrorHandler'] = function ($c) {\n return function ($request, $response, $error) use ($c) {\n $logger = new APILogger();\n $logger->phpError($error, null, null);\n return $c['response']->withStatus(500)\n ->withHeader('Content-Type', 'application/json')\n ->write('{\"Error\":\"Something went wrong on our side, no system is perfect. ¯\\_(ツ)_/¯\"}');\n };\n };\n }", "title": "" }, { "docid": "4e43c53a97b9404eca9ad44cb5007f69", "score": "0.5153897", "text": "protected function log() {\n ErrorHandler::logException($this, true);\n }", "title": "" }, { "docid": "2c9ae662e2e56c2e8c28ebced7e3abe3", "score": "0.5152726", "text": "public static function errors_as_exceptions(): callable|null\n {\n return set_default_error_handler();\n }", "title": "" } ]
e38803ef3ad1abcedc29d8c2115dcfa8
Gets the extended types.
[ { "docid": "1e8f5b46ac53684889d9f2f9c7bda4a0", "score": "0.6112085", "text": "public static function getExtendedTypes(): iterable\n {\n return [SubmitType::class];\n }", "title": "" } ]
[ { "docid": "9a65e05126144970d34cef73ebc5fe7d", "score": "0.74666", "text": "public static function getExtendedTypes(): iterable\n {\n // return FormType::class to modify (nearly) every field in the system\n return [CollectionType::class];\n }", "title": "" }, { "docid": "654bf09a00fd678540fcd29eb18aabbf", "score": "0.7312565", "text": "function getExtendedType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "d6cfcabdbc5773a80e40af8d79989cc5", "score": "0.7103012", "text": "public function getExtensionTypeCombined()\n\t{\n\t\treturn [$this->getExtensionTypeColumn() => $this->getExtensionType()];\n\t}", "title": "" }, { "docid": "d05e486136e6cb97ac73979b3db2f1c4", "score": "0.70721996", "text": "public static function getExtendedTypes(): iterable\n {\n return [FormType::class];\n }", "title": "" }, { "docid": "4ee6b1e7bdf447f379f9bf96c71a3fba", "score": "0.7026216", "text": "public static function getExtendedTypes() : iterable {\n return [TextType::class]; // Extend the button field type\n }", "title": "" }, { "docid": "97e4157e7680bb2afd07312402587694", "score": "0.6917217", "text": "public function getTypes()\n {\n return $this->_includedTypes;\n }", "title": "" }, { "docid": "f31ee5c9f740723d2f39884b4638c074", "score": "0.6811278", "text": "public function getTypes();", "title": "" }, { "docid": "f31ee5c9f740723d2f39884b4638c074", "score": "0.6811278", "text": "public function getTypes();", "title": "" }, { "docid": "32077bf8ba35a544c9aa9087edbeb7d2", "score": "0.67920625", "text": "public function getExtensions();", "title": "" }, { "docid": "32077bf8ba35a544c9aa9087edbeb7d2", "score": "0.67920625", "text": "public function getExtensions();", "title": "" }, { "docid": "2d0dff40732c5ff03d0c4d17de5edff4", "score": "0.6738575", "text": "public function getSubtypes()\n {\n return self::addLL(\n [\n static::SUBTYPE_AUTO,\n static::SUBTYPE_RELATIVE_TO_EASTER,\n ]\n );\n }", "title": "" }, { "docid": "e00f9ddc6092b6c72f371200cb4d87c6", "score": "0.6639573", "text": "function getTypes() {\n if (!$this->types) {\n $this->loadTypes();\n }\n return $this->types;\n }", "title": "" }, { "docid": "587d84a13a61d1290fb7d5dc5c7c2a7f", "score": "0.6608102", "text": "public static function getExtensions() {}", "title": "" }, { "docid": "1c73bac7e81c185b3d4059bc4deeca52", "score": "0.6580627", "text": "public function get_types()\n {\n return $this->getService()->getTypes();\n }", "title": "" }, { "docid": "fb39c657f099650504896a50cf2fcf71", "score": "0.656931", "text": "public function extensions() {\r\n\t\treturn $this->extensions;\r\n\t}", "title": "" }, { "docid": "6ccb61a709755288ce37414b1593eff0", "score": "0.65524834", "text": "public function getTypes()\n {\n return $this->types;\n }", "title": "" }, { "docid": "6ccb61a709755288ce37414b1593eff0", "score": "0.65524834", "text": "public function getTypes()\n {\n return $this->types;\n }", "title": "" }, { "docid": "1080b369181ec5d00d14e78850939b43", "score": "0.65477175", "text": "public static function getExtensions(){}", "title": "" }, { "docid": "5bcd76dbc1b54548dc2f5a0cf8848a40", "score": "0.65415704", "text": "public function getExtensions()\n\t{\n\t\treturn $this->extensions;\n\t}", "title": "" }, { "docid": "0d33a4144876582df433de22cc582a6d", "score": "0.6541044", "text": "public function getTypes() {\n\t\treturn $this->_types;\n\t}", "title": "" }, { "docid": "4541bfd28c07fc5e61b4c6309c759f95", "score": "0.65408903", "text": "public function getExtensions()\n {\n return $this->_extensions;\n }", "title": "" }, { "docid": "b48c939947524f3581ef4efd531c3de5", "score": "0.6527288", "text": "public function getExtensions()\n {\n return $this->extensions;\n }", "title": "" }, { "docid": "b48c939947524f3581ef4efd531c3de5", "score": "0.6527288", "text": "public function getExtensions()\n {\n return $this->extensions;\n }", "title": "" }, { "docid": "b48c939947524f3581ef4efd531c3de5", "score": "0.6527288", "text": "public function getExtensions()\n {\n return $this->extensions;\n }", "title": "" }, { "docid": "3c35030154744282e7ece6668340d1cc", "score": "0.651343", "text": "public function getTypes() {\n return self::$types;\n }", "title": "" }, { "docid": "fca3b41bc8e04cab5ba5c09aff912007", "score": "0.65077037", "text": "protected function getExtensions()\n {\n $entityType = new EntityType($this->mockRegistry($this->getOwners()));\n\n return array(\n new ValidatorExtension($this->mockValidator()),\n // register the type instances with the PreloadedExtension\n new PreloadedExtension(array('entity' => $entityType), array()),\n );\n }", "title": "" }, { "docid": "0c99d8d09c99555318e2d642902bb38c", "score": "0.6507469", "text": "public function getTypes() {\r\n\t\treturn $this->types;\r\n\t}", "title": "" }, { "docid": "1565e5f39c84c66c225a45da663a8ae1", "score": "0.64979845", "text": "protected function _getExtends()\r\n\t{\r\n\t\treturn array(\r\n\t\t\t'ThemeHouse_Objects_Model_Class' => 'ThemeHouse_ExtendClass_Extend_ThemeHouse_Objects_Model_Class',\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "75e35e87a4a5bfd84283f3fbeedf5acd", "score": "0.6468302", "text": "protected function getExtendedInformation()\n {\n return $this->m_extinfo;\n }", "title": "" }, { "docid": "576e21d9da2fcdbc9010e563c46cf130", "score": "0.64657974", "text": "public function getExtensions(): array;", "title": "" }, { "docid": "f45cc263a5e8b977f562bd767293c77e", "score": "0.6440034", "text": "public static function getTypes()\n {\n return static::$types;\n }", "title": "" }, { "docid": "012e681599bfaf28b85476cc48db415c", "score": "0.6431948", "text": "public function get_desired_types() {\n return $this->_desired_types;\n }", "title": "" }, { "docid": "bc0aa43a741d2692c6d23685652d533b", "score": "0.6420058", "text": "protected function system_mime_type_extensions()\n {\n // Returns the system MIME type mapping of MIME types to extensions, as defined in /etc/mime.types (considering the first\n // extension listed to be canonical).\n $out = array();\n $file = fopen('/etc/mime.types', 'r');\n while (($line = fgets($file)) !== false) {\n $line = trim(preg_replace('%//.*%', '', $line));\n if (!$line) {\n continue;\n }\n $parts = preg_split('/\\s+/', $line);\n if (count($parts) == 1) {\n continue;\n }\n $type = array_shift($parts);\n if (!isset($out[$type])) {\n $out[$type] = array_shift($parts);\n }\n }\n fclose($file);\n\n return $out;\n }", "title": "" }, { "docid": "c34cdf64cf4ce65f7d7da11ddf63d6a4", "score": "0.6417548", "text": "public function getAllTypes(): array;", "title": "" }, { "docid": "738fde30ca5ddd1c092ff88323e7bfab", "score": "0.63902354", "text": "public function getTypes() {\n return $this->getConfig()->get('types', []);\n }", "title": "" }, { "docid": "785f70e67b980e3446bf39b9a5cb6577", "score": "0.6372997", "text": "public function listExtensions()\n {\n return $this->requestGet('extensions');\n }", "title": "" }, { "docid": "bd813d98268478c3e56509acbf43001f", "score": "0.63680005", "text": "function GetAltExtensions(){}", "title": "" }, { "docid": "5876b94a15b7cc85b6dcd992a73a8dd4", "score": "0.635981", "text": "public function getTypes() : array\n {\n return $this->types;\n }", "title": "" }, { "docid": "5876b94a15b7cc85b6dcd992a73a8dd4", "score": "0.635981", "text": "public function getTypes() : array\n {\n return $this->types;\n }", "title": "" }, { "docid": "43b1f076178f65acd5b7979cd4d72539", "score": "0.63493025", "text": "public function getTypes(): array\n {\n return self::$types;\n }", "title": "" }, { "docid": "b12781062b52fd0cf169a452db50bd41", "score": "0.6342433", "text": "function ext() {\n return $this->type;\n }", "title": "" }, { "docid": "17e9b891b82614384a7fd08d866d67fe", "score": "0.6336144", "text": "public function getAllTypes()\n {\n $types = $this->getChildTypes();\n $types = array_merge([$this->getType()], $types);\n return $types;\n }", "title": "" }, { "docid": "9a0a51e3acd773203bb5e9163a87ae87", "score": "0.6320643", "text": "public function getTypes(): array;", "title": "" }, { "docid": "9a0a51e3acd773203bb5e9163a87ae87", "score": "0.6320643", "text": "public function getTypes(): array;", "title": "" }, { "docid": "4cecd71a38ab06699508e4cedad6019d", "score": "0.6300055", "text": "public function getExtensions()\n {\n return array_keys($this->extensions);\n }", "title": "" }, { "docid": "d12aae7a1d366be1f9076091dee03d71", "score": "0.629532", "text": "public function getExtraFiletypes()\n\t{\n $filetypes = array();\n $settings = json_decode($this->getConfigValue(self::CONFIG_PATH_FILETYPES));\n if ($settings) {\n foreach($settings as $setting){\n $filetypes[] = $setting->extension;\n }\n }\n $defaultFiletypes = array('doc','docm','docx','csv','xml','xls','xlsx','pdf','zip','tar');\n return array_merge($filetypes,$defaultFiletypes);\n\t}", "title": "" }, { "docid": "51d160bde442b36da743e03b65b25920", "score": "0.62938184", "text": "public function getExtenders()\n {\n return $this->extenders;\n }", "title": "" }, { "docid": "42e40ac9ae1a45359ab29be06b9258c1", "score": "0.6292118", "text": "public function getExtensions(): array\n {\n return $this->_extensions;\n }", "title": "" }, { "docid": "b33259de8c9d502a30edc516c351b64a", "score": "0.62889314", "text": "function get_extensions($type)\r\n {\r\n $type = strtolower($type);\r\n return (array_keys($this->mime_types, $type));\r\n }", "title": "" }, { "docid": "58cf160582f8569fecc15b1bee2e55d3", "score": "0.6280673", "text": "public function getExtensions(): array\n {\n return $this->extensions;\n }", "title": "" }, { "docid": "22ba952e910e8ccf4567d84492f52e65", "score": "0.62703335", "text": "public function getExtensions()\n {\n $xpath = $this->xPath();\n $extensions = $xpath->query('/epp:epp/epp:greeting/epp:svcMenu/epp:svcExtension/epp:extURI');\n foreach ($extensions as $extension)\n {\n $exts[] = $extension->nodeValue;\n }\n return $exts;\n }", "title": "" }, { "docid": "c4d7785c428998005e6977f6ec21a18e", "score": "0.6262078", "text": "public function getTypes()\n\t{\n\t\treturn $this->flattenObjects($this->getProps('rdf:type') );\n\t}", "title": "" }, { "docid": "8b4c16bfcfdefa7619ae9ff77b549c36", "score": "0.62590283", "text": "protected function system_extension_mime_types()\n {\n // Returns the system MIME type mapping of extensions to MIME types, as defined in /etc/mime.types.\n $out = array();\n $file = fopen('/etc/mime.types', 'r');\n while (($line = fgets($file)) !== false) {\n $line = trim(preg_replace('%//.*%', '', $line));\n if (!$line) {\n continue;\n }\n $parts = preg_split('/\\s+/', $line);\n if (count($parts) == 1) {\n continue;\n }\n $type = array_shift($parts);\n foreach ($parts as $part) {\n $out[$part] = $type;\n }\n }\n fclose($file);\n\n return $out;\n }", "title": "" }, { "docid": "3e35014e89da687cc6b038fa4f7cb74d", "score": "0.62226075", "text": "public function getCustomTypes(): array\n {\n return $this->internal_schema->getCustomTypes();\n }", "title": "" }, { "docid": "d3d31fa1831d5ef7b90f15682f752506", "score": "0.6209393", "text": "public function get_banned_extension_list()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $file_types = new File_Types();\n\n return $file_types->get_file_extensions();\n }", "title": "" }, { "docid": "666da4607b1c446834e1702780cd8770", "score": "0.61976314", "text": "public static function extensions()\n\t{\n\t\treturn static::dump(get_loaded_extensions());\n\t}", "title": "" }, { "docid": "59e66c9910ae1cfc93dd64ceb0348065", "score": "0.6193283", "text": "private static function determineExtraTypes()\n {\n $extraTypes = PHP_VERSION_ID < 50400 ? '' : '|trait';\n if (defined('HHVM_VERSION') && version_compare(HHVM_VERSION, '3.3', '>=')) {\n $extraTypes .= '|enum';\n\n return $extraTypes;\n }\n\n return $extraTypes;\n }", "title": "" }, { "docid": "3f01ddb31a8a26fe0636e7b273c368e9", "score": "0.61880225", "text": "public function get_object_subtypes() {\n\t\treturn $this->provider->get_object_subtypes();\n\t}", "title": "" }, { "docid": "c23dd04997eea596eb3b52d2e46f528d", "score": "0.6186127", "text": "public function getExtensions()\r\n {\r\n $data = array($this->_apiKey);\r\n return $this->_callMethod('getExtensions', $data);\r\n }", "title": "" }, { "docid": "74de415481f461319dbcaa6bef88499c", "score": "0.61856717", "text": "public function getTypes()\n {\n return explode('|', $this->getTypesContent());\n }", "title": "" }, { "docid": "ed33683660963cd9b123a4b8a2c90944", "score": "0.61785555", "text": "public function getExtensions(): array\n {\n return [];\n }", "title": "" }, { "docid": "eb9018db91ad026bbc0ab4513292e081", "score": "0.6176417", "text": "public function getExtensions() : array\n {\n return $this->Extensions;\n }", "title": "" }, { "docid": "c1b809daa04ad555e415b5937f76b514", "score": "0.6165528", "text": "public function getPhpExtensions()\n {\n return $this->makeItems(get_loaded_extensions());\n }", "title": "" }, { "docid": "bbc895f69b4d98ba3ead7d198c8e6a01", "score": "0.6162934", "text": "public static function getInstalledFleetbaseExtensions()\n {\n return static::findComposerPackagesWithKeyword('fleetbase-extension');\n }", "title": "" }, { "docid": "b4522d767206944ebaa8577390e594a1", "score": "0.61605495", "text": "protected function getExternalEntityTypes() {\n return $this->entityTypeManager\n ->getStorage('external_entity_type')\n ->loadMultiple();\n }", "title": "" }, { "docid": "2fe4f0a570b9da8363ccf9295a4eb243", "score": "0.6152833", "text": "public function extension_type()\n {\n return $this->belongsToMany(ExtensionType::class)->using(ExtensionTypeExtension::class);\n }", "title": "" }, { "docid": "dae0186aad269a090de257a8c007f3d8", "score": "0.61203986", "text": "protected function get_extensions() {\n\n\t\t// Input Primary: allowed file extensions.\n\t\t$extensions = ! empty( $this->field_data['extensions'] ) ? explode( ',', $this->field_data['extensions'] ) : $this->get_default_extensions();\n\n\t\treturn wpforms_chain( $extensions )\n\t\t\t->map(\n\t\t\t\tstatic function ( $ext ) {\n\n\t\t\t\t\treturn strtolower( preg_replace( '/[^A-Za-z0-9]/', '', $ext ) );\n\t\t\t\t}\n\t\t\t)\n\t\t\t->array_filter()\n\t\t\t->value();\n\t}", "title": "" }, { "docid": "8283b7664f90b9393f9e4218a491131b", "score": "0.6117375", "text": "public function getExtendedType() {\r\n\t\treturn 'collection';\r\n\t}", "title": "" }, { "docid": "5193f70119a0aa3af9e76ecf62aae804", "score": "0.61089545", "text": "public function getExtensionList(){\n return $this->_get(6);\n }", "title": "" }, { "docid": "9d697860a4b4f6ac05ed084e104c2bb1", "score": "0.6107398", "text": "public function getExtensionList(){\n return $this->_get(7);\n }", "title": "" }, { "docid": "1e0757f46e3847451892b20203666c6d", "score": "0.61041695", "text": "public static function getTypes()\n {\n return static::$TYPES;\n }", "title": "" }, { "docid": "a4cb00e169fa284ca033bb8f92b886e0", "score": "0.6100482", "text": "public function ListRenderingExtensions() {\r\n try {\r\n $stdObject = $this->_soapHandle_Exe->ListRenderingExtensions();\r\n $extensionCollection = SSRSTypeFactory::CreateSSRSObject(\r\n 'ExtensionCollection',\r\n $stdObject);\r\n return $extensionCollection->Extensions;\r\n }\r\n catch (SoapFault $soapFault) {\r\n self::ThrowReportException($soapFault);\r\n }\r\n }", "title": "" }, { "docid": "8477388449895d209b5b05286bfb4542", "score": "0.6093806", "text": "public function getExtensionType()\n {\n return $this->extensionType;\n }", "title": "" }, { "docid": "e24579b05a0dd94b6f9cd0f66a60a27f", "score": "0.6093622", "text": "public function getExtensions()\n {\n if ($this->_extensions === null) {\n $this->_extensions = new ExtensionRegistry($this);\n }\n\n return $this->_extensions;\n }", "title": "" }, { "docid": "3cab6590c60d7bea1508e19f78a9d8e8", "score": "0.60831136", "text": "public function getExtensions()\n\t{\n\t\t// Initialiase variables.\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true);\n\n\t\t// Create the base select statement.\n\t\t$query->select('a.*')\n\t\t\t->from($db->quoteName('#__extensions') . ' AS a')\n\t\t\t->where($db->quoteName('a.element') . ' = ' . $db->quote('com_category'));\n\n\n\t\t// Set the query and load the result.\n\t\t$db->setQuery($query);\n\n\t\ttry\n\t\t{\n\t\t\t$result = $db->loadObject();\n\t\t}\n\t\tcatch (RuntimeException $e)\n\t\t{\n\t\t\tthrow new RuntimeException($e->getMessage(), $e->getCode());\n\t\t}\n\n\t\treturn $result;\n\n\t}", "title": "" }, { "docid": "bac18c847cc3d9935c390f89efe2bf4e", "score": "0.6074069", "text": "public function getExtensions()\n {\n $form = new UserImageType(User::class);\n\n return [\n new PreloadedExtension([$form],[]),\n ];\n }", "title": "" }, { "docid": "7e8990f06fb5bf9966956f89f98f626d", "score": "0.6072113", "text": "public function get_types()\n\t{\n\t\t$list = $this->_get_list_provider();\n\t\t\n\t\treturn array_keys($list);\n\t}", "title": "" }, { "docid": "7272c0232a713779f2168568f37c330e", "score": "0.6064471", "text": "public function getExtendedType()\n {\n return FormType::class;\n }", "title": "" }, { "docid": "7dd837aba361d3974c5e378051e7f447", "score": "0.60497653", "text": "protected function _getExtends()\r\n\t{\r\n\t\treturn array(\r\n\t\t\t'ThemeHouse_AddOnManager_Template_Admin_Edit' => 'ThemeHouse_ExtendClass_Extend_ThemeHouse_AddOnManager_Template_Admin_Edit',\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "0ec3e7f3205e5cc29283c2ae3d8c8852", "score": "0.6047462", "text": "public function supported_extensions() {\n return array();\n }", "title": "" }, { "docid": "c7d36b38f1e9f554547ea770f5f2788f", "score": "0.60443515", "text": "public function getSupportedExtensions(): array;", "title": "" }, { "docid": "da8cdc6edbde348508f71acf0eb83e34", "score": "0.6041791", "text": "public function getAllowedExtensions()\n {\n return $this->_allowedExtensions;\n }", "title": "" }, { "docid": "01ddf382438a0450297c414f0d3fb21e", "score": "0.6041445", "text": "public function getAllExtensions(): array\n {\n return $this->getLastSegment()->getAllExtensions();\n }", "title": "" }, { "docid": "3d30cbbfc13d4a41822b94c07527bbce", "score": "0.6036054", "text": "public function getContentTypes(): array\n {\n return $this->get('types');\n }", "title": "" }, { "docid": "82b1fe6ef9f5307d88ff59dd402bbd4e", "score": "0.6022923", "text": "public function getAll()\n {\n $result = $this->wsClient->invokeOperation('listtypes', [ ], 'GET');\n $modules = $result[ 'types' ];\n\n $result = array();\n foreach ($modules as $moduleName) {\n $result[ $moduleName ] = [ 'name' => $moduleName ];\n }\n return $result;\n }", "title": "" }, { "docid": "9a27ec7d19f891457fdca4701e485a41", "score": "0.6004798", "text": "public function getExtensions()\n {\n return [\n 'method' => 'GET',\n 'path' => 'extensions',\n 'params' => [],\n ];\n }", "title": "" }, { "docid": "1ae63d0572e62721556d5724cd6d5f20", "score": "0.6002915", "text": "public function getEventTypes()\n {\n return $this->makeRequest($this->endpoint.'/events/types');\n }", "title": "" }, { "docid": "aec980244a72993f1a25fa1035c2dcf5", "score": "0.5991348", "text": "public function getTypes()\n {\n return $this->supportedType;\n }", "title": "" }, { "docid": "7ce03eca29e945cb20208c80f801a4a0", "score": "0.5979287", "text": "public function getAllowedExtensions()\n {\n return $this->allowedExtensions;\n }", "title": "" }, { "docid": "8731f2d40527e5658f38a92ef447532f", "score": "0.59780014", "text": "abstract public function getTypesInSpecifications();", "title": "" }, { "docid": "cd43aa704c6b336cdc7f4bec4c40d576", "score": "0.5976124", "text": "public function getExtensions()\n\t{\n\t\treturn explode(', ', $this->extensions);\n\t}", "title": "" }, { "docid": "30379e462b34ef05eea8bf996d565991", "score": "0.5972132", "text": "public function getAvailableTypes() {\n $types = Type::getAll();\n $data = array();\n \n foreach ($types as $type) {\n $data[$type->id] = $type->name;\n }\n \n \n return $data;\n }", "title": "" }, { "docid": "6938e966384ceff083d7c046a278d5b3", "score": "0.596082", "text": "public function getAllContentType() {\n return \\Drupal::service('entity.manager')->getStorage('node_type')->loadMultiple();\n }", "title": "" }, { "docid": "e044cc6fa74fae458579964e4f14a4aa", "score": "0.5958103", "text": "public function getCompatibleContentTypes();", "title": "" }, { "docid": "f45025b6b6ca23dbc1b8266ad7e11438", "score": "0.595101", "text": "public function get_extensions()\n {\n if ($this->exts)\n return $this->exts;\n\n if (!$this->sieve)\n return $this->_set_error(self::ERROR_INTERNAL);\n\n $ext = $this->sieve->getExtensions();\n\n if (is_a($ext, 'PEAR_Error')) {\n return array();\n }\n\n // we're working on lower-cased names\n $ext = array_map('strtolower', (array) $ext);\n\n if ($this->script) {\n $supported = $this->script->get_extensions();\n foreach ($ext as $idx => $ext_name)\n if (!in_array($ext_name, $supported))\n unset($ext[$idx]);\n }\n\n return array_values($ext);\n }", "title": "" }, { "docid": "cc5f0d27835d337e01a11383ccc16df8", "score": "0.5950575", "text": "public function getImportExtensions() {\n\t\treturn array_values($this->info['IMPORT']);\n\t}", "title": "" }, { "docid": "7e20a4ed700ea42f955aece0d5f35919", "score": "0.5940685", "text": "protected function get_default_extensions() {\n\n\t\treturn wpforms_chain( get_allowed_mime_types() )\n\t\t\t->array_keys()\n\t\t\t->implode( '|' )\n\t\t\t->explode( '|' )\n\t\t\t->array_diff( $this->blacklist )\n\t\t\t->value();\n\t}", "title": "" }, { "docid": "a7deaba39d8e192b5614899cd8464ba2", "score": "0.5917381", "text": "public function getExtendedType()\n {\n return NodeFormType::class;\n }", "title": "" }, { "docid": "8d67ac9d17b335bd6ed794f20573d40c", "score": "0.59094685", "text": "public function getTypes()\n\t{\n\t\treturn array(\n\t\t\t'photo',\n\t\t\t'coverphoto',\n\t\t\t'group',\n\t\t\t'login',\n\t\t\t'password_change',\n\t\t\t'display_name',\n\t\t\t'email_change',\n\t\t\t'social_account',\n\t\t\t'account',\n\t\t\t'warning',\n\t\t\t'mfa',\n\t\t\t'oauth',\n\t\t\t'admin_mails',\n\t\t\t'terms_acceptance'\n\t\t);\n\t}", "title": "" }, { "docid": "9d26cfd130db4e7b6c1615e61b188564", "score": "0.5906436", "text": "public function getEventTypes();", "title": "" } ]
fc4e89163c46277b87686a0da9ac80e1
/ Set prefix to message
[ { "docid": "41a5f1ffbe1cf34c1e4186bab100e343", "score": "0.0", "text": "public function getFormattedMessage(string $message): string;", "title": "" } ]
[ { "docid": "157c024cb914febead993370916abf55", "score": "0.7668147", "text": "public function setPrefix() {\n\t}", "title": "" }, { "docid": "397d33c3be08c35e9ed6a644f2aa3222", "score": "0.76145947", "text": "public function setPrefix( $prefix );", "title": "" }, { "docid": "3393bad52b0fdfe6fda27c60cfaf337c", "score": "0.7484658", "text": "public function setPrefix($prefix = \"\") {\n $this->_prefix = !empty($prefix) ? $prefix : '';\n }", "title": "" }, { "docid": "20e160a0187d78040447dce8811d44f9", "score": "0.73490965", "text": "public function setPrefix($prefix);", "title": "" }, { "docid": "184b4153c4c7c794efbd0d16312f7524", "score": "0.73322207", "text": "public function setPrefix($prefix)\n {\n $this->prefix = !empty($prefix) ? $prefix . ':' : '';\n }", "title": "" }, { "docid": "2ab1f65d306d30a51963bcdc588cb331", "score": "0.72975504", "text": "function prefix($prefix, &$msg) {\n\t\tif (is_array($msg)) {\n\t\t\t$prefix = array($prefix);\n\t\t\t$msg = array_merge($prefix,$msg);\n\t\t}\n\t\t$msg = $prefix.$msg;\n\t}", "title": "" }, { "docid": "ba0af27ece63cd0c36efade04f731fe6", "score": "0.72200406", "text": "public function setPrefix($prefix){\n\t\t$this->prefix = $prefix;\n\t}", "title": "" }, { "docid": "bb0e9de7bc943611fa33f7d1a1f200dd", "score": "0.7128146", "text": "public function setPrefix($prefix)\n\t{\n\t\t$this->prefix = $prefix;\n\t}", "title": "" }, { "docid": "5d934e5296d7e65b11bebf6072c32288", "score": "0.712719", "text": "public function setPrefix($value)\n {\n $this->prefix = $value;\n }", "title": "" }, { "docid": "ef996a803f000cc681a8a0f8b3690db0", "score": "0.7087384", "text": "public function setPrefix($prefix)\n {\n $this->prefix = $prefix;\n }", "title": "" }, { "docid": "ef996a803f000cc681a8a0f8b3690db0", "score": "0.7087384", "text": "public function setPrefix($prefix)\n {\n $this->prefix = $prefix;\n }", "title": "" }, { "docid": "57c37c27f5e710af8e04ddacabb97d0c", "score": "0.70808744", "text": "public function setPrefix($p)\t{\n\t\t$this->prefix = $p;\n\t}", "title": "" }, { "docid": "54ef38151ddc1cc5f55a85e326b3169c", "score": "0.70710725", "text": "public function setPrefix($prefix) {\n $this->prefix = $prefix;\n }", "title": "" }, { "docid": "54ef38151ddc1cc5f55a85e326b3169c", "score": "0.70710725", "text": "public function setPrefix($prefix) {\n $this->prefix = $prefix;\n }", "title": "" }, { "docid": "2ee812f68719e2a529a97288cce1e88b", "score": "0.7022821", "text": "public function setPrefix(string $prefix): void\n {\n $this->prefix = $prefix;\n }", "title": "" }, { "docid": "2ee812f68719e2a529a97288cce1e88b", "score": "0.7022821", "text": "public function setPrefix(string $prefix): void\n {\n $this->prefix = $prefix;\n }", "title": "" }, { "docid": "b0b729b8d6ec5ed1ce8e1143bfb12920", "score": "0.7017109", "text": "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}", "title": "" }, { "docid": "b32100700711eead2d8550f616d4468a", "score": "0.6921702", "text": "protected function setPrefix()\n {\n if (array_key_exists('prefix', $this->config)) {\n $this->prefix = $this->config['prefix'];\n }\n }", "title": "" }, { "docid": "1139896b40f41f982457e8857b3ebf66", "score": "0.6892542", "text": "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}", "title": "" }, { "docid": "5405f51a8c164e0a4536d393bd12137b", "score": "0.68313324", "text": "public function setPrefix($address_prefix)\n\t{\n\t\t$this->address_prefix = trim($address_prefix);\n\t}", "title": "" }, { "docid": "5e6ec8e657776ef6b75c664010f6830e", "score": "0.6818063", "text": "public function setTitlePrefix($val){ return $this->setField('title_prefix', $val); }", "title": "" }, { "docid": "b988b1a957b948729583497f015e94ef", "score": "0.67623305", "text": "function mPREFIX(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$PREFIX;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:101:3: ( 'prefix' ) \n // Tokenizer11.g:102:3: 'prefix' \n {\n $this->matchString(\"prefix\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "title": "" }, { "docid": "15c59905965a67f21a3a0849838a411b", "score": "0.66978437", "text": "public function prefix($value);", "title": "" }, { "docid": "3c3ba71b18441fadbd64cba7a4eb7011", "score": "0.6677207", "text": "public function setKeyPrefix($prefix)\n\t{\n\t\t$this->_redisKeyPrefix = $prefix;\n\t}", "title": "" }, { "docid": "015babdb659a62bcc5e4c85ff2928b70", "score": "0.6639479", "text": "public function setPrefix($prefix)\n {\n $this->__set(self::FIELD_PREFIX,$prefix);\n return $this;\n }", "title": "" }, { "docid": "558a87940551240ab3d07bc1af178b2f", "score": "0.66379684", "text": "public function setNamespacePrefix($prefix) {\n $this->nsprefix= $prefix;\n }", "title": "" }, { "docid": "fb2b5bcbcbe5c3722132b4b1b75b0ebd", "score": "0.65942746", "text": "public function setPrefix($prefix)\n {\n $this->idPrefix = $prefix;\n }", "title": "" }, { "docid": "913e8f65f959ac452034e974a4e15d51", "score": "0.6551823", "text": "public static function setLockPrefix($prefix)\n {\n self::$lockPrefix = $prefix;\n }", "title": "" }, { "docid": "6b2d0105d2f8d4c187c921918fc94d95", "score": "0.6549312", "text": "public function setPrefix( $prefix ) {\n $this->_prefix = $prefix;\n return $this;\n }", "title": "" }, { "docid": "199be9d488b705b9e7456f4ac90557ea", "score": "0.64658684", "text": "public function getPrefix()\n {\n return $this->prefix ?? '';\n }", "title": "" }, { "docid": "73f64de77d48007a2812c63c1ae68790", "score": "0.64525557", "text": "public function prefix($prefix = null)\n {\n if ($prefix === null) {\n return $this->_prefix;\n }\n return $this->_prefix = $prefix;\n }", "title": "" }, { "docid": "a59dc75f0fe998dd8711a06b19f5b1b6", "score": "0.64326644", "text": "protected function getPrefix()\n {\n $prefix = '';\n return $prefix;\n }", "title": "" }, { "docid": "acecbaa38739d58311ed68207164da34", "score": "0.6429243", "text": "public function getMessageIdPrefix(){\n\n if ($this->_p->getVar('server_name'))\n return $this->_p->getVar('tbl_prefix').md5($this->_p->getVar('server_name')).'_';\n elseif ($this->_p->getVar('mail')['default_from_mail'])\n return $this->_p->getVar('tbl_prefix').md5($this->_p->getVar('mail')['default_from_mail']).'_';\n else\n return $this->_p->getVar('tbl_prefix').md5(dirname(__FILE__)).'_';\n\n }", "title": "" }, { "docid": "dff32d09c6ce24664ab81b024b14cd10", "score": "0.6427511", "text": "public function getPrefix() {}", "title": "" }, { "docid": "dc1112ffb6523f9e067f9b6c0d692873", "score": "0.6409648", "text": "Public Function getPrefix() { Return $this->prefix; }", "title": "" }, { "docid": "e88dd072783a44f47ad35087967e4c0a", "score": "0.6407014", "text": "public function prefix($prefix = null)\n {\n if ($prefix === null) {\n return $this->_prefix;\n }\n\n if (is_string($prefix)) {\n $prefix = $prefix;\n }\n\n return $this->_prefix = $prefix;\n }", "title": "" }, { "docid": "08c493cb455b1c616a1b25223de06a25", "score": "0.6394579", "text": "public function getPrefix()\n\t{\n\t\treturn (strlen($this->prefix) > 0) ? $this->prefix.'_' : '';\n\t}", "title": "" }, { "docid": "e8fd2c23ec07bd8272a03fece5a59d1f", "score": "0.6373959", "text": "public function getPrefix(): string\n {\n }", "title": "" }, { "docid": "540b3705cac3a692ad7d9a26e731b0f4", "score": "0.6356701", "text": "public function getPrefix(): string\n {\n return $this->prefix;\n }", "title": "" }, { "docid": "f68445bf7b9746250b3c1f8c2cd9968f", "score": "0.6355739", "text": "public function setMarkerWithPrefix() {\n\t\t$this->subject->processTemplate(\n\t\t\t'This is some template code. '\n\t\t\t\t.'###FIRST_MARKER### ###MARKER### More text.'\n\t\t);\n\t\t$this->subject->setMarker('marker', 'foo', 'first');\n\t\t$this->assertSame(\n\t\t\t'This is some template code. foo ###MARKER### More text.',\n\t\t\t$this->subject->getSubpart()\n\t\t);\n\t}", "title": "" }, { "docid": "9dd0f29ac591dc22592b2b9f7685d0b8", "score": "0.6341778", "text": "public function setPrice_prefix( $price_prefix ) {\n\t\t$this->price_prefix = $price_prefix;\n\t}", "title": "" }, { "docid": "38f612dd8060a724eb2a1d225fba8c08", "score": "0.63322353", "text": "abstract protected function getDefaultPrefix(): string;", "title": "" }, { "docid": "d9d86a79025d65baf5fb2e29faf2bdf7", "score": "0.6329144", "text": "function setPrefix($str)\r\n\t{\r\n\t\t$this->url_prefix = $str;\r\n\t}", "title": "" }, { "docid": "02899b3aa41e2e4913d08bded49abe11", "score": "0.63100356", "text": "function setWrapperPrefix($sPrefix)\n\t{\n\t\t$this->sWrapperPrefix = $sPrefix;\n\t}", "title": "" }, { "docid": "432fcaf1efad984f5beaaa5fd983aa94", "score": "0.6309139", "text": "public static function setProcessPrefix($prefix)\n\t{\n\t\tself::$processPrefix = $prefix;\n\t}", "title": "" }, { "docid": "c111628d1b359a6597228f81abf56ca2", "score": "0.63075286", "text": "public function test_updatePrefix()\n\t{\n\t}", "title": "" }, { "docid": "0ae1f8bcffd727e09c41e2f226e315e9", "score": "0.630331", "text": "public function getPrefix()\n {\n return '';\n }", "title": "" }, { "docid": "35884fa734d01043296bae549ad9e1f3", "score": "0.62933767", "text": "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 }", "title": "" }, { "docid": "ad17c002381171311419d54e2ca260e4", "score": "0.62698084", "text": "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}", "title": "" }, { "docid": "259e73f38f024c680cb08ba80d8e56b7", "score": "0.62663513", "text": "public function setPrefix($prefix)\n {\n $this->prefix = $prefix;\n return $this;\n }", "title": "" }, { "docid": "2de6738ee1aec7344d109692f827ea55", "score": "0.6263652", "text": "public function setPrefix(string $prefix): self\n {\n $this->prefix = $prefix;\n return $this;\n }", "title": "" }, { "docid": "9fe3b2c422b080a99474333986507b42", "score": "0.62512976", "text": "protected function getPrefix(): string\n\t{\n\t\treturn $this->arParams['PREFIX'] !== '' ? $this->arParams['PREFIX'] : $this->getDefaultPrefix();\n\t}", "title": "" }, { "docid": "b68ef480f6d76113144cf19f34a40211", "score": "0.6245144", "text": "static public function setPrefix($prefix = null)\r\n\t{\r\n\t\t$db = false; $origin = __CLASS__.'::'.__FUNCTION__;\r\n\t\tself::_checkInit();\r\n\t\t$d = self::$config['default'];\r\n\t\tif ('Stream' == $d['writerName']) {\r\n\t\t\t$stream = $d['writerParams']['stream'];\r\n\t\t\t$path = dirname($stream).DIRECTORY_SEPARATOR;\r\n\t\t\t$filename = basename($stream);\r\n\t\t\tif (!is_null(self::$prefix) ) {\r\n\t\t\t\t// strip current prefix\r\n\t\t\t\t$current_prefix = self::$prefix;\r\n\t\t\t\t$filename = substr($filename, strlen($current_prefix.'_') );\r\n\t\t\t}\r\n\t\t\tif (is_null($prefix) ) {\r\n\t\t\t\t$add = '';\r\n\t\t\t} else {\r\n\t\t\t\t$add = $prefix . '_';\r\n\t\t\t}\r\n\t\t\t$prefixed = $path . $add .$filename;\r\n\t\t\tif ($db) {\r\n\t\t\t\tvar_dump($origin, $d, $prefixed);\r\n\t\t\t}\r\n\t\t\tself::$config['default']['writerParams']['stream'] = $prefixed;\r\n\t\t\tself::init(self::$config);\r\n\t\t\tself::$prefix = $prefix;\r\n\t\t\treturn $prefixed;\r\n\t\t} else if ($db) {\r\n\t\t\t\tvar_dump($origin, 'NO STREAM !', $d, $prefix);\r\n\t\t}\r\n\t\treturn NULL;\r\n\t}", "title": "" }, { "docid": "6049cb8ed76a2084c29b4a474a2aa6be", "score": "0.62163246", "text": "public function getPrefix();", "title": "" }, { "docid": "6049cb8ed76a2084c29b4a474a2aa6be", "score": "0.62163246", "text": "public function getPrefix();", "title": "" }, { "docid": "777e41a5dfca2d1989c7ba84ccf587c6", "score": "0.6201492", "text": "function prefix($n = null) {\n\tglobal $ns;\n\tif (is_null($n))\n\t\t$n = array_keys($ns);\n\tif (!is_array($n))\n\t\t$n = array($n);\n\t$ret = \"\";\n\tforeach ($n as $s)\n\t\t$ret .= \"PREFIX $s: <\" . $ns[$s] . \">\\n\";\n\treturn $ret;\n}", "title": "" }, { "docid": "0f4960cd6bfe3d7a08227d4877ffb3f8", "score": "0.61946493", "text": "protected static function prefix(): string\n {\n return '';\n }", "title": "" }, { "docid": "8231c8a3c7b3237499e6c3c0b6b787d5", "score": "0.619223", "text": "public function prefixClassName($prefix) {\n\t\t$this->processedClassCode = preg_replace_callback(self::PATTERN_CLASS_SIGNATURE, function($matches) use ($prefix) {\n\t\t\treturn $matches['modifiers'] . $prefix . $matches['className'] . $matches['parents'];\n\t\t}, $this->processedClassCode);\n\t}", "title": "" }, { "docid": "eba190370b40b1df7870a07076713aa5", "score": "0.617447", "text": "public function tablePrefix( $prefix = null ) {\n\t\treturn wfSetVar( $this->mTablePrefix, $prefix );\n\t}", "title": "" }, { "docid": "9642860a7fa41676d9641b97b557ca67", "score": "0.61609477", "text": "public function addPrefix($prefix, $path) {\r\n if (substr($path, 0, 4) == 'EXT:') {\r\n\t\t $this->prefixes[$prefix] = t3lib_div::getFileAbsFileName($path, 1);\r\n }\r\n else {\r\n\t\t $this->prefixes[$prefix] = $path;\r\n }\r\n\t}", "title": "" }, { "docid": "d20c7946d0e9ad6a541cb74641da6dfd", "score": "0.61586714", "text": "public function setCustomerPrefix($customerPrefix);", "title": "" }, { "docid": "cb8a508f5bb5ba403b4be207a78d6c01", "score": "0.6155066", "text": "public function setPrefix($prefix)\n\t{\n\t\t$this->prefix = $prefix;\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "8be17ffde495b349173575936173c474", "score": "0.61440444", "text": "public function getPrefix()\n\t{\n\t\treturn $this->prefix;\n\t}", "title": "" }, { "docid": "8be17ffde495b349173575936173c474", "score": "0.61440444", "text": "public function getPrefix()\n\t{\n\t\treturn $this->prefix;\n\t}", "title": "" }, { "docid": "8be17ffde495b349173575936173c474", "score": "0.61440444", "text": "public function getPrefix()\n\t{\n\t\treturn $this->prefix;\n\t}", "title": "" }, { "docid": "8be17ffde495b349173575936173c474", "score": "0.61440444", "text": "public function getPrefix()\n\t{\n\t\treturn $this->prefix;\n\t}", "title": "" }, { "docid": "dbe5aaa0d2b3ac4e1b409c9c930968cb", "score": "0.6140093", "text": "public function prefixKey($prefix);", "title": "" }, { "docid": "14c24f1507cb9dccb569468ead77185a", "score": "0.6118854", "text": "public function setNamePrefix(string $prefix): self\n {\n $this->namePrefix = $prefix;\n\n return $this;\n }", "title": "" }, { "docid": "4e51f1f84a87c747f38a7043fa658c7f", "score": "0.6116356", "text": "abstract public function getPrefix(): string;", "title": "" }, { "docid": "45fb69f84ff55294d3890b5dcfdaf97a", "score": "0.6109524", "text": "public function getPrefix()\n {\n return $this->prefix;\n }", "title": "" }, { "docid": "45fb69f84ff55294d3890b5dcfdaf97a", "score": "0.6109524", "text": "public function getPrefix()\n {\n return $this->prefix;\n }", "title": "" }, { "docid": "45fb69f84ff55294d3890b5dcfdaf97a", "score": "0.6109524", "text": "public function getPrefix()\n {\n return $this->prefix;\n }", "title": "" }, { "docid": "45fb69f84ff55294d3890b5dcfdaf97a", "score": "0.6109524", "text": "public function getPrefix()\n {\n return $this->prefix;\n }", "title": "" }, { "docid": "45fb69f84ff55294d3890b5dcfdaf97a", "score": "0.6109524", "text": "public function getPrefix()\n {\n return $this->prefix;\n }", "title": "" }, { "docid": "45fb69f84ff55294d3890b5dcfdaf97a", "score": "0.6109524", "text": "public function getPrefix()\n {\n return $this->prefix;\n }", "title": "" }, { "docid": "45fb69f84ff55294d3890b5dcfdaf97a", "score": "0.6109524", "text": "public function getPrefix()\n {\n return $this->prefix;\n }", "title": "" }, { "docid": "45fb69f84ff55294d3890b5dcfdaf97a", "score": "0.6109524", "text": "public function getPrefix()\n {\n return $this->prefix;\n }", "title": "" }, { "docid": "77476e7ec59cec37fd614d760db3d653", "score": "0.6108761", "text": "public function __construct($prefix)\n\t{\n\t\t$this->prefix = (string)$prefix;\n\t}", "title": "" }, { "docid": "60eafd58b4dcf57c54b78e18ae731499", "score": "0.61028916", "text": "public function setPrefix(string $prefix): self\n {\n $this->prefix = $prefix;\n\n return $this;\n }", "title": "" }, { "docid": "827304389525400275a1f71d1f3e9e9d", "score": "0.60959464", "text": "public function getPrefix(): string\n {\n return (string) $this->prefix;\n }", "title": "" }, { "docid": "374262ba61a553411dc0fe6de5787dbe", "score": "0.6095546", "text": "public function SetErrorLabelPrefix($prefix)\n {\n $this->errorLabelPrefix = $prefix;\n }", "title": "" }, { "docid": "84210411467504ec5141e35e046d3e18", "score": "0.60566115", "text": "public function getPrefix()\n {\n return $this->_prefix;\n }", "title": "" }, { "docid": "39a0b6c07ae18b83650554eaae160132", "score": "0.6050267", "text": "public function setPricePrefix($var)\n {\n GPBUtil::checkString($var, True);\n $this->price_prefix = $var;\n\n return $this;\n }", "title": "" }, { "docid": "29b6f6a2df12f60970151f03353aca0a", "score": "0.60306114", "text": "public static function setFilePrefix($filePrefix) {}", "title": "" }, { "docid": "1b6ee2e35348a5336428ff08c1ed4f1c", "score": "0.6026381", "text": "protected function setTablePrefix()\n {\n }", "title": "" }, { "docid": "242e7e3bde88b8abbbce76de3aee39c7", "score": "0.60219383", "text": "function AddPrefixToFileName() {\n\t\t\t$this->NewFileName = time().'_'.$this->GetFileName();\n\t\t\t//echo $this->NewFileName; exit();\n\t\t\treturn $this->NewFileName;\n\t\t}", "title": "" }, { "docid": "c701f247dece8a44dbe4a0ba2d3a5bf1", "score": "0.60186344", "text": "public function setPrefix(string $prefix = null)\n {\n $this->prefix = $prefix;\n return $this;\n }", "title": "" }, { "docid": "987df38f5651be3fc165d5c1b1360a9d", "score": "0.6006171", "text": "public function getPrefix() {\n return $this->sPrefix;\n }", "title": "" }, { "docid": "895dc965741cb71bfa251c04ce3bddeb", "score": "0.60013694", "text": "public function setPrefix($prefix): self\n {\n $this->prefix = is_array($prefix) ? $prefix : [$prefix];\n\n return $this;\n }", "title": "" }, { "docid": "c5254e8e31f6e605a112c219d0b84a7f", "score": "0.5970909", "text": "public function getPrefix() {\n return $this->_prefix;\n }", "title": "" }, { "docid": "939f58925df22290f70679cbe5d15a06", "score": "0.59564066", "text": "public static function setTablePrefix($prefix)\n {\n }", "title": "" }, { "docid": "bafd6b8d24cfdae19463346652eaf6b9", "score": "0.59419155", "text": "public function set_validater_name_prefix($val)\n {\n $this->_validater_name_prefix = $val;\n }", "title": "" }, { "docid": "a5a3b9a310171f6b1e8c1e14eabff5ea", "score": "0.590609", "text": "public function testPrefix()\n {\n $str = new Str($this->testString);\n $str2 = $str->prefix('the ');\n $this->assertTrue($str2->value === 'the ' . $this->testString);\n }", "title": "" }, { "docid": "46fe1134835a706bfec95b3cc1456689", "score": "0.5901947", "text": "abstract protected function prefixName($name);", "title": "" }, { "docid": "46fe1134835a706bfec95b3cc1456689", "score": "0.5901947", "text": "abstract protected function prefixName($name);", "title": "" }, { "docid": "bfa090fbdb29b7bf2ead6d3fb20895b2", "score": "0.5877813", "text": "public function setPrefix($name)\n\t{\n\t\t$this->royalcms['config']['cache.prefix'] = $name;\n\t}", "title": "" }, { "docid": "68887a04162c777ecd7290ff8d16de5e", "score": "0.5871729", "text": "public static function setPlaceholderPrefix($prefix)\r\n {\r\n self::addPlaceholderClassPrefix($prefix);\r\n }", "title": "" }, { "docid": "675d6af6c1029b75c2f1bf318da7962a", "score": "0.58552563", "text": "public function getPrefix()\n {\n // TODO: Implement getPrefix() method.\n }", "title": "" }, { "docid": "7c0a89c768226994ca6228b504186502", "score": "0.58428806", "text": "public function setPrefix($prefix): self\n {\n $this->prefix = $prefix;\n\n return $this;\n }", "title": "" }, { "docid": "82dba46b0a2defdf0408197819634cf8", "score": "0.5841147", "text": "public function prefix($prefix): static\n {\n $this->prefix = $prefix;\n\n return $this;\n }", "title": "" }, { "docid": "cb3537ccceb293262cec767f0d7fa2d4", "score": "0.58375967", "text": "public function getPrefix() {\n return $this->_prefix;\n }", "title": "" } ]
0994caf92b50b16dddba77ae8ce1d9b9
Check the signature request
[ { "docid": "8df446d336bb54aa0981127a0f95c37e", "score": "0.69767284", "text": "public function checkSignatureRequest($signRef) {\n\n // Get the signRef param\n $query = new \\stdClass();\n $query->signRef = $signRef;\n\n // Form the signature check request\n $apiPost = array(\n 'getOneSignResultRequest' => base64_encode(json_encode($query))\n );\n $apiPostQuery = http_build_query($apiPost);\n\n // Post to FrejaeID API signature check request\n $result = $this->apiRequest(\n '/sign/1.0/getOneResult',\n $apiPostQuery\n );\n\n // If error - return the error object\n if ( ! $result->success)\n return $this->createErrorObject($result->code, $result->data);\n\n // If data status not approved - return the error object\n if ($result->data->status != 'APPROVED')\n return $this->createSuccessObject($result->data);\n\n // Call JWS\n $jws = new \\Gamegos\\JWS\\JWS();\n\n // Try to decode the signature\n try\n {\n $result->data->details = json_decode(json_encode($jws->verify($result->data->details, $this->jwsCert))); //\n $result->data->jwsMessage = 'The signed information is valid.';\n $result->data->jwsVerified = true;\n }\n\n // Else catch exception\n catch (Exception $e)\n {\n try\n {\n $result->data->details = json_decode(json_encode($jws->decode($result->data->details)));\n $result->data->jwsMessage = $e->getMessage();\n $result->data->jwsVerified = false;\n }\n catch (Exception $e)\n {\n return $this->createErrorObject(\n 400,\n 'JWS data decoding from the remote was failed.'\n );\n }\n }\n\n $headers = $result->data->details->headers;\n $payload = $result->data->details->payload;\n\n $userTicket = explode('.', $result->data->details->payload->signatureData->userSignature);\n $userHeader = json_decode(base64_decode($userTicket[0]));\n $userPayload = base64_decode($userTicket[1]);\n $userSignature = $userTicket[2];\n\n // Get the details\n $result->data->details->payload->signatureData = new \\stdClass();\n $result->data->details->payload->signatureData->kid = $userHeader->kid;\n $result->data->details->payload->signatureData->alg = $userHeader->alg;\n $result->data->details->payload->signatureData->content = $userPayload;\n $result->data->details->payload->userInfo = json_decode($result->data->details->payload->userInfo);\n\n $result->data->details = new \\stdClass();\n $result->data->details = $payload;\n $result->data->details->x5t = $headers->x5t;\n $result->data->details->alg = $headers->alg;\n\n // Return the success object\n return $this->createSuccessObject($result->data);\n\n }", "title": "" } ]
[ { "docid": "ba2694a25118d5f00a8d76daa72f42b4", "score": "0.8135828", "text": "private function checkSignature()\n\t{\n\t\t$signature = $_GET[\"signature\"];\n\t\t$timestamp = $_GET[\"timestamp\"];\n\t\t$nonce = $_GET[\"nonce\"];\n\n\t\t$token = TOKEN;\n\t\tlog_message('debug', $signature);\n\t\tlog_message('debug', $timestamp);\n\t\tlog_message('debug', $nonce);\n\t\tlog_message('debug', $token);\n\t\t$tmpArr = array($token, $timestamp, $nonce);\n\t\tsort($tmpArr);\n\t\t$tmpStr = implode( $tmpArr );\n\t\t$tmpStr = sha1( $tmpStr );\n\t\tlog_message('debug', $tmpStr);\n\n\t\tif( $tmpStr == $signature ){\n\t\t\tlog_message('debug', 'return true');\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "4218ca38c04c26b0a1593c6a27fe2166", "score": "0.79839754", "text": "function isValidSignature(){\n\n try{\n\n $request = \\Symfony\\Component\\HttpFoundation\\Request::createFromGlobals();\n $requestWrapper = new RequestWrapper($request);\n\n $keyLoader = new KeyLoader();\n $signer = new Signer( Settings::PROVIDER );\n\n $authenticator = new RequestAuthenticator($signer, '+10 minutes');\n $key = $authenticator->authenticate($requestWrapper, $keyLoader);\n\n if( $key )\n return TRUE;\n\n return FALSE;\n\n }\n catch (\\Exception $e){\n badRequestResponse( $e->getMessage() );\n }\n\n}", "title": "" }, { "docid": "131f36f02233d6a80e6d0a2b15ce9983", "score": "0.7874634", "text": "private function checkSignature(){\n /* if( !defined( \"TOKEN\" ) ){\n throw new Exception( 'TOKEN is not defined!' );\n }*/\n\n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n\n $token = \"D8g14207Q2q83Z2go3B1Bf332GgOo8Q3\";\n $tmpArr = array( $token,$timestamp,$nonce );\n // use SORT_STRING rule\n sort( $tmpArr, SORT_STRING );\n $tmpStr = implode( $tmpArr );\n $tmpStr = sha1( $tmpStr );\n\n if( $tmpStr == $signature ){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "f8f9b4684278528396fd896057a19f74", "score": "0.78593916", "text": "private function checkSignature()\n\t{\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n \n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \t\t\n\t\t$token = TOKEN;\n\t\t$tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n\t\tsort($tmpArr, SORT_STRING);\n\t\t$tmpStr = implode( $tmpArr );\n\t\t$tmpStr = sha1( $tmpStr );\n\t\t\n\t\tif( $tmpStr == $signature ){\n return true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "7e3a580c9e877f124e1007f8f1898628", "score": "0.7844748", "text": "private function checkSignature()\r\n\t{\r\n if (!defined(\"TOKEN\")) {\r\n throw new Exception('TOKEN is not defined!');\r\n }\r\n \r\n $signature = $_GET[\"signature\"];\r\n $timestamp = $_GET[\"timestamp\"];\r\n $nonce = $_GET[\"nonce\"];\r\n \t\t\r\n\t\t$token = TOKEN;\r\n\t\t$tmpArr = array($token, $timestamp, $nonce);\r\n // use SORT_STRING rule\r\n\t\tsort($tmpArr, SORT_STRING);\r\n\t\t$tmpStr = implode( $tmpArr );\r\n\t\t$tmpStr = sha1( $tmpStr );\r\n\t\t\r\n\t\tif( $tmpStr == $signature ){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "20b1814f4faefa8aab3108fbc86b51e7", "score": "0.78351086", "text": "private function checkSignature()\n\t{\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n\n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n\n\t\t$token = TOKEN;\n\t\t$tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n\t\tsort($tmpArr, SORT_STRING);\n\t\t$tmpStr = implode( $tmpArr );\n\t\t$tmpStr = sha1( $tmpStr );\n\n\t\tif( $tmpStr == $signature ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "a725c1805b414042598e404f0f6777dc", "score": "0.78349316", "text": "private function checkSignature() {\r\n if (!defined(\"TOKEN\")) {\r\n throw new Exception('TOKEN is not defined!');\r\n }\r\n\r\n $signature = $_GET[\"signature\"];\r\n $timestamp = $_GET[\"timestamp\"];\r\n $nonce = $_GET[\"nonce\"];\r\n\r\n $token = TOKEN;\r\n $tmpArr = array($token, $timestamp, $nonce);\r\n // use SORT_STRING rule\r\n sort($tmpArr, SORT_STRING);\r\n $tmpStr = implode( $tmpArr );\r\n $tmpStr = sha1( $tmpStr );\r\n\r\n if( $tmpStr == $signature ){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "2c5817d171eac28c7905766f91f70486", "score": "0.78163654", "text": "public function checkSignature() {\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n\n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n $token = TOKEN;\n $tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n sort($tmpArr, SORT_STRING);\n $tmpStr = implode($tmpArr);\n $tmpStr = sha1($tmpStr);\n if ($tmpStr == $signature) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "02091f85e0aa41eaf7b5d5401031667c", "score": "0.7782847", "text": "private function checkSignature()\n {\n if (! defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n \n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \n $token = TOKEN;\n $tmpArr = array(\n $token,\n $timestamp,\n $nonce\n );\n // use SORT_STRING rule\n sort($tmpArr, SORT_STRING);\n $tmpStr = implode($tmpArr);\n $tmpStr = sha1($tmpStr);\n \n if ($tmpStr == $signature) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "aff0ef69aae00d4d4a5f89559ddd8077", "score": "0.7761586", "text": "private function checkSignature(){\n if (!defined(\"TOKEN\")) {\n throw new \\Exception('TOKEN is not defined!');\n }\n $signature = Request::input(\"signature\");\n $timestamp = Request::input(\"timestamp\");\n $nonce = Request::input(\"nonce\");\n\n $token = TOKEN;\n $tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n sort($tmpArr, SORT_STRING);\n $tmpStr = implode( $tmpArr );\n $tmpStr = sha1( $tmpStr );\n if( $tmpStr == $signature ){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "316ca74b5f4da7a14693dd2f3080dc88", "score": "0.77473164", "text": "private function checkSignature() //校验 署名\n {\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!'); //抛出一个异常\n }\n \n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \n $token = TOKEN;\n $tmpArr = array($token, $timestamp, $nonce); //把获取到的参数 放进一个临时数组\n // use SORT_STRING rule \n sort($tmpArr, SORT_STRING); //排序算法,原有的sort($tmpArr)修改为sort($tmpArr, SORT_STRING),php中sort()函数默认为SORT_REGULAR,即原来的数据类型。\n $tmpStr = implode( $tmpArr );\n $tmpStr = sha1( $tmpStr );\n \n if( $tmpStr == $signature ){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "e5e66e594ae9db5d3b6b3ce9cd01087e", "score": "0.76478165", "text": "public function verifySignature()\n {\n $webhooksService = $this->ostObj->services->webhooks;\n $params = array();\n $params[\"version\"] = \"2\";\n $params[\"webhook_secret\"] = \"mySecret\";\n $data = array();\n $data[\"hello\"] = \"hello\";\n $params[\"stringified_data\"] = json_encode($data);\n $params[\"request_timestamp\"] = \"1559902637\";\n $params[\"signature\"] = \"2c56c143550c603a6ff47054803f03ee4755c9c707986ae27f7ca1dd1c92a824\";\n $response = $webhooksService->verifySignature($params);\n $this->assertTrue($response == true);\n }", "title": "" }, { "docid": "a206bddbf065032c4c10363f0047e6b0", "score": "0.74400866", "text": "public function isSignatureMatch();", "title": "" }, { "docid": "118497cd614a8ea25fef4d5b9590ff54", "score": "0.7322928", "text": "function verifyWebhookSignature() {\n $options = $this->options;\n\n // 1. Get the request body\n $body = file_get_contents( 'php://input' );\n \n // 2. Get Dwolla's signature\n $headers = getallheaders();\n $signature = $headers['X-Dwolla-Signature'];\n\n // 3. Calculate hash, and compare to the signature\n $hash = hash_hmac( 'sha1', $body, $options['api_secret'] );\n $validated = ( $hash == $signature );\n \n if ( !$validated ) {\n return $this->setError( 'Dwolla signature verification failed.' );\n }\n \n return true;\n }", "title": "" }, { "docid": "1715ce772d4c84b692b355e0c6917be7", "score": "0.72779185", "text": "private function checkSignedHeaders($request)\n {\n $verify_signature = openssl_verify($request->input('appson-messaging-message'), base64_decode($request->input('appson-messaging-signature')), config('general.messaging_public_key'));\n if ($verify_signature != 1) {\n return \"We do not trust you!\";\n }\n }", "title": "" }, { "docid": "8aa62c7648b9cead7fd6d2a8a2f03d36", "score": "0.722792", "text": "public function verifyOauthSignature() {\n\t\t$proxy = new RequestProxyController($this);\n\t\t$params = $proxy->parameters();\n\t\t$token = '';\n\t\tif (isset($params['oauth_token'])) {\n\t\t\t$token = $params['oauth_token'];\n\t\t}\n App::uses('ClassRegistry', 'Utility');\n $serverRegistry = ClassRegistry::init('OauthServer.ServerRegistry');\n\t\t$this->tokenData = $serverRegistry->AccessServerToken->find('first', array(\n\t\t\t'conditions' => array(\n\t\t\t'AccessServerToken.token' => $token,\n\t\t\t'AccessServerToken.authorized' => 1)));\n\t\ttry {\n\t\t\t$valid = Signature::verify($this, array(\n\t\t\t\t'consumer_secret' => $this->tokenData['ServerRegistry']['consumer_secret'],\n\t\t\t\t'token_secret' => $this->tokenData['AccessServerToken']['token_secret']));\n\t\t} catch(Exception $e) {\n\t\t\t$valid = false;\n\t\t}\n\t\tif (!$valid) {\n\t\t\tConfigure::write('debug', 0);\n\t\t\theader(\"HTTP/1.1 401 Unauthorized\");\n\t\t\techo \"Invalid OAuth Request\";\n\t\t\texit;\n\t\t}\n\t\treturn $valid;\n\t}", "title": "" }, { "docid": "f692b6a2b956707e2ee63c328642a047", "score": "0.71996325", "text": "public function check_signature(&$request, $consumer, $token, $signature) {\n $decoded_sig = base64_decode($signature);\n \n $base_string = $request->get_signature_base_string();\n \n // Fetch the public key cert based on the request\n $cert = $this->fetch_public_cert($request);\n \n // Pull the public key ID from the certificate\n $publickeyid = openssl_get_publickey($cert);\n \n // Check the computed signature against the one passed in the query\n $ok = openssl_verify($base_string, $decoded_sig, $publickeyid);\n \n // Release the key resource\n openssl_free_key($publickeyid);\n \n return $ok == 1;\n }", "title": "" }, { "docid": "1b48dd379208e1d7420f557752dce3e5", "score": "0.7086119", "text": "public function isSignedRequestValid() {\n if (!($signed_request = $this->app[\"request\"]->get(\"signed_request\"))) {\n throw new \\BadFunctionCallException(\"Not a signed request\");\n }\n list($encoded_sig, $payload) = explode('.', $signed_request, 2);\n\n $sig = self::base64_url_decode($encoded_sig);\n $data = json_decode(self::base64_url_decode($payload), true);\n\n if (strtoupper($data['algorithm']) !== 'HMAC-SHA256') {\n throw new \\UnexpectedValueException(\"Unknown algorithm. Expected HMAC-SHA256\");\n }\n\n $expected_sig = hash_hmac('sha256', $payload, $this->app_secret, $raw = true);\n\n return $sig == $expected_sig;\n }", "title": "" }, { "docid": "370b197d0ba7f0ac7b22d663012de72d", "score": "0.7068932", "text": "protected function _isValidSignature()\n\t{\n\t\treturn $this->_generateRavenSignature() == $this->getData('md_signature') ? true : false;\n\t}", "title": "" }, { "docid": "6e31b1966a090ac7768fa760374fd500", "score": "0.70235133", "text": "private function validate()\n {\n return hash_equals(\n hash_hmac(\n $this->algorithm,\n file_get_contents('php://input'),\n $this->secret\n ),\n $this->signature\n );\n }", "title": "" }, { "docid": "751258566619b59ef0e3714796b027d0", "score": "0.6923199", "text": "function checkSignature($token){\n // 1)将token、timestamp、nonce三个参数进行字典序排序\n $timestamp = $_GET['timestamp'];\n $nonce = $_GET['nonce'];\n $signature = $_GET['signature'];\n $temArr = array($timestamp, $nonce, $token);\n sort($temArr);\n\n //2)将三个参数字符串拼接成一个字符串进行sha1加密\n $temStr = implode( $temArr );\n $temStr = sha1($temStr);\n\n //3)开发者获得加密后的字符串可与signature对比,标识该请求来源于微信\n if ($temStr == $signature && isset($_GET['echostr'])) {\n $echostr = $_GET['echostr'];\n echo $echostr;\n exit;\n }\n else{\n return '{\"errcode\":-1,\"errmsg\":\"失败\"}';\n }\n}", "title": "" }, { "docid": "8f35380f8ce3653c3ac6a6ffe6be59ae", "score": "0.6911529", "text": "public function check_signature($request, $consumer, $token, $signature) {\n $built = $this->generateSignature($request, $consumer, $token);\n return $built == $signature;\n }", "title": "" }, { "docid": "d9954df05d38b1cfc46aa4e74049c161", "score": "0.68654007", "text": "private function check_signature(&$request, $consumer, $token)\n {\n // this should probably be in a different method\n global $OAuth_last_computed_signature;\n $OAuth_last_computed_signature = false;\n \n $timestamp = @$request->get_parameter('oauth_timestamp');\n $nonce = @$request->get_parameter('oauth_nonce');\n \n $this->check_timestamp($timestamp);\n $this->check_nonce($consumer, $token, $nonce, $timestamp);\n \n $signature_method = $this->get_signature_method($request);\n \n $signature = $request->get_parameter('oauth_signature');\n $valid_sig = $signature_method->check_signature($request, $consumer, $token, $signature);\n \n if (! $valid_sig) {\n $ex_text = \"Invalid signature\";\n if ($OAuth_last_computed_signature) {\n $ex_text = $ex_text . \" ours= $OAuth_last_computed_signature yours=$signature\";\n }\n throw new OAuthException($ex_text);\n }\n }", "title": "" }, { "docid": "689ff6af360b95c7357367e226c0aced", "score": "0.6860717", "text": "public function isSignatureCorrect() {\n try {\n $this->_verifySignature();\n } catch (\\Exception $ex) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "ab01a5e87dfd7d9907a403cdd869633d", "score": "0.68426883", "text": "public static function checkSignature($data, $signature, $public_key) {\n\t\t$res = ec_verify($data, $signature, $public_key);\n// _log(\"check_signature: $data | signature=$signature | pub_key=$public_key | res=$res\");\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "5215c6bea4e66de0b6a35708fee681f1", "score": "0.68230057", "text": "protected function hasValidSignature(HttpRequest $request): bool\n {\n $query = $request->headers->get('query-string');\n\n $url = $request->url->getAbsoluteUrl(false);\n\n $filtered = array_filter(explode('&', $query),\n function ($v) {\n return Str::hay($v)->before('=') !== 'signature';\n });\n\n $original = $url.'?'.implode('&', $filtered);\n $signature = Hasher::hashData($original, $this->appKey);\n\n return Hasher::checkHash($signature, $request->input('signature'));\n }", "title": "" }, { "docid": "b24ca38d45c0736e9602aad1d0404423", "score": "0.68154347", "text": "public function verifyingSignatures(): bool\n {\n $httpClient = new GuzzleClient;\n\n $response = $httpClient->request('POST', $this->getOpenIdUrl(), [\n 'form_params' => $this->getOpenIdValidationParams(),\n ]);\n\n $content = $response->getBody()->getContents();\n\n return strpos($content, 'is_valid:true') !== false;\n }", "title": "" }, { "docid": "7325a43fa278d40fada6d31bda50ab95", "score": "0.68154144", "text": "public function verify_request(&$request)\n {\n global $OAuth_last_computed_signature;\n $OAuth_last_computed_signature = false;\n $this->get_version($request);\n $consumer = $this->get_consumer($request);\n $token = $this->get_token($request, $consumer, \"access\");\n $this->check_signature($request, $consumer, $token);\n return array(\n $consumer,\n $token\n );\n }", "title": "" }, { "docid": "74369d2850975d91d2f02ef1f5991ad4", "score": "0.6779717", "text": "function parse_signed_request($signed_request, $secret) {\n list($encoded_sig, $payload) = explode('.', $signed_request, 2); \n\n // decode the data\n $sig = base64_url_decode($encoded_sig);\n $data = json_decode(base64_url_decode($payload), true);\n\n if (strtoupper($data['algorithm']) !== 'HMAC-SHA256') {\n error_log('Unknown algorithm. Expected HMAC-SHA256');\n return null;\n }\n\n // check sig\n $expected_sig = hash_hmac('sha256', $payload, $secret, $raw = true);\n if ($sig !== $expected_sig) {\n error_log('Bad Signed JSON signature!');\n return null;\n }\n\n return $data;\n}", "title": "" }, { "docid": "62b741e118ff9a781b4e0c2efcd56a3b", "score": "0.67401785", "text": "public function isSignaturePart();", "title": "" }, { "docid": "4d1ffe0125923d47ef5df3cca38dfa36", "score": "0.6704404", "text": "function verify_signature( $name = null, $args = array(), $content = null ) {\n\n\t\t$enabledVerification = get_option('oxygen_vsb_enable_signature_validation');\n\n\t\tif(!$enabledVerification) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$key = $this->get_key();\n\t\t// Extract signature from args\n\t\t$signature_arg = $this->get_shortcode_signature_arg();\n\t\tif ( !empty( $args[ $signature_arg ] ) ) {\n\t\t\t$signature = $args[ $signature_arg ];\n\t\t\tunset( $args[ $signature_arg ] );\n\t\t\t$hash = hash_hmac( $this->algo, serialize( array( $name, wp_unslash( $args ), wp_unslash( $content ) ) ), $key );\n\t\t\tif ( true === hash_equals( $hash, $signature ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "adbf73853ecabc8cf1d4b471f135e89c", "score": "0.66745466", "text": "private function verify_request()\n {\n try{\n $headers = $this->input->request_headers();\n $token = $headers['X-API-KEY'];\n if(!$token) {\n $status = parent::HTTP_UNAUTHORIZED;\n $res = ['status' => $status, 'msg' => 'Unauthorized access!'];\n $this->response($res, $status);\n return;\n }\n\n $data = AUTHORIZATION::validateToken($token);\n if($data === false){\n $status = parent::HTTP_UNAUTHORIZED;\n $res = ['status' => $status, 'msg' => 'Unauthorized accesss'];\n $this->response($res, $status);\n exit();\n }else{\n return $data;\n }\n\n }catch(Exception $e){\n $status = parent::HTTP_UNAUTHORIZED;\n $res = ['status' => $status, 'msg' => 'Unauthorized access!'];\n $this->response($res, $status);\n }\n }", "title": "" }, { "docid": "adbf73853ecabc8cf1d4b471f135e89c", "score": "0.66745466", "text": "private function verify_request()\n {\n try{\n $headers = $this->input->request_headers();\n $token = $headers['X-API-KEY'];\n if(!$token) {\n $status = parent::HTTP_UNAUTHORIZED;\n $res = ['status' => $status, 'msg' => 'Unauthorized access!'];\n $this->response($res, $status);\n return;\n }\n\n $data = AUTHORIZATION::validateToken($token);\n if($data === false){\n $status = parent::HTTP_UNAUTHORIZED;\n $res = ['status' => $status, 'msg' => 'Unauthorized accesss'];\n $this->response($res, $status);\n exit();\n }else{\n return $data;\n }\n\n }catch(Exception $e){\n $status = parent::HTTP_UNAUTHORIZED;\n $res = ['status' => $status, 'msg' => 'Unauthorized access!'];\n $this->response($res, $status);\n }\n }", "title": "" }, { "docid": "74d91b9dd3e99aab4a478c7dfb500ffa", "score": "0.666926", "text": "private function validateRequest( $request )\n\t{\n\t\t$token = $request['requestToken'];\n\t\tunset( $request['requestToken'] );\n\n\t\tif ( $token === OriginAPI::generateSignedRequest( http_build_query( $request ) ) )\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tOutput::render404( );\n\t}", "title": "" }, { "docid": "9ffde80c8dd49911d9723dd003bf900d", "score": "0.66403174", "text": "public function verifySignatureFromGlobals()\n {\n $eventID = isset($_SERVER['HTTP_OKTAVE_EVENT_ID']) ? $_SERVER['HTTP_OKTAVE_EVENT_ID'] : null;\n $requestTimestamp = isset($_SERVER['HTTP_OKTAVE_TIMESTAMP']) ? (int) $_SERVER['HTTP_OKTAVE_TIMESTAMP'] : null;\n $signature = isset($_SERVER['HTTP_OKTAVE_SIGNATURE']) ? $_SERVER['HTTP_OKTAVE_SIGNATURE'] : null;\n\n if (!$eventID) {\n throw new ValidationException('The \"eventID\" value is missing.');\n }\n if (!$requestTimestamp) {\n throw new ValidationException('The \"requestTimestamp\" value is missing or invalid.');\n }\n if (!$signature) {\n throw new ValidationException('The \"signature\" value is missing.');\n }\n\n return $this->verifySignature($eventID, $requestTimestamp, $signature);\n }", "title": "" }, { "docid": "1961dad1356577bc5dd3df4488afd180", "score": "0.6606213", "text": "public static function check_signature(array $data):bool\n {\n self::checkResponseContent($data);\n\n $signature_received = $data[\"signature\"];\n\n $new_signature = $data[\"transaction_ref\"] . $data[\"transaction_type\"] . $data[\"transaction_amount\"] .\n $data[\"transaction_currency\"] . $data[\"transaction_operator\"] . Env::getPrivateKey();\n\n $new_md5_signature = md5($new_signature);\n\n return $signature_received === $new_md5_signature;\n }", "title": "" }, { "docid": "5fe88c24ea2640ad20b25cd669678588", "score": "0.66028076", "text": "public function testSignature()\n {\n // same checks for the type fo the assertion too\n $this->assertSame(\n $this->expectedSignature,\n $this->testClass->generateSignature(\n $this->getSignParams(),\n $this->buyLinkSecret\n )\n );\n\n // incorrect signature values\n $this->assertNotSame(\n $this->expectedSignature,\n $this->testClass->generateSignature(\n $this->getIncorrectSignParams(),\n $this->buyLinkSecret\n )\n );\n\n $this->assertNotSame($this->expectedSignature, 'incorrect');\n }", "title": "" }, { "docid": "0e96a63e72f90121dc6a492dc493fe26", "score": "0.6595938", "text": "public function validateHeader($request)\n {\n \n //$dm = new DMS();\n //fetch header value\n $signature = $request->header('x-twitter-webhooks-signature');\n //split signature to get hash algorithm used\n $signatureSplit = explode('=', $signature);\n $hashAlgo = $signatureSplit[0];\n \n if ($hashAlgo == 'sha256') {\n $payload = $request->getContent();\n $twitterSecret = env(\"TWITTER_API_SECRET\");\n \n $payloadHashDigest = hash_hmac('sha256', $payload, $twitterSecret);\n $encodedSignature = base64_encode($signature);\n \n if (hash_equals($payloadHashDigest, $encodedSignature)) {\n return true;\n }else{\n return false;\n }\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "f48f7c4fb0bf469365f3f2f82402af30", "score": "0.65381485", "text": "function validateSignatureV2 ($parameters, $urlEndPoint, $httpMethod) {\r\n\t\t $signature = $parameters[self::SIGNATURE_KEYNAME];\r\n\t\t if (!isset($signature)) return false; //'signature' is missing from the parameters.\r\n\t\t $signatureMethod = $parameters[self::SIGNATURE_METHOD_KEYNAME];\r\n\r\n\t\t if (!isset($signatureMethod)) return false; // 'signatureMethod' is missing from the parameters.\r\n\t\t $signatureAlgorithm = self::getSignatureAlgorithm($signatureMethod);\r\n\r\n\t\t if (!isset($signatureAlgorithm)) return false; // 'signatureMethod' present in parameters is invalid. Valid values are: RSA-SHA1\r\n\t\t $certificateUrl = $parameters[self::CERTIFICATE_URL_KEYNAME];\r\n\r\n\t\t if (!isset($certificateUrl)) return false; // 'certificateUrl' is missing from the parameters.\r\n\t\t elseif((stripos($parameters[self::CERTIFICATE_URL_KEYNAME], self::FPS_PROD_ENDPOINT) !== 0)\r\n\t\t && (stripos($parameters[self::CERTIFICATE_URL_KEYNAME], self::FPS_SANDBOX_ENDPOINT) !== 0)) return false; // The `certificateUrl` value must begin with self::FPS_PROD_ENDPOINT or self::FPS_SANDBOX_ENDPOINT\r\n\r\n\t\t $verified = $this->verifySignature($parameters, $urlEndPoint);\r\n\t\t if (!$verified) return false; // Certificate could not be verified by the FPS service\r\n\r\n\t\t return $verified;\r\n\r\n\t\t}", "title": "" }, { "docid": "4ec3127943ef61c062b9493d95c76956", "score": "0.6533085", "text": "public function checkHandlerRequest()\n {\n $ip = $this->getIp();\n if (!isset($_GET['method'])) {\n print $this->getResponseError('Method is null');\n }\n\n if (!isset($_GET['params'])) {\n print $this->getResponseError('Params is null');\n }\n\n list($method, $params) = array($_GET['method'], $_GET['params']);\n\n if (!in_array($method, $this->supportedPartnerMethods)) {\n print $this->getResponseError('Method is not supported');\n }\n\n if (!isset($params['signature']) || $params['signature'] != $this->getSignature($params, $method)) {\n print $this->getResponseError('Wrong signature');\n }\n\t\t\n\t\t/*\n if (!in_array($ip, $this->supportedUnitpayIp)) {\n print $this->getResponseError('IP address Error');\n }\n\t\t*/\n return true;\n }", "title": "" }, { "docid": "abd073613d8d76456a915f0ce719d586", "score": "0.6454795", "text": "protected function checkSignature($params)\n {\n $mac = '' .\n $params['SOLOPMT_RETURN_VERSION'] . '&' .\n $params['SOLOPMT_RETURN_STAMP'] . '&' .\n $params['SOLOPMT_RETURN_REF'] .'&' .\n $params['SOLOPMT_RETURN_PAID'] . '&' .\n $this->config['key'] . '&';\n\n $mac = strtoupper(md5($mac));\n\n if($mac != $params['SOLOPMT_RETURN_MAC']){\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "348378e3e17dd89a7b77a7293cfb948d", "score": "0.64469963", "text": "public function authorize() {\n return $this->isWebhookVerify() || $this->validateSignature();\n }", "title": "" }, { "docid": "930c55bf26d584a4e8c1184defb99633", "score": "0.6445711", "text": "public function handle(Request $request): bool\n {\n list($method, $params) = array_values($request->all());\n\n $data = Arr::except($params, ['sign', 'signature']);\n\n array_push ($data, $this->config->get('secret'));\n array_unshift($data, $method);\n\n $signature = hash($this->config->get('algo', 'md5'), join('{up}', $data));\n\n return $params['signature'] == $signature;\n }", "title": "" }, { "docid": "258df691faf263d4b68c56ee00c47c38", "score": "0.6415647", "text": "public function validateRequest()\n {\n if ($this->isValidApplicationId()) {\n if ($this->requestHasNotTimedOut()) {\n if ($this->isValidSignatureChainUrl()) {\n // Is a valid signatureChainUrl so we can download the PEM-encoded x.509 cert\n $pem = $this->getPem();\n $cert = $this->getCertificate($pem);\n if ($this->hasValidSignatureChain($pem)) {\n if ($this->certificateHasNotExpired($cert)) {\n if ($this->certificateHasValidSans($cert)) {\n return $this->hashesMatch($pem);\n }\n }\n }\n }\n }\n }\n return false;\n }", "title": "" }, { "docid": "6d12e4379ddad35028fff07764bedd73", "score": "0.6400152", "text": "public function testFailsForWrongSignature()\n {\n $message = $this->createRequest();\n $factory = new \\Guzzle\\Http\\Message\\RequestFactory();\n $request = $factory->fromMessage($message);\n \n $params = $this->validator->getAuthorizationParams($request);\n $signature = $params['oauth_signature'];\n $message = str_replace($signature, 'fake-sig', $message);\n $request = $this->serviceProvider->getIncomingRequest($message);\n \n $this->setExpectedException(\"\\Metagist\\Api\\Exception\", 'Signature mismatch');\n $this->validator->validateRequest($request);\n }", "title": "" }, { "docid": "dd5425bd22e4e51650137c2a7104262f", "score": "0.63987416", "text": "public static function is_request_signed_by_jetpack_debugger( $pub_key = null ) {\n\t\t // phpcs:disable WordPress.Security.NonceVerification.Recommended\n\t\tif ( ! isset( $_GET['signature'], $_GET['timestamp'], $_GET['url'], $_GET['rest_route'] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// signature timestamp must be within 5min of current time.\n\t\tif ( abs( time() - (int) $_GET['timestamp'] ) > 300 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$signature = base64_decode( $_GET['signature'] ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode\n\n\t\t$signature_data = wp_json_encode(\n\t\t\tarray(\n\t\t\t\t'rest_route' => $_GET['rest_route'],\n\t\t\t\t'timestamp' => (int) $_GET['timestamp'],\n\t\t\t\t'url' => wp_unslash( $_GET['url'] ),\n\t\t\t)\n\t\t);\n\n\t\tif (\n\t\t\t! function_exists( 'openssl_verify' )\n\t\t\t|| 1 !== openssl_verify(\n\t\t\t\t$signature_data,\n\t\t\t\t$signature,\n\t\t\t\t$pub_key ? $pub_key : static::JETPACK__DEBUGGER_PUBLIC_KEY\n\t\t\t)\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// phpcs:enable WordPress.Security.NonceVerification.Recommended\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "7d0ee8c2b3709346442e5c9d39f9bae9", "score": "0.63830674", "text": "public function isValidSignature($responseSignature, $rawSignature)\n {\n \treturn $responseSignature == $this->getSignature($rawSignature);\n }", "title": "" }, { "docid": "b8b9f01f14ddcd266f5da6e9be6872d7", "score": "0.63697696", "text": "function isPayloadValid($wh_payload, $http_signature) {\n $token = WH_TOKEN;\n $wh_checksum = hash_hmac('sha256', $wh_payload, $token);\n return $wh_checksum == $http_signature; \n}", "title": "" }, { "docid": "356e81bc9d635861c7214cc878a21fa2", "score": "0.6365682", "text": "function valid(){\n $echoStr = $_GET[\"echostr\"];\n if($this->checkSignature()){\n echo $echoStr;\n exit;\n }\n }", "title": "" }, { "docid": "076034627302cd7cc314ac7abfc2ef0a", "score": "0.6361024", "text": "public function verifyRequest()\n\t{\n\t\t$handles = $this->app['config']->get('basset::handles');\n\n\t\treturn str_is(\"{$handles}/*\", trim($this->app['request']->path(), '/'));\n\t}", "title": "" }, { "docid": "0cd15d7663873a355fc5d0d08358961a", "score": "0.63428164", "text": "public function validate_request() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "239e88bf33248cc1a3c4f0f8caf57531", "score": "0.6306597", "text": "protected function requestIsValid()\n {\n return $this->request->has('openid_assoc_handle')\n && $this->request->has('openid_signed')\n && $this->request->has('openid_sig');\n }", "title": "" }, { "docid": "7ce3254f267a18ff0c903fbba46f9963", "score": "0.6284514", "text": "private function validate_request() {\r\n\t\t\tglobal $wp_query;\r\n\r\n\t\t\t$this->override = false;\r\n\r\n\t\t\t// Make sure we have both user and api key\r\n\t\t\tif ( ! empty( $wp_query->query_vars['um-api'] ) ) {\r\n\r\n\t\t\t\tif ( empty( $wp_query->query_vars['token'] ) || empty( $wp_query->query_vars['key'] ) )\r\n\t\t\t\t\t$this->missing_auth();\r\n\r\n\t\t\t\t// Retrieve the user by public API key and ensure they exist\r\n\t\t\t\tif ( ! ( $user = $this->get_user( $wp_query->query_vars['key'] ) ) ) :\r\n\t\t\t\t\t$this->invalid_key();\r\n\t\t\t\telse :\r\n\t\t\t\t\t$token = urldecode( $wp_query->query_vars['token'] );\r\n\t\t\t\t\t$secret = get_user_meta( $user, 'um_user_secret_key', true );\r\n\t\t\t\t\t$public = urldecode( $wp_query->query_vars['key'] );\r\n\r\n\t\t\t\t\tif ( hash_equals( md5( $secret . $public ), $token ) )\r\n\t\t\t\t\t\t$this->is_valid_request = true;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$this->invalid_auth();\r\n\t\t\t\tendif;\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "affe949ffc556c60052f012ad1b6655d", "score": "0.62788403", "text": "function mail_gateway_validate($mail) {\n return $mail->signature == hash_hmac('sha256', $mail->timestamp . $mail->token, 'key-b4389e8f3a37033320d584d16d9fa92b');\n}", "title": "" }, { "docid": "d61ee3f334cc5ebe317a0d9ee354dce8", "score": "0.62733775", "text": "public function verifyCoreSignature(): array {\n\t\ttry {\n\t\t\t$result = $this->verify(\n\t\t\t\t\t$this->environmentHelper->getServerRoot() . '/core/signature.json',\n\t\t\t\t\t$this->environmentHelper->getServerRoot(),\n\t\t\t\t\t'core'\n\t\t\t);\n\t\t} catch (\\Exception $e) {\n\t\t\t$result = [\n\t\t\t\t'EXCEPTION' => [\n\t\t\t\t\t'class' => \\get_class($e),\n\t\t\t\t\t'message' => $e->getMessage(),\n\t\t\t\t],\n\t\t\t];\n\t\t}\n\t\t$this->storeResults('core', $result);\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "72ad84bfc21a0406548976674f55c067", "score": "0.6267794", "text": "public function checkIfRequestValidated(Request $request){\n\n\t\t$this->hash = $request->header('Authorization', null);\n \treturn $this->checkToken($this->hash);\n\n\t}", "title": "" }, { "docid": "bf148112640b9f39ecd61f86438c6209", "score": "0.62585", "text": "public function testVerifySignature() {\n $value = [\n '_signature' => 'X8cD4vUC8f9lrKs85bhCH6KokOCfB9tng2ChCxvovMQ=',\n 'key' => 'AF',\n 'label' => 'Afghanistan',\n ];\n $auth = $this->createMock(AuthAppClient::class);\n $client = new Client('http://endpoint', $auth, 'organization', 'sk_test');\n $this->assertTrue($client->verifySignature('countries', $value));\n }", "title": "" }, { "docid": "0ae7dd925020cec812d12c1dd04a8d27", "score": "0.62450886", "text": "public function validate_hmac() {\n\t\tWC_Gateway_PayRetailers::log( 'Checking if IPN response is valid' );\n\n\t\t// Get post data\n\t\t$posted = wp_unslash( $_SERVER['QUERY_STRING'] ); \n\t\t$get = wp_unslash( $_GET );\n\t\t$payretailersHmac = $get['hmac'];\n\t\t$str = substr($posted, strpos($posted, 'timestamp') );\n\t\t\n\t\t// Recalculate the hmac code here in order to compare values\n\t\t$_url = parse_url($this->notify_url);\n\t\t$url = $_url['path']. '?' .$str;\n\t\t$calcHmac = hash_hmac('sha256', $url, $this->secret_key);\n\n\t\tif ($payretailersHmac != $calcHmac){\n\t\t\tWC_Gateway_PayRetailers::log( 'hmac codes (sent by PayRetailers / recalculated) don\\'t match. Exiting the process...' );\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "e18f37d2cc531e59e153e6fc142615ab", "score": "0.62382907", "text": "public function matchesRequest()\n {\n $validSignature = ! $this->config->has('facebook_app_secret') || $this->validateSignature();\n $messages = Collection::make($this->event->get('messaging'))->filter(function ($msg) {\n return isset($msg['postback']) && isset($msg['postback']['payload']);\n });\n\n return ! $messages->isEmpty() && $validSignature;\n }", "title": "" }, { "docid": "c55791ecda878135ec2e000e9113d6e8", "score": "0.6214401", "text": "public function validateSignature($orig,$key, $sig)\n {\n return $this->validator->validateSignature($orig, $sig, $key);\n }", "title": "" }, { "docid": "feb3ac8870f30bd7a94ad8386fe18c88", "score": "0.62037134", "text": "public function verify(JWKInterface $key, $input, $signature);", "title": "" }, { "docid": "d4fd0ab1201bdf1dd2e0f22adf0bf41b", "score": "0.61921734", "text": "public function validate($payload, $signature);", "title": "" }, { "docid": "2ab5e640ef143848c8d232e803f91237", "score": "0.6191123", "text": "public function isValid(): bool\n {\n $hashedBody = strtoupper(hash_hmac('sha512', $this->webhookJson, $this->signature));\n return (isset($this->headers['X-ANET-SIGNATURE']) &&\n strtoupper(explode('=', $this->headers['X-ANET-SIGNATURE'])[1]) === $hashedBody);\n }", "title": "" }, { "docid": "0a645c2ef05d15eebb3548e84597e559", "score": "0.6187001", "text": "public function signatureIsNotExpired(HttpRequest $request): bool\n {\n return Chronos::date()->stamp() < (int)$request->input('expires');\n }", "title": "" }, { "docid": "13193fd266a5807718e92834d9d6080f", "score": "0.61796427", "text": "public function initSign()\n {\n if (!isset($this->params['sign'])) {\n throw new AppException(AppException::HTTP400, \"Signature does not exist!\");\n }\n $params = $this->params;\n unset($params['sign']);\n\n $uriParams = $this->arrayToStringParams($params);\n $signFromUs = md5($this->uri . '?' . $uriParams . $this->prk);\n\n if ($this->params['sign'] != $signFromUs) {\n throw new AppException(AppException::HTTP400, \"Wrong signature!\");\n }\n }", "title": "" }, { "docid": "6f1f8f78eb9c4cbefb92aa94bbe693ab", "score": "0.61779666", "text": "protected function checkSignature(Token $token) : bool\n {\n return $token->verify(new HsSigner(), $this->clientSecret);\n }", "title": "" }, { "docid": "cfceb2fc0e95a015f5d4e38da46e0abe", "score": "0.61687756", "text": "private function hash_validation() { //check hash\n\t\t\n\t\t$testMode = getRequest('ik_pw_via');\n\t\t$hash_mode = $this->object->hash_mode;\n\n\t\tif(isset($testMode) && $testMode == 'test_interkassa_test_xts'){\n\t\t\t$secretKey = $this->object->test_key;\n\t\t} else {\n\t\t\t$secretKey = $this->object->secret_key;\n\t\t}\n\n\t\t$data = array();\n\t\t\n\t\tforeach ($_REQUEST as $key => $value) {\n if (!preg_match('/ik_/', $key)) continue;\n $data[$key] = $value;\n }\n\n $ik_sign = $data['ik_sign'];\n unset($data['ik_sign']);\n ksort($data, SORT_STRING);\n array_push($data, $secretKey);\n $sign_string = implode(\":\", $data);\n\n if(empty($hash_mode)){\n\t\t\t$hash_mode == 'md5';\n } \n\n \tif($hash_mode == 'md5'){\n \t\t$hash = base64_encode(md5($sign_string, true));\n \t} else {\n \t\t$hash = base64_encode(hash('sha256', $sign_string, true));\n \t}\n\t\t$this->wrlog(\"hash: \".$hash);\n\t\t$this->wrlog(\"ik_sign: \".$ik_sign);\n\t\treturn $hash == $ik_sign ? true : false;\n\t}", "title": "" }, { "docid": "dc7ca49842df0106d23f527b93fcbb7f", "score": "0.616842", "text": "function validateRequest ($parameters, $urlEndPoint, $httpMethod) {\r\n\t return $this->validateSignatureV2($parameters, $urlEndPoint, $httpMethod);\r\n\t }", "title": "" }, { "docid": "55abf9e45570ddb15caa33aa41e38468", "score": "0.6165672", "text": "function checkRequest(){\n\t \n\t\t$this->getSignedRequest();\n\t\tif( (strlen($this->access_token) < 15) && isset($_REQUEST[\"code\"]) ){\n\t\t\t/* application access tokens are largely useless, if not in signed_request\n\t\t\t get from code in request/get */\n\t\t\t \n\t\t\t$this->getAccessToken();\n\t\t}\n\t\treturn $this->uid;\n\t\t\n\t}", "title": "" }, { "docid": "1673859279c1f3f9ca602a3af4759099", "score": "0.61573726", "text": "public function receive_verify_post() {\n\t\t$params = $_POST; // @codingStandardsIgnoreLine\n\t\tforeach ( [ 'action', 'email', 'send_id', 'sig' ] as $k ) {\n\t\t\tif ( ! isset( $params[ $k ] ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tif ( 'verify' !== $params['action'] ) {\n\t\t\treturn false;\n\t\t}\n\t\t$sig = $params['sig'];\n\t\tunset( $params['sig'] );\n\t\tif ( Sailthru_Util::get_signature_hash( $params, $this->secret ) !== $sig ) {\n\t\t\treturn false;\n\t\t}\n\t\t$send = $this->get_send( $params['send_id'] );\n\t\tif ( ! isset( $send['email'] ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tif ( $send['email'] !== $params['email'] ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "e97425c123c9e871bf61a76bbfa48ff5", "score": "0.6147983", "text": "function verify($data, $signature) {\n $status = openssl_verify($data, $signature, $this->publicKey, \"sha256\");\n if ($status === -1) {\n throw new Google_AuthException('Signature verification error: ' . openssl_error_string());\n }\n return $status === 1;\n }", "title": "" }, { "docid": "dc146381d61ddcbabda5f0049e76b31e", "score": "0.61240995", "text": "public function checkAction()\n {\n if ($this->getRequest()->isPost()) {\n $request = $this->getRequest()->getPost('verify');\n if ($request == 'readycloud') {\n $this->printSuccessResponse(true);\n } else {\n $this->printSuccessResponse(false);\n }\n }\n }", "title": "" }, { "docid": "99a82308efd8389b7c898167e80f2288", "score": "0.6123958", "text": "private function auth()\n {\n if (!Request::header('HTTP_X_HUB_SIGNATURE')) {\n $this->errors[] = 'No signature provided';\n\n return false;\n }\n\n if (strpos(Request::header('HTTP_X_HUB_SIGNATURE'), 'sha1=') !== 0) {\n $this->errors[] = 'Signature not authorized';\n\n return false;\n }\n\n list($this->algorithm, $this->signature) = explode('=', Request::header('HTTP_X_HUB_SIGNATURE'), 2);\n\n if (!$this->validate()) {\n $this->errors[] = 'Signature not authorized';\n\n return false;\n }\n\n return $this->authenticated = true;\n }", "title": "" }, { "docid": "c3536de3fda3b808fdbd21c35da67dac", "score": "0.6096692", "text": "public function validate($data){\n /* Si no tiene firma se devuleve como error*/\n if(empty($data['x_signature'])){\n return false;\n }\n\n $signature = $data['x_signature'];\n\n /*Se genera la firma*/\n $this->generarFirma($data);\n\n return $data['x_signature'] == $signature;\n }", "title": "" }, { "docid": "2d57f08d6e157c1403acd035ba5906ff", "score": "0.6093169", "text": "public function authenticateRequest($request)\n { \n try {\n $returnData['status'] = false;\n\n if (!json_decode($content = $request->getContent(), true)) {\n $returnData['errorMessage'] = ErrorConstants::$apiErrors['INVALIDJSON'];\n return $returnData;\n\n }\n\n // get the request headers\n $headers = $request->headers;\n $auth = $headers->get('Authorization');\n $hash = hash_hmac('sha1', $content, $this->container\n ->getParameter('hash_signature_key'))\n ;\n // Comparing Request Hash with Server auth Hash.\n if ($hash !== $auth) {\n\n $returnData['errorMessage'] = ErrorConstants::$apiErrors['INVALIDAUTHORIZATION'];\n return $returnData;\n }\n \n $returnData['status'] = true;\n\n } catch (\\Exception $e) {\n $returnData['errorMessage'] = $e->getMessage();\n }\n\n return $returnData;\n }", "title": "" }, { "docid": "6c23c110a0d7da9760b5800c61a04adc", "score": "0.6069212", "text": "function verifyKey()\n {\n $trackback = Services_Trackback::create(array('id' => 1));\n\n $res = $this->sendAkismetRequest($this->options['sources'][0],\n $trackback);\n return $res == 'valid';\n }", "title": "" }, { "docid": "79ac8a4ca45e8b18f141c4e71cff9218", "score": "0.60480356", "text": "public function verify_assertion() {\n \n $params = http_build_query(array('assertion'=>$this->assertion,\n 'audience'=>$this->audience)); \n\n $result = $this->_requestPOST(self::endpoint, $params);\n\n $output = json_decode($result,true);\n\n //for debug\n #print_r($output);\n\n if(isset($output['status']) && $output['status'] == 'okay') {\n\n $this->email = $output['email']; \n $this->expires = $output['expires'];\n $this->issuer = $output['issuer'];\n\n return true;\n\n } else {\n\n return false;\n }\n }", "title": "" }, { "docid": "6a796319af22576d18d183f6b1a9925a", "score": "0.6040523", "text": "public function check_response() {\n\t\tif ( ! empty( $_GET ) && $this->validate_hmac() ) {\n\t\t\t$posted = wp_unslash( $_GET );\n\n\t\t\tdo_action( \"valid-payretailers-standard-ipn-request\", $posted['transaction'] );\n\t\t\texit;\n\t\t}\n\t\twp_die( \"PayRetailers IPN Request Failure\", \"PayRetailers IPN\", array( 'response' => 500 ) );\n\t}", "title": "" }, { "docid": "ced2ba30fac2d94bca607fe99469855c", "score": "0.60397804", "text": "public function isValidSignatureChainUrl()\n {\n $url = parse_url($this->signatureChainUrl);\n if(is_null($this->port) || $this->port === 443) {\n if (strcasecmp($url['scheme'], 'https') == 0 && strcasecmp($url['host'], 's3.amazonaws.com') == 0) {\n $path = explode('/', $url['path']);\n if ($path[1] === 'echo.api') {\n return true;\n }\n }\n }\n\n throw new AlexaValidationException('Invalid Signature Chain Url');\n }", "title": "" }, { "docid": "2d9aaa1afcc129e3a030f571b71bc915", "score": "0.6033782", "text": "protected function securityCheck()\n {\n $headers = getallheaders();\n\n if (!isset($headers['Authorization'])) {\n throw new Exception('Invalid request, no auth');\n }\n\n $auth = explode(' ', $headers['Authorization']);\n if (isset($auth[0]) && isset($auth[1]) && $auth[0] === 'Bearer') {\n $jwt = $auth[1];\n $elements = explode('.', $jwt);\n $bodyb64 = isset($elements[1]) ? $elements[1] : '';\n if ($bodyb64 !== '') {\n $payload = JWT::jsonDecode(JWT::urlsafeB64Decode($bodyb64));\n $token = $this->conf->get('voicegain.token');\n\n if (isset($payload->token) && $payload->token === $token) {\n return true;\n }\n }\n }\n throw new Exception('Invalid request, wrong JWT');\n }", "title": "" }, { "docid": "c352a2cefa787e0f90f3e27716909409", "score": "0.6023339", "text": "function HasValidRequest() : bool{\n //get send data\n $data = file_get_contents(\"php://input\");\n\n try{\n //try to decode data\n $data = json_decode($data);\n } catch (Exception $e){\n //return false\n return false;\n }\n\n //check if all data exists\n if(isset($data->email) && isset($data->subject) && isset($data->content)){\n //checkif string\n if(is_string($data->email) && is_string($data->subject) && is_string($data->content)){\n return true;\n }\n }\n\n //return false\n return false;\n}", "title": "" }, { "docid": "62bd19e6349541f45b4500e719c6c763", "score": "0.60087985", "text": "public function receiveVerifyPost() {\n $params = $_POST;\n foreach (array('action', 'email', 'send_id', 'sig') as $k) {\n if (!isset($params[$k])) {\n return false;\n }\n }\n \n if ($params['action'] != 'verify') {\n return false;\n }\n $sig = $params['sig'];\n unset($params['sig']);\n if ($sig != self::getSignatureHash($params, $this->secret)) {\n return false;\n }\n $send = $this->getSend($params['send_id']);\n if (!isset($send['email'])) {\n return false;\n }\n if ($send['email'] != $params['email']) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "5845b0d35bf4a87c3a8bc42640002dab", "score": "0.60012984", "text": "public function getSignature();", "title": "" }, { "docid": "5b1e60d6240705fc216f877f71ccfd74", "score": "0.5981058", "text": "function confirm_signature($timestamp, string $signature): bool\n {\n return $signature === $this->generate_signature($timestamp)[\"signature\"];\n }", "title": "" }, { "docid": "d31efcfb26105772bdf593b23005ce13", "score": "0.5972322", "text": "function test_invalid_signature()\n\t{\n\t\t// Signature not being encrypted with the location value\n\t\t$result = $this->curl->simple_post('api/takeaway', array('key'=>'ANINVALIDKEY',\n\t\t\t\t\t\t\t\t\t 'signature'=>sha1(API_KEY.API_SECRET),\n\t\t\t\t\t\t\t\t\t 'location'=>$this->location));\n\t\t\n\t\t$xml = @simplexml_load_string($result);\n\t\t\n\t\tif ($xml === FALSE)\n\t\t\t$this->_fail('Returned invalid XML');\n\t\t\n\t\tif (isset($xml->error)) {\n\t\t\t$this->_assert_equals($xml->error, 'Unauthorised Access.');\n\t\t} else {\n\t\t\t$this->_fail();\n\t\t}\n\t}", "title": "" }, { "docid": "f92f09a26bee3903fa79544573456068", "score": "0.5969281", "text": "function openid_check_authentication($request)\n {\n return $request->answer($this->signatory);\n }", "title": "" }, { "docid": "24a46b269cc9f887f022618318c9f509", "score": "0.5966291", "text": "public function verifySignature($signature, $payload) {\r\n if(empty($signature)) {\r\n throw new EventsException('Empty signature', $signature);\r\n }\r\n\r\n $parts = explode(',',$signature);\r\n if(count($parts) !== 2) {\r\n throw new EventsException('Invalid signature format', $signature);\r\n }\r\n\r\n list($timestamp, $digest) = $parts;\r\n if(substr($timestamp, 0, 2) !== 't='){\r\n throw new EventsException('Invalid timestamp', $signature);\r\n }\r\n\r\n $t = (int) substr($timestamp,2, count($timestamp));\r\n if(is_nan($t)) {\r\n throw new EventsException('Invalid timestamp', $signature);\r\n }\r\n\r\n $now = time();\r\n if(strtotime('+10 Minutes', $t) >= $now) {\r\n throw new EventsException('Timestamp validation error', $signature);\r\n }\r\n\r\n $verificationHash = openssl_encrypt($payload, 'SHA512', $this->privateKey);\r\n if($verificationHash !== substr($digest,2, count($digest))) {\r\n throw new EventsException('Invalid signature', $signature);\r\n }\r\n\r\n return true;\r\n }", "title": "" }, { "docid": "89bf12dbcde82482cc7a6f2d09a33af4", "score": "0.5946652", "text": "protected function verifySignature($jwt) {\n\t\t$header = JWT::decode($jwt);\n\t\tif (preg_match(\"/^RS(\\d+)$/\", $header->alg, $m)) {\n\t\t\t$digests = array_map(function($digest) {\n\t\t\t\treturn strtolower($digest);\n\t\t\t}, openssl_get_md_methods());\n\t\t\tif (in_array('sha'.$m[1], $digests)) {\n\t\t\t\t$jwks = $this->provider->getJwksUri();\n\t\t\t\tif (empty($jwks)) {\n\t\t\t\t\tthrow new OAuthClientException(\n\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t'jwks_uri is required for signature type: %s',\n\t\t\t\t\t\t\t$header->alg\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t$options = [\n\t\t\t\t\t'resource' => 'OAuth jwks',\n\t\t\t\t\t'fail_on_access_error' => true\n\t\t\t\t];\n\t\t\t\tif (($response = $this->sendOAuthRequest($jwks, 'GET', [], $options)) === false) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn JWT::verifyRSASignature($header, $response->keys, $jwt);\n\t\t\t}\n\t\t} elseif (preg_match(\"/^HS(\\d+)$/\", $header->alg, $m)) {\n\t\t\t$algos = array_map(function($algo) {\n\t\t\t\treturn strtolower($algo);\n\t\t\t}, function_exists('hash_hmac_algos') ? hash_hmac_algos() : hash_algos());\n\t\t\tif (in_array('sha'.$m[1], $algos)) {\n\t\t\t\treturn JWT::verifyHMACsignature($header, $jwt, $this->provider->getClientSecret());\n\t\t\t}\n\t\t}\n\t\tthrow new OAuthClientException(\n\t\t\tsprintf(\n\t\t\t\t'No support for signature type: %s',\n\t\t\t\t$header->alg\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "3c3fb0b61416bd99569dd3949767334a", "score": "0.5918651", "text": "public function verifyRequest(array $params): bool\n {\n if ($this->apiSecret === null) {\n throw new Exception('API secret is missing');\n }\n\n if (isset($params['shop'])\n && isset($params['timestamp'])\n && isset($params['hmac'])\n ) {\n $hmac = $params['hmac'];\n unset($params['hmac']);\n ksort($params);\n\n return $hmac === hash_hmac('sha256', urldecode(http_build_query($params)), $this->apiSecret);\n }\n\n return false;\n }", "title": "" }, { "docid": "cd2ba2baa0f993d52cd2afe9a92a4593", "score": "0.5916323", "text": "function openid_provider_verification_response($request) {\n $is_valid = TRUE;\n\n // Use the request openid.assoc_handle to look up\n // how this message should be signed, based on\n // a previously-created association.\n $assoc = db_fetch_object(db_query(\"SELECT * FROM {openid_provider_association} WHERE assoc_handle = '%s'\",\n $request['openid.assoc_handle']));\n\n $signed_keys = explode(',', $request['openid.signed']);\n $signature = _openid_provider_signature($assoc, $request, $signed_keys);\n\n if ($signature != $request['openid.sig']) {\n $is_valid = FALSE;\n }\n\n if ($is_valid) {\n $response = array('is_valid' => 'true');\n }\n else {\n $response = array(\n 'is_valid' => 'false',\n 'invalidate_handle' => $request['openid.assoc_handle'] // optional, An association handle sent in the request\n );\n }\n\n $message = _openid_create_message($response);\n _openid_provider_debug('verification response (response: <pre>%message</pre>)', array('%message' => $message));\n header(\"Content-Type: text/plain\");\n print $message;\n}", "title": "" }, { "docid": "d7aebc4f681b878e4280b3312b0379c0", "score": "0.5910121", "text": "protected function shopwareHasSignatureFeature()\n {\n return method_exists($this, 'loadBasketFromSignature')\n && method_exists($this, 'verifyBasketSignature')\n && method_exists($this, 'persistBasket');\n }", "title": "" }, { "docid": "c047f5c617bd3246ae0b4fd0bcd60f87", "score": "0.5897961", "text": "public function hasRequest();", "title": "" }, { "docid": "b8ac60972ca52f0c131134b57209423d", "score": "0.58913344", "text": "public function verify_signature($bd_params, $expected_sig)\n\t{\n\t\treturn BaiduUtils::generate_sig($bd_params, $this->secret) == $expected_sig;\n\t}", "title": "" }, { "docid": "d37dec31fc62181991de3d1e7c322928", "score": "0.5882671", "text": "abstract public function generateSignature($request, $consumer, $token);", "title": "" }, { "docid": "cdf04a9cbb1865485eafee2aa1ecb52e", "score": "0.5873805", "text": "abstract public function checkRequest(): void;", "title": "" }, { "docid": "7129f2117d62f72e29b94e7d9fa9ae7c", "score": "0.5869505", "text": "public static function validate_sig($token, $key)\n {\n try {\n \\Firebase\\JWT\\JWT::decode($token, $key, array('HS256', 'HS384', 'HS512', 'RS256'));\n return true;\n } catch (\\Exception $e) {\n return false;\n }\n }", "title": "" }, { "docid": "2c1104ba2c61d4af7382e2ee4557b02d", "score": "0.5862961", "text": "public function verifySignedRequest($signed_request)\n {\n \n // check that we have it\n if (! $signed_request)\n {\n return null;\n }\n\n list($encoded_sig, $payload) = explode('.', $signed_request, 2); \n\n $secret = env('FB_APPSECRET');\n \n // decode the data\n $sig = $this->base64_url_decode($encoded_sig);\n $data = json_decode($this->base64_url_decode($payload), true);\n\n // confirm the signature\n $expected_sig = hash_hmac('sha256', $payload, $secret, $raw = true);\n if ($sig !== $expected_sig) {\n \n error_log('Bad Signed JSON signature!');\n return null;\n }\n return $data;\n }", "title": "" }, { "docid": "e6867cdec2ce31079c6789a516335617", "score": "0.585505", "text": "public function isValid()\n {\n try {\n (new Loader())->loadAndVerifySignatureUsingKey(\n $this->raw_token,\n $this->jwk,\n $this->allowed_algorithms\n );\n return true;\n } catch (InvalidArgumentException $e) {\n return false;\n }\n }", "title": "" }, { "docid": "1e2e49722c97eaaf3c9712d651b19f07", "score": "0.5854409", "text": "public function authenticateContent()\n {\n if (!$this->needsAuthentication()) {\n return true;\n }\n $sha1 = $this->getRequest()->getHeaderLine('X-Hub-Signature');\n $check = 'sha1='\n . hash_hmac(\n 'sha1',\n $this->getContentString(),\n $this->currentSubscriptionData['secret']\n );\n return $sha1 === $check;\n }", "title": "" }, { "docid": "673a0cb2970ad42e6af3194bffea79d2", "score": "0.58503604", "text": "function payswarm_verify($obj) {\n global $payswarm_hooks;\n $rval = false;\n\n // frame message to retrieve signature\n $frame = (object)array(\n '@context' => payswarm_get_default_jsonld_context_url(),\n 'signature' => (object)array(\n 'created' => new stdClass(),\n 'creator' => new stdClass(),\n 'signatureValue' => new stdClass(),\n 'nonce' => new stdClass()\n )\n );\n $obj = jsonld_frame($obj, $frame);\n if(count($obj->{'@graph'}) === 0 ||\n $obj->{'@graph'}[0]->signature === null) {\n throw new Exception('PaySwarm Security Exception: ' .\n 'The message is not digitally signed.');\n }\n\n // save signature property and remove from object\n $result = $obj->{'@graph'}[0];\n $sprop = $result->signature;\n unset($result->signature);\n\n // check the message nonce\n if(property_exists($sprop, 'nonce')) {\n $valid_nonce = payswarm_check_nonce($sprop->nonce);\n if(!$valid_nonce) {\n throw new Exception('PaySwarm Security Exception: ' .\n 'The message nonce is invalid.');\n }\n }\n\n // ensure signature timestamp is +/- 15 minutes\n $now = time();\n $time = date_create($sprop->created)->getTimestamp();\n if($time < ($now - 15*60) || $time > ($now + 15*60)) {\n throw new Exception('PaySwarm Security Exception: ' .\n 'The message digital signature timestamp is out of range.');\n }\n\n // fetch the public key for the signature\n $key = payswarm_get_public_key($sprop->creator);\n $pem = $key->publicKeyPem;\n\n // ensure key has not been revoked\n if(property_exists($key, 'revoked')) {\n throw new Exception('PaySwarm Security Exception: ' .\n 'The message was signed with a key that has been revoked.');\n }\n\n // verify key owner\n $trusted = call_user_func(\n $payswarm_hooks['is_trusted_authority'], $key->owner);\n if(!$trusted) {\n throw new Exception('PaySwarm Security Exception: ' .\n 'The message is not signed by a trusted public key.');\n }\n\n // normalize and serialize the object\n $options = array('format' => 'application/nquads');\n $nquads = jsonld_normalize($obj, $options);\n\n // get the data to hash\n $data = $sprop->nonce . $sprop->created . $nquads;\n\n // decode the signature value\n $sig = base64_decode($sprop->signatureValue);\n\n // verify the signature\n $rc = payswarm_raw_verify($data, $sig, $pem);\n if($rc === 1) {\n $rval = true;\n }\n else if($rc === -1) {\n // throw exception, error while trying to verify\n throw new Exception('PaySwarm Security Exception: ' .\n 'Low-level API error: ' . openssl_error_string());\n }\n else {\n throw new Exception('PaySwarm Security Exception: ' .\n 'The digital signature on the message is invalid.');\n }\n\n return $rval;\n}", "title": "" } ]
455cc5d5841c2a848a1700c0b92d7fb3
Update entity and flush
[ { "docid": "111d86df4b00383391effe018415dd17", "score": "0.0", "text": "public function update($entity, $values)\n\t{\n\t\t$this->setData($entity, $values);\n\t\t$this->save($entity);\n\t\treturn $entity;\n\t}", "title": "" } ]
[ { "docid": "7f0dfeb5432ed28a17e1aa67ee504a8d", "score": "0.853678", "text": "function updateEntity()\n {\n $this->manager->flush();\n }", "title": "" }, { "docid": "194348e8143807f54599362cf6318737", "score": "0.74869746", "text": "public function update (object $entity);", "title": "" }, { "docid": "2ff7fd3eab671b99901b6f6734766160", "score": "0.7422197", "text": "abstract public function update($entity);", "title": "" }, { "docid": "dbac649412e8591fc3a2a2615f2f7767", "score": "0.7355785", "text": "abstract protected function update($entity);", "title": "" }, { "docid": "c89806fda95a35c599d032130207037c", "score": "0.73547727", "text": "public function testUpdateEntity()\n {\n }", "title": "" }, { "docid": "5e25fde2b05dc8aa69161eca66edd608", "score": "0.7323461", "text": "public function update()\n\t\t{\n\t\t\t// with an insert instead.\n\t\t\t$this->save();\n\t\t}", "title": "" }, { "docid": "fb11866a6a28a176de895e06a4b06028", "score": "0.7319772", "text": "function update( $entity );", "title": "" }, { "docid": "ba5091e4ee0a61de993d2b134006e3ae", "score": "0.72560734", "text": "protected function _update($flush = true) {\n if ($flush) {\n $this->em->flush();\n }\n }", "title": "" }, { "docid": "98d15ddab57043131eec94f278448ff1", "score": "0.70779395", "text": "public function flush()\n {\n $client = $this->getClient();\n $update = $client->createUpdate();\n $update->addDeleteQuery('*');\n $update->addCommit();\n $result = $client->update($update);\n }", "title": "" }, { "docid": "f8e9f6199b07e8b0ea8459dea3f3dcbe", "score": "0.70598054", "text": "public function Update($entity) {\r\n }", "title": "" }, { "docid": "cfbf8bfabab78fdf4bc5276db0d58cf1", "score": "0.70158476", "text": "public function updateEntity($entity){\r\n $this->update($this->composeRow($entity),array('id = ?'=>$entity->getId()));\r\n }", "title": "" }, { "docid": "dc7d206e40406c69cec76483189af4d6", "score": "0.69448704", "text": "public function Update($entity) {\n }", "title": "" }, { "docid": "19c973260f6faa411a79b299191071fa", "score": "0.67680085", "text": "public function testUpdate() {\n $entity = new SimpleEntity();\n $entity->setName('Entity');\n $entity->setValue('EntityValue');\n $id = $this->persister->create($entity);\n $this->assertNotNull($id);\n\n $entity->setValue('NewEntityValue');\n $this->persister->update($entity);\n\n $this->persister->clearCache($id);\n\n $retrieved = $this->persister->getById($id);\n $this->assertEquals('Entity', $retrieved->getName());\n $this->assertEquals('NewEntityValue', $retrieved->getValue());\n }", "title": "" }, { "docid": "4185eff41ae781174037f81a78c63a63", "score": "0.67578286", "text": "public function update(BaseEntity $entity) {\n\t}", "title": "" }, { "docid": "e08d9e86baa5eb62ed313ea8d331436a", "score": "0.67500883", "text": "public function update($account, $flush = true): void;", "title": "" }, { "docid": "69690617052dbeb7528e2f9246876857", "score": "0.667464", "text": "protected function update(\\Cactus\\Entity & $entity)\n\t{\n\t\t$data = $this->prepareData($entity);\n\n\t\t$query = new \\Peyote\\Update($this->table);\n\t\t$query->set($data)->where($this->primary_key, '=', $entity->{$this->primary_key});\n\n\t\t$result = $this->adapter->update($query->compile(), $query->getParams());\n\n\t\t$entity->reset();\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "8759752add8b6db67fed4d69cb0208e8", "score": "0.66680884", "text": "public function update()\n\t{\n\t\tparent::update();\n\t\t$this->write();\n\t}", "title": "" }, { "docid": "cfcbc10c2609e4495cf2377d58b34ac1", "score": "0.66623783", "text": "protected function flush()\n\t{\n\t\t$this->entityManager->flush();\n\t}", "title": "" }, { "docid": "c48e876db969c179eede61e12c15fc59", "score": "0.66554856", "text": "public function update(): Entity|bool\n {\n return $this->getManager()->update($this);\n }", "title": "" }, { "docid": "44b2a146d07735a49eec32f23fe41df0", "score": "0.6607138", "text": "public function updateById();", "title": "" }, { "docid": "d16d32440e89b8f31c0ca259c26f0400", "score": "0.66045564", "text": "public function update() {\r\n\t\t$this->_update();\r\n\t}", "title": "" }, { "docid": "7db87927c64c01d0cf80ea33c61b2ca5", "score": "0.6580296", "text": "private function updateExistingEntityRequest()\n {\n //TODO: Add catch exception for Bcoin exceptions\n $endpoint = '/' . $this->persistableConfig()->update();\n\n $this->connection->put($endpoint, $this->toJson());\n\n return TRUE;\n }", "title": "" }, { "docid": "f63536c85447dffc35c8e203f81e8708", "score": "0.65785813", "text": "public function commit()\n {\n $this->getEntityManager()->flush();\n }", "title": "" }, { "docid": "ec12f2daf796b40ee14d242e96568be2", "score": "0.6545972", "text": "public function testUpdateLocalAndFlush()\n {\n $this->dm->persist($this->doc);\n $this->dm->bindTranslation($this->doc, 'en');\n $this->dm->flush();\n\n $this->doc->topic = 'Un sujet intéressant';\n $this->doc->locale = 'fr';\n $this->dm->flush();\n\n $this->assertDocumentStored();\n }", "title": "" }, { "docid": "be79350931eb63238d80c12433629a03", "score": "0.6528409", "text": "public function executeUpdate()\n {\n $this->initImporter();\n Transform\\Transformers\\Transformer::unSerializeMappings();\n EntityPopulator::populateEntities($this->parser);\n $this->serializeLastCreatedIds();\n $this->checkForErrors();\n Transform\\Transformers\\Transformer::serializeMappings();\n }", "title": "" }, { "docid": "41ce2325560779869e9a6795b53e6ee1", "score": "0.6471303", "text": "public function update(\\Album\\Entity\\Album $entity) {\n $this->_em->merge($entity);\n $this->_em->flush();\n }", "title": "" }, { "docid": "0718705b34dfed78a164426b1aa222b7", "score": "0.64485496", "text": "function update() {\n\t global $db, $repository;\n\n\t reset($this->data);\n\t while(list($key,$val)=each($this->data)){\n\t\tif($key != $this->idKey) {\n\t\t if($val === NULL) {\n\t\t\t $my_sql[] = $key . \" = NULL\";\n\t\t } else {\n\t\t\t //dump($val, 'val');\n\t\t\t if(in_array($key, $this->binaryFields)) {\n\t\t\t\t//if(strpos($val, \"'\"))\n\t\t\t\t//\t raiseError(\"invalid character in binary field data\");\n\t\t\t\t$my_sql[] = $key . \" = '\". addslashes($val) . \"'\";\n\t\t\t } else {\n\t\t\t\t$my_sql[] = $key . \" = '\" . sotf_Utils::magicQuotes($val) . \"'\";\n\t\t\t }\n\t\t }\n\t\t}\n\t }\n\t $my_sql = implode(\", \", $my_sql);\n\n\t //execute the query\n\t $res = $db->query(\"UPDATE \" . $this->tablename . \" SET \" . $my_sql . \" WHERE \" . $this->idKey . \"='\" . $this->id . \"' \");\n\t \n\t //if the query is dead, stop executio, output error\n\t if(DB::isError($res)){\n\t\traiseError($res);\n\t }\n\n\t //$count = $db->affectedRows();\n\t $count = $res;\n\n\t if($count > 1)\n\t\t logError(\"This updated more objects\", $count);\n\t if($count < 1)\n\t\t logError(\"Update failed\", $count);\n\t if($count==1) {\n\t\t $this->changed = false;\n\t\t // mark if this change requires a refresh in the metadata.xml file\n\t\t $this->markParentToUpdate();\n\t }\n\t return ($count==1);\n }", "title": "" }, { "docid": "fa698eae4ab23d3d86e07f6fd2cda311", "score": "0.63979626", "text": "public function update( Entity $form ) {\n\t}", "title": "" }, { "docid": "3e0f043be946ab7842b0af2e1d74c916", "score": "0.63895816", "text": "protected function _update ()\n {\n $storage = $this->_make_storage ();\n $storage->update_object ($this);\n }", "title": "" }, { "docid": "8d993377881ffc5fa6b8f651ec411530", "score": "0.6371347", "text": "public function update($entity)\n {\n // Verifica se a unidade de trabalho está gerenciada\n if ($this->getEntityManager()->getUnitOfWork()->getEntityState($entity) != UnitOfWork::STATE_MANAGED) {\n // Se não estiver gerenciável, torna gerenciavel\n // Semelhante ao persist, mas é mais apropriado para atualização.\n // Dessa forma ele pega apenas o que mudou na persistencia já feita.\n $this->getEntityManager()->merge($entity);\n }\n\n // Aplica as alterações feitas\n $this->getEntityManager()->flush();\n\n return $entity;\n }", "title": "" }, { "docid": "82d1f78ba6fa14605a47c014beba680d", "score": "0.6336452", "text": "function update($entity, array $values);", "title": "" }, { "docid": "8b425d52cb97f6dac49fedfd24afdeca", "score": "0.6302853", "text": "public function updateRecord()\n {\n #$response = $request->execute();\n }", "title": "" }, { "docid": "aaa03f403e3d90293bf527a642f0e389", "score": "0.62468684", "text": "public function update(EntityInterface $entity, array $options = []);", "title": "" }, { "docid": "6cb773fbeac6475b11476b8e2b9c142e", "score": "0.6233598", "text": "public function flush(): void\n {\n // by calling remove before flushing.\n if (!is_null($this->entityManager)) {\n $this->entityManager->flush();\n }\n }", "title": "" }, { "docid": "a1b5ed71481a8b5793e1b46a8ac63aba", "score": "0.6205307", "text": "public function flush()\n {\n $this->manager->flush();\n }", "title": "" }, { "docid": "af54a66bb26bda0d040f24dd8a5f9203", "score": "0.61982584", "text": "public function save() {\n\t\tself::getEntityManager()->persist($this);\n\t}", "title": "" }, { "docid": "f6def3c32f944b4ad3e675aec13aa737", "score": "0.6187027", "text": "public function update()\n {\n return $this->save();\n }", "title": "" }, { "docid": "5ef7ee681f8eea4e2d144139ac211e12", "score": "0.6186954", "text": "public function update() {}", "title": "" }, { "docid": "34191f45ba9926ec4e85ce6c833482d9", "score": "0.6185796", "text": "public function flush()\n {\n $this->doctrineObjectManager->flush();\n }", "title": "" }, { "docid": "9d69474944a19fd29de6643caf69efd5", "score": "0.6172468", "text": "abstract public function _update($obj);", "title": "" }, { "docid": "c985528e49432ccb01f7ae17de4ff355", "score": "0.61674875", "text": "protected final function update(): void\n {\n if (empty($this->fields)) {\n return;\n }\n\n static::$driver->transaction(function (Driver $driver) {\n $driver->sql($this->generateUpdateStatement());\n\n foreach ($this->fields as $name => $bind) {\n $driver->bindValue($bind, $this->dbModel->{$name});\n }\n\n $driver->bindValue($this->primaryKey, $this->dbModel->{$this->primaryKey});\n $driver->execute(NULL, true);\n });\n }", "title": "" }, { "docid": "054aa501665489afe3374bd6da99d880", "score": "0.6151136", "text": "public function doUpdate()\n {\n $this->updatedAt = new \\DateTime('now', new \\DateTimeZone('UTC'));\n }", "title": "" }, { "docid": "594354ae59a923f4a6aad0e82cb4d920", "score": "0.61367434", "text": "public function doUpdate()\n {\n $this->updated = new \\DateTime('now', new \\DateTimeZone('UTC'));\n }", "title": "" }, { "docid": "e8f2a79f2bd8c3eb405e389cd50395bf", "score": "0.61143154", "text": "public abstract function update($data);", "title": "" }, { "docid": "c0268fd89d504e7e3334bdc92717f035", "score": "0.6106371", "text": "public function update() {\n\t\t\n\t\t$mods = $this->_data_modified[$this->_data_position];\n\t\tif (count($mods) < 1) return true; // no changes.\n\t\t\t\n\t\t// Build data\n\t\t$changes = [];\n\t\tforeach ($mods as $mod) $changes[$mod] = $this->__get($mod);\n\t\t\n\t\t// Build URL\n\t\t$url = \"table/\".$this->_table_name.\"/\".$this->__get(\"sys_id\");\n\t\t\n\t\t// Use GlideAccess to run the PUT command \n\t\t// Throw a GlideAccessException or a GlideAuthenticationException on error \n\t\t$result = $this->_access->put($url, json_encode($changes));\n\t\t\t\n\t\t// Clear out the pending updates for this record\n\t\t$this->_data_modified[$this->_data_position] = [];\n\t}", "title": "" }, { "docid": "2a16b5ef8cdee98dc2556a9f45fca958", "score": "0.60769033", "text": "public function flush()\n {\n $this->objectManager->flush();\n $this->objectManager->clear();\n }", "title": "" }, { "docid": "8280b3497c3d869dccfe6907fd86a629", "score": "0.6076889", "text": "public function update($entity)\n {\n try {\n $em = $this->_em;\n $em->persist($entity);\n $em->flush();\n\n return true;\n } catch (DBALException $ex) {\n $message = sprintf('DBALException [%i]: %s', $ex->getCode(), $ex->getMessage());\n $this->log($message);\n return false;\n }\n }", "title": "" }, { "docid": "d97620e744a703e6e13cf873e0ed9191", "score": "0.60699415", "text": "public function postFlush() {\n foreach ($this->updatedSalgsomraade as $id => $salgsomraade) {\n $this->service->syncDataToWebsite($salgsomraade);\n }\n }", "title": "" }, { "docid": "de6de016efa70f12195f77cc98eaf9ce", "score": "0.60591525", "text": "public function Updated()\n {\n $this->Entity->MessageId->Value = $this->sujetId;\n $this->Entity->UserId->Value = $this->Core->User->IdEntite;\n $this->Entity->DateCreated->Value = Date::Now();\n\n parent::updated();\n }", "title": "" }, { "docid": "3c4daf24bff347789c844f9d3da0697a", "score": "0.6047528", "text": "public function update()\n {\n $this->_cleanFields();\n \n parent::update();\n }", "title": "" }, { "docid": "6cacd3cda0ecf13850083603241eae7b", "score": "0.6040316", "text": "public function update($object)\n {\n $object->save();\n }", "title": "" }, { "docid": "fc48221c468367bc2798ac098b323468", "score": "0.6031792", "text": "function hook_entity_update(\\Drupal\\Core\\Entity\\EntityInterface $entity) {\n // Update the entity's entry in a fictional table of all entities.\n \\Drupal::database()->update('example_entity')\n ->fields([\n 'updated' => REQUEST_TIME,\n ])\n ->condition('type', $entity->getEntityTypeId())\n ->condition('id', $entity->id())\n ->execute();\n}", "title": "" }, { "docid": "18248d524a32ff815d5a986d67627bf6", "score": "0.60275114", "text": "public function save()\n { \n if ( is_null( $this->id )) \n $this->create();\n else \n $this->update(); \n }", "title": "" }, { "docid": "0725eb594bcd50cb2a876e1821be5c83", "score": "0.60187995", "text": "protected function updateEntity($class, $id, $data = [])\n {\n $entity = $this->em->fetch($class, $id);\n $entity->fill($data);\n $entity->save();\n }", "title": "" }, { "docid": "426ab9fccda1aba1e32c5c412e58d622", "score": "0.6009209", "text": "protected function update() {\n $this->generateUpdate();\n $this->typeTransacction();\n }", "title": "" }, { "docid": "246f0b2e710c9a537a35c00134fcf846", "score": "0.59881943", "text": "public function update($entitie);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5982786", "text": "public function update($data);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5982786", "text": "public function update($data);", "title": "" }, { "docid": "85bf3cf26adda55301c6be49e548f386", "score": "0.59785026", "text": "public function update() { }", "title": "" }, { "docid": "85bf3cf26adda55301c6be49e548f386", "score": "0.59785026", "text": "public function update() { }", "title": "" }, { "docid": "ddc85140420c43617bbd19f45eb2fb2e", "score": "0.5971522", "text": "public function update()\n {\n }", "title": "" }, { "docid": "909582130a8ec98a6c19fd12cc3bfdd1", "score": "0.5949973", "text": "public function update()\n {\n $this->dateUpdated = new \\DateTime();\n }", "title": "" }, { "docid": "85714b33bdb1da52c9f3c38b3fb0e4fd", "score": "0.59429204", "text": "abstract public function update($id);", "title": "" }, { "docid": "b84620d1afb819c12c9ce2a2572cfb4b", "score": "0.59255534", "text": "public function updateEntity(SendLogAggregatedEntity $entity): void\n {\n $this->add($entity);\n }", "title": "" }, { "docid": "91039ce0cfc444382b037c86ba4ab01d", "score": "0.591757", "text": "public function update( $data );", "title": "" }, { "docid": "86c46730b2ac4e26bd15ed5cba938a0a", "score": "0.5907794", "text": "public function update()\n {\n //\n }", "title": "" }, { "docid": "86c46730b2ac4e26bd15ed5cba938a0a", "score": "0.5907794", "text": "public function update()\n {\n //\n }", "title": "" }, { "docid": "86c46730b2ac4e26bd15ed5cba938a0a", "score": "0.5907794", "text": "public function update()\n {\n //\n }", "title": "" }, { "docid": "86c46730b2ac4e26bd15ed5cba938a0a", "score": "0.5907794", "text": "public function update()\n {\n //\n }", "title": "" }, { "docid": "86c46730b2ac4e26bd15ed5cba938a0a", "score": "0.5907794", "text": "public function update()\n {\n //\n }", "title": "" }, { "docid": "daf7bd23a8415354c4547c8475ca0e00", "score": "0.590231", "text": "function setSent($entity) \n {\n $entity->setSent(1);\n $this->manager->flush();\n }", "title": "" }, { "docid": "6bae71b1b55cece7bf6fef2b05e2a999", "score": "0.58907413", "text": "public function save($entity);", "title": "" }, { "docid": "11501963cb882610ab7cf40fa86a6c0f", "score": "0.5889301", "text": "public function update()\n {\n // TODO find diff (actual/new_in_model) and make sql\n }", "title": "" }, { "docid": "ee356b5329bb25053367632de079b19b", "score": "0.5881411", "text": "public function updateEntityManager() {\n\t\t$this->_em = $this->_determineEntityManager();\n\t}", "title": "" }, { "docid": "562609bf216ad862560fad3d31ab9f37", "score": "0.5872368", "text": "private function Update() {\n $Update = new Update;\n $Update->ExeUpdate(self::Entity, $this->Data, \"WHERE produto_id = :id\", \"id={$this->Produto}\");\n if ($Update->getRowCount() >= 1):\n $this->Error = [\"O produto <b>{$this->Data['nome']}</b> foi atualizado com sucesso!\", WS_ACCEPT];\n $this->Result = true;\n endif;\n }", "title": "" }, { "docid": "4d8fcf4135e7bdf29e727217e6abb4a3", "score": "0.586342", "text": "public function commit()\n {\n $this->doctrine->commit();\n }", "title": "" }, { "docid": "2a2dd650332c40648085bbdb87a6d49e", "score": "0.5859235", "text": "protected function _update()\n {\n $this->_setModificationInfo();\n $this->_protectCreatedInfo();\n }", "title": "" }, { "docid": "507dab3bbac4ba1bf5d554fd8efa4072", "score": "0.5855883", "text": "protected function persistUpdate($em, $object) {\n\t\t$em->persist($object);\n\t}", "title": "" }, { "docid": "09d175b074b0d50194ce45bdf99c365f", "score": "0.58531886", "text": "public function update() {\n\t\t$db = new DB();\t\t\n $data = $this->loadData();\n $db->update($data, $this->tableName, 'id = '. $this->id);\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "6b05c0e1e1f2dabd30320d65555878b1", "score": "0.5850692", "text": "public function update() {\n parent::update();\n // Need to move the existing revisions to avoid re-creating the same\n // ones if this object is saved again.\n $this->existing_revisions = $this->backing[\"revisions\"];\n $this->backing[\"revisions\"] = array();\n }", "title": "" }, { "docid": "b603f8d0d62b3215f0668795e5da505a", "score": "0.584098", "text": "protected function update(Entity $entity)\n {\n $fields = [];\n $params = [];\n foreach ($entity as $fieldName => $value) {\n $params[\":{$fieldName}\"] = $value;\n if ($fieldName == 'id') {\n continue;\n }\n $fields[] = \"{$fieldName} = :{$fieldName}\";\n }\n\n// $sql = sprintf(\n// \"UPDATE %s SET %s WHERE id = :id\",\n// static::getTableName(),\n// implode(',', $fields)\n// );\n\n $sql = \"UPDATE \" . $this->getTableName() . \" SET \" . implode(',', $fields) . \" WHERE id = :id\";\n $this->getDB()->execute($sql, $params);\n return $entity;\n }", "title": "" }, { "docid": "eaf18f66946228a152f8b83c6b49e31e", "score": "0.5831696", "text": "public function update($id, $data) {}", "title": "" }, { "docid": "e4e7868610ac3b121f3d75c46b3734d5", "score": "0.58303607", "text": "public function update() {\r\n\t\tif (empty($this->changedData)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$update = array();\r\n\t\tforeach ($this->changedData as $index => $isNumeric) {\r\n\t\t\t$update[] = \"`{$index}` = {$this->quote($this->data[$index])}\";\r\n\t\t}\r\n\r\n\t\t$sql = \"\r\n\t\t\tUPDATE `{$this->table}`\r\n\t\t\tSET\r\n\t\t\t\t\".implode(',', $update).\"\r\n\t\t\tWHERE\r\n\t\t\t\t`{$this->primary}` = {$this->id}\r\n\t\t\tLIMIT 1;\";\r\n\t\t$database = $this->database();\r\n\t\t$database->query($sql);\r\n\t\t$database->freeResult();\r\n\r\n\t\t// Lisbeth_Entity must be in cache, since self::load() does a set if not available.\r\n\t\t$memcache = $this->memcache();\r\n\t\tif ($this->noCache) {\r\n\t\t\t$memcache->delete($this->cacheKey);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$memcache->replace($this->cacheKey, $this->data);\r\n\t\t}\r\n\r\n\t\t$this->changedData = array();\r\n\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "8a1f4c29959c423efa9cfe6624f10217", "score": "0.58246213", "text": "public function save(): void\n {\n $this->_isNew() ?\n self::repository()->persist($this) : self::repository()->upgrade($this);\n }", "title": "" }, { "docid": "8ffd29e4b618fd59de23cff28fbea9ad", "score": "0.5814459", "text": "public function update() {\t}", "title": "" }, { "docid": "c37580590cfb1b1fabab8a3db5c6b913", "score": "0.5810842", "text": "protected function update()\n {\n }", "title": "" }, { "docid": "4aaff1e3ffbbb33d3f5dd29011e1814d", "score": "0.5809741", "text": "protected function _update()\n\t{\n\t}", "title": "" }, { "docid": "97963d81eee42f0e25464e21cdd001f2", "score": "0.5796129", "text": "public function update()\n {\n foreach ($this->data as $datum){\n $this->validate($datum, \"PUT\");\n if(!empty($this->errors)){\n $this->pushErrorsToMain();\n continue;\n }\n $this->processor->model = $this->model::where($this->getUniqueIDField(),\n $datum[$this->getUniqueIDField()])->first();\n $this->processor->model = event(new BeforeUpdate($datum, $this->processor->model))[0];\n if(!empty($this->errors)){\n $this->pushErrorsToMain();\n continue;\n }\n $updateFunction = $this->options['update-method'] ?? 'update';\n $this->addDelta($datum);\n $this->processor->model->$updateFunction();\n event(new AfterUpdate($datum, $this->processor->model->fresh()));\n }\n return $this;\n }", "title": "" }, { "docid": "64882ac1d9157eff84abada5648fc0d4", "score": "0.5787698", "text": "public function update(Entity $entity): bool\n {\n $fields = $this->getEditableFields($entity);\n $fields[] = $entity->id;\n\n $result = DB::update($this->getQueries()->UPDATE, $fields);\n\n return $result === 1;\n }", "title": "" }, { "docid": "1c99e06c23f4d20fed41a8ba3d6c35a5", "score": "0.57729495", "text": "public function update()\n {\n\n }", "title": "" }, { "docid": "1c99e06c23f4d20fed41a8ba3d6c35a5", "score": "0.57729495", "text": "public function update()\n {\n\n }", "title": "" }, { "docid": "1c99e06c23f4d20fed41a8ba3d6c35a5", "score": "0.57729495", "text": "public function update()\n {\n\n }", "title": "" }, { "docid": "1c99e06c23f4d20fed41a8ba3d6c35a5", "score": "0.57729495", "text": "public function update()\n {\n\n }", "title": "" }, { "docid": "3dd65c95f818ba9ec2e7052a9f2b5f9e", "score": "0.5768198", "text": "protected function update () {\n\n }", "title": "" }, { "docid": "b3cefa6892be027ea262e92585d4596c", "score": "0.57641137", "text": "abstract public function save($entity);", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.57633287", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.57633287", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.57633287", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.57633287", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.57633287", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.57633287", "text": "public function update()\n {\n }", "title": "" } ]
17a704eb0f6e4efb7b297798fcf763dd
Get all invoices from EBoekhouden.nl.
[ { "docid": "297c28718eda4cb96662ff3b21ab9113", "score": "0.6270191", "text": "public function getInvoices(InvoiceFilter $filter = null): array\n {\n if (is_null($filter)) {\n $filter = new InvoiceFilter();\n }\n\n $dateFrom = $filter->getDateFrom() ?? new DateTime('1970-01-01 00:00:00');\n $dateTo = $filter->getDateTo() ?? new DateTime('2050-12-31 23:59:59');\n\n $result = $this->soapClient->__soapCall('GetFacturen', [\n 'GetFacturen' => [\n 'SessionID' => $this->sessionId,\n 'SecurityCode2' => $this->secCode2,\n 'cFilter' => [\n 'Factuurnummer' => $filter->getInvoiceNumber(),\n 'Relatiecode' => $filter->getRelationCode(),\n 'DatumVan' => $dateFrom->format('Y-m-d'),\n 'DatumTm' => $dateTo->format('Y-m-d'),\n ],\n ],\n ]);\n\n $this->checkError('GetFacturen', $result);\n\n if (! isset($result->GetFacturenResult->Facturen->cFactuurList)) {\n return [];\n }\n\n $invoices = $result->GetFacturenResult->Facturen->cFactuurList;\n\n if (! is_array($invoices)) {\n $invoices = [$invoices];\n }\n\n return array_map(fn ($item) => (new EboekhoudenInvoiceList((array)$item)), $invoices);\n }", "title": "" } ]
[ { "docid": "5d4e8d361af560883120f0dc440c736e", "score": "0.8489024", "text": "public function getInvoices()\n {\n $url = \"invoices\";\n\n return $this->request('get', $url);\n }", "title": "" }, { "docid": "fe2776e192393301bff2bf19eb7deb0d", "score": "0.84167624", "text": "function getAllInvoices() {\n return $this->request('GET', 'https://api.upodi.io/v2/invoices');\n }", "title": "" }, { "docid": "0075e72414ba8015708bb6f9817a160e", "score": "0.797593", "text": "public static function allInvoices()\n\t{\n\t\tif (Auth::user()->isAdmin()) {\n\t\t\t$company = Auth::user()->company;\n\t\t\t$invoices = Company::find($company->id)->invoices;\n\t\t}\n\t\telse {\n\t\t\t$invoices = Invoice::where('customer_id', Auth::user()->id)->get();\n\t\t}\n\t\treturn $invoices;\n\t}", "title": "" }, { "docid": "06e6c1e1d78bf6618038fd416f3fff7c", "score": "0.7914415", "text": "public function getAll(): array\n {\n return $this->invoices;\n }", "title": "" }, { "docid": "2b1ce15dc4926b9aa07523333e6c9473", "score": "0.7902417", "text": "public function listInvoices()\n\t{\n\t\t$response = $this->sendRequest(\n\t\t\t'/invoices',\n\t\t\t[ ],\n\t\t\ttrue,\n\t\t\t'get',\n\t\t\tnull,\n\t\t\ttrue\n\t\t);\n\n\t\t$response = new IterableResponse();\n\n\t\tforeach( $response as $inv )\n\t\t{\n\t\t\t$response->add(\n\t\t\t\tnew Entity\\Invoice($inv)\n\t\t\t);\n\t\t}\n\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "1979280a89e1349940e0f3a802c89b7a", "score": "0.7752991", "text": "public function getInvoices()\n {\n return $this->invoices;\n }", "title": "" }, { "docid": "dcd07d80ef49def1737ce03512425606", "score": "0.7713231", "text": "public static function getAll() {\n $sql = \"SELECT invoices.id AS invoice_id, invoices.*, cms_customer_data.*, tickets.*, cms_users.*, festival_events.* FROM invoices\n JOIN tickets ON invoices.id = tickets.invoice_id\n LEFT JOIN cms_customer_data ON invoices.user_id = cms_customer_data.user_id\n JOIN festival_events ON tickets.event_id = festival_events.id\n JOIN cms_users ON invoices.user_id = cms_users.id\";\n \n $ticketdata = App::get(\"db\")->query($sql);\n\n if (isset($ticketdata)) {\n $invoices = self::createInvoices($ticketdata);\n return $invoices;\n }\n return $invoices ?? [];\n\n }", "title": "" }, { "docid": "9b6574863666c56cdd6dc78766606f98", "score": "0.76130694", "text": "public function getInvoices(): array\n {\n $data = [];\n $url = \"https://panel.sendcloud.sc/api/v2/user/invoices\";\n $method = \"get\";\n $data[\"headers\"] = array(\n \"Accept\" => \"application/json, text/plain, */*\"\n );\n $response = [\n 200 =>\n array(\n '$type' => 'OBJ_ARRAY',\n '$ref' => 'HarmSmits\\\\SendCloudClient\\\\Models\\\\Invoice',\n ),\n ];\n $responseFilter = function ($response) {\n return $response[\"invoices\"] ?? [];\n };\n return [$method, $url, $data, $response, $responseFilter];\n }", "title": "" }, { "docid": "5eff2955f578f48337419323dab562dd", "score": "0.7404053", "text": "function get_invoices($id)\n\t{\n\t\tglobal $log, $singlepane_view;\n $log->debug(\"Entering get_invoices(\".$id.\") method ...\");\n\t\tglobal $app_strings;\n\t\trequire_once('modules/Invoice/Invoice.php');\n\n\t\t$focus = new Invoice();\n\n\t\t$button = '';\n\t\tif($singlepane_view == 'true')\n\t\t\t$returnset = '&return_module=Accounts&return_action=DetailView&return_id='.$id;\n\t\telse\n\t\t\t$returnset = '&return_module=Accounts&return_action=CallRelatedList&return_id='.$id;\n\n\t\t$query = \"SELECT ec_users.user_name,ec_invoice.*,ec_invoice.invoiceid as crmid,ec_account.accountname,ec_salesorder.subject AS salessubject\n\t\t\tFROM ec_invoice\n\t\t\tLEFT OUTER JOIN ec_account\n\t\t\t\tON ec_account.accountid = ec_invoice.accountid\n\t\t\tLEFT OUTER JOIN ec_salesorder\n\t\t\t\tON ec_salesorder.salesorderid = ec_invoice.salesorderid\n\t\t\tLEFT JOIN ec_users\n\t\t\t\tON ec_invoice.smownerid = ec_users.id\n\t\t\tWHERE ec_invoice.deleted = 0 AND ec_account.accountid = \".$id;\n\t\t$log->debug(\"Exiting get_invoices method ...\");\n\t\treturn GetRelatedList('Accounts','Invoice',$focus,$query,$button,$returnset);\n\t}", "title": "" }, { "docid": "be630050e44310d6447b842cf2738a0e", "score": "0.7356705", "text": "public function getInvoices()\n {\n return $this->hasMany(Invoice::className(), ['user_id' => 'id']);\n }", "title": "" }, { "docid": "269cf8a0c58446d659bb38b6b38df966", "score": "0.7227051", "text": "public function getInvoices()\n {\n $id = @$this->request->get['id'];\n $item = @$this->model_addon_invoices->getItem($id);\n $item['statustext'] = $this->document->invoicesstatus[$item['status']];\n @$this->data['output'] = json_encode($item);\n\n @$this->id=\"item\";\n @$this->template=\"common/output.tpl\";\n @$this->render();\n }", "title": "" }, { "docid": "740baa06df8945228eadbdfef748969a", "score": "0.7197384", "text": "public function index()\n {\n $invoices= Invoice::orderBy('id', 'desc')->limit(1)->get();\n return $invoices;\n\n }", "title": "" }, { "docid": "fb5452a1d969c69b4c85cf59725811e3", "score": "0.7162491", "text": "public function testFetchInvoices()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "a9bff0155cb5897e45b90373901552b1", "score": "0.71396637", "text": "public function invoices()\n {\n // invoices\n return $this->belongsToMany('Biffy\\Entities\\Invoice\\Invoice')\n ->withTimestamps();\n }", "title": "" }, { "docid": "f81567d49105e235ddb43e1d97be98d7", "score": "0.7134072", "text": "public function invoices()\n {\n return $this->hasMany(Invoice::class);\n }", "title": "" }, { "docid": "f81567d49105e235ddb43e1d97be98d7", "score": "0.7134072", "text": "public function invoices()\n {\n return $this->hasMany(Invoice::class);\n }", "title": "" }, { "docid": "424645827bfac12b1b2d26c7a02ecdd1", "score": "0.7119002", "text": "public function getInvoices()\n {\n $entities = false;\n if ($this->getRequest()->getParam('search')) {\n $details = [\n 'customer_number' => $this->customerSession->getCustomer()->getNavId(),\n ];\n $params = [\n 'date_from' => 'start_date',\n 'date_to' => 'end_date',\n 'po_number_from' => 'start_po_number',\n 'po_number_to' => 'end_po_number',\n 'invoice_number_from' => 'start_invoice_number',\n 'invoice_number_to' => 'end_invoice_number',\n ];\n foreach ($params as $name => $key) {\n $value = $this->getRequest()->getParam($name);\n if ($value) {\n $details[$key] = $value;\n }\n }\n $entities = $this->navSalesInvoice->get($details);\n }\n\n return $entities;\n }", "title": "" }, { "docid": "5fe52a35085688e6c42255575e7bef19", "score": "0.70189834", "text": "public function invoices() \n {\n return $this->hasMany(Invoice::class);\n }", "title": "" }, { "docid": "d3911a6ea0204bb858a702313be0d216", "score": "0.69778717", "text": "function getInvoicesOfCustomer($ID) {\n return $this->request('GET','https://api.upodi.io/v2/customers/' . $ID . '/invoice');\n }", "title": "" }, { "docid": "51c53cee46d54be0d703bede5e77d86d", "score": "0.69731367", "text": "function getInvoicesForContact($contactId){\n\t\t\t\n\t$invoices = Infusionsoft_DataService::findByField(new Infusionsoft_Invoice(), 'ContactId', $contactId);\n\treturn $invoices;\n}", "title": "" }, { "docid": "603254ecce9e4699fb2baea339591beb", "score": "0.69724554", "text": "public function executeGetInvoices()\n {\t\t\n global $wpdb;\n\n $columns = $this->getParameter( 'columns' );\n $order = $this->getParameter( 'order' );\n $filter = $this->getParameter( 'filter' );\n\n $query = Lib\\Entities\\Invoice::query( 'i' );\n\t\t$total = $query->count();\n\t\t$query->select('i.id as invoice_id,i.*,wc.*,wc.name as customer_name,st.full_name')\n\t\t\t// ->CustomtableJoin( 'InvoiceAppointment' , 'wia', 'wia.aid = i.aid' )\n\t\t\t ->CustomtableJoin( 'Customer', 'wc', 'wc.id = i.customer_id' )\n\t\t\t ->CustomtableJoin( 'Staff', 'st', 'st.id = i.mandant' );\n\t\t if ($filter != '') {\n $search_value = Lib\\Query::escape( $filter );\n $query\n ->whereLike( 'st.full_name', \"%{$search_value}%\")\n ->whereLike( 'i.bill_no', \"%{$search_value}%\", 'OR' )\n\t\t\t\t->whereLike( 'wc.name', \"%{$search_value}%\",'OR');\n }\n\t\t\n foreach ( $order as $sort_by ) {\n $query->sortBy( str_replace( '.', '_', $columns[ $sort_by['column'] ]['data'] ) )\n ->order( $sort_by['dir'] == 'desc' ? Lib\\Query::ORDER_DESCENDING : Lib\\Query::ORDER_ASCENDING );\n }\n\t\t\n $query->limit( $this->getParameter( 'length' ) )->offset( $this->getParameter( 'start' ) );\n $data = array();\n foreach ( $query->fetchArray() as $row ) {\n\t\t\t$row_id = $row['id']; \n\t\t\t$in_app_query = Lib\\Entities\\InvoiceAppointment::query( 'wia' )\n\t\t\t->select('*,wia.typ as type,wia.qty as quantity,wia.id as billing_id')\n\t\t\t->where( 'wia.aid', $row_id);\n\t\t\t\n\t\t\t$billingdata = $in_app_query->fetchArray();\n\t\t\t\n $data[] = array(\n 'id' => $row['invoice_id'],\n 'aid' => $row['invoice_id'],\n 'bill_no' => $row['bill_no'],\n\t\t\t\t'staff_id'\t\t\t => $row['mandant'],\n 'customer_id' => $row['customer_id'],\n 'bill_date' => $row['bill_date'] ? Lib\\Utils\\DateTime::formatDateTime( $row['bill_date'] ) : '',\n 'amount' => Lib\\Utils\\Common::formatPrice( $row['amount'] ),\n 'payed' => Lib\\Utils\\Common::formatPrice( $row['payed'] ),\n 'mandant' => $row['full_name'],\n 'customer_name' => $row['name'],\n\t\t\t\t'billings'\t\t\t => $billingdata\n );\n }\n\t\t$customers = Lib\\Utils\\Common::isCurrentUserAdmin()\n ? Lib\\Entities\\Customer::query()->select('id,name')->sortBy( 'id' )->fetchArray()\n : Lib\\Entities\\Customer::query()->select('id,name')->where( 'wp_user_id', get_current_user_id() )->fetchArray();\n\t\t//echo '<pre>' ; print_r($data) ; die;\n wp_send_json( array(\n 'draw' => ( int ) $this->getParameter( 'draw' ),\n 'recordsTotal' => $total,\n 'recordsFiltered' => $total,\n 'data' => $data,\n\t\t\t'customers'\t\t => $customers\t\n ) ); \t\n\t\t\n }", "title": "" }, { "docid": "5ca2ae0fe6efd32d39c722bcdb7a6f91", "score": "0.6971627", "text": "public function index()\n {\n //\n return response()->json(Invoices::all());\n }", "title": "" }, { "docid": "8619149df5c2a718f87a5c129c0d6357", "score": "0.6960853", "text": "public function getInvoices($userId, $page, $limit);", "title": "" }, { "docid": "7fdbe17fe26a7b88605a7cfbecabaabd", "score": "0.69221586", "text": "public function invoices()\n {\n return $this->hasMany('App\\Invoice');\n }", "title": "" }, { "docid": "7d55bea1e03440eb484fbe88ed8207c3", "score": "0.69153845", "text": "public function showInvoices($id)\n {\n return $this->apiCall('GET', 'invoices', $id);\n }", "title": "" }, { "docid": "73da9609919e66d0d5ed3f7bb839d459", "score": "0.69036615", "text": "public function invoices()\n {\n return $this->hasMany('App\\Models\\Invoice');\n }", "title": "" }, { "docid": "d074520a1d8bae7797de5b3d29078d00", "score": "0.6848899", "text": "public function actionGetExistingInvoices()\n\t{\n\t\t$client_id = Yii::$app->request->post('client_id');\n\t\t$client_case_id = Yii::$app->request->post('client_case_id');\n\t\t$display_type = Yii::$app->request->post('display_type');\n\n\t\t$existing_invoices = (new InvoiceFinal)->getExistingInvoicesForClientCase($client_id, $client_case_id, $display_type);\n\t\t$invoice_data = array();\n\t\tforeach($existing_invoices as $val)\n\t\t{\n\t\t\t$invoice_data[$val['id']] = \"Invoice #\".$val['id'].\" \".(new Options)->ConvertOneTzToAnotherTz($val['created_date'], 'UTC', $_SESSION['usrTZ'],'MDY');\n\t\t}\n\t\t$html = \"\";\n\t\tif(count($invoice_data) > 0)\n\t\t{\n\t\t\t\tif(count($invoice_data) == 1)\n\t\t\t\t{\n\t\t\t\t\tforeach($invoice_data as $key => $val)\n\t\t\t\t\t{\n\t\t\t\t\t\t\t$html = '<span style=\"padding-left: 30px;color: #666;\">'.$val.'</span><input type=\"hidden\" id=\"selected_invoice\" name=\"selected_invoice\" value=\"'.$key.'\" />';\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\n\t\t\t\t\t$stroptions = \"\";\n\t\t\t\t\tforeach($invoice_data as $key => $val)\n\t\t\t\t\t{\n\t\t\t\t\t\t\tif($stroptions!=\"\")\n\t\t\t\t\t\t\t\t$stroptions = $stroptions.'<option value=\"'.$key.'\">'.$val.'</option>';\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t$stroptions = '<option value=\"'.$key.'\">'.$val.'</option>';\n\n\t\t\t\t\t}\n\t\t\t\t\t$html = $stroptions;\n\t\t\t\t}\n\t\t}\n\t\t$resp_arr = array();\n\t\t$resp_arr['invoice_count'] = count($invoice_data);\n\t\t$resp_arr['html_text'] = $html;\t\t\n\t\techo json_encode($resp_arr);\n\t\tdie;\n\t}", "title": "" }, { "docid": "5a6b46b3df3d81d39965f8d84714df1a", "score": "0.6838656", "text": "public function index() {\n\t\tif (!$invoice_client = $this->cache->get('invoice')) {\n\t\t\t$invoices = ORM::factory('invoice');\n\t\t\t\n\t\t\t$invoice_client = array();\n\t\t\tforeach ($invoices->find_all() as $invoice) {\n\t\t\t\t$invoice_client[$invoice->id] = array();\n\t\t\t\t\n\t\t\t\t$invoice_client[$invoice->id] = $invoice->as_array();\n\t\t\t\t$invoice_client[$invoice->id]['item'] = array();\n\t\t\t\t/*foreach ($invoice->items as $item) {\n\t\t\t\t\tarray_push($invoice_client[$invoice->id]['item'], $item->as_array());\n\t\t\t\t}*/\n\t\t\t}\n\t\t\t\n\t\t\t// Save cache and give it a tag\n\t\t\t$tags = array('clients', 'invoice');\n\t\t\t$this->cache->set('invoice', $invoice_client, $tags);\n\t\t}\n\t\t\n\t\t$this->template->content = new View('invoices/index');\n\t\t$this->template->content->invoices = $invoice_client;\n\t}", "title": "" }, { "docid": "5dbbb66313527ba7ebbd221302b78b0b", "score": "0.6837836", "text": "public function getUserInvoices($user)\n {\n return $user->invoices();\n }", "title": "" }, { "docid": "92074a6fe33d20f3739e63bd19eac7e7", "score": "0.68117243", "text": "public function invoices()\n {\n return $this->hasMany('App\\Models\\Invoice', 'user_id');\n }", "title": "" }, { "docid": "2728346664eaa76423f675e273d41b17", "score": "0.6792646", "text": "function viewInvoices($invoice = null) {\n \n $curl = new Curl();\n $header = $this->getHeader(True);\n\n if(!is_null($invoice)) {\n $fullUrl = $this->getApiUrl() . '/account/invoices/' . $invoice;\n } else {\n $fullUrl = $this->getApiUrl() . '/account/invoices';\n }\n \n $invoice = $curl->curlGet($fullUrl, $header);\n return $invoice;\n }", "title": "" }, { "docid": "be44df86fdb6054979af55b97d2b14a9", "score": "0.67713624", "text": "function getAllInvoices($user_id)\n {\n\n $this->db->select(\"inv.*\");\n\n $this->db->from('tbl_invoices as inv');\n\n $this->db->where('inv.user_id', $user_id);\n $this->db->order_by('inv.invoice_date', 'desc');\n\n $query = $this->db->get();\n\n return $query->result_array();\n }", "title": "" }, { "docid": "9be56c1d27eb46e181194bb0bc5b7aa7", "score": "0.67550343", "text": "public function index()\n {\n $this->allowedAdminAction();\n $invoices = Invoice::all();\n return $this->showAll($invoices);\n }", "title": "" }, { "docid": "d5a3cebbb4fdc5aeafa82c687f9adf64", "score": "0.6721204", "text": "public function index()\n {\n\n return view('admin.invoices.invoices');\n }", "title": "" }, { "docid": "2d42261caab846441de2fb569e55cca5", "score": "0.67186147", "text": "private function build_invoices() {\n\t\t$invoices = self::fetch('invoices', [':rma_id' => $this->id()]);\n\n\t\tforeach ($invoices as &$invoice) {\n\t\t\t$invoice['invoice_date'] = self::DateTime($invoice['invoice_date']);\n\t\t\t$invoice['paid_in_full'] = CK\\fn::check_flag($invoice['paid_in_full']);\n\t\t\t$invoice['credit_memo'] = CK\\fn::check_flag($invoice['credit_memo']);\n\n\t\t\t$invoice['products'] = self::fetch('invoice_products', [':invoice_id' => $invoice['invoice_id']]);\n\t\t\t$invoice['totals'] = self::fetch('invoice_totals', [':invoice_id' => $invoice['invoice_id']]);\n\t\t\t$invoice['allocated_payments'] = self::fetch('invoice_allocated_payments', [':invoice_id' => $invoice['invoice_id']]);\n\n\t\t\tforeach ($invoice['products'] as &$product) {\n\t\t\t\t$product['ipn'] = new ck_ipn2($product['stock_id']);\n\t\t\t}\n\t\t}\n\n\t\t$this->skeleton->load('invoices', $invoices);\n\t}", "title": "" }, { "docid": "0e14b75c5aa6e11ddb1d07631884d30f", "score": "0.671326", "text": "public function index()\n {\n return SalesInvoice::all();\n }", "title": "" }, { "docid": "2d6a5d96d755cedc0942e149fa854bb8", "score": "0.6699361", "text": "public function index()\n {\n $invoices = Invoice::all();\n return view('Invoices.invoices', compact('invoices'));\n }", "title": "" }, { "docid": "be7e8d710946734b266492c466c27d8c", "score": "0.668637", "text": "public function index()\n {\n $allInvoices = Invoice::all();\n return View('pages.invoices.index')->withInvoices($allInvoices);\n }", "title": "" }, { "docid": "dd4236372cca657ff83dc50c589f30ee", "score": "0.6667334", "text": "public function index()\n {\n $in= Invoice::all();\n return view('admin.invoice.index')\n ->withInvoices($in);\n }", "title": "" }, { "docid": "3e6bfa12c720aa8f09294bf6d338ba48", "score": "0.6652365", "text": "public function index()\n {\n $invoices = Invoice::all();\n return view('invoices.index', ['invoices' => $invoices, 'clients', Client::all()]);\n }", "title": "" }, { "docid": "29470ca8072e6c9e0144d14df7b38a38", "score": "0.6648931", "text": "public function get_invoices($id) {\n\t\tglobal $log,$singlepane_view;\n\t\t$log->debug('> get_invoices '.$id);\n\t\trequire_once 'modules/Invoice/Invoice.php';\n\n\t\t$focus = new Invoice();\n\n\t\t$button = '';\n\t\tif ($singlepane_view == 'true') {\n\t\t\t$returnset = '&return_module=SalesOrder&return_action=DetailView&return_id='.$id;\n\t\t} else {\n\t\t\t$returnset = '&return_module=SalesOrder&return_action=CallRelatedList&return_id='.$id;\n\t\t}\n\t\t$crmtablealias = CRMEntity::getcrmEntityTableAlias('Invoice');\n\t\t$query = \"select vtiger_crmentity.*, vtiger_invoice.*, vtiger_account.accountname,\n\t\t\tvtiger_salesorder.subject as salessubject, case when (vtiger_users.user_name not like '') then vtiger_users.user_name else vtiger_groups.groupname end as user_name\n\t\t\tfrom vtiger_invoice\n\t\t\tinner join $crmtablealias on vtiger_crmentity.crmid=vtiger_invoice.invoiceid\n\t\t\tleft join vtiger_account on vtiger_account.accountid=vtiger_invoice.accountid\n\t\t\tleft join vtiger_contactdetails on vtiger_contactdetails.contactid=vtiger_invoice.contactid\n\t\t\tinner join vtiger_salesorder on vtiger_salesorder.salesorderid=vtiger_invoice.salesorderid\n\t\t\tLEFT JOIN vtiger_invoicecf ON vtiger_invoicecf.invoiceid = vtiger_invoice.invoiceid\n\t\t\tLEFT JOIN vtiger_invoicebillads ON vtiger_invoicebillads.invoicebilladdressid = vtiger_invoice.invoiceid\n\t\t\tLEFT JOIN vtiger_invoiceshipads ON vtiger_invoiceshipads.invoiceshipaddressid = vtiger_invoice.invoiceid\n\t\t\tleft join vtiger_users on vtiger_users.id=vtiger_crmentity.smownerid\n\t\t\tleft join vtiger_groups on vtiger_groups.groupid=vtiger_crmentity.smownerid\n\t\t\twhere vtiger_crmentity.deleted=0 and vtiger_salesorder.salesorderid=\".$id;\n\n\t\t$log->debug('< get_invoices');\n\t\treturn GetRelatedList('SalesOrder', 'Invoice', $focus, $query, $button, $returnset);\n\t}", "title": "" }, { "docid": "dcdc52635a5dc0d1ad20b254b83f7b36", "score": "0.662836", "text": "public function show(Invoices $invoices)\n {\n //\n }", "title": "" }, { "docid": "067fd398c6d13082892baa0b3932c732", "score": "0.6613496", "text": "public function invoices(Request $request) {\n if(!$request->user()->subscribed('main')) {\n return redirect('subscription/plans');\n }\n\n $invoices = $request->user()->LLRinvoices()->get();\n\n return view('dashboard.invoices', [\n 'invoices' => $invoices\n ]);\n }", "title": "" }, { "docid": "9b3d88d54fed7b59c9b6f4dd17f9ca56", "score": "0.66117066", "text": "public function invoiceList(){\n $now = Carbon::now();\n $invoices = Invoice::where('trash',0)->where('tenant_id', Auth::user()->tenant_id)->orderBy('id', 'DESC')->get();\n $monthly = Invoice::where('tenant_id', Auth::user()->tenant_id)\n ->whereMonth('created_at', date('m'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->whereYear('created_at', date('Y'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('trash', '!=',1)\n ->sum(\\DB::raw('total'));\n $last_month = Invoice::where('tenant_id', Auth::user()->tenant_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ->whereMonth('created_at', '=', $now->subMonth()->month)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ->where('trash', '!=',1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ->sum(\\DB::raw('total'));\n $thisYear = Invoice::where('tenant_id', Auth::user()->tenant_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->whereYear('created_at', date('Y'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('trash', '!=',1)\n ->sum(\\DB::raw('total'));\n $this_week = Invoice::where('tenant_id', Auth::user()->tenant_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->whereBetween('created_at', [$now->startOfWeek()->format('Y-m-d H:i'), $now->endOfWeek()->format('Y-m-d H:i')])\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('trash', '!=',1)\n ->sum(\\DB::raw('total'));\n return view('backend.crm.invoice.index',\n [\n 'invoices'=>$invoices,\n 'monthly'=>$monthly,\n 'last_month'=>$last_month,\n 'this_week'=>$this_week,\n 'thisYear'=>$thisYear\n ]);\n }", "title": "" }, { "docid": "aff328c2d3a6806f513601d3c83305bb", "score": "0.6611295", "text": "public function invoices()\n {\n return $this->morphMany('App\\Models\\Invoice', 'invoiceable');\n }", "title": "" }, { "docid": "9e4e5ba0ef92ec6bef6544936f461332", "score": "0.6603972", "text": "public function index()\n {\n $invoices = Invoice::with(['user', 'product'])->latest('created_at')->paginate(5);\n //dd($invoices);\n return view('pages.invoices.list', compact('invoices'));\n }", "title": "" }, { "docid": "905f056fd0eee76d3695920c86d1b9c4", "score": "0.6591626", "text": "public function clientsInvoices(int $id): array\n {\n $invoices = array();\n $rawData = $this->doCall('clients/' . $id . '/invoices.json');\n if (!empty($rawData)) {\n foreach ($rawData as $data) {\n $invoices[] = Invoice::initializeWithRawData($data);\n }\n }\n\n return $invoices;\n }", "title": "" }, { "docid": "55988579d9b1c7d0a286f2a2b03ee472", "score": "0.6578974", "text": "public function getInvoices(OrderStatus $orderStatus);", "title": "" }, { "docid": "2a54aa93bb81b410802f8983493e834d", "score": "0.65625316", "text": "function get_invoices() {\n\n\tglobal $db;\n\t$query = $db->prepare(\"SELECT * FROM invoices\");\n\t$query->execute();\n\t$invoices = $query->fetchAll();\n\n\n\n\tif(isset($invoices)) {\n\t\techo \"<table id='members'>\";\n\t\techo \"Invoice: <br />\";\n\t\techo \"<th>Invoice ID</th><th>Member ID</th><th>Date</th><th>Tire ID</th><th>Quantity</th><th>Amount Paid</th>\";\n\t\tforeach ($invoices as $invoice){\n\t\t\techo \"<tr><td>\";\n\t\t\techo \"\".$invoice['idinvoices'].'</td><td>'.$invoice['idmembers'].' </td><td>'.$invoice['date'].' </td><td>'.$invoice['idtires'].'</td><td>'.$invoice['quantity'].'</td><td>'.$invoice['paid'];\n\t\t\techo \"</td></tr>\";\n\t\t}echo \"</table>\";\n\t} \n}", "title": "" }, { "docid": "fd5e71936c06e068c31b5115ff03734e", "score": "0.6554828", "text": "public function actionListInvoice()\n {\n Yii::$app->response->format = Response::FORMAT_JSON;\n\n if ($this->validateSignature()) {\n $result = [];\n\n $model = Invoice::find()->all();\n\n foreach ($model as $data) {\n $invoice = $data->attributes;\n $invoice = ArrayHelper::merge($invoice, $data->customer->attributes);\n $invoice['items'] = [];\n\n foreach ($data->invoiceDetails as $items) {\n $invoiceDetail[$items->product->name] = $items->attributes;\n $invoiceDetail[$items->product->name] = ArrayHelper::merge(\n $invoiceDetail[$items->product->name],\n $items->product->attributes\n );\n }\n\n $invoice['items'] = $invoiceDetail;\n $result[] = $invoice;\n }\n\n return $this->response($result);\n }\n\n return [\n 'status' => 'failed',\n 'message' => 'Invalid request',\n ];\n }", "title": "" }, { "docid": "b251120ecfcc51397e06a7102d632e1e", "score": "0.6533861", "text": "public function index()\n {\n return view('master.list_invoice');\n }", "title": "" }, { "docid": "79b40ffe288f5a6fd823c78b422332dd", "score": "0.65333617", "text": "public function index()\n {\n $invoices = invoice_entry::all();\n return view('invoice.index')->with('invoices',$invoices);\n }", "title": "" }, { "docid": "20d1a3e35cb9ac83ee677469a02358d4", "score": "0.6487864", "text": "public function index()\n {\n return view('invoices.index', ['fournisseurs' => Fournisseur::all(), 'invoices' => Invoice::all()]);\n }", "title": "" }, { "docid": "04b60384cb9174997c216b7481f3aba4", "score": "0.6483931", "text": "public function index()\n {\n $invoices = Invoice::all();\n return view('invoices.index', ['invoices' => $invoices, 'payment_status' => PaymentStatus::all()]);\n }", "title": "" }, { "docid": "61ffb1b409fb280a65acaae149d19ffc", "score": "0.64752126", "text": "public static function showIncidencias(){\r\n\t\trequire_once 'modelo/incidencia.php';\r\n\t\t$incidencia = new Incidencia();\r\n $incidencias = $incidencia->getAll(); \r\n\t\treturn $incidencias;\t\t\r\n }", "title": "" }, { "docid": "03bb8ba08f103be574e0f39e7080bab8", "score": "0.6470263", "text": "public function invoices(Request $request)\n {\n\t\t$dataForView = array();\n\t\t$user_elt_invoices = DB::table('elt_invoices')->select('elt_invoices.*')->where('elt_invoices.user_id',Auth::user()->id)->orderBy('id', 'DESC')->get();\n\t\t$dataForView['user_elt_invoices'] = $user_elt_invoices;\n\t\treturn view('invoices', $dataForView);\n }", "title": "" }, { "docid": "d136d4d9a1ff503626ad72f9d1ab4f73", "score": "0.6468976", "text": "public function loadInvoices(Request $request) {\n $status = $request->only('status')['status'];\n $invoices = Invoice::getInvoicesCurrent($status);\n $count = Invoice::countInvoices(Auth::user()->id);\n return response()->json([\n 'countInProgress' => $count['countInProgress'],\n 'countOnTheWay' => $count['countOnTheWay'],\n 'countTransported' => $count['countTransported'],\n 'countSuccess' => $count['countSuccess'],\n 'countCanceled' => $count['countCanceled'],\n 'view' => view('layout_user.invoice-list', compact(['invoices', 'status']))->render()\n ]);\n }", "title": "" }, { "docid": "bf3997c795c89a46706ae1397f361ce3", "score": "0.64584696", "text": "public function index()\n {\n //$data = Invoice::with('client','payment')->get();\n\n //$clients = Client::with('invoices')->latest()->paginate(5);\n $invoices = Invoice::join('payments','invoices.payment_id','=','payments.id')->join('clients','clients.id','=','invoices.client_id')->get(['invoices.id','clients.name','invoices.total','invoices.status','invoices.created_at','payments.payment_type']);\n\n //$invoices = Invoice::with('clients','payments')->latest()->paginate(5);\n\n return view('invoices.index',compact('invoices'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }", "title": "" }, { "docid": "608c31257f3e7d20a8457d3bdd6ca714", "score": "0.645623", "text": "public function getInvoicesById(array $ids) {\n\t\treturn $this->getMbObjectsById('invoices', $ids);\n\t}", "title": "" }, { "docid": "e9dddf10ec9e5949bef81c6bc1db0dfc", "score": "0.6450144", "text": "public function hasInvoices();", "title": "" }, { "docid": "9470d7c6afe3d8cb57d4f97284802b85", "score": "0.6449994", "text": "public function getInvoices(EntityInterface $entity, $view_mode, $field_name, $price, &$hash, $account = NULL);", "title": "" }, { "docid": "ac334a40e7716892a83ccb07c4ab9949", "score": "0.6448862", "text": "public function invoices(int $limit = 10)\n {\n $customer = $this->customer();\n\n if ($customer !== null) {\n $invoices = Billing::listAllInvoices([\n 'customer' => $customer['id'],\n 'limit' => $limit\n ]);\n\n if (count($invoices) > 0) {\n return $invoices['data'];\n } else {\n return null;\n }\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "97cc5d7a3ec285e2d55506f65c2aa1cc", "score": "0.6408451", "text": "public function get_invoice_lines(){\n\n $lines = array();\n\n $products = $this->get_products();\n if( !empty( $products ) ){ $lines = array_merge( $lines, $products ); }\n\n $shipping = $this->get_shipping();\n if( !empty( $shipping ) ){ $lines = array_merge( $lines, $shipping ); }\n\n $fees = $this->get_fees();\n if( !empty( $fees ) ){ $lines = array_merge( $lines, $fees ); }\n\n $discount = $this->get_discount();\n if( !empty( $discount ) ){ $lines = array_merge( $lines, $discount ); }\n\n return $lines;\n\n }", "title": "" }, { "docid": "d9fa37a51d1004a85453a15fd009d524", "score": "0.64081633", "text": "function ListInvoicesAndPayments()\n\t{\n\t\t// Check user authorization\n\t\tAuthenticatedUser()->CheckClientAuth();\n\n\t\t// Load the account\n\t\tif (!DBO()->Account->Load())\n\t\t{\n\t\t\tBreadCrumb()->Console();\n\t\t\tBreadCrumb()->SetCurrentPage(\"Error\");\n\t\t\tDBO()->Error->Message = \"The account with account id: \". DBO()->Account->Id->value .\" could not be found\";\n\t\t\t$this->LoadPage('error');\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t// Check that the user can view this account\n\t\t$bolUserCanViewAccount = FALSE;\n\t\tif (AuthenticatedUser()->_arrUser['account_id'] == DBO()->Account->Id->Value)\n\t\t{\n\t\t\t// The user can only view the account, if it is their primary account\n\t\t\t$bolUserCanViewAccount = TRUE;\n\t\t}\n\t\t\n\t\tif (!$bolUserCanViewAccount)\n\t\t{\n\t\t\t// The user does not have permission to view the requested account\n\t\t\tBreadCrumb()->Console();\n\t\t\tBreadCrumb()->SetCurrentPage(\"Error\");\n\t\t\tDBO()->Error->Message = \"ERROR: The user does not have permission to view account# \". DBO()->Account->Id->Value;\n\t\t\t$this->LoadPage('Error');\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t$intAccountId = DBO()->Account->Id->Value;\n\t\t\n\t\t// Retrieve all Invoices and all Payments for the account\n\t\t$arrInvoiceColumns = array(\t\"Id\"\t\t\t\t=> \"I.Id\",\n\t\t\t\t\t\t\t\t\t\"AccountGroup\"\t\t=> \"I.AccountGroup\",\n\t\t\t\t\t\t\t\t\t\"Account\"\t\t\t=> \"I.Account\",\n\t\t\t\t\t\t\t\t\t\"CreatedOn\"\t\t\t=> \"I.CreatedOn\",\n\t\t\t\t\t\t\t\t\t\"DueOn\"\t\t\t\t=> \"I.DueOn\",\n\t\t\t\t\t\t\t\t\t\"SettledOn\"\t\t\t=> \"I.SettledOn\",\n\t\t\t\t\t\t\t\t\t\"Credits\"\t\t\t=> \"I.Credits\",\n\t\t\t\t\t\t\t\t\t\"Debits\"\t\t\t=> \"I.Debits\",\n\t\t\t\t\t\t\t\t\t\"Total\"\t\t\t\t=> \"I.Total\",\n\t\t\t\t\t\t\t\t\t\"Tax\"\t\t\t\t=> \"I.Tax\",\n\t\t\t\t\t\t\t\t\t\"TotalOwing\"\t\t=> \"I.TotalOwing\",\n\t\t\t\t\t\t\t\t\t\"Balance\"\t\t\t=> \"I.Balance\",\n\t\t\t\t\t\t\t\t\t\"Disputed\"\t\t\t=> \"I.Disputed\",\n\t\t\t\t\t\t\t\t\t\"AccountBalance\"\t=> \"I.AccountBalance\",\n\t\t\t\t\t\t\t\t\t\"DeliveryMethod\"\t=> \"I.DeliveryMethod\",\n\t\t\t\t\t\t\t\t\t\"Status\"\t\t\t=> \"I.Status\",\n\t\t\t\t\t\t\t\t\t\"invoice_run_id\"\t=> \"I.invoice_run_id\"\n\t\t\t\t\t\t\t\t\t);\n\t\t\n\t\t$strInvoiceWhere = \"I.Account = $intAccountId AND I.Status != \". INVOICE_TEMP .\" AND ir.invoice_run_status_id = \". INVOICE_RUN_STATUS_COMMITTED .\" AND ir.invoice_run_type_id = \". INVOICE_RUN_TYPE_LIVE;\n\t\t$strInvoiceTables = \"Invoice AS I INNER JOIN InvoiceRun AS ir ON I.invoice_run_id = ir.Id\";\n\t\tDBL()->Invoice->SetTable($strInvoiceTables);\n\t\tDBL()->Invoice->SetColumns($arrInvoiceColumns);\n\t\tDBL()->Invoice->Where->SetString($strInvoiceWhere);\n\t\tDBL()->Invoice->OrderBy(\"I.CreatedOn DESC\");\n\t\tDBL()->Invoice->Load();\n\t\t\n\t\ttry\n\t\t{\n\t\t\tDBO()->Payments \t= $this->_loadPayments();\n\t\t\tDBO()->Adjustments \t= $this->_loadAdjustments();\n\t\t}\n\t\tcatch (Exception $oEx)\n\t\t{\n\t\t\tBreadCrumb()->Console();\n\t\t\tBreadCrumb()->SetCurrentPage(\"Error\");\n\t\t\tDBO()->Error->Message = \"ERROR: We were unable to display the Invoices and Payments for your Account (# \". DBO()->Account->Id->Value.\"). \".$oEx->getMessage();\n\t\t\t$this->LoadPage('Error');\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Breadcrumb menu\n\t\tBreadCrumb()->LoadAccountInConsole(DBO()->Account->Id->Value);\n\t\tif (DBO()->Account->BusinessName->Value)\n\t\t{\n\t\t\t// Display the business name in the bread crumb menu\n\t\t\tBreadCrumb()->SetCurrentPage(\"Invoices and Payments - \" . substr(DBO()->Account->BusinessName->Value, 0, 60));\n\t\t}\n\t\telseif (DBO()->Account->TradingName->Value)\n\t\t{\n\t\t\t// Display the business name in the bread crumb menu\n\t\t\tBreadCrumb()->SetCurrentPage(\"Invoices and Payments - \" . substr(DBO()->Account->TradingName->Value, 0, 60));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Don't display the business name in the bread crumb menu\n\t\t\tBreadCrumb()->SetCurrentPage(\"Invoices and Payments\");\n\t\t}\n\n\t\t// All required data has been retrieved from the database so now load the page template\n\t\t$this->LoadPage('list_invoices_and_payments');\n\t\t\n\t\treturn TRUE;\n\t\n\t}", "title": "" }, { "docid": "acac4a5bd11df630400fc79ff1477689", "score": "0.6406684", "text": "function getInvoices($clientID,$productID,$startDate,$endDate)\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('invoices');\n\t\t$this->db->join('invoicelineitems','invoicelineitems.invoice_num=invoices.invoice_num');\n\t\t$this->db->join('products','products.product_id=invoicelineitems.product_id');\n\t\t$this->db->where('invoices.client_id',$clientID);\n\t\t$this->db->where('products.product_id',$productID);\n\t\t$this->db->where('invoices.invoice_date >=',$startDate);\n\t\t$this->db->where('invoices.invoice_date <=',$endDate);\n\t\t$query=$this->db->get();\n\t\t\n\t\treturn $query->result();\n\t}", "title": "" }, { "docid": "ef9869a6eb8d8ac4fcf2dcf903a42f29", "score": "0.6402495", "text": "public function index()\n {\n return view('invoices.index', [\n 'invoices' => Invoice::with('seller')->paginate(10),\n ]);\n }", "title": "" }, { "docid": "65186b918c94ce74bf95b4c5042dd7f3", "score": "0.6401293", "text": "public function index()\n {\n\n $invoice = Invoice::orderBy('created_at', 'DESC')->get();\n return view('invoices.invoice', [\n 'pageTitle' => 'Invoice',\n 'invoices' => $invoice\n ]);\n }", "title": "" }, { "docid": "bbb37456ad5b7e4fa1cb8827435d56bc", "score": "0.63965005", "text": "public function index($id = null)\n {\n if($id==null) {\n $proformaInvoices = ProformaInvoice::all();\n return $proformaInvoices->toJson();\n\n }\n }", "title": "" }, { "docid": "0a6fce36636d6caebf9d5db4f6755545", "score": "0.63884336", "text": "private function getIncomingInvoices(): Collection\n {\n return $this->storageProductInvoiceRepository->getRetrieveInvoicesQuery(\n (new StorageInvoiceConstraints())\n ->setStorageId($this->retrievedStorage->id)\n ->setInvoiceStatus(InvoiceStatusInterface::PROCESSING)\n ->setInvoiceType([\n InvoiceTypes::USER_ORDER,\n InvoiceTypes::USER_PRE_ORDER,\n InvoiceTypes::USER_RETURN_ORDER,\n InvoiceTypes::RECLAMATION,\n InvoiceTypes::EXCHANGE_RECLAMATION,\n InvoiceTypes::RETURN_RECLAMATION,\n ])\n ->setInvoiceDirection(InvoiceDirections::INCOMING)\n ->setImplementedStatus(0)\n )\n ->doesntHave('shipment')\n ->where(function ($query) {\n $query->whereHas('userInvoice', function ($query) {\n $query->where('implemented', 1);\n })\n ->orWhereHas('vendorInvoice', function ($query) {\n $query->where('implemented', 1);\n })\n ->orWhereHas('storageInvoice', function ($query) {\n $query->where('implemented', 1);\n $query->where('direction', InvoiceDirections::OUTGOING);\n });\n })\n ->get();\n }", "title": "" }, { "docid": "46620ccb9e7f33965c063de867cad321", "score": "0.63883346", "text": "public function index()\n {\n $user = Auth::user();\n $invoices = $user->invoices;\n\n return view('users.invoices', [\n 'user' => $user,\n 'invoices' => $invoices,\n ]);\n }", "title": "" }, { "docid": "4950985282fa4d6a61708c555c9e7bcd", "score": "0.6380629", "text": "public function index()\n {\n $invoices = Invoice::withTotal()->get(); //desafio 1.1\n\n $ids = Invoice::with([\"productsHigher100\"]) //desafio 1.2\n ->get()\n ->filter(function ($item) {\n return count($item->productsHigher100) > 0;\n })->pluck(\"id\");\n\n //desafio 1.3\n $products = Product::cursor()->filter(function ($product) {\n return $product->total >= 1000000;\n });\n\n return view(\"invoices.index\", compact([\"invoices\", \"ids\", \"products\"]));\n }", "title": "" }, { "docid": "7d62dedfd67fd71adbdecb8cf536ec9f", "score": "0.6374913", "text": "public function index()\n {\n $invoices = Invoice::paginate(100);\n return view('dashboard/invoices/index',compact('invoices'));\n }", "title": "" }, { "docid": "f92d6013f81d69fce055e3f0b3653305", "score": "0.6366898", "text": "public function getInvoice(ReceiptCollection $receipts);", "title": "" }, { "docid": "e907fa413ecc18761352753f6c68d4a0", "score": "0.63531756", "text": "public function invoices()\n {\n return $this->belongsToMany('App\\Invoice', 'files_invoices');\n }", "title": "" }, { "docid": "3d313f23687f50f23deb294d4a4ad724", "score": "0.63353336", "text": "public function index()\n {\n return view('invoice.index', [\n 'invoices' => Invoice::all(),\n ]);\n }", "title": "" }, { "docid": "4042163e1a082d6818f3d0fb69f53453", "score": "0.6330613", "text": "public function index()\n {\n $invoices=SaleInvoice::latest()->orderby('id','desc')->get();\n //return $invoices;\n return view('backend.invoice.index',compact('invoices'));\n }", "title": "" }, { "docid": "b29f1d9a2c07dcfa89c317768ae48135", "score": "0.6319674", "text": "public function actionIndex()\n {\n $searchModel = new InvoiceSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "b29f1d9a2c07dcfa89c317768ae48135", "score": "0.6319674", "text": "public function actionIndex()\n {\n $searchModel = new InvoiceSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "a784baa19743cd7eafc1e5ca4948e3c2", "score": "0.6319321", "text": "public function index()\n {\n $invoices = Auth::user()->invoices;\n\n return view('invoice.index', compact('invoices'));\n }", "title": "" }, { "docid": "e5dc7b33e98202146a8774c36ce9e737", "score": "0.6309213", "text": "public function invoiceItems() {\n\t\treturn $this->hasMany('App\\InvoiceItem')->orderBy('id','desc');\n\t}", "title": "" }, { "docid": "15988cd7dba5d9fcc17f03c6e34c3226", "score": "0.63058776", "text": "public function findByEmptyInvoice()\n\t{\n\t\treturn $this->createQueryBuilder('o')\n\t\t\t->where('o.invoices is NULL')\n\t\t\t->orderBy('o.orderNumber', 'DESC')\n\t\t\t->getQuery()\n\t\t\t->getResult();\n\t}", "title": "" }, { "docid": "114540ccceb000707f2579c603a7b564", "score": "0.6300827", "text": "public function index()\n\t{\n\t\t$invoices = \\App\\invoice::All();\n\t\treturn view ('invoice.index',compact('invoices'));\n\t}", "title": "" }, { "docid": "cbcb0d9c9c65a31556a45bb1e73c728b", "score": "0.62995726", "text": "public function invoicesFrom()\n {\n return $this->hasMany(Invoice::class, 'origin_id');\n }", "title": "" }, { "docid": "13d8a3bf4ced1531b4c465ce79bbc013", "score": "0.6293864", "text": "public function getById($id)\n {\n $res = $this->makeHttpRequest('/invoices/' . $id);\n return $res;\n }", "title": "" }, { "docid": "e34f89ca4ea62422afb52130e047deec", "score": "0.62825423", "text": "public function index()\n {\n $store_id = session()->get('store')->id;\n $delivery_date = session()->get('delivery_date');\n\n// $query = \"select invoice_details.* from `invoices`\n// \tjoin invoice_details on invoice_details.invoice_id = invoices.id\n// \twhere invoices.store_id = '$store_id'\n// \t\tand invoices.delivery_date = '$delivery_date'\";\n\n $invoices = DB::table('invoices')\n ->join('invoice_details', 'invoice_details.invoice_id', '=', 'invoices.id')\n// ->join('invoice_totals', 'invoice_totals.invoice_id', '=', 'invoices.id')\n ->select('invoice_details.*')\n ->paginate(5);\n\n// $invoices = DB::select(DB::raw($query));\n//dd($invoices);\n return view('invoices.index', compact('invoices'));\n }", "title": "" }, { "docid": "694ac4250241a322f036d2dfd2fb0850", "score": "0.6280157", "text": "public function index()\n {\n $invoices = Invoice::whereHas('products.shipment.user', function ($query) {\n $query->where('id', '=', Auth::user()->id);\n })->get();\n return view('member.invoices.invoices')->with(compact(\n 'invoices'\n ));\n }", "title": "" }, { "docid": "c5d667f04d2916b026c15b88eaffedad", "score": "0.62771064", "text": "public function index()\n {\n access_is_allowed('read.point.sales.invoice');\n\n $view = view('point-sales::app.sales.point.sales.invoice.index');\n $list_invoice = Invoice::joinFormulir()->joinPerson()->notArchived()->selectOriginal();\n $list_invoice = InvoiceHelper::searchList($list_invoice, \\Input::get('order_by'), \\Input::get('order_type'), \\Input::get('status'), \\Input::get('date_from'), \\Input::get('date_to'), \\Input::get('search'));\n $view->list_invoice = $list_invoice->paginate(100);\n $array_invoice_id = [];\n $view->array_invoice_id = $array_invoice_id;\n return $view;\n }", "title": "" }, { "docid": "5005f9ef7f355c36f61c6fdcea226303", "score": "0.6268339", "text": "public function getPurchaseInvoices()\n {\n return $this->hasOne(PurchaseInvoices::class, ['id' => 'purchase_invoices_id']);\n }", "title": "" }, { "docid": "386dad422cbf8530b74c3be9efc51ecf", "score": "0.6266514", "text": "public function index()\n {\n $invoices = Invoice::with([\n 'client' => function ($query) {\n return $query->select('DCLink', 'Name', 'Account');\n },\n 'quote' => function ($query) {\n return $query->select('id', 'invoice_id');\n }\n ])\n ->when(request('type') == 1, function ($builder) {\n return $builder->nonInbound();\n })\n ->when(request('type') == 2, function ($builder) {\n return $builder->nonOutbound();\n })\n ->when(\\request('final'), function ($builder) {\n return $builder->freightActual();\n })\n ->when(! \\request('final'), function ($builder) {\n return $builder->with(['nonWaybill' => function ($query) {\n return $query->select('id', 'current_status');\n }])->freightProforma();\n })\n ->get();\n\n return view('non-invoice.index')\n ->with('currency', Setting::value(Setting::CURRENCY))\n ->with('invoices', $invoices);\n }", "title": "" }, { "docid": "2b111cf98c4ce25fff42f7462ca69673", "score": "0.6265357", "text": "public function getAll() {\n\n return Invite::all();\n }", "title": "" }, { "docid": "177faf3fc51b5c9de4ac57595bb9927d", "score": "0.6264733", "text": "public function index()\n {\n $invoices = Invoice::paginate(10);\n //dd($recruiters->toArray());\n return view('hrms.invoice.index', compact('invoices'));\n }", "title": "" }, { "docid": "7e1c8518c35623d4e3bb2bc724df8182", "score": "0.6261162", "text": "public function index(Request $request)\n {\n\n //$invoices = $this->invoiceRepository->all();\n $invoices = Invoice::with('payment.customer')->get();\n //$invoices = DB::table('invoices')->get();\n //dd($invoices);die;\n return view('invoices.index')\n ->with('invoices', $invoices);\n }", "title": "" }, { "docid": "3ed2ddd566d1785bbdbcac3100e67bd1", "score": "0.62540394", "text": "public function actionIndex() {\n $searchModel = new \\app\\models\\SearchInvoice();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "88927f8825a04f9ab8baa4b97088cbb4", "score": "0.6246787", "text": "public function index()\n {\n try{\n $invoices = Invoice::orderBy('id')->get();\n return response()->json(['invoices' => $invoices,'status' => 200]);\n }catch(\\Exception $e){\n return $e->getMessage();\n }\n }", "title": "" }, { "docid": "212dd3957b109170d6f3c29ff1270663", "score": "0.62455153", "text": "public function localInvoices()\n {\n return $this->hasMany(LocalInvoice::class)->orderBy('id', 'desc');\n }", "title": "" }, { "docid": "51b3da73adfe96803cd3d0d989a1ee41", "score": "0.6245111", "text": "public function getCCEmailAddresses()\n\t{\n\t\t$response = $this->sendRequest(\n\t\t\t'/cc/invoices',\n\t\t\t[ ],\n\t\t\ttrue,\n\t\t\t'get',\n\t\t\tnull,\n\t\t\ttrue\n\t\t);\n\n\t\t$return = new IterableResponse();\n\n\t\tforeach( $response as $email )\n\t\t{\n\t\t\t$return->add(\n\t\t\t\tnew Entity\\EmailAddress(\n\t\t\t\t\t$email->{'email-address'},\n\t\t\t\t\t$email->id\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "27c39a16db16f13bef0386996a1370cc", "score": "0.62385404", "text": "public function getInvoicesFromAPI($startDate, $endDate)\n {\n $parameters = [\n \"cmd\" => \"EARSIV_PORTAL_TASLAKLARI_GETIR\",\n \"callid\" => Uuid::uuid1()->toString(),\n \"pageName\" => \"RG_BASITTASLAKLAR\",\n \"token\" => $this->token,\n \"jp\" => '{\"baslangic\":\"' . $startDate . '\",\"bitis\":\"' . $endDate . '\",\"hangiTip\":\"5000/30000\", \"table\":[]}'\n ];\n\n $body = $this->sendRequestAndGetBody(self::DISPATCH_PATH, $parameters);\n $this->checkError($body);\n\n // Array tipinden verilen tarih aralığında yer alan faturalar dönüyor\n $this->invoices = $body['data'];\n\n return $body;\n }", "title": "" }, { "docid": "ea929df1f307d2b0aac866503164d177", "score": "0.62364507", "text": "function getInvoices() {\n\n\t// Connect to the database\n\t$mysqli = new mysqli(DATABASE_HOST, DATABASE_USER, DATABASE_PASS, DATABASE_NAME);\n\n\t// output any connection error\n\tif ($mysqli->connect_error) {\n\t\tdie('Error : ('.$mysqli->connect_errno .') '. $mysqli->connect_error);\n\t}\n\n\t// the query\n $query = \"SELECT * \n\t\tFROM invoices i\n\t\tJOIN Customers c\n\t\tON c.CustomerID = i.CustomerID\n\t\t\n\t\tORDER BY i.invoice\";\n//WHERE i.invoice = c.invoice\n\t// mysqli select query\n\t$results = $mysqli->query($query);\n\n\t// mysqli select query\n\tif($results) {\n\n\t\tprint '<table class=\"table table-striped table-bordered\" id=\"data-table\" cellspacing=\"0\"><thead><tr>\n\n\t\t\t\t<th><h4>Invoice</h4></th>\n\t\t\t\t<th><h4>Customer</h4></th>\n\t\t\t\t<th><h4>Issue Date</h4></th>\n\t\t\t\t<th><h4>Due Date</h4></th>\n\t\t\t\t<th><h4>Type</h4></th>\n\t\t\t\t<th><h4>Status</h4></th>\n\t\t\t\t<th><h4>Action</h4></th>\n\n\t\t\t </tr></thead><tbody>';\n\n\t\twhile($row = $results->fetch_assoc()) {\n\n\t\t\tprint '\n\t\t\t\t<tr>\n\t\t\t\t\t<td>'.$row[\"invoice\"].'</td>\n\t\t\t\t\t<td>'.$row[\"CustomerName\"].'</td>\n\t\t\t\t <td>'.$row[\"invoice_date\"].'</td>\n\t\t\t\t <td>'.$row[\"invoice_due_date\"].'</td>\n\t\t\t\t <td>'.$row[\"invoice_type\"].'</td>\n\t\t\t\t';\n\n\t\t\t\tif($row['status'] == \"open\"){\n\t\t\t\t\tprint '<td><span class=\"label label-info\">'.$row['status'].'</span></td>';\n\t\t\t\t} elseif ($row['status'] == \"paid\"){\n\t\t\t\t\tprint '<td><span class=\"label label-success\">'.$row['status'].'</span></td>';\n\t\t\t\t}\n\n\t\t\tprint '\n\t\t\t\t <td><a href=\"invoice-edit.php?id='.$row[\"invoice\"].'\" class=\"btn btn-primary btn-xs\"><span class=\"glyphicon glyphicon-edit\" aria-hidden=\"true\"></span></a> <a href=\"#\" data-invoice-id=\"'.$row['invoice'].'\" data-email=\"'.$row['email'].'\" data-invoice-type=\"'.$row['invoice_type'].'\" data-custom-email=\"'.$row['custom_email'].'\" class=\"btn btn-success btn-xs email-invoice\"><span class=\"glyphicon glyphicon-envelope\" aria-hidden=\"true\"></span></a> <a href=\"/invoices/'.$row[\"invoice\"].'.pdf\" class=\"btn btn-info btn-xs\" target=\"_blank\"><span class=\"glyphicon glyphicon-download-alt\" aria-hidden=\"true\"></span></a> <a data-invoice-id=\"'.$row['invoice'].'\" class=\"btn btn-danger btn-xs delete-invoice\"><span class=\"glyphicon glyphicon-trash\" aria-hidden=\"true\"></span></a></td>\n\t\t\t </tr>\n\t\t\t';\n\n\t\t}\n\n\t\tprint '</tr></tbody></table>';\n\n\t} else {\n\n\t\techo \"<p>There are no invoices to display.</p>\";\n\n\t}\n\n\t// Frees the memory associated with a result\n\t$results->free();\n\n\t// close connection \n\t$mysqli->close();\n\n}", "title": "" }, { "docid": "5422af0518454a7e044acd91926c4284", "score": "0.6233632", "text": "static public function get_meta_invoices($selector = array())\n {\n\n $cachekey = 'meta_invoices';\n\n $ttl = Config::get('dailyemd.ttl');\n\n $cache = self::lookup($cachekey);\n\n if($cache !== false)\n {\n return $cache;\n }\n\n //otherwise\n\n $result = array();\n\n $res = DB::connection('emds')->table(\"VIEW_API_InvoiceIndex\")->orderBy('Invoice_DAY', 'asc')->get();\n\n foreach($res as $r)\n {\n $result[$r->Invoice_ID] = array( 'emd' => $r->InvoiceNumber_EMD,\n 'location'=>self::fix_name(self::translateLocation($r->Organization_Name)),\n 'day'=>$r->Invoice_DAY,\n 'week'=>$r->Invoice_WEEK,\n 'days_old'=>floor((time()- strtotime($r->Invoice_Date))/86400),\n 'provider'=>self::fix_name($r->ProviderName,'md'),\n 'service'=>self::fix_name($r->Invoice_Comment,'service'),\n 'insurance'=>self::fix_name($r->InsuranceCompName,'org'),\n 'total'=>$r->InvoiceTotal,\n 'paid'=>$r->InsurancePaid,\n 'status'=>$r->InvoiceStatus_Code,\n 'adj'=>$r->InsuranceAdjustment,\n 'running_paid'=>0,\n 'running_adj'=>0\n );\n }\n\n self::store($cachekey, $result, $ttl);\n\n return $result;\n }", "title": "" }, { "docid": "fef589ea08edb3228068651d5bb3f42a", "score": "0.6224138", "text": "public function invoicesGet(string $id)\n {\n $rawData = $this->doCall('invoices/' . $id . '.json');\n if(empty($rawData)) return false;\n\n return Invoice::initializeWithRawData($rawData);\n }", "title": "" } ]
3cb3313623a3869f10cef80824fbc264
function ApplicationSendEmail, Parameter list: $user,$mailhash,$filters=array(),$attachments=array() Sends email calling Email::SendEmail. Add trailer msg and inserts MailInfo vars into $mailhash.
[ { "docid": "a21b9985c2eacb3ad2869636dc0dd5bf", "score": "0.8567182", "text": "function ApplicationSendEmail($user,$mailhash,$filters=array(),$attachments=array())\n {\n if (!is_array($attachments)) { $attachments=array($attachments); }\n \n $this->Mail2Recipients($mailhash);\n\n if (!empty($user))\n {\n $mailhash[ \"To\" ]=array($user[ \"Email\" ]);\n if (empty($user[ \"Email\" ]) && !empty($user[ \"CondEmail\" ]))\n {\n $mailhash[ \"To\" ]=array($user[ \"CondEmail\" ]);\n }\n }\n \n foreach (array(\"FromEmail\",\"FromName\") as $data)\n {\n $mailhash[ $data ]=$this->MailInfo[ $data ];\n }\n \n $mailhash[ \"Body\" ].=\n \"\\n-----\\n\".\n \"####################################################################################\\n\".\n $this->MyLanguage_GetMessage(\"MailTrailer\").\"\\n\".\n \"####################################################################################\";\n\n $filters=array_merge\n (\n array($user),\n $filters\n );\n\n foreach (array(\"Body\",\"Subject\") as $data)\n {\n $mailhash[ $data ]=$this->FilterMailField($mailhash[ $data ],$filters);\n }\n \n $this->EmailStatus=FALSE;\n if (!empty($this->DBHash[ \"MailDebug\" ]))\n {\n echo \n \"Fake sending...<BR>\".\n \"To: \".\n join(\",<BR>\",$mailhash[ \"To\" ]).\n \"<BR>\".\n \"CC: \".\n join(\",<BR>\",$mailhash[ \"CC\" ]).\n \"<BR>\".\n \"BCC: \".\n join(\",<BR>\",$mailhash[ \"BCC\" ]).\n \"<BR>\".\n \"Subject: \".$mailhash[ \"Subject\" ].\n \"<BR>\".\n \"Body: \".preg_replace('/\\n/',\"<BR>\",$mailhash[ \"Body\" ]).\n \"<BR>\".\n \"\";\n\n if (!empty($attachments))\n {\n echo\n \"Attachments:\".\n $this->BR().\n join($this->BR(),$attachments).\n \"\";\n }\n $this->EmailStatus=TRUE;\n }\n else\n {\n if ($this->SendEmail($this->MailInfo(),$mailhash,$attachments))\n {\n $this->EmailStatus=TRUE;\n }\n else\n {\n $this->EmailStatusMessage=\"Erro enviando email: \".$this->Email_PHPMailer->ErrorInfo;\n $this->EmailStatus=FALSE; \n }\n\n echo $this->EmailStatusMessage($mailhash,$attachments);\n }\n\n return $this->EmailStatus;\n }", "title": "" } ]
[ { "docid": "bc488059a4d3c9df9d0b714098a80282", "score": "0.6304468", "text": "function sendMailing()\n {\n\t\tif ((count($this->emailUsers)>0) && $this->emailSubject && $this->emailBody){\n\t\t\tif ($this->addTime){\n\t\t\t\t//append timestamp logic to the email \n\t\t\t\t$additionalString = \"\\n\"; \n\t\t\t\t$additionalString .=\"This emai was sent on \".date('l jS Y', $this->timestamp);\n\t\t\t\t$this->emailBody .= $additionalString;\n\t\t\t}\n\n\t\t\tforeach($this->emailUsers as $emailUser){\t\t\n\t\t\t\tmail($emailUser, $this->emailSubject, $this->emailBody); \n\t\t\t\t$this->logEmail($emailUser, $this->emailSubject);\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "d6c5e3c444b257b881485ee510f16ee5", "score": "0.6200264", "text": "function sendMail($se_name,$to_email,$date,$bodyStr=\"\",$allUsernames)\n{\ninclude_once(JsConstants::$docRoot.\"/commonFiles/comfunc.inc\");\n\t$from \t=\"[email protected]\";\n\t$subject=\" 3 days to service delivery for $allUsernames\";\n\t$body \t=\" Dear $se_name,<br>\n\t\tThe following profiles are to be serviced on $date. Should you miss the deadline of $date, all the profiles in the shortlist will go to the user. <br>\";\n\t$body .=$bodyStr;\n\tsend_email($to_email,$body,$subject,$from);\n}", "title": "" }, { "docid": "9323767f568d84ab337f4d5731342b2c", "score": "0.6173545", "text": "function sendmail($templateId, $email, $anchor, $add_headers=\"\", $attach_params = array() )\n\t{\n $CONTENT_TYPE = \"text/plain\";\n //$CONTENT_TYPE = \"text/html\";\n\t\t// get fields from template ID\n\t\t$entity = load_entity_class('base', 'mail');\n\t\t$result = $entity->DB->RetrieveRecord($templateId, 'key', '');\n\n if( $result[\"record\"][\"has_html\"][\"value\"] == 1 ){\n $CONTENT_TYPE = \"text/html\";\n }\n\n\t\t$subject = $result ['record']['subject']['value'];\n\t\t$subject = '=?utf-8?B?'.base64_encode($subject).'?=';\n\t\t$message = $result ['record']['text']['value'];\n\t\t//$message = convert_cyr_string($message, \"w\",\"k\");\n\t\t$from = $result ['record']['from']['value'];\n\t\t// if filed \"from\" is empty then load \"email_from\" value from base site settings\n\t\tif (empty ($from))\n\t\t{\n\t\t\t$entity->DB->fields = array (\n\t\t\t\t\t'id'\t=> array(),\n\t\t\t\t\t'title' => array(),\n\t\t\t\t\t'key' => array(),\n\t\t\t\t\t'value' => array(),\n\t\t\t\t\t);\n\t\t\t$result = $entity->DB->RetrieveRecord('email_from', 'key', 'base_settings');\n\t\t\t$from = $result ['record']['value']['value'];\n\t\t}\n\t\t// parsing headers\n\t\tif (!empty ($from))\n\t\t{\n\t\t\t//$from = '=?koi8-r?B?'.base64_encode(convert_cyr_string($from, \"w\",\"k\")).'?=';\n\t\t\t$from = '=?utf-8?B?'.base64_encode($from).'?=';\n\t\t\t$from = 'From: '.$from.\"<\".SITE_MAIL_ADDRESS.\">\\n\";\n\t\t\t//--- if empty atach params set CORRECT message encoding here ---//\n\t\t\tif (empty($attach_params)){\n\t\t\t\t$from .= \"Content-Type: {$CONTENT_TYPE}; charset=utf-8\";\n\t\t\t}\n\t\t}\n\t\t$headers = $from;\n\t\tif (!empty ($add_headers))\n\t\t{\n\t\t\t$headers.=\"\\n\".$add_headers;\n\t\t}\n\t\t\n\t\t// attaching file\n\t\tif ( !empty($attach_params) ){\n\t\t\t$unique_delimiter = strtoupper(uniqid(time()));\n\t\t $attach_headers = \"Content-Type:multipart/mixed;\"; \n\t\t $attach_headers .= \"boundary=\\\"----------\".$unique_delimiter.\"\\\"\\n\\n\";\n\n\t\t $attach_message = \"------------\".$unique_delimiter.\"\\nContent-Type:{$CONTENT_TYPE}; charset=utf-8\\n\"; \n\t\t $attach_message .= \"Content-Transfer-Encoding: 8bit\\n\\n$message\\n\\n\";\n\t\t\t//$attach_message .= \"charset=windows-1251;\\n\\n$message\\n\\n\";\n\t\t //$attach_message .= \"------------\".$unique_delimiter.\"\\n\"; \n\n\t\t\tforeach($attach_params as $val){\n\t\t\t\t$full_path = $val['full_path'];\n\t\t\t\t$mime_type = GetMimeTypeByExtension($full_path);\n\t\t\t\t$file_handler = fopen($full_path, \"rb\"); \n\t\t\t $attach_message .= \"------------\".$unique_delimiter.\"\\n\"; \n\t\t\t\t$attach_message .= \"Content-type: $mime_type;\";\n\t\t\t $attach_message .= \"name=\\\"\".basename($full_path).\"\\\"\\n\"; \n\t\t\t $attach_message .= \"Content-Transfer-Encoding:base64\\n\"; \n\t\t\t $attach_message .= \"Content-Disposition:attachment;\"; \n\t\t\t $attach_message .= \"filename=\\\"\".basename($full_path).\"\\\"\\n\\n\"; \n\t\t\t $attach_message .= chunk_split(base64_encode(fread($file_handler, filesize($full_path)))).\"\\n\";\n\t\t\t}\n\t\t\t//$attach_headers .= \"------------\".$unique_delimiter.\"\\n\";\n\t\t\t$headers .= $attach_headers;\n\t\t\t$message = $attach_message;\n\t\t}\n\t\t\n\n\t\t// replace message\n\t\tforeach ($anchor as $key => $value)\n\t\t{\n\t\t\t$message = str_replace(\"%$key%\", $value, $message);\n\t\t}\n\t\t//echo \"<h2> EMAIL=$email SUBJ=$subject MESSAGE = $message </h2>\"; exit;\n\t\treturn mail ($email, $subject, $message, $headers);\n\t}", "title": "" }, { "docid": "40723dd5c8168f4e2dbf1f42786e1304", "score": "0.60932744", "text": "function runner_mail($params) {\n\t$customSMTP = \"1\";\n\tif (! GetGlobalData ( \"useBuiltInMailer\", false )) {\n\t\tinclude_once (getabspath ( 'libs/phpmailer/class.phpmailer.php' ));\n\t\tinclude_once (getabspath ( 'libs/phpmailer/class.smtp.php' ));\n\t\treturn runner_mail_smtp ( $params );\n\t}\n\t\n\t$from = isset ( $params ['from'] ) ? $params ['from'] : \"\";\n\tif (! $from) {\n\t\t$from = \"[email protected]\";\n\t}\n\t$to = isset ( $params ['to'] ) ? $params ['to'] : \"\";\n\t$body = isset ( $params ['body'] ) ? $params ['body'] : \"\";\n\t$cc = isset ( $params ['cc'] ) ? $params ['cc'] : \"\";\n\t$bcc = isset ( $params ['bcc'] ) ? $params ['bcc'] : \"\";\n\t$replyTo = isset ( $params ['replyTo'] ) ? $params ['replyTo'] : \"\";\n\t$priority = isset ( $params ['priority'] ) ? $params ['priority'] : \"\";\n\t$charset = \"\";\n\t$isHtml = false;\n\tif (! $body) {\n\t\t$body = isset ( $params ['htmlbody'] ) ? $params ['htmlbody'] : \"\";\n\t\t$charset = isset ( $params ['charset'] ) ? $params ['charset'] : \"\";\n\t\tif (! $charset)\n\t\t\t$charset = \"utf-8\";\n\t\t$isHtml = true;\n\t}\n\t$subject = $params ['subject'];\n\t\n\t//\n\t$header = \"\";\n\tif ($isHtml) {\n\t\t$header .= \"MIME-Version: 1.0\\r\\n\";\n\t\t$header .= 'Content-Type: text/html;' . ($charset ? ' charset=' . $charset . ';' : '') . \"\\r\\n\";\n\t}\n\t\n\tif ($from) {\n\t\tif (strpos ( $from, '<' ) !== false)\n\t\t\t$header .= 'From: ' . $from . \"\\r\\n\";\n\t\telse\n\t\t\t$header .= 'From: <' . $from . \">\\r\\n\";\n\t\t\n\t\t@ini_set ( \"sendmail_from\", $from );\n\t}\n\tif ($cc)\n\t\t$header .= 'Cc: ' . $cc . \"\\r\\n\";\n\tif ($bcc)\n\t\t$header .= 'Bcc: ' . $bcc . \"\\r\\n\";\n\t\n\tif ($priority)\n\t\t$header .= 'X-Priority: ' . $priority . \"\\r\\n\";\n\t\n\tif ($replyTo) {\n\t\tif (strpos ( $replyTo, '<' ) !== false)\n\t\t\t$header .= 'Reply-to: ' . $replyTo . \"\\r\\n\";\n\t\telse\n\t\t\t$header .= 'Reply-to: <' . $replyTo . \">\\r\\n\";\n\t}\n\t\n\t$eh = new ErrorHandler ();\n\tset_error_handler ( array (\n\t\t\t$eh,\n\t\t\t\"handle_mail_error\" \n\t) );\n\t\n\t$res = false;\n\tif (! $header) {\n\t\t$res = mail ( $to, $subject, $body );\n\t} else {\n\t\t$res = mail ( $to, $subject, $body, $header );\n\t}\n\t\n\trestore_error_handler ();\n\treturn array (\n\t\t\t'mailed' => $res,\n\t\t\t'errors' => $eh->errorstack,\n\t\t\t\"message\" => nl2br ( $eh->getErrorMessage () ) \n\t);\n}", "title": "" }, { "docid": "723a201e29aa3bf5adccb333930ca5bc", "score": "0.6093061", "text": "private function send_notification_email($email, $subject, $message, $attachment_str=\"\", $filename=\"\", $cc_email=array(), $bcc_email=array(), $from=\"\")\r\n {\r\n\r\n include_once(BASEPATH . \"plugins/phpmailer/phpmailer_pi.php\");\r\n $phpmail = new PHPMailer();\r\n $phpmail->IsSMTP();\r\n if(!$from)\r\n $phpmail->From = \"Admin <[email protected]>\";\r\n else\r\n $phpmail->From = $from;\r\n\r\n if(!is_array($email))\r\n $email = (array)$email;\r\n\r\n // echo \"<br><br> \".__LINE__.\" Email list:<br>\"; \r\n foreach ($email as $key => $add)\r\n {\r\n if($add != \"\")\r\n {\r\n $phpmail->AddAddress($add);\r\n // echo $add . \"<br>\";\r\n }\r\n }\r\n\r\n if($cc_email) {\r\n foreach ($cc_email as $key => $ccadd) {\r\n $phpmail->AddCC(trim($ccadd));\r\n }\r\n }\r\n if($bcc_email) {\r\n foreach ($bcc_email as $key => $bccadd) {\r\n $phpmail->AddBCC(trim($bccadd));\r\n }\r\n } \r\n\r\n $phpmail->Subject = $subject;\r\n $phpmail->IsHTML(true);\r\n $phpmail->Body = $message;\r\n if(!empty($attachment_str))\r\n {\r\n if(!$filename)\r\n {\r\n $filename = date(\"Ymd_His\"). \"_file.txt\";\r\n }\r\n\r\n $phpmail->AddStringAttachment($attachment_str, $filename);\r\n }\r\n\r\n // send out if not on dev\r\n if(strpos($_SERVER[\"HTTP_HOST\"], \"dev\") === FALSE)\r\n $result = $phpmail->Send();\r\n }", "title": "" }, { "docid": "1bcb4a194932687cfc3bfcb65f6fa96b", "score": "0.6075337", "text": "function ew_SendEmail($sFrEmail, $sToEmail, $sCcEmail, $sBccEmail, $sSubject, $sMail, $sFormat, $sCharset) {\r\n\tglobal $Language, $gsEmailErrDesc;\r\n\t$res = FALSE;\r\n\tif (EW_EMAIL_COMPONENT == \"PHPMAILER\") {\r\n\t\t$mail = new PHPMailer();\r\n\t\t$mail->IsSMTP(); \r\n\t\t$mail->Host = EW_SMTP_SERVER;\r\n\t\t$mail->SMTPAuth = (EW_SMTP_SERVER_USERNAME <> \"\" && EW_SMTP_SERVER_PASSWORD <> \"\");\r\n\t\t$mail->Username = EW_SMTP_SERVER_USERNAME;\r\n\t\t$mail->Password = EW_SMTP_SERVER_PASSWORD;\r\n\t\t$mail->Port = EW_SMTP_SERVER_PORT;\r\n\t\t$mail->From = $sFrEmail;\r\n\t\t$mail->FromName = $sFrEmail;\r\n\t\t$mail->Subject = $sSubject;\r\n\t\t$mail->Body = $sMail;\r\n\t\tif ($sCharset <> \"\" && strtolower($sCharset) <> \"iso-8859-1\")\r\n\t\t\t$mail->Charset = $sCharset;\r\n\t\t$sToEmail = str_replace(\";\", \",\", $sToEmail);\r\n\t\t$arrTo = explode(\",\", $sToEmail);\r\n\t\tforeach ($arrTo as $sTo) {\r\n\t\t\t$mail->AddAddress(trim($sTo));\r\n\t\t}\r\n\t\tif ($sCcEmail <> \"\") {\r\n\t\t\t$sCcEmail = str_replace(\";\", \",\", $sCcEmail);\r\n\t\t\t$arrCc = explode(\",\", $sCcEmail);\r\n\t\t\tforeach ($arrCc as $sCc) {\r\n\t\t\t\t$mail->AddCC(trim($sCc));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($sBccEmail <> \"\") {\r\n\t\t\t$sBccEmail = str_replace(\";\", \",\", $sBccEmail);\r\n\t\t\t$arrBcc = explode(\",\", $sBccEmail);\r\n\t\t\tforeach ($arrBcc as $sBcc) {\r\n\t\t\t\t$mail->AddBCC(trim($sBcc));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (strtolower($sFormat) == \"html\") {\r\n\t\t\t$mail->ContentType = \"text/html\";\r\n\t\t} else {\r\n\t\t\t$mail->ContentType = \"text/plain\";\r\n\t\t}\r\n\t\t$res = $mail->Send();\r\n\t\t$gsEmailErrDesc = $mail->ErrorInfo;\r\n\r\n\t\t// Uncomment to debug\r\n//\t\tvar_dump($mail); exit();\r\n\r\n\t} else {\r\n\t\t$to = $sToEmail;\r\n\t\t$subject = $sSubject;\r\n\t\t$message = $sMail;\r\n\r\n\t\t// header\r\n\t\t$content_type = (strtolower($sFormat) == \"html\") ? \"text/html\" : \"text/plain\";\r\n\t\tif ($sCharset <> \"\")\r\n\t\t\t$content_type .= \"; charset=\" . $sCharset;\r\n\t\t$headers = \"Content-type: \" . $content_type . \"\\r\\n\";\r\n\t\t$headers .= \"From: \" . str_replace(\";\", \",\", $sFrEmail) . \"\\r\\n\";\r\n\t\tif ($sCcEmail <> \"\")\r\n\t\t\t$headers .= \"Cc: \" . str_replace(\";\", \",\", $sCcEmail) . \"\\r\\n\";\r\n\t\tif ($sBccEmail <>\"\")\r\n\t\t\t$headers .= \"Bcc: \" . str_replace(\";\", \",\", $sBccEmail) . \"\\r\\n\";\r\n\t\tif (EW_IS_WINDOWS) {\r\n\t\t\tif (EW_SMTP_SERVER <> \"\")\r\n\t\t\t\tini_set(\"SMTP\", EW_SMTP_SERVER);\r\n\t\t\tif (is_int(EW_SMTP_SERVER_PORT))\r\n\t\t\t\tini_set(\"smtp_port\", EW_SMTP_SERVER_PORT);\r\n\t\t}\r\n\t\tini_set(\"sendmail_from\", $sFrEmail);\r\n\t\t$res = mail($to, $subject, $message, $headers);\r\n\t\t$gsEmailErrDesc = ($res) ? $Language->Phrase(\"FailedToSendMail\") : \"\";\r\n\r\n\t\t// Uncomment to debug\r\n//\t\techo \"Header: \" . $headers . \"<br>\" . \"Subject: \" . $subject . \"<br>\" .\r\n//\t\t\t\"To: \" . $to . \"<br>\" .\t\"Body: \" . $message . \"<br>\";\texit();\r\n\r\n\t}\r\n\treturn $res;\r\n}", "title": "" }, { "docid": "0dfbf882ceecae0b5aac30d3cf030e1a", "score": "0.60576034", "text": "public function SendMail(\n int $ModuleIdMail, \n string $Receivers, \n string $NotificationSubject, \n string $Message, \n string $MediaID=\"0\", \n string $AttachmentPath=\"\"\n ) \n {\n // Empänger in Array umwandeln wenn mehrere uebergeben wurden\n $Receivers = explode(\";\", str_replace(\" \", \"\",$Receivers));\n\n // empaenger durchgehen\n foreach($Receivers as $Receiver) {\n \n // Log Message zusammenbauen\n $LogMessage = \"ModuleIdMail: $ModuleIdMail\\nReceiver: $Receiver\\nNotificationSubject: $NotificationSubject\\nMessage: $Message\\nMediaID: $MediaID\\nAttachmentPath: $AttachmentPath\";\n\n if($Receiver !== \"\") {\n if($MediaID==0 && $AttachmentPath==\"\") {\n $Status = @SMTP_SendMailEx ($ModuleIdMail, $Receiver, $NotificationSubject, $Message);\n\n if($Status==false) {\n $this->LogMessage(IPS_GetName($_IPS['SELF']).\" (\". $_IPS['SELF'].\") Fehler beim Senden der Mail.\\n\".$LogMessage, KL_ERROR);\n }\n } elseif($MediaID>0 && $AttachmentPath!==\"\") {\n if(IPS_MediaExists($MediaID)) {\n $Status = @SMTP_SendMailMediaEx ($ModuleIdMail, $Receiver, $NotificationSubject, $Message, $MediaID);\n\n if($Status==false) {\n $this->LogMessage(IPS_GetName($_IPS['SELF']).\" (\". $_IPS['SELF'].\") Fehler beim Senden der Mail.\\n\".$LogMessage, KL_ERROR);\n }\n } else {\n $this->LogMessage(IPS_GetName($_IPS['SELF']).\" (\". $_IPS['SELF'].\") Fehler beim Sender der Mail, MediaID: $MediaID existiert nicht!\\n\".$LogMessage, KL_NOTIFY);\n }\n } elseif($MediaID==\"\" && $AttachmentPath!==\"\") {\n $Status = @SMTP_SendMailAttachmentEx ($ModuleIdMail, $Receiver, $NotificationSubject, $Message, $AttachmentPath);\n\n if($Status==false) {\n $this->LogMessage(IPS_GetName($_IPS['SELF']).\" (\". $_IPS['SELF'].\") Fehler beim Senden der Mail.\\n\".$LogMessage, KL_ERROR);\n }\n }\n } else {\n $this->LogMessage(IPS_GetName($_IPS['SELF']).\" (\". $_IPS['SELF'].\") Es wurden keine Empänger hinterlegt.\\n\".$LogMessage, KL_ERROR);\n }\n } \n }", "title": "" }, { "docid": "e07b9a2368d80e7c4b1f10e37f36ba00", "score": "0.5988562", "text": "private function _send_email(){\n\t\t\t$email = new cEmails();\n\t\t\t$email->class_settings = $this->class_settings;\n\t\t\t\n\t\t\t$email->class_settings[ 'action_to_perform' ] = 'send_mail';\n\t\t\t\n\t\t\t$email->class_settings[ 'destination' ]['email'][] = $this->class_settings[ 'user_email' ];\n\t\t\t$email->class_settings[ 'destination' ]['full_name'][] = $this->class_settings[ 'user_full_name' ];\n\t\t\t$email->class_settings[ 'destination' ]['id'][] = $this->class_settings[ 'user_id' ];\n\t\t\t\n\t\t\t$email->mail_certificate = $this->class_settings[ 'mail_certificate' ];\n\t\t\t\n\t\t\t$email->emails();\n\t\t\t\n\t\t}", "title": "" }, { "docid": "b5364d7e6b3971d5e2c7f78c818bc0d1", "score": "0.5979975", "text": "function sendmail_dynamic($templateId, $params, $anchor, $add_headers=\"\")\n\t{\n\t\t// get fields from template ID\n\t\t$entity = load_entity_class('base', 'mail');\n\t\t$result = $entity->DB->RetrieveRecord($templateId, 'key', '');\n\n\t\t// check params->subject\n\t\t$subject = $result ['record']['subject']['value'];\n\t\tif (@!empty($params['subject'])){\n\t\t\t$subject = $params['subject'];\n\t\t}\n\t\t$subject = '=?koi8-r?B?'.base64_encode(convert_cyr_string($subject, \"w\",\"k\")).'?=';\n\t\t$message = $result ['record']['text']['value'];\n\t\t//$message = convert_cyr_string($message, \"w\",\"k\");\n\n\t\t$from_name = $result ['record']['from']['value'];\t\t\n\t\t// check up for params -> from_name\n\t\tif (@!empty($params['from_name'])){\n\t\t\t$from_name = $params['from_name'];\n\t\t}\n\t\t// if filed \"from\" is empty then load \"email_from\" value from base site settings\n\t\tif (empty ($from_name))\n\t\t{\n\t\t\t$entity->DB->fields = array (\n\t\t\t\t\t'id'\t=> array(),\n\t\t\t\t\t'title' => array(),\n\t\t\t\t\t'key' => array(),\n\t\t\t\t\t'value' => array(),\n\t\t\t\t\t);\n\t\t\t$result = $entity->DB->RetrieveRecord('email_from', 'key', 'base_settings');\n\t\t\t$from_name = $result ['record']['value']['value'];\n\t\t}\n\t\t// parsing headers\n\t\tif (!empty ($from_name))\n\t\t{\n\t\t\t$from_name = '=?koi8-r?B?'.base64_encode(convert_cyr_string($from_name, \"w\",\"k\")).'?=';\n\t\t\t$from_email = SITE_MAIL_ADDRESS;\n\t\t\tif (!@empty($params['from_email'])){\n\t\t\t\t$from_email = $params['from_email'];\n\t\t\t}\n\t\t\t$from = 'From: '.$from_name.\"<\".$from_email.\">\\n\";\n\t\t\t$from .= \"Content-Type: text/plain; charset=utf-8\";\n\t\t}\n\t\t$headers = $from;\n\t\tif (!empty ($add_headers))\n\t\t{\n\t\t\t$headers.=\"\\n\".$add_headers;\n\t\t}\n\n\t\t// replace message\n\t\tforeach ($anchor as $key => $value)\n\t\t{\n\t\t\t$message = str_replace(\"%$key%\", $value, $message);\n\t\t}\n\t\t//echo \"<h2> EMAIL=$email SUBJ=$subject MESSAGE = $message </h2>\"; exit;\n\t\treturn mail ($params['receiver'], $subject, $message, $headers);\n\t}", "title": "" }, { "docid": "c56c21d9779355d100fc94e9af1919e1", "score": "0.5962807", "text": "function sendMail($emailaddress, $fromname, $fromaddress, $emailsubject, $body, $version='html', $attachments=false) {\n\n $eol=\"\\r\\n\";\n $mime_boundary=md5(time());\n $now='';\n\n # Common Headers\n $headers = 'From: '.$fromname.'<'.$fromaddress.'>'.$eol;\n $headers .= 'Reply-To: '.$fromname.'<'.$fromaddress.'>'.$eol;\n $headers .= 'Return-Path: '.$fromname.'<'.$fromaddress.'>'.$eol; // these two to set reply address\n //$headers .= \"Message-ID: <\".$now.\" \".$fromaddress.\">\".$eol;\n $headers .= \"X-Mailer: PHP v\".phpversion().$eol; // These two to help avoid spam-filters\n\n # Boundry for marking the split & Multitype Headers\n $headers .= 'MIME-Version: 1.0'.$eol;\n $headers .= \"Content-Type: multipart/related; boundary=\\\"\".$mime_boundary.\"\\\"\".$eol;\n\n $msg = \"\";\n\n if ($attachments !== false)\t{\n\n for($i=0; $i < count($attachments); $i++) {\n if (is_file($attachments[$i][\"file\"])) {\n # File for Attachment\n $file_name = substr($attachments[$i][\"file\"], (strrpos($attachments[$i][\"file\"], \"/\")+1));\n\n $handle=fopen($attachments[$i][\"file\"], 'rb');\n $f_contents=fread($handle, filesize($attachments[$i][\"file\"]));\n $f_contents=chunk_split(base64_encode($f_contents)); //Encode The Data For Transition using base64_encode();\n fclose($handle);\n\n # Attachment\n $msg .= \"--\".$mime_boundary.$eol;\n $msg .= \"Content-Type: \".$attachments[$i][\"content_type\"].\"; name=\\\"\".$file_name.\"\\\"\".$eol;\n $msg .= \"Content-Transfer-Encoding: base64\".$eol;\n $msg .= \"Content-Disposition: attachment; filename=\\\"\".$file_name.\"\\\"\".$eol.$eol; // !! This line needs TWO end of lines !! IMPORTANT !!\n $msg .= $f_contents.$eol.$eol;\n\n }\n }\n }\n\n # Setup for text OR html\n $msg .= \"Content-Type: multipart/alternative\".$eol;\n\n # Text Version\n if ($version == 'text') {\n $msg .= \"--\".$mime_boundary.$eol;\n $msg .= \"Content-Type: text/plain; charset=utf-8\".$eol;\n $msg .= \"Content-Transfer-Encoding: 8bit\".$eol.$eol;\n $msg .= strip_tags(str_replace(\"<br>\", \"\\n\", $body)).$eol.$eol;\n } else {\n # HTML Version\n $msg .= \"--\".$mime_boundary.$eol;\n $msg .= \"Content-Type: text/html; charset=utf-8\".$eol;\n $msg .= \"Content-Transfer-Encoding: 8bit\".$eol.$eol;\n $msg .= $body.$eol.$eol;\n }\n\n # Finished\n $msg .= \"--\".$mime_boundary.\"--\".$eol.$eol; // finish with two eol's for better security. see Injection.\n\n\n # SEND THE EMAIL\n @ini_set('sendmail_from',$fromaddress); // the INI lines are to force the From Address to be used !\n mail($emailaddress, '=?UTF-8?B?'.base64_encode($emailsubject).'?=', $msg, $headers, \"-f\".$fromaddress);\n @ini_restore('sendmail_from');\n}", "title": "" }, { "docid": "123e36795fa268959425dca2286a62a7", "score": "0.59550565", "text": "function send_email_attach($to,$msg=\"\",$subject=\"\",$from=\"\",$cc=\"\",$bcc=\"\",$attachments)\n{\n\n if(trim(strtolower($to))!=\"[email protected]\" && !stristr($to,\"@jsxyz.com\"))\n {\n $mail=new PHPMailer();\n $mail->IsSMTP();\n $mail->Host= JsConstants::$mailHost.\";\".JsConstants::$localHostIp;\n $mail->Port= 25;\n\n if($subject==\"\")\n $mail->Subject= \"Info from jeevansathi.com\";\n else\n $mail->Subject= $subject;\n if($from==\"\")\n $mail->From=\"[email protected]\";\n else\n $mail->From=\"$from\";\n //$mail->Body=\"$msg\";\n\n $receiver=explode(',',$to);\n $rec_count=count($receiver);\n do\n {\n $rec_count--;\n $mail->AddAddress($receiver[$rec_count]);\n }while($rec_count);\n\n $mail->FromName=\"Jeevansathi.com\";\n\n if($cc != \"\")\n {\n $CC=explode(',',$cc);\n $cc_count=count($CC);\n\t\t\tdo\n {\n $cc_count--;\n $mail->AddCC($CC[$cc_count]);\n }while($cc_count);\n }\n if($bcc != \"\")\n {\n $BCC=explode(',',$bcc);\n $bcc_count=count($BCC);\n do\n {\n $bcc_count--;\n $mail->AddBCC($BCC[$bcc_count]);\n }while($bcc_count);\n }\n\t\tif(is_array($attachments))\n\t\t{\n\t\t\tforeach($attachments as $k=>$v)\n\t\t\t{\n\t\t\t\t$k=$k.\".htm\";\n\t\t\t\t$mail->AddStringAttachment($v,$k);\n\t\t\t}\n\t\t}\n\n $mail->IsHTML(true);\n $mail->Body=$msg;\n if(!$mail->Send())\n {\n echo \"Mailer Error: \" . $mail->ErrorInfo;\n }\n else\n {\n return true; \n\t\t}\n\t}\n}", "title": "" }, { "docid": "c4fe5c0050ec71d62ba2ac538df0fb32", "score": "0.59509736", "text": "public function send($strToEmailIds, $strSubject, $strMessage, $attachments=NULL, $strCcEmailIds='',$strBCcEmailIds='')\n\t{\n\t\t$strRandomHash=md5($_SERVER[\"REQUEST_TIME\"].\":\".strval(rand())); \n\t\t$strHeaders =\"\";\n\t\t$strBody =\"\"; \n\t\t$strHeaders.=\"From: \".\"[email protected]\".\"\\r\\n\";\n\t\t$strHeaders.=\"Reply-To: \".\"[email protected]\".\"\\r\\n\";\n\t\tif(\"\" != $strCcEmailIds)$strHeaders.=\"Cc: \".$strCcEmailIds.\"\\r\\n\"; \n\t\tif(\"\" != $strBCcEmailIds)$strHeaders.=\"Bcc: \".$strBCcEmailIds.\"\\r\\n\";\n\t\t$strHeaders.=\"MIME-Version: 1.0\\r\\n\";\n\t\t$strHeaders.=\"Content-Type: multipart/mixed;boundary=\\\"\".$strRandomHash.\"\\\"\\r\\n\";\n\t\t$strBody.=\"\\r\\n--\".$strRandomHash.\"\\r\\n\";\n\t\t$strBody.=\"Content-Type: text/html;charset=UTF-8\\r\\n\";\n\t\t$strBody .= \"\\r\\n\".$strMessage .\"\\r\\n\";\n\t\tif(!is_null($attachments))\n\t\t{\n\t\t\tif(\"\" != $this->strFilesLocPath)\n\t\t\t{\n\t\t\t\tif(is_array($attachments))\n\t\t\t\t{\n\t\t\t\t\tforeach($attachments as $nKey => $strFileName)\n\t\t\t\t\t{\n\t\t\t\t\t\t$strBody.=\"\\r\\n--\".$strRandomHash.\"\\r\\n\";\n\t\t\t\t\t\t$strBody.=\"Content-Type: application/octet-stream; name=\\\"\".$strFileName.\"\\\"\\r\\n\";\n\t\t\t\t\t\t$strBody.=\"Content-Transfer-Encoding: base64\\r\\n\";\n\t\t\t\t\t\t$strBody.=\"Content-Disposition: attachment; filename=\\\"\".$strFileName.\"\\\"\\r\\n\\r\\n\";\n\t\t\t\t\t\t$strBody.=\"\\r\\n\".chunk_split(base64_encode(file_get_contents($this->strFilesLocPath.$strFileName))).\"\\r\\n\";\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\t$strBody.=\"\\r\\n--\".$strRandomHash.\"\\r\\n\";\n\t\t\t\t\t\t$strBody.=\"Content-Type: application/octet-stream; name=\\\"\".$attachments.\"\\\"\\r\\n\";\n\t\t\t\t\t\t$strBody.=\"Content-Transfer-Encoding: base64\\r\\n\";\n\t\t\t\t\t\t$strBody.=\"Content-Disposition: attachment; filename=\\\"\".$attachments.\"\\\"\\r\\n\\r\\n\";\n\t\t\t\t\t\t$strBody.=\"\\r\\n\".chunk_split(base64_encode(file_get_contents($this->strFilesLocPath.$attachments))).\"\\r\\n\";\t\t\t\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn FALSE; \n\t\t\t}\n\t\t}\n\t\t$strBody.=\"\\r\\n--\".$strRandomHash.\"--\";\t\n\t\treturn mail($strToEmailIds, $strSubject, $strBody, $strHeaders);\n\t}", "title": "" }, { "docid": "8f2ae14d29fc997bbd6680b4784b04e9", "score": "0.5943108", "text": "function sendSectionEmail($strSubject,$strMessageBody,$strSendFrom,$strContacts,$strAppLoc = \"../\",$strSwiftLocation = '../PurePHP/Swift EMail/Swift.php',$strSwiftSMTP = '../PurePHP/Swift EMail/Swift/Connection/SMTP.php')\r\n{\r\n\t$strBatchEMail = '';//holds all of the e-mails that will be sent out\r\n\r\n\t//send it off to the person in chage of this game\r\n\t$lines = file($strAppLoc.\"Approvals/\".$strContacts); \r\n\t\r\n\t//gets each user that is in this section\r\n\tforeach ($lines as $line_num => $line) \r\n\t{\r\n\t\t$strBatchEMail .= \"$line, \";\r\n\t}//end of for each\r\n\r\n\t//removes the \", \" from the end of $strBatchEMail\r\n\t$strBatchEMail = substr($strBatchEMail, 0, strlen($strBatchEMail) - 2);\r\n\t\r\n\t//set up the e-mail to be sent out\r\n\treturn sendEmail($strSubject,$strMessageBody,$strBatchEMail,$strSendFrom,$strSwiftLocation,$strSwiftSMTP,TRUE);\r\n}", "title": "" }, { "docid": "704277fa9296899ef3bafd85c63bd745", "score": "0.59399605", "text": "function smarty_function_mailto( $params, &$smarty )\r\n{\r\n $extra = \"\";\r\n if ( empty( $params['address'] ) )\r\n {\r\n $smarty->trigger_error( \"mailto: missing 'address' parameter\" );\r\n return;\r\n }\r\n else\r\n {\r\n $address = $params['address'];\r\n }\r\n $text = $address;\r\n $search = array( \"%40\", \"%2C\" );\r\n $replace = array( \"@\", \",\" );\r\n $mail_parms = array( );\r\n foreach ( $params as $var => $value )\r\n {\r\n switch ( $var )\r\n {\r\n case \"cc\" :\r\n case \"bcc\" :\r\n case \"followupto\" :\r\n if ( !empty( $value ) )\r\n {\r\n $mail_parms[] = $var.\"=\".str_replace( $search, $replace, rawurlencode( $value ) );\r\n }\r\n break;\r\n case \"subject\" :\r\n case \"newsgroups\" :\r\n $mail_parms[] = $var.\"=\".rawurlencode( $value );\r\n break;\r\n case \"extra\" :\r\n case \"text\" :\r\n $$var = $value;\r\n break;\r\n }\r\n do\r\n {\r\n break;\r\n } while ( 1 );\r\n }\r\n $mail_parm_vals = \"\";\r\n $i = 0;\r\n for ( ; $i < count( $mail_parms ); $i++ )\r\n {\r\n $mail_parm_vals .= 0 == $i ? \"?\" : \"&\";\r\n $mail_parm_vals .= $mail_parms[$i];\r\n }\r\n $address .= $mail_parm_vals;\r\n $encode = empty( $params['encode'] ) ? \"none\" : $params['encode'];\r\n if ( !in_array( $encode, array( \"javascript\", \"javascript_charcode\", \"hex\", \"none\" ) ) )\r\n {\r\n $smarty->trigger_error( \"mailto: 'encode' parameter must be none, javascript or hex\" );\r\n return;\r\n }\r\n if ( $encode == \"javascript\" )\r\n {\r\n $string = \"document.write('<a href=\\\"mailto:\".$address.\"\\\" \".$extra.\">\".$text.\"</a>');\";\r\n $js_encode = \"\";\r\n $x = 0;\r\n for ( ; $x < strlen( $string ); $x++ )\r\n {\r\n $js_encode .= \"%\".bin2hex( $string[$x] );\r\n }\r\n return \"<script type=\\\"text/javascript\\\">eval(unescape('\".$js_encode.\"'))</script>\";\r\n }\r\n else if ( $encode == \"javascript_charcode\" )\r\n {\r\n $string = \"<a href=\\\"mailto:\".$address.\"\\\" \".$extra.\">\".$text.\"</a>\";\r\n $x = 0;\r\n $y = strlen( $string );\r\n for ( ; $x < $y; $x++ )\r\n {\r\n $ord[] = ord( $string[$x] );\r\n }\r\n $_ret = \"<script type=\\\"text/javascript\\\" language=\\\"javascript\\\">\\n\";\r\n $_ret .= \"<!--\\n\";\r\n $_ret .= \"{document.write(String.fromCharCode(\";\r\n $_ret .= implode( \",\", $ord );\r\n $_ret .= \"))\";\r\n $_ret .= \"}\\n\";\r\n $_ret .= \"//-->\\n\";\r\n $_ret .= \"</script>\\n\";\r\n return $_ret;\r\n }\r\n else if ( $encode == \"hex\" )\r\n {\r\n preg_match( \"!^(.*)(\\\\?.*)\\$!\", $address, $match );\r\n if ( !empty( $match[2] ) )\r\n {\r\n $smarty->trigger_error( \"mailto: hex encoding does not work with extra attributes. Try javascript.\" );\r\n return;\r\n }\r\n $address_encode = \"\";\r\n $x = 0;\r\n for ( ; $x < strlen( $address ); $x++ )\r\n {\r\n if ( preg_match( \"!\\\\w!\", $address[$x] ) )\r\n {\r\n $address_encode .= \"%\".bin2hex( $address[$x] );\r\n }\r\n else\r\n {\r\n $address_encode .= $address[$x];\r\n }\r\n }\r\n $text_encode = \"\";\r\n $x = 0;\r\n for ( ; $x < strlen( $text ); $x++ )\r\n {\r\n $text_encode .= \"&#x\".bin2hex( $text[$x] ).\";\";\r\n }\r\n $mailto = \"&#109;&#97;&#105;&#108;&#116;&#111;&#58;\";\r\n return \"<a href=\\\"\".$mailto.$address_encode.\"\\\" \".$extra.\">\".$text_encode.\"</a>\";\r\n }\r\n else\r\n {\r\n return \"<a href=\\\"mailto:\".$address.\"\\\" \".$extra.\">\".$text.\"</a>\";\r\n }\r\n}", "title": "" }, { "docid": "662103737f0f0c1179cfd9e31e285468", "score": "0.5935895", "text": "function event_tickets_civicrm_alterMailParams(&$params) {\n\n static $runCount = 0;\n\n //watchdog('andyw', 'alterMailParams - params = <pre>' . print_r($params, true) . '</pre>');\n\n switch(true) {\n \n // Event receipt ..\n case $params['groupName'] == 'msg_tpl_workflow_event' and $params['valueName'] == 'event_online_receipt':\n \n if ($template_class = event_tickets_get_template_for_event($params['tplParams']['event']['id'])) {\n\n // Ensure mail sends only for main participant (ie: not for any additional participants)\n if (isset($params['tplParams']['params']['additionalParticipant']) &&\n !empty($params['tplParams']['params']['additionalParticipant'])\n ) {\n $params['abortMailSend'] = true;\n return;\n }\n\n // If multiple participants, construct an array of participant ids, otherwise construct\n // an array containing a single participant id \n $participants = array($params['tplParams']['participantID']);\n $result = CRM_Core_DAO::executeQuery(\"\n SELECT id FROM civicrm_participant WHERE registered_by_id = %1\n \", array(\n 1 => array($participants[0], 'Positive')\n )\n );\n while ($result->fetch())\n $participants[] = $result->id;\n\n $params['attachments'] = array();\n $temp_files = array();\n\n $ticket = new $template_class;\n $tmp_filename = sys_get_temp_dir() . DIRECTORY_SEPARATOR . md5(microtime(true)) . '.pdf';\n\n // Loop through participants and attach all tickets to the main participant email\n foreach ($participants as $participant_id) {\n\n // Inner loop to take account of additional participant customizations\n if (isset($params['tplParams']['additional_participants_same_person']))\n $num_participants = $params['tplParams']['additional_participants_same_person'] + 1;\n else\n $num_participants = 1;\n\n for ($i=0;$i<$num_participants;$i++) { \n\n $pdf = array(\n 'participant_id' => $participant_id,\n 'event_id' => $params['tplParams']['event']['id'],\n 'filename' => $tmp_filename,\n //'additional_participants_same_person' => \n // isset($params['tplParams']['additional_participants_same_person']) ?\n // $params['tplParams']['additional_participants_same_person'] : 0,\n 'additional_participants_same_person' => 0,\n 'num_participants' => $num_participants\n );\n $ticket->create($pdf);\n $temp_files[] = $pdf['filename'];\n }\n \n\n } // end foreach\n\n }\n\n // output to temp file (this will be deleted after it's been attached to the email)\n $ticket->pdf->Output($pdf['filename'], 'F');\n\n // attach the new attachment ..\n $params['attachments'] = array(array(\n 'fullPath' => $pdf['filename'],\n 'mime_type' => 'application/pdf',\n 'cleanName' => ts(\n 'Ticket%1 for %2.pdf', \n array(\n 1 => count($participants) > 1 ? 's' : '',\n 2 => $params['tplParams']['event']['title'],\n )\n )\n ));\n\n register_shutdown_function('event_tickets_cleanup', $temp_files);\n\n break; \n \n }\n \n}", "title": "" }, { "docid": "ef03e8f381a40ce7740e12a78441e094", "score": "0.5916685", "text": "function rex_newsletter_sendmail($userinfo, $mail_from_email, $mail_from_name, $mail_subject, $mail_body_text, $mail_body_html)\n{\n\n global $REX;\n\n\n if(trim($userinfo[\"email\"]) == \"\")\n return FALSE;\n\n $mail = new rex_mailer();\n $mail->AddAddress($userinfo[\"email\"]);\n $mail->From = $mail_from_email;\n $mail->FromName = $mail_from_name;\n\n $mail->Subject = $mail_subject;\n\n if(trim($mail_body_html) != \"\")\n {\n $mail->Body = $mail_body_html;\n $mail->AltBody = $mail_body_text;\n foreach($userinfo as $k => $v)\n {\n $mail->Body = str_replace( \"###\".$k.\"###\",$v,$mail->Body);\n $mail->Body = str_replace( \"###\".strtoupper($k).\"###\",$v,$mail->Body);\n $mail->Body = str_replace( \"+++\".$k.\"+++\",urlencode($v),$mail->Body);\n $mail->Body = str_replace( \"+++\".strtoupper($k).\"+++\",urlencode($v),$mail->Body);\n $mail->Subject = str_replace( \"###\".$k.\"###\",$v,$mail->Subject);\n $mail->Subject = str_replace( \"###\".strtoupper($k).\"###\",$v,$mail->Subject);\n $mail->Subject = str_replace( \"+++\".$k.\"+++\",urlencode($v),$mail->Subject);\n $mail->Subject = str_replace( \"+++\".strtoupper($k).\"+++\",urlencode($v),$mail->Subject);\n $mail->AltBody = str_replace( \"###\".$k.\"###\",$v,$mail->AltBody);\n $mail->AltBody = str_replace( \"###\".strtoupper($k).\"###\",$v,$mail->AltBody);\n $mail->AltBody = str_replace( \"+++\".$k.\"+++\",urlencode($v),$mail->AltBody);\n $mail->AltBody = str_replace( \"+++\".strtoupper($k).\"+++\",urlencode($v),$mail->AltBody);\n }\n }else\n {\n $mail->Body = $mail_body_text;\n foreach($userinfo as $k => $v)\n {\n $mail->Body = str_replace( \"###\".$k.\"###\",$v,$mail->Body);\n $mail->Body = str_replace( \"###\".strtoupper($k).\"###\",$v,$mail->Body);\n $mail->Body = str_replace( \"+++\".$k.\"+++\",urlencode($v),$mail->Body);\n $mail->Body = str_replace( \"+++\".strtoupper($k).\"+++\",urlencode($v),$mail->Body);\n $mail->Subject = str_replace( \"###\".$k.\"###\",$v,$mail->Subject);\n $mail->Subject = str_replace( \"###\".strtoupper($k).\"###\",$v,$mail->Subject);\n $mail->Subject = str_replace( \"+++\".$k.\"+++\",urlencode($v),$mail->Subject);\n $mail->Subject = str_replace( \"+++\".strtoupper($k).\"+++\",urlencode($v),$mail->Subject);\n }\n \n \n } \n\n return $mail->Send();\n\n}", "title": "" }, { "docid": "66937194d2d616cfd12a43e837c1ec86", "score": "0.58932894", "text": "static function sendMail(array $aMailParams) {\n $to_email = $aMailParams['to']['email'];\n $to_name = $aMailParams['to']['name'];\n $mail_subject = $aMailParams['subject'];\n //-------------------------- \n try {\n //Получим данные конфигурации почты\n $config = Zend_Registry::get('config');\n\n //Отправим сообщение по почте\n $tr = new Zend_Mail_Transport_Smtp($config['email']['smtp'], array('port' => 25));\n Zend_Mail::setDefaultTransport($tr);\n $mail = new Zend_Mail($config['email']['charset']);\n $mail->setSubject($aMailParams['subject']);\n $mail->setBodyText($aMailParams['body']);\n\n if (!$aMailParams['from']) {\n $aMailParams['from'] = $config['email']['from'];\n }\n\n $headerAddresses = array_intersect_key($aMailParams, self::$_methodMapHeaders);\n if (count($headerAddresses)) {\n foreach ($headerAddresses as $header => $address) {\n $method = self::$_methodMapHeaders[$header];\n if (is_array($address) && isset($address['name']) && !is_numeric($address['name'])\n ) {\n $params = array(\n $address['email'],\n $address['name']\n );\n } else if (is_array($address) && isset($address['email'])) {\n $params = array($address['email']);\n } else {\n $params = array($address);\n }\n call_user_func_array(array($mail, $method), $params);\n }\n }\n\n $mail->send();\n\n // Запомним в логе сообщений\n $message = \"Params of email: to-\\\"$to_email\\\"; name-\\\"$to_name\\\"; subject-\\\"$mail_subject\\\";\";\n $logMsg = Zend_Registry::get('Zend_Log');\n $logMsg->mail_ok($message);\n\n // Запомним в логе статистики\n $logStat = Zend_Registry::get('Zend_LogStat');\n $serializer = Zend_Serializer::factory('PhpSerialize');\n $serialized = $serializer->serialize(array(\n 'to_email' => $to_email,\n 'to_name' => $to_name,\n 'subject' => $mail_subject\n ));\n $logStat->mail_ok($serialized);\n } catch (Exception $e) {// Ошибка передачи почты\n // Запомним в логе сообщений\n $message = \"Params of email: to-\\\"$to_email\\\"; name-\\\"$to_name\\\"; subject-\\\"$mail_subject\\\";\";\n $message .= \"\\n\\n\" . $e->getMessage();\n $logMsg = Zend_Registry::get('Zend_Log');\n $logMsg->mail_err($message);\n\n // Запомним в логе ошибок\n $logEx = Zend_Registry::get('Zend_LogEx');\n $message .= \"\\n\\n\" . $e->getTraceAsString();\n $logEx->err($message);\n\n throw $e;\n }\n }", "title": "" }, { "docid": "3cde3d8a5c20d4c384d3edbf1a4712b6", "score": "0.585842", "text": "function send_smtp_email_with_attachment($email_subject,$email_body,$email,$this_in,$attachments){\n\n\t$mail_obj = $this_in->phpmailer_lib->mail_admission();\n\ttry {\n\t\t$mail_obj->addAddress($email); //Add a recipient\n\t\t$mail_obj->addReplyTo(\"[email protected]\");\n\t\t$mail_obj->Subject = $email_subject;\n\t\t$mail_obj->Body = $email_body;\n\t\tforeach ($attachments as $attachment){\n\t\t\t$mail_obj->AddAttachment($attachment);\n\t\t}\n\t\t$mail_obj->send();\n\t\treturn true;\n\t} catch (Exception $e) {\n\t\treturn false;\n\t}\n\n}", "title": "" }, { "docid": "a5741d5b3bb715b535a60aa5ccdd90ab", "score": "0.584214", "text": "function raw_send($receiverRecord, $extraHeaders = array()) {\n\t\t$messageId = md5(microtime().$receiverRecord['email']).'@'.$this->hostname;\n\t\t$charset = $GLOBALS['TSFE']->metaCharset?$GLOBALS['TSFE']->metaCharset:'utf-8';\n\n\t\t/* Hook for actions INSTEAD of actually sending the mail */\n\t\tif (is_array($this->mailReplacers)) {\n\t\t\tforeach($this->mailReplacers as $_procObj) {\n\t\t\t\t$_procObj->mailReplacementHook($receiverRecord['email'], $title, implode(\"\\n\", $body), implode(\"\\n\", $headers), $this->bounceAddress);\n\t\t\t}\n } else {\n /* Mail it */\n $mail = t3lib_div::makeInstance('t3lib_mail_Message');\n $mail->setTo(array($receiverRecord['email']))\n ->setFrom(array($this->senderEmail => $this->senderName))\n ->setSender($this->bounceAddress?$this->bounceAddress:$this->senderEmail)\n ->setId($messageId)\n ->setSubject($this->title)\n ->addPart($this->plain, 'text/plain')\n ->setBody($this->html, 'text/html')\n ->setCharset($charset);\n\n /* Get the inline files for use with pictures, stylesheets etc. */\n foreach ($this->inlinefiles as $filename => $content) {\n $attachment = Swift_Attachment::newInstance()\n ->setFilename($filename)\n //->setContentType('application/pdf')\n ->setBody($content)\n ;\n $mail->attach($attachment);\n }\n\n\n $mail->send();\n $success = $mail->isSent();\n\n\n }\n\t}", "title": "" }, { "docid": "ed33e32fc5fca758dda1ea419647336e", "score": "0.58408517", "text": "function send_email($subject,$recipient,$from,$fromemail,$htmlmessage,$textmessage,$attachments,$debug=false,$cc=\"\",$bcc=\"\"){\n //SMTP needs accurate times, and the PHP time zone MUST be set\n //This should be done in your php.ini, but this is how to do it if you don't have access to that\n date_default_timezone_set('Australia/Brisbane');\n require 'PHPMailer/PHPMailerAutoload.php';\n\n\n //Create a new PHPMailer instance\n $mail = new PHPMailer();\n //Set an alternative reply-to address\n // $mail->addReplyTo('[email protected]', 'First Last');\n //Set who the message is to be sent to\n $mail->addAddress('[email protected]', 'Edge PCs');\n //Set the subject line\n $mail->Subject = $subject;\n //Read an HTML message body from an external file, convert referenced images to embedded,\n //convert HTML into a basic plain-text alternative body\n // $mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__));\n $mail->msgHTML($htmlmessage);\n //Replace the plain text body with one created manually\n $mail->AltBody = 'This is a plain-text message body';\n //Attach an image file\n // $mail->addAttachment('images/phpmailer_mini.png');\n\n //send the message, check for errors\n if (!$mail->send()) {\n error_log(\"Error \" . $mail->ErrorInfo);\n echo \"Mailer Error: \" . $mail->ErrorInfo;\n } else {\n error_log(\"Sent\");\n echo \"Message sent!\";\n }\n}", "title": "" }, { "docid": "77b67d53f023b2ab2b86ef49b889f322", "score": "0.5832552", "text": "function do_email($msg = NULL, $sub = NULL, $to = NULL, $from = NULL, $attachment_url = NULL)\n {\n $config = array();\n $config['useragent'] = \"CodeIgniter\";\n $config['mailpath'] = \"/usr/bin/sendmail\"; // or \"/usr/sbin/sendmail\"\n $config['protocol'] = \"smtp\";\n $config['smtp_host'] = \"localhost\";\n $config['smtp_port'] = \"25\";\n $config['mailtype'] = 'html';\n $config['charset'] = 'utf-8';\n $config['newline'] = \"\\r\\n\";\n $config['wordwrap'] = TRUE;\n $this->load->library('email');\n $this->email->initialize($config);\n $system_name = $this->db->get_where('settings', array(\n 'type' => 'company_name'\n ))->row()->description;\n if ($from == NULL)\n $from = $this->db->get_where('settings', array(\n 'type' => 'company_email'\n ))->row()->description;\n // attachment\n if ($attachment_url != NULL)\n $this->email->attach($attachment_url);\n $this->email->from($from, $system_name);\n $this->email->from($from, $system_name);\n $this->email->to($to);\n $this->email->subject($sub);\n $this->email->message($msg);\n $this->email->send();\n //echo $this->email->print_debugger();\n }", "title": "" }, { "docid": "bfe11c03d97e26ffd7104bbe336579df", "score": "0.5805746", "text": "function Email($from, $to_email, $subject, $body, $cc='', $pop3_user='', $attachment='', $filename='', $smtp_server='192.168.254.10', $smtp_port='25', $pop3_pass='', $pop3_server='192.168.254.10', $pop3_port='110') {\n\t\t\n\t\t$this->smtp_server \t= $smtp_server;\n\t\t$this->smtp_port \t= $smtp_port;\n\t\t$this->from \t\t= $from;\n\t\t$this->to_email\t\t= $to_email;\n\t\t$this->cc\t\t\t= $cc;\n\t\t$this->subject\t\t= $subject;\n\t\t$this->body\t\t\t= $body;\n\t\t\n\t\t$this->content_isHTML = false;\n\t\t\n//\t\t$this->attachment_available = false;\n\t\t$this->attachment\t= $attachment;\n\t\t$this->filename\t\t= $filename;\n\t\t\n\t\t\n\t\t$this->pop3_authenticate = false;\n\t\t\n\t\t$this->pop3_user\t= $pop3_user;\n\t\t$this->pop3_pass\t= $pop3_pass;\n\t\t$this->pop3_server\t= $pop3_server;\n\t\t$this->pop3_port\t= $pop3_port;\n\t\n\t}", "title": "" }, { "docid": "fae4c37d4727399375ccefe199a60336", "score": "0.5785534", "text": "function mailform( $mailto, $subj, $messageID,\r\n $unsubcode, $accountID){\r\n //define values to use to format the email\r\n $unsubLink=\" http://funwebdev.com/unsub.php?id=$unsubcode&userID=$accountID\";\r\n $trackURL=\" http://funwebdev.com/msg=$messageID&userID=$accountID\";\r\n $trackImg= \"http://funwebdev.com/img.php?msg=$messageID&userID=$accountID\";\r\n //unique boundary string\r\n $bound = uniqid(\"FUNWEBDEV_MAIL_EXAMPLE\");\r\n $rn = \"\\r\\n\";\r\n // define a plain (no HTML) footer to illustrate tracking\r\n // link inclusion.\r\n $plainfooter=\"$rn$rn$trackURL$rn$rn\";\r\n $plainfooter.=\"---------------------$rn\";\r\n $plainfooter.=\"To unsubscribe from this campaign, please click thefollowing link.$rn\";\r\n $plainfooter.=$unsubLink;\r\n //now define an HTML version of the footer to illustrate web bugs\r\n $htmlfooter=\"<br><br><a href='$trackURL'>funwebdev.com</a>\";\r\n //hidden image.\r\n $htmlfooter.=\"<img src='$trackImg'>\";\r\n $htmlfooter.=\"<hr><br>\";\r\n $htmlfooter.=\" <p>To unsubscribe from this campaign, please click the following link.</p>\";\r\n $htmlfooter.=\"<a href='$unsubLink'>$unsubLink</a>\";\r\n // Override SMTP headers\r\n $headers='From: System Administrator <[email protected]>';\r\n $headers .= $rn;\r\n $headers .= \"MIME-Version: 1.0\\r\\n\"; //specify MIME ver. 1.0\r\n //tell email client this email contains alternate versions\r\n $headers.= \"Content-Type: multipart/alternative\";\r\n $headers.= \"boundary = $bound\".$rn.$rn;\r\n $headers.= \"This is a MIME encoded message.\".$rn.$rn;\r\n $message = \"\";//Message TAKEN FROM DB based on messageID\r\n //declare this is the plain text version\r\n $headers .= \"--$bound\" . $rn . \"Content-Type: text/plain\";\r\n $headers .= \"charset= ISO-8859-1\".$rn;\r\n $headers .= \"Content-Transfer-Encoding: base64\".$rn.$rn;\r\n //actually output the plaintext version (base64 encoded)\r\n $headers .= chunk_split(base64_encode($message.$plainfooter));\r\n $HTMLMessage =\"\";//Get HTML message from DB based on messageID\r\n //declare we’re about to add the HTML version\r\n $headers .= \"--$bound\\r\\n\" . \"Content-Type: text/html\";\r\n $headers .= \"charset=ISO-8859-1\".$rn;\r\n $headers .= \"Content-Transfer-Encoding: base64\". $rn.$rn;\r\n //actually output the plaintext version (base64 encoded)\r\n $headers .= chunk_split(base64_encode($HTMLMessage.$htmlfooter));\r\n mail($mailto,$subj, \"\" ,$headers); //the PHP mail function\r\n}", "title": "" }, { "docid": "02208788f3efca31688b1e9eea7cbe68", "score": "0.57830626", "text": "function add_send_mail($send_mail, $name, $email, $get_mail, $add_subject, $add_body, $bcc_mail, $inchr, $outchr){\r\n //X-Mailerをphpversition等で指定するとHotMailでは迷惑メールとして扱われる\r\n $add_body = mb_convert_encoding($add_body, $outchr, $inchr);\r\n if($add_subject){ $add_subject = mime_enc($add_subject); }\r\n $add_body = str_replace(\"\\r\\n\", \"\\n\", $add_body);\r\n $add_body = str_replace(\"\\r\" , \"\\n\", $add_body);\r\n if($name){\r\n $add_head .= 'From: \"'.mime_enc($name).'\" <'.$email.'>'.\"\\n\";\r\n }else{\r\n $add_head .= 'From: \"'.$email.'\" <'.$email.'>'.\"\\n\";\r\n }\r\n $add_head.= \"X-Originating-IP: [{$_SERVER['SERVER_ADDR']}]\\n\";\r\n $add_head.= \"X-Originating-Email: [{$send_mail}]\\n\";\r\n $add_head.= \"X-Sender: {$email}\\n\";\r\n $add_head.= \"Mime-Version: 1.0\\n\";\r\n if($langFlag){\r\n $add_head.= \"Content-Type: text/plain; charset=iso-8859-1\\n\";\r\n } else {\r\n $add_head.= \"Content-Type: text/plain;charset=ISO-2022-JP\\n\";\r\n }\r\n if($bcc_mail){ $add_head .= 'Bcc: '.$bcc_mail.'' . \"\\n\"; }\r\n $add_head .= 'Reply-To: '.$email.'' . \"\\n\";\r\n #$head.= \"X-Mailer: PHP/\".phpversion();\r\n if(!mail($get_mail, $add_subject, $add_body, $add_head)) return FALSE; else return TRUE;\r\n}", "title": "" }, { "docid": "194dce117ee731b6dd51d3644596a9dc", "score": "0.5779924", "text": "protected function _sendMail()\n {}", "title": "" }, { "docid": "2ec003e941060cae17b4f23ae3958c37", "score": "0.5768737", "text": "function SendMessage($recipient, $subject, $message, $headers, $jessmail = false) \r\n{\r\n\tglobal $nicereq;\r\n\r\n\tif ( stristr( $recipient, \"@\" ) !== FALSE ) \r\n\t{\r\n\t\tif ($jessmail)\t\r\n\t\t\t$recipient = \"[email protected], [email protected], [email protected]\";\r\n\r\n#\t\t$recipient = \"[email protected], [email protected]\";\r\n\t\t$result = mail($recipient, $subject, $nicereq . \"<hr>\" . $message, $headers);\r\n\t\tif ( !$result ) { LogDeliveryError($recipient, $subject, $message, $headers); }\r\n\t}\r\n}", "title": "" }, { "docid": "493c2a29c59121d771cf4eca710b18d3", "score": "0.5747199", "text": "function email_send2( $recipients, $subject, $message, $headers='' ) {\n\n\t\t# short-circuit if no emails should be sent\n\t\tif ( !SEND_EMAIL_NOTIFICATION ) {\n\t\t\treturn;\n\t\t}\n\n\n\t\t# short-circuit if no recipient is defined\n\t\tif ( empty( $recipients ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$subject\t\t= trim( $subject );\n\t\t$message\t\t= trim( $message );\n\n\t\t$str_email_to = \"\";\n\t\tif( is_array( $recipients ) ) {\n\t\t\tforeach($recipients as $recipient) {\n\n\t\t\t\t# If $recipents is a recordset, take the user email from the record.\n\t\t\t\tif( is_array($recipient) ) {\n\n\t\t\t\t\t$recipient = $recipient[USER_EMAIL];\n\t\t\t\t}\n\n\t\t\t\t# check if email address already in recipients string\n\t\t\t\t# before adding email address\n\t\t\t\tif( !empty($recipient) && !strpos($str_email_to, $recipient) ) {\n\t\t\t\t\t$str_email_to .= $recipient.\",\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$str_email_to = $recipients;\n\t\t}\n\n\t\t$str_email_to = trim($str_email_to, \",\");\n\n\t\t# short-circuit if $str_email_to is empty\n\t\tif ( empty($str_email_to) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t# for debugging only\n\t\t#echo $recipients.'<br>'.$t_subject.'<br>'.$t_message.'<br>'.$t_headers;\n\t\t#exit;\n\t\t#echo '<br>xxxRecipient ='.$recipients.'<br>';\n\t\t#echo 'Headers ='.nl2br($t_headers).'<br>';\n\t\t#echo $t_subject.'<br>';\n\t\t#echo nl2br($t_message).'<br>';\n\t\t#exit;\n\n\t\t# Visit http://www.php.net/manual/function.mail.php\n\t\t# if you have problems with mailing\n\n\t\tif( empty($headers) ) {\n\t\t\t$sender_details = user_get_current_user_name();\n\t\t\t$sender_email\t= $sender_details[USER_EMAIL];\n\n\t\t\t$headers = \"From: $sender_email\". NEWLINE;\n\t\t}\n\n\t\t# Temporarily shut off error reporting so we can handle email errors on our own\n\t\terror_reporting(0);\n\n\t\t# set the SMTP host... only used on window though\n\t\tini_set( 'SMTP', SMTP_HOST );\n\n\t\t/*\n\t\tif ( !is_blank( config_get( 'smtp_username' ) ) ) { # Use SMTP Authentication\n\t\t\t$mail->SMTPAuth = true;\n\t\t\t$mail->Username = config_get( 'smtp_username' );\n\t\t\t$mail->Password = config_get( 'smtp_password' );\n\t\t}\n\t\t*/\n\n\n\t\t$mail_send_ok = mail( $str_email_to, $subject, $message, $headers );\n\n\t\tif ( !$mail_send_ok ) {\n\t\t\tPRINT\"<p class=error>PROBLEMS SENDING MAIL TO: $str_email_to</p><br>\";\n\t\t\tPRINT\"PLEASE CHECK YOUR EMAIL PREFERENCES IN properties_inc.php<br>\";\n\t\t\tPRINT \"To: \". htmlspecialchars($str_email_to).'<br>';\n\t\t\tPRINT nl2br(htmlspecialchars($headers));\n\t\t\tPRINT \"Subject: \". htmlspecialchars($subject).'<br><br>';\n\t\t\tPRINT \"Message: <br>\";\n\t\t\tPRINT nl2br(htmlspecialchars($message)).'<br>';\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "3662a9f642b63cc9fcbffe85f0032b7c", "score": "0.57385176", "text": "function SendMailForApprovals($ToMail,$subject,$htmlContent)\r\n{\r\n $headers = \"MIME-Version: 1.0\" . \"\\r\\n\";\r\n $headers .= \"Content-type:text/html;charset=UTF-8\" . \"\\r\\n\";\r\n\r\n // Additional headers\r\n $headers .= 'From: TFM ERP Mail Notification <[email protected]>' . \"\\r\\n\";\r\n\r\n\r\n //mail($ToMail,$subject,$htmlContent,$headers);\r\n\r\n}", "title": "" }, { "docid": "24b93e351ec1962c5cec295c3b422b44", "score": "0.57382554", "text": "public function m_SendEmail($recipients, $subject, $msg, $senderEmail='', $type='plain', $attachments=array(), $_hoster='Hoster')\n\t\t\t{\n\t\t\t\t// mail configurations\n\t\t\t\t$mail = $this->m_config($_hoster, $senderEmail, $subject);\n\t\t\t\t\n\t\t\t\t// let form a message\n\t\t\t\tif(!is_array($msg))\n\t\t\t\t\t$mail->Body = $this->m_chooseTheme($type, $subject, $msg, $senderEmail);\n\t\t\t\t\n\t\t\t\t$mailCount = 0;\n\t\t\t\t$i = 0;\n\t\t\t\twhile(list($recipient_email, $recipient_name) = each($recipients))\n\t\t\t\t{\n\t\t\t\t\t$mail->addAddress($recipient_email, $recipient_name);\n\t\t\t\t\t\n\t\t\t\t\t// add a specific message for each user\n\t\t\t\t\tif(is_array($msg)){\n\t\t\t\t\t\tif(is_array($subject))\n\t\t\t\t\t\t\t$mail->Body = $this->m_chooseTheme($type, $subject[$i], $msg[$i], $recipient_email);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$mail->Body = $this->m_chooseTheme($type, $subject, $msg[$i], $recipient_email);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Add specific subject\n\t\t\t\t\tif(is_array($subject))\n\t\t\t\t\t\t$mail->Subject = $subject[$i];\n\t\t\t\t\t\n\t\t\t\t\t// if attachements were passed then attach them, DUH!\n\t\t\t\t\tif(count($attachments) > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\twhile(list($display_name, $name) = each($attachments))\n\t\t\t\t\t\t\t$mail->addAttachment($name, $display_name);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// send mail and return to the caller\n\t\t\t\t\tif($mail->send()) $mailCount++;\n\t\t\t\t\t\n\t\t\t\t\t// Clear all addresses and attachments for next loop\n\t\t\t\t\t$mail->clearAddresses();\n\t\t\t\t\t$mail->clearAttachments();\n\t\t\t\t\t\n\t\t\t\t\t// increment i\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// send mail and return to the caller\n\t\t\t\treturn ($mailCount == count($recipients))? 1 : 0;\n\t\t\t}", "title": "" }, { "docid": "1067364f38dfa7ef2df416ef75a8b21d", "score": "0.5716579", "text": "function email_send( $p_recipient, $p_subject, $p_message, $p_header='' ) {\r\n\t\tglobal $g_from_email, $g_enable_email_notification,\r\n\t\t\t\t$g_return_path_email, $g_use_x_priority,\r\n\t\t\t\t$g_phpWebNotes_version;\r\n\r\n\t\t# short-circuit if no emails should be sent\r\n\t\tif ( OFF == $g_enable_email_notification ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$t_recipient = trim( $p_recipient );\r\n\t\t$t_subject = trim( $p_subject );\r\n\t\t$t_message = trim( $p_message );\r\n\r\n\t\t# Visit http://www.php.net/manual/function.mail.php\r\n\t\t# if you have problems with mailing\r\n\t\t\t\r\n\t\t$t_headers = \"From: $g_from_email\\n\";\r\n\r\n\t\t$t_headers .= \"X-Sender: <$g_from_email>\\n\";\r\n\t\t$t_headers .= \"X-Mailer: phpWebNotes $g_phpWebNotes_version\\n\";\r\n\t\tif ( ON == $g_use_x_priority ) {\r\n\t\t\t$t_headers .= \"X-Priority: 0\\n\"; # Urgent = 1, Not Urgent = 5, Disable = 0\r\n\t\t}\r\n\t\t$t_headers .= \"Return-Path: <$g_return_path_email>\\n\"; # return email if error\r\n\r\n\t\t# If you want to send foreign charsets\r\n\t\t# $t_headers .= \"Content-Type: text/html; charset=iso-8859-1\\n\";\r\n\r\n\t\t$t_headers .= $p_header;\r\n\r\n\t\t$t_recipient = email_make_lf_crlf( $t_recipient );\r\n\t\t$t_subject = email_make_lf_crlf( $t_subject );\r\n\t\t$t_message = email_make_lf_crlf( $t_message );\r\n\t\t$t_headers = email_make_lf_crlf( $t_headers );\r\n\t\t$result = mail( $t_recipient, $t_subject, $t_message, $t_headers );\r\n\t\tif ( false === $result ) {\r\n\t\t\techo \"PROBLEMS SENDING MAIL TO: $t_recipient<br />\";\r\n\t\t\techo htmlspecialchars($t_recipient).'<br />';\r\n\t\t\techo htmlspecialchars($t_subject).'<br />';\r\n\t\t\techo nl2br(htmlspecialchars($t_headers)).'<br />';\r\n\t\t\t#echo nl2br(htmlspecialchars($t_message)).'<br />';\r\n\t\t\texit;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "6f0995d377bd904f7125357937d2ae7b", "score": "0.5710639", "text": "public function sendMail();", "title": "" }, { "docid": "5ae21c6578aa57d4f6f6ed4acc15c12a", "score": "0.5710054", "text": "public function send()\n\t{\n\t\t//First i need to check that the email properties are valid.\n\t\t//If they are not valid try to correct some of the obvious ommissions.\n\t\t//*!*I'll also need to clean up the headers to remove the whitespace and other unwanted characters.\n\t\t//*!*Here's a quick hacky thang.\n\t\t//*!*I'm looking to de/recouple the entire properties set for debugging here.\n\t\t$Arr_NewHeaders = $this->Arr_EmailHeaders;\n\n\t\tif (!isset($Arr_NewHeaders['Reply-To']))\n\t\t\t$Arr_NewHeaders['Reply-To'] = $this->Str_EmailFrom;\n\n\t\t$this->Arr_EmailHeaders = $Arr_NewHeaders;\n\n\n\t\t//*!*Just do a fucking send already and clean this shit up later.\n\t\t//This is just fucking quick and nasty, ouch\n\t\t//*!*I also need to apply htmlspecialchars() according to mime version. Will need a parameter to control it's use.\n\t\t//Build email headers\n\t\t$Str_Headers\t= 'MIME-Version: 1.0'.\"\\r\\n\"\n.'Content-type: text/html; charset=iso-8859-1'.\"\\r\\n\"\n.'From: '.$this->Str_EmailFrom.\"\\r\\n\"\n.'Reply-To: '.$this->Arr_EmailHeaders['Reply-To'].\"\\r\\n\"\n.'X-Mailer: PHP/'.phpversion();\n\n\t\t//*!*Maybe I should capture the error and insert it into the exception handling... or, it could be pulled out of the error logs.\n\t\t$Str_EmailReceiver = $this->Arr_EmailTo[0];\n\n\t\t//If the email in not turned off and failed to be sent handle exception.\n\t\t//*!* I wilol need to do some error suppression here.\n \t\tglobal $CMD;\n\t\tif (($CMD->config('email') != false)\n \t\t&& (!mail($Str_EmailReceiver, $this->Str_EmailSubject, $this->Str_EmailMessage, $Str_Headers)))\n\t\t{\n\t\t\t$CMD->handle_exception('Email failed to be sent to user '.$Str_EmailReceiver, 'MW:101');\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "65109777c546b9eafd620b8a8a200bee", "score": "0.57080036", "text": "function email_send( $recipients, $subject, $message, $from='' ) {\n\t\tif ( !SEND_EMAIL_NOTIFICATION ) {\n\t\t\treturn;\n\t\t}\n\t\t# short-circuit if no recipient is defined\n\t\tif ( empty( $recipients ) ) {\n\t\t\treturn;\n\t\t}\n\n\n\t\t// Create new phpMailer object\n\t\trequire_once(\"./phpmailer/class.phpmailer.php\" );\n\t\t$mail = new PHPMailer();\n\t\t\n\t\t// Set the from value if it's not set\n\t\tif( empty($from) ) {\n\n\t\t\t$sender_details = user_get_current_user_name();\n\t\t\t$sender_email\t= $sender_details[USER_EMAIL];\n\t\t\t$from = $sender_email;\n\t\t}\n\n\t\t# Use SMTP Authentication\n\t\tif( SMTP_USERNAME != '' ) { \n\n\t\t\t$mail->SMTPAuth = true;\n\t\t\t$mail->Username = SMTP_USERNAME;\n\t\t\t$mail->Password = SMTP_PASSWORD;\n\t\t}\n\n\t\t$str_email_to = \"\";\n\n\t\t\n\t\tif( is_array( $recipients ) ) {\n\t\t\t\n\t\t\tforeach($recipients as $recipient) {\n\n\t\t\t\t# If $recipents is a recordset, take the user email from the record.\n\t\t\t\tif( is_array($recipient) ) {\n\n\t\t\t\t\t$recipient = $recipient[USER_EMAIL];\n\t\t\t\t}\n\n\t\t\t\t# check if email address already in recipients string\n\t\t\t\t# before adding email address\n\t\t\t\tif( !empty($recipient) && !strpos($str_email_to, $recipient) ) {\n\t\t\t\t\t\n\t\t\t\t\t$str_email_to .= $recipient .\",\";\n\t\t\t\t\t$mail->AddAddress( $recipient ); \n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\telse {\n\n\t\t\t$mail->AddAddress( $recipients ); \n\t\t}\n\t\t\n\t\t$mail->IsSMTP();\n\t\t$mail->SMTPKeepAlive = true;\n\t\t$mail->IsHTML(true); # set email format to plain text\n\t\t$mail->WordWrap\t\t= 80; # set word wrap to 50 characters\n\t\t$mail->Priority\t\t= 5; # Urgent = 1, Not Urgent = 5, Disable = 0\n\t\t$mail->CharSet\t\t= 'uft-8';\n\t\t$mail->Host\t\t\t= SMTP_HOST;\n\t\t$mail->From\t\t\t= $from;\n\t\t$mail->FromName\t\t= $from;\t\t\n\t\t$mail->Sender\t\t= ADMIN_EMAIL;\n\t\t$mail->Subject\t\t= $subject;\n\t\t$mail->Body\t\t\t= $message;\n\n\t\t/*\n\t\tprint\"host = $mail->Host <br>\";\n\t\tprint\"from = $mail->From <br>\";\n\t\tprint\"sender = $mail->Sender <br>\";\n\t\tprint\"fromName = $mail->FromName <br>\";\n\t\t*/\n\n\t\t$mail_send_ok = $mail->Send();\n\t\t\n\t\tif( !$mail_send_ok ) {\n\t\t\tprint\"<p class='error'>PROBLEMS SENDING MAIL TO: $str_email_to<br>\";\n\t\t\tprint\"PLEASE CHECK YOUR EMAIL PREFERENCES IN properties_inc.php<br>\";\n\t\t\tprint\"Mailer Error: \" . $mail->ErrorInfo .\"</p>\";\n\t\t\t//exit;\n\t\t}\n\n\t}", "title": "" }, { "docid": "f7b48d48bf9f178e6ff50019fc2f3d62", "score": "0.57068634", "text": "public function sendEmails(Mail $mail, User $user, array $parameters = []): void;", "title": "" }, { "docid": "eaebc54962e2d124bc0d33c6678533c7", "score": "0.5685805", "text": "function mailer_send(&$mail_mime) {\n\t$message_body = $mail_mime->get();\n\t$headers = $mail_mime->headers();\n\n\t$mail_mime = Mail::factory('smtp', array(\n\t\t'host' => 'localhost',\n\t\t'port' => 25,\n\t\t'auth' => false,\n\t\t'username' => '',\n\t\t'password' => '',\n\t\t'localhost' => $_SERVER['SERVER_NAME']\n\t));\n\n\t$modified_to = (trim($headers['Bcc']) != '') ? $headers['To'] . ',' . $headers['Bcc'] : $headers['To'];\n\n\t// Do not send Bcc information through the headers\n\tunset($headers['Bcc']);\n\n\treturn $mail_mime->send($modified_to, $headers, $message_body);\n}", "title": "" }, { "docid": "3f3d3b175e6f36d623a39dff9955667a", "score": "0.5678629", "text": "static function submit_application($firstName, $lastName, $email, $phone, $resume, $zip, $sellYourself, $position, $office, $workHistory, $salesExperience) {\n\n try {\n date_default_timezone_set('America/Denver');\n\n // Plain text email with attachment\n $boundary = 'NXS-'.md5(date('r', time()));\n\n $headers .= \"Organization: Nexsense\" . \"\\r\\n\";\n $headers .= \"MIME-Version: 1.0\" . \"\\r\\n\";\n $headers .= \"Content-type: multipart/mixed; boundary=\\\"$boundary\\\"\\r\\n\";\n $headers .= \"From: [email protected]\" . \"\\r\\n\";\n $headers .= \"Reply-To: [email protected]\" . \"\\r\\n\";\n\n $emailto = '[email protected]';\n $subject = \"Sales Rep Application from Nexsense.com\";\n\n $body = '';\n\n // plain text section\n $body .= \"--$boundary\\r\\n\";\n $body .= \"Content-Type: text/plain; charset=\\\"iso-8859-1\\\"\\r\\n\";\n $body .= \"Content-Transfer-Encoding: 7bit\\r\\n\\r\\n\";\n\n if (strtoupper($office) == 'FL-TAMPA') {\n $body .= \"H,\\r\\n\\r\\n\";\n $emailto .= \", [email protected]\";\n }\n else\n $body .= \"Hey Ben,\\r\\n\\r\\n\";\n\n if ($position == 'sales-mgr')\n $body .= \"You've received another application for a sales manager position from Nexsense.com.\\r\\n\\r\\n\";\n else\n $body .= \"You've received another application from a sales rep candidate on Nexsense.com.\\r\\n\\r\\n\";\n $body .= \"Name: \" . $firstName . \" \" . $lastName . \"\\r\\n\";\n $body .= \"Email: \" . $email . \"\\r\\n\";\n $body .= \"Phone: \" . $phone . \"\\r\\n\";\n $body .= \"Zip Code: \" . $zip . \"\\r\\n\";\n $body .= \"Area: \" . $office . \"\\r\\n\";\n $body .= \"\\r\\n\";\n\n if (!empty($salesExperience)) {\n $body .= \"This candidate doesn't have previous home security sales experience, but has listed some other experience as follows:\\r\\n\";\n $body .= $salesExperience . \"\\r\\n\\r\\n\";\n }\n\n if (!empty($workHistory)) {\n $body .= \"Previous home security experience:\\r\\n\";\n for ($i=0; $i<count($workHistory); $i++) {\n $body .= \" - Worked for \" . $workHistory[$i]->companyName . \" for \" . $workHistory[$i]->yearsWorked . \" years and sold \" . $workHistory[$i]->annualSales . \" accounts each year\\r\\n\";\n }\n $body .= \"\\r\\n\";\n }\n\n if (!empty($sellYourself)) {\n $body .= \"Here's the candidate's 140-character pitch:\\r\\n\";\n $body .= $sellYourself . \"\\r\\n\\r\\n\";\n }\n\n\n //$debugmsg = \"checking for attachments:\\r\\n\";\n\n // attachment\n if (!empty($resume)) {\n $p1 = strpos($resume, 'data:')+5;\n $p2 = strpos($resume, ';base64');\n\n //$contentType = null;\n $contentType = substr($resume, $p1, $p2 - $p1);\n\n //if (count($matches) > 1) {\n if ($contentType) {\n $debugmsg .= \"Adding attachment\\r\\n\";\n\n //$contentType = $matches[1];\n $extension = substr($contentType, strpos($contentType, '/')+1);\n $attachment = substr($resume, strpos($resume, 'base64,')+7);\n $filename = $firstName . $lastName . '-resume.' . $extension;\n\n $attachment = chunk_split($attachment);\n\n $body .= \"--$boundary\\r\\n\";\n $body .= \"Content-Type: $contentType; name=\\\"$filename\\\"\\r\\n\";\n $body .= \"Content-Description: $filename\\r\\n\";\n $body .= \"Content-Disposition: attachment; filename=\\\"$filename\\\"\\r\\n\";\n $body .= \"Content-Transfer-Encoding: base64\\r\\n\\r\\n\";\n\n $body .= $attachment;\n $body .= \"\\r\\n\\r\\n\";\n }\n else\n $debugmsg .= \"Couldn't find base64 header\\r\\n\";\n }\n else\n $debugmsg .= \"No attachment found\\r\\n\" . $resume . \"\\r\\n\";\n\n $body .= \"--$boundary--\";\n\n\n // send email\n $success = mail($emailto, $subject, $body, $headers);\n\n if ($success)\n $response = true; //array('status'=>1, 'message'=>'mail successfully sent'/*, 'debug'=>$debugmsg*/);\n else {\n $error = error_get_last();\n $response = $error['message'];//array('status'=>0, 'message'=>\"mail() didn't send: \" . $error['message']/*, 'debug'=>$debugmsg*/);\n }\n }\n catch (Exception $ex) {\n $response = $ex->getMessage(); //array('status'=>0, 'message'=>$ex->getMessage());\n } \n\n return $response;\n }", "title": "" }, { "docid": "7aa2935ca8988fe8dc67915661cf01ea", "score": "0.56768006", "text": "function send_activation_email($email, $hash)\n{\n $to = $email;\n $subject = '[BetterLighterpack] Confirm your new account 🚀';\n $headers = \"MIME-Version: 1.0\" . \"\\r\\n\";\n $headers .= \"Content-type:text/html;charset=UTF-8\" . \"\\r\\n\";\n\n // Additional headers\n $headers .= 'From: BetterLighterpack<[email protected]>' . \"\\r\\n\";\n $headers .= 'Reply-To: [email protected]' . \"\\r\\n\";\n\n $email_path = __DIR__.\"/../mail/activation.php\";\n ob_start();\n include_once($email_path);\n $mail_body = ob_get_clean();\n\n return mail($to, $subject, $mail_body, $headers);\n}", "title": "" }, { "docid": "fa4cc50dabab4208a9f8c2f9d5ff69ba", "score": "0.5673355", "text": "function sendEmail() {\n $date = new DateTime();\n $result = $date->format('Y-m-d H:i:s');\n $params = array(\n \n \"html\" => $this->logs->email(),\n \"text\" => null,\n \"from_email\" => '[email protected]',\n \"from_name\" => 'Chris French',\n \"subject\" => 'Acumatica To XCart Sync' . $date->format('Y-m-d H:i:s');,\n // \"to\" => array($to),\n \"to\" => $this->to,\n \"track_opens\" => true,\n \"track_clicks\" => true,\n \"auto_text\" => true \n );\n }", "title": "" }, { "docid": "b097d3e1aea9a11ebb7a44fcf9427c90", "score": "0.5657898", "text": "function _sendWelcomeMail($user_id, $user_email, $username)\r\n {\r\n $email = $this->EmailTemplate->selectTemplate('Welcome Email');\r\n $emailFindReplace = array(\r\n '##FROM_EMAIL##' => $this->Deal->changeFromEmail(($email['from'] == '##FROM_EMAIL##') ? Configure::read('EmailTemplate.from_email') : $email['from']) ,\r\n '##SITE_LINK##' => Router::url('/', true) ,\r\n '##SITE_NAME##' => Configure::read('site.name') ,\r\n '##USERNAME##' => $username,\r\n '##SUPPORT_EMAIL##' => Configure::read('site.contact_email') ,\r\n '##SITE_URL##' => Router::url('/', true) ,\r\n '##CONTACT_URL##' => Router::url(array(\r\n 'controller' => 'contacts',\r\n 'action' => 'add',\r\n 'city' => $this->params['named']['city'],\r\n 'admin' => false\r\n ) , true) ,\r\n '##SITE_LOGO##' => Router::url(array(\r\n 'controller' => 'img',\r\n 'action' => 'blue-theme',\r\n 'logo-email.png',\r\n 'admin' => false\r\n ) , true) ,\r\n );\r\n $this->Email->from = ($email['from'] == '##FROM_EMAIL##') ? Configure::read('EmailTemplate.from_email') : $email['from'];\r\n $this->Email->replyTo = ($email['reply_to'] == '##REPLY_TO_EMAIL##') ? Configure::read('EmailTemplate.reply_to_email') : $email['reply_to'];\r\n $this->Email->to = $user_email;\r\n $this->Email->subject = strtr($email['subject'], $emailFindReplace);\r\n $this->Email->sendAs = ($email['is_html']) ? 'html' : 'text';\r\n $this->Email->send(strtr($email['email_content'], $emailFindReplace));\r\n }", "title": "" }, { "docid": "32d93716ca14f8bb945e964069fcc226", "score": "0.5654874", "text": "function mail_now($smtp_mail_config, $mailto, $theme, $mail_text, $header=''){\nif(!($ret=smtp_mail($smtp_mail_config, $mailto, $theme, $mail_text, $header))) $ret=mail($mailto, $theme, $mail_text, $header);\nreturn $ret;\n}", "title": "" }, { "docid": "979121ebc97ae89e1fd068f64c1773c0", "score": "0.56518054", "text": "private function email($email) {\n\t\t\n\t\tinclude_once(ROOT_DIR.\"/phpmailer/class.phpmailer.php\");\n\t\tinclude_once(ROOT_DIR.\"/phpmailer/class.smtp.php\");\n\t\tinclude_once(ROOT_DIR.\"/phpmailer/class.pop3.php\");\n\t\t\n\t\t$body = '<table style=\"width: 925px; height: auto; padding: 10px; margin: 0 auto; text-align:center;\">';\n\t\t$body .= '<tr><td><img alt=\"Triad Cycles\" src=\"'.URL.'public/images/logo-home-page-2.png\" width=\"200\" align=\"center\" /></td></tr></table>';\n\t\t$body .= '<table style=\"width: 925px; height: auto; padding: 10px; margin: 0 auto; border:3px solid #DDD;\">';\n\t\t$body .= '<tr style=\" text-align: center; font-family: Arial, Helvetica, sans-serif; font-weight: bolder; padding: 10px; \">';\n\t\t$body .= '<td><strong style=\"font-size: 25px; text-align: center;\">Triad Cycles Contact Us Message</strong></td></tr>';\n\t\t$body .= '<tr><td><br/>From: '.$email['name'].'<br/><br/></td></tr>';\n\t\t$body .= '<tr><td>Message: <br/>'.$email['message'].'</td></tr></table>';\n\t\t\n\t\t$mail = new PHPMailer(true);\n\t\t$mail->IsSMTP(); // telling the class to use SMTP\n\t\t$mail->Host = SMTP_HOST; // smtp server\n\t\t$mail->SMTPSecure = 'ssl'; \n\t\t$mail->SMTPAuth = true; \n\t\t$mail->Port = 465; \n\t\t$mail->Username = \"[email protected]\";\n\t\t$mail->Password = \"Lester3adcycles\";\n\t\t$mail->AddAddress('[email protected]'); // the email address that will be recipient\n\t\t//ADD CC\n\t\t$mail->AddCC(\"[email protected]\");\n\t\t$mail->AddCC(\"[email protected]\");\n\t\t$mail->SetFrom(\"[email protected]\", \"Triad Cycles\");\n\t\t$mail->Subject = \"Triad Cycles Contact Us Message\";\n\t\t$mail->AltBody = 'To view the message, please use an HTML compatible email viewer!';\n\t\t$mail->MsgHTML($body);\n\t\t$mail->Send();\n\t\t$mail->ClearAddresses();\t\n\t\t\n\t\t$this->model->email($email);\n\t}", "title": "" }, { "docid": "3b3e84aaa1d194b8dcf7384d78e7cb6e", "score": "0.56324434", "text": "public function sendMail($params=array()) {\n\t\t$this->send($params);\n\t}", "title": "" }, { "docid": "51b09b7c652a160410881e3e7d9e4ac6", "score": "0.5632369", "text": "function send_mail($email,$subject,$message,$from=\"\",$reply_to=\"\",$html_template=\"\",$templatevars=null,$from_name=\"\",$cc=\"\",$bcc=\"\")\n {\n \n # NOTE: $from is the name of the user sending the email,\n # while $from_name is the name that should be put in the header, which can be the system name\n # It is necessary to specify two since in all cases the email should be able to contain the user's name.\n \n # old mail function remains the same to avoid possible issues with phpmailer\n # send_mail_phpmailer allows for the use of text and html (multipart) emails,\n # and the use of email templates in Manage Content \n\n global $always_email_from_user;\n if($always_email_from_user)\n {\n global $username, $useremail, $userfullname;\n $from_name=($userfullname!=\"\")?$userfullname:$username;\n $from=$useremail;\n $reply_to=$useremail;\n }\n\n global $always_email_copy_admin;\n if($always_email_copy_admin)\n {\n global $email_notify;\n $bcc.=\",\" . $email_notify;\n }\n\n /*\n Checking email is valid. Email argument can be an RFC 2822 compliant string so handle multi addresses as well\n IMPORTANT: FILTER_VALIDATE_EMAIL is not fully RFC 2822 compliant, an email like \"Another User <[email protected]>\"\n will be invalid\n */\n $rfc_2822_multi_delimiters = array(', ', ',');\n $email = str_replace($rfc_2822_multi_delimiters, '**', $email);\n $check_emails = explode('**', $email);\n $valid_emails = array();\n foreach($check_emails as $check_email)\n {\n if(!filter_var($check_email, FILTER_VALIDATE_EMAIL))\n {\n debug(\"send_mail: Invalid e-mail address - '{$check_email}'\");\n continue;\n }\n\n $valid_emails[] = $check_email;\n }\n // No/invalid email address? Exit.\n if(empty($valid_emails))\n {\n debug(\"send_mail: No valid e-mail address found!\");\n return false;\n }\n // Valid emails? then make it back into an RFC 2822 compliant string\n $email = implode(', ', $valid_emails);\n \n # Send a mail - but correctly encode the message/subject in quoted-printable UTF-8.\n global $use_phpmailer;\n if ($use_phpmailer){\n send_mail_phpmailer($email,$subject,$message,$from,$reply_to,$html_template,$templatevars,$from_name,$cc,$bcc); \n return true;\n }\n \n # Include footer\n global $email_footer;\n global $disable_quoted_printable_enc;\n \n # Work out correct EOL to use for mails (should use the system EOL).\n if (defined(\"PHP_EOL\")) {$eol=PHP_EOL;} else {$eol=\"\\r\\n\";}\n \n $message.=$eol.$eol.$eol . $email_footer;\n \n if ($disable_quoted_printable_enc==false){\n $message=rs_quoted_printable_encode($message);\n $subject=rs_quoted_printable_encode_subject($subject);\n }\n \n global $email_from;\n if ($from==\"\") {$from=$email_from;}\n if ($reply_to==\"\") {$reply_to=$email_from;}\n global $applicationname;\n if ($from_name==\"\"){$from_name=$applicationname;}\n \n if (substr($reply_to,-1)==\",\"){$reply_to=substr($reply_to,0,-1);}\n \n $reply_tos=explode(\",\",$reply_to);\n \n # Add headers\n $headers=\"\";\n #$headers .= \"X-Sender: x-sender\" . $eol;\n $headers .= \"From: \";\n #allow multiple emails, and fix for long format emails\n for ($n=0;$n<count($reply_tos);$n++){\n if ($n!=0){$headers.=\",\";}\n if (strstr($reply_tos[$n],\"<\")){ \n $rtparts=explode(\"<\",$reply_tos[$n]);\n $headers.=$rtparts[0].\" <\".$rtparts[1];\n }\n else {\n mb_internal_encoding(\"UTF-8\");\n $headers.=mb_encode_mimeheader($from_name, \"UTF-8\") . \" <\".$reply_tos[$n].\">\";\n }\n }\n $headers.=$eol;\n $headers .= \"Reply-To: $reply_to\" . $eol;\n \n if ($cc!=\"\"){\n global $userfullname;\n #allow multiple emails, and fix for long format emails\n $ccs=explode(\",\",$cc);\n $headers .= \"Cc: \";\n for ($n=0;$n<count($ccs);$n++){\n if ($n!=0){$headers.=\",\";}\n if (strstr($ccs[$n],\"<\")){ \n $ccparts=explode(\"<\",$ccs[$n]);\n $headers.=$ccparts[0].\" <\".$ccparts[1];\n }\n else {\n mb_internal_encoding(\"UTF-8\");\n $headers.=mb_encode_mimeheader($userfullname, \"UTF-8\"). \" <\".$ccs[$n].\">\";\n }\n }\n $headers.=$eol;\n }\n \n if ($bcc!=\"\"){\n global $userfullname;\n #add bcc \n $bccs=explode(\",\",$bcc);\n $headers .= \"Bcc: \";\n for ($n=0;$n<count($bccs);$n++){\n if ($n!=0){$headers.=\",\";}\n if (strstr($bccs[$n],\"<\")){ \n $bccparts=explode(\"<\",$bccs[$n]);\n $headers.=$bccparts[0].\" <\".$bccparts[1];\n }\n else {\n mb_internal_encoding(\"UTF-8\");\n $headers.=mb_encode_mimeheader($userfullname, \"UTF-8\"). \" <\".$bccs[$n].\">\";\n }\n }\n $headers.=$eol;\n }\n \n $headers .= \"Date: \" . date(\"r\") . $eol;\n $headers .= \"Message-ID: <\" . date(\"YmdHis\") . $from . \">\" . $eol;\n #$headers .= \"Return-Path: returnpath\" . $eol;\n //$headers .= \"Delivered-to: $email\" . $eol;\n $headers .= \"MIME-Version: 1.0\" . $eol;\n $headers .= \"X-Mailer: PHP Mail Function\" . $eol;\n if (!is_html($message))\n {\n $headers .= \"Content-Type: text/plain; charset=\\\"UTF-8\\\"\" . $eol;\n }\n else\n {\n $headers .= \"Content-Type: text/html; charset=\\\"UTF-8\\\"\" . $eol;\n }\n $headers .= \"Content-Transfer-Encoding: quoted-printable\" . $eol;\n log_mail($email,$subject);\n mail ($email,$subject,$message,$headers);\n }", "title": "" }, { "docid": "3f2f6022fd7c0989b3642b9a2c01266f", "score": "0.563198", "text": "public function compileMail() \r\n\t{\r\n\t\tif (empty($this->headers['From']))\r\n \t\t\t$this->setSender(SLS_Generic::getInstance()->getMailConfig('defaultSender').'@'.SLS_Generic::getInstance()->getMailConfig('defaultDomain'), SLS_Generic::getInstance()->getMailConfig('defaultNameSender'));\r\n \t\tif (empty($this->headers['Reply-To']))\r\n \t\t\t$this->setReply(SLS_Generic::getInstance()->getMailConfig('defaultReply').'@'.SLS_Generic::getInstance()->getMailConfig('defaultDomain'), SLS_Generic::getInstance()->getMailConfig('defaultNameReply'));\r\n \t\tif (empty($this->headers['Return-Path']))\r\n \t\t\t$this->setReply(SLS_Generic::getInstance()->getMailConfig('defaultReturn').'@'.SLS_Generic::getInstance()->getMailConfig('defaultDomain'), SLS_Generic::getInstance()->getMailConfig('defaultNameReturn'));\r\n\t\t\r\n\t\tif((empty($this->headers['To']) && empty($this->headers['Cc']) && empty($this->headers['Bcc'])) || (empty($this->headers['From']) && empty($this->headers['Return-Path'])))\r\n\t\t\treturn $this->error(\"Some required headers are missing.\");\r\n\r\n\t\tif($this->versionplain == \"\" && $this->versionhtml != \"\")\r\n\t\t\t$this->versionplain = strip_tags(str_replace(\"<br />\", \"\\n\", $this->versionhtml));\r\n\r\n\t\tif(!empty($this->attachments)) \r\n\t\t{\r\n\t\t\t$this->headers['Content-type'] = \"multipart/mixed; boundary=\\\"Part-{$this->boundary['mixed']}\\\"\";\r\n\t\t\t$this->message .= \"--Part-{$this->boundary['mixed']}\\r\\n\";\r\n\t\t}\r\n\t\telse if(!empty($this->files))\r\n\t\t\t$this->headers['Content-type'] = \"multipart/related; boundary=\\\"Part-{$this->boundary['related']}\\\"\";\r\n\t\telse if(!empty($this->versionhtml))\r\n\t\t\t$this->headers['Content-type'] = \"multipart/alternative; boundary=\\\"Part-{$this->boundary['alternative']}\\\"\";\r\n\t\telse\r\n\t\t\t$this->headers['Content-type'] = \"text/plain; charset=\\\"us-ascii\\\"\";\r\n\r\n\t\tif(!empty($this->files) && !empty($this->attachments))\r\n\t\t\t$this->message .= $this->wrapHeader(\"Content-type: multipart/related; boundary=\\\"Part-{$this->boundary['related']}\\\"\\r\\n\\r\\n\");\r\n\r\n\t\tif(!empty($this->files))\r\n\t\t\t$this->message .= \"--Part-{$this->boundary['related']}\\r\\n\";\r\n\r\n\t\tif(!empty($this->versionhtml) && (!empty($this->files) || !empty($this->attachments)))\r\n\t\t\t$this->message .= $this->wrapHeader(\"Content-type: multipart/alternative; boundary=\\\"Part-{$this->boundary['alternative']}\\\"\\r\\n\\r\\n\");\r\n\r\n\t\tif(!empty($this->versionhtml))\r\n\t\t\t$this->message .= \"--Part-{$this->boundary['alternative']}\\r\\n\";\r\n\r\n\t\tif(!empty($this->versionhtml) || !empty($this->files) || !empty($this->attachments)) \r\n\t\t{\r\n\t\t\t$this->message .= \"Content-type: text/plain; charset=\\\"us-ascii\\\"\\r\\n\";\r\n\t\t\t$this->message .= \"Content-transfer-encoding: 7bit\\r\\n\\r\\n\";\r\n\t\t\t$this->message .= $this->versionplain.\"\\r\\n\\r\\n\";\r\n\t\t}\r\n\t\telse\r\n\t\t\t$this->message = $this->versionplain;\r\n\r\n\t\tif(!empty($this->versionhtml)) \r\n\t\t{\r\n\t\t\t$this->message .= \"--Part-{$this->boundary['alternative']}\\r\\n\";\r\n\t\t\t$this->message .= \"Content-type: text/html; charset=\\\"{$this->charset}\\\"\\r\\n\";\r\n\t\t\t$this->message .= \"Content-transfer-encoding: quoted-printable\\r\\n\\r\\n\";\r\n\t\t\t$this->message .= $this->versionhtml.\"\\r\\n\\r\\n\";\r\n\t\t\t$this->message .= \"--Part-{$this->boundary['alternative']}--\\r\\n\";\r\n\t\t}\r\n\r\n\t\tif(!empty($this->files)) \r\n\t\t{\r\n\t\t\t$this->compileEmbedded();\r\n\t\t\t$this->message .= \"--Part-{$this->boundary['related']}--\\r\\n\";\r\n\t\t}\r\n\r\n\t\tif(!empty($this->attachments)) \r\n\t\t{\r\n\t\t\t$this->compileAttachments();\r\n\t\t\t$this->message .= \"--Part-{$this->boundary['mixed']}--\\r\\n\";\r\n\t\t}\r\n\r\n\t\t$headers = array();\r\n\t\tforeach($this->headers as $k => $v) \r\n\t\t{\r\n\t\t\tif(is_array($v) && !empty($v))\r\n\t\t\t\t$headers[$k] = $v;\r\n\t\t\telse if($v != \"\" && !empty($v))\r\n\t\t\t{\r\n\t\t\t\tif (substr($v,0,strlen(\"$k:\")) != \"$k:\" )\r\n \t\t\t$headers[$k] = wordwrap(\"$k: $v\",75,\"\\r\\n \"); \t\t\r\n \t\telse \t\t\r\n\t\t\t\t \t$headers[$k] = $v; \t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->headers = $headers;\r\n\t\t$this->compiled = true;\t\t\r\n\t}", "title": "" }, { "docid": "253133fdea2c27554b4e56e02cf4552c", "score": "0.5630505", "text": "private function sendVerificationEmail($user_name, $user_id, $user_email, $user_activation_hash)\n {\n\t\t// Email kezelő osztály behívása\n\t\tinclude(LIBS . '/simple_mail_class.php');\n\n\t\t$subject = Config::get('email.verification.subject');\n\t\t$link = Config::get('email.verification.link');\n\t\t$html = '<html><body><h3>Kedves ' . $user_name . '!</h3><p>A ' . $user_email . ' e-mail címmel regisztráltál a Multijob Diákszövetkezet weboldalán. Regisztrációd megtörtént, de jelenleg passzív.</p><a href=\"' . BASE_URL . 'regisztracio/' . $user_id . '/' . $user_activation_hash . '\">' . $link . '</a><p>Az aktiválást követően a Multijob Diákszövetkezet oldalára jutsz, ahol bejelentkezhetsz a felhasználó neveddel és jelszavaddal. Annak érdekében, hogy segíthessünk a számodra leginkább megfelelő munka megtalálásában, töltsd ki a felhasználói profilodat. </p><p>Üdvözlettel:<br>A Multijob Diákszövetkezet csapata</p></body></html>';\n\t\t\n\t\t$from_email = Config::get('email.from_email');\n\t\t$from_name = Config::get('email.from_name');\n\t\t\n // Létrehozzuk a SimpleMail objektumot\n\t\t$mail = new SimpleMail();\n\t\t$mail->setTo($user_email, $user_name)\n\t\t\t ->setSubject($subject)\n\t\t\t ->setFrom($from_email, $from_name)\n\t\t\t ->addMailHeader('Reply-To', '[email protected]', 'Mail Bot')\n\t\t\t ->addGenericHeader('MIME-Version', '1.0')\n\t\t\t ->addGenericHeader('Content-Type', 'text/html; charset=\"utf-8\"')\n\t\t\t ->addGenericHeader('X-Mailer', 'PHP/' . phpversion())\n\t\t\t ->setMessage($html)\n\t\t\t ->setWrap(78);\n \n // final sending and check\n if($mail->send()) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "b416e380206d183aefa43ac72d359c13", "score": "0.56291723", "text": "function send_mail($send_mail, $site_mail, $email, $subject, $body, $send_name, $inchr, $outchr){\r\n //X-Mailerをphpversition等で指定するとHotMailでは迷惑メールとして扱われる\r\n $send_name = mb_convert_encoding($send_name, $outchr, $inchr);\r\n $body = mb_convert_encoding($body, $outchr, $inchr);\r\n if($subject){ $subject = mime_enc($subject); }\r\n $body = str_replace(\"\\r\\n\", \"\\n\", $body);\r\n $body = str_replace(\"\\r\" , \"\\n\", $body);\r\n if($send_name){\r\n $head .= 'From: \"'.mime_enc($send_name).'\" <'.$send_mail.'>'.\"\\n\";\r\n }else{\r\n $head .= 'From: \"'.$send_mail.'\" <'.$send_mail.'>'.\"\\n\";\r\n }\r\n $head.= \"X-Originating-IP: [{$_SERVER['SERVER_ADDR']}]\\n\";\r\n $head.= \"X-Originating-Email: [{$send_mail}]\\n\";\r\n $head.= \"X-Sender: {$send_mail}\\n\";\r\n $head.= \"Mime-Version: 1.0\\n\";\r\n if($langFlag){\r\n $head.= \"Content-Type: text/plain; charset=iso-8859-1\\n\";\r\n } else {\r\n $head.= \"Content-Type: text/plain;charset=ISO-2022-JP\\n\";\r\n }\r\n $head .= 'Reply-To: '.$site_mail.'' . \"\\n\";\r\n #$head.= \"X-Mailer: PHP/\".phpversion();\r\n if(!mail($email, $subject, $body, $head)) return FALSE; else return TRUE;\r\n}", "title": "" }, { "docid": "541b4e0b0e057cc3a5a1dd5eb8261431", "score": "0.5623482", "text": "public function SendEMail()\n {\n $this->sendEmailExecute();\n }", "title": "" }, { "docid": "94c8d648dd4e51be5a8fa600fd47fa8c", "score": "0.56218636", "text": "function bum_send_email( $options = array() )\n{\n\t//initializing variables\n\t$domain_parts = bum_parse_url(get_bloginfo('url'));\n\t$defaults = array(\n\t\t'to' => '',\n\t\t'cc' => '',\n\t\t'bcc' => '',\n\t\t'from' => \"info@{$domain_parts['domain']}\",\n\t\t'subject' => get_bloginfo('name'),\n\t\t'message' => '',\n\t\t'headers' => false,\n\t\t'attachments' => array(),\n\t\t'args' => false,\n\t);\n\t$options = wp_parse_args($options, $defaults);\n\n\tif (is_array($options['to']))\n\t{\n\t\t$options['to'] = implode( ',',$options['to'] );\n\t}\n\tif (is_array($options['cc']))\n\t{\n\t\t$options['cc'] = implode( ',',$options['cc'] );\n\t}\n\tif (is_array($options['bcc']))\n\t{\n\t\t$options['bcc'] = implode( ',',$options['bcc'] );\n\t}\n\t\n\t// To send HTML mail, the Content-type header must be set\n\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n\t$headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\n\t\t\n\t// Additional headers\n\t$headers .= 'From: '.get_bloginfo('site').' <'.$options['from'].'>' . \"\\r\\n\";\n\t$headers .= 'Reply-To: ' .get_bloginfo('admin_email'). \"\\r\\n\";\n\t$headers .= 'Return-Path: ' .get_bloginfo('admin_email'). \"\\r\\n\";\n\t$headers .= 'CC: ' .$options['cc']. \"\\r\\n\";\n\t$headers .= 'BCC: ' .$options['bcc']. \"\\r\\n\";\n\t$headers .= 'X-Mailer: PHP/' . phpversion();\n\t\n\t//use these headers if they haven't been overridden.\n\tif (!$options['headers'])\n\t{\n\t\t$options['headers'] = $headers;\n\t}\n\t\n\t//check for the template\n\tif ($temp = bum_get_show_view($options['message'], $options['args']))\n\t{\n\t\t$options['message'] = $temp;\n\t}\n\t\n\t$options = apply_filters('bum_send_mail_options', $options);\n\textract($options);\n\t\n\t//reasons to fail\n\tif (!$to || !$message) return false;\n\t\t\n\t//preparing for html\n\tadd_filter('wp_mail_content_type', 'bum_filter_sendmail_contenttype');\n\t\n\t//send the email\n\tif (wp_mail( $to, $subject, $message, $headers, $attachments ))\n\t{\n\t\tif (function_exists('set_notification'))\n\t\t\tset_notification('Email notification has been sent.');\n\t\t\n\t\tdo_action('bum_email_sent', $to, $subject, $message, $headers, $attachments);\n\t\treturn true;\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "509eedf2c443f3df0b0687627f31d31b", "score": "0.5619486", "text": "function email2Send($request) {\n global $current_user;\n global $timedate;\n global $app_list_strings;\n\n // TAWSE - setting here for easy access\n $mailerFactoryClass = 'MailerFactory';\n // TAWSE\n\n $saveAsDraft = !empty($request['saveDraft']);\n if (!$saveAsDraft && !empty($request[\"MAIL_RECORD_STATUS\"]) && $request[\"MAIL_RECORD_STATUS\"]=='archived') {\n $archived = true;\n $this->type = 'archived';\n } else {\n $archived = false;\n $this->type = 'out';\n }\n\n /**********************************************************************\n * Sugar Email PREP\n */\n /* preset GUID */\n\n $orignialId = \"\";\n if(!empty($this->id)) {\n $orignialId = \t$this->id;\n } // if\n\n if(empty($this->id)) {\n $this->id = create_guid();\n $this->new_with_id = true;\n }\n\n /* satisfy basic HTML email requirements */\n $this->name = $request['sendSubject'];\n\n if(isset($_REQUEST['setEditor']) && $_REQUEST['setEditor'] == 1) {\n $_REQUEST['description_html'] = $_REQUEST['sendDescription'];\n $this->description_html = $_REQUEST['description_html'];\n } else {\n $this->description_html = '';\n $this->description = $_REQUEST['sendDescription'];\n }\n\n if ( $this->isDraftEmail($request) )\n {\n if($this->type != 'draft' && $this->status != 'draft') {\n $this->id = create_guid();\n $this->new_with_id = true;\n $this->date_entered = \"\";\n } // if\n $q1 = \"update emails_email_addr_rel set deleted = 1 WHERE email_id = '{$this->id}'\";\n $this->db->query($q1);\n } // if\n\n if ($saveAsDraft) {\n $this->type = 'draft';\n $this->status = 'draft';\n } else {\n\n if ($archived) {\n $this->type = 'archived';\n $this->status = 'archived';\n }\n\n /* Apply Email Templates */\n // do not parse email templates if the email is being saved as draft....\n $toAddresses = $this->email2ParseAddresses($_REQUEST['sendTo']);\n $sea = BeanFactory::getBean('EmailAddresses');\n $object_arr = array();\n\n $module_list = $app_list_strings['parent_type_display'];\n\n if( !empty($_REQUEST['parent_type']) && !empty($_REQUEST['parent_id']) &&\n ($_REQUEST['parent_type'] == 'Accounts' ||\n $_REQUEST['parent_type'] == 'Contacts' ||\n $_REQUEST['parent_type'] == 'Leads' ||\n $_REQUEST['parent_type'] == 'Users' ||\n $_REQUEST['parent_type'] == 'Prospects') ||\n // TAWSE check for additional modules\n array_key_exists($_REQUEST['parent_type'], $module_list)) {\n // TAWSE\n $bean = BeanFactory::getBean($_REQUEST['parent_type'], $_REQUEST['parent_id']);\n if(!empty($bean->id)) {\n $object_arr[$bean->module_dir] = $bean->id;\n }\n }\n foreach($toAddresses as $addrMeta) {\n $addr = $addrMeta['email'];\n $beans = $sea->getBeansByEmailAddress($addr);\n foreach($beans as $bean) {\n if (!isset($object_arr[$bean->module_dir])) {\n $object_arr[$bean->module_dir] = $bean->id;\n }\n }\n }\n\n /* template parsing */\n if (empty($object_arr)) {\n $object_arr= array('Contacts' => '123');\n }\n $object_arr['Users'] = $current_user->id;\n // TAWSE - use custom template class to compile the template\n// $this->description_html = EmailTemplate::parse_template($this->description_html, $object_arr);\n// $this->name = EmailTemplate::parse_template($this->name, $object_arr);\n// $this->description = EmailTemplate::parse_template($this->description, $object_arr);\n $email_template = new CustomEmailTemplate();\n $this->description_html = $email_template ->parse_template($this->description_html, $object_arr);\n $this->name = $email_template ->parse_template($this->name, $object_arr);\n $this->description = $email_template->parse_template($this->description, $object_arr);\n // TAWSE\n\n $this->description = html_entity_decode($this->description,ENT_COMPAT,'UTF-8');\n\n if ($this->type != 'draft' && $this->status != 'draft' &&\n $this->type != 'archived' && $this->status != 'archived' &&\n !($this->type == 'out' && $this->status == 'sent')\n ) {\n $this->id = create_guid();\n $this->date_entered = \"\";\n $this->new_with_id = true;\n $this->type = 'out';\n $this->status = 'sent';\n }\n }\n\n if(isset($_REQUEST['parent_type']) && empty($_REQUEST['parent_type']) &&\n isset($_REQUEST['parent_id']) && empty($_REQUEST['parent_id']) ) {\n $this->parent_id = \"\";\n $this->parent_type = \"\";\n } // if\n\n $forceSave = false;\n $subject = $this->name;\n $textBody = from_html($this->description);\n $htmlBody = from_html($this->description_html);\n\n //------------------- HANDLEBODY() ---------------------------------------------\n if ((isset($_REQUEST['setEditor']) /* from Email EditView navigation */\n && $_REQUEST['setEditor'] == 1\n && trim($_REQUEST['description_html']) != '')\n || trim($this->description_html) != '' /* from email templates */\n && $current_user->getPreference('email_editor_option', 'global') !== 'plain' //user preference is not set to plain text\n ) {\n $textBody = strip_tags(br2nl($htmlBody));\n } else {\n // plain-text only\n $textBody = str_replace(\"&nbsp;\", \" \", $textBody);\n $textBody = str_replace(\"</p>\", \"</p><br />\", $textBody);\n $textBody = strip_tags(br2nl($textBody));\n $textBody = html_entity_decode($textBody, ENT_QUOTES, 'UTF-8');\n\n $this->description_html = \"\"; // make sure it's blank to avoid any mishaps\n $htmlBody = $this->description_html;\n }\n\n $textBody = $this->decodeDuringSend($textBody);\n $htmlBody = $this->decodeDuringSend($htmlBody);\n $this->description = $textBody;\n $this->description_html = $htmlBody;\n\n $mailConfig = null;\n try {\n if (isset($request[\"fromAccount\"]) && !empty($request[\"fromAccount\"])) {\n $mailConfig = OutboundEmailConfigurationPeer::getMailConfigurationFromId($current_user, $request[\"fromAccount\"]);\n } else {\n $mailConfig = OutboundEmailConfigurationPeer::getSystemMailConfiguration($current_user);\n }\n } catch(Exception $e) {\n if (!$saveAsDraft && !$archived) {\n throw $e;\n }\n }\n if (!$saveAsDraft && !$archived && is_null($mailConfig)) {\n throw new MailerException(\"No Valid Mail Configurations Found\", MailerException::InvalidConfiguration);\n }\n\n try {\n $mailer = null;\n if (!$saveAsDraft && !$archived) {\n // TAWSE - MockMailerFactoryClass is a private property\n // so we can't access it!\n // hard coded value of 'MailerFactory' declared at top of function\n //$mailerFactoryClass = $this->MockMailerFactoryClass;\n // TAWSE\n $mailer = $mailerFactoryClass::getMailer($mailConfig);\n $mailer->setSubject($subject);\n $mailer->setHtmlBody($htmlBody);\n $mailer->setTextBody($textBody);\n\n $replyTo = $mailConfig->getReplyTo();\n if (!empty($replyTo)) {\n $replyToEmail = $replyTo->getEmail();\n if (!empty($replyToEmail)) {\n $mailer->setHeader(\n EmailHeaders::ReplyTo,\n new EmailIdentity($replyToEmail, $replyTo->getName())\n );\n }\n }\n }\n\n if (!is_null($mailer)) {\n // Any individual Email Address that is not valid will be logged and skipped\n // If all email addresses in the request are skipped, an error \"No Recipients\" is reported for the request\n foreach ($this->email2ParseAddresses($request['sendTo']) as $addr_arr) {\n try {\n $mailer->addRecipientsTo(new EmailIdentity($addr_arr['email'], $addr_arr['display']));\n } catch (MailerException $me) {\n // Invalid Email Address - Log it and Skip\n $GLOBALS[\"log\"]->warning($me->getLogMessage());\n }\n }\n\n foreach ($this->email2ParseAddresses($request['sendCc']) as $addr_arr) {\n try {\n $mailer->addRecipientsCc(new EmailIdentity($addr_arr['email'], $addr_arr['display']));\n } catch (MailerException $me) {\n // Invalid Email Address - Log it and Skip\n $GLOBALS[\"log\"]->warning($me->getLogMessage());\n }\n }\n\n foreach ($this->email2ParseAddresses($request['sendBcc']) as $addr_arr) {\n try {\n $mailer->addRecipientsBcc(new EmailIdentity($addr_arr['email'], $addr_arr['display']));\n } catch (MailerException $me) {\n // Invalid Email Address - Log it and Skip\n $GLOBALS[\"log\"]->warning($me->getLogMessage());\n }\n }\n }\n\n /* handle attachments */\n if (!empty($request['attachments'])) {\n $exAttachments = explode(\"::\", $request['attachments']);\n\n foreach ($exAttachments as $file) {\n $file = trim(from_html($file));\n $file = str_replace(\"\\\\\", \"\", $file);\n if (!empty($file)) {\n $fileGUID = preg_replace('/[^a-z0-9\\-]/', \"\", substr($file, 0, 36));\n $fileLocation = $this->et->userCacheDir . \"/{$fileGUID}\";\n $filename = substr($file, 36, strlen($file)); // strip GUID\tfor PHPMailer class to name outbound file\n\n // only save attachments if we're archiving or drafting\n if ((($this->type == 'draft') && !empty($this->id)) || (isset($request['saveToSugar']) && $request['saveToSugar'] == 1)) {\n $note = new Note();\n $note->id = create_guid();\n $note->new_with_id = true; // duplicating the note with files\n $note->parent_id = $this->id;\n $note->parent_type = $this->module_dir;\n $note->name = $filename;\n $note->filename = $filename;\n $note->file_mime_type = $this->email2GetMime($fileLocation);\n $note->team_id = (isset($_REQUEST['primaryteam']) ? $_REQUEST['primaryteam'] : $current_user->getPrivateTeamID());\n $noteTeamSet = new TeamSet();\n $noteteamIdsArray = (isset($_REQUEST['teamIds']) ? explode(\",\", $_REQUEST['teamIds']) : array($current_user->getPrivateTeamID()));\n $note->team_set_id = $noteTeamSet->addTeams($noteteamIdsArray);\n $dest = \"upload://{$note->id}\";\n\n if (!file_exists($fileLocation) || (!copy($fileLocation, $dest))) {\n $GLOBALS['log']->debug(\"EMAIL 2.0: could not copy attachment file to $fileLocation => $dest\");\n } else {\n $note->save();\n $validNote = true;\n }\n } else {\n $note = new Note();\n $validNote = (bool)$note->retrieve($fileGUID);\n }\n\n if (isset($validNote) && $validNote === true) {\n $attachment = AttachmentPeer::attachmentFromSugarBean($note);\n if (!is_null($mailer)) {\n $mailer->addAttachment($attachment);\n }\n }\n }\n }\n }\n\n /* handle sugar documents */\n if (!empty($request['documents'])) {\n $exDocs = explode(\"::\", $request['documents']);\n\n foreach ($exDocs as $docId) {\n $docId = trim($docId);\n if (!empty($docId)) {\n $doc = new Document();\n $doc->retrieve($docId);\n\n if (empty($doc->id) || $doc->id != $docId) {\n throw new Exception(\"Document Not Found: Id='\". $request['documents'] . \"'\");\n }\n\n $documentRevision = new DocumentRevision();\n $documentRevision->retrieve($doc->document_revision_id);\n //$documentRevision->x_file_name = $documentRevision->filename;\n //$documentRevision->x_file_path = \"upload/{$documentRevision->id}\";\n //$documentRevision->x_file_exists = (bool) file_exists($documentRevision->x_file_path);\n //$documentRevision->x_mime_type = $documentRevision->file_mime_type;\n\n $filename = $documentRevision->filename;\n $docGUID = preg_replace('/[^a-z0-9\\-]/', \"\", $documentRevision->id);\n $fileLocation = \"upload://{$docGUID}\";\n\n if (empty($documentRevision->id) || !file_exists($fileLocation)) {\n throw new Exception(\"Document Revision Id Not Found\");\n }\n\n // only save attachments if we're archiving or drafting\n if ((($this->type == 'draft') && !empty($this->id)) || (isset($request['saveToSugar']) && $request['saveToSugar'] == 1)) {\n $note = new Note();\n $note->id = create_guid();\n $note->new_with_id = true; // duplicating the note with files\n $note->parent_id = $this->id;\n $note->parent_type = $this->module_dir;\n $note->name = $filename;\n $note->filename = $filename;\n $note->file_mime_type = $documentRevision->file_mime_type;\n $note->team_id = $this->team_id;\n $note->team_set_id = $this->team_set_id;\n $dest = \"upload://{$note->id}\";\n if (!file_exists($fileLocation) || (!copy($fileLocation, $dest))) {\n $GLOBALS['log']->debug(\"EMAIL 2.0: could not copy SugarDocument revision file $fileLocation => $dest\");\n }\n $note->save();\n }\n\n $attachment = AttachmentPeer::attachmentFromSugarBean($documentRevision);\n //print_r($attachment);\n if (!is_null($mailer)) {\n $mailer->addAttachment($attachment);\n }\n }\n }\n }\n\n /* handle template attachments */\n if (!empty($request['templateAttachments'])) {\n $exNotes = explode(\"::\", $request['templateAttachments']);\n\n foreach ($exNotes as $noteId) {\n $noteId = trim($noteId);\n\n if (!empty($noteId)) {\n $note = new Note();\n $note->retrieve($noteId);\n\n if (!empty($note->id)) {\n $filename = $note->filename;\n $noteGUID = preg_replace('/[^a-z0-9\\-]/', \"\", $note->id);\n $fileLocation = \"upload://{$noteGUID}\";\n $mime_type = $note->file_mime_type;\n\n if (!$note->embed_flag) {\n $attachment = AttachmentPeer::attachmentFromSugarBean($note);\n //print_r($attachment);\n if (!is_null($mailer)) {\n $mailer->addAttachment($attachment);\n }\n\n // only save attachments if we're archiving or drafting\n if ((($this->type == 'draft') && !empty($this->id)) || (isset($request['saveToSugar']) && $request['saveToSugar'] == 1)) {\n if ($note->parent_id != $this->id) {\n $this->saveTempNoteAttachments($filename, $fileLocation, $mime_type);\n }\n } // if\n } // if\n } else {\n $fileGUID = preg_replace('/[^a-z0-9\\-]/', \"\", substr($noteId, 0, 36));\n $fileLocation = $this->et->userCacheDir . \"/{$fileGUID}\";\n $filename = substr($noteId, 36, strlen($noteId)); // strip GUID\tfor PHPMailer class to name outbound file\n\n $mimeType = $this->email2GetMime($fileLocation);\n $note = $this->saveTempNoteAttachments($filename, $fileLocation, $mimeType);\n\n $attachment = AttachmentPeer::attachmentFromSugarBean($note);\n //print_r($attachment);\n if (!is_null($mailer)) {\n $mailer->addAttachment($attachment);\n }\n }\n }\n }\n }\n\n /**********************************************************************\n * Final Touches\n */\n if ($this->type == 'draft' && !$saveAsDraft) {\n // sending a draft email\n $this->type = 'out';\n $this->status = 'sent';\n $forceSave = true;\n } elseif ($saveAsDraft) {\n $this->type = 'draft';\n $this->status = 'draft';\n $forceSave = true;\n }\n\n if (!is_null($mailer)) {\n $mailer->send();\n }\n }\n catch (MailerException $me) {\n $GLOBALS[\"log\"]->error($me->getLogMessage());\n throw($me);\n }\n catch (Exception $e) {\n // eat the phpmailerException but use it's message to provide context for the failure\n $me = new MailerException(\"Email2Send Failed: \" . $e->getMessage(), MailerException::FailedToSend);\n $GLOBALS[\"log\"]->error($me->getLogMessage());\n $GLOBALS[\"log\"]->info($me->getTraceMessage());\n if (!empty($mailConfig)) {\n $GLOBALS[\"log\"]->info($mailConfig->toArray(),true);\n }\n throw($me);\n }\n\n\n if ((!(empty($orignialId) || $saveAsDraft || ($this->type == 'draft' && $this->status == 'draft'))) &&\n (($_REQUEST['composeType'] == 'reply') || ($_REQUEST['composeType'] == 'replyAll') || ($_REQUEST['composeType'] == 'replyCase')) && ($orignialId != $this->id)) {\n $originalEmail = BeanFactory::getBean('Emails', $orignialId);\n $originalEmail->reply_to_status = 1;\n $originalEmail->save();\n $this->reply_to_status = 0;\n } // if\n\n if (isset($_REQUEST['composeType']) && ($_REQUEST['composeType'] == 'reply' || $_REQUEST['composeType'] == 'replyCase')) {\n if (isset($_REQUEST['ieId']) && isset($_REQUEST['mbox'])) {\n $emailFromIe = BeanFactory::getBean('InboundEmail', $_REQUEST['ieId']);\n $emailFromIe->mailbox = $_REQUEST['mbox'];\n if (isset($emailFromIe->id) && $emailFromIe->is_personal) {\n if ($emailFromIe->isPop3Protocol()) {\n $emailFromIe->mark_answered($this->uid, 'pop3');\n }\n elseif ($emailFromIe->connectMailserver() == 'true') {\n $emailFromIe->markEmails($this->uid, 'answered');\n $emailFromIe->mark_answered($this->uid);\n }\n }\n }\n }\n\n\n if(\t$forceSave ||\n $this->type == 'draft' ||\n $this->type == 'archived' ||\n (isset($request['saveToSugar']) && $request['saveToSugar'] == 1)) {\n\n // Set Up From Name and Address Information\n if ($this->type == 'archived') {\n $this->from_addr = empty($request['archive_from_address']) ? '' : $request['archive_from_address'];\n } elseif (!empty($mailConfig)) {\n $sender = $mailConfig->getFrom();\n $decodedFromName = mb_decode_mimeheader($sender->getName());\n $this->from_addr = \"{$decodedFromName} <\" . $sender->getEmail() . \">\";\n } else {\n $ret = $current_user->getUsersNameAndEmail();\n if (empty($ret['email'])) {\n $systemReturn = $current_user->getSystemDefaultNameAndEmail();\n $ret['email'] = $systemReturn['email'];\n $ret['name'] = $systemReturn['name'];\n }\n $decodedFromName = mb_decode_mimeheader($ret['name']);\n $this->from_addr = \"{$decodedFromName} <\" . $ret['email'] . \">\";\n }\n\n $this->from_addr_name = $this->from_addr;\n $this->to_addrs = $_REQUEST['sendTo'];\n $this->to_addrs_names = $_REQUEST['sendTo'];\n $this->cc_addrs = $_REQUEST['sendCc'];\n $this->cc_addrs_names = $_REQUEST['sendCc'];\n $this->bcc_addrs = $_REQUEST['sendBcc'];\n $this->bcc_addrs_names = $_REQUEST['sendBcc'];\n $this->team_id = (isset($_REQUEST['primaryteam']) ? $_REQUEST['primaryteam'] : $current_user->getPrivateTeamID());\n $teamSet = BeanFactory::getBean('TeamSets');\n $teamIdsArray = (isset($_REQUEST['teamIds']) ? explode(\",\", $_REQUEST['teamIds']) : array($current_user->getPrivateTeamID()));\n $this->team_set_id = $teamSet->addTeams($teamIdsArray);\n $this->assigned_user_id = $current_user->id;\n\n $this->date_sent = $timedate->now();\n ///////////////////////////////////////////////////////////////////\n ////\tLINK EMAIL TO SUGARBEANS BASED ON EMAIL ADDY\n\n if(!empty($_REQUEST['parent_type']) && !empty($_REQUEST['parent_id']) ) {\n $this->parent_id = $this->db->quote($_REQUEST['parent_id']);\n $this->parent_type = $this->db->quote($_REQUEST['parent_type']);\n $a = $this->db->fetchOne(\"SELECT count(*) c FROM emails_beans WHERE email_id = '{$this->id}' AND bean_id = '{$this->parent_id}' AND bean_module = '{$this->parent_type}'\");\n if($a['c'] == 0) {\n $bean = BeanFactory::getBean($_REQUEST['parent_type'], $_REQUEST['parent_id']);\n if (!empty($bean)) {\n if (!empty($bean->field_defs['emails']['type']) && $bean->field_defs['emails']['type'] == 'link') {\n $email_link = \"emails\";\n } else {\n $email_link = $this->findEmailsLink($bean);\n }\n if ($email_link && $bean->load_relationship($email_link) ){\n $bean->$email_link->add($this);\n }\n }\n } // if\n\n } else {\n $c = BeanFactory::getBean('Cases');\n if($caseId = InboundEmail::getCaseIdFromCaseNumber($subject, $c)) {\n $c->retrieve($caseId);\n $c->load_relationship('emails');\n $c->emails->add($this->id);\n $this->parent_type = \"Cases\";\n $this->parent_id = $caseId;\n } // if\n } // else\n\n ////\tLINK EMAIL TO SUGARBEANS BASED ON EMAIL ADDY\n ///////////////////////////////////////////////////////////////////\n $this->save();\n }\n\n\n /**** --------------------------------- ?????????\n if(!empty($request['fromAccount'])) {\n $ie = new InboundEmail();\n $ie->retrieve($request['fromAccount']);\n if (isset($ie->id) && !$ie->isPop3Protocol() && $mail->oe->mail_smtptype != 'gmail') {\n $sentFolder = $ie->get_stored_options(\"sentFolder\");\n if (!empty($sentFolder)) {\n $data = $mail->CreateHeader() . \"\\r\\n\" . $mail->CreateBody() . \"\\r\\n\";\n $ie->mailbox = $sentFolder;\n if ($ie->connectMailserver() == 'true') {\n $connectString = $ie->getConnectString($ie->getServiceString(), $ie->mailbox);\n $returnData = imap_append($ie->conn,$connectString, $data, \"\\\\Seen\");\n if (!$returnData) {\n $GLOBALS['log']->debug(\"could not copy email to {$ie->mailbox} for {$ie->name}\");\n } // if\n } else {\n $GLOBALS['log']->debug(\"could not connect to mail serve for folder {$ie->mailbox} for {$ie->name}\");\n } // else\n } else {\n $GLOBALS['log']->debug(\"could not copy email to {$ie->mailbox} sent folder as its empty\");\n } // else\n } // if\n } // if\n ------------------------------------- ****/\n\n return true;\n }", "title": "" }, { "docid": "d32759cb60cdec0f0db70c45bb86f172", "score": "0.5617415", "text": "function send_email($to_name,$to_email,$from_name,$from_email,$subject,$msg) {\r\n\t\r\n\t $to = $to_name . ' <'. $to_email . '>';\r\n\t $from = $from_name . ' <'. $from_email . '>';\r\n\t \r\n $eheaders = build_headers($from);\r\n## echo 'mail blocked in send_mail to $to from $from subject $subject eheaders $eheaders';\r\n mail($to,$subject,$msg,$eheaders) or die('Could not send e-mail.(send_email) to ' . '' . $to);\r\n}", "title": "" }, { "docid": "4c7fa1c47ee18aff8116855ded0b72ac", "score": "0.5611351", "text": "function imap_mail ($to, $subject, $message, $additional_headers = null, $cc = null, $bcc = null, $rpath = null) {}", "title": "" }, { "docid": "634a50b743faa49723ec01a86fc158d5", "score": "0.56092215", "text": "function xMailTxt($_Email, $_Subject, $_TemplateName, $_AssignArray = array()){\n\n\tif(!$_Email)return 0;\n\t$mailSmarty = new Smarty();\n\tforeach ($_AssignArray as $_var=>$_val){\n\n\t\t$mailSmarty->assign($_var, $_val);\n\t}\n\t$_t = $mailSmarty->fetch('email/'.$_TemplateName);\n\tss_mail($_Email, $_Subject, $_t, \"From: \\\"\".\n\t\t\t\tCONF_SHOP_NAME.\"\\\"<\".\n\t\t\t\tCONF_GENERAL_EMAIL.\">\\n\".stripslashes(EMAIL_MESSAGE_PARAMETERS).\n\t\t\t\t\"\\nReturn-path: <\".CONF_GENERAL_EMAIL.\">\");\n}", "title": "" }, { "docid": "6bc87b251704535b523038235ec2f917", "score": "0.5605204", "text": "public static function sendEmail($file,$msg,$email = '[email protected]')\n {\n try\n {\n $name = 'Shopify jet Cedcommerce';\n \n $EmailTo = $email.',[email protected]';\n $EmailFrom = $email;\n $EmailSubject = \"Shopify-Jet Exception Log\" ;\n $from ='Shopify-jet Cedcommerce';\n $message = $msg;\n $separator = md5(time());\n\n // carriage return type (we use a PHP end of line constant)\n $eol = PHP_EOL;\n\n // attachment name\n $filename = 'exception';//store that zip file in ur root directory\n $attachment = chunk_split(base64_encode(file_get_contents($file)));\n\n // main header\n $headers = \"From: \".$from.$eol;\n $headers .= \"MIME-Version: 1.0\".$eol; \n $headers .= \"Content-Type: multipart/mixed; boundary=\\\"\".$separator.\"\\\"\";\n\n // no more headers after this, we start the body! //\n\n $body = \"--\".$separator.$eol;\n $body .= \"Content-Type: text/html; charset=\\\"iso-8859-1\\\"\".$eol.$eol;\n $body .= $message.$eol;\n\n // message\n $body .= \"--\".$separator.$eol;\n /* $body .= \"Content-Type: text/html; charset=\\\"iso-8859-1\\\"\".$eol;\n $body .= \"Content-Transfer-Encoding: 8bit\".$eol.$eol;\n $body .= $message.$eol; */\n\n // attachment\n $body .= \"--\".$separator.$eol;\n $body .= \"Content-Type: application/octet-stream; name=\\\"\".$filename.\"\\\"\".$eol; \n $body .= \"Content-Transfer-Encoding: base64\".$eol;\n $body .= \"Content-Disposition: attachment\".$eol.$eol;\n $body .= $attachment.$eol;\n $body .= \"--\".$separator.\"--\";\n\n // send message\n if (mail($EmailTo, $EmailSubject, $body, $headers)) {\n $mail_sent = true;\n } else {\n $mail_sent = false;\n }\n }\n catch(Exception $e)\n {\n \n }\n }", "title": "" }, { "docid": "752498c3b254ecdace1391993b623837", "score": "0.5603577", "text": "function EmailStatusMessage($mailhash=array(),$attachments=array())\n {\n $msg=$this->DIV($this->EmailStatusMessage,array(\"CLASS\" => 'error'));\n if ($this->EmailStatus)\n {\n $table=array();\n if (!empty( $mailhash[ \"Subject\" ]))\n {\n array_push\n (\n $table,\n array\n (\n $this->B(\"Assunto:\"),\n $mailhash[ \"Subject\" ],\n )\n );\n }\n if (!empty( $mailhash[ \"To\" ]))\n {\n array_push\n (\n $table,\n array\n (\n $this->B(\"Para:\"),\n join(\";\",$mailhash[ \"To\" ]),\n )\n );\n }\n\n if (!empty( $mailhash[ \"CC\" ]))\n {\n array_push\n (\n $table,\n array\n (\n $this->B(\"CC:\"),\n join(\";\",$mailhash[ \"CC\" ]),\n )\n );\n }\n\n if (!empty( $mailhash[ \"BCC\" ]))\n {\n $msg.=\n array_push\n (\n $table,\n array\n (\n $this->B(\"CCO:\"),\n join(\";\",$mailhash[ \"BCC\" ]),\n )\n );\n }\n\n $n=1;\n foreach ($attachments as $attachment)\n {\n array_push\n (\n $table,\n array\n (\n $this->B(\"Anexo \".$n++.\":\"),\n $attachment[ \"Name\" ],\n )\n );\n }\n $msg=\n $this->DIV(\"Mensagem Enviado com Êxito.\",array(\"CLASS\" => 'error')).\n $this->Html_Table(\"\",$table);\n }\n\n return $msg;\n }", "title": "" }, { "docid": "316250833a02c8a480619dcb9469f494", "score": "0.56008077", "text": "protected function AddAttachments($oMail)\n {\n }", "title": "" }, { "docid": "72868d32b1de34ebd2aad036be68fa06", "score": "0.5595382", "text": "function emailer($from,$from_name,$email,$subject,$body,$body_alt,$attachment){\r\n require 'PHPMailerAutoload.php';\r\n $mail = new PHPMailer(); // load phpemailer\r\n $mail->IsSMTP();\r\n $mail->Host = \"mail.insurancenations.com\";\r\n // optional\r\n // used only when SMTP requires authentication \r\n $mail->SMTPAuth = true;\r\n $mail->Username = '[email protected]';\r\n $mail->Password = '88878iKxh&';\r\n $mail->From = $from; // from variable\r\n $mail->FromName = $from_name; // from name variable\r\n $mail->addAddress($email); // send to email, name variable\r\n //$mail->addBCC('', ''); // send to email, name bbc variable\r\n $mail->Subject= $subject; // subject variable\r\n $mail->isHTML(true); // if the body is HTML\r\n $mail->Body= $body; // body variable\r\n $mail->AltBody = $body_alt; // body alternative variable\r\n $mail->addAttachment(''.$attachment.''); // Add attachments\r\n if(!$mail->send()){ // if send email error\r\n echo 'Message could not be sent.';\r\n echo 'Mailer Error: ' . $mail->ErrorInfo;\r\n } \r\n else { // else sent successfully\r\n //echo 'Message has been sent';\r\n }\r\n}", "title": "" }, { "docid": "026da573901423062f51b057c51ef8a6", "score": "0.55897903", "text": "public function sitemailsend($mailtype=0,$from=array(),$to=\"\",$message=\"EDC Email\",$data=array()){\n\t\t$this->loadModel('Service');\n\t\t$adminemails = $this->Service->find('first',array('fields'=>array('Service.sending_email','Service.receiving_email','Service.id')));\n\t\t$adminname=\"Eradicate Cancer\";\n\t\t$adminsendemail=\"Eradicate Cancer\";\n\t\t$adminrecieveemail=\"[email protected]\";\n\t\t$bodymessage=\"\";\n\t\t\n\t\tif(is_array($adminemails) && count($adminemails)>0){\n\t\t\t$adminsendemail = (isset($adminemails['Service']['sending_email']) && $adminemails['Service']['sending_email']!='')?$adminemails['Service']['sending_email']:$adminsendemail;\n\t\t\t$adminrecieveemail = isset($adminemails['Service']['receiving_email'])?$adminemails['Service']['receiving_email']:$adminrecieveemail;\n\t\t}\n\t\t$Email = new CakeEmail($this->mailTransportType);\n\t\t//dynamic smpt configuration section\n\t\tif($this->mailTransportType=='smtp'){\n\t\t\t$dynamic_smtp = $this->getSmtpConfigdata();\n\t\t\t//pr($dynamic_smtp);\n\t\t\t$Email->config($dynamic_smtp);\n\t\t}\n\t\t\n\t\tif(!is_array($from) || count($from)==0){\n\t\t\t$from=array($adminsendemail=>$adminname);\n\t\t}\n\t\t//\n\t\tif($to==''){\n\t\t\t//admin will reciev the email\n\t\t\t$to=$adminrecieveemail;\n\t\t}\n\t\t//if reviever email is valid then\n\t\tif(filter_var($to,FILTER_VALIDATE_EMAIL)){\n\t\t\t//get the boddy text and data from admin \n\t\t\tif($mailtype!=14 && $mailtype!=16){\n\t\t\t\t$emaildata = $this->getemailbodytext($mailtype);\n\t\t\t\t$bodymessage=isset($emaildata['body_txt'])?$emaildata['body_txt']:'';\n\t\t\t}\n\t\t\t//mail type\n\t\t\t$subjects=\"We thanksfull to you being with us\";\n\t\t\t$templatenameview=\"default\";\n\t\t\tswitch($mailtype){\n\t\t\t\tcase 1:\n\t\t\t\t\t//regiatration\n\t\t\t\t\t$subjects=\"You are registered successfully\";\n\t\t\t\t\t$templatenameview=\"registration\";\n\t\t\t\t\t$data['signinlink']=FULL_BASE_URL.$this->base.\"/Patients/account\";\n\t\t\t\t\t//$bodymessage=\"\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\t//patient appoinment confirm\n\t\t\t\t\t$subjects=\"Your appointment schedule confirm for consultant\";\n\t\t\t\t\t$templatenameview=\"appointment\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\t//opinion give\n\t\t\t\t\t$subjects=\"Your doctor give the opinion about your case\";\n\t\t\t\t\t$templatenameview=\"caseopinion\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\t//doctor allow to modify\n\t\t\t\t\t$subjects=\"Your doctor allow you to edit your questionnair\";\n\t\t\t\t\t$templatenameview=\"doctalloweditquestionnair\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\t//patient give reply to the doctor message\n\t\t\t\t\t//$subjects=\"Your patient give reply to you\";\n\t\t\t\t\t$subjects=\"You have received a communication from a patient\";\n\t\t\t\t\t//$templatenameview=\"patientreply\";\n\t\t\t\t\t$templatenameview=\"doctpatientcommuniction\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\t//patient re update the questionnair\n\t\t\t\t\t$subjects=\"Your patient update questionnair details\";\n\t\t\t\t\t$templatenameview=\"patientquestionnairupdate\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\t//paypal account not set so noify the admin about that\n\t\t\t\t\t$subjects=\"Paypal marchant account dose not set.\";\n\t\t\t\t\t$templatenameview=\"paypalnotset\";\n\t\t\t\tcase 8:\n\t\t\t\t\t$subjects=\"Someone try to contact with you\";\n\t\t\t\t\t$templatenameview=\"contactus\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 9: //password recovery\n\t\t\t\t\t$subjects=\"EDC password recovery\";\n\t\t\t\t\t$templatenameview=\"forgotpassword\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 10: //new case assing\n\t\t\t\t\t$subjects=\"You have been assigned with a case , with due date\";\n\t\t\t\t\t$templatenameview=\"caseassign\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 11: //due alert\n\t\t\t\t\t$subjects=\"You are due to submit an opinion within 2 days\";\n\t\t\t\t\t$templatenameview=\"opiniondue\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 12: //After opinion submission\n\t\t\t\t\t$subjects=\"Thank you for submitting your opinion.\";\n\t\t\t\t\t$templatenameview=\"thanks\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 13: //Past Due opinion\n\t\t\t\t\t$subjects=\"You missed to gave an opinion\";\n\t\t\t\t\t$templatenameview=\"opinionmissed\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 14://bulk mail from admin section\n\t\t\t\t\t$subjects=$data['email_sub'];\n\t\t\t\t\t$templatenameview=\"bulkmail\";\n\t\t\t\t\t$bodymessage=$data['email_body'];\n\t\t\t\tcase 15:\n\t\t\t\t\t//doctor send communication \n\t\t\t\t\t$subjects=\"You have received a communication from your doctor\";\n\t\t\t\t\t$templatenameview=\"doctpatientcommuniction\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 16: // opinion 2 day pre alert for admin\n\t\t\t\t\t$subjects=\"Doctor need to submit an opinion within 2 days\";\n\t\t\t\t\t$templatenameview=\"opiniondue\";\n\t\t\t\t\t$bodymessage=isset($data['doct_name'])?$data['doct_name']:'Doctor';\n\t\t\t\t\t$bodymessage.=\" need to be post an opinion.\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 17: // opinion missed alert for admin\n\t\t\t\t\t$subjects=\"Doctor missed to gave an opinion\";\n\t\t\t\t\t$templatenameview=\"opinionmissed\";\n\t\t\t\t\t$bodymessage=isset($data['doct_name'])?$data['doct_name']:'Doctor';\n\t\t\t\t\t$bodymessage.=\" missed to post an opinion.\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//now set the body message\n\t\t\t$data['bodymessage']=$bodymessage;\n\t\t\t$Email->from($from);\n\t\t\t$Email->to($to);\n\t\t\t//hear need to keep the admin as bcc\n\t\t\t$Email->bcc($adminrecieveemail);\n\t\t\t$Email->subject($subjects);\n\t\t\t$Email->template($templatenameview,'emain');\n\t\t\t$Email->emailFormat('html');\n\t\t\t$Email->viewVars($data);\n\t\t\t$Email->send();\n\t\t}\n\t}", "title": "" }, { "docid": "3213b6681acb53560f3c6f7b6152f351", "score": "0.55876803", "text": "static function sendMail($email,$data=array(),$template,$subject){\n\t\treturn Mail::send($template, $data, function($m) use($data,$email,$subject){\n $m->to($email)\n ->subject($subject);\n });\n\t}", "title": "" }, { "docid": "fe66c3608696e45e2a0832e25caabe49", "score": "0.55803585", "text": "public function send(MailParameters $mailParameters): void;", "title": "" }, { "docid": "3239ffbcf33e36180d35ab00380cd45e", "score": "0.5569192", "text": "public function SendEmail($params) {\n\t\ttry {\n\t\t\t$sent_mail_to= $params['to'];\n\t\t\t$avatar = public_path().\"/assets/pages/img/Fynches_Logo_Teal.png\"; \n\t\t\t$facebooklogo = public_path().\"/assets/pages/img/facebook-logo.png\"; \n\t\t\t$twitterlogo = public_path().\"/assets/pages/img/twitter-logo.png\"; \n\t\t\t$instagramlogo = public_path().\"/assets/pages/img/instagram-logo.png\";\n\t\t\t\n\t\t\t$email_template = EmailTemplates::where('slug', '=','beta-signup' )->first();\n\t\t\t\n\t\t\t$search = array(\"[EMAIL]\");\n\t $replace = array($sent_mail_to);\n\t\t\t\t\n\t\t\t$message = str_replace($search, $replace, $email_template[\"content\"]);\n\n\t\t\t//$message=\"Thanks for signing up. We’ll keep you up to date on the latest and greatest with Fynches.\";\n\t\t\t\n\t\t\t$mail_data = array('content' => $message, 'toEmail' => $params[\"to\"], 'subject' => $params[\"subject\"], 'from' => \"[email protected]\",\n\t\t\t\t\t'avatar'=>$avatar,'facebooklogo'=>$facebooklogo,'twitterlogo'=>$twitterlogo,'instagramlogo'=>$instagramlogo);\n\n\n\t\t\t$sent = Mail::send('emails.mail-template', $mail_data, function($message) use ($mail_data) {\n\t\t\t\t\t\t$message->from($mail_data['from'], 'Fynches');\n\t\t\t\t\t\t$message->to($mail_data['toEmail']);\n\t\t\t\t\t\t$message->subject($mail_data['subject']);\n\t\t\t\t\t});\n\t\t\n\t\t\n\t\t\tif ($sent == true) {\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\techo 'Message: ' .$e->getMessage();\n\t\t}\n\t\t\n }", "title": "" }, { "docid": "224c4f8818e7512638585c95a31129c3", "score": "0.5566969", "text": "public static function sendAttachment\n\t(\n\t\t$emailTo\t\t\t// <mixed> The email(s) you're sending a message to.\n\t,\t$subject\t\t\t// <str> The subject of the message.\n\t,\t$message\t\t\t// <str> The content of your message.\n\t,\t$filePath\t\t\t// <str> The file path to the attachment you're sending.\n\t,\t$filename\t\t\t// <str> The name of the file as you'd like it to appear.\n\t,\t$emailFrom = \"\"\t\t// <str> An email that you would like to send from.\n\t)\t\t\t\t\t\t// RETURNS <bool> TRUE on success, FALSE on failure.\n\t\n\t// Email::sendAttachment(\"[email protected]\", \"Hi!\", \"Sup!?\", \"./assets/file.csv\", \"excelPage.csv\"])\n\t// May use: $_FILES[\"file\"][\"tmp_name\"] and $_FILES[\"file\"][\"name\"]\n\t{\n\t\tglobal $config;\n\t\t\n\t\t// Determine the Email being sent from\n\t\tif($emailFrom == \"\" && isset($config['admin-email']))\n\t\t{\n\t\t\t$emailFrom = $config['admin-email'];\n\t\t}\n\t\t\n\t\t// Handle Email Recipients\n\t\tif(is_array($emailTo))\n\t\t{\n\t\t\tforeach($emailTo as $next)\n\t\t\t{\n\t\t\t\tif(!self::valid($next))\n\t\t\t\t{\n\t\t\t\t\tAlert::error(\"Email\", \"Illegal email used, cannot send email.\", 3);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$emailTo = implode(\", \", $emailTo);\n\t\t}\n\t\telse if(!self::valid($emailTo))\n\t\t{\n\t\t\tAlert::error(\"Email\", \"Illegal email used, cannot send email.\", 3);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// $filePath should include path and filename\n\t\t$filename = basename($filename);\n\t\t$file_size = filesize($filePath);\n\t\t\n\t\t$content = chunk_split(base64_encode(file_get_contents($filePath))); \n\t\t\n\t\t$uid = md5(uniqid(time()));\n\t\t\n\t\t// Designed to prevent email injection, although we should run stricter validation if we're going to allow\n\t\t// other people to insert emails into the email.\n\t\t$emailFrom = str_replace(array(\"\\r\", \"\\n\"), '', $emailFrom);\n\t\t\n\t\t// Prepare header\n\t\t$header = \"From: \".$emailFrom.\"\\r\\n\"\n\t\t\t.\"MIME-Version: 1.0\\r\\n\"\n\t\t\t.\"Content-Type: multipart/mixed; boundary=\\\"\".$uid.\"\\\"\\r\\n\\r\\n\"\n\t\t\t.\"This is a multi-part message in MIME format.\\r\\n\" \n\t\t\t.\"--\".$uid.\"\\r\\n\"\n\t\t\t.\"Content-type:text/plain; charset=iso-8859-1\\r\\n\"\n\t\t\t.\"Content-Transfer-Encoding: 7bit\\r\\n\\r\\n\"\n\t\t\t.$message.\"\\r\\n\\r\\n\"\n\t\t\t.\"--\".$uid.\"\\r\\n\"\n\t\t\t.\"Content-Type: application/octet-stream; name=\\\"\".$filename.\"\\\"\\r\\n\"\n\t\t\t.\"Content-Transfer-Encoding: base64\\r\\n\"\n\t\t\t.\"Content-Disposition: attachment; filename=\\\"\".$filename.\"\\\"\\r\\n\\r\\n\"\n\t\t\t.$content.\"\\r\\n\\r\\n\"\n\t\t\t.\"--\".$uid.\"--\";\n\t\t\n\t\t// Record this email in the database\n\t\t$primeRecipient = is_array($emailTo) ? $emailTo[0] : $emailTo;\n\t\t\n\t\t$details = array(\n\t\t\t\"recipients\"\t=> $emailTo\n\t\t,\t\"sender\"\t\t=> $emailFrom\n\t\t,\t\"file\"\t\t\t=> $filename\n\t\t);\n\t\t\n\t\tDatabase::query(\"INSERT INTO log_email (recipient, subject, message, details, date_sent) VALUES (?, ?, ?, ?, ?)\", array($primeRecipient, $subject, $message, Serialize::encode($details), time()));\n\t\t\n\t\t// Localhost Versions, just edit email.html with the message\n\t\tif(ENVIRONMENT == \"local\")\n\t\t{\n\t\t\treturn File::write(APP_PATH . \"/email.html\", \"To: \" . $emailTo . \"\nFrom: \" . $emailFrom . \"\nSubject: \" . $subject . \"\nAttachment: \" . $filename . \"\n\n\" . $message);\n\t\t}\n\t\t\n\t\t// Send the email\n\t\tif(!mail($emailTo, $subject, \"\", $header))\n\t\t{\n\t\t\tAlert::error(\"Email\", \"Email was not sent properly.\", 4);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "3a026d6a60d1d4696f4b8746358abcc2", "score": "0.5564439", "text": "public static function SendMail($recipents,$subject,$body,$fromEmail = null,$config = null)\n {\n\n $to = array() ; $cc =array() ; $bcc = array() ;\n\n foreach($recipents as $key => $value)\n {\n\n switch($key)\n {\n case \"to\" :\n if(gettype($value) == \"string\")\n {\n\n $to[] = $value;\n\n }\n else\n {\n foreach($value as $val)\n {\n if(gettype($val) == \"string\")\n {\n $to[] = $val;\n }\n }\n }\n\n break;\n\n case \"cc\" :\n if(gettype($value) == \"string\")\n {\n $cc[] = $value;\n }\n else\n {\n foreach($value as $val)\n {\n if(gettype($val) == \"string\")\n {\n $cc[] = $val;\n }\n }\n }\n\n break;\n\n case \"bcc\" :\n if(gettype($value) == \"string\")\n {\n $bcc[] = $value;\n }\n else\n {\n foreach($value as $val)\n {\n if(gettype($val) == \"string\")\n {\n $bcc[] = $val;\n }\n }\n }\n\n break;\n default:\n if(gettype($value) == 'string')\n {\n $to[] = $value;\n }\n\n }\n\n }\n if($config == null)\n {\n $config = array('auth' => 'login',\n //'server' => '192.178.1.2',\n 'username' => '[email protected]',\n 'password' => 'amritsar@123',\n 'ssl' => 'ssl',\n 'port' => '465'\n );\n\n }\n\n\n //$transport = new Zend_Mail_Transport_Smtp('smtp.gmail.com',$config);\n\n $mail = new Zend_Mail();\n $mail->setBodyHtml($body);\n $mail->setBodyText(strip_tags($body));\n\n// $mail = new Zend_Mail();\n// $mail->setBodyText(\"Dear \".$params['first_name'].\",\\n\\nYour new account has been created on \".$this->view->SiteName.\" your login credentials are given below.\\nUsername: \".$params['email'].\"\\nPassword: \".$params['password'].\"\\nTo activate your account click on the link given below\\n\".HTTP_PATH.\"index/confirm/refId/\".base64_encode($registerUser).\"\\n\\nThank You \\n\".$this->view->SiteName.\" \");\n// $mail->setFrom($this->view->SiteName, $this->view->EmailFrom);\n// $mail->addTo($params['email'], $params['first_name']);\n// $mail->setSubject('Account detail on '.$this->view->SiteName.' ');\n// $mail->send();\n\n $email_data = Signupmaxaccount::getemailmaxaccounts();\n $emailFrom = $email_data[0]['emailperlocale'];\n if(count($to) > 0)\n {\n foreach($to as $email)\n {\n $mail->addTo($email);\n }\n foreach($cc as $email)\n {\n $mail->addCc($email);\n }\n foreach($bcc as $email)\n {\n $mail->addBcc($email);\n }\n\n\n $mail->setFrom($emailFrom);\n $mail->setSubject($subject);\n $mail->send();\n }\n\n }", "title": "" }, { "docid": "cc3ae06081c078ef8e3c830eaffca19e", "score": "0.55618083", "text": "function sendInvites() {\n echo \"<html><head><title>Mailing centre</title></head><body>\";\n if (!isset($_POST['postData']) ) {\n echo '<form action=\"\" method=\"post\" name=\"frmMailer\" id=\"frmMailer\">\n <input type=\"hidden\" name=\"postData\" id=\"postData\" value=\"\" /><br />\n <label for=\"filterBy\">Filter:</label> <input type=\"text\" name=\"filterBy\" id=\"filterBy\" size=\"80\" value=\"\" /><br />\n <label for=\"emailText\">Email text:</label> <textarea name=\"emailText\" cols=\"60\" rows=\"3\" id=\"emailText\"></textarea><br />\n <label for=\"prependText\">Prepend text:</label> <input type=\"checkbox\" name=\"prependText\" value=\"prependText\" id=\"prependText\" /><br /> \n <label for=\"reallySend\">Really send:</label> <input type=\"checkbox\" name=\"reallySend\" value=\"reallySend\" id=\"reallySend\" /><br /> \n <input name=\"fireOff\" type=\"submit\" value=\"SUBMIT\" id=\"fireOff\" /></form>'; \n } else {\n $arrTos=array();\n $arrInviteIDs=array();\n $arrNames=array();\n //$strMessage = \"It's that time of the year again. Spring's around the corner and so is the Austin Spring Tango Festival. \n // More importantly, the early bird deadline is 4 days away! This year we are trying (hope it works) to save you 2010 participants some typing - \n // if you click on the link at the bottom of this e-mail it should take you to your special registration form - please fill in the missing details \n // (we missed the address, city, state last time), and you'll be on your way. And if the link lost it's clicky-ness on the way to your mailbox, \n // you might have to cut and paste the entire thing on to your browser's address bar ... see you March 25th!\"; \n $strMessage = \"Take advantage of the Early bird Registration (up until March 1st)!\n Mario Consiglieri y Anabella Diaz-Hojman, Florencia Taccetti y Evan Griffiths, Claudia Codega y Esteban Moreno \n will be with us at the Austin Spring Tango Festival 2012. We are very lucky to have them, you can be lucky too!!\n You have previously attended this festival, so we have a special link just for you to save some typing; click the link below and reach the registration page\" ;\n $strLink1 = '<br/><a href=\"http://austinspringtango.com/register.php?id=';\n $strLink2 = '\">http://austinspringtango.com/register.php?id=';\n $strLink3 = '</a>';\n $strHeaders = \"MIME-Version: 1.0\\r\\n\";\n $strHeaders .= \"Content-type: text/html; charset=iso-8850-1\\r\\n\";\n $strHeaders .='From: [email protected]' . \"\\r\\n\";\n $strHeaders .='Reply-To: [email protected]' . \"\\r\\n\";\n //$strHeaders .='X-Mailer: PHP/'.phpversion();\n if ( strlen(trim($_POST['emailText'])) > 0 ) {\n if ( isset($_POST['prependText']) ) {\n $strMessage = $_POST['emailText'].\"\\n<br/><br/>\".$strMessage;\n } else {\n $strMessage = $_POST['emailText'];\n }\n }\n $strFilterSql = \"\";\n if ( strlen(trim($_POST['filterBy'])) > 0 ) {\n $varPos = strpos($_POST['filterBy'], \"AND \") ;\n if ( $varPos === false ) {\n $strFilterSql = \" AND \".$_POST['filterBy'];\n } else {\n if ($varPos == 0) {\n $strFilterSql = \" \".$_POST['filterBy'];\n }\n }\n }\n $objDatabase = new ASTFdatabase();\n // the e-mail query results\n $objDatabase->getEmailInvites( $arrTos,$arrNames,$arrInviteIDs, $strFilterSql);\n echo $strHeaders.\"<br/><br/>\".$strMessage.\"<br/><table rules=\\\"cols\\\">\";\n for ($i=0; $i < count($arrTos); $i++) {\n //for ($i=199; $i < count($arrTos); $i++) {\n echo \"<tr bgcolor=\\\"#CCCCCC\\\"><td>{$i}</td><td>{$arrTos[$i]}</td><td>{$arrNames[$i]}</td><td>{$strLink1}{$arrInviteIDs[$i]}{$strLink2}{$arrInviteIDs[$i]}{$strLink3}</td><td>\";\n $strMessage1 = \"Hello \".$arrNames[$i].\",<br/>\".$strMessage.$strLink1.$arrInviteIDs[$i].$strLink2.$arrInviteIDs[$i].$strLink3.\"\\n\\n\";\n if (isset($_POST['reallySend']) ) {\n echo mail($arrTos[$i],'Austin Spring Tango 2012',$strMessage1,$strHeaders,\"[email protected]\");\n sleep(1);\n }\n echo \"</td></tr>\";\n }\n echo \"<tr><td colspan=\\\"4\\\">$i total</td></tr></table>\";\n } // end of else block for check isset postdata \n echo \"</body></html>\";\n }", "title": "" }, { "docid": "fb3caac8a26237bb14bafd9ec85bf50f", "score": "0.55539024", "text": "public function createMailWithAttachment(string $sender, array $to, string $subject, string $body,array $files): Swift_Message\n {\n }", "title": "" }, { "docid": "8af717480f081a985aff6318decad6cd", "score": "0.5550824", "text": "function sendEmailNotification($page, $action, $senderId, $reciverId, $notification_subject, $notification_message) {\n $str = $_SERVER['HTTP_HOST'];\n $sender = getUserData($senderId);\n $reciver = getUserData($reciverId);\n $to = $reciver['email'];\n\n /*$subject = \"Action Notification | Generic Platform\";\n $message = \"<html><head><title>Notification</title></head><body>\";\n $message .= \"Hi \".$reciver['name'].\",<br/>\";\n $message .= \"An Action '\".$action.\"' has occured at '\".$page.\"' page\";\n\n if ($senderId != $reciverId) {\n $message .=\" by \".$sender['name'].\".\";\n }\n $message .= \"<br/>\";\n $message .= \"<br/><br/>Regards,<br>Generic Platform\";\n $message .= \"</body></html>\";*/\n\n if ($senderId != $reciverId) {\n $message .=\" by \".$sender['name'].\".\";\n $notification_message = str_replace(\"sender_name\", $sender['name'].'.', $notification_message);\n } else {\n $notification_message = str_replace(' by sender_name', '', $notification_message);\n }\n\n $notification_message = str_replace(\"user_name\", $reciver['name'], $notification_message);\n $notification_message = str_replace(\"action_name\", \"'\".$action.\"'\", $notification_message);\n $notification_message = str_replace(\"page_name\", \"'\".$page.\"'\", $notification_message);\n\n $subject = $notification_subject;\n $message = $notification_message;\n\n // Always set content-type when sending HTML email\n $headers = \"MIME-Version: 1.0\" . \"\\r\\n\";\n $headers .= \"Content-type:text/html;charset=UTF-8\" . \"\\r\\n\";\n // More headers\n //$headers .= 'From: Generic Platform<[email protected]>' . \"\\r\\n\";\n //Code Change for Task 8.4.104 Start\n $headers .= 'From: Generic Platform<noreply@'.$str.'>' . \"\\r\\n\";\n //Code Change for Task 8.4.104 End\n try {\n $sent = mail($to, $subject, $message, $headers);\n if ($sent) {\n return true;\n }\n return \"Unable to send email\";\n } catch (Exception $e) {\n return $e->getMessage();\n }\n}", "title": "" }, { "docid": "eb6d43f6ef7f527e92e7c9509a3622ff", "score": "0.55429775", "text": "function Email($sFromEmail = \"\", $sFromName = \"\") {\n global $default;\n // create a new phpmailer object.\n require_once(KT_DIR . '/thirdparty/phpmailer/class.phpmailer.php');\n $this->oMailer = new phpmailer();\n\t$this->oMailer->Encoding = 'base64';\n\t$this->oMailer->CharSet = 'utf-8';\n $this->oMailer->isSMTP();\n $this->oMailer->Host = $default->emailServer;\n $this->oMailer->From = (strlen($sFromEmail) == 0) ? $default->emailFrom : $sFromEmail;\n $this->oMailer->FromName = (strlen($sFromName) == 0) ? $default->emailFromName : $sFromName;\n $this->oMailer->WordWrap = 100;\n $this->oMailer->IsHTML(true);\n $this->oMailer->SetLanguage('en', KT_DIR . '/thirdparty/phpmailer/language/');\n $this->bEmailDisabled = false;\n \n\t$oConfig =& KTConfig::getSingleton(); \n\t$sEmailServer = $oConfig->get('email/emailServer');\n\tif ($sEmailServer == 'none') {\n $this->bEmailDisabled = true;\n }\n if (empty($sEmailServer)) {\n $this->bEmailDisabled = true;\n }\n\n\t$sEmailPort = $oConfig->get('email/emailPort');\n\tif(!empty($sEmailPort)) {\n\t $this->oMailer->Port = (int) $sEmailPort;\n\t}\n\n\t$bEmailAuth = $oConfig->get('email/emailAuthentication');\n\tif($bEmailAuth) {\n\t $sEmailUser = $oConfig->get('email/emailUsername');\n\t $sEmailPass = $oConfig->get('email/emailPassword');\n\t $this->oMailer->SMTPAuth = true;\n\t $this->oMailer->Username = $sEmailUser;\n\t $this->oMailer->Password = $sEmailPass;\n\t}\n }", "title": "" }, { "docid": "2cae7ae6a9bfe3728def99b09bb9da57", "score": "0.5540428", "text": "function sendHTMLMail($HTMLContent, $PLAINContent, $recipient, $dummy, $fromEmail, $fromName, $replyTo = '', $fileAttachment = '') {\n\t\t// HTML\n\t\tif (trim($recipient)) {\n\t\t\t$parts = spliti('<title>|</title>', $HTMLContent, 3);\n\t\t\t$subject = trim($parts[1]) ? strip_tags(trim($parts[1])) :\n\t\t\t'Front end user registration message';\n\t\t\t \n\t\t\t$Typo3_htmlmail = t3lib_div::makeInstance('tx_srfeuserregister_pi1_t3lib_htmlmail');\n\t\t\t$Typo3_htmlmail->charset = 'iso-8859-1';\n\t\t\t$Typo3_htmlmail->start();\n\t\t\t$Typo3_htmlmail->messageid = md5(microtime());\n\t\t\t$Typo3_htmlmail->mailer = 'Typo3 HTMLMail';\t\t \n\t\t\t$Typo3_htmlmail->subject = $Typo3_htmlmail->convertName($subject);\n\t\t\t$Typo3_htmlmail->from_email = $fromEmail;\n\t\t\t$Typo3_htmlmail->from_name = $fromName;\n\t\t\t$Typo3_htmlmail->from_name = implode(' ' , t3lib_div::trimExplode(',', $Typo3_htmlmail->from_name));\n\t\t\t$Typo3_htmlmail->replyto_email = $replyTo ? $replyTo :$fromEmail;\n\t\t\t$Typo3_htmlmail->replyto_name = $replyTo ? '' : $fromName;\n\t\t\t$Typo3_htmlmail->replyto_name = implode(' ' , t3lib_div::trimExplode(',', $Typo3_htmlmail->replyto_name));\n\t\t\t$Typo3_htmlmail->organisation = '';\n\t\t\t$Typo3_htmlmail->priority = 3;\n\t\t\t \n\t\t\t// ATTACHMENT\n\t\t\tif ($fileAttachment && file_exists($fileAttachment)) {\n\t\t\t\t$Typo3_htmlmail->addAttachment($fileAttachment);\n\t\t\t}\n\t\t\t \n\t\t\t// HTML\n\t\t\tif (trim($HTMLContent)) {\n\t\t\t\t$Typo3_htmlmail->theParts['html']['content'] = $HTMLContent;\n\t\t\t\t$Typo3_htmlmail->theParts['html']['path'] = '';\n\t\t\t\t// MLC don't include media in HTML emails\n\t\t\t\t// $Typo3_htmlmail->extractMediaLinks();\n\t\t\t\t// $Typo3_htmlmail->extractHyperLinks();\n\t\t\t\t// $Typo3_htmlmail->fetchHTMLMedia();\n\t\t\t\t$Typo3_htmlmail->substMediaNamesInHTML(0); // 0 = relative\n\t\t\t\t$Typo3_htmlmail->substHREFsInHTML();\n\t\t\t\t \n\t\t\t\t$Typo3_htmlmail->setHTML($Typo3_htmlmail->encodeMsg($Typo3_htmlmail->theParts['html']['content']));\n\t\t\t}\n\t\t\t \n\t\t\t// PLAIN\n\t\t\t$Typo3_htmlmail->addPlain($PLAINContent);\n\t\t\t \n\t\t\t// SET Headers and Content\n\t\t\t$Typo3_htmlmail->setHeaders();\n\t\t\t$Typo3_htmlmail->setContent();\n\t\t\t$Typo3_htmlmail->setRecipient($recipient);\n\t\t\t$Typo3_htmlmail->sendTheMail();\n\t\t}\n\t}", "title": "" }, { "docid": "4456e05f5c084f28bb7026a0a698b22c", "score": "0.5528039", "text": "function send_mail_phpmailer($email,$subject,$message=\"\",$from=\"\",$reply_to=\"\",$html_template=\"\",$templatevars=null,$from_name=\"\",$cc=\"\",$bcc=\"\")\n {\n # Mail templates can include lang, server, site_text, and POST variables by default\n # ex ( [lang_mycollections], [server_REMOTE_ADDR], [text_footer] , [message]\n \n # additional values must be made available through $templatevars\n # For example, a complex url or image path that may be sent in an \n # email should be added to the templatevars array and passed into send_mail.\n # available templatevars need to be well-documented, and sample templates\n # need to be available.\n\n # Include footer\n global $email_footer, $storagedir, $mime_type_by_extension;\n include_once(__DIR__ . '/../lib/PHPMailer/PHPMailer.php');\n include_once(__DIR__ . '/../lib/PHPMailer/Exception.php');\n include_once(__DIR__ . '/../lib/PHPMailer/SMTP.php');\n \n global $email_from;\n $from_system = false;\n if ($from==\"\")\n {\n $from=$email_from;\n $from_system=true;\n }\n if ($reply_to==\"\") {$reply_to=$email_from;}\n global $applicationname;\n if ($from_name==\"\"){$from_name=$applicationname;}\n \n #check for html template. If exists, attempt to include vars into message\n if ($html_template!=\"\")\n {\n # Attempt to verify users by email, which allows us to get the email template by lang and usergroup\n $to_usergroup=sql_query(\"select lang,usergroup from user where email ='\" . escape_check($email) . \"'\",\"\");\n \n if (count($to_usergroup)!=0)\n {\n $to_usergroupref=$to_usergroup[0]['usergroup'];\n $to_usergrouplang=$to_usergroup[0]['lang'];\n }\n else \n {\n $to_usergrouplang=\"\"; \n }\n \n if ($to_usergrouplang==\"\"){global $defaultlanguage; $to_usergrouplang=$defaultlanguage;}\n \n if (isset($to_usergroupref))\n { \n $modified_to_usergroupref=hook(\"modifytousergroup\",\"\",$to_usergroupref);\n if (is_int($modified_to_usergroupref)){$to_usergroupref=$modified_to_usergroupref;}\n $results=sql_query(\"select language,name,text from site_text where page='all' and name='$html_template' and specific_to_group='$to_usergroupref'\");\n }\n else \n { \n $results=sql_query(\"select language,name,text from site_text where page='all' and name='$html_template' and specific_to_group is null\");\n }\n \n global $site_text;\n for ($n=0;$n<count($results);$n++) {$site_text[$results[$n][\"language\"] . \"-\" . $results[$n][\"name\"]]=$results[$n][\"text\"];} \n \n $language=$to_usergrouplang;\n \n if (array_key_exists($language . \"-\" . $html_template,$site_text)) \n {\n $template=$site_text[$language . \"-\" .$html_template];\n } \n else \n {\n global $languages;\n\n # Can't find the language key? Look for it in other languages.\n reset($languages);\n foreach ($languages as $key=>$value)\n {\n if (array_key_exists($key . \"-\" . $html_template,$site_text)) {$template = $site_text[$key . \"-\" . $html_template];break;} \n }\n // Fall back to language file if not in site text\n global $lang;\n if(!isset($template))\n {\n if(isset($lang[\"all__\" . $html_template])){$template=$lang[\"all__\" . $html_template];}\n elseif(isset($lang[$html_template])){$template=$lang[$html_template];}\n }\n } \n\n\n if (isset($template) && $template!=\"\")\n {\n preg_match_all('/\\[[^\\]]*\\]/',$template,$test);\n foreach($test[0] as $variable)\n {\n \n $variable=str_replace(\"[\",\"\",$variable);\n $variable=str_replace(\"]\",\"\",$variable);\n \n \n # get lang variables (ex. [lang_mycollections])\n if (substr($variable,0,5)==\"lang_\"){\n global $lang;\n $$variable=$lang[substr($variable,5)];\n }\n \n # get server variables (ex. [server_REMOTE_ADDR] for a user request)\n else if (substr($variable,0,7)==\"server_\"){\n $$variable=$_SERVER[substr($variable,7)];\n }\n \n # [embed_thumbnail] (requires url in templatevars['thumbnail'])\n else if (substr($variable,0,15)==\"embed_thumbnail\"){\n $thumbcid=uniqid('thumb');\n $$variable=\"<img style='border:1px solid #d1d1d1;' src='cid:$thumbcid' />\";\n }\n \n # deprecated by improved [img_] tag below\n # embed images (find them in relation to storagedir so that templates are portable)... (ex [img_storagedir_/../gfx/whitegry/titles/title.gif])\n else if (substr($variable,0,15)==\"img_storagedir_\"){\n $$variable=\"<img src='cid:\".basename(substr($variable,15)).\"'/>\";\n $images[]=dirname(__FILE__).substr($variable,15);\n }\n\n // embed images - ex [img_gfx/whitegry/titles/title.gif]\n else if('img_headerlogo' == substr($variable, 0, 14))\n {\n $img_url = get_header_image(true); \n $$variable = '<img src=\"' . $img_url . '\"/>';\n }\n else if('img_' == substr($variable, 0, 4))\n {\n $image_path = substr($variable, 4);\n\n // absolute paths\n if('/' == substr($image_path, 0, 1))\n {\n $images[] = $image_path;\n }\n // relative paths\n else\n {\n $image_path = str_replace('../', '', $image_path);\n $images[] = dirname(__FILE__) . '/../' . $image_path;\n }\n\n $$variable = '<img src=\"cid:' . basename($image_path) . '\"/>';\n }\n\n # attach files (ex [attach_/var/www/resourcespace/gfx/whitegry/titles/title.gif])\n else if (substr($variable,0,7)==\"attach_\"){\n $$variable=\"\";\n $attachments[]=substr($variable,7);\n }\n \n # get site text variables (ex. [text_footer], for example to \n # manage html snippets that you want available in all emails.)\n else if (substr($variable,0,5)==\"text_\"){\n $$variable=text(substr($variable,5));\n }\n\n # try to get the variable from POST\n else{\n $$variable=getval($variable,\"\");\n }\n \n # avoid resetting templatevars that may have been passed here\n if (!isset($templatevars[$variable])){$templatevars[$variable]=$$variable;}\n }\n\n if (isset($templatevars))\n {\n foreach($templatevars as $key=>$value)\n {\n $template=str_replace(\"[\" . $key . \"]\",nl2br($value),$template);\n }\n }\n $body=$template; \n } \n } \n\n if (!isset($body)){$body=$message;}\n\n global $use_smtp,$smtp_secure,$smtp_host,$smtp_port,$smtp_auth,$smtp_username,$smtp_password,$debug_log;\n $mail = new PHPMailer\\PHPMailer\\PHPMailer();\n // use an external SMTP server? (e.g. Gmail)\n if ($use_smtp) {\n $mail->IsSMTP(); // enable SMTP\n $mail->SMTPAuth = $smtp_auth; // authentication enabled/disabled\n $mail->SMTPSecure = $smtp_secure; // '', 'tls' or 'ssl'\n $mail->Host = $smtp_host; // hostname\n $mail->Port = $smtp_port; // port number\n $mail->Username = $smtp_username; // username\n $mail->Password = $smtp_password; // password\n }\n $reply_tos=explode(\",\",$reply_to);\n\n if (!$from_system)\n {\n // only one from address is possible, so only use the first one:\n if (strstr($reply_tos[0],\"<\"))\n {\n $rtparts=explode(\"<\",$reply_tos[0]);\n $mail->From = str_replace(\">\",\"\",$rtparts[1]);\n $mail->FromName = $rtparts[0];\n }\n else {\n $mail->From = $reply_tos[0];\n $mail->FromName = $from_name;\n }\n }\n else\n {\n $mail->From = $from;\n $mail->FromName = $from_name;\n }\n \n // if there are multiple addresses, that's what replyto handles.\n for ($n=0;$n<count($reply_tos);$n++){\n if (strstr($reply_tos[$n],\"<\")){\n $rtparts=explode(\"<\",$reply_tos[$n]);\n $mail->AddReplyto(str_replace(\">\",\"\",$rtparts[1]),$rtparts[0]);\n }\n else {\n $mail->AddReplyto($reply_tos[$n],$from_name);\n }\n }\n \n # modification to handle multiple comma delimited emails\n # such as for a multiple $email_notify\n $emails = $email;\n $emails = explode(',', $emails);\n $emails = array_map('trim', $emails);\n foreach ($emails as $email){\n if (strstr($email,\"<\")){\n $emparts=explode(\"<\",$email);\n $mail->AddAddress(str_replace(\">\",\"\",$emparts[1]),$emparts[0]);\n }\n else {\n $mail->AddAddress($email);\n }\n }\n \n if ($cc!=\"\"){\n # modification for multiple is also necessary here, though a broken cc seems to be simply removed by phpmailer rather than breaking it.\n $ccs = $cc;\n $ccs = explode(',', $ccs);\n $ccs = array_map('trim', $ccs);\n global $userfullname;\n foreach ($ccs as $cc){\n if (strstr($cc,\"<\")){\n $ccparts=explode(\"<\",$cc);\n $mail->AddCC(str_replace(\">\",\"\",$ccparts[1]),$ccparts[0]);\n }\n else{\n $mail->AddCC($cc,$userfullname);\n }\n }\n }\n if ($bcc!=\"\"){\n # modification for multiple is also necessary here, though a broken cc seems to be simply removed by phpmailer rather than breaking it.\n $bccs = $bcc;\n $bccs = explode(',', $bccs);\n $bccs = array_map('trim', $bccs);\n global $userfullname;\n foreach ($bccs as $bccemail){\n if (strstr($bccemail,\"<\")){\n $bccparts=explode(\"<\",$bccemail);\n $mail->AddBCC(str_replace(\">\",\"\",$bccparts[1]),$bccparts[0]);\n }\n else{\n $mail->AddBCC($bccemail,$userfullname);\n }\n }\n }\n \n \n $mail->CharSet = \"utf-8\"; \n \n if (is_html($body)) {$mail->IsHTML(true);} \n else {$mail->IsHTML(false);}\n \n $mail->Subject = $subject;\n $mail->Body = $body;\n \n if (isset($embed_thumbnail)&&isset($templatevars['thumbnail'])){\n $mail->AddEmbeddedImage($templatevars['thumbnail'],$thumbcid,$thumbcid,'base64','image/jpeg'); \n }\n\n if(isset($images))\n {\n foreach($images as $image)\n {\n $image_extension = pathinfo($image, PATHINFO_EXTENSION);\n\n // Set mime type based on the image extension\n if(array_key_exists($image_extension, $mime_type_by_extension))\n {\n $mime_type = $mime_type_by_extension[$image_extension];\n }\n\n $mail->AddEmbeddedImage($image, basename($image), basename($image), 'base64', $mime_type);\n }\n }\n\n if (isset($attachments)){\n foreach ($attachments as $attachment){\n $mail->AddAttachment($attachment,basename($attachment));}\n }\n\n if (is_html($body))\n {\n $mail->AltBody = $mail->html2text($body); \n }\n \n log_mail($email,$subject);\n\n try\n {\n $mail->Send();\n }\n catch (Exception $e)\n {\n echo \"Message could not be sent. <p>\";\n debug(\"PHPMailer Error: email: \" . $email . \" - \" . $e->errorMessage());\n exit;\n }\n catch (\\Exception $e)\n {\n echo \"Message could not be sent. <p>\";\n debug(\"PHPMailer Error: email: \" . $email . \" - \" . $e->errorMessage());\n exit;\n }\n hook(\"aftersendmailphpmailer\",\"\",$email); \n}", "title": "" }, { "docid": "16477c86f346c585922863d54bd449d8", "score": "0.5525502", "text": "function sendEmail($email) {\n}", "title": "" }, { "docid": "e92ae935fcf2ff8f9268227a6cef339d", "score": "0.5518165", "text": "public function send_mail($htmlemail, $toEMail, $subject, $message, $html, $fromEMail, $fromName, $confcheckSMTPService = 0, $attachment='') {\n\n\t\t$docheck=TRUE;\n\t\t$mailsewrverarr=explode(':', $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_server']);\n\t\tif (count($mailsewrverarr)==2) {\n\t\t\t$hostname=$mailsewrverarr[0];\n\t\t\t$port=$mailsewrverarr[1];\n\t\t} else if (count($mailsewrverarr) == 1) {\n\t\t\t$hostname=$mailsewrverarr[0];\n\t\t\t$port='25';\n\t\t} else {\n\t\t\t$docheck=FALSE;\n\t\t}\n\n\t\t$sendmailok=FALSE;\n\t\tif ($docheck) {\n\t\t\tif ($this->checkSMTPService($hostname, $port, $confcheckSMTPService)) {\n\t\t\t\t$sendmailok=TRUE;\n\t\t\t}\n\n\t\t} else {\n\t\t\t$sendmailok=TRUE;\n\t\t}\n\n\t\tif ($sendmailok) {\n\t\t\tif ($htmlemail == 1) {\n\t\t\t\t$mailtype = 'text/html';\n\t\t\t} else {\n\t\t\t\t$mailtype = 'text/plain';\n\t\t\t\t$message = $html;\n\t\t\t\t$html = '';\n\t\t\t}\n\n\t\t\tif (!is_array($toEMail)) {\n\t\t\t\t$emailArray = t3lib_div::trimExplode(',', $toEMail);\n\t\t\t\t$toEMail = array();\n\t\t\t\tforeach ($emailArray as $email) {\n\t\t\t\t\t$toEMail[] = $email;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t/** @var $mail t3lib_mail_Message */\n\t\t\t$mailMessage = t3lib_div::makeInstance('t3lib_mail_Message');\n\t\t\t$mailMessage->setTo($toEMail)\n\t\t\t->setFrom(array($fromEMail => $fromName))\n\t\t\t->setSubject($subject)\n\t\t\t->setBody($html, $mailtype, $_SESSION['TSFE']['renderCharset'])\n\t\t\t->addPart($message, 'text/plain', $_SESSION['TSFE']['renderCharset']);\n\t\t\tif (isset($attachment)) {\n\t\t\t\tif (is_array($attachment)) {\n\t\t\t\t\t$attachmentArray = $attachment;\n\t\t\t\t} else {\n\t\t\t\t\t$attachmentArray = array($attachment);\n\t\t\t\t}\n\n\t\t\t\tforeach ($attachmentArray as $theAttachment) {\n\t\t\t\t\tif (file_exists($theAttachment)) {\n\t\t\t\t\t\t$mailMessage->attach(Swift_Attachment::fromPath($theAttachment));\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ($bcc != '') {\n\t\t\t\t$mailMessage->addBcc($bcc);\n\t\t\t}\n\n\t\t\t$mailMessage->send();\n\t\t}\n\n\t\t// in other cases: just does not crash no more\n\t\t// could return 'Mailserver ' . $smtphost . ' is not active. email not sent';\n\n\t}", "title": "" }, { "docid": "443e2b3031f26dc4841f9be2f8901731", "score": "0.5509033", "text": "public static function send\n\t(\n\t\t$emailTo\t\t\t// <mixed> The email(s) you're sending a message to.\n\t,\t$subject\t\t\t// <str> The subject of the message.\n\t,\t$message\t\t\t// <str> The content of your message.\n\t,\t$emailFrom = \"\"\t\t// <str> An email that you would like to send from.\n\t,\t$headers = \"\"\t\t// <str> A set of headers in a single string (use cautiously).\n\t)\t\t\t\t\t\t// RETURNS <bool> TRUE on success, FALSE on failure.\n\t\n\t// Email::send(array(\"[email protected]\"), \"Greetings!\", \"This welcome message will make you feel welcome!\")\n\t{\n\t\tglobal $config;\n\t\t\n\t\t// Determine the Email being sent from\n\t\tif($emailFrom == \"\" && isset($config['admin-email']))\n\t\t{\n\t\t\t$emailFrom = $config['admin-email'];\n\t\t}\n\t\t\n\t\t// Handle Email Recipients\n\t\tif(is_array($emailTo))\n\t\t{\n\t\t\tforeach($emailTo as $next)\n\t\t\t{\n\t\t\t\tif(!self::valid($next))\n\t\t\t\t{\n\t\t\t\t\tAlert::error(\"Email\", \"Illegal email used, cannot send email.\", 3);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$emailTo = implode(\", \", $emailTo);\n\t\t}\n\t\telse if(!self::valid($emailTo))\n\t\t{\n\t\t\tAlert::error(\"Email\", \"Illegal email used, cannot send email.\", 3);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Handle the Email Headers\n\t\tif($headers == \"\")\n\t\t{\n\t\t\t$headers = 'From: ' . $emailFrom . \"\\r\\n\" .\n\t\t\t'Reply-To: ' . $emailFrom . \"\\r\\n\" .\n\t\t\t'X-Mailer: PHP/' . phpversion();\n\t\t}\n\t\t\n\t\t// Record this email in the database\n\t\t$primeRecipient = is_array($emailTo) ? $emailTo[0] : $emailTo;\n\t\t\n\t\t$details = array(\n\t\t\t\"recipients\"\t=> $emailTo\n\t\t,\t\"sender\"\t\t=> $emailFrom\n\t\t);\n\t\t\n\t\tDatabase::query(\"INSERT INTO log_email (recipient, subject, message, details, date_sent) VALUES (?, ?, ?, ?, ?)\", array($primeRecipient, $subject, $message, Serialize::encode($details), time()));\n\t\t\n\t\t// Localhost Versions, just edit email.html with the message\n\t\tif(ENVIRONMENT == \"local\")\n\t\t{\n\t\t\treturn File::write(APP_PATH . \"/email.html\", \"To: \" . $emailTo . \"\nFrom: \" . $emailFrom . \"\nSubject: \" . $subject . \"\n\n\" . $message);\n\t\t}\n\t\t\n\t\t// Send the Mail\n\t\tif(!mail($emailTo, $subject, $message, $headers))\n\t\t{\n\t\t\tAlert::error(\"Email\", \"Email was not sent properly\", 4);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "567f5d0fb732c0b9866e3b31d7bb7d80", "score": "0.5508149", "text": "function SendMail($toEmail,$toName,$message,$subject,$type=\"html\",$addBcc='Y')\n\t{\n\t\t//$getDetails = $this->GetResults($sqlSelect,\"OBJECT\");\n\t\t//$adminEmail = $getDetails[0]->fieldValue;\n\t\t//if(empty($adminEmail))\n\t\t//{\n\t\t\t$adminEmail = ADMIN_EMAIL;\n\t\t//}\n\t\t//echo \"adminEmail: $adminEmail <br />\";\n\t\t$mail = new PHPMailer();\n\t\t$mail->From = $adminEmail;\n\t\t$mail->FromName = MAIL_FROM;\n\t\t$mail->Host = SMTP_HOST;\n\t\t//$mail->Mailer = MAILER;\n\t\t$mail->Subject = $subject;\n\t\tif($type == \"html\")\n\t\t{\n\t\t\t$mail->IsHTML(true);\n\t\t\t$mail->Body = $message;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$mail->IsHTML(false);\n\t\t\t$formattedMessage = str_replace(\"&nbsp;\",\" \",$message);\n\t\t\t$formattedMessage = str_replace(\"<br>\",\"\\n\",$formattedMessage);\n\t\t\t$formattedMessage = str_replace(\"<br />\",\"\\n\",$formattedMessage);\n\t\t\t$formattedMessage = str_replace(\"<br/>\",\"\\n\",$formattedMessage);\n\t\t\t$formattedMessage = strip_tags($formattedMessage);\n\t\t\t$mail->Body = $formattedMessage;\n\t\t}\n\t\t//echo \"toEmail: $toEmail <br />\";\n\t\t//echo \"toName: $toName <br />\";\n\t\t$mail->AddAddress($toEmail, $toName);\n\t\t\n\n\t\tif($addBcc == \"Y\")\n\t\t{\n\t\t\t$mail->AddBCC($adminEmail,MAIL_FROM);\n\t\t}\n\t\tif($mail->Send())\n\t\t{\n\t\t\t$mail->ClearAddresses();\t\n\t\t\treturn $this->SetMessage(MAIL_SENT,1);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$mail->ClearAddresses();\t\n\t\t\treturn $this->SetMessage(MAIL_NOT_SENT,0);\n\t\t}\n\t\t//echo $mail->ErrorInfo;\n\t\t//exit;\n\t}", "title": "" }, { "docid": "11222272f5b4c038446313eb3b84e1dd", "score": "0.5507988", "text": "public function sendSmtpMail($emailContents) {\n \n \n //echopre($emailContents); \n \n \t\n \t$db = new Db();\n \t\n PageContext::includePath('phpmailer');\n \t$mail \t= new PHPMailer();\n \t \n $smtp_username \t= $db->selectRow(\"Settings\",\"value\",\"settingfield='smtp_username'\");\n $smtp_password \t= $db->selectRow(\"Settings\",\"value\",\"settingfield='smtp_password'\");\n $smtp_host \t= $db->selectRow(\"Settings\",\"value\",\"settingfield='smtp_host'\");\n $smtp_port \t= $db->selectRow(\"Settings\",\"value\",\"settingfield='smtp_port'\");\n $smtp_protocol \t= $db->selectRow(\"Settings\",\"value\",\"settingfield='smtp_protocol'\");\n \n // echopre($smtp_username);\n\t\t$mailBody \t\t\t= $emailContents['message'];\n\t\t\n\t\n \n $mail->IsSMTP();\n\t \t$mail->Host = $smtp_host; \t\t// SMTP server example\n\t\t\t$mail->SMTPDebug = 1; // enables SMTP debug information (for testing)\n\t\t\t$mail->SMTPAuth = true; \t\t// enable SMTP authentication\n\t\t\t$mail->Port = $smtp_port; // set the SMTP port for the GMAIL server\n\t\t\t$mail->Username = $smtp_username; \t// SMTP account username example\n\t\t\t$mail->Password = $smtp_password; // SMTP account password example\n\t\t\t$mail->SMTPSecure = $smtp_protocol;\n \n\t\t\n \n \n \n \n \n $mail->AddReplyTo($emailContents['from'],SITE_NAME);\n $mail->SetFrom($emailContents['from'],SITE_NAME);\n \n \n \t$mail->AddAddress($emailContents['to'], $emailContents['to']);\n $mail->Subject = $emailContents['subject'];\n $mail->AltBody = ''; // Optional, comment out and test.\n \t$mail->MsgHTML($mailBody);\n \t\n \n try {\n $mailsent = $mail->Send();\n }catch(Exception $e) {\n //echo 'Message: ' .$e->getMessage();\n} \n \n \n // echopre1($mailsent);\n return true;\n \t \n \t \n }", "title": "" }, { "docid": "6bb32bb729740400c8df4447be707da3", "score": "0.5506073", "text": "function LettersToSend ($projectID, $picturelist, $projectdir, $From, $FromName, $To, $ToName , $projectdirHIRES, $userID, $message = \"\") {\n\tglobal $PHOTOS;\n\tglobal $msg, $error;\n \tglobal $SYSTEMNAME, $FP_SYSTEM_EMAIL;\n\n\t$DEBUG = 0;\n\t$DEBUG && $msg .= __FUNCTION__.\"<BR>\";\n\t\n\t// Array of messages to send\n\t$letters = array ();\n\t\n\t$result = \"<HR width=\\\"150\\\" align=\\\"left\\\">\\n\\n<B>Email results:</B><BR>\\n<small>\";\n\t$project = GetRecord (PROJECTS_DB, $projectID);\n\t$subjectline = \"\";\n\t!empty ($project['Subject_line']) && ($subjectline = $project['Subject_line']);\n\n\t$k = 1;\t//file counter\n\tif ($picturelist) {\n\t\tsort ($picturelist);\n\t\t$DEBUG && $msg .= \"Picturelist: \".ArrayToTable ($picturelist);\n\t\t\n\t\tforeach ($picturelist as $picturename) {\n\t\t\t$Text = \"\";\n\t\t\t$picture = \"$projectdir/$picturename\";\n\n\t\t\t// If we're sending lores pictures, it's possible there's no picture\n\t\t\t// because the thumbnail wasn't created yet...perhaps user uploaded\n\t\t\t// with FTP.\n\t\t\tif (file_exists ($picture)) {\n\t\t\t\t$Subject = $subjectline;\n\t\t\t\t($Subject == \"\") && ($Subject = \"$subjectline ($picturename from $FromName)\");\n\t\t\t\t$Subject = str_replace(\"[name]\", $picturename, $Subject);\n\t\t\t\t$Subject = str_replace(\"[from]\", $FromName, $Subject);\n\t\t\t\t// don't try to send IPTC info about a contact sheet.\n\t\t\t\tif (preg_match (\"/CONTACT/\",$projectdirHIRES)) {\n\t\t\t\t\t$IPTC = \"\";\n\t\t\t\t\t$sheetname = str_replace (\".jpg\", \"\" , $picturename);\n\t\t\t\t\t$Text .= $sheetname;\n\t\t\t\t} else {\n\t\t\t\t\t$IPTC = FetchIPTCInfo (\"$projectdirHIRES/$picturename\");\n\t\t\t\t\t$Text .= \"\";\n\t\t\t\t\tforeach ($IPTC as $key => $value) {\n\t\t\t\t\t\t$value && $Text .= \"$key : $value\\n\";\n\t\t\t\t\t}\n\t\t\t\t\t$Text && $Text = \"IPTC PICTURE INFORMATION for $picturename:\\n\\n$Text\";\n\t\t\t\t\t$Text = \"Attached picture: $picturename\\n-----------------------------------\\n$Text\";\n\t\t\t\t}\n\t\t\t\t$Text = \"MESSAGE: $message\\n$Text\";\n\t\t\t\t$Html = \"\";\n\t\t\t\t// This adds only one file at a time.\n\t\t\t\t// I guess, we could do a loop to add multiple pictures. \n\t\t\t\t// Use constants in config (PPF_EMAIL_LORES_MAXPIX and PPF_EMAIL_HIRES_MAXPIX)\n\t\t\t\t// to do this...later.\n\t\t\t\t$AttmFiles = array ($picturename);\n\t\t\t\t\n\t\t\t\t$DEBUG && $msg .= \"IPTC: $Text<BR>\\n\";\n\t\t\t\t$DEBUG && $msg .= \"pretending to SendMail($From, $FromName, $To, $ToName, $From, $FromName, $Subject, ..., $Html, $AttmFiles) <BR>\\n\";\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//$DEBUG || SendMail($From, $FromName, $To, $ToName, $Subject, $Text, $Html, $AttmFiles);\n\t\t\t\t\n\t\t\t\t$letters[] = array (\n\t\t\t\t\t'email_from'\t\t\t=> $From,\n\t\t\t\t\t'email_from_name' \t=> $FromName,\n\t\t\t\t\t'email_to'\t\t\t=> $To,\n\t\t\t\t\t'email_to_name'\t\t=> $ToName,\n\t\t\t\t\t'email_subject'\t\t=> $Subject,\n\t\t\t\t\t'email_text'\t\t\t=> $Text,\n\t\t\t\t\t'email_html'\t\t\t=> $Html,\n\t\t\t\t\t'project_dir'\t\t=> $projectdir,\n\t\t\t\t\t'attm_files'\t\t\t=> $AttmFiles\n\t\t\t\t\t);\n\n\t\t\t\t$result .= \"$k) Sending <B>$picturename</B> to $ToName ($To)<BR>\\n\";\n\t\t\t} else {\n\t\t\t\t$result .= \"$k) * $picturename: <i>Thumbnail/Lores version of not yet created, so nothing was sent.</i><BR>\\n\";\n\t\t\t}\n\t\t$k++;\n\t\t}\n\t}\n\treturn $letters;\n}", "title": "" }, { "docid": "76c308b552737c86b7bcac0c84125cd8", "score": "0.54928416", "text": "function sendMail($to,$subject,$body, $from='', $local=0){\n $rtnarr = array();\n\t\n\tif($local == 0){\n\t\t$from = $from==''?$_CONFIG['adminmail']:$from;\n\n\t\t$mailstr = 'To:'.$to.'\\n';\n\t\t$mailstr .= 'Subject:'.$subject.'\\n';\n\t\t$mailstr .= 'Content-Type:text/html;charset=UTF-8\\n';\n\t\t$mailstr .= 'From:'.$from.'\\n';\n\t\t$mailstr .= '\\n';\n\t\t$mailstr .= $body.'\\n';\n\n\t\t$tmpfile = \"/tmp/\".GConf::get('agentalias').\".user.reg.mail.tmp\";\n\t\tsystem('/bin/echo -e \"'.$mailstr.'\" > '.$tmpfile); \n\t\tsystem('/bin/cat '.$tmpfile.' | /usr/sbin/sendmail -t &'); \n\n\t\t$rtnarr[0] = true;\n \n\t}\n\telse if($local == 1){\n global $_CONFIG;\n include($_CONFIG['appdir'].\"/mod/mailer.class.php\");\n\n $_CONFIG['mail_smtp_server'] = \"smtp.163.com\";\n $_CONFIG['mail_smtp_username'] = \"[email protected]\";\n $_CONFIG['mail_smtp_password'] = \"myminina.123456\";\n $_CONFIG['isauth'] = true;\n $_CONFIG['mail_smtp_fromuser'] = $_CONFIG['mail_smtp_username'];\n\n $mail = new Mailer($_CONFIG['mail_smtp_server'],25,$_CONFIG['isauth'],$_CONFIG['mail_smtp_username'],$_CONFIG['mail_smtp_password']);\n\n $mail->debug = true;;\n $from==''?'bangco@'.$_CONFIG['agentname']:$from;\n if($_CONFIG['isauth']){\n $from = $_CONFIG['mail_smtp_fromuser'];\n }\n\n #print __FILE__.\": from:$from\";\n \n $rtnarr[0] = $mail->sendMail($to, $from, $subject, $body, 'HTML');\n\n } \n\n return $rtnarr;\n}", "title": "" }, { "docid": "c27cc9043b5faefd33235286ebb8c5a7", "score": "0.5491035", "text": "function mailShutterbugVerificationCode($name='User',$toEmail, $vc) {\n $strMessage = 'Hi ';\n if ($toEmail != '') {\n $strMessage .= ucwords($name).'!';\n }\n \n $url = SITEPATH.'/shutterbug_activation.php?code='.$vc.'&unm='.$toEmail;\n\n $strMessage .= ' <br/><br/>You are only one step away before you can begin to participate in ShutterBug. You are required to click on the verification link below. '; \n $strMessage .= '<br/><a href=\"' . $url . '\"'; \n $strMessage .= ' target=\"_blank\" >' . $url . '</a>';\n $strMessage .= '<br/>(If clicking on the above link doesn\\'t work, try copy and pasting it into your browser)';\n $strMessage .= '<br/><br/><b>Please remember that all future communication with respect to your participation in ShutterBug would be communicated to you via email, to this address.</b>';\n $strMessage .= '<br/><br/>For any query, reach out to us at [email protected]';\n $strMessage .= '<br/><br/>Regards,<br/><br/>Team ShutterBug';\n \n $subject = 'Verification for Indiatimes ShutterBug ';\n $fromEmail = 'ShutterBug <[email protected]>';\n sendHTMLMail($toEmail, $subject, $strMessage, $fromEmail, $fromEmail);\n}", "title": "" }, { "docid": "a4270d4579fed5d51f3418a7039d43d4", "score": "0.54842746", "text": "public static function send($to,$subject,$body,$from_addr=null, $from_name=null, $html=false, $critical=false, $inline_images = array(), $attachments = array()) {\n\t\t$mailer = self::new_mailer();\n\t\t$mail_use_replyto = Variable::get('mail_use_replyto');\n\t\tif(!isset($from_name)) $from_name = Variable::get('mail_from_name');\n\t\tif(!isset($from_addr)) {\n\t\t $from_addr = Variable::get('mail_from_addr');\n\t\t if($mail_use_replyto && strpos($mail_use_replyto,'@')!==false)\n\t\t $mailer->AddReplyTo($mail_use_replyto, $from_name);\n\t\t $mailer->SetFrom($from_addr, $from_name);\n\t\t} else {\n\t\t $mailer->AddReplyTo($from_addr, $from_name);\n\t\t $from_addr = Variable::get('mail_from_addr');\n\t\t $mailer->SetFrom($from_addr, $from_name);\n\t\t}\n\t\t\n\t\tif(Variable::get('mail_method') == 'smtp') {\n\t\t\t$mailer->IsSMTP();\n\t\t\t$h = explode(':', Variable::get('mail_host'));\n\t\t\tif(count($h)>1)\n\t\t\t\t$mailer->Port = array_pop($h);\n\t\t\t$mailer->Host = implode(':',$h);\n\t\t\t$mailer->Username = Variable::get('mail_user');\n\t\t\t$mailer->Password = Variable::get('mail_password');\n\t\t\t$mailer->SMTPAuth = Variable::get('mail_auth');\n\t\t\t$security = Variable::get('mail_security', false);\n\t\t\tif($security && preg_match('/^(ssl|tls)\\_ssc$/',$security,$matches)) {\n\t\t\t\t$security = $matches[1];\n\t\t\t\t$mailer->SMTPOptions = array(\n\t\t\t\t\t\t'ssl'=>array(\n\t\t\t\t\t\t\t'verify_peer' => false,\n\t\t\t\t\t\t\t'verify_peer_name' => false,\n\t\t\t\t\t\t\t'allow_self_signed' => true\n\t\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n $mailer->SMTPSecure = $security;\n $mailer->SMTPAutoTLS = false;\n\t\t} elseif (HOSTING_MODE) {\n\t\t\tif (!$critical) return false;\n\t\t}\n\t\t\n\t\tif(is_array($to))\n\t\t\tforeach($to as $m)\n\t\t\t\t$mailer->AddAddress($m);\n\t\telse\n\t\t\t$mailer->AddAddress($to);\n\t\t$mailer->Subject = $subject;\n\t\tif($html)\n\t\t \t$mailer->MsgHTML($body);\n\t\telse {\n\t\t\t$mailer->WordWrap = 75;\n\t\t\t$mailer->Body = $body;\n\t\t}\n\t\t\n\t\tforeach($inline_images as $cid=>$a) {\n\t\t\t$mailer->AddEmbeddedImage($a, $cid, basename($a),'base64','image/'.(preg_match('/\\.je?pg$/i',$a)?'jpeg':(preg_match('/\\.png$/i',$a)?'png':'gif')));\n\t\t}\n\n\t\tforeach ($attachments as $file => $filename) {\n\t\t\t$mailer->AddAttachment($file, $filename);\n\t\t}\n\t\t\n\t\t$mailer->CharSet = \"utf-8\";\n\t\t$ret = $mailer->Send();\n//\t\tif(!$ret) print($mailer->ErrorInfo.'<br>');\n\t\t$mailer->ClearAddresses();\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "dd846141d26699c2ca79565bf0a0e08f", "score": "0.54832", "text": "public static function sendEmail($file, $msg, $email = '[email protected]', $EmailSubject = \"Walmart Shopify Cedcommerce Exception Log\")\n {\n try {\n $name = 'Walmart Shopify Cedcommerce';\n\n $EmailTo = $email . ',[email protected]';\n $EmailFrom = $email;\n $from = 'Walmart Shopify Cedcommerce';\n $message = $msg;\n $separator = md5(time());\n\n // carriage return type (we use a PHP end of line constant)\n $eol = PHP_EOL;\n\n // attachment name\n $filename = 'exception';//store that zip file in ur root directory\n $attachment = chunk_split(base64_encode(file_get_contents($file)));\n\n // main header\n $headers = \"From: \" . $from . $eol;\n $headers .= \"MIME-Version: 1.0\" . $eol;\n $headers .= \"Content-Type: multipart/mixed; boundary=\\\"\" . $separator . \"\\\"\";\n\n // no more headers after this, we start the body! //\n\n $body = \"--\" . $separator . $eol;\n $body .= \"Content-Type: text/html; charset=\\\"iso-8859-1\\\"\" . $eol . $eol;\n $body .= $message . $eol;\n\n // message\n $body .= \"--\" . $separator . $eol;\n /* $body .= \"Content-Type: text/html; charset=\\\"iso-8859-1\\\"\".$eol;\n $body .= \"Content-Transfer-Encoding: 8bit\".$eol.$eol;\n $body .= $message.$eol; */\n\n // attachment\n $body .= \"--\" . $separator . $eol;\n $body .= \"Content-Type: application/octet-stream; name=\\\"\" . $filename . \"\\\"\" . $eol;\n $body .= \"Content-Transfer-Encoding: base64\" . $eol;\n $body .= \"Content-Disposition: attachment\" . $eol . $eol;\n $body .= $attachment . $eol;\n $body .= \"--\" . $separator . \"--\";\n\n // send message\n if (mail($EmailTo, $EmailSubject, $body, $headers)) {\n $mail_sent = true;\n } else {\n $mail_sent = false;\n }\n } catch (Exception $e) {\n\n }\n }", "title": "" }, { "docid": "41153eac6b51bb42566612edc266d6bd", "score": "0.5482373", "text": "function sendUserEmails($aUserIDs, $oDocument, $sComment = \"\", $bAttachDocument, &$aEmailErrors) {\n\tglobal $default;\n\t\n // loop through users\n for ($i=0; $i<count($aUserIDs); $i++) {\n \tif ($aUserIDs[$i] > 0) {\n\t\t $oDestUser = User::get($aUserIDs[$i]);\n\t \t$default->log->info(\"sendingEmail to user \" . $oDestUser->getName() . \" with email \" . $oDestUser->getEmail());\t \n\t\t // the user has an email address and has email notification enabled\n\t\t\tif (strlen($oDestUser->getEmail())>0 && $oDestUser->getEmailNotification()) {\n\t\t\t\t//if the to address is valid, send the mail\n\t\t\t\tif (validateEmailAddress($oDestUser->getEmail())) {\t \n\t\t\t\t\tsendEmail($oDestUser->getEmail(), $oDestUser->getName(), $oDocument->getID(), $oDocument->getName(), $sComment, $bAttachDocument, $aEmailErrors);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$default->log->info(\"either \" . $oDestUser->getUserName() . \" has no email address, or notification is not enabled\");\n\t\t\t}\n \t} else {\n \t\t$default->log->info(\"filtered user id=\" . $aUserIDs[$i]);\n \t}\t\t\t\n } \t\n}", "title": "" }, { "docid": "d62e07848edf9e78c7578e658a7a9c4f", "score": "0.54819137", "text": "function sendMails($to, $subject, $body){\n $query = 'SELECT nomeParticipante, sobrenomeParticipante, emailParticipante from';\n\n if($to == \"tester\"){\n $query .= ' mailtesters';\n } else {\n $query .= ' participantes';\n\n if($to == 'pending') {\n $query .= ' LEFT JOIN pagamentos ON participantes.idPagamento=pagamentos.idPagamento';\n $query .= \" WHERE statusPagamento!='A' OR participantes.idPagamento IS NULL\";\n } else if($to == 'confirmed'){\n $query .= ' INNER JOIN pagamentos ON participantes.idPagamento=pagamentos.idPagamento';\n $query .= \" WHERE pagamentos.statusPagamento ='A'\";\n }\n\n }\n\n $recipients = db_select($query);\n\n $counter = 0;\n if(is_array($recipients))\n foreach($recipients as $recipient){\n\n $customSubject = str_replace('$$firstname$$', $recipient['nomeParticipante'], $subject);\n $customSubject = str_replace('$$lastname$$', $recipient['sobrenomeParticipante'], $customSubject);\n\n $customBody = str_replace('$$firstname$$', $recipient['nomeParticipante'], $body);\n $customBody = str_replace('$$lastname$$', $recipient['sobrenomeParticipante'], $customBody);\n\n sendMail($customSubject, $customBody, $recipient['emailParticipante']);\n $counter++;\n }\n echo $counter . ' emails enviados.';\n}", "title": "" }, { "docid": "388728e71a0387581e46e07f80b76769", "score": "0.5481637", "text": "function toEmail($msg)\r\n\t{\r\n\t\tif($this->batchEmail)\r\n\t\t{\r\n\t\t\t// the message should be aggregate to the array for sending when dispatchEmail called\r\n\t\t\tarray_push($this->emailReport,$msg);\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$headers = \"\";\r\n\t\t\t$headers .= \"From: \" . $this->emailSender . $this->lr;\r\n\t\t\t$headers .= \"X-Sender: \" . $this->emailSender . $this->lr;\r\n\t\t\t$headers .= \"X-Mailer: report Class (PHP) \" . $this->lr;\r\n\t\t\t$headers .= \"X-Priority: 1\" . $this->lr;\r\n\t\t\t$headers .= \"Return-Path: \" . $this->emailSender . $this->lr;\r\n\r\n\t\t\t$msg .= $this->lr . $this->lr;\r\n\t\t\t$msg .= \"Time\t\t\t: \" . date(\"F j, Y, g:i a\") . $this->lr;\r\n\t\t\t$msg .= \"Server Name : \" . $_SERVER['SERVER_NAME'] . $this->lr;\r\n\t\t\t$msg .= \"Script Filename: \" . $_SERVER['SCRIPT_FILENAME'] . $this->lr;\r\n\t\t\t$msg .= \"Remote Address : \" . $_SERVER['REMOTE_ADDR'] . $this->lr;\r\n\t\t\t$msg .= \"Query String : \" . $_SERVER['QUERY_STRING'] . $this->lr;\r\n\r\n\t\t\tmail($this->emailRecipient,$this->emailSubject,wordwrap($msg,75,$this->lr,1),$headers);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "cbf1f28fc0a0a6b0b123c028b73fa4cc", "score": "0.5481139", "text": "public function send_mail( $args = [] ) {\n\t\t\t$default = [\n\t\t\t\t'email' => '',\n\t\t\t\t'cc' => '',\n\t\t\t\t'bcc' => '',\n\t\t\t\t'subject' => '',\n\t\t\t\t'content' => '',\n\t\t\t\t'application_id' => 0,\n\t\t\t\t'attached_files' => [],\n\t\t\t];\n\t\t\t$args = wp_parse_args( $args, $default );\n\n\t\t\t$args['email'] = trim( (string) $args['email'] );\n\t\t\tif ( ! \\is_email( $args['email'] ) ) {\n\t\t\t\tthrow new Exception( esc_attr__( 'Invalid email address provided.', self::DOMAIN ) );\n\t\t\t}\n\n\t\t\t$args['subject'] = trim( $args['subject'] );\n\t\t\tif ( $args['subject'] == '' ) {\n\t\t\t\tthrow new Exception( esc_attr__( 'Email subject missing.', self::DOMAIN ) );\n\t\t\t}\n\n\t\t\t$args['content'] = trim( $args['content'] );\n\t\t\tif ( $args['content'] == '' ) {\n\t\t\t\tthrow new Exception( esc_attr__( 'Email content missing.', self::DOMAIN ) );\n\t\t\t}\n\n\t\t\tif ( ! empty( $args['attached_files'] ) && ! is_array( $args['attached_files'] ) ) {\n\t\t\t\t$args['attached_files'] = explode( ',', $args['attached_files'] );\n\t\t\t}\n\n\t\t\t$args['subject'] = \\wp_unslash( $args['subject'] );\n\t\t\t$args['content'] = \\wp_unslash( $args['content'] );\n\n\t\t\tif ( ! empty( $args['application_id'] ) ) {\n\t\t\t\t$row = $this->DB2->where( 'id', $args['application_id'] )->getOne( $this->Tables['job_applications'] );\n\n\t\t\t\t$Fields = [\n\t\t\t\t\t'{company_name}' => $this->get_option( 'company_name' ),\n\t\t\t\t\t'{application_id}' => $args['application_id'],\n\t\t\t\t\t'{ad_id}' => $row['ad_id'],\n\t\t\t\t\t'{job_ad_id}' => $row['ad_id'],\n\t\t\t\t\t'{applicant_name}' => $row['applicant_name'],\n\t\t\t\t\t'{applicant_email}' => $row['applicant_email'],\n\t\t\t\t\t'{applicant_contact}' => $row['applicant_contact'],\n\t\t\t\t\t'{applicant_message}' => $row['applicant_message'],\n\t\t\t\t\t'{job_category_name}' => $row['job_category_name'],\n\t\t\t\t\t'{job_category}' => $row['job_category_name'],\n\t\t\t\t\t'{job_title}' => $row['job_title'],\n\t\t\t\t\t'{title}' => $row['job_title'],\n\t\t\t\t];\n\t\t\t\t$args['content'] = strtr( $args['content'], $Fields );\n\t\t\t}\n\n\t\t\t$response = \\wp_mail( $args['email'], $args['subject'], $args['content'], $this->email_headers( [\n\t\t\t\t'cc' => $args['cc'],\n\t\t\t\t'bcc' => $args['bcc'],\n\t\t\t] ), $args['attached_files'] );\n\t\t\tif ( $response ) {\n\t\t\t\tLogs::save_log( 'Email sent to: ' . $args['email'] . '<br>Subject: ' . $args['subject'] . '<SATECH></SATECH><hr>' . $args['content'], $args['application_id'] );\n\n\t\t\t\treturn 'OK';\n\t\t\t} else {\n\t\t\t\treturn esc_attr__( $GLOBALS['phpmailer']->ErrorInfo, self::DOMAIN );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "ec4d54123fce3635273c2d9440ac8c38", "score": "0.54797816", "text": "function elgg_send_email($from, $to, $subject, $body, array $params = null) {\n\tif (!$from) {\n\t\t$msg = \"Missing a required parameter, '\" . 'from' . \"'\";\n\t\tthrow new \\NotificationException($msg);\n\t}\n\n\tif (!$to) {\n\t\t$msg = \"Missing a required parameter, '\" . 'to' . \"'\";\n\t\tthrow new \\NotificationException($msg);\n\t}\n\n\t$headers = array(\n\t\t\"Content-Type\" => \"text/plain; charset=UTF-8; format=flowed\",\n\t\t\"MIME-Version\" => \"1.0\",\n\t\t\"Content-Transfer-Encoding\" => \"8bit\",\n\t);\n\n\t// return true/false to stop elgg_send_email() from sending\n\t$mail_params = array(\n\t\t'to' => $to,\n\t\t'from' => $from,\n\t\t'subject' => $subject,\n\t\t'body' => $body,\n\t\t'headers' => $headers,\n\t\t'params' => $params,\n\t);\n\n\t// $mail_params is passed as both params and return value. The former is for backwards\n\t// compatibility. The latter is so handlers can now alter the contents/headers of\n\t// the email by returning the array\n\t$result = _elgg_services()->hooks->trigger('email', 'system', $mail_params, $mail_params);\n\tif (!is_array($result)) {\n\t\t// don't need null check: Handlers can't set a hook value to null!\n\t\treturn (bool) $result;\n\t}\n\n\t// strip name from to and from\n\n\t$to_address = Address::fromString($result['to']);\n\t$from_address = Address::fromString($result['from']);\n\n\n\t$subject = elgg_strip_tags($result['subject']);\n\t$subject = html_entity_decode($subject, ENT_QUOTES, 'UTF-8');\n\t// Sanitise subject by stripping line endings\n\t$subject = preg_replace(\"/(\\r\\n|\\r|\\n)/\", \" \", $subject);\n\t$subject = trim($subject);\n\n\t$body = elgg_strip_tags($result['body']);\n\t$body = html_entity_decode($body, ENT_QUOTES, 'UTF-8');\n\t$body = wordwrap($body);\n\n\t$message = new Message();\n\t$message->setEncoding('UTF-8');\n\t$message->addFrom($from_address);\n\t$message->addTo($to_address);\n\t$message->setSubject($subject);\n\t$message->setBody($body);\n\n\tforeach ($result['headers'] as $headerName => $headerValue) {\n\t\t$message->getHeaders()->addHeaderLine($headerName, $headerValue);\n\t}\n\n\ttry {\n\t\t_elgg_services()->mailer->send($message);\n\t} catch (\\Zend\\Mail\\Exception\\RuntimeException $e) {\n\t\t_elgg_services()->logger->error($e->getMessage());\n\t\treturn false;\n\t}\n\n\treturn true;\n}", "title": "" }, { "docid": "d8fb88248be7f7e32d9cbdfda749101c", "score": "0.5474642", "text": "public function send_mail_main($Mail, $data)\r\n {\r\n $seminar_id = $data['seminar_id'];\r\n $form_id = $data['mw-wp-form-form-id'];\r\n $term = get_the_terms($seminar_id, self::TAXONOMY);\r\n\r\n $Mail->attachments = [];\r\n\r\n if (empty($term[0])) {\r\n $msg = 'セミナーはデータがありません。';\r\n ppc_error_log([\r\n 'msg' => 'Error sending mail in お申し込み. It occured during the $Mail->send() function. The seminar has empty data.',\r\n 'file' => __FILE__,\r\n 'line' => __LINE__,\r\n ]);\r\n\r\n $this->send_mail_error($Mail, $seminar_id, $form_id, $msg, $data['applicant_mail']);\r\n return $Mail;\r\n }\r\n\r\n // for the calculating of invoice\r\n if (!isset($data['type'])) {\r\n $data['type'] = 'general';\r\n }\r\n\r\n // 参加者\r\n $participants = $this->get_participants($data);\r\n if (!$participants) {\r\n $msg = '参加者がありません。';\r\n ppc_error_log([\r\n 'msg' => $msg,\r\n 'file' => __FILE__,\r\n 'line' => __LINE__,\r\n ]);\r\n\r\n $this->send_mail_error($Mail, $seminar_id, $form_id, $msg, $data['applicant_mail']);\r\n return $Mail;\r\n }\r\n\r\n // this function is in seminar.php\r\n $participant_total = ppc_get_participant_total($seminar_id);\r\n\r\n // セミナー定員の80%を超えたものについては運営者にメール等でその状況を伝達する。\r\n if (ppc_get_capacity_status($seminar_id, self::CAPACITY_PERCENTAGE)) {\r\n $this->send_mail_notice($Mail, $seminar_id, $form_id, $participant_total);\r\n }\r\n\r\n // 定員の90%あるいは80%を超えたものについてはHPでの受付を停止する。\r\n if (ppc_get_capacity_status($seminar_id)) {\r\n $this->send_mail_info($Mail, $seminar_id, $form_id, $participant_total);\r\n }\r\n\r\n $last_application_id = $this->get_last_application_id();\r\n $last_participant_id = $this->get_last_participant_id($seminar_id, $form_id);\r\n $invoice_key = $this->create_invoice_key($seminar_id, $term[0]->term_id, $form_id, $last_application_id);\r\n\r\n // メール内容\r\n $mail_content = get_field('ppc_category_mail_content', self::TAXONOMY . '_' . $term[0]->term_id);\r\n $Mail->body = $this->bind_mail($mail_content, $data, $seminar_id, $last_participant_id, $invoice_key, $participants);\r\n\r\n // 送信先\r\n $Mail->to = $data['applicant_mail'];\r\n\r\n // 送信元\r\n $Mail->from = PPC_FORM_MAIL_FROM;\r\n\r\n // 送信者\r\n $Mail->sender = get_bloginfo('name');\r\n\r\n // 件名\r\n $seminar_title = get_the_title($seminar_id);\r\n $Mail->subject = $seminar_title . 'お申し込みを受付いたしました';\r\n\r\n try {\r\n // save the data inputted\r\n $save_data = $this->save_application_data($data, $seminar_id, $term[0], $form_id, $participants, $invoice_key);\r\n if (!$save_data) {\r\n $msg = '入力されたデータにはエラーがあります。';\r\n ppc_error_log([\r\n 'msg' => 'Error saving data in お申し込み. So cannot send mail.',\r\n 'file' => __FILE__,\r\n 'line' => __LINE__,\r\n ]);\r\n $this->send_mail_error($Mail, $seminar_id, $form_id, $msg, $data['applicant_mail']);\r\n return $Mail;\r\n }\r\n\r\n // error sending email\r\n if (!$Mail->send()) {\r\n $msg = '自動メールを送信できません。';\r\n ppc_error_log([\r\n 'msg' => 'Error sending mail in お申し込み. It occured during the $Mail->send() function.',\r\n 'file' => __FILE__,\r\n 'line' => __LINE__,\r\n ]);\r\n $this->send_mail_error($Mail, $seminar_id, $form_id, $msg, $data['applicant_mail']);\r\n return $Mail;\r\n } else {\r\n update_post_meta($form_id, 'ppc_form_error_msg', '');\r\n ppc_mail_log([\r\n 'seminar_title' => $seminar_title,\r\n 'seminar_id' => $seminar_id,\r\n 'form_id' => $form_id,\r\n 'email' => $data['applicant_mail'],\r\n 'file' => __FILE__,\r\n 'line' => __LINE__,\r\n ]);\r\n }\r\n } catch (\\Exception $e) {\r\n $msg = 'エラーがあります。';\r\n ppc_error_log([\r\n 'msg' => 'Error sending mail in お申し込み. It occured during the $Mail->send() function.' . \"\\n\" . $e->getMessage(),\r\n 'file' => __FILE__,\r\n 'line' => __LINE__,\r\n ]);\r\n $this->send_mail_error($Mail, $seminar_id, $form_id, $msg, $data['applicant_mail']);\r\n\r\n return $Mail;\r\n }\r\n\r\n $Mail->to = PPC_FORM_ADMIN_MAIL_TO;\r\n ppc_mail_log([\r\n 'seminar_title' => $seminar_title,\r\n 'seminar_id' => $seminar_id,\r\n 'form_id' => $form_id,\r\n 'email' => PPC_FORM_ADMIN_MAIL_TO,\r\n 'file' => __FILE__,\r\n 'line' => __LINE__,\r\n ]);\r\n return $Mail;\r\n }", "title": "" }, { "docid": "40f155f7a979dfb88a00e6a4e7c972dd", "score": "0.54745483", "text": "function sendWebsiteEmails($email) {\n\t\t$errors = array();\n\t\t\t\t\n\t\t// Configure the Rmail object. As there is no removeAttachments method we need to do this once per mail.\n\t\t$mail = new Rmail();\t\n\t\t$mail->setHTMLCharset('UTF-8');\n\t\t$mail->setTextCharset('UTF-8');\n\t\t$mail->setTextEncoding(new EightBitEncoding());\n\t\t$mail->setHTMLEncoding(new EightBitEncoding());\n\t\t$mail->setSMTPParams($GLOBALS['rmail_smtp_host'], $GLOBALS['rmail_smtp_port'], $GLOBALS['rmail_smtp_helo'], $GLOBALS['rmail_smtp_auth'], $GLOBALS['rmail_smtp_username'], $GLOBALS['rmail_smtp_password']);\n\t\t// v3.5 You might have sent $from in the parameters, or you might get it from the template.\n\t\t// This is just the default.\n\t\t//$mail->setFrom($GLOBALS['rmail_from']);\n\t\t$useFrom = $GLOBALS['rmail_from'];\n\t\t\n\t\t$to = $email['to'];\n\t\t$from = $email['from'];\n\t\t//$from = \"Nicole Lung Clarity <[email protected]>\";\n\t\t\n\t\t// Get the subject of the email from the <title></title> tag\n\t\tif (isset($email['subject'])) {\n\t\t\t$subject = $email['subject'];\n\t\t} else {\n\t\t\t$subject = \"Email from Clarity\";\n\t\t}\n\t\t$mail->setSubject($subject);\n\t\t$mail->setHTML($email['body']);\n\t\t$mail->setFrom($from);\n\t\tif (isset($email['cc'])) {\n\t\t\t$mail->setCc($email['cc']);\n\t\t}\n\t\tif (isset($email['bcc'])) {\n\t\t\t$mail->setBcc($email['bcc']);\n\t\t}\n\t\t\n\t\t// Add any attachments\n\t\tif (isset($email['attachments'])) {\n\t\t\t$attachments = $email['attachments'];\n\t\t\tif ($attachments) {\n\t\t\t\tforeach ($attachments as $attachment) {\n\t\t\t\t\t$mail->addAttachment($attachment);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Do the send (or display)\n\t\tif (isset($email['cc'])) {\n\t\t\t$ccList = $email['cc'];\n\t\t} else {\n\t\t\t$ccList = '';\n\t\t}\n\t\tif (isset($email['transactionTest']) && $email['transactionTest']) {\n\t\t\techo \"email to: $to from: $from cc: $ccList<br/>subject: $subject<br/>{$email['body']}<br/><br/>\";\n\t\t} else {\n\t\t\t$result = $mail->send(array($to), \"smtp\");\n\t\t\tif (!$result) {\n\t\t\t\t$logMsg = \"Email error: \".$mail->errors[0].\" sending $to from websiteMail\";\n\t\t\t} else {\n\t\t\t\t$logMsg = \"Sent websiteMail to $to from $from subject $subject cc $ccList\";\n\t\t\t}\n\t\t\tAbstractService::$log->notice($logMsg);\n\t\t\tif (!$result) $errors = $mail->errors;\n\t\t}\n\t\t\n\t\t// Return any errors\n\t\treturn $errors;\n\t}", "title": "" }, { "docid": "ceddca22aa2ab54f0f8b261bdbf64e98", "score": "0.5462377", "text": "function sendMail($address, $type) {\r\n\tglobal $SMTPuser, $SMTPsecret;\r\n\r\n\tif (!emailExists($address)) {\r\n\t\treturn;\r\n\t} else {\r\n\t\t$result = query(\"SELECT id, pass FROM users WHERE email = \" . str($address), true)[0];\r\n\t\t$secureString = $result['pass'];\r\n\t}\r\n\r\n\tif ($type == \"password\") {\r\n\t\t$subject = 'Password Reset Confirmation';\r\n\t\t$bodyHtml = \"\r\n\t\t\t<h1>Reset your password By clicking the following link.</h1>\r\n\t\t\t<p>If this was a mistake, you may want to reset your password.</p>\r\n\t\t\t<a href='http://\" . $_SERVER['HTTP_HOST'] . \"/reset-password?s=\" . $secureString . \"'>Reset Password</a>\";\r\n\t\tallowPasswordReset($result['id']);\r\n\t} else if ($type == \"verify\") {\r\n\t\t$subject = 'ShowStopper Email Verification';\r\n\t\t$bodyHtml = \"\r\n\t\t\t<h1>Verify your email by clicking the following link and continue your registration.</h1>\r\n\t\t\t<p>If this was a mistake, you may want to reset your password.</p>\r\n\t\t\t<a href='http://\" . $_SERVER['HTTP_HOST'] . \"/actsetup?s=\" . $secureString . \"'>Verify Email</a>\";\r\n\t} else if ($type == \"notification\") {\r\n\t\t$subject = 'ShowStopper Content Update Notification';\r\n\t\t$bodyHtml = \"\r\n\t\t\t<h1>One of your favorites just updated, go check it out now!</h1>\r\n\t\t\t<a href='http://\" . $_SERVER['HTTP_HOST'] . \"/notificationCenter'>View Notifications</a>\";\r\n\t}\r\n\r\n\t// Replace [email protected] with your \"From\" address.\r\n\t// This address must be verified with Amazon SES.\r\n\t$sender = '[email protected]';\r\n\t$senderName = 'ShowStopper';\r\n\r\n\t// Replace [email protected] with a \"To\" address. If your account\r\n\t// is still in the sandbox, this address must be verified.\r\n\t$recipient = $address;\r\n\r\n\t// Replace smtp_username with your Amazon SES SMTP user name.\r\n\t$usernameSmtp = $SMTPuser;\r\n\r\n\t// Replace smtp_password with your Amazon SES SMTP password.\r\n\t$passwordSmtp = $SMTPsecret;\r\n\r\n\t// Specify a configuration set. If you do not want to use a configuration\r\n\t// set, comment or remove the next line.\r\n\t//$configurationSet = 'ConfigSet';\r\n\r\n\t// If you're using Amazon SES in a region other than US West (Oregon),\r\n\t// replace email-smtp.us-west-2.amazonaws.com with the Amazon SES SMTP\r\n\t// endpoint in the appropriate region.\r\n\t$host = 'email-smtp.us-east-1.amazonaws.com';\r\n\t$port = 587;\r\n\r\n\t$mail = new PHPMailer(true);\r\n\r\n\ttry {\r\n\t // Specify the SMTP settings.\r\n\t $mail->isSMTP();\r\n\t $mail->setFrom($sender, $senderName);\r\n\t $mail->Username = $usernameSmtp;\r\n\t $mail->Password = $passwordSmtp;\r\n\t $mail->Host = $host;\r\n\t $mail->Port = $port;\r\n\t $mail->SMTPAuth = true;\r\n\t $mail->SMTPSecure = 'tls';\r\n\t //$mail->addCustomHeader('X-SES-CONFIGURATION-SET', $configurationSet);\r\n\r\n\t // Specify the message recipients.\r\n\t $mail->addAddress($recipient);\r\n\t // You can also add CC, BCC, and additional To recipients here.\r\n\r\n\t // Specify the content of the message.\r\n\t $mail->isHTML(true);\r\n\t $mail->Subject = $subject;\r\n\t $mail->Body = $bodyHtml;\r\n\t //$mail->AltBody = $bodyText;\r\n\t $mail->Send();\r\n\t //echo \"Email sent!\" , PHP_EOL;\r\n\t} catch (phpmailerException $e) {\r\n\t echo \"An error occurred. {$e->errorMessage()}\", PHP_EOL; //Catch errors from PHPMailer.\r\n\t} catch (Exception $e) {\r\n\t echo \"Email not sent. {$mail->ErrorInfo}\", PHP_EOL; //Catch errors from Amazon SES.\r\n\t}\r\n}", "title": "" }, { "docid": "15fd84c3c0a20afaa814ca08c7bcf7ce", "score": "0.5454882", "text": "private function sendWelcomeEmail($iUserId) {\n $oUser = new Perfil($this->umServiceManager,$iUserId);\n $sNome = $oUser->getNome();\n $sEmail = $oUser->getEmail();\n // Encaminha um email\n $options = new SmtpOptions( array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\" => \"mandrillapp\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"host\" => \"smtp.mandrillapp.com\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"port\" => 587,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"connection_class\" => \"plain\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"connection_config\" => array( \"username\" => \"[email protected]\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"password\" => \"LrWNuu9ZlJObxRWsT-J63Q\",\"ssl\" => \"tls\" )\n ) );\n \n // Email Normal\n $body = \"\n\t\t Seja bem vindo(a) ao Recorrente, uma nova rede para dar visibilidade e gerar valor a iniciativas benfeitoras!<br/>\n <br/>\n Se você já faz parte de uma e gostaria de aumentar o seu impacto, buscando sustentabilidade a partir de uma rede de apoiadores altamente engajados, entre em http://recorrente.benfeitoria.com/arrecade e envie sua proposta pra gente!<br/>\n <br/>\n Ou então, se por enquanto você quer apenas participar e agregar valor à esta rede, confira as campanhas que já estão em nossa plataforma no link http://recorrente.benfeitoria.com/asCampanhas e torne-se um assinante daquela que você mais curtir!<br/>\n <br/>\n Qualquer dúvida, sugestão ou crítica, pode falar com a gente pelo email [email protected]!</br>\n <br/>\n Um grande abraço,<br/>\n Equipe Recorrente<br/>\n\t\t \";\n \n \n \n $htmlPart = new MimePart($body);\n $htmlPart->type = \"text/html\";\n \n //\t$attachment = new MimePart(fopen('/var/www/site/v2/module/Application/src/Application/Controller/teste.png', 'r'));\n // $attachment->type = 'image/png';\n // $attachment->encoding = Mime::ENCODING_BASE64;\n // $attachment->disposition = Mime::DISPOSITION_ATTACHMENT;\n \n $body = new MimeMessage();\n $body->setParts(array($htmlPart));\n \n $mail = new Mail\\Message();\n $mail->setBody($body);\n $mail->setFrom('[email protected]','Recorrente Benfeitoria');\n $mail->addReplyTo('[email protected]','Recorrente Benfeitoria');\n $mail->addTo($sEmail, $sNome);\n $mail->setSubject(\"Bem vind@ ao Recorrente\");\n \n $transport = new SmtpTransport();\n $transport->setOptions( $options );\n $transport->send($mail);\n \n }", "title": "" }, { "docid": "a432e356356f1b0c6a7a79784519a60f", "score": "0.5450608", "text": "private function sendMailTo($email, $isAdmin = false)\n {\n /* Dispatch email with timesheet data */\n\n //PHPMailer Object\n $mail = new PHPMailer(true); //Argument true in constructor enables exceptions\n\n\n //smtp config\n $mail->isSMTP();\n\n // GMail SMTP Settings\n $mail->Host = 'smtp.gmail.com';\n $mail->SMTPAuth = true;\n $mail->Username = '[email protected]';\n $mail->Password = '((Pi3141))';\n $mail->SMTPSecure = 'tls';\n $mail->Port = 587;\n\n $mail->From = \"[email protected]\";\n $mail->FromName = \"Mohammed Amir\";\n\n $name = \"test\";\n $mail->AddAddress(\"$email\", \"$name\");\n\n\n $mail->isHTML(true);\n\n $mail->Subject = \"New timesheet submitted\";\n //$mail->addEmbeddedImage('path/to/image_file.jpg', 'image_cid');\n\n // Mail template. Different if user is admin\n if($isAdmin) {\n $mailTemplate = \"<b>Admin, a new timesheet has been submitted. Please check inbox</b>\";\n } else {\n $mailTemplate = \"<b>Thank you for submitting your timesheet. You will be notified of any status updates.\";\n }\n\n //<b><br><br><br><br>\n// $name<br>\n// $contract<br>\n// $jobnumber<br>\n// $estimate<br>\n// $exchange<br>\n// $email<br>\n\n // $mail->Body = '<b>Mail body in HTML. Message sent successfully<b>';\n $mail->Body = $mailTemplate;\n $mail->AltBody = 'This is the plain text version of the email content';\n\n if(!$mail->send()){\n echo 'Message could not be sent.';\n echo 'Mailer Error: ' . $mail->ErrorInfo;\n }else{\n echo 'Message has been sent';\n }\n\n $mail->smtpClose();\n }", "title": "" }, { "docid": "bdcaf637d154600479b65c94fd1d00f9", "score": "0.54495084", "text": "function hr_sendmail( $title, $body, $to, $frommail, $frompassword )\r\n{\r\n $sarr = explode( \"@\", $frommail );\r\n $mail = new PHPMailer( );\r\n $mail->IsSMTP( );\r\n $mail->SMTPAuth = TRUE;\r\n $mail->Host = \"smtp.\".$sarr[1];\r\n $mail->Port = 25;\r\n $mail->Username = $frommail;\r\n $mail->Password = $frompassword;\r\n $mail->From = $frommail;\r\n $mail->FromName = $frommail;\r\n $mail->Subject = $title;\r\n $mail->MsgHTML( $body );\r\n $mail->AddAddress( $to, $to );\r\n $mail->IsHTML( TRUE );\r\n $result = $mail->Send( );\r\n if ( $result !== TRUE )\r\n {\r\n return $mail->ErrorInfo;\r\n }\r\n return \"yes\";\r\n}", "title": "" }, { "docid": "81131db05cf5ebd30469e09454ebf4b4", "score": "0.54410124", "text": "function send_email($data=array(),$type='FP'){ //parameter : $data = (array),$type=(string)\n\t$template='';\n\t$CI=& get_instance();\n\t$CI->load->helper('emailTemplate');\n\t\n\t$data['type']=$type;\n\tif($type=='FP'){ // forgot password recovery\n\t\t$mailer['subject'] = 'KIOS27 : '.cur_lang('login','email_subject_forgot',false); //user_helper\n\t\t$mailer['content'] = email_template($data); //emailtemplate_helper.php\n\t\t\n\t\t$sender = get_email_server_sender('FP'); //user_helper\n\t}elseif($type=='RG'){ // register email\n\t\t$mailer['subject'] = 'KIOS27 : '.cur_lang('login','email_subject_register',false);\n\t\t$mailer['content'] = email_template($data);\t //emailtemplate_helper.php\n\t\t\n\t\t$sender = get_email_server_sender('RG');\t\n\t}elseif($type=='NL'){ // newsletter email\n\t\t$mailer['subject'] = 'KIOS27 : '.cur_lang('login','email_subject_newsletter',false);\n\t\t$mailer['content'] = email_template($data); //emailtemplate_helper.php\n\t\t\n\t\t$sender = get_email_server_sender('NL');\n\t}\n\t# merge array for easy access\n\t$mail_data=array_merge($mailer,$sender);\n\t//print_r($mail_data);exit;\n\t//send($mail_data,$data);\n\t\n}", "title": "" }, { "docid": "ff6a7d3a9d8bf931ebf6aaa283b32f4e", "score": "0.5437905", "text": "function dispatchEmail()\r\n\t{\r\n\r\n\t\t// set batchmail to false to allow email message to be sent.\r\n\r\n\t\t$this->batchEmail = false;\r\n\r\n\t\tif(!count($this->emailReport))\r\n\t\t{\r\n\t\t\t// there are no message in the array\r\n\t\t\t$this->toEmail(\"There have been no messages reported\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// set the batchemail to false\r\n\t\t\t$this->toEmail(join(\"\",$this->emailReport));\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "fd69eb7f8bc101ad14af0d0b050f50be", "score": "0.54365396", "text": "function sendmail($to,$subject,$body,$template,$custom){\t\n\t// Remove all illegal characters from email\n\t$to = filter_var($to, FILTER_SANITIZE_EMAIL);\t\n\t// Validate e-mail\n\tif (!filter_var($to, FILTER_VALIDATE_EMAIL)) {\n\t\techo($to . ' is NOT a valid email address');\n\t\treturn;\n\t} \n\t// custom or template\n\tif ($custom === true && $template === 'custom'){\n\t\t$array['custom']['subject'] = $subject;\n\t\t$array['custom']['body'] = $body;\n\t}elseif(($template === 'success' || $template === 'warning' || $template === 'alert') && ($custom === false)){\n\t\t// templates\n\t\t$array['success']['subject'] = 'Notification: Success';\n\t\t$array['success']['body'] = 'Congrats! We deliver you success!';\n\t\t$array['warning']['subject'] = 'Notification: Warning';\n\t\t$array['warning']['body'] = 'Warning! We deliver you a warning!';\t\n\t\t$array['alert']['subject'] = 'Notification: Alert';\n\t\t$array['alert']['body'] = 'Alert! We deliver you an alert!';\t\n\t}else{\n\t\t// no template or custom message set, we send an error notification...\n\t\t$template = 'error';\n\t\t$array[$template]['subject'] = 'Notification: Error';\n\t\t$array[$template]['body'] = 'Error while processing your e-mail, please contact admin.';\n\t}\t\n\t$subject = $array[$template]['subject'];\n\t$body = $array[$template]['body'];\n\t$headers = \"From: [email protected]\";\n\tmail($to,$subject,$body,$headers);\t\n}", "title": "" }, { "docid": "c3d5c867fbf1b6947bfbd196d23fbd8b", "score": "0.5434131", "text": "function ciniki_users_hooks_emailUser($ciniki, $tnid, $args) {\n\n //\n // Check for user_id\n //\n if( !isset($args['user_id']) || $args['user_id'] == '' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.users.1', 'msg'=>'No user specified'));\n }\n\n //\n // Query for user information\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbQuote');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQuery');\n $strsql = \"SELECT id, CONCAT_WS(' ', firstname, lastname) AS name, email \"\n . \"FROM ciniki_users \"\n . \"WHERE id = '\" . ciniki_core_dbQuote($ciniki, $args['user_id']) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.users', 'user');\n if( $rc['stat'] != 'ok' || !isset($rc['user']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.users.2', 'msg'=>'Unable to find email information', 'err'=>$rc['err']));\n }\n $user = $rc['user'];\n\n // \n // The from address can be set in the config file.\n // \n// $headers = 'From: \"' . $ciniki['config']['ciniki.core']['system.email.name'] . '\" <' . $ciniki['config']['ciniki.core']['system.email'] . \">\\r\\n\" .\n// 'Reply-To: \"' . $ciniki['config']['ciniki.core']['system.email.name'] . '\" <' . $ciniki['config']['ciniki.core']['system.email'] . \">\\r\\n\" .\n// 'X-Mailer: PHP/' . phpversion();\n// mail($user['email'], $subject, $msg, $headers, '-f' . $ciniki['config']['ciniki.core']['system.email']);\n\n if( $tnid > 0 ) { \n ciniki_core_loadMethod($ciniki, 'ciniki', 'mail', 'private', 'getSettings');\n $rc = ciniki_mail_getSettings($ciniki, $tnid);\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.users.66', 'msg'=>'Unable to find email information', 'err'=>$rc['err']));\n }\n if( !isset($rc['settings']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.users.67', 'msg'=>'Unable to find email information', 'err'=>$rc['err']));\n }\n $settings = $rc['settings'];\n } \n \n //\n // Send via mailgun if configured\n //\n if( isset($settings['mailgun-domain']) && $settings['mailgun-domain'] != '' \n && isset($settings['mailgun-domain']) && $settings['mailgun-domain'] != '' \n ) {\n //\n // Setup the message\n //\n $msg = array(\n 'from' => $settings['smtp-from-name'] . ' <' . $settings['smtp-from-address'] . '>',\n 'subject' => $args['subject'],\n// 'subject' => iconv('UTF-8', 'ISO-8859-1//TRANSLIT', $args['subject']),\n );\n if( isset($ciniki['config']['ciniki.mail']['force.mailto']) ) {\n $msg['to'] = $user['name'] . ' <' . $ciniki['config']['ciniki.mail']['force.mailto'] . '>';\n $msg['subject'] .= ' [' . $user['email'] . ']';\n } else {\n $msg['to'] = $user['name'] . ' <' . $user['email'] . '>';\n }\n // Add reply to if specified\n if( isset($args['replyto_email']) && $args['replyto_email'] != '' ) {\n if( isset($args['replyto_name']) && $args['replyto_name'] != '' ) {\n $msg['h:Reply-To'] = $args['replyto_name'] . ' <' . $args['replyto_email'] . '>';\n } else {\n $msg['h:Reply-To'] = $args['replyto_email'];\n }\n }\n // Add the message\n// $msg['text'] = iconv('UTF-8', 'ISO-8859-1//TRANSLIT', $args['textmsg']);\n $msg['text'] = $args['textmsg'];\n if( isset($args['htmlmsg']) && $args['htmlmsg'] != '' ) {\n $msg['html'] = $args['htmlmsg'];\n //$msg['html'] = iconv('UTF-8', 'ISO-8859-1//TRANSLIT', $args['htmlmsg']);\n }\n\n //\n // Send to mailgun api\n //\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($ch, CURLOPT_USERPWD, 'api:' . $settings['mailgun-key']);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');\n curl_setopt($ch, CURLOPT_URL, 'https://api.mailgun.net/v3/' . $settings['mailgun-domain'] . '/messages');\n curl_setopt($ch, CURLOPT_POSTFIELDS, $msg);\n\n $rsp = json_decode(curl_exec($ch));\n\n $info = curl_getinfo($ch);\n if( $info['http_code'] != 200 ) {\n error_log(\"MAIL-ERR: [\" . $user['email'] . \"] \" . $mail->ErrorInfo);\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.users.68', 'msg'=>'Unable to send email: ' . $mail->ErrorInfo));\n }\n curl_close($ch);\n }\n\n //\n // Otherwise send via PHPMailer smtp protocol\n //\n else {\n require_once($ciniki['config']['ciniki.core']['lib_dir'] . '/PHPMailer/class.phpmailer.php');\n require_once($ciniki['config']['ciniki.core']['lib_dir'] . '/PHPMailer/class.smtp.php');\n\n $mail = new PHPMailer;\n\n $mail->SMTPOptions = array(\n 'tls'=>array(\n 'verify_peer'=> false,\n 'verify_peer_name'=> false,\n 'allow_self_signed'=> true,\n ),\n 'ssl'=>array(\n 'verify_peer'=> false,\n 'verify_peer_name'=> false,\n 'allow_self_signed'=> true,\n ),\n );\n\n $mail->IsSMTP();\n\n $use_config = 'yes';\n if( $tnid > 0 ) { \n ciniki_core_loadMethod($ciniki, 'ciniki', 'mail', 'private', 'getSettings');\n $rc = ciniki_mail_getSettings($ciniki, $tnid);\n if( $rc['stat'] == 'ok' && isset($rc['settings'])\n && isset($rc['settings']['smtp-servers']) && $rc['settings']['smtp-servers'] != ''\n// && isset($rc['settings']['smtp-username']) && $rc['settings']['smtp-username'] != ''\n// && isset($rc['settings']['smtp-password']) && $rc['settings']['smtp-password'] != ''\n // && isset($rc['settings']['smtp-secure']) && $rc['settings']['smtp-secure'] != ''\n// && isset($rc['settings']['smtp-port']) && $rc['settings']['smtp-port'] != ''\n ) {\n $mail->Host = $rc['settings']['smtp-servers'];\n if( isset($rc['settings']['smtp-username']) && $rc['settings']['smtp-username'] != '' ) {\n $mail->SMTPAuth = true;\n $mail->Username = $rc['settings']['smtp-username'];\n $mail->Password = $rc['settings']['smtp-password'];\n }\n //$mail->SMTPSecure = $rc['settings']['smtp-secure'];\n if( isset($rc['settings']['smtp-secure']) && $rc['settings']['smtp-secure'] != '' ) {\n $mail->SMTPSecure = $rc['settings']['smtp-secure'];\n }\n if( isset($rc['settings']['smtp-port']) && $rc['settings']['smtp-port'] != '' ) {\n $mail->Port = $rc['settings']['smtp-port'];\n }\n $use_config = 'no';\n\n } \n if( isset($rc['settings']['smtp-from-address']) && $rc['settings']['smtp-from-address'] != ''\n && isset($rc['settings']['smtp-from-name']) && $rc['settings']['smtp-from-name'] != '' ) {\n $mail->From = $rc['settings']['smtp-from-address'];\n $mail->FromName = $rc['settings']['smtp-from-name'];\n } else {\n $mail->From = $ciniki['config']['ciniki.core']['system.email'];\n $mail->FromName = $ciniki['config']['ciniki.core']['system.email.name'];\n }\n } else {\n $mail->From = $ciniki['config']['ciniki.core']['system.email'];\n $mail->FromName = $ciniki['config']['ciniki.core']['system.email.name'];\n }\n \n //\n // If not enough informatio, or none provided, default back to system email\n //\n if( $use_config == 'yes' ) {\n $mail->Host = $ciniki['config']['ciniki.core']['system.smtp.servers'];\n if( isset($ciniki['config']['ciniki.core']['system.smtp.username']) \n && $ciniki['config']['ciniki.core']['system.smtp.username'] != ''\n ) {\n $mail->SMTPAuth = true;\n $mail->Username = $ciniki['config']['ciniki.core']['system.smtp.username'];\n $mail->Password = $ciniki['config']['ciniki.core']['system.smtp.password'];\n }\n if( isset($ciniki['config']['ciniki.core']['system.smtp.secure']) \n && $ciniki['config']['ciniki.core']['system.smtp.secure'] != ''\n ) {\n $mail->SMTPSecure = $ciniki['config']['ciniki.core']['system.smtp.secure'];\n }\n if( isset($ciniki['config']['ciniki.core']['system.smtp.port']) \n && $ciniki['config']['ciniki.core']['system.smtp.port'] != ''\n ) {\n $mail->Port = $ciniki['config']['ciniki.core']['system.smtp.port'];\n }\n }\n\n if( isset($ciniki['config']['ciniki.mail']['force.mailto']) ) {\n $mail->AddAddress($ciniki['config']['ciniki.mail']['force.mailto'], $user['name']);\n $args['subject'] .= ' [' . $user['email'] . ']';\n } else {\n $mail->AddAddress($user['email'], $user['name']);\n }\n\n // Add reply to if specified\n if( isset($args['replyto_email']) && $args['replyto_email'] != '' ) {\n if( isset($args['replyto_name']) && $args['replyto_name'] != '' ) {\n $mail->addReplyTo($args['replyto_email'], $args['replyto_name']);\n } else {\n $mail->addReplyTo($args['replyto_email']);\n }\n }\n\n if( isset($args['htmlmsg']) && $args['htmlmsg'] != '' ) {\n $mail->IsHTML(true);\n $mail->Subject = iconv('UTF-8', 'ISO-8859-1//TRANSLIT', $args['subject']);\n $mail->Body = iconv('UTF-8', 'ISO-8859-1//TRANSLIT', $args['htmlmsg']);\n $mail->AltBody = iconv('UTF-8', 'ISO-8859-1//TRANSLIT', $args['textmsg']);\n } else {\n $mail->IsHTML(false);\n $mail->Subject = iconv('UTF-8', 'ISO-8859-1//TRANSLIT', $args['subject']);\n $mail->Body = iconv('UTF-8', 'ISO-8859-1//TRANSLIT', $args['textmsg']);\n }\n\n if( !$mail->Send() ) {\n error_log(\"MAIL-ERR: [\" . $user['email'] . \"] \" . $mail->ErrorInfo);\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.users.3', 'msg'=>'Unable to send email: ' . $mail->ErrorInfo));\n }\n }\n\n return array('stat'=>'ok');\n}", "title": "" }, { "docid": "86a041041a2178ce733925ec6741d5c5", "score": "0.5429663", "text": "function send_email($subject, $message_body, $user_id) {\r\n $this->initialize($user_id);\r\n $user_info = $this->get('first_name, last_name, email');\r\n $to = $user_info['email'];\r\n $message_top = \"Dear \" . $user_info['first_name'] . \" \" . $user_info['last_name'] . \",\\n\\n\";\r\n $message_bottom = \"\\n\\nRegards,\\nThe RiskMP Team\\n\\nThis email was sent from an unmonitored mailbox.\" .\r\n \" Please do not reply to this message.\";\r\n $message = $message_top . $message_body . $message_bottom;\r\n $command = \"php /var/www.v1.riskmp.com/RichEmailSender.php \\\"$to\\\" \\\"[email protected]\\\" \\\"$subject\\\" \\\"$message\\\" 0 > /dev/null 2>&1 &\";\r\n exec($command);\r\n }", "title": "" }, { "docid": "4384be937a6c2a4adf16024a1b1378da", "score": "0.54267514", "text": "Function ew_SendTemplateEmail($sTemplate, $sSender, $sRecipient, $sCcEmail, $sBccEmail, $sSubject, $arContent) {\r\n\tif ($sSender <> \"\" && $sRecipient <> \"\") {\r\n\t\t$Email = new cEmail;\r\n\t\t$Email->Load($sTemplate);\r\n\t\t$Email->ReplaceSender($sSender); // Replace Sender\r\n\t\t$Email->ReplaceRecipient($sRecipient); // Replace Recipient\r\n\t\tif ($sCcEmail <> \"\") $Email->AddCc($sCcEmail); // Add Cc\r\n\t\tif ($sBccEmail <> \"\") $Email->AddBcc($sBccEmail); // Add Bcc\r\n\t\tif ($sSubject <> \"\") $Email->ReplaceSubject($sSubject); // Replace subject\r\n\t\tif (is_array($arContent)) {\r\n\t\t\tforeach ($arContent as $key => $value)\r\n\t\t\t\t$Email->ReplaceContent($key, $value);\r\n\t\t}\r\n\t\treturn $Email->Send();\r\n\t}\r\n\treturn FALSE;\r\n}", "title": "" }, { "docid": "5173c7ecc1cc753df871a55d702b7bcf", "score": "0.5426084", "text": "function sendMailAgain() {\n\t\t\t\t\t$query =\"SELECT *\n\t\t\t\t\t\tFROM \n\t\t\t\t\t\t\ttbl_mem_login\n\t\t\t\t\t\tINNER JOIN \n\t\t\t\t\t\t\ttbl_mem_details \n\t\t\t\t\t\tON \n\t\t\t\t\t\t\ttbl_mem_login.`bi_MemberId` = tbl_mem_details.`bi_MemberId`\n\t\t\t\t\t\tWHERE \n\t\t\t\t\t\t\ttbl_mem_login.vc_EmailId = '$this->vc_EmailId'\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t$dbQry\t= new dbQuery($query, $this->connect->connId);\n\t\t\t\t\t$this->retrieveLoginRow($dbQry);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$emailTo\t\t\t\t= $this->vc_EmailId;\n\n \t\t\t\t\t$clsbpEmailTemplate\t\t\t= new clsbpEmailTemplate($this->connect,$this->includePath);\n\n \t\t\t\t\t$clsbpEmailTemplate->sendSubject = 'bopaboo Registration Confirmation';\n \t\t\n \t\t\t\t\t \t\t\t\t\t\n \t\t\t\t\t$encodeid\t\t\t\t=base64_encode(base64_encode($this->bi_MemberId));\n\n \t\t\t\t\t$this->songList \t\t\t= base64_encode($this->songList);\n\n \t\t\t\t\t/* Email templete variables*/\n\t\t\t\t\t$clsbpEmailTemplate->additionalField1 \t= $this->vc_FirstName;\n\t\t\t\t\t$clsbpEmailTemplate->additionalField2\t= \"<a style='text-decoration:none; color:#6EA4D1; font-weight:bold;' href='\".HTTP.\"activateAccount.php?bi_MemberId=$encodeid&action=ACTIVATION&songList=$this->songList\".\"'>\".HTTP.\"activateAccount.php?bi_MemberId=$encodeid&action=ACTIVATION&songList=$this->songList\".\"</a>\";\n\t\t\t\t\t$clsbpEmailTemplate->additionalField3 \t= HTTP;\n\t\t\t\t\t$clsbpEmailTemplate->additionalField4\t= \"<a href='\".HTTP.\"activateAccount.php?bi_MemberId=$encodeid&action=ACTIVATION&songList=$this->songList\".\"'><img border='0'; src='\".HTTP.\"emailtemplates/images/btnActivate.jpg'></a>\";\n \n \t\t\t\t\t$sendStatus\t\t\t\t= $clsbpEmailTemplate->send('ACTIVATE',$emailTo,1);\n}", "title": "" }, { "docid": "2de71ad17f8fa95a1b5e5b73db4ab2a2", "score": "0.5422041", "text": "private function sendUsingPHP ()\n {\n\n // Construct Headers\n\n $headers\t= $this->constructHeaders ();\n\n // Get template resource\n\n $tpl\t= \\Sonic\\Sonic::getResource ('tpl');\n\n // Set smarty template status\n\n $smarty\t= $tpl instanceof \\Smarty;\n\n // If we have a smarty template object\n\n if ($smarty)\n {\n\n // Get caching status\n\n $smartyPrevCache\t= $tpl->caching;\n\n // Disable caching\n\n $tpl->setCaching (FALSE);\n\n }\n\n // For each recipient\n\n foreach ($this->_recipients as $recipient)\n {\n\n // Send email\n\n try\n {\n\n // Check to make sure the recipients email address is valid\n\n Parser::_validateEmail ($recipient['email']);\n\n // Set recipient\n\n if (isset($recipient['name'])) {\n $recipientTo = $recipient['name'] . '<' . $recipient['email'] . '>';\n } else {\n $recipientTo = $recipient['email'];\n }\n\n // Add recipient header to original headers\n\n $emailHeaders\t= $headers . 'To: ' . $recipientTo . $this->_nl;\n\n // If we're using smarty\n\n if ($smarty)\n {\n\n // Clear variables\n\n $tpl->clearAllAssign ();\n\n // Assign variables\n\n $tpl->assign ('recipient', $recipient);\n\n // Fetch\n\n $emailMessage\t= $tpl->fetch ('string:' . $this->_message);\n\n }\n\n // Else we're not using smarty\n\n else\n {\n\n // Just leave the message as it is\n\n $emailMessage\t= $this->_message;\n\n }\n\n // Send Message\n\n if (!mail ($recipientTo, $this->_subject, $emailMessage, $emailHeaders))\n {\n\n // Add error and return FALSE\n\n new \\Sonic\\Message ('error', 'Cannot send message to: ' . $recipient['email']);\n\n // return FALSE\n\n return FALSE;\n\n }\n\n if (is_callable($this->_callbackMethod))\n {\n call_user_func ($this->_callbackMethod, $this->_subject, $recipientTo, $this->_fromAddress, $emailMessage);\n }\n\n\n // If we're logging the email\n\n if ($this->logFlag)\n {\n\n // Log\n\n $this->Log ($recipient['email'], $emailHeaders, $emailMessage, 'phpmail');\n\n }\n\n }\n\n // Else the email address is not valid\n\n catch (Parser\\Exception $e)\n {\n\n // Add error\n\n new \\Sonic\\Message ('error', 'Invalid recipient email address: ' . $recipient['email']);\n\n // Skip to next recipient\n\n continue;\n\n }\n\n }\n\n // If we're using smarty\n\n if ($smarty)\n {\n\n // Set caching status\n\n $tpl->caching\t= $smartyPrevCache;\n\n }\n\n // Return TRUE\n\n return TRUE;\n\n }", "title": "" }, { "docid": "579c1acddbdbb78e6acc21a5c5477ca1", "score": "0.5421861", "text": "function send_mail($type,$data)\n{\n global $subject,$robotmail,$userlanguage,$PATH,$SITE_TITLE,$replacearray,$mailtemplates,$mailsystemtemplates;\n switch ($type){\n case \"register\"://'{:sitetitle:}','{:url:}','{:password:}','{:username:}','{:userid:}','{:usermail:}','{:userdata:}','{:subscribe:}','{:unsubscribe:}','{:balance:}','{:refinvite:}'\n $email=$data[2];\n $newvalues=array($SITE_TITLE[$userlanguage],$PATH,$data[3],$data[0],'',$data[2],'','','','','');\n $lettitle=str_replace($replacearray, $newvalues, $mailsystemtemplates['registration'][0]);\n $message=str_replace($replacearray, $newvalues, $mailsystemtemplates['registration'][1]);\n break;\n case \"referal\":\n $email=$data[0];\n $newvalues=array($SITE_TITLE[$userlanguage],$PATH,'',$data[1],$data[2],$data[0],'','','',$data[3],$data[4]);\n $lettitle=str_replace($replacearray, $newvalues, $mailtemplates['referal'][0]);\n $message=str_replace($replacearray, $newvalues, $mailtemplates['referal'][1]);\n //echo $message.\"referal\";\n break;\n }\n //echo $robotmail.\"\\n<br>\";\n //echo $lettitle.\"\\n<br>\";\n //echo $email.\"\\n<br>\";\n //echo $message;\n $from=$robotmail;\n /*\n $ltitle=\"=?koi8-r?B?\".base64_encode(iconv(\"UTF-8\", \"koi8-r\", $lettitle)).\"?=\";\n $mess=iconv(\"UTF-8\", \"koi8-r\", $message);\n //$headers=\"From: =?koi8-r?B?\".base64_encode(iconv(\"UTF-8\", \"koi8-r\", $SITE_TITLE[$userlanguage])).\"?= <\".trim($from).\">\\r\\nReply-to: =?koi8-r?B?\".base64_encode(iconv(\"UTF-8\", \"koi8-r\", \"From\")).\"?= <\".trim($from).\">\\r\\nContent-type: text/html; charset=koi8-r\\r\\nContent-Transfer-Encoding: 8bit\\r\\n\";//От кого\n //1\n //$headers = \"From: \\\"\".$SITE_TITLE[$userlanguage].\"\\\" <[email protected]>\\n\";\n //$headers .= \"Content-type: text/plain; charset=\\\"utf-8\\\"\";\n //2\n $headers = 'MIME-Version: 1.0' . \"\\n\";\n $headers .= \"From: \\\"\".$SITE_TITLE[$userlanguage].\"\\\" <[email protected]>\\n\";\n $headers .= 'Content-type: text/html; charset=UTF-8';\n \n $ltitle='=?UTF-8?B?'.base64_encode($lettitle).'?=';\n //$mess=$message;\n mail($email,$ltitle,$mess,$headers);\n */\n ini_set(\"sendmail_from\", $from);\n mail($email, $lettitle, $message, \"From: <\" . $from . \"> -f\" . $from) or die(\"Unfortunately, a server issue prevented delivery of your message.\");\n //echo \"mail('\".$email.\"','\".$lettitle.\"','\". $message.\"',\\\"From: < \". $from .\"> -f\". $from.\" );\";\n //var_dump($email);echo \"\\n\\n\";\n //var_dump($lettitle);echo \"\\n\\n\";\n //var_dump($message);echo \"\\n\\n\";\n //var_dump($from);\n \n //echo $SITE_TITLE[$userlanguage].\"\\n<br>\";\n //echo $headers.\"\\n<br>\";\n //echo $ltitle.\"\\n<br>\";\n //echo $message;\n}", "title": "" }, { "docid": "8cd3364e06f10e40727665a0d2ef4cdc", "score": "0.5419536", "text": "function sendEmails($from, $templateName, $emailArray, $useCache = false) {\n\t\t$errors = array();\n\t\t\t\t\n\t\t// Loop through $emailArray sending one email per entry\n\t\tforeach ($emailArray as $email) {\n\t\t\t// Configure the Rmail object. As there is no removeAttachments method we need to do this once per mail.\n\t\t\t$mail = new Rmail();\t\n\t\t\t$mail->setHTMLCharset('UTF-8');\n\t\t\t$mail->setTextCharset('UTF-8');\n\t\t\t$mail->setTextEncoding(new EightBitEncoding());\n\t\t\t$mail->setHTMLEncoding(new EightBitEncoding());\n\t\t\t$mail->setSMTPParams($GLOBALS['rmail_smtp_host'], $GLOBALS['rmail_smtp_port'], $GLOBALS['rmail_smtp_helo'], $GLOBALS['rmail_smtp_auth'], $GLOBALS['rmail_smtp_username'], $GLOBALS['rmail_smtp_password']);\n\t\t\t// v3.5 You might have sent $from in the parameters, or you might get it from the template.\n\t\t\t// This is just the default.\n\t\t\t//$mail->setFrom($GLOBALS['rmail_from']);\n\t\t\t$useFrom = $GLOBALS['rmail_from'];\n\t\t\t\n\t\t\t$to = $email['to'];\n\t\t\t$data = $email['data'];\n\t\t\t\n\t\t\t$emailHTML = $this->templateOps->fetchTemplate(\"emails/\".$templateName, $data, $useCache);\n\t\t\t\n\t\t\t// Get the subject of the email from the <title></title> tag\n\t\t\t$mail->setSubject($this->getSubjectFromHTMLTitle($emailHTML));\n\t\t\t$mail->setHTML($emailHTML);\n\n\t\t\t// Check if there is a from in the template - will only be expecting one\n\t\t\t$templateFrom = $this->getFromFromTemplate($emailHTML); \n\t\t\tif (isset($templateFrom) && $templateFrom!='') {\n\t\t\t\t$useFrom = $templateFrom;\n\t\t\t}\n\t\t\t$mail->setFrom($useFrom);\n\t\t\t\n\t\t\t// Check if any cc or bcc from the template (must be written in the header in comments)\n\t\t\t$ccArray = array($this->getCcFromTemplate($emailHTML)); \n\t\t\t$bccArray = array($this->getBccFromTemplate($emailHTML));\n\t\t\t// Check if there is any cc or bcc set in the $email object\n\t\t\tif (isset($email['cc'])) {\n\t\t\t\t$ccArray = array_merge($ccArray,$email['cc']);\n\t\t\t}\n\t\t\tif (isset($email['bcc'])) {\n\t\t\t\t$bccArray = array_merge($bccArray,$email['bcc']);\n\t\t\t}\n\t\t\t// implode and explode to make certain that there are no comma delimitted string as single elements\n\t\t\t$ccArray = explode(\",\", implode(\",\", $ccArray));\n\t\t\t$bccArray = explode(\",\", implode(\",\", $bccArray));\n\t\t\t// Use a marker to be able to split cc and bcc later\n\t\t\t$bccStartMarker = array('bccStart');\n\n\t\t\t// I would like to remove any duplicates - which can easily happen for resellers\n\t\t\t// Remove to from cc and bcc\n\t\t\t$toArray = array($email['to']);\n\t\t\t$fullArray = array_unique(array_merge($toArray, $ccArray, $bccStartMarker, $bccArray));\n\t\t\t//$fullArray = array_merge($toArray, $ccArray, $bccStartMarker, $bccArray);\n\t\t\t// Dump the 'to'\n\t\t\tarray_shift($fullArray);\n\t\t\t// Find the bccStartMarker to split cc and bcc\n\t\t\t$bccKey = array_search('bccStart',$fullArray);\n\t\t\t$ccArray = array_slice($fullArray, 0, $bccKey);\n\t\t\t$bccArray = array_slice($fullArray, $bccKey + 1);\n\t\t\t\n\t\t\t// Put cleaned data into the mail class\n\t\t\t$mail->setCc(implode(\",\",$ccArray));\n\t\t\t$mail->setBcc(implode(\",\",$bccArray));\n\n\t\t\t// Does the template list any attachment file?\n\t\t\tif ($this->getAttachmentFromTemplate($emailHTML)) {\n\t\t\t\t//echo \"try to add \".$this->getAttachmentFromTemplate($emailHTML);\n\t\t\t\t$attachments = array(new fileAttachment($this->getAttachmentFromTemplate($emailHTML)));\n\t\t\t} else {\n\t\t\t\t$attachments = array();\n\t\t\t}\n\t\t\t\n\t\t\t// Add any attachments in the email\n\t\t\t// See subscriptionOps->sendSupplierEmail for example of sending attachments in emailArray\n\t\t\tif (isset($email['attachments'])) {\n\t\t\t\t//$attachments = $email['attachments'];\n\t\t\t\t$attachments = array_merge($attachments, $email['attachments']);\n\t\t\t}\n\t\t\tif ($attachments) {\n\t\t\t\tforeach ($attachments as $attachment) {\n\t\t\t\t\t$mail->addAttachment($attachment);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Just for testing if I just want the emails to come to me\n\t\t\t//$to = '[email protected]';\n\t\t\t//$mail->setCc('');\n\t\t\t//$mail->setBcc('');\n\t\t\t\n\t\t\t// Do the send\n\t\t\t$result = $mail->send(array($to), \"smtp\");\n\t\t\t$ccList = implode(\",\",$ccArray);\n\t\t\tif (!$result) {\n\t\t\t\t$logMsg = \"Email error: \".$mail->errors[0].\" sending $to with template $templateName\";\n\t\t\t} else {\n\t\t\t\t$logMsg = \"Sent email to $to with template $templateName and subject {$this->getSubjectFromHTMLTitle($emailHTML)} from $useFrom cc $ccList\";\n\t\t\t}\n\t\t\tAbstractService::$log->notice($logMsg);\n\t\t\t\n\t\t\tif (!$result) $errors = $mail->errors;\n\t\t}\n\t\t\n\t\t// Return any errors\n\t\treturn $errors;\n\t}", "title": "" }, { "docid": "7c629e86cf03a84d8ca3e50653b93a53", "score": "0.5417692", "text": "function send()\n\t{\n\t $mainframe = &JFactory::getApplication();\n\t\t// Check for request forgeries\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n \t//get a refrence of the page instance in joomla \n \t$document=& JFactory::getDocument(); \n \t//get the view name from the query string \n \t$viewName = JRequest::getVar('view', 'form'); \n\t //get our view \n\t $viewType= $document->getType(); \n \t$view = &$this->getView('form', $viewType); \n \t$viewName = \"form\";\n \t//get the model \n \t$model = &$this->getModel($viewName, 'ModelhecMailing');\n \n\t\t$attach_path=''; \n\t\t$session =& JFactory::getSession();\n\t $db\t=& JFactory::getDBO();\n\t \t\n\t jimport( 'joomla.mail.helper' );\n\t \n \t\t$SiteName \t= $mainframe->getCfg('sitename');\n \t\t$MailFrom \t= $mainframe->getCfg('mailfrom');\n \t\t$FromName \t= $mainframe->getCfg('fromname');\n \t\t\n \t\t$link \t\t= base64_decode( JRequest::getVar( 'link', '', 'post', 'base64' ) );\n\t \t\t\n\t $params = &JComponentHelper::getParams( 'com_hecmailing' );\n\t \t\t\n\t\t\n\t\t// An array of e-mail headers we do not want to allow as input\n\t\t$headers = array (\t'Content-Type:',\n\t\t\t\t\t\t\t'MIME-Version:',\n\t\t\t\t\t\t\t'Content-Transfer-Encoding:',\n\t\t\t\t\t\t\t'bcc:',\n\t\t\t\t\t\t\t'cc:');\n\t\n\t // An array of the input fields to scan for injected headers\n\t $fields = array ('mailto',\n\t\t\t\t\t\t 'sender',\n\t\t\t\t\t\t 'from',\n\t\t\t\t\t\t 'subject');\n\n\t /*\n\t * Here is the meat and potatoes of the header injection test. We\n\t * iterate over the array of form input and check for header strings.\n\t * If we find one, send an unauthorized header and die.\n\t */\n\t foreach ($fields as $field)\n\t {\n\t\t foreach ($headers as $header)\n\t\t {\n\t\t \tif (array_key_exists ( $field , $_POST ))\n\t\t \t {\n\t\t\t\t if (strpos($_POST[$field], $header) !== false)\n\t\t\t\t {\n\t\t\t\t\t JError::raiseError(403, '');\n\t\t\t\t }\n\t\t \t }\n\t\t }\n\t }\n\n \t\t/*\n \t\t * Free up memory\n \t\t */\n \t\tunset ($headers, $fields);\n\n\t\t/* Get options from post */ \t\t\n \t\t$useprofil \t\t = JRequest::getString('useprofil', 0, 'post');\n \t\t$image_incorpore = JRequest::getString('incorpore', 0, 'post');\n \t\t$logmail \t\t = JRequest::getString('backup_mail', 0, 'post');\n\t\t\n\t\t// Get from field and decode name and email from it (from;sender) \t\t\n \t\t$fromvalue \t\t = JRequest::getString('from', $MailFrom.';'.$FromName, 'post');\n\t\t$tmp = explode(\";\" , $fromvalue);\n\t\t$from=$tmp[0];\n\t\t$sender=$tmp[1];\n\t\t\t\n\t\t// Get subject and body\n \t\t$subject_default \t= JText::sprintf('COM_HECMAILING_DEFAULT_SUBJECT', $sender);\n \t\t$subject \t\t\t= JRequest::getString('subject', $subject_default, 'post');\n \t\t$body \t\t\t\t= JRequest::getVar('body', '', 'post', 'string', JREQUEST_ALLOWRAW);\n \t$groupe \t\t= JRequest::getString('groupe', '', 'post');\n $sendcount = intval($params->get('send_count', 1));\n \n\t // Get attachments\n \t\t$attach = array();\n \t\t$files = array();\n \t\t$pj_uploaded = array();\n \t\t$nbattach = JRequest::getInt('attachcount', 0, 'post');\t// attachment count\n \t\t\n \t\t// if email must be saved, temporary attachment path become saved attachment path\n \t\t// in order to be able to send again the mail and is attachments\n \t\tif (intval($logmail)==1)\t\n \t\t{\n \t\t\t$attach_path=$params->get('attach_path', $attach_path);\n \t\t\t$path = realpath(JPATH_ROOT).DS;\t// Get path root\n \t\t}\n \t\telse\n \t\t{\n \t\t\t$attach_path = $mainframe->getCfg('tmp_path');\t// temporary attachment path\n \t\t\t$path=\"\";\n \t\t}\n \t\t\n \t\t\n \t\t// Create attachment directory if doesn't exist\n \t\tif (!JFolder::exists($path.$attach_path))\n \t\t{\n \t\t\t// Create directory\n \t\t\tif (!JFolder::create($path.$attach_path))\n \t\t\t{\n \t\t\t\t$error\t= JText::sprintf('COM_HECMAILING_CANT_CREATE_DIR', $path.$attach_path);\n\t\t\t\tJError::raiseWarning(0, $error );\n \t\t\t}\n \t\t\t// Create dummy index.html file for prevent list directory content\n \t\t\t$text=\"<html><body bgcolor=\\\"#FFFFFF\\\"></body></html>\";\n \t\t\tJFile::write($path.$attach_path.DS.\"index.html\",$text);\n \t\t}\n \t\t\n \t\t// Process uploaded files\n \t\tfor($i=1;$i<=$nbattach;$i++)\n \t\t{\n \t\t\t// Get uploaded files \n\t\t\t\t$file = JRequest::getVar('attach'.$i, null, 'files', 'array');\n\t\t\t\t$filename = JFile::makeSafe($file['name']);\n\t\t \t$src = $file['tmp_name'];\n\t\t \tif ($src!='')\n\t\t \t{\n\t\t \t\t\t\t//Set up the source and destination of the file\n\t\t \t\t\t\t$dest = $attach_path.DS.$file['name'];\n\t\t \t\t\t\t// Upload uploaded file to attchment directory (temp or saved dir)\n\t\t \t\t\t\tJFile::upload($src, $path.$dest);\n\t\t \t\t\t\t$attach[] = $path.DS.$dest;\n\t\t \t\t\t\t$files[] = $dest;\n\t\t \t\t\t\t// Bug #3013589 : Delete Failed message\n\t\t \t\t\t\t//$pj_uploaded[] = $path.DS.$dest;\n\t\t \t\t\t\t$pj_uploaded[] = $path.$dest;\n\t\t\t\t}\n \t\t}\n \t\t// Process hosted files attachment\n \t\t$nblocal = JRequest::getInt('localcount', 0, 'post');\n \t\t$local = array();\n \t\t$img=\"\";\n \t\t\n \t\t// for each file ...\n \t\tfor($i=1;$i<=$nblocal;$i++)\n \t\t{\n \t\t\t// Check if checkbox is checked yet (not canceled)\n \t\t\t$isok = JRequest::getString('chklocal'.$i, 'c', 'post');\n \t\t\tif ($isok!='')\n \t\t\t{\n \t\t\t\t// Get file\n \t\t\t$file = JRequest::getString('local'.$i, '', 'post');\n\t\t\t\t$filename = $file;\n\t\t\t\t// add it in attachment list\t\t\t\t\t\t\n\t\t\t\t$attach[] = $path.DS.$filename;\n\t\t\t\t$files[]=$filename;\n\t\t\t}\n \t\t}\n\t\t// Check for a valid to address\n\t\t$error\t= false;\n\t\t$body = \"<html><head></head><body>\".$body.\"</body></html>\";\n\t\t\n\t\t// Check for a valid from address\n\t\tif ( ! $from || ! JMailHelper::isEmailAddress($from) )\n\t\t{\n\t\t\t$error\t= JText::sprintf('COM_HECMAILING_EMAIL_INVALID', $fromvalue .\"/\".$from.\"/\".$sender);\n\t\t\tJError::raiseWarning(0, $error );\n\t\t}\n\n\t\t// Clean the email data\n\t\t$subject = JMailHelper::cleanSubject($subject);\n\t\t$body\t = JMailHelper::cleanBody($body);\n\t\t$sender\t = JMailHelper::cleanAddress($sender);\n\t\t\n\t\t$inline=array();\n\t\t$bodytolog = $body;\n\n\t\t// if embedded image is enabled\n\t\tif ($image_incorpore=='1')\n\t\t{\n\t\t\t// Search and replace 'src=\"' by 'src=cid:...' in order to tell to mail software to use specifique embedded image attachment\n\t\t\t$pos= stripos($body,\" src=\\\"\");\n\t\t\twhile ($pos!==FALSE)\n\t\t\t{\n\t\t\t\t$pos+=6;\n\t\t\t\t// search next \"\n\t\t\t\t$posfin= stripos($body,\"\\\"\", $pos+1);\n\t\t\t\t// get src url\n\t\t\t\t$url = substr($body, $pos, $posfin-$pos);\n\t\t\t\t// create a dummy cid number\n\t\t\t\t$cur=count($inline);\n\t\t\t\t$cid= \"12345612345-\".$cur;\n\t\t\t\t// Get file name from url\n\t\t\t\t$name = JFile::getName($url);\n\t\t\t\t// save current embedded (cid, name, path)\n\t\t\t\t$inline[$cur][1]=$cid;\n\t\t\t\t$inline[$cur][2]=$name;\n\t\t\t\t$inline[$cur][0]=$path.DS.$url;\n\t\t\t\t// replace img source by cid number\n\t\t\t\t$body=substr($body,0,$pos).\"cid:\".$cid.substr($body,$posfin);\n\t\t\t\t$posfin++;\n\t\t\t\t// Next image\n\t\t\t\t$pos=stripos($body,\" src=\\\"\",$posfin); \n\t\t\t}\n\t\t}\n\t\telse\t// if embedded image is disabled -> link use\n\t\t{\n\t\t\t// search and replace relative image url (without http://) by absolute image url \n\t\t\t// by concat relative path with site url\n\t\t\t$pos= stripos($body,\" src=\\\"\");\n\t\t\twhile ($pos!==FALSE)\n\t\t\t{\n\t\t\t\t$pos+=6;\n\t\t\t\t// get next double quote \"\n\t\t\t\t$posfin= stripos($body,\"\\\"\", $pos+1);\n\t\t\t\t// get image url\n\t\t\t\t$url = substr($body, $pos, $posfin-$pos);\n\t\t\t\t// if relative url (don't start with http://)\n\t\t\t\tif (stripos($url,\"http://\")===FALSE)\n\t\t\t\t{\n\t\t\t\t\t$url=JURI::base().$url; // add website base url\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Replace image url by new\n\t\t\t\t$body=substr($body,0,$pos).$url.substr($body,$posfin);\n\t\t\t\t$posfin++;\n\t\t\t\t// search next image\n\t\t\t\t$pos=stripos($body,\" src=\\\"\",$posfin); \n\t\t\t}\n\t\t}\n\t\t\n\t\t// Process hyperlink : Replace relative url by absolute url for link with relative path (without http://)\n\t\t$pos= stripos($body,\" href=\\\"\");\n\t\twhile ($pos!==FALSE)\n\t\t{\n\t\t\t$pos+=7;\n\t\t\t// find next double quote \"\n\t\t\t$posfin= stripos($body,\"\\\"\", $pos+1);\n\t\t\t// get hyperlink url\n\t\t\t$url = substr($body, $pos, $posfin-$pos);\n\t\t\t// if it's relative url\n\t\t\tif (stripos($url,\"http://\")===FALSE)\n\t\t\t{\n\t\t\t\t$url=JURI::base().$url; // add website absolute url to relative url\n\t\t\t}\n\t\t\t// replace source hyperlink url by new\n\t\t\t$body=substr($body,0,$pos).$url.substr($body,$posfin);\n\t\t\t$posfin++;\n\t\t\t// search next hyperlink\n\t\t\t$pos=stripos($body,\" href=\\\"\",$posfin); \n\t\t}\n\t\t$errors=0;\n\t\t$lstmailok=array();\n \t\t$lstmailerr=array();\n \t$list=array();\n \t\n \tif ($groupe>=0)\t// if group selected\n \t{\n\t \t// Get email list from groupe\n\t $detail = $model->getMailAdrFromGroupe($groupe,$useprofil);\n\t $nb=0;\n\t foreach($detail as $elmt)\t// send to each email\n\t {\n\t\t $email = $elmt[0];\n\t\t // check email\n\t\t if ( ! $email || ! JMailHelper::isEmailAddress($email) )\n\t\t \t \t {\n\t\t \t \t\t// Bad email --> Add warning and add error counter, but don't send email\n\t\t \t\t\t$error\t= JText::sprintf('COM_HECMAILING_EMAIL_INVALID', $email, $elmt[1]);\n\t\t \t\t\tJError::raiseWarning(0, $error );\n\t\t \t\t\t$errors++;\n\t\t \t }\n\t\t else\n\t\t {\n\t\t \t\t// Correction pour J2.5 et envoi par bloc\n\t\t \t\t$emailNamed = array($email,$elmt[1]);\n\t\t \t\t$list[] = $emailNamed;\n\t\t \t\t\t\t\n\t\t \t\t\t// Send the email\n\t\t \t\t\tif (count($list)>= $sendcount)\n\t\t \t\t\t{\n\t\t\t \t\tif ( $this->sendMail($from, $sender, null, $subject, $body,true,null,$list,$attach,null,null, $inline) !== true )\n\t\t\t \t\t{\n\t\t\t \t\t\t// Error while sending email --> Add Error ...\n\t\t\t \t\t $error\t= JText::sprintf('COM_HECMAILING_EMAIL_NOT_SENT', join(\";\",$list), count($list));\n\t\t\t \t\t\tJError::raiseNotice( 500, $error);\n\t\t\t \t\t\t$errors+=count($list);\n\t\t\t \t\t\t$lstmailerr = array_merge($lstmailerr,$list);\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// email ok ...\n\t\t\t \t\t\t$nb+=count($list);\n\t\t\t \t\t\t$lstmailok = array_merge($lstmailok,$list);\n\t\t\t \t\t}\n\t\t\t \t\t$list=array();\n\t\t \t\t\t}\n\t\t \t\t}\n\t\t }\n\t\t // Send the email\n\t\t if (count($list)>= 1)\n\t\t {\n\t\t \tif ( $this->sendMail($from, $sender, null, $subject, $body,true,null,$list,$attach,null,null, $inline) !== true )\n\t\t \t{\n\t\t \t\t// Error while sending email --> Add Error ...\n\t\t \t\t$error\t= JText::sprintf('COM_HECMAILING_EMAIL_NOT_SENT', join(\";\",$list), count($list));\n\t\t \t\tJError::raiseNotice( 500, $error);\n\t\t \t\t$errors+=count($list);\n\t\t \t\t$lstmailerr = array_merge($lstmailerr,$list);\n\t\t \t}\n\t\t \telse\n\t\t \t{\n\t\t \t\t// email ok ...\n\t\t \t\t$nb+=count($list);\n\t\t \t\t$lstmailok = array_merge($lstmailok,$list);\n\t\t \t}\n\t\t \t$list=array();\n\t\t }\n\t }\n \n \t// Save sent email if needed\n \tif (intval($logmail)==1)\n \t{\n \t\t$user =&JFactory::getUser();\n \t\t// Insert email info\n \t\t//Create data object\n\t $rowdetail = new JObject();\n\t $rowdetail->log_dt_sent = & JFactory::getDate()->toFormat();\n\t $rowdetail->log_vl_subject = $subject ;\n\t $rowdetail->log_vl_body = $bodytolog ;\n\t $rowdetail->log_vl_from = $from ;\n\t $rowdetail->grp_id_groupe = $groupe ;\n\t $rowdetail->usr_id_user = $user->id ;\n\t $rowdetail->log_bl_useprofil = $useprofil ;\n\t $rowdetail->log_nb_ok = $nb ;\n\t $rowdetail->log_nb_errors = $errors ;\n\t $func = function($value) {\n\t \treturn $value[0];\n\t };\n\t $rowdetail->log_vl_mailok = join(\";\", array_map($func,$lstmailok)) ;\n\t $rowdetail->log_vl_mailerr = join(\";\",array_map($func,$lstmailerr)) ;\n \n \t\t//Insert new record into groupdetail table.\n \t$ret = $db->insertObject('#__hecmailing_log', $rowdetail);\n \t\t\n \t\t$logid = $db->insertid(); \n \t\t// Insert attachments\n \t\tforeach($files as $file)\n \t\t{\n \t\t $rowfile = new JObject();\n\t $rowfile->log_id_message =$logid ;\n\t $rowfile->log_nm_file = $file ;\n\t $ret = $db->insertObject('#__hecmailing_log_attachment', $rowfile);\n \t\t}\n\t }\n\t else\t// if we don't save sent email we can delete uploaded attachments\n\t {\n\t \tJFile::delete($pj_uploaded);\n }\n\t \n $msg=JText::_(\"COM_HECMAILING_EMAIL_SENT\"). \"(\".$nb.JText::_(\"COM_HECMAILING_SEND_OK\").\"/\".$errors.JText::_(\"COM_HECMAILING_SEND_ERR\").\")\";\n \t\tif ($logid>0)\n \t\t$return = JRoute::_(JURI::current().'?idlog='.$logid.'&task=viewlog');\t\t\n \telse\n \t\t$return = JRoute::_(JURI::base());\n \t\t$this->setRedirect( $return, $msg );\n\t}", "title": "" } ]
2d8614f5e735a4baaf6a2fd8471bd7bf
Sets the appointment phone.
[ { "docid": "9c8ce9276c89db894c985ec11fd10338", "score": "0.7864378", "text": "public function setAppointmentPhone($phone) {\n $this->set('appointment_phone', $phone);\n return $this;\n }", "title": "" } ]
[ { "docid": "eb270a82862c02710e3d7dd6de7b2e12", "score": "0.7153062", "text": "public function setPhone($phone);", "title": "" }, { "docid": "b0b8dc2e48cc5b89ce7d1f0b22a0317f", "score": "0.69772774", "text": "public function getAppointmentPhone() {\n return $this->get('appointment_phone')->value;\n }", "title": "" }, { "docid": "9576240f2698448ae4396c6c1a2bde91", "score": "0.6925353", "text": "public function setPhone($phone)\r\n {\r\n $this->_phone = $phone;\r\n }", "title": "" }, { "docid": "276d861a1f98eaac277810454c338ea3", "score": "0.6746585", "text": "public function setPhone(string $value);", "title": "" }, { "docid": "b3fb2154147595b864098ddd3b4d1aba", "score": "0.6624448", "text": "public function setTelephone( $telephone );", "title": "" }, { "docid": "ee1471a1ae26c5ff3073665352188f5e", "score": "0.6603936", "text": "function setPhone($new_phone)\n {\n $this->schoolPhone = $new_phone;\n }", "title": "" }, { "docid": "5b55090b8987f176952e0f2a26ee9e7f", "score": "0.65947443", "text": "public function setPhoneAttribute($value)\n {\n $this->attributes['phone'] = $this->fixPhone($value);\n }", "title": "" }, { "docid": "f14e25f2f3f96872e03157c70e6e280f", "score": "0.6563641", "text": "public function setPhone(string $newPhone): void;", "title": "" }, { "docid": "8109f763e2dfbd6942a1c8a385a07251", "score": "0.6391153", "text": "public function setPhone($value)\n {\n return $this->set(self::phone, $value);\n }", "title": "" }, { "docid": "958e38b4507b77ecdb8fff6c356ccfea", "score": "0.6296913", "text": "public function setPhone($var)\n {\n GPBUtil::checkString($var, True);\n $this->phone = $var;\n\n return $this;\n }", "title": "" }, { "docid": "a046045995c5f2ccbf1305057f611127", "score": "0.6284499", "text": "public function setTelephone($telephone)\n {\n $this->telephone = $telephone;\n }", "title": "" }, { "docid": "121b8f0b7b6470f7a1e8d892037c9cf0", "score": "0.6230074", "text": "public function setPhoneAttribute($input)\n {\n $this->attributes['phone'] = $input ? $input : null;\n }", "title": "" }, { "docid": "1a2e7480f2a81ca7b84cac37ac0a2a37", "score": "0.6224063", "text": "public function setPhone($phone)\r\n {\r\n $this->phone = $phone;\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "9bd6e405de2590aa94697d7bb0b271c8", "score": "0.61902034", "text": "function setPhone($inPhone) {\n\t\tif ( $inPhone !== $this->_Phone ) {\n\t\t\t$this->_Phone = $inPhone;\n\t\t\t$this->setModified();\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "eff84ad8890329449e9becef0a3fa908", "score": "0.6183266", "text": "public function setPhone(?string $phone): self\n {\n $this->phone = $phone;\n\n return $this;\n }", "title": "" }, { "docid": "eff84ad8890329449e9becef0a3fa908", "score": "0.6183266", "text": "public function setPhone(?string $phone): self\n {\n $this->phone = $phone;\n\n return $this;\n }", "title": "" }, { "docid": "08961fc3cb0bc535c0b3be3a64e8506c", "score": "0.61824566", "text": "public function setPhone($phone)\n {\n if( ! $phone instanceof Phone )\n {\n\n $properties = new \\stdClass();\n $properties->number = $phone;\n $phone = $this->getDataStore()->instantiate(\n Stormpath::PHONE,\n $properties\n );\n\n $this->setProperty(self::PHONE, $phone);\n return $this;\n }\n\n $this->setResourceProperty(self::PHONE, $phone);\n return $this;\n\n\n }", "title": "" }, { "docid": "4c74b28d72e9f43ffc7ca9827f8e72ec", "score": "0.6176042", "text": "public function setPhone($phone)\n {\n $this->phone = $phone;\n return $this;\n }", "title": "" }, { "docid": "4c74b28d72e9f43ffc7ca9827f8e72ec", "score": "0.6176042", "text": "public function setPhone($phone)\n {\n $this->phone = $phone;\n return $this;\n }", "title": "" }, { "docid": "c398977c26fd367726463c034427d1b4", "score": "0.612009", "text": "public function phone_number($phone) { \n $this->data = \"TEL:\" . $phone; \n }", "title": "" }, { "docid": "7311a0aad8169f6fc198eb52b82c5731", "score": "0.60482025", "text": "public function setPhone($phone)\n {\n $this->setPrimaryPhone($phone);\n\n return $this;\n }", "title": "" }, { "docid": "d84dc20e03250bc3340e868f05bc2832", "score": "0.6046976", "text": "public function setPhone($phone)\n {\n $this->phone = $phone;\n\n return $this;\n }", "title": "" }, { "docid": "d84dc20e03250bc3340e868f05bc2832", "score": "0.6046976", "text": "public function setPhone($phone)\n {\n $this->phone = $phone;\n\n return $this;\n }", "title": "" }, { "docid": "d84dc20e03250bc3340e868f05bc2832", "score": "0.6046976", "text": "public function setPhone($phone)\n {\n $this->phone = $phone;\n\n return $this;\n }", "title": "" }, { "docid": "d84dc20e03250bc3340e868f05bc2832", "score": "0.6046976", "text": "public function setPhone($phone)\n {\n $this->phone = $phone;\n\n return $this;\n }", "title": "" }, { "docid": "d84dc20e03250bc3340e868f05bc2832", "score": "0.6046976", "text": "public function setPhone($phone)\n {\n $this->phone = $phone;\n\n return $this;\n }", "title": "" }, { "docid": "d84dc20e03250bc3340e868f05bc2832", "score": "0.6046976", "text": "public function setPhone($phone)\n {\n $this->phone = $phone;\n\n return $this;\n }", "title": "" }, { "docid": "d84dc20e03250bc3340e868f05bc2832", "score": "0.6046976", "text": "public function setPhone($phone)\n {\n $this->phone = $phone;\n\n return $this;\n }", "title": "" }, { "docid": "464bca14f9ff89f89745a26d6f8e8942", "score": "0.6044173", "text": "public function setPhone(Phone $phone)\n {\n $this->phone = $phone;\n\n return $this;\n }", "title": "" }, { "docid": "b14ed90a9b9e1d9b8ef9adadb58b4b3c", "score": "0.60384727", "text": "public function setDayPhone($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->day_phone !== $v) {\n\t\t\t$this->day_phone = $v;\n\t\t\t$this->modifiedColumns[] = PersonPeer::DAY_PHONE;\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "36a5b08ef10a5e95ff2ada3c77ab7f80", "score": "0.6017141", "text": "function add_phone($phoneObj)\r\n {\r\n \r\n $this->phone = $phoneObj;\r\n \r\n }", "title": "" }, { "docid": "ccfe6af8ae786578e9a546af4c393dff", "score": "0.60059714", "text": "public function setPhone($phone): self\n {\n $this->phone = $phone;\n\n return $this;\n }", "title": "" }, { "docid": "9973cfafa42164f8ce8a2e9ae9b09ec1", "score": "0.5992177", "text": "function setMeetHostPhone($txt)\n {\n $this->_meet_host_phone = $txt ;\n }", "title": "" }, { "docid": "c711832debe9af8fef8197055377dfb6", "score": "0.5985352", "text": "public function setPhoneNumber($val)\n {\n $this->_propDict[\"phoneNumber\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "d88985ad75b5053758bf0bf6bbf62d3d", "score": "0.59167314", "text": "public function setPhone($phone, $ignoredArgument = false) {\n\t\t$this->setColumn('phone', $phone, $ignoredArgument);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "4429ebebabcf5cda4421be01ba00cf5e", "score": "0.5885018", "text": "public function setMobilePhone($val)\n {\n $this->_propDict[\"mobilePhone\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "77688c92f8d7ee8e3ea1b8217e1fc5c5", "score": "0.58611727", "text": "function setPhoneNumber($customerPhone){\n $this->customerPhone = $customerPhone;\n return $this;\n }", "title": "" }, { "docid": "313f3d956875a4324b7b9976e0bdec4d", "score": "0.5806135", "text": "public function setPhoneNumber($phoneNumber) {\n $this->phoneNumber = $phoneNumber;\n }", "title": "" }, { "docid": "9989885d1d558c1e1fdfb2bd982d543b", "score": "0.58023876", "text": "public function setPhoneNumber($number)\n {\n $this->data['phone'] = $number;\n }", "title": "" }, { "docid": "bc837906048943c9d9a0a162851275fb", "score": "0.57963544", "text": "public function setPhone($phone = null)\n {\n // validation for constraint: string\n if (!is_null($phone) && !is_string($phone)) {\n throw new \\InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($phone, true), gettype($phone)), __LINE__);\n }\n if (is_null($phone) || (is_array($phone) && empty($phone))) {\n unset($this->phone);\n } else {\n $this->phone = $phone;\n }\n return $this;\n }", "title": "" }, { "docid": "0bf7ad1b0aa1f2e9fc096b68e9925b9a", "score": "0.5791968", "text": "public function setPhone(Int $phone)\n {\n $this->phone = $phone;\n\n return $this;\n }", "title": "" }, { "docid": "ad72a446b630f349d450b11be9995bd8", "score": "0.5769585", "text": "public function setPhoneNumber(?string $phoneNumber): void\n {\n $this->phoneNumber = $phoneNumber;\n }", "title": "" }, { "docid": "ad72a446b630f349d450b11be9995bd8", "score": "0.5769585", "text": "public function setPhoneNumber(?string $phoneNumber): void\n {\n $this->phoneNumber = $phoneNumber;\n }", "title": "" }, { "docid": "f1b6231d644f2aa3ef09ed114cf29b75", "score": "0.57263684", "text": "public function setTelephone($telephone) {\n $this->_set('telephone', $telephone);\n return $this;\n }", "title": "" }, { "docid": "5aeca49788266c9aeff7d5d0e72c3c90", "score": "0.5701414", "text": "public function setCellPhone($arg) {\n $this->_setField('cellphone', $arg);\n }", "title": "" }, { "docid": "fc3f57e42e6c2227aa3446ef7a592083", "score": "0.5698968", "text": "public function setPhone($phone = null)\n {\n // validation for constraint: string\n if (!is_null($phone) && !is_string($phone)) {\n throw new \\InvalidArgumentException(sprintf('Invalid value, please provide a string, \"%s\" given', gettype($phone)), __LINE__);\n }\n if (is_null($phone) || (is_array($phone) && empty($phone))) {\n unset($this->Phone);\n } else {\n $this->Phone = $phone;\n }\n return $this;\n }", "title": "" }, { "docid": "0ab2467c9a9aa02e5e7b309ec22138e3", "score": "0.56787694", "text": "public function setPhone_numberAttribute($value)\n\t{\n\t\t$this->attributes['phone_number'] = \\Hash::make($value);\n\t}", "title": "" }, { "docid": "be20d8c8d462461129e4da7f1fe3bac1", "score": "0.56708324", "text": "public function setExternalAppointmentId($val)\n {\n $this->_propDict[\"externalAppointmentId\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "d3be6e38a1e6617adb5026c01f371624", "score": "0.566265", "text": "public function setCustomerPhone(?string $value): void {\n $this->getBackingStore()->set('customerPhone', $value);\n }", "title": "" }, { "docid": "eaf37fd7b38d71d681f8de6eddfebb29", "score": "0.561488", "text": "public function __construct($phone)\n {\n $this->phone = $phone;\n }", "title": "" }, { "docid": "d3e7778a4e2fa284135217da960aa8f5", "score": "0.55889726", "text": "public function setPhoneNumber($value) {\n if (\n (isset($this->_aDataValidation['phone']) && preg_match($this->_aDataValidation['phone'], $value))\n || !isset($this->_aDataValidation['phone'])\n ) {\n $this->_aData['phone'] = $value;\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "4baa55ae80b7dd1434f86d15b5db9bc4", "score": "0.5587019", "text": "public function setPrimaryPhone($phone)\n {\n $this->data['PrimaryPhone']['FreeFormNumber'] = $phone;\n\n return $this;\n }", "title": "" }, { "docid": "2d24856e8f0380af3baccc6bbea28131", "score": "0.55839616", "text": "public function setSelfServiceAppointmentId(?string $value): void {\n $this->getBackingStore()->set('selfServiceAppointmentId', $value);\n }", "title": "" }, { "docid": "b908ce0b5cb1f603d1b8f892a6419954", "score": "0.557831", "text": "public function setServicePhone($servicePhone) {\n $this->properties['servicePhone'] = $servicePhone;\n\n return $this;\n }", "title": "" }, { "docid": "74caa3d46fb441a327b195182f5e0db3", "score": "0.557297", "text": "public function __construct(\\App\\Phone $phone)\n\t{\n\t\t$this->phone = $phone;\n \n\t}", "title": "" }, { "docid": "dc5a317ae9378bcdcd4c4bfd0b5abfde", "score": "0.5563123", "text": "public function setTelephone($telephone)\n {\n $this->telephone = $telephone;\n return $this;\n }", "title": "" }, { "docid": "2cdc2a7f38d2f548f10c9b86000ac4fd", "score": "0.55425423", "text": "public function setContactITPhoneNumber(?string $value): void {\n $this->getBackingStore()->set('contactITPhoneNumber', $value);\n }", "title": "" }, { "docid": "87f89c76991fd72dd905ad1647b13d43", "score": "0.5534085", "text": "public function setPhoneNumber($phoneNumber)\n {\n $this->phoneNumber = $phoneNumber;\n }", "title": "" }, { "docid": "ed85007c35d312d80ff26de0f36ec1c1", "score": "0.5516667", "text": "public function setAppointmentDay(\\DateTime $date) {\n $this->set('appointment_day', $date->format('Y-m-d'));\n return $this;\n }", "title": "" }, { "docid": "d48d3e615d68384476a783e426d7bcdb", "score": "0.5496911", "text": "public function appendPhone(Person_PhoneNumber $value)\n {\n return $this->append(self::PHONE, $value);\n }", "title": "" }, { "docid": "46563d0c7fe9b9c95d8cdf4762c227f5", "score": "0.54758644", "text": "public function setTelephone( $telephone )\n\t{\n\t\tif( (string) $telephone !== $this->getTelephone() )\n\t\t{\n\t\t\t$this->data[$this->prefix . 'telephone'] = (string) $telephone;\n\t\t\t$this->setModified();\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "31835efecf5889381602abdf7d084904", "score": "0.5471238", "text": "public function setTelephone(?string $telephone):self\n {\n $this->telephone = $telephone;\n\n return $this;\n }", "title": "" }, { "docid": "51d71d206ef8250f0846d9de9fc556eb", "score": "0.5445234", "text": "public function setPhones(array $phone): SMSInterface;", "title": "" }, { "docid": "41ca80621ee91f8dc4fe75a7287174bb", "score": "0.5435551", "text": "public function __construct($phone)\n {\n $this->phone=$phone;\n }", "title": "" }, { "docid": "87f824ac92672a37cdd2866aa6678e56", "score": "0.5426117", "text": "public function getPhone()\r\n {\r\n return $this->phone;\r\n }", "title": "" }, { "docid": "a8aff9345b929b8268a38331d7963e16", "score": "0.539171", "text": "public function setTelephone($telephone)\n {\n $this->telephone = $telephone;\n\n return $this;\n }", "title": "" }, { "docid": "a8aff9345b929b8268a38331d7963e16", "score": "0.539171", "text": "public function setTelephone($telephone)\n {\n $this->telephone = $telephone;\n\n return $this;\n }", "title": "" }, { "docid": "a8aff9345b929b8268a38331d7963e16", "score": "0.539171", "text": "public function setTelephone($telephone)\n {\n $this->telephone = $telephone;\n\n return $this;\n }", "title": "" }, { "docid": "f1985f94792143687edd9fcdbf562bb9", "score": "0.5385234", "text": "public function setMobilePhone($phone)\n {\n $this->data['Mobile']['FreeFormNumber'] = $phone;\n\n return $this;\n }", "title": "" }, { "docid": "68d9ed7ec777cd5809862aa261c4f3d5", "score": "0.53726465", "text": "public function getPhone()\r\n {\r\n return $this->_phone;\r\n }", "title": "" }, { "docid": "9b0389b46686652f4ae3bcd068804c78", "score": "0.5364088", "text": "public function __construct(Appointment $appointment)\n {\n $this->appointment = $appointment;\n }", "title": "" }, { "docid": "2e5ec68c38d9330cba7600ffb860d53b", "score": "0.5347363", "text": "public function getPhone()\n {\n return $this->phone;\n }", "title": "" }, { "docid": "2e5ec68c38d9330cba7600ffb860d53b", "score": "0.5347363", "text": "public function getPhone()\n {\n return $this->phone;\n }", "title": "" }, { "docid": "2e5ec68c38d9330cba7600ffb860d53b", "score": "0.5347363", "text": "public function getPhone()\n {\n return $this->phone;\n }", "title": "" }, { "docid": "2e5ec68c38d9330cba7600ffb860d53b", "score": "0.5347363", "text": "public function getPhone()\n {\n return $this->phone;\n }", "title": "" }, { "docid": "2e5ec68c38d9330cba7600ffb860d53b", "score": "0.5347363", "text": "public function getPhone()\n {\n return $this->phone;\n }", "title": "" }, { "docid": "2e5ec68c38d9330cba7600ffb860d53b", "score": "0.5347363", "text": "public function getPhone()\n {\n return $this->phone;\n }", "title": "" }, { "docid": "2e5ec68c38d9330cba7600ffb860d53b", "score": "0.5347363", "text": "public function getPhone()\n {\n return $this->phone;\n }", "title": "" }, { "docid": "2e5ec68c38d9330cba7600ffb860d53b", "score": "0.5347363", "text": "public function getPhone()\n {\n return $this->phone;\n }", "title": "" }, { "docid": "2e5ec68c38d9330cba7600ffb860d53b", "score": "0.5347363", "text": "public function getPhone()\n {\n return $this->phone;\n }", "title": "" }, { "docid": "2e5ec68c38d9330cba7600ffb860d53b", "score": "0.5347363", "text": "public function getPhone()\n {\n return $this->phone;\n }", "title": "" }, { "docid": "2e5ec68c38d9330cba7600ffb860d53b", "score": "0.5347363", "text": "public function getPhone()\n {\n return $this->phone;\n }", "title": "" }, { "docid": "2e5ec68c38d9330cba7600ffb860d53b", "score": "0.5347363", "text": "public function getPhone()\n {\n return $this->phone;\n }", "title": "" }, { "docid": "2e5ec68c38d9330cba7600ffb860d53b", "score": "0.5347363", "text": "public function getPhone()\n {\n return $this->phone;\n }", "title": "" }, { "docid": "317cbf0a8c25ffc0ecab238108697296", "score": "0.53413856", "text": "function setPhoneNumber($number, $type=\"\") {\n\t\t$key = \"TEL\";\n\t\tif ($type!=\"\") $key .= \";\".$type;\n\t\t$key.= \";ENCODING=QUOTED-PRINTABLE\";\n\t\t$this->properties[$key] = quoted_printable_encode($number);\n\t}", "title": "" }, { "docid": "037ce84efecde1a031855d26aeaef447", "score": "0.53169304", "text": "function setSecondaryPhoneNumber($txt)\n {\n $this->_secondary_phone_number = $txt ;\n }", "title": "" }, { "docid": "fffd3331f5ab4e62801f1c1d2d240d3d", "score": "0.52995324", "text": "public function SavePhone() {\n\t\t\ttry {\n\t\t\t\t// Update any fields for controls that have been created\n\t\t\t\tif ($this->lstPhoneType) $this->objPhone->PhoneTypeId = $this->lstPhoneType->SelectedValue;\n\t\t\t\tif ($this->lstAddress) $this->objPhone->AddressId = $this->lstAddress->SelectedValue;\n\t\t\t\tif ($this->lstPerson) $this->objPhone->PersonId = $this->lstPerson->SelectedValue;\n\t\t\t\tif ($this->lstMobileProvider) $this->objPhone->MobileProviderId = $this->lstMobileProvider->SelectedValue;\n\t\t\t\tif ($this->txtNumber) $this->objPhone->Number = $this->txtNumber->Text;\n\n\t\t\t\t// Update any UniqueReverseReferences (if any) for controls that have been created for it\n\n\t\t\t\t// Save the Phone object\n\t\t\t\t$this->objPhone->Save();\n\n\t\t\t\t// Finally, update any ManyToManyReferences (if any)\n\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\tthrow $objExc;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "96f4830aa947eea4842b3a04092aaa54", "score": "0.5297269", "text": "public function setPagerPhone($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->pager_phone !== $v) {\n\t\t\t$this->pager_phone = $v;\n\t\t\t$this->modifiedColumns[] = PersonPeer::PAGER_PHONE;\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "a05cbb1b1d53e4cf9aaee735d77e5f0f", "score": "0.5296638", "text": "public function setEveningPhone($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->evening_phone !== $v) {\n\t\t\t$this->evening_phone = $v;\n\t\t\t$this->modifiedColumns[] = PersonPeer::EVENING_PHONE;\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "e42951677cb8fef058edb7eb925147db", "score": "0.5293934", "text": "public function setAppointmentClients($val)\n {\n $this->_propDict[\"appointmentClients\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "43d3de1a3ad6ea86a899016fe21ad162", "score": "0.5285124", "text": "public function soft_phone() {\n\n $token = $this->Twilio->getCapabilityToken();\n $this->set(compact('token'));\n }", "title": "" }, { "docid": "1d6c5a83bceda5226897d52682f4d1fb", "score": "0.5276476", "text": "private function setContactPhone($string){\n\t\t$this->set_prop('l_contact_phone',$this->extract('numerics{%}plaintext',$string));\n\t}", "title": "" }, { "docid": "80ddcb67fca938cd1e50dfce65a4e9aa", "score": "0.5264722", "text": "function test_setPhone()\n {\n //Arrange\n $retailer = \"Nordstrom\";\n $address = \"1234 SW Main Street\";\n $phone = \"123-456-7890\";\n $test_store = new Store($retailer, $address, $phone);\n $new_phone = \"971-806-6298\";\n\n //Act\n $test_store->setPhone($new_phone);\n $result = $test_store->getPhone();\n\n //Assert\n $this->assertEquals($new_phone, $result);\n }", "title": "" }, { "docid": "a462fb68b418703c03ce3f4ff9048960", "score": "0.5263963", "text": "public function setPhoneNumber(Request $request){\n $validator = Validator::make($request->all(), [\n 'phone_number' => 'required',\n 'dial_code' => 'required|max:6',\n ], ['phone_number.required' => 'Please enter your phone number']);\n\n if($validator->fails()){\n $this->throwValidationException(\n $request, $validator\n );\n }\n\n User::where('id', Auth::user()->id)\n ->update(['phone_number' => $request->phone_number, 'dial_code' => $request->dial_code]);\n\n return redirect('/settings');\n }", "title": "" }, { "docid": "ce4d14bf53e7f0d44e4ec2d3a8007856", "score": "0.5262602", "text": "public function phoneNumbers($phoneNumbers) {\n $this->phoneNumbers = $phoneNumbers;\n }", "title": "" }, { "docid": "f14a560c72682ee403e5bb57065010f3", "score": "0.52587223", "text": "public function setPhone($string) {\n $test = $string;\n if (strlen($string) == 10) {\n $test = is_numeric($string);\n if ($test == true) {\n return $this->phone = $string;\n } else {\n throw new Exception(\"Numero de téléphone invalide\");\n }\n }\n else{\n throw new Exception(\"Numero de téléphone invalide : Le numero doit avoir 10 chiffres\");\n }\n }", "title": "" }, { "docid": "cfbd7b06392ede0b1219b8f131a579f7", "score": "0.525505", "text": "public function __construct(string $phone)\n {\n $this->phone = $phone;\n }", "title": "" }, { "docid": "9f848fd41456e1e39b702472b1130a11", "score": "0.5248528", "text": "public function testAddPhone()\n {\n $manager = $this->getModelManager();\n\n // Get the first tutor\n $tutor = $manager->findById(1);\n\n // we need a country to test with\n $countryOne = $this->getCountryManager()->findById(1);\n\n // remove any existing numbers\n foreach ($tutor->getPhoneNumbers() as $existingNumber) {\n $tutor->removePhoneNumber($existingNumber);\n };\n\n $manager->saveEntity($tutor);\n $manager->reloadEntity($tutor);\n\n $this->performMockedUpdate($tutor, 'phone0', [\n 'phonePk' => 0,\n 'value' => [\n 'number' => TestSlug::END_1,\n 'type' => TestSlug::END_2,\n 'isPreferred' => \"true\",\n 'country' => $countryOne->getId(),\n ],\n ]);\n\n $manager->reloadEntity($tutor);\n $this->assertEquals(TestSlug::END_1, $tutor->getPhoneNumbers()->first()->getNumber());\n $this->assertEquals(TestSlug::END_2, $tutor->getPhoneNumbers()->first()->getType());\n $this->assertEquals(true, $tutor->getPhoneNumbers()->first()->isPreferred());\n $this->assertEquals($countryOne, $tutor->getPhoneNumbers()->first()->getCountry());\n }", "title": "" }, { "docid": "6a572973936f284b8c8bb62625d2553e", "score": "0.524328", "text": "function getPhone() {\n\t\treturn $this->_Phone;\n\t}", "title": "" }, { "docid": "508861415da90e38166e1a1fe67c9b57", "score": "0.52370626", "text": "public function setPhoneType($val)\n {\n $this->_propDict[\"phoneType\"] = $val;\n return $this;\n }", "title": "" } ]
2ad36e3464c9b67f397941e43a60162c
Gives json with message and 400 status code
[ { "docid": "1fa371f2768618a24d338f75a1e5d119", "score": "0.62403667", "text": "public function respondBadRequest($message = 'Bad Request!')\n {\n return $this->setStatusCode(400)->respondWithError($message);\n }", "title": "" } ]
[ { "docid": "3013aeeec6ad734bdc4a7b142b42c4c4", "score": "0.7427728", "text": "function error($msg) {\n http_response_code(400);\n echo json_encode([ \"error\" => $msg]);\n exit(1);\n}", "title": "" }, { "docid": "d4c26683dcdc49d7a7ac3d9d1953c98a", "score": "0.7403399", "text": "function json_error($app, $message, $status = 400)\n{\n $app->response()->status($status);\n json(array('error' => $message));\n}", "title": "" }, { "docid": "c1d0ff7aff93141f2b0e45d62c49dde4", "score": "0.7372891", "text": "private function error400(): JsonResponse\n {\n $mensaje = [\n 'code' => Response::HTTP_BAD_REQUEST,\n 'message' => 'Bad Request'\n ];\n\n return new JsonResponse(\n $mensaje,\n Response::HTTP_BAD_REQUEST\n );\n }", "title": "" }, { "docid": "2f076ddbfba4ac57a19cb115266e194e", "score": "0.7206478", "text": "function return_error($status_code, $message) {\n http_response_code($status_code);\n exit(json_encode(['error' => ['status' => $status_code, 'message' => $message]]));\n}", "title": "" }, { "docid": "52ad3f4191867365ba2c1cf43c7c1789", "score": "0.71410364", "text": "function invalidMethodResponse(){\n\n $return = array(\n 'status' => 400,\n 'message' => \"Bad method given\"\n );\n\n http_response_code(400);\n\n //Send back response to client. \n print_r(json_encode($return));\n\n}", "title": "" }, { "docid": "17939dd005ba968eb363738ec2fdce05", "score": "0.71303666", "text": "function missingParamToPostResponse(){\n\n $return = array(\n 'status' => 400,\n 'message' => \"Missing params to post.\"\n );\n\n http_response_code(400);\n\n //Send back response to client. \n print_r(json_encode($return));\n\n}", "title": "" }, { "docid": "a7efb6bc07ba6a0c64449709fd8fc292", "score": "0.7044279", "text": "function json_response($message = null, $code = 202)\n{\n header_remove();\n // set the actual code\n http_response_code($code);\n // set the header to make sure cache is forced\n header(\"Cache-Control: no-transform,public,max-age=300,s-maxage=900\");\n // treat this as json\n header('Content-Type: application/json');\n $status = array(\n 200 => '200 OK',\n 400 => '400 Bad Request',\n 422 => 'Unprocessable Entity',\n 500 => '500 Internal Server Error'\n );\n // ok, validation error, or failure\n header('Status: '.$status[$code]);\n // return the encoded json\n return json_encode(array(\n 'status' => $code < 300, // success or not?\n 'message' => $message\n ));\n}", "title": "" }, { "docid": "a280bf608d3f1e0448a065d7282b0917", "score": "0.69495654", "text": "function json_response($message = 'Error', $code = 500, $data = null)\n{\n header('Content-Type: application/json');\n $response = array(\n 'code' => $code,\n 'data' => $data,\n 'message' => $message\n );\n http_response_code($code);\n echo json_encode($response);\n}", "title": "" }, { "docid": "499458ffdff1d4081c7373a31b3e693f", "score": "0.6904745", "text": "function json_response($code = 200, $message = null)\n{\n header_remove();\n // set the actual code\n http_response_code($code);\n // set the header to make sure cache is forced\n header(\"Cache-Control: no-transform,public,max-age=300,s-maxage=900\");\n // treat this as json\n header('Content-Type: application/json');\n $status = array(\n 200 => '200 OK',\n 400 => '400 Bad Request',\n 422 => 'Unprocessable Entity',\n 500 => '500 Internal Server Error'\n );\n // ok, validation error, or failure\n header('Status: '.$status[$code]);\n // return the encoded json\n return json_encode(array(\n 'status' => $code < 300, // success or not?\n 'message' => $message\n ));\n}", "title": "" }, { "docid": "88aabba90fa17d0cd4042dd3b2cc1748", "score": "0.6857364", "text": "function response($msg, $code=200) {\n\theader('Content-type:application/json;charset=utf-8');\n\n\t$status = array(\n\t\t\t200 => '200 OK',\n\t\t\t400 => '400 Bad Request',\n\t\t\t422 => 'Unprocessable Entity',\n\t\t\t500 => '500 Internal Server Error'\n\t\t\t);\n\n\theader('Status: '.$status[$code]);\n\n return json_encode(array(\n 'status' => $code,\n 'message' => $msg\n ));\n}", "title": "" }, { "docid": "527fb218cea2cd8740501fa26e58ffab", "score": "0.6802021", "text": "function error($message) {\n return new JsonResponse([\n 'status' => 'error',\n 'error' => $message\n ]);\n}", "title": "" }, { "docid": "e529b106467e64bc5bac7cf22cc5de7c", "score": "0.6758256", "text": "protected function responseBadInput()\n {\n return $this->response(array('error' => 'Bad Input'), 400);\n }", "title": "" }, { "docid": "b62750e3748f8e5707d14f11ebec8b57", "score": "0.6730756", "text": "function produceError($message){\n echo json_encode(['status'=>'error','message'=>$message]);\n }", "title": "" }, { "docid": "037a276fb7bbe03970b764c14398cf45", "score": "0.6706977", "text": "protected function failure()\n {\n $this->response = $this->response->withStatus(400);\n $this->jsonBody($this->payload->getInput());\n }", "title": "" }, { "docid": "ba5de2e163f2ca50025744cc1b479569", "score": "0.67054063", "text": "function json_response($code = 200, $message = null, $error = false)\n{\n header_remove();\n // set the actual code\n http_response_code($code);\n // set the header to make sure cache is forced\n header('Cache-Control: no-transform,public,max-age=300,s-maxage=900');\n // treat this as json\n header('Content-Type: application/json');\n $status = array(\n 200 => '200 OK',\n 400 => '400 Bad Request',\n 404 => '404 Not Found',\n 422 => 'Unprocessable Entity',\n 500 => '500 Internal Server Error'\n );\n // ok, validation error, or failure\n header('Status: '.$status[$code]);\n // return the encoded json\n if ($error){\n return json_encode(array(\n 'status' => $status[$code] === 200,\n 'error' => array('errorCode'=>0,'message' => $message)\n ));\n }\n return json_encode(array(\n 'success' => array('message' => $message)\n ));\n}", "title": "" }, { "docid": "31cc56f3ab8df7b6e01b27681f47d257", "score": "0.66799486", "text": "function json_response($code = 200, $message = null, $error = false)\n{\n header_remove();\n // set the actual code\n http_response_code($code);\n // set the header to make sure cache is forced\n header('Cache-Control: no-transform,public,max-age=300,s-maxage=900');\n // treat this as json\n header('Content-Type: application/json');\n $status = array(\n 200 => '200 OK',\n 201 => '201 Created',\n 400 => '400 Bad Request',\n 401 => '401 Unauthorized',\n 404 => '404 Not Found',\n 409 => '409 Conflict',\n 422 => 'Unprocessable Entity',\n 500 => '500 Internal Server Error'\n );\n // ok, validation error, or failure\n header('Status: '.$status[$code]);\n // return the encoded json\n if ($error){\n return json_encode(array(\n 'status' => $status[$code] === 200,\n 'error' => array('errorCode'=>0,'message' => $message)\n ));\n }\n return json_encode(array(\n 'success' => array('message' => $message)\n ));\n}", "title": "" }, { "docid": "419b2a4ef24c4eef2391a84bcf02faa4", "score": "0.6637381", "text": "protected function fail() {\n\t\t@header('HTTP/1.1 400 Bad Request');\n\t\techo JSON::encode([\n\t\t\t'status' => 'failed',\n\t\t\t'message' => 'no api data provided'\n\t\t]);\n\t\texit;\n\t}", "title": "" }, { "docid": "883e9becb332a3d30add423e6041a3e1", "score": "0.66282165", "text": "protected function fail(int $code = 400)\n {\n return response()->json(['status' => false], $code);\n }", "title": "" }, { "docid": "0c6b14913bcf99306b29ca2e50363ff6", "score": "0.6619675", "text": "protected function invalidResponse(){\n return response()->json([\n 'ResultCode' => 1,\n 'ResultDesc' => 'Failed to complete the transaction',\n 'ThirdPartyTransID' => 0\n ]);\n\n }", "title": "" }, { "docid": "6bc45517a06c288aa051eb3fbe4c54dc", "score": "0.6604544", "text": "public function render(): JsonResponse\n {\n return response()->json([\n 'message' => \"This item not exists in trash.\",\n 'status' => 400\n ],400);\n }", "title": "" }, { "docid": "9523cd0c1901fe0525bab26ed2c4ed98", "score": "0.6569199", "text": "function newErr($type, $message) {\n $response = array(\n 'error' => $type,\n 'message' => $message\n );\n return json_encode($response);\n \n }", "title": "" }, { "docid": "497ef163e99753c78e0cd3b7947a33df", "score": "0.6545935", "text": "private function unprocessableResponse() {\r\n $response['status_code_header'] = HTTP_UNPROCESSABLE;\r\n $response['body'] = json_encode([\r\n 'error' => 'Invalid input'\r\n ]);\r\n\r\n return $response;\r\n }", "title": "" }, { "docid": "3fac925422120e6a658181e95983f5a3", "score": "0.65450406", "text": "function formatResponse($code = 500, $message = 'Internal Server Error', $success = false, $data = [])\n{\n return response()->json([\n 'success' => $success,\n 'status_code' => $code,\n 'message' => $message,\n 'data' => $data\n ], $code);\n}", "title": "" }, { "docid": "442bf91d56820ca2b3c4cca904ab7cd2", "score": "0.6530015", "text": "function respond_with_error( $error, $http_code = \"400 Bad Request\")\n {\n header(\"HTTP/1.1 \".$http_code);\n exit( $error );\n }", "title": "" }, { "docid": "f28f0cfdc4a3c6c53170ae03d210ce39", "score": "0.6505885", "text": "private function returnError($message){\n return response()->json([\n 'status' => 'error',\n 'error' => $message\n ], 200);\n }", "title": "" }, { "docid": "75df85dd6124de2aab44157301bb4a09", "score": "0.6489721", "text": "public function json_response($message = null, $code = 200)\n\t{\n\t header_remove();\n\t // set the actual code\n\t http_response_code($code);\n\t // set the header to make sure cache is forced\n\t header(\"Cache-Control: no-transform,public,max-age=300,s-maxage=900\");\n\t // treat this as json\n\t header('Content-Type: application/json');\n\t $status = array(\n\t 200 => '200 OK',\n\t 400 => '400 Bad Request',\n\t 422 => 'Unprocessable Entity',\n\t 500 => '500 Internal Server Error'\n\t );\n\t // ok, validation error, or failure\n\t header('Status: '.$status[$code]);\n\t // return the encoded json\n\t return json_encode(array(\n\t 'status' => $code < 300, // success or not?\n\t 'message' => $message\n\t ));\n\t}", "title": "" }, { "docid": "3604e16e56be4331400e94e7a146e13b", "score": "0.64890856", "text": "protected function notValid()\n {\n $this->response = $this->response->withStatus(422);\n $this->jsonBody([\n 'input' => $this->payload->getInput(),\n 'output' => $this->payload->getOutput(),\n 'messages' => $this->payload->getMessages(),\n ]);\n }", "title": "" }, { "docid": "d099959ad7eab879be51a3d8e1c690c9", "score": "0.64581376", "text": "public function getErrorResponseJson()\n { \n $data = array();\n \n foreach ($this->_fields as $name => $info) {\n $errors = array();\n if (isset($this->_errors[$name]) && is_array($this->_errors[$name]) && count($this->_errors[$name]) > 0) { \n $errors = $this->_errors[$name];\n }\n $fieldData = ' \"' . $name . '\" : { \"value\" : \"' . $info['value'] . '\"';\n if (count($errors) > 0) {\n $fieldData .= ', \"errors\" : [ \"' . join('\", \"', $errors) . '\" ]';\n }\n $fieldData .= ' }';\n \n $data[] = $fieldData;\n }\n \n $response = '{ \"type\" : \"error\", \"data\" : { ' . join(', ', $data) . ' } }';\n return $response;\n }", "title": "" }, { "docid": "7c8d599922048707a0951a748ecfedc6", "score": "0.64495116", "text": "function returnError($message)\n{\n // Encode the JSON information\n $json = json_encode([\n 'success' => false,\n 'error' => $message,\n ]);\n\n // Send JSON information back to the client-side application\n sendJSONResponse($json);\n}", "title": "" }, { "docid": "e95e6c2998e0bf12f5a17ec517e2af9d", "score": "0.64459825", "text": "function errorResponse ($messsage) {\n header('HTTP/1.1 500 Internal Server Error');\n die(json_encode(array('message' => $messsage)));\n }", "title": "" }, { "docid": "a36d65f6bb01baa4a6476581507c8226", "score": "0.6445366", "text": "function showjson_error($message) {\n\theader('Content-type: application/json');\n\techo json_encode( array(\"error\" => $message) );\n\texit();\n}", "title": "" }, { "docid": "f4388b191c7deef35b8adc87dc1151e5", "score": "0.6433742", "text": "function error($message){\n die(json_encode([\"error\"=>true,\"data\"=>$message]));\n}", "title": "" }, { "docid": "d1fe76028ed46a5650c4bcfedbafd674", "score": "0.6417114", "text": "function errorHandler($message, $code){\n echo '{\"errors\":\"'.$message.'\"}';\n http_response_code($code);\n return false;\n }", "title": "" }, { "docid": "192329fd1a8104f6130aeb8822a7d2eb", "score": "0.64076644", "text": "function print_error($msg) {\n header(\"HTTP/1.1 400 Invalid Request\");\n header(\"Content-type: text/plain\");\n die($msg);\n }", "title": "" }, { "docid": "948df4c97ad5c8688114dabd692d7d0e", "score": "0.6407203", "text": "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 }", "title": "" }, { "docid": "666173090251d523906b6259b9bc84f9", "score": "0.64060235", "text": "function json_response($code = 200, $response = null)\n{\n header_remove();\n // set the actual code\n http_response_code($code);\n // set the header to make sure cache is forced\n header(\"Cache-Control: no-transform,public,max-age=300,s-maxage=900\");\n // treat this as json\n header('Content-Type: application/json');\n $status = array(\n 200 => '200 OK',\n 400 => '400 Bad Request',\n 422 => 'Unprocessable Entity',\n 500 => '500 Internal Server Error'\n );\n // ok, validation error, or failure\n header('Status: '.$status[$code]);\n // return the encoded json\n return json_encode(array(\n 'status' => $code < 300, // success or not?\n 'response' => $response\n ));\n}", "title": "" }, { "docid": "1ee140f64ea5d5e615a83ae38f46b392", "score": "0.63566214", "text": "function bad_request() {\n\treturn show_template('400');\n}", "title": "" }, { "docid": "f82825dbf802a3e5b894907b28b9af1e", "score": "0.63556796", "text": "function error($message = \"\")\n {\n return new JsonResponse([\n 'message' => $message,\n ], Response::HTTP_NOT_FOUND);\n }", "title": "" }, { "docid": "b2ac26adb4a17d31d07e5fb2cdb6ff70", "score": "0.6351301", "text": "public static function throwRequestNotFoundException()\n {\n return Response::json([\n 'message' => 'Your request could not be found try again'\n ], 300);\n }", "title": "" }, { "docid": "bedba8259762b0a216f41943b8370b68", "score": "0.6338421", "text": "public static function die400(array $data = array())\n {\n header('HTTP/1.1 400 Bad Request');\n\n self::dieJson($data);\n }", "title": "" }, { "docid": "665b638fccfe34bd2feb225630140ecf", "score": "0.6336801", "text": "public static function badRequestException(Validator $validator): JsonResponse\n {\n static::$statusCode = Response::HTTP_BAD_REQUEST;\n static::$content = [\n 'message' => $validator->errors()->first(),\n 'error' => $validator->errors()\n ];\n return static::sendResponse();\n }", "title": "" }, { "docid": "782519bcfd2489a9789ced5b5b5a7bd9", "score": "0.63358", "text": "public function responseError($message, $status = 400)\n {\n return $this->json(false, $message, $status);\n }", "title": "" }, { "docid": "0baf497e56463bae48fb48fc79baea32", "score": "0.6331461", "text": "public function respondValidationError($message = 'Validation errors')\n {\n\t return $this->setStatusCode(422)->respondError($message);\n }", "title": "" }, { "docid": "d3ef6042d4cd66107f14500acae9c828", "score": "0.63285494", "text": "function report_error_and_return( $msg ) {\n $status_encoded = json_encode( \"error\" );\n $msg_encoded = json_encode( '<b><em style=\"color:red;\" >Error:</em></b>&nbsp;'.$msg );\n print <<< HERE\n{\n \"status\": {$status_encoded},\n \"ResultSet\": {\n \"Status\": {$status_encoded},\n \"Message\": {$msg_encoded}\n }\n}\nHERE;\n exit;\n}", "title": "" }, { "docid": "357c0a68db3c1025849166ed8a209731", "score": "0.6326445", "text": "function fail($s) {\n header(\"HTTP/1.0 400 $s\");\n exit;\n}", "title": "" }, { "docid": "e0538f1768929b48b87bfc839a183e43", "score": "0.6314181", "text": "public function throw()\n {\n $response = new JsonResponse($this->getResponse(), $this->code);\n\n die($response->send());\n }", "title": "" }, { "docid": "5bc8dc8203dae6a54112f99656b335dc", "score": "0.6293326", "text": "function errorJson($msg){\n\tprint json_encode(array('error'=>$msg));\n\texit();\n}", "title": "" }, { "docid": "4b7211bd3eec93c6c1410e804b549b24", "score": "0.6288934", "text": "function handleInvalidErrors($e){\n if( $e->getApiErrorCode() == \"invalid_state_for_request\") {\n\t // Error due to invalid state to perform the API call.\n \t error_log(\"Error : \" . json_encode($e->getJSONObject()));\n\t $errorResponse = array(\"error_msg\" => \"Invalid state for this operation\");\n \t print json_encode($errorResponse, true);\n\t header(\"HTTP/1.0 400 Invalid Request\");\n } else {\n \t handleInvalidRequestException($e);\n } \n}", "title": "" }, { "docid": "5948a1d15e02ec969b83d7459f983b1a", "score": "0.62867767", "text": "public function failed($message = 'Request format error!', $code = FoundationResponse::HTTP_BAD_REQUEST)\n {\n return $this->setStatusCode($code)->respond(['message' => $message]);\n }", "title": "" }, { "docid": "b9240e31338249d72a2511c16c906567", "score": "0.62732434", "text": "public function render()\n {\n if(strstr($this->getMessage(), 'PDOException: SQLSTATE[')) {\n if(preg_match('/SQLSTATE\\[(\\w+)\\]:(.*):(\\s+\\d)(.*):(.*)/', $this->getMessage(), $matches) === false) {\n $this->message = 'Generic SQL exception unhandled';\n }\n else {\n $this->message = empty($matches[5]) ? 'Generic SQL exception unhandled' : trim($matches[5]);\n }\n }\n else {\n $this->message = 'Generic SQL exception unhandled';\n }\n\n return response()->json(['message' => $this->getMessage()], 409);\n }", "title": "" }, { "docid": "e4c8bbd5bcf7ba59bf5ecbffe4d89ba0", "score": "0.62707853", "text": "function respond($code, $message) {\n header('Content-Type: application/json');\n header(\"X-PHP-Response-Code: $code\", true, $code);\n echo '{\"message\": \"' . $message . '\"}';\n die();\n}", "title": "" }, { "docid": "87767314bfa8bfe27a074fad96131790", "score": "0.6245538", "text": "public static function error400(RequestInterface $request)\n {\n return static::json([\"message\" => \"Bad Request\"])->withStatus(400);\n }", "title": "" }, { "docid": "7477eeed6e7a821dc1f05b954b2b2155", "score": "0.62446755", "text": "function nok($msg,$code=400){\n if(400 === $code){\n header(\"HTTP/1.1 400 Bad Request ($msg)\");\n } else {\n header(\"HTTP/1.1 $code $msg\");\n }\n die(\"NOK - $msg\");\n}", "title": "" }, { "docid": "f8ff17e7f676ff0b0bfca1473d4a5d49", "score": "0.62138647", "text": "function Error(){\n header('Content-Type: application/json');\n echo ('false');\n http_response_code(200);\n }", "title": "" }, { "docid": "bf324711d4e2d1871d17ec3e74a00dbb", "score": "0.6212839", "text": "protected function getBadRequestResponse()\n {\n $response = new Response();\n $response->setStatusCode(400);\n $response->setContent('Bad request');\n\n return $response;\n }", "title": "" }, { "docid": "3a94a8ae09a8ae0bcf6c89f8716a1847", "score": "0.62041664", "text": "function invalidMethodRequest(){\n\n $return = array(\n 'status' => 405,\n 'message' => \"Method should be a post\"\n );\n\n http_response_code(405);\n\n //Send back response to client. \n print_r(json_encode($return));\n \n}", "title": "" }, { "docid": "a6a1a89c195757865b6d0b4b4179e09d", "score": "0.620308", "text": "public static function error400($text = '') {\n header(\"{$_SERVER['SERVER_PROTOCOL']} 400 Bad Request\");\n View::render(static::VIEW_ERROR_HTTP, [\n 'code' => 400,\n 'msg' => $text ? $text : 'Bad request.',\n ], static::LAYOUT_ERROR_HTTP, false, App::requestIsAjax());\n static::end(40);\n }", "title": "" }, { "docid": "17203b47d68b0be9c3390ec4c5e5aeb1", "score": "0.6202078", "text": "private function showBadRequestError($message = null): void\n {\n header('HTTP/1.1 400 Bad Request', true, 400);\n header('Status: 400 Bad Request');\n exit($message);\n }", "title": "" }, { "docid": "793e77d9df429c523ac6578c5006acd7", "score": "0.6191902", "text": "public function makeError($message = '', $data = [], $code = 410)\n {\n $res = [\n 'success' => false,\n 'message' => $message,\n 'code' => $code\n ];\n if (!empty($data)) {\n $res['data'] = $data;\n }\n return response()->json($res);\n }", "title": "" }, { "docid": "59334c7effa49982c295d0f4d35ed024", "score": "0.61899775", "text": "function message($status = true, $data = [], $message = '', $code = 200)\n{\n return response()->json([\n 'status' => $status,\n 'data' => $data ?? [],\n 'message' => $message,\n 'code' => $code,\n ], $code);\n}", "title": "" }, { "docid": "70adf98e345533a070e493a57ce2fa6e", "score": "0.6187953", "text": "protected static function sendAPIerror($statusCode, $message) {\n if ($statusCode !== NULL) {\n switch ($statusCode) {\n case 100: $text = 'Continue'; break;\n case 101: $text = 'Switching Protocols'; break;\n case 200: $text = 'OK'; break;\n case 201: $text = 'Created'; break;\n case 202: $text = 'Accepted'; break;\n case 203: $text = 'Non-Authoritative Information'; break;\n case 204: $text = 'No Content'; break;\n case 205: $text = 'Reset Content'; break;\n case 206: $text = 'Partial Content'; break;\n case 300: $text = 'Multiple Choices'; break;\n case 301: $text = 'Moved Permanently'; break;\n case 302: $text = 'Moved Temporarily'; break;\n case 303: $text = 'See Other'; break;\n case 304: $text = 'Not Modified'; break;\n case 305: $text = 'Use Proxy'; break;\n case 400: $text = 'Bad Request'; break;\n case 401: $text = 'Unauthorized'; break;\n case 402: $text = 'Payment Required'; break;\n case 403: $text = 'Forbidden'; break;\n case 404: $text = 'Not Found'; break;\n case 405: $text = 'Method Not Allowed'; break;\n case 406: $text = 'Not Acceptable'; break;\n case 407: $text = 'Proxy Authentication Required'; break;\n case 408: $text = 'Request Time-out'; break;\n case 409: $text = 'Conflict'; break;\n case 410: $text = 'Gone'; break;\n case 411: $text = 'Length Required'; break;\n case 412: $text = 'Precondition Failed'; break;\n case 413: $text = 'Request Entity Too Large'; break;\n case 414: $text = 'Request-URI Too Large'; break;\n case 415: $text = 'Unsupported Media Type'; break;\n case 500: $text = 'Internal Server Error'; break;\n case 501: $text = 'Not Implemented'; break;\n case 502: $text = 'Bad Gateway'; break;\n case 503: $text = 'Service Unavailable'; break;\n case 504: $text = 'Gateway Time-out'; break;\n case 505: $text = 'HTTP Version not supported'; break;\n default:\n\t\t\t\t\t\tthrow new MegatronException(\"Unknown http status code {$statusCode}\" , 1);\n break;\n }\n } else {\n \tthrow new MegatronException(\"Unknown http status code {$statusCode}\" , 1);\n }\n\t\thttp_response_code($statusCode);\n\t\techo json_encode(array( 'Status Code' => $statusCode, 'Status Text' => $text, 'Message' => $message));\n\t\texit (1);\n\t}", "title": "" }, { "docid": "ae8c92aac0c1aa973ac623ae7d4a03cb", "score": "0.6183318", "text": "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}", "title": "" }, { "docid": "221bc45965a0fc13081a266889f97557", "score": "0.6183125", "text": "function badRequest() {\n header('HTTP/1.0 400 Bad Request');\n }", "title": "" }, { "docid": "f426f741c9f28a6076bf6ba3970ec580", "score": "0.6174374", "text": "public function action_400($e)\n\t{\n\t\treturn $this->render($e, 400);\n\t}", "title": "" }, { "docid": "ddbfacee281654110bbc203d5e7707ff", "score": "0.6172007", "text": "protected function createResponseFailer(int $code, string $message)\n {\n $response = ['code' => $code, 'message' => $message];\n echo json_encode($response);\n die();\n }", "title": "" }, { "docid": "b8034155a5f955f0ccd974e057cf8243", "score": "0.61718196", "text": "public static function throwResourceNotFoundException()\n {\n return Response::json([\n 'message' => \"Your request dosen't contain any resources\"\n ], 404);\n }", "title": "" }, { "docid": "524a1c1847f899dd7cc49064e1674878", "score": "0.61667174", "text": "function outputGenericError(){\n\techo json_encode([\"success\" => false, \"error\" => \"Invalid Data Received!\"]);\n}", "title": "" }, { "docid": "3cdc00e5d8cc30366af856455df75a97", "score": "0.61585957", "text": "public function createBadRequestResponse($message = 'Bad Request.')\n\t{\n\t\treturn new Response($message, 400);\n\t}", "title": "" }, { "docid": "9df9905b4c2a8d11781b25a7fcff6467", "score": "0.61583287", "text": "public function __construct(string $message, int $code = 0, Throwable $previous = null)\n {\n //parent::__construct($message, $code, $previous);\n header('Content-Type: application/json');\n echo json_encode(['status'=>'error', 'msg' => $message]);\n die();\n }", "title": "" }, { "docid": "cca99c91864f50044a3e01df8fc7ac4e", "score": "0.6154104", "text": "public function errorValidation(array $data): Response\n {\n $response = [];\n $response['id'] = Uuid::uuid1();\n $response['title'] = 'Validation error';\n $response['detail'] = 'Some fields are not correctly sent';\n $response['source']['pointer'] = $data;\n $response['status'] = 400;\n\n return $this->withJson(['error' => $response], 400);\n }", "title": "" }, { "docid": "349bb55533f0a796475092badee741c6", "score": "0.6153034", "text": "function format_error($msg) {\n $result = array (\n \"estado\" => false,\n \"mensaje\" => $msg\n );\n return json_encode($result, JSON_PRETTY_PRINT);\n}", "title": "" }, { "docid": "b5fdfb9475e75efe408b22772db59c69", "score": "0.6152958", "text": "protected function ERROR($condition, $code = 400) {\n echo json_encode(array(\n 'status' => $code,\n 'message' => $condition\n ), JSON_UNESCAPED_UNICODE);\n }", "title": "" }, { "docid": "1b1bd9b70edd80fe9b53ad0286644c04", "score": "0.613951", "text": "function response($code, $errMsg='success') {\n\techo json_encode(array('code' => $code, 'errMsg' => $errMsg));\n\texit(0);\n}", "title": "" }, { "docid": "de9568d5d76bd08d3317a60665f65c39", "score": "0.6136357", "text": "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 }", "title": "" }, { "docid": "22c50bd87d13cc7df041639b1112eb86", "score": "0.6123718", "text": "private function error422(): JsonResponse\n {\n $mensaje = [\n 'code' => Response::HTTP_UNPROCESSABLE_ENTITY,\n 'message' => 'Unprocessable Entity'\n ];\n\n return new JsonResponse(\n $mensaje,\n Response::HTTP_UNPROCESSABLE_ENTITY\n );\n }", "title": "" }, { "docid": "8234b811d0620db1bc2487c5f94d8f9e", "score": "0.61136615", "text": "public function respondBadRequest($message = 'Bad Request!')\n {\n if (!!$this->customStatusCode) {\n return $this->setCustomStatusCode($this->customStatusCode)->respondWithError($message);\n }\n return $this->setCustomStatusCode(4000)->respondWithError($message);\n }", "title": "" }, { "docid": "fab893f112da295403ccea38a94b51d0", "score": "0.61057055", "text": "function sendError(string $message, int $code = 500, string $type = 'json')\n{\n switch ($type) {\n case 'xml':\n header('Content-Type: text/xml');\n echo '<message>' . $message . '</message>';\n break;\n case 'json':\n default:\n header('Content-Type: application/json');\n echo json_encode(['message' => $message]);\n break;\n }\n switch ($code) {\n case 401:\n header(\"HTTP/1.0 401 Unauthorized\");\n break;\n case 500:\n default:\n header(\"HTTP/1.0 500 Internal Server Error\");\n }\n exit();\n}", "title": "" }, { "docid": "18eeaa11689ab767b5078083d6fe1ae0", "score": "0.61008567", "text": "public function getStatusCode();", "title": "" }, { "docid": "18eeaa11689ab767b5078083d6fe1ae0", "score": "0.61008567", "text": "public function getStatusCode();", "title": "" }, { "docid": "18eeaa11689ab767b5078083d6fe1ae0", "score": "0.61008567", "text": "public function getStatusCode();", "title": "" }, { "docid": "18eeaa11689ab767b5078083d6fe1ae0", "score": "0.61008567", "text": "public function getStatusCode();", "title": "" }, { "docid": "18eeaa11689ab767b5078083d6fe1ae0", "score": "0.61008567", "text": "public function getStatusCode();", "title": "" }, { "docid": "18eeaa11689ab767b5078083d6fe1ae0", "score": "0.61008567", "text": "public function getStatusCode();", "title": "" }, { "docid": "18eeaa11689ab767b5078083d6fe1ae0", "score": "0.61008567", "text": "public function getStatusCode();", "title": "" }, { "docid": "18eeaa11689ab767b5078083d6fe1ae0", "score": "0.61008567", "text": "public function getStatusCode();", "title": "" }, { "docid": "7b23b1a378361c5607a142752e4cf9e2", "score": "0.6100319", "text": "function badrequest($error='') {\n header(\"HTTP/1.1 400 Bad Request\");\n header(\"Status: 400 Bad Request\");\n if(strlen($error)) echo($error);\n die();\n}", "title": "" }, { "docid": "06d756dc3553fd3f8dec33d09572a356", "score": "0.6099731", "text": "private function badRequest($message) {\n while (ob_get_contents()) { ob_end_clean(); }\n header('HTTP/1.1 400 Bad Request');\n header('Content-Type: text/plain');\n echo $message;\n exit;\n }", "title": "" }, { "docid": "2bdee432318396bf0619b0c0e1600163", "score": "0.60978895", "text": "function error($message)\n{\n\t$array = array(\n\t\t'success' => false,\n\t\t'message' => $message\n\t);\n\techo json_encode($array);\n\texit();\n}", "title": "" }, { "docid": "55987e60f5876313de2782dfeaa35e48", "score": "0.6092634", "text": "public function render()\n {\n return response()->json([\n 'message' => 'Authorization Error',\n 'errors' => [\n [\n 'code' => 'E0001',\n 'description' => 'Invalid Token!',\n ]\n ]\n ], 401);\n }", "title": "" }, { "docid": "065ed6080fa3dc1a5608266f5edd338a", "score": "0.60921824", "text": "public function invalidUrl(): JsonResponse\n {\n $this->setStatusCode(404);\n $data = [\n \"message\" => \"The route does not exists or invalid request parameters\"\n ];\n\n return $this->response($data);\n }", "title": "" }, { "docid": "b52fb30107da731fdbf60ca2c59f502c", "score": "0.6086259", "text": "public function getStatusCode() {}", "title": "" }, { "docid": "bbea5fde070efafb66a7b290c0c96ad3", "score": "0.6085221", "text": "function fail($message) {\n\t\tdie(json_encode(array('status' => 'fail', 'message' => $message)));\n\t}", "title": "" }, { "docid": "d5a65f588d43a0ec2527c62279da1d4a", "score": "0.60802865", "text": "function apiFailureResponse($message, $data = [], $statusCode = 200)\n{\n return apiResponse($message, $data, $statusCode, $success = false);\n}", "title": "" }, { "docid": "6291f3e8468af7093b728292767f9d39", "score": "0.60769945", "text": "private function throwJsonError($status, $error)\n\t\t{\n\t\t\t$response = array('status' => $status, 'error' => $error);\n\t\t\techo json_encode($response);\n\t\t\texit;\n\t\t}", "title": "" }, { "docid": "d5a965aaa0390775f9ebcf640ae5b904", "score": "0.6057809", "text": "function send_response($code, $message, $data=NULL)\n{\n header(\"Content-Type: application/json; charset=UTF-8\");\n http_response_code($code);\n echo json_encode(array(\n 'code' => $code,\n 'message' => $message,\n 'data' => $data,\n ));\n exit(0);\n}", "title": "" }, { "docid": "226c05bf92aff131cbeb269f07932507", "score": "0.60577095", "text": "public function returnApiException(string $message, ?int $code=0) {\n if($code === 0) {\n $code = HttpCodes::INTERNAL_SERVER_ERROR;\n }\n http_response_code($code);\n return json_encode(array(\"error\" => 1, \"message\" => $message), JSON_UNESCAPED_UNICODE);\n }", "title": "" }, { "docid": "a8eed0f74a7b44529e4b4c5c8d021975", "score": "0.6055236", "text": "public function badRequestAlert($message, $statusText = 'bad_request', $data = null): JsonResponse\n {\n $response = [\n 'statusCode' => config('jobberman.status_codes.bad_request'),\n 'statusText' => $statusText,\n 'message' => $message,\n ];\n\n if (null !== $data) {\n $response['data'] = $data;\n }\n\n return Response::json($response, config('jobberman.status_codes.bad_request'));\n }", "title": "" }, { "docid": "210dae117c58da8298373f56e138a957", "score": "0.6054834", "text": "public function failureResponse($message,$statusCode = Response::HTTP_INTERNAL_SERVER_ERROR) {\n $response = [\n 'error' => $message,\n ];\n return response()->json($response, $statusCode);\n }", "title": "" }, { "docid": "4115224315c75e87574123b753069920", "score": "0.6040971", "text": "protected function handleOther()\n {\n return new JsonResponse(['message' => 'StyleCI does not support this type of event.'], 400, [], JSON_PRETTY_PRINT);\n }", "title": "" }, { "docid": "69118aeb1360b88f4a5c1ff56985f02a", "score": "0.6039412", "text": "public function getStatusError($code = false)\n {\n switch ($code) {\n case 204:\n return 204;\n break;\n case 400: //Bad Request\n return 400;\n break;\n case 401:\n return 401;\n break;\n case 403:\n return 403;\n break;\n case 404:\n return 404;\n break;\n case 502:\n return 502;\n break;\n case 504:\n return 504;\n break;\n default:\n return 500;\n break;\n }\n }", "title": "" } ]
ec00892dbbf663d745dfbe1ff608f8fe
Sets current status holder to true
[ { "docid": "912004be4bdd27cabac27207b5249100", "score": "0.0", "text": "public function setSuccess()\n {\n $this->result = true;\n }", "title": "" } ]
[ { "docid": "7b0e58e8400981dc7a98d6e48c6d7582", "score": "0.7213636", "text": "function changeStatus(){\n //To refer to the current object we use $this.\n $this->status = 'on';\n }", "title": "" }, { "docid": "94d1b0a68a55ab99d09da506e40e687e", "score": "0.711842", "text": "abstract public function setPendingStatus();", "title": "" }, { "docid": "b804da418e9142c07f84ae94d205cfe8", "score": "0.67905337", "text": "function setStatus($status) {\n\t\tassert(is_bool($status));\n\t\t$this->_status = $status;\n\t}", "title": "" }, { "docid": "d9a5ce42104c9ce37782c5d86219674b", "score": "0.6750201", "text": "function set_status($status){\n $this->status = $status;\n }", "title": "" }, { "docid": "fc534a087e6d6085653fde000d3c611e", "score": "0.67368877", "text": "public function setStatus( $status );", "title": "" }, { "docid": "f9c62948f2a60684d0950d61d1e3784f", "score": "0.67185324", "text": "function setStatus($status) {\n\t\t$this->status = $status;\n\t}", "title": "" }, { "docid": "76b9f37b17cec765d452c92a44d92600", "score": "0.6584545", "text": "function updateStatus() {\r\n\t\t$this->_LastStatusUpdate = time();\r\n\t\t$this->writeStatus();\r\n\t}", "title": "" }, { "docid": "747a6f578f6f54c15f5fb000ce7a7541", "score": "0.6584396", "text": "public function testSetStatus()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "f3fa49aed5ea6b0d196f74f225d51709", "score": "0.6567753", "text": "public function setStatus($status);", "title": "" }, { "docid": "f3fa49aed5ea6b0d196f74f225d51709", "score": "0.6567753", "text": "public function setStatus($status);", "title": "" }, { "docid": "f3fa49aed5ea6b0d196f74f225d51709", "score": "0.6567753", "text": "public function setStatus($status);", "title": "" }, { "docid": "f3fa49aed5ea6b0d196f74f225d51709", "score": "0.6567753", "text": "public function setStatus($status);", "title": "" }, { "docid": "f3fa49aed5ea6b0d196f74f225d51709", "score": "0.6567753", "text": "public function setStatus($status);", "title": "" }, { "docid": "f3fa49aed5ea6b0d196f74f225d51709", "score": "0.6567753", "text": "public function setStatus($status);", "title": "" }, { "docid": "44e45cd6b85e8647e2e75ef390369923", "score": "0.6469674", "text": "public function setStatus($status)\n {\n\n }", "title": "" }, { "docid": "9b3848f0bc0039802933df9868c5600c", "score": "0.6468855", "text": "public function checkStatus()\n\t{\n\t\tif( array_key_exists( '_status', $this->attributes ) && $this->attributes['_status'] == 'new' )\n\t\t{\n\t\t\t$this->attributes['_status'] = 'old';\n\n\t\t\treturn;\n\t\t}\n\n\t\t$this->attributes = array();\n\n\t\t$this->clear();\n\t}", "title": "" }, { "docid": "71dd9fffbf621918e250b9c07e4aba40", "score": "0.63934636", "text": "public function setStatus($status)\n {\n $this->_status = $status;\n }", "title": "" }, { "docid": "71dd9fffbf621918e250b9c07e4aba40", "score": "0.63934636", "text": "public function setStatus($status)\n {\n $this->_status = $status;\n }", "title": "" }, { "docid": "92f05b469196c0c279cdcc9339518dba", "score": "0.63906074", "text": "function updateStatusState()\n {\n if(empty($this->StatusFlag)) return;\n\n $attrs = array();\n $flag = $this->StatusFlag;\n $ldap = $this->config->get_ldap_link();\n $ldap->cd($this->cn);\n $ldap->cat($this->dn,array($flag));\n if($ldap->count()){\n $attrs = $ldap->fetch();\n }\n if(isset($attrs[$flag][0])){\n $this->$flag = $attrs[$flag][0];\n }\n }", "title": "" }, { "docid": "d5cc5738c8813adb3c1c92497768e667", "score": "0.63787407", "text": "function setStatus( $status ) {\n $this->statuses[] = $status;\n }", "title": "" }, { "docid": "cb27ef75bbbfd57ae85eff8e7b3b4a6c", "score": "0.6372048", "text": "public function setStatus($status) {\n\t\t$this->status = $status;\n\t}", "title": "" }, { "docid": "21932b2750fb6da93d4ebfcb9430ac04", "score": "0.6366446", "text": "public function setStatus ($status) {\n\t\t$this->status = $status;\n\t}", "title": "" }, { "docid": "50316bd27aa41b0656ace144c380561c", "score": "0.63606316", "text": "public function setStatus($status) {\n $this->status = $status;\n }", "title": "" }, { "docid": "50316bd27aa41b0656ace144c380561c", "score": "0.63606316", "text": "public function setStatus($status) {\n $this->status = $status;\n }", "title": "" }, { "docid": "877f1439fb2414bb50196027e69b33eb", "score": "0.6344987", "text": "public function assignStatusToState()\n {\n $this->_rootElement->find($this->assignButton)->click();\n }", "title": "" }, { "docid": "0606870b917d6a314fb767e53cdc81d1", "score": "0.63388556", "text": "private function initStatus()\n\t{\n\t\t$this->isSuccess();\n\t}", "title": "" }, { "docid": "ce97cc3ee47083500d1f03c82b057f0c", "score": "0.6333878", "text": "public function setStatus( $status ) {\n\t\t$this->status = $status;\n\t}", "title": "" }, { "docid": "ce97cc3ee47083500d1f03c82b057f0c", "score": "0.6333878", "text": "public function setStatus( $status ) {\n\t\t$this->status = $status;\n\t}", "title": "" }, { "docid": "be14cdd9bc3d6a5baae952c053e1b55e", "score": "0.6303375", "text": "public function setStatus($status)\n {\n $this->status = $status;\n }", "title": "" }, { "docid": "be14cdd9bc3d6a5baae952c053e1b55e", "score": "0.6303375", "text": "public function setStatus($status)\n {\n $this->status = $status;\n }", "title": "" }, { "docid": "be14cdd9bc3d6a5baae952c053e1b55e", "score": "0.6303375", "text": "public function setStatus($status)\n {\n $this->status = $status;\n }", "title": "" }, { "docid": "780094d04bf37498f517d481c0cce9f9", "score": "0.62914383", "text": "function setStatus($bstatus = 'f')\n {\n $this->bstatus = $bstatus;\n }", "title": "" }, { "docid": "302d62db74394b1eb6e1fb60b62a97fe", "score": "0.6285792", "text": "public function setPending()\n {\n $this->pending = true;\n }", "title": "" }, { "docid": "174a0a738121a68d2e0ab57cea3ec63e", "score": "0.62744063", "text": "public function set_status($status)\n {\n $this->status = $status;\n }", "title": "" }, { "docid": "f6e936e93f86b7867ad997ef1c471281", "score": "0.62640953", "text": "public function setStatus(string $status);", "title": "" }, { "docid": "5905b2fa4705f67832039786ff7604e4", "score": "0.62625563", "text": "public function set_status($status) {\n\t\t$this->status = $status;\n\t}", "title": "" }, { "docid": "7b23dc2c46ab78e02d0d66d7deb8cc08", "score": "0.6225974", "text": "public function ubahstatus(){\n $this->jikaUpdate = false;\n }", "title": "" }, { "docid": "2346d20a9d44a4f10a0a10fc0b6c8cc3", "score": "0.6223801", "text": "function setStatus($value)\n {\n if($value == \"none\") return;\n\n /* Can't set status flag for new services (Object doesn't exists in ldap tree) */\n if(!$this->initially_was_account) return;\n\n /* Can't set status flag, if no flag is specified */\n if(empty($this->StatusFlag)){\n return;\n }\n\n /* Get object (server), update status flag and save changes */\n $ldap = $this->config->get_ldap_link();\n $ldap->cd($this->dn);\n $ldap->cat($this->dn,array(\"objectClass\"));\n if($ldap->count()){\n\n $tmp = $ldap->fetch();\n for($i = 0; $i < $tmp['objectClass']['count']; $i ++){\n $attrs['objectClass'][] = $tmp['objectClass'][$i];\n }\n $flag = $this->StatusFlag;\n $attrs[$flag] = $value;\n $this->$flag = $value;\n $ldap->modify($attrs);\n if (!$ldap->success()){\n msg_dialog::display(_(\"LDAP error\"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));\n }\n $this->action_hook();\n }\n }", "title": "" }, { "docid": "bdddd99ce5955595196c40b12ab9f107", "score": "0.6217936", "text": "function switchStatus(){\n global $objDatabase;\n \n if($this->status == 1) {\n $status = 0;\n } else {\n $status = 1;\n }\n \n $query = \"UPDATE \".DBPREFIX.\"module_\".$this->moduleTablePrefix.\"_event AS event\n SET event.status = '\".intval($status).\"'\n WHERE event.id = '\".intval($this->id).\"'\";\n \n $objResult = $objDatabase->Execute($query);\n \n if ($objResult !== false) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "569044f80ec841e2367d42b58398387e", "score": "0.6214947", "text": "function check_status(){\n\t\t\tif($this->status == 'setup'){\n\t\t\t\t//check if all players have names\n\t\t\t\t$setup = true;\n\t\t\t\tforeach($this->commanders as $commander){\n\t\t\t\t\tif($commander['name'] == 'TBA'){\n\t\t\t\t\t\t$setup = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($setup){\n\t\t\t\t\t$this->status = 'active';\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "78daa33ec41fbbe6e0c4c1b093e1d01b", "score": "0.6211012", "text": "public function setstatus($status) {\n $this->status = $status;\n }", "title": "" }, { "docid": "455f5ca5d54abf55440cda8afd99b6ee", "score": "0.6210734", "text": "public function setStatus(?string $status): void;", "title": "" }, { "docid": "98201b6f237b9c2699698f60475d3de0", "score": "0.62045753", "text": "public function markActive()\n {\n $this->status = 'active';\n\n return $this->save();\n }", "title": "" }, { "docid": "649732fe7e10399894b1c98a5c1528b4", "score": "0.6203509", "text": "protected function setStatus($status)\n {\n $this->Status = $status;\n }", "title": "" }, { "docid": "537927da41604836bb6bc220f1491b08", "score": "0.620057", "text": "public function setStatus($status) {\r\n $this->pet_status = $status;\r\n }", "title": "" }, { "docid": "bc01e786f1a14601fbf185c196cf5cfa", "score": "0.6169358", "text": "public function setOnlineStatus($status = null)\n {\n $sql = \"UPDATE \". self::getSourceTable() . \" SET statusKey=$status WHERE {$this->getSelfCondition()}\";\n // echo $sql;\n $res = sql_helper::updateQuery($sql);\n if (!$res) die(sql_helper::getErrMsg());//return false;\n else return true;\n }", "title": "" }, { "docid": "0ae654883e4d8a74e964157a7757948a", "score": "0.6165104", "text": "public function setStatus(int $status);", "title": "" }, { "docid": "98595a64cbaab93157c2299ad123d698", "score": "0.61463773", "text": "function setNameAsStatus($nameAsStatus = true) {\r\n $this->bNameAsStatus = (bool)$nameAsStatus;\r\n }", "title": "" }, { "docid": "25ae3b1f489ced752a74a4efddaf1594", "score": "0.6145362", "text": "protected function checkStatus()\n {\n \n }", "title": "" }, { "docid": "6beab4450eca8d824f0e06cec4b1876c", "score": "0.61384565", "text": "public function setStatus($status) {\n if (!empty($status)) {\n $this->status = $status;\n }\n }", "title": "" }, { "docid": "056cba4f5540b44a199009d462fe6282", "score": "0.6135567", "text": "public function setStatus($status){\n $this->status = $status;\n\n $mysqli = \\Database::Instance()->get();\n\n $stmt = $mysqli->prepare(\"UPDATE `reports` SET `status` = ? WHERE `id` = ?\");\n $stmt->bind_param(\"si\",$this->status,$this->id);\n $stmt->execute();\n $stmt->close();\n\n $this->saveToCache();\n }", "title": "" }, { "docid": "a32a97e390abbb8aa5be6b297888e67c", "score": "0.60973084", "text": "private function checkStatus() : void\n {\n if(!isset($this->post['status']))\n {\n (new Session())->set('product', 'error', 'Veuillez selectionner le statut du produit : online (On) / offline (Off)');\n $this->controller->redirectTo(\"product/create\");\n }\n }", "title": "" }, { "docid": "d16218bb0612233805236c39f3cdd310", "score": "0.6090583", "text": "public function saveStatus()\r\n\t{\r\n\t\treturn $this->getOwner()->save(TRUE, array($this->statusField));\r\n\t}", "title": "" }, { "docid": "8c086a009b44dc97ab843f33019a2c80", "score": "0.60898316", "text": "protected final function cacheOn($status=true)\r\n {\r\n if($status){\r\n $this->_cacheOn = true;\r\n }else{\r\n $this->_cacheOn = false;\r\n }\r\n }", "title": "" }, { "docid": "74bae01f00aab82babb21bcc1d836378", "score": "0.60818976", "text": "private function setEventStatus() {\n\t\t$this->getEvent()->setStatus($this->statusToSet);\n\t\t$this->getEvent()->commitToDb();\n\t}", "title": "" }, { "docid": "bb88f2f691e80b619f7fe4c507bc0750", "score": "0.6079616", "text": "public function setStatus($status)\r\n {\r\n $statuses = array('active', 'pending', 'maintenance', 'retired');\r\n if(in_array($status, $statuses))\r\n $this->status = $status;\r\n }", "title": "" }, { "docid": "1d99ac25ac298035f2451d6ebefadec4", "score": "0.6070287", "text": "public function set_status( $status ) {\n\t\t$set = false;\n\n\t\t$is_protected = cacsp_paper_is_protected( $this->id );\n\n\t\tif ( ! $is_protected && ( 'protected' === $status || 'private' === $status ) ) {\n\t\t\t$set = wp_set_object_terms( $this->id, 'protected', 'cacsp_paper_status', false );\n\t\t} elseif ( $is_protected && 'public' === $status ) {\n\t\t\t$set = wp_remove_object_terms( $this->id, 'protected', 'cacsp_paper_status' );\n\t\t}\n\n\t\tif ( false === $set || is_wp_error( $set ) ) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\twp_cache_delete( 'last_changed', 'posts' );\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "1b230d034bf852c9bd403e369f017a8a", "score": "0.60699993", "text": "public static function setStatus($int){\n\t\t\tself::$status = $int;\n\t\t}", "title": "" }, { "docid": "a328303d07af056a5e672a576a669808", "score": "0.6069395", "text": "public function setStatus($status)\n {\n $this->status = $status;\n \n return $this;\n }", "title": "" }, { "docid": "6c779fc23c4451a55a2279f02335171b", "score": "0.60489136", "text": "public function setStatus($status)\n {\n\t\tDB::nonQuery('UPDATE `%s` SET Status = \"%s\" WHERE ID = %u', array(\n\t\t\tstatic::$tableName\n\t\t\t,DB::escape($status)\n\t\t\t,$this->ID\n\t\t));\n }", "title": "" }, { "docid": "cc36750087ea98c2297de96b3ca1ffab", "score": "0.60431737", "text": "public function change_status($status) {\n\t\t/* Retrieve all tags */\n\t\t$tags = $this->tags;\n\t\t$tag_ids = array();\n\t\tforeach($tags as $tag) {\n\t\t\t$tag_ids[$tag->id] = $tag->id;\n\t\t}\n\n\t\tif($status == 0) {\n\t\t\t$this->closed_by = \\Auth::user()->id;\n\t\t\t$this->closed_at = date('Y-m-d H:i:s');\n\n\t\t\t/* Update tags */\n\t\t\t$tag_ids[2] = 2;\n\t\t\tif(isset($tag_ids[1])) { unset($tag_ids[1]); }\n\t\t\tif(isset($tag_ids[8])) { unset($tag_ids[8]); }\n\n\t\t\t/* Add to activity log */\n\t\t\t\\User\\Activity::add(3, $this->project_id, $this->id);\n\t\t\t//$text = __('tinyissue.following_email_status_bis').__('email.closed').'.<br /><br />'.$text;\n//\t\t\t$this->Courriel ('Issue', true, \\Project::current()->id, $this->id, \\Auth::user()->id, array('closed','status','status_bis'), array('tinyissue','tinyissue','tinyissue'));\n\t\t\t\\Mail::letMailIt(array(\n\t\t\t\t'ProjectID' => \\Project::current()->id, \n\t\t\t\t'IssueID' => $this->id, \n\t\t\t\t'SkipUser' => true,\n\t\t\t\t'Type' => 'Issue', \n\t\t\t\t'user' => \\Auth::user()->id,\n\t\t\t\t'contenu' => array('closed','status','status_bis'),\n\t\t\t\t'src' => array('tinyissue','tinyissue','tinyissue')\n\t\t\t\t),\n\t\t\t\t\\Auth::user()->id, \n\t\t\t\t\\Auth::user()->language\n\t\t\t);\n\n\t\t} else {\n\t\t\t$this->closed_by = NULL;\n\t\t\t$this->closed_at = NULL;\n\n\t\t\t/* Update tags */\n\t\t\t$tag_ids[1] = 1;\n\t\t\tif(isset($tag_ids[2])) {\n\t\t\t\tunset($tag_ids[2]);\n\t\t\t}\n\n\t\t\t/* Add to activity Log */\n\t\t\t\\User\\Activity::add(4, $this->project_id, $this->id);\n\t\t\t//Notify all followers about the new status\n//\t\t\t$this->Courriel ('Issue', true, \\Project::current()->id, $this->id, \\Auth::user()->id, array('reopened','status','status_bis'), array('tinyissue','tinyissue','tinyissue'));\n\t\t\t\\Mail::letMailIt(array(\n\t\t\t\t'ProjectID' => \\Project::current()->id, \n\t\t\t\t'IssueID' => $this->id, \n\t\t\t\t'SkipUser' => true,\n\t\t\t\t'Type' => 'Issue', \n\t\t\t\t'user' => \\Auth::user()->id,\n\t\t\t\t'contenu' => array('reopened','status','status_bis'),\n\t\t\t\t'src' => array('tinyissue','tinyissue','tinyissue')\n\t\t\t\t),\n\t\t\t\t\\Auth::user()->id, \n\t\t\t\t\\Auth::user()->language\n\t\t\t);\n\t\t\t\n\t\t}\n\t\t$this->tags()->sync($tag_ids);\n\t\t$this->status = $status;\n\t\t$this->save();\n\t}", "title": "" }, { "docid": "3d67148f2ccb6ed3dacd2fa404d04bda", "score": "0.6015429", "text": "public function setStatusLock()\n\t{\n\t\t$this->DB->prepare(\"UPDATE stores s SET s.statusLock = ? WHERE s.id = ?\", [\n\t\t\t[INTEGER, $_POST['statusLock']],\n\t\t\t[INTEGER, $_POST['id']]\n\t\t]);\n\t\t$result = $this->DB->execute();\n\t}", "title": "" }, { "docid": "58d1d31bdd576a884f8454a8079223e6", "score": "0.5995809", "text": "protected function clearStatus() : void\n {\n }", "title": "" }, { "docid": "3c0ef56863f1f651b20298b26d053ea7", "score": "0.5995256", "text": "public function ative() {\n return $this->update([\n \"status\" => \"active\"\n ]);\n }", "title": "" }, { "docid": "e1af3730dde229d26b19dd0406faccfd", "score": "0.5984958", "text": "public function markAsRunning()\n {\n if (empty($this->start_time)) {\n $this->start_time = Util::epochToDateTime();\n }\n \n $this->status = self::STATUS_RUNNING;\n $this->save();\n }", "title": "" }, { "docid": "70d8c44cca079a3b0773cfdf30fd8782", "score": "0.59804106", "text": "function getStatus()\n {\n return false;\n }", "title": "" }, { "docid": "8902bc80a75e5b3c9700ffc22d586c86", "score": "0.59700036", "text": "function setStatus( $status, $directWrite = false )\n {\n $this->Status = $status;\n }", "title": "" }, { "docid": "9ceb27e7bd75f67a488d1ccda0bd6055", "score": "0.59692335", "text": "public function setup() {\n $this->setStatus(JobStatus::INPROGRESS);\n }", "title": "" }, { "docid": "7dd57b0e40be922143b7a8b5dfd19ec3", "score": "0.59688056", "text": "public function changestatus()\n {\n\t\t$data['image'] = $this->Imagemodel->get_image_by_id($this->input->post('id'));\n\t\t$status = ($data['image'][0]['isActive']=='1') ? '0' : '1';\n\t\t\n\t\t$data_to_store = array(\n\t\t\t'isActive' => $status,\n\t\t);\n\t\t$this->Imagemodel->setUpdatedImageData($this->input->post('id'), $data_to_store);\n\t\techo $status;\n\t\t\n }", "title": "" }, { "docid": "531e6cfbf3e45fc71bf8f0ac9f292576", "score": "0.5962913", "text": "public function changeStatus() {\n $this->accountStatus(); \n\n $this->autoRender = false;\n $data = $this->request->data;\n // Check permission\n $userId = $this->Auth->user('id');\n $result = $this->Quiz->find('first', array(\n 'conditions' => array(\n 'Quiz.id = ' => $data['quiz_id'],\n 'Quiz.user_id = ' => $userId\n ),\n 'recursive' => -1\n ));\n \n\n if (empty($result)) {\n $response['result'] = 0;\n $response['message'] = __('You are not authorized to do this action');\n echo json_encode($response);\n exit;\n }\n\n $status = empty($data['status']) ? 1 : 0;\n $this->Quiz->id = $result['Quiz']['id'];\n if ($this->Quiz->saveField('status', $status)) {\n if ($this->Session->check('Quiz.status')) {\n $filter = $this->Session->read('Quiz.status');\n } else {\n $filter = 1;\n }\n $response['result'] = 1;\n $response['filter'] = $filter;\n $response['message'] = __('Operation Successfuly Done');\n echo json_encode($response);\n }\n }", "title": "" }, { "docid": "6ae9084a9bb90ae9517cbe54478559e0", "score": "0.5961618", "text": "public function setStatus($value);", "title": "" }, { "docid": "e2d2698b8e0cfe7a29a20c32d1b6346a", "score": "0.5959336", "text": "public function setStatus(string $status)\n\t{\n\t\t$this->status=$status; \n\t\t$this->keyModified['status'] = 1; \n\n\t}", "title": "" }, { "docid": "0ee7a5efe0a4592961357e865d8f0cdd", "score": "0.5943411", "text": "abstract public function setReleasedStatus();", "title": "" }, { "docid": "65b90ce28ce60a37327e2201e901adc9", "score": "0.5942497", "text": "public function setStatus()\n\t{\n\t\t$this->DB->prepare(\"UPDATE stores s SET s.status = ? WHERE s.id = ?\", [\n\t\t\t[INTEGER, $_POST['status']],\n\t\t\t[INTEGER, $_POST['id']]\n\t\t]);\n\t\t$result = $this->DB->execute();\n\t\t//$this->ajaxReturn($output);\n\t}", "title": "" }, { "docid": "7fda1ab08ba2ab43153d095a0f8dd32f", "score": "0.59311485", "text": "public function updateStatus()\n {\n $payin = Payin::findOne($this->payin_id);\n $payin->updateStatus();\n\n if ($this->status == self::AWAITING_PAYMENT && $payin->status == Payin::STATUS_PENDING) {\n $this->status = self::PENDING;\n $this->save();\n }\n }", "title": "" }, { "docid": "e81235205316f1c06f0e6c7a2bee7041", "score": "0.5928759", "text": "public function setStatus(?string $status): void\n {\n $this->status = $status;\n }", "title": "" }, { "docid": "e81235205316f1c06f0e6c7a2bee7041", "score": "0.5928759", "text": "public function setStatus(?string $status): void\n {\n $this->status = $status;\n }", "title": "" }, { "docid": "3a096b820f02ffb691b5f9b5a1f394d3", "score": "0.5902523", "text": "public function setSuccessStatus()\n\t{\n\t\t$this->status = self::SUCCESS;\n\t}", "title": "" }, { "docid": "5e32a1beda252a039f81addbd6ff49b0", "score": "0.5896574", "text": "public function setStatusSuccess() {\n $this->__status = self::STATUS_SUCCESS;\n }", "title": "" }, { "docid": "c2bd17bb9dc3e8c55c7cf7328a050d98", "score": "0.5891196", "text": "private function addStatus()\n {\n $aData = [\n [1, 'New'],\n [2, 'Done', 1],\n [3, 'In work'],\n [4, 'Paused'],\n [5, 'Annuled', 1],\n ];\n\n foreach ($aData as $aRow)\n {\n $this->insert('status', [\n 'id' => $aRow[0],\n 'title' => $aRow[1],\n 'weight' => $aRow[0],\n 'closed' => isset($aRow[2]) ? (int)(bool)$aRow[2] : 0\n ]);\n }\n }", "title": "" }, { "docid": "cdf99edc44657e5d4569646efdb2fc0e", "score": "0.5889598", "text": "function checkStatus() {\n\t\n\t\t/* query the database */\n\t\t$query = \"SELECT sysLaunchStatus FROM sms_system WHERE sysid = '1'\";\n\t\t$result = mysql_query( $query );\n\t\t$fetch = mysql_fetch_array( $result );\n\t\t\n\t\t/* update the status variable */\n\t\t$this->status = $fetch[0];\n\t\n\t}", "title": "" }, { "docid": "d1bde9db8ce44fb352d5aa5c54097cba", "score": "0.5889241", "text": "abstract public function checkStatus();", "title": "" }, { "docid": "57dbbedf1555256c51b2a3aef46e7e18", "score": "0.58834296", "text": "public function setAlive()\n {\n $this->_isAlive = true;\n }", "title": "" }, { "docid": "2b297d7a4a32edc38452289cad70e925", "score": "0.5881492", "text": "function agent_initStatus() {\n\t\t$qwhere = 'status=1';\n\n\t\t$ret = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows (\n\t\t\t'uid',\n\t\t\t'tx_hooker_agent',\n\t\t\t$qwhere,\n\t\t\t'',\n\t\t\t'',\n\t\t\t'0,100'\n\t\t);\n\n\t\t$insertq['status'] = 2;\n\n\t\tif (isset($ret[0])) {\n\t\t\treset($ret);\n\t\t\twhile(list($retK,$retV)=each($ret)) {\n\t\t\t\t$cnt[] = $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_hooker_agent','uid=\"'.$retV['uid'].'\"',$insertq);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "52ceee6429eede3eec86302cd9689066", "score": "0.58783656", "text": "public function setIsVisibleToCircles($status) {\n\n $intStatus = ($status == TRUE) ? 1 : 0 ;\n\n $db = new db();\n $db->connect();\n $statement = $db -> prepare(\"UPDATE photocollection SET isVisibleToCircles = ? WHERE collectionID = ?\");\n $statement->bind_param(\"ii\",$intStatus, $this->id);\n $statement->execute();\n\n $this->isVisibleToCircles = $intStatus;\n\n }", "title": "" }, { "docid": "0cebacf11f761cdcfa728103cf94ebc8", "score": "0.5877176", "text": "public function changeStatus()\n\t{\n\t\t$s = new SystemStatus();\n\t\t$s->status = SystemStatus::model()->nextStatus();\n\t\t$s->time = time();\n\t\t$s->save();\n\t}", "title": "" }, { "docid": "5f7f82e672d83da6ae246f713feb139c", "score": "0.58767843", "text": "public function set_Status($status_in)\n {\n $this->status = $status_in;\n }", "title": "" }, { "docid": "db064494ed3c7b91b2bb260433a45b1c", "score": "0.5870588", "text": "public function setStatus(string $status): void\n {\n $this->status = $status;\n }", "title": "" }, { "docid": "98b3c7d4ca1c3400efa5ea38986d40f5", "score": "0.5865687", "text": "public function isInitialStatus();", "title": "" }, { "docid": "a87771c44257cce8017194672d424ead", "score": "0.58631206", "text": "public function setInUse()\n {\n $this->currentlyUsed = true;\n }", "title": "" }, { "docid": "f681020a6753f3640b08d67ab1d59ae1", "score": "0.5863006", "text": "public function setOnline()\n {\n $this->online = true;\n $this->save();\n }", "title": "" }, { "docid": "be7ccc079db18f4c54dc153de62ca97b", "score": "0.58574617", "text": "public function setStatus( $status )\n\t{\n\t\t$data = $this->data;\n\t\t$data[ 'status' ] = (string) $status;\n\t\t$this->data = $data;\n\t\t$this->save();\n\t}", "title": "" }, { "docid": "5153d9f7989b782171cbd92401ae258b", "score": "0.58570576", "text": "private function setStatus($status)\n {\n $this->request->request(\n \"sites/{$this->site->id}/settings\",\n ['method' => 'put', 'form_params' => ['allow_indexserver' => $status,],]\n );\n }", "title": "" }, { "docid": "ccc84eec70ac494b426dadd50f724af6", "score": "0.5853352", "text": "public function setActiveStatusWithoutVersioning( $toStatus ){\n $eventID = $this->getID();\n\n self::adhocQuery(function( \\PDO $connection ) use ($eventID, $toStatus){\n $statement = $connection->prepare(\"\n UPDATE SchedulizerEvent SET isActive = :isActive WHERE id = :eventID;\n \");\n $statement->bindValue(\":isActive\", (bool)$toStatus);\n $statement->bindValue(\":eventID\", $eventID);\n return $statement;\n });\n }", "title": "" }, { "docid": "c8f32d0f34bb85f8e5aaa95f5d43f32c", "score": "0.58504224", "text": "public function setStatus($val)\n {\n $this->_propDict[\"status\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "c8f32d0f34bb85f8e5aaa95f5d43f32c", "score": "0.58504224", "text": "public function setStatus($val)\n {\n $this->_propDict[\"status\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "c8f32d0f34bb85f8e5aaa95f5d43f32c", "score": "0.58504224", "text": "public function setStatus($val)\n {\n $this->_propDict[\"status\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "c8f32d0f34bb85f8e5aaa95f5d43f32c", "score": "0.58504224", "text": "public function setStatus($val)\n {\n $this->_propDict[\"status\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "c8f32d0f34bb85f8e5aaa95f5d43f32c", "score": "0.58504224", "text": "public function setStatus($val)\n {\n $this->_propDict[\"status\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "d42c038219c81f478da3496bca16c1b2", "score": "0.58480716", "text": "function setStatus($inStatus) {\n\t\tif ( $inStatus !== $this->_Status ) {\n\t\t\t$this->_Status = $inStatus;\n\t\t\t$this->setModified();\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "d42c038219c81f478da3496bca16c1b2", "score": "0.58480716", "text": "function setStatus($inStatus) {\n\t\tif ( $inStatus !== $this->_Status ) {\n\t\t\t$this->_Status = $inStatus;\n\t\t\t$this->setModified();\n\t\t}\n\t\treturn $this;\n\t}", "title": "" } ]
4933ea289629b823ac9e8b3e2d0fb64c
Gets the chosen payment method ID from the request.
[ { "docid": "42f63690ef7de53abb650e13b458212f", "score": "0.77294296", "text": "private function get_request_payment_method_id( WP_REST_Request $request ) {\n\t\t$payment_method_id = isset( $request['payment_method'] )\n\t\t\t? wc_clean( wp_unslash( $request['payment_method'] ) )\n\t\t\t: '';\n\n\t\tif ( empty( $payment_method_id ) ) {\n\t\t\tthrow new RouteException(\n\t\t\t\t'woocommerce_rest_checkout_missing_payment_method',\n\t\t\t\t__( 'No payment method provided.', 'woocommerce' ),\n\t\t\t\t400\n\t\t\t);\n\t\t}\n\n\t\treturn $payment_method_id;\n\t}", "title": "" } ]
[ { "docid": "b969fb790dbc86843e24b341d519a353", "score": "0.7211424", "text": "public function getPaymentMethodId()\n {\n return $this->payment_method_id;\n }", "title": "" }, { "docid": "cfb5d584b8cdad9f691a2f9b3f2c8ef6", "score": "0.71605325", "text": "public function getPaymentMethodId()\n {\n return $this->paymentMethodId;\n }", "title": "" }, { "docid": "80f7aa61bf0932eff999f14a3a22af93", "score": "0.70017695", "text": "public function getIdMethodPayment()\n {\n return $this->id_method_payment;\n }", "title": "" }, { "docid": "7bde126bbb3752d3e25961244204dfad", "score": "0.6956702", "text": "public function getPaymentMethod()\n {\n $paymentMethods = $this->paymentMethodRepository->allForPlugin(PaymentMethodService::PLUGIN_KEY);\n\n if (!is_null($paymentMethods)) {\n foreach ($paymentMethods as $paymentMethod) {\n if ($paymentMethod->paymentKey == PaymentMethodService::PAYMENT_KEY) {\n return $paymentMethod->id;\n }\n }\n }\n\n return 'no_paymentmethod_found';\n }", "title": "" }, { "docid": "cdcbec1927c5e96e219570c314d7a0fb", "score": "0.6763054", "text": "public function getPaymentMethod();", "title": "" }, { "docid": "cb2e64f2a479e3aa5971b047d3b5b732", "score": "0.6723827", "text": "public function getPaymentMethod()\n {\n return isSetNotEmpty($this->requestData, 'payment_method') ?: null;\n }", "title": "" }, { "docid": "bf4566fa3315c7994589a1103a3d378a", "score": "0.66706216", "text": "function get_payment_method() {\n\t\treturn $this->_aPedido['id_forma_pago'];\n\t}", "title": "" }, { "docid": "71ad2b260cf17d5c27b3bc86072dcbc5", "score": "0.6647848", "text": "public function getMethodId()\n {\n return \\XLite\\Core\\Request::getInstance()->method_id;\n }", "title": "" }, { "docid": "b55d110d6f56b997e86f6451c06f458c", "score": "0.65956783", "text": "public function getPaymentId ();", "title": "" }, { "docid": "4b98b38002e10db7775449d6707b14c4", "score": "0.6561602", "text": "private function get_request_payment_method( WP_REST_Request $request ) {\n\t\t$payment_method_id = $this->get_request_payment_method_id( $request );\n\t\t$available_gateways = WC()->payment_gateways->get_available_payment_gateways();\n\n\t\tif ( ! isset( $available_gateways[ $payment_method_id ] ) ) {\n\t\t\tthrow new RouteException(\n\t\t\t\t'woocommerce_rest_checkout_payment_method_disabled',\n\t\t\t\t__( 'This payment gateway is not available.', 'woocommerce' ),\n\t\t\t\t400\n\t\t\t);\n\t\t}\n\n\t\treturn $available_gateways[ $payment_method_id ];\n\t}", "title": "" }, { "docid": "789171370d5ca452741141ab345e200b", "score": "0.65371567", "text": "public function getPaymentMethod($idpaymentmethod);", "title": "" }, { "docid": "20f47da5302f776725614f98a6ef497b", "score": "0.64068437", "text": "public function fetchPaymentMethod() {\n return auth()->user()->payment_methods()->where('method', '=', $this->methodName)->first();\n }", "title": "" }, { "docid": "c921a107a0f13db3bdea929827276f4e", "score": "0.638839", "text": "public function getPaymentMethod()\n {\n if (isset($this->data['object']) && 'setup_intent' === $this->data['object']) {\n return $this->data['payment_method'];\n }\n\n return null;\n }", "title": "" }, { "docid": "f72db2f6a993a46286c0e8b7e748d436", "score": "0.630724", "text": "public function getPaymentMethod()\n {\n return $this->_fields['PaymentMethod']['FieldValue'];\n }", "title": "" }, { "docid": "7f4c2217a357258518af37b20c64835d", "score": "0.6285641", "text": "public function getPaymentMethod(): string {\n return $this->paymentMethod;\n }", "title": "" }, { "docid": "6bda30e50cb8a47ac6883928007636fa", "score": "0.62640464", "text": "private function _getPaymentMethod()\n {\n return pi_ratepay_util_utilities::getPaymentMethod($this->_getPaymentType());\n }", "title": "" }, { "docid": "7c7f973868721167bd5c89129bc8fa99", "score": "0.62619996", "text": "public function getPaymentMethod()\r\n {\r\n return $this->payment_method;\r\n }", "title": "" }, { "docid": "b7163072219a5d57bf2231960ad28fe7", "score": "0.6226669", "text": "public function getPaymentMethod()\n {\n return $this->payment_method;\n }", "title": "" }, { "docid": "ed7bf1a7b9ec9994486cbea8ce8dd5c7", "score": "0.62088233", "text": "public function getPaymentMethod(): string\n {\n return $this->paymentMethod;\n }", "title": "" }, { "docid": "4bf7a55cad1f9932e218c59a530c2966", "score": "0.62041074", "text": "public function getPaymentMethod()\n {\n return isset($this->paymentMethod) ? $this->paymentMethod : null;\n }", "title": "" }, { "docid": "d53d4fea9693cbdae7f430b487cca865", "score": "0.6201", "text": "public function getPaymentMethod() {\n return $this->paymentMethod;\n }", "title": "" }, { "docid": "c1042446e07034504c2ac257518fa277", "score": "0.6200275", "text": "public function getPaymentMethodConfigId()\n {\n $preselectedConfigId = $this->getInfoData('payone_config_payment_method_id');\n\n $preselectPossible = false;\n foreach ($this->getTypes() as $type) {\n if ($type['config_id'] == $preselectedConfigId) {\n $preselectPossible = true;\n }\n }\n\n if ($preselectPossible) {\n return $preselectedConfigId;\n } else {\n return 0;\n }\n }", "title": "" }, { "docid": "b82b31fe60abdfd807581ddd82a742a6", "score": "0.61965454", "text": "public function get_payment_method()\n {\n return $this->prices['payment_method'];\n }", "title": "" }, { "docid": "1bac47081a5010c8233b8c65bb1473e2", "score": "0.6156674", "text": "public function getPaymentMethod(): ?string\n {\n return $this->paymentMethod;\n }", "title": "" }, { "docid": "98f70a3c6ee43a686ae839d824f11709", "score": "0.6155433", "text": "public function getPaymentMethod()\n {\n return $this->paymentMethod;\n }", "title": "" }, { "docid": "98f70a3c6ee43a686ae839d824f11709", "score": "0.6155433", "text": "public function getPaymentMethod()\n {\n return $this->paymentMethod;\n }", "title": "" }, { "docid": "d66755dbe48f858bfdc185a04f067f49", "score": "0.61299545", "text": "private function getUniquePayment()\n {\n return $this->uniquePayment ? $this->getValue(self::ID_POINT_OFINITIATION_METHOD,'12') : '';\n }", "title": "" }, { "docid": "e229c940e54b548a772bd8cd70aae7a4", "score": "0.61278015", "text": "function getPaymentId() {\n\t\treturn $this->paymentId;\n\t}", "title": "" }, { "docid": "35b4edb57ed5ef0d67e7de15bbe09c48", "score": "0.6092426", "text": "function paymentMethod()\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n return $this->PaymentMethod;\n }", "title": "" }, { "docid": "4006cf0eaad19c6fb49c5dbb4acd06ed", "score": "0.60590935", "text": "protected function getPaymentMethod(){\n //get Payment method\n $sTotalPayment = '';\n foreach($this->aNewData['Totals'] as $aTotal ){\n if($aTotal['Type']=='Payment'){\n $sTotalPayment = (!isset($aTotal['Code']) || empty($aTotal['Code']))?'magnalister - '.MLModul::gi()->getMarketPlaceName():$aTotal['Code'];\n break;\n }\n }\n\n if(empty($sTotalPayment)){//some marketplace don't send any information about payment\n $sTotalPayment = 'magnalister - '.MLModul::gi()->getMarketPlaceName();\n }\n \n return $sTotalPayment;\n }", "title": "" }, { "docid": "81718c5880b326a1c10c9bd9c09f28f3", "score": "0.60067964", "text": "public function getPaymentMethodCode()\n {\n \treturn $this->_getOrder()->getPayment()->getMethodInstance()->getCode();\n }", "title": "" }, { "docid": "a783627a2d10c8b7902006f530e17497", "score": "0.596928", "text": "public function getSelectedMethodCode() {\n\t\tif ($method = $this->getOrder()->getPayment()->getMethod()) {\n\t\t\treturn $method;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "710a0977b81294cc0fe7750f50459f42", "score": "0.5928661", "text": "public function getSelectedMethodCode()\n {\n if ($method = $this->getQuote()->getPayment()->getMethod()) {\n return $method;\n }\n return false;\n }", "title": "" }, { "docid": "59cff31ddbbfcef6d037c1852d0caad6", "score": "0.5903901", "text": "public function getPaymentProviderId()\n {\n return $this->paymentProviderId;\n }", "title": "" }, { "docid": "2e46ca054ef2063cc44fea2418d81c92", "score": "0.5898877", "text": "public function get_method_name()\n\t{\n\t\treturn \"pay_{$this->payment_method}\";\n\t}", "title": "" }, { "docid": "c1532ee6d03152741ed7f89b2884faf6", "score": "0.58815044", "text": "public function getPaymentType();", "title": "" }, { "docid": "b2dc6699ef912717afa59327eedc1791", "score": "0.58477354", "text": "public function getPaymentMethod()\n {\n return Mage::getSingleton('comfinpay/paymentMethod');\n }", "title": "" }, { "docid": "5ea1b01708ac37aa1703ead8690e953c", "score": "0.5777061", "text": "private function _getPaymentType()\n {\n return $this->_paymentType;\n }", "title": "" }, { "docid": "c6895d38a68028140572ed5accf71e00", "score": "0.57526684", "text": "public function getPaymentMethodType()\n {\n return $this->_paymentMethod;\n }", "title": "" }, { "docid": "c6895d38a68028140572ed5accf71e00", "score": "0.57526684", "text": "public function getPaymentMethodType()\n {\n return $this->_paymentMethod;\n }", "title": "" }, { "docid": "33ec884e1113df22f0adcf77e3da122e", "score": "0.56649315", "text": "public static function getToken()\n {\n $token = Request::get('checkout')['payment']['paymentMethod']['id'];\n\n if (!$token) {\n $token = Session::get('paymentIntent')['token'];\n }\n\n if (!$token) {\n throw new Exception(\"The payment method token is missing\", 404);\n }\n\n return $token;\n }", "title": "" }, { "docid": "26eb8c99da9a26f8e90884a7bed9f98f", "score": "0.56553304", "text": "public function getPaymentId(): ?string\n {\n if (count($this->paymentId) == 0) {\n return null;\n }\n return $this->paymentId['value'];\n }", "title": "" }, { "docid": "244346a89d0b3651dda5f78ce92e47e6", "score": "0.56465596", "text": "public function PaymentMethod(): ?string\n {\n $supportedMethods = self::get_supported_methods($this->Order());\n if (isset($supportedMethods[$this->ClassName])) {\n return $supportedMethods[$this->ClassName];\n }\n\n return null;\n }", "title": "" }, { "docid": "9dd93a8091eb9c0fe338532ad94a5748", "score": "0.5613969", "text": "public function getPaymentType() {\n return $this->paymentType;\n }", "title": "" }, { "docid": "03e2d7ff96044eb74794158466c97731", "score": "0.5593185", "text": "public function getPaymentType()\n {\n return $this->paymentType;\n }", "title": "" }, { "docid": "8c01aff0e03b0d99b4aa72832a8f8ed4", "score": "0.5587401", "text": "public function getPaymentMethodName(){\n return $this->paymentMethod ? $this->paymentMethod->type : '- no payment method assigned -';\n }", "title": "" }, { "docid": "053dce9725316141ad2a61e11070c3d2", "score": "0.5578953", "text": "public function getPaymentType(): string {\n\t\treturn $this->paymentType;\n\t}", "title": "" }, { "docid": "f3de0c326963dbdd76a7daae3417a375", "score": "0.55751055", "text": "public function getPaymentType()\r\n {\r\n return $this->paymentType;\r\n }", "title": "" }, { "docid": "ab84f4e286db702950cf051ab5edd6f9", "score": "0.55125797", "text": "private function getPaymentMethodId($handlerIdentifier, $name) : ?string\n {\n // Fetch ID for update\n $paymentCriteria = new Criteria();\n $paymentCriteria->addFilter(new EqualsFilter('handlerIdentifier', $handlerIdentifier));\n $paymentCriteria->addFilter(new EqualsFilter('name', $name));\n\n // Get payment IDs\n $paymentIds = $this->paymentRepository->searchIds($paymentCriteria, Context::createDefaultContext());\n\n if ($paymentIds->getTotal() === 0) {\n return null;\n }\n\n return $paymentIds->getIds()[0];\n }", "title": "" }, { "docid": "c3dbb6fec49600a9532e2b79619c7bc0", "score": "0.5499926", "text": "public function get_payment_method() {\n\t \treturn $query = $this->db->query(\"SELECT * from xin_payment_method\");\n\t}", "title": "" }, { "docid": "0a107deff213c3f710f44c35f2fe54f6", "score": "0.5436784", "text": "public function getDefaultPaymentMethodType();", "title": "" }, { "docid": "3cb0a76f061f5392917dba3fd4acdcc0", "score": "0.54264003", "text": "private function getMethod($request)\n\t{\n\t\tif ($request->type == 0) {\n\t\t\t$method = \"GetRates\";\n\t\t}else{\n\t\t\t$method = \"GenerateContract\";\n\t\t}\n\t\treturn $method;\t\n\t}", "title": "" }, { "docid": "f24130ae0686f2632dd4e6ca2edd05ba", "score": "0.53971785", "text": "public function requestMethod()\n\t{\n\t\t// Since PHP does not support methods other than GET and POST we need to\n\t\t// check for a custom value supplied with the request. If it matches any\n\t\t// of the supported requests we use that method instead of the set metod\n\t\t// for the request.\n\t\tif (isset($_POST['_method'])) {\n\n\t\t\t$method = strtoupper($_POST['_method']);\n\n\t\t\tif (in_array($method, $this->availibleMethods)) {\n\t\t\t\treturn $method;\n\t\t\t}\n\t\t}\n\n\t\treturn $_SERVER['REQUEST_METHOD'];\n\t}", "title": "" }, { "docid": "69503295500f6dad776990d848cdb6c7", "score": "0.53898793", "text": "public function getPaymentProviderId(): ?string\n {\n return $this->payment_provider_id;\n }", "title": "" }, { "docid": "a22fcb356f91fff3ce49652e1954890f", "score": "0.5385483", "text": "public function get_final_payment_method()\n {\n return $this->prices['part_payments']['method'];\n }", "title": "" }, { "docid": "4b448e41ac5a38ed4ac953f24705f6bf", "score": "0.53733236", "text": "private function _getSignatureMethod(Request &$request) {\n $signature_method =\n @$request->getParameter(\"signature_method\");\n\n if (!$signature_method) {\n // According to chapter 7 (\"Accessing Protected Ressources\") the signature-method\n // parameter is required, and we can't just fallback to PLAINTEXT\n throw new Exception('No signature method parameter. This parameter is required', 400);\n }\n\n if (!in_array($signature_method,\n array_keys($this->_signatureMethods))) {\n throw new Exception(\"Signature method '$signature_method' not supported try one of the following: \" .\n implode(\", \", array_keys($this->_signatureMethods)), 400);\n }\n return $this->_signatureMethods[$signature_method];\n }", "title": "" }, { "docid": "732e0861e8ab6a87d2bb929f07c851ea", "score": "0.53520006", "text": "public function getPaymentMethodId(string $paymentMethodClass): int\n {\n $paymentMethods = $this->paymentMethodRepo->allForPlugin(Plugin::KEY);\n\n if (!empty($paymentMethods)) {\n /** @var PaymentMethod $payMethod */\n foreach ($paymentMethods as $payMethod) {\n if ($payMethod->paymentKey === $this->methodConfig->getPaymentMethodKey($paymentMethodClass)) {\n return $payMethod->id;\n }\n }\n }\n\n return self::NO_PAYMENTMETHOD_FOUND;\n }", "title": "" }, { "docid": "35f6e562ed40d12c7d7ec78f32d95ceb", "score": "0.53502804", "text": "public function getPrimaryPaymentMethodAttribute()\n {\n return $this->paymentMethods()->where('default', '=', true)->first();\n }", "title": "" }, { "docid": "43656ef0533a62a4bd4bffcaf4aaf97c", "score": "0.53482056", "text": "private function get_shipping_method() {\r\n\t\tif ( isset( $_POST['shipping_methods'] ) && !empty( $_POST['shipping_methods'] ) ) {\r\n\t\t\t$shipping_methods = !strstr( $_POST['shipping_methods'], ',' ) ? $_POST['shipping_methods'] : explode( ',', $_POST['shipping_methods'] );\r\n\r\n\t\t\t// If there are multiple methods, return the first\r\n\t\t\treturn is_array( $shipping_methods ) ? $shipping_methods[0] : $shipping_methods;\r\n\t\t} else {\r\n\t\t\treturn $this->order->get_shipping_method();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "fbafc655d3be74e01c1e0dc7835562ca", "score": "0.53414506", "text": "public function getFinalMethodType($paymentMethod, $shopId)\n {\n $fullPaymentMethod = $this->getPaymentFullName($paymentMethod);\n $cleanPaymentMethod = str_replace(MollieShopware::PAYMENT_PREFIX, '', $paymentMethod);\n\n\n # fetch the configuration for this payment method\n $pluginConfig = $this->configFactory->getForShop($shopId);\n $paymentConfig = $this->getPaymentConfig($fullPaymentMethod);\n\n # get any translated values\n # for our provided shop\n $translatedValue = $this->translations->getPaymentConfigTranslation(\n ConfigurationKeys::METHODS_API,\n $paymentConfig->getPaymentMeanId(),\n $shopId\n );\n\n # use either the snippet or the\n # value from the config directly\n $methodType = (!empty($translatedValue)) ? (int)$translatedValue : (int)$paymentConfig->getMethodType();\n\n # if we have no real value\n # then make sure to use the global setting\n if ($methodType !== PaymentMethodType::ORDERS_API && $methodType !== PaymentMethodType::PAYMENTS_API) {\n $methodType = PaymentMethodType::GLOBAL_SETTING;\n }\n\n # if we should use our global setting,\n # then use the one from out plugin configuration\n if ($methodType === PaymentMethodType::GLOBAL_SETTING) {\n $methodType = $pluginConfig->getPaymentMethodsType();\n }\n\n # make sure to validate it one more time, because some\n # payment methods have strict guides on what to use\n $worksWithPaymentsApi = PaymentMethodType::isPaymentsApiAllowed($cleanPaymentMethod);\n\n # if payments is not allowed, or orders api is used, then switch to Orders API\n $useOrdersAPI = ($methodType === PaymentMethodType::ORDERS_API || !$worksWithPaymentsApi);\n\n\n if ($useOrdersAPI) {\n return PaymentMethodType::ORDERS_API;\n }\n\n return PaymentMethodType::PAYMENTS_API;\n }", "title": "" }, { "docid": "288965b1e47f26ca9bdfe74578f99a86", "score": "0.5308295", "text": "public static function get_chosen_shipping_method() {\n\n $data = array(\n 'chosen_method' => jckWooDeliverySlots::get_chosen_shipping_method()\n );\n\n wp_send_json( $data );\n\n }", "title": "" }, { "docid": "5d7aa72fc62359791f35a1f325258ee6", "score": "0.5304696", "text": "public function getPayMethod() {\n return $this->_quoteModel->payMethod;\n }", "title": "" }, { "docid": "e250bed8a3a4f9969c2c1ada033900a8", "score": "0.5262534", "text": "protected function getRequestMethod()\n {\n return $this->requestMethod;\n }", "title": "" }, { "docid": "e250bed8a3a4f9969c2c1ada033900a8", "score": "0.5262534", "text": "protected function getRequestMethod()\n {\n return $this->requestMethod;\n }", "title": "" }, { "docid": "13bdbe5d23565ee8aba5a0151b6cd79e", "score": "0.5250145", "text": "public static function method()\n\t{\n\t\t// --------------------------------------------------------------\n\t\t// The method can be spoofed using a POST variable. This allows \n\t\t// HTML forms to simulate PUT and DELETE methods.\n\t\t// --------------------------------------------------------------\n\t\treturn (isset($_POST['request_method'])) ? $_POST['request_method'] : $_SERVER['REQUEST_METHOD'];\n\t}", "title": "" }, { "docid": "36ec0fd825f314ddda28a1497c7c3113", "score": "0.5249064", "text": "public static function request_method()\n\t{\n\t\treturn self::$request['method'];\n\t}", "title": "" }, { "docid": "610c9000d7fd54b7ab879ffab860b49a", "score": "0.5226014", "text": "protected function _getIdParam()\n {\n return $this->_getParam(\\MUtil_Model::REQUEST_ID);\n }", "title": "" }, { "docid": "6768b8c6f7393b9712c1e0d0073cbe2d", "score": "0.52253324", "text": "public static function getPaymentMethod()\n {\n return [\n 1 => 'Предоплата 100%',\n 2 => 'Частичная предоплата',\n 3 => 'Аванс',\n 4 => 'Полный расчет',\n 5 => 'Частичный расчет и кредит',\n 6 => 'Передача в кредит',\n 7 => 'Оплата кредита'\n ];\n }", "title": "" }, { "docid": "940ceee739bfb51e1b663822135ce611", "score": "0.5219082", "text": "public function method()\n {\n // Return the emulated method from GET\n $emulated = filter_input(INPUT_GET, '_method', FILTER_SANITIZE_STRING);\n\n // Return the emulated method from POST\n if (!$emulated) {\n $emulated = filter_input(INPUT_POST, '_method', FILTER_SANITIZE_STRING);\n }\n\n // Set the emulated method\n if ($this->app->config('request.emulate') && $emulated) {\n return $emulated;\n }\n\n // Or the real method\n return $_SERVER['REQUEST_METHOD'];\n }", "title": "" }, { "docid": "be6deea29d95fb5326bda7eb01762e54", "score": "0.52187526", "text": "public function getPayment()\n {\n return $this->payment instanceof PaymentResourceIdentifierBuilder ? $this->payment->build() : $this->payment;\n }", "title": "" }, { "docid": "b05f82fbb078a55816d6c5c310bd24b4", "score": "0.52080226", "text": "public function getMethod(){\r\n switch(strtoupper($_SERVER['REQUEST_METHOD'])){\r\n case \"POST\":\r\n return \"POST\";\r\n break;\r\n case \"GET\":\r\n return \"GET\";\r\n break;\r\n }\r\n }", "title": "" }, { "docid": "e114fc95f4840785c0be51fa41f3d8f3", "score": "0.5191995", "text": "public function getRequestedMethod()\n\t{\n\t\treturn $this->_requestedMethod;\n\t}", "title": "" }, { "docid": "9a68b0fbf2f00bd62ea0a651b686f1c9", "score": "0.5191928", "text": "private function getRequestMethod() {\n // neither POST or GET\n $method = strtolower( $_SERVER[ 'REQUEST_METHOD' ] );\n if ( $method !== 'post' && $method !== 'get' ) {\n http_response_code( 405 );\n die();\n }\n\n return $method;\n }", "title": "" }, { "docid": "5c79dc653b06ae59d4f63f8e875efef5", "score": "0.51874185", "text": "public function read_payment_method($id) {\n\t\n\t\t$sql = 'SELECT * FROM xin_payment_method where payment_method_id = ?';\n\t\t$binds = array($id);\n\t\t$query = $this->db->query($sql, $binds);\n\t\t\n\t\tif ($query->num_rows() > 0) {\n\t\t\treturn $query->result();\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "title": "" }, { "docid": "0ef3fe29a1e78711ee3270a96e6674d4", "score": "0.5168909", "text": "public function getRequestID()\n {\n return $this->requestID;\n }", "title": "" }, { "docid": "faea566205a98d3c4a7acbad8a537262", "score": "0.5147301", "text": "protected function getCode()\n {\n return $this->request->input('authCode');\n }", "title": "" }, { "docid": "8a7453dcc02ed9c8c42a69f6ebadb7eb", "score": "0.51450187", "text": "public function get_method(){\n\t\tif(isset($this->_options['method'])){\n\t\t\treturn $this->_options['method'];\n\t\t}else{\n\t\t\treturn null;\n\t\t}\n\t}", "title": "" }, { "docid": "ccc152fe117c993c118639c419b7b103", "score": "0.5142101", "text": "public static function getRequestMethod()\r\n {\r\n $request_method = $_SERVER['REQUEST_METHOD'];\r\n return $request_method;\r\n }", "title": "" }, { "docid": "1f1015add3644d2b601df0b3f69718fb", "score": "0.5140659", "text": "protected function getCode()\n {\n return $this->request->input('code');\n }", "title": "" }, { "docid": "520b9050f1731b197a202b697ee429f6", "score": "0.51390886", "text": "public function getRequestMethod()\n {\n\n return (isset($this->config['request_method']) === true) ? $this->config['request_method']\n : self::REQUEST_METHOD;\n }", "title": "" }, { "docid": "eaadaf1ba1242e37accca5f1ec21a371", "score": "0.51388806", "text": "function getRequestedMethod(): string\n {\n return $_SERVER[\"REQUEST_METHOD\"];\n }", "title": "" }, { "docid": "22a2639c34be8e0cf7d1365a0f9f9329", "score": "0.5131186", "text": "function &paymentName( $id )\r\n {\r\n $ret = \"unknown\";\r\n foreach ( $this->PaymentMethods as $paymentMethod )\r\n {\r\n if ( $paymentMethod[\"ID\"] == $id )\r\n {\r\n $ret = $paymentMethod[\"Text\"];\r\n }\r\n }\r\n\r\n return $ret;\r\n }", "title": "" }, { "docid": "39ea3fe72a1b3599b8ae4eec660d02a5", "score": "0.5126786", "text": "private function payWithExistingPaymentMethod($request)\n {\n \n try {\n $result = $this->accountBillingController->makePaymentUsingExistingPaymentMethod(get_user()->account_id, intval($request->input('payment_method')), trim($request->input('amount')));\n } catch (Exception $e) {\n Log::error($e->getMessage());\n throw new Exception(utrans(\"billing.paymentFailedTryAnother\"));\n }\n\n if ($result->success !== true) {\n throw new Exception(utrans(\"billing.paymentFailedTryAnother\"));\n }\n\n return $result;\n }", "title": "" }, { "docid": "2706e3210b38b69d638bed1c1b0010ca", "score": "0.5088428", "text": "public static function restrict_by_payment_method() {\n\t\tglobal $typenow;\n\n\t\tif ( 'shop_subscription' !== $typenow ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$selected_gateway_id = ( ! empty( $_GET['_payment_method'] ) ) ? $_GET['_payment_method'] : ''; ?>\n\n\t\t<select class=\"wcs_payment_method_selector\" name=\"_payment_method\" id=\"_payment_method\" class=\"first\">\n\t\t\t<option value=\"\"><?php esc_html_e( 'Any Payment Method', 'woocommerce-subscriptions' ) ?></option>\n\t\t\t<option value=\"none\" <?php echo esc_attr( 'none' == $selected_gateway_id ? 'selected' : '' ) . '>' . esc_html__( 'None', 'woocommerce-subscriptions' ) ?></option>\n\t\t<?php\n\n\t\tforeach ( WC()->payment_gateways->get_available_payment_gateways() as $gateway_id => $gateway ) {\n\t\t\techo '<option value=\"' . esc_attr( $gateway_id ) . '\"' . ( $selected_gateway_id == $gateway_id ? 'selected' : '' ) . '>' . esc_html( $gateway->title ) . '</option>';\n\t\t}?>\n\t\t</select> <?php\n\t}", "title": "" }, { "docid": "18c4274fc2d24f88409b14b020eea571", "score": "0.5086402", "text": "public function get_payment_type() {\n\t\treturn null;\n\t}", "title": "" }, { "docid": "db203310d222f535f7d0215a4a30c64a", "score": "0.5079937", "text": "private function _getId()\n {\n $id = $this->_id;\n\n if (!$id && $this->_name) {\n $id = $this->_name;\n if ($this->_type == 'radio') {\n $id .= '-' . str_slug($this->_meta['value']);\n }\n }\n\n if(!$id) {\n return null;\n }\n\n return $this->_FidPrefix . $id;\n }", "title": "" }, { "docid": "d9d8ee3c83df0f89de4eb735a8cb1998", "score": "0.50679016", "text": "public final function getMethod() {\r\n $returnMethod = '';\r\n\r\n if ($requestMethod = $this->getServer('request_method')) {\r\n $returnMethod = $requestMethod;\r\n }\r\n\r\n if('POST' == $requestMethod){\r\n if($overridedMethod = $this->getHeader('x-http-method-override')){\r\n $returnMethod = $overridedMethod;\r\n }else if($this->_httpMethodParameterOverride){\r\n if($spoofedMethod = $this->get('_method')){\r\n $returnMethod = $spoofedMethod;\r\n }\r\n }\r\n }\r\n\r\n if(!self::isValidHttpMethod($returnMethod)){\r\n $returnMethod = 'GET';\r\n }\r\n\r\n return strtoupper($returnMethod);\r\n }", "title": "" }, { "docid": "3fbdf4bbb364f1cfeda606e4c68ad49a", "score": "0.50659037", "text": "private function _detect_method()\n\t{\n\t\t$method = strtolower($this->input->server('REQUEST_METHOD'));\n\n\t\tif(in_array($method, array('get', 'delete', 'post', 'put')))\n\t\t{\n\t\t\treturn $method;\n\t\t}\n\n\t\treturn 'get';\n\t}", "title": "" }, { "docid": "505cd431965421bbb4925dc38d360a63", "score": "0.5065727", "text": "public function getMappedPaymentCode($paymentCode)\n {\n $confOptions = Mage::getConfig()->getNode('netevensync/payment_methods')->asArray();\n if (isset($confOptions[$paymentCode])) {\n return $confOptions[$paymentCode];\n } else\n return 'neteven';\n }", "title": "" }, { "docid": "2f91ffcfebe20003f0a8a2f904d82c58", "score": "0.5064782", "text": "private function getSignatureMethod(OAuthRequest $request)\n {\n $signatureMethod = $request->getParameter('oauth_signature_method');\n\n if (!$signatureMethod) {\n throw new OAuthException(\n 'No signature method parameter. This parameter is required'\n );\n }\n\n if (!in_array($signatureMethod, array_keys($this->signatureMethods))) {\n throw new OAuthException(\n 'Signature method \"' . $signatureMethod . '\" not supported'\n . ' try one of the following: '\n . implode(', ', array_keys($this->signatureMethods))\n );\n }\n\n return $this->signatureMethods[$signatureMethod];\n }", "title": "" }, { "docid": "137b0b042581d0a5317e12d28f43eb14", "score": "0.50621194", "text": "public function getRequestMethod();", "title": "" }, { "docid": "94ad2defcdd1f896eaaaa8e12d559135", "score": "0.5061453", "text": "public function selectPayment ($cardInfomation);", "title": "" }, { "docid": "f86f32a3e0241fb1aef90e390821a4d1", "score": "0.50569224", "text": "public function getMerchantId()\n {\n return $this->getParameter('merchantId');\n }", "title": "" }, { "docid": "f86f32a3e0241fb1aef90e390821a4d1", "score": "0.50569224", "text": "public function getMerchantId()\n {\n return $this->getParameter('merchantId');\n }", "title": "" }, { "docid": "f86f32a3e0241fb1aef90e390821a4d1", "score": "0.50569224", "text": "public function getMerchantId()\n {\n return $this->getParameter('merchantId');\n }", "title": "" }, { "docid": "f86f32a3e0241fb1aef90e390821a4d1", "score": "0.50569224", "text": "public function getMerchantId()\n {\n return $this->getParameter('merchantId');\n }", "title": "" }, { "docid": "f86f32a3e0241fb1aef90e390821a4d1", "score": "0.50569224", "text": "public function getMerchantId()\n {\n return $this->getParameter('merchantId');\n }", "title": "" }, { "docid": "3d8da7419c5a7d4cd7c2361e7b9e3afd", "score": "0.50454754", "text": "public function method()\n {\n if ($_SERVER['REQUEST_METHOD'] === 'GET') {\n return 'GET';\n } elseif ($_SERVER['REQUEST_METHOD'] === 'POST') {\n if (!isset($_POST['_method'])) {\n return 'POST';\n }\n return strtoupper($_POST['_method']);\n }\n }", "title": "" }, { "docid": "e9ea4997bd93e8b556c4513500014647", "score": "0.5043993", "text": "public function providerGetPaymentMethodSelector() {\n return array(\n array(NULL),\n array(array()),\n array(array($this->randomMachineName(), $this->randomMachineName())),\n );\n }", "title": "" }, { "docid": "df5c3660310b2c63976a1b60d8ed01bf", "score": "0.5043985", "text": "public function get()\n {\n $identifierRequest = Input::get($this->requestID);\n\n if($identifierRequest)\n {\n setcookie('cart_identifier', $identifierRequest, 0, \"/\");\n }\n else\n {\n $identifierRequest = parent::get();\n }\n\n return $identifierRequest;\n }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "2c1d02695a7d61b62a21ebd9a6714a6d", "score": "0.0", "text": "public function store(Request $request)\n {\n //\n $input = $request->except('_token');\n //表单验证。。暂时不做\n // insert into db\n $res = Cate::create($input);\n return parent::senMsg($res, 'admin/category');\n\n }", "title": "" } ]
[ { "docid": "dcb5d67c26376fd57a5dc3977e13979f", "score": "0.720747", "text": "public function store(Resource $resource, $tempResource);", "title": "" }, { "docid": "29f523253fa183bb58e06565b71660d4", "score": "0.70471525", "text": "public function store(ResourceStoreRequest $request)\n {\n $input = $request->all();\n $input['is_facility'] = $request->has('is_facility');\n\n $resource = Resource::create($input);\n $resource->categories()->sync($request->get('categories'));\n $resource->groups()->sync($request->get('groups'));\n\n flash('Resource \"'.$resource->name.'\" was created');\n\n return ($backUrl = session()->get('index-referer-url'))\n ? redirect()->to($backUrl)\n : redirect('/resources');\n }", "title": "" }, { "docid": "43692f9286169160bb1c60a601ad98b5", "score": "0.679025", "text": "protected function storeResources()\n {\n $resources = $this->resources(['format' => 'json']);\n $this->resourceRepo->put($resources);\n }", "title": "" }, { "docid": "414a41005fac4c5124023387fb0ac54f", "score": "0.6786136", "text": "public function store(ResourceStoreRequest $request)\n {\n $resource = Resource::create($request->all());\n $resource->groups()->sync($request->get('groups'));\n\n flash('Resource was created');\n\n return redirect('/resources');\n }", "title": "" }, { "docid": "c8211f121a8daac5ecd303e9a47b19e5", "score": "0.67509526", "text": "public function store(ResourceStoreRequest $request)\n {\n $this->data->resource = Resource::create($request->all());\n return $this->json();\n }", "title": "" }, { "docid": "2550c05736a0d6808eb726ba834a3af7", "score": "0.6565381", "text": "public function save()\n {\n if ($id = Input::get('id')) {\n $storage = Storage::find($id);\n }\n\n // Validation\n $validator = Validator::make($data = Input::all(), Storage::$rules);\n\n // Check if the form validates with success.\n if ($validator->passes()) {\n // Own?\n if (isset($storage) && $storage->isMine()) {\n // Save model\n $storage->update($data);\n // Message\n Flash::success('Storage saved successfully');\n } else {\n // Create model\n $storage = new Storage($data);\n // Asociate to current user\n Auth::user()->storages()->save($storage);\n // Message\n Flash::success('Storage created successfully');\n }\n\n // Redirect to resource list\n return Redirect::route('storages.index');\n }\n\n // Something went wrong\n return Redirect::back()->withErrors($validator)->withInput(Input::all());\n }", "title": "" }, { "docid": "ec6d262da21079d4f1969481774027a6", "score": "0.6557738", "text": "public function store(ResourceStoreRequest $request)\n {\n ResourceResource::withoutWrapping();\n\n $input = $request->all();\n\n $resource = Resource::create($input);\n $resource->categories()->sync($request->get('categories'));\n $resource->groups()->sync($request->get('groups'));\n\n return (new ResourceResource($resource))\n ->response()\n ->setStatusCode(201);\n }", "title": "" }, { "docid": "c47832a35d324942b82c153c36e19205", "score": "0.6529359", "text": "public function create($storage = null);", "title": "" }, { "docid": "7a008e03ec51a0b31adc684eaf2fd916", "score": "0.651324", "text": "public function store(CreateStorageAPIRequest $request)\n {\n $input = $request->all();\n\n $storages = $this->storageRepository->create($input);\n\n return $this->sendResponse($storages->toArray(), 'Storage saved successfully');\n }", "title": "" }, { "docid": "c8c10c69f24ff56f5e9054d0271d55ee", "score": "0.64884007", "text": "protected function store()\n {\n if (!$this->id) {\n $this->insertObject();\n } else {\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "98fadc36fd3a4194a25023de21dae9ff", "score": "0.6428514", "text": "public function save($resource);", "title": "" }, { "docid": "fa129c22fa10de6d1193110a7112a319", "score": "0.64097387", "text": "public function store(StoreResourceRequest $request)\n {\n $resource = new resource();\n $user = $request->user();\n if (!!$user->resources\n ->where('resource_name', $request->get('resource_name'))\n ->where('path', $request->get('path'))\n ->where('trashed', false)->count()) {\n throw ValidationException::withMessages([\n \"resource\" => [\"400006\"],\n ])->status(400);\n }\n $resource->resource_name = $request->get('resource_name');\n $resource->file = false;\n $resource->path = $request->get('path');\n if (!$resource->save()) {\n throw ValidationException::withMessages([\n \"resource\" => [\"500001\"],\n ])->status(500);\n }\n $user->resources()->attach($resource->id);\n\n return new ResourceResource(Resource::find($resource->id));\n }", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.637569", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "5ca3b168620bb43c8e426b5b5e9b4164", "score": "0.6365236", "text": "public function store(Request $request)\n {\n $resource = new Resource;\n\n $resource->name = $request->name;\n $resource->description = $request->description;\n \n\n $resource->save();\n return redirect()->route('resources.show', [$resource->id]);\n }", "title": "" }, { "docid": "27c4a631f3e680f007d86149d1c453b3", "score": "0.6359224", "text": "private function store()\n\t{\n\t\t// Store the instance\n\t\t_MyCache::set($this->getServer(), $this->generateKey(), json_encode($this->aRecord));\n\n\t\t// Reset the changed flag\n\t\t$this->bChanged\t= false;\n\t}", "title": "" }, { "docid": "508f9936cc069ee7a710b93d12ee1beb", "score": "0.63469714", "text": "public function create(IResource $resource);", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
d576b1ea0090404ce5f646256236a80b
OneToOne (inverse side) Get fkSwCgmPessoaJuridica
[ { "docid": "805097616c188c258944bd1bffc1c5c1", "score": "0.6503881", "text": "public function getFkSwCgmPessoaJuridica()\n {\n return $this->fkSwCgmPessoaJuridica;\n }", "title": "" } ]
[ { "docid": "3a82d270e252eeb4fe188c1d82004477", "score": "0.65810674", "text": "public function getFkPessoalContrato()\n {\n return $this->fkPessoalContrato;\n }", "title": "" }, { "docid": "d7b82b6e3991637f3f1acf0c0d7c0e9f", "score": "0.63377184", "text": "public function getFkSwPais1()\n {\n return $this->fkSwPais1;\n }", "title": "" }, { "docid": "6c57c5dafce3130927e5c0e8ca77aced", "score": "0.6277898", "text": "public function getFkIdProjeto()\n {\n return $this->hasOne(Projeto::className(), ['id_projeto' => 'fk_id_projeto']);\n }", "title": "" }, { "docid": "9ac5cb0e2083cb98a33f5a78b0000134", "score": "0.62406284", "text": "public function getClienti()\n{\n return $this->hasOne(Clienti::className(), ['id' => 'idCliente']);\n}", "title": "" }, { "docid": "16588ba9cc201fad73ea7316c66a5993", "score": "0.6234903", "text": "public function getConsola()\n {\n return $this->hasOne(Consolas::className(), ['id' => 'consola_id'])->inverseOf('pendientes');\n }", "title": "" }, { "docid": "efa3b249f9f497d6a17d7ffa44f00a8c", "score": "0.61202466", "text": "public function getpkjIbu()\n {\n return $this->hasOne(Pekerjaan::className(), ['id' => 'id_pkj_ibu']);\n }", "title": "" }, { "docid": "5addbb6640c97081522e336ba03b40ed", "score": "0.60492146", "text": "public function getFkSwMunicipio1()\n {\n return $this->fkSwMunicipio1;\n }", "title": "" }, { "docid": "5bbd448c2850b2f2312fec9e49362ff5", "score": "0.59724545", "text": "public function getIdproduto0()\n {\n return $this->hasOne(Produto::className(), ['idproduto' => 'idproduto']);\n }", "title": "" }, { "docid": "e3fe6e902bcac1113e501e790514ced8", "score": "0.5956904", "text": "public function getNomerKlienta()\n {\n return $this->hasOne(Klienti::className(), ['nomer_klienta' => 'nomer_klienta']);\n }", "title": "" }, { "docid": "304511a952a2878a4df4618528aef664", "score": "0.59451646", "text": "public function getFkPessoalPensao()\n {\n return $this->fkPessoalPensao;\n }", "title": "" }, { "docid": "ed49e7552fdf857c4379c4f757f59b3b", "score": "0.59272385", "text": "public function getFkSwCgmPessoaFisica()\n {\n return $this->fkSwCgmPessoaFisica;\n }", "title": "" }, { "docid": "ed49e7552fdf857c4379c4f757f59b3b", "score": "0.59272385", "text": "public function getFkSwCgmPessoaFisica()\n {\n return $this->fkSwCgmPessoaFisica;\n }", "title": "" }, { "docid": "ed49e7552fdf857c4379c4f757f59b3b", "score": "0.59272385", "text": "public function getFkSwCgmPessoaFisica()\n {\n return $this->fkSwCgmPessoaFisica;\n }", "title": "" }, { "docid": "2f6a964f7f2b4e7bbb4d5df458a8f8bb", "score": "0.5890241", "text": "abstract public function getForeignKey();", "title": "" }, { "docid": "50e3c54782a7ade38327313339a34426", "score": "0.5872083", "text": "public function getJuego()\n {\n return $this->hasOne(Juegos::className(), ['id' => 'juego_id'])->inverseOf('pendientes');\n }", "title": "" }, { "docid": "41c7040aca2c17696ba4e4efc68f9d51", "score": "0.58339715", "text": "public function GetIdNotasAluno()\n\t{\n\t\treturn $this->_phreezer->GetManyToOne($this, \"notas_ibfk_1\");\n\t}", "title": "" }, { "docid": "ab9562049e0a446e02c2c58271a0d493", "score": "0.5831968", "text": "public function getFkSwAssunto()\n {\n return $this->fkSwAssunto;\n }", "title": "" }, { "docid": "3df199eaff538fda2ce24adb9bfc7cd9", "score": "0.58198655", "text": "public function getForeignKey();", "title": "" }, { "docid": "f73495c2444c6c49abcb4fe7d7ebfef1", "score": "0.5807244", "text": "public function getIdProvincia0()\n {\n return $this->hasOne(Provincia::className(), ['idProvincia' => 'idProvincia']);\n }", "title": "" }, { "docid": "2cda2b03aa8dea7f259d63dd02e0445f", "score": "0.57973635", "text": "public function getFkPontoEscalaContrato()\n {\n return $this->fkPontoEscalaContrato;\n }", "title": "" }, { "docid": "6e2879072fbb70d397a2fc4a229c79b2", "score": "0.5788081", "text": "public function oneToOne2()\n {\n\n //retorna apenas um (um pais so tem uma localizacao)\n \n //$country = Country::find(1);\n //caso eu queira fazer uma pesquisa por outro campo\n $country = Country::where('name', 'Brasil')->get()->first(); //o ->get retorna um array\n\n echo $country->name;\n\n $location = $country->location;// o location e forma de atributo // de um para um melhor usar como atributo\n //$location = $country->location()->get()->first();// o location e forma de metodo o bom de utilizar dessa forma e que vc pode fazer filtros com where\n echo \"<hr> Latitude: {$location->latitude} <br/>\";\n echo \"Longitude: {$location->longitude} <br/>\";\n }", "title": "" }, { "docid": "a9f4e04e70bd6aaf9414007c2d6d862b", "score": "0.57848257", "text": "public function getFkuser0() {\n return $this->hasOne(User::className(), ['id' => 'fkuser']);\n }", "title": "" }, { "docid": "9145812309101a5d6de57a6900ada789", "score": "0.5779748", "text": "public function getIdinscripcion0()\n {\n return $this->hasOne(Inscripcion::className(), ['idInscripcion' => 'idinscripcion']);\n }", "title": "" }, { "docid": "3781bbee5f68338ad8ee5a0d48d6b677", "score": "0.5775229", "text": "public function getpkjAyah()\n {\n return $this->hasOne(Pekerjaan::className(), ['id' => 'id_pkj_ayah']);\n }", "title": "" }, { "docid": "dccc59ae3e048280dedadbbcf07b8507", "score": "0.577338", "text": "public function empleado(){\n\t\treturn $this->hasOne('Empleado','idEmpleado','idEmpleado');\n\t}", "title": "" }, { "docid": "937e7cec1ca1d0c8f63f6ae0fad90a5b", "score": "0.57724196", "text": "public function getFkEmpenhoEmpenho()\n {\n return $this->fkEmpenhoEmpenho;\n }", "title": "" }, { "docid": "937e7cec1ca1d0c8f63f6ae0fad90a5b", "score": "0.57724196", "text": "public function getFkEmpenhoEmpenho()\n {\n return $this->fkEmpenhoEmpenho;\n }", "title": "" }, { "docid": "50f065868addc7e5d39a81b9f66a1079", "score": "0.576465", "text": "public function proovedor()\n { // este manda su id al proveedor de 1 a 1\n return $this->hasOne('App\\Proveedor');\n }", "title": "" }, { "docid": "c3ccc1abdc8396264261f7ccb63263e7", "score": "0.575913", "text": "public function getFkprofile0() {\n return $this->hasOne(Profile::className(), ['idprofile' => 'fkprofile']);\n }", "title": "" }, { "docid": "a0a41dd00ab2695b87f7920b56a90e96", "score": "0.5753782", "text": "abstract public function belongs_to();", "title": "" }, { "docid": "8a1c06fc186c9651dbb426df2f64d376", "score": "0.5745229", "text": "abstract protected function _getParentFkFieldName();", "title": "" }, { "docid": "61efc6ba34156d147b36a84e40cb1677", "score": "0.5739681", "text": "public function getFkSwAndamento()\n {\n return $this->fkSwAndamento;\n }", "title": "" }, { "docid": "0a39f059f3c690bbc1d3dc9529c87a95", "score": "0.5735323", "text": "public function getFkTcernObraContratos1()\n {\n return $this->fkTcernObraContratos1;\n }", "title": "" }, { "docid": "4a5ff58291e415cfdbd3a31b511e672f", "score": "0.57309526", "text": "public function getForeign($_foreign);", "title": "" }, { "docid": "9e74c46c24428471c8752d33d5ff604e", "score": "0.5730038", "text": "public function perjanjian()\n {\n return $this->hasOne(FileKontrakPerjanjian::class,'id_kontrak', 'id');\n }", "title": "" }, { "docid": "0638432e8c45a5e034e8f8ba02b963d5", "score": "0.5715803", "text": "public function devolucione(){\n return $this->hasOne(Devolucione::class);\n }", "title": "" }, { "docid": "90122b5d02ed6c288fb72f4741229e3a", "score": "0.57062054", "text": "public function getFkOrcamentoDespesa()\n {\n return $this->fkOrcamentoDespesa;\n }", "title": "" }, { "docid": "75543305ab897fbc1e127f10d253468b", "score": "0.5704619", "text": "public function guia(){\n //$this->belongsTo('entitie', 'local_key', 'parent_key');\n return $this->belongsTo('bi\\Entities\\Persona','guia_id','id');\n }", "title": "" }, { "docid": "eb632d5bb89691dac1d9a4fee0ad3088", "score": "0.56840366", "text": "public function getPessoa()\n {\n //INNER JOIN 'pessoa' AS 'f' ON 'f'.'id' = 'pf.'.'pessoa_id'\n return $this->hasOne(Pessoa::class, ['id','pessoa_id']);\n }", "title": "" }, { "docid": "16de433a5b920488c587058109363969", "score": "0.56536376", "text": "public function getFkDividaCobrancaJudicial()\n {\n return $this->fkDividaCobrancaJudicial;\n }", "title": "" }, { "docid": "53863eb2d180cbc47e7e1ecd0ec113b7", "score": "0.56394166", "text": "public function getJilid()\n {\n return $this->hasOne(Jilid::className(), ['id' => 'id_jilid']);\n }", "title": "" }, { "docid": "e4186208c7b331fecf31ba8aee12a212", "score": "0.5626337", "text": "public function candidatura() {\n\t return $this->belongsTo('App\\Candidatura');\n\t }", "title": "" }, { "docid": "febd7367e247b30eb20a9178a2239500", "score": "0.5597554", "text": "public function getFkFolhapagamentoVinculo()\n {\n return $this->fkFolhapagamentoVinculo;\n }", "title": "" }, { "docid": "945e37fd431ee6e7094748fbee6072b8", "score": "0.5596522", "text": "public function getFkTesourariaBoletim()\n {\n return $this->fkTesourariaBoletim;\n }", "title": "" }, { "docid": "d8ef7a9436b227387d9634a49fbcba0c", "score": "0.5592583", "text": "public function perolehanSuara1()\n {\n return $this->hasMany('App\\Models\\PerolehanSuara','no_kandidat_1');\n }", "title": "" }, { "docid": "1f6f831b984ca351cb77edf7ea4042e7", "score": "0.55851436", "text": "public function get_foreign_table();", "title": "" }, { "docid": "736b727e9d8ccfafdd3fe624c6144ea9", "score": "0.5577712", "text": "abstract protected function getForeignMapping();", "title": "" }, { "docid": "188fba7572c28d2c66f7e10f1279d2cc", "score": "0.55753684", "text": "public function oneToOne()\n {\n\n \t//retorna apenas um (um pais so tem uma localizacao)\n \t\n \t//$country = Country::find(1);\n \t//caso eu queira fazer uma pesquisa por outro campo\n \t$country = Country::where('name', 'Brasil')->get()->first(); //o ->get retorna um array\n\n \techo $country->name;\n\n \t$location = $country->location;// o location e forma de atributo // de um para um melhor usar como atributo\n \t//$location = $country->location()->get()->first();// o location e forma de metodo o bom de utilizar dessa forma e que vc pode fazer filtros com where\n \techo \"<hr> Latitude: {$location->latitude} <br/>\";\n \techo \"Longitude: {$location->longitude} <br/>\";\n }", "title": "" }, { "docid": "dbfbb5b9c2dd4d53c95570d4304a5e1c", "score": "0.5573141", "text": "public function getMakhoa0()\n {\n return $this->hasOne(TblKhoa::className(), ['makhoa' => 'makhoa']);\n }", "title": "" }, { "docid": "b07cc711e541d08bb0f687e337195341", "score": "0.5572251", "text": "public function jurusan()\n {\n return $this->belongsTo('PMW\\Models\\Jurusan','id_jurusan')->first();\n }", "title": "" }, { "docid": "ee4fe7a64b8f29ccbfefc8450e842d64", "score": "0.55624276", "text": "public function getFkSwClassificacao()\n {\n return $this->fkSwClassificacao;\n }", "title": "" }, { "docid": "7b2f5217dec47d810b0d174ded3c8024", "score": "0.5557271", "text": "public function horarioprofesor(){\n return $this->hasOne('App\\Models\\horarioprofesor');\n}", "title": "" }, { "docid": "a0c0201cc5d5e0df19d7fe9fd83a8659", "score": "0.55559635", "text": "public function getPerakuanSubw()\n {\n return $this->hasOne(KonfRujukan::className(), ['id' => 'perakuan_subw']);\n }", "title": "" }, { "docid": "ce79e91e98dc99d5eac330ef3886c68a", "score": "0.55477345", "text": "function foreign_key() {\n\t\t$foreign_key = $this->foreign_key;\n\n\t\tif ($foreign_key) {\n\t\t\treturn $foreign_key;\n\t\t} else {\n\t\t\treturn $this->table_name().'_id';\n\t\t}\n\n\t}", "title": "" }, { "docid": "47a0cfd3a58726123d4099d6ac3d93a4", "score": "0.5527663", "text": "public function Pais(): HasOne\n {\n return $this->hasOne(Paises::class, 'id', 'id_pais');\n }", "title": "" }, { "docid": "8dc1543e5716c27c1afd0da1d510f28b", "score": "0.5527591", "text": "public function getUsuario()\n {\n return $this->hasOne(Usuarios::className(), ['id' => 'usuario_id'])->inverseOf('pendientes');\n }", "title": "" }, { "docid": "6509017ffcc198b0f44a3c6c1ebe9b33", "score": "0.55243474", "text": "public function Prodi(){\n\t\treturn $this->hasMany('App\\Prodi', 'foreign_key', 'prodiKodeJurusan');\n\t}", "title": "" }, { "docid": "5210cda9a7d860e4366dd480d56a11d3", "score": "0.55191475", "text": "public function getNomFk() {\n if ($this->tableFk == NULL) {\n return '';\n }\n return 'fk_' . $this->table->nom . '_' . $this->nom_colonne;\n }", "title": "" }, { "docid": "359c7580850ecc80f389fc47ec4dfd33", "score": "0.55170447", "text": "public function getProduto()\n {\n return $this->hasOne(Produto::className(), ['id' => 'id_produto']);\n }", "title": "" }, { "docid": "a284497596329d1471d568d8371524b9", "score": "0.55164516", "text": "public function getFkTcepeAgentePolitico()\n {\n return $this->fkTcepeAgentePolitico;\n }", "title": "" }, { "docid": "ff3eb3541366ac457c4bfebee69d92d6", "score": "0.5516367", "text": "public function vendido(){\n return $this->hasOne(Vendido::class);\n }", "title": "" }, { "docid": "3a59d4d7de53739c332f172d34341de5", "score": "0.5515443", "text": "public function getNomerLekarstva()\n {\n return $this->hasOne(Sklad::className(), ['nomer_lekarstva' => 'nomer_lekarstva']);\n }", "title": "" }, { "docid": "4bb6c677ffb3b61dc12b497206074411", "score": "0.550488", "text": "public function sucursal(){\n return $this->belongsTo('Sucursal');\t\n }", "title": "" }, { "docid": "abfc62b9d2ccf17e6fda6959b5d46d3f", "score": "0.5494357", "text": "public function getPerakuanKsu()\n {\n return $this->hasOne(KonfRujukan::className(), ['id' => 'perakuan_ksu']);\n }", "title": "" }, { "docid": "20274d42b82463a15009707be27275b0", "score": "0.5493167", "text": "public function getIdpregunta0()\n {\n return $this->hasOne(Pregunta::className(), ['id' => 'idpregunta']);\n }", "title": "" }, { "docid": "a54f53006075075b8b718ba5b5986b08", "score": "0.5491366", "text": "public function getOrangtua()\n {\n return $this->hasOne(Orangtua::className(), ['id' => 'id_ortu']);\n }", "title": "" }, { "docid": "f986a268e8de3124f3512136a9f936f7", "score": "0.5491322", "text": "public function AiMedidasColindancias() {\n\t\treturn $this->hasOne('AiMedidasColindancias', 'idavaluoinmueble', 'idavaluoinmueble');\n\t}", "title": "" }, { "docid": "d55daf9eaca109507d729d115a226296", "score": "0.54856527", "text": "public function getFkPessoalContratoServidor()\n {\n return $this->fkPessoalContratoServidor;\n }", "title": "" }, { "docid": "0f3d299d18d645e9ca0cb472cfc5941c", "score": "0.548013", "text": "public function getFkSwLancamento()\n {\n return $this->fkSwLancamento;\n }", "title": "" }, { "docid": "0f3d299d18d645e9ca0cb472cfc5941c", "score": "0.548013", "text": "public function getFkSwLancamento()\n {\n return $this->fkSwLancamento;\n }", "title": "" }, { "docid": "1768ece69ae73a441262905b925129a0", "score": "0.5475036", "text": "public function getPerakuanSubkukp()\n {\n return $this->hasOne(KonfRujukan::className(), ['id' => 'perakuan_subkukp']);\n }", "title": "" }, { "docid": "85e24eec4226c68f5c7095f946c04d77", "score": "0.5470673", "text": "public function hasOne($related, $foreignKey = null, $localKey = null);", "title": "" }, { "docid": "e19824045680eb47c33ee395b0d8eb96", "score": "0.5469094", "text": "public function getFormapgto0()\n {\n return $this->hasOne(Meiopgto::className(), ['idmeiopgto' => 'formapgto']);\n }", "title": "" }, { "docid": "3680068aea5faa97ac0f947654aafb09", "score": "0.5468916", "text": "public function getTriagem()\n {\n return $this->hasOne(Triagem::className(), ['id' => 'id_triagem']);\n }", "title": "" }, { "docid": "4869e1469a675b91a65fb04ddbce754d", "score": "0.54655623", "text": "public function poaParticipante()\n {\n return $this->hasOne(PoaParticipante::class);\n }", "title": "" }, { "docid": "436ce0ab587bde2a3d5bc2c8882e9fca", "score": "0.54647577", "text": "public function getRelationKey()\n {\n return $this->translationForeignKey ?: $this->getForeignKey();\n }", "title": "" }, { "docid": "22ef321caa6124181ff816ed3d42addd", "score": "0.5464601", "text": "public function getFkSwPreEmpenhos()\n {\n return $this->fkSwPreEmpenhos;\n }", "title": "" }, { "docid": "21017620662c9ae5ba7335e6748875ae", "score": "0.54590255", "text": "public function getPeringkatPenilaian()\n {\n return $this->hasOne(KonfRujukan::className(), ['id' => 'peringkat_penilaian']);\n }", "title": "" }, { "docid": "510f9f3d67aa729cc6cbcf36614f660f", "score": "0.5457495", "text": "public function pengguna()\n {\n \treturn $this->belongsTo(pengguna::class);\n }", "title": "" }, { "docid": "22f8b31f50026dfa423de9458c65281d", "score": "0.5449581", "text": "public function getFkSwPais()\n {\n return $this->fkSwPais;\n }", "title": "" }, { "docid": "02692f1e4152b3da71c0fc5797deb0b6", "score": "0.544449", "text": "public function parent(): HasOne\n {\n return $this->hasOne(static::class, 'id', 'parent_id');\n }", "title": "" }, { "docid": "8b01b282b74694e3e3f44a180eb7b915", "score": "0.5441239", "text": "public function getFkFrotaEscola()\n {\n return $this->fkFrotaEscola;\n }", "title": "" }, { "docid": "138ca7bc2fa787b8f47104dc2f76eadf", "score": "0.5439997", "text": "public function empleado(){\n return $this->hasOne('App\\ModelosBaseDato\\Empleado','legajo','legajo');\n }", "title": "" }, { "docid": "fbdada8864883b2eaf254623ff8526c8", "score": "0.5430597", "text": "public function getFkjobtitle0() {\n return $this->hasOne(Jobtitle::className(), ['idjobtitle' => 'fkjobtitle']);\n }", "title": "" }, { "docid": "30058d2c30843b33227fe681959ca5a9", "score": "0.5426659", "text": "public function getTiempo()\n {\n return $this->hasOne(Tiempo::className(), ['idFuente' => 'idFuente']);\n }", "title": "" }, { "docid": "9a7dc031158cb9e4930b77caf01e78d1", "score": "0.54264015", "text": "public function correcao()\n {\n \treturn $this->hasOne('App\\Correcao_ht');\n }", "title": "" }, { "docid": "f52a16d742ed7797a883e5c0fa771043", "score": "0.5425485", "text": "public function trabajo(){\n return $this->belongsTo('TipoTrabajo');\t\n }", "title": "" }, { "docid": "e67a40eb20f9d1a7e5126278a407895d", "score": "0.5425201", "text": "function prodi(){\n\t\treturn $this->belongsTo(Prodi::class, \"id_prodi\", \"id\");\n\t}", "title": "" }, { "docid": "50e859e3dc83a0df6d7cfb4707fb28ce", "score": "0.54237115", "text": "public function getDipendenteId(){return $this->idDipendente;}", "title": "" }, { "docid": "58aa274e36b6d0e505215f8608aa8d9d", "score": "0.54212976", "text": "public function getFkFrotaMotorista()\n {\n return $this->fkFrotaMotorista;\n }", "title": "" }, { "docid": "313e69a255ed542354bfb5d9758e109b", "score": "0.5419374", "text": "public function getCEP()\n {\n return $this->hasOne(Logradouro::className(), ['cep' => 'CEP']);\n }", "title": "" }, { "docid": "55e34a58af5c1f1a10a60d8eba2a621b", "score": "0.54182667", "text": "public function getKaedah()\n {\n return $this->hasOne(KonfRujukan::className(), ['id' => 'kaedah_id']);\n }", "title": "" }, { "docid": "cb405c48da3b1995d01214f621cc15dc", "score": "0.54172075", "text": "abstract protected function _getParentPkFieldName();", "title": "" }, { "docid": "bac618d8f5cbc1c71f6f39ba57b7d101", "score": "0.54157984", "text": "public function getFkPessoalContratoPensionistaPrevidencias()\n {\n return $this->fkPessoalContratoPensionistaPrevidencias;\n }", "title": "" }, { "docid": "509c07d8cf46a89215ee5beedf356758", "score": "0.54101694", "text": "public function getJenisKelamin()\n {\n return $this->hasOne(JenisKelamin::className(), ['id' => 'id_jk']);\n }", "title": "" }, { "docid": "fd0758e27e8feba081a8bd7bd2044d6a", "score": "0.5407334", "text": "public function getFkPessoalCondicaoAssentamento()\n {\n return $this->fkPessoalCondicaoAssentamento;\n }", "title": "" }, { "docid": "e62e8dee69ba58538ba53fd577ed9a79", "score": "0.54069966", "text": "public function getFkPessoalEspecialidade()\n {\n return $this->fkPessoalEspecialidade;\n }", "title": "" }, { "docid": "9560fac588f242aeeeb21704fd825ba2", "score": "0.540056", "text": "public function getFkPessoalCargo()\n {\n return $this->fkPessoalCargo;\n }", "title": "" }, { "docid": "7937227917a8baadee2f2506941bd6f5", "score": "0.5393007", "text": "public function pais_origen()\n {\n return $this->belongsTo(Pais::class, 'id_pais', 'id_pais');\n }", "title": "" }, { "docid": "59ddec69fd68149f5b21654e0b917aa9", "score": "0.53927463", "text": "public function getUso()\n {\n return $this->hasOne( UsosPropaganda::className(), [ 'uso_propaganda' => 'uso_propaganda' ] );\n }", "title": "" } ]
20a01b5c07303122d5a81b72ec002db5
TODO Create a query (get values from POST)
[ { "docid": "efd6bbfe3c940059acc0f9e7f3a97cf9", "score": "0.0", "text": "public function createQueryAction() {\n }", "title": "" } ]
[ { "docid": "5be1d9aed067400fd350b74d5727d031", "score": "0.6922045", "text": "abstract public function getPostParams();", "title": "" }, { "docid": "f117b8a31e3f6b0da3f948a873f2d2a6", "score": "0.63619137", "text": "public function getFormValues();", "title": "" }, { "docid": "bb109c7e21e3fdae26f7e49214a4c535", "score": "0.62437236", "text": "protected function _getDataFromPost()\n\t{\n\t\t// gets filtered POST\n\t\t$post = Fgsl_Session_Namespace::get('post');\n\n\t\t$data = array();\t\n\n\t\tif (count($_POST) === 0)\n\t\t{\t\t\t\t\n\t\t\tforeach ($this->_fieldNames as $fieldName)\n\t\t\t{\n\t\t\t\t$data[$fieldName] = '';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tforeach ($_POST as $fieldName => $value)\n\t\t\t{\n\t\t\t\t$data[$fieldName] = $post->$fieldName; \t\n\t\t\t}\n\t\t}\n\t\tFgsl_Session_Namespace::set('post',null);\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "e8be5914fdbeca150ea84d308575f9d1", "score": "0.6215084", "text": "function getquery() {\n\t\t//---- judge the action\n\t\t$act = 'new';\t\t\t// 新規入力フォーム\n\t\tif (! empty($_POST['confirm'])) {\n\t\t\t$act = 'confirm';\t// 入力確認\n\t\t} elseif (! empty($_POST['save'])) {\n\t\t\t$act = 'save';\t\t// 保存\n\t\t}\n\t\t$this->act = $act;\n\t\t//---- get runtime parameters0\n\t\t$this->params->get_request($this->paramV('runparams'), 'POST');\n\t}", "title": "" }, { "docid": "2848cf07db82194136de572c45eaebb8", "score": "0.6174825", "text": "public function getPost(){\n return Dadiweb_Http_Client::getInstance()->getPost();\n }", "title": "" }, { "docid": "836e26491ff6bd9de013c59ece6cb751", "score": "0.6172005", "text": "public function getPostValues() {\n $post_check_array = array(\n\n // toevoegen action\n 'add' => array( 'filter' => FILTER_SANITIZE_STRING),\n\n //action update\n 'update' => array('filer' => FILTER_SANITIZE_STRING),\n\n // label naam\n 'label' => array('filter' => FILTER_SANITIZE_STRING),\n\n // label description\n 'description' => array('filter' => FILTER_SANITIZE_STRING),\n\n //label id\n 'id' => array('filter' => FILTER_VALIDATE_INT)\n );\n\n // get gefilterde input\n $inputs = filter_input_array(INPUT_POST, $post_check_array);\n\n return $inputs;\n }", "title": "" }, { "docid": "16b324ca0d5bb07b48f4f0c0a8e0bb32", "score": "0.61463153", "text": "public function toPostData() {\n return Util::buildHttpQuery($this->_parameters);\n }", "title": "" }, { "docid": "877e6a14022927105ef47d66913e79b2", "score": "0.61118805", "text": "public function getPost()\n {\n return $this->postParameters;\n }", "title": "" }, { "docid": "f509ab876ca5e7e714153456c1b633ab", "score": "0.60629576", "text": "protected function getParamsFromPosts()\n\t{\n\n\t\t$params['divider'] \t\t= entity_encode($_POST['divider']);\n\t\t$params['link_text'] \t= entity_encode($_POST['link']);\n\t\t$params['language'] \t= $_POST['language'];\n\n\t\treturn $params;\n\n\t}", "title": "" }, { "docid": "c314b8ff3b1273f89905841858b01e2b", "score": "0.6004458", "text": "public function post() {\n print_r($_POST);\n }", "title": "" }, { "docid": "5dbb3835d279e84cacb071ca7f0bb56c", "score": "0.5958804", "text": "protected function getPOST(){\n\t\treturn null;\n\t}", "title": "" }, { "docid": "fcedf5b70ea7f8ce029a834250e60e66", "score": "0.595313", "text": "function readQueryItems() {\n\tforeach($_REQUEST as $k=>$v) { // look through get and post\n\t\tif(substr($k, 0, 3) == \"as_\") {\n\t\t\t$items[$k] = $v;\n\t\t\t$v = str_replace(\"'\", \"&#39;\", $v);\n\t\t\t$hidden[] = new xoopsFormHidden($k, stripslashes($v));\n\t\t}\n\t}\n\t$count = count($items);\n\t// read what was just sent back...\n\tif($_POST['addq']) {\n\t\t$columnsProcessed = false;\n\t\tforeach($_POST['column'] AS $selectedColumn) { \n\t\t\tif($columnsProcessed) { // handle AND/OR setting\n\t\t\t\tswitch($_POST['multi_andor']) {\n\t\t\t\t\tcase \"1\": // AND\n\t\t\t\t\t\t$items['as_' . $count] = \"AND\"; \n\t\t\t\t\t\t$hidden[] = new xoopsFormHidden('as_' . $count, \"AND\");\n\t\t\t \t\t$count++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"2\": // OR\n\t\t\t\t\t\t$items['as_' . $count] = \"OR\"; \n\t\t\t\t\t\t$hidden[] = new xoopsFormHidden('as_' . $count, \"OR\");\n\t\t\t \t\t$count++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n \t\t$items['as_' . $count] = \"[field]\" . $selectedColumn . \"[/field]\";\n \t\t$hidden[] = new xoopsFormHidden('as_' . $count, \"[field]\" . $selectedColumn . \"[/field]\");\n\t\t\t$count++;\n\t\t\t$items['as_' . $count] = $_POST['op'];\n\t\t\t$hidden[] = new xoopsFormHidden('as_' . $count, $_POST['op']);\n\t\t\t$count++;\n\t\t\t$items['as_' . $count] = $_POST['term'];\n\t\t\t$thisterm = str_replace(\"'\", \"&#39;\", $_POST['term']);\n\t\t\t$hidden[] = new xoopsFormHidden('as_' . $count, stripslashes($thisterm));\n\t\t\t$count++;\n\t\t\t$columnsProcessed = true;\n\t\t}\n\t}\n\tif($_POST['openb']) { \n\t\t$items['as_' . $count] = \"(\"; \n\t\t$hidden[] = new xoopsFormHidden('as_' . $count, \"(\");\n\t}\n\tif($_POST['closeb']) { \n\t\t$items['as_' . $count] = \")\"; \n\t\t$hidden[] = new xoopsFormHidden('as_' . $count, \")\");\n\t}\n\tif($_POST['and']) { \n\t\t$items['as_' . $count] = \"AND\"; \n\t\t$hidden[] = new xoopsFormHidden('as_' . $count, \"AND\");\n\t}\n\tif($_POST['or']) { \n\t\t$items['as_' . $count] = \"OR\"; \n\t\t$hidden[] = new xoopsFormHidden('as_' . $count, \"OR\");\n\t}\n\tif($_POST['not']) { \n\t\t$items['as_' . $count] = \"NOT\"; \n\t\t$hidden[] = new xoopsFormHidden('as_' . $count, \"NOT\");\n\t}\n\n\t$to_return[0] = $items;\n\t$to_return[1] = $hidden;\n\treturn $to_return;\n}", "title": "" }, { "docid": "f2478b003c53abcde8a3193bb1c330d8", "score": "0.5933224", "text": "public function getPost();", "title": "" }, { "docid": "b239092cda418ccba452939766959d2a", "score": "0.5922548", "text": "private function filterPostAndGet()\n {\n // isset($_GET) && $_GET && $_GET = $this->filterInputData($_GET);\n }", "title": "" }, { "docid": "7fc388cb6ebba6a85f1e2298c3b3b9c1", "score": "0.5920047", "text": "private function get_parameters() {\n if($this->type == \"POST\") {\n foreach ($_POST as $param_name => $param_val) {\n $this->parameters[$param_name] = $param_val;\n }\n } else if($this->type == \"GET\") {\n foreach ($_GET as $param_name => $param_val) {\n $this->parameters[$param_name] = $param_val;\n }\n }\n }", "title": "" }, { "docid": "d5141313ec77482bb6079790715a2102", "score": "0.589574", "text": "function processPostVars()\n {\n assignPostIfExists($this->operation, $this->rs, 'mode');\n assignPostIfExists($this->objids, $this->rs, 'objids');\n assignPostIfExists($this->dateTo, $this->rs, 'dateto');\n }", "title": "" }, { "docid": "0c5afd0af09cb2b6b80f7e860e42b957", "score": "0.587612", "text": "function getMediaQueryFormValues()\n\t{\n\t\tif ($_GET[\"mq_id\"] != \"\")\n\t\t{\n\t\t\tforeach ($this->object->getMediaQueries() as $mq)\n\t\t\t{\n\t\t\t\tif ($mq[\"id\"] == (int) $_GET[\"mq_id\"])\n\t\t\t\t{\n\t\t\t\t\t$values[\"mquery\"] = $mq[\"mquery\"];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->form_gui->setValuesByArray($values);\n\t\t}\n\t}", "title": "" }, { "docid": "a353e0da58c481c66e14185de945226a", "score": "0.58411235", "text": "function get_form_values() {\n\t\t$values = $_GET;\n\t\treturn $values;\n\t}", "title": "" }, { "docid": "23def939e53e91370f1aadf93dc1e65b", "score": "0.582932", "text": "protected function getPostFields() {\n $post_fields = \"group=\" . $this->datacashReport->getGroup();\n $post_fields .= \"&user=\" . $this->datacashReport->getUser();\n $post_fields .= \"&password=\" . $this->datacashReport->getPassword();\n $post_fields .= \"&start_date=\" . $this->datacashReport->getStartDate();\n $post_fields .= \"&end_date=\" . $this->datacashReport->getEndDate();\n $post_fields .= \"&type=\" . $this->datacashReport->getType();\n // Check if vtid is available.\n $vtid = $this->datacashReport->getVtid();\n if (!empty($vtid)) {\n $post_fields .= \"&vtid=$vtid\";\n }\n // Check if list is available.\n $list = $this->datacashReport->getList();\n if (!empty($list)) {\n $post_fields .= \"&list=$list\";\n }\n // Check if accreditation instance. is available.\n $accreditation = $this->datacashReport->getAccreditationInstance();\n if (!empty($accreditation)) {\n $post_fields .= \"&instance=$accreditation\";\n }\n return $post_fields;\n }", "title": "" }, { "docid": "866ac060ef3abd0019265a663d36aaf4", "score": "0.5828144", "text": "public function post();", "title": "" }, { "docid": "9c8dc9417ecc1da9a8b55b88b020cd47", "score": "0.5804964", "text": "public function getParamsSave(){\n\t\t// z formularza edycji\n\t\t$this->form->id = getFromRequest('id');\n\t\t$this->form->name = getFromRequest('name');\n\t\t$this->form->surname = getFromRequest('surname');\n\t\t$this->form->birthdate = getFromRequest('birthdate');\n\t}", "title": "" }, { "docid": "9504ade40aba6bc89c7895449fe95ea7", "score": "0.57996625", "text": "public function post($query)\n {\n }", "title": "" }, { "docid": "d1e6a66218ff84a4faf43c380503a067", "score": "0.57791764", "text": "public function buildPOSTData()\n\t{\n\t\t$sfs = SFS::getInstance();\n\n\t\treturn http_build_query(array(\n\t\t\t'username'\t\t=> $this->username,\n\t\t\t'email'\t\t\t=> $this->email,\n\t\t\t'ip'\t\t\t=> $this->ip,\n\t\t\t'evidence'\t\t=> $this->evidence,\n\t\t\t'api_key' \t\t=> $sfs->getKey(),\n\t\t));\n\t}", "title": "" }, { "docid": "2ea239693a677094797421b34ccc758c", "score": "0.5738211", "text": "private function _loadPost()\r\n {\r\n \tif(isset($_POST['active']))\r\n \t\t$_POST['active'] = intval($_POST['active']);\r\n\t\tif(isset($_POST['order']))\r\n \t\t$_POST['order'] = intval($_POST['order']); \t\t\r\n foreach ($this->_getCols() as $col) {\r\n if (Digitalus_Filter_Post::has($col)) {\r\n $this->_data[$col] = Digitalus_Filter_Post::raw($col);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "34feb696b430b0f675290ae53872e640", "score": "0.5704135", "text": "public function action_query_values($data) {\n $fields = $data['fields'];\n\n foreach ($fields as $key => $field) {\n $fields[$key]['value'] = 'test';\n }\n\n return $fields;\n }", "title": "" }, { "docid": "861c7d0a28c76d270d580826d316fd3b", "score": "0.5703369", "text": "function getPost(){\n\t\t$request = file_get_contents('php://input');\n\t\treturn json_decode($request,true);\n\t}", "title": "" }, { "docid": "a16bbfbd9389d99bba915ed7d3aa2f8e", "score": "0.56966853", "text": "private function _getFormValues() {\n if ($this->input->post('id', TRUE))\n $data['id'] = $this->input->post('id', TRUE);\n $data['first_name'] = $this->input->post('first_name', TRUE);\n $data['last_name'] = $this->input->post('last_name', TRUE);\n $data['phone'] = $this->input->post('phone', TRUE);\n $data['address'] = $this->input->post('address', TRUE);\n $data['email'] = $this->input->post('email', TRUE);\n $data['password'] = md5($this->input->post('password', TRUE));\n return $data;\n }", "title": "" }, { "docid": "d3f832fc5f6ffb02d95e74511f5601be", "score": "0.5686336", "text": "private function build_post_fields() {\n\t\tif ( count( $this->object['parameters'] ) > 0 ) {\n\t\t\tcurl_setopt( $this->handler, CURLOPT_POSTFIELDS, http_build_query( $this->object['parameters'] ) );\n\t\t}\n\t}", "title": "" }, { "docid": "eb91dcc49c5bfc3b4dc8eae5c8e62685", "score": "0.5685286", "text": "function controller_values() {\n\t\t$val['offset'] = ( isset($_POST[$this->id.'_offset']) && $_POST[$this->id.'_offset'] != '' ) ? clean_post($this->id.'_offset') : 0;\n\t\t$val['order_by'] = ( isset($_POST[$this->id.'_order_by']) && $_POST[$this->id.'_order_by'] != '' ) ? clean_post($this->id.'_order_by') : '';\n\t\t$val['order_type'] = ( isset($_POST[$this->id.'_order_type']) && $_POST[$this->id.'_order_type'] != '' ) ? clean_post($this->id.'_order_type') : 'ASC';\n\t\t$val['search_txt'] = ( isset($_POST[$this->id.'_search_txt']) && $_POST[$this->id.'_search_txt'] != '' ) ? clean_post($this->id.'_search_txt') : '';\n\t\t$val['search_field'] = ( isset($_POST[$this->id.'_search_field']) && $_POST[$this->id.'_search_field'] != '' ) ? clean_post($this->id.'_search_field') : '';\n\t\t$val['filters'] = ( isset($_POST[$this->id.'_filters']) && $_POST[$this->id.'_filters'] != '' ) ? $_POST[$this->id.'_filters'] : '';\n\t\treturn $val;\t\n\t}", "title": "" }, { "docid": "8a2e6a181eda18038ec31757eab5fe5e", "score": "0.5674886", "text": "private function getPostParams()\n {\n if (!empty($_POST)) {\n return $_POST;\n }\n\n $contentType = self::getContentType();\n if (($pos = strpos($contentType, ';')) !== false) {\n $contentType = substr($contentType, 0, $pos);\n }\n if ($contentType === ContentTypeAlias::getContentType('json')) {\n $post = Coding::decodeJSON(self::getInput(), true);\n return is_array($post) ? $post : [];\n } else {\n mb_parse_str(self::getInput(), $post);\n return $post;\n }\n }", "title": "" }, { "docid": "9b003bd3764b7d8a7a5222847379e45a", "score": "0.5669207", "text": "function fetchTaskPostData() {\n return array(\n 'id' => isset($_POST['id']) ? $_POST['id'] : 0, // TODO Generate sequent ID\n 'name' => $_POST['name'],\n 'description' => $_POST['description'],\n 'priority' => $_POST['priority'],\n 'created' => $_POST['created'],\n 'dueDate' => $_POST['dueDate'],\n );\n}", "title": "" }, { "docid": "73333b3ff558a414e78e9e1976ee5c81", "score": "0.5663389", "text": "private function parsePost() {\n\t\t$data = $this->request->input('json_decode', true);\n\n\t\t// Setting the default values, in case something is missing\n\t\t$data = array_merge(\n\t\t\t[\"amount\" => 0.00, \"from\" => \"USD\", \"to\" => \"EUR\", \"time\" => \"2010-12-30\"],\n\t\t\t$data\n\t\t);\n\n\t\treturn [$amount = $data['amount'], $from = $data['from'], $to = $data['to'], $time = $data['time']];\n\t}", "title": "" }, { "docid": "ca96dee7b2b5e7d244d5b2f9f1fcf6f1", "score": "0.56626827", "text": "function serializePost() {\n $postData = '';\n $ampersand = '';\n foreach ($this->params as $key => $value) {\n $postData.=$ampersand.urlencode($key).'='.urlencode($value);\n $ampersand = '&';\n }\n return $postData;\n }", "title": "" }, { "docid": "70b163fbbf4d1fb0612dcd909376de83", "score": "0.5644224", "text": "public function getPostData()\n {\n if (isset($_POST[$this->name]))\n {\n return $_POST[$this->name];\n }\n else\n {\n return array();\n }\n }", "title": "" }, { "docid": "58254cad02b94c7e4e3d6e7287e880a7", "score": "0.5635816", "text": "private function handlePostRequest()\n {\n //because we're not updating them\n //So we can just worry about the first element\n //if we explode $_GET['q'] on /\n\n $queryExplode = explode(\"/\",$this->get['q']);\n $noun = $queryExplode[0];\n switch ($noun) {\n case 'pothole':\n $this->handlePotholePost();\n break;\n default:\n $this->success = false;\n $this->status = 404;\n $this->result = array('error'=>'Unknown Action');\n $this->renderJson();\n }\n }", "title": "" }, { "docid": "a34157b9933e3762f22457b38b959f1a", "score": "0.56298566", "text": "function handlePOSTRequest() {\n if (connectToDB()) {\n if (array_key_exists('insertPatientRequest', $_POST)) {\n handleInsertRequest();\n } else if (array_key_exists('selectClinicsRequest', $_POST)) {\n handleSelectRequest();\n }\n disconnectFromDB();\n }\n }", "title": "" }, { "docid": "3b68fe811ff62a75d98d8adeaecd976e", "score": "0.5615388", "text": "private function getFormValues() {\n $values = array (\n 'name' => (isset ( $_POST ['name'] ) ? htmlspecialchars($_POST ['name']) : \"\")\n );\n return $values;\n }", "title": "" }, { "docid": "138639e43615f62457bd63fdd09c348b", "score": "0.56114566", "text": "public function GetFormValues() {\n /**\n * Check to see if we have a form submitted. If we do, we save all the\n * values and store it.\n */\n if(count($_POST) > 0) {\n $this->Values = new stdClass();\n foreach($_POST as $k => $v) {\n $this->Values->$k = $v;\n }\n }\n }", "title": "" }, { "docid": "7cd912de7f5b7d2c8eb85519c947a7f8", "score": "0.560469", "text": "protected function FillFieldsValuesFromRequest() {\n\t\tforeach($this->m_fieldsMetadata as $lFieldName => $lFieldInfo){\n\t\t\t$lFieldValue = '';\n\t\t\tswitch ($this->m_formMethod) {\n\t\t\t\tcase \"GET\" :\n\t\t\t\t\t$lFieldValue = $_REQUEST[$lFieldName];\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"POST\" :\n\t\t\t\t\t$lFieldValue = $_POST[$lFieldName];\n\t\t\t\t\tif(! isset($t))\n\t\t\t\t\t\t$lFieldValue = $_REQUEST[$lFieldName];\n\t\t\t\t\tbreak;\n\t\t\t\tdefault :\n\t\t\t\t\t$lFieldValue = $_POST[$lFieldName];\n\t\t\t\t\tif(! isset($t))\n\t\t\t\t\t\t$lFieldValue = $_REQUEST[$lFieldName];\n\t\t\t}\n\t\t\tswitch ($lFieldInfo['VType']) {\n\t\t\t\tcase \"int\" :\n\t\t\t\tcase \"float\" :\n\t\t\t\tcase \"string\" :\n\t\t\t\tcase \"mlstring\" :\n\t\t\t\tcase \"mlint\" :\n\t\t\t\tcase \"date\" :\n\t\t\t\t\t// Remove the extra slashes if necessary\n\t\t\t\t\tif(is_array($lFieldValue)){\n\t\t\t\t\t\treturn array_map(\"s\", $lFieldValue);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$lFieldValue = s($lFieldValue);\n\t\t\t\t\t}\n\t\t\t\t\t$this->m_fieldsValues[$lFieldName] = $lFieldValue;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"file\" :\n\t\t\t\t\tbreak;\n\t\t\t\tdefault :\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c00bd111f1084b29b1840af02a4c62aa", "score": "0.55956894", "text": "public function getPostData()\n {\n $fields = $this->getFormFieldSlugs($this->getOption('prefix'));\n\n return array_intersect_key($_POST, array_flip($fields));\n }", "title": "" }, { "docid": "53c92e225b43bf1ff6a2db5fa0dcacd7", "score": "0.5590648", "text": "function POST(){\n\t}", "title": "" }, { "docid": "46625b9ecc67e856dc9241639e3d4915", "score": "0.55892414", "text": "function processPostVars()\n {\n assignPostIfExists($this->subtask_id, $this->rs, 'subtask_id');\n assignPostIfExists($this->student_id, $this->rs, 'student_id');\n assignPostIfExists($this->schoolyear, $this->rs, 'schoolyear');\n assignPostIfExists($this->points, $this->rs, 'points');\n assignPostIfExists($this->comment, $this->rs, 'comment');\n assignPostIfExists($this->order, $this->rs, 'order');\n }", "title": "" }, { "docid": "65ff7567ff489de20444c0de665225d8", "score": "0.5588997", "text": "function _getPostData() {\n\n $_postData = $this->getRequest()->getParams();\n\n return $_postData;\n }", "title": "" }, { "docid": "4d07e516e29e9e93dc72b9f5b5bdb851", "score": "0.5582696", "text": "function handlePOSTRequest() {\n\n if (connectToDB()) {\n if (array_key_exists('updateQueryRequest', $_POST)) {\n handleUpdateRequest();\n }\n\n disconnectFromDB();\n }\n }", "title": "" }, { "docid": "0e06bda95a401ca36d30ab7a7d7fcf41", "score": "0.5577865", "text": "public function getPostFields() {\n return http_build_query($this->postfields);\n }", "title": "" }, { "docid": "ea06a54c5bed1398b8af4bcbe1c3e5bd", "score": "0.5577249", "text": "public function getPostParameters()\n {\n return $this->postParameters;\n }", "title": "" }, { "docid": "24dd4479ef631ae39645059fa981a8b6", "score": "0.55706483", "text": "static function GetPost()\n\t{\n\t\tglobal $site, $_POST;\t\t\n\t\t$prefix = (!empty($site['session_alias'])) ? $site['session_alias'] : ROOT;\n\t\t\n\t\tif(empty($_SESSION[$prefix . 'POST']))\n\t\t\treturn;\n\t\t\n\t\tforeach($_SESSION[$prefix . 'POST'] as $param => $value)\n\t\t{\n\t\t\tif(empty($value))\n\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t$_POST[$param] = $value;\n\t\t}\n\n\t\tunset($_SESSION[$prefix . \"POST\"]);\n\t}", "title": "" }, { "docid": "cd10abe02dd9e3f9a17c14960aa50bbe", "score": "0.55672354", "text": "public function getPost()\n {\n }", "title": "" }, { "docid": "5a4f9b8c41ecee3d4a606a50b73b905d", "score": "0.55665654", "text": "private function post_demand()\n\t{\n\t\tforeach ($_POST as $name => $value) {\n\t\t\t$this->post[$name] = $value;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "9e373273f6c099f68aa7311de56200d4", "score": "0.55606604", "text": "function consultation()\n {\n print_r($_POST);\n }", "title": "" }, { "docid": "47a07c0e5879d960743671698af01bf8", "score": "0.5557899", "text": "protected function getPostValues()\n {\n $postValues = GeneralUtility::_POST('install');\n if (!is_array($postValues)) {\n $postValues = [];\n }\n return $postValues;\n }", "title": "" }, { "docid": "bbf5c8e14fe77d0508413adcc1a1d290", "score": "0.5548004", "text": "public function getPostParams()\n {\n return $this->_postDataHelper->getPostData($this->getHref());\n }", "title": "" }, { "docid": "a9b6a3806066ac6a82c04774131e5ee5", "score": "0.5546573", "text": "protected function _retrievePostedData() {\r\n\r\n return new Collection($_POST);\r\n\r\n }", "title": "" }, { "docid": "5df420bb795eca213c54d62b2f3b1e26", "score": "0.5541856", "text": "private function createParameters() {\n\n if(!isset($_GET['apikey'])) {\n die();\n }\n else {\n if(!$this->authenticateAPIKey($_GET['apikey'])) {\n die();\n }\n }\n\n if(isset($_GET['id'])) {\n $this->query .= \" AND id = \".$_GET['id'];\n }\n\n if(isset($_GET['lastname'])) {\n $this->query .= \" AND lastname = '\".$_GET['lastname'].\"'\";\n }\n\n if(isset($_GET['firstname'])) {\n $this->query .= \" AND firstname = '\".$_GET['firstname'].\"'\";\n }\n\n if(isset($_GET['email'])) {\n $this->query .= \" AND email = '\".$_GET['email'].\"'\";\n }\n\n if(isset($_GET['format'])) {\n $this->format = $_GET['format'];\n }\n\n if(isset($_GET['size'])) {\n $this->query .= \" LIMIT \".$_GET['size'];\n }\n }", "title": "" }, { "docid": "c68bea4690e798b70f4c2c9b89a149b6", "score": "0.55372685", "text": "function getPOSTvars(){\n\tif(isset($_POST)){\n\t\tforeach($_POST as $k => $v){\n\t\t$postVars .= $k . \" => \" . $v . \" \\n\";\n\t\t}\n\t\n\treturn $postVars;\n\t}\n}", "title": "" }, { "docid": "5ac5068867f94a903d6b77b6514622ba", "score": "0.55287844", "text": "public static function collectInput()\n {\n $method = isset($_SERVER['REQUEST_METHOD']) ?\n $_SERVER['REQUEST_METHOD'] : null;\n\n foreach ($_GET as $key => $value)\n {\n self::$input[$key] = $value;\n }\n\n if ('POST' === $method)\n {\n foreach ($_POST as $key => $value)\n {\n self::$input[$key] = $value;\n }\n }\n \n if ('PUT' === $method) {\n parse_str(file_get_contents('php://input'), $_PUT);\n\n foreach ($_PUT as $key => $value)\n {\n self::$input[$key] = $value;\n }\n }\n\n if ('DELETE' === $method) {\n parse_str(file_get_contents('php://input'), $_DELETE);\n\n foreach ($_DELETE as $key => $value)\n {\n self::$input[$key] = $value;\n }\n }\n }", "title": "" }, { "docid": "b971d0512c73e695aa0ddab40bf4c632", "score": "0.5524683", "text": "public function ParsePostData() {\n\t\tif (array_key_exists($this->strControlId, $_POST)) {\n\t\t\t$this->arrFullResponse = $_POST[$this->strControlId];\n\t\t}else{\n\t\t\t$this->arrFullResponse = null;\n\t\t}\n\t}", "title": "" }, { "docid": "1410b51c854c0e1b68dc4c7dd83eb24d", "score": "0.5510238", "text": "function getValues()\r\n {\r\n $this->getVar('fieldvalues');\r\n }", "title": "" }, { "docid": "352f63d3d60a16cca8ee3c3d69c01a50", "score": "0.55023104", "text": "public function httpPostAll()\n {\n if ($this->container->request->getParsedBody() !== null) {\n return $this->container->request->getParsedBody(); \n }\n\t\t\n return null;\n }", "title": "" }, { "docid": "f42b4a20578444f0ad019277581d0887", "score": "0.54995114", "text": "public abstract function fields(Request $request);", "title": "" }, { "docid": "a48efc4108794a50a85e06243495135a", "score": "0.5494473", "text": "public function insertPostDataToObject(){\n //default insert adalah tanpa syarat, kalau mau ada syarat sebaiknya di filter dulu sebelum di insert\n // filternya pakai subclasse method save\n $colomlist = $this->getColumnlist();\n $insertStr = array(); \n $updateStr = array();\n $mainValue = \"\";\n $load = (isset($_POST['load'])?addslashes($_POST['load']):0);\n foreach($colomlist as $colom){\n $field = $colom->Field;\n $post = (isset($_POST[$field])?addslashes($_POST[$field]):'');\n if($post == '')continue;\n $insertStr[$field] = $post; \n $this->$field = $post;\n } \n $this->load = $load;\n $this->insertStr = $insertStr;\n $this->fill($insertStr);\n $this->loadDbColList = $colomlist;\n }", "title": "" }, { "docid": "a10658eae0e7d8b1d4cce45f9f837323", "score": "0.5493251", "text": "public function usePost();", "title": "" }, { "docid": "5adea51d2cbd17fa06af7d9b18a85c5e", "score": "0.54835624", "text": "public function getGetValues() {\n $get_check_array = array (\n\n 'action' => array('filter' => FILTER_SANITIZE_STRING),\n\n 'id' => array('filter' => FILTER_VALIDATE_INT)\n );\n\n //GET gefilterde input\n $inputs = filter_input_array(INPUT_GET, $get_check_array);\n\n return $inputs;\n }", "title": "" }, { "docid": "5d741f4ba8bb281ae54b42503d9f74d3", "score": "0.54711616", "text": "public function post()\n {\n return $this->request('POST');\n }", "title": "" }, { "docid": "07e13b0a9753a7a4f2087b1d3961906c", "score": "0.54631925", "text": "protected function _getFormData() {\n $data = array();\n $filterChain = new Zend_Filter();\n $filterChain->addFilter(new Zend_Filter_StripTags());\n $filterChain->addFilter(new Zend_Filter_StringTrim());\n \n $data['username'] = $filterChain->filter($this->_request->getPost('username'));\n $data['password'] = $filterChain->filter($this->_request->getPost('password'));\n $data['usertype'] = $filterChain->filter($this->_request->getPost('usertype'));\n return $data;\n }", "title": "" }, { "docid": "fe120c82d14224e628eed9ef4aac4843", "score": "0.54605174", "text": "private function get_post_data () {\n\t\t\t# Create an array wherein the final data will be stored.\n\t\t\t$data = [];\n\t\t\t\n\t\t\t# Get the raw post data from the stream.\n\t\t\t$raw_data = file_get_contents(\"php://input\");\n\t\t\t\n\t\t\t# Explode the data at the ampersands to turn it into an array.\n\t\t\t$raw_array = explode(\"&\", $raw_data);\n\t\t\t\n\t\t\t# Iterate over every element of the array.\n\t\t\tforeach ($raw_array as $value) {\n\t\t\t\t# Explode the value at the equal signs to turn it into an array.\n\t\t\t\t$value = explode (\"=\", $value);\n\t\t\t\t\n\t\t\t\t# Check whether the value array has two elements and, if so, assign the url-decoded value to the key.\n\t\t\t\tif (count($value) == 2) $data[$value[0]] = urldecode($value[1]);\n\t\t\t}\n\t\t\t\n\t\t\t# Return the data array.\n\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "608b4a41028bd3369c30743e186414c6", "score": "0.54523546", "text": "function formData()\n {\n $this->out->element('input', array('name' => 'q',\n 'size' => 20,\n 'id' => 'search-q'));\n }", "title": "" }, { "docid": "20c8156f70208b9c03e685cb947f075b", "score": "0.5450263", "text": "public function parsePostData()\n {\n $val = $this->objForm->checkableControlValue($this->strControlId);\n if (empty($val)) {\n $this->unselectAllItems(false);\n } else {\n $this->setSelectedItemsByIndex($val, false);\n }\n }", "title": "" }, { "docid": "4824dcd2b61c91ad55a82509b0f0459a", "score": "0.5440399", "text": "static function InitionPost()\n\t\t{\n\t\t\t \n\t\t self::$SamType = htmlspecialchars($_POST['Samtype']);\n\t\t\t\n\t\t\t/*\n\t\t\t get topic title SamTitle\n\t\t\t*/\n\t\t\t\n\t\t self::$SamTitle = htmlspecialchars($_POST['SamTitle']);\n\t\t\t\n\t\t\t/*\n\t\t\t get url vedio SamVedUrl\n\t\t\t*/\n\t\t \n\t\t self::$SamVedUrl = isset($_POST['SamVedUrl']) ? htmlspecialchars($_POST['SamVedUrl']) : NULL;\t\t\n\t\t\t\n\t\t\t/*\n\t\t\t get msg content SamMsg\n\t\t\t*/\n\t\t\n\t\t self::$SamMsg = htmlspecialchars($_POST['SamMsg']);\n\t\t\n\t\t\n \n\t\t}", "title": "" }, { "docid": "081da2fb92f69335d19d88b8b3d58a06", "score": "0.5432985", "text": "public abstract function POSTEntity();", "title": "" }, { "docid": "e8074afb3406a1f236bbd2d0c0cf2468", "score": "0.5432126", "text": "public function toRequiredQueryData();", "title": "" }, { "docid": "9cc49f7c446977893577740dddc39d08", "score": "0.5430297", "text": "protected function ReadQuery()\n\t{\n\t\tif (isset($_GET['o']))\n\t\t\t$this->params['order'] = $_GET['o'];\n\t\telse\n\t\t\t$this->params['order'] = 'project';\n\t\tif (isset($_GET['s']))\n\t\t\t$this->params['search'] = $_GET['s'];\n\t}", "title": "" }, { "docid": "454eebde96cf0920b20bb601f42dc9fa", "score": "0.54260486", "text": "private function getPostParams() {\n\n\t\tif( isset($_POST['_post']) ) {\n\t\t\t$post = $_POST['_post'];\n\t\t} else {\n\t\t\t$post = file_get_contents('php://input');\n\t\t}\n\n\t\tif( empty($post) )\n\t\t\treturn array();\n\n\t\t$json_params = json_decode($post, true);\n\n\t\tif( $json_params && (json_last_error() == JSON_ERROR_NONE) ) {\n\t\t\treturn $json_params;\n\t\t} else {\n\t\t\treturn array();\n\t\t\t/*\n\t\t\t\tif( json_last_error() != JSON_ERROR_NONE ) {\n\t\t\t\t\tnew ErrorException( 'JSON Error', 0, json_last_error(), __FILE__, __LINE__ );\n\t\t\t\t\t$async = new Async('JSON');\n\t\t\t\t\t$async->sendError(getLastJSONError());\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t*/\n\n\t\t}\n\t}", "title": "" }, { "docid": "bbf63e7571334d691989823eaa813d7b", "score": "0.5425633", "text": "function get_and_fill_submited_params()\n\t{\n\t\t$this->populate(false);\n\t\t\n\t\t//count the form name´s length\n\t\t$len=strlen($this->m_form_object->get_name()); \n\t\t\n\n\t\t// Por cada uno de los objetos del formulario miramos si hay un $_request con la misma key y si es asi le ponemos el valor al objeto\n\t\tforeach ($this->m_form_object->get_objects() as $obj)\n\t\t{\n\t\t\t$name_obj = $obj->get_name();\n\t\t\t$type_obj = $obj->get_type();\n\t\t\t\n\t\t\tif (isset($_REQUEST[$name_obj]))\n\t\t\t{\n\t\t\t\tif ($type_obj != \"info\")\n\t\t\t\t{\n\t\t\t\t\tswitch ( $obj->get_type() )\n\t\t\t\t\t{\n\t\t\t\t\t\tcase \"button\":\n\t\t\t\t\t\tcase \"submit\":\n\t\t\t\t\t\tcase \"info\":\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tcase \"checkbox\":\n\t\t\t\t\t\t\tif ($_REQUEST[$name_obj] != 0)\n\t\t\t\t\t\t\t\t$obj->set_to_checked();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\t\tcase \"select\";\n\t\t\t\t\t\t\t$obj->set_to_selected(htmlentities(stripslashes($_REQUEST[$name_obj]),ENT_QUOTES, 'UTF-8'));\n\t\t\t\t\t\t\t$obj->set_value(htmlentities(stripslashes($_REQUEST[$name_obj]),ENT_QUOTES, 'UTF-8'));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tcase \"radio\":\n\t\t\t\t\t\t\t$obj->set_to_checked(htmlentities(stripslashes($_REQUEST[$name_obj]),ENT_QUOTES, 'UTF-8'));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$obj->set_value(htmlentities(stripslashes($_REQUEST[$name_obj]),ENT_QUOTES, 'UTF-8'));\n\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// Miramos si se ha enviado algun tipus file con el nombre del objeto\n\t\t\t\t\tif (isset($_FILES[$name_obj]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$obj->set_value($_FILES[$name_obj]['name']);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tswitch ( $obj->get_type() )\n\t\t\t\t\t{\n\t\t\t\t\t\tcase \"checkbox\":\n\t\t\t\t\t\t\t\t$obj->set_to_unckecked();\n\t\t\t\t\t\tbreak;\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}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "0c1b5e824d2b39f25a292ef44b31c9fb", "score": "0.5424644", "text": "public function process_post( $data ) {}", "title": "" }, { "docid": "76c76b39a58bc426610360ed03a5fca8", "score": "0.54149747", "text": "public function getAll_post()\n\t{\n\t\t$datos = $this->post();\n\t\t$_Token = $datos[\"token\"];\n\t\t$_ID_Empresa = $datos[\"IDEmpresa\"];\n\t\tif ($this->checksession($_Token, $_ID_Empresa) === false) {\n\t\t\t$_data[\"code\"] = 1990;\n\t\t\t$_data[\"ok\"] = \"ERROR\";\n\t\t\t$_data[\"result\"] = \"Error de Sesion\";\n\t\t\t$this->response($_data, REST_Controller::HTTP_NOT_FOUND);\n\t\t} else {\n\t\t\t$_data[\"code\"] = 0;\n\t\t\t$_data[\"ok\"] = \"SUCCESS\";\n\t\t\t$_data[\"Marcas\"] = $this->Model_Marcas->getMarcasEmpresa($_ID_Empresa);\n\t\t\t$this->response($_data, REST_Controller::HTTP_OK);\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "0b921df45db354841fe9f1de5fade0da", "score": "0.54132396", "text": "public function getValues()\n {\n $query = $this->getQuery();\n\n $params = $this->getParameters();\n $this->load();\n return compact('query', 'params');\n }", "title": "" }, { "docid": "72eb833c032aef4e644d0c9fe01047e9", "score": "0.54111505", "text": "public function getCMSpostParameters()\n {\n return (isset(Basic::$POST)) ? Basic::$POST : array();\n }", "title": "" }, { "docid": "fc8bae1af2f66bb8bd0edd66edd73267", "score": "0.5411125", "text": "function get_post($conn, $var) {\n\t\t\t\t\t\treturn $conn->real_escape_string($_POST[$var]);\n\t\t\t\t\t}", "title": "" }, { "docid": "f23bee85a232b3253bacac14879af850", "score": "0.5408165", "text": "protected function populateValuesFromPost()\n {\n $data = $_POST;\n\n if (isset($_FILES)) {\n $data = [...$_POST, ...$_FILES];\n }\n\n return $this->populateValues($data);\n }", "title": "" }, { "docid": "463448f49887a068c85b806663c27196", "score": "0.5407258", "text": "public function getAllPost(): array\n {\n return $_POST;\n }", "title": "" }, { "docid": "f5d70cf215cc87c6a78670e7f4123889", "score": "0.5407142", "text": "function get_post(){\r\n\t\t$location = array();\r\n\t\t$location['location_id'] = $_POST['location_id'];\r\n\t\t$location['location_name'] = stripslashes($_POST['location_name']);\r\n\t\t$location['location_address'] = stripslashes($_POST['location_address']); \r\n\t\t$location['location_town'] = stripslashes($_POST['location_town']); \r\n\t\t$location['location_latitude'] = $_POST['location_latitude'];\r\n\t\t$location['location_longitude'] = $_POST['location_longitude'];\r\n\t\t$location['location_description'] = stripslashes($_POST['content']);\r\n\t\t$this->to_object($location);\r\n\t}", "title": "" }, { "docid": "32998032522d0cfebdf24fe4dace57e0", "score": "0.5406883", "text": "public function getall_post(){\t\n\t\t$datos=$this->post();\n\t\t//vdebug($datos);\n\t\t$_Token=$datos[\"token\"];\n\t\t$_ID_Empresa=$datos[\"IDEmpresa\"];\n\t\t\n\t\tif($this->checksession($_Token,$_ID_Empresa)===false){\n\t\t\t$_data[\"code\"]=1990;\n\t\t\t$_data[\"ok\"]=\"ERROR\";\n\t\t\t$_data[\"result\"]=\"Error de Sesion\";\n\t\t}else{\n\t\t\t$_data[\"code\"]=0;\n\t\t\t$_data[\"ok\"]=\"SUCCESS\";\n\t\t\t$_data[\"result\"]=$this->Model_Producto->getall($_ID_Empresa);\n\t\t}\n\t\t$data[\"response\"]=$_data;\n\t\t$this->response($data);\n\t}", "title": "" }, { "docid": "b32be70e5c342f775bfb2137e6f6fc48", "score": "0.5390375", "text": "private function getFieldData()\r\n\t{\r\n\t\t$columns = array();\r\n\t\t\r\n\t\t// Collect the form variables\r\n\t\tforeach ($_POST as $key=>$value)\r\n\t\t{\r\n\t\t\tif(!empty($value))\r\n\t\t\t{\r\n\t\t\t\t$columns[$key] = $value; \r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $columns;\r\n\t}", "title": "" }, { "docid": "deb1bfc88063c390b38c120dfc608cea", "score": "0.5382581", "text": "public function filters()\n\t {\n\t\t return $this->request->all();\n\t }", "title": "" }, { "docid": "baf8f7c34bb8af8628367fea1395b67a", "score": "0.53792346", "text": "protected static function insertArgsFromPost() {\n $insert_args = array(\n 'name' => $_POST['name'],\n 'key' => $_POST['key'],\n 'url' => $_POST['url'],\n 'categories' => $_POST['categories']\n );\n return $insert_args;\n }", "title": "" }, { "docid": "b9a491538ae81b9913d3e8eab9151251", "score": "0.5376568", "text": "private function trataPost($post) {\n $data['id_usuario'] = isset($post['id_usuario'])? $post['id_usuario'] : NULL;\n $data['nome'] = isset($post['nome'])? $post['nome'] : NULL;\n $data['email'] = isset($post['email'])? $post['email'] : NULL;\n $data['sistema'] = isset($post['sistema'])? $post['sistema'] : NULL;\n $data['status'] = isset($post['status'])? $post['status'] : NULL;\n $data['senha'] = isset($post['senha'])? $post['senha'] : NULL;\n \n return $data;\n }", "title": "" }, { "docid": "b726fed2332fbe02e13b7c983770d2c2", "score": "0.5371725", "text": "public function fields()\n {\n if ($this->http_method() == \"GET\") {\n parse_str(parse_url($this->url, PHP_URL_QUERY), $params);\n return $params;\n } else {\n return $this->parameters[CURLOPT_POSTFIELDS];\n }\n }", "title": "" }, { "docid": "00d731f5c48090a8aaece3dd034f5711", "score": "0.5368349", "text": "public function parsePOST($post);", "title": "" }, { "docid": "464bad26643f8d3373f0165cca5499e1", "score": "0.5365591", "text": "public function create()\n {\n print_r($_POST);\n }", "title": "" }, { "docid": "0d6201467ee30c92205ee9714ce2ab96", "score": "0.5362479", "text": "public function all()\n {\n if( preg_match(\"/(put|patch)/\", strtolower($_SERVER['REQUEST_METHOD'])) ){\n parse_str(file_get_contents(\"php://input\"),$post);\n return $post;\n }\n return $_POST;\n }", "title": "" }, { "docid": "3f2fbb925890e8ee369582d584c39139", "score": "0.5361519", "text": "function handlePOSTRequest() {\n if (connectToDB()) {\n if (array_key_exists('resetTablesRequest', $_POST)) {\n handleResetRequest();\n } else if (array_key_exists('updateQueryRequest', $_POST)) {\n handleUpdateRequest();\n } else if (array_key_exists('insertQueryRequest', $_POST)) {\n handleInsertRequest();\n } else if (array_key_exists('releasePokemonRequest', $_POST)) {\n releasePokemon();\n } else if (array_key_exists('searchPokemonRequest', $_POST)) {\n searchPokemon();\n } else if (array_key_exists('searchIDRequest', $_POST)) {\n searchID();\n } else if (array_key_exists('checkWeaknessRequest', $_POST)) {\n checkWeak();\n } else if (array_key_exists('getThisPokemon', $_POST)) {\n showThisPokemon();\n } else if (array_key_exists('showPokemonNotWeakAgainstRequest', $_POST)) {\n showPokemonNotWeakAgainst();\n }\n\n disconnectFromDB();\n }\n }", "title": "" }, { "docid": "b6c485125e4d6a66f2579f9475a97719", "score": "0.5359952", "text": "function getPosts()\n{\n $posts = array();\n $posts[0] = $_POST['id_habitation'];\n $posts[1] = $_POST['type'];\n $posts[2] = $_POST['nom'];\n $posts[3] = $_POST['adresse'];\n $posts[4] = $_POST['nb_piece'];\n $posts[5] = $_POST['id_user'];\n return $posts;\n}", "title": "" }, { "docid": "20f0f0a79d720df5b06cf07d38be8919", "score": "0.5341698", "text": "function gaz_dbi_parse_post($table) {\r\n global $link, $gTables;\r\n $acc = array();\r\n $field_results = gaz_dbi_query(\"SELECT * FROM \" . $gTables[$table] . \" LIMIT 1\");\r\n $field_meta = gaz_dbi_get_fields_meta($field_results);\r\n for ($j = 0; $j < $field_meta['num']; $j++) {\r\n $nomeCampo = $field_meta['data'][$j]->name;\r\n if (isset($_POST[$nomeCampo])) {\r\n switch ($field_meta['data'][$j]->type) {\r\n // i numerici\r\n case 1:\r\n case 2:\r\n case 3:\r\n case 4:\r\n case 5:\r\n case 8:\r\n case 9:\r\n case 16:\r\n case 246:\r\n $acc[$field_meta['data'][$j]->name] = floatval(preg_replace(\"/\\,/\", '.', $_POST[$field_meta['data'][$j]->name]));\r\n break;\r\n case 7:\r\n case 10:\r\n case 11:\r\n case 12:\r\n case 13: // campi datetimestamp\r\n $acc[$field_meta['data'][$j]->name] = substr($_POST[$field_meta['data'][$j]->name], 0, 20);\r\n break;\r\n // i binari non li considero\r\n case 252:\r\n break;\r\n // gli altri eventualmente li tronco\r\n default:\r\n $acc[$field_meta['data'][$j]->name] = substr($_POST[$field_meta['data'][$j]->name], 0, $field_meta['data'][$j]->length);\r\n break;\r\n }\r\n }\r\n }\r\n return $acc;\r\n}", "title": "" }, { "docid": "46df7eb7f2a9fed7030c65bc48f0d64d", "score": "0.53366715", "text": "protected function getPost() {\n\n $args = func_get_args();\n\n if (count($args) == 0)\n return $this->post;\n\n if (count($args) == 1)\n return isset($this->post[$args[0]]) ? $this->post[$args[0]] : false;\n\n $result = array();\n foreach ($args as $arg)\n !isset($this->post[$arg]) || $result[$arg] = $this->post[$arg];\n\n return $result;\n }", "title": "" }, { "docid": "02dc914aa52ab17169a177ce681462a9", "score": "0.5326197", "text": "private function initPOST(){\n\tif (isset($_POST['tbLivroAndamentoIdlivro'])){\n\t\t$this->tbLivroAndamentoIdlivro = $_POST['tbLivroAndamentoIdlivro'];\n\t}\n\tif (isset($_POST['tbLivroAndamentoIdusuario'])){\n\t\t$this->tbLivroAndamentoIdusuario = $_POST['tbLivroAndamentoIdusuario'];\n\t}\n\tif (isset($_POST['tbLivroAndamentoUltimapaginalida'])){\n\t\t$this->tbLivroAndamentoUltimapaginalida = $_POST['tbLivroAndamentoUltimapaginalida'];\n\t}\n\tif (isset($_POST['tbLivroAndamentoRange'])){\n\t\t$this->tbLivroAndamentoRange = $_POST['tbLivroAndamentoRange'];\n\t}\n\tif (isset($_POST['tbLivroAndamentoCapitulolido'])){\n\t\t$this->tbLivroAndamentoCapitulolido = $_POST['tbLivroAndamentoCapitulolido'];\n\t}\n\tif (isset($_POST['tbLivroAndamentoDtinicio'])){\n\t\t$this->tbLivroAndamentoDtinicio = $_POST['tbLivroAndamentoDtinicio'];\n\t}\n\tif (isset($_POST['tbLivroAndamentoDtpause'])){\n\t\t$this->tbLivroAndamentoDtpause = $_POST['tbLivroAndamentoDtpause'];\n\t}\n\tif (isset($_POST['tbLivroAndamentoDtfim'])){\n\t\t$this->tbLivroAndamentoDtfim = $_POST['tbLivroAndamentoDtfim'];\n\t}\n}", "title": "" }, { "docid": "db9258131c1cc9902a0ca0c3ca6b8d1a", "score": "0.53258693", "text": "public function get_values($form){\n\t\n\t\tforeach( $_POST as $key=>$field ):\n\n\t\t\tif( $field == 'ga_campaign_source' )\n\t\t\t\t$_POST[$key] = (isset($_GET['utm_source'])?$_GET['utm_source']:$this->campaign_source);\n\t\t\telseif( $field == 'ga_campaign_name' )\n\t\t\t\t$_POST[$key] = (isset($_GET['utm_campaign'])?$_GET['utm_campaign']:$this->campaign_name);\n\t\t\telseif( $field == 'ga_campaign_medium' )\n\t\t\t\t$_POST[$key] = (isset($_GET['utm_medium'])?$_GET['utm_medium']:$this->campaign_medium);\n\t\t\telseif( $field == 'ga_campaign_content' )\n\t\t\t\t$_POST[$key] = (isset($_GET['utm_content'])?$_GET['utm_content']:$this->campaign_content);\n\t\t\telseif( $field == 'ga_campaign_term' )\n\t\t\t\t$_POST[$key] = $this->campaign_term;\n\t\t\telseif( $field == 'ga_first_visit' )\n\t\t\t\t$_POST[$key] = $this->first_visit;\n\t\t\telseif( $field == 'ga_previous_visit' )\n\t\t\t\t$_POST[$key] = $this->previous_visit;\n\t\t\telseif( $field == 'ga_visit_started' )\n\t\t\t\t$_POST[$key] = $this->current_visit_started;\n\t\t\telseif( $field == 'ga_times_visited' )\n\t\t\t\t$_POST[$key] = $this->times_visited;\n\t\t\telseif( $field == 'ga_pages_viewed' )\n\t\t\t\t$_POST[$key] = $this->pages_viewed;\n\n\t\tendforeach;\n\t\t\n\n\t}", "title": "" }, { "docid": "d93d4f1c45a825f6462396317a9c7401", "score": "0.5320163", "text": "function get_post($conn, $var)\n {\n return $conn->real_escape_string($_POST[$var]);\n }", "title": "" }, { "docid": "58fd100b6056bdb607e7ddbf1f71654d", "score": "0.53197587", "text": "function getSelectQueryData(Request $request) : array {\n\t$queryData = null;\n\t$fields = null;\n\t$where = null;\n\n\tif(count($request->getHeader('queryData')) > 0 and (!is_null($request->getHeader('queryData')[0])))\n\t\t$queryData = json_decode($request->getHeader('queryData')[0]);\n\tif (isset($queryData->fields))\n\t\t$fields = $queryData->fields;\n\tif (isset($queryData->where))\n\t\t$where = $queryData->where;\n\t\n\treturn sanitize(['fields'=>$fields, 'where'=>$where]);\n}", "title": "" }, { "docid": "d305cc117f3ad7370531855223f164d3", "score": "0.53165627", "text": "private function populateUserInput() {\r\n\t\tforeach ($_GET as $key => $val) {\r\n\t\t\t$this->action->set($key, $val);\r\n\t\t}\r\n\t\tforeach ($_POST as $key => $val) {\r\n\t\t\t$this->action->set($key, $val);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "04d08f6a5e503233cdd8cf176b9d2f91", "score": "0.53145313", "text": "function checkPost(){\n $toCheck = array();\n $toCheck[] = 'Identifier';\n\n foreach($this->buildingEntries as $num){\n $toCheck[] = 'Building' . \"$num\";\n $toCheck[] = 'Room' . \"$num\";\n }\n foreach( $toCheck as $fld){\n if (isset($_POST[$fld])){\n $GLOBALS[$fld] = \"$_POST[$fld]\";\n // print \"Got: $fld<br>\";\n }\n else {\n $GLOBALS[$fld] = '';\n // print \"NOT: $fld<br>\";\n }\n }\n // print_pre($_POST,\"POST\");\n // print_pre($GLOBALS,\"GLOBALS\");\n }", "title": "" } ]
e0d4de5eba39a3c2c130fe61cafb4087
Don't transfer Stripe customer/token meta when creating a parent renewal order.
[ { "docid": "a5a12770c7993f4491e99e70b96e03b7", "score": "0.0", "text": "public function remove_renewal_order_meta( $order_meta_query, $original_order_id, $renewal_order_id, $new_order_role = NULL ) {\n if ( 'parent' == $new_order_role ) {\n $order_meta_query .= \" AND `meta_key` NOT IN ( '_VPSTxId', '_SecurityKey', '_TxAuthNo', '_RelatedVPSTxId', '_RelatedSecurityKey', '_RelatedTxAuthNo', '_CV2Result', '_3DSecureStatus' ) \";\n }\n return $order_meta_query;\n }", "title": "" } ]
[ { "docid": "9f9e275ce4362801bd72c3afff6f68f9", "score": "0.56915253", "text": "public static function create_ec_order_automatic($order_info)\n {\n // dd($order_info);\n if($order_info['customer_id'] == null)\n {\n $customer_id = Customer::createCustomer($order_info['shop_id'] ,$order_info['customer']);\n }\n else\n {\n $customer_id = $order_info['customer_id'];\n }\n\n $data['shop_id'] = $order_info['shop_id'];\n $data['inv_customer_id'] = $customer_id;\n $data['inv_customer_email']= $order_info['customer']['customer_email'];\n\n $data['inv_terms_id'] = '';\n $data['inv_date'] = Carbon::now();\n $data['inv_due_date'] = Carbon::now();\n $data['inv_customer_billing_address'] = $order_info['customer']['customer_address'].\" \".$order_info['customer']['customer_city'].\" \".$order_info['customer']['customer_state_province'];\n\n $data['inv_message'] = '';\n $data['inv_memo'] = '';\n $data['ewt'] = 0;\n $data['inv_discount_type'] = '';\n $data['inv_discount_value'] = 0;\n $data['invline_service_date'] = $order_info['invline_service_date'];\n $data['invline_item_id'] = $order_info['invline_item_id'];\n $data['invline_description'] = $order_info['invline_description'];\n $data['invline_qty'] = $order_info['invline_qty'];\n $data['invline_rate'] = $order_info['invline_rate'];\n $data['invline_discount'] = $order_info['invline_discount'];\n $data['invline_discount_remark'] = $order_info['invline_discount_remark'];\n $data['payment_method_id'] = $order_info['payment_method_id'];\n $data['coupon_code'] = 0;\n\n $data['ec_order_load'] = $order_info[\"ec_order_load\"];\n $data['ec_order_load_number'] = $order_info[\"ec_order_load_number\"];\n $data['taxable'] = $order_info['taxable'];\n $data['order_status'] = $order_info['order_status'];\n $data['payment_status'] = isset($order_info['payment_status']) ? $order_info['payment_status'] : 0;\n\n $order_id = Ec_order::create_ec_order($data);\n\n $update['ec_order_slot_id'] = Ec_order::get_slot_id_session();\n $update[\"payment_upload\"] = isset($order_info['payment_upload']) ? $order_info['payment_upload'] : '';\n $image_id = Tbl_ec_order::where(\"ec_order_id\", $order_id)->update($update);\n \n $order_info['customer_id'] = $customer_id;\n // Ec_order::create_merchant_school_item($order_id);\n \n\n\n $return[\"status\"] = \"success\";\n $return[\"order_id\"] = $order_id;\n\n return $return;\n }", "title": "" }, { "docid": "fbf250834ecc9839b7881adf8e55a127", "score": "0.5637857", "text": "public function doCreate($dataArray, $order)\n {\n // order creation request within Magento.\n\n echo \"<Info>Next order: {$order->OrderId} Create Quote</Info>\";\n Mage::register('cu_order_in_progress', 1);\n try {\n\n $quote = Mage::getModel('sales/quote')->setStoreId((string) $dataArray->StoreviewId);\n\n // we need to verify (from our XML) that we can create customer accounts\n // and that we can contact the customer.\n\n\n echo \"<Info>Create Customer</Info>\";\n\n\n $customer = Mage::getModel('customer/customer')\n ->setWebsiteId((string) $dataArray->WebsiteId)\n ->loadByEmail((string) $order->BillingInfo->Email);\n\n if ($customer->getId() > 0) {\n $quote->assignCustomer($customer);\n } else {\n if ((string) $order->customer->canCreateCustomer) {\n // customer does not exist, but we can create one.\n // however. if we can't email the customer their password\n // there's no point continuing.\n if ((string) $order->customer->canEmailCustomer) {\n\n // we can create a customer, and can email them a random password\n // within a welcome email. So lets do this.\n\n $customer = Mage::getModel('customer/customer');\n\n $customerData = array(\n \"firstname\" => $this->fixEncoding((string) $order->customer->firstname),\n \"lastname\" => $this->fixEncoding((string) $order->customer->surname),\n \"email\" => (string) $order->customer->email,\n \"website_id\" => (string) $order->websiteId,\n );\n\n $customer->addData($customerData);\n $customer->save();\n $customer->setPassword($customer->generatePassword(8))->save();\n $customer->sendNewAccountEmail();\n $customer->save();\n\n // and now to assign the customer onto the quote.\n $quote->assignCustomer($customer);\n } else {\n // create the order as a guest.\n $quote->setCustomerFirstname($this->fixEncoding((string) $order->customer->firstname));\n $quote->setCustomerLastname($this->fixEncoding((string) $order->customer->surname));\n $quote->setCustomerEmail((string) $order->customer->email);\n $quote->setCustomerIsGuest(1);\n }\n } else {\n // create the order as a guest.\n $quote->setCustomerFirstname($this->fixEncoding($this->getFirstName((string) $order->BillingInfo->Name)));\n $quote->setCustomerLastname($this->fixEncoding($this->getLastName((string) $order->BillingInfo->Name)));\n\n $customerEmail = (string) $order->BillingInfo->Email;\n $bConvertBack = false; // change to true to get marketplace emails back\n\n if ($bConvertBack) {\n $serviceType = (string) $order->ServiceSku;\n switch ($serviceType) {\n case \"CU_AMZ_UK\":\n $customerEmail = str_replace(\"@channelunity.com\", \"@marketplace.amazon.co.uk\", $customerEmail);\n break;\n case \"CU_AMZ_COM\":\n $customerEmail = str_replace(\"@channelunity.com\", \"@marketplace.amazon.com\", $customerEmail);\n break;\n case \"CU_AMZ_DE\":\n $customerEmail = str_replace(\"@channelunity.com\", \"@marketplace.amazon.de\", $customerEmail);\n break;\n case \"CU_AMZ_FR\":\n $customerEmail = str_replace(\"@channelunity.com\", \"@marketplace.amazon.fr\", $customerEmail);\n break;\n case \"CU_AMZ_CA\":\n $customerEmail = str_replace(\"@channelunity.com\", \"@marketplace.amazon.ca\", $customerEmail);\n break;\n case \"CU_AMZ_IT\":\n $customerEmail = str_replace(\"@channelunity.com\", \"@marketplace.amazon.it\", $customerEmail);\n break;\n case \"CU_AMZ_ES\":\n $customerEmail = str_replace(\"@channelunity.com\", \"@marketplace.amazon.es\", $customerEmail);\n break;\n case \"CU_AMZ_JP\":\n $customerEmail = str_replace(\"@channelunity.com\", \"@marketplace.amazon.co.jp\", $customerEmail);\n break;\n }\n }\n\n $quote->setCustomerEmail($customerEmail);\n $quote->setCustomerIsGuest(1);\n }\n }\n\n echo \"<Info>Order currency {$order->Currency}</Info>\";\n\n $quote->getStore()->setCurrentCurrencyCode((string) $order->Currency);\n\n $storeCurrency = $quote->getStore()->getBaseCurrencyCode();\n\n echo \"<Info>Store currency $storeCurrency</Info>\";\n\n $currencyObject = Mage::getModel('directory/currency');\n $reverseRate = $currencyObject->getResource()->getRate($storeCurrency, (string) $order->Currency);\n\n if ($reverseRate == \"\") {\n $reverseRate = 1.0;\n }\n\n echo \"<ConversionRate>$reverseRate</ConversionRate>\";\n $itemOptions = array();\n\n echo \"<Info>Set Billing Address</Info>\";\n\n $postcode = $this->fixEncoding((string) $order->ShippingInfo->PostalCode);\n\n $regionModel = Mage::getModel('directory/region')->loadByCode((string) $order->ShippingInfo->State, (string) $order->ShippingInfo->Country);\n $regionId = is_object($regionModel) ? $regionModel->getId() : ((string) $order->ShippingInfo->State);\n\n \n if (!empty($order->ShippingInfo->Address1)\n && !empty($order->ShippingInfo->Address2)\n && ((string) $order->ServiceSku) == \"CU_AMZ_DE\") {\n\n // set the billing address\n $billingAddressData = array(\n 'firstname' => $this->fixEncoding($this->getFirstName((string) $order->BillingInfo->Name)),\n 'lastname' => $this->fixEncoding($this->getLastName((string) $order->BillingInfo->Name)),\n 'email' => (string) $order->BillingInfo->Email,\n 'telephone' => ( (string) $order->BillingInfo->PhoneNumber == \"\" ?\n (string) $order->ShippingInfo->PhoneNumber :\n (string) $order->BillingInfo->PhoneNumber),\n 'company' => (string) $this->fixEncoding((string) $order->ShippingInfo->Address1),\n 'street' => (string) $this->fixEncoding(\n (string) $order->ShippingInfo->Address2\n . \"\\n\" . (string) $order->ShippingInfo->Address3),\n 'city' => $this->fixEncoding((string) $order->ShippingInfo->City),\n 'postcode' => $postcode,\n 'region' => (string) $order->ShippingInfo->State,\n 'region_id' => $regionId,\n 'country_id' => (string) $order->ShippingInfo->Country,\n 'should_ignore_validation' => true\n );\n\n // add the billing address to the quote.\n $billingAddress = $quote->getBillingAddress()->addData($billingAddressData);\n\n echo \"<Info>Set Shipping Address</Info>\";\n\n // set the shipping address\n $shippingAddressData = array(\n 'firstname' => $this->fixEncoding($this->getFirstName((string) $order->ShippingInfo->RecipientName)),\n 'lastname' => $this->fixEncoding($this->getLastName((string) $order->ShippingInfo->RecipientName)),\n 'company' => (string) $this->fixEncoding((string) $order->ShippingInfo->Address1),\n 'street' => (string) $this->fixEncoding(\n (string) $order->ShippingInfo->Address2\n . \"\\n\" . (string) $order->ShippingInfo->Address3),\n 'city' => $this->fixEncoding((string) $order->ShippingInfo->City),\n 'postcode' => $postcode,\n 'region' => (string) $order->ShippingInfo->State,\n 'region_id' => $regionId,\n 'country_id' => (string) $order->ShippingInfo->Country,\n 'telephone' => (string) $order->ShippingInfo->PhoneNumber,\n 'should_ignore_validation' => true\n );\n } else {\n\n // set the billing address\n $billingAddressData = array(\n 'firstname' => $this->fixEncoding($this->getFirstName((string) $order->BillingInfo->Name)),\n 'lastname' => $this->fixEncoding($this->getLastName((string) $order->BillingInfo->Name)),\n 'email' => (string) $order->BillingInfo->Email,\n 'telephone' => ( (string) $order->BillingInfo->PhoneNumber == \"\" ?\n (string) $order->ShippingInfo->PhoneNumber :\n (string) $order->BillingInfo->PhoneNumber),\n 'street' => (string) $this->fixEncoding((string) $order->ShippingInfo->Address1 . \"\\n\"\n . (string) $order->ShippingInfo->Address2\n . \"\\n\" . (string) $order->ShippingInfo->Address3),\n 'city' => $this->fixEncoding((string) $order->ShippingInfo->City),\n 'postcode' => $postcode,\n 'region' => (string) $order->ShippingInfo->State,\n 'region_id' => $regionId,\n 'country_id' => (string) $order->ShippingInfo->Country,\n 'should_ignore_validation' => true\n );\n\n\n // add the billing address to the quote.\n $billingAddress = $quote->getBillingAddress()->addData($billingAddressData);\n\n echo \"<Info>Set Shipping Address</Info>\";\n\n // set the shipping address\n $shippingAddressData = array(\n 'firstname' => $this->fixEncoding($this->getFirstName((string) $order->ShippingInfo->RecipientName)),\n 'lastname' => $this->fixEncoding($this->getLastName((string) $order->ShippingInfo->RecipientName)),\n 'street' => (string) $this->fixEncoding((string) $order->ShippingInfo->Address1\n . \"\\n\" . (string) $order->ShippingInfo->Address2\n . \"\\n\" . (string) $order->ShippingInfo->Address3),\n 'city' => $this->fixEncoding((string) $order->ShippingInfo->City),\n 'postcode' => $postcode,\n 'region' => (string) $order->ShippingInfo->State,\n 'region_id' => $regionId,\n 'country_id' => (string) $order->ShippingInfo->Country,\n 'telephone' => (string) $order->ShippingInfo->PhoneNumber,\n 'should_ignore_validation' => true\n );\n }\n\n Mage::getSingleton('core/session')->setShippingPrice(\n $this->getDeTaxPrice((float) $order->ShippingInfo->ShippingPrice, (float) $order->ShippingInfo->ShippingTax) / $reverseRate );\n\n // add the shipping address to the quote.\n $shippingAddress = $quote->getShippingAddress()->addData($shippingAddressData);\n \n // add product(s)\n foreach ($order->OrderItems->Item as $orderitem) {\n $product = Mage::getModel('catalog/product')->loadByAttribute(\n (string) $dataArray->SkuAttribute, (string) $orderitem->SKU);\n\n // First check if this is a custom option\n if (!is_object($product)) {\n $skuparts = explode(\"-\", (string) $orderitem->SKU);\n\n if (count($skuparts) > 1) {\n $parentsku = $skuparts[0];\n\n $product = Mage::getModel('catalog/product')->loadByAttribute(\n (string) $dataArray->SkuAttribute, $parentsku);\n\n for ($i = 1; $i < count($skuparts); $i++) {\n $itemOptions[$parentsku][] = $skuparts[$i];\n }\n }\n }\n // ------------------------------------------------------\n\n if (is_object($product)) {\n\n $product->setPrice($this->getDeTaxPrice((float) $orderitem->Price, (float) $orderitem->Tax, $shippingAddress) / $reverseRate);\n\n $item = Mage::getModel('sales/quote_item');\n $item->setQuote($quote)->setProduct($product);\n $item->setData('qty', (string) $orderitem->Quantity);\n $item->setCustomPrice($this->getDeTaxPrice((float) $orderitem->Price, (float) $orderitem->Tax, $shippingAddress));\n $item->setOriginalCustomPrice($this->getDeTaxPrice((float) $orderitem->Price, (float) $orderitem->Tax, $shippingAddress));\n // $item->setQtyInvoiced((string) $orderitem->Quantity);\n\n $quote->addItem($item);\n\n $quote->save();\n $item->save();\n } else {\n echo \"<Info>Can't find SKU to add to quote \" . ((string) $orderitem->SKU)\n . \", trying to create stub</Info>\";\n\n $prodIdToLoad = 0;\n\n try {\n // Create stub if needed\n $this->createStubProduct((string) $orderitem->SKU, (string) $orderitem->Name, (string) $dataArray->WebsiteId, (string) $order->OrderId, (string) $orderitem->Price, (string) $orderitem->Quantity, (string) $dataArray->SkuAttribute);\n } catch (Exception $e) {\n echo \"<Info><![CDATA[Stub create error - \" . $e->getMessage() . \"]]></Info>\";\n\n if (strpos($e->getMessage(), \"Duplicate entry\")) {\n\n $msgParts = explode(\"Duplicate entry '\", $e->getMessage());\n\n if (isset($msgParts[1])) {\n\n $msgParts = $msgParts[1];\n $msgParts = explode(\"-\", $msgParts);\n $prodIdToLoad = $msgParts[0];\n }\n }\n }\n\n if ($prodIdToLoad > 0) {\n\n echo \"<Info>Load by ID $prodIdToLoad</Info>\";\n $product = Mage::getModel('catalog/product')->load($prodIdToLoad);\n } else {\n\n // Try once again to add our item to the quote\n $product = Mage::getModel('catalog/product')->loadByAttribute('sku', (string) $orderitem->SKU);\n }\n\n if (is_object($product)) {\n\n $product->setPrice($this->getDeTaxPrice((float) $orderitem->Price, (float) $orderitem->Tax, $shippingAddress) / $reverseRate);\n\n $item = Mage::getModel('sales/quote_item');\n $item->setQuote($quote)->setProduct($product);\n $item->setData('qty', (string) $orderitem->Quantity);\n $item->setCustomPrice($this->getDeTaxPrice((float) $orderitem->Price, (float) $orderitem->Tax, $shippingAddress));\n $item->setOriginalCustomPrice($this->getDeTaxPrice((float) $orderitem->Price, (float) $orderitem->Tax, $shippingAddress));\n // $item->setQtyInvoiced((string) $orderitem->Quantity);\n $quote->addItem($item);\n\n $quote->save();\n $item->save();\n } else {\n echo \"<Info>Can't find SKU to add to quote \" . ((string) $orderitem->SKU) . \"</Info>\";\n }\n }\n }\n\n $quote->getShippingAddress()->setData('should_ignore_validation', true);\n $quote->getBillingAddress()->setData('should_ignore_validation', true);\n /////////////////////////////////////////////\n $method = Mage::getModel('shipping/rate_result_method');\n $method->setCarrier('channelunitycustomrate');\n $method->setCarrierTitle('ChannelUnity Shipping');\n $method->setMethod('channelunitycustomrate');\n $method->setMethodTitle((string) $order->ShippingInfo->Service);\n\n $shipPrice = Mage::getSingleton('core/session')->getShippingPrice();\n\n $method->setPrice($shipPrice);\n $method->setCost($shipPrice);\n\n $rate = Mage::getModel('sales/quote_address_rate')\n ->importShippingRate($method);\n\n $shippingAddress->addShippingRate($rate);\n\n /////////////////////////////////////////////\n $shippingAddress->setShippingMethod('channelunitycustomrate_channelunitycustomrate');\n $shippingAddress->setShippingDescription((string) $order->ShippingInfo->Service);\n $shippingAddress->setPaymentMethod('channelunitypayment');\n\n $quote->getPayment()->importData(array(\n 'method' => 'channelunitypayment'\n ));\n $quote->collectTotals()->save();\n\n if (version_compare(Mage::getVersion(), \"1.4.0.0\", \">=\")) {\n $service = Mage::getModel('sales/service_quote', $quote);\n } else {\n $service = Mage::getModel('channelunity/ordercreatebackport', $quote);\n }\n\n $currentstore = Mage::app()->getStore()->getId();\n // upgrade to admin permissions to avoid item qty not available issue\n Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);\n\n $service->submitAll();\n $newOrder = $service->getOrder(); // returns full order object.\n // we're done; sign out of admin permission\n Mage::app()->setCurrentStore($currentstore);\n\n if (!is_object($newOrder)) {\n echo \"<NotImported>\" . ((string) $order->OrderId) . \"</NotImported>\";\n return;\n } else {\n echo \"<Imported>\" . ((string) $order->OrderId) . \"</Imported>\";\n }\n } catch (Exception $x) {\n echo \"<Exception><![CDATA[\" . $x->getMessage() . \" \" . $x->getTraceAsString() . \"]]></Exception>\";\n echo \"<NotImported>\" . ((string) $order->OrderId) . \"</NotImported>\";\n Mage::unregister('cu_order_in_progress');\n if (isset($newOrder) && is_object($newOrder)) {\n $newOrder->delete();\n }\n return;\n }\n\n $ordStatus = $this->CUOrderStatusToMagentoStatus((string) $order->OrderStatus);\n\n try {\n $newOrder->setData('state', $ordStatus);\n $newOrder->setStatus($ordStatus);\n $history = $newOrder->addStatusHistoryComment(\n 'Order imported from ChannelUnity', false);\n $history->setIsCustomerNotified(false);\n } catch (Exception $x1) {\n\n try {\n $newOrder->setState('closed', 'closed', 'Order imported from ChannelUnity', false);\n } catch (Exception $x2) {\n\n }\n }\n\n try {\n\n // This order will have been paid for, otherwise it won't\n // have imported\n\n $invoiceId = Mage::getModel('sales/order_invoice_api')\n ->create($newOrder->getIncrementId(), array());\n\n $invoice = Mage::getModel('sales/order_invoice')\n ->loadByIncrementId($invoiceId);\n\n /**\n * Pay invoice\n * i.e. the invoice state is now changed to 'Paid'\n */\n $invoice->capture()->save();\n Mage::dispatchEvent('sales_order_invoice_pay', array('invoice' => $invoice));\n\n $newOrder->setTotalPaid($newOrder->getGrandTotal());\n $newOrder->setBaseTotalPaid($newOrder->getBaseGrandTotal());\n\n /** Make a transaction to store CU info */\n $transaction = Mage::getModel('sales/order_payment_transaction');\n $transaction->setOrderPaymentObject($newOrder->getPayment());\n $transaction->setOrder($newOrder);\n $transaction->setTxnType('capture');\n $transaction->setTxnId((string) $order->OrderId);\n $transaction->setAdditionalInformation('SubscriptionId', (string) $dataArray->SubscriptionId);\n $transaction->setAdditionalInformation('RemoteOrderID', (string) $order->OrderId);\n $transaction->setAdditionalInformation('ShippingService', (string) $order->ShippingInfo->Service);\n\n $serviceType = (string) $order->ServiceSku;\n switch ($serviceType) {\n case \"CU_AMZ_UK\":\n $serviceType = \"Amazon.co.uk\";\n break;\n case \"CU_AMZ_COM\":\n $serviceType = \"Amazon.com\";\n break;\n case \"CU_AMZ_DE\":\n $serviceType = \"Amazon.de\";\n break;\n case \"CU_AMZ_FR\":\n $serviceType = \"Amazon.fr\";\n break;\n case \"CU_AMZ_CA\":\n $serviceType = \"Amazon.ca\";\n break;\n case \"CU_AMZ_IT\":\n $serviceType = \"Amazon.it\";\n break;\n case \"CU_AMZ_ES\":\n $serviceType = \"Amazon.es\";\n break;\n case \"CU_AMZ_JP\":\n $serviceType = \"Amazon.co.jp\";\n break;\n }\n\n $transaction->setAdditionalInformation('ServiceType', $serviceType);\n\n // get order flags so we know whether it's an FBA order\n if (isset($order->OrderFlags) && ( ((string) $order->OrderFlags) == \"AMAZON_FBA\")) {\n\n $transaction->setAdditionalInformation('AmazonFBA', 'Yes');\n // Can't set 'complete' state manually - ideally import tracking info and create shipment in Mage\n\n\n $newOrder->setData('state', 'complete');\n $newOrder->setStatus('complete');\n $history = $newOrder->addStatusHistoryComment('Order was fulfilled by Amazon', false);\n $history->setIsCustomerNotified(false);\n }\n $transaction->save();\n\n /** Add gift message */\n if (isset($order->ShippingInfo->GiftMessage)) {\n\n $message = Mage::getModel('giftmessage/message');\n\n $message->setMessage($order->ShippingInfo->GiftMessage);\n $message->save();\n\n $gift_message_id = $message->getId();\n\n $newOrder->setData('gift_message_id', $gift_message_id);\n }\n\n $newOrder->setCreatedAt((string) $order->PurchaseDate);\n\n //================ Add custom options where applicable ============\n $allItems = $newOrder->getAllItems();\n foreach ($allItems as $item) {\n if (isset($itemOptions[$item->getSku()])) {\n $optionsToAdd = $itemOptions[$item->getSku()];\n\n $optionArray = array();\n\n foreach ($optionsToAdd as $customSkuToAdd) {\n $productTemp = Mage::getModel('catalog/product')->load($item->getProductId());\n\n $tempOption = $productTemp->getOptions();\n foreach ($tempOption as $option) {\n $temp = $option->getData();\n\n $values = $option->getValues();\n if (count($values) > 0) {\n foreach ($values as $value) {\n\n if ($value[\"sku\"] == $customSkuToAdd) {\n\n echo \"<Info>Add custom option: $customSkuToAdd</Info>\";\n\n $optionArray[count($optionArray)]\n = array(\n 'label' => $temp[\"default_title\"],\n 'value' => $value[\"title\"],\n 'print_value' => $value[\"title\"],\n 'option_type' => 'radio',\n 'custom_view' => false,\n 'option_id' => $temp[\"option_id\"],\n 'option_value' => $value->getId()\n );\n }\n }\n }\n }\n }\n\n $item->setProductOptions(array('options' => $optionArray\n ));\n\n $item->save();\n }\n }\n $newOrder->save();\n } catch (Exception $e) {\n if (is_object($newOrder)) {\n $newOrder->delete();\n }\n }\n\n Mage::unregister('cu_order_in_progress');\n }", "title": "" }, { "docid": "de21264864f3809449148094831a50a7", "score": "0.56226385", "text": "public function process_pre_order_payment( $order ) {\n\n\t\t// set order defaults\n\t\t$order = $this->get_order( $order->id );\n\n\t\t// get order total\n\t\t$order->payment_total = number_format( $order->get_total(), 2, '.', '' );\n\n\t\t// order description\n\t\t$order->description = apply_filters( 'wc_authorize_net_cim_transaction_description', sprintf( __( '%s - Pre-Order Release Payment for Order %s', WC_Authorize_Net_CIM::TEXT_DOMAIN ), esc_html( get_bloginfo( 'name' ) ), $order->get_order_number() ), $order->id, $this );\n\n\t\t// get customer profile ID\n\t\t$order->customer_profile_id = get_post_meta( $order->id, '_wc_authorize_net_cim_customer_profile_id', true );\n\n\t\t// get customer payment profile ID that was used to auth the pre-order\n\t\t$order->customer_payment_profile_id = get_post_meta( $order->id, '_wc_authorize_net_cim_payment_profile_id', true );\n\n\t\ttry {\n\n\t\t\t// customer profile ID and custom payment profile ID are required\n\t\t\tif ( ! $order->customer_profile_id || ! $order->customer_payment_profile_id ) {\n\t\t\t\tthrow new Exception( __( 'Pre-Order Release: Customer or Payment Profile is missing.', WC_Authorize_Net_CIM::TEXT_DOMAIN ) );\n\t\t\t}\n\n\t\t\t$response = $this->get_api()->create_new_transaction( $order );\n\n\t\t\t$this->log_api();\n\n\t\t\t// success! update order record\n\t\t\tif ( $response->transaction_was_successful() ) {\n\n\t\t\t\t// add order note\n\t\t\t\t$order->add_order_note( sprintf( __( 'Authorize.net Pre-Order Release Payment Approved (Transaction ID: %s) ', WC_Authorize_Net_CIM::TEXT_DOMAIN ), $response->get_transaction_id() ) );\n\n\t\t\t\t// complete the order\n\t\t\t\t$order->payment_complete();\n\n\t\t\t} else {\n\n\t\t\t\t// failure\n\t\t\t\tthrow new Exception( $response->get_transaction_failure_message() );\n\t\t\t}\n\n\t\t} catch ( Exception $e ) {\n\n\t\t\t// Mark order as failed\n\t\t\t$message = sprintf( __( 'Authorize.net Pre-Order Release Payment Failed (Result: %s)', WC_Authorize_Net_CIM::TEXT_DOMAIN ), $e->getMessage() );\n\n\t\t\tif ( $order->status != 'failed' ) {\n\t\t\t\t$order->update_status( 'failed', $message );\n\t\t\t} else {\n\t\t\t\t$order->add_order_note( $message );\n\t\t\t}\n\n\t\t\t$this->add_debug_message( $e->getMessage(), 'error' );\n\t\t}\n\t}", "title": "" }, { "docid": "72e47500b9cf223ca0458bda8bbedb16", "score": "0.56129634", "text": "private function createNewOrder()\n\t{\n\t\t// --------------------------------\n\t\t$current_uri = Tools::getShopProtocol().$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'];\n\t\t$current_uri .= '?controller='.$this->context->controller->controller_name;\n\t\t$current_uri .= '&order_session=%%session%%';\n\t\t$current_token = '&token='.Tools::getAdminTokenLite($this->context->controller->controller_name);\n\n\t\t$order_session = null;\n\t\t$parameters = array(\n\t\t\t'application_id' => $this->session_api->application_id,\n\t\t\t'cart_source' => 'Prestashop',\n\t\t\t'account_email' => Configuration::get('PS_SHOP_EMAIL'),\n\t\t\t'country_iso' => $this->context->language->iso_code,\n\t\t\t'back_url_success' => $current_uri.'&success'.$current_token,\n\t\t\t'back_url_error' => $current_uri.'&error'.$current_token\n\t\t);\n\n\t\t// account_id can be different for email, sms or fax\n\t\t// -------------------------------------------------\n\t\t$product = (string)Tools::getValue('product');\n\n\t\tif (Tools::strpos($product, 'fax-') !== false)\n\t\t{\n\t\t\tif ($this->session_api->connectFromCredentials('fax'))\n\t\t\t\t$parameters['account_id'] = $this->session_api->account_id;\n\t\t}\n\t\telseif (Tools::strpos($product, 'sms-') !== false)\n\t\t{\n\t\t\tif ($this->session_api->connectFromCredentials('sms'))\n\t\t\t\t$parameters['account_id'] = $this->session_api->account_id;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($this->session_api->connectFromCredentials('email'))\n\t\t\t\t$parameters['account_id'] = $this->session_api->account_id;\n\t\t}\n\n\t\t// Create the order\n\t\t// ----------------\n\t\tif ($this->session_api->callExternal('http://www.express-mailing.com/api/cart/ws.php',\n\t\t\t\t\t\t\t\t\t\t\t'common', 'order', 'initialize', $parameters, $order_session))\n\t\t\t$this->order_session = $order_session;\n\t\telse\n\t\t{\n\t\t\t$this->errors[] = sprintf($this->module->l('Unable to create a cart : %s'), $this->session_api->getError());\n\t\t\treturn false;\n\t\t}\n\n\t\t// Store the order_session into local database\n\t\t// -------------------------------------------\n\t\tDb::getInstance()->insert('expressmailing_order_cart', array(\n\t\t\t'order_session' => pSQL($this->order_session),\n\t\t\t'order_product' => pSQL($this->order_product),\n\t\t\t'campaign_media' => pSQL($this->media),\n\t\t\t'campaign_id' => (int)$this->campaign_id\n\t\t));\n\n\t\t// Add the product into the cart\n\t\t// -----------------------------\n\t\t$response_array = array();\n\t\t$parameters = array(\n\t\t\t'order_session' => $this->order_session,\n\t\t\t'product_ref' => $this->order_product,\n\t\t\t'product_quantity' => 1\n\t\t);\n\n\t\tif ($this->session_api->callExternal('http://www.express-mailing.com/api/cart/ws.php',\n\t\t\t\t\t\t\t\t\t\t\t'common', 'order', 'add', $parameters, $response_array))\n\t\t{\n\t\t\t$this->context->smarty->assign('cart', $response_array);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->errors[] = sprintf($this->module->l('Unable to create a cart : %s'), $this->session_api->getError());\n\t\t\treturn false;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "90989101c192834a99820c59ecbfc2fa", "score": "0.5602722", "text": "function create_order($order_id, $checkout)\n {\n if (!isset(WC()->cart->deposit_info['deposit_enabled']) || WC()->cart->deposit_info['deposit_enabled'] !== true) {\n //return null;\n\t\t\t//\n }\n\n $data = $checkout->get_posted_data();\n\t\t\n\t\t\n try {\n $order_id = absint(WC()->session->get('order_awaiting_payment'));\n $cart_hash = WC()->cart->get_cart_hash();\n $available_gateways = WC()->payment_gateways->get_available_payment_gateways();\n\n $order = $order_id ? wc_get_order($order_id) : null;\n\t\t\t\n\t\t\t\n /**\n * If there is an order pending payment, we can resume it here so\n * long as it has not changed. If the order has changed, i.e.\n * different items or cost, create a new order. We use a hash to\n * detect changes which is based on cart items + order total.\n */\n if ($order && $order->has_cart_hash($cart_hash) && $order->has_status(array('pending', 'failed'))) {\n // Action for 3rd parties.\n do_action('woocommerce_resume_order', $order_id);\n\n // Remove all items - we will re-add them later.\n $order->remove_order_items();\n } else {\n $order = new WC_Order();\n }\n\t\t\t\n\n $fields_prefix = array(\n 'shipping' => true,\n 'billing' => true,\n );\n\n $shipping_fields = array(\n 'shipping_method' => true,\n 'shipping_total' => true,\n 'shipping_tax' => true,\n );\n\n foreach ($data as $key => $value) {\n\n\n if (is_callable(array($order, \"set_{$key}\"))) {\n $order->{\"set_{$key}\"}($value);\n // Store custom fields prefixed with wither shipping_ or billing_. This is for backwards compatibility with 2.6.x.\n } elseif (isset($fields_prefix[current(explode('_', $key))])) {\n if (!isset($shipping_fields[$key])) {\n\n\n $order->update_meta_data('_' . $key, $value);\n }\n }\n }\n\t\t\t\n $user_agent = wc_get_user_agent();\n\n $order->set_created_via('checkout');\n $order->set_cart_hash($cart_hash);\n $order->set_customer_id(apply_filters('woocommerce_checkout_customer_id', get_current_user_id()));\n $order_vat_exempt = WC()->cart->get_customer()->get_is_vat_exempt() ? 'yes' : 'no';\n $order->add_meta_data('is_vat_exempt', $order_vat_exempt);\n $order->set_currency(get_woocommerce_currency());\n $order->set_prices_include_tax('yes' === get_option('woocommerce_prices_include_tax'));\n $order->set_customer_ip_address(WC_Geolocation::get_ip_address());\n $order->set_customer_user_agent($user_agent);\n $order->set_customer_note(isset($data['order_comments']) ? $data['order_comments'] : '');\n $order->set_payment_method('');\n $order->set_shipping_total(WC()->cart->get_shipping_total());\n $order->set_discount_total(WC()->cart->get_discount_total());\n $order->set_discount_tax(WC()->cart->get_discount_tax());\n $order->set_cart_tax(WC()->cart->get_cart_contents_tax() + WC()->cart->get_fee_tax());\n $order->set_shipping_tax(WC()->cart->get_shipping_tax());\n $order->set_total(WC()->cart->get_total('edit'));\n $checkout->create_order_line_items($order, WC()->cart);\n $checkout->create_order_fee_lines($order, WC()->cart);\n $checkout->create_order_shipping_lines($order, WC()->session->get('chosen_shipping_methods'), WC()->shipping()->get_packages());\n $checkout->create_order_tax_lines($order, WC()->cart);\n $checkout->create_order_coupon_lines($order, WC()->cart);\n\n\n\t\t\t\n /**\n * Action hook to adjust order before save.\n *\n * @since 3.0.0\n */\n do_action('woocommerce_checkout_create_order', $order, $data);\n\n // Save the order.\n $order_id = $order->save();\n\n do_action('woocommerce_checkout_update_order_meta', $order_id, $data);\n\n\n //create all payments\n $order->read_meta_data();\n $payment_schedule = $order->get_meta('_wc_deposits_payment_schedule');\n\n\t\t\t\n $deposit_id = null;\n foreach ($payment_schedule as $partial_key => $payment) {\n\n $partial_payment = new Reservation_Payment(); \n\n\t\t\t\t\n $partial_payment->set_customer_id(apply_filters('woocommerce_checkout_customer_id', get_current_user_id()));\n\n $amount = $payment['total'];\n\n\n //allow partial payments to be inserted only as a single fee without item details\n $name = esc_html__('Partial Payment for order %s', 'woocommerce-deposits');\n $partial_payment_name = apply_filters('wc_deposits_partial_payment_name', sprintf($name, $order->get_order_number()), $payment, $order->get_id());\n\n\n $item = new WC_Order_Item_Fee(); \n\n\n $item->set_props(\n array(\n 'total' => $amount\n )\n );\n\n $item->set_name($partial_payment_name);\n $partial_payment->add_item($item);\n\n\n $partial_payment->set_parent_id($order->get_id());\n $partial_payment->add_meta_data('is_vat_exempt', $order_vat_exempt);\n $partial_payment->add_meta_data('_wc_deposits_payment_type', $payment['type']);\n\n if (is_numeric($partial_key)) {\n $partial_payment->add_meta_data('_wc_deposits_partial_payment_date', $partial_key);\n }\n $partial_payment->set_currency(get_woocommerce_currency());\n $partial_payment->set_prices_include_tax('yes' === get_option('woocommerce_prices_include_tax'));\n $partial_payment->set_customer_ip_address(WC_Geolocation::get_ip_address());\n $partial_payment->set_customer_user_agent($user_agent);\n\n $partial_payment->set_total($amount);\n\t\t\t\t\n\t\t\t\t\n $partial_payment->save();\n\t\t\t\t\n\t\t\t\t\n\n $payment_schedule[$partial_key]['id'] = $partial_payment->get_id();\n\n\n if ($payment['type'] === 'deposit') {\n\n //we need to save to generate id first\n $partial_payment->save();\n\n $deposit_id = $partial_payment->get_id();\n $partial_payment->set_payment_method(isset($available_gateways[$data['payment_method']]) ? $available_gateways[$data['payment_method']] : $data['payment_method']);\n\n\n $partial_payment->save();\n\n }\n\n }\n\n //update the schedule meta of parent order\n $order->update_meta_data('_wc_deposits_payment_schedule', $payment_schedule);\n $order->save();\n\n return absint($deposit_id);\n\n } catch (Exception $e) {\n return new WP_Error('checkout-error', $e->getMessage());\n }\n\t\t\n\t\t\n\t\t\n }", "title": "" }, { "docid": "833ef80e54239333c2ef35b16784691a", "score": "0.5506645", "text": "protected function create_transaction() {\n\n\t\tparent::create_transaction();\n\n\t\t$customer_code = preg_replace( '/[^a-zA-Z0-9]/', '', $this->get_order()->get_order_number() );\n\t\t$customer_code = Framework\\SV_WC_Helper::str_truncate( $customer_code, 17, '' );\n\n\t\t// even though Elavon says this is optional, apparently it's secretly required, so keep this\n\t\t$this->request_data['ssl_customer_code'] = $customer_code;\n\n\t\t// add card details when the card is not saved\n\t\tif ( ! isset( $this->request_data['ssl_token'] ) ) {\n\t\t\t$this->request_data['ssl_card_number'] = $this->get_order()->payment->account_number;\n\t\t\t$this->request_data['ssl_exp_date'] = $this->get_order()->payment->exp_month . $this->get_order()->payment->exp_year;\n\t\t}\n\n\t\t// add the CSC number, if available\n\t\tif ( isset( $this->get_order()->payment->csc ) ) {\n\t\t\t$this->request_data['ssl_cvv2cvc2_indicator'] = '1';\n\t\t\t$this->request_data['ssl_cvv2cvc2'] = $this->get_order()->payment->csc;\n\t\t} else {\n\t\t\t$this->request_data['ssl_cvv2cvc2_indicator'] = '0';\n\t\t}\n\n\t\t// if enabled, add the order currency for multi-currency conversion\n\t\tif ( $this->get_gateway()->is_multi_currency_required() ) {\n\t\t\t$this->request_data['ssl_transaction_currency'] = $this->get_order()->get_currency();\n\t\t}\n\t}", "title": "" }, { "docid": "c2e2da59475838d271dc620d2c511169", "score": "0.54985493", "text": "function commerce_license_billing_rules_create_recurring_order($order) {\n commerce_license_billing_create_recurring_order($order);\n}", "title": "" }, { "docid": "91319b4c79126479c3335bf4fac79b3c", "score": "0.5425312", "text": "public function store(Request $request)\n {\n try{\n\n\n $stripe = new Stripe('sk_test_vk7td2JDHQGbT7IoEvBhnuwW00QUAfPTTS');\n $charge = $stripe->charges()->create([\n\n 'amount' => Cart::total(),\n 'currency' => 'USD',\n 'source' => $request->stripeToken,\n 'description' => 'Order',\n 'receipt_email' => $request->email,\n 'metadata' =>[]\n ]);\n\n \n\n if ($charge) {\n\n $payment = new Payment;\n $payment->id = $charge['id'];\n $payment->amount = $charge['amount'] / 100;\n $payment->postal_code = $charge['billing_details']['address']['postal_code'];\n $payment->currency = $charge['currency'];\n $payment->payment_method = $charge['payment_method'];\n $payment->receipt_email = $charge['receipt_email'];\n $payment->receipt_url = $charge['receipt_url'];\n $payment->status = $charge['status'];\n\n if ($payment->save()) {\n \n $this->customer = auth()->guard('customer')->user();\n $this->user = auth()->user();\n\n $order = new Order;\n $order->customer_id = $this->customer->id;\n $order->user_id = $this->user->id;\n $order->deliver_id = 1;\n $order->payment_id = $payment->id;\n $order->status_id = 1;\n $order->coupon_id = 1;\n $order->transaction_date = date('d-m-y');\n\n if ($order->save()) {\n \n foreach (Cart::content() as $key => $cart) {\n \n $iteam = new OrderItem;\n $iteam->order_id = $order->id;\n $iteam->product_id = $cart->id;\n $iteam->color_id = 1;\n $iteam->price = $cart->price;\n $iteam->qty = $cart->qty;\n $iteam->amount = $cart->total;\n $iteam->save();\n }\n\n $request->merge([\n 'customer_id' => $this->customer->id,\n 'order_id' => $order->id\n ]);\n\n if (ShippingAddress::create($request->all())) {\n\n Cart::destroy();\n\n }\n\n }\n \n return redirect()->route('thank');\n\n }\n\n }\n\n\n\n\n } catch( Exeption $e){\n echo \"error\";\n }\n\n \n }", "title": "" }, { "docid": "838ba9329a27a16ab83cb2875ffb14c8", "score": "0.5393889", "text": "private function paymentTransaction($order) {\n\n $transaction = commerce_payment_transaction_new('commerce_stripe', $order->order_id);\n $payment_method = commerce_payment_method_instance_load('commerce_stripe|commerce_payment_commerce_stripe');\n $strip_token = Utils::getStripeToken()->verify(get_class());\n\n $charge = $order->commerce_order_total['und'][0];\n if (!commerce_stripe_load_library()) {\n drupal_set_message(t('Error capturing payment. Please contact shop admin to proceed.'), 'error');\n }\n\n $c = array(\n 'amount' => $charge['amount'],\n 'currency' => $charge['currency_code'],\n 'card' => $strip_token,\n 'capture' => TRUE,\n 'description' => t('Order Number: @order_number', array('@order_number' => $order->order_number)),\n );\n\n \\Stripe\\Stripe::setApiKey($payment_method['settings']['secret_key']);\n\n try {\n if ($charge['amount'] > 0) {\n $response = \\Stripe\\Charge::create($c);\n $transaction->remote_id = $response->id;\n $transaction->payload[REQUEST_TIME] = $response->__toJSON();\n $transaction->remote_status = 'AUTH_CAPTURE';\n $transaction->message = t('Payment authorized only successfully.');\n $transaction->message .= '<br />' . t('Captured: @date', array('@date' => format_date(REQUEST_TIME, 'short')));\n $transaction->message .= '<br />' . t('Captured Amount: @amount', array('@amount' => $charge['amount']/100));\n $transaction->status = COMMERCE_PAYMENT_STATUS_SUCCESS;\n $transaction->amount = $charge['amount'];\n $transaction->currency_code = $charge['currency_code'];\n sleep(5);\n commerce_payment_transaction_save($transaction);\n commerce_payment_commerce_payment_transaction_insert($transaction);\n }\n }\n catch(Exception $e) {\n drupal_set_message(t('We received the following error when trying to capture the transaction.'), 'error');\n drupal_set_message(check_plain($e->getMessage()), 'error');\n $transaction->payload[REQUEST_TIME] = $e->json_body;\n $transaction->message = t('Capture processing error: @stripe_error', array('@stripe_error' => $e->getMessage()));\n $transaction->status = COMMERCE_PAYMENT_STATUS_FAILURE;\n $transaction->remote_status='FAILED';\n commerce_payment_transaction_save($transaction);\n }\n\n if($charge['amount'] == 0) {\n $user = user_load($order->uid);\n $transaction->instance_id = $payment_method['instance_id'];\n $transaction->amount = $charge['amount'];\n $transaction->currency_code = $charge['currency_code'];\n $transaction->status = COMMERCE_PAYMENT_STATUS_SUCCESS;\n $transaction->message = '@name';\n $transaction->message_variables = array('@name' => 'Payment authorized only successfully');\n commerce_payment_transaction_save($transaction);\n commerce_payment_commerce_payment_transaction_insert($transaction);\n }\n\n if(module_exists('commerce_cardonfile')) {\n $strip_token = Utils::getStripeToken()->verify(get_class());\n $card = _commerce_stripe_create_card($strip_token, $order->uid, $payment_method);\n $remote_id = (string) $card->customer . '|' . (string) $card->id;\n\n $card_data = commerce_cardonfile_new();\n $card_data->uid = $order->uid;\n $card_data->order_id = $order->order_id;\n $card_data->payment_method = $payment_method['method_id'];\n $card_data->instance_id = $payment_method['instance_id'];\n $card_data->remote_id = $remote_id;\n $card_data->card_type = 'Visa';\n $card_data->card_name = $user->name;\n $card_data->card_number = '1111';\n $card_data->card_exp_month = 5;\n $card_data->card_exp_year = 2018;\n $card_data->status = 1;\n $card_data->instance_default = 1;\n commerce_cardonfile_save($card_data);\n }\n }", "title": "" }, { "docid": "0562a7aa0ccdb76020a77a3bee6f477f", "score": "0.5389751", "text": "function dokan_create_seller_order( $parent_order, $seller_id, $seller_products ) {\n $order_data = apply_filters( 'woocommerce_new_order_data', array(\n 'post_type' => 'shop_order',\n 'post_title' => sprintf( __( 'Order &ndash; %s', 'woocommerce' ), strftime( _x( '%b %d, %Y @ %I:%M %p', 'Order date parsed by strftime', 'woocommerce' ) ) ),\n 'post_status' => 'publish',\n 'ping_status' => 'closed',\n 'post_excerpt' => isset( $posted['order_comments'] ) ? $posted['order_comments'] : '',\n 'post_author' => $seller_id,\n 'post_parent' => $parent_order->id,\n 'post_password' => uniqid( 'order_' ) // Protects the post just in case\n ) );\n\n $order_id = wp_insert_post( $order_data );\n\n if ( $order_id && !is_wp_error( $order_id ) ) {\n\n $order_total = $order_tax = 0;\n $product_ids = array();\n\n // now insert line items\n foreach ($seller_products as $item) {\n $order_total += (float) $item['line_total'];\n $order_tax += (float) $item['line_tax'];\n $product_ids[] = $item['product_id'];\n\n $item_id = wc_add_order_item( $order_id, array(\n 'order_item_name' => $item['name'],\n 'order_item_type' => 'line_item'\n ) );\n\n if ( $item_id ) {\n wc_add_order_item_meta( $item_id, '_qty', $item['qty'] );\n wc_add_order_item_meta( $item_id, '_tax_class', $item['tax_class'] );\n wc_add_order_item_meta( $item_id, '_product_id', $item['product_id'] );\n wc_add_order_item_meta( $item_id, '_variation_id', $item['variation_id'] );\n wc_add_order_item_meta( $item_id, '_line_subtotal', $item['line_subtotal'] );\n wc_add_order_item_meta( $item_id, '_line_total', $item['line_total'] );\n wc_add_order_item_meta( $item_id, '_line_tax', $item['line_tax'] );\n wc_add_order_item_meta( $item_id, '_line_subtotal_tax', $item['line_subtotal_tax'] );\n }\n } // foreach\n\n $bill_ship = array(\n '_billing_country', '_billing_first_name', '_billing_last_name', '_billing_company',\n '_billing_address_1', '_billing_address_2', '_billing_city', '_billing_state', '_billing_postcode',\n '_billing_email', '_billing_phone', '_shipping_country', '_shipping_first_name', '_shipping_last_name',\n '_shipping_company', '_shipping_address_1', '_shipping_address_2', '_shipping_city',\n '_shipping_state', '_shipping_postcode'\n );\n\n // save billing and shipping address\n foreach ($bill_ship as $val) {\n $order_key = ltrim( $val, '_' );\n update_post_meta( $order_id, $val, $parent_order->$order_key );\n }\n\n // do shipping\n $shipping_cost = dokan_create_sub_order_shipping( $parent_order, $order_id, $seller_products );\n\n // add coupons if any\n dokan_create_sub_order_coupon( $parent_order, $order_id, $product_ids );\n $discount = dokan_sub_order_get_total_coupon( $order_id );\n\n // calculate the total\n $order_in_total = $order_total + $shipping_cost + $order_tax - $discount;\n\n // set order meta\n update_post_meta( $order_id, '_payment_method', $parent_order->payment_method );\n update_post_meta( $order_id, '_payment_method_title', $parent_order->payment_method_title );\n\n update_post_meta( $order_id, '_order_shipping', woocommerce_format_decimal( $shipping_cost ) );\n update_post_meta( $order_id, '_order_discount', woocommerce_format_decimal( $discount ) );\n update_post_meta( $order_id, '_cart_discount', '0' );\n update_post_meta( $order_id, '_order_tax', woocommerce_format_decimal( $order_tax ) );\n update_post_meta( $order_id, '_order_shipping_tax', '0' );\n update_post_meta( $order_id, '_order_total', woocommerce_format_decimal( $order_in_total ) );\n update_post_meta( $order_id, '_order_key', apply_filters('woocommerce_generate_order_key', uniqid('order_') ) );\n update_post_meta( $order_id, '_customer_user', $parent_order->customer_user );\n update_post_meta( $order_id, '_order_currency', get_post_meta( $parent_order->id, '_order_currency', true ) );\n update_post_meta( $order_id, '_prices_include_tax', $parent_order->prices_include_tax );\n update_post_meta( $order_id, '_customer_ip_address', get_post_meta( $parent_order->id, '_customer_ip_address', true ) );\n update_post_meta( $order_id, '_customer_user_agent', get_post_meta( $parent_order->id, '_customer_user_agent', true ) );\n\n do_action( 'dokan_checkout_update_order_meta', $order_id );\n\n // Order status\n wp_set_object_terms( $order_id, 'pending', 'shop_order_status' );\n } // if order\n}", "title": "" }, { "docid": "fed71e2ea441e1a4b70a1cae70bea0ad", "score": "0.53729486", "text": "protected function processPurchaseOrder(Request $request) {\n // save all information as new record with new uuid\n }", "title": "" }, { "docid": "fed71e2ea441e1a4b70a1cae70bea0ad", "score": "0.53729486", "text": "protected function processPurchaseOrder(Request $request) {\n // save all information as new record with new uuid\n }", "title": "" }, { "docid": "2af30383029085047c72227fda5bfab8", "score": "0.5352772", "text": "function before_process() {\n global $order, $db, $messageStack;\n\t// if the card number has the blanked out middle number fields, it has been processed, the message that \n\t// the charges were not processed were set in pre_confirmation_check, just return to continue without processing.\n\tif (strpos($this->field_1, '*') !== false) return false;\n\n $order->info['cc_expires'] = $this->field_2 . substr($this->field_3, -2);\n $order->info['cc_owner'] = $this->field_0;\n\t$this->cc_card_owner = $this->field_0;\n $order->info['cc_cvv'] = $this->field_4;\n // Create a string that contains a listing of products ordered for the description field\n $description = $order->description;\n // Populate an array that contains all of the data to be sent to Nova (their xml string is one level)\n $submit_data = array(\n\t\t'ssl_transaction_type' => ((MODULE_PAYMENT_NOVA_XML_AUTHORIZATION_TYPE == 'Authorize') ? 'CCAUTHONLY' : 'CCSALE'),\n\t\t'ssl_merchant_id' => MODULE_PAYMENT_NOVA_XML_MERCHANT_ID, \n\t\t'ssl_pin' => MODULE_PAYMENT_NOVA_XML_PIN, \n\t\t'ssl_user_id' => MODULE_PAYMENT_NOVA_XML_USER_ID, \n\t\t'ssl_amount' => $order->total_amount,\n\t\t'ssl_salestax' => ($order->sales_tax) ? $order->sales_tax : 0,\n\t\t'ssl_card_number' => preg_replace('/ /', '', $this->field_1),\n\t\t'ssl_exp_date' => $order->info['cc_expires'],\n\t\t'ssl_cvv2cvc2_indicator' => $this->field_4 ? '1' : '9', // if cvv2 exists, present else not present\n\t\t'ssl_cvv2cvc2' => $this->field_4 ? $this->field_4 : '',\n\t\t'ssl_description' => $description,\n\t\t'ssl_invoice_number' => (MODULE_PAYMENT_NOVA_XML_TESTMODE == 'Test' ? 'TEST-' : '') . $order->purchase_invoice_id,\n 'ssl_customer_code' => str_replace('&', '-', $order->bill_short_name),\n\t\t'ssl_company' => str_replace('&', '-', $order->bill_primary_name),\n\t\t'ssl_first_name' => $order->bill_first_name, // passed with credit card form\n\t\t'ssl_last_name' => $order->bill_last_name, // passed with credit card form\n\t\t'ssl_avs_address' => str_replace('&', '-', substr($order->bill_address1, 0, 20)), // maximum of 20 characters per spec\n\t\t'ssl_address2' => str_replace('&', '-', substr($order->bill_address2, 0, 20)),\n\t\t'ssl_city' => $order->bill_city_town,\n\t\t'ssl_state' => $order->bill_state_province,\n\t\t'ssl_avs_zip' => preg_replace(\"/[^A-Za-z0-9]/\", \"\", $order->bill_postal_code),\n\t\t'ssl_country' => $order->bill_country_code,\n\t\t'ssl_phone' => $order->bill_telephone1,\n\t\t'ssl_email' => $order->bill_email ? $order->bill_email : COMPANY_EMAIL,\n\t\t'ssl_ship_to_company' => $order->ship_primary_name,\n\t\t'ssl_ship_to_first_name' => $order->ship_first_name,\n\t\t'ssl_ship_to_last_name' => $order->ship_last_name,\n\t\t'ssl_ship_to_address1' => $order->ship_address1,\n\t\t'ssl_ship_to_address2' => $order->ship_address2,\n\t\t'ssl_ship_to_city' => $order->ship_city_town,\n\t\t'ssl_ship_to_state' => $order->ship_state_province,\n\t\t'ssl_ship_to_zip' => preg_replace(\"/[^A-Za-z0-9]/\", \"\", $order->ship_postal_code),\n\t\t'ssl_ship_to_country' => $order->ship_country_code,\n\t\t'ssl_ship_to_phone' => $order->ship_telephone,\n/* The following are not used at this time\n\t\t'ssl_email_header' => 'Not Used',\n\t\t'ssl_email_apprvl_header_html => 'Not Used',\n\t\t'ssl_email_decl_header_html => 'Not Used',\n\t\t'ssl_email_footer => 'Not Used',\n\t\t'ssl_email_apprvl_footer_html => 'Not Used',\n\t\t'ssl_email_decl_footer_html => 'Not Used',\n\t\t'ssl_do_customer_email => 'FALSE', // set up in admin on Virtual Merchant website\n\t\t'ssl_do_merchant_email => 'FALSE', // set up in admin on Virtual Merchant website\n\t\t'ssl_merchant_email' => COMPANY_EMAIL,\n\t\t'ssl_header_color' => '',\n\t\t'ssl_text_color' => '',\n\t\t'ssl_background_color' => '',\n\t\t'ssl_table_color' => '',\n\t\t'ssl_link_color' => '',\n*/\n\t\t'ssl_show_form' => 'FALSE',\n/* The following are ignored when ssl_show_form = FALSE\n\t\t'ssl_header_html' => 'Not Used', // set up in admin on Virtual Merchant website\n\t\t'ssl_footer_html' => 'Not Used', // set up in admin on Virtual Merchant website\n*/\n\t\t'ssl_result_format' => 'ASCII'\n/* The following are ignored when ssl_result_format = ASCII\n\t\t'ssl_receipt_header_html' => 'Not Used', \t\t// set up in admin on Virtual Merchant website\n\t\t'ssl_receipt_apprvl_header_html' => 'Not Used', // set up in admin on Virtual Merchant website\n\t\t'ssl_receipt_decl_header_html' => 'Not Used', // set up in admin on Virtual Merchant website\n\t\t'ssl_receipt_footer_html' => 'Not Used', \t\t// set up in admin on Virtual Merchant website\n\t\t'ssl_receipt_apprvl_footer_html' => 'Not Used', // set up in admin on Virtual Merchant website\n\t\t'ssl_receipt_decl_footer_html' => 'Not Used', // set up in admin on Virtual Merchant website\n\t\t'ssl_receipt_link_method' => 'Not Used', // set up in admin on Virtual Merchant website\n\t\t'ssl_receipt_apprvl_method' => 'Not Used', // set up in admin on Virtual Merchant website\n\t\t'ssl_receipt_decl_method' => 'Not Used', // set up in admin on Virtual Merchant website\n\t\t'ssl_receipt_link_url' => 'Not Used', // set up in admin on Virtual Merchant website\n\t\t'ssl_receipt_apprvl_post_url' => 'Not Used', // set up in admin on Virtual Merchant website\n\t\t'ssl_receipt_decl_post_url' => 'Not Used', // set up in admin on Virtual Merchant website\n\t\t'ssl_receipt_apprvl_get_url' => 'Not Used', // set up in admin on Virtual Merchant website\n\t\t'ssl_receipt_decl_get_url' => 'Not Used', // set up in admin on Virtual Merchant website\n\t\t'ssl_error_url' => 'Not Used', // set up in admin on Virtual Merchant website\n\t\t'ssl_receipt_link_text' => 'Not Used', // set up in admin on Virtual Merchant website\n\t\t'ssl_receipt_apprvl_text' => 'Not Used', // set up in admin on Virtual Merchant website\n\t\t'ssl_receipt_decl_text' => 'Not Used', // set up in admin on Virtual Merchant website\n*/\n );\n\n if (MODULE_PAYMENT_NOVA_XML_TESTMODE == 'Test') {\n $submit_data['ssl_test_mode'] = 'TRUE';\n }\n\n // concatenate the submission data and put into $data variable\n\t$data = '?xmldata=<txn>'; // initiate XML string\n while(list($key, $value) = each($submit_data)) {\n if ($value <> '') $data .= '<' . urlencode($key) . '>' . urlencode($value) . '</' . urlencode($key) . '>';\n }\n\t$data .= '</txn>'; // terminate XML string\n\n // SEND DATA BY CURL SECTION\n // Post order info data to Nova, make sure you have cURL support installed\n//echo 'sending data = '.$data.'<br>';\n\t$url = 'https://www.myvirtualmerchant.com/VirtualMerchant/processxml.do' . $data;\n $ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\tcurl_setopt($ch, CURLOPT_TIMEOUT, 20); // times out after 20 seconds \n\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\tcurl_setopt($ch, CURLOPT_VERBOSE, 0);\n\t$authorize = curl_exec($ch); \n\t$curlerrornum = curl_errno($ch);\n\t$curlerror = curl_error($ch);\n\tcurl_close ($ch);\n\tif ($curlerrornum) { \n\t\t$messageStack->add('XML Read Error (cURL) #' . $curlerrornum . '. Description = ' . $curlerror,'error');\n\t\treturn true;\n\t}\n\t// since the response is only one level deep, we can do a simple parse\n\t$authorize = trim($authorize);\n\t$authorize = substr($authorize, strpos($authorize, '<txn>') + 5); // remove up to and including the container tag\n\t$authorize = substr($authorize, 0, strpos($authorize, '</txn>')); // remove from end container tag on\n\t$results = array();\n\t$runaway_loop_counter = 0;\n\twhile ($authorize) {\n\t\t$key = substr($authorize, strpos($authorize, '<') + 1, strpos($authorize, '>') - 1);\n\t\t$authorize = substr($authorize, strpos($authorize, '>') + 1); // remove start tag\n\t\t$value = substr($authorize, 0, strpos($authorize, '<')); // until start of end tag\n\t\t$authorize = substr($authorize, strpos($authorize, '>') + 1); // remove end tag\n\t\t$results[$key] = $value;\n\t\tif ($runaway_loop_counter++ > 1000) break;\n\t}\n//echo 'receive data = '; print_r($results); echo '<br>';\n\t\n $this->transaction_id = $results['ssl_txn_id'];\n $this->auth_code = $results['ssl_approval_code'];\n\n // If the response code is not 0 (approved) then redirect back to the payment page with the appropriate error message\n if ($results['errorCode']) {\n $messageStack->add('Decline Code #' . $results['errorCode'] . ': ' . $results['errorMessage'] . ' - ' . MODULE_PAYMENT_CC_TEXT_DECLINED_MESSAGE, 'error');\n\t return true;\n } elseif ($results['ssl_result'] == '0') {\n\t\t$messageStack->add($results['ssl_result_message'] . ' - Approval code: ' . $this->auth_code . ' --> CVV2 results: ' . $this->cvv_codes[$results['ssl_cvv2_response']], 'success');\n\t\t$messageStack->add('Address verification results: ' . $this->avs_codes[$results['ssl_avs_response']], 'success');\n\t\treturn false;\n\t}\n\t$messageStack->add($results['ssl_result_message'] . ' - ' . MODULE_PAYMENT_CC_TEXT_DECLINED_MESSAGE, 'error');\n\treturn true;\n }", "title": "" }, { "docid": "9289f5c2d557eb86605ef5f8e784e04a", "score": "0.53503186", "text": "function woocommerce_process_scheduled_subscription_payment( $amount_to_charge, $order ) {\n\n if( !is_object( $order ) ) {\n $order = new WC_Order( $order );\n }\n\n // WooCommerce 3.0 compatibility\n $order_id = is_callable( array( $order, 'get_id' ) ) ? $order->get_id() : $order->id;\n\n // Check WC version - changes for WC 3.0.0\n $pre_wc_30 = version_compare( WC_VERSION, '3.0', '<' );\n\n /**\n * Get parent order ID\n */\n $subscriptions = wcs_get_subscriptions_for_renewal_order( $order_id );\n foreach( $subscriptions as $subscription ) {\n\n $parent_order = is_callable( array( $subscription, 'get_parent' ) ) ? $subscription->get_parent() : $subscription->order;\n\n $parent_order_id = is_callable( array( $parent_order, 'get_id' ) ) ? $parent_order->get_id() : $parent_order->id;\n $subscription_id = is_callable( array( $subscription, 'get_id' ) ) ? $subscription->get_id() : $subscription->id;\n\n }\n\n // Check for token\n $sagepaytoken = get_post_meta( $parent_order_id, '_SagePayDirectToken', true );\n\n if( $sagepaytoken && $sagepaytoken != '' ) {\n // Tokens\n $VendorTxCode = 'Renewal-' . $parent_order_id . '-' . time();\n\n // SAGE Line 50 Fix\n $VendorTxCode = str_replace( 'order_', '', $VendorTxCode );\n\n // make your query.\n $data = array(\n \"Token\" => $sagepaytoken,\n \"StoreToken\" => \"1\",\n \"ApplyAVSCV2\" => \"2\",\n \"Apply3DSecure\" => \"2\",\n \"VPSProtocol\" => $this->vpsprotocol,\n \"TxType\" => \"PAYMENT\",\n \"Vendor\" => $this->vendor,\n \"VendorTxCode\" => $VendorTxCode,\n \"Amount\" => urlencode( $amount_to_charge ),\n \"Currency\" => WC_Sagepay_Common_Functions::get_order_currency( $order ),\n \"Description\" => __( 'Order', 'sumopayments_sagepayform' ) . ' ' . str_replace( '#' , '' , $order->get_order_number() ),\n \"BillingSurname\" => $pre_wc_30 ? $order->billing_last_name : $order->get_billing_last_name(),\n \"BillingFirstnames\" => $pre_wc_30 ? $order->billing_first_name : $order->get_billing_first_name(),\n \"BillingAddress1\" => $pre_wc_30 ? $order->billing_address_1 : $order->get_billing_address_1(),\n \"BillingAddress2\" => $pre_wc_30 ? $order->billing_address_2 : $order->get_billing_address_2(),\n \"BillingCity\" => $pre_wc_30 ? $order->billing_city : $order->get_billing_city(),\n \"BillingPostCode\" => $this->billing_postcode( $pre_wc_30 ? $order->billing_postcode : $order->get_billing_postcode() ),\n \"BillingCountry\" => $pre_wc_30 ? $order->billing_country : $order->get_billing_country(),\n \"BillingState\" => WC_Sagepay_Common_Functions::sagepay_state( $pre_wc_30 ? $order->billing_country : $order->get_billing_country(), $pre_wc_30 ? $order->billing_state : $order->get_billing_state() ),\n \"BillingPhone\" => $pre_wc_30 ? $order->billing_phone : $order->get_billing_phone(),\n \"DeliverySurname\" => apply_filters( 'woocommerce_sagepay_direct_deliverysurname', $pre_wc_30 ? $order->shipping_last_name : $order->get_shipping_last_name(), $order ),\n \"DeliveryFirstnames\"=> apply_filters( 'woocommerce_sagepay_direct_deliveryfirstname', $pre_wc_30 ? $order->shipping_first_name : $order->get_shipping_first_name(), $order ),\n \"DeliveryAddress1\" => apply_filters( 'woocommerce_sagepay_direct_deliveryaddress1', $pre_wc_30 ? $order->shipping_address_1 : $order->get_shipping_address_1(), $order ),\n \"DeliveryAddress2\" => apply_filters( 'woocommerce_sagepay_direct_deliveryaddress2', $pre_wc_30 ? $order->shipping_address_2 : $order->get_shipping_address_2(), $order ),\n \"DeliveryCity\" => apply_filters( 'woocommerce_sagepay_direct_deliverycity', $pre_wc_30 ? $order->shipping_city : $order->get_shipping_city(), $order ),\n \"DeliveryPostCode\" => apply_filters( 'woocommerce_sagepay_direct_deliverypostcode', $pre_wc_30 ? $order->shipping_postcode : $order->get_shipping_postcode(), $order ),\n \"DeliveryCountry\" => apply_filters( 'woocommerce_sagepay_direct_deliverycountry', $pre_wc_30 ? $order->shipping_country : $order->get_shipping_country(), $order ),\n \"DeliveryState\" => apply_filters( 'woocommerce_sagepay_direct_deliverystate', WC_Sagepay_Common_Functions::sagepay_state( $pre_wc_30 ? $order->shipping_country : $order->get_shipping_country(), $pre_wc_30 ? $order->shipping_state : $order->get_shipping_state() ), $order ),\n \"DeliveryPhone\" => apply_filters( 'woocommerce_sagepay_direct_deliveryphone', $pre_wc_30 ? $order->billing_phone : $order->get_billing_phone(), $order ), \"CustomerEMail\" => $pre_wc_30 ? $order->billing_email : $order->get_billing_email(),\n \"AllowGiftAid\" => $this->allowgiftaid,\n \"ClientIPAddress\" => $this->get_ipaddress(),\n \"AccountType\" => $this->accounttype,\n \"BillingAgreement\" => $this->billingagreement,\n \"ReferrerID\" => $this->referrerid,\n \"Website\" => site_url()\n );\n\n\n $basket = WC_Sagepay_Common_Functions::get_basket( $this->basketoption, $order_id );\n\n if ( $basket != NULL ) {\n\n if ( $this->basketoption == 1 ) {\n $data[\"Basket\"] = $basket;\n } elseif ( $this->basketoption == 2 ) {\n $data[\"BasketXML\"] = $basket;\n }\n\n }\n\n /**\n * Debugging\n */\n if ( $this->debug == true ) {\n WC_Sagepay_Common_Functions::sagepay_debug( $data, $this->id, __('Sent to SagePay : ', 'sumopayments_sagepayform'), TRUE );\n }\n\n /**\n * Convert the $data array for Sage\n */\n $data = http_build_query( $data, '', '&' );\n\n /**\n * Send $data to Sage\n * @var [type]\n */\n $result = $this->sagepay_post( $data, $this->purchaseURL );\n\n // Process the result\n if ( 'OK' != $result['Status'] ) {\n\n $content = 'There was a problem renewing this payment for order ' . $order_id . '. The Transaction ID is ' . $api_request['RelatedVPSTxId'] . '. The API Request is <pre>' .\n print_r( $api_request, TRUE ) . '</pre>. SagePay returned the error <pre>' .\n print_r( $result['StatusDetail'], TRUE ) . '</pre> The full returned array is <pre>' .\n print_r( $result, TRUE ) . '</pre>. ';\n\n wp_mail( $this->notification ,'SagePay Renewal Error ' . $result['Status'] . ' ' . time(), $content );\n\n $ordernote = '';\n foreach ( $result as $key => $value ) {\n $ordernote .= $key . ' : ' . $value . \"\\r\\n\";\n }\n\n $order->add_order_note( __('Payment failed', 'sumopayments_sagepayform') . '<br />' . $ordernote );\n\n WC_Subscriptions_Manager::process_subscription_payment_failure_on_order( $order, $product_id );\n\n } else {\n\n WC_Subscriptions_Manager::process_subscription_payments_on_order( $order );\n\n $successful_ordernote = '';\n foreach ( $result as $key => $value ) {\n $successful_ordernote .= $key . ' : ' . $value . \"\\r\\n\";\n }\n\n $order->add_order_note( __('Payment completed', 'sumopayments_sagepayform') . '<br />' . $successful_ordernote );\n\n update_post_meta( $order_id, '_VPSTxId' , str_replace( array('{','}'),'',$result['VPSTxId'] ) );\n update_post_meta( $order_id, '_SecurityKey' , $result['SecurityKey'] );\n update_post_meta( $order_id, '_TxAuthNo' , $result['TxAuthNo'] );\n\n update_post_meta( $order_id, '_RelatedVPSTxId' , str_replace( array('{','}'),'',$result['VPSTxId'] ) );\n update_post_meta( $order_id, '_RelatedSecurityKey' , $result['SecurityKey'] );\n update_post_meta( $order_id, '_RelatedTxAuthNo' , $result['TxAuthNo'] );\n update_post_meta( $order_id, '_RelatedVendorTxCode' , $VendorTxCode );\n update_post_meta( $order_id, '_SagePayDirectToken', $sagepaytoken );\n\n $order->payment_complete( str_replace( array('{','}'),'',$result['VPSTxId'] ) );\n\n do_action( 'woocommerce_sagepay_direct_payment_complete', $result, $order );\n\n }\n\n } else {\n // Not tokens\n global $wpdb;\n /**\n * Check for previous renewals for this subscription.\n */\n $previous_renewals = $wpdb->get_results( $wpdb->prepare( \"\n SELECT * FROM {$wpdb->postmeta} pm\n LEFT JOIN {$wpdb->posts} p ON p.ID = pm.post_id\n WHERE pm.meta_key = '%s'\n AND pm.meta_value = '%s'\n AND p.post_status IN ( '%s','%s' )\n ORDER BY pm.post_id DESC\n LIMIT 1\n \", '_subscription_renewal', $subscription_id, 'wc-processing', 'wc-completed' )\n );\n\n /**\n * $previous_renewal_id is used to get the Sage transaction information from the last successful renewal.\n *\n * Sage archives orders after 2 years, if we use the transaction information from the first order then\n * orders will fail once the first order is archived.\n */\n if( isset( $previous_renewals[0]->post_id ) && '' != $previous_renewals[0]->post_id ) {\n $previous_renewal_id = $previous_renewals[0]->post_id;\n } else {\n $previous_renewal_id = $parent_order_id;\n }\n\n // Set $previous_renewal_id = $parent_order_id if the last order does not have a '_RelatedVPSTxId'\n if( !get_post_meta( $previous_renewal_id, '_RelatedVPSTxId', true ) || get_post_meta( $previous_renewal_id, '_RelatedVPSTxId', true ) == '' ) {\n $previous_renewal_id = $parent_order_id;\n }\n\n $VendorTxCode = 'Renewal-' . $parent_order_id . '-' . time();\n\n // SAGE Line 50 Fix\n $VendorTxCode = str_replace( 'order_', '', $VendorTxCode );\n\n // New API Request for repeat\n $api_request = 'VPSProtocol=' . urlencode( $this->vpsprotocol );\n $api_request .= '&TxType=REPEAT';\n $api_request .= '&Vendor=' . urlencode( $this->vendor );\n $api_request .= '&VendorTxCode=' . $VendorTxCode;\n $api_request .= '&Amount=' . urlencode( $amount_to_charge );\n $api_request .= '&Currency=' . get_post_meta( $previous_renewal_id, '_order_currency', true );\n $api_request .= '&Description=Repeat payment for order ' . $parent_order_id;\n $api_request .= '&RelatedVPSTxId=' . get_post_meta( $previous_renewal_id, '_RelatedVPSTxId', true );\n $api_request .= '&RelatedVendorTxCode=' . get_post_meta( $previous_renewal_id, '_RelatedVendorTxCode', true );\n $api_request .= '&RelatedSecurityKey=' . get_post_meta( $previous_renewal_id, '_RelatedSecurityKey', true );\n $api_request .= '&RelatedTxAuthNo=' . get_post_meta( $previous_renewal_id, '_RelatedTxAuthNo', true );\n\n // Send the request to sage for processing\n $result = $this->sagepay_post( $api_request, $this->repeatURL );\n\n // Process the result\n if ( 'OK' != $result['Status'] ) {\n\n $content = 'There was a problem renewing this payment for order ' . $order_id . '. The Transaction ID is ' . $api_request['RelatedVPSTxId'] . '. The API Request is <pre>' .\n print_r( $api_request, TRUE ) . '</pre>. SagePay returned the error <pre>' .\n print_r( $result['StatusDetail'], TRUE ) . '</pre> The full returned array is <pre>' .\n print_r( $result, TRUE ) . '</pre>. ';\n\n wp_mail( $this->notification ,'SagePay Renewal Error ' . $result['Status'] . ' ' . time(), $content );\n\n $ordernote = '';\n foreach ( $result as $key => $value ) {\n $ordernote .= $key . ' : ' . $value . \"\\r\\n\";\n }\n\n $order->add_order_note( __('Payment failed', 'sumopayments_sagepayform') . '<br />' . $ordernote );\n\n WC_Subscriptions_Manager::process_subscription_payment_failure_on_order( $order, $product_id );\n\n } else {\n\n WC_Subscriptions_Manager::process_subscription_payments_on_order( $order );\n\n $successful_ordernote = '';\n foreach ( $result as $key => $value ) {\n $successful_ordernote .= $key . ' : ' . $value . \"\\r\\n\";\n }\n\n $order->add_order_note( __('Payment completed', 'sumopayments_sagepayform') . '<br />' . $successful_ordernote );\n\n update_post_meta( $order_id, '_VPSTxId' , str_replace( array('{','}'),'',$result['VPSTxId'] ) );\n update_post_meta( $order_id, '_SecurityKey' , $result['SecurityKey'] );\n update_post_meta( $order_id, '_TxAuthNo' , $result['TxAuthNo'] );\n\n update_post_meta( $order_id, '_RelatedVPSTxId' , str_replace( array('{','}'),'',$result['VPSTxId'] ) );\n update_post_meta( $order_id, '_RelatedSecurityKey' , $result['SecurityKey'] );\n update_post_meta( $order_id, '_RelatedTxAuthNo' , $result['TxAuthNo'] );\n update_post_meta( $order_id, '_RelatedVendorTxCode' , $VendorTxCode );\n\n $order->payment_complete( str_replace( array('{','}'),'',$result['VPSTxId'] ) );\n\n do_action( 'woocommerce_sagepay_direct_payment_complete', $result, $order );\n\n }\n\n }\n\n }", "title": "" }, { "docid": "ba170744e70235b16d3c8a5c39f9ef19", "score": "0.5340993", "text": "public function createMageOrder($orderData)\n {\n// $store = $this->storeManager->getStore();\n $websiteId = $orderData['website_id'];\n $website = $this->storeManager->getWebsite($websiteId);\n $oDefaultStore = $website->getDefaultStore();\n $this->storeManager->setCurrentStore($oDefaultStore->getCode());\n $customer = $this->customerFactory->create();\n $customer->setWebsiteId($websiteId);\n $customer->loadByEmail($orderData['email']);// load customet by email address\n if (!$customer->getEntityId()) {\n //If not avilable then create this customer\n $customer->setWebsiteId($websiteId)\n ->setStore($oDefaultStore)\n ->setFirstname($orderData['shipping_address']['firstname'])\n ->setLastname($orderData['shipping_address']['lastname'])\n ->setEmail($orderData['email'])\n ->setPassword($orderData['email']);\n $customer->save();\n }\n $quote = $this->quote->create(); //Create object of quote\n $quote->setStore($oDefaultStore); //set store for which you create quote\n // if you have allready buyer id then you can load customer directly\n $customer = $this->customerRepository->getById($customer->getEntityId());\n $quote->setCurrency();\n $quote->setData('authority_to_leave',1);\n $quote->assignCustomer($customer); //Assign quote to customer\n\n //add items in quote\n foreach ($orderData['items'] as $item) {\n $product = $this->product->load($item['product_id']);\n if (isset($item['price'])) {\n $product->setPrice($item['price']);\n }\n $quote->addProduct(\n $product,\n intval($item['qty'])\n );\n }\n\n //Set Address to quote\n $quote->getBillingAddress()->addData($orderData['shipping_address']);\n $quote->getShippingAddress()->addData($orderData['shipping_address']);\n\n // Collect Rates and Set Shipping & Payment Method\n $vShippingMethodCode = $orderData['shipping_method'];\n\n $shippingAddress = $quote->getShippingAddress();\n $shippingAddress->setCollectShippingRates(true)\n ->collectShippingRates()\n ->setShippingMethod($vShippingMethodCode); //shipping method\n// $quote->setInventoryProcessed(false); //not effect inventory\n $quote->setWebsite($website);\n $quote->setStoreId($oDefaultStore->getId());\n $quote->save(); //Now Save quote and your quote is ready\n\n if (!empty($orderData['giftCardCode'])) {\n $this->applyGiftCardFromCode($orderData['giftCardCode'], $quote);\n }\n // Set Sales Order Payment\n $quote->getPayment()->importData(\n $orderData['payment']\n );\n\n // Collect Totals & Save Quote\n $quote->collectTotals()->save();\n\n\n // Create Order From Quote\n $order = $this->quoteManagement->submit($quote);\n\n $order->setEmailSent(0);\n if ($order->getEntityId()) {\n $result['order_id'] = $order->getRealOrderId();\n $result['increment_id'] = $order->getIncrementId();\n $result['data'] = $this->cleanArray($order->getData());\n }\n else {\n $result = ['error' => 1, 'msg' => 'Your custom message'];\n }\n return $result;\n }", "title": "" }, { "docid": "5a4d65a8aa23d3b62477efeca5f4f89a", "score": "0.53369117", "text": "public function createNewOrder(Request $request)\n {\n if (Auth::guard('api')->user()) {\n $user = Auth::guard('api')->user();\n } else {\n $user = $this->createTempUser($request);\n }\n\n $order = $this->createOrder($request, $user);\n\n $paymentID = PaymentController::createPaymentId($order);\n $paymentData = json_decode($paymentID, true);\n $order->payment_id = $paymentData['paymentId'] ?? '';\n $order->save();\n\n echo $paymentID;\n\n }", "title": "" }, { "docid": "153caae156a22501e06e5bdd711ff788", "score": "0.52960384", "text": "protected function _prepareNewCustomerQuote()\n {\n $quote = $this->_quote;\n $billing = $quote->getBillingAddress();\n $shipping = $quote->isVirtual() ? null : $quote->getShippingAddress();\n\n //$customer = Mage::getModel('customer/customer');\n $customer = $quote->getCustomer();\n /* @var $customer Mage_Customer_Model_Customer */\n $customerBilling = $billing->exportCustomerAddress();\n $customer->addAddress($customerBilling);\n $billing->setCustomerAddress($customerBilling);\n $customerBilling->setIsDefaultBilling(true);\n if ($shipping && !$shipping->getSameAsBilling()) {\n $customerShipping = $shipping->exportCustomerAddress();\n $customer->addAddress($customerShipping);\n $shipping->setCustomerAddress($customerShipping);\n $customerShipping->setIsDefaultShipping(true);\n } else {\n $customerBilling->setIsDefaultShipping(true);\n }\n\n Mage::helper('core')->copyFieldset('checkout_onepage_quote', 'to_customer', $quote, $customer);\n $customer->setPassword($customer->decryptPassword($quote->getPasswordHash()));\n $passwordCreatedTime = Mage::getSingleton('checkout/session')->getData('_session_validator_data')['session_expire_timestamp']\n - Mage::getSingleton('core/cookie')->getLifetime();\n $customer->setPasswordCreatedAt($passwordCreatedTime);\n $quote->setCustomer($customer)\n ->setCustomerId(true);\n $quote->setPasswordHash('');\n\n return $this;\n }", "title": "" }, { "docid": "580288b8c2454f33340437b2e05d0819", "score": "0.5286344", "text": "function before_process() {\n global $response, $db, $order, $messageStack;\n $order->info['cc_owner_first_name'] = $_POST['cc_owner_first_name'];\n\t$order->info['cc_owner_last_name'] = $_POST['cc_owner_last_name'];\n\t$order->info['cc_billing_dob'] = $_POST['cc_billing_dob'];\n $order->info['cc_number'] = str_pad(substr($_POST['cc_number'], -4), strlen($_POST['cc_number']), \"X\", STR_PAD_LEFT);\n $order->info['cc_expires'] = ''; // $_POST['cc_expires'];\n $order->info['cc_cvv'] = '***';\n $sessID = zen_session_id();\n\n $this->include_x_type = TRUE;\n\n // DATA PREPARATION SECTION\n unset($submit_data); // Cleans out any previous data stored in the variable\n\n \n // Create a variable that holds the order time\n $order_time = date(\"F j, Y, g:i a\");\n\n // Calculate the next expected order id (adapted from code written by Eric Stamper - 01/30/2004 Released under GPL)\n $last_order_id = $db->Execute(\"select orders_id from \" . TABLE_ORDERS . \" order by orders_id desc limit 1\");\n $new_order_id = $last_order_id->fields['orders_id'];\n $new_order_id = ($new_order_id + 1);\n\t\n\t$pass_through = $new_order_id;\n\n // add randomized suffix to order id to produce uniqueness ... since it's unwise to submit the same order-number twice to authorize.net\n $new_order_id = (string)$new_order_id . '-' . zen_create_random_value(6, 'chars');\n\t\n\t$month = substr($_POST['cc_expires'],0,2);\n\t$year = '20' . substr($_POST['cc_expires'],2,3);\n\n // Populate an array that contains all of the data to be sent to Authorize.net\n $submit_data = array( \n 'client_username' => trim(MODULE_PAYMENT_PAYSCOUT_INC_CLIENT_USERNAME),\n 'client_password' => trim(MODULE_PAYMENT_PAYSCOUT_INC_CLIENT_PASSWORD),\n\t\t\t\t\t\t 'client_token' => trim(MODULE_PAYMENT_PAYSCOUT_INC_CLIENT_TOKEN), \n 'initial_amount' => number_format($order->info['total'], 2),\n 'currency' => $order->info['currency'], \n 'account_number' => $_POST['cc_number'],\n 'expiration_month' => $month,\n\t\t\t\t\t\t 'expiration_year' =>$year,\n\t\t\t\t\t\t 'processing_type' => 'DEBIT', \n 'cvv2' => $_POST['cc_cvv'],\n\t\t\t\t\t\t 'billing_date_of_birth' => date('Ymd', strtotime($_POST['cc_biling_dob'])), \n 'pass_through' => $pass_through,\n 'billing_first_name' => $order->billing['firstname'],\n 'billing_last_name' => $order->billing['lastname'], \n 'billing_address_line_1' => $order->billing['street_address'],\n 'billing_city' => $order->billing['city'],\n 'billing_state' => $order->billing['state'],\n 'billing_postal_code' => $order->billing['postcode'],\n 'billing_country' => $order->billing['country']['title'],\n 'billing_phone_number' => $order->customer['telephone'],\n 'billing_email_address' => $order->customer['email_address'] \n );\n\n $this->notify('NOTIFY_PAYMENT_AUTHNET_EMULATOR_CHECK', array(), $submit_data);\n \n\n // force conversion to supported currencies: USD, GBP, CAD, EUR, AUD, NZD\n if ($order->info['currency'] != $this->gateway_currency) {\n global $currencies;\n $submit_data['initial_amount'] = number_format($order->info['total'] * $currencies->get_value($this->gateway_currency), 2);\n $submit_data['currency'] = $this->gateway_currency; \n }\n\n $this->submit_extras = array();\n $this->notify('NOTIFY_PAYMENT_AUTHNET_PRESUBMIT_HOOK', array(), $submit_data);\n\n unset($response);\t\n\t\t\n $response = $this->_sendRequest($submit_data);\n\t\n\t\t\t\n $this->notify('NOTIFY_PAYMENT_AUTHNET_POSTSUBMIT_HOOK', array(), $response);\n\t\n $response_code = $response['result_code'];\n $response_text = $response['status'];\n $raw_message = $response['raw_message'];\n\t$message = $response['message'];\n $this->transaction_id = $response['transaction_id'];\n\t$this->gateway_status = $response_text;\n \n \t$response_msg_to_customer = '';\n\tif($response_code != '00')\n\t{\n\t\t$gateway_error = $message;\n\t\tif($raw_message != \"\") $gateway_error = $raw_message;\n\t\t\n\t\t$response['ErrorDetails'] = $gateway_error;\t\n\t\t$response_msg_to_customer = $gateway_error;\n\t}\n\t\n\t\n if($response_code == '00') {\n $this->order_status = 1;\n \n\t $this->gateway_status = $response_text;\n\t \n\t $gateway_error = $message;\n\t\tif($raw_message != \"\") $gateway_error = $raw_message;\t\n\t \n $response['ErrorDetails'] = 'Staus: '. $response_text . ' Transaction Id: ' . $response['transaction_id'] . ' Message: ' . $gateway_error;\n\t\t$response_msg_to_customer = $gateway_error;\n\t\t$this->transaction_id .= ' ***Message: ' .$gateway_error;\n }\n\n $this->_debugActions($response, $order_time, $sessID);\n\n if (isset($response['error']) && $response['error']!= '') {\n $messageStack->add_session('checkout_payment', MODULE_PAYMENT_PAYSCOUT_INC_TEXT_COMM_ERROR . ' (' . $response['error'] . ')', 'caution');\n zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));\n }\n\n \n // If the response code is not 1 (approved) then redirect back to the payment page with the appropriate error message\n\t\n\t\t\n if ($response_code != '00') {\n $messageStack->add_session('checkout_payment', $response_msg_to_customer . ' - ' . MODULE_PAYMENT_PAYSCOUT_INC_TEXT_DECLINED_MESSAGE, 'error');\n zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));\n }\n if($response_code == '00'){\n $this->order_status = (int)MODULE_PAYMENT_PAYSCOUT_INC_REVIEW_ORDER_STATUS_ID;\n }\n if ($response_code != '') {\n $_SESSION['payment_method_messages'] = $response_msg_to_customer;\n }\n $order->info['cc_type'] = $response_text;\n }", "title": "" }, { "docid": "45e4f214b58f0e300c0d4059551c0107", "score": "0.5281879", "text": "public function requestNewOrder(OrderRequest $orderRequest);", "title": "" }, { "docid": "6a9145f2f966f6c2447e9c06f1e3df12", "score": "0.5278546", "text": "public function validate_order()\n {\n parent::validate_order();\n if ($this->continue == true && !verify_csrf('crud_order_form')) {\n $this->continue = false;\n }\n }", "title": "" }, { "docid": "cd12db321c0363567d5823938b466b0d", "score": "0.5268719", "text": "public function createNewOrder($quote)\n {\n $convert = Mage::getModel('sales/convert_quote');\n $transaction = Mage::getModel('core/resource_transaction');\n\n if ($quote->getCustomerId()) {\n $transaction->addObject($quote->getCustomer());\n }\n\n $transaction->addObject($quote);\n if ($quote->isVirtual()) {\n $order = $convert->addressToOrder($quote->getBillingAddress());\n } else {\n $order = $convert->addressToOrder($quote->getShippingAddress());\n }\n $order->setBillingAddress($convert->addressToOrderAddress($quote->getBillingAddress()));\n if ($quote->getBillingAddress()->getCustomerAddress()) {\n $order->getBillingAddress()->setCustomerAddress($quote->getBillingAddress()->getCustomerAddress());\n }\n if (!$quote->isVirtual()) {\n $order->setShippingAddress($convert->addressToOrderAddress($quote->getShippingAddress()));\n if ($quote->getShippingAddress()->getCustomerAddress()) {\n $order->getShippingAddress()->setCustomerAddress($quote->getShippingAddress()->getCustomerAddress());\n }\n }\n $order->setPayment($convert->paymentToOrderPayment($quote->getPayment()));\n $order->getPayment()->setTransactionId($quote->getPayment()->getTransactionId());\n $order->getPayment()->setAdditionalInformation(\n 'amazon_order_reference_id',\n $quote->getPayment()\n ->getTransactionId()\n );\n\n foreach ($quote->getAllItems() as $item) {\n /** @var Mage_Sales_Model_Order_Item $item */\n $orderItem = $convert->itemToOrderItem($item);\n if ($item->getParentItem()) {\n $orderItem->setParentItem($order->getItemByQuoteItemId($item->getParentItem()->getId()));\n }\n $order->addItem($orderItem);\n }\n $order->setQuote($quote);\n $order->setExtOrderId($quote->getPayment()->getTransactionId());\n $order->setCanSendNewEmailFlag(false);\n\n $transaction->addObject($order);\n $transaction->addCommitCallback(array($order, 'save'));\n\n Mage::dispatchEvent('checkout_type_onepage_save_order', array('order' => $order, 'quote' => $quote));\n Mage::dispatchEvent('sales_model_service_quote_submit_before', array('order' => $order, 'quote' => $quote));\n\n try {\n $transaction->save();\n Mage::dispatchEvent(\n 'sales_model_service_quote_submit_success',\n array(\n 'order' => $order,\n 'quote' => $quote\n )\n );\n } catch (Exception $e) {\n //reset order ID's on exception, because order not saved\n $order->setId(null);\n /** @var $item Mage_Sales_Model_Order_Item */\n foreach ($order->getItemsCollection() as $item) {\n $item->setOrderId(null);\n $item->setItemId(null);\n }\n\n Mage::dispatchEvent(\n 'sales_model_service_quote_submit_failure',\n array(\n 'order' => $order,\n 'quote' => $quote\n )\n );\n throw $e;\n }\n Mage::dispatchEvent('checkout_submit_all_after', array('order' => $order, 'quote' => $quote));\n Mage::dispatchEvent('sales_model_service_quote_submit_after', array('order' => $order, 'quote' => $quote));\n\n return $this->setOrder($order);\n }", "title": "" }, { "docid": "9da083a0b474e5676e75dcc503a653d5", "score": "0.5246491", "text": "public function createUser($token, $customer, $order) {\n\n\t\t// Get admin conf in ../Helper/Data.php\n\t\t$urlKey = \"users/natural/\";\n\t\t$apiInfos = Mage::helper(\"Easyrenter_Mangopay\")->getApiInfos($urlKey, true);\n\n\t\t// Get Magento customer physical adress and date of birth\n\t\t$address = $order->getBillingAddress();\n \t$customerDob = $customer[\"dob\"];\n \t$customerDob = strtotime($customerDob);\n \t$customerStreet = $address->getStreet();\n\n\t\t// Curl authentification\n\t\t$curl = curl_init();\n\t\tcurl_setopt($curl, CURLOPT_HTTPHEADER, array(\n\t\t\t\"Authorization: Bearer \".$token,\n\t\t\t\"Content-Type: application/json; charset=utf-8\",\n\t\t\t\"Accept:application/json, text/javascript, */*; q=0.01\"\n\t\t));\n\t\tcurl_setopt($curl, CURLOPT_URL, $apiInfos[\"url\"]);\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);\n\t\tcurl_setopt($curl, CURLOPT_FOLLOWLOCATION, TRUE);\n\t\tcurl_setopt($curl, CURLOPT_VERBOSE, TRUE);\n\t\tcurl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n\t\tcurl_setopt($curl, CURLOPT_POST, 1);\n\t\tcurl_setopt($curl, CURLOPT_POSTFIELDS, '{\n\t\t\t\"Id\": \"'.$customer->getId().'\",\n\t\t\t\"CreationDate\": \"'.date(\"Y-m-d H:i:s\", time()).'\",\n\t\t\t\"Tag\": \"-\",\n\t\t\t\"PersonType\": \"NATURAL\",\n\t\t\t\"Email\": \"'.$customer->getEmail().'\",\n\t\t\t\"KYCLevel\": \"REGULAR\",\n\t\t\t\"FirstName\": \"'.$customer->getFirstname().'\",\n\t\t\t\"LastName\": \"'.$customer->getLastname().'\",\n\t\t\t\"Address\": {\n\t\t\t\"AddressLine1\": \"'.$customerStreet[0].'\",\n\t\t\t\"AddressLine2\": \"-\",\n\t\t\t\"City\": \"'.$address->getCity().'\",\n\t\t\t\"Region\": \"-\",\n\t\t\t\"PostalCode\": \"'.$address->getPostcode().'\",\n\t\t\t\"Country\": \"'.$address->getCountry().'\"\n\t\t\t},\n\t\t\t\"Birthday\": '.$customerDob.',\n\t\t\t\"Nationality\": \"'.$address->getCountryId().'\",\n\t\t\t\"CountryOfResidence\": \"'.$address->getCountryId().'\",\n\t\t\t\"Occupation\": \"-\",\n\t\t\t\"IncomeRange\": 2,\n\t\t\t\"ProofOfAddress\": \"-\",\n\t\t\t\"ProofOfIdentity\": \"-\",\n\t\t\t\"Capacity\": \"NORMAL\"\n\t\t\t}');\n\n\t\t$result = curl_exec($curl);\n\n\t if (curl_errno($curl)) {\n\t print curl_error($curl);\n\t } else {\n\t curl_close($curl);\n\t }\n\n\t // Mangopay user ID save in the Magento customer to be use later\n\t $arrResult=json_decode($result);\n\t $customerMangopayId = $arrResult->Id;\n\t\t$customer->setData(\"mangopayclientid\", $customerMangopayId);\n\t\t$customer->save();\n\n\t return $result;\n\t}", "title": "" }, { "docid": "780136857bdecbf518a82420cce56f6c", "score": "0.5236697", "text": "function before_process() {\n global $response, $db, $order, $messageStack;\n\n $order->info['cc_number'] = str_pad(substr($_POST['cc_number'], -4), strlen($_POST['cc_number']), \"X\", STR_PAD_LEFT);\n $order->info['cc_expires'] = $_POST['cc_expires'];\n $order->info['cc_type'] = $_POST['cc_type'];\n $order->info['cc_owner'] = $_POST['cc_owner'];\n $order->info['cc_cvv'] = ''; //$_POST['cc_cvv'];\n $sessID = zen_session_id();\n\n // DATA PREPARATION SECTION\n unset($submit_data); // Cleans out any previous data stored in the variable\n\n // Create a string that contains a listing of products ordered for the description field\n $description = '';\n for ($i=0; $i<sizeof($order->products); $i++) {\n $description .= $order->products[$i]['name'] . ' (qty: ' . $order->products[$i]['qty'] . ') + ';\n }\n // Remove the last \"\\n\" from the string\n $description = substr($description, 0, -2);\n\n // Create a variable that holds the order time\n $order_time = date(\"F j, Y, g:i a\");\n\n // Calculate the next expected order id (adapted from code written by Eric Stamper - 01/30/2004 Released under GPL)\n $last_order_id = $db->Execute(\"select * from \" . TABLE_ORDERS . \" order by orders_id desc limit 1\");\n $new_order_id = $last_order_id->fields['orders_id'];\n $new_order_id = ($new_order_id + 1);\n\n // add randomized suffix to order id to produce uniqueness ... since it's unwise to submit the same order-number twice to authorize.net\n $new_order_id = (string)$new_order_id . '-' . zen_create_random_value(6);\n\n\n // Populate an array that contains all of the data to be sent to Authorize.net\n $submit_data = array(\n 'x_login' => trim(MODULE_PAYMENT_AUTHORIZENET_AIM_LOGIN),\n 'x_tran_key' => trim(MODULE_PAYMENT_AUTHORIZENET_AIM_TXNKEY),\n 'x_relay_response' => 'FALSE', // AIM uses direct response, not relay response\n 'x_delim_data' => 'TRUE',\n 'x_delim_char' => $this->delimiter, // The default delimiter is a comma\n 'x_encap_char' => $this->encapChar, // The divider to encapsulate response fields\n 'x_version' => '3.1', // 3.1 is required to use CVV codes\n 'x_type' => MODULE_PAYMENT_AUTHORIZENET_AIM_AUTHORIZATION_TYPE == 'Authorize' ? 'AUTH_ONLY': 'AUTH_CAPTURE',\n 'x_method' => 'CC',\n 'x_amount' => number_format($order->info['total'], 2),\n 'x_currency_code' => $order->info['currency'],\n 'x_card_num' => $_POST['cc_number'],\n 'x_exp_date' => $_POST['cc_expires'],\n 'x_card_code' => $_POST['cc_cvv'],\n 'x_email_customer' => MODULE_PAYMENT_AUTHORIZENET_AIM_EMAIL_CUSTOMER == 'True' ? 'TRUE': 'FALSE',\n 'x_email_merchant' => MODULE_PAYMENT_AUTHORIZENET_AIM_EMAIL_MERCHANT == 'True' ? 'TRUE': 'FALSE',\n 'x_cust_id' => $_SESSION['customer_id'],\n 'x_invoice_num' => (MODULE_PAYMENT_AUTHORIZENET_AIM_TESTMODE == 'Test' ? 'TEST-' : '') . $new_order_id,\n 'x_first_name' => $order->billing['firstname'],\n 'x_last_name' => $order->billing['lastname'],\n 'x_company' => $order->billing['company'],\n 'x_address' => $order->billing['street_address'],\n 'x_city' => $order->billing['city'],\n 'x_state' => $order->billing['state'],\n 'x_zip' => $order->billing['postcode'],\n 'x_country' => $order->billing['country']['title'],\n 'x_phone' => $order->customer['telephone'],\n 'x_email' => $order->customer['email_address'],\n 'x_ship_to_first_name' => $order->delivery['firstname'],\n 'x_ship_to_last_name' => $order->delivery['lastname'],\n 'x_ship_to_address' => $order->delivery['street_address'],\n 'x_ship_to_city' => $order->delivery['city'],\n 'x_ship_to_state' => $order->delivery['state'],\n 'x_ship_to_zip' => $order->delivery['postcode'],\n 'x_ship_to_country' => $order->delivery['country']['title'],\n 'x_description' => $description,\n 'x_recurring_billing' => 'NO',\n 'x_customer_ip' => zen_get_ip_address(),\n 'x_po_num' => date('M-d-Y h:i:s'), //$order->info['po_number'],\n 'x_freight' => number_format((float)$order->info['shipping_cost'],2),\n 'x_tax_exempt' => 'FALSE', /* 'TRUE' or 'FALSE' */\n 'x_tax' => number_format((float)$order->info['tax'],2),\n 'x_duty' => '0',\n\n // Additional Merchant-defined variables go here\n 'Date' => $order_time,\n 'IP' => zen_get_ip_address(),\n 'Session' => $sessID );\n\n unset($response);\n $response = $this->_sendRequest($submit_data);\n $response_code = $response[0];\n $response_text = $response[3];\n $this->auth_code = $response[4];\n $this->transaction_id = $response[6];\n $response_msg_to_customer = $response_text . ($this->commError == '' ? '' : ' Communications Error - Please notify webmaster.');\n\n $response['Expected-MD5-Hash'] = $this->calc_md5_response($response[6], $response[9]);\n $response['HashMatchStatus'] = ($response[37] == $response['Expected-MD5-Hash']) ? 'PASS' : 'FAIL';\n\n $this->_debugActions($response, $order_time, $sessID);\n\n // If the MD5 hash doesn't match, then this transaction's authenticity cannot be verified.\n // Thus, order will be placed in Pending status\n if ($response['HashMatchStatus'] != 'PASS') {\n $this->order_status = 1;\n $messageStack->add_session('header', MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_AUTHENTICITY_WARNING, 'caution');\n }\n\n // If the response code is not 1 (approved) then redirect back to the payment page with the appropriate error message\n if ($response_code != '1') {\n $messageStack->add_session('checkout_payment', $response_msg_to_customer . ' - ' . MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_DECLINED_MESSAGE, 'error');\n zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));\n }\n }", "title": "" }, { "docid": "187e2e2b10e26e6c153bafc38882fd62", "score": "0.5236083", "text": "public function postCreate(CreateQuoteRequest $request)\n\t{\n if(\\Auth::user()->role == \"company\"){\n $company = Company::where(\"user_id\",\\Auth::user()->id)->first();\n }\n\n $customer = new Customer;\n $quote = new Quote;\n\n $date = $request[\"pickup_date\"];\n $date = explode(\"-\",$date);\n $pickup_date = Carbon::createFromDate($date[0],$date[1],$date[2]);\n $customer->company_id = $company->id;\n $customer->quote_id = $request[\"quote_id\"];\n $customer->name = $request[\"name\"];\n $customer->phone = $request[\"phone\"];\n $customer->secondary_phone = $request[\"secondary_phone\"];\n $customer->email = $request[\"email\"];\n $customer->secondary_email = $request[\"secondary_email\"];\n $customer->pickup_date = $pickup_date;\n $customer->status = \"saved\";\n $customer->modified_at = Carbon::now();\n $customer->save();\n\n\n\n $quote->pickup_city = $request[\"pickup_city\"];\n $quote->pickup_state = $request[\"pickup_state\"];\n $quote->pickup_zipcode = $request[\"pickup_zipcode\"];\n\n $quote->delivery_city = $request[\"delivery_city\"];\n $quote->delivery_state = $request[\"delivery_state\"];\n $quote->delivery_zipcode = $request[\"delivery_zipcode\"];\n $quote->quote_id = $request[\"quote_id\"];\n\n if(!empty($request[\"year_2\"])){\n $quote->vehicle_two_year = $request[\"year_2\"]; \n $quote->vehicle_two_make = $request[\"make_2\"]; \n $quote->vehicle_two_model = $request[\"model_2\"]; \n $quote->vehicle_two_type = $request[\"type_2\"]; \n $quote->vehicle_two_condition = $request[\"condition_2\"]; \n $quote->vehicle_two_quantity = $request[\"quantity_2\"]; \n $quote->carrier_type = $request[\"carrier_type\"];\n };\n if(!empty($request[\"year_3\"])){\n $quote->vehicle_three_year = $request[\"year_3\"]; \n $quote->vehicle_three_make = $request[\"make_3\"]; \n $quote->vehicle_three_model = $request[\"model_3\"]; \n $quote->vehicle_three_type = $request[\"type_3\"]; \n $quote->vehicle_three_condition = $request[\"condition_3\"]; \n $quote->vehicle_three_quantity = $request[\"quantity_3\"]; \n $quote->carrier_type = $request[\"carrier_type\"];\n };\n if(!empty($request[\"year_4\"])){\n $quote->vehicle_four_year = $request[\"year_4\"]; \n $quote->vehicle_four_make = $request[\"make_4\"]; \n $quote->vehicle_four_model = $request[\"model_4\"]; \n $quote->vehicle_four_type = $request[\"type_4\"]; \n $quote->vehicle_four_condition = $request[\"condition_4\"]; \n $quote->vehicle_four_quantity = $request[\"quantity_4\"]; \n $quote->carrier_type = $request[\"carrier_type\"];\n };\n if(!empty($request[\"year_5\"])){\n $quote->vehicle_five_year = $request[\"year_5\"]; \n $quote->vehicle_five_make = $request[\"make_5\"]; \n $quote->vehicle_five_model = $request[\"model_5\"]; \n $quote->vehicle_five_type = $request[\"type_5\"]; \n $quote->vehicle_five_condition = $request[\"condition_5\"]; \n $quote->vehicle_five_quantity = $request[\"quantity_5\"]; \n $quote->carrier_type = $request[\"carrier_type\"];\n };\n if(!empty($request[\"year_6\"])){\n $quote->vehicle_six_year = $request[\"year_6\"]; \n $quote->vehicle_six_make = $request[\"make_6\"]; \n $quote->vehicle_six_model = $request[\"model_6\"]; \n $quote->vehicle_six_type = $request[\"type_6\"]; \n $quote->vehicle_six_condition = $request[\"condition_6\"]; \n $quote->vehicle_six_quantity = $request[\"quantity_6\"]; \n $quote->carrier_type = $request[\"carrier_type\"];\n };\n if(!empty($request[\"year_7\"])){\n $quote->vehicle_seven_year = $request[\"year_7\"]; \n $quote->vehicle_seven_make = $request[\"make_7\"]; \n $quote->vehicle_seven_model = $request[\"model_7\"]; \n $quote->vehicle_seven_type = $request[\"type_7\"]; \n $quote->vehicle_seven_condition = $request[\"condition_7\"]; \n $quote->vehicle_seven_quantity = $request[\"quantity_7\"]; \n $quote->carrier_type = $request[\"carrier_type\"];\n };\n if(!empty($request[\"year_8\"])){\n $quote->vehicle_eight_year = $request[\"year_8\"]; \n $quote->vehicle_eight_make = $request[\"make_8\"]; \n $quote->vehicle_eight_model = $request[\"model_8\"]; \n $quote->vehicle_eight_type = $request[\"type_8\"]; \n $quote->vehicle_eight_condition = $request[\"condition_8\"]; \n $quote->vehicle_eight_quantity = $request[\"quantity_8\"]; \n $quote->carrier_type = $request[\"carrier_type\"];\n };\n if(!empty($request[\"year_9\"])){\n $quote->vehicle_nine_year = $request[\"year_9\"]; \n $quote->vehicle_nine_make = $request[\"make_9\"]; \n $quote->vehicle_nine_model = $request[\"model_9\"]; \n $quote->vehicle_nine_type = $request[\"type_9\"]; \n $quote->vehicle_nine_condition = $request[\"condition_9\"]; \n $quote->vehicle_nine_quantity = $request[\"quantity_9\"]; \n $quote->carrier_type = $request[\"carrier_type\"];\n };\n if(!empty($request[\"year_10\"])){\n $quote->vehicle_ten_year = $request[\"year_10\"]; \n $quote->vehicle_ten_make = $request[\"make_10\"]; \n $quote->vehicle_ten_model = $request[\"model_10\"]; \n $quote->vehicle_ten_type = $request[\"type_10\"]; \n $quote->vehicle_ten_condition = $request[\"condition_10\"]; \n $quote->vehicle_ten_quantity = $request[\"quantity_10\"]; \n $quote->carrier_type = $request[\"carrier_type\"];\n };\n\n if(!empty($request[\"vehicle_notes\"])){\n $quote->vehicle_notes = $request[\"vehicle_notes\"]; \n };\n if(!empty($request[\"notes_for_customer\"])){\n $quote->customer_notes = $request[\"notes_for_customer\"]; \n };\n if(!empty($request[\"notes_for_office\"])){\n $quote->office_notes = $request[\"notes_for_office\"]; \n };\n //if(!empty($request[\"price\"])){\n //$quote->quote_price = $request[\"price\"]; \n //};\n if(!empty($request[\"post_price\"])){\n $quote->post_price = $request[\"post_price\"]; \n };\n $quote->customer_id = $customer->id;\n $quote->company_id = $company->id;\n $quote->status = \"saved\";\n \n $quote->save();\n\n if(!empty($request[\"send_email_to_customer\"])){\n $subscriber = new QuoteCreateHandler;\n $data = [];\n $data[\"name\"] = $request[\"name\"];\n $data[\"company_name\"] = $company->company_name;\n $data[\"quote_id\"] = $request[\"quote_id\"];\n $data[\"pickup_location\"] = $request[\"pickup_city\"];\n $data[\"dropoff_location\"] = $request[\"delivery_city\"];\n $data[\"vehicles\"] = $request[\"make_2\"] . \",\" . $request[\"model_2\"];\n $data[\"carrier_type\"] = $request[\"carrier_type\"];\n $data[\"vehicle_condition\"] = $request[\"condition_2\"];\n $data[\"post_price\"] = $request[\"post_price\"];\n $data[\"email\"] = $request[\"email\"];\n $data[\"notes\"] = $request[\"notes_for_customer\"];\n $customer->status = \"pending\";\n $customer->save();\n $quote->status = \"pending\";\n $quote->save();\n \\Event::fire($subscriber->onQuoteCreate($data));\n\n return \\Redirect::back()\n ->with(\"quote_create_status\",\"New quote has been created and sent to customer\");\n \n }\n\n\n\n return \\Redirect::back()\n ->with(\"quote_create_status\",\"new quote has been created\");\n\t}", "title": "" }, { "docid": "d257374cde4b2c2cb37e5dde4354f8cb", "score": "0.52274096", "text": "function pap_pmpro_added_order($morder)\r\n{\r\n\tglobal $pap_pmpro_affiliate_id, $pap_pmpro_affiliate_subid;\r\n\t\t\r\n\tif(!empty($pap_pmpro_affiliate_id))\r\n\t{\r\n\t\t$morder->affiliate_id = $pap_pmpro_affiliate_id;\r\n\t\t$morder->affiliate_subid = $pap_pmpro_affiliate_subid;\r\n\t\t$morder->saveOrder();\t\t\t\t\r\n\t}\r\n}", "title": "" }, { "docid": "9892b933968c63d2ac9513a86032fa93", "score": "0.52162445", "text": "public function newOrder()\n {\n Session::forget('transaction_id');\n return Redirect::route('order.contact_details');\n }", "title": "" }, { "docid": "6a0cbd8b7a7af954853bdf3cbbcfb96b", "score": "0.5197094", "text": "public function _auto_generate_order($paypal_id, $customer_session_id)\n\t\t{\n\t\t\t$order_ref = $this->site_security->generate_random_string(6);\n\t\t\t$order_ref = strtoupper($order_ref);\n\n\t\t\t$data['order_ref'] = $order_ref;\n\t\t\t$data['date_created'] = time();\n\t\t\t$data['paypal_id'] = $paypal_id;\n\t\t\t$data['session_id'] = $customer_session_id;\n\t\t\t$data['opened'] = 0;\n\t\t\t$data['order_status'] = 0;\n\t\t\t$data['shopper_id'] = $this->_get_shopper_id($customer_session_id);\n\t\t\t$data['mc_gross'] = $this->_get_mc_gross($paypal_id);\n\n\t\t\t$this->_insert($data);\n\n\t\t\t//transfers from store_basket to store_shoppertrack\n\t\t\t$this->store_shoppertrack->_transfer_from_basket($customer_session_id);\n\t\t}", "title": "" }, { "docid": "4cc6ce9f12b09cc345c4de280af20ef1", "score": "0.5193817", "text": "public function createNewOrder() {\n $transaction = $this->transaction;\n\n if (!empty($transaction->orderId)) {\n throw new Exception(t('Cannot create order for transaction @id, it is already associated with order #@order_id.', array(\n '@id' => $transaction->transactionId,\n '@order_id' => $transaction->orderId,\n )));\n }\n else {\n $order = commerce_order_new($transaction->uid, 'commerce_pos_in_progress');\n $order->uid = 0;\n $order_wrapper = entity_metadata_wrapper('commerce_order', $order);\n\n $administrative_area = NULL;\n\n // Let other modules decide what the default province/state should be.\n drupal_alter('commerce_pos_transaction_state', $administrative_area, $this->transaction);\n\n if (!empty($administrative_area)) {\n // Create new default billing profile.\n $billing_profile = entity_create('commerce_customer_profile', array('type' => 'billing'));\n $profile_wrapper = entity_metadata_wrapper('commerce_customer_profile', $billing_profile);\n\n $profile_wrapper->commerce_customer_address->set(array(\n 'administrative_area' => $administrative_area,\n ));\n\n $profile_wrapper->save();\n $order_wrapper->commerce_customer_billing->set($billing_profile);\n }\n\n commerce_order_save($order);\n\n $transaction->orderId = $order->order_id;\n $transaction->setOrder($order);\n $transaction->doAction('save');\n\n return $transaction->getOrder();\n }\n }", "title": "" }, { "docid": "7959bd35ecc6b111c6e69df2d25ed423", "score": "0.51874554", "text": "public function creating(Purchaseorder $purchaseorder): void\n {\n if (!$purchaseorder->vendor_id)\n {\n // This needs to throw an exception since this is required.\n }\n\n if (!$purchaseorder->user_id)\n {\n $purchaseorder->user_id = auth()->user()->id;\n }\n\n if (!$purchaseorder->purchaseorder_date)\n {\n $purchaseorder->purchaseorder_date = date('Y-m-d');\n }\n\n if (!$purchaseorder->due_at)\n {\n $purchaseorder->due_at = DateFormatter::incrementDateByDays($purchaseorder->purchaseorder_date->format('Y-m-d'), $purchaseorder->vendor->vendor_terms);\n }\n\n if (!$purchaseorder->company_profile_id)\n {\n $purchaseorder->company_profile_id = config('bt.defaultCompanyProfile');\n }\n\n if (!$purchaseorder->group_id)\n {\n $purchaseorder->group_id = config('bt.purchaseorderGroup');\n }\n\n if (!$purchaseorder->number)\n {\n $purchaseorder->number = Group::generateNumber($purchaseorder->group_id);\n }\n\n if (!isset($purchaseorder->terms))\n {\n $purchaseorder->terms = config('bt.purchaseorderTerms');\n }\n\n if (!isset($purchaseorder->footer))\n {\n $purchaseorder->footer = config('bt.purchaseorderFooter');\n }\n\n if (!$purchaseorder->purchaseorder_status_id)\n {\n $purchaseorder->purchaseorder_status_id = PurchaseorderStatuses::getStatusId('draft');\n }\n\n if (!$purchaseorder->currency_code)\n {\n $purchaseorder->currency_code = $purchaseorder->vendor->currency_code;\n }\n\n if (!$purchaseorder->template)\n {\n $purchaseorder->template = $purchaseorder->companyProfile->purchaseorder_template;\n }\n\n if ($purchaseorder->currency_code == config('bt.baseCurrency'))\n {\n $purchaseorder->exchange_rate = 1;\n }\n elseif (!$purchaseorder->exchange_rate)\n {\n $currencyConverter = CurrencyConverterFactory::create();\n $purchaseorder->exchange_rate = $currencyConverter->convert(config('bt.baseCurrency'), $purchaseorder->currency_code);\n }\n\n $purchaseorder->url_key = str_random(32);\n }", "title": "" }, { "docid": "27b1bb93c338cd5e80087026df862353", "score": "0.5183705", "text": "function tbx_order_create(Request $request, Response $response)\n {\n \t$res = array( 'message_code' => 999, 'message_text' => 'Functional part is commented.' );\n\n \t$db = database();\n \t$body = $request->getParsedBody();\n\n \t$companyid = $body['CompanyId'];\n \t$registrationid= $body['RegistrationId'];\n \t$jobsiteid =$body['JobSiteId'];\n \t$drivernotes =$body['Notes'];\n \t$taxamount = $body['TaxAmount'];\n \t$deliverycharges= $body['DeliveryCharges'];\n \t$totalamount= $body['TotalAmount'];\n \t$CreatedBy= $body['RegistrationId'];\n \t$orderdate = date('Y-m-d H:i:s');\n \n $CreatedOn = date('Y-m-d H:i:s');\n\n if (($companyid == null) || ($companyid==\"\"))\n \t\t$res = array( 'message_code' => 999, 'message_text' => 'Company id cannot be blank.');\n \telse if (($registrationid == null) || ($registrationid==\"\"))\n \t\t$res = array( 'message_code' => 999, 'message_text' => 'Registratin id cannot be blank.');\n \telse if (($jobsiteid == null) || ($jobsiteid==\"\"))\n \t\t$res = array( 'message_code' => 999, 'message_text' => 'Jobsite id cannot be blank.');\n \telse if (($drivernotes == null) || ($drivernotes==\"\"))\n \t\t$res = array( 'message_code' => 999, 'message_text' => 'Driver notes cannot be blank.');\n \telse if (($taxamount == null) || ($taxamount==\"\"))\n \t\t$res = array( 'message_code' => 999, 'message_text' => 'Tax amount cannot be blank.');\n \telse if (($deliverycharges == null) || ($deliverycharges==\"\"))\n \t\t$res = array( 'message_code' => 999, 'message_text' => 'Delivery charges cannot be blank.');\n \telse if (($totalamount == null) || ($totalamount==\"\"))\n \t\t$res = array( 'message_code' => 999, 'message_text' => 'Total amount cannot be blank.');\n \telse\n \t{\n \t$base_query = $db->get_row('SELECT COUNT(*) AS cartcount FROM `tbl_cart` WHERE RegistrationId=' . $registrationid);\n \tif(!$base_query )\n \t{\n \t\t$res = array( 'message_code' => 999, 'message_text' => 'Please try again.');\n \t}\n \telseif($base_query->cartcount >= 1)\n \t{\n \t \n \t\t$query = 'INSERT INTO `tbl_order`(CompanyId, RegistrationId, JobSiteId, TaxAmount, DeliveryCharges, TotalAmount, Notes, OrderDate, CreatedBy, CreatedOn) VALUES(\"'.$companyid.'\",\"'.$registrationid.'\",\"'.$jobsiteid.'\",\"'.$taxamount.'\",\"'.$deliverycharges.'\", \"'.$totalamount.'\", \"'.$drivernotes.'\" ,\"'.$orderdate.'\", \"'.$CreatedBy.'\", \"'. $CreatedOn .'\")';\n \t\t$result = $db->query($query);\n \t\tif (!$result) \n \t\t{\n \t\t\t$res = array( 'message_code' => 999, 'message_text' => 'Your order failed please try again.');\n \t\t}\n \t\telse\n \t\t{\n \t\t\t$order_id = $db->insert_id;\n \t\t\t$result = 'INSERT INTO `tbl_order_details` (OrderId, ProductId, Quantity, Rate, Amount,CreatedOn) SELECT tbo.OrderId, tc.ProductId, tc.Quantity, P.Rate as Rate, P.Rate * tc.Quantity as Amount, \"'. $CreatedOn .'\" FROM `tbl_cart` tc ,`tbl_order` tbo, tbl_product as P WHERE P.ProductId = tc.ProductId and tc.RegistrationId = tbo.RegistrationId AND tbo.OrderId = ' . $order_id;\n \t\t\t$base_query = $db->query($result);\n \t\t\tif(!$base_query)\n \t\t\t{\t\t\t\t\n \t\t\t\t$res = array( 'message_code' => 999, 'message_text' => 'Your product order failed please try again.');\n \t\t\t}\n \t\t\telse\n \t\t\t{\n $base_query = $db->get_row('SELECT RegistrationName, RegistrationEmail FROM tbl_registration WHERE RegistrationId=' . $registrationid);\n\n $name = $base_query->RegistrationName;\n $email = $base_query->RegistrationEmail;\n\n send_order_email($name, $email, $order_id);\n \t\t\t\t$res = array( 'message_code' => 1000,'message_text' => 'Order Placed Successfully.');\n \t\t\t}\t\t\n \t\t\t\t\t\n \t\t} \n \t\t\n \t\t$base_sql = $db->get_row(' SELECT MAX(OrderId) AS MaxOrderID FROM `tbl_order` WHERE Delivered=\\'N\\' ');\n \t\t$res = array( 'message_code' => 1000,'data_text'=> $base_sql);\n \t}\n \telse\n \t \t$res = array( 'message_code' => 999,'data_text'=>'You can not place order!. your cart is empty.');\n }\n \treturn $response->withJson( $res, 200 );\n }", "title": "" }, { "docid": "c8d7278985d74429695010f1cbdb1c69", "score": "0.5180686", "text": "public function createPreautorisation($token, $userId, $CardId, $orderId, $formUrl) {\n\n\t\t// Get admin conf in ../Helper/Data.php\n\t\t$urlKey = \"preauthorizations/card/direct\";\n\t\t$apiInfos = Mage::helper(\"Easyrenter_Mangopay\")->getApiInfos($urlKey, true);\n\n\t\t//Récupérer certaines variables\n\t\t$order = Mage::getModel('sales/order')->load($orderId, 'increment_id');\n\t\t$orderGrandTotal = $order->getGrandTotal();\n $orderGrandTotalFormated = substr($orderGrandTotal, 0, -2);\n $orderGrandTotalFormated = str_replace(\".\",\"\",$orderGrandTotalFormated);\n //$orderGrandTotalFormated = \"100\";\n\t\t$address = $order->getBillingAddress();\n \t$customerStreet = $address->getStreet();\n\n\t\t// Curl authentification\n\t\t$curl = curl_init();\n\t\tcurl_setopt($curl, CURLOPT_HTTPHEADER, array(\n\t\t\t\"Authorization: Bearer \".$token,\n\t\t\t\"Content-Type: application/json; charset=utf-8\",\n\t\t\t\"Accept:application/json, text/javascript, */*; q=0.01\"\n\t\t));\n\t\tcurl_setopt($curl, CURLOPT_URL, $apiInfos[\"url\"]);\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);\n\t\tcurl_setopt($curl, CURLOPT_FOLLOWLOCATION, TRUE);\n\t\tcurl_setopt($curl, CURLOPT_VERBOSE, TRUE);\n\t\tcurl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n\t\tcurl_setopt($curl, CURLOPT_POST, 1);\n\t\tcurl_setopt($curl, CURLOPT_POSTFIELDS, '{\n\t\t\t\"Tag\": \"'.$orderId.',reservation\",\n\t\t\t\"AuthorId\": \"'.$userId.'\",\n\t\t\t\"CardId\": \"'.$CardId.'\",\n\t\t\t\"DebitedFunds\": {\n\t\t\t\"Currency\": \"EUR\",\n\t\t\t\"Amount\": '.$orderGrandTotalFormated.'\n\t\t\t},\n\t\t\t\"Billing\": {\n\t\t\t\"Address\": {\n\t\t\t\"AddressLine1\": \"'.$customerStreet[0].'\",\n\t\t\t\"AddressLine2\": \"-\",\n\t\t\t\"City\": \"'.$address->getCity().'\",\n\t\t\t\"Region\": \"-\",\n\t\t\t\"PostalCode\": \"'.$address->getPostcode().'\",\n\t\t\t\"Country\": \"'.$address->getCountryId().'\"\n\t\t\t}\n\t\t\t},\n\t\t\t\"SecureMode\": \"DEFAULT\",\n\t\t\t\"SecureModeReturnURL\": \"'.$formUrl.'\"\n\t\t}');\n\n\t\t$result = curl_exec($curl);\n\n\t if (curl_errno($curl)) {\n\t print curl_error($curl);\n\t } else {\n\t curl_close($curl);\n\t }\n\n\t return $result;\n\t}", "title": "" }, { "docid": "17f64e289941ded30bb98bbb1109684a", "score": "0.51707554", "text": "public function process_pre_order_release_payment( $order ) {\n\t\ttry {\n\t\t\t// Define some callbacks if the first attempt fails.\n\t\t\t$retry_callbacks = array(\n\t\t\t\t'remove_order_source_before_retry',\n\t\t\t\t'remove_order_customer_before_retry',\n\t\t\t);\n\n\t\t\twhile ( 1 ) {\n\t\t\t\t$source = $this->prepare_order_source( $order );\n\t\t\t\t$response = WC_Stripe_API::request( $this->generate_payment_request( $order, $source ) );\n\n\t\t\t\tif ( ! empty( $response->error ) ) {\n\t\t\t\t\tif ( 0 === sizeof( $retry_callbacks ) ) {\n\t\t\t\t\t\tthrow new Exception( $response->error->message );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$retry_callback = array_shift( $retry_callbacks );\n\t\t\t\t\t\tcall_user_func( array( $this, $retry_callback ), $order );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Successful\n\t\t\t\t\t$this->process_response( $response, $order );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch ( Exception $e ) {\n\t\t\t/* translators: error message */\n\t\t\t$order_note = sprintf( __( 'Stripe Transaction Failed (%s)', 'woocommerce-gateway-stripe' ), $e->getMessage() );\n\n\t\t\t// Mark order as failed if not already set,\n\t\t\t// otherwise, make sure we add the order note so we can detect when someone fails to check out multiple times\n\t\t\tif ( ! $order->has_status( 'failed' ) ) {\n\t\t\t\t$order->update_status( 'failed', $order_note );\n\t\t\t} else {\n\t\t\t\t$order->add_order_note( $order_note );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "657b66df8892249268123620849cd1b9", "score": "0.5170106", "text": "function jigoshop_pay_for_existing_order( $pay_for_order ) {\n\n\tglobal $order;\n\n\t$order = $pay_for_order;\n\n\tjigoshop_get_template('checkout/pay_for_order.php');\n\n}", "title": "" }, { "docid": "40561398e532db1f42a7327381ce482b", "score": "0.51668483", "text": "public function store(Request $request)\n {\n try {\n $stripe = new Stripe('sk_test_yFcD25UJcR3pRMn7WYxuMfI700OpYYSFf3');\n $charge = $stripe->charges()->create([\n 'amount' => Cart::total(),\n 'currency' => 'USD',\n 'source' => request()->stripeToken,\n 'description' => 'Order',\n 'receipt_email' => request()->email,\n ]);\n\n if ($charge) {\n\n $payment = new Payment();\n $payment->id = $charge['id'];\n $payment->amount = $charge['amount'] / 100;\n $payment->postal_code = $charge['billing_details']['address']['postal_code'];\n $payment->currency = $charge['currency'];\n $payment->payment_method = $charge['payment_method'];\n $payment->receipt_email = $charge['receipt_email'];\n $payment->receipt_url = $charge['receipt_url'];\n $payment->status = $charge['status'];\n\n if ($payment->save()) {\n\n $this->customer = auth()->guard('customer')->user();\n\n $order = new Order();\n $order->user_id = $this->customer->id;\n $order->payment_id = $payment->id; // $payment->id\n $order->status_id = 4;\n\n if ($order->save()) {\n\n foreach (Cart::content() as $key => $cart) {\n\n $item = new OrderItem();\n $item->order_id = $order->id;\n $item->product_id = $cart->id;\n $item->color_id = 1;\n $item->price = $cart->price;\n $item->qty = $cart->qty;\n $item->amount = $cart->total;\n $item->save();\n }\n\n $request->merge([\n 'customer_id' => $this->customer->id,\n 'order_id' => $order->id\n ]);\n\n if (ShippingAddress::create($request->all())) {\n Cart::destroy();\n $noti = new Notification();\n $noti->customer_id = $this->customer->id;\n $noti->order_id = $order->id;\n\n $url = route('admin.order', $order->id);\n if ($noti->save()) {\n\n $noti->toMultiDevice(User::all(), 'title', 'body', null, $url);\n }\n\n /* $token = 'coSYTXVthR0:APA91bGfJN1_FViYa2SlUIUbnAdN5nATsiKMdUyfKDtc0cL-abg0NhPSqdUOZg3Ih2v2vx-pbaDFe2Xl0xC9pCv40nHq47eNn7jIen6PMTktMFY3XhkQrCzXeJdyQgL8GzvRRSeUEBP8';\n $noti->toSingleDevice($token, 'title', 'body', null, null);*/\n }\n\n }\n\n return redirect()->route('thank');\n }\n\n }\n\n } catch (\\Exception $e) {\n echo \"Error: \" . $e->getMessage();\n }\n }", "title": "" }, { "docid": "4465899dfc79b29d8d63ca0c4e7b4b4a", "score": "0.51542526", "text": "protected function generate_payment_request( $order, $renewal=false ) {\n\n\t\t$post_data = array();\n\t\tif ( $renewal ) {\n\t\t\t$card_id = get_post_meta( $order->get_id(), '_qualpay_payment_id', true );\n\t\t\t$post_data['card_id'] = $card_id;\n\t\t} else {\n\t\t\tif ( isset( $_POST['qualpay_card_id'] ) ) {\n\t\t\t\t$post_data['card_id'] = wc_clean( $_POST['qualpay_card_id'] );\n\t\t\t} else {\n\n\t\t\t\t$post_data['card_number'] = str_replace( ' ', '', wc_clean( $_POST['qualpay-card-number'] ) );\n\t\t\t\t$exp_date = wc_clean( $_POST['qualpay-card-expiry'] );\n\t\t\t\t$exp_date = substr( $exp_date, 0, 2 ) . substr( $exp_date, 5, 2 );\n\t\t\t\t$post_data['exp_date'] = $exp_date;\n\t\t\t\t$post_data['cvv2'] = wc_clean( $_POST['qualpay-card-cvc'] );\n\n\t\t\t}\n\t\t}\n\t\t$billing_first_name = version_compare( WC_VERSION, '3.0.0', '<' ) ? $order->billing_first_name : $order->get_billing_first_name();\n\t\t$billing_last_name = version_compare( WC_VERSION, '3.0.0', '<' ) ? $order->billing_last_name : $order->get_billing_last_name();\n\t\t$post_data['cardholder_name'] = $billing_first_name . ' ' . $billing_last_name;\n\t\t$post_data['amt_tran'] = $order->get_total( 'edit' );\n\t\t$post_data['purchase_id'] = $order->get_order_number();\n\t\t$post_data['tran_currency'] = version_compare( WC_VERSION, '3.0.0', '<' ) ? $order->get_order_currency() : $order->get_currency();\n\n\t\t$post_data['customer_email'] = version_compare( WC_VERSION, '3.0.0', '<' ) ? $order->billing_email : $order->get_billing_email();\n\t\t$post_data['developer_id'] = 'Qualpay';\n\t\t$post_data['email_receipt'] = false;\n\t\t$post_data['tokenize'] = true;\n\n\t\t// TODO add customer array\n\t\t$customer = array();\n\n\t\t// TODO add shipping array\n\t\t$shipping_address = array();\n\n\t\t// TODO add line_items\n\n\t\t/**\n\t\t * Filter the return value of the WC_Payment_Gateway_CC::generate_payment_request.\n\t\t *\n\t\t * @since 3.1.0\n\t\t * @param array $post_data\n\t\t * @param WC_Order $order\n\t\t * @param object $source\n\t\t */\n\t\treturn apply_filters( 'wc_qualpay_generate_payment_request', $post_data, $order );\n\t}", "title": "" }, { "docid": "c5599503c2afbdf76b44651e6f883c13", "score": "0.51350534", "text": "protected function _confirmOrder($data)\r\n {\r\n if (!$this->_succeeded($this->order)) {\r\n if ($data['paymentState'] == 'PENDING') {\r\n $this->order->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, true, Mage::helper('wirecard_checkout_page')->__('The payment authorization is pending.'))->save();\r\n } else {\r\n $this->order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true, Mage::helper('wirecard_checkout_page')->__('The amount has been authorized and captured by Wirecard Checkout Page.'))->save();\r\n // invoice payment\r\n if ($this->order->canInvoice()) {\r\n\r\n $invoice = $this->order->prepareInvoice();\r\n $invoice->register()->capture();\r\n Mage::getModel('core/resource_transaction')\r\n ->addObject($invoice)\r\n ->addObject($invoice->getOrder())\r\n ->save();\r\n }\r\n // send new order email to customer\r\n $this->order->sendNewOrderEmail();\r\n }\r\n }\r\n $payment = $this->order->getPayment();\r\n $additionalInformation = Array();\r\n $additionalInformationString = '';\r\n\r\n foreach($data as $fieldName => $fieldValue) {\r\n switch ($fieldName) {\r\n case 'amount':\r\n case 'currency':\r\n case 'language':\r\n case 'responseFingerprint':\r\n case 'responseFingerprintOrder':\r\n case 'form_key':\r\n case 'paymentState':\r\n case 'orderId':\r\n break;\r\n\r\n default:\r\n $additionalInformation[htmlentities($fieldName)] = htmlentities($fieldValue);\r\n $additionalInformationString .= ' | '.$fieldName.' - '.$fieldValue;\r\n }\r\n }\r\n\r\n if (count($additionalInformation) != 0) {\r\n\r\n $payment->setAdditionalInformation($additionalInformation);\r\n $payment->setAdditionalData(serialize($additionalInformation));\r\n\r\n if ($payment->hasAdditionalInformation()) {\r\n Mage::log('Added Additional Information to Order ' . $data['orderId'] . ' :'. $additionalInformationString);\r\n }\r\n }\r\n $payment->save();\r\n }", "title": "" }, { "docid": "132ddf69f9e6c26d0e6355b20fb89fea", "score": "0.51288456", "text": "public static function filter_orders_by_renewal_parent( $request ) {\n\t\tglobal $typenow;\n\t\t$query_arg = '_renewal_order_parent_id';\n\t\tif ( is_admin() && $typenow == 'shop_order' && isset( $_GET[ $query_arg ] ) && $_GET[ $query_arg ] > 0 ) {\n\t\t\t$request['post_parent'] = absint( $_GET[ $query_arg ] );\n\t\t}\n\t\treturn $request;\n\t}", "title": "" }, { "docid": "77671a0e7dbebbf2215eab4ff0f232e4", "score": "0.50929797", "text": "public static function generate_payment_info( $order, $sub_order = null, $extra_metadata = [] ) {\n $post_data = [];\n\n // add transfer group\n $transfer_group = __( 'Dokan Order# ', 'dokan' ) . $order->get_order_number();\n $post_data['transfer_group'] = apply_filters( 'dokan_stripe_transfer_group', $transfer_group, $order, $sub_order );\n\n $billing_email = $order->get_billing_email();\n $billing_first_name = $order->get_billing_first_name();\n $billing_last_name = $order->get_billing_last_name();\n\n $metadata = [\n 'customer_name' => sanitize_text_field( $billing_first_name ) . ' ' . sanitize_text_field( $billing_last_name ),\n 'customer_email' => sanitize_email( $billing_email ),\n 'order_id' => $order->get_id(),\n 'site_url' => esc_url( get_site_url() ),\n ];\n\n if ( self::has_subscription( $order->get_id() ) ) {\n $metadata += array(\n 'payment_type' => 'recurring',\n );\n }\n\n if ( is_array( $extra_metadata ) && ! empty( $extra_metadata ) ) {\n $metadata += $extra_metadata;\n }\n\n if ( ! is_null( $sub_order ) && $sub_order->get_id() !== $order->get_id() ) {\n /* translators: 1) blog name 2) order number 3) sub order number */\n $post_data['description'] = sprintf( __( '%1$1s - Order %2$2s, suborder of %3$3s', 'dokan' ), wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ), $sub_order->get_order_number(), $order->get_order_number() );\n\n //fix sub order metadata\n $metadata['order_id'] = $sub_order->get_id();\n $metadata['parent_order_id'] = $order->get_id();\n } else {\n /* translators: 1) blog name 2) order number */\n $post_data['description'] = sprintf( __( '%1$s - Order %2$s', 'dokan' ), wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ), $order->get_order_number() );\n }\n\n $post_data['metadata'] = apply_filters( 'dokan_stripe_payment_metadata', $metadata, $order, $sub_order );\n\n return apply_filters( 'dokan_stripe_generate_payment_info', $post_data, $order, $sub_order );\n }", "title": "" }, { "docid": "911ee591eb2cfe9a5fa4b7bc0b1fd4a0", "score": "0.5087355", "text": "function dokan_create_sub_order( $parent_order_id ) {\n\n $parent_order = new WC_Order( $parent_order_id );\n $order_items = $parent_order->get_items();\n\n $sellers = array();\n foreach ($order_items as $item) {\n $seller_id = get_post_field( 'post_author', $item['product_id'] );\n $sellers[$seller_id][] = $item;\n }\n\n // return if we've only ONE seller\n if ( count( $sellers ) == 1 ) {\n $temp = array_keys( $sellers );\n $seller_id = reset( $temp );\n wp_update_post( array( 'ID' => $parent_order_id, 'post_author' => $seller_id ) );\n return;\n }\n\n // flag it as it has a suborder\n update_post_meta( $parent_order_id, 'has_sub_order', true );\n\n // seems like we've got multiple sellers\n foreach ($sellers as $seller_id => $seller_products ) {\n dokan_create_seller_order( $parent_order, $seller_id, $seller_products );\n }\n}", "title": "" }, { "docid": "a433826103ffcb3e046d65a39e020ba1", "score": "0.5080996", "text": "function thrive_cart_renewal() {\n\tglobal $wpdb;\t\n\t//Lookup the license\n\t$order_id = $_REQUEST['order_id'];\n\t//load keys for this order\n\t$licenses = $wpdb->get_results('SELECT * FROM ' . $wpdb->prefix . 'product_licenses WHERE remote_order_id = ' . $order_id);\n\tforeach($licenses as $l) {\n\t\tif (isset(THRIVE_CART_MAP[ $l->remote_product_id ])) {\n\t\t\t//Get the duration exension code\n\t\t\t$duration = isset(THRIVE_CART_MAP[ $l->remote_product_id ]['payment_plans'][$l->remote_plan_id]) ? THRIVE_CART_MAP[ $l->remote_product_id ]['payment_plans'][$l->remote_plan_id] : -1;\n\t\t\tif ($duration != -1) {\n\t\t\t\t//Update expiration dates on the license\n\t\t\t\tWp_License_Manager_API::extend_license($l->id, $duration);\n\t\t\t} else {\n\t\t\t\terror_log('Warning: Remote plan id was not in the product map');\n\t\t\t}\n\t\t} else {\n\t\t\terror_log('Warning: Remote product ID was not in the product map ');\n\t\t}\n\t}\n\techo 'ok';\n\texit();\t\n}", "title": "" }, { "docid": "efaf1d80223fcdd779817d01b3b29f9b", "score": "0.507283", "text": "public function captureOrder(Varien_Event_Observer $observer)\n {\n $order = $observer->getEvent()->getOrder();\n\n // Check if the order was placed by a registered account or a\n // guest\n if($user_id = $order->getCustomerId()) {\n // Get a reference to the user\n $user = Mage::getModel('customer/customer')->load($user_id);\n\n // Check if the user has a \"mobweb_referralcoupon_referrer\"\n // attribute, which contains the user ID of the referring person, AND\n // if the \"mobweb_referralcoupon_claimed\" attribute is not set\n // to 1, because if it is, the coupon has already been sent to\n // the referring person\n if(($referrer_id = $user->getData('mobweb_referralcoupon_referrer')) && $user->getData('mobweb_referralcoupon_claimed') !== '1') {\n // Send the referring person a discount coupon\n $this->sendCoupon($referrer_id);\n\n // And update the \"mobweb_referralcoupon_claimed\" attribute to\n // indicate that the the referring person has already recieved a coupon\n // for this referral\n $user->setData('mobweb_referralcoupon_claimed', '1');\n $user->save();\n\n // Create a log entry\n Mage::helper('referralcoupon')->log(sprintf('Order captured by registered referred user %s, referred by %s', $user_id, $referrer_id));\n } else {\n // If the user doesn't have that attribute, check if\n // his account was created in the last 10 minutes, meaning\n // he registered while checking out. Unfortunately the\n // \"customer account created\" event is not fired if the\n // registration happens during the checkout, so we have to use \n // this workaround\n if($created_at_utc = $user->getData('created_at')) {\n // The \"Created At\" attribute always returns the creation\n // date in the UTC timezone, so we have to convert it to\n // the store's timezone to avoid bugs due to different\n // timezones on the server and Magento\n $created_at = Mage::getModel('core/date')->timestamp(strtotime($created_at_utc));\n $current = Mage::getModel('core/date')->timestamp(time());\n\n // If the account was created during the last 10 minutes,\n // the registration was during checkout\n if(($current-$created_at) < 60*10) {\n // Check if the \"referrer\" cookie exists\n if($referrer_id = Mage::getModel('core/cookie')->get(Mage::helper('referralcoupon')->cookie_name)) {\n\n // Send the referrer a discount coupon\n $this->sendCoupon($referrer_id);\n\n // Destroy the \"refferer\" cookie\n Mage::getModel('core/cookie')->delete(Mage::helper('referralcoupon')->cookie_name);\n\n // And update both the \"referrer\" and\n // \"coupon_claimed\" attributes on the referred person\n $user->setData('mobweb_referralcoupon_referrer', $referrer_id);\n $user->setData('mobweb_referralcoupon_claimed', '1');\n $user->save();\n\n // Create a log entry\n Mage::helper('referralcoupon')->log(sprintf('Order captured by newly registerd referred user %s, referred by %s', $user->getId(), $referrer_id));\n }\n }\n }\n }\n } else {\n // Check if the \"referrer\" cookie exists\n if($referrer_id = Mage::getModel('core/cookie')->get(Mage::helper('referralcoupon')->cookie_name)) {\n\n // Send the referring person a discount coupon\n $this->sendCoupon($referrer_id);\n\n // Destroy the \"refferer\" cookie\n Mage::getModel('core/cookie')->delete(Mage::helper('referralcoupon')->cookie_name);\n\n // Create a log entry\n Mage::helper('referralcoupon')->log(sprintf('Order captured by guest user with referral cookie, referred by %s', $referrer_id));\n }\n }\n }", "title": "" }, { "docid": "ade3b7cc5257752a470747add0f8d0fb", "score": "0.5068205", "text": "public function checkout(Order $order, Request $request)\n {\n $this->validate($request, [\n 'billing_first_name'=>'required',\n 'billing_last_name'=>'required',\n 'billing_address1'=>'required',\n 'billing_postcode'=>'required'\n ]);\n\n $order->load('customer','address');\n $customer = $order->customer;\n\n $address = $order->address->toArray();\n\n $nonceFromTheClient = $request->payment_method_nonce;\n\n\n /**\n * BUILD THE BRAINTREE TRANSACTION\n */\n $result = \\Braintree_Transaction::sale([\n 'amount' => $order->order_total,\n 'orderId'=> \"$order->id\",\n 'merchantAccountId' => 'gbp_account',\n 'paymentMethodNonce' => $nonceFromTheClient,\n 'customer' => [\n 'firstName' => $customer->first_name,\n 'lastName' => $customer->last_name,\n 'phone' => $customer->telephone,\n 'email' => $customer->email\n ],\n 'billing'=> [\n 'firstName' => $request->billing_first_name,\n 'lastName' => $request->billing_last_name,\n 'streetAddress' => $request->billing_address1,\n 'postalCode' => $request->billing_postcode\n ],\n 'options' => [\n 'submitForSettlement' => True\n ]\n ]);\n\n $transaction = $result->transaction;\n\n // LOG TO FILE FOR TESTING PURPOSES\n Log::info([\n 'transactionData'=>$transaction,\n 'result'=>$result\n ]);\n\n\n // CHECK TO SEE IF THE RESULT WAS SUCCESSFUL\n if($result->success){\n\n $order->payments()->create([\n 'customer_id'=>$customer->id,\n 'transaction_id'=>$transaction->id,\n 'payment_type'=>$transaction->paymentInstrumentType,\n 'amount'=>$transaction->amount,\n 'success'=>$result->success,\n ]);\n\n $status = OrderStatus::where('name','LIKE','%Artworker%')->first();\n $order->orderStatus()->associate($status);\n $order->save();\n\n return redirect()->action('UserOrderController@show',['order'=>$order->id])->with(['success'=>'Your payment was accepted','notification'=>true]);\n\n } else {\n\n return back()->with('error',$result->message);\n\n }\n\n }", "title": "" }, { "docid": "71bb26a6faefe3ab50d9c3631bb91ff5", "score": "0.50508446", "text": "public function create() {\n\t\t//\n\t\tsession_start();\n\t\t$_SESSION['Payment_Amount'] = 100;\n\t\trequire app_path() . '/Custom/expresscheckout.php';\n\t}", "title": "" }, { "docid": "347c59062cd36946c9442f663344b983", "score": "0.504973", "text": "function lgs_check_is_payment_for_parent_order_failed(){\n if( WC()->session->order_awaiting_payment > 0 ){\n if( ( $order = wc_get_order( WC()->session->order_awaiting_payment ) ) !== false ){\n if( wcs_order_contains_subscription( $order, array( 'parent' ) ) ){\n return true;\n }\n }\n }\n return false;\n}", "title": "" }, { "docid": "86f4668c838eedeb37afbb75c13a47b9", "score": "0.50487006", "text": "public function create_order($order_id)\n {\n if (is_admin()) {\n $this->retailcrm_process_order($order_id);\n }\n }", "title": "" }, { "docid": "65345306dbd4052b55f3af4e91245ca8", "score": "0.50480396", "text": "public function create_credit_card_charge() {\n\n\t\t$this->create_transaction( self::TRANSACTION_TYPE_PURCHASE );\n\t}", "title": "" }, { "docid": "28d1b62b67b221d6ef12f40ad83837c5", "score": "0.50452155", "text": "private function add_notes_scheduled_subscription_order( $sageresult, $order_id, $original_order_id, $VendorTxCode ) {\n\n $order = new WC_Order( $order_id );\n\n /**\n * Successful payment\n */\n $successful_ordernote = '';\n\n foreach ( $sageresult as $key => $value ) {\n $successful_ordernote .= $key . ' : ' . $value . \"\\r\\n\";\n }\n\n $order->add_order_note( __('Payment completed', 'sumopayments_sagepayform') . '<br />' . $successful_ordernote );\n\n update_post_meta( $order_id, '_transaction_id', str_replace( array('{','}'),'',$sageresult['VPSTxId'] ) );\n update_post_meta( $order_id, '_VPSTxId' , str_replace( array('{','}'),'',$sageresult['VPSTxId'] ) );\n update_post_meta( $order_id, '_SecurityKey' , $sageresult['SecurityKey'] );\n update_post_meta( $order_id, '_TxAuthNo' , $sageresult['TxAuthNo'] );\n delete_post_meta( $order_id, '_CV2Result' );\n delete_post_meta( $order_id, '_3DSecureStatus' );\n\n // update the original order with the renewal order transaction information\n update_post_meta( $original_order_id, '_RelatedVPSTxId' , str_replace( array('{','}'),'',$sageresult['VPSTxId'] ) );\n update_post_meta( $original_order_id, '_RelatedVendorTxCode' , $VendorTxCode );\n update_post_meta( $original_order_id, '_RelatedSecurityKey' , $sageresult['SecurityKey'] );\n update_post_meta( $original_order_id, '_RelatedTxAuthNo' , $sageresult['TxAuthNo'] );\n\n }", "title": "" }, { "docid": "253264cd35acb3d448d3067e9698a401", "score": "0.5039385", "text": "public function createRecurringProfileChildOrder($profile){\n /* Create and save a new order. */\n $order = $profile->createOrder();\n $order->save();\n\n /* Get the order item data and the product. */\n $orderItemInfo = $profile->getOrderItemInfo();\n $product = Mage::getModel('catalog/product')->loadByAttribute('entity_id', $orderItemInfo['product_id']);\n\n /* Create initial item. */\n $initOrderItem = Mage::getModel('sales/order_item')\n ->setStoreId(Mage::app()->getStore()->getStoreId())\n ->setQuoteItemId(NULL)\n ->setQuoteParentItemId(NULL)\n ->setProductId($orderItemInfo['product_id'])\n ->setProductType($orderItemInfo['product_type'])\n ->setQtyBackordered(NULL)\n ->setTotalQtyOrdered(1)\n ->setQtyOrdered(1)\n ->setName($product->getName())\n ->setSku('initial_fee')\n ->setPrice($profile->getInitAmount())\n ->setBasePrice($profile->getInitAmount())\n ->setOriginalPrice($profile->getInitAmount())\n ->setRowTotal($profile->getInitAmount())\n ->setBaseRowTotal($profile->getInitAmount())\n ->setOrder($order);\n $initOrderItem->save();\n\n /* Create trial item. */\n $trialOrderItem = Mage::getModel('sales/order_item')\n ->setStoreId(Mage::app()->getStore()->getStoreId())\n ->setQuoteItemId(NULL)\n ->setQuoteParentItemId(NULL)\n ->setProductId($orderItemInfo['product_id'])\n ->setProductType($orderItemInfo['product_type'])\n ->setQtyBackordered(NULL)\n ->setTotalQtyOrdered(1)\n ->setQtyOrdered(1)\n ->setName($product->getName())\n ->setSku('trial_fee')\n ->setPrice($profile->getTrialBillingAmount())\n ->setBasePrice($profile->getTrialBillingAmount())\n ->setOriginalPrice($profile->getTrialBillingAmount())\n ->setRowTotal($profile->getTrialBillingAmount())\n ->setBaseRowTotal($profile->getTrialBillingAmount())\n ->setOrder($order);\n $trialOrderItem->save();\n\n /* Create period item. */\n $periodOrderItem = Mage::getModel('sales/order_item')\n ->setStoreId(Mage::app()->getStore()->getStoreId())\n ->setQuoteItemId(NULL)\n ->setQuoteParentItemId(NULL)\n ->setProductId($orderItemInfo['product_id'])\n ->setProductType($orderItemInfo['product_type'])\n ->setQtyBackordered(NULL)\n ->setTotalQtyOrdered(1)\n ->setQtyOrdered(1)\n ->setName($product->getName())\n ->setSku($product->getSku())\n ->setPrice($profile->getBillingAmount())\n ->setBasePrice($profile->getBillingAmount())\n ->setOriginalPrice($profile->getBillingAmount())\n ->setRowTotal($profile->getBillingAmount())\n ->setBaseRowTotal($profile->getBillingAmount())\n ->setOrder($order);\n $periodOrderItem->save();\n\n /* Calculate the order amount. */\n $amount = $profile->getShippingAmount() + $profile->getTaxAmount();\n /* Set the order amount. */\n $order->setSubtotal($amount)\n ->setGrandTotal($amount)\n ->setBaseSubtotal($amount)\n ->setBaseGrandTotal($amount)\n ->setTotalInvoiced($amount)\n ->setTotalPaid($amount)\n ->setBaseTotalPaid($amount)\n ->setSubtotalInvoiced($amount)\n ->setTotalOnlineRefunded(0)\n ->setTotalRefunded(0)\n ->setTotalDue(0)\n ->setBaseTotalInvoicedCost(0)\n ->setBaseTotalOnlineRefunded(0)\n ->setBaseTotalRefunded(0)\n ->setBaseTotalDue(0);\n $order->save();\n\n /* Add the new order to the profile. */\n $profile->addOrderRelation($order->getId());\n }", "title": "" }, { "docid": "f2cbd380d023fb48ed975f1bfc2b0bbe", "score": "0.50378203", "text": "protected function _preparePayerNew(){\r\n\r\n $order = $this->_service->getOrder();\r\n $helper = $this->_getHelper();\r\n $transactionReference = $this->_service->getTransactionReference();\r\n\r\n $address = $order->getBillingAddress();\r\n\r\n $request = array(\r\n 'attributes' => array(\r\n 'timestamp' => $helper->getTimestamp(),\r\n 'type' => 'payer-new'\r\n ),\r\n 'merchantid' => array('value' => $helper->getConfigData('realex','vendor')),\r\n 'orderid' => array('value' => $transactionReference . '-payer')\r\n );\r\n\r\n $this->_payerRef = $helper->createPayerRef($this->_customer);\r\n $payer = array(\r\n 'attributes' => array(\r\n 'ref' => $this->_payerRef,\r\n 'type'=> $helper->getConfigData('realvault','payer_type')\r\n ),\r\n 'firstname' => array('value' => $helper->ss($this->_customer->getFirstname(),30)),\r\n 'surname' => array('value' => $helper->ss($this->_customer->getLastname(),50)),\r\n 'email' => array('value' => $helper->realexEmail($helper->ss($this->_customer->getEmail(),50)))\r\n );\r\n\r\n $payerAddress = array(\r\n\r\n 'line1' => array('value' => $helper->ss($address->getStreet(1),50)),\r\n 'line2' => array('value' => $helper->ss($address->getStreet(2),50)),\r\n 'line3' => array('value' => $helper->ss($address->getStreet(3),50)),\r\n 'city' => array('value' => $helper->ss($address->getCity(),20)),\r\n 'county'=> array('value' => $address->getRegion()),\r\n 'postcode' => array('value' => $helper->ss($address->getPostcode(),8)),\r\n 'country' => array(\r\n 'attributes' => array(\r\n 'code' => $address->getCountryId()\r\n ),\r\n 'value' => Mage::app()->getLocale()->getCountryTranslation($address->getCountryId())\r\n )\r\n );\r\n\r\n $payer['address'] = $payerAddress;\r\n $request['payer'] = $payer;\r\n\r\n $sha1hash = array(\r\n $request['attributes']['timestamp'] ,\r\n $request['merchantid']['value'],\r\n $request['orderid']['value'],\r\n '',\r\n '',\r\n $this->_payerRef\r\n );\r\n\r\n $request['sha1hash'] = array('value' => $helper->generateSha1Hash($helper->getConfigData('realex','secret'),$sha1hash));\r\n\r\n $this->_message->setData(array('request'=>$request));\r\n return $this;\r\n }", "title": "" }, { "docid": "be3bd0146ef41ae0725be537b38122a6", "score": "0.5036134", "text": "function process_scheduled_subscription_payment( $amount_to_charge, $order, $product_id = NULL ) {\n\n if( !is_object( $order ) ) {\n $order = new WC_Order( $order );\n }\n\n // WooCommerce 3.0 compatibility\n $order_id = is_callable( array( $order, 'get_id' ) ) ? $order->get_id() : $order->id;\n\n $VendorTxCode = 'Renewal-' . $order_id . '-' . time();\n\n // SAGE Line 50 Fix\n $VendorTxCode = str_replace( 'order_', '', $VendorTxCode );\n\n // New API Request for repeat\n $api_request = 'VPSProtocol=' . urlencode( $this->vpsprotocol );\n $api_request .= '&TxType=REPEAT';\n $api_request .= '&Vendor=' . urlencode( $this->vendor );\n $api_request .= '&VendorTxCode=' . $VendorTxCode;\n $api_request .= '&Amount=' . urlencode( $amount_to_charge );\n $api_request .= '&Currency=' . get_post_meta( $order_id, '_order_currency', true );\n $api_request .= '&Description=Repeat payment for order ' . $order_id;\n $api_request .= '&RelatedVPSTxId=' . get_post_meta( $order_id, '_RelatedVPSTxId', true );\n $api_request .= '&RelatedVendorTxCode=' . get_post_meta( $order_id, '_RelatedVendorTxCode', true );\n $api_request .= '&RelatedSecurityKey=' . get_post_meta( $order_id, '_RelatedSecurityKey', true );\n $api_request .= '&RelatedTxAuthNo=' . get_post_meta( $order_id, '_RelatedTxAuthNo', true );\n\n $result = $this->sagepay_post( $api_request, $this->repeatURL );\n\n if ( 'OK' != $result['Status'] ) {\n\n $content = 'There was a problem renewing this payment for order ' . $order_id . '. The Transaction ID is ' . $api_request['RelatedVPSTxId'] . '. The API Request is <pre>' .\n print_r( $api_request, TRUE ) . '</pre>. SagePay returned the error <pre>' .\n print_r( $result['StatusDetail'], TRUE ) . '</pre> The full returned array is <pre>' .\n print_r( $result, TRUE ) . '</pre>. ';\n\n wp_mail( $this->notification ,'SagePay Renewal Error ' . $result['Status'] . ' ' . time(), $content );\n\n WC_Subscriptions_Manager::process_subscription_payment_failure_on_order( $order, $product_id );\n\n } else {\n\n WC_Subscriptions_Manager::process_subscription_payments_on_order( $order );\n\n /**\n * Update the renewal order with the transaction info from Sage\n * and update the original order with the renewal order\n */\n $renewal_orders = WC_Subscriptions_Renewal_Order::get_renewal_orders( $order_id );\n $renewal_order = end( array_values($renewal_orders) );\n $this->add_notes_scheduled_subscription_order( $result, $renewal_order, $order_id, $VendorTxCode );\n }\n\n }", "title": "" }, { "docid": "290705645c3194e1fb464208bd87aad3", "score": "0.50230753", "text": "public function setup_parent_transaction()\n {\n $parent_transaction = $this->get_expiring_transaction();\n return MPCA_Sync_Transactions::setup_parent_transaction($parent_transaction, $this->id);\n }", "title": "" }, { "docid": "06963061c9b29270bfa1de9637d5e1e7", "score": "0.50228614", "text": "function createOrder()\t{\n\t\tglobal $TSFE;\n\n\t\t$newId = 0;\n\t\t$pid = intval($this->conf['PID_sys_products_orders']);\n\t\tif (!$pid)\t$pid = intval($TSFE->id);\n\n\t\tif ($TSFE->sys_page->getPage_noCheck ($pid))\t{\n\t\t\t$advanceUid = 0;\n\t\t\tif ($this->conf['advanceOrderNumberWithInteger'] || $this->conf['alwaysAdvanceOrderNumber'])\t{\n\t\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'sys_products_orders', '', '', 'uid DESC', '1');\n\t\t\t\tlist($prevUid) = $GLOBALS['TYPO3_DB']->sql_fetch_row($res);\n\n\t\t\t\tif ($this->conf['advanceOrderNumberWithInteger']) {\n\t\t\t\t\t$rndParts = explode(',',$this->conf['advanceOrderNumberWithInteger']);\n\t\t\t\t\t$advanceUid = $prevUid+t3lib_div::intInRange(rand(intval($rndParts[0]),intval($rndParts[1])),1);\n\t\t\t\t} else {\n\t\t\t\t\t$advanceUid = $prevUid + 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$insertFields = array(\n\t\t\t\t'pid' => $pid,\n\t\t\t\t'tstamp' => time(),\n\t\t\t\t'crdate' => time(),\n\t\t\t\t'deleted' => 1\n\t\t\t);\n\t\t\tif ($advanceUid > 0)\t{\n\t\t\t\t$insertFields['uid'] = $advanceUid;\n\t\t\t}\n\n\t\t\t$GLOBALS['TYPO3_DB']->exec_INSERTquery('sys_products_orders', $insertFields);\n\n\t\t\t$newId = $GLOBALS['TYPO3_DB']->sql_insert_id();\n\t\t}\n\t\treturn $newId;\n\t}", "title": "" }, { "docid": "da9aaddd3ee87423e59907b0fdd9df00", "score": "0.5009415", "text": "public function create_charge() {\n\n\t\t$this->transaction_type = 'ccsale';\n\n\t\t$this->create_transaction();\n\t}", "title": "" }, { "docid": "52e601941586f658094d09abe01bc4f6", "score": "0.5005872", "text": "public function postcheckout(Request $request)\n {\n if(!Session::has('cart'))\n {\n return redirect('/cart' );\n }\n $oldCart=Session::get('cart');\n $cart=new Cart($oldCart);\n Session::forget('cart');\n $order=new Order();\n\n $order->cart=serialize($cart);\n $order->address=$request->input('address');\n $order->name=$request->input('name');\n Auth::user()->orders()->save($order);\n\n //return redirect('/')->with('msg','order successfully created');\n return redirect('/tyre')->with('success','order successfully created');\n\n }", "title": "" }, { "docid": "f7358331fbc3eb0b291c817a755a61d8", "score": "0.50050503", "text": "public function process() {\n// See your keys here https://dashboard.stripe.com/account/apikeys\n \\Stripe\\Stripe::setApiKey(\"sk_test_soF49jJG1VAE4rIBq9Qoivpd\");\n\n// Get the credit card details submitted by the form\n $token = Request::input('stripeToken');\n\n// Get id to create query\n $order_id = Request::input('order_id');\n\n// Get Email to sent online receipt\n $email = Request::input('email');\n\n//query to get price \n $order = order::findorFail($order_id);\n $total = $order->total;\n $tip = $order->tip;\n\n// Create the charge on Stripe's servers - this will charge the user's card\n try {\n $charge = \\Stripe\\Charge::create(array(\n \"amount\" => ($total + $tip) * 100, // amount in cents, again\n \"currency\" => \"cad\",\n \"source\" => $token,\n \"receipt_email\" => Request::input('email'),\n \"description\" => \"Charge by the Byte Application at this restaurant\"\n \n ));\n // if card is declined for several reasons\n } catch (\\Stripe\\Error\\Card $e) {\n //get variables again if error is triggered\n $order = DB::table('orders')\n ->join('order_item', 'orders.id', '=', 'order_item.order_id')\n ->select('order_item.menu_item', 'order_item.price', 'order_item.qty')\n ->where('order_item.order_id', '=', $order_id)\n ->get();\n\n $bill = DB::table('orders')\n ->join('order_item', 'orders.id', '=', 'order_item.order_id')\n ->select('orders.total', 'orders.tip', 'orders.tax', 'orders.customer_name', 'orders.table_id')\n ->where('order_item.order_id', '=', $order_id)\n ->first();\n\n\n\n // The card has been declined for whatever reason\n return Redirect::refresh()->withFlashMessage($e->getMessage())->with('order_id', $order_id)->with('order', $order)->with('bill', $bill);\n }\n\n // if no errors update status order to completed\n $order->status = 'completed';\n $order->update();\n\n // get info of client to render in sucess page\n $bill = DB::table('orders')\n ->join('order_item', 'orders.id', '=', 'order_item.order_id')\n ->select('orders.total', 'orders.tip', 'orders.tax', 'orders.customer_name', 'orders.table_id')\n ->where('order_item.order_id', '=', $order_id)\n ->first();\n \n \n Cart::destroy();\n \n // passing bill array to view \n return view('payment.process')->with('bill', $bill)->with('email', $email);\n }", "title": "" }, { "docid": "49abf73dc61923a136f55c1eb73e123c", "score": "0.49976194", "text": "public function create($id,Request $r)\n {\n // first get the order\n $order = Order::where('order_number',$id)->with('customerData')->first();\n // Insert The Payment\n $payment = new OrderPayments([\n 'transaction_date' => $r->transaction_date,\n 'transaction_id' => $r->transaction_id,\n 'payment_method' => $r->payment_method,\n 'notes' => $r->notes,\n 'amount' => $r->amount,\n 'user_id' => Auth::id()\n ]);\n // assign into the order\n $order->payments()->save($payment);\n // load vendor information\n $website = Website::find($order->website)->first()->toArray();\n $master = json_decode($website['mail_inboxes']);\n $finances = json_decode($website['finance_inboxes']);\n $sales = json_decode($website['sales_inboxes']);\n $slaves = array_merge($sales,$finances);\n // check if the payment is equal or more than the total due, if so, update the order status as well\n $total_payment = $order->payments()->sum('amount');\n if($total_payment >= $order->total){\n // update status to paid\n Order::where('order_number',$id)->update([\n 'status' => 'paid'\n ]);\n // regenerate pdf with status paid and send email \n $pdfLoc = public_path('/pdf/'.$order->order_number.'.pdf');\n PDF::loadFile(config('app.url').'/view-invoice/'.$order->order_number)\n ->setOption('margin-bottom', 0)\n ->setOption('margin-left', 0)\n ->setOption('margin-top', 0)\n ->setOption('margin-right', 0)\n ->save($pdfLoc,true);\n // prepare\n $data = [\n 'order' => $order->toArray(),\n 'customerData' => $order->customerData->toArray(),\n 'pdf' => $pdfLoc,\n 'website' => $website\n ];\n Mail::to($slaves)->cc($master)->queue(new OrderPaymentPaidNotifyAdmin($data));\n Mail::to($order->customerData->email)->cc($master)->queue(new OrderPaymentPaidNotifyCustomer($data));\n // end\n }\n // now send payment confirmation\n $data = [\n 'order' => $order->toArray(),\n 'customerData' => $order->customerData->toArray(),\n 'website' => $website,\n 'trans' => [\n 'transaction_id' => $r->transaction_id,\n 'transaction_date' => $r->transaction_date,\n 'method' => $r->payment_method,\n 'amount' => $r->amount,\n 'notes' => $r->notes\n ] \n ];\n Mail::to($finances)->cc($master)->queue(new OrderPaymentNotifyAdmin($data));\n Mail::to($order->customerData->email)->cc($master)->queue(new OrderPaymentNotifyCustomer($data));\n // end send email\n if($order){\n // broadcast to all user\n BroadcastNotification([\n 'manage-payment'\n ],\" Has created a new Payment for order : #\".$order->order_number);\n $response = [\n 'success' => true,\n 'msg' => 'Payment Added'\n ];\n }else{\n $response = [\n 'success' => false,\n 'msg' => ['Failed to Add Payment']\n ];\n }\n // return response\n return json_encode($response);\n \n }", "title": "" }, { "docid": "f040ad518ea2f7c14be838b26aae6368", "score": "0.49916205", "text": "private function cleanup_stripe_connect_customer_id() {\n\t\t\tglobal $wpdb;\n\t\t\t$sql = $wpdb->prepare(\n\t\t\t\t\"DELETE FROM $wpdb->usermeta\n\t\t\t\t\t\t\t\tWHERE meta_key IN ( %s, %s )\",\n\t\t\t\tself::STRIPE_CUSTOMER_ID_META_KEY,\n\t\t\t\tself::STRIPE_CUSTOMER_ID_META_KEY_TEST\n\t\t\t);\n\t\t\t$wpdb->query( $sql ); // phpcs:ignore\n\t\t}", "title": "" }, { "docid": "c21a4414c97b6c9dbdbb4fba9c2d70a7", "score": "0.4982527", "text": "public function saveOrder()\n {\n $this->validate();\n $isNewCustomer = false;\n switch ($this->getCheckoutMethod()) {\n case self::METHOD_GUEST:\n $this->_prepareGuestQuote();\n break;\n case self::METHOD_REGISTER:\n $this->_prepareNewCustomerQuote();\n $isNewCustomer = true;\n break;\n default:\n $this->_prepareCustomerQuote();\n break;\n }\n \n\n\n\n $cart = $this->getQuote();\n\t\t$key=0;\n foreach ($cart->getAllItems() as $item) \n {\n $key= $key+1;\n $temparray[$key]['product_id']= $item->getProduct()->getId();\n $temparray[$key]['qty']= $item->getQty();\n $cart->removeItem($item->getId());\n $cart->setSubtotal(0);\n $cart->setBaseSubtotal(0);\n\n $cart->setSubtotalWithDiscount(0);\n $cart->setBaseSubtotalWithDiscount(0);\n\n $cart->setGrandTotal(0);\n $cart->setBaseGrandTotal(0);\n \n $cart->setTotalsCollectedFlag(false);\n $cart->collectTotals();\n }\n $cart->save();\n \n foreach ($temparray as $key => $item) \n {\n $customer_id = Mage::getSingleton('customer/session')->getId();\n\n $store_id = Mage::app()->getStore()->getId();\n $customerObj = Mage::getModel('customer/customer')->load($customer_id);\n $quoteObj = $cart;\n $storeObj = $quoteObj->getStore()->load($store_id);\n $quoteObj->setStore($storeObj);\n $productModel = Mage::getModel('catalog/product');\n $productObj = $productModel->load($item['product_id']);\n $quoteItem = Mage::getModel('sales/quote_item')->setProduct($productObj);\n $quoteItem->setBasePrice($productObj->getFinalPrice());\n $quoteItem->setPriceInclTax($productObj->getFinalPrice());\n $quoteItem->setData('original_price', $productObj->getPrice());\n $quoteItem->setData('price', $productObj->getPrice());\n $quoteItem->setRowTotal($productObj->getFinalPrice());\n $quoteItem->setQuote($quoteObj);\n $quoteItem->setQty($item['qty']);\n $quoteItem->setStoreId($store_id);\n $quoteObj->addItem($quoteItem);\n\n $quoteObj->setBaseSubtotal($productObj->getFinalPrice());\n $quoteObj->setSubtotal($productObj->getFinalPrice());\n $quoteObj->setBaseGrandTotal($productObj->getFinalPrice());\n $quoteObj->setGrandTotal($productObj->getFinalPrice());\n \n $quoteObj->setStoreId($store_id);\n $quoteObj->collectTotals();\n $quoteObj->save();\n $this->_quote=$quoteObj;\n \n $service = Mage::getModel('sales/service_quote', $quoteObj);\n $service->submitAll();\n\n if ($isNewCustomer) {\n try {\n $this->_involveNewCustomer();\n } catch (Exception $e) {\n Mage::logException($e);\n }\n }\n\n $this->_checkoutSession->setLastQuoteId($quoteObj->getId())\n ->setLastSuccessQuoteId($quoteObj->getId())\n ->clearHelperData();\n\n $order = $service->getOrder();\n if ($order) {\n Mage::dispatchEvent('checkout_type_onepage_save_order_after',\n array('order'=>$order, 'quote'=>$quoteObj));\n $quoteObj->removeAllItems();\n $quoteObj->setTotalsCollectedFlag(false);\n $quoteObj->collectTotals();\n\n\n}\n\n\n\n\n\n\n /**\n * a flag to set that there will be redirect to third party after confirmation\n * eg: paypal standard ipn\n */\n $redirectUrl = $this->getQuote()->getPayment()->getOrderPlaceRedirectUrl();\n /**\n * we only want to send to customer about new order when there is no redirect to third party\n */\n if (!$redirectUrl && $order->getCanSendNewEmailFlag()) {\n try {\n $order->sendNewOrderEmail();\n } catch (Exception $e) {\n Mage::logException($e);\n }\n }\n\n // add order information to the session\n $this->_checkoutSession->setLastOrderId($order->getId())\n ->setRedirectUrl($redirectUrl)\n ->setLastRealOrderId($order->getIncrementId());\n\n // as well a billing agreement can be created\n $agreement = $order->getPayment()->getBillingAgreement();\n if ($agreement) {\n $this->_checkoutSession->setLastBillingAgreementId($agreement->getId());\n }\n }\n\n // add recurring profiles information to the session\n $profiles = $service->getRecurringPaymentProfiles();\n if ($profiles) {\n $ids = array();\n foreach ($profiles as $profile) {\n $ids[] = $profile->getId();\n }\n $this->_checkoutSession->setLastRecurringProfileIds($ids);\n // TODO: send recurring profile emails\n }\n\n Mage::dispatchEvent(\n 'checkout_submit_all_after',\n array('order' => $order, 'quote' => $this->getQuote(), 'recurring_profiles' => $profiles)\n );\n\n return $this;\n }", "title": "" }, { "docid": "1ac83362a1980ed8984ab06c5243bfd1", "score": "0.49739957", "text": "public function createPayingPreautorisation($token, $userId, $walletId, $orderId, $preAuthorizationId) {\n\n\t\t// Get admin conf in ../Helper/Data.php\n\t\t$urlKey = \"payins/preauthorized/direct/\";\n\t\t$apiInfos = Mage::helper(\"Easyrenter_Mangopay\")->getApiInfos($urlKey, true);\n\n\t\t// Get specific order datas to complete the call \n\t\t$order = Mage::getModel('sales/order')->load($orderId, 'increment_id');\n\t\t$orderGrandTotal = $order->getGrandTotal();\n $orderGrandTotalFormated = substr($orderGrandTotal, 0, -2);\n $orderGrandTotalFormated = str_replace(\".\",\"\",$orderGrandTotalFormated);\n\n\t\t// Curl authentification\n\t\t$curl = curl_init();\n\t\tcurl_setopt($curl, CURLOPT_HTTPHEADER, array(\n\t\t\t\"Authorization: Bearer \".$token,\n\t\t\t\"Content-Type: application/json; charset=utf-8\",\n\t\t\t\"Accept:application/json, text/javascript, */*; q=0.01\"\n\t\t));\n\t\tcurl_setopt($curl, CURLOPT_URL, $apiInfos[\"url\"]);\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);\n\t\tcurl_setopt($curl, CURLOPT_FOLLOWLOCATION, TRUE);\n\t\tcurl_setopt($curl, CURLOPT_VERBOSE, TRUE);\n\t\tcurl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n\t\tcurl_setopt($curl, CURLOPT_POST, 1);\n\t\tcurl_setopt($curl, CURLOPT_POSTFIELDS, '{\n\t\t\t\"Tag\": \"'.$orderId.',paiement\",\n\t\t\t\"AuthorId\": \"'.$userId.'\",\n\t\t\t\"CreditedUserId\": \"'.$userId.'\",\n\t\t\t\"CreditedWalletId\": \"'.$walletId.'\",\n\t\t\t\"DebitedFunds\": {\n\t\t\t\"Currency\": \"EUR\",\n\t\t\t\"Amount\": '.$orderGrandTotalFormated.'\n\t\t\t},\n\t\t\t\"Fees\": {\n\t\t\t\"Currency\": \"EUR\",\n\t\t\t\"Amount\": 0\n\t\t\t},\n\t\t\t\"PreauthorizationId\": \"'.$preAuthorizationId.'\"\n\t\t}');\n\n\t\t$result = curl_exec($curl);\n\n\t if (curl_errno($curl)) {\n\t print curl_error($curl);\n\t } else {\n\t curl_close($curl);\n\t }\n\n\t return $result;\n\t}", "title": "" }, { "docid": "f3cb4388fd35007884b16004c220247b", "score": "0.49735424", "text": "function store_ajax_create_customer() {\n\t\t$referrer = check_ajax_referer( 'signup_nonce', 'nonce_code', false );\n\n\t\t// If nonce is cleared...\n\t\tif ( $referrer ){\n\n\t\t\t// forward all request data into create_customer\n\t\t\t$userData = $_REQUEST;\n\n\t\t\t// remove nonce code and action\n\t\t\tunset($userData['nonce_code']);\n\t\t\tunset($userData['action']);\n\n\t\t\t// Create the user\n\t\t\t$output = store_create_customer($userData);\n\n\t\t} else {\n\n\t\t\t// nonce failed, report\n\t\t\t$output['message'] = 'Customer not created, failed to validate nonce.';\n\t\t\t$output['code'] = 'FAILED_NONCE';\n\n\t\t}\n\n\t\t// Set proper header, output\n\t\theader('Content-Type: application/json');\n\t\techo json_encode(store_get_json_template($output));\n\t\tdie;\n\t}", "title": "" }, { "docid": "345c2c197e569ad2dee08b452abc2816", "score": "0.49631387", "text": "function ChargeCustomer($Data, $eChargeEvent = \"CollectPayment\") {\n /* Added By PM On 09-12-2019 For Flutterwave Code Start */\n global $generalobj, $obj, $STRIPE_SECRET_KEY, $STRIPE_PUBLISH_KEY, $gateway, $BRAINTREE_TOKEN_KEY, $BRAINTREE_ENVIRONMENT, $BRAINTREE_MERCHANT_ID, $BRAINTREE_PUBLIC_KEY, $BRAINTREE_PRIVATE_KEY, $BRAINTREE_CHARGE_AMOUNT, $PAYMAYA_API_URL, $PAYMAYA_SECRET_KEY, $PAYMAYA_PUBLISH_KEY, $PAYMAYA_ENVIRONMENT_MODE, $OMISE_SECRET_KEY, $OMISE_PUBLIC_KEY, $ADYEN_MERCHANT_ACCOUNT, $ADYEN_USER_NAME, $ADYEN_PASSWORD, $ADYEN_API_URL, $XENDIT_PUBLIC_KEY, $XENDIT_SECRET_KEY, $APP_PAYMENT_METHOD, $SYSTEM_PAYMENT_ENVIRONMENT, $DEFAULT_CURRENCY_CONVERATION_CODE_RATIO, $DEFAULT_CURRENCY_CONVERATION_ENABLE, $DEFAULT_CURRENCY_CONVERATION_CODE, $FLUTTERWAVE_PUBLIC_KEY, $FLUTTERWAVE_SECRET_KEY; // Stripe,Braintree\n /* Added By PM On 09-12-2019 For Flutterwave Code End */\n $iOrderId = $Data['iOrderId'];\n $vOrderNo = $Data['vOrderNo'];\n $iFare = $Data['iFare'];\n $price_new = $Data['price_new'];\n $currency = $Data['currency'];\n if (strtoupper($DEFAULT_CURRENCY_CONVERATION_ENABLE) == 'YES' && !empty($DEFAULT_CURRENCY_CONVERATION_CODE_RATIO) && !empty($DEFAULT_CURRENCY_CONVERATION_CODE) && $DEFAULT_CURRENCY_CONVERATION_CODE_RATIO > 0) {\n $DefaultConverationRatio = $DEFAULT_CURRENCY_CONVERATION_CODE_RATIO;\n $price_new = $price_new / 100;\n $price_new = (round(($price_new * $DefaultConverationRatio), 2) * 100);\n $currency = $DEFAULT_CURRENCY_CONVERATION_CODE;\n }\n $vStripeCusId = $Data['vStripeCusId'];\n $description = $Data['description'];\n $iTripId = $Data['iTripId'];\n $eCancelChargeFailed = $Data['eCancelChargeFailed'];\n $vBrainTreeToken = $Data['vBrainTreeToken'];\n $vRideNo = $Data['vRideNo'];\n $iMemberId = $Data['iMemberId'];\n $UserType = $Data['UserType'];\n $vBrainTreeChargePrice = $price_new / 100;\n $vPaymayaChargePrice = $price_new / 100;\n $vXenditChargePrice = $price_new / 100;\n //$vAdyenChargePrice = $price_new/100;\n /* Added By PM On 09-12-2019 For Flutterwave Code Start */\n $vFlutterWaveChargePrice = $iFare;\n /* Added By PM On 09-12-2019 For Flutterwave Code End */\n $vAdyenChargePrice = $price_new;\n if ($UserType == \"Passenger\") {\n $tbl_name = \"register_user\";\n $iUserId = \"iUserId\";\n /* Updated By PM On 09-12-2019 For Flutterwave Code Start */\n $UserDetailPaymaya = get_value($tbl_name, 'vPaymayaCustId,vPaymayaToken,vAdyenToken,vName,vLastName,vEmail,vXenditAuthId,vXenditToken,vFlutterWaveToken,vCurrencyPassenger as vCurrency,vLang', $iUserId, $iMemberId);\n /* Updated By PM On 09-12-2019 For Flutterwave Code end */\n } else {\n $tbl_name = \"register_driver\";\n $iUserId = \"iDriverId\";\n /* Updated By PM On 09-12-2019 For Flutterwave Code Start */\n $UserDetailPaymaya = get_value($tbl_name, 'vPaymayaCustId,vPaymayaToken,vAdyenToken,vName,vLastName,vEmail,vXenditAuthId,vXenditToken,vFlutterWaveToken,vCurrencyDriver as vCurrency,vLang', $iUserId, $iMemberId);\n /* Updated By PM On 09-12-2019 For Flutterwave Code end */\n }\n\n\n if ($APP_PAYMENT_METHOD == \"Stripe\") {\n require_once ('assets/libraries/stripe/config.php');\n require_once ('assets/libraries/stripe/stripe-php-2.1.4/lib/Stripe.php');\n\n try {\n\n if ($iFare < 0.51) {\n $currencycode = $UserDetailPaymaya[0]['vCurrency'];\n $currencyData = get_value('currency', 'Ratio,vSymbol', 'vName', $currencycode);\n if ($currencycode == \"\" || $currencycode == NULL) {\n $sql = \"SELECT vName,vSymbol,Ratio from currency WHERE eDefault = 'Yes'\";\n $currencyData = $obj->MySQLSelect($sql);\n $currencycode = $currencyData[0]['vName'];\n }\n $currencySymbol = $currencyData[0]['vSymbol'];\n $currencyratio = $currencyData[0]['Ratio'];\n $vLangCode = $UserDetailPaymaya[0]['vLang'];\n if ($vLangCode == \"\" || $vLangCode == NULL) {\n $vLangCode = get_value('language_master', 'vCode', 'eDefault', 'Yes', '', 'true');\n }\n $userLanguageLabelsArr = getLanguageLabelsArr($vLangCode, \"1\", $iServiceId);\n $returnArr[\"Action\"] = \"0\";\n $minValue = $currencySymbol . \" \" . strval(round(0.51 * $currencyratio, 2));\n $returnArr['message'] = $userLanguageLabelsArr[\"LBL_REQUIRED_MINIMUM_AMOUT\"] . \" \" . $minValue;\n echo json_encode($returnArr);\n exit;\n }\n\n if ($iFare > 0) {\n $charge_create = Stripe_Charge::create(array(\n \"amount\" => $price_new,\n \"currency\" => $currency,\n \"customer\" => $vStripeCusId,\n \"description\" => $description\n ));\n\n $details = json_decode($charge_create);\n $result = get_object_vars($details);\n }\n\n if ($iFare == 0 || ($result['status'] == \"succeeded\" && $result['paid'] == \"1\")) {\n\n $stripe_arr['STRIPE_SECRET_KEY'] = $STRIPE_SECRET_KEY;\n $stripe_arr['STRIPE_PUBLISH_KEY'] = $STRIPE_PUBLISH_KEY;\n $tPaymentDetails = json_encode($stripe_arr, JSON_UNESCAPED_UNICODE);\n $pay_data['tPaymentUserID'] = $iFare == 0 ? \"\" : $result['id'];\n $pay_data['vPaymentUserStatus'] = \"approved\";\n $pay_data['iTripId'] = $iTripId;\n $pay_data['iAmountUser'] = $iFare;\n $pay_data['tPaymentDetails'] = $tPaymentDetails;\n $pay_data['iOrderId'] = $iOrderId;\n $pay_data['vPaymentMethod'] = $APP_PAYMENT_METHOD;\n $pay_data['iUserId'] = $iMemberId;\n $pay_data['eUserType'] = $UserType;\n\n $id = $obj->MySQLQueryPerform(\"payments\", $pay_data, 'insert');\n $returnArr['status'] = \"success\";\n } else {\n $returnArr['status'] = \"fail\";\n if ($eChargeEvent == \"cancelTrip\" || $eChargeEvent == \"addMoneyUserWallet\" || $eChargeEvent == \"ChargePassengerOutstandingAmount\") {\n $eCancelChargeFailed = \"Yes\";\n } else {\n\n $where = \" iOrderId = '$iOrderId'\";\n $data['iStatusCode'] = 11;\n $errorid = $obj->MySQLQueryPerform(\"orders\", $data, 'update', $where);\n $OrderLogId = createOrderLog($iOrderId, \"11\");\n $error3 = $e->getMessage();\n $returnArr[\"Action\"] = \"0\";\n $returnArr['message'] = \"LBL_CHARGE_COLLECT_FAILED\";\n setDataResponse($returnArr);\n }\n }\n } catch (Exception $e) {\n $returnArr['status'] = \"fail\";\n $error3 = $e->getMessage();\n if ($eChargeEvent == \"cancelTrip\") {\n $eCancelChargeFailed = 'Yes';\n } else {\n $where = \" iOrderId = '$iOrderId'\";\n $data['iStatusCode'] = 11;\n $errorid = $obj->MySQLQueryPerform(\"orders\", $data, 'update', $where);\n $OrderLogId = createOrderLog($iOrderId, \"11\");\n $error3 = $e->getMessage();\n $returnArr[\"Action\"] = \"0\";\n $returnArr['message'] = $error3;\n setDataResponse($returnArr);\n }\n }\n } else if ($APP_PAYMENT_METHOD == \"Braintree\") {\n require_once ('assets/libraries/braintree/lib/Braintree.php');\n try {\n if ($iFare > 0) {\n $charge_create = $gateway->transaction()\n ->sale(['paymentMethodToken' => $vBrainTreeToken, 'amount' => $vBrainTreeChargePrice]);\n\n $status = $charge_create->success;\n $transactionid = $charge_create\n ->transaction->id;\n }\n\n if ($iFare == 0 || $status == \"1\") {\n\n $braintree_arr['BRAINTREE_TOKEN_KEY'] = $BRAINTREE_TOKEN_KEY;\n $braintree_arr['BRAINTREE_ENVIRONMENT'] = $BRAINTREE_ENVIRONMENT;\n $braintree_arr['BRAINTREE_MERCHANT_ID'] = $BRAINTREE_MERCHANT_ID;\n $braintree_arr['BRAINTREE_PUBLIC_KEY'] = $BRAINTREE_PUBLIC_KEY;\n $braintree_arr['BRAINTREE_PRIVATE_KEY'] = $BRAINTREE_PRIVATE_KEY;\n $tPaymentDetails = json_encode($braintree_arr, JSON_UNESCAPED_UNICODE);\n $pay_data['tPaymentUserID'] = $iFare == 0 ? \"\" : $transactionid;\n $pay_data['vPaymentUserStatus'] = \"approved\";\n $pay_data['iTripId'] = $iTripId;\n $pay_data['iAmountUser'] = $iFare;\n $pay_data['tPaymentDetails'] = $tPaymentDetails;\n $pay_data['iOrderId'] = $iOrderId;\n $pay_data['vPaymentMethod'] = $APP_PAYMENT_METHOD;\n $pay_data['iUserId'] = $iMemberId;\n $pay_data['eUserType'] = $UserType;\n\n $id = $obj->MySQLQueryPerform(\"payments\", $pay_data, 'insert');\n $returnArr['status'] = \"success\";\n } else {\n $returnArr['status'] = \"fail\";\n if ($eChargeEvent == \"cancelTrip\" || $eChargeEvent == \"addMoneyUserWallet\" || $eChargeEvent == \"ChargePassengerOutstandingAmount\") {\n $eCancelChargeFailed = \"Yes\";\n } else {\n $where = \" iOrderId = '$iOrderId'\";\n $data['iStatusCode'] = 11;\n $errorid = $obj->MySQLQueryPerform(\"orders\", $data, 'update', $where);\n $OrderLogId = createOrderLog($iOrderId, \"11\");\n $error3 = $e->getMessage();\n $returnArr[\"Action\"] = \"0\";\n $returnArr['message'] = \"LBL_CHARGE_COLLECT_FAILED\";\n setDataResponse($returnArr);\n }\n }\n } catch (Exception $e) {\n $returnArr['status'] = \"fail\";\n $error3 = $e->getMessage();\n if ($eChargeEvent == \"cancelTrip\") {\n $eCancelChargeFailed = 'Yes';\n } else {\n $where = \" iOrderId = '$iOrderId'\";\n $data['iStatusCode'] = 11;\n $errorid = $obj->MySQLQueryPerform(\"orders\", $data, 'update', $where);\n $OrderLogId = createOrderLog($iOrderId, \"11\");\n $error3 = $e->getMessage();\n $returnArr[\"Action\"] = \"0\";\n $returnArr['message'] = $error3;\n setDataResponse($returnArr);\n }\n }\n } else if ($APP_PAYMENT_METHOD == \"Paymaya\") {\n $vPaymayaCustId = $UserDetailPaymaya[0]['vPaymayaCustId'];\n $vPaymayaToken = $UserDetailPaymaya[0]['vPaymayaToken'];\n //$Ratio = get_value('currency', 'Ratio', 'vName', 'PHP', '', 'true');\n //$vPaymayaChargePrice = $vPaymayaChargePrice * $Ratio;\n //$vPaymayaChargePrice = round($vPaymayaChargePrice, 2);\n $postdata_charge = array(\n 'totalAmount' => array(\n 'amount' => $vPaymayaChargePrice,\n 'currency' => $currency\n ),\n 'requestReferenceNumber' => 'REF' . $vRideNo\n );\n $url = $PAYMAYA_API_URL . \"/payments/v1/customers/\" . $vPaymayaCustId . \"/cards/\" . $vPaymayaToken . \"/payments\";\n $result_charge = check_paymaya_api($url, $postdata_charge);\n $PaymentId = $result_charge['id'];\n $paymentstatus = $result_charge['status']; //PAYMENT_SUCCESS\n if ($vPaymayaChargePrice == 0 || $paymentstatus == 'PAYMENT_SUCCESS') {\n $paymaya_arr['PAYMAYA_API_URL'] = $PAYMAYA_API_URL;\n $paymaya_arr['PAYMAYA_SECRET_KEY'] = $PAYMAYA_SECRET_KEY;\n $paymaya_arr['PAYMAYA_PUBLISH_KEY'] = $PAYMAYA_PUBLISH_KEY;\n $paymaya_arr['PAYMAYA_ENVIRONMENT_MODE'] = $PAYMAYA_ENVIRONMENT_MODE;\n $tPaymentDetails = json_encode($paymaya_arr, JSON_UNESCAPED_UNICODE);\n $pay_data['tPaymentUserID'] = $PaymentId;\n $pay_data['vPaymentUserStatus'] = \"approved\";\n $pay_data['iTripId'] = $iTripId;\n $pay_data['iAmountUser'] = $iFare;\n $pay_data['tPaymentDetails'] = $tPaymentDetails;\n $pay_data['iOrderId'] = $iOrderId;\n $pay_data['vPaymentMethod'] = $APP_PAYMENT_METHOD;\n $pay_data['iUserId'] = $iMemberId;\n $pay_data['eUserType'] = $UserType;\n $id = $obj->MySQLQueryPerform(\"payments\", $pay_data, 'insert');\n $returnArr['status'] = \"success\";\n } else {\n $returnArr['status'] = \"fail\";\n if ($eChargeEvent == \"cancelTrip\" || $eChargeEvent == \"addMoneyUserWallet\" || $eChargeEvent == \"ChargePassengerOutstandingAmount\") {\n $eCancelChargeFailed = \"Yes\";\n } else {\n $where = \" iOrderId = '$iOrderId'\";\n $data['iStatusCode'] = 11;\n $errorid = $obj->MySQLQueryPerform(\"orders\", $data, 'update', $where);\n $OrderLogId = createOrderLog($iOrderId, \"11\");\n $error3 = $e->getMessage();\n $returnArr[\"Action\"] = \"0\";\n $returnArr['message'] = \"LBL_CHARGE_COLLECT_FAILED\";\n setDataResponse($returnArr);\n }\n }\n } else if ($APP_PAYMENT_METHOD == \"Omise\") {\n require_once ('assets/libraries/omise/config.php');\n $UserDetailOmise = get_value($tbl_name, 'vOmiseCustId,vOmiseToken', $iUserId, $iMemberId);\n $vOmiseCustId = $UserDetailOmise[0]['vOmiseCustId'];\n $vOmiseToken = $UserDetailOmise[0]['vOmiseToken'];\n\n try {\n if ($iFare > 0) {\n $charge = OmiseCharge::create(array(\n 'amount' => $price_new,\n 'currency' => $currency,\n 'customer' => $vOmiseCustId,\n 'card' => $vOmiseToken\n ));\n }\n\n if ($iFare == 0 || ($charge['status'] == \"successful\" && $charge['paid'] == \"1\")) {\n\n $omise_arr['OMISE_SECRET_KEY'] = $OMISE_SECRET_KEY;\n $omise_arr['OMISE_PUBLIC_KEY'] = $OMISE_PUBLIC_KEY;\n $tPaymentDetails = json_encode($omise_arr, JSON_UNESCAPED_UNICODE);\n $pay_data['tPaymentUserID'] = $iFare == 0 ? \"\" : $charge['transaction'];\n $pay_data['vPaymentUserStatus'] = \"approved\";\n $pay_data['iTripId'] = $iTripId;\n $pay_data['iAmountUser'] = $iFare;\n $pay_data['tPaymentDetails'] = $tPaymentDetails;\n $pay_data['iOrderId'] = $iOrderId;\n $pay_data['vPaymentMethod'] = $APP_PAYMENT_METHOD;\n $pay_data['iUserId'] = $iMemberId;\n $pay_data['eUserType'] = $UserType;\n\n $id = $obj->MySQLQueryPerform(\"payments\", $pay_data, 'insert');\n $returnArr['status'] = \"success\";\n } else {\n $returnArr['status'] = \"fail\";\n if ($eChargeEvent == \"cancelTrip\" || $eChargeEvent == \"addMoneyUserWallet\" || $eChargeEvent == \"ChargePassengerOutstandingAmount\") {\n $eCancelChargeFailed = \"Yes\";\n } else {\n $where = \" iOrderId = '$iOrderId'\";\n $data['iStatusCode'] = 11;\n $id = $obj->MySQLQueryPerform(\"orders\", $data, 'update', $where);\n $OrderLogId = createOrderLog($iOrderId, \"11\");\n $error3 = $e->getMessage();\n $returnArr[\"Action\"] = \"0\";\n $returnArr['message'] = \"LBL_CHARGE_COLLECT_FAILED\";\n setDataResponse($returnArr);\n }\n }\n } catch (Exception $e) {\n $returnArr['status'] = \"fail\";\n $error3 = $e->getMessage();\n if ($eChargeEvent == \"cancelTrip\" || $eChargeEvent == \"addMoneyUserWallet\" || $eChargeEvent == \"ChargePassengerOutstandingAmount\") {\n $eCancelChargeFailed = 'Yes';\n } else {\n $where = \" iOrderId = '$iOrderId'\";\n $data['iStatusCode'] = 11;\n $id = $obj->MySQLQueryPerform(\"orders\", $data, 'update', $where);\n $OrderLogId = createOrderLog($iOrderId, \"11\");\n $error3 = $e->getMessage();\n $returnArr[\"Action\"] = \"0\";\n $returnArr['message'] = $error3;\n setDataResponse($returnArr);\n }\n }\n } else if ($APP_PAYMENT_METHOD == \"Adyen\") {\n $vAdyenToken = $UserDetailPaymaya[0]['vAdyenToken'];\n $shopperReference = $UserDetailPaymaya[0]['vName'] . \" \" . $UserDetailPaymaya[0]['vLastName'];\n $shopperEmail = $UserDetailPaymaya[0]['vEmail'];\n $reference = rand(111111, 999999);\n $USERPWD = $ADYEN_USER_NAME . \":\" . $ADYEN_PASSWORD;\n $result = array();\n // Pass the customer's authorisation code, email and amount\n $postdata = array(\n \"selectedRecurringDetailReference\" => $vAdyenToken,\n \"recurring\" => array(\n \"contract\" => \"RECURRING\"\n ),\n \"merchantAccount\" => $ADYEN_MERCHANT_ACCOUNT,\n \"amount\" => array(\n \"value\" => $vAdyenChargePrice,\n \"currency\" => $currency\n ),\n \"reference\" => $reference,\n \"shopperEmail\" => $shopperEmail,\n \"shopperReference\" => $shopperReference,\n \"shopperInteraction\" => \"ContAuth\"\n );\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $ADYEN_API_URL);\n curl_setopt($ch, CURLOPT_HEADER, false);\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($ch, CURLOPT_USERPWD, $USERPWD);\n curl_setopt($ch, CURLOPT_POST, count(json_encode($postdata)));\n curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($postdata));\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n \"Content-type: application/json\"\n ));\n\n $request = curl_exec($ch); //echo \"<pre>\";print_r($request);exit;\n curl_close($ch);\n if ($request) {\n $result = json_decode($request, true);\n $resultCode = $result['resultCode']; //Authorised\n $authCode = $result['authCode'];\n\n if ($resultCode == \"Authorised\") {\n $Adyen_arr['ADYEN_MERCHANT_ACCOUNT'] = $ADYEN_MERCHANT_ACCOUNT;\n $Adyen_arr['ADYEN_USER_NAME'] = $ADYEN_USER_NAME;\n $Adyen_arr['ADYEN_PASSWORD'] = $ADYEN_PASSWORD;\n $Adyen_arr['ADYEN_API_URL'] = $ADYEN_API_URL;\n $tPaymentDetails = json_encode($Adyen_arr, JSON_UNESCAPED_UNICODE);\n $pay_data['tPaymentUserID'] = $authCode;\n $pay_data['vPaymentUserStatus'] = \"approved\";\n $pay_data['iTripId'] = $iTripId;\n $pay_data['iAmountUser'] = $iFare;\n $pay_data['tPaymentDetails'] = $tPaymentDetails;\n $pay_data['iOrderId'] = $iOrderId;\n $pay_data['vPaymentMethod'] = $APP_PAYMENT_METHOD;\n $pay_data['iUserId'] = $iMemberId;\n $pay_data['eUserType'] = $UserType;\n $id = $obj->MySQLQueryPerform(\"payments\", $pay_data, 'insert');\n $returnArr['status'] = \"success\";\n } else {\n $returnArr['status'] = \"fail\";\n if ($eChargeEvent == \"cancelTrip\" || $eChargeEvent == \"addMoneyUserWallet\" || $eChargeEvent == \"ChargePassengerOutstandingAmount\") {\n $eCancelChargeFailed = \"Yes\";\n } else {\n $returnArr['Action'] = \"0\";\n $returnArr['message'] = \"LBL_CHARGE_COLLECT_FAILED\";\n setDataResponse($returnArr);\n }\n }\n } else {\n $returnArr['status'] = \"fail\";\n if ($eChargeEvent == \"cancelTrip\" || $eChargeEvent == \"addMoneyUserWallet\" || $eChargeEvent == \"ChargePassengerOutstandingAmount\") {\n $eCancelChargeFailed = \"Yes\";\n } else {\n $where = \" iOrderId = '$iOrderId'\";\n $data['iStatusCode'] = 11;\n $errorid = $obj->MySQLQueryPerform(\"orders\", $data, 'update', $where);\n $OrderLogId = createOrderLog($iOrderId, \"11\");\n //$error3 = $e->getMessage();\n $returnArr[\"Action\"] = \"0\";\n $returnArr['message'] = \"LBL_CHARGE_COLLECT_FAILED\";\n setDataResponse($returnArr);\n }\n }\n } else if ($APP_PAYMENT_METHOD == \"Xendit\") {\n require_once ('assets/libraries/xendit/config.php');\n require_once ('assets/libraries/xendit/src/XenditPHPClient.php');\n $options['secret_api_key'] = $XENDIT_SECRET_KEY;\n $xenditPHPClient = new XenditClient\\XenditPHPClient($options);\n $external_id = substr(number_format(time() * rand(), 0, '', ''), 0, 15);\n if (strtoupper($DEFAULT_CURRENCY_CONVERATION_ENABLE) == 'YES' && !empty($DEFAULT_CURRENCY_CONVERATION_CODE_RATIO) && !empty($DEFAULT_CURRENCY_CONVERATION_CODE) && $DEFAULT_CURRENCY_CONVERATION_CODE_RATIO > 0) {\n $famount = round($vXenditChargePrice);\n } else {\n $IDRCurrencyRatio = get_value('currency', 'Ratio', 'vName', 'IDR', '', 'true');\n $famount = $iFare * $IDRCurrencyRatio;\n $famount = round($famount);\n }\n $vXenditAuthId = $UserDetailPaymaya[0]['vXenditAuthId'];\n $vXenditToken = $UserDetailPaymaya[0]['vXenditToken'];\n $response = $xenditPHPClient->captureCreditCardPayment($external_id, $vXenditToken, $famount);\n //print_r($response);die;\n //$resultCode = $response['status'];\n if (isset($response['status']) && $response['status'] == \"CAPTURED\") {\n $xendit_arr['XENDIT_SECRET_KEY'] = $XENDIT_SECRET_KEY;\n $xendit_arr['XENDIT_PUBLIC_KEY'] = $XENDIT_PUBLIC_KEY;\n $tPaymentDetails = json_encode($xendit_arr, JSON_UNESCAPED_UNICODE);\n $pay_data['tPaymentUserID'] = $response[\"id\"];\n $pay_data['vPaymentUserStatus'] = \"approved\";\n $pay_data['iTripId'] = $iTripId;\n $pay_data['iAmountUser'] = $iFare;\n $pay_data['tPaymentDetails'] = $tPaymentDetails;\n $pay_data['iOrderId'] = $iOrderId;\n $pay_data['vPaymentMethod'] = $APP_PAYMENT_METHOD;\n $pay_data['iUserId'] = $iMemberId;\n $pay_data['eUserType'] = $UserType;\n $id = $obj->MySQLQueryPerform(\"payments\", $pay_data, 'insert');\n $returnArr['status'] = \"success\";\n } else {\n $returnArr['status'] = \"fail\";\n if ($eChargeEvent == \"cancelTrip\" || $eChargeEvent == \"addMoneyUserWallet\" || $eChargeEvent == \"ChargePassengerOutstandingAmount\") {\n $eCancelChargeFailed = \"Yes\";\n } else {\n $error3 = \"LBL_CHARGE_COLLECT_FAILED\";\n if (isset($response['message']) && $response['message'] != \"\") {\n $error3 = $response['message'];\n }\n $where = \" iOrderId = '$iOrderId'\";\n $data['iStatusCode'] = 11;\n $errorid = $obj->MySQLQueryPerform(\"orders\", $data, 'update', $where);\n $OrderLogId = createOrderLog($iOrderId, \"11\");\n //$error3 = $e->getMessage();\n $returnArr[\"Action\"] = \"0\";\n $returnArr['message'] = $error3;\n setDataResponse($returnArr);\n }\n }\n } elseif ($APP_PAYMENT_METHOD == \"Flutterwave\") {\n\n /* Added By PM On 09-12-2019 For Flutterwave Code Start */\n $txRefId = \"JHJ-\" . time();\n $vFlutterWaveToken = $UserDetailPaymaya[0]['vFlutterWaveToken'];\n\n if ($vFlutterWaveToken != \"\") {\n $email = $UserDetailPaymaya[0]['vEmail'];\n $changedData = flutterwave_charge($txRefId, $vFlutterWaveToken, $currency, $vFlutterWaveChargePrice, $email);\n\n $paymentstatus = $changedData['status'];\n if ($vFlutterWaveChargePrice == 0 || $paymentstatus == 'success') {\n $payment_arr['FLUTTERWAVE_PUBLIC_KEY'] = $FLUTTERWAVE_PUBLIC_KEY;\n $payment_arr['FLUTTERWAVE_SECRET_KEY'] = $FLUTTERWAVE_SECRET_KEY;\n $tPaymentDetails = json_encode($payment_arr, JSON_UNESCAPED_UNICODE);\n $PaymentId = $changedData['data']['id'];\n $pay_data = array();\n $pay_data['tPaymentUserID'] = $PaymentId;\n $pay_data['vPaymentUserStatus'] = \"approved\";\n $pay_data['iTripId'] = $iTripId;\n ;\n $pay_data['iOrderId'] = $iOrderId;\n $pay_data['iAmountUser'] = $iFare;\n $pay_data['vPaymentMethod'] = $APP_PAYMENT_METHOD;\n $pay_data['tPaymentDetails'] = $tPaymentDetails;\n $pay_data['iUserId'] = $iMemberId;\n $pay_data['eUserType'] = $UserType;\n $id = $obj->MySQLQueryPerform(\"payments\", $pay_data, 'insert');\n $returnArr['status'] = \"success\";\n } else {\n $returnArr['status'] = \"fail\";\n if ($eChargeEvent == \"cancelTrip\" || $eChargeEvent == \"addMoneyUserWallet\" || $eChargeEvent == \"ChargePassengerOutstandingAmount\") {\n $eCancelChargeFailed = \"Yes\";\n } else {\n $error3 = \"LBL_CHARGE_COLLECT_FAILED\";\n $returnArr['Action'] = \"0\";\n $returnArr['message'] = \"LBL_CHARGE_COLLECT_FAILED\";\n $where = \" iOrderId = '$iOrderId'\";\n $data['iStatusCode'] = 11;\n $errorid = $obj->MySQLQueryPerform(\"orders\", $data, 'update', $where);\n $OrderLogId = createOrderLog($iOrderId, \"11\");\n\n $returnArr[\"Action\"] = \"0\";\n $returnArr['message'] = $error3;\n setDataResponse($returnArr);\n }\n }\n } else {\n $returnArr['Action'] = \"0\";\n $returnArr['message'] = \"LBL_NO_CARD_AVAIL_NOTE\";\n setDataResponse($returnArr);\n }\n /* Added By PM On 09-12-2019 For Flutterwave Code end */\n }\n $returnArr['id'] = $id;\n $returnArr['eCancelChargeFailed'] = $eCancelChargeFailed;\n\n return $returnArr;\n}", "title": "" }, { "docid": "5b7a5977c4d5c8828e17f0fe52238aa9", "score": "0.49565476", "text": "function init_custom_stripe_template(){\n\t\tinclude_once ABSPATH . 'wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-gateway-stripe.php';\n\n\t\tif ( ! class_exists( 'WC_Gateway_Stripe' ) ){\n\t\t\treturn;\n\t\t}\n\n\t\tclass Custom_Stripe_Template extends WC_Gateway_Stripe {\n\t\n\t\t\t// call the parent constructor, doesn't happen by default\n\t\t\tpublic function __construct(){\n\t\t\t\tparent::__construct();\n\t\t\t}\n\n\t\t\tpublic function payment_fields(){\n\t\t\t\t$checked = 1;\n\t\t\t\t?>\n\t\t\t\t<div class=\"card-payment\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\t$allowed = array(\n\t\t\t\t\t\t 'a' => array(\n\t\t\t\t\t\t 'href' => array(),\n\t\t\t\t\t\t 'title' => array()\n\t\t\t\t\t\t ),\n\t\t\t\t\t\t 'br' => array(),\n\t\t\t\t\t\t 'em' => array(),\n\t\t\t\t\t\t 'strong' => array(),\n\t\t\t\t\t\t 'span'\t=> array(\n\t\t\t\t\t\t \t'class' => array(),\n\t\t\t\t\t\t ),\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif ( $this->description ) {\n\t\t\t\t\t\t\techo apply_filters( 'wc_stripe_description', wpautop( wp_kses( $this->description, $allowed ) ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( $this->saved_cards && is_user_logged_in() && ( $customer_id = get_user_meta( get_current_user_id(), '_stripe_customer_id', true ) ) && is_string( $customer_id ) && ( $cards = $this->get_saved_cards( $customer_id ) ) ) {\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t<p class=\"form-row form-row-wide\">\n\t\t\t\t\t\t\t\t<a class=\"<?php echo apply_filters( 'wc_stripe_manage_saved_cards_class', 'button' ); ?>\" style=\"float:right;\" href=\"<?php echo apply_filters( 'wc_stripe_manage_saved_cards_url', get_permalink( get_option( 'woocommerce_myaccount_page_id' ) ) ); ?>#saved-cards\"><?php _e( 'Manage cards', 'woocommerce-gateway-stripe' ); ?></a>\n\t\t\t\t\t\t\t\t<?php if ( $cards ) : ?>\n\t\t\t\t\t\t\t\t\t<?php foreach ( (array) $cards as $card ) :\n\t\t\t\t\t\t\t\t\t\tif ( 'card' !== $card->object ) {\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<label for=\"stripe_card_<?php echo $card->id; ?>\">\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" id=\"stripe_card_<?php echo $card->id; ?>\" name=\"stripe_card_id\" value=\"<?php echo $card->id; ?>\" <?php checked( $checked, 1 ) ?> />\n\t\t\t\t\t\t\t\t\t\t\t<?php printf( __( '%s card ending in %s (Expires %s/%s)', 'woocommerce-gateway-stripe' ), $card->brand, $card->last4, $card->exp_month, $card->exp_year ); ?>\n\t\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t\t<?php $checked = 0; endforeach; ?>\n\t\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t\t\t<label for=\"new\">\n\t\t\t\t\t\t\t\t\t<input type=\"radio\" id=\"new\" name=\"stripe_card_id\" <?php checked( $checked, 1 ) ?> value=\"new\" />\n\t\t\t\t\t\t\t\t\t<?php _e( 'Use a new credit card', 'woocommerce-gateway-stripe' ); ?>\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t\t<div class=\"stripe_new_card\" <?php if ( $checked === 0 ) : ?>style=\"display:none;\"<?php endif; ?>\n\t\t\t\t\t\tdata-description=\"\"\n\t\t\t\t\t\tdata-amount=\"<?php echo esc_attr( $this->get_stripe_amount( WC()->cart->total ) ); ?>\"\n\t\t\t\t\t\tdata-name=\"<?php echo esc_attr( sprintf( __( '%s', 'woocommerce-gateway-stripe' ), get_bloginfo( 'name' ) ) ); ?>\"\n\t\t\t\t\t\tdata-label=\"<?php esc_attr_e( 'Confirm and Pay', 'woocommerce-gateway-stripe' ); ?>\"\n\t\t\t\t\t\tdata-currency=\"<?php echo esc_attr( strtolower( get_woocommerce_currency() ) ); ?>\"\n\t\t\t\t\t\tdata-image=\"<?php echo esc_attr( $this->stripe_checkout_image ); ?>\"\n\t\t\t\t\t\tdata-bitcoin=\"<?php echo esc_attr( $this->bitcoin ? 'true' : 'false' ); ?>\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t<?php if ( ! $this->stripe_checkout ) : ?>\n\t\t\t\t\t\t\t<?php $this->credit_card_form( array( 'fields_have_names' => false ) ); ?>\n\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<?php\n\n\t\t\t}\n\n\t\t\tpublic function get_icon() {\n\n\t\t\t\treturn '';\n\t\t\t}\n\t\t}\n\n\t/*\n\t * Add the Gateway to WooCommerce\n\t */\n\t\tfunction add_custom_stripe_gateway( $methods ) {\n\t\t\t$methods['WC_Gateway_Stripe'] = 'Custom_Stripe_Template';\n\t\t\treturn $methods;\n\t\t}\n\t\tadd_filter( 'woocommerce_payment_gateways', 'add_custom_stripe_gateway' );\n\n\t}", "title": "" }, { "docid": "038f7deb0436d68ced998f6f605a50e5", "score": "0.4956365", "text": "function wcgm_extend_order( $order_id ) {\n Woocommerce_Gift_Manager_Logger::log('Payment completed, it\\'s time to add some extras..');\n\n $order = new WC_Order($order_id);\n $presents_all = wcgm_fetch_presents_for_order($order);\n\n wcgm_add_presents($presents_all, $order);\n\n}", "title": "" }, { "docid": "0ad37f245a343d2d939cf04d2545ebb7", "score": "0.49562097", "text": "public function create_an_order($order_data){\n $chemical_details = $this->Chemical_Model->get_chemical_by_id($order_data->post('orderChemicalId'));\n if(!empty($chemical_details)){\n $this->Chemical_Model->update_by_id(array('stored_count'=>$chemical_details->stored_count - $order_data->post('orderQuantity')),$order_data->post('orderChemicalId'));\n $employee = $this->Employees_Model->get_employee_by_id($order_data->post('orderSalesPersonList'));\n $order_id = rand(1000,45000);\n $order_db_data = array(\n 'id'=>uuid(),\n 'chemical_id'=>$order_data->post('orderChemicalId'),\n 'quantity'=>$order_data->post('orderQuantity'),\n 'order_sales_person'=>$order_data->post('orderSalesPerson'),\n 'product_manager'=>$order_data->post('orderProductManager'),\n 'po_date'=>date('Y-m-d H:i:s',strtotime($order_data->post('orderPoDate'))),\n 'po_rec_date'=>date('Y-m-d H:i:s',strtotime($order_data->post('orderPoRecDate'))),\n 'product'=>$order_data->post('orderProduct'),\n 'customer'=>$order_data->post('orderCustomer'),\n 'department'=>$order_data->post('orderDepartment'),\n 'customer_po'=>$order_data->post('orderCustomerPo'),\n 'way_of_getting_po'=>$order_data->post('orderWayOfGettingPo'),\n 'customer_quotation_referance'=>$order_data->post('orderCustomerQuotationReferance'),\n 'cat_number'=>$order_data->post('orderCatNumber'),\n 'pack_size'=>$order_data->post('orderPackSize'),\n 'unit_price_without_vat'=>$order_data->post('orderUnitPriceWithoutVat'),\n 'total_price_without_vat'=>$order_data->post('orderTotalPriceWithoutVat'),\n 'unit_price_with_vat'=>$order_data->post('orderUnitPriceWithVat'),\n 'total_price_with_vat'=>$order_data->post('orderTotalPriceWithVat'),\n 'origin'=>$order_data->post('orderOrigin'),\n 'month'=>date('F',strtotime($order_data->post('orderPoDate'))),\n 'branch'=> !empty($employee)? $employee->branch : 'resigned Employee',\n 'order_sales_person_id' => !empty($employee)? $employee->id : 'resigned Employee',\n 'order_number'=>$order_id\n );\n if($chemical_details->stored_count < $order_data->post('orderQuantity')){\n $this->Delivery_Model->save_order_to_delivery_table(array('order_id'=>$order_id,'current_status'=>'Shipment in progress','delivery_deadline'=>date('Y-m-d',strtotime(date('Y-m-d').'+ 56 days'))));\n }else\n $this->Delivery_Model->save_order_to_delivery_table(array('order_id'=>$order_id,'current_status'=>'Delivery in progress','delivery_deadline'=>date('Y-m-d',strtotime(date('Y-m-d').'+ 56 days'))));\n $this->db->insert('orders',$order_db_data);\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "029ea51b86e7e05227218935eb0ab4d7", "score": "0.49548924", "text": "public function afterPlaceOrderCustomer();", "title": "" }, { "docid": "27be01b21fb391dca85d3dcb5e93c4dc", "score": "0.49446836", "text": "public function processPayment()\n {\n }", "title": "" }, { "docid": "eada3feb617032bb6c5b0ee5c8486be6", "score": "0.49422824", "text": "function generate_concordpay_form($order_id)\n {\n $order = new WC_Order($order_id);\n\n $orderDate = isset($order->post->post_date) ? $order->post->post_date : $order->order_date;\n\n $currency = str_replace(\n array('ГРН', 'UAH'),\n array('UAH', 'UAH'),\n get_woocommerce_currency()\n );\n\n $concordpay_args = array(\n 'operation' => 'Purchase',\n 'merchant_id' => $this->merchant_id,\n 'order_id' => $order_id . self::ORDER_SUFFIX . time(),\n 'amount' => $order->get_total(),\n 'currency_iso' => $currency,\n 'description' => 'Оплата картой VISA или Mastercard на сайте ' . $_SERVER[\"HTTP_HOST\"],\n 'approve_url' => $this->getCallbackUrl(),\n 'callback_url' => $this->getCallbackUrl(true),\n 'decline_url' => $this->settings['declineUrl'],\n 'cancel_url' => $this->settings['cancelUrl'],\n\n 'language' => $this->getLanguage()\n );\n\n $concordpay_args['signature'] = $this->getRequestSignature($concordpay_args);\n\n $items = $order->get_items();\n foreach ($items as $item) {\n $concordpay_args['productName'][] = esc_html($item['name']);\n $concordpay_args['productCount'][] = $item['qty'];\n $concordpay_args['productPrice'][] = $item['line_total'];\n }\n $phone = $order->billing_phone;\n $phone = str_replace(array('+', ' ', '(', ')'), array('', '', '', ''), $phone);\n if (strlen($phone) == 10) {\n $phone = '38' . $phone;\n } elseif (strlen($phone) == 11) {\n $phone = '3' . $phone;\n }\n\n $client = array(\n \"clientFirstName\" => $order->billing_first_name,\n \"clientLastName\" => $order->billing_last_name,\n \"clientAddress\" => $order->billing_address_1 . ' ' . $order->billing_address_2,\n \"clientCity\" => $order->billing_city,\n \"clientPhone\" => $phone,\n \"clientEmail\" => $order->billing_email,\n \"clientCountry\" => strlen($order->billing_country) != 3 ? 'UKR' : $order->billing_country,\n \"clientZipCode\" => $order->billing_postcode\n );\n\n $concordpay_args = array_merge($concordpay_args, $client);\n\n return $this->generateForm($concordpay_args);\n }", "title": "" }, { "docid": "6f5c749dd97e025bb0b667e0a710e39f", "score": "0.49376795", "text": "function hrb_send_order_receipt_confirmation( $order ) {\n\n\t$recipient = get_user_by( 'id', $order->get_author() );\n\n\t$content = '';\n\t$content .= html( 'p', sprintf( __( 'Hello %s,', APP_TD ), $recipient->display_name ) );\n\n\tif ( $order->is_escrow() ) {\n\t\t$workspace = $order->get_item();\n\t\t$workspace_link = html_link( hrb_get_workspace_url( $workspace['post_id'] ), $workspace['post']->post_title );\n\n\t\t$content .= html( 'p', sprintf( __( 'This email confirms that funds held in escrow for work on %s were released:', APP_TD ), $workspace_link ) );\n\t} else {\n\t\t$content .= html( 'p', __( 'This email confirms that you have purchased the following:', APP_TD ) );\n\t}\n\t$content .= _hrb_order_summary_email_body( $order );\n\n\t$subject = sprintf( __( '[%s] Payment confirmation for order #%d', APP_TD ), get_bloginfo( 'name' ), $order->get_id() );\n\n\tappthemes_send_email( $recipient->user_email, $subject, $content );\n}", "title": "" }, { "docid": "bd6aefd9d77a572830133f4156c9444a", "score": "0.49372113", "text": "public function created(Order $order)\n {\n $this->orderItemService->saveOrderItems($order);\n\n \\Cart::session(Auth::user()->id)->clear();\n }", "title": "" }, { "docid": "b8b3f3ef578dad338963d2bb4af91f16", "score": "0.4932236", "text": "public function test_purchase_order_create_custom_good()\n {\n\n // first create a prescription\n\n $url = $this->makeUrl('/v1/patient/{patient_id}/prescription');\n\n $data = [\n 'name' => 'Rx for test_purchase_order_create_custom_good',\n 'multiplier' => 1,\n // 'priority' => '3',\n 'clinic_id' => 2,\n 'provider_id' => 1,\n 'diagnosis_id' => 4,\n 'profile_id' => 1,\n 'extracts' => [\n [\n 'extract_id' => 2,\n 'name' => 'Glycerinated Diluent',\n 'is_diluent' => 'T'\n ],\n [\n 'extract_id' => 7,\n 'name' => 'Alternaria',\n 'is_diluent' => 'F'\n ]\n ]\n ];\n\n // create the prescription\n $response = $this->postJsonTest($url, $data);\n\n $response\n ->assertStatus(200)\n ->assertJson([\n 'status' => 'success'\n ]);\n\n // get the new prescription ID\n\n $arr = $response->json();\n $prescription = $arr['data']['prescription'];\n\n $prescription_id = $prescription['prescription_id'];\n $prescription_number = $prescription['prescription_number'];\n\n $url = $this->makeUrl('/v1/patient/{patient_id}/purchase_order');\n\n $data = [\n 'account_id' => 1,\n 'status_id' => 1,\n 'set_orders' => [\n [\n 'name' => 'from test_purchase_order_create_custom_good',\n 'note' => 'Note for New PO Vial B',\n 'provider_id' => 1,\n 'prescription_id' => $prescription_id,\n 'clinic_id' => 2,\n 'status_id' => 3,\n 'size' => '5 mL',\n 'dilutions' => [\n 1,\n 2,\n 10,\n 100,\n 200\n ],\n 'dosings' => [\n [\n 'dose' => '2.000',\n 'ent_dilution' => 0,\n 'extract_id' => 2\n ],\n [\n 'dose' => '1.000',\n 'ent_dilution' => 0,\n 'extract_id' => 4\n ],\n [\n 'dose' => '1.750',\n 'ent_dilution' => 0,\n 'extract_id' => 8\n ]\n ]\n ]\n ]\n ];\n\n // create the purchase_order\n $response = $this->postJsonTest($url, $data);\n\n $response\n ->assertStatus(200)\n ->assertJson([\n 'status' => 'success',\n 'data' => [\n 'purchase_order' => $data\n ]\n ]);\n\n /*\n // get the vials and verify the bottle numbers\n\n $url = $this->makeUrl('/v1/patient/{patient_id}/vial');\n\n // get the vial\n $response = $this->getJsonTest($url);\n\n $response\n ->assertStatus(200)\n ->assertJson([\n 'status' => 'success'\n ]);\n\n // get the bottle numbers\n\n $arr = $response->json();\n $vial = $arr['data']['vial'];\n\n $bottles = [];\n\n foreach ($vial as $v) {\n if ($v['prescription_number'] == $prescription_number) {\n $bottles[$v['vial_number']] = $v['dilution'];\n }\n }\n\n $this->assertTrue($bottles[1] == 200 && $bottles[2] == 100 && $bottles[3] == 10 && $bottles[4] == 2 && $bottles[5] == 1);\n */\n\n $set_orders = $response->json()['data']['purchase_order']['set_orders'];\n\n assert (count($set_orders) == 1, 'Correct number of set_orders');\n assert (count($set_orders[0]['dilutions']) == 5, 'Correct number of dilutions');\n assert (count($set_orders[0]['dosings']) == 3, 'Correct number of dosings');\n\n return $prescription_id;\n }", "title": "" }, { "docid": "0c2407e16e1af353839bbccd71819a56", "score": "0.4927002", "text": "function payment($postData){\r\n if(!empty($postData)){ \r\n // Retrieve stripe token and user info from the submitted form data \r\n $token = $postData['stripeToken']; \r\n $name = $postData['name']; \r\n $email = $postData['email']; \r\n //$key = \"super-secret-key\";\r\n //$nameen = $this->encrypt->encode($name,$key); \r\n\r\n\r\n\r\n $orderID = strtoupper(str_replace('.','',uniqid('',true)));\r\n \r\n // Add customer to stripe \r\n $customer = $this->stripe_lib->addCustomer($email, $token); \r\n \r\n if($customer){ \r\n // Charge a credit or a debit card \r\n $charge = $this->stripe_lib->createCharge($customer->id, $postData['product']['name'], $postData['product']['price']); \r\n \r\n if($charge){ \r\n // Check whether the charge is successful \r\n if($charge['amount_refunded'] == 0 && empty($charge['failure_code']) && $charge['paid'] == 1 && $charge['captured'] == 1){ \r\n // Transaction details \r\n $transactionID = $charge['balance_transaction']; \r\n $paidAmount = $charge['amount']; \r\n $paidAmount = ($paidAmount/100); \r\n $paidCurrency = $charge['currency']; \r\n $payment_status = $charge['status']; \r\n \r\n // Insert tansaction data into the database \r\n $orderData = array( \r\n 'product_id' => $postData['product']['productid'], \r\n 'buyer_name' => $name, \r\n 'buyer_email' => $email,\r\n 'paid_amount' => $paidAmount, \r\n 'paid_amount_currency' => $paidCurrency, \r\n 'txn_id' => $transactionID, \r\n 'payment_status' => $payment_status \r\n ); \r\n $orderID = $this->Products_model->insertOrder($orderData); \r\n \r\n // If the order is successful \r\n if($payment_status == 'succeeded'){ \r\n return $orderID; \r\n } \r\n } \r\n } \r\n } \r\n } \r\n return false; \r\n }", "title": "" }, { "docid": "1c8fb1fdac871362cfe101e2f8e3341f", "score": "0.49257228", "text": "private function enclose() {\n\t\t$this->order->save();\n\t}", "title": "" }, { "docid": "33e19ed3e57b6047ba99cf7956f24927", "score": "0.49214676", "text": "public function makePayment()\n\t\t\t{\n\t\t\t}", "title": "" }, { "docid": "a55f4f3228cb53ff6adc867c02b59119", "score": "0.49202484", "text": "public static function createNewOrder($singleOrderObject)\n {\n\n // dd($singleOrderObject);\n\n $x = $singleOrderObject;\n // dd($x);\n\n // Check if order exists in DB\n if (Order::where('shopify_order_id', '=', $x->id)->exists()) {\n // \\Bugsnag::notifyError('createNewOrder fail - Order ID found.');\n //Cutting off check\n\t return false;\n\n }\n\n\n // Get only Products we care about\n $cart = $x->line_items;\n //Get product ids\n $All_product_ids_in_cart = [];\n $product_ids_of_live_events_in_order =[];\n foreach ($cart as $item) {\n $All_product_ids_in_cart[] = $item->product_id;\n }\n\n // Check for qualifying purchase\n foreach ($All_product_ids_in_cart as $line_item_id) {\n if (Event::where('event_id', '=', $line_item_id)->exists()) {\n $product_ids_of_live_events_in_order[] = $line_item_id;\n } else {\n continue;\n }\n }\n\n\n\n // Get quantity of tickets\n $lineitems_with_Quantity = array();\n foreach ($cart as $item_in_cart) {\n $lineitems_with_Quantity[$item_in_cart->product_id] = $item_in_cart->quantity;\n }\n\n\n //\n\n\n // Combine the two arrays to get product Id of qulatify products and quantity.\n\n\n foreach ($product_ids_of_live_events_in_order as $key => $value) {\n $quantity_With_product_ids[$value] = $lineitems_with_Quantity[$value];\n }\n\n\n\n\n\n\n\n\n // dd($quantity_With_product_ids);\n\n if(isset($x->customer->first_name)){\n $cx_name = $x->customer->first_name;\n } else{\n $cx_name = \"N/A\";\n };\n\n\n $order_object_for_email = array();\n foreach ($quantity_With_product_ids as $lineItemId => $lineItemQuantity) {\n\n // dd($i);\n // dd($lineItemId);\n $a = new Order;\n\n //Are nullable to account for manual orders\n $a->email = $x->contact_email;\n $a->first_name = $cx_name;\n $a->shopify_order_id =$x->id;\n $a->event_id = $lineItemId;\n $a->tickets_created = 0;\n $a->num_tickets = $lineItemQuantity;\n $a->num_tickets_claimed = 0;\n $a->registration_compleate = 0;\n $a->secret_key = str_replace(\"/\",\"\",Hash::make($x->id));\n $a->order_object = serialize($x);\n $a->save();\n //Returning Object for email\n $order_object_for_email[]=$a;\n }\n\n return $order_object_for_email;\n\n // }\n\n\n}", "title": "" }, { "docid": "dc2f22d6946b3087aa25f2b27297aa4c", "score": "0.49165553", "text": "function gb_insert_transaction( $args ) {\n\n\t$args = wp_parse_args( $args, array(\n\t\t'type' => 'payment',\n\t\t'status' => 'paid',\n\t\t'description' => 'Payment',\n\t\t'amount' => 0,\n\t\t'due_date' => date( 'Y-m-d H:i:s' ),\n\t\t'paid_date' => false,\n\t\t'member_id' => get_current_user_id(),\n\t\t'org_id' => false,\n\t\t'semester_id' => false,\n\t) );\n\ttrigger_error( __FUNCTION__ . ' : ' . var_export($args, 1 ) );\n\n\tif ( ! $args['org_id'] ) {\n\t\t$args['org_id'] = gb_get_organization_id( $args['member_id'] );\n\t}\n\n\tif ( ! $args['semester_id'] ) {\n\t\t$args['semester_id'] = gb_get_current_semester( $args['org_id'] )->ID;\n\t}\n\n\t$payment_id = wp_insert_post( array(\n\t\t'post_status' => $args['status'],\n\t\t'post_title' => $args['description'],\n\t\t'post_type' => 'payment'\n\t) );\n\n\twp_set_object_terms( $payment_id, $args['type'], 'payment_type' );\n\n\t// Verify due_date is not already strtotime\n\t$args['due_date'] = strtotime( $args['due_date'] ) !== false ? strtotime( $args['due_date'] ) : $args['due_date'];\n\n\tupdate_post_meta( $payment_id, 'paid_date' , strtotime( $args['paid_date'] ) );\n\tupdate_post_meta( $payment_id, 'due_date' , $args['due_date'] );\n\tupdate_post_meta( $payment_id, 'total_amount', $args['amount'] );\n\n\tgb_connect_payment_to_member( $payment_id , $args['member_id'] );\n\tgb_connect_payment_to_semester( $payment_id , $args['semester_id'] );\n\tgb_connect_payment_to_organization( $payment_id , $args['org_id'] );\n\n\treturn $payment_id;\n}", "title": "" }, { "docid": "ae17eeac5c7b5c27cc5ec973543ce50c", "score": "0.49151918", "text": "public function createAsBraintreeCustomerTrait($token, array $options = [], $address = null, $isPayPal = false)\n {\n\n// $address = \\Braintree_Address::create([\n// 'customerId' => Auth::user()->braintree_id,\n// 'firstName' => $options['firstName'],\n// 'lastName' => $options['lastName'],\n// 'streetAddress' => $options['address'],\n// ]);\n//\n// var_dump($address);\n// throw new Exception('Unable to create Braintree customer: '.json_encode($address));\n\n// $user = Auth::user();\n// $customerUpdate = \\Braintree_Customer::update(\n// $user->braintree_id,\n// [\n// 'firstName' => $options['firstName'],\n// 'lastName' => $options['lastName'],\n// 'company' => 'New Company',\n// 'email' => $user->email,\n// 'extendedAddress' => $address\n// ]\n// );\n\n $paymentData = $isPayPal ? [\n 'paymentMethodNonce' => $token,\n 'creditCard' => [\n 'options' => [\n 'verifyCard' => true,\n 'makeDefault' => true,\n ],\n ],\n ] : [\n 'firstName' => Arr::get(explode(' ', $this->name), 0),\n 'lastName' => Arr::get(explode(' ', $this->name), 1),\n 'email' => $this->email,\n 'paymentMethodNonce' => $token,\n 'creditCard' => [\n 'options' => [\n 'verifyCard' => true,\n 'makeDefault' => true,\n ],\n 'billingAddress' => [\n 'firstName' => $options['firstName'],\n 'lastName' => $options['lastName'],\n 'extendedAddress' => $address,\n ],\n ],\n ];\n\n if ($this->braintree_id) {\n $response = BraintreeCustomer::update(\n $this->braintree_id,\n array_replace_recursive($paymentData, $options)\n );\n } else {\n $response = BraintreeCustomer::create(\n array_replace_recursive($paymentData, $options)\n );\n }\n\n if (!$response->success) {\n throw new Exception('Unable to create Braintree customer: ' . $response->message);\n }\n\n $paymentMethod = $response->customer->paymentMethods[0];\n\n $paypalAccount = $paymentMethod instanceof PayPalAccount;\n\n if ($response->customer->creditCards && $response->customer->creditCards[0]) {\n $paymentToken = $response->customer->creditCards[0]->token;\n } else {\n $paymentToken = null;\n }\n\n $this->forceFill([\n 'braintree_id' => $response->customer->id,\n 'paypal_email' => $paypalAccount ? $paymentMethod->email : null,\n 'card_brand' => ! $paypalAccount ? $paymentMethod->cardType : null,\n 'card_last_four' => ! $paypalAccount ? $paymentMethod->last4 : null,\n 'braintree_payment_token' => $paymentToken,\n ])->save();\n\n return $response->customer;\n }", "title": "" }, { "docid": "866c34046097f886eb3013fbe559e96f", "score": "0.4902955", "text": "public function setup_payment(): void {\n\t\t\tif (\n\t\t\t\tempty( $_POST['post_id'] ) ||\n\t\t\t\t! isset( $_POST['nonce'] ) ||\n\t\t\t\t! wp_verify_nonce(\n\t\t\t\t\tsanitize_text_field( wp_unslash( $_POST['nonce'] ) ),\n\t\t\t\t\t$this->get_nonce_name()\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\twp_send_json_error(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'message' => esc_html__( 'Cheating?', 'learndash' ),\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$product = Product::find( (int) $_POST['post_id'] );\n\n\t\t\tif ( ! $product ) {\n\t\t\t\twp_send_json_error(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'message' => esc_html__( 'Product not found.', 'learndash' ),\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t$session_id = $this->create_payment_session( $product );\n\t\t\t} catch ( Exception $e ) {\n\t\t\t\twp_send_json_error(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'message' => esc_html__( 'Stripe session was not created.', 'learndash' ) . ' ' . esc_html( $e->getMessage() ),\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\twp_send_json_success(\n\t\t\t\tarray(\n\t\t\t\t\t'session_id' => $session_id,\n\t\t\t\t)\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "56f57e75e0928bcfad332040dcadd05f", "score": "0.48964444", "text": "public function process_payment($order_id) {\n include_once( 'includes/class-wc-gateway-checkout-non-pci-request.php');\n include_once( 'includes/class-wc-gateway-checkout-non-pci-validator.php');\n include_once( 'includes/class-wc-gateway-checkout-non-pci-customer-card.php');\n\n global $woocommerce;\n\n $order = new WC_Order($order_id);\n $request = new WC_Checkout_Non_Pci_Request($this);\n $cardToken = !empty($_POST[\"{$request->gateway->id}-card-token\"]) ? $_POST[\"{$request->gateway->id}-card-token\"] : '';\n $lpRedirectUrl = !empty($_POST[\"{$request->gateway->id}-lp-redirect-url\"]) ? $_POST[\"{$request->gateway->id}-lp-redirect-url\"] : NULL;\n $lpName = !empty($_POST[\"{$request->gateway->id}-lp-name\"]) ? $_POST[\"{$request->gateway->id}-lp-name\"] : NULL;\n $savedCardData = array();\n $savedCard = !empty($_POST[\"{$request->gateway->id}-saved-card\"]) ? $_POST[\"{$request->gateway->id}-saved-card\"] : '';\n\n $mobileRedirectUrl = !empty($_POST[\"{$request->gateway->id}-mobile-redirectUrl\"]) ? $_POST[\"{$request->gateway->id}-mobile-redirectUrl\"] : NULL;\n\n\n $isHosted = $this->get_option('is_hosted');\n\n if($isHosted == 'yes' && $savedCard == self::PAYMENT_CARD_NEW_CARD){\n\n $_SESSION['checkout_save_card_checked'] = isset($_POST['save-card-checkbox']);\n\n return array(\n 'result' => 'success',\n 'redirect' => $this->notify_url\n );\n\n }\n\n if(!is_null($mobileRedirectUrl) && $savedCard == self::PAYMENT_CARD_NEW_CARD){\n\n $_SESSION['checkout_save_card_checked'] = isset($_POST['save-card-checkbox']);\n\n return array(\n 'result' => 'success',\n 'redirect' => $mobileRedirectUrl.'&customerEmail='.$_POST['billing_email'].'&contextId='.$order_id,\n );\n }\n\n if (!is_null($lpRedirectUrl) && !is_null($lpName)) {\n $parts = parse_url($lpRedirectUrl);\n parse_str($parts['query'], $query);\n\n $paymentToken = $query['paymentToken'];\n $result = $request->verifyChargePaymentToken($order, $paymentToken);\n\n if (!empty($result['error'])) {\n WC_Checkout_Non_Pci_Validator::wc_add_notice_self($this->gerProcessErrorMessage($result['error']), 'error');\n return;\n }\n\n $entityId = $result->getId();\n\n $order->update_status($request->getOrderStatus(), __(\"Checkout.com Charge Approved (Transaction ID - {$entityId}\", 'woocommerce-checkout-non-pci'));\n $order->reduce_order_stock();\n $woocommerce->cart->empty_cart();\n\n update_post_meta($order_id, '_transaction_id', $entityId);\n\n $_SESSION['checkout_local_payment_token'] = strtolower($paymentToken);\n\n return array(\n 'result' => 'success',\n 'redirect' => $lpRedirectUrl\n );\n }\n\n if ($savedCard !== self::PAYMENT_CARD_NEW_CARD) {\n $savedCardData = WC_Checkout_Non_Pci_Customer_Card::getCustomerCardData($savedCard, $order->user_id);\n\n if (!$savedCardData) {\n WC_Checkout_Non_Pci_Validator::wc_add_notice_self('Payment error: Please check your card data.', 'error' );\n return;\n }\n }\n else if (empty($cardToken)) {\n WC_Checkout_Non_Pci_Validator::wc_add_notice_self($this->gerProcessErrorMessage('Payment error: Please check your card data.'), 'error');\n return;\n }\n\n $result = $request->createCharge($order, $cardToken, $savedCardData);\n\n if (!empty($result['error'])) {\n WC_Checkout_Non_Pci_Validator::wc_add_notice_self($this->gerProcessErrorMessage($result['error']), 'error');\n return;\n }\n\n $entityId = $result->getId();\n $redirectUrl = $result->getRedirectUrl();\n\n if ($redirectUrl) {\n $_SESSION['checkout_payment_token'] = strtolower($entityId);\n\n return array(\n 'result' => 'success',\n 'redirect' => $redirectUrl\n );\n }\n\n update_post_meta($order_id, '_transaction_id', $entityId);\n\n $order->update_status($request->getOrderStatus(), __(\"Checkout.com Charge Approved (Transaction ID - {$entityId}\", 'woocommerce-checkout-non-pci'));\n $order->reduce_order_stock();\n $woocommerce->cart->empty_cart();\n\n if (is_user_logged_in() && $this->saved_cards) {\n WC_Checkout_Non_Pci_Customer_Card::saveCard($result, $order->user_id, isset($_POST['save-card-checkbox']));\n }\n\n return array(\n 'result' => 'success',\n 'redirect' => $this->get_return_url($order)\n );\n }", "title": "" }, { "docid": "af5bfcb5fa100e7bfd3d10b91dd2cbc7", "score": "0.48952034", "text": "public function renewAction() {\n\t\t$id = $this->getRequest()->getParam('id');\n\t\t\n\t\tif(!is_numeric($id))\n\t\t\t$this->_helper->redirector ( 'list', 'orders', 'default' );\n\t\t\n\t\tif(Orders::isOwner($id, $this->customer ['customer_id']))\t\n\t\t\t$id = Orders::cloneOrder($id, null, true);\n\t\t\t$this->_helper->redirector ( 'edit', 'orders', 'default', array ('id' => $id, 'mex' => 'The requested task has been completed successfully', 'status' => 'success' ) );\n\t\t\t\n\t\tdie($id);\n\t}", "title": "" }, { "docid": "d9d590dec80138a6334dc43eb43c1be6", "score": "0.48924184", "text": "public function store(Request $request)\n {\n $request->validate([\n 'txtCustUserName' => 'required',\n 'txtCustPassword' => 'required',\n 'txtCustEmail' => 'required',\n 'txtCustMobile' => 'required',\n 'txtCustFirstName'=> 'required',\n 'txtCustLastName' => 'required',\n 'txtCustAddress' => 'required',\n 'txtCustLandmark' => 'required',\n 'txtCustCity' => 'required',\n 'txtCustState' => 'required',\n 'txtCustCountry' => 'required',\n 'txtCustPincode' => 'required',\n 'txtStatus' => 'required',\n 'txtCourier' => 'required', \n 'txtDiscount' => 'required', \n 'txtPrice' => 'required',\n 'txtQty' => 'required',\n 'txtProduct' => 'required'\n ]);\n\n //dd($request); txtCourier txtDiscount\n\n $Customer = new Customer([\n 'username' => $request->get('txtCustUserName'),\n 'email' => $request->get('txtCustEmail'),\n 'password' => $request->get('txtCustPassword'),\n 'first_name' => $request->get('txtCustFirstName'),\n 'last_name' => $request->get('txtCustLastName'),\n 'mobile' => $request->get('txtCustMobile'),\n 'address' => $request->get('txtCustAddress'),\n 'landmark' => $request->get('txtCustLandmark'),\n 'city' => $request->get('txtCustCity'),\n 'state' => $request->get('txtCustState'),\n 'country' => $request->get('txtCustCountry'),\n 'pincode' => $request->get('txtCustPincode'),\n 'status' => $request->get('txtStatus')\n ]);\n $Customer->save();\n $last_cuid = $Customer->id;\n\n\n $gen_orderid = sprintf(\"ATIYA%'.05d\\n\", $last_cuid);\n\n //Order table data insertion\n $Order = new Order([\n 'customer_id' => $last_cuid,\n 'order_no' => $gen_orderid,\n 'courier_amount'=> $request->get('txtCourier'),\n 'discount' => $request->get('txtDiscount'),\n 'total_amount' => '0',\n 'payment_mode' => '1',\n 'status' => '1'\n ]);\n $Order->save();\n $last_ordid = $Order->id; \n \n $items = $request->only('txtProduct', 'txtQty', 'txtPrice');\n //dd($items);\n $rowcount = count($request->txtProduct);\n\n for($i=0; $i<$rowcount; $i++)\n {\n $data = new OrderItem();\n $data->order_id = $last_ordid;\n $data->product_id = $request->txtProduct[$i];\n $data->quantity = $request->txtQty[$i];\n $data->price = $request->txtPrice[$i];\n $data->status = '1'; \n $data->save();\n } \n \n return redirect('order')->with('success', 'order created successfully!');\n }", "title": "" }, { "docid": "3dc0459c07d716a04b4003949987ccb2", "score": "0.48911482", "text": "public function generateOrder()\n {\n try {\n $acount = $this->AdminController->checkLogin();\n if (!$acount) {\n $this->popup(\"/dashboard/login\", \"please login to access dashboard!!\");\n }\n if ($acount[\"role_id\"] < 2) {\n $this->popup(\"/dashboard\", \"You do not have enough promised, kindly contact administrator!!\");\n } else {\n $cart = $_POST[\"cart\"] ?? null;\n if($cart){\n //TODO: define function createOrder, generateOrderDetail\n $oid = $this->orderModel->createOrder($acount[\"id\"], $cart);\n $this->ordeModel->generateOrderDetail($oid, $cart);\n }\n }\n } catch (Exception $e) {\n die($e);\n }\n }", "title": "" }, { "docid": "a831212fed9649e7b8016387fff12b05", "score": "0.48886025", "text": "function activedemand_woocommerce_cart_emptied()\r\n{\r\n $user_id = get_current_user_id();\r\n delete_user_meta($user_id, AD_CARTTIMEKEY);\r\n}", "title": "" }, { "docid": "1f004074fd4ee6472cdcfbe555b017f4", "score": "0.48865667", "text": "function edds_process_payza_payment( $purchase_data ) {\r\n global $edd_options;\r\n\r\n // record the pending payment\r\n $payment_data = array(\r\n 'price' => $purchase_data['price'],\r\n 'date' => $purchase_data['date'],\r\n 'user_email' => $purchase_data['user_email'],\r\n 'purchase_key' => $purchase_data['purchase_key'],\r\n 'currency' => edd_get_currency(),\r\n 'downloads' => $purchase_data['downloads'],\r\n 'cart_details' => $purchase_data['cart_details'],\r\n 'user_info' => $purchase_data['user_info'],\r\n 'status' => 'pending'\r\n );\r\n\r\n // Inserts a new payment\r\n $payment = edd_insert_payment( $payment_data );\r\n\r\n if ( $payment ) {\r\n require_once 'payza.gateway.php';\r\n\r\n // Request details\r\n $merchant_id = trim( $edd_options['payza_merchant_id'] );\r\n $currency = edd_get_currency();\r\n $return_url = edd_get_success_page_url( '?payment-confirmation=payza' );\r\n $cancel_url = edd_get_failed_transaction_uri();\r\n $ipn_url = trailingslashit( home_url() ) . '?edd-listener=PAYZA_IPN';\r\n\r\n\r\n // Create a new instance of the mb class\r\n $payza = new wp_payza_gateway ( $merchant_id, 'item', $currency, $return_url, $cancel_url, $ipn_url, edd_is_test_mode() );\r\n\r\n // Get a new session ID\r\n $redirect_url = $payza->transaction( $payment, $purchase_data['cart_details'] );\r\n\r\n if ( $redirect_url ) {\r\n // Redirects the user\r\n wp_redirect( $redirect_url );\r\n exit;\r\n } else {\r\n edd_send_back_to_checkout( '?payment-mode=payza' );\r\n }\r\n } else {\r\n edd_send_back_to_checkout( '?payment-mode=payza' );\r\n }\r\n}", "title": "" }, { "docid": "0cfb155403ecd9f9eca6ea85d769e6a2", "score": "0.48789278", "text": "function removeSkippedOrder($input) {\n\n $oUser = UserQuery::create()->findPK($input['iUser']);\n $oOrder = OrderQuery::create()->findPK($input['iOrder']);\n\n // Check for invalid user and order objects\n if (!$oUser)\n throwSingleError('InvalidUser');\n if (!$oOrder)\n throwSingleError('InvalidOrder');\n\n // Check that order belongs to user\n if ($oOrder->getSubscription()->getUserId() != $oUser->getId())\n throwSingleError('OrderMismatch');\n\n // Check that order is in skipped status\n if (!in_array($oOrder->getStatus(), array('Skipped', 'Donated')))\n throwSingleError('InvalidOrderStatus');\n\n // Check that order is not within 48 hours of today\n $cutoff = date('Y-m-d', strtotime('+'.OrderPeer::CHARGE_DAYS_BEFORE.' Days'));\n if (strtotime($oOrder->getDeliveryScheduledFor()) <= strtotime($cutoff))\n throwSingleError('CannotReactivateSkipped');\n\n // Store subscription for later\n $oSub = $oOrder->getSubscription();\n $date = new DateTime( $oOrder->getDeliveryScheduledFor() );\n\n // We're all good! Delete it.\n $oOrder->delete();\n\n $oSub->createBag( $date );\n // Send email to customer\n $merge = [\n 'firstname' => $oUser->getFirstName(),\n 'product' => $oSub->getProduct()->getTitle(),\n 'date' => date('n/d/Y', strtotime($date->format('Y-m-d')))\n ];\n $helper = new SendGridHelper($oUser->getEmail(), 'reactivate-order-user');\n $helper->merge($merge);\n $helper->send();\n\n jsonSuccess(array(\n 'url' => '/account/subscriptions'\n ));\n\n }", "title": "" }, { "docid": "86f09e048de13f275b0fa312f7d4aa58", "score": "0.4875308", "text": "public function createPreautorisationCaution($token, $userId, $CardId, $orderId, $formUrl) {\n\n\t\t// Get admin conf in ../Helper/Data.php\n\t\t$urlKey = \"preauthorizations/card/direct\";\n\t\t$apiInfos = Mage::helper(\"Easyrenter_Mangopay\")->getApiInfos($urlKey, true);\n\n\t\t//Récupérer certaines variables\n\t\t$order = Mage::getModel('sales/order')->load($orderId, 'increment_id');\n\t\t$orderAllItems = $order->getAllItems();\n\t foreach ($orderAllItems as $item) {\n\n\t \t$product = Mage::getModel('catalog/product')->load($item->getProductId());\n\t\t\t//$productCaution = $product->getData('franchise_laparisienne');\n\t\t\t$productCaution = $product->getData('caution');\n\t\t}\n\n\t\t$_productCaution = ($productCaution*100);\n\n\t\t//Etablir un valeur par defaut de la caution si elle est vide ou inf à 1\n\t\tif ($_productCaution<1 || $_productCaution==\"\") {\n\t\t\t$_productCaution = 150000;\n\t\t}\n\n\t\t$address = $order->getBillingAddress();\n \t$customerStreet = $address->getStreet();\n\n\t\t// Curl authentification\n\t\t$curl = curl_init();\n\t\tcurl_setopt($curl, CURLOPT_HTTPHEADER, array(\n\t\t\t\"Authorization: Bearer \".$token,\n\t\t\t\"Content-Type: application/json; charset=utf-8\",\n\t\t\t\"Accept:application/json, text/javascript, */*; q=0.01\"\n\t\t));\n\t\tcurl_setopt($curl, CURLOPT_URL, $apiInfos[\"url\"]);\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);\n\t\tcurl_setopt($curl, CURLOPT_FOLLOWLOCATION, TRUE);\n\t\tcurl_setopt($curl, CURLOPT_VERBOSE, TRUE);\n\t\tcurl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n\t\tcurl_setopt($curl, CURLOPT_POST, 1);\n\t\tcurl_setopt($curl, CURLOPT_POSTFIELDS, '{\n\t\t\t\"Tag\": \"'.$orderId.',caution\",\n\t\t\t\"AuthorId\": \"'.$userId.'\",\n\t\t\t\"CardId\": \"'.$CardId.'\",\n\t\t\t\"DebitedFunds\": {\n\t\t\t\"Currency\": \"EUR\",\n\t\t\t\"Amount\": '.$_productCaution.'\n\t\t\t},\n\t\t\t\"Billing\": {\n\t\t\t\"Address\": {\n\t\t\t\"AddressLine1\": \"'.$customerStreet[0].'\",\n\t\t\t\"AddressLine2\": \"-\",\n\t\t\t\"City\": \"'.$address->getCity().'\",\n\t\t\t\"Region\": \"-\",\n\t\t\t\"PostalCode\": \"'.$address->getPostcode().'\",\n\t\t\t\"Country\": \"'.$address->getCountryId().'\"\n\t\t\t}\n\t\t\t},\n\t\t\t\"SecureMode\": \"DEFAULT\",\n\t\t\t\"SecureModeReturnURL\": \"'.$formUrl.'\"\n\t\t}');\n\n\t\t$result = curl_exec($curl);\n\n\t if (curl_errno($curl)) {\n\t print curl_error($curl);\n\t } else {\n\t curl_close($curl);\n\t }\n\n\t return $result;\n\t}", "title": "" }, { "docid": "bd871fa9cf9855182b6e98a0ee8ef527", "score": "0.48724648", "text": "public function postPaymentWithStripe(Request $request)\n {\n $settings = SiteManagement::getMetaValue('commision');\n $currency = !empty($settings[0]['currency']) ? $settings[0]['currency'] : 'USD';\n $current_year = Carbon::now()->format('Y');\n $validator = Validator::make(\n $request->all(),\n [\n 'card_no' => 'required',\n 'ccExpiryMonth' => 'required',\n 'ccExpiryYear' => 'required',\n 'cvvNumber' => 'required',\n ]\n );\n if ($request['ccExpiryYear'] < $current_year) {\n // Session::flash('error', trans('lang.valid_year'));\n // return Redirect::back()->withInput();\n $json['type'] = 'error';\n $json['message'] = trans('lang.valid_year');\n return $json;\n }\n $product_id = Session::has('product_id') ? session()->get('product_id') : '';\n $product_title = Session::has('product_title') ? session()->get('product_title') : '';\n $product_price = Session::has('product_price') ? session()->get('product_price') : 0;\n $type = Session::has('type') ? session()->get('type') : '';\n $user_id = Auth::user() ? Auth::user()->id : '';\n $input = $request->all();\n if ($validator->passes()) {\n $input = array_except($input, array('_token'));\n if (!empty(env('STRIPE_SECRET'))) {\n \\Artisan::call('optimize:clear');\n $stripe = Stripe::make(env('STRIPE_SECRET'));\n } else {\n // Session::flash('error', trans('lang.empty_stripe_key'));\n // return Redirect::back();\n $json['type'] = 'error';\n $json['message'] = trans('lang.empty_stripe_key');\n return $json;\n }\n try {\n $token = $stripe->tokens()->create(\n [\n 'card' => [\n 'number' => $request->get('card_no'),\n 'exp_month' => $request->get('ccExpiryMonth'),\n 'exp_year' => $request->get('ccExpiryYear'),\n 'cvc' => $request->get('cvvNumber'),\n ],\n ]\n );\n if (!isset($token['id'])) {\n // Session::flash('error', 'The Stripe Token was not generated correctly');\n // return Redirect::back();\n $json['type'] = 'error';\n $json['message'] = 'The Stripe Token was not generated correctly';\n return $json;\n }\n $payment_detail = $stripe->charges()->create(\n [\n 'card' => $token['id'],\n 'currency' => $currency,\n 'amount' => $product_price,\n 'description' => trans('lang.add_in_wallet'),\n ]\n );\n\n $customer = $stripe->customers()->create(\n [\n 'email' => Auth::user()->email,\n ]\n );\n\n if ($payment_detail['status'] == 'succeeded') {\n $fee = !empty($payment_detail['application_fee_amount']) ? $payment_detail['application_fee_amount'] : 0;\n $invoice = new Invoice();\n $invoice->title = 'Invoice';\n $invoice->price = $product_price;\n $invoice->payer_name = filter_var($customer['name'], FILTER_SANITIZE_STRING);\n $invoice->payer_email = filter_var($customer['email'], FILTER_SANITIZE_EMAIL);\n $invoice->seller_email = '[email protected]';\n $invoice->currency_code = filter_var($payment_detail['currency'], FILTER_SANITIZE_STRING);\n $invoice->payer_status = '';\n $invoice->transaction_id = filter_var($payment_detail['id'], FILTER_SANITIZE_STRING);\n $invoice->invoice_id = filter_var($payment_detail['source']['id'], FILTER_SANITIZE_STRING);\n $invoice->customer_id = filter_var($customer['id'], FILTER_SANITIZE_STRING);\n $invoice->shipping_amount = 0;\n $invoice->handling_amount = 0;\n $invoice->insurance_amount = 0;\n $invoice->sales_tax = 0;\n $invoice->payment_mode = filter_var('stripe', FILTER_SANITIZE_STRING);\n $invoice->paypal_fee = $fee;\n $invoice->paid = $payment_detail['paid'];\n $product_type = $type;\n $invoice->type = $product_type;\n $invoice->save();\n $invoice_id = DB::getPdo()->lastInsertId();\n if ($type == 'package') {\n $item = DB::table('items')->select('id')->where('subscriber', $user_id)->first();\n if (!empty($item)) {\n $item = Item::find($item->id);\n } else {\n $item = new Item();\n }\n } else {\n $item = new Item();\n }\n $item->invoice_id = filter_var($invoice_id, FILTER_SANITIZE_NUMBER_INT);\n $item->product_id = filter_var($product_id, FILTER_SANITIZE_NUMBER_INT);\n $item->subscriber = $user_id;\n $item->item_name = filter_var($product_title, FILTER_SANITIZE_STRING);\n $item->item_price = $product_price;\n $item->item_qty = filter_var(1, FILTER_SANITIZE_NUMBER_INT);\n $item->save();\n $last_order_id = session()->get('custom_order_id');\n DB::table('orders')\n ->where('id', $last_order_id)\n ->update(['status' => 'completed']);\n if (Auth::user()) {\n if ($product_type == 'package') {\n if (session()->has('product_id')) {\n $package_item = \\App\\Item::where('subscriber', Auth::user()->id)->first();\n $id = session()->get('product_id');\n $package = \\App\\Package::find($id);\n $option = !empty($package->options) ? unserialize($package->options) : '';\n $expiry = !empty($option) ? $package_item->created_at->addDays($option['duration']) : '';\n $expiry_date = !empty($expiry) ? Carbon::parse($expiry)->toDateTimeString() : '';\n $user = \\App\\User::find(Auth::user()->id);\n if (!empty($package->badge_id) && $package->badge_id != 0) {\n $user->badge_id = $package->badge_id;\n }\n $user->expiry_date = $expiry_date;\n $user->save();\n // send mail\n if (!empty(config('mail.username')) && !empty(config('mail.password'))) {\n $item = DB::table('items')->where('product_id', $id)->get()->toArray();\n $package = Package::where('id', $item[0]->product_id)->first();\n $user = User::find($item[0]->subscriber);\n $role = $user->getRoleNames()->first();\n $package_options = unserialize($package->options);\n if (!empty($invoice)) {\n if ($package_options['duration'] === 'Quarter') {\n $expiry_date = $invoice->created_at->addDays(4);\n } elseif ($package_options['duration'] === 'Month') {\n $expiry_date = $invoice->created_at->addMonths(1);\n } elseif ($package_options['duration'] === 'Year') {\n $expiry_date = $invoice->created_at->addYears(1);\n }\n }\n if ($role === 'employer') {\n if (!empty($user->email)) {\n $email_params = array();\n $template = DB::table('email_types')->select('id')->where('email_type', 'employer_email_package_subscribed')->get()->first();\n if (!empty($template->id)) {\n $template_data = EmailTemplate::getEmailTemplateByID($template->id);\n $email_params['employer'] = Helper::getUserName(Auth::user()->id);\n $email_params['employer_profile'] = url('profile/' . Auth::user()->slug);\n $email_params['name'] = $package->title;\n $email_params['price'] = $package->cost;\n $email_params['expiry_date'] = !empty($expiry_date) ? Carbon::parse($expiry_date)->format('M d, Y') : '';\n Mail::to(Auth::user()->email)\n ->send(\n new EmployerEmailMailable(\n 'employer_email_package_subscribed',\n $template_data,\n $email_params\n )\n );\n }\n }\n } elseif ($role === 'freelancer') {\n if (!empty(Auth::user()->email)) {\n $email_params = array();\n $template = DB::table('email_types')->select('id')->where('email_type', 'freelancer_email_package_subscribed')->get()->first();\n if (!empty($template->id)) {\n $template_data = EmailTemplate::getEmailTemplateByID($template->id);\n $email_params['freelancer'] = Helper::getUserName(Auth::user()->id);\n $email_params['freelancer_profile'] = url('profile/' . Auth::user()->slug);\n $email_params['name'] = $package->title;\n $email_params['price'] = $package->cost;\n $email_params['expiry_date'] = !empty($expiry_date) ? Carbon::parse($expiry_date)->format('M d, Y') : '';\n Mail::to(Auth::user()->email)\n ->send(\n new FreelancerEmailMailable(\n 'freelancer_email_package_subscribed',\n $template_data,\n $email_params\n )\n );\n }\n }\n }\n }\n }\n } else if ($product_type == 'project') {\n if (session()->has('project_type')) {\n $project_type = session()->get('project_type');\n if ($project_type == 'service') {\n $id = session()->get('product_id');\n $freelancer = session()->get('service_seller');\n $service = Service::find($id);\n $service->users()->attach(Auth::user()->id, ['type' => 'employer', 'status' => 'hired', 'seller_id' => $freelancer, 'paid' => 'pending']);\n $service->save();\n // send message to freelancer\n $message = new Message();\n $user = User::find(intval(Auth::user()->id));\n $message->user()->associate($user);\n $message->receiver_id = intval($freelancer);\n $message->body = Helper::getUserName(Auth::user()->id) . ' ' . trans('lang.service_purchase') . ' ' . $service->title;\n $message->status = 0;\n $message->save();\n // send mail\n if (!empty(config('mail.username')) && !empty(config('mail.password'))) {\n $email_params = array();\n $template_data = Helper::getFreelancerNewOrderEmailContent();\n $email_params['title'] = $service->title;\n $email_params['service_link'] = url('service/' . $service->slug);\n $email_params['amount'] = $service->price;\n $email_params['freelancer_name'] = Helper::getUserName($freelancer);\n $email_params['employer_profile'] = url('profile/' . $user->slug);\n $email_params['employer_name'] = Helper::getUserName($user->id);\n $freelancer_data = User::find(intval($freelancer));\n Mail::to($freelancer_data->email)\n ->send(\n new FreelancerEmailMailable(\n 'freelancer_email_new_order',\n $template_data,\n $email_params\n )\n );\n }\n }\n } else {\n $id = session()->get('product_id');\n $proposal = Proposal::find($id);\n $proposal->hired = 1;\n $proposal->status = 'hired';\n $proposal->paid = 'pending';\n $proposal->save();\n $job = Job::find($proposal->job->id);\n $job->status = 'hired';\n $job->save();\n // send message to freelancer\n $message = new Message();\n $user = User::find(intval(Auth::user()->id));\n $message->user()->associate($user);\n $message->receiver_id = intval($proposal->freelancer_id);\n $message->body = trans('lang.hire_for') . ' ' . $job->title . ' ' . trans('lang.project');\n $message->status = 0;\n $message->save();\n // send mail\n if (!empty(config('mail.username')) && !empty(config('mail.password'))) {\n $freelancer = User::find($proposal->freelancer_id);\n $employer = User::find($job->user_id);\n if (!empty($freelancer->email)) {\n $email_params = array();\n $template = DB::table('email_types')->select('id')->where('email_type', 'freelancer_email_hire_freelancer')->get()->first();\n if (!empty($template->id)) {\n $template_data = EmailTemplate::getEmailTemplateByID($template->id);\n $email_params['project_title'] = $job->title;\n $email_params['hired_project_link'] = url('job/' . $job->slug);\n $email_params['name'] = Helper::getUserName($freelancer->id);\n $email_params['link'] = url('profile/' . $freelancer->slug);\n $email_params['employer_profile'] = url('profile/' . $employer->slug);\n $email_params['emp_name'] = Helper::getUserName($employer->id);\n Mail::to($freelancer->email)\n ->send(\n new FreelancerEmailMailable(\n 'freelancer_email_hire_freelancer',\n $template_data,\n $email_params\n )\n );\n }\n }\n }\n }\n }\n }\n } else {\n $json['type'] = 'error';\n $json['message'] = trans('lang.money_not_add');\n return $json;\n }\n } catch (Exception $e) {\n $json['type'] = 'error';\n $json['message'] = $e->getMessage();\n return $json;\n } catch (\\Cartalyst\\Stripe\\Exception\\CardErrorException $e) {\n $json['type'] = 'error';\n $json['message'] = $e->getMessage();\n return $json;\n } catch (\\Cartalyst\\Stripe\\Exception\\MissingParameterException $e) {\n $json['type'] = 'error';\n $json['message'] = $e->getMessage();\n return $json;\n }\n }\n session()->forget('product_id');\n session()->forget('product_title');\n session()->forget('product_price');\n session()->forget('custom_order_id');\n $project_type = session()->get('project_type');\n if (Auth::user()->getRoleNames()[0] == \"employer\") {\n if ($type == 'project') {\n if ($project_type == 'service') {\n $json['url'] = url('employer/services/hired');\n } else {\n $json['url'] = url('employer/jobs/hired');\n }\n $json['type'] = 'success';\n $json['message'] = trans('lang.freelancer_successfully_hired');\n session()->forget('type');\n return $json;\n } else {\n $json['type'] = 'success';\n $json['message'] = trans('lang.thanks_subscription');\n $json['url'] = url('dashboard/packages/employer');\n session()->forget('type');\n return $json;\n }\n } else if (Auth::user()->getRoleNames()[0] == \"freelancer\") {\n $json['type'] = 'success';\n $json['message'] = trans('lang.thanks_subscription');\n $json['url'] = url('dashboard/packages/freelancer');\n session()->forget('type');\n return $json;\n }\n }", "title": "" }, { "docid": "c486b44852f2c78afb6988dc2308404d", "score": "0.48659936", "text": "function nostarch_invalid_preorder_message() {\n drupal_set_message('<strong>Please note that, due to technical limitations with our payment gateway, each pre-order item must be purchased separately from other items, in its own order. We apologize for any inconvenience this might cause&mdash;we\\'re working on getting it fixed!</strong>', 'error', FALSE);\n}", "title": "" }, { "docid": "484f0697a2c385fac8dba2475a984a3e", "score": "0.4859593", "text": "public function masterpass_button_action() {\n\t\tif ( $this->enabled === 'no' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdefine( 'WOOCOMMERCE_CHECKOUT', true );\n\n\t\t// Calculate totals\n\t\tWC()->cart->calculate_shipping();\n\t\tWC()->cart->calculate_totals();\n\n\t\t$order_id = WC()->checkout()->create_order( array() );\n\t\tif ( is_wp_error( $order_id ) ) {\n\t\t\tthrow new Exception( $order_id->get_error_message() );\n\t\t}\n\n\t\t$available_gateways = WC()->payment_gateways->get_available_payment_gateways();\n\t\t$payment_method = $available_gateways[ $this->id ];\n\n\t\t$order = wc_get_order( $order_id );\n\t\t$order->set_payment_method( $payment_method );\n\n\t\tdo_action( 'woocommerce_checkout_order_processed', $order_id, array() );\n\n\t\t// Process payment\n\t\tif ( WC()->cart->needs_payment() ) {\n\n\t\t\t// Store Order ID in session so it can be re-used after payment failure\n\t\t\tWC()->session->order_awaiting_payment = $order_id;\n\n\t\t\t$additional = array(\n\t\t\t\t'USEMASTERPASS=1',\n\t\t\t\t'RESPONSIVE=1',\n\t\t\t\t'SHOPPINGCARTXML=' . urlencode( $this->getShoppingCartXML( $order ) )\n\t\t\t);\n\n\t\t\t// Init PayEx\n\t\t\t$this->getPx()->setEnvironment( $this->account_no, $this->encrypted_key, $this->testmode === 'yes' );\n\n\t\t\t// Call PxOrder.Initialize8\n\t\t\t$params = array(\n\t\t\t\t'accountNumber' => '',\n\t\t\t\t'purchaseOperation' => $this->purchase_operation,\n\t\t\t\t'price' => round( $order->get_total() * 100 ),\n\t\t\t\t'priceArgList' => '',\n\t\t\t\t'currency' => $order->get_currency(),\n\t\t\t\t'vat' => 0,\n\t\t\t\t'orderID' => $order->get_id(),\n\t\t\t\t'productNumber' => (int) $order->get_user_id(), // Customer Id\n\t\t\t\t'description' => $this->description,\n\t\t\t\t'clientIPAddress' => $_SERVER['REMOTE_ADDR'],\n\t\t\t\t'clientIdentifier' => 'USERAGENT=' . $_SERVER['HTTP_USER_AGENT'],\n\t\t\t\t'additionalValues' => $this->get_additional_values( $additional, $order ),\n\t\t\t\t'externalID' => '',\n\t\t\t\t'returnUrl' => wc_get_checkout_url(),\n\t\t\t\t'view' => 'CREDITCARD',\n\t\t\t\t'agreementRef' => '',\n\t\t\t\t'cancelUrl' => html_entity_decode( $order->get_cancel_order_url() ),\n\t\t\t\t'clientLanguage' => $this->language\n\t\t\t);\n\t\t\t$result = $this->getPx()->Initialize8( $params );\n\t\t\tif ( $result['code'] !== 'OK' || $result['description'] !== 'OK' || $result['errorCode'] !== 'OK' ) {\n\t\t\t\t$this->log( 'PxOrder.Initialize8:' . $result['errorCode'] . '(' . $result['description'] . ')' );\n\t\t\t\t$order->update_status( 'failed', $this->getVerboseErrorMessage( $result ) );\n\t\t\t\twc_add_notice( $this->getVerboseErrorMessage( $result ), 'error' );\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$orderRef = $result['orderRef'];\n\t\t\t$redirectUrl = $result['redirectUrl'];\n\n\t\t\t// Save MasterPass Order Reference\n\t\t\tWC()->session->set( 'mp_order_reference', $orderRef );\n\t\t\tWC()->session->set( 'mp_payment_selected', true );\n\n\t\t\twp_redirect( $redirectUrl );\n\t\t\texit();\n\t\t}\n\t}", "title": "" }, { "docid": "af9927ebf0e7cf50ad4c7869f719aedf", "score": "0.48496544", "text": "protected function _pay(){\r\n\r\n $customer = $this->_service->getOrder()->getCustomer();\r\n $customerId = '';\r\n if(isset($customer)){\r\n $customerId = $customer->getId();\r\n }else{\r\n $customerId = $this->_service->getOrder()->getCustomerId();\r\n }\r\n $this->_customer = mage::getModel('customer/customer')->load($customerId);\r\n\r\n $this->_payerRef = $this->_customer->getData('realex_payer_ref');\r\n // if not existing payer create payer\r\n if(!isset($this->_payerRef)){\r\n $this->_method = 'payerNew';\r\n $this->_action = 'payerNew';\r\n $this->_setMessage($this->_method,'token');\r\n $this->_setResponse($this->_method,null,'token');\r\n\r\n $this->_preparePayerNew();\r\n\r\n $this->_send(\r\n $this->_getServiceUrl(),\r\n $this->_message->prepareMessage()\r\n );\r\n\r\n $this->_response->processResult();\r\n try{\r\n $this->_customer->setRealexPayerRef($this->_payerRef);\r\n $this->_customer->save();\r\n }catch(Exception $e){\r\n $this->getRealexSession()->setTokenSaved(false);\r\n Mage::getSingleton('customer/session')->setTokenSaved(false);\r\n throw $e;\r\n }catch(Yoma_Realex_Model_Exception_PayerNew $e){\r\n $this->getRealexSession()->setTokenSaved(false);\r\n Mage::getSingleton('customer/session')->setTokenSaved(false);\r\n throw $e;\r\n return $this;\r\n }\r\n\r\n }\r\n // if token not all ready exist create\r\n if(!$this->_getHelper()->tokenExist(\r\n $this->_customer,$this->_service->getPayment(),\r\n $this->_service->getMd('card_number'))){\r\n $this->_method = 'registerToken';\r\n $this->_action = 'registerToken';\r\n $this->_setMessage($this->_method,'token');\r\n $this->_setResponse($this->_method,null,'token');\r\n\r\n $this->_prepareRegisterToken();\r\n\r\n $this->_send(\r\n $this->_getServiceUrl(),\r\n $this->_message->prepareMessage()\r\n );\r\n\r\n $this->_response->processResult();\r\n\r\n $this->_saveToken();\r\n $this->getRealexSession()->setTokenSaved(true);\r\n Mage::getSingleton('customer/session')->setTokenSaved(true);\r\n }\r\n return $this;\r\n }", "title": "" }, { "docid": "623949d05392726e789b4e7bebb9e695", "score": "0.484889", "text": "public function create(Request $request)\n {\n $this->validate($request,[\n 'name' => ['required'],\n 'address' => ['required'],\n 'town' => ['required'],\n 'state' => [ 'required'],\n 'postcode' => ['required'],\n 'phone' => ['required'],\n 'email' => ['required'],\n ]);\n $items = \\Cart::getContent();\n $product_details = [];\n foreach($items as $item){\n array_push($product_details, ['slug' => $item->associatedModel->slug, 'quantity' =>$item->quantity,'size' => reset($item->attributes)[0] ]);\n }\n\n $api_key = 'rzp_live_ct4nTnLWEOSNL0';\n $api_secret = 'BpOPkJnaV8EGRW466n0V66o8';\n $api = new Api($api_key, $api_secret);\n\n $receipt_id = Str::random(20);\n $order = $api->order->create(array(\n 'receipt' => $receipt_id,\n 'amount' => \\Cart::getTotal() * 100,\n 'payment_capture' => 1,\n 'currency' => 'INR'\n )\n );\n \n $response = [\n 'orderId'=> $order['id'],\n 'razorpayId' => $api_key,\n 'amount' => \\Cart::getTotal() * 100,\n 'name' => $request->input('name'),\n 'email'=> $request->input('email'),\n 'contact'=> $request->input('phone'),\n 'address' => $request->input('address'),\n 'orderNote' => $request->input('order_note'),\n 'town' => $request->input('town'),\n 'state' => $request->input('state'),\n 'postcode' => $request->input('postcode'),\n 'product_details' => json_encode($product_details), \n ];\n\n return view('pages.payment',compact('response'));\n }", "title": "" }, { "docid": "93343475556deb952c8bf10794d7fe47", "score": "0.48470354", "text": "public function store(Request $request)\n {\n\n\n\n // $session = $request->session();\n // $status = $session->flash('status', 'You have successfully placed an order');\n $this->user = Auth::user();\n $tax_amount = new CartHelper;\n $tax_amount = $tax_amount -> vatTotal();\n\n $getTotal = new CartHelper;\n $getTotal = $getTotal -> getTotal();\n\n $post = [\n 'users_id'=>$this->user->id,\n 'tax_amount'=>$tax_amount,\n 'total_amount'=>$getTotal\n ];\n\n $dishes = Cart::where('token', csrf_token())->whereNull('order_id')->get();\n\n\n\n if (count($dishes) == 0) {\n // dump(count($order));\n return redirect()->to('dishes');\n }\n else {\n $order = Order::create($post);\n foreach ($dishes as $cart) {\n $cart->order_id = $order->id;\n $cart->save();\n }\n try {\n $request = WebToPay::redirectToPayment(array(\n 'projectid' => env('PAYSERA_ID'),\n 'sign_password' => env('PAYSERA_PW'),\n 'orderid' => $order->id,\n 'amount' => $getTotal*100,\n 'currency' => 'EUR',\n 'country' => 'LT',\n 'accepturl' => route('accept'),\n 'cancelurl' => route('cancel'),\n 'callbackurl' => route('callback'),\n 'test' => 1,\n ));\n } catch (WebToPayException $e) {\n // handle exception\n }\n }\n}", "title": "" }, { "docid": "5f03608e7a6f89c70ba23c1ada5cbf8e", "score": "0.4844172", "text": "function _prePayment( $data )\n\t{\n\t\t$jinput = JFactory::getApplication()->input;\n\t\t\n\t\t// prepare the payment form\n\n\t\t$vars = new JObject();\n\t\t$vars->url = JRoute::_( \"index.php?option=com_tienda&view=checkout\" );\n\t\t$vars->form = new JObject();\n\t\t$vars->form->action = JRoute::_( \"index.php?option=com_tienda&controller=checkout&task=confirmPayment&ptype={$this->_payment_type}&paction=process\", false, $this->params->get( 'secure_post', '0' ) );\n\n\t\t$vars->order_id = $data['order_id'];\n\t\t$vars->orderpayment_id = $data['orderpayment_id'];\n\t\t$vars->orderpayment_amount = $data['orderpayment_amount'];\n\n\t\t$vars->orderpayment_type = $this->_element;\n\t\t$vars->cardtype = $jinput->getString(\"card_type\");\n\t\t$vars->cardnum = $jinput->getString(\"card_number\");\n\n\t\t// converting date in the MMYY format\n\n\t\tif( strlen($jinput->getString(\"expiration_month\"))==1)\n\t\t{\n\t\t\t$date=\"0\".(String)$jinput->getString(\"expiration_month\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$date= $jinput->getString(\"expiration_month\");\n\t\t}\n\n\t\tif( strlen($jinput->getString(\"expiration_year\"))==4)\n\t\t{\n\t\t\t$date = $date . substr($jinput->getString(\"expiration_year\"),0,2);\n\t\t}\n\t\telse {\n\t\t\t$date = $date . $jinput->getString(\"expiration_year\");\n\t\t}\n\n\t\t$expire_date=$this->_getFormattedCardExprDate('my',$date);\n\n\t\t$vars->cardexp = $expire_date;\n\t\t$vars->cardcvv = $jinput->getString(\"cvv_number\");\n\t\t$vars->cardnum_last4 = substr( $jinput->getString(\"card_number\"), -4 );\n\t\t$vars->data =$data;\n\t\t\t\n\t\t// saving the productpayment_id which will use to update the Transaction fail condition\n\t\t$session = JFactory::getSession();\n\n\t\t// After getiing the response if the transaction will fail it will used\n\t\t$session->set( 'orderpayment_id', $data['orderpayment_id'] );\n\n\t\t$html = $this->_getLayout('prepayment', $vars);\n\t\treturn $html;\n\n\t}", "title": "" }, { "docid": "3e0d71052d714e5d33db1a68db084aee", "score": "0.48391315", "text": "public function processCreateInvoice(Mage_Sales_Model_Order $order)\n {\n if (\n $order->getStatus() == self::STATUS_CHARGED\n && $order->canInvoice()\n ) {\n\n $invoice = Mage::getModel('sales/service_order', $order)->prepareInvoice();\n $invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_ONLINE);\n\n $invoice->register();\n\n $transaction = Mage::getModel('core/resource_transaction')\n ->addObject($invoice)\n ->addObject($invoice->getOrder());\n\n $transaction->save();\n }\n }", "title": "" }, { "docid": "fb587dc6bb1288505a9965cb033a4544", "score": "0.48353016", "text": "public function store()\r\n\t{\r\n\t\t$expiration_month = Input::get('expiration_month');\t\t\r\n\t\t$expiration_year = Input::get('expiration_year');\t\r\n\t\t$expiration_date = $expiration_month.'/'.$expiration_year;\r\n\t\t\r\n\t\t$result = Braintree_Customer::create(array(\r\n\t\t\t'id' => Auth::user()->userCompany->company_id,\r\n\t\t\t'firstName' => Input::get('first_name'),\r\n \t\t\t'lastName' => Input::get('last_name'),\r\n \t\t\t'company' => Auth::user()->userCompany->name,\r\n \t\t\t'email' => Auth::user()->email,\r\n \t\t\t'phone' => Input::get('phone'), \t\t\t \t\t\t\r\n\t\t 'creditCard' => array(\r\n\t\t 'cardholderName' => Input::get('cardholderName'),\r\n\t\t 'number' => Input::get('card_number'),\r\n\t\t 'cvv' => Input::get('cvv'),\r\n\t\t 'expirationDate' => $expiration_date,\r\n\t\t 'options' => array(\t\t\t \r\n\t\t\t 'verifyCard' => true\r\n\t\t\t ),\r\n\t\t 'billingAddress' => array(\r\n\t\t\t 'firstName' => Input::get('first_name'),\r\n\t \t\t 'lastName' => Input::get('last_name'),\r\n\t \t\t 'company' => Auth::user()->userCompany->name,\r\n\t\t 'streetAddress' => Input::get('street_address'),\r\n\t\t 'extendedAddress' => Input::get('extended_address'),\r\n\t\t 'locality' => Input::get('locality'),\r\n\t\t 'region' => Input::get('region'),\r\n\t\t 'postalCode' => Input::get('postal_code'),\r\n\t\t 'countryCodeAlpha2' => Input::get('country')\r\n\t\t )\r\n\t\t )\r\n\t\t )\r\n\t\t);\t\r\n\r\n\t\tif($result->success)\t\t\t\t\t\t\r\n\t\t return Response::json(array('isSuccessful' => true));\t\r\n\t\telse\r\n\t\t{\r\n\t\t\t$message=\"<p>The following errors have occurred:</p><ul>\";\r\n\t\t\tforeach($result->errors->deepAll() AS $error) {\r\n \t\t\t\t$message.=\"<li>\". $error->message.\"</li>\" ;\t}\r\n \t\t\t\t$message.=\"</ul>\";\r\n \t\t\t\treturn Response::json(array('isSuccessful' => false,'error' => $message)); \t\t\t\r\n\t\t}\r\n\t\t\r\n\t\r\n\t}", "title": "" }, { "docid": "6a514c430140d5ed6dd9e56b62430eb2", "score": "0.48203447", "text": "private function _isNotFreshNewOrder()\n {\n $session = Mage::getSingleton('checkout/session');\n return (\n !isset($session) ||\n $session->getData('quote_id_1') != $this->getOrder()->getQuoteId()\n );\n }", "title": "" }, { "docid": "b7ddfdde542183ddaeb2ef8b8da91709", "score": "0.48129177", "text": "function createOrder($order = []){\n\t\t\t// \"email\" => \"[email protected]\",\n\t\t\t// \"fulfillment_status\" => \"unfulfilled\",\n\t\t\t// \"line_items\" => [\n\t\t\t// [\n\t\t\t// \"variant_id\" => 27535413959,\n\t\t\t// \"quantity\" => 5\n\t\t\t// ]\n\t\t\t// ]\n\t\t\t// );\n\n\t\t\tglobal $shopify;\n\n\t\t\tif(!empty($order) || isset($order))\n\t\t\t\t$res = $shopify->Order->post($order);\n\t\t\telse\n\t\t\t\t$res = false;\n\n\t\t\treturn $res;\n\t\t}", "title": "" }, { "docid": "725aa837a5678130db7307330a7de3fa", "score": "0.48120335", "text": "function dokan_create_sub_order_coupon( $parent_order, $order_id, $product_ids ) {\n $used_coupons = $parent_order->get_used_coupons();\n\n if ( ! count( $used_coupons ) ) {\n return;\n }\n\n if ( $used_coupons ) {\n foreach ($used_coupons as $coupon_code) {\n $coupon = new WC_Coupon( $coupon_code );\n\n if ( $coupon && !is_wp_error( $coupon ) && array_intersect( $product_ids, $coupon->product_ids ) ) {\n\n // we found some match\n $item_id = wc_add_order_item( $order_id, array(\n 'order_item_name' => $coupon_code,\n 'order_item_type' => 'coupon'\n ) );\n\n // Add line item meta\n if ( $item_id ) {\n wc_add_order_item_meta( $item_id, 'discount_amount', isset( WC()->cart->coupon_discount_amounts[ $coupon_code ] ) ? WC()->cart->coupon_discount_amounts[ $coupon_code ] : 0 );\n }\n }\n }\n }\n}", "title": "" }, { "docid": "3b4e3c4c0c7a7c5adf2fed24b588e5a8", "score": "0.48118246", "text": "function custom_override_checkout_fields( $fields ) {\n unset($fields['order']['order_comments']);\n unset($fields['billing']['billing_last_name']);\n unset($fields['billing']['billing_country']);\n unset($fields['billing']['billing_company']);\n unset($fields['billing']['billing_phone']);\n unset($fields['billing']['billing_postcode']);\n unset($fields['billing']['billing_state']);\n unset($fields['billing']['billing_address_1']);\n unset($fields['billing']['billing_address_2']);\n\n return $fields;\n}", "title": "" }, { "docid": "f5059adb3ceb56319357eb532a4b89fb", "score": "0.48090386", "text": "public function order_void( $order ) {\n\t\t//print_r($order);\n\t\t\n\t\t $order_id = version_compare( WC_VERSION, '3.0.0', '<' ) ? $order->id : $order->get_id();\n\t\n\t\t //if ( '1' === get_post_meta( $order_id, '_qualpay_authorized', true ) ) {\n\t\t\t$api = new Qualpay_API();\n\t\t\t$args = array();\n\t\t\t$pg_id = get_post_meta( $order_id, '_qualpay_pg_id');\n\t\t\t\n\t\t\tfor($i=0;$i<count($pg_id);$i++)\n\t\t\t{\n\t\t\t\t$pg_id_amount = $api->get_amount_pg_id($pg_id[$i]);\n\t\t\t\t$args['amt_tran'] = $pg_id_amount->amt_tran;\n\t\t\t\t$args['pg_id'] =$pg_id[$i];\n\t\t\t\t$response = $api->do_void( $args );\n\t\t\t\t\n\t\t\t}\n\t\t\t$subscription_id = get_post_meta( $order_id, '_qualpay_subscription_id');\n\t\t\t$customer_id = get_post_meta($order_id, '_qualpay_subscription_customer_id', true);\n\t\t\tif($subscription_id && $customer_id) {\n\t\t\t\tfor($i=0;$i<count($subscription_id);$i++)\n\t\t\t\t{\n\t\t\t\t\t$args1['subscription_id'] = $subscription_id[$i];\n\t\t\t\t\t$args1['customer_id'] =$customer_id;\n\t\t\t\t\t$response1 = $api->do_subscription_cancel( $args1 );\n\t\t\t\t\t$order->add_order_note( __( 'Subscription Canceled', 'qualpay' ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ( ! is_wp_error( $response ) ) {\n\t\t\t\t$order->payment_complete( get_post_meta( $order_id, '_qualpay_auth_code', true ) );\n\t\t\t\t$order->add_order_note( __( 'Order Canceled', 'qualpay' ) );\n\t\t\t\tadd_filter( 'redirect_post_location', array( __CLASS__, 'set_order_void_message' ) );\n\t\t\t\t$order->update_status('cancelled', __('Order Payment canceled.', 'qualpay'));\n\t\t\t} else {\n\t\t\t\t$order->add_order_note( $response->get_error_message() );\n\t\t\t}\n\t\t\t//exit;\n\t}", "title": "" }, { "docid": "c8d7392237050cde525e97e67c27c772", "score": "0.4807394", "text": "public function setRepeatPurchaseRequest($quoteData, $billingAddress, $billingAddressData) {\n try {\n $customerId = $quoteData['customer_id'];\n if ($customerId != null) {\n $customerData = Mage::getModel('customer/customer')->load($customerId);\n $rrNumber = $customerData->getData('rr_number');\n } else {\n $rrNumber = null;\n }\n //Getting the SoapClient\n $soapClient = Mage::helper('santander')->getSoapClient();\n if ($soapClient != false) {\n $arrayValues = array();\n $arrayValues['password'] = Mage::getStoreConfig('santander/general/spassword'); //Adding Pass\n $arrayValues['userName'] = Mage::getStoreConfig('santander/general/susername'); //Adding Username\n //Adding Email\n $arrayValues['emailAddress'] = array(\n 'readonly' => true,\n 'value' => $quoteData['customer_email']\n );\n //Adding amount of order\n $arrayValues['amount'] = round($quoteData['grand_total'] * 100, 0);\n //Get BottomBanner\n $bottomBanner = Mage::getStoreConfig('santander/general/bottombanner');\n //If Bottombanner isset, then add it to array\n if ($bottomBanner != null) {\n $arrayValues['bottomBanner'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA, array('_secure' => true)) . 'theme' . DS . $bottomBanner;\n }\n //Get Reject Url\n $arrayValues['rejectUrl'] = Mage::getUrl('santander/payment/reject', array('_secure' => true));\n //Add Action Type\n // 0101 -> Check Credit Available\n // 0102 -> Reservation\n // 0103 -> Purchase\n // 0104 -> Purchase with pending period\n $arrayValues['actionType'] = '0101';\n //Getting CSS url\n $cssUrl = Mage::getStoreConfig('santander/general/css_url');\n //If CSS url is set in backend, add CSS url to Array\n if ($cssUrl != null) {\n $arrayValues['cssUrl'] = $cssUrl;\n }\n //Getting Accept URL\n $arrayValues['acceptUrl'] = Mage::getUrl('santander/payment/accept', array('_secure' => true));\n //Getting Reference ID\n $arrayValues['referenceId'] = $quoteData['reserved_order_id'];\n //Add Postal Code\n $arrayValues['addressPostcode'] = array(\n 'readonly' => true,\n 'value' => $billingAddressData['postcode']\n );\n //Getting Topbanner from backend\n $topBanner = Mage::getStoreConfig('santander/general/topbanner');\n //If topbanner isset, then add it to array\n if ($topBanner != null) {\n $arrayValues['topBanner'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA, array('_secure' => true)) . 'theme' . DS . $topBanner;\n }\n //If RRNUMBER is not null, then add it to the array\n if ($rrNumber != null) {\n $arrayValues['rrNumber'] = array(\n 'readonly' => true,\n 'value' => $rrNumber\n );\n }\n //Add refer url\n $arrayValues['referUrl'] = Mage::getUrl('santander/payment/refer', array('_secure' => true));\n $arrayData = array(\n 'wsca' => $arrayValues\n );\n //Setting the data via the SOAP to Santander, getting back a businessRequest\n //This is a session ID that is needed for the redirect url so the form is correct\n try {\n $businessRequest = $soapClient->setRepeatPurchase(\n $arrayData\n );\n } catch (Exception $e) {\n Mage::log($e);\n }\n }\n return $businessRequest;\n } catch (Exception $e) {\n Mage::getSingleton('core/session')->addError(Mage::helper('santander')->__('Something went wrong, please try again.'));\n $this->_redirect('checkout/cart');\n }\n }", "title": "" }, { "docid": "e5c33389b0e1b1abe6db975e83c50bf7", "score": "0.48069593", "text": "public function add_payment_gateway_transaction_data( $order, $response ) {\n\n\t\t// global gateway server timestamp\n\t\tif ( $response->get_timestamp() ) {\n\t\t\t$this->update_order_meta( $order, 'timestamp', $response->get_timestamp() );\n\t\t}\n\n\t\t// reference number from card processor\n\t\tif ( $response->get_reference_number() ) {\n\t\t\t$this->update_order_meta( $order, 'reference_number', $response->get_reference_number() );\n\t\t}\n\t}", "title": "" } ]
265fa35f620eb58ffc31b0285a54cec3
/ echo ''; $updateTime = new DateTime($res['update_datetime']); var_dump('$res AEST : ' . $updateTime>format('D, d M Y H:i:s')); $updateTime>setTimeZone(new DateTimeZone('GMT')); var_dump('$res GMT : ' . $updateTime>format('D, d M Y H:i:s')); var_dump('$updateTime timeStamp : ' . $updateTime>getTimestamp()); var_dump('$res["update_timestamp"] : ' . $res['update_timestamp']); var_dump('IfModifiedSince : ' . $headers['IfModifiedSince']); $modifiedSince = new DateTime($headers['IfModifiedSince']); var_dump('$modifiedSince GMT : ' . $modifiedSince>format('D, d M Y H:i:s')); var_dump('$modifiedSince timestamp : ' . $modifiedSince>getTimestamp()); var_dump(strtotime($headers['IfModifiedSince']) $res['update_timestamp']);
[ { "docid": "7a6843126395610979757b4bbbe0f733", "score": "0.57956505", "text": "function checkCacheHeaders($updateTimestamp) {\n \n $lastModifiedStr = 'Last-Modified: ' . gmdate('D, d M Y H:i:s', $updateTimestamp) . ' GMT';\n if (isset($headers['If-Modified-Since']) && (strtotime($headers['If-Modified-Since']) < $updateTimestamp)) {\n // Client's cache IS current, so we just respond '304 Not Modified'.\n header($lastModifiedStr, true, 304);\n exit();\n } else {\n // not cached or cache outdated, we respond '200 OK' and go ahead.\n header($lastModifiedStr, true, 200);\n }\n}", "title": "" } ]
[ { "docid": "113f85d29985c0051e3aeb367bd94913", "score": "0.63365984", "text": "public function testModified() {\n\t\t$response = $this->getMock('CakeResponse', array('_sendHeader', '_sendContent'));\n\t\t$now = new DateTime('now', new DateTimeZone('America/Los_Angeles'));\n\t\t$response->modified($now);\n\t\t$now->setTimeZone(new DateTimeZone('UTC'));\n\t\t$this->assertEquals($now->format('D, j M Y H:i:s') . ' GMT', $response->modified());\n\t\t$response->expects($this->at(1))\n\t\t\t->method('_sendHeader')->with('Last-Modified', $now->format('D, j M Y H:i:s') . ' GMT');\n\t\t$response->send();\n\n\t\t$response = $this->getMock('CakeResponse', array('_sendHeader', '_sendContent'));\n\t\t$now = time();\n\t\t$response->modified($now);\n\t\t$this->assertEquals(gmdate('D, j M Y H:i:s', $now) . ' GMT', $response->modified());\n\t\t$response->expects($this->at(1))\n\t\t\t->method('_sendHeader')->with('Last-Modified', gmdate('D, j M Y H:i:s', $now) . ' GMT');\n\t\t$response->send();\n\n\t\t$response = $this->getMock('CakeResponse', array('_sendHeader', '_sendContent'));\n\t\t$time = new DateTime('+1 day', new DateTimeZone('UTC'));\n\t\t$response->modified('+1 day');\n\t\t$this->assertEquals($time->format('D, j M Y H:i:s') . ' GMT', $response->modified());\n\t\t$response->expects($this->at(1))\n\t\t\t->method('_sendHeader')->with('Last-Modified', $time->format('D, j M Y H:i:s') . ' GMT');\n\t\t$response->send();\n\t}", "title": "" }, { "docid": "55534dea9266dfcccf022654c39449c8", "score": "0.63168824", "text": "public function testModified() {\n\t\t$response = $this->getMock ( 'CakeResponse', array (\n\t\t\t\t'_sendHeader',\n\t\t\t\t'_sendContent' \n\t\t) );\n\t\t$now = new DateTime ( 'now', new DateTimeZone ( 'America/Los_Angeles' ) );\n\t\t$response->modified ( $now );\n\t\t$now->setTimeZone ( new DateTimeZone ( 'UTC' ) );\n\t\t$this->assertEquals ( $now->format ( 'D, j M Y H:i:s' ) . ' GMT', $response->modified () );\n\t\t$response->expects ( $this->at ( 1 ) )->method ( '_sendHeader' )->with ( 'Last-Modified', $now->format ( 'D, j M Y H:i:s' ) . ' GMT' );\n\t\t$response->send ();\n\t\t\n\t\t$response = $this->getMock ( 'CakeResponse', array (\n\t\t\t\t'_sendHeader',\n\t\t\t\t'_sendContent' \n\t\t) );\n\t\t$now = time ();\n\t\t$response->modified ( $now );\n\t\t$this->assertEquals ( gmdate ( 'D, j M Y H:i:s', $now ) . ' GMT', $response->modified () );\n\t\t$response->expects ( $this->at ( 1 ) )->method ( '_sendHeader' )->with ( 'Last-Modified', gmdate ( 'D, j M Y H:i:s', $now ) . ' GMT' );\n\t\t$response->send ();\n\t\t\n\t\t$response = $this->getMock ( 'CakeResponse', array (\n\t\t\t\t'_sendHeader',\n\t\t\t\t'_sendContent' \n\t\t) );\n\t\t$time = new DateTime ( '+1 day', new DateTimeZone ( 'UTC' ) );\n\t\t$response->modified ( '+1 day' );\n\t\t$this->assertEquals ( $time->format ( 'D, j M Y H:i:s' ) . ' GMT', $response->modified () );\n\t\t$response->expects ( $this->at ( 1 ) )->method ( '_sendHeader' )->with ( 'Last-Modified', $time->format ( 'D, j M Y H:i:s' ) . ' GMT' );\n\t\t$response->send ();\n\t}", "title": "" }, { "docid": "8ba3bc177e89e93c315dade36f2d59ca", "score": "0.6218073", "text": "function http_send_last_modified ($timestamp = null) {}", "title": "" }, { "docid": "f4a437f8b88de11756a85cd70d1c782e", "score": "0.5985537", "text": "private function getIfModifiedSinceTimestamp()\n {\n if (!empty($_SERVER[self::HTTP_IF_MODIFIED_SINCE])) {\n $modifiedSinceString = $_SERVER[self::HTTP_IF_MODIFIED_SINCE];\n } elseif (!empty($_ENV[self::HTTP_IF_MODIFIED_SINCE])) {\n $modifiedSinceString = $_ENV[self::HTTP_IF_MODIFIED_SINCE];\n } else {\n $modifiedSinceString = null;\n }\n\n if ($modifiedSinceString) {\n // Some versions of IE 6 append \"; length=##\"\n if (($pos = strpos($modifiedSinceString, ';')) !== false) {\n $modifiedSinceString = substr($modifiedSinceString, 0, $pos);\n }\n\n return strtotime($modifiedSinceString);\n }\n\n return false;\n }", "title": "" }, { "docid": "3ab7b861775ec7bcfd63bc7ccbe31f89", "score": "0.59371763", "text": "function getUpdatedDateTime()\r\n {\r\n return $this->updated_at->format('Y-m-d H:i:s');\r\n }", "title": "" }, { "docid": "42096109b24cbc27d4f5db9b024dd39f", "score": "0.5764152", "text": "function driverSalesforceGetLastModified($sf, $bac, $objName) {\n\t$soql = \"SELECT LastModifiedDate FROM {$objName} ORDER BY LastModifiedDate DESC LIMIT 1\";\n\t$response = $sf->query($soql);\n\t$result = $response->current()->LastModifiedDate;\n\tpreg_match('/(\\d+)-(\\d+)-(\\d+)T(\\d+):(\\d+):(\\d+)\\.\\d+Z/', $result, $matches);\n\t$dt = new DateTime();\n\t$dt->setDate($matches[0], $matches[1], $matches[2]);\n\t$dt->setTime($matches[3], $matches[4], $matches[5]);\n\treturn $dt;\n}", "title": "" }, { "docid": "5bd85ecc4a020726648201ea47667f5a", "score": "0.5732704", "text": "protected function parseUpdateDateTime() : void {\n $updateDateTime = $this->xPath->query(self::XPATH_UPDATE_DATETIME);\n $value = $updateDateTime[0]->nodeValue;\n if (strpos($value, 'ostatnia aktualizacja:')) {\n $value = trim($value);\n $array = explode('ostatnia aktualizacja:', $updateDateTime[0]->nodeValue);\n $this->news->setuUpdateDateTime($this->prepareUpdateDateTime($array[1]));\n }\n }", "title": "" }, { "docid": "a0a47fc0d12a1d953b8d52d2bb5aec9d", "score": "0.5722499", "text": "public function getUpdateDate()\n {\n \t$this->_updatedate = time();\n \treturn $this->_updatedate;\n }", "title": "" }, { "docid": "f83bc45f816eb6461bf6e7ee5b862fa2", "score": "0.56995666", "text": "public function getRealUpdatedDate() {\n return ($this->getUpdatedAt() !== null) ? $this->getUpdatedAt() : (($this->getCreatedAt() !== null) ? $this->getCreatedAt() : new \\DateTime());\n }", "title": "" }, { "docid": "50c03474dfb38697204fb1fe8c6e352b", "score": "0.56285304", "text": "function http_cache_last_modified ($timestamp_or_expires = null) {}", "title": "" }, { "docid": "dd1cc0761adf25234d1be0e3b8fcf9b1", "score": "0.5611248", "text": "function GMTToClientTime($time)\r\n{\r\n global $auth;\r\n $time_offset= 0;\r\n if(isset($auth->cur_user)) {\r\n $time_offset= $auth->cur_user->time_offset;\r\n }\r\n return $time + $time_offset + confGet('SERVER_TIME_OFFSET');\r\n}", "title": "" }, { "docid": "8889b9e5bb1ffbb5e0f7a15488aa1732", "score": "0.559808", "text": "public function getLastModifiedDatetime()\n\t{\n\t\treturn $this->_ts;\n\t}", "title": "" }, { "docid": "9c6c973bffc532054d5950aa8c545fdc", "score": "0.55673796", "text": "public function updatedTimestamps() {\n $this->setModified(new \\DateTime(date('Y-m-d H:i:s')));\n if ($this->getCreated() == null) {\n $this->setCreated(new \\DateTime(date('Y-m-d H:i:s')));\n }\n }", "title": "" }, { "docid": "21d1ec0ba10c99d3de0a003041856df7", "score": "0.5560025", "text": "public function testDateFields()\n {\n $user = factory(User::class)->create();\n\n $newTimestamp = '2017-11-02T18:42:00.000Z';\n $this->asAdminUser()->putJson('v1/users/id/'.$user->id, [\n 'last_messaged_at' => $newTimestamp,\n ]);\n\n $this->assertResponseStatus(200);\n $this->assertEquals('2017-11-02T18:42:00+00:00', $user->fresh()->last_messaged_at->toIso8601String());\n }", "title": "" }, { "docid": "8765e630c7ad064056284ea86f8109c6", "score": "0.5558518", "text": "public static function getLastModified () {}", "title": "" }, { "docid": "70f7cb11d71e3eb937d0c184d796e577", "score": "0.5516441", "text": "public function getLastModifiedTime()\n {\n return $this->stringToDate((string) $this->json()->last_modified_time);\n }", "title": "" }, { "docid": "7e21a27814e4fef4baa48720d30d7a5e", "score": "0.54626113", "text": "public function getUpdatedDate(): \\DateTimeInterface;", "title": "" }, { "docid": "7362454cdcd076d3cfb06c0e3dc782d8", "score": "0.5452596", "text": "static function changeDateForDateTime($str_datetime, $modifier,$str_user_timezone = ApplicationDateTime::_CONST_DEFAULT_TIMEZONE,\n\t\t\t$str_server_timezone = ApplicationDateTime::_CONST_SERVER_TIMEZONE,\n\t\t\t$str_server_dateformat = ApplicationDateTime::_CONST_SERVER_DATEFORMAT) {\n\t\tdate_default_timezone_set($str_user_timezone);\n\n\t\t$date = new DateTime($str_datetime);\n\t\tdate_modify($date,$modifier);\n\t\t$date->setTimezone(new DateTimeZone($str_server_timezone));\n\t\t$str_server_now = $date->format($str_server_dateformat);\n\n\t\t// return timezone to server default\n\t\tdate_default_timezone_set($str_server_timezone);\n\n\t\treturn $str_server_now;\n\t}", "title": "" }, { "docid": "5cd5b0e697267dec5606d61a1f84dadd", "score": "0.5450684", "text": "function getFormattedUpdatedDateTime()\r\n {\r\n return $this->updated_at->format('d/m/Y H:i:s');\r\n }", "title": "" }, { "docid": "71e39988e78b25254a81f6a0b9165f89", "score": "0.54468167", "text": "private function getRemoteTimestamp($header) :int\n {\n if(!$header || strpos($header[0], '200') !== false) {\n $remoteModificationDate = new DateTime($header['Last-Modified']);\n return $remoteModificationDate->getTimestamp();\n }\n return 0;\n }", "title": "" }, { "docid": "7073d6beeae6c7eddbd04cd6bcfd90cb", "score": "0.5441801", "text": "public function testDateObjects() {\n // $date =new DateTime()->getTimeStamp();\n $date = new DateTime();\n\n $now_unix_ts = $date->getTimeStamp();\n\n $formatted_now = $date->format('Y-m-d H:i:s');\n \n print $now_unix_ts.\"\\n\";\n print $formatted_now;\n\n }", "title": "" }, { "docid": "65e1e18132c650455f410be8538f83fe", "score": "0.54092497", "text": "function get_timestamp ($dbconn, $login, $datetime) {\n\n $user_timezone = $dbconn->GetOne(\"SELECT timezone FROM users WHERE login='\".$login.\"'\");\n\n $tz = Session::get_timezone($user_timezone);\n\n return gmdate(\"Y-m-d H:i:s\",Util::get_utc_unixtime($datetime)+(3600*$tz));\n}", "title": "" }, { "docid": "7dda8d9bc204614d346d99d62fbb19a7", "score": "0.540885", "text": "public static function sendNoModify($mtime) {\r\n\t\t$req = apache_request_headers();\r\n\r\n\t\tif(isset($req['If-None-Match']) && base64_decode($req['If-None-Match'])==$mtime){\r\n header(\"HTTP/1.1 304 Not Modified\");\r\n return TRUE;\r\n\t\t}\r\n\t\tif(isset($req['If-Modified-Since'])){\r\n\t\t\t$dt = date_parse_from_format(\"D, j M Y H:i:s T\", $req['If-Modified-Since']);\r\n if($dt['error_count']==0) {\r\n\t\t\t\tdate_default_timezone_set($dt['tz_abbr']);\r\n\t\t\t\t$since = mktime($dt['hour'],$dt['minute'],$dt['second'],$dt['month'],$dt['day'],$dt['year']);\r\n if($mtime <= $since) {\r\n header(\"HTTP/1.1 304 Not Modified\");\r\n\t\t\t\t\treturn TRUE;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn FALSE;\r\n\t}", "title": "" }, { "docid": "7f1d69cbc22544bd3cb57b767e998506", "score": "0.5407228", "text": "public function updatedTimestamps() {\n $this->setCreated(new \\DateTime(date('Y-m-d H:i:s')));\n\n if ($this->getCreated() == null) {\n $this->setCreated(new \\DateTime(date('Y-m-d H:i:s')));\n }\n }", "title": "" }, { "docid": "6ad0bd34313aa3b0e6650e417d911253", "score": "0.539939", "text": "public function updateModified()\n {\n $this->modified = new \\DateTime();\n }", "title": "" }, { "docid": "94b8e68b005528ba75fd87904234bfae", "score": "0.53909504", "text": "static function changeDate($modifier,$str_user_timezone = ApplicationDateTime::_CONST_DEFAULT_TIMEZONE,\n\t\t $str_server_timezone = ApplicationDateTime::_CONST_SERVER_TIMEZONE,\n\t\t $str_server_dateformat = ApplicationDateTime::_CONST_SERVER_DATEFORMAT) {\n\t date_default_timezone_set($str_user_timezone);\n\n\t $date = new DateTime('now');\n\t date_modify($date,$modifier);\n\t $date->setTimezone(new DateTimeZone($str_server_timezone));\n\t $str_server_now = $date->format($str_server_dateformat);\n\n\t // return timezone to server default\n\t date_default_timezone_set($str_server_timezone);\n\n\t return $str_server_now;\n\t}", "title": "" }, { "docid": "0fa0ca0ce024e742b028cc42954e8317", "score": "0.5389427", "text": "public function getLastModifiedDateTime()\n {\n if (array_key_exists(\"lastModifiedDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"lastModifiedDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"lastModifiedDateTime\"])) {\n return $this->_propDict[\"lastModifiedDateTime\"];\n } else {\n $this->_propDict[\"lastModifiedDateTime\"] = new \\DateTime($this->_propDict[\"lastModifiedDateTime\"]);\n return $this->_propDict[\"lastModifiedDateTime\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "0fa0ca0ce024e742b028cc42954e8317", "score": "0.5389427", "text": "public function getLastModifiedDateTime()\n {\n if (array_key_exists(\"lastModifiedDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"lastModifiedDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"lastModifiedDateTime\"])) {\n return $this->_propDict[\"lastModifiedDateTime\"];\n } else {\n $this->_propDict[\"lastModifiedDateTime\"] = new \\DateTime($this->_propDict[\"lastModifiedDateTime\"]);\n return $this->_propDict[\"lastModifiedDateTime\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "0fa0ca0ce024e742b028cc42954e8317", "score": "0.5389427", "text": "public function getLastModifiedDateTime()\n {\n if (array_key_exists(\"lastModifiedDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"lastModifiedDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"lastModifiedDateTime\"])) {\n return $this->_propDict[\"lastModifiedDateTime\"];\n } else {\n $this->_propDict[\"lastModifiedDateTime\"] = new \\DateTime($this->_propDict[\"lastModifiedDateTime\"]);\n return $this->_propDict[\"lastModifiedDateTime\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "0fa0ca0ce024e742b028cc42954e8317", "score": "0.5389427", "text": "public function getLastModifiedDateTime()\n {\n if (array_key_exists(\"lastModifiedDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"lastModifiedDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"lastModifiedDateTime\"])) {\n return $this->_propDict[\"lastModifiedDateTime\"];\n } else {\n $this->_propDict[\"lastModifiedDateTime\"] = new \\DateTime($this->_propDict[\"lastModifiedDateTime\"]);\n return $this->_propDict[\"lastModifiedDateTime\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "0fa0ca0ce024e742b028cc42954e8317", "score": "0.5389427", "text": "public function getLastModifiedDateTime()\n {\n if (array_key_exists(\"lastModifiedDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"lastModifiedDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"lastModifiedDateTime\"])) {\n return $this->_propDict[\"lastModifiedDateTime\"];\n } else {\n $this->_propDict[\"lastModifiedDateTime\"] = new \\DateTime($this->_propDict[\"lastModifiedDateTime\"]);\n return $this->_propDict[\"lastModifiedDateTime\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "0fa0ca0ce024e742b028cc42954e8317", "score": "0.5389427", "text": "public function getLastModifiedDateTime()\n {\n if (array_key_exists(\"lastModifiedDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"lastModifiedDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"lastModifiedDateTime\"])) {\n return $this->_propDict[\"lastModifiedDateTime\"];\n } else {\n $this->_propDict[\"lastModifiedDateTime\"] = new \\DateTime($this->_propDict[\"lastModifiedDateTime\"]);\n return $this->_propDict[\"lastModifiedDateTime\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "0fa0ca0ce024e742b028cc42954e8317", "score": "0.5389427", "text": "public function getLastModifiedDateTime()\n {\n if (array_key_exists(\"lastModifiedDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"lastModifiedDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"lastModifiedDateTime\"])) {\n return $this->_propDict[\"lastModifiedDateTime\"];\n } else {\n $this->_propDict[\"lastModifiedDateTime\"] = new \\DateTime($this->_propDict[\"lastModifiedDateTime\"]);\n return $this->_propDict[\"lastModifiedDateTime\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "0fa0ca0ce024e742b028cc42954e8317", "score": "0.5389427", "text": "public function getLastModifiedDateTime()\n {\n if (array_key_exists(\"lastModifiedDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"lastModifiedDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"lastModifiedDateTime\"])) {\n return $this->_propDict[\"lastModifiedDateTime\"];\n } else {\n $this->_propDict[\"lastModifiedDateTime\"] = new \\DateTime($this->_propDict[\"lastModifiedDateTime\"]);\n return $this->_propDict[\"lastModifiedDateTime\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "04bf9d97209d238d5f565e3229d1b701", "score": "0.53840804", "text": "public function getDateModified()\n{\nreturn $this->dateModified;\n}", "title": "" }, { "docid": "76c1f789e1d4fae3e4f20230da44697b", "score": "0.5380294", "text": "public function getModifiedTime()\n\t{\n\t\treturn $this->modifiedTime; \n\n\t}", "title": "" }, { "docid": "0ab7217e7d677923efe97e38dfd0b0f8", "score": "0.5374247", "text": "private function _get_lastModified() {\n\n\t\t// Devuelve la fecha de modificación especificado para el response\n\t\tif (isset($this->_lastModified)) {\n\t\t\treturn FwDateTime::getTimestampFrom($this->_lastModified);\n\t\t}\n\n\t\t// Devuelve la fecha de modificación correspondiente al archivo\n\t\tif ($this->_type == 'file') {\n\t\t\tif (file_exists($this->_filePath)) {\n\t\t\t\treturn FwDateTime::getTimestampFrom(filemtime($this->_filePath));\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "9947e267b049608b6d98d7ef4ce8a460", "score": "0.5373085", "text": "protected function updateTimestamps()\n\t{\n\t\t$time = $this->freshTimestamp();\n\n\t\t$gmt = new Carbon;\n\t\t$gmt->timestamp = $time->timestamp - ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS );\n\n if (! $this->isDirty(static::UPDATED_AT)) {\n $this->setUpdatedAt($time);\n }\n\n if (! $this->exists && ! $this->isDirty(static::CREATED_AT)) {\n $this->setCreatedAt($time);\n }\n\n if (! $this->isDirty('post_modified_gmt')) {\n $this->post_modified_gmt = $gmt;\n }\n\n if (! $this->exists && ! $this->isDirty('post_gmt')) {\n $this->post_gmt = $gmt;\n }\n\t}", "title": "" }, { "docid": "a8dd9659232cfa6bba0fc41bba54a547", "score": "0.53658634", "text": "public function updatedTimestamps() {\n if ($this->getCreated() == null) {\n $this->setCreated(new \\DateTime(date('Y-m-d H:i:s')));\n }\n }", "title": "" }, { "docid": "45db2ceff66e26b7a266b036a8bc33e8", "score": "0.5361298", "text": "function convert_posted_on($date,$timezoneRequired){\n $date = ConvertGMTToLocalTimezone($date, $timezoneRequired);\n //$newDate = date(\"M,d Y g:iA\", strtotime($date->date));\n return $date->format('M,d Y g:iA');\n}", "title": "" }, { "docid": "13c6d3f853f90f9be44044e6bd5d6017", "score": "0.53585565", "text": "function check_modified_since ($last_mod) {\n\t// Check if headers not send and we have needed headers\n\tif (!headers_sent() && isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) {\n\n\t\t// Get the unix timestamp from\n\t\t$if_modified_since = explode(';', $_SERVER['HTTP_IF_MODIFIED_SINCE']);\n\t\t$if_modified_since = strtotime($if_modified_since[0]);\n\n\t\tif ($last_mod <= $if_modified_since) {\n\t\t\t header('HTTP/1.1 304 Not Modified');\n\t\t\t exit();\n\t\t}\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "712a4f8b4c8a34a92e89b26e358b1426", "score": "0.534984", "text": "function set_modified_headers($stamp, $browser)\n{\n\tglobal $request;\n\n\t// let's see if we have to send the file at all\n\t$last_load \t= $request->header('If-Modified-Since') ? strtotime(trim($request->header('If-Modified-Since'))) : false;\n\n\tif (strpos(strtolower($browser), 'msie 6.0') === false && !phpbb_is_greater_ie_version($browser, 7))\n\t{\n\t\tif ($last_load !== false && $last_load >= $stamp)\n\t\t{\n\t\t\tsend_status_line(304, 'Not Modified');\n\t\t\t// seems that we need those too ... browsers\n\t\t\theader('Cache-Control: public');\n\t\t\theader('Expires: ' . gmdate('D, d M Y H:i:s', time() + 31536000) . ' GMT');\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\theader('Last-Modified: ' . gmdate('D, d M Y H:i:s', $stamp) . ' GMT');\n\t\t}\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "f0c36808ce0fbed628f665536c460f57", "score": "0.5345173", "text": "function getEnt_updated_at() {\n return $this->ent_updated_at;\n }", "title": "" }, { "docid": "4c0a95a953ac6d5c166fecf323959ab0", "score": "0.53443635", "text": "public function getLastUpdateDateTime()\n {\n if (array_key_exists(\"lastUpdateDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"lastUpdateDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"lastUpdateDateTime\"])) {\n return $this->_propDict[\"lastUpdateDateTime\"];\n } else {\n $this->_propDict[\"lastUpdateDateTime\"] = new \\DateTime($this->_propDict[\"lastUpdateDateTime\"]);\n return $this->_propDict[\"lastUpdateDateTime\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "5218ce76a9362c28aa54fc3a38a99353", "score": "0.5342919", "text": "public function getUpdatedTimestamp()\n {\n return $this->_daResponse->getUpdatedTimestamp( $this->getId() );\n }", "title": "" }, { "docid": "1516f42690e802d5b124ef1db181ed8a", "score": "0.5317604", "text": "public function getUpdate_time() {\n return $this->_update_time;\n }", "title": "" }, { "docid": "c8513c11ac0852e11ed7b0131eb41eaa", "score": "0.53115195", "text": "static function changeTimeStampForDate($str_datetime, $str_original_timezone = ApplicationDateTime::_CONST_DEFAULT_TIMEZONE,\n\t\t\t$str_change_timezone = ApplicationDateTime::_CONST_DEFAULT_TIMEZONE,\n\t\t\t$str_server_timezone = ApplicationDateTime::_CONST_SERVER_TIMEZONE,\n\t\t\t$str_server_dateformat = ApplicationDateTime::_CONST_SERVER_DATEFORMAT) {\n\t\tdate_default_timezone_set($str_original_timezone);\n\n\t\t$date = new DateTime($str_datetime);\n\t\t$date->setTimezone(new DateTimeZone($str_change_timezone));\n\t\t$str_server_now = $date->format($str_server_dateformat);\n\n\t\t// return timezone to server default\n\t\tdate_default_timezone_set($str_server_timezone);\n\n\t\treturn $str_server_now;\n\t}", "title": "" }, { "docid": "43958261860fd9d12f3c216fba52e1f6", "score": "0.53052187", "text": "public function getUpdated_at()\n {\n return $this->updated_at;\n }", "title": "" }, { "docid": "b2cd4d5615c755aad83b76ff1152234f", "score": "0.5295771", "text": "function cmp($a, $b) {\n return -strcmp($a[\"Last-Modified\"], $b[\"Last-Modified\"]);\n }", "title": "" }, { "docid": "13ee8a70600905ac3d957cde0d29cc22", "score": "0.52928257", "text": "function utc2est($datetime_utc){\n\n include \"config.inc.php\";\n $tmp = split(\" \", $datetime_utc);\n $date = $tmp[0];\t\n $time = $tmp[1];\n\n $tmp = split(\"-\", $date);\n $year = $tmp[0];\n $month = $tmp[1];\n $day = $tmp[2];\n\n $tmp = split(\":\", $time);\n $hour = $tmp[0];\n $min = $tmp[1];\n $sec = $tmp[2];\n\n $offset = timezone_offset();\n // print \"Offset: *$offset*<br>\\n\";\n\n $string = date(\"Y-m-d H:i:s\", mktime($hour - $offset, $min, $sec, $month, $day, $year));\n\n return $string;\n}", "title": "" }, { "docid": "7a3ef9090da583e0602c3a930130999f", "score": "0.52886695", "text": "public function getModifiedAt()\n {\n return $this->modified_at;\n }", "title": "" }, { "docid": "7a3ef9090da583e0602c3a930130999f", "score": "0.52886695", "text": "public function getModifiedAt()\n {\n return $this->modified_at;\n }", "title": "" }, { "docid": "7a3ef9090da583e0602c3a930130999f", "score": "0.52886695", "text": "public function getModifiedAt()\n {\n return $this->modified_at;\n }", "title": "" }, { "docid": "557f2360b87b0cb0a3bed6fab770a001", "score": "0.5288254", "text": "public function getLastUpdatedDateTime()\n {\n if (array_key_exists(\"lastUpdatedDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"lastUpdatedDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"lastUpdatedDateTime\"])) {\n return $this->_propDict[\"lastUpdatedDateTime\"];\n } else {\n $this->_propDict[\"lastUpdatedDateTime\"] = new \\DateTime($this->_propDict[\"lastUpdatedDateTime\"]);\n return $this->_propDict[\"lastUpdatedDateTime\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "557f2360b87b0cb0a3bed6fab770a001", "score": "0.5288254", "text": "public function getLastUpdatedDateTime()\n {\n if (array_key_exists(\"lastUpdatedDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"lastUpdatedDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"lastUpdatedDateTime\"])) {\n return $this->_propDict[\"lastUpdatedDateTime\"];\n } else {\n $this->_propDict[\"lastUpdatedDateTime\"] = new \\DateTime($this->_propDict[\"lastUpdatedDateTime\"]);\n return $this->_propDict[\"lastUpdatedDateTime\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "230c4029c2dd158b22100195fbbb1386", "score": "0.5284107", "text": "public function getLastModified()\r\r\n {\r\r\n return (string) $this->getHeader('Last-Modified');\r\r\n }", "title": "" }, { "docid": "d6ac50ab2638100babdb1f37492fa6ba", "score": "0.5282054", "text": "function get_datetime_by_defined_timezone($datetime,$timezone = NULL)\n{\n if($timezone == '')\n {\n $timezone_dat = fieldByCondition(\"users\",array('id'=> currentuserinfo()->id),\"timezone\"); \n if(!empty($timezone_dat)){$timezone = $timezone_dat->timezone;}else{$timezone = date_default_timezone_get();}\n $date = new DateTime($datetime, new DateTimeZone(date_default_timezone_get()));\n }else{\n $date = new DateTime($datetime, new DateTimeZone($timezone));\n }\n \n \n //$date->format('Y-m-d H:i:s') . \"\\n\";\n $date->setTimezone(new DateTimeZone($timezone));\n return $date->format('Y-m-d H:i:s');\n\n}", "title": "" }, { "docid": "928e561365fd47093ffa8e47360d53fe", "score": "0.5275196", "text": "public function mockExposeGetTimestamp() {\n\t\treturn parent::_getDateTimestamp();\n\t}", "title": "" }, { "docid": "bd200c9c23715e5545e2aa82e875f0a7", "score": "0.5271542", "text": "public function getUpdateTs()\n {\n return $this->update_ts;\n }", "title": "" }, { "docid": "bd200c9c23715e5545e2aa82e875f0a7", "score": "0.5271542", "text": "public function getUpdateTs()\n {\n return $this->update_ts;\n }", "title": "" }, { "docid": "749e1261b5825d966b6cf904c0190517", "score": "0.5267258", "text": "public function getLastModified();", "title": "" }, { "docid": "943e0462c86e6bafd37ad53f073b860e", "score": "0.5267", "text": "function strToClientTime($str)\r\n{\r\n if($str == '0000-00-00 00:00:00' || $str == '0000-00-00') {\r\n return 0;\r\n }\r\n global $auth;\r\n $time_offset= 0;\r\n if(isset($auth->cur_user)) {\r\n $time_offset= $auth->cur_user->time_offset;\r\n }\r\n return strToTime($str . \" GMT\") + $time_offset + confGet('SERVER_TIME_OFFSET');\r\n}", "title": "" }, { "docid": "e986d0a173bce780faa2c523b21cca79", "score": "0.52544606", "text": "function update_access_time($row_edit){\n global $xerte_toolkits_site;\n /* This function is called even if the template is new - in which case it fails as a record doesn't exist */\n db_query(\"UPDATE {$xerte_toolkits_site->database_table_prefix}templatedetails SET date_accessed=? WHERE template_id = ?\", array(date('Y-m-d H:i:s'), $row_edit['template_id']));\n return true;\n}", "title": "" }, { "docid": "7ae20cb46d4b7e47f613584ad46c7fe6", "score": "0.5253773", "text": "public static function getLastJSONUpdate()\n {\n if (file_exists(Constants::LAST_UPDATE_FILE)) {\n $content = file_get_contents(Constants::LAST_UPDATE_FILE);\n if ($content !== '') {\n return new DateTime($content);\n }\n }\n return null;\n }", "title": "" }, { "docid": "f2de73fcbe1554d56d5ce95798785b15", "score": "0.52515423", "text": "function get_loginzone_time_updated()\r\n {\r\n if (isset($this->sloodle_course_data->loginzoneupdated)) return $this->sloodle_course_data->loginzoneupdated;\r\n return 0;\r\n }", "title": "" }, { "docid": "89815ae63af36dcd19bba6bcf03ef1b9", "score": "0.52452964", "text": "function http_date ($timestamp = null) {}", "title": "" }, { "docid": "efd496bae82b98df1454a837fd64c5b5", "score": "0.52250284", "text": "public function getUpdateTime(): DateTime\n {\n return new DateTime($this->updatetime ?? 'NOW');\n }", "title": "" }, { "docid": "f8c261c43f3b74dec8f233449f09c3b7", "score": "0.52219355", "text": "public function getUpdateAt()\n {\n return $this->update_at;\n }", "title": "" }, { "docid": "f8c261c43f3b74dec8f233449f09c3b7", "score": "0.52219355", "text": "public function getUpdateAt()\n {\n return $this->update_at;\n }", "title": "" }, { "docid": "72460bfd31b783c3df6350edcbe6a192", "score": "0.5212718", "text": "protected function getTimestamp()\n {\n return $this->headers->get('Date');\n }", "title": "" }, { "docid": "308709ec34bfa23931b9886644b22020", "score": "0.5211896", "text": "function getDateFromServer() {\n\n $timezone='America/Lima';\n $date = new DateTime();\n $date->setTimezone(new DateTimeZone($timezone));\n $fecha = $date->format('y-m-d');\n\n return $fecha;\n\n}", "title": "" }, { "docid": "af33011fde80267ba91513a397eb0fc5", "score": "0.52103597", "text": "function samlGetDateTime($timestamp) {\r\n return gmdate('Y-m-d\\TH:i:s\\Z', $timestamp);\r\n}", "title": "" }, { "docid": "7f674bc71fc2aef0ecc6e9f80763d562", "score": "0.5208701", "text": "public function getUpdatedTime() {\n return $this->get('updated-time');\n }", "title": "" }, { "docid": "c764a776a1f1d6e67acfe3253f69cd25", "score": "0.5208399", "text": "public function getUpdatedTime() {\n\t\treturn $this->updatedTime;\n\t}", "title": "" }, { "docid": "15b9fe91f10f59bb667d8fe3fc23bd3b", "score": "0.520766", "text": "function buildCurrentUtcTimestamp() {\n\t$timeZoneOffset = date('Z');\n\tdebugln(\"timezone offset is $timeZoneOffset seconds\");\n\treturn time() - $timeZoneOffset + SERVER_TIME_CORRECTION_IN_SECONDS;\n}", "title": "" }, { "docid": "01fd487ba87a2550936827b72007c27c", "score": "0.52067536", "text": "function ServerToLocalDateTime($EntryTimeStamp) {\n//\t$_SESSION[\"TimeOffset\"]=60*60*2 ; // only used for test at developemnt phase\n\tif (empty($_SESSION[\"TimeOffset\"])) {\n\t\treturn($EntryTimeStamp) ;\n\t}\n\telse {\n\t\tif (isset($_SESSION['PreferenceDayLight']) and ($_SESSION['PreferenceDayLight']=='Yes')) {\n\t\t\treturn($EntryTimeStamp+$_SESSION[\"TimeOffset\"]+$_SESSION[\"Param\"]->DayLightOffset) ;\n\t\t}\n\t\telse {\n\t\t\treturn($EntryTimeStamp+$_SESSION[\"TimeOffset\"]) ;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "2daaccc4a402e89739740c7ef448bdc2", "score": "0.5205306", "text": "function update_google_id_time_to_local($arr,$module) {\n\t$id = $arr['id'];\n\t$googleID = $arr['googleID'];\n\t$updated = date(\"Y-m-d H:i:s\",strtotime($arr['updated']));\n\tmysql_query(\"UPDATE {$module} SET googleID='$googleID', updated='$updated' where id='$id'\");\n\treturn true;\n}", "title": "" }, { "docid": "df38420d8b81affcb2ebeecf036aefe0", "score": "0.52042204", "text": "function clientTimeStrToGMTString($str)\r\n{\r\n global $auth;\r\n $time_offset= 0;\r\n if(isset($auth->cur_user)) {\r\n $time_offset= $auth->cur_user->time_offset;\r\n }\r\n return getGMTString( strToGMTime($str) - $time_offset - confGet('SERVER_TIME_OFFSET'));\r\n}", "title": "" }, { "docid": "66c8fd024f517fab3d78e543dd26bfe2", "score": "0.5195213", "text": "public function updatedTimestamps() {\n\n\t if($this->getCreatedAt() == null)\n\t {\n\t $this->setCreatedAt(new \\DateTime(date('Y-m-d H:i:s')));\n\t }\n\t }", "title": "" }, { "docid": "47446b2a3a093b8b8f3c967474bfdcfa", "score": "0.51909345", "text": "public function getLastModifiedDate()\n {\n return $this->stringToDate((string) $this->json()->last_modified_date);\n }", "title": "" }, { "docid": "85f67830bb83fc118aadaee690b3e9ec", "score": "0.5187309", "text": "public function testAllUpdatedSinceWithDateTime() {\n\t\t$response = $this->getFixture( 'projects' );\n\t\t$expectedArray = $response['projects'];\n\n\t\t$updatedSince = new DateTime( '2017-06-26 00:00:00', new DateTimeZone( 'Europe/Zurich' ) );\n\n\t\t$api = $this->getApiMock();\n\t\t$api->expects( $this->once() )\n\t\t\t->method( 'get' )\n\t\t\t->with( '/projects', [ 'updated_since' => $updatedSince->format( DateTime::ATOM ) ] )\n\t\t\t->will( $this->returnValue( $response ) );\n\n\t\t$this->assertEquals( $expectedArray, $api->all( [ 'updated_since' => $updatedSince ] ) );\n\t}", "title": "" }, { "docid": "81a362faa72244fc9de2cb2cc9bc155e", "score": "0.5184746", "text": "function timestamp(){\n\tif(nrDebug) echo \"getting date \";\n\t$theTime = getdate(); // need to update to ensure GMT\n\n\t$timestampNow .= $theTime[weekday].\" \";\n\t$timestampNow .= $theTime[month].\" \";\n\t$timestampNow .= $theTime[mday].\", \";\n\t$timestampNow .= $theTime[year].\" - \";\n\t$timestampNow .= $theTime[hours].\":\";\n\t$timestampNow .= $theTime[minutes].\":\";\n\t$timestampNow .= $theTime[seconds];\n\tif(nrDebug) echo \"returning date \";\n\n\treturn($timestampNow);\n}", "title": "" }, { "docid": "5c2b0e0f115f2fc7d43bd3baf1749907", "score": "0.5181893", "text": "public function getOriginalRequestTime()\n {\n return $this->OriginalRequestTime;\n }", "title": "" }, { "docid": "f59bc72312e4a08ea8759b842b29ea52", "score": "0.5178676", "text": "static function checkMTime($mtime, $sendHeaders=null) {\n header(\"Last-Modified: \" . gmdate(\"D, d M Y H:i:s\", $mtime) . \" GMT\");\n\n $headers = function_exists(\"getallheaders\")\n ? getallheaders()\n : (function_exists(\"apache_request_headers\")\n ? apache_request_headers()\n : false);\n\n if (is_array($headers) && isset($headers['If-Modified-Since'])) {\n $client_mtime = explode(';', $headers['If-Modified-Since']);\n $client_mtime = @strtotime($client_mtime[0]);\n if ($client_mtime >= $mtime) {\n header('HTTP/1.1 304 Not Modified');\n if (is_array($sendHeaders) && count($sendHeaders))\n foreach ($sendHeaders as $header)\n header($header);\n elseif ($sendHeaders !== null)\n header($sendHeaders);\n die;\n }\n }\n }", "title": "" }, { "docid": "dccce4c35c3233ccfdb8ddbd7379abf2", "score": "0.5174006", "text": "function set_last_modified($time) {\n\tif (!headers_sent()) {\n\t\tif (!isset($time)) {\n\t\t\t$time = time();\n\t\t} else {\n\t\t\t$time = intval($time);\n\t\t}\n\n\t\theader('Cache-control: private, must-revalidate');\n\t\theader('Last-Modified: ' . gmdate('D, d M Y H:i:s \\G\\M\\T', $time));\n\t}\n}", "title": "" }, { "docid": "862219548876d61462f82b48decfc932", "score": "0.5171931", "text": "public function getLastModifiedAt();", "title": "" }, { "docid": "934bdb9163d5ce1b61f493c6d98a0908", "score": "0.5164873", "text": "public function getModifiedTime()\n {\n return $this->modifiedTime;\n }", "title": "" }, { "docid": "934bdb9163d5ce1b61f493c6d98a0908", "score": "0.5164873", "text": "public function getModifiedTime()\n {\n return $this->modifiedTime;\n }", "title": "" }, { "docid": "530b8980a9babe4b8640dbec44138df6", "score": "0.51558214", "text": "function as21_timestamp() {\n $datetime = new DateTime();\n $datetime->setTimezone(new DateTimezone('UTC'));\n $timestamp = $datetime->format('YmdHis');\n return $timestamp;\n}", "title": "" }, { "docid": "6ada3f6c27ecbc7842924089896502d2", "score": "0.5152463", "text": "public function getRequestdatetime()\n {\n return $this->requestdatetime;\n }", "title": "" }, { "docid": "9d9aea71de8aa0a2c803662283d8abf3", "score": "0.51431954", "text": "public function getModifiedStamp() { \n return $this->st['mtime'];\n }", "title": "" }, { "docid": "da30f4866a7767c58bfb42e222c824c7", "score": "0.51409745", "text": "public function getUpdatedAt(): DateTime\n {\n return new DateTime();\n }", "title": "" }, { "docid": "96fabaaa67a4600aaba7f518e687742b", "score": "0.51409", "text": "public function beforeUpdate()\r\n {\r\n //$this->modified_in = date('Y-m-d H:i:s');\r\n }", "title": "" }, { "docid": "2931205be1319aa70cb89b82762f1a25", "score": "0.51404333", "text": "public function getModifiedAt()\n {\n return $this->modifiedAt;\n }", "title": "" }, { "docid": "c86b701e692a6519a84c57cb9f4f7ad9", "score": "0.5137837", "text": "public function isModified() {\n if (false === empty($_SERVER['HTTP_IF_MODIFIED_SINCE'])) {\n return strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']);\n }\n return false;\n }", "title": "" }, { "docid": "d1862d69df5a9a5bb4ff91b166d5e807", "score": "0.5132802", "text": "public function get410Timestamp(): string;", "title": "" }, { "docid": "36de33ca3ef9982067cb6be315519189", "score": "0.513252", "text": "function isUpdated(){\n global $taws_server_config;\n $time = -1;\n $filepath = \"./serverdata/db_timestamp.txt\";\n \n // check if the timestamp file exist, assuming if it doesnt , were stating a new\n if( !file_exists( $filepath ) ){\n return -1;\n }else{\n $time = unserialize( file_get_contents( $filepath ) );\n if( !is_numeric( $time ) ){\n return -1;\n }\n }\n if( $time < 1402980743 ){\n return -1;\n }\n \n // Now lets talk to the remote server to compare\n $postdata = http_build_query(\n array()\n );\n $opts = array('http' =>\n array(\n 'method' => 'POST',\n 'header' => 'Content-type: application/x-www-form-urlencoded',\n 'content' => $postdata\n )\n );\n $context = stream_context_create( $opts );\n $rtime = file_get_contents( \"https://www.genaside.net/taws/to_update.php\", false, $context );\n \n if( ( $rtime - $time ) > 3600 ){ // Don't spam, give it some time\n return $rtime - $time;\n }else{ \n return 0;\n } \n }", "title": "" }, { "docid": "4b7d942100002ac2e1b0840879eabb3d", "score": "0.51306844", "text": "public function getUpdated_at(): string\n {\n return $this->updated_at;\n }", "title": "" }, { "docid": "a3d6d27cfa94151c592b0d937516b1e4", "score": "0.5127165", "text": "public function getModifiedTime() {\r\n return $this->vtigerFormat($this->data['entity']->updated->text);\r\n }", "title": "" }, { "docid": "65db4c35bfc24adc025f89de3cac6496", "score": "0.5123587", "text": "public function getUpdateTime();", "title": "" } ]
a8dc69c151edf140bdb9dba9419ee6f4
ManyToOne (inverse side) Set fkSwCgm
[ { "docid": "aa6f0b7ec2256997eb74790ba3aa03de", "score": "0.5019556", "text": "public function setFkSwCgm(\\Urbem\\CoreBundle\\Entity\\SwCgm $fkSwCgm)\n {\n $this->numcgm = $fkSwCgm->getNumcgm();\n $this->fkSwCgm = $fkSwCgm;\n \n return $this;\n }", "title": "" } ]
[ { "docid": "701d0d5caebef27c5585560b336df9d2", "score": "0.6505574", "text": "public function getFkSwCgm()\n {\n return $this->fkSwCgm;\n }", "title": "" }, { "docid": "701d0d5caebef27c5585560b336df9d2", "score": "0.6505574", "text": "public function getFkSwCgm()\n {\n return $this->fkSwCgm;\n }", "title": "" }, { "docid": "701d0d5caebef27c5585560b336df9d2", "score": "0.6505574", "text": "public function getFkSwCgm()\n {\n return $this->fkSwCgm;\n }", "title": "" }, { "docid": "701d0d5caebef27c5585560b336df9d2", "score": "0.6505574", "text": "public function getFkSwCgm()\n {\n return $this->fkSwCgm;\n }", "title": "" }, { "docid": "701d0d5caebef27c5585560b336df9d2", "score": "0.6505574", "text": "public function getFkSwCgm()\n {\n return $this->fkSwCgm;\n }", "title": "" }, { "docid": "701d0d5caebef27c5585560b336df9d2", "score": "0.6505574", "text": "public function getFkSwCgm()\n {\n return $this->fkSwCgm;\n }", "title": "" }, { "docid": "701d0d5caebef27c5585560b336df9d2", "score": "0.6505574", "text": "public function getFkSwCgm()\n {\n return $this->fkSwCgm;\n }", "title": "" }, { "docid": "054933f37a58939875c08bde841c0c31", "score": "0.62483174", "text": "public function foreignKeys();", "title": "" }, { "docid": "22f8b31f50026dfa423de9458c65281d", "score": "0.58349913", "text": "public function getFkSwPais()\n {\n return $this->fkSwPais;\n }", "title": "" }, { "docid": "736b727e9d8ccfafdd3fe624c6144ea9", "score": "0.5831629", "text": "abstract protected function getForeignMapping();", "title": "" }, { "docid": "ee4fe7a64b8f29ccbfefc8450e842d64", "score": "0.5815471", "text": "public function getFkSwClassificacao()\n {\n return $this->fkSwClassificacao;\n }", "title": "" }, { "docid": "22ef321caa6124181ff816ed3d42addd", "score": "0.55750424", "text": "public function getFkSwPreEmpenhos()\n {\n return $this->fkSwPreEmpenhos;\n }", "title": "" }, { "docid": "7c934f4ba8357874faa88d2dd481d176", "score": "0.55638283", "text": "public function addForeignKeys($tableName, $fks, $isHasMany = true)\r\n {\r\n // TODO: Keys obligatorias: name, type, table, refName.\r\n \r\n // ALTER TABLE `prueba` ADD FOREIGN KEY ( `id` ) REFERENCES `carlitos`.`a` (`id`);\r\n //\r\n //$q_fks = \"\"; // Acumula consultas. ACUMULAR CONSULTAS ME TIRA ERROR, VOY A EJECUTARLAS INDEPENDIENTEMENTE, IGUAL PODRIAN ESTAR RODEADAS DE BEGIN Y COMMIT!\r\n foreach ( $fks as $fk )\r\n {\r\n // owner_id es utilizado como nombre para referencias a tablas intermedias ne hasMany\r\n // pero si la clase tiene una relacion hasOne llamada 'owner', cuando se crea la FK\r\n // el nombre que se le asigna es owner_id y puede colisionar con el nombre de hasMany.\r\n // Lo mismo pasa con ref_id.\r\n // Aqui se modifica.\r\n // FIXME: cambiar los nombres de owner_id y ref_id en las tablas intermedias de yupp\r\n // para bajar la probabilidad de colision, ej. poniendo jt_ref_id (jt por join table).\r\n $namePart = $fk['name'];\r\n if (!$isHasMany && $fk['name'] == 'owner_id') $namePart = 'modowner_id';\r\n else if (!$isHasMany && $fk['name'] == 'ref_id') $namePart = 'modref_id';\r\n \r\n // FOREIGN KEY ( `id` ) REFERENCES `carlitos`.`a` (`id`)\r\n $q_fks = \"ALTER TABLE $tableName \".\r\n \"ADD CONSTRAINT fk_\".$fk['table'].\"_\".$namePart.\"_\".$fk['refName'].\" \". // En Postgre las FK tienen nombre, usando table, name(nombre del atributo) y refName me aseguro de que es unico.\r\n \"FOREIGN KEY (\" . $fk['name'] . \") \".\r\n \"REFERENCES \" . $fk['table'] . \"(\". $fk['refName'] .\");\";\r\n \r\n // ALTER TABLE distributors\r\n // ADD CONSTRAINT distfk\r\n // FOREIGN KEY (address)\r\n // REFERENCES addresses (address) MATCH FULL;\r\n \r\n // ALTER TABLE editions\r\n // ADD CONSTRAINT foreign_book\r\n // FOREIGN KEY (book_id)\r\n // REFERENCES books (id);\r\n \r\n // ALTER TABLE SALESREPS\r\n // ADD CONSTRAINT\r\n // FOREIGN KEY (REP_OFFICE)\r\n // REFERENCES OFFICES;\r\n \r\n // ALTER TABLE alumnos\r\n // ADD CONSTRAINT alumnos_fk\r\n // FOREIGN KEY (codigo_tutor)\r\n // REFERENCES padres_tutores(DNI);\r\n \r\n $this->execute( $q_fks );\r\n }\r\n }", "title": "" }, { "docid": "d7b82b6e3991637f3f1acf0c0d7c0e9f", "score": "0.5483799", "text": "public function getFkSwPais1()\n {\n return $this->fkSwPais1;\n }", "title": "" }, { "docid": "0f3d299d18d645e9ca0cb472cfc5941c", "score": "0.54649216", "text": "public function getFkSwLancamento()\n {\n return $this->fkSwLancamento;\n }", "title": "" }, { "docid": "0f3d299d18d645e9ca0cb472cfc5941c", "score": "0.54649216", "text": "public function getFkSwLancamento()\n {\n return $this->fkSwLancamento;\n }", "title": "" }, { "docid": "a0a41dd00ab2695b87f7920b56a90e96", "score": "0.5458316", "text": "abstract public function belongs_to();", "title": "" }, { "docid": "61efc6ba34156d147b36a84e40cb1677", "score": "0.54378605", "text": "public function getFkSwAndamento()\n {\n return $this->fkSwAndamento;\n }", "title": "" }, { "docid": "8a1c06fc186c9651dbb426df2f64d376", "score": "0.5415899", "text": "abstract protected function _getParentFkFieldName();", "title": "" }, { "docid": "2049a0810fa87f40ab45c3a30b355b65", "score": "0.5354802", "text": "public function getCrossForeignKeys() {\n\t\treturn $this->cfk;\n\t}", "title": "" }, { "docid": "f31f7aae915f2eb002f6abaf563ae32e", "score": "0.5324978", "text": "public function getFkSwAndamentoPadroes()\n {\n return $this->fkSwAndamentoPadroes;\n }", "title": "" }, { "docid": "d8ae64c2eaa197cc2dede587a0d02046", "score": "0.5293011", "text": "public function set()\n {\n return $this->belongsTo('UserFrosting\\Sprinkle\\Site\\Database\\Models\\SegSet');\n }", "title": "" }, { "docid": "9a90cfb4ba292d34b47f540064ca63ce", "score": "0.5270808", "text": "private function loadFKs($schema,$table){\n $handler=$this->db->connect(\"all\");\n if($this->db->getDriver()===\"pgsql\"){\n $sql=\"\n SELECT\n tc.constraint_name, tc.table_name, kcu.column_name, \n ccu.table_name AS foreign_table_name,\n ccu.column_name AS foreign_column_name \n FROM \n information_schema.table_constraints AS tc \n JOIN information_schema.key_column_usage AS kcu\n ON tc.constraint_name = kcu.constraint_name\n JOIN information_schema.constraint_column_usage AS ccu\n ON ccu.constraint_name = tc.constraint_name\n WHERE constraint_type = 'FOREIGN KEY' AND tc.table_name='\".$table->getName().\"';\n \";\n }elseif($this->db->getDriver()===\"mysql\"){\n $sql='\n SELECT \n column_name,\n referenced_table_name AS foreign_table_name,\n referenced_column_name AS foreign_column_name \n FROM \n information_schema.key_column_usage \n WHERE \n referenced_table_name IS NOT NULL AND \n table_name=\"'.$table->getName().'\"\n ';\n }\n $stmt = $handler->prepare($sql);\n if ($stmt->execute()) {\n while ($row = $stmt->fetch()){\n foreach ($table->getColumns() as $column) {\n if($row[\"column_name\"]===$column->getName()){\n $column->setFk(true);\n $column->setFkTable($row[\"foreign_table_name\"]);\n $column->setFkColumn($row[\"foreign_column_name\"]);\n }\n }\n }\n }else{\n $error=$stmt->errorInfo();\n error_log(\"[\".__FILE__.\":\".__LINE__.\"]\".\"html5sync: \".$error[2]);\n }\n }", "title": "" }, { "docid": "ab9562049e0a446e02c2c58271a0d493", "score": "0.52383786", "text": "public function getFkSwAssunto()\n {\n return $this->fkSwAssunto;\n }", "title": "" }, { "docid": "fdd6572bb37e772d34e6971dccde5d47", "score": "0.52229553", "text": "public function getFkSwCgas()\n {\n return $this->fkSwCgas;\n }", "title": "" }, { "docid": "320fba2585cb635d4f101cef462310fd", "score": "0.5219809", "text": "public function getFkSwLancamentoTransferencias()\n {\n return $this->fkSwLancamentoTransferencias;\n }", "title": "" }, { "docid": "02cd7ac6b660b38af857e5c62212852d", "score": "0.5215543", "text": "public function hasMany($related, $foreignKey = null, $localKey = null);", "title": "" }, { "docid": "5a854edfca8c01204235d37f83f2f9fd", "score": "0.52080935", "text": "public function getFkSwDocumentoAssuntos()\n {\n return $this->fkSwDocumentoAssuntos;\n }", "title": "" }, { "docid": "4cbd35489bc44b4b71798350282e155f", "score": "0.51976395", "text": "public function hasMany($related, $foreignKey = null, $localKey = null)\n {\n }", "title": "" }, { "docid": "0caa8093748d2acbbfb817b32fbd5111", "score": "0.5193148", "text": "public function getFkSwProcessos()\n {\n return $this->fkSwProcessos;\n }", "title": "" }, { "docid": "f96c01b3d8f37fc1255664d1f3d37437", "score": "0.5187897", "text": "public function foreignFields(){\n return array();\n }", "title": "" }, { "docid": "02130bd3167b21cd08a1f95e8b045ea7", "score": "0.5166333", "text": "public function setFkSwCgm(\\Urbem\\CoreBundle\\Entity\\SwCgm $fkSwCgm)\n {\n $this->codProprietario = $fkSwCgm->getNumcgm();\n $this->fkSwCgm = $fkSwCgm;\n \n return $this;\n }", "title": "" }, { "docid": "805097616c188c258944bd1bffc1c5c1", "score": "0.5158013", "text": "public function getFkSwCgmPessoaJuridica()\n {\n return $this->fkSwCgmPessoaJuridica;\n }", "title": "" }, { "docid": "5addbb6640c97081522e336ba03b40ed", "score": "0.51572627", "text": "public function getFkSwMunicipio1()\n {\n return $this->fkSwMunicipio1;\n }", "title": "" }, { "docid": "d1f0291c3b1502811c3758a4410be5c0", "score": "0.5153544", "text": "protected function initForeignKeys()\n {\n /**\n * @var Db\\Reference $reference\n */\n $foreignKeys = $this->db->describeReferences($this->getTable(), $this->getSchema());\n foreach ($foreignKeys as $foreignKey => $reference) {\n // Skip multi columns foreign keys\n if (count($reference->getColumns()) > 1 || count($reference->getReferencedColumns()) > 1) {\n continue;\n }\n $this->foreignKeys[$reference->getColumns()[0]] = $reference;\n }\n }", "title": "" }, { "docid": "52c28c00702def2eed4b21601d2a177d", "score": "0.51504856", "text": "public function hasMany(string $relatedModel, string $localKey, string $foreignKey);", "title": "" }, { "docid": "2fb547f566dac8465f46c0ee504dbbe5", "score": "0.5136777", "text": "function getForeignKeys($tablename);", "title": "" }, { "docid": "1f6f831b984ca351cb77edf7ea4042e7", "score": "0.5135075", "text": "public function get_foreign_table();", "title": "" }, { "docid": "91017573ba2c5cf12f8ace419432941b", "score": "0.5133869", "text": "public function getFkCseDomicilios()\n {\n return $this->fkCseDomicilios;\n }", "title": "" }, { "docid": "b5ada9db3e7c1ac15680ec66af282432", "score": "0.5131532", "text": "public function getFkSwMunicipio()\n {\n return $this->fkSwMunicipio;\n }", "title": "" }, { "docid": "b5ada9db3e7c1ac15680ec66af282432", "score": "0.5131532", "text": "public function getFkSwMunicipio()\n {\n return $this->fkSwMunicipio;\n }", "title": "" }, { "docid": "7a5455a4ec463bab14cd3ebe672588ad", "score": "0.5117539", "text": "public function SPSubDivision()\n {\n \t// belongsTo(RelatedModel, foreignKey = spsd_id, keyOnRelatedModel = spsd_id)\n \treturn $this->belongsTo('App\\SPSubDivision','spsd_id','spsd_id');\n }", "title": "" }, { "docid": "5487a0722172b8f5b54232e694dc85cb", "score": "0.5082964", "text": "public function getFkTcemgContratos()\n {\n return $this->fkTcemgContratos;\n }", "title": "" }, { "docid": "5487a0722172b8f5b54232e694dc85cb", "score": "0.5082964", "text": "public function getFkTcemgContratos()\n {\n return $this->fkTcemgContratos;\n }", "title": "" }, { "docid": "2ce99f702252b24981bf27c4384f103a", "score": "0.50809115", "text": "public function getFkSwCgmLogradouros()\n {\n return $this->fkSwCgmLogradouros;\n }", "title": "" }, { "docid": "ed49e7552fdf857c4379c4f757f59b3b", "score": "0.50621796", "text": "public function getFkSwCgmPessoaFisica()\n {\n return $this->fkSwCgmPessoaFisica;\n }", "title": "" }, { "docid": "ed49e7552fdf857c4379c4f757f59b3b", "score": "0.50621796", "text": "public function getFkSwCgmPessoaFisica()\n {\n return $this->fkSwCgmPessoaFisica;\n }", "title": "" }, { "docid": "ed49e7552fdf857c4379c4f757f59b3b", "score": "0.50621796", "text": "public function getFkSwCgmPessoaFisica()\n {\n return $this->fkSwCgmPessoaFisica;\n }", "title": "" }, { "docid": "1f9ed9b01e93d107c3f5246c9dfe8029", "score": "0.505567", "text": "private function setFKCheckOn() {\n switch(DB::getDriverName()) {\n case 'mysql':\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n break;\n case 'sqlite':\n DB::statement('PRAGMA foreign_keys = ON');\n break;\n }\n }", "title": "" }, { "docid": "ed922b20311233156ca1c353347c7716", "score": "0.5052488", "text": "public function getFkDividaDividaCgns()\n {\n return $this->fkDividaDividaCgns;\n }", "title": "" }, { "docid": "ed922b20311233156ca1c353347c7716", "score": "0.5052488", "text": "public function getFkDividaDividaCgns()\n {\n return $this->fkDividaDividaCgns;\n }", "title": "" }, { "docid": "2f6a964f7f2b4e7bbb4d5df458a8f8bb", "score": "0.5041694", "text": "abstract public function getForeignKey();", "title": "" }, { "docid": "0abc75e405d5fff666f9ea241aa10d66", "score": "0.50347674", "text": "public static function fixOneByNRel()\n\t\t{\n\t\t}", "title": "" }, { "docid": "0c80e0df8db7a8cac6b4772d8623a951", "score": "0.50302744", "text": "public function setps()\n {\n return $this->hasMany('App\\Setp');\n }", "title": "" }, { "docid": "df3302f5a9fe98738a5d372a9d2a3711", "score": "0.5011436", "text": "public function addForeignKeys()\n {\n $this->addForeignKey(null, Table::CM_COMPANIES, ['id'], '{{%elements}}', ['id'], 'CASCADE');\n $this->addForeignKey(null, Table::CM_COMPANIES, ['userId'], \\craft\\db\\Table::USERS, ['id'], null, 'CASCADE');\n $this->addForeignKey(null, Table::CM_COMPANIES, ['typeId'], Table::CM_COMPANYTYPES, ['id'], 'CASCADE', null);\n $this->addForeignKey(null, Table::CM_USERS, ['userId'], \\craft\\db\\Table::USERS, ['id'], 'CASCADE', 'CASCADE');\n $this->addForeignKey(null, Table::CM_USERS, ['companyId'], Table::CM_COMPANIES, ['id'], 'CASCADE', 'CASCADE');\n $this->addForeignKey(null, Table::CM_DOCUMENTS, ['assetId'], \\craft\\db\\Table::ASSETS, ['id'], 'CASCADE', 'CASCADE');\n $this->addForeignKey(null, Table::CM_DOCUMENTS, ['userId'], \\craft\\db\\Table::USERS, ['id'], 'CASCADE', 'CASCADE');\n $this->addForeignKey(null, Table::CM_COMPANYTYPES, ['fieldLayoutId'], '{{%fieldlayouts}}', ['id'], 'SET NULL');\n $this->addForeignKey(null, Table::CM_COMPANYTYPES_SITES, ['siteId'], '{{%sites}}', ['id'], 'CASCADE', 'CASCADE');\n $this->addForeignKey(null, Table::CM_COMPANYTYPES_SITES, ['companyTypeId'], Table::CM_COMPANYTYPES, ['id'], 'CASCADE');\n $this->addForeignKey(null, Table::CM_PERMISSIONS_USERS, ['userId'], \\craft\\db\\Table::USERS, ['id'], 'CASCADE', 'CASCADE');\n $this->addForeignKey(null, Table::CM_PERMISSIONS_USERS, ['permissionId'], Table::CM_PERMISSIONS, ['id'], 'CASCADE', 'CASCADE');\n }", "title": "" }, { "docid": "527086d699cd8cb70ee9d957489d0515", "score": "0.49894473", "text": "public function jnsclient(){\n return $this->belongsTo(MsClient::class,'id_client_rel','id');\n }", "title": "" }, { "docid": "07b49a157c8884ee774f31ef301180f1", "score": "0.4985917", "text": "public static function addFks()\n\t\t{\n\t\t\tGLOBAL $_MIND;\n\t\t\t$fkPrefix= $_MIND->defaults['fk_prefix'];\n\t\t\t$pkPrefix= $_MIND->defaults['pk_prefix'];\n\t\t\tforeach(Analyst::$relations as &$relation)\n\t\t\t{\n\t\t\t\t$pointed= $relation->focus;\n\t\t\t\t$defaultPkName= $pkPrefix.$pointed->name;\n\t\t\t\tif($pointed->hasProperty($defaultPkName)\n\t\t\t\t\t&&\n\t\t\t\t $pointed->pks[$defaultPkName]->default==AUTOINCREMENT_DEFVAL)\n\t\t\t\t{\n\t\t\t\t\t$pks= Array($pointed->pks[$defaultPkName]);\n\t\t\t\t}else\n\t\t\t\t\t$pks= &$pointed->pks;\n\t\t\t\t\t\t\n\t\t\t\tforeach($pks as &$pk)\n\t\t\t\t{\n\t\t\t\t\tif($pk->key !== true)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t$tmpName= $pk->name;\n\t\t\t\t\t$propName= $fkPrefix.preg_replace(\"/^\".$pkPrefix.\"|\".$fkPrefix.\"/\",\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 $tmpName);\n\t\t\t\t\t$entity= &$relation->rel;\n\t\t\t\t\t\n\t\t\t\t\t// we will mark the linkTables\n\t\t\t\t\tif($pointed->linkTable)\n\t\t\t\t\t{\n\t\t\t\t\t\tself::$linkedTables[$pointed->name]= &$pointed;\n\t\t\t\t\t}elseif($entity->linkTable)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tself::$linkedTables[$entity->name]= &$entity;\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// we've got to treat the repeated properties\n\t\t\t\t\tif($entity->hasProperty($propName)\n\t\t\t\t\t\t&&\n\t\t\t\t\t $entity->properties[$propName]->refTo)\n\t\t\t\t\t{\n\t\t\t\t\t\t$propName= $fkPrefix.$pointed->name.\n\t\t\t\t\t\t\t\t\t\t\t PROPERTY_SEPARATOR.\n\t\t\t\t\t\t\t\t\t\t\t $pk->name;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// if there ain't not property with that name already\n\t\t\t\t\tif(!$entity->hasProperty($propName))\n\t\t\t\t\t{\n\t\t\t\t\t\t// let's create it\n\t\t\t\t\t\t$fk= new MindProperty();\n\t\t\t\t\t\t$fk ->setName($propName)\n\t\t\t\t\t\t\t->setType('int')\n\t\t\t\t\t\t\t->setRefTo($relation->focus, $pk);\n\t\t\t\t\t\tif(!$entity->selfRef)\n\t\t\t\t\t\t\t$fk->setRequired(true);\n\t\t\t\t\t\tif($relation->linkType == 'must')\n\t\t\t\t\t\t\t$fk->setRequired (true);\n\t\t\t\t\t\tif($relation->uniqueRef || $entity->linkTable)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(!$entity->linkTable||\n\t\t\t\t\t\t\t ($entity->linkTable && $entity->hasHardKey())\n\t\t\t\t\t\t\t\t||\n\t\t\t\t\t\t\t ($entity->linkTable && sizeof($entity->getRefBy())==0)\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$fk->setAsWeakKey();\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t$fk->setAsKey();\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$entity->addProperty($fk);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t\t// otherwise, we simply use/change the existing one\n\t\t\t\t\t\t\t$entity ->properties[$propName]\n\t\t\t\t\t\t\t\t\t->setRefTo($relation->focus, $pk);\n\t\t\t\t\t\t\tif($relation->uniqueRef)\n\t\t\t\t\t\t\t\t$entity ->properties[$propName]->setAsKey();\n\t\t\t\t\t\t }\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "026a0d26c775e4811cfb32c52d112a12", "score": "0.49854505", "text": "private function setFKCheckOff() {\n switch(DB::getDriverName()) {\n case 'mysql':\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n break;\n case 'sqlite':\n DB::statement('PRAGMA foreign_keys = OFF');\n break;\n }\n }", "title": "" }, { "docid": "60bede0121ddea1cadc4aab8867b692f", "score": "0.4982657", "text": "public function initialize()\n {\n $this->belongsTo('cd_empresa', 'App\\Models\\Empresa', 'cd_empresa', array('alias' => 'Empresa'));\n $this->belongsTo('cd_empresa', 'App\\Models\\Empresa', 'cd_empresa', array('foreignKey' => true,'alias' => 'Empresa'));\n }", "title": "" }, { "docid": "ea35d6688c7681c7833f51a0f876a8fc", "score": "0.49779087", "text": "public function setFkSwCgm(\\Urbem\\CoreBundle\\Entity\\SwCgm $fkSwCgm)\n {\n $this->numcgm = $fkSwCgm->getNumcgm();\n $this->fkSwCgm = $fkSwCgm;\n return $this;\n }", "title": "" }, { "docid": "ea35d6688c7681c7833f51a0f876a8fc", "score": "0.49779087", "text": "public function setFkSwCgm(\\Urbem\\CoreBundle\\Entity\\SwCgm $fkSwCgm)\n {\n $this->numcgm = $fkSwCgm->getNumcgm();\n $this->fkSwCgm = $fkSwCgm;\n return $this;\n }", "title": "" }, { "docid": "98402b09d6367e485ccbe05c676314c2", "score": "0.49602395", "text": "public function getFkSwProcessoConfidenciais()\n {\n return $this->fkSwProcessoConfidenciais;\n }", "title": "" }, { "docid": "6fb7e18a157da36649b5719601576fb9", "score": "0.49481907", "text": "public function setFkSwCgm(\\Urbem\\CoreBundle\\Entity\\SwCgm $fkSwCgm)\n {\n $this->numcgmUsuario = $fkSwCgm->getNumcgm();\n $this->fkSwCgm = $fkSwCgm;\n \n return $this;\n }", "title": "" }, { "docid": "2b1bd8fb6b8647a9c940a35c1613b01e", "score": "0.49449158", "text": "public function getFkComprasFornecedorSocios()\n {\n return $this->fkComprasFornecedorSocios;\n }", "title": "" }, { "docid": "3169e0102faa4a9442f0254e34cc81fe", "score": "0.4935246", "text": "public function criminals()\n\t{\n\t\t// hasMany(RelatedModel, foreignKeyOnRelatedModel = country_id, localKey = id)\n\t\treturn $this->hasMany(Criminal::class,'country_id','id');\n\t}", "title": "" }, { "docid": "d47a172b1dbb6e9513f999c72c37608c", "score": "0.49287456", "text": "public function initialize()\n {\n $this->hasMany('cd_nfservico', 'App\\Models\\FaturamentoServicos', 'cd_nfservico', array('alias' => 'FaturamentoServicos'));\n $this->hasMany('cd_nfservico', 'App\\Models\\NfservicoItem', 'cd_nfservico', array('alias' => 'NfservicoItem'));\n $this->belongsTo('cd_modelo', 'App\\Models\\CodigoModeloFiscal', 'id_codigo', array('alias' => 'CodigoModeloFiscal'));\n $this->belongsTo('cod_situacao', 'App\\Models\\SituacaoDocumentoFiscal', 'id_situacao', array('alias' => 'SituacaoDocumentoFiscal'));\n $this->hasMany('cd_nfservico', 'App\\Models\\FaturamentoServicos', 'cd_nfservico', NULL);\n $this->hasMany('cd_nfservico', 'App\\Models\\NfservicoItem', 'cd_nfservico', NULL);\n $this->belongsTo('cd_modelo', 'App\\Models\\CodigoModeloFiscal', 'id_codigo', array('foreignKey' => true,'alias' => 'CodigoModeloFiscal'));\n $this->belongsTo('cod_situacao', 'App\\Models\\SituacaoDocumentoFiscal', 'id_situacao', array('foreignKey' => true,'alias' => 'SituacaoDocumentoFiscal'));\n }", "title": "" }, { "docid": "6e42f2ab06c8b0483580de8a4d748fcd", "score": "0.4916222", "text": "public function getFkSwProcesso()\n {\n return $this->fkSwProcesso;\n }", "title": "" }, { "docid": "1e7fc8d1a980a707f58106f6ff0b5977", "score": "0.49134344", "text": "private function setFieldArrays()\n {\n $this->foreignKey->fields = (array) $this->foreignKey->fields;\n $this->foreignKey->reference->fields = (array) $this->foreignKey->reference->fields;\n }", "title": "" }, { "docid": "d5112291e01ab10f3c3e4d0c1e2e09b0", "score": "0.49071828", "text": "public function getForeignKeys()\n {\n return $this->foreignKeys;\n }", "title": "" }, { "docid": "d5112291e01ab10f3c3e4d0c1e2e09b0", "score": "0.49071828", "text": "public function getForeignKeys()\n {\n return $this->foreignKeys;\n }", "title": "" }, { "docid": "9ac5cb0e2083cb98a33f5a78b0000134", "score": "0.49011263", "text": "public function getClienti()\n{\n return $this->hasOne(Clienti::className(), ['id' => 'idCliente']);\n}", "title": "" }, { "docid": "62a820c419494d3e321f2d9068e418d2", "score": "0.48925757", "text": "function set_relationships()\n\t{\n\t\t\n\t\tif(isset($this->related_model))\n\t\t{\n\t\t\t$this->related_model->related_models_delete[]=array('model' => $this->name_model, 'related_field' => $this->name_component);\n\t\t}\n\t\telse\n\t\t{\n\t\t\n\t\t\t//show_error('You need load model before set relantionship', $this->related_model.' model not exists. You need load model before set relantionship with ForeignKeyField with '.$this->name_model.' model', $output_external='');\n\t\t\t\n\t\t\tthrow new \\Exception($this->related_model.' model not exists. You need load model before set relantionship with ForeignKeyField with '.$this->name_model.' model');\n\t\t\t\n\t\t\tdie;\n\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "20de0a6d1f6e761b23223a2de7618cd7", "score": "0.489153", "text": "function buildBelong($modelName){\n \tif(!isset($this->belongsTo[$modelName])){\n \t\tthrow new Exception(\"Model \".$modelName.' doesn\\'t belong to '.get_class($this), 1);\n \t}\n \t$fkName = $this->belongsTo[$modelName]['foreignKey'];\n if($this->getAttr($fkName) !== null){\n \tif(!is_object($this->$modelName)){\n \t$this->$modelName = $this->loadModel($modelName);\n\t\t\t}\n $this->$modelName = $this->$modelName->findById($this->getAttr($fkName),array(),0);\n } \n }", "title": "" }, { "docid": "c5c51de456852bae69fe7cf48bb20d2e", "score": "0.48833615", "text": "public function getFkSwCgmAtributoValores()\n {\n return $this->fkSwCgmAtributoValores;\n }", "title": "" }, { "docid": "97bea7c675d2b6b7f86386c1cda35403", "score": "0.48775825", "text": "public function getFkTcepbServidores()\n {\n return $this->fkTcepbServidores;\n }", "title": "" }, { "docid": "1aa672d5a0875ec36d2c276dfc6eba12", "score": "0.48602548", "text": "function getForeignKeys() {\n\t\treturn $this->foreign_keys;\n\t}", "title": "" }, { "docid": "cf57d0b8f6e64616ffc798d0b9e7e62b", "score": "0.48596835", "text": "public function getFkEconomicoSociedades()\n {\n return $this->fkEconomicoSociedades;\n }", "title": "" }, { "docid": "dad9feebe26cf4aca3f8e68e0e3baf40", "score": "0.48582593", "text": "protected function _has_relationships(){\n\t\t//self::$has_many ;\n\t}", "title": "" }, { "docid": "560d60824bae00db6d79d418d5c945c1", "score": "0.48553312", "text": "public function ClassObj() {\n return $this->belongsTo(\"App\\\\Models\\\\ClassObj\");\n }", "title": "" }, { "docid": "699097ed5ab6eeb00948e123102aebfd", "score": "0.48211944", "text": "public function getFkComprasMapa()\n {\n return $this->fkComprasMapa;\n }", "title": "" }, { "docid": "699097ed5ab6eeb00948e123102aebfd", "score": "0.48211944", "text": "public function getFkComprasMapa()\n {\n return $this->fkComprasMapa;\n }", "title": "" }, { "docid": "cb405c48da3b1995d01214f621cc15dc", "score": "0.48110488", "text": "abstract protected function _getParentPkFieldName();", "title": "" }, { "docid": "ab0a08254002fbc6a957a650cb49635c", "score": "0.48073417", "text": "public function kelas()\n {\n \t return $this->belongsTo(Kelas::class,'kelass_id'); // relasi ke tabel mobil One to Many\n }", "title": "" }, { "docid": "2c013c97e35b09b299682b8d43ec1cba", "score": "0.48057905", "text": "function atkOneToManyRelation($name, $destination, $refKey=\"\", $flags=0)\n {\n $this->atkRelation($name, $destination, $flags|AF_HIDE_ADD|AF_HIDE_SEARCH|AF_NO_SORT); \n // 1toM Relations are NEVER edited when adding a rec. And for now, we \n // cannot search or sort them.\n \n if (is_array($refKey))\n {\n $this->m_refKey = $refKey;\n }\n else\n {\n $this->m_refKey[] = $refKey;\n }\n }", "title": "" }, { "docid": "aaae83193a147273b7071e309919bbed", "score": "0.47978327", "text": "public function initialize()\n {\n $this->hasMany('cod_chamado', 'App\\Models\\SacChamadoHasComentarios', 'cod_chamado', array('alias' => 'SacChamadoHasComentarios'));\n $this->hasMany('cod_chamado', 'App\\Models\\SacChamadoHasHistorico', 'cod_chamado_historico', array('alias' => 'SacChamadoHasHistorico'));\n $this->hasMany('cod_chamado', 'App\\Models\\SacChamadoHasProblemas', 'cod_chamado', array('alias' => 'SacChamadoHasProblemas'));\n $this->belongsTo('cod_status', 'App\\Models\\SacStatus', 'cod_status', array('alias' => 'SacStatus'));\n $this->belongsTo('cod_usuario_criacao', 'App\\Models\\Usuario', 'cd_usuario', array('alias' => 'Usuario'));\n $this->belongsTo('cod_cliente', 'App\\Models\\Empresa', 'cd_empresa', array('alias' => 'Empresa'));\n $this->belongsTo('cod_reclamante', 'App\\Models\\Empresa', 'cd_empresa', array('alias' => 'Empresa'));\n $this->hasMany('cod_chamado', 'App\\Models\\SacChamadoHasComentarios', 'cod_chamado', NULL);\n $this->hasMany('cod_chamado', 'App\\Models\\SacChamadoHasHistorico', 'cod_chamado_historico', NULL);\n $this->hasMany('cod_chamado', 'App\\Models\\SacChamadoHasProblemas', 'cod_chamado', NULL);\n $this->belongsTo('cod_status', 'App\\Models\\SacStatus', 'cod_status', array('foreignKey' => true,'alias' => 'SacStatus'));\n $this->belongsTo('cod_usuario_criacao', 'App\\Models\\Usuario', 'cd_usuario', array('foreignKey' => true,'alias' => 'Usuario'));\n $this->belongsTo('cod_cliente', 'App\\Models\\Empresa', 'cd_empresa', array('foreignKey' => true,'alias' => 'Empresa'));\n $this->belongsTo('cod_reclamante', 'App\\Models\\Empresa', 'cd_empresa', array('foreignKey' => true,'alias' => 'Empresa'));\n }", "title": "" }, { "docid": "ab8421e538edd5e4fc4307fc5ea47070", "score": "0.4794564", "text": "public function getFkCseCidadoes()\n {\n return $this->fkCseCidadoes;\n }", "title": "" }, { "docid": "aef10909c36b6f21029676abbce00551", "score": "0.47896963", "text": "protected static function doOnDeleteSetNull(Criteria $criteria, PropelPDO $con)\n {\n\n // first find the objects that are implicated by the $criteria\n $objects = SchoolClassPeer::doSelect($criteria, $con);\n foreach ($objects as $obj) {\n\n // set fkey col in related SchoolClass rows to null\n $selectCriteria = new Criteria(SchoolClassPeer::DATABASE_NAME);\n $updateValues = new Criteria(SchoolClassPeer::DATABASE_NAME);\n $selectCriteria->add(SchoolClassPeer::ANCESTOR_CLASS_ID, $obj->getId());\n $updateValues->add(SchoolClassPeer::ANCESTOR_CLASS_ID, null);\n\n BasePeer::doUpdate($selectCriteria, $updateValues, $con); // use BasePeer because generated Peer doUpdate() methods only update using pkey\n\n }\n }", "title": "" }, { "docid": "47e57e3e0a1410aff1874559fc35643d", "score": "0.47809774", "text": "public function center(){\n\n return $this->belongsTo('App\\Models\\Center','old_center_id');\n\n }", "title": "" }, { "docid": "0abddb73ae92ba099a421d17d6a3f254", "score": "0.47751704", "text": "function sws()\n\t{\n\t\treturn $this->hasMany(\n\t\t\tSW::class,\n\t\t\t'ModeloSW_id',\n\t\t\t'id'\n\t\t);\n\t}", "title": "" }, { "docid": "93e8b37a8aea22da4c7a59c615b1c39e", "score": "0.47722808", "text": "public static function relTableName( PersistentObject $ins1, $inst1Attr, PersistentObject $ins2 )\n {\n // Problema: si el atributo pertenece a C1, y $ins1 es instancia de G1,\n // la tabla que se genera para hasMany a UnaClase es \"gs_unaclase_\"\n // y deberia ser \"cs_unaclase_\", esto es un problema porque si cargo \n // una instancia de C1 no tiene acceso a sus hasMany \"UnaClase\".\n\n // TODO: esta es una solucion rapida al problema, hay que mejorarla.\n \n // Esta solucion intenta buscar cual es la clase en la que se declara el atributo hasMany\n // para el que se quiere generar la tabla intermedia de referencias, si no la encuentra, \n // es que el atributo hasMany se declaro en $ins1.\n \n // Tambien hay un problema cuando hay composite>\n // Si ins1->hasMany[ins1Attr] es a una superclase de ins2, genera mal el nombre de la tabla de join.\n // El nombre se tiene que generar a la clase para la que se declara le hasMany,\n // no para el nombre de tabla de ins2 (porque ins2 puede guardarse en otra tabla\n // que no sea la que se guarda su superclase a la cual fue declarado el hasMany\n // ins1->hasMany[inst1Attr]).\n // Solucion: ver si la clase a la que se declara el hasMany no es la clase de ins2,\n // y verificar si ins2 se guarda en otra tabla que la clase a la que se \n // declara el hasMany en ins1. Si es distinta, el nombre debe apuntar al\n // de la clase declarada en el hasMany. (aunque en ambos casos es a esto,\n // asi que no es necesario verificar).\n \n $classes = ModelUtils::getAllAncestorsOf( $ins1->getClass() );\n \n //Logger::struct( $classes, \"Superclases de \" . $ins1->getClass() );\n \n $instConElAtributoHasMany = $ins1; // En ppio pienso que la instancia es la que tiene el atributo masMany.\n foreach ( $classes as $aclass )\n {\n //$ins = new $aclass();\n $ins = new $aclass(NULL, true);\n //if ( $ins->hasManyOfThis( $ins2->getClass() ) ) // la clase no es la que tenga el atributo, debe ser en la que se declara el atributo\n if ( $ins->attributeDeclaredOnThisClass($inst1Attr) )\n {\n //Logger::getInstance()->log(\"TIENE MANY DE \" . $ins2->getClass());\n $instConElAtributoHasMany = $ins;\n break;\n }\n \n //Logger::struct( $ins, \"Instancia de $aclass\" );\n }\n \n $tableName1 = self::tableName( $instConElAtributoHasMany );\n \n //echo \"=== \" . $ins1->getType( $inst1Attr ) . \" ==== <br/>\";\n \n // La tabla de join considera la tabla en la que se guardan las instancias del tipo \n // declarado en el hasMany, NO A LOS DE SUS SUBCLASES!!! (como podia ser ins2)\n $tableName2 = self::tableName( $ins1->getType( $inst1Attr ) );\n // $tableName2 = self::tableName( $ins2 );\n\n // TODO: Normalizar $inst1Attr ?\n \n// echo \"Nombre tabla relTableName: \". $tableName1 . \"_\" . $inst1Attr . \"_\" . $tableName2 .\"<br/>\";\n\n return $tableName1 . \"_\" . $inst1Attr . \"_\" . $tableName2; // owner_child\n }", "title": "" }, { "docid": "3945744c028ef6362a3f409042274f85", "score": "0.4771985", "text": "public function beforeDelete(CModelEvent $event) {\r\n\t\tforeach($this->mapping as $map) {\r\n\t\t\tswitch (strtolower($map->update)) {\r\n\t\t\t\tcase \"cascade\":\r\n\t\t\t\t\t$criteria = new CDbCriteria;\r\n\t\t\t\t\t$criteria->condition = $map->foreignAttribute.\" = :value\";\r\n\t\t\t\t\t$criteria->params[\":value\"] = $this->owner->{$map->attribute};\r\n\t\t\t\t\tforeach($map->foreignModel->findAll($criteria) as $dependent) {\r\n\t\t\t\t\t\tif (!$dependent->delete()) {\r\n\t\t\t\t\t\t\t$event->isValid = false;\r\n\t\t\t\t\t\t\t$this->owner->addError($map->attribute, Yii::t(\"Foreign Key constraint failed: {foreignModel}.{foreignAttribute}\",array(\"{foreignModel}\" => $map->foreignModelClass, \"{foreignAttribute}\" => $map->foreignAttribute)));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"setnull\":\r\n\t\t\t\t\t$criteria = new CDbCriteria;\r\n\t\t\t\t\t$criteria->condition = $map->foreignAttribute.\" = NULL\";\r\n\t\t\t\t\tforeach($map->foreignModel->findAll($criteria) as $dependent) {\r\n\t\t\t\t\t\t$dependent->{$map->foreignAttribute} = $this->owner->{$map->attribute};\r\n\t\t\t\t\t\tif (!$dependent->update(array($map->foreignAttribute))) {\r\n\t\t\t\t\t\t\t$event->isValid = false;\r\n\t\t\t\t\t\t\t$this->owner->addError($map->attribute, Yii::t(\"Foreign Key constraint failed: {foreignModel}.{foreignAttribute}\",array(\"{foreignModel}\" => $map->foreignModelClass, \"{foreignAttribute}\" => $map->foreignAttribute)));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"restrict\":\r\n\t\t\t\t\t$criteria = new CDbCriteria;\r\n\t\t\t\t\t$criteria->condition = $map->foreignAttribute.\" = :value\";\r\n\t\t\t\t\t$criteria->params[\":value\"] = $this->owner->{$map->attribute};\r\n\t\t\t\t\tif ($map->foreignModel->exists($criteria)) {\r\n\t\t\t\t\t\t$event->isValid = false;\r\n\t\t\t\t\t\t$this->owner->addError($map->attribute, Yii::t(\"Foreign Key constraint failed: {foreignModel}.{foreignAttribute}\",array(\"{foreignModel}\" => $map->foreignModelClass, \"{foreignAttribute}\" => $map->foreignAttribute)));\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t} \r\n\t}", "title": "" }, { "docid": "c70d49e150c2d2a355b53dbb492e7415", "score": "0.4753709", "text": "function Relation(){\n\t\tforeach($this->keys as $key=>$value){\n\t\t\tforeach($value as $index=>$clau){\n\t\t\t\t$this->rels[$clau] = array();\n\t\t\t\tarray_push($this->rels[$clau], $key);\t\n\t\t\t\tforeach($this->keys as $taula=>$claus){\n\t\t\t\t\tif($taula!=$key){\n\t\t\t\t\t\tforeach($claus as $indexx=>$clau2){\n\t\t\t\t\t\t\tif($clau==$clau2){\n\t\t\t\t\t\t\t\tarray_push($this->rels[$clau], $taula);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "df3db6cf0e1e4803bec6e99155fc389d", "score": "0.4753173", "text": "public function seancesEns(){\n return $this->hasManyThrough(Seance::class,Enseignant_Groupe::class,'idEnseignant','idGroupe','id','idGroupe');\n }", "title": "" }, { "docid": "7fbdcaaaec60a7405a4fb9893fc030e8", "score": "0.47493407", "text": "public function getFkPatrimonioBens()\n {\n return $this->fkPatrimonioBens;\n }", "title": "" }, { "docid": "7fbdcaaaec60a7405a4fb9893fc030e8", "score": "0.47493407", "text": "public function getFkPatrimonioBens()\n {\n return $this->fkPatrimonioBens;\n }", "title": "" }, { "docid": "fa727d564b79c5c7eeb80a5b991e9d3d", "score": "0.4743199", "text": "public function centers(): BelongsTo\n {\n return $this->belongsTo('App\\Models\\Centro', 'ID', 'IDCENTRO');\n }", "title": "" }, { "docid": "3df199eaff538fda2ce24adb9bfc7cd9", "score": "0.4743182", "text": "public function getForeignKey();", "title": "" }, { "docid": "4a5ff58291e415cfdbd3a31b511e672f", "score": "0.47419095", "text": "public function getForeign($_foreign);", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "3bbb163d0e2061d3637d91440513f19a", "score": "0.0", "text": "public function create()\n {\n return view('usuarios.create');\n }", "title": "" } ]
[ { "docid": "f8bba5517a2cb6f46311a24713a6bef2", "score": "0.8125342", "text": "public function create()\n {\n return view('admin.resource.new');\n }", "title": "" }, { "docid": "20ef26ca996d9360798f2ecc07198092", "score": "0.7804094", "text": "public function create()\n\t{\n\t\treturn View::make('backoffice.resource.create');\n\t}", "title": "" }, { "docid": "681d20882e97df51906ce75b97ef1784", "score": "0.7775189", "text": "public function create()\n {\n return view('actions.resource.create');\n }", "title": "" }, { "docid": "0efde82a25b6100f0c21eb97e2121fd0", "score": "0.77337104", "text": "public function create()\n {\n $this->page_title = trans('resource_type.new');\n\n return view('resource_type.new', $this->vdata);\n }", "title": "" }, { "docid": "03bfd9797acc7936efbf149267039e5d", "score": "0.77260846", "text": "public function create()\n {\n return view('resource.create');\n }", "title": "" }, { "docid": "260e3a6550329e832d8155a1a557745f", "score": "0.771192", "text": "public function create()\n {\n /*show create form maybe not nessesary*/\n }", "title": "" }, { "docid": "0a28fa28b4fcdf44c0bd490fe751d763", "score": "0.7673694", "text": "public function create()\n\t{\n\t\t$this->layout->subtitle = _('Add');\n\n\t\treturn $this->loadView(__FUNCTION__, $this->resource->getFillableLabels());\n\t}", "title": "" }, { "docid": "4410c37acc7f709e86ccc730cb542643", "score": "0.75863165", "text": "public function create()\n {\n return view('admin.resources.create');\n }", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75727344", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "60b8c2dc2f8ff4dabd04bc7f6dca0779", "score": "0.75383", "text": "public function newAction()\n {\n $entity = new Resource();\n $form = $this->createCreateForm($entity);\n\n return $this->render('BWBlogBundle:Resource:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "5d140c321df7acb8c739eadcc5bc3d54", "score": "0.746548", "text": "public function create()\n {\n return view('laramanager::resources.create');\n }", "title": "" }, { "docid": "ad59d20f2872a6e73a13ec203ef2f8bc", "score": "0.72848165", "text": "public function create()\n {\n //display form\n return view(\n 'ps.create');\n }", "title": "" }, { "docid": "b232948171ce8236d12a5ecd5627119c", "score": "0.7282519", "text": "public function create()\n {\n return view(\"pages.req.form\");\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "3347c41a19ab6c1a35b881f99ddefe9e", "score": "0.72624177", "text": "public function createAction()\n {\n $this->view->flds = '[{\"cssClass\":\"input_text\",\"required\":\"undefined\",\"values\":\"First Name\"},{\"cssClass\":\"textarea\",\"required\":\"undefined\",\"values\":\"Bio\"},{\"cssClass\":\"checkbox\",\"required\":\"undefined\",\"title\":\"Whats on your pizza?\",\"values\":{\"2\":{\"value\":\"Extra Cheese\",\"baseline\":\"undefined\"},\"3\":{\"value\":\"Beef\",\"baseline\":\"undefined\"}}}]';\n $this->view->form = new NpfWebformsForm(null);\n }", "title": "" }, { "docid": "a5d2c0c3777cd260cd88c88f37ec70a6", "score": "0.72577995", "text": "public function create_form()\n {\n return View::make(\"app.create\");\n }", "title": "" }, { "docid": "6a94e5e8f7512f93eda3c0b1ea5d5607", "score": "0.7257189", "text": "function showCreateForm(){\n return view('admin.Ebuletin.create');\n }", "title": "" }, { "docid": "64b0e85604fc330e4cbfc6f09f397b27", "score": "0.72493047", "text": "public function showCreateForm ()\n {\n $myNewspaper = App::user()->getNewspaper();\n\n if (!empty($myNewspaper)) {\n App::redirect(\"/newspaper/\" . $myNewspaper->id);\n }\n\n return $this->render('news/createNewspaper.html.twig', [\n \"creationCost\" => NewspaperModel::CREATION_COST\n ]);\n }", "title": "" }, { "docid": "d3ebdfcf36f62f0f42113a8b11f4895a", "score": "0.7240409", "text": "public function create()\n {\n return view('resources.create_resources');\n }", "title": "" }, { "docid": "b1c3c9219f8100b85c24750c6f92cd4a", "score": "0.72274303", "text": "public function create()\n {\n return view('crud.form');\n }", "title": "" }, { "docid": "755e91a474eae625dfda22659e4c1f6c", "score": "0.72203404", "text": "public function create()\n {\n return view('form.create');\n }", "title": "" }, { "docid": "5c37508d09b68f9ab4123a0772960c76", "score": "0.7212462", "text": "public function create()\n {\n return view('admin.catalog.form');\n }", "title": "" }, { "docid": "3fb888dea195139fc63f84a6e5b7db63", "score": "0.7199865", "text": "public function create()\n {\n return View::make($this->resourceView.'.create');\n }", "title": "" }, { "docid": "65a80f896bface8ccfc0be19571775ba", "score": "0.71928936", "text": "public function create()\n {\n //\n return \"Provide a form to add a car\";\n }", "title": "" }, { "docid": "1d0710555ccb7cd822584d16dcfe0336", "score": "0.7182808", "text": "public function showCreateForm()\n\t{\n\t\treturn view('admin.post.add');\n\t}", "title": "" }, { "docid": "c24e65c8a92dd430f73967cd2fb00ec9", "score": "0.7179227", "text": "public function create()\n {\n $this->resetValidation();\n $this->reset(['fields', 'is_editing']);\n\n $this->showForm();\n }", "title": "" }, { "docid": "9afc6acf07243beac05422dfa57f968f", "score": "0.7173864", "text": "public function showCreateForm()\n {\n return view(\"admin.user.create\");\n }", "title": "" }, { "docid": "3bafea32fa451a3439e6d308764b7e96", "score": "0.71605355", "text": "public function create()\n\t{\n\t\treturn view(\"barang.form\");\n\n\t}", "title": "" }, { "docid": "cfe9ceeda6c7d1649d3f15d33b16a627", "score": "0.7154192", "text": "public function newAction()\n\t{\n\t\techo $this->getForm();\n\t}", "title": "" }, { "docid": "540a53a248ba67bdca77e9032bbb635f", "score": "0.7150356", "text": "public function create()\n {\n return view('client.form');\n }", "title": "" }, { "docid": "8d4cc40a42b81724eb4460472353bc0a", "score": "0.714293", "text": "public function create()\n\t{\n // load the create form\n return View::make('residents.create');\n\t}", "title": "" }, { "docid": "a8d9b3e6c0f69a9c90642861d5e343c1", "score": "0.7141869", "text": "public function create()\n {\n return view('submit.create');\n }", "title": "" }, { "docid": "3b15559bc4c862a29339bfd433c32526", "score": "0.71411765", "text": "public function create()\n {\n return view('students.addStudentForm');\n }", "title": "" }, { "docid": "3f6a1acba05e915724250680142e88c7", "score": "0.71384877", "text": "public function create()\n {\n return view('formcreate');\n }", "title": "" }, { "docid": "8c1752e2ab024985c584b2f42d891525", "score": "0.7138087", "text": "public function create()\n {\n return view(\"piutang.form\");\n }", "title": "" }, { "docid": "d77bcfd7ac022954dfbdbaec633e0b32", "score": "0.7131701", "text": "public function create()\n {\n $resources = Resource::all();\n $categories = ResourceCategory::all();\n\n $data = [\n 'resources' => $resources,\n 'categories' => $categories,\n ];\n\n return view('resources.create-resource')->with($data);\n }", "title": "" }, { "docid": "aa71810ebd2853f92e8db655776237e2", "score": "0.712946", "text": "public function create()\n {\n return view ('siswa.form');\n }", "title": "" }, { "docid": "311b4437f4b6d54e594b3899d29f4f11", "score": "0.7121037", "text": "public function create()\n {\n return view('admin.student.addnew');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "751653051dae87138c242368dc3786de", "score": "0.71069485", "text": "public function create()\n {\n $title = \"Registrar negocio\";\n $model = new Business();\n\n return view($this-> prefixView.'form',compact('title','model'));\n }", "title": "" }, { "docid": "21b741286121defb618cafb010ad9311", "score": "0.7101174", "text": "public function create()\n {\n return view('admin.crud.edit-new');\n }", "title": "" }, { "docid": "8b6604f525238bef52951de0b16d7f1f", "score": "0.7096012", "text": "public function create()\n {\n return view('formbuilder::form.create');\n }", "title": "" }, { "docid": "990414ce4876a4b2a4f29dd9d7d3abf5", "score": "0.709237", "text": "public function create()\n\t{\n\t\treturn view('admin.question.form');\n\t}", "title": "" }, { "docid": "16732db43c5e7a7dd04a193ce5b2ae23", "score": "0.70919156", "text": "public function create()\n {\n return view('resep.form');\n }", "title": "" }, { "docid": "33b0a71ac72fac345ac76b2a9dbd3cb8", "score": "0.70887756", "text": "public function newAction()\n {\n $entity = $this->get('fibe_security.acl_entity_helper')->getEntityACL('CREATE', 'Person');\n $form = $this->createForm(new PersonType($this->getUser()), $entity);\n\n return $this->render(\n 'fibeCommunityBundle:Person:new.html.twig',\n array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n )\n );\n }", "title": "" }, { "docid": "67cdf2645142d9b0d8b752e0719f92db", "score": "0.70883906", "text": "public function create()\n\t{\n\t\t//\n return view('ThemeNight.Admin.form');\n\t}", "title": "" }, { "docid": "c080ca2e31508a9332469f2e1bfc7d19", "score": "0.7087787", "text": "public function create()\n\t{\n\t\treturn view('atributos.create');\n\t}", "title": "" }, { "docid": "76bfcc35dc8ea95b43ab193fce26154f", "score": "0.7084712", "text": "public function create()\n {\n return view('supplier.form', [\n 'edit' => false\n ]);\n }", "title": "" }, { "docid": "bf72fb3fe8d0bc917f56d924e8ccf3ba", "score": "0.70816255", "text": "public function create()\n {\n //\n return view('create_form');\n }", "title": "" }, { "docid": "367e31aa42d6f06e1f2fb2e09709f1e0", "score": "0.7070958", "text": "public function create()\n {\n return view('admin.project.create_form');\n }", "title": "" }, { "docid": "43e34c710975c60c5305ac25fb3d7504", "score": "0.7067303", "text": "public function newAction()\r\n {\r\n $entity = new $this->model();\r\n $form = $this->createCreateForm($entity)->createView();\r\n\r\n $result = array(\r\n 'action' => $this->generateUrl($this->route['create']),\r\n 'fields' => $this->get('pizone_form')->formDataToArray($form)\r\n );\r\n\r\n $view = new View($result);\r\n return $this->handleView($view);\r\n }", "title": "" }, { "docid": "6145954c4b35a97e4abac9949da2a7dc", "score": "0.70663726", "text": "public function create()\n {\n $data = [];\n return view('resources.create', $data);\n }", "title": "" }, { "docid": "3b0f73abe7973dfd183dc9c20405c6b4", "score": "0.7066244", "text": "public function create()\n {\n return view('tool::create.create');\n }", "title": "" }, { "docid": "557c84d597fc8e00e9314d677e08dfe5", "score": "0.7061945", "text": "public function newAction()\n {\n $entity = new Receta();\n $form = $this->createForm(new RecetaType(), $entity);\n\n return $this->render('TodoCerdoTodoCerdoBundle:Receta:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "8c4b58d9c7ebe29aed261de1fc923c07", "score": "0.7061731", "text": "public function create()\n {\n return view('controllers.resource-controllers.create');\n }", "title": "" }, { "docid": "4b128041dfdda282b6af96d3ef403c25", "score": "0.70599586", "text": "public function create()\n {\n return view('harvests.form');\n }", "title": "" }, { "docid": "2b41dd9ed0cf1461dd65f8e05b0a94a1", "score": "0.70571953", "text": "public function create()\n {\n return $this->showForm();\n }", "title": "" }, { "docid": "08e0ba475352b37fabdca852bcbdb90e", "score": "0.7054689", "text": "public function create()\n {\n return view('mesas.forms.create');\n }", "title": "" }, { "docid": "2623500cf3f41f19394467ad3cc9656b", "score": "0.7049269", "text": "protected function showCreateForm()\n\t{\n\n\t\treturn Response::view('adm/Regions/create');\n\n\t}", "title": "" }, { "docid": "d348d95689ce20ca0e7da9c16fd55e2d", "score": "0.70483965", "text": "public function create()\n {\n return view('pengeluaran.form');\n }", "title": "" }, { "docid": "d8233d687b36de8ea5e1f179a497dba1", "score": "0.7037681", "text": "public function newAction()\n {\n $entity = new Persona();\n $form = $this->createForm(new PersonaType(), $entity);\n\n return $this->render('LyricaEirinBundle:Persona:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "cfc08ab3b0be81fb6acf7f6316f4b875", "score": "0.7036466", "text": "public function create()\n {\n return view('backend.thadin.create');\n }", "title": "" }, { "docid": "5aa70413db221403054caef7bedac770", "score": "0.7030609", "text": "public function newAction()\n\t{\n\t\t$this->page\n\t\t\t->set('section_title','New '.$this->page_title)\n\t\t\t->set('action',$this->controller_path.'new')\n\t\t\t->set('record',(object) array('activated'=>1,'id'=>-1))\n\t\t\t->set('group_options',$this->_get_groups())\n\t\t\t->set('password_format_copy',$this->user_model->password_format_copy())\n\t\t\t->build($this->controller_path.'form');\n\t}", "title": "" }, { "docid": "a9a5b6b3c656a709a1bbbab40d24c43f", "score": "0.70302194", "text": "public function create()\n {\n $is_edit = false;\n $product = new Product();\n\n return view('products.form', compact('product', 'is_edit'));\n }", "title": "" }, { "docid": "cfaeeb3c8bd4c70a19c542419f5ad0ee", "score": "0.70269614", "text": "public function create()\n {\n //显示创建资源表单页\n return view('admin/users/create',['title'=>'用户添加']);\n }", "title": "" }, { "docid": "0b984040060f01951eb2375bb849110c", "score": "0.7026164", "text": "public function create()\n\t{\n\t\treturn view('forms.project');\t\n\t}", "title": "" }, { "docid": "0c1db80c69466b1bbd9b8df7bea85585", "score": "0.70254475", "text": "public function newAction()\n {\n $recipe = $this->getRecipeManager()->createRecipe();\n $form = $this->createForm(new RecipeType(), $recipe, array(\n 'action' => $this->generateUrl('backend_recipe_create')\n ));\n\n return $this->render('AppBundle:Backend\\Recipe:new.html.twig', array(\n 'entity' => $recipe,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "9926d30e5b0046e49a6decdaa42f3859", "score": "0.70248765", "text": "public function create()\n {\n return view('platform.people.form');\n }", "title": "" }, { "docid": "33af005bef3111b2a76f2f441180b514", "score": "0.702485", "text": "public function create()\n {\n return view('concepto.create');\n }", "title": "" }, { "docid": "c959c491c6e5b588c802c9967ef706a4", "score": "0.70230263", "text": "public function create()\n {\n //\n // echo 'Here we will show the form and then submit the details in the database';\n }", "title": "" }, { "docid": "abbbd09a7646783cf210f98d7c703c30", "score": "0.70194376", "text": "public function create()\n {\n return view('menu::form');\n }", "title": "" }, { "docid": "6316a85e6cf9ca8aa64b9f706098ae25", "score": "0.7017854", "text": "public function create()\n {\n return view('partner.form');\n }", "title": "" }, { "docid": "d001d3a1995094ca265df985f6398e01", "score": "0.70149684", "text": "public function newAction()\n {\n $entity = new Client();\n $form = $this->createForm(new ClientType(), $entity);\n\n return $this->render('BackendAdminBundle:Client:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "5c8d80287891d65eee128c6ca7878e1c", "score": "0.7013804", "text": "public function create()\n\t{\n\t\t$data = array('type' => 'stone');\n\t\t$this->layout->content = \\View::make('forms.new-stone', $data);\n\t\n\t}", "title": "" }, { "docid": "6f9af144eba20ea97bd9c8a741627e1b", "score": "0.7012243", "text": "public function create()\n {\n return view('crud::crud.add');\n }", "title": "" }, { "docid": "a36d8135bd4414e4abd4868fb56a7177", "score": "0.6996758", "text": "public function create()\n {\n return view('layouts.submitproperty');\n }", "title": "" }, { "docid": "ddb99a4f31eb90825bf6b5da7fa52ca3", "score": "0.6994577", "text": "public function create()\n {\n return view('master.form.athlete-form');\n }", "title": "" }, { "docid": "b1c0d0b9bd1b6ed833c3d3d624e5b031", "score": "0.69930637", "text": "public function create()\n {\n $title = \"Registrar producto\";\n $model = new Product();\n return view($this-> prefixView.'form',compact('title','model'));\n }", "title": "" }, { "docid": "db5850464a16ce05c16a0c42606ccb2c", "score": "0.699252", "text": "public function create()\n {\n $data['typeForm'] = \"create\";\n $data['title'] = \"Property Marketplace\";\n return view(\"admin/marketplace/form\",compact('data'));\n }", "title": "" }, { "docid": "1d37883b0775931ddf17c75e4bbd9d90", "score": "0.6989433", "text": "public function create()\n\t{\n\t\treturn View::make('famoso.create');\n\t}", "title": "" }, { "docid": "9829c4939f7030aeb42447c704de1f3e", "score": "0.69889855", "text": "public function create()\n\t{\n\t\t$this->form->setModel($this->repo->getNew());\n\n\t\treturn View::make('thing.form', ['form' => $this->form]);\n\t}", "title": "" }, { "docid": "8a982b58b2eae6f233b1dcd18de452a0", "score": "0.6987187", "text": "public function create()\n\t{\n\t\treturn view('areadetails.form');\n\t}", "title": "" }, { "docid": "5dcc6a089e3a6d063fa3cab475e28855", "score": "0.6986054", "text": "public function create()\n {\n return view(\"Backend.Pages.add-new\");\n }", "title": "" }, { "docid": "1e96f853503e9af917b9a2a64cde033f", "score": "0.6985649", "text": "public function create()\n {\n return view(\"major.create\");\n }", "title": "" }, { "docid": "610f56b2c95018c60ad6a8374c2d250e", "score": "0.69853884", "text": "public function create()\n {\n return view ('tahun.form');\n }", "title": "" }, { "docid": "eeee917bcfaf007d8d07ea2e40388b06", "score": "0.69850516", "text": "public function create()\n {\n return view('clients.form')->with([\n 'action' => 'create'\n ]);\n }", "title": "" }, { "docid": "1d1ce9ff2645b7b3f0753d499204d44f", "score": "0.6980153", "text": "public function create()\n {\n //\n\n return view::make('form.create');\n }", "title": "" }, { "docid": "d0bdcbece4be35278c63f8feea57b955", "score": "0.6978014", "text": "public function new_form(){\n $this->vars['breadcrumbs'][] = array('label' => __('Create New Customer', 'latepoint'), 'link' => false );\n\n $this->vars['customer'] = new OsCustomerModel();\n $this->vars['wp_users_for_select'] = OsWpUserHelper::get_wp_users_for_select();\n\n\n $this->format_render(__FUNCTION__);\n }", "title": "" }, { "docid": "fa1baaa9f5aebb07e6bb696f0001364c", "score": "0.6976698", "text": "public function create()\n\t\t{\n\t\t\treturn view('coa.create');\n\t\t}", "title": "" }, { "docid": "54ece91bb98da047753baa658573a9de", "score": "0.697606", "text": "public function create()\n {\n //\n return view('admin.actuForm');\n }", "title": "" }, { "docid": "df3bf96fa2e72c254a6b2d268a5f6402", "score": "0.69758654", "text": "public function create()\r\n {\r\n return view('backend/category_management/create_form');\r\n }", "title": "" }, { "docid": "c754c692adc63ca29e993ebbf09ee995", "score": "0.6974421", "text": "public function create()\n {\n return view('product::admin.form');\n }", "title": "" }, { "docid": "74a010aa8faacd0448738b50f14d4758", "score": "0.6965735", "text": "public function create()\n {\n $title = self::TITLE;\n $route = self::ROUTE;\n $action = \"Add\";\n return view(self::FOLDER . '.create', compact('title', 'route', 'action'));\n }", "title": "" }, { "docid": "de91e46735fd97173b2f990f6ecc7d8c", "score": "0.6962055", "text": "public function showCreateFormAction() {\n $this->theme->setTitle(\"Add user\");\n $this->di->session();\n $form = new \\Anax\\Users\\CFormAddUser();\n $form->setDI($this->di);\n $form->check();\n \n // view of the comment form\n $this->di->views->add('comment/form', [\n 'title' => \"Add a new user\",\n 'content' => \"<h1>Add a new user</h1>\" . $form->getHTML()\n ]);\n }", "title": "" }, { "docid": "e2ad160b52213ea876d7e50dbf6fd2cd", "score": "0.6959711", "text": "public function create()\n {\n return view('wisata.form');\n }", "title": "" }, { "docid": "93847c98ccd0e3b2c387d82adc10a23e", "score": "0.69590706", "text": "public function create()\n\t{\n\t\treturn View::make('compromissos.create');\n\t}", "title": "" } ]
4ac260d63331864f5378e793b0889690
function Called when a settings filed does not yet exist for a page's metabox Use the form definition to biuld an array of values and save the setting
[ { "docid": "cd9c4879d841b5379ff5e20fef576bbe", "score": "0.0", "text": "function apply_defaults(&$values) {\n // go through each element recurisvely \n foreach($values as $key => $value) {\n \n // special treatement for multi groups\n if ($key == '#type') {\n if ($value == 'multigroup') {\n // save the children\n $save = $values;\n // wipe the entry\n $values = array();\n // add the children back in against index 0\n foreach ($save as $k => $v) {\n if ($k === '' || $k[0] !== '#') {\n $values[0][$k] = $v;\n } // if\n } // foreach\n \n } // if\n } // if\n //\n // recursively register any nested pages\n if ($key === '' || $key[0] !== '#') {\n\n // recursive call with the child page\n self::apply_defaults($values[$key]);\n } else if ($key == '#default_value' ) {\n $save = $values['#default_value'];\n unset($values['#default_value']);\n $values = $save;\n \n \n } else {\n \n unset($values[$key]);\n }\n \n }\n return $values;\n }", "title": "" } ]
[ { "docid": "fab3b8ae83df496c39393b87868ecac5", "score": "0.66043437", "text": "function acquia_general_setting($form, &$form_state) {\n $form = array();\n acquia_load_resources('admin');\n\n $form['general_settings'] = array(\n '#type' => 'container',\n '#attributes' => array('class' => array('ac-admin')),\n );\n\n $form['general_settings']['404_page'] = array(\n '#type' => 'fieldset',\n '#title' => t('404 page settings'),\n '#collaspible' => TRUE,\n );\n\n $form['general_settings']['404_page']['404_page_title'] = array(\n '#type' => 'textfield',\n '#title' => t('Title'),\n '#description' => t('enter 404 pages title.'),\n '#default_value' => acquia_variable_get('404_page_title', 'Page Not Found'),\n );\n\n $form['general_settings']['404_page']['404_page_text'] = array(\n '#type' => 'textarea',\n '#title' => t('Text'),\n '#description' => t('Enter a descriptive text for 404 text.'),\n '#default_value' => acquia_variable_get('404_page_text', 'The page you requested does not exist'),\n '#rows' => 10,\n );\n\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('save settings'),\n );\n return $form;\n}", "title": "" }, { "docid": "4c2cc038cf72de9c82e8d00a61523549", "score": "0.6521352", "text": "public static function entries_setting_form () \n {\n $inputs = input::post_is_object();\n\n $fields = serialize( $inputs->value['fields'] );\n $ids = intval( $inputs->value['form_id'] );\n\n if( $ids !=0 ) \n {\n\n $rows = db::query_settings( $ids );\n $form_id = isset( $rows[0]->form_id ) ? intval( $rows[0]->form_id ) : null;\n\n if( is_null( $form_id ) ) :\n\n self::inserts( self::$tbls['gcf-settings'],\n\n array( 'form_id' => $ids, 'entries_settings' => $fields ), \n\n array( '%d', '%s' )\n );\n\n else :\n\n $tbl_id = isset( $rows[0]->id ) ? intval( $rows[0]->id ) : null;\n\n self::updates( self::$tbls['gcf-settings'],\n\n array( 'entries_settings' => $fields ), \n\n array( 'id' => $tbl_id ) ,\n\n array( '%s' ),\n\n array( '%d' )\n ); \n\n endif;\n\n }\n }", "title": "" }, { "docid": "c407773deb47c9640ca31e760df2acb9", "score": "0.6363761", "text": "function domain_reminder_settings_page() {\n?>\n <div>\n <?php screen_icon(); ?>\n <h1>Domain Remind - General Settings</h1>\n <br />\n <form method=\"post\" action=\"options.php\">\n <?php settings_fields('domain_reminder_options_group'); ?>\n <div class=\"form-check\">\n <label class=\"form-check-label\">Dominio:</label>\n <input class=\"form-check-input\" type=\"text\" name=\"domain_reminder_option_dominio\" id=\"dominio\" value=\"<?php echo esc_attr( get_option('domain_reminder_option_dominio') ); ?>\">\n </div>\n <div class=\"form-check\">\n <label class=\"form-check-label\">Scadenza:</label>\n <input class=\"form-check-input\" type=\"date\" name=\"domain_reminder_option_scadenza\" id=\"scadenza\" value=\"<?php echo esc_attr( get_option('domain_reminder_option_scadenza') ); ?>\">\n </div>\n <div class=\"form-check\">\n <label class=\"form-check-label\">Notice:</label>\n <input class=\"form-check-input\" type=\"text\" name=\"domain_reminder_option_avviso\" id=\"avviso\" placeholder=\"indica il numero dei giorni di preavviso es. 10 - default 10gg\" value=\"<?php echo esc_attr( get_option('domain_reminder_option_avviso') ); ?>\">\n </div>\t\t\t \n <?php submit_button(); ?>\n </form>\n </div>\n<?php\n}", "title": "" }, { "docid": "ec635c06b1a7f499d124816cdad6d380", "score": "0.62869215", "text": "function save_settings()\n\t{\n\t\t// make somethings global\n\t\tglobal $DB, $IN, $PREFS, $REGX, $SESS;\n\t\t\n\t\t// load the settings from cache or DB\n\t\t$this->settings = $this->_get_settings(TRUE, TRUE);\n\n\t\t// unset the name\n\t\tunset($_POST['name']);\n\t\t\n\t\t// add the posted values to the settings\n\t\t$this->settings[$PREFS->ini('site_id')] = $_POST;\n\n\t\tif(isset($_POST['weblogs']) === FALSE)\n\t\t{\n\t\t\t$this->settings[$PREFS->ini('site_id')]['weblogs'] = array();\n\t\t}\n\n\t\t// update the settings\n\t\t$DB->query($sql = \"UPDATE exp_extensions SET settings = '\" . addslashes(serialize($this->settings)) . \"' WHERE class = '\" . get_class($this) . \"'\");\n\n\t}", "title": "" }, { "docid": "865e5770d5cfaa506a4fb24ae359d392", "score": "0.62476176", "text": "public function save_settings_fields() {\n\t\t\tif ( isset( $_POST[ $this->setting_field_prefix ] ) ) {\n\t\t\t\tif ( ( isset( $_POST[ $this->setting_field_prefix ]['nonce'] ) ) && ( wp_verify_nonce( $_POST[ $this->setting_field_prefix ]['nonce'], 'learndash_permalinks_taxonomies_nonce' ) ) ) {\n\n\t\t\t\t\t$post_fields = $_POST[ $this->setting_field_prefix ];\n\n\t\t\t\t\tforeach ( array( 'course', 'lesson', 'topic', 'quiz' ) as $slug ) {\n\n\t\t\t\t\t\tif ( ( isset( $post_fields[ 'ld_' . $slug . '_category' ] ) ) && ( ! empty( $post_fields[ 'ld_' . $slug . '_category' ] ) ) ) {\n\t\t\t\t\t\t\t$this->setting_option_values[ 'ld_' . $slug . '_category' ] = $this->esc_url( $post_fields[ 'ld_' . $slug . '_category' ] );\n\n\t\t\t\t\t\t\tlearndash_setup_rewrite_flush();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( ( isset( $post_fields[ 'ld_' . $slug . '_tag' ] ) ) && ( ! empty( $post_fields[ 'ld_' . $slug . '_tag' ] ) ) ) {\n\t\t\t\t\t\t\t$this->setting_option_values[ 'ld_' . $slug . '_tag' ] = $this->esc_url( $post_fields[ 'ld_' . $slug . '_tag' ] );\n\n\t\t\t\t\t\t\tlearndash_setup_rewrite_flush();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tupdate_option( $this->settings_section_key, $this->setting_option_values );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "91f990739e84a68cf3865e176c9138c7", "score": "0.621596", "text": "function emarket_metabox_init(){\n\t$emarket_metabox_pages[] = array(\n\t\t'title' \t=> esc_html__( 'General', 'emarket' ),\n\t\t'fields'\t=> array(\n\t\t\tarray(\n\t\t\t\t'type'\t=> 'upload',\n\t\t\t\t'title'\t=> esc_html__( 'Custom Logo', 'emarket' ),\n\t\t\t\t'id'\t=> 'page_logo',\n\t\t\t\t'description' => esc_html__( 'Upload custom Logo for this page', 'emarket' ),\n\t\t\t\t'std' => ''\n\t\t\t\t),\n\t\t\t\n\t\t\tarray(\n\t\t\t\t'type'\t=> 'select',\n\t\t\t\t'title'\t=> esc_html__( 'Home Template', 'emarket' ),\n\t\t\t\t'id'\t=> 'page_home_template',\n\t\t\t\t'description' => esc_html__( 'Select home template', 'emarket' ),\n\t\t\t\t'std'\t => '',\n\t\t\t\t'values' => array( '' => esc_html__( 'Default', 'emarket' ), 'home-style1' => esc_html__( 'Home Style1', 'emarket' ), 'home-style2' => esc_html__( 'Home Style2', 'emarket' ),\n\t\t\t\t\t'home-style3' => esc_html__( 'Home Style3', 'emarket' ), 'home-style4' => esc_html__( 'Home Style4', 'emarket' ), 'home-style5' => esc_html__( 'Home Style5', 'emarket' ),\n\t\t\t\t\t 'home-style6' => esc_html__( 'Home Style6', 'emarket' ), 'home-style7' => esc_html__( 'Home Style7', 'emarket' ), 'home-style8' => esc_html__( 'Home Style8', 'emarket' ),\n\t\t\t\t\t 'home-style9' => esc_html__( 'Home Style9', 'emarket' ), 'home-style10' => esc_html__( 'Home Style10', 'emarket' ), 'home-style11' => esc_html__( 'Home Style11', 'emarket' ),\n\t\t\t\t\t 'home-style12' => esc_html__( 'Home Style12', 'emarket'), 'home-style13' => esc_html__( 'Home Style13', 'emarket' ), 'home-style14' => esc_html__( 'Home Style14', 'emarket' ),\n\t\t\t\t\t 'home-style15' => esc_html__( 'Home Style15', 'emarket'), 'home-style16' => esc_html__( 'Home Style16', 'emarket' ), 'home-style17' => esc_html__( 'Home Style17', 'emarket' ),\n\t\t\t\t\t 'home-style18' => esc_html__( 'Home Style18', 'emarket' ), 'home-style19' => esc_html__( 'Home Style19', 'emarket' ), 'home-style20' => esc_html__( 'Home Style20', 'emarket' ),\n\t\t\t\t\t 'home-style21' => esc_html__( 'Home Style21', 'emarket' ), 'home-style22' => esc_html__( 'Home Style22', 'emarket' ), 'home-style23' => esc_html__( 'Home Style23', 'emarket' ),\n\t\t\t\t\t 'home-style24' => esc_html__( 'Home Style24', 'emarket' ), 'home-style25' => esc_html__( 'Home Style25', 'emarket' ), 'home-style26' => esc_html__( 'Home Style26', 'emarket' ),\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type'\t=> 'radio_img',\n\t\t\t\t'title'\t=> esc_html__( 'Color Scheme', 'emarket' ),\n\t\t\t\t'id'\t=> 'scheme',\n\t\t\t\t'description' => esc_html__( 'Select one color scheme for this page', 'emarket' ),\n\t\t\t\t'std'\t => 'none',\n\t\t\t\t'values' => array( \n\t\t\t\t\t'none' => '#000000',\n\t\t\t\t\t'default'\t=> '#ff3c20',\n\t\t\t\t\t'orange'\t=> '#ff9600',\n\t\t\t\t\t'orange2'\t=> '#ff5c00',\n\t\t\t\t\t'orange3'\t=> '#fcb700',\n\t\t\t\t\t'orange4'\t=> '#ffd200',\n\t\t\t\t\t'orange5'\t=> '#fbb71c',\n\t\t\t\t\t'blue'\t => '#18bcec',\n\t\t\t\t\t'plum' => '#9e0b0f',\n\t\t\t\t\t'brown' => '#886016',\n\t\t\t\t\t'green' => '#90b939',\n\t\t\t\t\t'green2' => '#78a206',\n\t\t\t\t\t'green3' => '#388a95',\n\t\t\t\t\t'green4' => '#01728e',\n\t\t\t\t\t'pink' => '#e30078',\n\t\t\t\t\t'blue2' => '#5bc0ec',\n\t\t\t\t\t'red' => '#e82223',\n\t\t\t\t\t'red2' => '#ff4157',\n\t\t\t\t\t'red3' => '#eb0036',\n\t\t\t\t\t'red4' => '#d14031',\n\t\t\t\t\t'red5' => '#ed1b24',\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n);\n\n$emarket_metabox_pages[] = array(\n\t'title' \t=> esc_html__( 'Typography', 'emarket' ),\n\t'fields'\t=> array(\n\t\tarray(\n\t\t\t'type'\t=> 'text',\n\t\t\t'title'\t=> esc_html__( 'Google Fonts', 'emarket' ),\n\t\t\t'id'\t=> 'google_webfonts',\n\t\t\t'description' => esc_html__( ' Insert font style that you actually need on your webpage. Each font seperate by commas', 'emarket' ),\n\t\t\t'std'\t => ''\t\n\t\t\t),\n\t\tarray(\n\t\t\t'type'\t=> 'multiselect',\n\t\t\t'title'\t=> esc_html__( 'Webfont Weight', 'emarket' ),\n\t\t\t'id'\t=> 'webfonts_weight',\n\t\t\t'description' => esc_html__( 'For weight, see Google Fonts to custom for each font style.', 'emarket' ),\n\t\t\t'std'\t => '',\n\t\t\t'values' => array( \n\t\t\t\t'100' => '100',\n\t\t\t\t'200' => '200',\n\t\t\t\t'300' => '300',\n\t\t\t\t'400' => '400',\n\t\t\t\t'500' => '500',\n\t\t\t\t'600' => '600',\n\t\t\t\t'700' => '700',\n\t\t\t\t'800' => '800',\n\t\t\t\t'900' => '900'\n\t\t\t\t)\n\t\t\t),\n\t\tarray(\n\t\t\t'type'\t=> 'select',\n\t\t\t'title'\t=> esc_html__( 'Webfont Assign to', 'emarket' ),\n\t\t\t'id'\t=> 'webfonts_assign',\n\t\t\t'description' => esc_html__( 'Select the place will apply the font style headers, every where or custom.', 'emarket' ),\n\t\t\t'std'\t => '',\n\t\t\t'values' => array( \n\t\t\t\t'' \t\t => esc_html__( 'Select Option', 'emarket' ),\n\t\t\t\t'headers' => esc_html__( 'Headers', 'emarket' ),\n\t\t\t\t'all' => esc_html__( 'Everywhere', 'emarket' ),\n\t\t\t\t'custom' => esc_html__( 'Custom', 'emarket' )\n\t\t\t\t)\n\t\t\t),\t\t\n\t\tarray(\n\t\t\t'type'\t=> 'text',\n\t\t\t'title'\t=> esc_html__( 'Webfont Custom Selector', 'emarket' ),\n\t\t\t'id'\t=> 'webfonts_custom',\n\t\t\t'description' => esc_html__( 'Insert the places will be custom here, after selected custom Webfont assign.', 'emarket' ),\n\t\t\t'std'\t => ''\t\n\t\t\t),\t\t\n\t\t)\n);\n$emarket_metabox_pages[] = array(\n\t'title' \t=> esc_html__( 'Header', 'emarket' ),\n\t'fields'\t=> array(\n\t\tarray(\n\t\t\t'type'\t=> 'checkbox',\n\t\t\t'title'\t=> esc_html__( 'Hide header', 'emarket' ),\n\t\t\t'id'\t=> 'page_header_hide',\n\t\t\t'description' => esc_html__( 'Choose to show or hide the header. ', 'emarket' ),\n\t\t\t'std' => '0'\n\t\t\t),\n\t\tarray(\n\t\t\t'type'\t=> 'select',\n\t\t\t'title'\t=> esc_html__( 'Header Style Select', 'emarket' ),\n\t\t\t'id'\t=> 'page_header_style',\n\t\t\t'description' => esc_html__( ' Chose to select header page content for this page. ', 'emarket' ),\n\t\t\t'std'\t => '',\n\t\t\t'values' => array( '' => esc_html__( 'Header Style', 'emarket' ), 'style1' => esc_html__( 'Header Style1', 'emarket' ), 'style2' => esc_html__( 'Header Style2', 'emarket' ), \n\t\t\t\t'style3' => esc_html__( 'Header Style3', 'emarket' ), 'style4' => esc_html__( 'Header Style4', 'emarket' ), 'style5' => esc_html__( 'Header Style5', 'emarket' ),\n\t\t\t\t'style6' => esc_html__( 'Header Style6', 'emarket' ), 'style7' => esc_html__( 'Header Style7', 'emarket' ), 'style8' => esc_html__( 'Header Style8', 'emarket' ),\n\t\t\t\t'style9' => esc_html__( 'Header Style9', 'emarket' ), 'style10' => esc_html__( 'Header Style10', 'emarket' ), 'style11' => esc_html__( 'Header Style11', 'emarket' ),\n\t\t\t\t'style12' => esc_html__( 'Header Style12', 'emarket' ), 'style13' => esc_html__( 'Header Style13', 'emarket' ),'style14' => esc_html__( 'Header Style14', 'emarket' ),\n\t\t\t\t'style15' => esc_html__( 'Header Style15', 'emarket' ), 'style16' => esc_html__( 'Header Style16', 'emarket' ), 'style17' => esc_html__( 'Header Style17', 'emarket' ),\n\t\t\t\t'style18' => esc_html__( 'Header Style18', 'emarket' )\n\t\t\t\t)\n\t\t\t)\n\t\t)\n\t);\n\n$emarket_metabox_pages[] = array(\n\t'title' \t=> esc_html__( 'Footer', 'emarket' ),\n\t'fields'\t=> array(\n\t\tarray(\n\t\t\t'type'\t=> 'checkbox',\n\t\t\t'title'\t=> esc_html__( 'Hide Footer', 'emarket' ),\n\t\t\t'id'\t=> 'page_footer_hide',\n\t\t\t'description' => esc_html__( 'Choose to show or hide the footer. ', 'emarket' ),\n\t\t\t'std'\t => '0',\n\t\t\t),\n\t\tarray(\n\t\t\t'type'\t=> 'select',\n\t\t\t'title'\t=> esc_html__( 'Footer Page Select', 'emarket' ),\n\t\t\t'id'\t=> 'page_footer_style',\n\t\t\t'description' => esc_html__( ' Chose to select footer page content for this page. ', 'emarket' ),\n\t\t\t'std'\t => '',\n\t\t\t'values' => emarket_build_array( 'page' )\n\t\t\t),\n\t\tarray(\n\t\t\t'type'\t=> 'select',\n\t\t\t'title'\t=> esc_html__( 'Footer Copyright Select', 'emarket' ),\n\t\t\t'id'\t=> 'copyright_footer_style',\n\t\t\t'description' => esc_html__( ' Choose to select footer copyright style for this page. ', 'emarket' ),\n\t\t\t'std'\t => '',\n\t\t\t'values' => array(\n\t\t\t\t'' \t\t => esc_html__( 'Default', 'emarket' ),\n\t\t\t\t'style1' => esc_html__( 'Style1', 'emarket' ), \n\t\t\t\t'style2' => esc_html__( 'Style2', 'emarket' ), \n\t\t\t\t'style3' => esc_html__( 'Style3', 'emarket' ), \n\t\t\t\t'style4' => esc_html__( 'Style4', 'emarket' ), \n\t\t\t\t'style5' => esc_html__( 'Style5', 'emarket' ), \n\t\t\t\t)\n\t\t\t)\n\t\t)\n\t);\n\n$emarket_metabox_pages[] = array(\n\t'title' \t=> esc_html__( 'Sidebar', 'emarket' ),\n\t'fields'\t=> array(\n\t\tarray(\n\t\t\t'type'\t=> 'select',\n\t\t\t'title'\t=> esc_html__( 'Sidebar Layout', 'emarket' ),\n\t\t\t'id'\t=> 'page_sidebar_layout',\n\t\t\t'description' => esc_html__( 'Choose layout sidebar for page', 'emarket' ),\n\t\t\t'std'\t => '',\n\t\t\t'values' => array( '' => esc_html__( 'Select Sidebar', 'emarket' ), 'full' => esc_html__( 'No Sidebar', 'emarket' ), 'left' => esc_html__( 'Sidebar Left', 'emarket' ), 'right' => esc_html__( 'Sidebar Right', 'emarket' ) )\n\t\t\t),\n\t\tarray(\n\t\t\t'type'\t=> 'select',\n\t\t\t'title'\t=> esc_html__( 'Sidebar ', 'emarket' ),\n\t\t\t'id'\t=> 'page_sidebar_template',\n\t\t\t'description' => esc_html__( ' Chose sidebar to show.', 'emarket' ),\n\t\t\t'std'\t => '',\n\t\t\t'values' => emarket_build_array( 'sidebar' )\n\t\t\t)\t\t\n\t\t)\n\t);\n\nreturn $emarket_metabox_pages;\n}", "title": "" }, { "docid": "d50227c87109c916fd7ddf5931ce51b6", "score": "0.6149698", "text": "public function settings_form() {\n\n\t\tee()->lang->loadfile( 'mobile_detect' );\n\n\t\t// Create the variable array\n\t\t$vars = array(\n\t\t\t'addon_name' => MX_MOBILE_DETECT_NAME,\n\t\t\t'error' => FALSE,\n\t\t\t'input_prefix' => __CLASS__,\n\t\t\t'message' => FALSE,\n\t\t\t'settings_form' =>FALSE,\n\t\t\t'language_packs' => ''\n\t\t);\n\n\t\t$vars['settings'] = $this->settings;\n\t\t$vars['settings_form'] = TRUE;\n\n\t\tif ( $new_settings = ee()->input->post( __CLASS__ ) ) {\n\n\t\t\tforeach ( $new_settings['row_order'] as $key => $value ) {\n\n\t\t\t\tif ( isset( $new_settings[$value]['delete'] ) || ( empty( $new_settings[$value]['value'] ) && empty( $new_settings[$value]['redirect'] ) ) ) {\n\t\t\t\t\tunset ( $new_settings[$value] );\n\t\t\t\t\tunset( $new_settings['row_order'][$key] );\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t$vars['settings'] = $new_settings;\n\n\t\t\tee()->mx_core->_saveSettingsToDB( $new_settings );\n\n\t\t\t$this->_ee_notice( ee()->lang->line( 'extension_settings_saved_success' ) );\n\t\t}\n\n\t\treturn ee()->load->view( 'form_settings', $vars, true );\n\n\t}", "title": "" }, { "docid": "531f5790d0f0d88028655550a7b09e89", "score": "0.61366326", "text": "function ap_settings_action() {\r\n if ( !empty($_POST) ) {\r\n include_once('inc/cores/save-settings.php');\r\n }\r\n }", "title": "" }, { "docid": "5bb69dfc71996d60ef721704b1e259fb", "score": "0.61282825", "text": "function settings_page() {\n\t\t\n\t\t\tif ( isset( $_POST['mode'] ) && $_POST['mode'] == 'setup' && check_admin_referer( 'wpis_setup_nonce' ) && isset( $_POST['blogname'] ) && isset( $_POST['admin_email'] ) ) {\n\t\t\t\n\t\t\t\t$valid['blogname'] \t\t= sanitize_text_field( $_POST['blogname'] );\n\t\t\t\t$valid['admin_email'] \t= sanitize_email( $_POST['admin_email'] );\n\t\t\t\n\t\t\t\t$this->set_options( $valid );\n\t\t\t\t$this->delete_defaults();\n\t\t\t\n\t\t\t} elseif ( isset( $_POST['mode'] ) && $_POST['mode'] == 'reset' && check_admin_referer( 'wpis_reset_nonce' ) ) {\n\t\t\t\n\t\t\t\t$this->reset_options( $valid );\n\t\t\t\n\t\t\t} // End of submit check\n\n\t\t\t$plugin = get_plugin_data( __FILE__ ); ?>\n\t\t\t\n\t\t\t<div class=\"wrap\">\n\t\t\t<div class=\"icon32\"></div>\n\t\t\t<h2><?php echo $plugin['Name']; ?></h2>\n\t\t\t<h3>Instant Setup Settings</h3>\n\t\t\t<p>Also deletes the sample post, sample page, and sample comment.</p>\n\t\t\t<form method=\"post\" action=\"admin.php?page=<?php echo self::SETS_SLUG; ?>\"><?php\n\t\t\t\n\t\t\t\twp_nonce_field( 'wpis_setup_nonce' );\n\t\t\t\t\n\t\t\t\techo $this->hidden_field( array( 'name' => 'mode', 'value' => 'setup' ) );\n\t\t\t\n\t\t\t\t$i \t\t\t\t\t\t= 0;\n\t\t\t\t$fields[$i]['class'] \t= 'regular-text';\n\t\t\t\t$fields[$i]['id'] \t\t= $fields[$i]['name'] = 'blogname';\n\t\t\t\t$fields[$i]['desc'] \t= 'The title of your site.';\n\t\t\t\t$fields[$i]['type'] \t= 'text';\n\t\t\t\t$i++;\n\t\t\t\t\n\t\t\t\t$fields[$i]['class'] \t= 'regular-text';\n\t\t\t\t$fields[$i]['id'] \t\t= $fields[$i]['name'] = 'admin_email';\n\t\t\t\t$fields[$i]['desc'] \t= 'This address is used for admin purposes, like new user notification.';\n\t\t\t\t$fields[$i]['type'] \t= 'text';\n\t\t\t\t$i++;\n\t\t\t\t\n\t\t\t\tforeach ( $fields as $field ) {\n\t\t\t\t\n\t\t\t\t\techo '<p>' . $this->input_field( $field ) . '</p>';\n\t\t\t\t\t\n\t\t\t\t} // End of $fields foreach\n\t\t\t\t\t\n\t\t\t\tsubmit_button( 'Setup WordPress' ); ?>\n\t\t\t\t\n\t\t\t</form>\n\t\t\t<br /><br />\n\t\t\t<h3>Reset WordPress Settings</h3>\n\t\t\t<p>Reset all WordPress settings back to the defaults (as if you've just installed WordPress).</p>\n\t\t\t<p>*Does not recreate the sample post, sample page, and sample comment.</p>\n\t\t\t\n\t\t\t<form method=\"post\" action=\"admin.php?page=<?php echo self::SETS_SLUG; ?>\"><?php\n\t\t\t\n\t\t\t\twp_nonce_field( 'wpis_reset_nonce' );\n\n\t\t\t\techo $this->hidden_field( array( 'name' => 'mode', 'value' => 'reset' ) );\n\t\t\t\n\t\t\t\tsubmit_button( 'Reset Settings' ); ?>\n\t\t\t\t\n\t\t\t</form>\n\t\t\t</div><?php\n\t\t\t\n\t\t}", "title": "" }, { "docid": "368b376b5aadd575858f90977be18f6e", "score": "0.6093434", "text": "public function save_settings_fields() {\n\t\t\tif ( isset( $_POST[ $this->setting_option_key ] ) ) {\n\t\t\t\t$settings_values = array();\n\n\t\t\t\tforeach ( $this->legacy_transition_settings as $local_key => $legacy_key ) {\n\t\t\t\t\t$settings_values[ $legacy_key ] = '';\n\t\t\t\t\tif ( isset( $_POST[ $this->setting_option_key ][ $local_key ] ) ) {\n\t\t\t\t\t\t$settings_values[ $legacy_key ] = esc_attr( $_POST[ $this->setting_option_key ][ $local_key ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tupdate_option( $this->legacy_options_key, $settings_values );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "acca362187c2c4f3547fa7e4d8ec6b4f", "score": "0.608254", "text": "function erpal_book_helper_config_form_submit($form, $form_state){\n\n $values = $form_state['values'];\n $book_skip_pdf_header_frontpage = $values['book_skip_pdf_header_frontpage'];\n variable_set('erpal_book_skip_pdf_header_frontpage', $book_skip_pdf_header_frontpage); //save email address\n \n}", "title": "" }, { "docid": "ef487659745590ea62224c317943575a", "score": "0.60800046", "text": "function createSettingsPage() {\r\n\r\n\t\tif (!current_user_can('manage_options'))\r\n\t\t\twp_die(__('Cheatin&#8217; uh?', self::$plugin_textdom));\r\n\t\t\r\n\t\tif ($this->checkInternalContentPage()) {\r\n\t\t\t$message = __('Internal content page is missing and has been recreated', self::$plugin_textdom);\r\n\t\t} else {\r\n\t\t\t$message = '';\t\r\n\t\t}\r\n\t\t\t\r\n\t\t?>\r\n\t\t<?php echo $this->pageStart(__('Thickbox Announcement Settings', self::$plugin_textdom), $message); ?>\r\n\t\t\t<?php echo $this->pagePostContainerStart(75); ?>\r\n\t\t\t\r\n\t\t\t<form name=\"tb_post\" method=\"post\" action=\"options.php\">\r\n\t\t\t<?php wp_nonce_field('update-options'); ?>\r\n\t\t\r\n\t\t\t<?php echo $this->pagePostBoxStart('pb_global', __('Global Setting', self::$plugin_textdom)); ?>\r\n\t\t\t\t<table class=\"fs-table\">\r\n\t\t\t\t<tr><th colspan=\"2\"><input type=\"checkbox\" id=\"tb_active\" name=\"tb_active\" value=\"1\" <?php echo ($this->isAnnouncementActive() ? 'checked=\"checked\" ' : ''); ?>/> <label for=\"tb_active\"><?php _e('Announcements active', self::$plugin_textdom); ?></label></th></tr>\r\n\t\t\t\t<tr><th class=\"label\"><?php _e('Valid from', self::$plugin_textdom); ?></th><td>\r\n\t\t\t\t\t<input type=\"text\"\r\n\t\t\t\t\t id=\"datepicker_from\" \r\n\t\t\t\t\t name=\"tb_valid_from\"\r\n\t\t\t\t\t value=\"<?php echo $this->getValidFromDate(); ?>\" \r\n\t\t\t\t\t readonly=\"readonly\" />\r\n\t\t\t\t\t<a href=\"#\" class=\"fs-dp-clear\" alt=\"<?php _e('Clear date', self::$plugin_textdom); ?>\" onClick=\"document.tb_post.tb_valid_from.value = ''; return false;\"><span><?php _e('Clear date', self::$plugin_textdom); ?></span></a>\r\n\t\t\t\t<br /><small><?php _e('Click in the input field to choose a date. Leave empty if no date vailidity needed.', self::$plugin_textdom); ?></small></td></tr>\r\n\t\t\t\t<tr><th class=\"label\"><?php _e('Valid to', self::$plugin_textdom); ?></th><td>\r\n\t\t\t\t\t<input type=\"text\" \r\n\t\t\t\t\t id=\"datepicker_to\" \r\n\t\t\t\t\t name=\"tb_valid_to\" \r\n\t\t\t\t\t value=\"<?php echo $this->getValidToDate(); ?>\" \r\n\t\t\t\t\t readonly=\"readonly\" />\r\n\t\t\t\t\t<a href=\"#\" class=\"fs-dp-clear\" alt=\"<?php _e('Clear date', self::$plugin_textdom); ?>\" onClick=\"document.tb_post.tb_valid_to.value = ''; return false;\"><span><?php _e('Clear date', self::$plugin_textdom); ?></span></a>\r\n\t\t\t\t<br /><small><?php _e('Click in the input field to choose a date. Leave empty if no date vailidity needed.', self::$plugin_textdom); ?></small></td></tr>\r\n\t\t\t\t</table>\r\n\t\t\t<?php echo $this->pagePostBoxEnd(); ?>\r\n\r\n\t\t\t<?php echo $this->pagePostBoxStart('pb-announcement', __('Announcement Behaviour', self::$plugin_textdom)); ?>\r\n\t\t\t\t<table class=\"fs-table\">\r\n\t\t\t\t<tr><th class=\"label\"><?php _e('Announcement Settings', self::$plugin_textdom); ?></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<?php _e('Show when user enters', self::$plugin_textdom); ?> <select name=\"tb_show_page\">\r\n\t\t\t\t\t<!--<option value=\"1\" <?php echo(get_option('tb_show_page') == 1 ? 'selected=\"selected\" ' : ''); ?>><?php _e('Homepage', self::$plugin_textdom); ?></option>//-->\r\n\t\t\t\t\t<option value=\"2\" <?php echo(get_option('tb_show_page') == 2 ? 'selected=\"selected\" ' : ''); ?>><?php _e('Any page', self::$plugin_textdom); ?></option></select>\r\n\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr><th>&nbsp;</th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<?php _e('Show announcement', self::$plugin_textdom); ?> <select name=\"tb_show_type\" onClick=\"toogleCondOptions('tb_freq','tb_show_type','2')\">\r\n\t\t\t\t\t<option value=\"1\" <?php echo (get_option('tb_show_type') == 1 ? 'selected=\"selected\" ' : ''); ?>><?php _e('once', self::$plugin_textdom); ?></option>\r\n\t\t\t\t\t<option value=\"3\" <?php echo (get_option('tb_show_type') == 3 ? 'selected=\"selected\" ' : ''); ?>><?php _e('every time the user enters the site', self::$plugin_textdom); ?></option>\r\n\t\t\t\t\t<option value=\"2\" <?php echo (get_option('tb_show_type') == 2 ? 'selected=\"selected\" ' : ''); ?>><?php _e('periodically', self::$plugin_textdom); ?></option></select><br /> \r\n\t\t\t\t\t<small><?php _e('if you choose \"once\" and you setup a new announcement, which has to be displayed again for every user, please', self::$plugin_textdom); ?> \r\n\t\t\t\t\t<a href=\"javascript: regenerate_cookie();\"><?php _e('reset the cookie string', self::$plugin_textdom); ?></a>.</small>\r\n\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr id=\"tb_freq\" style=\"display: <?php echo (get_option('tb_show_type') == 2 ? 'table-row' : 'none'); ?>;\">\r\n\t\t\t\t<td>&nbsp;</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<?php _e('Show announcement every', self::$plugin_textdom); ?> <input type=\"text\" name=\"tb_show_freq\" value=\"<?php echo get_option('tb_show_freq');?>\" size=\"2\" /> <?php _e('day(s)', self::$plugin_textdom); ?>\r\n\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t</table>\r\n\t\t\t<?php echo $this->pagePostBoxEnd(); ?>\r\n\r\n\t\t\t<?php echo $this->pagePostBoxStart('pb-tbset', __('Thickbox Settings', self::$plugin_textdom)); ?>\r\n\t\t\t\t<table class=\"fs-table\">\r\n\t\t\t\t<tr><th class=\"label\"><?php _e('Title', self::$plugin_textdom); ?></th><td><input type=\"text\" id=\"tb_title\" name=\"tb_title\" value=\"<?php echo $this->getAnnouncementTitle(); ?>\" size=\"60\" /></td></tr>\r\n\t\t\t\t<tr><th><?php _e('Width', self::$plugin_textdom); ?></th><td><input type=\"text\" id=\"tb_width\" name=\"tb_width\" value=\"<?php echo $this->getAnnouncementWidth(); ?>\" size=\"6\" /> px</td></tr>\r\n\t\t\t\t<tr><th><?php _e('Height', self::$plugin_textdom); ?></th><td><input type=\"text\" id=\"tb_height\" name=\"tb_height\" value=\"<?php echo $this->getAnnouncementHeight(); ?>\" size=\"6\" /> px</td></tr>\r\n\t\t\t\t<tr><th>&nbsp;</th><td>\r\n\t\t\t\t<input type=\"checkbox\" id=\"tb_modal\" name=\"tb_modal\" value=\"1\" <?php echo ($this->isAnnouncementModal() ? 'checked=\"checked\" ' : ''); ?>/> <label for=\"tb_modal\"><?php _e('Modal', self::$plugin_textdom); ?></label><br />\r\n\t\t\t\t<small><?php _e('Close button/link needed and no title is displayed!', self::$plugin_textdom); ?></small></td></tr>\r\n\t\t\t\t</table>\r\n\t\t\t<?php echo $this->pagePostBoxEnd(); ?>\r\n\r\n\t\t\t<?php echo $this->pagePostBoxStart('pb-content', __('Announcement Content', self::$plugin_textdom)); ?>\r\n\t\t\t\t<table class=\"fs-table\">\r\n\t\t\t\t<tr><th class=\"label\"><?php _e('Content', self::$plugin_textdom); ?></th><td>\r\n\t\t\t\t<input type=\"radio\" id=\"tb_content_type_1\" name=\"tb_content_type\" value=\"1\" <?php echo (get_option('tb_content_type') == 1 ? 'checked=\"checked\" ' : ''); ?>onClick=\"toogleCondOptions('tb_cobj,tb_clbl','tb_content_type','2')\"/> \r\n\t\t\t\t<label for=\"tb_content_type_1\"><?php _e('External Resource', self::$plugin_textdom); ?></label> \r\n\t\t\t\t<input type=\"text\" id=\"tb_ext_url\" name=\"tb_ext_url\" value=\"<?php echo get_option('tb_ext_url'); ?>\" size=\"60\" /></td></tr>\r\n\t\t\t\t<tr><th>&nbsp;</th><td>\r\n\t\t\t\t<input type=\"radio\" id=\"tb_content_type_2\" name=\"tb_content_type\" value=\"2\" <?php echo (get_option('tb_content_type') == 2 ? 'checked=\"checked\" ' : ''); ?>onClick=\"toogleCondOptions('tb_cobj,tb_clbl','tb_content_type','2')\"/> \r\n\t\t\t\t<label for=\"tb_content_type_2\"><?php _e('Inline Content', self::$plugin_textdom); ?> <a href=\"<?php echo get_option('siteurl').'/wp-admin/page.php?action=edit&post='.$this->getAnnouncementPostId(); ?>\"><?php _e('Edit now', self::$plugin_textdom); ?></a></label>\r\n\t\t\t\t</td>\r\n\t\t\t\t<tr id=\"tb_cobj\" style=\"display: <?php echo (get_option('tb_content_type') == 2 ? 'table-row' : 'none'); ?>;\">\r\n\t\t\t\t<th class=\"label\"><?php _e('Close object', self::$plugin_textdom); ?></th> \r\n\t\t\t\t<td>\r\n\t\t\t\t<input type=\"radio\" id=\"tb_close_type1\" name=\"tb_close_type\" value=\"1\" <?php echo (get_option('tb_close_type') == 1 ? 'checked=\"checked\" ' : ''); ?>/> \r\n\t\t\t\t<label for=\"tb_close_type1\"><?php _e('None', self::$plugin_textdom); ?></label><br />\r\n\t\t\t\t<input type=\"radio\" id=\"tb_close_type2\" name=\"tb_close_type\" value=\"2\" <?php echo (get_option('tb_close_type') == 2 ? 'checked=\"checked\" ' : ''); ?>/> \r\n\t\t\t\t<label for=\"tb_close_type2\"><?php _e('Button', self::$plugin_textdom); ?></label><br />\r\n\t\t\t\t<input type=\"radio\" id=\"tb_close_type3\" name=\"tb_close_type\" value=\"3\" <?php echo (get_option('tb_close_type') == 3 ? 'checked=\"checked\" ' : ''); ?>/> \r\n\t\t\t\t<label for=\"tb_close_type3\"><?php _e('Link', self::$plugin_textdom); ?></label>\r\n\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr id=\"tb_clbl\" style=\"display: <?php echo (get_option('tb_content_type') == 2 ? 'table-row' : 'none'); ?>;\">\r\n\t\t\t\t<th><?php _e('Label', self::$plugin_textdom); ?></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t<input type=\"text\" id=\"tb_close_lbl\" name=\"tb_close_lbl\" value=\"<?php echo get_option('tb_close_lbl'); ?>\" size=\"20\" />\r\n\t\t\t\t</td></tr>\r\n\t\t\t\t</table>\r\n\t\t\t<?php echo $this->pagePostBoxEnd(); ?>\r\n\t\t\t\t\t\t\t\r\n\t\t\t<p class=\"submit\">\r\n\t\t\t<input type=\"submit\" class=\"button-primary\" value=\"<?php _e('Save Changes', self::$plugin_textdom); ?>\" /> \r\n\t\t\t<input type=\"button\" class=\"button-primary\" value=\"<?php _e('Preview', self::$plugin_textdom); ?>\" onClick=\"tb_preview()\" /> \r\n\t\t\t</p>\r\n\t\t\t<input type=\"hidden\" name=\"action\" value=\"update\" />\r\n\t\t\t<input type=\"hidden\" name=\"tb_action\" value=\"tb_save_options\" />\r\n\t\t\t<?php echo '<input type=\"hidden\" name=\"page_options\" value=\"';\r\n\t\t\tforeach(self::$plugin_options as $k => $v) {\r\n\t\t\t\tif ($k != 'tb_postid') {\r\n\t\t\t\t\techo $k.',';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\techo '\" />'; ?>\r\n\t\t\t</form>\r\n\t\t\t<?php echo $this->pagePostContainerEnd(); ?>\r\n\t\t\t\r\n\t\t\t<?php echo $this->pagePostContainerStart(20); ?>\t\t\t\t\r\n\t\t\t\t<?php echo $this->pagePostBoxStart('pb_about', __('About', self::$plugin_textdom)); ?>\r\n\t\t\t\t\t<p><?php _e('For further information please visit the', self::$plugin_textdom); ?> <a href=\"http://www.faebusoft.ch/downloads/thickbox-announcement\"><?php _e('plugin homepage', self::$plugin_textdom);?></a>.<br /> \r\n\t\t\t\t<?php echo $this->pagePostBoxEnd(); ?>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t<?php echo $this->pagePostBoxStart('pb_donate', __('Donation', self::$plugin_textdom)); ?>\r\n\t\t\t\t\t<p><?php _e('If you like my work please consider a small donation', self::$plugin_textdom); ?></p>\r\n\t\t\t\t\t<form action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">\r\n\t\t\t\t\t<input type=\"hidden\" name=\"cmd\" value=\"_s-xclick\">\r\n\t\t\t\t\t<input type=\"hidden\" name=\"encrypted\" value=\"-----BEGIN PKCS7-----MIIHJwYJKoZIhvcNAQcEoIIHGDCCBxQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYCeQ4GM0edKR+bicos+NE4gcpZJIKMZFcbWBQk64bR+T5aLcka0oHZCyP99k9AqqYUQF0dQHmPchTbDw1u6Gc2g7vO46YGnOQHdi2Z+73LP0btV1sLo4ukqx7YK8P8zuN0g4IdVmHFwSuv7f7U2vK4LLfhplxLqS6INz/VJpY5z8TELMAkGBSsOAwIaBQAwgaQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIXvrD6twqMxiAgYBBtWm5l8RwJ4x39BfZSjg6tTxdbjrIK3S9xzMBFg09Oj9BYFma2ZV4RRa27SXsZAn5v/5zJnHrV/RvKa4a5V/QECgjt4R20Dx+ZDrCs+p5ZymP8JppOGBp3pjf146FGARkRTss1XzsUisVYlNkkpaGWiBn7+cv0//lbhktlGg1yqCCA4cwggODMIIC7KADAgECAgEAMA0GCSqGSIb3DQEBBQUAMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbTAeFw0wNDAyMTMxMDEzMTVaFw0zNTAyMTMxMDEzMTVaMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAwUdO3fxEzEtcnI7ZKZL412XvZPugoni7i7D7prCe0AtaHTc97CYgm7NsAtJyxNLixmhLV8pyIEaiHXWAh8fPKW+R017+EmXrr9EaquPmsVvTywAAE1PMNOKqo2kl4Gxiz9zZqIajOm1fZGWcGS0f5JQ2kBqNbvbg2/Za+GJ/qwUCAwEAAaOB7jCB6zAdBgNVHQ4EFgQUlp98u8ZvF71ZP1LXChvsENZklGswgbsGA1UdIwSBszCBsIAUlp98u8ZvF71ZP1LXChvsENZklGuhgZSkgZEwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAgV86VpqAWuXvX6Oro4qJ1tYVIT5DgWpE692Ag422H7yRIr/9j/iKG4Thia/Oflx4TdL+IFJBAyPK9v6zZNZtBgPBynXb048hsP16l2vi0k5Q2JKiPDsEfBhGI+HnxLXEaUWAcVfCsQFvd2A1sxRr67ip5y2wwBelUecP3AjJ+YcxggGaMIIBlgIBATCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTA5MDYxODExMzk1MFowIwYJKoZIhvcNAQkEMRYEFMNbCeEAMgC/H4fJW0m+DJKuB7BVMA0GCSqGSIb3DQEBAQUABIGAhjv3z6ikhGh6s3J+bd0FB8pkJLY1z9I4wn45XhZOnIEOrSZOlwr2LME3CoTx0t4h4M2q+AFA1KS48ohnq3LNRI+W8n/9tKvjsdRZ6JxT/nEW+GqUG6lw8ptnBmYcS46AdacgoSC4PWiWYFOLvNdafxA/fuyzrI/lVUTu+wiiZL4=-----END PKCS7-----\">\r\n\t\t\t\t\t<input type=\"image\" src=\"https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif\" border=\"0\" name=\"submit\" alt=\"PayPal - The safer, easier way to pay online!\">\r\n\t\t\t\t\t<img alt=\"\" border=\"0\" src=\"https://www.paypal.com/de_DE/i/scr/pixel.gif\" width=\"1\" height=\"1\">\r\n\t\t\t\t\t</form>\r\n\t\t\t\t<?php echo $this->pagePostBoxEnd(); ?>\r\n\t\t\t<?php echo $this->pagePostContainerEnd(); ?>\r\n\t\t<?php echo $this->pageEnd(); ?>\r\n\r\n\t\t<?php\r\n\t}", "title": "" }, { "docid": "4f9dcf7a91d3f4e83a63cc3be543bdd6", "score": "0.60733837", "text": "function get_settings_fields() {\n $args = array(\n 'sort_column' => 'post_title'\n );\n $pages = get_pages($args);\n\n foreach ($pages as $page) {\n $key = $page->ID;\n $val = $page->post_title;\n\n $options[$key] = $val;\n }\n\n $settings_fields = array(\n /*\n 'wedevs_basics' => array(\n array(\n 'name' => 'team_description',\n 'label' => __( 'Wprowadzenie do zakładki Nasz Team', 'wedevs' ),\n 'desc' => __( 'Strona zawierająca opis listy pracowników', 'wedevs' ),\n 'type' => 'select',\n 'options' => $options\n ),\n array(\n 'name' => 'services_description',\n 'label' => __( 'Wprowadzenie do zakładki Nasze usługi', 'wedevs' ),\n 'desc' => __( 'Strona zawierająca opis listy usług', 'wedevs' ),\n 'type' => 'select',\n 'options' => $options\n ),\n ),\n */\n\n 'wedevs_tooltip' => array(\n array(\n 'name' => 'tooltip',\n 'label' => __( 'Tooltip content', 'wedevs' ),\n //'desc' => __( 'Text input description', 'wedevs' ),\n 'type' => 'text',\n 'default' => '',\n ),\n ),\n\n 'wedevs_ga' => array(\n array(\n 'name' => 'ga_code',\n 'label' => __( 'Google Analytics Tracking ID', 'wedevs' ),\n 'desc' => __( 'UA-XXXXXXXX-X', 'wedevs' ),\n 'type' => 'text',\n 'default' => '',\n ),\n ),\n 'wedevs_popup' => array(\n array(\n 'name' => 'title_1',\n 'label' => __( 'Fact #1 Title', 'wedevs' ),\n //'desc' => __( '', 'wedevs' ),\n 'type' => 'text',\n 'default' => '',\n ),\n array(\n 'name' => 'content_1',\n 'label' => __( 'Fact #1 Content', 'wedevs' ),\n //'desc' => __( '', 'wedevs' ),\n 'type' => 'textarea',\n 'default' => '',\n ),\n array(\n 'name' => 'title_2',\n 'label' => __( 'Fact #2 Title', 'wedevs' ),\n //'desc' => __( '', 'wedevs' ),\n 'type' => 'text',\n 'default' => '',\n ),\n array(\n 'name' => 'content_2',\n 'label' => __( 'Fact #2 Content', 'wedevs' ),\n //'desc' => __( '', 'wedevs' ),\n 'type' => 'textarea',\n 'default' => '',\n ),\n ),\n/*\n 'wedevs_footer' => array(\n array(\n 'name' => 'footer_1',\n 'label' => __( 'Heading', 'wedevs' ),\n //'desc' => __( 'Text input description', 'wedevs' ),\n 'type' => 'text',\n 'default' => '',\n ),\n array(\n 'name' => 'footer_2',\n 'label' => __( 'Address Line #1', 'wedevs' ),\n //'desc' => __( 'Text input description', 'wedevs' ),\n 'type' => 'text',\n 'default' => '',\n ),\n array(\n 'name' => 'footer_3',\n 'label' => __( 'Address Line #2', 'wedevs' ),\n //'desc' => __( 'Text input description', 'wedevs' ),\n 'type' => 'text',\n 'default' => '',\n ),\n\n array(\n 'name' => 'number_input',\n 'label' => __( 'Number Input', 'wedevs' ),\n 'desc' => __( 'Number field with validation callback `intval`', 'wedevs' ),\n 'type' => 'number',\n 'default' => 'Title',\n 'sanitize_callback' => 'intval'\n ),\n array(\n 'name' => 'textarea',\n 'label' => __( 'Textarea Input', 'wedevs' ),\n 'desc' => __( 'Textarea description', 'wedevs' ),\n 'type' => 'textarea'\n ),\n array(\n 'name' => 'checkbox',\n 'label' => __( 'Checkbox', 'wedevs' ),\n 'desc' => __( 'Checkbox Label', 'wedevs' ),\n 'type' => 'checkbox'\n ),\n array(\n 'name' => 'radio',\n 'label' => __( 'Radio Button', 'wedevs' ),\n 'desc' => __( 'A radio button', 'wedevs' ),\n 'type' => 'radio',\n 'options' => array(\n 'yes' => 'Yes',\n 'no' => 'No'\n )\n ),\n array(\n 'name' => 'multicheck',\n 'label' => __( 'Multile checkbox', 'wedevs' ),\n 'desc' => __( 'Multi checkbox description', 'wedevs' ),\n 'type' => 'multicheck',\n 'options' => array(\n 'one' => 'One',\n 'two' => 'Two',\n 'three' => 'Three',\n 'four' => 'Four'\n )\n ),\n array(\n 'name' => 'selectbox',\n 'label' => __( 'A Dropdown', 'wedevs' ),\n 'desc' => __( 'Dropdown description', 'wedevs' ),\n 'type' => 'select',\n 'default' => 'no',\n 'options' => array(\n 'yes' => 'Yes',\n 'no' => 'No'\n )\n ),\n array(\n 'name' => 'password',\n 'label' => __( 'Password', 'wedevs' ),\n 'desc' => __( 'Password description', 'wedevs' ),\n 'type' => 'password',\n 'default' => ''\n ),\n array(\n 'name' => 'file',\n 'label' => __( 'File', 'wedevs' ),\n 'desc' => __( 'File description', 'wedevs' ),\n 'type' => 'file',\n 'default' => '',\n 'options' => array(\n 'button_label' => 'Choose Image'\n )\n )\n ),\n 'wedevs_advanced' => array(\n array(\n 'name' => 'color',\n 'label' => __( 'Color', 'wedevs' ),\n 'desc' => __( 'Color description', 'wedevs' ),\n 'type' => 'color',\n 'default' => ''\n ),\n array(\n 'name' => 'password',\n 'label' => __( 'Password', 'wedevs' ),\n 'desc' => __( 'Password description', 'wedevs' ),\n 'type' => 'password',\n 'default' => ''\n ),\n array(\n 'name' => 'wysiwyg',\n 'label' => __( 'Advanced Editor', 'wedevs' ),\n 'desc' => __( 'WP_Editor description', 'wedevs' ),\n 'type' => 'wysiwyg',\n 'default' => ''\n ),\n array(\n 'name' => 'multicheck',\n 'label' => __( 'Multile checkbox', 'wedevs' ),\n 'desc' => __( 'Multi checkbox description', 'wedevs' ),\n 'type' => 'multicheck',\n 'default' => array('one' => 'one', 'four' => 'four'),\n 'options' => array(\n 'one' => 'One',\n 'two' => 'Two',\n 'three' => 'Three',\n 'four' => 'Four'\n )\n ),\n array(\n 'name' => 'selectbox',\n 'label' => __( 'A Dropdown', 'wedevs' ),\n 'desc' => __( 'Dropdown description', 'wedevs' ),\n 'type' => 'select',\n 'options' => array(\n 'yes' => 'Yes',\n 'no' => 'No'\n )\n ),\n array(\n 'name' => 'password',\n 'label' => __( 'Password', 'wedevs' ),\n 'desc' => __( 'Password description', 'wedevs' ),\n 'type' => 'password',\n 'default' => ''\n ),\n array(\n 'name' => 'file',\n 'label' => __( 'File', 'wedevs' ),\n 'desc' => __( 'File description', 'wedevs' ),\n 'type' => 'file',\n 'default' => ''\n )\n ),\n 'wedevs_others' => array(\n array(\n 'name' => 'text',\n 'label' => __( 'Text Input', 'wedevs' ),\n 'desc' => __( 'Text input description', 'wedevs' ),\n 'type' => 'text',\n 'default' => 'Title'\n ),\n array(\n 'name' => 'textarea',\n 'label' => __( 'Textarea Input', 'wedevs' ),\n 'desc' => __( 'Textarea description', 'wedevs' ),\n 'type' => 'textarea'\n ),\n array(\n 'name' => 'checkbox',\n 'label' => __( 'Checkbox', 'wedevs' ),\n 'desc' => __( 'Checkbox Label', 'wedevs' ),\n 'type' => 'checkbox'\n ),\n array(\n 'name' => 'radio',\n 'label' => __( 'Radio Button', 'wedevs' ),\n 'desc' => __( 'A radio button', 'wedevs' ),\n 'type' => 'radio',\n 'options' => array(\n 'yes' => 'Yes',\n 'no' => 'No'\n )\n ),\n array(\n 'name' => 'multicheck',\n 'label' => __( 'Multile checkbox', 'wedevs' ),\n 'desc' => __( 'Multi checkbox description', 'wedevs' ),\n 'type' => 'multicheck',\n 'options' => array(\n 'one' => 'One',\n 'two' => 'Two',\n 'three' => 'Three',\n 'four' => 'Four'\n )\n ),\n array(\n 'name' => 'selectbox',\n 'label' => __( 'A Dropdown', 'wedevs' ),\n 'desc' => __( 'Dropdown description', 'wedevs' ),\n 'type' => 'select',\n 'options' => array(\n 'yes' => 'Yes',\n 'no' => 'No'\n )\n ),\n array(\n 'name' => 'password',\n 'label' => __( 'Password', 'wedevs' ),\n 'desc' => __( 'Password description', 'wedevs' ),\n 'type' => 'password',\n 'default' => ''\n ),\n array(\n 'name' => 'file',\n 'label' => __( 'File', 'wedevs' ),\n 'desc' => __( 'File description', 'wedevs' ),\n 'type' => 'file',\n 'default' => ''\n )\n */\n\n );\n\n return $settings_fields;\n }", "title": "" }, { "docid": "5f511c993e51e88038c0b830a0ba23aa", "score": "0.60733455", "text": "function define_after_data(&$mform) {\n // overwrite if necessary\n }", "title": "" }, { "docid": "3109c1b16e4323d6a421c4eef242a742", "score": "0.6056788", "text": "public function settings()\n\t{\n\t\t$base_url = ee('CP/URL')->make('addons/settings/spam/settings');\n\t\tee()->load->library('form_validation');\n\n\t\t$settings = array(\n\t\t\t'sensitivity' => ee()->config->item('spam_sensitivity') ?: 70,\n\t\t\t'word_limit' => ee()->config->item('spam_word_limit') ?: 5000,\n 'content_limit' => ee()->config->item('spam_content_limit') ?: 5000\n );\n\n\t\t$sensitivity = ee()->input->post('spam_sensitivity') ?:$settings['sensitivity'];\n\n\t\t$vars['sections'] = array(\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'title' => \"<span class='range-value'>{$sensitivity}</span>% \" . lang('spam_sensitivity'),\n\t\t\t\t\t'desc' => 'spam_sensitivity_desc',\n\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t'spam_sensitivity' => array(\n\t\t\t\t\t\t\t'type' => 'slider',\n\t\t\t\t\t\t\t'value' => $sensitivity\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t),\n\t\t\t'engine_training' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'title' => \"update_training\",\n\t\t\t\t\t'desc' => 'update_training_desc',\n\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t'update_training' => array(\n\t\t\t\t\t\t\t'type' => 'html',\n\t\t\t\t\t\t\t'content' => \"<a class='btn tn action update' href='\" . ee('CP/URL', 'addons/settings/spam/') . \"'>\" . lang('update_training') . \"</a>\"\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => 'spam_word_limit',\n\t\t\t\t\t'desc' => 'spam_word_limit_desc',\n\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t'spam_word_limit' => array('type' => 'text', 'value' => $settings['word_limit'])\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => 'spam_content_limit',\n\t\t\t\t\t'desc' => 'spam_content_limit_desc',\n\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t'spam_content_limit' => array('type' => 'text', 'value' => $settings['content_limit'])\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\tee()->form_validation->set_rules(array(\n\t\t\tarray(\n\t\t\t\t 'field' => 'spam_sensitivity',\n\t\t\t\t 'label' => 'lang:spam_sensitivity',\n\t\t\t\t 'rules' => 'required|numeric'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t 'field' => 'spam_word_limit',\n\t\t\t\t 'label' => 'lang:spam_word_limit',\n\t\t\t\t 'rules' => 'required|is_natural_no_zero'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t 'field' => 'spam_content_limit',\n\t\t\t\t 'label' => 'lang:spam_content_limit',\n\t\t\t\t 'rules' => 'required|is_natural_no_zero'\n\t\t\t)\n\t\t));\n\n\t\tif (AJAX_REQUEST)\n\t\t{\n\t\t\tee()->form_validation->run_ajax();\n\t\t\texit;\n\t\t}\n\t\telseif (ee()->form_validation->run() !== FALSE)\n\t\t{\n\t\t\t$fields = array();\n\n\t\t\t// Make sure we're getting only the fields we asked for\n\t\t\tforeach ($vars['sections'] as $settings)\n\t\t\t{\n\t\t\t\tforeach ($settings as $setting)\n\t\t\t\t{\n\t\t\t\t\tforeach ($setting['fields'] as $field_name => $field)\n\t\t\t\t\t{\n\t\t\t\t\t\t$fields[$field_name] = ee()->input->post($field_name);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$config_update = ee()->config->update_site_prefs($fields);\n\n\t\t\tif ( ! empty($config_update))\n\t\t\t{\n\t\t\t\tee()->load->helper('html_helper');\n\t\t\t\tee('CP/Alert')->makeInline('shared-form')\n\t\t\t\t\t->asIssue()\n\t\t\t\t\t->withTitle(lang('cp_message_issue'))\n\t\t\t\t\t->addToBody($config_update)\n\t\t\t\t\t->defer();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tee('CP/Alert')->makeInline('shared-form')\n\t\t\t\t\t->asSuccess()\n\t\t\t\t\t->withTitle(lang('success'))\n\t\t\t\t\t->addToBody(lang('spam_settings_updated'))\n\t\t\t\t\t->defer();\n\n\t\t\t\t// Delete the classifier from shared memory if our settings changed\n\t\t\t\tee('spam:Training', 'default')->deleteClassifier();\n\t\t\t}\n\n\t\t\tee()->functions->redirect($base_url);\n\n\t\t}\n\t\telseif (ee()->form_validation->errors_exist())\n\t\t{\n\t\t\tee('CP/Alert')->makeInline('shared-form')\n\t\t\t\t->asIssue()\n\t\t\t\t->withTitle(lang('settings_save_error'))\n\t\t\t\t->addToBody(lang('settings_save_error_desc'))\n\t\t\t\t->defer();\n\t\t\tee()->functions->redirect($base_url);\n\t\t}\n\n\t\tee()->cp->add_js_script(array(\n\t\t\t'file' => array('cp/addons/spam'),\n\t\t));\n\n\t\t$vars['base_url'] = $base_url;\n\t\t$vars['ajax_validate'] = TRUE;\n\t\t$vars['cp_page_title'] = lang('spam_settings');\n\t\t$vars['save_btn_text'] = 'btn_save_settings';\n\t\t$vars['save_btn_text_working'] = 'btn_saving';\n\n\t\t$download_ajax_fail = ee('CP/Alert')->makeBanner('reorder-ajax-fail')\n\t\t\t->asIssue()\n\t\t\t->canClose()\n\t\t\t->withTitle(lang('training_update_failed'))\n\t\t\t->addToBody('%s');\n\n\t\tee()->javascript->set_global('alert.download_ajax_fail', $download_ajax_fail->render());\n\n\t\treturn array(\n\t\t\t'body' => ee('View')->make('spam:form')->render(array('data' => $vars)),\n\t\t\t'breadcrumb' => array(\n\t\t\t\tee('CP/URL')->make('addons/settings/spam')->compile() => lang('spam')\n\t\t\t),\n\t\t\t'heading' => lang('spam_settings')\n\t\t);\n\t}", "title": "" }, { "docid": "6ebed219c74dacea03c2fbde6a435fa8", "score": "0.6051678", "text": "function dosomething_signup_admin_config_form($form, &$form_state) {\n $form['sms_game'] = array(\n '#type' => 'fieldset',\n '#title' => t('SMS Game'),\n );\n $var_name = 'dosomething_signup_sms_game_multiplayer_endpoint';\n $form['sms_game'][$var_name] = array(\n '#type' => 'textfield',\n '#required' => TRUE,\n '#title' => t('SMS Multi-player Game Endpoint'),\n '#description' => t(\"URL to post a multi-player SMS Game request, e.g. <em>http://ds-heroku.biz/sms-multiplayer-game/create</em>\"),\n '#default_value' => variable_get($var_name),\n );\n $form['log'] = array(\n '#type' => 'fieldset',\n '#title' => t('Logging'),\n );\n $form['log']['dosomething_signup_log_signups'] = array(\n '#type' => 'checkbox',\n '#title' => t('Log Signups.'),\n '#default_value' => variable_get('dosomething_signup_log_signups', FALSE),\n '#description' => t(\"Logs Signup entity activity. This should be disabled on production.\"),\n );\n $form['log']['dosomething_signup_log_mobilecommons'] = array(\n '#type' => 'checkbox',\n '#title' => t('Log Mobile Commons requests.'),\n '#default_value' => variable_get('dosomething_signup_log_mobilecommons', FALSE),\n '#description' => t(\"This should be disabled on production.\"),\n );\n return system_settings_form($form);\n}", "title": "" }, { "docid": "8ce749c3229f74fbb96ba5bf12a698b1", "score": "0.6046289", "text": "public function page_init()\n { \n register_setting(\n 'fi_theme_option_group', // Option group\n 'fi_theme_options', // Option name\n array( $this, 'sanitize' ) // Sanitize\n );\n\n add_settings_section(\n 'setting_section_id', // ID\n 'My Custom Settings', // Title\n array( $this, 'print_section_info' ), // Callback\n 'fi-setting-admin' // Page\n ); \n\n add_settings_field(\n 'id_number', // ID\n 'ID Number', // Title \n array( $this, 'id_number_callback' ), // Callback\n 'fi-setting-admin', // Page\n 'setting_section_id' // Section \n ); \n\n add_settings_field(\n 'title', \n 'Title', \n array( $this, 'title_callback' ), \n 'fi-setting-admin', \n 'setting_section_id'\n ); \n \n add_settings_field(\n 'company_name', \n 'Company Name', \n array( $this, 'company_name_callback' ), \n 'fi-setting-admin', \n 'setting_section_id'\n ); \n add_settings_field(\n 'company_phone', \n 'Company Phone', \n array( $this, 'company_phone_callback' ), \n 'fi-setting-admin', \n 'setting_section_id'\n ); \n add_settings_field(\n 'company_lat', \n 'Company Latitude', \n array( $this, 'company_latitude_callback' ), \n 'fi-setting-admin', \n 'setting_section_id'\n ); \n add_settings_field(\n 'company_long', \n 'Company Longitude', \n array( $this, 'company_longitude_callback' ), \n 'fi-setting-admin', \n 'setting_section_id'\n ); \n add_settings_field(\n 'has_sidebar', \n 'Template Has Sidebar', \n array( $this, 'template_sidebar_callback' ), \n 'fi-setting-admin', \n 'setting_section_id'\n ); \n }", "title": "" }, { "docid": "4abdc06c8a474feaff449aae8bc8cc30", "score": "0.6030808", "text": "public\tfunction settings_form()\n\t{\n\t\t$EE =& get_instance();\n\t\t$EE->lang->loadfile($this->addon_id);\n\t\t$EE->load->library($this->addon_id.\"_helper\");\n $EE->load->model('channel_model');\n\n\t\t// check to see if NSM Morphine is properly installed\n\t\tif (!$this->checkNsmMorphineStatus()) {\n\t\t\treturn $EE->lang->line('nsm_live_look.error.no_morphine');\n\t\t}\n\n\t\t// Create the variable array\n\t\t$vars = array(\n\t\t\t'addon_id' => $this->addon_id,\n\t\t\t'error' => FALSE,\n\t\t\t'input_prefix' => __CLASS__,\n\t\t\t'message' => FALSE,\n\t\t\t'channels' => $EE->channel_model->get_channels()->result()\n\t\t);\n\n\t\t// Are there settings posted from the form?\n\t\t// PARSE POST TO SETTINGS FORMAT FOR SAVE\n\t\tif($data = $EE->input->post(__CLASS__))\n\t\t{\n\t\t\tif(!isset($data[\"enabled\"]))\n\t\t\t\t$data[\"enabled\"] = TRUE;\n\n\t\t\tif(! $vars['error'] = validation_errors())\n\t\t\t{\n\t\t\t\t$new_settings[\"enabled\"] = $data[\"enabled\"];\n\t\t\t\tif(isset($data[\"urls\"]))\n\t\t\t\t{\n\t\t\t\t\tforeach ($data[\"urls\"] as $url_data)\n\t\t\t\t\t{\n\t\t\t\t\t\t$new_settings[\"channels\"][$url_data[\"channel_id\"]][\"urls\"][] = $url_data;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->settings = $this->_saveSettings($new_settings);\n\t\t\t\t$EE->session->set_flashdata('message_success', $this->name . \": \". $EE->lang->line('alert.success.extension_settings_saved'));\n\t\t\t\t$EE->functions->redirect(BASE.AMP.'C=addons_extensions');\n\t\t\t}\n\t\t}\n\t\t// PARSE SETTINGS FOR FORM FORMAT\n\t\telse\n\t\t{\n\t\t\t$data[\"enabled\"] = $this->settings[\"enabled\"];\n\t\t\tif(isset($this->settings[\"channels\"]))\n\t\t\t{\n\t\t\t\tforeach ($this->settings[\"channels\"] as $channel_id => $channel)\n\t\t\t\t{\n\t\t\t\t\tforeach ($channel[\"urls\"] as $url)\n\t\t\t\t\t{\n\t\t\t\t\t\t$data[\"urls\"][] = $url;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$vars[\"data\"] = $data;\n\n\t\t$template = $EE->load->view('extension/_preview_url_row', array(\n\t\t\t\"input_prefix\" => __CLASS__,\n\t\t\t\"count\" => FALSE,\n\t\t\t\"row_class\" => FALSE,\n\t\t\t\"channels\" => $vars['channels'],\n\t\t\t\"channel_id\" => FALSE,\n\t\t\t\"row\" => array(\n\t\t\t\t\"title\" => FALSE,\n\t\t\t\t\"url\" => FALSE,\n\t\t\t\t\"channel_id\" => FALSE,\n\t\t\t\t\"height\" => FALSE,\n\t\t\t\t\"page_url\" => FALSE\n\t\t\t)\n\t\t), TRUE);\n\n\t\t// $template = $EE->javascript->generate_json($template);\n\t\t$template = json_encode($template);\n\n\t\t// Javascript away\n\t\t$js = 'NSM_Live_Look = {\n\t\t\t\ttemplates : {\n\t\t\t\t\t$preview_url: $('.$template.')\n\t\t\t\t}\n\t\t\t};';\n\n\t\t// add the releases php / js object\n\t\t$EE->nsm_live_look_helper->addJS($js, array(\"file\"=>FALSE));\n\t\t$EE->nsm_live_look_helper->addJS('extension_settings.js');\n\n\t\t// Return the view.\n\t\treturn $EE->load->view('extension/settings', $vars, TRUE);\n\t}", "title": "" }, { "docid": "9e919d3a80a59e0eb9e4a233856ef794", "score": "0.6030073", "text": "function hermes_register_settings(){\r\n\t\r\n\t// get the settings sections array\r\n\t$settings_output \t= hermes_get_settings();\r\n\t\r\n\tif (isset($settings_output['hermes_option_name'])) {\r\n\t\t$hermes_option_name = $settings_output['hermes_option_name'];\r\n\t}\r\n\t\r\n\t//setting\r\n\tif (isset($hermes_option_name)) {\r\n\t\tregister_setting($hermes_option_name, $hermes_option_name, 'hermes_validate_options' );\r\n\t}\r\n\t\r\n\t//sections\r\n\tif(!empty($settings_output['hermes_page_sections'])){\r\n\t\t// call the \"add_settings_section\" for each!\r\n\t\tforeach ( $settings_output['hermes_page_sections'] as $id => $title ) {\r\n\t\t\tadd_settings_section( $id, $title, 'hermes_section_fn', __FILE__);\r\n\t\t}\r\n\t}\r\n\t\t\r\n\t//fields\r\n\tif(!empty($settings_output['hermes_page_fields'])){\r\n\t\t// call the \"add_settings_field\" for each!\r\n\t\tforeach ($settings_output['hermes_page_fields'] as $option) {\r\n\t\t\thermes_create_settings_field($option);\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "5e694a8c0042f503ace7fc73c0063031", "score": "0.6018829", "text": "function spgfdt_gform_pre_form_settings_save( $form ) \n\t\t{\n\n\n\t\t\t/**\n\t\t\t * set the gform_entry_source to GFAPI if empty\n\t\t\t */\n\t\t\t$form[ 'spgfdt_gform_entry_source' ] = rgpost( 'spgfdt_gform_entry_source' );\n\t\t\tif( empty( $form[ 'spgfdt_gform_entry_source' ] ) )\n\t\t\t\t$form[ 'spgfdt_gform_entry_source' ] = 'GFAPI';\n\t\t\t\t\t \n\t\t\t$form[ 'spgfdt_displayto' ] = rgpost( 'spgfdt_displayto' );\n\t\t\t$form[ 'spgfdt_searching' ] = rgpost( 'spgfdt_searching' );\n\t\t\t$form[ 'spgfdt_ordering' ] = rgpost( 'spgfdt_ordering' );\n\t\t\t$form[ 'spgfdt_paging' ] = rgpost( 'spgfdt_paging' );\n\n\t\t\treturn( $form );\n\n\n\t\t}", "title": "" }, { "docid": "dc585272fb54869d65388a996de27a2d", "score": "0.6008727", "text": "function _getSettingProperties($id,$name,$title,$value,$info,$type,$options,$special)\r\n {\r\n global $_ARRAYLANG, $_CORELANG;\r\n \r\n \t$arrSetting = array();\r\n \t\r\n switch (intval($type)) {\r\n case 1:\r\n //input text\r\n $output = '<input type=\"text\" style=\"width: 250px;\" name=\"settings['.$name.']\" value=\"'.$value.'\" />';\r\n break;\r\n case 2:\r\n //textarea\r\n $output = '<textarea style=\"width: 250px; height: 60px;\" name=\"settings['.$name.']\">'.$value.'\"</textarea>';\r\n break;\r\n case 3:\r\n //radio\r\n switch ($name) {\r\n case 'placeData':\r\n case 'placeDataHost':\r\n $addBreak = true;\r\n break;\r\n default:\r\n $addBreak = false;\r\n break;\r\n }\r\n \r\n $arrOptions = array();\r\n if(!empty($options)) {\r\n $arrOptions = explode(\",\",$options);\r\n $first = true;\r\n foreach ($arrOptions as $key => $label) {\r\n $checked = ($key+1)==$value ? 'checked=\"checked\"' : '';\r\n $output .= !$first && $addBreak ? \"<br />\" : '';\r\n $output .= '<label><input type=\"radio\" '.$checked.' value=\"'.($key+1).'\" name=\"settings['.$name.']\" />&nbsp;'.$_ARRAYLANG[$label].'</label>';\r\n $first = false;\r\n }\r\n }\r\n break;\r\n case 4:\r\n //checkbox\r\n $arrOptions = array();\r\n if(!empty($options)) {\r\n $arrOptions = explode(\",\",$options);\r\n foreach ($arrOptions as $key => $label) {\r\n $checked = $key==$value ? 'checked=\"checked\"' : '';\r\n $output .= '<label><input type=\"checkbox\" '.$checked.' value=\"'.$key.'\" name=\"settings['.$name.']\" />&nbsp;'.$_ARRAYLANG[$label].'</label>';\r\n }\r\n } else {\r\n $checked = $value=='1' ? 'checked=\"checked\"' : '';\r\n $value = '<input type=\"checkbox\" '.$checked.' value=\"1\" name=\"settings['.$name.']\" />';\r\n }\r\n break;\r\n case 5:\r\n //dropdown \r\n if(!empty($options)) { \r\n $options = explode(\",\",$options);\r\n $output = '<select style=\"width: 252px;\" name=\"settings['.$name.']\" >'; \r\n foreach ($options as $key => $title) {\r\n $checked = $key==$value ? 'selected=\"selected\"' : '';\r\n $output .= '<option '.$checked.' value=\"'.$key.'\" />'.$_ARRAYLANG[$title].'</option>';\r\n }\r\n $output .= '</select>';\r\n } \r\n\r\n if(!empty($special)) {\r\n switch ($special) { \r\n case 'getCategoryDorpdown':\r\n $objCategoryManager = new \\Cx\\Modules\\Calendar\\Controller\\CalendarCategoryManager(true); \r\n $objCategoryManager->getCategoryList();\r\n $output = '<select style=\"width: 252px;\" name=\"settings['.$name.']\" >';\r\n $output .= $objCategoryManager->getCategoryDropdown(intval($value), 1);\r\n $output .= '</select>';\r\n break;\r\n case 'getPlaceDataDorpdown':\r\n $objMediadirForms = new \\Cx\\Modules\\MediaDir\\Controller\\MediaDirectoryForm(null, 'MediaDir');\r\n $objMediadirForms->getForms(); \r\n $objMediadirForms->listForms($objTpl,4);\r\n \r\n $output = $_ARRAYLANG['TXT_CALENDAR_SELECT_FORM_MEDIADIR'].\": <br />\";\r\n $output .= '<select style=\"width: 252px;\" name=\"settings['.$name.']\" >'; \r\n $output .= $objMediadirForms->listForms($objTpl,4,intval($value)); \r\n $output .= '</select>';\r\n break;\r\n }\r\n }\r\n break;\r\n case 6:\r\n //checkbox multi-select\r\n $arrOptions = array();\r\n if(!empty($options)) {\r\n $arrOptions = explode(\",\",$options);\r\n $arrValue = explode(',', $value);\r\n foreach ($arrOptions as $key => $label) {\r\n $checked = in_array($key, $arrValue) ? 'checked=\"checked\"' : '';\r\n $output .= '<label><input type=\"checkbox\" '.$checked.' value=\"'.$key.'\" name=\"settings['.$name.'][]\" />&nbsp;'.$_ARRAYLANG[$label].'</label>';\r\n }\r\n } else {\r\n $checked = $value=='1' ? 'checked=\"checked\"' : '';\r\n $value = '<input type=\"checkbox\" '.$checked.' value=\"1\" name=\"settings['.$name.'][]\" />';\r\n }\r\n break;\r\n case 7:\r\n if ($special == 'listPreview') {\r\n $output = \"<div id='listPreview'></div>\";\r\n } elseif ($special == 'detailPreview') {\r\n $output = \"<div id='detailPreview'></div>\";\r\n }\r\n break; \r\n\t}\r\n \r\n if(!empty($info)) {\r\n $infobox = '&nbsp;<span class=\"icon-info tooltip-trigger\"></span><span class=\"tooltip-message\">' . $_ARRAYLANG[$info] . '</span>';\r\n } else {\r\n $infobox = '';\r\n }\r\n\r\n $arrSetting['output'] = $output;\r\n $arrSetting['infobox'] = $infobox;\r\n \r\n \t\r\n return $arrSetting;\r\n }", "title": "" }, { "docid": "a684a499b3a5c3afdbf0cbd6586e751e", "score": "0.5993567", "text": "public function settings()\n\t{\n\t\t$rules = array(\n\t\t \t'name' => 'required|minLength[3]',\n\t\t \t'app_id' => 'required|minLength[3]',\n\t\t \t'secret' => 'required|minLength[3]',\n\t\t \t'access_token' => 'required|minLength[3]',\n\t\t);\n\t\t$result = ee('Validation')->make($rules)->validate($_POST);\n\n\t\tif($result->isValid())\n\t\t{\n\t\t\t$configuration_id = 1;\n\t\t\t$name \t\t\t = ee()->input->post('name');\n\t\t\t$app_id = ee()->input->post('app_id');\n\t\t\t$secret = ee()->input->post('secret');\n\t\t\t$access_token = ee()->input->post('access_token');\n\n\t\t\t// save the values\n\t\t\t$save = ee()->fb_photos_model->save_settings($configuration_id, $name, $app_id, $secret, $access_token);\n\n\t\t\tif($save !== FALSE)\n\t\t\t{\n\t\t\t\tee('CP/Alert')->makeBanner('success-message')\n\t\t\t\t\t->asSuccess()\n\t\t\t\t\t->withTitle(lang('saved'))\n\t\t\t\t\t->addToBody(lang('form_saved'))\n\t\t\t\t\t->defer();\n\n\t\t\t\tee()->functions->redirect(ee('CP/URL', 'addons/settings/fb_photos/')->compile());\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$name = '';\n\t\t\t$app_id = '';\n\t\t\t$secret = '';\n\t\t\t$access_token = '';\n\n\t\t\t//Get the settings\n\t\t\t$settings = ee()->fb_photos_model->get_settings();\n\t\t\tif($settings != NULL)\n\t\t\t{\n\t\t\t\t$name = $settings->name;\n\t\t\t\t$app_id = $settings->app_id;\n\t\t\t\t$secret = $settings->secret;\n\t\t\t\t$access_token = $settings->access_token;\n\t\t\t}\n\n\t\t\t$form = array\n\t\t\t(\n\t\t\t\tarray(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'title' => 'name',\n\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t'name' => array(\n\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t'value' => $name,\n\t\t\t\t\t\t\t\t'required' => TRUE\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\tarray(\n\t\t\t\t\t\t'title' => 'app_id',\n\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t'app_id' => array(\n\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t'value' => $app_id,\n\t\t\t\t\t\t\t\t'required' => TRUE\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\tarray(\n\t\t\t\t\t\t'title' => 'secret',\n\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t'secret' => array(\n\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t'value' => $secret,\n\t\t\t\t\t\t\t\t'required' => TRUE\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\tarray(\n\t\t\t\t\t\t'title' => 'access_token',\n\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t'access_token' => array(\n\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t'value' => $access_token,\n\t\t\t\t\t\t\t\t'required' => TRUE\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\n\t\t\t// final view variables we need to render the form\n\t\t\t$vars = array('sections' => $form);\n\t\t\t$vars += array\n\t\t\t(\n\t\t\t\t'base_url' \t\t\t => ee('CP/URL', 'addons/settings/fb_photos/settings'),\n\t\t\t\t'cp_page_title' \t\t=> lang('api_settings'),\n\t\t\t\t'save_btn_text' \t\t=> 'btn_save_form',\n\t\t\t\t'save_btn_text_working' => 'btn_saving'\n\t\t\t);\t\n\n\t\t\t// add the error to the form\n\t\t\tif($_POST)\n\t\t\t\t$vars['errors'] = $result;\n\n\t\t\tee()->cp->add_js_script(array('file' => array('cp/form_group')));\n\n\t\t\treturn array\n\t\t\t(\n\t\t\t \t'body' => ee('View')->make('fb_photos:form')->render($vars),\n\t\t\t \t'breadcrumb' => array(ee('CP/URL', 'addons/settings/fb_photos/')->compile() => lang('fb_photos_module_name')),\n\t\t\t\t'heading' => lang('album_settings')\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "809a9c8a27232119cd7faccdaded6290", "score": "0.59841293", "text": "function initSettings() {\n\tglobal $gcdb;\n\t\n\t$request = \"SELECT * FROM $gcdb->options WHERE option_name NOT IN ('template','about_text') ORDER BY option_id\";\n\t\n\t$settings = $gcdb->get_results($request);\n\t\t\n\tfor($i=0;$i<count($settings);$i++)\n\t{\n\t\tif(isset($settings[$i]))\n\t\t{\n\t\t\t$setting = $settings[$i];\n\t\t\t$setting_ID = $setting->option_id;\n\t\t\t$setting_name = $setting->option_name;\n\t\t\t$setting_des = $setting->option_description;\n\t\t\t$setting_value = $setting->option_value;\n\t\t\t\n\t\t\techo(\"<tr class=\\\"withover\\\">\");\n\t\t\techo(\"<td class=\\\"count\\\"><span>$setting_ID<span></td>\");\n\t\t\techo(\"<td class=\\\"short\\\"><span>$setting_name<span></td>\");\n\t\t\techo(\"<td class=\\\"short\\\"><span>$setting_des<span></td>\");\n\t\t\techo(\"<td class=\\\"short\\\"><input type=\\\"text\\\" id=\\\"value$setting_ID\\\" name=\\\"value$setting_ID\\\" value=\\\"$setting_value\\\" size=\\\"70\\\" /></td>\");\n\t\t\techo(\"<td class=\\\"short\\\"><input type=\\\"submit\\\" value=\\\"Save\\\" onclick=\\\"javascript:xajax_saveEditOption($setting_ID,document.getElementById('value$setting_ID').value);javascript:document.getElementById('lo').style.display='block';javascript:document.getElementById('lo').innerHTML='Saving';javascript:document.getElementById('lo').style.background='#c44';\\\" /></td>\");\n\t\t\techo(\"</tr>\");\n\t\t}\n\t}\n}", "title": "" }, { "docid": "7f48d6d3310037f0966d900c1688d3d2", "score": "0.5982221", "text": "function retrieve_form_settings()\n\t\t{\n\t\t\tif ($this->interactivity)\n\t\t\t{\n\t\t\t\t$res = Array();\n\t\t\t\t$this->agent_values = get_var('wf_agent_'.$this->agent_type, array('POST','GET'),$value);\n\t\t\t\tforeach ($this->bo_agent->get(2) as $name => $value)\n\t\t\t\t{\n\t\t\t\t\t$res[$name] = (isset($this->agents_values[$name]))? $this->agents_values[$name] : $value;\n\t\t\t\t}\n\t\t\t\t//store theses values in the bo_object(without saving the values)\n\t\t\t\t//htmlentites will be made by the bo's set function\n\t\t\t\t$this->bo_agent->set($res);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "79ef151f0288190695ed416583cd0f80", "score": "0.5980201", "text": "public function post_set_default(){\n\n\t\t$income_data \t= \tFiledb::_rawurldecode(json_decode(stripcslashes(Input::get('data')), true));\n\t\t$module \t\t= \tModules::find($income_data['id']);\n\n\t\tif(!empty($module->settings)){\n\t\t\t\n\t\t\t$module->default_settings = $module->settings;\n\t\t\t$module->save();\n\n\t\t\treturn Utilites::alert(__('forms.saved_notification', array('item' => $module->name)), 'success');\n\n\t\t}else{\n\n\t\t\treturn Utilites::alert(__('modules.empty_settings_error', array('module' => $module->name)), 'error');\n\t\t}\n\t}", "title": "" }, { "docid": "c4a66d8ee5c540f9b6d1528a19d323cd", "score": "0.5974307", "text": "public function create_settings() {\n\t\t\n\t\t//Init vars\n\t\t$field_data \t= array();\n\t\t$section_slug\t= NULL;\n\n\t\t//Register santization callback\n\t\tregister_setting(\n\t\t\t$this->view_slug,\n\t\t\t$this->view_slug,\n\t\t\tarray( $this, 'validate' )\n\t\t);\n\t\t\n\t\t//Setup sections\n\t\tdo_action( 'prso_core_option_page_sections', $this->page_sections, $this->view_slug );\n\t\t\n\t\tdo_action( 'prso_core_option_page_fields', $this->page_fields, $this->view_slug, $this->data );\n\t}", "title": "" }, { "docid": "dc77d06e777e70813bfc3e3466310f33", "score": "0.59684676", "text": "function register_puawp_settings_page()\n {\n $this->puawp_settings_tabs[$this->edit_puawp_settings_page_key] = 'Settings';\n register_setting( $this->edit_puawp_settings_page_key, $this->edit_puawp_settings_page_key );\n }", "title": "" }, { "docid": "54130395b31de7bbc71c309a37929763", "score": "0.59658825", "text": "function extends_megamenu_get_settings_saved( $settings, $type, $contentID ){\n\tif( $type == 'portfolio' ) {\n\n\t\t// the name of form elements MUST match with your module settings form\n\t\t$settings = array (\n\t\t\t'title' \t=> ( isset( $_POST['content-title'][$contentID] ) ? stripslashes($_POST['content-title'][$contentID]) : '' ),\n\t\t\t'cat_id' \t=> ( isset( $_POST['mega-portfolio-cat'][$contentID] ) ? stripslashes($_POST['mega-portfolio-cat'][$contentID]) : '' ),\n\t\t\t'number'\t=> ( isset( $_POST['mega-portfolio-number'][$contentID] ) ? $_POST['mega-portfolio-number'][$contentID] : 8 )\n\t\t\t);\n\t}\n\n\treturn $settings;\n}", "title": "" }, { "docid": "479d3e23805684188a3e97b2dd13370a", "score": "0.5964063", "text": "function er_settings() {\n\t//these are the default content types that show up on the list:\n\t$default_types = er_default_accomplishment_content_types();\n\t$types = variable_get('er_summary_types');\n if (!$types) $types = array();\n\t//dsm($types);\n \n $form['status'] = array(\n '#type' => 'item',\n '#title'=> 'ER-Core Status:',\n '#markup' => t('Access the <b>!link</b> to diagnose problems, update your installation, or reset something if it\\'s broken.', array('!link'=>l('ER-Core status page', 'admin/config/epscor/status')))\n );\n\t$form['help_description'] = array(\n '#type' => 'item',\n '#title'=> 'Notice:',\n '#markup' => t('You may want to take a look at ER-Core\\'s !link!', array('!link'=>l('documentation', 'admin/help/er', array('fragment'=>'post-install'))))\n );\n \n $start_date = variable_get('er_start_date');\n //dsm(mktime(0, 0, 0, $start_date['month'], $start_date['day'], $start_date['year']));\n $form['er_start_date'] = array(\n '#type' => 'date',\n '#title' => t('Start Date of EPSCoR Grant:'),\n '#default_value' => $start_date?$start_date:array( 'year'=>'2009','month'=>'9', 'day'=>'15'),//date('Y-m-d', $start_date?$start_date:mktime(0, 0, 0, 9, 15, 2009)),\n '#description' => t('This date will be used as the start of the grant. This effects the date ranges shown on the accomplishments table.'),\n\t\t'#required' => true,\n );\n\t\n\t$reporting_month = variable_get('er_reporting_month');\n\t//see: date/date_api/date_api_elements.inc\n $form['er_reporting_month'] = array(\n '#type' => 'date_select',\n\t\t'#date_format' => 'm',\n\t\t//'#date_type' => DATE_ISO,\n '#title' => t('Reporting Period starting month:'),\n '#default_value' => $reporting_month?'0000-'.$reporting_month:null,\n '#description' => t('When does your reporting period begin? This is probably the same month as the start date of the grant.'),\n\t\t'#required' => true,\n );\n \n\t$form['er_summary_types'] = array(\n\t\t'#type' => 'select_or_other',\n\t\t'#select_type' => 'checkboxes',\n\t\t'#title' => t('Summary Table Content:'),\n\t\t'#default_value' => $types,\n\t\t'#options' => array_merge($default_types, $types),\n\t\t'#multiple' => TRUE,\n\t\t'#description' => t(\"Select the content types that you want to be displayed on the summary table. <br>Each content type must have a corresponding view set up in order for it to be displayed in the summary table.\"),\n\t);\n \n\tif (module_exists('er_encryption')){\n\t\t$form['er_use_encryption'] = array(\n\t\t '#type' => 'checkbox',\n\t\t '#title' => t('Use encryption.'),\n\t\t '#default_value' => variable_get('er_use_encryption'),\n\t\t '#description' => t('This applies to gender, disabilities, citizenship, ethnicity, and race.'),\n\t\t);\t\t\t\n\t}\n\t \n\t // this below function will get deleted\n\tfunction er_import_fields_temp($form, &$form_state){\n\t\td($form_state, 'this is being called from er_import_fields_temp');\n\t\twatchdog('er', 'This is a test, ignore ~Mike',NULL,WATCHDOG_CRITICAL);\n\t}\n\t\n\treturn system_settings_form($form);\n}", "title": "" }, { "docid": "2f78c183a96b43dd8774a3a2f4c841eb", "score": "0.59620506", "text": "function theme_options_do_page() {\n global $select_options, $radio_options;\n\n if ( ! isset( $_REQUEST['settings-updated'] ) )\n $_REQUEST['settings-updated'] = false;\n\n ?>\n <div class=\"wrap\">\n <?php screen_icon(); echo \"<h2>\" . __( ' Theme Options', 'roots' ) . \"</h2>\"; ?>\n\n <?php if ( false !== $_REQUEST['settings-updated'] ) : ?>\n <div class=\"updated fade\"><p><strong><?php _e( 'Options saved', 'roots' ); ?></strong></p></div>\n <?php endif; ?>\n\n <form method=\"post\" action=\"options.php\">\n <?php settings_fields( 'mb_options' ); ?>\n <?php $options = get_option( 'mb_theme_options' ); ?>\n\n <table class=\"form-table\">\n\n <?php\n /**\n * Phone Number\n */\n ?>\n <tr valign=\"top\"><th scope=\"row\"><?php _e( 'Phone Number', 'roots' ); ?></th>\n <td>\n <input id=\"mb_theme_options[phone]\" class=\"regular-text\" type=\"text\" name=\"mb_theme_options[phone]\" value=\"<?php esc_attr_e( $options['phone'] ); ?>\" />\n <label class=\"description\" for=\"mb_theme_options[phone]\"><?php _e( 'Please enter your phone number (only used on mobile navigation)', 'roots' ); ?></label>\n </td>\n </tr>\n\n \n </table>\n\n <p class=\"submit\">\n <input type=\"submit\" class=\"button-primary\" value=\"<?php _e( 'Save Options', 'roots' ); ?>\" />\n </p>\n </form>\n </div>\n\n <?php\n}", "title": "" }, { "docid": "6585b111e20dbb7c9c6062fde39f3cf5", "score": "0.5959828", "text": "public function settingsForm()\n {\n return null;\n }", "title": "" }, { "docid": "2a5461b3b2b464acc036a8bf096e75be", "score": "0.59431434", "text": "function makusi_options_general_init(){\n //register_setting( 'theme_makusi_options_group', 'theme_makusi_options', 'makusi_options_validate' );\n \t \n \t // Add a form section for the Logo\n \t // add_settings_section( $id, $title, $callback, $page );\n \t // $page The menu page on which to display this section. Should match $menu_slug from Function Reference/add theme page\n \t $section_general_id = 'makusi_settings_general'; // String for use in the 'id' attribute of tags. \n \t $section_general_title = __( 'Logo Options', 'makusi' );// Title of the section. \n \t $section_general_callback = 'makusi_general_header_text';// Function that fills the section with the desired content. The function should echo its output. \n \t $section_general_page = 'makusi';// The menu page on which to display this section. Should match $menu_slug from Function Reference/add theme page\n \t add_settings_section($section_general_id, $section_general_title, $section_general_callback, $section_general_page);\n \t \n // Add Logo uploader\n // add_settings_field( $id, $title, $callback, $page, $section, $args );\n // $id String for use in the 'id' attribute of tags. \n // $title Title of the field. \n // $callback Function that fills the field with the desired inputs as part of the larger form. Passed a single argument, the $args array. \n // Name and id of the input should match the $id given to this function. The function should echo its output.\n // $page The menu page on which to display this field. Should match $menu_slug from add_theme_page()\n // $section The section of the settings page in which to show the box (default or a section you added \n // with add_settings_section(), \n // look at the page in the source to see what the existing ones are.)\n // $args Additional arguments that are passed to the $callback function. \n // The 'label_for' key/value pair can be used to format the field title like so: <label for=\"value\">$title</label>. \n add_settings_field('makusi_general_logo', __( 'Logo', 'makusi' ), 'makusi_general_logo', $section_general_page, $section_general_id);\n add_settings_field('makusi_general_logo_preview', __( 'Logo Preview', 'makusi' ), 'makusi_general_logo_preview', $section_general_page, $section_general_id);\n add_settings_field('makusi_general_white_logo', __( 'White Logo', 'makusi' ), 'makusi_general_white_logo', $section_general_page, $section_general_id);\n add_settings_field('makusi_general_white_logo_preview', __( 'White Logo Preview', 'makusi' ), 'makusi_general_white_logo_preview', $section_general_page, $section_general_id);\n add_settings_field('makusi_general_google_analytics', __( 'Google Analytics', 'makusi' ), 'makusi_general_google_analytics', $section_general_page, $section_general_id);\n add_settings_field('makusi_general_stelios_css', __( 'Stelios CSS', 'makusi' ), 'makusi_general_stelios_css', $section_general_page, $section_general_id);\n \n $section_upload_id = 'makusi_settings_upload';\n \t $section_upload_title = __( 'Upload Options', 'makusi' );\n \t $section_upload_callback = 'makusi_upload_header_text';\n \t $section_upload_page = 'makusi';\n \t add_settings_section($section_upload_id, $section_upload_title, $section_upload_callback, $section_upload_page);\n \n /*add_settings_field( $id, $title, $callback, $page, $section, $args );*/\n\t $field_id = 'makusi_settings_upload_type';\n\t $field_title = __('Post Type','makusi');\n\t $field_callback = 'mk_form_settings_posts_type';\n\t $field_page = 'makusi';\n\t $section_page = 'makusi_settings_upload';\n\t $field_args = '';\n\tadd_settings_field($field_id, $field_title, $field_callback, $field_page, $section_page, $field_args);\n\t/*add_settings_field( $id, $title, $callback, $page, $section, $args );*/\n\t $field_id = 'makusi_settings_upload_status';\n\t $field_title = __('Post Status','makusi');\n\t $field_callback = 'mk_form_settings_posts_status';\n\t $field_page = 'makusi';\n\t $section_page = 'makusi_settings_upload';\n\t $field_args = '';\n\tadd_settings_field($field_id, $field_title, $field_callback, $field_page, $section_page, $field_args);\n\t$field_id = 'makusi_settings_upload_redirect_to';\n\t $field_title = __('Redirect To','makusi');\n\t $field_callback = 'mk_form_settings_posts_redirect_to';\n\t $field_page = 'makusi';\n\t $section_page = 'makusi_settings_upload';\n\t $field_args = '';\n\tadd_settings_field($field_id, $field_title, $field_callback, $field_page, $section_page, $field_args);\n}", "title": "" }, { "docid": "f0b4ae6d7b7168e4614381678eb573ee", "score": "0.5934865", "text": "function save_settings( $settings = array() ) {\n\t\tglobal $socialflow;\n\n\t\tif ( !isset( $_POST['socialflow'] ) )\n\t\t\treturn;\n\n\t\t$data = $_POST['socialflow'];\n\n\t\tif ( isset( $_POST['option_page'] ) AND ( $this->slug == $_POST['option_page'] ) ) {\n\n\t\t\t// Whitelist validation\n\t\t\tif ( isset( $data['publish_option'] ) && array_key_exists( $data['publish_option'], self::get_publish_options() ) )\n\t\t\t\t$settings['publish_option'] = $data['publish_option'];\n\n\t\t\tif ( isset( $data['optimize_period'] ) && array_key_exists( $data['optimize_period'], self::get_optimize_periods() ) )\n\t\t\t\t$settings['optimize_period'] = $data['optimize_period'];\n\n\t\t\t$settings['optimize_range_from'] = isset( $data['optimize_range_from'] ) ? sanitize_text_field( $data['optimize_range_from'] ) : null;\n\t\t\t$settings['optimize_range_to'] = isset( $data['optimize_range_to'] ) ? sanitize_text_field( $data['optimize_range_to'] ) : null;\n\n\t\t\t$settings['post_type'] = isset( $data['post_type'] ) ? array_map( 'sanitize_text_field', $data['post_type'] ) : array();\n\n\t\t\t$settings['shorten_links'] = isset( $data['shorten_links'] ) ? absint( $data['shorten_links']) : 0;\n\t\t\t$settings['must_send'] = isset( $data['must_send'] ) ? absint( $data['must_send'] ) : 0;\n\t\t\t$settings['compose_now'] = isset( $data['compose_now'] ) ? absint( $data['compose_now'] ) : 0;\n\t\t}\n\n\t\treturn $settings;\n\t}", "title": "" }, { "docid": "18ee22c32a0aff0bd3b9ebfe90ebf3b3", "score": "0.5915963", "text": "function pitaya_settings_init() {\r\n\r\n // Register Theme Settings.\r\n register_setting('pitaya', 'pitaya_options');\r\n\r\n\r\n $fields = pitaya_setting_fields();\r\n\r\n foreach ($fields as $key => $value) {\r\n\r\n $title = ucwords(str_replace(\"_\", \" \", $key));\r\n\r\n add_settings_section(\r\n 'pitaya_section_'. $key .'',\r\n __($title, 'pitaya'),\r\n 'pitaya_section_'. $key .'_cb',\r\n 'pitaya'\r\n );\r\n\r\n add_settings_field(\r\n 'pitaya',\r\n __($title, 'pitaya'),\r\n 'pitaya_field_'. $key .'_cb',\r\n 'pitaya',\r\n 'pitaya_section_'. $key .'', [\r\n ''. $key .'' => $value,\r\n 'class' => 'pitaya_settings_row'\r\n ]\r\n );\r\n }\r\n\r\n}", "title": "" }, { "docid": "a54435cfba8d4592c8ca1f6c6c066e21", "score": "0.5908848", "text": "function sitetheme_settings($saved_settings) {\n\n // Get the default values from the .info file.\n $defaults = zen_theme_get_default_settings('sitetheme');\n\n // Merge the saved variables and their default values.\n $settings = array_merge($defaults, $saved_settings);\n\n /*\n * Create the form using Forms API: http://api.drupal.org/api/6\n */\n $form = array();\n /* -- Delete this line if you want to use this setting\n $form['sitetheme_example'] = array(\n '#type' => 'checkbox',\n '#title' => t('Use this sample setting'),\n '#default_value' => $settings['sitetheme_example'],\n '#description' => t(\"This option doesn't do anything; it's just an example.\"),\n );\n // */\n\n $form['support']['zen_html5_respond_meta'] = array(\n '#type' => 'checkboxes',\n '#title' => t('Add HTML5 and responsive scripts and meta tags to every page.'),\n '#default_value' => theme_get_setting('zen_html5_respond_meta'),\n '#options' => array(\n 'respond' => t('Add Respond.js JavaScript to add basic CSS3 media query support to IE 6-8.'),\n 'html5' => t('Add HTML5 shim JavaScript to add support to IE 6-8.'),\n 'meta' => t('Add meta tags to support responsive design on mobile devices.'),\n ),\n '#description' => t('IE 6-8 require a JavaScript polyfill solution to add basic support of HTML5 and CSS3 media queries. If you prefer to use another polyfill solution, such as <a href=\"!link\">Modernizr</a>, you can disable these options. Respond.js only works if <a href=\"@url\">Aggregate CSS</a> is enabled. Mobile devices require a few meta tags for responsive designs.', array('!link' => 'http://www.modernizr.com/', '@url' => url('admin/config/development/performance'))),\n );\n\n // Add the base theme's settings.\n $form += zen_settings($saved_settings, $defaults);\n\n // Remove some of the base theme's settings.\n unset($form['themedev']['zen_layout']); // We don't need to select the base stylesheet.\n\n // Return the form\n return $form;\n}", "title": "" }, { "docid": "bec099938cb3d70fce2d8824829c0295", "score": "0.5908003", "text": "function filefield_field_settings_save($field) {\r\n return array('list_field', 'list_default', 'description_field');\r\n}", "title": "" }, { "docid": "19bf3e9595f9b44f483e972b64cb762d", "score": "0.59066933", "text": "function facebook_settings() {\n $form = array(\n 'application' => array(\n '#type' => 'fieldset',\n '#title' => t('Application'),\n 'facebook_app_id' => array(\n '#type' => 'textfield',\n '#title' => t('Application id'),\n '#default_value' => variable_get('facebook_app_id', ''),\n '#required' => TRUE,\n '#description' => t('To use the Facebook API, you will need to have an application id.'),\n ),\n 'facebook_app_secret' => array(\n '#type' => 'textfield',\n '#title' => t('Application secret'),\n '#default_value' => variable_get('facebook_app_secret', ''),\n '#description' => t('To receive access tokens for various actions, an application secret is required. No entering one will limit the functionality of this module.'),\n ),\n 'facebook_app_access_token' => array(\n '#type' => 'textfield',\n '#title' => t('Access token'),\n '#value' => variable_get('facebook_app_access_token', ''),\n '#description' => t('This is the access token that has been granted based on the above application id and secret.'),\n '#disabled' => TRUE,\n ),\n ),\n 'page' => array(\n '#type' => 'fieldset',\n '#title' => t('Page'),\n 'facebook_page' => array(\n '#type' => 'textfield',\n '#title' => t('Page URL'),\n '#default_value' => variable_get('facebook_page', ''),\n '#description' => t('If you want to associate your website with an existing Facebook Page, instead of your website\\'s URL, enter the page URL here.'),\n ),\n ),\n );\n return system_settings_form($form);\n}", "title": "" }, { "docid": "ee330566b1383018d6f1e211c0e6acda", "score": "0.59036946", "text": "function demo_settings_page()\n{\n //add_settings_section(\"section\", \"\", null, \"demo\");\n //add_settings_field(\"demo-file\", \"\", \"demo_file_display\", \"demo\", \"section\"); \n register_setting(\"section\", \"selective_plugin_loading\", \"handle_file_upload\");\n}", "title": "" }, { "docid": "ee41bb09ea096c0c88c3261ef060d53c", "score": "0.59010834", "text": "function fillFieldSettings() {\n\t\t$arrFields = $this->pSet->getFieldsList ();\n\t\t$this->addFieldsSettings ( $arrFields, $this->pSet, true, $this->pageType );\n\t\t\n\t\t$this->addExtraFieldsToFieldSettings ();\n\t\t\n\t\tif ($this->searchPanelActivated && $this->permis [$this->searchTableName] [\"search\"]) {\n\t\t\t$arrFields = $this->pSetSearch->getAllSearchFields ();\n\t\t\t$this->addFieldsSettings ( $arrFields, $this->pSetSearch, true, PAGE_SEARCH );\n\t\t}\n\t}", "title": "" }, { "docid": "9a05c9a7c5b968c02a1b5183b4fdaa11", "score": "0.58934927", "text": "function photo_perfect_save_theme_settings_meta( $post_id, $post ) {\n\n\t\t// Verify nonce.\n\t\tif (\n\t\t\t! ( isset( $_POST['photo_perfect_theme_settings_meta_box_nonce'] )\n\t\t\t&& wp_verify_nonce( sanitize_key( $_POST['photo_perfect_theme_settings_meta_box_nonce'] ), basename( __FILE__ ) ) )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Bail if auto save or revision.\n\t\tif ( defined( 'DOING_AUTOSAVE' ) || is_int( wp_is_post_revision( $post ) ) || is_int( wp_is_post_autosave( $post ) ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Check permission.\n\t\tif ( isset( $_POST['post_type'] ) && 'page' === $_POST['post_type'] ) {\n\t\t\tif ( ! current_user_can( 'edit_page', $post_id ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if ( ! current_user_can( 'edit_post', $post_id ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isset( $_POST['theme_settings'] ) && is_array( $_POST['theme_settings'] ) ) {\n\n\t\t\t$raw_value = wp_unslash( $_POST['theme_settings'] );\n\n\t\t\tif ( ! array_filter( $raw_value ) ) {\n\n\t\t\t\t// No value.\n\t\t\t\tdelete_post_meta( $post_id, 'theme_settings' );\n\n\t\t\t} else {\n\n\t\t\t\t$meta_fields = array(\n\t\t\t\t\t'post_layout' => array(\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t),\n\t\t\t\t\t'single_image' => array(\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t),\n\t\t\t\t\t'single_image_alignment' => array(\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t),\n\t\t\t\t\t);\n\n\t\t\t\t$sanitized_values = array();\n\n\t\t\t\tforeach ( $raw_value as $mk => $mv ) {\n\n\t\t\t\t\tif ( isset( $meta_fields[ $mk ]['type'] ) ) {\n\t\t\t\t\t\tswitch ( $meta_fields[ $mk ]['type'] ) {\n\t\t\t\t\t\t\tcase 'select':\n\t\t\t\t\t\t\t\t$sanitized_values[ $mk ] = sanitize_key( $mv );\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'checkbox':\n\t\t\t\t\t\t\t\t$sanitized_values[ $mk ] = absint( $mv ) > 0 ? 1 : 0;\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$sanitized_values[ $mk ] = sanitize_text_field( $mv );\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} // End if.\n\n\t\t\t\t}\n\n\t\t\t\tupdate_post_meta( $post_id, 'theme_settings', $sanitized_values );\n\t\t\t}\n\t\t} // End if theme settings.\n\n\t}", "title": "" }, { "docid": "9c41c652cf1573090177513d35f60cfa", "score": "0.58839977", "text": "public function attalzr_settings_page()\n {\n//\t\tif(isset($_GET['settings-updated']) && $_GET['settings-updated'])\n if ($_POST) {\n attalzrPlugin::beginAnalyzingCSV();\n }\n\n (!$this->settings) ? $settings = $this->_settings_fields() : $settings = $this->settings;\n foreach ($settings as $page) {\n if ($page['slug'] == 'attalzr') {\n add_thickbox();\n // Build page HTML\n $html = '<div class=\"wrap\" id=\"plugin_settings\">' . \"\\n\";\n $html .= '<div id=\"attalzr_' . $page['slug'] . '_settings\">' . \"\\n\";\n $html .= '<h2>' . __($page['title'], 'plugin_textdomain') . '</h2>' . \"\\n\";\n// $html .= '<div>' . __($page['sections']['html-enclose']['description'], 'plugin_textdomain') . '</div>' . \"\\n\";\n $html .= '<form id=\"attalzr_' . $page['slug'] . '_form\" method=\"post\" action=\"\" enctype=\"multipart/form-data\">' . \"\\n\";\n $html .= $this->_display_hidden_fields();\n // Setup navigation\n // $html .= '<ul id=\"settings-sections\" class=\"subsubsub hide-if-no-js\">' . \"\\n\";\n // $html .= '<li><a class=\"tab all current\" href=\"#all\">' . __('All', 'plugin_textdomain') . '</a></li>' . \"\\n\";\n // foreach ($page['sections'] as $section => $data) {\n // $html .= '<li>| <a class=\"tab\" id=\"' . $section . '_tab\" href=\"#' . $section . '\">' . $data['title'] . '</a></li>' . \"\\n\";\n // }\n\n $html .= '</ul>' . \"\\n\";\n\n $html .= '<div class=\"clear\"></div>' . \"\\n\";\n // Get settings fields\n ob_start();\n ?>\n <div id=\"<?php echo $page['slug'] . '_container' ?>\" class=\"settings_section_container\">\n <?php\n settings_fields($page['slug']);\n do_settings_sections($page['slug']);\n // wp_editor('', 'test', $settings = array());\n ?>\n </div>\n <?php\n\n $html .= ob_get_clean();\n\n $html .= '<p class=\"submit\">' . \"\\n\";\n $html .= $this->_get_submit_button();\n $html .= '</p>' . \"\\n\";\n $html .= '</form>' . \"\\n\";\n $html .= '<div id=\"attalzr_how_to_link\"><a target=\"new\" href=\"' . plugin_dir_url(__FILE__) . 'assets/example-input-output/how-to-spreadsheet-breakdown.pdf\">Download Instructional PDF</a></div>';\n//\t\t\t\t$html .= '<div id=\"attalzr_input_ouput_example\"><img src=\"' . plugin_dir_url(__FILE__) . 'assets/example-input-output/example-input-output-format-v100.jpg\" /></div>';\n $html .= '</div>' . \"\\n\";\n $html .= '</div>' . \"\\n\";\n\n echo $html;\n }\n }\n }", "title": "" }, { "docid": "7823a4bf778abd909b1150ffb0570d46", "score": "0.58815545", "text": "function rtw_add_admin_page() {\n $blog_charset = get_option('blog_charset', 'UTF-8');\n\n $posted = (isset($_POST['posted'])) ? TRUE : FALSE;\n\n if($posted) {\n //Validation\n if(preg_match('/[1-3][0-9]|[1-9]/',intval($_POST['terms']) AND intval($_POST['terms']) <= 30)){\n update_option('rtw_terms',intval($_POST['terms'] * RTW_UNIXTIME_PER_DAY));\n update_option('rtw_email',stripslashes($_POST['email']));\n update_option('rtw_subject',stripslashes($_POST['subject']));\n update_option('rtw_message',stripslashes($_POST['message']));\n $rtw_error = FALSE;\n }else{\n $rtw_error = TRUE;\n }\n }\n?>\n\n\n\n<?php //Updated Message\nif($posted === TRUE AND $rtw_error === FALSE):?>\n <div class=\"updated\">\n <p>\n <strong>設定を保存しました</strong>\n </p>\n </div>\n\n<?php elseif($posted === TRUE AND $rtw_error === TRUE):?>\n <div class=\"error\">\n <p>\n <strong>アラート発生日数は1-30の間の値を入力して下さい。</strong>\n </p>\n </div>\n\n<?php endif; //Admin View\n?>\n\n<div class=\"wrap\">\n <h2>Remember The WordPress Settings</h2>\n <form method=\"post\" action=\"<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>\">\n <input type=\"hidden\" name=\"posted\" value=\"yes\">\n <table class=\"form-table\">\n <tr valign=\"top\">\n <th scope=\"row\">\n <label for=\"terms\">アラート発生日数<label>\n </th>\n <td>\n <input name=\"terms\" type=\"text\" id=\"terms\" value=\"<?php echo intval(get_option('rtw_terms') / RTW_UNIXTIME_PER_DAY); ?>\" class=\"regular-text code\" /><br />\n 1-30までの数字を入力してください。\n </td>\n </tr>\n <tr valign=\"top\">\n <th scope=\"row\">\n <label for=\"email\">送信先E-mailアドレス<label>\n </th>\n <td>\n <input name=\"email\" type=\"text\" id=\"email\" value=\"<?php echo htmlspecialchars(get_option('rtw_email'), ENT_QUOTES,\n $blog_charset); ?>\" class=\"regular-text code\" /><br />\n アラートメールの送信先E-mailアドレスを入力してください。\n </td>\n </tr>\n <tr valign=\"top\">\n <th scope=\"row\">\n <label for=\"terms\">メールタイトル<label>\n </th>\n <td>\n <input name=\"subject\" type=\"text\" id=\"subject\" value=\"<?php echo htmlspecialchars(get_option('rtw_subject'), ENT_QUOTES, $blog_charset); ?>\" class=\"regular-text code\" /><br />\n 送信メッセージの「タイトル」を入力してください。\n </td>\n </tr>\n <tr valign=\"top\">\n <th scope=\"row\">\n <label for=\"terms\">メール本文<label>\n </th>\n <td>\n <textarea name='message' id='message' cols='50' rows='10'><?php echo htmlspecialchars(get_option('rtw_message'), ENT_QUOTES, $blog_charset); ?></textarea><br />\n 送信メッセージの「内容」を入力してください。\n </td>\n </tr>\n </table>\n\n <p class=\"submit\">\n <input type=\"submit\" name=\"Submit\" class=\"button-primary\" value=\"変更を保存\" />\n </p>\n </form>\n</div>\n<?php }", "title": "" }, { "docid": "12091c1037dd78897a663db4e6423c3b", "score": "0.58764493", "text": "function podio_webform_admin_settings(){\n $form['podio_webform_app_id'] = array(\n '#type' => 'textfield',\n '#title' => t('Podio App ID'),\n '#default_value' => variable_get('podio_webform_app_id', ''),\n '#description' => t('The ID from the app on podio.'),\n '#required' => TRUE,\n );\n $form['podio_webform_app_token'] = array(\n '#type' => 'textfield',\n '#title' => t('Podio App Token'),\n '#default_value' => variable_get('podio_webform_app_token', ''),\n '#description' => t('The app token.'),\n '#required' => TRUE,\n );\n\n return system_settings_form($form);\n}", "title": "" }, { "docid": "f80210347be8f301bee72f54f064e534", "score": "0.5848399", "text": "function support_bar_admin_settings() {\n $form = array();\n\n $form['support_bar_enabled'] = array(\n '#title' => t('Enable Support Bar Display'),\n '#description' => t('Enable the display of the support bar. If disabled, it will not load.'),\n '#type' => 'checkbox',\n '#default_value' => variable_get('support_bar_enabled', 1),\n );\n\n $form['support_bar_phone_number'] = array(\n '#title' => t('Company Phone Number'),\n '#description' => t('Enter the phone number to the development/maintenance company that handles this website.'),\n '#type' => 'textfield',\n '#required' => TRUE,\n '#default_value' => variable_get('support_bar_phone_number', ''),\n );\n\n $form['support_bar_email_address'] = array(\n '#title' => t('Company Email Address'),\n '#description' => t('Enter the email address where all support queries should be sent.'),\n '#type' => 'email',\n '#required' => TRUE,\n '#default_value' => variable_get('support_bar_email_address', ''),\n );\n\n $form['support_bar_url'] = array(\n '#title' => t('Company URL'),\n '#description' => t('Enter the URL of the development/maintenance company the logo should link to.'),\n '#type' => 'textfield',\n '#required' => TRUE,\n '#default_value' => variable_get('support_bar_url', 'http://www.example.com'),\n );\n\n $form['support_bar_url'] = array(\n '#title' => t('Company URL'),\n '#description' => t('Enter the URL the development/maintenance company the logo should link to.'),\n '#type' => 'textfield',\n '#required' => TRUE,\n '#default_value' => variable_get('support_bar_url', 'http://www.example.com'),\n );\n\n $form['support_bar_image_fid'] = array(\n '#title' => t('Company Logo'),\n '#description' => t('Upload the image to be used as the company logo on the support bar. Small transparent png files work best, with an image resolution of under 150x80. Allowed extensions: png jpg jpeg.'),\n '#type' => 'managed_file',\n '#default_value' => variable_get('support_bar_image_fid', ''),\n '#upload_location' => 'public://support-bar',\n '#upload_validators' => array(\n 'file_validate_extensions' => array('png jpg jpeg'),\n ),\n );\n\n $form['#validate'][] = 'support_bar_validate';\n $form['#submit'][] = 'support_bar_submit';\n\n return system_settings_form($form);\n}", "title": "" }, { "docid": "a429c2a83ae0b16f914eb5d824724dcc", "score": "0.58420825", "text": "function form_init_data()\n {\n // Initialize the form fields\n\n if (!is_null($this->getMeetId()))\n $this->set_hidden_element_value('_swimmeetid', $this->getMeetId()) ;\n\n $this->set_hidden_element_value('_action', WPST_ACTION_EXPORT_ENTRIES) ;\n $this->set_element_value('File Format', WPST_FILE_FORMAT_SDIF_SD3_VALUE) ;\n $this->set_element_value('Zero Time Format', WPST_SDIF_USE_BLANKS_VALUE) ;\n $this->set_element_value('Events', $this->getEventIds()) ;\n }", "title": "" }, { "docid": "96ab7f14716ca15bbc80c084ece4db10", "score": "0.5836289", "text": "public function settings_form() {\n ee()->lang->loadfile( 'mx_auto_password' );\n ee()->load->model( 'channel_model' );\n\n // Create the variable array\n $vars = array(\n 'addon_name' => $this->addon_name,\n 'error' => FALSE,\n 'input_prefix' => __CLASS__,\n 'message' => FALSE,\n 'settings_form' => FALSE,\n // 'channel_data' => ee()->channel_model->get_channels()->result(),\n 'language_packs' => ''\n );\n ee()->load->library( 'table' );\n ee()->load->helper( 'form' );\n\n $vars['settings'] = $this->settings;\n $vars['settings_form'] = TRUE;\n\n if ( $new_settings = ee()->input->post( __CLASS__ ) ) {\n $vars['settings'] = $new_settings;\n $this->_saveSettingsToDB( $new_settings );\n $vars['message'] = ee()->lang->line( 'extension_settings_saved_success' );\n }\n\n\n\n $js = str_replace( '\"', '\\\"', str_replace( \"\\n\", \"\", ee()->load->view( 'form_settings', $vars, TRUE ) ) );\n\n return ee()->load->view( 'pass_settings', $vars, true );\n\n }", "title": "" }, { "docid": "5052f45e3965038d6787f8289c25d481", "score": "0.5834149", "text": "function form_init_data()\n {\n // Initialize the form fields\n\n if (!is_null($this->getMeetId()))\n $this->set_hidden_element_value('_swimmeetid', $this->getMeetId()) ;\n $this->set_hidden_element_value('_action', $this->getAction()) ;\n\n // Override age checks? Only available to admin\n\n if (current_user_can('edit_others_posts'))\n $this->set_element_value('Override Age Group and Participation Checks', false) ;\n else\n $this->set_hidden_element_value('Override Age Group and Participation Checks', false) ;\n }", "title": "" }, { "docid": "cfb79ecd974a294201d55a9e32c834ae", "score": "0.5824169", "text": "function form_init_data()\n {\n // Initialize the form fields\n\n $this->set_hidden_element_value('_swimmeetid', $this->getMeetId()) ;\n $this->set_hidden_element_value('_action', $this->getAction()) ;\n\n if (get_option(WPST_OPTION_OPT_IN_OPT_OUT_MODE) == WPST_PARTIAL)\n $this->set_element_value($this->getActionLabel() . ' Type', WPST_PARTIAL) ;\n else\n $this->set_element_value($this->getActionLabel() . ' Type', WPST_FULL) ;\n }", "title": "" }, { "docid": "e8334e3a32a1ceb6736105390006901a", "score": "0.582258", "text": "function _saveSettings() \r\n {\r\n global $_ARRAYLANG, $objDatabase;\r\n \r\n foreach ($_POST['settings'] as $name => $value) {\r\n if(is_array($value)) {\r\n $value = implode(',',$value);\r\n }\r\n $query = \"UPDATE \".DBPREFIX.\"module_\".$this->moduleTablePrefix.\"_settings\r\n SET value = '\".contrexx_addslashes($value).\"'\r\n WHERE name = '\".contrexx_addslashes($name).\"'\";\r\n \r\n $objResult = $objDatabase->Execute($query);\r\n }\r\n\r\n if (isset($_POST['settings']['headlinesStatus'])) {\r\n \\Cx\\Core\\Setting\\Controller\\Setting::init('Config', 'component','Yaml');\r\n $headLinesStatusIntval = intval($_POST['settings']['headlinesStatus']);\r\n if (!\\Cx\\Core\\Setting\\Controller\\Setting::isDefined('calendarheadlines')) {\r\n \\Cx\\Core\\Setting\\Controller\\Setting::add('calendarheadlines', $headLinesStatusIntval, 1, \\Cx\\Core\\Setting\\Controller\\Setting::TYPE_RADIO, '1:TXT_ACTIVATED,0:TXT_DEACTIVATED', 'component');\r\n } else {\r\n \\Cx\\Core\\Setting\\Controller\\Setting::set('calendarheadlines', $headLinesStatusIntval);\r\n \\Cx\\Core\\Setting\\Controller\\Setting::update('calendarheadlines');\r\n }\r\n }\r\n \r\n if ($objResult !== false) {\r\n $this->okMessage = $_ARRAYLANG['TXT_CALENDAR_SETTINGS_SUCCESSFULLY_EDITED'];\r\n } else {\r\n $this->errMessage = $_ARRAYLANG['TXT_CALENDAR_SETTINGS_CORRUPT_EDITED'];\r\n }\r\n }", "title": "" }, { "docid": "ea4f1961adf88b0a61934772ea05d6cb", "score": "0.5821202", "text": "function _form_section_mailbox_settings (&$form, &$form_state) {\n \n $form['erpal_crm_mailaction']['mailbox_settings'] = array (\n '#type' => 'fieldset',\n '#title' => t('Mailbox settings'),\n '#tree' => TRUE,\n '#collapsible' => TRUE,\n '#collapsed' => TRUE\n );\n \n $form['erpal_crm_mailaction']['mailbox_settings']['host'] = array (\n '#required' => TRUE,\n '#type' => 'textfield',\n '#title' => t('Host'),\n '#default_value' => Settings::get ('mailbox_settings', 'host', 'localhost'),\n '#size' => 20\n );\n \n $form['erpal_crm_mailaction']['mailbox_settings']['port'] = array (\n '#type' => 'textfield',\n '#required' => TRUE,\n '#title' => t('Port'),\n '#default_value' => Settings::get ('mailbox_settings', 'port', '143'),\n '#size' => 5\n );\n \n $form['erpal_crm_mailaction']['mailbox_settings']['inbox'] = array (\n '#type' => 'textfield',\n '#title' => t('Inbox folder name'),\n '#default_value' => Settings::get ('mailbox_settings', 'name', 'INBOX'),\n '#size' => 20\n );\n \n $form['erpal_crm_mailaction']['mailbox_settings']['tls'] = array (\n '#type' => 'radios',\n '#title' => t('Transport Layer Security'),\n '#options' => array(\n '/tls' => t('TLS'),\n '/notls' => t('No TLS'),\n ),\n '#default_value' => Settings::get ('mailbox_settings', 'tls', '/notls'),\n );\n \n $form['erpal_crm_mailaction']['mailbox_settings']['protocol'] = array (\n '#type' => 'radios',\n '#title' => t('Protocol'),\n '#options' => array(\n '/imap' => t('IMAP'),\n '/pop3' => t('POP3'),\n ),\n '#default_value' => Settings::get ('mailbox_settings', 'protocol', '/imap'),\n );\n \n $form['erpal_crm_mailaction']['mailbox_settings']['ssl'] = array (\n '#type' => 'radios',\n '#title' => t('Secure Sockets Layer'),\n '#options' => array(\n '' => t('No SSL'),\n '/ssl' => t('SSL'),\n ),\n '#default_value' => Settings::get ('mailbox_settings', 'ssl', ''),\n );\n \n $form['erpal_crm_mailaction']['mailbox_settings']['certificate'] = array (\n '#type' => 'radios',\n '#title' => t('Certificate'),\n '#options' => array(\n '/novalidate-cert' => t('Don\\'t validate certificate'),\n '/validate-cert' => t('Validate certificate'),\n ),\n '#default_value' => Settings::get ('mailbox_settings', 'certificate', '/novalidate-cert'),\n );\n \n $form['erpal_crm_mailaction']['mailbox_settings']['username'] = array (\n '#required' => TRUE,\n '#type' => 'textfield',\n '#title' => t('Username'),\n '#default_value' => Settings::get ('mailbox_settings', 'username', ''),\n '#size' => 20\n );\n\n $form['erpal_crm_mailaction']['mailbox_settings']['password'] = array (\n '#type' => 'password_confirm',\n '#size' => 20,\n '#description' => t('Leave blank if you want to use the old passwort setting.'),\n );\n \n return;\n}", "title": "" }, { "docid": "890f72a20cefcca26aa4164abd3e7ef5", "score": "0.581349", "text": "function ev_save_meta_box( $post_id ) {\n\n\tif( 'ev' != get_post_type( $post_id ) )\n return;\n\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )\n return;\n\n if (get_post_status($post_id) === 'auto-draft') {\n return;\n\t}\n\n $fields = [\n \t'ev_info__make',\n\t\t'ev_info__model',\n\t\t'ev_info__start-year',\n 'ev_info__end-year',\n\t\t//'ev_info__price-usd', //To be removed later\n 'ev_info__price-cad',\n // 'ev_info__price-euro', //To be removed later\n // 'ev_info__price-inr', //To be removed later\n\t\t'ev_info__url',\n 'ev_info__feature',\n 'ev_info__description',\n\t\t'ev_specs__seating',\n\t\t// 'ev_specs__voltage', //To be removed later\n\t\t'ev_specs__voltage-new',\n\t\t'ev_specs__body',\n\t\t'ev_specs__doors',\n \t'ev_specs__chargetime',\n // 'ev_specs__chargetime-new',\n\t\t'ev_specs__quickcharge',\n\t\t'ev_specs__batterytype',\n\t\t// 'ev_specs__maxspeed', //To be removed later\n\t\t'ev_specs__maxspeed-metric',\n\t\t// 'ev_specs__range', //To be removed later\n 'ev_specs__range-metric'\n ];\n\n\n\n\n\n foreach ( $fields as $field ) {\n if ( array_key_exists( $field, $_POST ) ) {\n update_post_meta( $post_id, $field, sanitize_text_field( $_POST[$field] ) );\n }\n \t}\n\n}", "title": "" }, { "docid": "834e3a8bae5e4c78c8186c57e453a375", "score": "0.58118314", "text": "function ctools_custom_content_type_edit_form_submit(&$form, &$form_state) {\n foreach (array_keys($form_state['plugin']['defaults']) as $key) {\n if (isset($form_state['values'][$key])) {\n $form_state['conf'][$key] = $form_state['values'][$key];\n }\n }\n}", "title": "" }, { "docid": "38283996dbf94dd926b7fcb7bceeee48", "score": "0.58116263", "text": "function gravity_http_settings_page() {\n\n\t\t//see if there is a form id in the querystring\n\t\t$form_id = RGForms::get(\"id\");\n\n\t\t$form = GFAPI::get_form($form_id);\n\n\t\tif ( ! empty( $_POST ) && check_admin_referer('gforms_save_http_settings', 'gforms_save_http_settings') ) {\n\n\t\t\t$form['http_request_settings']['form_http_url'] = rgpost('form_http_url');\n\t\t\t$form['http_request_settings']['http_request_type'] = rgpost('form_request_type');\n\t\t\t$form['http_request_settings']['date_updated'] = rgpost('date_updated');\n\t\t\t$form['http_request_settings']['http_request_active'] = rgpost('http_request_active');\n\n\t\t\tforeach ($form['fields'] as $idx => $field) {\n\n\t\t\t\tif ($field['inputs']) {\n\n\t\t\t\t\t$field['http_map'] = rgpost('field_'.$field['id'].'_map');\n\t\t\t\t\t$field['http_output'] = rgpost('field_'.$field['id'].'_serialize');\n\n\t\t\t\t\tforeach ($field['inputs'] as $iidx => $input) {\n\n\t\t\t\t\t\t$input_id = str_replace('.', '_', $input['id']);\n $input['http_map'] = rgpost('field_'.$input_id.'_map');\n $field->inputs[$iidx] = $input;\n\t\t\t\t\t\t//$form['fields'][$idx]['inputs'][$iidx]['http_map'] = rgpost('field_'.$input_id.'_map');\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t$field['http_map'] = rgpost('field_'.$field['id'].'_map');\n\n\t\t\t\t\tif ($field['choices']) {\n\n\t\t\t\t\t\t$field['value_output'] = rgpost('field_'.$field['id'].'_value_output');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$result = GFAPI::update_form($form);\n\t\t}\n\n\t\tGFFormSettings::page_header();\n\n\t\tinclude_once(GRAVITY_HTTP_PATH.'settings-screen.php');\n\n\t\tGFFormSettings::page_footer();\n\t}", "title": "" }, { "docid": "8bf4d5b418d853783055018d025de63a", "score": "0.58080876", "text": "function metamarks_options_subpanel() \n{\n\tglobal $marksdata, $filenotfound;\n\tif(!$filenotfound){\n\t$showMarkFlag = get_option('metamarks');\n\t$showMarkFlag = explode(\",\", $showMarkFlag);\n\tif(get_option('metamarks_css'))\n\t{\n\t\t$css=get_option('metamarks_css');\n\t\t$css=explode(\",\",$css);\n\t}\n\telse\n\t{\n\t\t$metamarks_frame_bg='white';\n\t\t$title_clr='white';\n\t\tadd_option('metamarks_css',$metamarks_frame_bg.\",\".$metamarks_frame_brd);\n\t}\n\tif(get_option('metamarks_state'))\n\t{\n\t\t$state=get_option('metamarks_state');\n\t\t$state=explode(\",\",$state);\n\t}\n\telse\n\t{\n\t\t$expanded=1;\n\t\t$download=1;\n\t\tadd_option('metamarks_state',$expanded.\",\".$download);\n\t}\n?>\n<div class=\"wrap\">\n <h2 id=\"write-post\">Metamarks Options</h2>\n <form method=\"post\" action=\"<?php echo $_SERVER['PHP_SELF']; ?>?page=metamarks/metamarks.php\">\n<h3>Select the bookmarking services you want to activate</h3>\n<?php \n\nforeach($marksdata as $key=>$md){\n\techo \"<input name='a\".($key+1).\"' type='checkbox' id='a\".($key+1).\"' value='1' \".ichecked($showMarkFlag, $key).\"' /> \".$md[0].\"<br/>\";\n}\n?>\n\t<input type=\"hidden\" name=\"metamarks_count\" value='<?php echo sizeof($marksdata);?>'/>\n <h3 id=\"meta_css\">Metamarks CSS</h3>\n Frame Background Color:&nbsp;<input type=\"text\" name=\"metamarks_frame_bg\" value=\"<?php echo $css[0];?>\" /> <br/>\n Frame border color&nbsp;<input type=\"text\" name=\"metamarks_frame_brd\" value=\"<?php echo $css[1];?>\" /> <br/>\n <br/>\n <h3 id=\"meta_state\">Metamarks Load State</h3>\n Load Expanded:&nbsp;<input type=\"checkbox\" name=\"expanded\" value=\"1\" <?php if($state[0]==1) {echo(\"checked\");}?> /> <br/>\n Show download message: &nbsp;<input type=\"checkbox\" name=\"download\" value=\"1\" <?php if($state[1]==1) {echo(\"checked\");}?> /> <br/>\n\t Show icons :&nbsp;<input type=\"checkbox\" name=\"textonly\" value=\"1\" <?php if($state[2]==1) {echo(\"checked\");}?> /> <br/> \nRollover enabled :&nbsp;<input type=\"checkbox\" name=\"rollover\" value=\"1\" <?php if($state[3]==1) {echo(\"checked\");}?> /> <br/> \n <input type=\"submit\" value=\"Update Metamarks\" name=\"Submit\" />\n </form>\n </div>\n<?php }\nelse {\n\techo \"The .ini file with the mark definitions was not found, or is unreadable.\";}\n}", "title": "" }, { "docid": "85f39751c54fff5c9a2fbea82727ab08", "score": "0.5807402", "text": "function form_init_data()\n {\n $this->set_hidden_element_value('_swimmeetid', $this->getMeetId()) ;\n $this->set_hidden_element_value('_action', WPST_ACTION_IMPORT_RESULTS) ;\n $this->set_element_value('Match Swimmers', WPST_MATCH_SWIMMER_ID) ;\n }", "title": "" }, { "docid": "aae55615510bd7ba47dc736c37c7647c", "score": "0.5805669", "text": "private function checkSettingsFields() {\n $required = $this->_registry->getObject('template')->createRequiredArray(['token', 'save']);\n $this->_val->setRequired($required);\n if (in_array('first_name', $required)) { $this->_val->matches('first_name', '/^[A-Za-z\\'\\.\\-]{2,20}$/i'); }\n if (in_array('last_name', $required)) { $this->_val->matches('last_name', '/^[A-Za-z\\'\\.\\-]{2,40}$/i'); }\n if (in_array('address', $required)) { $this->_val->matches('address', '/^[A-Za-z0-9\\',\\.#\\-\\s]{2,80}$/i'); }\n if (in_array('city', $required)) { $this->_val->matches('city', '/^[A-Za-z\\'\\.\\-\\s]{2,60}$/i'); }\n if (in_array('country', $required)) { $this->_val->removeTags('country'); }\n if (in_array('state', $required)) { $this->_val->removeTags('state'); }\n if (in_array('zip', $required)) { $this->_val->matches('zip', '/^(\\d{5}$)|(^\\d{5}\\-\\d{4})$/'); }\n $this->_submittedValues = array_map('trim', $this->_val->getSubmitted());\n if (!empty($required) && !empty($this->_submittedValues)) {\n $this->_sanitizedValues = array_map('trim', $this->_val->validateInput());\n $this->_errors = $this->_val->getErrors();\n }\n }", "title": "" }, { "docid": "d8786d35bf98cf13e781f0d3afb068e3", "score": "0.5804795", "text": "function wyz_claim_form_settings() {\n\t\tregister_setting( 'wyz_claim_settings', 'wyz_claim_should_be_business_owner' );\n\t\tregister_setting( 'wyz_claim_settings', 'wyz_claim_submission_price' );\n\t\tregister_setting( 'wyz_claim_settings', 'wyz_business_claiming' );\n\t}", "title": "" }, { "docid": "400b7fce75b6e0b5ec5f3be80ffef6d9", "score": "0.58029693", "text": "public function settings_page_callback()\n\t{\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<h2><?php _e( 'EU Cookie Law Compliance Message', 'EUCLC' ); ?></h2>\n\t\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t<?php settings_fields( 'EUCookieLawCompliance' ); ?>\n\t\t\t<?php do_settings_sections( 'euc_settings' ); ?>\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "6fa76d056dd28661be96220b0d52a6ef", "score": "0.5802125", "text": "public function onLoadSettingsPage()\n {\n $container = $this->getContainer();\n\n if (!$this->validatePermalinksSetting()) {\n return false;\n }\n\n // After user has saved the settings form\n if ($container->getRequest()->get('settings-updated')) {\n if ($this->registerStaticSubdirRoute()) {\n // Since we changed the route we need to re-initialize it\n $container->getRouter()->initRoutes();\n\n $this->getFlashBag()->add('notice', 'Settings saved');\n }\n }\n\n $this->validateVirtualPath();\n $this->validateRealPath();\n }", "title": "" }, { "docid": "f3a34ec84cc6a68469d9513daf3821e6", "score": "0.5796973", "text": "function wpg_admin_form() \n{\n global $wpg_options;\n\n // wp-greet optionen aus datenbank lesen\n $wpg_options = wpgreet_get_options();\n \n // get translation \n load_plugin_textdomain('wp-greet',false,dirname( plugin_basename( __FILE__ ) ) . \"/lang/\");\n \n // load possible form pages\n $wpdb =& $GLOBALS['wpdb'];\n $sql=\"SELECT id,post_title FROM \".$wpdb->prefix.\"posts WHERE post_type in ('page','post') and post_content like '%[wp-greet]%' order by id;\";\n $pagearr = $wpdb->get_results($sql);\n\n // filter translated posts or pages not to be displayed double in selection\n if ( defined('ICL_LANGUAGE_CODE') ) {\n $pagearr = wpcs_wpml_remove_translated_posts($pagearr);\n }\n // if this is a POST call, save new values\n if (isset($_POST['info_update'])) {\n $upflag=false;\n\n reset($wpg_options);\n $thispageoptions = array(\"wp-greet-mailreturnpath\", \"wp-greet-autofillform\",\n\t\t\t \"wp-greet-bcc\", \"wp-greet-imgattach\",\n\t\t\t \"wp-greet-default-title\", \"wp-greet-default-header\",\n\t\t\t \"wp-greet-default-footer\", \"wp-greet-imagewidth\",\n\t\t\t \"wp-greet-logging\", \"wp-greet-gallery\",\n\t\t\t \"wp-greet-formpage\", \"wp-greet-smilies\",\n\t\t\t \"wp-greet-usesmtp\", \"wp-greet-stampimage\",\n\t\t\t \"wp-greet-stamppercent\", \"wp-greet-onlinecard\", \n\t\t\t \"wp-greet-ocduration\", \"wp-greet-octext\",\n\t\t\t \"wp-greet-logdays\", \"wp-greet-carddays\", \n\t\t\t \"wp-greet-show-ngg-desc\",\"wp-greet-future-send\",\n\t\t\t \"wp-greet-multi-recipients\", \"wp-greet-staticsender\",\n\t\t\t \"wp-greet-tinymce\", \"wp-greet-offerresend\",\n\t\t\t \"wp-greet-external-link\",\"wp-greet-disable-css\",\n\t\t\t \"wp-greet-use-wpml-lang\",\"wp-greet-smtp-host\",\n\t\t\t \"wp-greet-smtp-port\", \"wp-greet-smtp-ssl\",\n\t\t\t \"wp-greet-smtp-user\", \"wp-greet-smtp-pass\");\n \n while (list($key, $val) = each($wpg_options)) {\n // for empty checkboxes\n if (!isset($_POST[$key])) {$_POST[$key]=0;}\n // save options if applicable\n if (in_array($key, $thispageoptions) and \n\t $wpg_options[$key] != $_POST[$key] ) {\n\t $wpg_options[$key] = stripslashes($_POST[$key]);\n\t $upflag=true;\n\t}\n }\n \n // save options and put message after update\n echo\"<div class='updated'><p><strong>\";\n\n // check email adresses\n if ( ! check_email($wpg_options['wp-greet-mailreturnpath']) and $wpg_options['wp-greet-mailreturnpath']!=\"\") {\n echo __('mailreturnpath is not valid (wrong format or no MX entry for domain).',\"wp-greet\"). \"<br />\";\n $upflag=false;\n }\n\n if ( ! check_email($wpg_options['wp-greet-staticsender']) and $wpg_options['wp-greet-staticsender']!=\"\") {\n echo __('static sender address is not valid (wrong format or no MX entry for domain).',\"wp-greet\"). \"<br />\";\n $upflag=false;\n }\n \n if ( ! check_email($wpg_options['wp-greet-bcc']) and $wpg_options['wp-greet-bcc']!=\"\") {\n echo __('bcc email adress is not valid (wrong format or no MX entry for domain).',\"wp-greet\"). \"<br />\";\n $upflag=false;\n }\n\n if ( $wpg_options['wp-greet-imagewidth'] < 0 or $wpg_options['wp-greet-imagewidth']>3200) {\n echo __('imagewidth not in range (0..3200).',\"wp-greet\"). \"<br />\";\n $upflag=false;\n }\n\n if ( $wpg_options['wp-greet-onlinecard'] == 1 and $wpg_options['wp-greet-ocduration'] > $wpg_options['wp-greet-carddays']) {\n echo __('Cards will be removed before fetch interval expires (Number of days an online card can be fetched > Number of days card entries are stored)',\"wp-greet\"). \"<br />\";\n $upflag=false;\n }\n\n if ($upflag) {\n wpgreet_set_options();\n echo __('Settings successfully updated',\"wp-greet\");\n } else\n echo __('You have to change a field to update settings.',\"wp-greet\");\n \n echo \"</strong></p></div>\";\n } \n\n?>\n\n<script type=\"text/javascript\">\n function wechsle_inline () {\n imga=document.getElementById('wp-greet-imgattach');\n usmtp=document.getElementById('wp-greet-usesmtp1');\n if (usmtp.checked == false) {\n\timga.checked = false;\n\timga.disabled = true;\n } else\n\timga.disabled=false;\n wechsle_smtp();\n wechsle_stamp();\n} \n\nfunction wechsle_stamp () {\n imga=document.getElementById('wp-greet-imgattach');\n imgb=document.getElementById('wp-greet-onlinecard');\n stamp=document.getElementById('wp-greet-stampimage');\n stamp.readOnly = ((imga.checked == false) && (imgb.checked == false));\n}\n\nfunction wechsle_onlinecard () {\n obja=document.getElementById('wp-greet-onlinecard');\n objb=document.getElementById('wp-greet-ocduration');\n objc=document.getElementById('wp-greet-octext');\n objb.readOnly = (obja.checked == false);\n objc.readOnly = (obja.checked == false);\n wechsle_stamp();\n}\n\nfunction wechsle_galerie () {\n obja=document.getElementById('wp-greet-gallery');\n objb=document.getElementById('wp-greet-show-ngg-desc');\n objc=document.getElementById('wp-greet-external-link');\n objb.readOnly = (obja.value == 'wp' || obja.value == '-');\n objc.readOnly = (obja.value != 'wp');\n} \n\nfunction wechsle_smtp () {\n usmtp=document.getElementById('wp-greet-usesmtp1'); \n obja=document.getElementById('wp-greet-smtp-host');\n objb=document.getElementById('wp-greet-smtp-port');\n objc=document.getElementById('wp-greet-smtp-ssl');\n objd=document.getElementById('wp-greet-smtp-user');\n obje=document.getElementById('wp-greet-smtp-pass');\n \n obja.readOnly = (usmtp.checked == false);\n objb.readOnly = (usmtp.checked == false);\n objc.disabled = (usmtp.checked == false);\n objd.readOnly = (usmtp.checked == false);\n obje.readOnly = (usmtp.checked == false);\n} \n</script>\n<div class=\"wrap\">\n <?php tl_add_supp(true); ?>\n <h2><?php echo __(\"wp-greet Setup\",\"wp-greet\") ?></h2>\n \n <div style=\"text-align:right;padding-bottom:10px;\">\n <a class=\"button-secondary thickbox\" href=\"../wp-content/plugins/wp-greet/wpg-admin-reschedule.php?height=350&amp;width=550&amp;fn=match\" ><?php _e(\"Reschedule future cards\",\"wp-greet\") ?></a>&nbsp;&nbsp;&nbsp;\n </div>\n\n <form name=\"wpgreetadmin\" method=\"post\" action='#'>\n <table class=\"optiontable\">\n <tr class=\"tr-admin\">\n <th scope=\"row\"><?php echo __('Gallery-Plugin',\"wp-greet\")?>:</th>\n <td><select id=\"wp-greet-gallery\" name=\"wp-greet-gallery\" size=\"1\" onchange=\"wechsle_galerie();\">\n <option value=\"-\" <?php if ($wpg_options['wp-greet-gallery']==\"-\") echo \"selected='selected'\";?>><?php _e('none','wp-greet');?></option>\n <option value=\"ngg\" <?php if ($wpg_options['wp-greet-gallery']==\"ngg\") echo \"selected='selected'\";?>>Nextgen/NextCellent Gallery</option>\n <option value=\"wp\" <?php if ($wpg_options['wp-greet-gallery']==\"wp\") echo \"selected='selected'\";?>>WordPress</option>\n </select> \n </td>\n </tr>\n\n <tr class=\"tr-admin\">\n <th scope=\"row\"><?php echo __('Form-Post/Page',\"wp-greet\")?>:</th>\n <td><select name=\"wp-greet-formpage\" size=\"1\">\n<?php \n$r = '';\n$o = '';\nforeach( $pagearr as $p ) {\n if ( $wpg_options['wp-greet-formpage'] == $p->id )\n $o = \"\\n\\t<option selected='selected' value='\".$p->id.\"'>\".$p->post_title.\"</option>\";\n else\n $r .= \"\\n\\t<option value='\".$p->id.\"'>\".$p->post_title.\"</option>\";\n}\n echo $o . $r.\"\\n\";\n?>\n </select></td></tr>\n \n\t <tr><th scope=\"row\"><?php echo __(\"Mailtransfermethod\",\"wp-greet\")?>:</th>\n <td>\n <input type=\"radio\" name=\"wp-greet-usesmtp\" id=\"wp-greet-usesmtp1\" value=\"1\" <?php if ($wpg_options['wp-greet-usesmtp']==\"1\") echo \"checked=\\\"checked\\\" \"; ?> onclick=\"wechsle_inline();\" />SMTP (class-phpmailer.php)\n\t <input type=\"radio\" name=\"wp-greet-usesmtp\" id=\"wp-greet-usesmtp2\" value=\"0\" <?php if ($wpg_options['wp-greet-usesmtp']==\"0\") echo \"checked=\\\"checked\\\" \"; ?> onclick=\"wechsle_inline();\" /> PHP mail() function </td></tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t <tr class=\"tr-admin\">\n <th scope=\"row\"><?php echo __('SMTP Server (hostname)',\"wp-greet\")?>:</th>\n <td><input id=\"wp-greet-smtp-host\" name=\"wp-greet-smtp-host\" type=\"text\" size=\"30\" maxlength=\"80\" value=\"<?php echo $wpg_options['wp-greet-smtp-host'] ?>\" /></td>\n </tr> \n <tr class=\"tr-admin\">\n <th scope=\"row\"><?php echo __('SMTP Port (default:25)',\"wp-greet\")?>:</th>\n <td><input id=\"wp-greet-smtp-port\" name=\"wp-greet-smtp-port\" type=\"text\" size=\"10\" maxlength=\"5\" value=\"<?php echo $wpg_options['wp-greet-smtp-port'] ?>\" /></td>\n </tr> \n \n <tr class=\"tr-admin\">\n <th scope=\"row\">&nbsp;</th>\n <td><input type=\"checkbox\" id=\"wp-greet-smtp-ssl\" name=\"wp-greet-smtp-ssl\" value=\"1\" <?php if ($wpg_options['wp-greet-smtp-ssl']==\"1\") echo \"checked=\\\"checked\\\"\"?> /> <b><?php echo __('SMTP use SSL?',\"wp-greet\")?></b></td>\n\t </tr>\n\n <tr class=\"tr-admin\">\n <th scope=\"row\"><?php echo __('SMTP Username',\"wp-greet\")?>:</th>\n <td><input id=\"wp-greet-smtp-user\" name=\"wp-greet-smtp-user\" type=\"text\" size=\"30\" maxlength=\"80\" value=\"<?php echo $wpg_options['wp-greet-smtp-user'] ?>\" /></td>\n </tr> \n\n <tr class=\"tr-admin\">\n <th scope=\"row\"><?php echo __('SMTP Password',\"wp-greet\")?>:</th>\n <td><input id=\"wp-greet-smtp-pass\" name=\"wp-greet-smtp-pass\" type=\"password\" size=\"30\" maxlength=\"80\" value=\"<?php echo $wpg_options['wp-greet-smtp-pass'] ?>\" /></td>\n </tr>\n\n\n \t\t <tr class=\"tr-admin\">\n <th scope=\"row\"><?php echo __('Static Senderaddress',\"wp-greet\")?>:</th>\n <td><input name=\"wp-greet-staticsender\" type=\"text\" size=\"30\" maxlength=\"80\" value=\"<?php echo $wpg_options['wp-greet-staticsender'] ?>\" /></td>\n </tr>\n \n <tr class=\"tr-admin\">\n <th scope=\"row\"><?php echo __('Mailreturnpath',\"wp-greet\")?>:</th>\n <td><input name=\"wp-greet-mailreturnpath\" type=\"text\" size=\"30\" maxlength=\"80\" value=\"<?php echo $wpg_options['wp-greet-mailreturnpath'] ?>\" /></td>\n </tr>\n \n <tr class=\"tr-admin\">\n <th scope=\"row\"><?php echo __('Send Bcc to',\"wp-greet\")?>:</th>\n <td><input name=\"wp-greet-bcc\" type=\"text\" size=\"30\" maxlength=\"80\" value=\"<?php echo $wpg_options['wp-greet-bcc'] ?>\" /></td> \n </tr>\n\n\t\t <tr class=\"tr-admin\">\n <th scope=\"row\">&nbsp;</th>\n <td><input type=\"checkbox\" name=\"wp-greet-multi-recipients\" value=\"1\" <?php if ($wpg_options['wp-greet-multi-recipients']==\"1\") echo \"checked=\\\"checked\\\"\"?> /> <b><?php echo __('Allow more than one recipient',\"wp-greet\")?></b></td>\n\t </tr>\n\n <tr class=\"tr-admin\">\n <th scope=\"row\">&nbsp;</th>\n <td>\n <input type=\"checkbox\" name=\"wp-greet-imgattach\" id=\"wp-greet-imgattach\" value=\"1\" <?php if ($wpg_options['wp-greet-imgattach']==\"1\") echo \"checked=\\\"checked\\\" \"; ?> onclick=\"wechsle_stamp();\" /> <b><?php echo __('Send image inline',\"wp-greet\")?></b></td>\n\t </tr>\n\n <tr class=\"tr-admin\">\n <th scope=\"row\">&nbsp;</th>\n <td>\n <input type=\"checkbox\" name=\"wp-greet-onlinecard\" id=\"wp-greet-onlinecard\" value=\"1\" <?php if ($wpg_options['wp-greet-onlinecard']==\"1\") echo \"checked=\\\"checked\\\" \"; ?> onclick=\"wechsle_onlinecard();\" /> <b><?php echo __('Fetch cards online',\"wp-greet\")?></b></td>\n\t </tr>\n\n <tr class=\"tr-admin\">\n <th scope=\"row\"><?php echo __('Number of days an online card can be fetched',\"wp-greet\")?>:</th>\n <td><input id=\"wp-greet-ocduration\" name=\"wp-greet-ocduration\" type=\"text\" size=\"10\" maxlength=\"5\" value=\"<?php echo $wpg_options['wp-greet-ocduration'] ?>\" /></td>\n </tr>\n\n <tr class=\"tr-admin\">\n <th scope=\"row\"><?php echo __('Online card HTML mail text','wp-greet'); ?>:\n <br />\n </th>\n <td><textarea id='wp-greet-octext' name='wp-greet-octext' cols='50'rows='4'><?php echo $wpg_options['wp-greet-octext']; ?></textarea>\n <img src=\"<?php echo site_url(PLUGINDIR . \"/wp-greet/tooltip_icon.png\");?>\" alt=\"tooltip\" title='<?php _e(\"HTML allowed, use %sender% for sendername, %sendermail% for sender email-address, %receiver% for receiver name, %link% for generated link, %duration% for time the link is valid\",\"wp-greet\");?>'/>\n </td>\n </tr>\n\n <tr class=\"tr-admin\">\n <th scope=\"row\"><?php echo __('Fixed image width',\"wp-greet\")?>:</th>\n <td><input name=\"wp-greet-imagewidth\" type=\"text\" size=\"10\" maxlength=\"5\" value=\"<?php echo $wpg_options['wp-greet-imagewidth'] ?>\" /></td>\n </tr>\n\n\n <tr class=\"tr-admin\">\n <th scope=\"row\"><?php echo __('Add stamp image',\"wp-greet\")?>:</th>\n <td><input name=\"wp-greet-stampimage\" id=\"wp-greet-stampimage\" type=\"text\" size=\"40\" maxlength=\"60\" value=\"<?php echo $wpg_options['wp-greet-stampimage'] ?>\" />\n <img src=\"<?php echo site_url(PLUGINDIR . \"/wp-greet/tooltip_icon.png\");?>\" alt=\"tooltip\" title='<?php _e(\"leave empty for no stamp, path must be relative to wordpress directory, e.g. wp-content/plugins/wp-greet/defaultstamp.jpg\",\"wp-greet\");?>'/>\n </td>\n </tr>\n\n <tr class=\"tr-admin\">\n <th scope=\"row\"><?php echo __('Stampwidth in % of imagewidth',\"wp-greet\")?>:</th>\n <td><input name=\"wp-greet-stamppercent\" id=\"wp-greet-stamppercent\" type=\"text\" size=\"5\" maxlength=\"3\" value=\"<?php echo $wpg_options['wp-greet-stamppercent'] ?>\" /></td>\n </tr>\n\n <tr class=\"tr-admin\">\n <th scope=\"row\">&nbsp;</th>\n <td><input type=\"checkbox\" name=\"wp-greet-tinymce\" value=\"1\" <?php if ($wpg_options['wp-greet-tinymce']==\"1\") echo \"checked=\\\"checked\\\"\"?> /> <b><?php echo __('Use TinyMCE editor',\"wp-greet\")?></b></td>\n\t </tr>\n\t \n\t <tr class=\"tr-admin\">\n <th scope=\"row\">&nbsp;</th>\n <td><input type=\"checkbox\" id=\"wp-greet-external-link\" name=\"wp-greet-external-link\" value=\"1\" <?php if ($wpg_options['wp-greet-external-link']==\"1\") echo \"checked=\\\"checked\\\"\"?> /> <b><?php echo __('Use external link from WordPress media',\"wp-greet\")?></b></td>\n\t </tr>\n\t \n <tr class=\"tr-admin\">\n <th scope=\"row\">&nbsp;</th>\n <td><input type=\"checkbox\" id=\"wp-greet-show-ngg-desc\" name=\"wp-greet-show-ngg-desc\" value=\"1\" <?php if ($wpg_options['wp-greet-show-ngg-desc']==\"1\") echo \"checked=\\\"checked\\\"\"?> /> <b><?php echo __('Use NGG/NCG data for image description',\"wp-greet\")?></b></td>\n\t </tr>\n\t \n <tr class=\"tr-admin\">\n <th scope=\"row\">&nbsp;</th>\n <td><input type=\"checkbox\" name=\"wp-greet-smilies\" value=\"1\" <?php if ($wpg_options['wp-greet-smilies']==\"1\") echo \"checked=\\\"checked\\\"\"?> /> <b><?php echo __('Enable Smileys on greetcard form',\"wp-greet\")?></b></td>\n\t </tr>\n\t \n\t <tr class=\"tr-admin\">\n <th scope=\"row\">&nbsp;</th>\n <td><input type=\"checkbox\" name=\"wp-greet-future-send\" value=\"1\" <?php if ($wpg_options['wp-greet-future-send']==\"1\") echo \"checked=\\\"checked\\\"\"?> /> <b><?php echo __('Allow sending cards in the future',\"wp-greet\")?></b></td>\n\t </tr>\n\t \n\n <tr class=\"tr-admin\">\n <th scope=\"row\">&nbsp;</th>\n <td><input type=\"checkbox\" name=\"wp-greet-autofillform\" value=\"1\" <?php if ($wpg_options['wp-greet-autofillform']==\"1\") echo \"checked=\\\"checked\\\"\"?> /> <b><?php echo __('Use informations from profile',\"wp-greet\")?></b></td>\n </tr>\n \n \t\t <tr class=\"tr-admin\">\n <th scope=\"row\">&nbsp;</th>\n <td><input type=\"checkbox\" name=\"wp-greet-offerresend\" value=\"1\" <?php if ($wpg_options['wp-greet-offerresend']==\"1\") echo \"checked=\\\"checked\\\"\"?> /> <b><?php echo __('Offer \\'send again\\'-link ',\"wp-greet\")?></b></td>\n </tr>\n \n <tr class=\"tr-admin\"> \n <th scope=\"row\">&nbsp;</th>\n <td><input type=\"checkbox\" name=\"wp-greet-logging\" value=\"1\" <?php if ($wpg_options['wp-greet-logging']==\"1\") echo \"checked=\\\"checked\\\"\"?> /> <b><?php echo __('enable logging',\"wp-greet\")?></b></td>\n </tr>\n\n <tr class=\"tr-admin\"> \n <th scope=\"row\">&nbsp;</th>\n <td><input type=\"checkbox\" name=\"wp-greet-disable-css\" value=\"1\" <?php if ($wpg_options['wp-greet-disable-css']==\"1\") echo \"checked=\\\"checked\\\"\"?> /> <b><?php echo __('disable wp-greet css rules',\"wp-greet\")?></b></td>\n </tr>\n<?php\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t /*\n <tr class=\"tr-admin\"> \n <th scope=\"row\">&nbsp;</th>\n <td><input type=\"checkbox\" name=\"wp-greet-use-wpml-lang\" value=\"1\" <?php if ($wpg_options['wp-greet-use-wpml-lang']==\"1\") echo \"checked=\\\"checked\\\"\"?> /> <b><?php echo __('Show form in gallery language (WPML only)',\"wp-greet\")?></b></td>\n </tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t */\n?>\n <tr class=\"tr-admin\">\n <th scope=\"row\"><?php echo __('Default mail subject',\"wp-greet\")?>:</th>\n <td><input name=\"wp-greet-default-title\" type=\"text\" size=\"30\" maxlength=\"80\" value=\"<?php echo $wpg_options['wp-greet-default-title'] ?>\" /></td> \n </tr>\n\n\t <tr class=\"tr-admin\">\n <th scope=\"row\"><?php echo __('Default mail header','wp-greet'); ?>:</th>\n <td><textarea name='wp-greet-default-header' cols='50'rows='4'><?php echo $wpg_options['wp-greet-default-header']; ?></textarea>\n <img src=\"<?php echo site_url(PLUGINDIR . \"/wp-greet/tooltip_icon.png\");?>\" alt=\"tooltip\" title='<?php _e(\"HTML allowed, use %sender% for sendername, %sendermail% for sender email-address, %receiver% for receiver name, %link% for generated link, %duration% for time the link is valid\",\"wp-greet\");?>'/>\n </td>\n </tr>\n\n\t <tr class=\"tr-admin\">\n <th scope=\"row\"><?php echo __('Default mail footer','wp-greet'); ?>:</th>\n <td><textarea name='wp-greet-default-footer' cols='50'rows='4'><?php echo $wpg_options['wp-greet-default-footer']; ?></textarea>\n <img src=\"<?php echo site_url(PLUGINDIR . \"/wp-greet/tooltip_icon.png\");?>\" alt=\"tooltip\" title='<?php _e(\"HTML allowed, use %sender% for sendername, %sendermail% for sender email-address, %receiver% for receiver name, %link% for generated link, %duration% for time the link is valid\",\"wp-greet\");?>'/>\n </td>\n </tr>\n \n <tr class=\"tr-admin\">\n <th scope=\"row\"><?php echo __('Number of days log entries are stored',\"wp-greet\")?>:</th>\n <td><input id=\"wp-greet-logdays\" name=\"wp-greet-logdays\" type=\"text\" size=\"10\" maxlength=\"5\" value=\"<?php echo $wpg_options['wp-greet-logdays'] ?>\" /></td>\n </tr>\n\n <tr class=\"tr-admin\">\n <th scope=\"row\"><?php echo __('Number of days card entries are stored',\"wp-greet\")?>:</th>\n <td><input id=\"wp-greet-carddays\" name=\"wp-greet-carddays\" type=\"text\" size=\"10\" maxlength=\"5\" value=\"<?php echo $wpg_options['wp-greet-carddays'] ?>\" /></td>\n </tr>\n\n </table>\n <div class='submit'>\n <input type='submit' name='info_update' value='<?php _e('Update options',\"wp-greet\"); ?> »' />\n </div>\n </form>\n <script type=\"text/javascript\">wechsle_galerie();wechsle_inline (); wechsle_onlinecard();wechsle_stamp();</script></div>\n<?php\n}", "title": "" }, { "docid": "60ecab7b319a732c1106329f4c8ac221", "score": "0.5794462", "text": "function mmRegister_general_settings() \r\n\t\t{\r\n\t\r\n\t\t\t$this->plugin_settings_tabs[$this->general_settings_key] = __('General', 'wpytp');\r\n\t\r\n\t\t\tregister_setting( \r\n\t\t\t\t$this->general_settings_key, // A settings group name. Must exist prior to the register_setting call. This must match the group name in settings_fields()\r\n\t\t\t\t$this->general_settings_key // The name of an option to sanitize and save. \r\n\t\t\t);\r\n\t\t\r\n\t\t\t// register the section\r\n\t\t\tadd_settings_section( \r\n\t\t\t\t'section_general',\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ID to identify this section and to register options\r\n\t\t\t\t__('PlayPops for WordPress Settings', 'wpytp'), // Title to be displayed on the administration page\r\n\t\t\t\tarray( &$this, 'mmSection_General_Desc' ), \t\t\t// Callback used to render the description of the section\r\n\t\t\t\t$this->general_settings_key );\t\t\t\t\t\t\t\t\t// Page on which to add this section of options\r\n\t\t\t\r\n\t\t\t// -------------------------------------------\r\n\t\t\t// Fields\r\n\t\t\t// --------------------------------------------\r\n\t\t\t// youtube api secret\r\n\t\t\tadd_settings_field( \r\n\t\t\t\t'playpops_youtube_key', \t\t\t\t\t\t\t\t\t\t\t\t\t// id: name of the array index\r\n\t\t\t\t__('Playpops API Key:', 'wpytp'), \t\t\t\t\t\t\t\t\t// title: label\r\n\t\t\t\tarray( &$this, 'mmField_Playpops_Key' ), \t\t\t\t\t// callback: funtion\r\n\t\t\t\t$this->general_settings_key, 'section_general' ); // page: The menu page on which to display this field.\r\n\t\t\t\t\r\n\t\t\t// facebook page url\r\n\t\t\tadd_settings_field( \r\n\t\t\t\t'playpops_url', \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// name of the array index\r\n\t\t\t\t__('Facebook Page Url:', 'wpytp'), \t\t\t\t\t\t\t\t// title label\r\n\t\t\t\tarray( &$this, 'mmField_Playpops_Url' ), \t\t\t\t\t// callback funtion\r\n\t\t\t\t$this->general_settings_key, 'section_general' ); // The menu page on which to display this field.\r\n\t\r\n\t\t\t// header custom color\r\n\t\t\tadd_settings_field( \r\n\t\t\t\t'playpops_header_color', \r\n\t\t\t\t__('Custom Header Color:', 'wpytp'), \r\n\t\t\t\tarray( &$this, 'mmField_Playpops_Header_Color' ), \r\n\t\t\t\t$this->general_settings_key, 'section_general' );\r\n\t\r\n\t\t\t// custom header\r\n\t\t\tadd_settings_field( \r\n\t\t\t\t'playpops_header', \r\n\t\t\t\t__('Custom Header:', 'wpytp') , \r\n\t\t\t\tarray( &$this, 'mmField_Playpops_Header' ), \r\n\t\t\t\t$this->general_settings_key, 'section_general' );\r\n\t\r\n\t\t\t// skip message\r\n\t\t\tadd_settings_field( \r\n\t\t\t\t'playpops_skip_message', \r\n\t\t\t\t__('Custom Skip Message:', 'wpytp') , \r\n\t\t\t\tarray( &$this, 'mmField_Playpops_Skip_Message' ), \r\n\t\t\t\t$this->general_settings_key, 'section_general' );\r\n\t\r\n\t\t\t// transparency\r\n\t\t\tadd_settings_field( \r\n\t\t\t\t'playpops_transparency', \r\n\t\t\t\t__('Popup Transparency:','wpytp') , \r\n\t\t\t\tarray( &$this, 'mmField_Playpops_Transparency' ), \r\n\t\t\t\t$this->general_settings_key, 'section_general' );\r\n\t\t\t\t\r\n\t\t\t// popup type\r\n\t\t\tadd_settings_field( \r\n\t\t\t\t'playpops_popuptype', \r\n\t\t\t\t__('Popup Type:', 'wpytp') , \r\n\t\t\t\tarray( &$this, 'mmField_Playpops_Popuptype' ), \r\n\t\t\t\t$this->general_settings_key, 'section_general' );\r\n\t\t\t\t\r\n\t\t\t// skip message\r\n\t\t\tadd_settings_field( \r\n\t\t\t\t'playpops_sharemsg', \r\n\t\t\t\t__('Custom Share Message:', 'wpytp') , \r\n\t\t\t\tarray( &$this, 'mmField_Playpops_Sharemsg' ), \r\n\t\t\t\t$this->general_settings_key, 'section_general' );\r\n\t\r\n\t\t\t// like or share\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "045f85764a9649d9815c89a6dbe19141", "score": "0.57932186", "text": "function socialmedia_panes_pane_edit_form_submit(&$form, &$form_state) {\n foreach (array_keys($form_state['plugin']['defaults']) as $key) {\n if (isset($form_state['values'][$key])) {\n $form_state['conf'][$key] = $form_state['values'][$key];\n }\n }\n}", "title": "" }, { "docid": "890d6358bc1cd08dd8caeaea8911682d", "score": "0.57896096", "text": "function worx_blog_admin_settings_form() {\n $form = array();\n\n $form['blog_list'] = array(\n '#type' => 'select',\n '#title' => t('Blog\\'s List Template'),\n '#options' => array(\n 'worx_blog_list_template_one' => t('Template One'),\n 'worx_blog_list_template_two' => t('Template Two'),\n 'worx_blog_list_template_three' => t('Template Three'),\n ),\n '#default_value' => variable_get('worx_blog_list_template', 'worx_blog_list_template_one'),\n '#required' => TRUE,\n );\n $form['blog_node'] = array(\n '#type' => 'select',\n '#title' => t('Blog\\'s Node Template'),\n '#options' => array(\n 'worx_blog_node_template_one' => t('Template One'),\n 'worx_blog_node_template_two' => t('Template Two'),\n 'worx_blog_node_template_three' => t('Template Three'),\n ),\n '#default_value' => variable_get('worx_blog_node_template', 'worx_blog_node_template_one'),\n '#required' => TRUE,\n );\n $form['blog_vocab'] = array(\n '#type' => 'select',\n '#title' => t('Blog\\'s Vocab Template'),\n '#options' => array(\n 'worx_blog_vocab_template_one' => t('Template One'),\n 'worx_blog_vocab_template_two' => t('Template Two'),\n 'worx_blog_vocab_template_three' => t('Template Three'),\n ),\n '#default_value' => variable_get('worx_blog_vocab_template', 'worx_blog_vocab_template_one'),\n '#required' => TRUE,\n );\n $form['blog_read_all_path'] = array(\n '#type' => 'textfield',\n '#title' => t('Blog\\'s Block\\'s Read All Link Path'),\n '#default_value' => variable_get('worx_blog_read_all_path', ''),\n );\n $form['blog_read_all_text'] = array(\n '#type' => 'textfield',\n '#title' => t('Blog\\'s Block\\'s Read All Link Text'),\n '#default_value' => variable_get('worx_blog_read_all_text', ''),\n );\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n '#submit' => array('worx_blog_admin_settings_form_submit'),\n );\n\n return $form;\n}", "title": "" }, { "docid": "47bcb25188e77d3430234599812c29cb", "score": "0.5783648", "text": "function email_settings()\n {\n $appointment_email_recipient = $this->get_setting('appointment_email_recipient')->setting_value;\n // Email content.\n $appointment_patient_confirmation = $this->get_setting('appointment_patient_confirmation')->setting_value;\n $appointment_admin_notification = $this->get_setting('appointment_admin_notification')->setting_value;\n // Email Subject.\n $appointment_patient_confirmation_subject = $this->get_setting('appointment_patient_confirmation_subject');\n $appointment_admin_notification_subject = $this->get_setting('appointment_admin_notification_subject')->setting_value;\n\n $data['appointment_email_recipient'] = set_value('appointment_email_recipient', $appointment_email_recipient);\n\n $data['appointment_patient_confirmation'] = set_value('appointment_patient_confirmation', $appointment_patient_confirmation);\n $data['appointment_admin_notification'] = set_value('appointment_admin_notification', $appointment_admin_notification);\n\n $data['appointment_admin_notification_subject'] = set_value('appointment_admin_notification_subject', $appointment_admin_notification_subject);\n $data['appointment_patient_confirmation_subject'] = set_value('appointment_patient_confirmation_subject', $appointment_patient_confirmation_subject);\n\n $this->require_validation();\n\n $this->form_validation->set_rules('appointment_email_recipient', 'Email Recipient', 'required|valid_emails');\n $this->form_validation->set_rules('appointment_patient_confirmation', 'Patient Email', 'required');\n $this->form_validation->set_rules('appointment_patient_confirmation_subject', 'Patient email subject', 'required');\n $this->form_validation->set_rules('appointment_admin_notification', 'Admin email', 'required');\n $this->form_validation->set_rules('appointment_admin_notification_subject', 'Admin email subject', 'required');\n\n if ($this->input->post('submit') == 'Save' || $this->isAjax())\n {\n if ($this->form_validation->run() && $this->m_settings->save_settings($data))\n {\n if ($this->isAjax())\n {\n echo \"1\";\n exit();\n }\n \n $this->session->set_flashdata('message', 'Settings saved!');\n\n redirect ('admin/appointment/email_settings');\n }\n }\n \n $this->view_data['content'] = 'admin/appointment/email_settings';\n //parse template\n $this->view_data = array_merge($this->view_data, $data);\n\n $this->parser->parse('admin/template', $this->view_data);\n }", "title": "" }, { "docid": "d753e48b59f46aef675ceb4188c28b87", "score": "0.5780755", "text": "function init_manager_admin_page()\r{\r $form_path = path_join(WP_PLUGIN_URL, basename(dirname(__FILE__)) . \"/warManagerFunctions.php\");\r\r if (!get_option('wmanager_limit'))\r $limit = 45;\r else\r $limit = get_option('wmanager_limit');\r\r ?>\r <div style=\"width: 95%; padding: 10px; margin: 10px;\">\r <h1>War Manager Settings</h1>\r\r <form action=\"<?= $form_path ?>\" method=\"post\" id=\"wmanager-settings-form-admin\">\r <input type='hidden' name='values_changed' value='Y'>\r <div id=\"form_input_fields\">\r <input type=\"text\" name=\"wmanager_limit\" id=\"wmanager_limit\" value=\"<?= $limit ?>\">\r </div>\r <span\r class=\"submit-btn\">\r <?php echo get_submit_button('Save Settings', 'button-primary', 'wmanager_submit', '', ''); ?></span><br><br>\r <a class=\"button button-primary\" href=\"themes.php?page=war-manager\" type=\"button\" id=\"cancel_changes\">Cancel\r Changes</a>\r <?php do_settings_sections('wmanager_setting_options');\r settings_fields('wmanager_setting_options'); ?>\r </form>\r <div id=\"success_tooltip\" style=\"display:none;\">Saved!</div>\r </div>\r<?php\r}", "title": "" }, { "docid": "13f516851fc1d043cb183d95165c82b0", "score": "0.57801926", "text": "function settings_update(){\r\r\n\t\t// override this\r\r\n\t\t// setting type\r\r\n\t\tswitch($_POST['setting_form']){\r\r\n\t\t\tcase 'box':\r\r\n\t\t\t// from box\t\r\r\n\t\t\tbreak;\r\r\n\t\t\tdefault:\r\r\n\t\t\tcase 'main':\r\r\n\t\t\t// form main\r\r\n\t\t\tbreak;\r\r\n\t\t}\r\r\n\t\t// return\r\r\n\t\treturn false;\r\r\n\t}", "title": "" }, { "docid": "cb7d03738133c72ad544ec22ca27a76e", "score": "0.577927", "text": "function diy_save_post( $post_id ) {\n global $post, $new_meta_boxes;\n\n // Stop WP from clearing custom fields on autosave\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)\n return;\n\n // Prevent quick edit from clearing custom fields\n if (defined('DOING_AJAX') && DOING_AJAX)\n return;\n\n // Check some permissions\n if ( isset($_POST['post_type']) && 'page' == $_POST['post_type'] ) {\n if ( !current_user_can( 'edit_page', $post_id ))\n return $post_id;\n } else {\n if ( !current_user_can( 'edit_post', $post_id ))\n return $post_id;\n }\n\n\n // print var_export($_POST,true);\n\n // go through each metabox definition to see if one of them applies to this page\n $meta_to_save = array();\n foreach ($this->forms as $key => $form) {\n if ($form['#type'] == 'metabox' && isset($form['#post_types']) && is_array($form['#post_types'])) {\n foreach ($form['#post_types'] as $post_type) {\n if (is_object($post) && $post_type == $post->post_type) {\n $meta_to_save[] = $key;\n }\n }\n }\n }\n // print var_export( $meta_to_save,true);\n\n\n // Go through each group in the metabox\n foreach( $meta_to_save as $meta) {\n\n // Get the post data for this field group\n if (isset($_POST[$meta])) {\n $data = $_POST[$meta];\n } else {\n $data = \"\";\n }\n\n\n\n self::suggest_fix($data);\n if(get_post_meta($post_id, $meta) == \"\") {\n add_post_meta($post_id, $meta, $data, true);\n } elseif ($data != get_post_meta($post_id, $meta, true)) {\n update_post_meta($post_id, $meta, $data);\n } elseif($data == \"\") {\n delete_post_meta($post_id, $meta, get_post_meta($post_id, $meta, true));\n }\n\n self::save_expanded($meta, $data,$this->forms,$post_id);\n\n } // end foreach\n\n }", "title": "" }, { "docid": "20a8b8680daacae39b416ed04eba8c4e", "score": "0.57750654", "text": "function iisp_fields_settings($tab = '') {\n $output = '';\n switch ($tab) {\n case 'create':\n $build['iisp_fields_settings_create'] = drupal_get_form('iisp_fields_settings_form');\n\t \n\t $output = drupal_render($build);\n\t break;\n default:\n\t\n $output .= '<ul class=\"action-links\"><li>'.l(t('Add field settings'), 'admin/iisp_profiler/field_settings/create', array('html'=>true, 'attributes' => array('class' => array('btn', 'btn-sm', 'btn-success')))).\"</li></ul>\";\n\t $build['iisp_fields_settings_list'] = drupal_get_form('iisp_fields_settings_list_form');\n $output .= drupal_render($build);\n\t \n }\n return $output;\n\n}", "title": "" }, { "docid": "3e712844e68b2f21da57c26c7f587ec5", "score": "0.5774353", "text": "function yz_account_save_settings() {\r\n if ( isset( $_POST['field_ids'] ) ) {\r\n return;\r\n }\r\n\r\n // if its not Profile Settings go out.\r\n if ( isset( $_POST['action'] ) && 'youzer_profile_settings_save_data' == $_POST['action'] ) {\r\n\r\n // Check Nonce Security\r\n check_admin_referer( 'yz_nonce_security', 'security' );\r\n\r\n // Before Save Settings Action.\r\n do_action( 'youzer_before_save_user_settings', $_POST );\r\n\r\n // Get Form Data\r\n $data = $_POST;\r\n\r\n unset( $data['security'], $data['action'] );\r\n \r\n $die = isset( $_POST['die'] ) ? true : false;\r\n\r\n // Delete Photo\r\n if ( isset( $data['delete_photo'] ) && ! empty( $data['delete_photo'] ) ) {\r\n $die = isset( $data['die_after_delete'] ) ? true : false;\r\n yz_account_delete_photo( $data['delete_photo'], $die );\r\n }\r\n\r\n // Call Update Profile Settings Function\r\n if ( isset( $data['youzer_options'] ) ) {\r\n yz_account_save_profile_settings( $data['youzer_options'] );\r\n }\r\n\r\n // Save Notification Settings\r\n if ( isset( $data['youzer_notifications'] ) ) {\r\n yz_account_save_notifications_settings( $data['youzer_notifications'] );\r\n }\r\n\r\n // Save Skills\r\n if ( isset( $data['yz_data']['yz-skills-data'] ) ) {\r\n yz_account_save_items(\r\n array(\r\n 'option_name' => 'youzer_skills',\r\n 'max_items' => 'yz_wg_max_skills',\r\n 'items' => isset( $data['youzer_skills'] ) ? $data['youzer_skills'] : null,\r\n 'data_keys' => array( 'title', 'barpercent' )\r\n )\r\n );\r\n }\r\n\r\n // Save Services.\r\n if ( isset( $data['yz_data']['yz-services-data'] ) ) {\r\n yz_account_save_items(\r\n array(\r\n 'option_name' => 'youzer_services',\r\n 'max_items' => 'yz_wg_max_services',\r\n 'items' => isset( $data['youzer_services'] ) ? $data['youzer_services'] : null,\r\n 'data_keys' => array( 'title' )\r\n )\r\n );\r\n }\r\n\r\n // Save Portfolio\r\n if ( isset( $data['yz_data']['yz-portfolio-data'] ) ) {\r\n yz_account_save_items(\r\n array(\r\n 'option_name' => 'youzer_portfolio',\r\n 'items' => isset( $data['youzer_portfolio'] ) ? $data['youzer_portfolio'] : null,\r\n 'max_items' => 'yz_wg_max_portfolio_items',\r\n 'data_keys' => array( 'original', 'thumbnail' )\r\n ),\r\n $die\r\n );\r\n }\r\n\r\n // Save SlideShow\r\n if ( isset( $data['yz_data']['yz-slideshow-data'] ) ) {\r\n yz_account_save_items(\r\n array(\r\n 'option_name' => 'youzer_slideshow',\r\n 'items' => isset( $data['youzer_slideshow'] ) ? $data['youzer_slideshow'] : null,\r\n 'max_items' => 'yz_wg_max_slideshow_items',\r\n 'data_keys' => array( 'original', 'thumbnail' )\r\n ),\r\n $die\r\n );\r\n }\r\n\r\n // After Save Settings Action.\r\n do_action( 'youzer_after_save_user_settings', $data );\r\n\r\n\r\n if ( ! $die ) {\r\n // Redirect.\r\n yz_account_redirect( 'success', __( 'Changes saved.', 'youzer' ) );\r\n }\r\n \r\n }\r\n\r\n}", "title": "" }, { "docid": "c0954462ddd723cb00e524a6d8e486d3", "score": "0.5770394", "text": "function rcw_savesettings_widgetonesettings() \r\n{\r\n\tif(isset($_POST['rcw_currencysettings_submit']))\r\n\t{\r\n\t\t$rcw = get_option('rcw_settings');\r\n\t\r\n\t\t$rcw['widgetone']['title'] = $_POST['rcw_title'];\r\n\t\t\r\n\t\tif(update_option('rcw_settings',$rcw))\r\n\t\t{\r\n\t\t\trcw_mes('Success','Your post creation settings have been saved and will apply to all new product posts you create from here on.');\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\trcw_err('Failed','There was a problem updating the Wordpress options table with your setttings, please try again then seek help.');\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "677fd608b85aadc2d2cb15b7c06f3c5a", "score": "0.5770158", "text": "function easyrec_admin_settings_form($form_state) {\n $form['account'] = array(\n '#type' => 'fieldset',\n '#title' => t('easyrec settings'), \n '#description' => t('To get started go to the <a href=\"@easyrec\">easyrec webpage</a> and register a user so you can create a tenant and get an API key. <br /> Alternatively, you can also <a href=\"@easyrecSourceforge\">run your own easyrec server</a>.', array('@easyrec' => 'http://easyrec.org/', '@easyrecSourceforge' => 'http://sourceforge.net/projects/easyrec/')),\n ); \n\n $form['account']['easyrec_apiKey'] = array(\n '#title' => t('easyrec Api Key'),\n '#type' => 'textfield',\n '#default_value' => variable_get('easyrec_apiKey', ''),\n '#size' => 45,\n '#maxlength' => 45,\n '#required' => TRUE,\n '#description' => t('Your API key allows you to access easyrec services. If you dont have an API key you can obtain one from the <a href=\"@easyrec\">easyrec webpage</a> or your own server\\'s admin tool.', array('@easyrec' => 'http://easyrec.org/')),\n ); \n\n $form['account']['easyrec_tenantId'] = array(\n '#title' => t('easyrec tenantId'),\n '#type' => 'textfield',\n '#default_value' => variable_get('easyrec_tenantId', ''),\n '#size' => 45,\n '#maxlength' => 45,\n '#required' => TRUE,\n '#description' => t('The easyrec tenant id identifies your shop. Note: You can have multiple shops with the same API key. If you dont have a tenant id you can obtain one from the <a href=\"@easyrec\">easyrec webpage</a> or your own server\\'s admin tool.', array('@easyrec' => 'http://easyrec.org/')),\n ); \n\n $form['account']['easyrec_url'] = array(\n '#title' => t('easyrec URL'),\n '#type' => 'textfield',\n '#default_value' => variable_get('easyrec_url', 'http://demo.easyrec.org:8080/'),\n '#size' => 45,\n '#maxlength' => 255,\n '#required' => TRUE,\n '#description' => t('Just change this value if you <a href=\"@easyrecSourceforge\">installed your own easyrec server</a>. If you are not sure what this is use \"http://demo.easyrec.org:8080/\".', array('@easyrecSourceforge' => 'http://sourceforge.net/projects/easyrec/')),\n ); \n\n $form['drawingcallback'] = array(\n '#type' => 'fieldset',\n '#title' => t('drawingcallback settings'), \n '#description' => t('Here you can create your own <a href=\"@easyrecJsDoc\">drawing callback</a>. A drawing callback draws recommendations retrieved from the easyrec server in JSON. <br />Note: This function will not be used unless it is EXPLICITLY selected in the recommendation block settings!', array('@easyrecJsDoc' => 'http://easyrec.org/apijs#callback')),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n ); \n\n\n $easyrec_drawDrupalCustom = \"function drawDrupalCustomToDiv(json,recommenderDiv){\\n\".\n \"if(\\\"undefined\\\"==typeof(json.error) ) { // if no error show recommendations\\n\".\n \" try{\\n\".\n \" var items = json.recommendeditems.item; \\n\".\n \" }catch(e){\\n\".\n \" return; //no recommendations found\\n\".\n \" }\\n\".\n \" /* when the object is already in array format, this block will not execute */\\n\".\n \" if( \\\"undefined\\\" == typeof(items.length) ) {\\n\".\n \" items = new Array(items);\\n\".\n \" }\\n\".\n \" // display recommendations in the DIV layer specified in the parameter recommenderDiv\\n\".\n \" if (items.length>0) {\\n\".\n \" for (x=0;x<15 && x <items.length;x++) {\\n\".\n \" document.getElementById(recommenderDiv).innerHTML +=\\n\".\n \" \\\"<div style='width:170px;padding:5px;float:left;text-align:center;\\'>\\\"+\\n\".\n \" \\\"<a href='\\\" + items[x].url + \\\"'>\\\" +\".\n \" \\\"<img style='width:150px;border:0px;' alt='\\\" + items[x].description + \\\"'\\\"+\\n\".\n \" \\\" src='\\\"+ items[x].imageUrl + \\\"'/><br/>\\\"\\n\".\n \" + items[x].description +\\n\".\n \" \\\"</a>\\\" +\\n\".\n \" \\\"</div>\\\";\\n\".\n \" }\\n\".\n \" }\\n\".\n \"}\\n\".\n\"}\\n\";\n\n $form['drawingcallback']['easyrec_drawDrupalCustom'] = array(\n '#title' => t('drawDrupalCustom drawingcallback'),\n '#type' => 'textarea',\n '#default_value' => variable_get('easyrec_drawDrupalCustom', $easyrec_drawDrupalCustom),\n '#required' => FALSE, \n '#rows' => 35,\n '#wysiwyg' => FALSE,\n );\n\n\n return system_settings_form($form);\n}", "title": "" }, { "docid": "9a8ce9e7dcf21db37e406ceb5fda3280", "score": "0.57699716", "text": "function ois_general_settings() {\n\n\tif ( !empty($_POST) ) {\n\t\tif (!empty($_POST['stats_submissions_disable'])) {\n\t\t\tif ( !check_admin_referer('ois_general_field', 'save_data')) {\n\t\t\t\techo 'Sorry, your nonce did not verify.';\n\t\t\t\texit;\n\t\t\t} // if \n\t\t\telse {\n\t\t\t\tif (!empty($_POST['stats_impressions_disable'])) {\n\t\t\t\t\t$stats_impressions_disable = $_POST['stats_impressions_disable'];\n\t\t\t\t} // if \n\t\t\t\telse {\n\t\t\t\t\t$stats_impressions_disable = '';\n\t\t\t\t} // else\n\t\t\t\tif (!empty($_POST['stats_submissions_disable'])) {\n\t\t\t\t\t$stats_submissions_disable = $_POST['stats_submissions_disable'];\n\t\t\t\t} // if \n\t\t\t\telse {\n\t\t\t\t\t$stats_submissions_disable = '';\n\t\t\t\t} // else\n\t\t\t\tupdate_option('stats_impressions_disable', $stats_impressions_disable);\n\t\t\t\tupdate_option('stats_submissions_disable', $stats_submissions_disable);\n\t\t\t\tois_notification('Your General Settings Have Been Updated!', '', '');\n\t\t\t} // else\n\t\t} // if\n\t} // if\n\n\n\tois_section_title('General Settings', 'Here you can update your general settings', '');\n\tois_start_option_table('Configure Stats', 'no', '');\n\t$stats_submissions_disable = get_option('stats_submissions_disable');\n\t$stats_impressions_disable = get_option('stats_impressions_disable');\n?>\n\t<tr>\n\t\t<th scope=\"row\" style=\"width:280px;\">\n\t\t\tDisable Impression Statistics <br/>\n\t\t</th>\n\t\t<td>\n\t\t\t<p>\n\t\t\t\t<input\ttype=\"checkbox\"\n\t\t\t\t\t\tname=\"stats_impressions_disable\"\n\t\t\t\t\t\tvalue=\"yes\"\n\t\t\t\t<?php if ($stats_impressions_disable == 'yes') { echo 'checked=\"checked\"'; } ?> /> Disable\n\t\t\t</p>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th scope=\"row\">\n\t\t\tDisable Submission Statistics <br/>\n\t\t</th>\n\t\t<td>\n\t\t\t<p>\n\t\t\t\t<input\ttype=\"checkbox\"\n\t\t\t\t\t\tname=\"stats_submissions_disable\"\n\t\t\t\t\t\tvalue=\"yes\"\n\t\t\t\t<?php if ($stats_submissions_disable == 'yes') { echo 'checked=\"checked\"'; } ?> /> Disable\n\t\t\t</p>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th scope=\"row\">\n\t\t\tSave Options\n\t\t</th>\n\t\t<td>\n\t\t\t<?php wp_nonce_field('ois_general_field', 'save_data'); ?>\n\t\t\t<input type=\"submit\" class=\"ois_super_button\" value=\"Save Options\" />\n\t\t</td>\n\t</tr>\n\t</table>\n\t</form>\n<?php\n\tois_section_end();\t\n}", "title": "" }, { "docid": "e998793d46287cee37bb15878d7aa88d", "score": "0.57646555", "text": "private function rebuildForm() {\n // The following should mimic this line.\n // $this->settings = wf_crm_aval($this->form_state->getStorage(), 'vals', $this->form_state->getValues());\n $this->settings = $this->form_state->get('vals') ?: $this->form_state->getValues();\n\n $this->rebuildData();\n // Hack for nicer UX: pre-check phone, email, etc when user increments them\n if (!empty($_POST['_triggering_element_name'])) {\n $defaults = array(\n 'phone' => 'phone',\n 'email' => 'email',\n 'website' => 'url',\n 'im' => 'name',\n 'address' => array('street_address', 'city', 'state_province_id', 'postal_code'),\n );\n foreach ($defaults as $ent => $fields) {\n if (strpos($_POST['_triggering_element_name'], \"_number_of_$ent\")) {\n list(, $c) = explode('_', $_POST['_triggering_element_name']);\n for ($n = 1; $n <= $this->data['contact'][$c][\"number_of_$ent\"]; ++$n) {\n foreach ((array) $fields as $field) {\n $this->settings[\"civicrm_{$c}_contact_{$n}_{$ent}_{$field}\"] = 1;\n }\n }\n }\n }\n }\n // This replaces: unset($this->form_state['storage']['vals']);\n $this->form_state->set('vals', NULL);\n }", "title": "" }, { "docid": "12dbafec390227ed96aaf66793692c13", "score": "0.5762424", "text": "function lastfm_wp_options_page() {\r\n\r\n // variables for the field and option names \r\n $opt_name = 'mt_lastfm_account';\r\n $opt_name_2 = 'mt_lastfm_limit';\r\n $opt_name_5 = 'mt_lastfm_plugin_support';\r\n $opt_name_6 = 'mt_lastfm_title';\r\n $opt_name_9 = 'mt_lastfm_cache';\r\n\t$opt_name_10 = 'mt_lastfm_title2';\r\n\t$opt_name_11 = 'mt_lastfm_title3';\r\n\t$opt_name_12 = 'mt_lastfm_title4';\r\n $hidden_field_name = 'mt_lastfm_submit_hidden';\r\n $data_field_name = 'mt_lastfm_account';\r\n $data_field_name_2 = 'mt_lastfm_limit';\r\n $data_field_name_5 = 'mt_lastfm_plugin_support';\r\n $data_field_name_6 = 'mt_lastfm_title';\r\n $data_field_name_9 = 'mt_lastfm_cache';\r\n\t$data_field_name_10 = 'mt_lastfm_title2';\r\n\t$data_field_name_11 = 'mt_lastfm_title3';\r\n\t$data_field_name_12 = 'mt_lastfm_title4';\r\n\r\n // Read in existing option value from database\r\n $opt_val = get_option( $opt_name );\r\n $opt_val_2 = get_option($opt_name_2);\r\n $opt_val_5 = get_option($opt_name_5);\r\n $opt_val_6 = get_option($opt_name_6);\r\n $opt_val_9 = get_option($opt_name_9);\r\n\t$opt_val_10 = get_option($opt_name_10);\r\n\t$opt_val_11 = get_option($opt_name_11);\r\n\t$opt_val_12 = get_option($opt_name_12);\r\n \r\nif ($_POST['delcache']==\"true\") {\r\nupdate_option(\"mt_lastfm_cachey\", \"\");\r\nupdate_option(\"mt_lastfm_cachey2\", \"\");\r\nupdate_option(\"mt_lastfm_cachey3\", \"\");\r\nupdate_option(\"mt_lastfm_cachey4\", \"\");\r\n}\r\n\r\n // See if the user has posted us some information\r\n // If they did, this hidden field will be set to 'Y'\r\n if( $_POST[ $hidden_field_name ] == 'Y' ) {\r\n // Read their posted value\r\n $opt_val = $_POST[ $data_field_name ];\r\n $opt_val_2 = $_POST[$data_field_name_2];\r\n $opt_val_5 = $_POST[$data_field_name_5];\r\n $opt_val_6 = $_POST[$data_field_name_6];\r\n $opt_val_9 = $_POST[$data_field_name_9];\r\n\t\t$opt_val_10 = $_POST[$data_field_name_10];\r\n\t\t$opt_val_11 = $_POST[$data_field_name_11];\r\n\t\t$opt_val_12 = $_POST[$data_field_name_12];\r\n\r\n // Save the posted value in the database\r\n update_option( $opt_name, $opt_val );\r\n update_option( $opt_name_2, $opt_val_2 );\r\n update_option( $opt_name_5, $opt_val_5 );\r\n update_option( $opt_name_6, $opt_val_6 ); \r\n update_option( $opt_name_9, $opt_val_9 );\r\n\t\tupdate_option( $opt_name_10, $opt_val_10 );\r\n\t\tupdate_option( $opt_name_11, $opt_val_11 );\r\n\t\tupdate_option( $opt_name_12, $opt_val_12 );\r\n\t\tupdate_option(\"mt_lastfm_cachey\", \"\");\r\n\t\tupdate_option(\"mt_lastfm_cachey2\", \"\");\r\n\t\tupdate_option(\"mt_lastfm_cachey3\", \"\");\r\n\t\tupdate_option(\"mt_lastfm_cachey4\", \"\");\r\n\r\n // Put an options updated message on the screen\r\n\r\n?>\r\n<div class=\"updated\"><p><strong><?php _e('Options saved.', 'mt_trans_domain' ); ?></strong></p></div>\r\n<?php\r\n\r\n }\r\n\r\n // Now display the options editing screen\r\n\r\n echo '<div class=\"wrap\">';\r\n\r\n // header\r\n\r\n echo \"<h2>\" . __( 'Last.FM WP Plugin Options', 'mt_trans_domain' ) . \"</h2>\";\r\n\r\n // options form\r\n \r\n $change3 = get_option(\"mt_lastfm_plugin_support\");\r\n $change6 = get_option(\"mt_lastfm_cache\");\r\n\r\nif ($change3==\"Yes\" || $change3==\"\") {\r\n$change3=\"checked\";\r\n$change31=\"\";\r\n} else {\r\n$change3=\"\";\r\n$change31=\"checked\";\r\n}\r\n\r\n ?>\r\n<form name=\"form1\" method=\"post\" action=\"\">\r\n<input type=\"hidden\" name=\"<?php echo $hidden_field_name; ?>\" value=\"Y\">\r\n\r\n<p><?php _e(\"Widget Latest Tracks Title:\", 'mt_trans_domain' ); ?> \r\n<input type=\"text\" name=\"<?php echo $data_field_name_6; ?>\" value=\"<?php echo $opt_val_6; ?>\" size=\"50\">\r\n</p><hr />\r\n\r\n<p><?php _e(\"Widget Top Tracks Title:\", 'mt_trans_domain' ); ?> \r\n<input type=\"text\" name=\"<?php echo $data_field_name_10; ?>\" value=\"<?php echo $opt_val_10; ?>\" size=\"50\">\r\n</p><hr />\r\n\r\n<p><?php _e(\"Widget Friends Title:\", 'mt_trans_domain' ); ?> \r\n<input type=\"text\" name=\"<?php echo $data_field_name_11; ?>\" value=\"<?php echo $opt_val_11; ?>\" size=\"50\">\r\n</p><hr />\r\n\r\n<p><?php _e(\"Widget Shouts Title:\", 'mt_trans_domain' ); ?> \r\n<input type=\"text\" name=\"<?php echo $data_field_name_12; ?>\" value=\"<?php echo $opt_val_12; ?>\" size=\"50\">\r\n</p><hr />\r\n\r\n<p><?php _e(\"Last.FM Username:\", 'mt_trans_domain' ); ?> \r\n<input type=\"text\" name=\"<?php echo $data_field_name; ?>\" value=\"<?php echo $opt_val; ?>\" size=\"20\">\r\n</p><hr />\r\n\r\n<p><?php _e(\"Maximum Number - Limit:\", 'mt_trans_domain' ); ?> \r\n<input type=\"text\" name=\"<?php echo $data_field_name_2; ?>\" value=\"<?php echo $opt_val_2; ?>\" size=\"3\">\r\n</p><hr />\r\n\r\n<p><?php _e(\"How long should the cache last for? Recommended 10 minutes.\", 'mt_trans_domain' ); ?> \r\n<input type=\"text\" name=\"<?php echo $data_field_name_9; ?>\" value=\"<?php echo $opt_val_9; ?>\" size=\"4\"> Minutes\r\n</p><hr />\r\n\r\n<p><?php _e(\"Support this Plugin?\", 'mt_trans_domain' ); ?> \r\n<input type=\"radio\" name=\"<?php echo $data_field_name_5; ?>\" value=\"Yes\" <?php echo $change3; ?>>Yes\r\n<input type=\"radio\" name=\"<?php echo $data_field_name_5; ?>\" value=\"No\" <?php echo $change31; ?>>No\r\n</p><hr />\r\n\r\n<p class=\"submit\">\r\n<input type=\"submit\" name=\"Submit\" value=\"<?php _e('Update Options', 'mt_trans_domain' ) ?>\" />\r\n</p><hr />\r\n\r\n</form>\r\n\r\n<form action=\"\" method=\"post\"><input type=\"hidden\" name=\"delcache\" value=\"true\" /><input type=\"submit\" value=\"Delete Cache\" /></form><br /><br />\r\n</div>\r\n<?php\r\n \r\n}", "title": "" }, { "docid": "20ae6da1b38bcbc0bb6eeb41318c2dd5", "score": "0.5761949", "text": "public function settings_page()\n {\n\t// action save\n\tif( 'save' == $_REQUEST['action'] ){\n\t \n\t if( $_POST['ingredient'] ){\n\t // data is array, so serialize to create a string\n\t $value = serialize($_POST['ingredient']);\n\t // update option\n\t update_option('ingredient_settings', $value);\n\t ?>\n\t <p><div id=\"message\" class=\"updated\" >Settings saved successfully</div></p>\n\t <?php\n\t }\n\t // set value form\n\t $settings = $_POST['ingredient'];\n\t \n\t} else {\n\t // set value form\n\t // unserialize option (@return Array)\n\t $settings = unserialize(get_option('ingredient_settings'));\n\t}\t\n\t// dump('',$settings);\n\t?>\n\t<div class=\"wrap\">\n\t <?php screen_icon( 'options-general' ); ?>\n\t <h2>Ingredient Settings</h2>\n\t <form method=\"POST\" action=\"\">\n\t <table class=\"form-table\">\n\t\t<tr valign=\"top\">\n\t\t<th scope=\"row\">\n\t\t <label for=\"show_page\">Number of display results</label>\n\t\t</th>\n\t\t<td>\n\t\t <input type=\"text\" name=\"ingredient[display]\" size=\"25\" value=\"<?php echo $settings['display'] ?>\" />\n\t\t</td>\n\t\t</tr>\n\t\t<tr valign=\"top\">\n\t\t<th scope=\"row\"><label for=\"show_page\">Show original for substitution</label></th>\n\t\t<td>\n\t\t <input type=\"radio\" name=\"ingredient[original]\" value=\"y\" <?php if( $settings['original'] == 'y' ) echo 'checked' ?> /> Yes\n\t\t <input type=\"radio\" name=\"ingredient[original]\" value=\"n\" <?php if( $settings['original'] == 'n' ) echo 'checked' ?> /> No\n\t\t</td>\n\t\t</tr>\n\t </table>\n\t <p class=\"submit\">\n\t\t<input type=\"hidden\" name=\"action\" value=\"save\" />\n\t\t<input class=\"button-primary\" name=\"Submit\" type=\"submit\" value=\"Save Options\" />\t\t \n\t </p>\n\t </form>\n\t</div>\n\t<?php\n }", "title": "" }, { "docid": "22810af56b33907ad5bb26600fe790f0", "score": "0.5758477", "text": "public function postProcess()\n {\n $form_values = $this->getConfigFormValues();\n\n foreach (array_keys($form_values) as $key) {\n Configuration::updateValue($key, Tools::getValue($key));\n }\n }", "title": "" }, { "docid": "3123f5f98e865c42c74ec919e7fa1ac2", "score": "0.5757185", "text": "public function sin_page_init()\n { \n\t\n register_setting(\n 'gcid_group', // Option group\n 'gcid_name', // Option name\n array( $this, 'sanitize' ) // Sanitize\n );\n\n add_settings_section(\n 'setting_section_id', // ID\n 'Dynamic Remarketing Settings', // Title\n array( $this, 'sin_section_info' ), // Callback\n 'remarketing_dinamic' // Page\n ); \n\n add_settings_field(\n 'id_number', // ID\n 'Google Conversion ID', // Title \n array( $this, 'sin_id_number' ), // Callback\n 'remarketing_dinamic', // Page\n 'setting_section_id' // Section \n ); \n\n }", "title": "" }, { "docid": "0a722a5494a9cc18c119b055a4e202b3", "score": "0.5755937", "text": "public function load_settings_values() {\n\t\t\tglobal $pagenow;\n\n\t\t\tparent::load_settings_values();\n\n\t\t\t$this->quiz_edit = $this->init_quiz_edit( $this->_post );\n\n\t\t\tif ( true === $this->settings_values_loaded ) {\n\t\t\t\tif ( $this->quiz_edit['quiz'] ) {\n\t\t\t\t\t$this->setting_option_values['formActivated'] = $this->quiz_edit['quiz']->isFormActivated();\n\t\t\t\t\tif ( true === $this->setting_option_values['formActivated'] ) {\n\t\t\t\t\t\t$this->setting_option_values['formActivated'] = 'on';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->setting_option_values['formActivated'] = '';\n\t\t\t\t\t}\n\n\t\t\t\t\t//$form_mapper = new WpProQuiz_Model_FormMapper();\n\t\t\t\t\t//$this->setting_option_values['custom_fields_forms'] = $form_mapper->fetch( $this->quiz_edit['quiz']->getId() );\n\n\t\t\t\t\tif ( $this->quiz_edit['forms'] ) {\n\t\t\t\t\t\t$this->setting_option_values['custom_fields_forms'] = $this->quiz_edit['forms'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->setting_option_values['custom_fields_forms'] = array();\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( empty( $this->setting_option_values['custom_fields_forms'] ) ) {\n\t\t\t\t\t\t$this->setting_option_values['formActivated'] = '';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->setting_option_values['formActivated'] = 'on';\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->setting_option_values['formShowPosition'] = $this->quiz_edit['quiz']->getFormShowPosition();\n\t\t\t\t\tif ( WpProQuiz_Model_Quiz::QUIZ_FORM_POSITION_START === $this->setting_option_values['formShowPosition'] ) {\n\t\t\t\t\t\t$this->setting_option_values['formShowPosition'] = WpProQuiz_Model_Quiz::QUIZ_FORM_POSITION_START;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->setting_option_values['formShowPosition'] = WpProQuiz_Model_Quiz::QUIZ_FORM_POSITION_END;\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->setting_option_values['toplistActivated'] = $this->quiz_edit['quiz']->isToplistActivated();\n\t\t\t\t\tif ( true === $this->setting_option_values['toplistActivated'] ) {\n\t\t\t\t\t\t$this->setting_option_values['toplistActivated'] = 'on';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->setting_option_values['toplistActivated'] = '';\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->setting_option_values['toplistDataAddPermissions'] = $this->quiz_edit['quiz']->getToplistDataAddPermissions();\n\t\t\t\t\t$this->setting_option_values['toplistDataAddMultiple'] = $this->quiz_edit['quiz']->isToplistDataAddMultiple();\n\t\t\t\t\tif ( true === $this->setting_option_values['toplistDataAddMultiple'] ) {\n\t\t\t\t\t\t$this->setting_option_values['toplistDataAddMultiple'] = 'on';\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->setting_option_values['toplistDataAddBlock'] = absint( $this->quiz_edit['quiz']->getToplistDataAddBlock() );\n\t\t\t\t\t$this->setting_option_values['toplistDataAddAutomatic'] = $this->quiz_edit['quiz']->isToplistDataAddAutomatic();\n\t\t\t\t\tif ( true === $this->setting_option_values['toplistDataAddAutomatic'] ) {\n\t\t\t\t\t\t$this->setting_option_values['toplistDataAddAutomatic'] = 'on';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->setting_option_values['toplistDataAddAutomatic'] = '';\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->setting_option_values['toplistDataShowLimit'] = $this->quiz_edit['quiz']->getToplistDataShowLimit();\n\t\t\t\t\t$this->setting_option_values['toplistDataSort'] = $this->quiz_edit['quiz']->getToplistDataSort();\n\t\t\t\t\t$this->setting_option_values['toplistDataShowIn'] = $this->quiz_edit['quiz']->getToplistDataShowIn();\n\t\t\t\t\tif ( absint( $this->setting_option_values['toplistDataShowIn'] ) > 0 ) {\n\t\t\t\t\t\t$this->setting_option_values['toplistDataShowIn_enabled'] = 'on';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->setting_option_values['toplistDataShowIn_enabled'] = '';\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( class_exists( 'ReallySimpleCaptcha' ) ) {\n\t\t\t\t\t\t$this->setting_option_values['toplistDataCaptcha'] = $this->quiz_edit['quiz']->isToplistDataCaptcha();\n\t\t\t\t\t\tif ( true === $this->setting_option_values['toplistDataCaptcha'] ) {\n\t\t\t\t\t\t\t$this->setting_option_values['toplistDataCaptcha'] = 'on';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->setting_option_values['toplistDataCaptcha'] = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->setting_option_values['toplistDataCaptcha'] = '';\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( 'on' !== $this->setting_option_values['toplistActivated'] ) {\n\t\t\t\t\t\t$this->setting_option_values['toplistDataAddPermissions'] = '';\n\t\t\t\t\t\t$this->setting_option_values['toplistDataAddMultiple'] = '';\n\t\t\t\t\t\t$this->setting_option_values['toplistDataAddBlock'] = 0;\n\t\t\t\t\t\t$this->setting_option_values['toplistDataAddAutomatic'] = '';\n\t\t\t\t\t\t$this->setting_option_values['toplistDataShowLimit'] = '';\n\t\t\t\t\t\t$this->setting_option_values['toplistDataSort'] = '';\n\t\t\t\t\t\t$this->setting_option_values['toplistDataShowIn'] = '';\n\t\t\t\t\t\t$this->setting_option_values['toplistDataShowIn_enabled'] = '';\n\t\t\t\t\t\t$this->setting_option_values['toplistDataCaptcha'] = '';\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->setting_option_values['statisticsOn'] = $this->quiz_edit['quiz']->isStatisticsOn();\n\t\t\t\t\tif ( true === $this->setting_option_values['statisticsOn'] ) {\n\t\t\t\t\t\t$this->setting_option_values['statisticsOn'] = 'on';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->setting_option_values['statisticsOn'] = '';\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( isset( $this->quiz_edit['quiz_postmeta']['viewProfileStatistics'] ) ) {\n\t\t\t\t\t\t$this->setting_option_values['viewProfileStatistics'] = $this->quiz_edit['quiz_postmeta']['viewProfileStatistics'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ( 'post-new.php' === $pagenow ) {\n\t\t\t\t\t\t\t$this->setting_option_values['viewProfileStatistics'] = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->setting_option_values['viewProfileStatistics'] = $this->quiz_edit['quiz']->getViewProfileStatistics();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( true === $this->setting_option_values['viewProfileStatistics'] ) {\n\t\t\t\t\t\t$this->setting_option_values['viewProfileStatistics'] = 'on';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->setting_option_values['viewProfileStatistics'] = '';\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->setting_option_values['statisticsIpLock'] = $this->quiz_edit['quiz']->getStatisticsIpLock();\n\t\t\t\t\tif ( ! empty( $this->setting_option_values['statisticsIpLock'] ) ) {\n\t\t\t\t\t\t$this->setting_option_values['statisticsIpLock'] = round( $this->setting_option_values['statisticsIpLock'] / 60 );\n\t\t\t\t\t\t$this->setting_option_values['statisticsIpLock_enabled'] = 'on';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->setting_option_values['statisticsIpLock_enabled'] = '';\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->setting_option_values['emailNotification'] = $this->quiz_edit['quiz']->getEmailNotification();\n\t\t\t\t\tif ( ( $this->setting_option_values['emailNotification'] == WpProQuiz_Model_Quiz::QUIZ_EMAIL_NOTE_ALL ) || ( $this->setting_option_values['emailNotification'] == WpProQuiz_Model_Quiz::QUIZ_EMAIL_NOTE_REG_USER ) ) {\n\t\t\t\t\t\t$this->setting_option_values['email_enabled_admin'] = 'on';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->setting_option_values['email_enabled_admin'] = '';\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->setting_option_values['userEmailNotification'] = $this->quiz_edit['quiz']->isUserEmailNotification();\n\t\t\t\t\tif ( true === $this->setting_option_values['userEmailNotification'] ) {\n\t\t\t\t\t\t$this->setting_option_values['userEmailNotification'] = 'on';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->setting_option_values['userEmailNotification'] = '';\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ( 'on' !== $this->setting_option_values['userEmailNotification'] ) && ( 'on' !== $this->setting_option_values['email_enabled_admin'] ) ) {\n\t\t\t\t\t\t$this->setting_option_values['email_enabled'] = '';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->setting_option_values['email_enabled'] = 'on';\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( isset( $this->quiz_edit['quiz_postmeta']['timeLimitCookie'] ) ) {\n\t\t\t\t\t\t$this->setting_option_values['timeLimitCookie'] = $this->quiz_edit['quiz_postmeta']['timeLimitCookie'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->setting_option_values['timeLimitCookie'] = $this->quiz_edit['quiz']->getTimeLimitCookie();\n\t\t\t\t\t}\n\t\t\t\t\tif ( ! empty( $this->setting_option_values['timeLimitCookie'] ) ) {\n\t\t\t\t\t\t$this->setting_option_values['timeLimitCookie_enabled'] = 'on';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->setting_option_values['timeLimitCookie_enabled'] = '';\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->setting_option_values['associated_settings'] = learndash_get_setting( get_the_ID(), 'quiz_pro' );\n\n\t\t\t\t\tif ( ! isset( $this->setting_option_values['advanced_settings'] ) ) {\n\t\t\t\t\t\t$this->setting_option_values['advanced_settings'] = '';\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( 'on' === $this->setting_option_values['timeLimitCookie_enabled'] ) {\n\t\t\t\t\t\t$this->setting_option_values['advanced_settings'] = 'on';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->setting_option_values['templateLoadId'] = '';\n\t\t\tif ( ( isset( $_GET['templateLoadId'] ) ) && ( ! empty( $_GET['templateLoadId'] ) ) ) {\n\t\t\t\t$this->setting_option_values['templateLoadId'] = absint( $_GET['templateLoadId'] );\n\t\t\t}\n\t\t\tif ( ! empty( $this->setting_option_values['templateLoadId'] ) ) {\n\t\t\t\t$this->setting_option_values['templates_enabled'] = 'on';\n\t\t\t} else {\n\t\t\t\t$this->setting_option_values['templates_enabled'] = '';\n\t\t\t}\n\n\t\t\tforeach ( $this->settings_fields_map as $_internal => $_external ) {\n\t\t\t\tif ( ! isset( $this->setting_option_values[ $_internal ] ) ) {\n\t\t\t\t\t$this->setting_option_values[ $_internal ] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "d6f71a92a9b40d75d1cc5d40a2415aad", "score": "0.57540256", "text": "public function register_settings() \n {\n if( is_array( $this->settings ) ) {\n foreach( $this->settings as $section => $data ) {\n\n // Add section to page\n add_settings_section( $section, $data['title'], array( $this, 'settings_section' ), 'plugin_settings' );\n\n foreach( $data['fields'] as $field ) {\n\n // Validation callback for field\n $validation = '';\n if( isset( $field['callback'] ) ) {\n $validation = $field['callback'];\n }\n\n // Register field\n $option_name = $this->settings_prefix . $field['id'];\n register_setting( 'plugin_settings', $option_name, $validation );\n\n // Add field to page\n add_settings_field( $field['id'], $field['label'], array( $this, 'display_field' ), 'plugin_settings', $section, array( 'field' => $field ) );\n }\n }\n }\n }", "title": "" }, { "docid": "5bb5222547b3b8ead3e4862a855db2e2", "score": "0.57539314", "text": "public function fillAdminBox($path, $settingGroup, &$box, &$fields, &$values) {\n\t\tif (ze\\module::statusByName('zenario_ctype_document') == 'module_running') {\n\t\t\tif ($box['key']['id']) {\n\t\t\t\t\n\t\t\t\t$fields['details/html']['snippet']['html'] = ze\\admin::phrase('For each document meta data field below, select a dataset field to migrate the data to. If no dataset field is chosen then the data won\\'t be saved. (<a [[link]]>Edit dataset fields</a>)', ['link' => 'href=\"'. htmlspecialchars(ze\\link::absolute(). 'zenario/admin/organizer.php#zenario__administration/panels/custom_datasets'). '\" target=\"_blank\"']);\n\t\t\t\t\n\t\t\t\t// Set select lists for dataset fields\n\t\t\t\t$link = '';\n\t\t\t\t$datasetDetails = ze\\dataset::details('documents');\n\t\t\t\tif ($details = ze\\dataset::details('documents')) {\n\t\t\t\t\t$link = ze\\link::absolute(). 'zenario/admin/organizer.php?#zenario__administration/panels/custom_datasets//'.$details['id'];\n\t\t\t\t}\n\t\t\t\t$textDocumentDatasetFields = ze\\row::getAssocs('custom_dataset_fields', ['label', 'default_label'], ['type' => 'text', 'dataset_id' => $datasetDetails['id']], 'ord');\n\t\t\t\t$textDocumentDatasetFields = array_map(function($e) { return $e['label'] ? $e['label'] : $e['default_label']; }, $textDocumentDatasetFields);\n\t\t\t\t\n\t\t\t\tif (empty($textDocumentDatasetFields)) {\n\t\t\t\t\t$fields['details/title']['hidden'] = $fields['details/language_id']['hidden'] = true;\n\t\t\t\t\t$fields['details/title_warning']['hidden'] = $fields['details/language_id_warning']['hidden'] = false;\n\t\t\t\t\t$fields['details/title_warning']['snippet']['html'] = \n\t\t\t\t\t$fields['details/language_id_warning']['snippet']['html'] = \n\t\t\t\t\t\t'No \"Text\" type fields found in the document dataset, go <a href=\"'.$link.'\">here</a> to create one.';\n\t\t\t\t} else {\n\t\t\t\t\t$fields['details/title']['values'] = $fields['details/language_id']['values'] = $textDocumentDatasetFields;\n\t\t\t\t}\n\t\t\t\t$textAreaDocumentDatasetFields = \n\t\t\t\t\tze\\row::getValues('custom_dataset_fields', 'label', ['type' => 'textarea', 'dataset_id' => $datasetDetails['id']]);\n\t\t\t\tif (empty($textAreaDocumentDatasetFields)) {\n\t\t\t\t\t$fields['details/description']['hidden'] = $fields['details/keywords']['hidden'] = true;\n\t\t\t\t\t$fields['details/description_warning']['hidden'] = $fields['details/keywords_warning']['hidden'] = false;\n\t\t\t\t\t$fields['details/description_warning']['snippet']['html'] = \n\t\t\t\t\t$fields['details/keywords_warning']['snippet']['html'] = \n\t\t\t\t\t\t'No \"Textarea\" type fields found in the document dataset, go <a href=\"'.$link.'\" target=\"_blank\">here</a> to create one.';\n\t\t\t\t} else {\n\t\t\t\t\t$fields['details/description']['values'] = $fields['details/keywords']['values'] = $textAreaDocumentDatasetFields;\n\t\t\t\t}\n\t\t\t\t$editorDocumentDatasetFields = \n\t\t\t\t\tze\\row::getValues('custom_dataset_fields', 'label', ['type' => 'editor', 'dataset_id' => $datasetDetails['id']]);\n\t\t\t\tif (empty($editorDocumentDatasetFields)) {\n\t\t\t\t\t$fields['details/content_summary']['hidden'] = true;\n\t\t\t\t\t$fields['details/content_summary_warning']['hidden'] = false;\n\t\t\t\t\t$fields['details/content_summary_warning']['snippet']['html'] = 'No \"Editor\" type fields found in the document dataset, go <a href=\"'.$link.'\">here</a> to create one.';\n\t\t\t\t} else {\n\t\t\t\t\t$fields['details/content_summary']['values'] = $editorDocumentDatasetFields;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "63001cb8441f00ed5aa3ca65bdce6ce4", "score": "0.57486176", "text": "function settings(){\n\tglobal $c,$d;\n\techo \"<div class='db_form'><table width='80%' style='margin-left:20px'><tr><td>\n\t<div ><b>Theme</b>&nbsp;</td><td><span id='themeSelect'><select name='themeSelect' onchange='fieldSave(\\\"themeSelect\\\",this.value);'>\";\n\tif(chdir(\"./themes/\")){\n\t\t$dirs = glob('*', GLOB_ONLYDIR);\n\t\tforeach($dirs as $val){\n\t\t\t$select = ($val == $c['themeSelect'])? ' selected' : ''; \n\t\t\techo '<option value=\"'.$val.'\"'.$select.'>'.$val.\"</option>\\n\";\n\t\t}\n\t}\n\techo \"</select></span></div></td></tr><tr><td>\n\t<div ><b>Navigation <br><small><font color='red'>You can create two-level menu links with the current version of the GenIE-Sys. Unlike the primary menu items, the sub-level menu links are seperated by the <b>-</b> prefix..</font></small> \n\t</td><td><span id='menu' title='Home' class='editText'>\".$c['menu'].\"</span></div></td></tr>\";\n\t\n\tforeach(array('title','description','keywords','copyright') as $key){\n\t\tif($key==\"copyright\"){\n\t\t\techo \"<tr><td width='200px'><div><strong>Edit the footer</td><td><span title='\".$d['default'][$key].\"' id='\".$key.\"' class='editText'>\".$c[$key].\"</span></strong></div></td></tr>\";\n\t\t}else{\n\t\t\techo \"<tr><td width='200px'><div><strong>Edit the \".$key.\"</td><td><span title='\".$d['default'][$key].\"' id='\".$key.\"' class='editText'>\".$c[$key].\"</span></strong></div></td></tr>\";\n\t\t}\n\t}\n\techo \"</table></div>\";\n}", "title": "" }, { "docid": "ebd1448ef1fd20e731d0e4b484d46299", "score": "0.5746738", "text": "function _form_section_import_settings (&$form, &$form_state) {\n \n $form['erpal_crm_mailaction']['import_settings'] = array (\n '#type' => 'fieldset',\n '#title' => t('Import settings'),\n '#tree' => TRUE,\n '#collapsible' => TRUE,\n '#collapsed' => TRUE\n );\n \n $form['erpal_crm_mailaction']['import_settings']['publish_imports'] = array (\n '#type' => 'checkbox',\n '#title' => t('Publish imported content'),\n '#default_value' => Settings::get ('import_settings', 'publish_imports', FALSE),\n ); \n \n $form['erpal_crm_mailaction']['import_settings']['publish_attachments'] = array (\n '#type' => 'checkbox',\n '#title' => t('Publish imported attachments'),\n '#default_value' => Settings::get ('import_settings', 'publish_attachments', FALSE),\n ); \n \n $form['erpal_crm_mailaction']['import_settings']['create_contact_for_unknown_user'] = array (\n '#type' => 'checkbox',\n '#title' => t('Create contacts for unknown users. (NOT SECURE!)'),\n '#default_value' => Settings::get ('import_settings', 'create_contact_for_unknown_user', FALSE),\n ); \n \n $form['erpal_crm_mailaction']['import_settings']['cc_box'] = array (\n '#type' => 'textfield',\n '#title' => t('Reply (cc) box'),\n '#default_value' => Settings::get ('import_settings', 'cc_box', ''),\n '#description' => t('It is the email address which will all the mails of a conversion per cc.')\n ); \n \n return;\n}", "title": "" }, { "docid": "5264b08593a44bbb9367a3e01d886dbe", "score": "0.5745281", "text": "function metagenics_finder_practitioner_system_settings_form($form, $form_state) {\n $form = array();\n \n $form['meta_fap_score_criteria'] = array(\n '#type' => 'fieldset',\n '#title' => t('FAP Scoring'),\n );\n\n $form['meta_fap_score_criteria']['flt_score'] = array(\n '#type' => 'textfield',\n '#title' => t('FLT Role Score'),\n '#description' => t('Practitioner score will be boosted by this amount'),\n '#default_value' => variable_get('flt_score'),\n );\n\n $form['meta_fap_score_criteria']['store_score'] = array(\n '#type' => 'textfield',\n '#title' => t('Online Store Score'),\n '#description' => t('Practitioner score will be boosted by this amount'),\n '#default_value' => variable_get('store_score'),\n );\n\n $form['meta_fap_shop_now_enabled'] = array(\n '#type' => 'checkbox',\n '#title' => t('Enable \"Shop Now\" buttons in FAP Results'),\n '#default_value' => variable_get('meta_fap_shop_now_enabled'),\n );\n\n return system_settings_form($form);\n}", "title": "" }, { "docid": "180d962d7b9d73d901b8298e5337ca21", "score": "0.57417905", "text": "function add_field_settings() {\n ?>\n <script type='text/javascript'>\n fieldSettings['button'] = '.button_type_setting, .button_onclick_setting, .conditional_logic_field_setting, .label_setting, .css_class_setting';\n fieldSettings['submit'] = '.disable_footer_submit_setting, .button_type_setting, .button_onclick_setting, .conditional_logic_field_setting, .label_setting, .css_class_setting';\n fieldSettings['reset'] = '.button_type_setting, .button_onclick_setting, .conditional_logic_field_setting, .label_setting, .css_class_setting';\n jQuery(document).bind('gform_load_field_settings', function(event, field, form){\n jQuery('#button_onclick').val(field.onclick == undefined ? '' : field.onclick);\n jQuery('#button_type').val(field.inputType);\n jQuery('#disable_footer_submit').prop('checked', field.disableSubmit == true ? true : false);\n });\n </script>\n <?php\n }", "title": "" }, { "docid": "188cfe76598f89eadcdd1f9d7616c1ad", "score": "0.5737714", "text": "public function settings_form()\n\t{\n\t\t$this->EE->lang->loadfile('nsm_multi_language');\n\t\t$this->EE->load->library('form_validation');\n\n\t\t$vars['settings'] = $this->settings;\n\t\t$vars['message'] = FALSE;\n\n\t\tif($new_settings = $this->EE->input->post(__CLASS__))\n\t\t{\n\t\t\tif(substr($new_settings['languages_path'], -1) != \"/\")\n\t\t\t\t$new_settings['languages_path'] .= \"/\";\n\n\t\t\t$vars['settings'] = $new_settings;\n\t\t\t$this->_saveSettingsToDB($new_settings);\n\t\t\t$vars['message'] = $this->EE->lang->line('extension_settings_saved_success');\n\t\t}\n\n\t\t$vars['addon_name'] = $this->addon_name;\n\t\t$vars['languages'] = $this->_readLanguagesFromDisk();\n\n\t\treturn $this->EE->load->view('form_settings', $vars, TRUE);\n\t}", "title": "" }, { "docid": "7485cd540802403fd226b1b40fc51898", "score": "0.5730645", "text": "function ca_applications_admin_settings_form() {\n $form = array();\n\n $form['application_list'] = array(\n '#type' => 'select',\n '#title' => t('Application\\'s List Template'),\n '#description' => t('This effects the look and feel for the Page Manager page at the path \"applications\"'),\n '#options' => array(\n 'ca_applications_application_list_template_one' => t('Template One'),\n 'ca_applications_application_list_template_two' => t('Template Two'),\n 'ca_applications_application_list_template_three' => t('Template Three'),\n ),\n '#default_value' => variable_get('ca_applications_application_list_template', 'ca_applications_application_list_template_one'),\n '#required' => TRUE,\n );\n $form['application_node'] = array(\n '#type' => 'select',\n '#title' => t('Application\\'s Node Template'),\n '#description' => t('This effects the look and feel for the \"ca_applications\" Node Type.'),\n '#options' => array(\n 'ca_applications_application_node_template_one' => t('Template One'),\n 'ca_applications_application_node_template_two' => t('Template Two'),\n 'ca_applications_application_node_template_three' => t('Template Three'),\n ),\n '#default_value' => variable_get('ca_applications_application_node_template', 'ca_applications_application_node_template_one'),\n '#required' => TRUE,\n );\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n '#submit' => array('ca_applications_admin_settings_form_submit'),\n );\n\n return $form;\n}", "title": "" }, { "docid": "a47762a3ac55d3f339eb69536b693d33", "score": "0.5730056", "text": "function rcw_savesettings_postcreationsettings() \r\n{\r\n\tif(isset($_POST['rcw_postcreationsettings_submit']))\r\n\t{\t\r\n\t\t$rcw = get_option('rcw_settings');\r\n\r\n\t\t$rcw['postcreation']['tags'] = $_POST['rcw_tags'];\r\n\t\t$rcw['postcreation']['ping'] = $_POST['rcw_pings'];\r\n\t\t\r\n\t\tif(update_option('rcw_settings',$rcw))\r\n\t\t{\r\n\t\t\trcw_mes('Success','Your post creation settings have been saved and will apply to all new product posts you create from here on.');\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\trcw_err('Failed','There was a problem updating the Wordpress options table with your post creation setttings, please try again then seek help.');\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "4fdac30b1f3a250b46c47cbd4b87f383", "score": "0.5729339", "text": "function dpProAppointments_settings_page() {\nglobal $dpProAppointments, $wpdb;\n\n\tif(!is_array($dpProAppointments['appointment_fields'])) {\n\t\t$dpProAppointments['appointment_fields'] = array();\n\t}\n\t\n\tif($dpProAppointments['appointment_email_template_user'] == '') {\n\t\t$dpProAppointments['appointment_email_template_user'] = \"Hi #USERNAME#,\\n\\nThanks for set the appointment:\\n\\n#APPOINTMENT_DETAILS#\\n\\nPlease contact us if you have questions.\\n\\nKind Regards.\\n#SITE_NAME#\";\n\t}\n\t\n\tif($dpProAppointments['appointment_email_template_admin'] == '') {\n\t\t$dpProAppointments['appointment_email_template_admin'] = \"The user #USERNAME# created an appointment:\\n\\n#APPOINTMENT_DETAILS#\\n\\n#COMMENT#\\n\\n#SITE_NAME#\";\n\t}\n\t\n\tif(!isset($dpProAppointments['schedule_start_time'])) {\n\t\t$dpProAppointments['schedule_start_time'] = '08:00';\t\n\t}\n\t\n\tif(!isset($dpProAppointments['schedule_end_time'])) {\n\t\t$dpProAppointments['schedule_end_time'] = '17:00';\t\n\t}\n?>\n\n<div class=\"wrap\" style=\"clear:both;\" id=\"dp_options\">\n\n<h2></h2>\n<?php $url = dpProAppointments_admin_url( array( 'page' => 'dpProAppointments-admin' ) );?>\n\n<form method=\"post\" id=\"dpProAppointments_events_meta\" action=\"options.php\" enctype=\"multipart/form-data\">\n<?php settings_fields('dpProAppointments-group'); ?>\n<div style=\"clear:both;\"></div>\n <!--end of poststuff --> \n\t\n <div id=\"dp_ui_content\">\n \t\n <div id=\"leftSide\">\n \t<div id=\"dp_logo\"></div>\n <p>\n Version: <?php echo DP_APPOINTMENTS_VER?><br />\n </p>\n <ul id=\"menu\" class=\"nav\">\n <li><a href=\"javascript:void(0);\" class=\"active\" title=\"\"><span><?php _e('General Settings','dpProAppointments'); ?></span></a></li>\n\t <li><a href=\"admin.php?page=dpProAppointments-admin\" title=\"\"><span><?php _e('Appointments','dpProAppointments'); ?></span></a></li> \n <li><a href=\"admin.php?page=dpProAppointments-payments\" title=\"\"><span><?php _e('Payment Options','dpProAppointments'); ?></span></a></li>\n <li><a href=\"admin.php?page=dpProAppointments-custom-shortcodes\" title=\"\"><span><?php _e('Shortcode Generator','dpProAppointments'); ?></span></a></li> \n </ul>\n \n <div class=\"clear\"></div>\n\t\t</div> \n \n <div id=\"rightSide\">\n \t<div id=\"menu_general_settings\">\n <div class=\"titleArea\">\n <div class=\"wrapper\">\n <div class=\"pageTitle\">\n <h5><?php _e('General Settings','dpProAppointments'); ?></h5>\n <span></span>\n </div>\n \n <div class=\"clear\"></div>\n </div>\n </div>\n \n <div class=\"wrapper\">\n \n <div class=\"option option-select option_w\">\n <div class=\"option-inner\">\n <label class=\"titledesc\"><?php _e('User Roles:','dpProAppointments'); ?></label>\n <div class=\"formcontainer\">\n <div class=\"forminp\">\n <select name='dpProAppointments_options[user_roles][]' multiple=\"multiple\" class=\"multiple\">\n \t<option value=\"\"><?php _e('None','dpProAppointments'); ?></option>\n <?php \n\t\t\t\t\t\t\t\t\t $user_roles = '';\n $editable_roles = get_editable_roles();\n\n\t\t\t\t\t\t\t\t foreach ( $editable_roles as $role => $details ) {\n\t\t\t\t\t\t\t\t $name = translate_user_role($details['name'] );\n\t\t\t\t\t\t\t\t if(esc_attr($role) == \"administrator\" || esc_attr($role) == \"subscriber\") { continue; }\n\t\t\t\t\t\t\t\t\t\t if ( in_array($role, $dpProAppointments['user_roles']) ) // preselect specified role\n\t\t\t\t\t\t\t\t $user_roles .= \"\\n\\t<option selected='selected' value='\" . esc_attr($role) . \"'>$name</option>\";\n\t\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t\t $user_roles .= \"\\n\\t<option value='\" . esc_attr($role) . \"'>$name</option>\";\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t echo $user_roles;\n\t\t\t\t\t\t\t\t\t ?>\n </select>\n <br>\n </div>\n <div class=\"desc\"><?php _e('Select the user role that will manage the plugin.','dpProAppointments'); ?></div>\n </div>\n </div>\n </div>\n <div class=\"clear\"></div>\n \n <div class=\"option option-select option_w\">\n <div class=\"option-inner\">\n <label class=\"titledesc\"><?php _e('Custom CSS:','dpProAppointments'); ?></label>\n <div class=\"formcontainer\">\n <div class=\"forminp\">\n <textarea name='dpProAppointments_options[custom_css]' rows=\"10\" placeholder=\".classname {\n\tbackground: #333;\n}\"><?php echo $dpProAppointments['custom_css']?></textarea>\n <br>\n </div>\n <div class=\"desc\"><?php _e('Add your custom CSS code.','dpProAppointments'); ?></div>\n </div>\n </div>\n </div>\n <div class=\"clear\"></div>\n \n <div class=\"option option-select\">\n <div class=\"option-inner\">\n <label class=\"titledesc\"><?php _e('First Day of the Week','dpProAppointments'); ?></label>\n <div class=\"formcontainer\">\n <div class=\"forminp\">\n <select name=\"dpProAppointments_options[first_day]\" id=\"dpProAppointments_first_day\" class=\"large-text\">\n \t<option value=\"0\" <?php if($dpProAppointments['first_day'] == \"0\") { echo 'selected=\"selected\"'; }?>><?php _e('Sunday','dpProAppointments'); ?></option>\n <option value=\"1\" <?php if($dpProAppointments['first_day'] == \"1\") { echo 'selected=\"selected\"'; }?>><?php _e('Monday','dpProAppointments'); ?></option>\n </select>\n <br>\n </div>\n <div class=\"desc\"><?php _e('Select the first day to display in the schedule','dpProAppointments'); ?></div>\n </div>\n </div>\n </div>\n <div class=\"clear\"></div>\n \n <div class=\"option option-select\">\n <div class=\"option-inner\">\n <label class=\"titledesc\"><?php _e('Time Base','dpProAppointments'); ?></label>\n <div class=\"formcontainer\">\n <div class=\"forminp\">\n <select name=\"dpProAppointments_options[time_base]\" id=\"dpProAppointments_time_base\" class=\"large-text\">\n \t<option value=\"10\" <?php if($dpProAppointments['time_base'] == \"10\") { echo 'selected=\"selected\"'; }?>>10 <?php _e('Minutes','dpProAppointments'); ?></option>\n <option value=\"15\" <?php if($dpProAppointments['time_base'] == \"15\") { echo 'selected=\"selected\"'; }?>>15 <?php _e('Minutes','dpProAppointments'); ?></option>\n <option value=\"30\" <?php if($dpProAppointments['time_base'] == \"30\" || empty($dpProAppointments['time_base'])) { echo 'selected=\"selected\"'; }?>>30 <?php _e('Minutes','dpProAppointments'); ?></option>\n <option value=\"60\" <?php if($dpProAppointments['time_base'] == \"60\") { echo 'selected=\"selected\"'; }?>>60 <?php _e('Minutes','dpProAppointments'); ?></option>\n <option value=\"90\" <?php if($dpProAppointments['time_base'] == \"90\") { echo 'selected=\"selected\"'; }?>>90 <?php _e('Minutes','dpProAppointments'); ?></option>\n <option value=\"105\" <?php if($dpProAppointments['time_base'] == \"105\") { echo 'selected=\"selected\"'; }?>>105 <?php _e('Minutes','dpProAppointments'); ?></option>\n <option value=\"120\" <?php if($dpProAppointments['time_base'] == \"120\") { echo 'selected=\"selected\"'; }?>>120 <?php _e('Minutes','dpProAppointments'); ?></option>\n </select>\n \n <br>\n </div>\n <div class=\"desc\"><?php _e('Select the time base for schedule intervals in minutes.','dpProAppointments'); ?></div>\n </div>\n </div>\n </div>\n <div class=\"clear\"></div>\n \n <div class=\"option option-select\">\n <div class=\"option-inner\">\n <label class=\"titledesc\"><?php _e('Max number of appointments','dpProAppointments'); ?></label>\n <div class=\"formcontainer\">\n <div class=\"forminp\">\n <input type=\"number\" name=\"dpProAppointments_options[capacity]\" id=\"dpProAppointments_capacity\" class=\"large-text\" width=\"100px;\" min=\"0\" max=\"9999\" value=\"<?php echo $dpProAppointments['capacity']?>\" />\n \n <br>\n </div>\n <div class=\"desc\"><?php _e('Select the max number of appointments allowed per block of time. Set to 0 for no limits.','dpProAppointments'); ?></div>\n </div>\n </div>\n </div>\n <div class=\"clear\"></div>\n \n <div class=\"option option-select\">\n <div class=\"option-inner\">\n <label class=\"titledesc\"><?php _e('Start / End Time on schedule view','dpProAppointments'); ?></label>\n <div class=\"formcontainer\">\n <div class=\"forminp\">\n <select name=\"dpProAppointments_options[schedule_start_time]\">\n\t\t\t\t\t\t\t\t\t\t<?php \n for($hour = 0; $hour <= 23; $hour++) {\n for($min = 0; $min < 60; $min+=30) {\n $h_pad = str_pad($hour, 2, '0', STR_PAD_LEFT);\n $m_pad = str_pad($min, 2, '0', STR_PAD_LEFT);\n ?>\n \n <option value=\"<?php echo $h_pad.':'.$m_pad?>\" <?php echo ($dpProAppointments['schedule_start_time'] == $h_pad.':'.$m_pad ? 'selected=\"selected\"' : '')?>><?php echo date(get_option('time_format'), mktime($hour, $min))?></option>\n \n <?php }\n }?>\n </select>\n \n <select name=\"dpProAppointments_options[schedule_end_time]\">\n\t\t\t\t\t\t\t\t\t\t<?php \n for($hour = 0; $hour <= 23; $hour++) {\n for($min = 0; $min < 60; $min+=30) {\n $h_pad = str_pad($hour, 2, '0', STR_PAD_LEFT);\n $m_pad = str_pad($min, 2, '0', STR_PAD_LEFT);\n ?>\n \n <option value=\"<?php echo $h_pad.':'.$m_pad?>\" <?php echo ($dpProAppointments['schedule_end_time'] == $h_pad.':'.$m_pad ? 'selected=\"selected\"' : '')?>><?php echo date(get_option('time_format'), mktime($hour, $min))?></option>\n \n <?php }\n }?>\n </select>\n <br>\n </div>\n <div class=\"desc\"><?php _e('Select the start / end time to display in the schedule view.','dpProAppointments'); ?></div>\n </div>\n </div>\n </div>\n <div class=\"clear\"></div>\n \n <div class=\"option option-select\">\n <div class=\"option-inner\">\n <label class=\"titledesc\"><?php _e('Block next time slots (hours)','dpProAppointments'); ?></label>\n <div class=\"formcontainer\">\n <div class=\"forminp\">\n <input type=\"number\" name=\"dpProAppointments_options[block_hours]\" id=\"dpProAppointments_block_hours\" class=\"large-text\" width=\"100px;\" min=\"0\" max=\"9999\" value=\"<?php echo $dpProAppointments['block_hours']?>\" />\n \n <br>\n </div>\n <div class=\"desc\"><?php _e('Block time slots with the value set in reference to the current time, so users can\\'t set an appointment in those hours. i.e: If you need 2 days before approving an event, you should set 48 hours. Default: 0.','dpProAppointments'); ?></div>\n </div>\n </div>\n </div>\n <div class=\"clear\"></div>\n \n <div class=\"option option-select option_w\">\n <div class=\"option-inner\">\n <label class=\"titledesc\"><?php _e('Approve Appointments automatically','dpProAppointments'); ?></label>\n <div class=\"formcontainer\">\n <div class=\"forminp\">\n <input type=\"checkbox\" value=\"1\" <?php echo ($dpProAppointments['approve_automatically'] ? \"checked='checked'\" : \"\")?> name='dpProAppointments_options[approve_automatically]' class=\"checkbox\"/>\n <br>\n </div>\n <div class=\"desc\"><?php _e('Appointments will be automatically approved.','dpProAppointments'); ?></div>\n </div>\n </div>\n </div>\n <div class=\"clear\"></div>\n \n <div class=\"option option-select option_w\">\n <div class=\"option-inner\">\n <label class=\"titledesc\"><?php _e('Terms & Conditions Page','dpProAppointments'); ?></label>\n <div class=\"formcontainer\">\n <div class=\"forminp\">\n <select name=\"dpProAppointments_options[terms_conditions]\">\n \t<option value=\"\"></option>\n <?php \n\t\t\t\t\t\t\t\t\t\t $pages = get_pages(); \n\t\t\t\t\t\t\t\t\t\t foreach ( $pages as $page ) {\n\t\t\t\t\t\t\t\t\t\t\t$option = '<option value=\"' . $page->ID . '\" ' . ($page->ID == $dpProAppointments['terms_conditions'] ? 'selected=\"selected\"' : '') . '>';\n\t\t\t\t\t\t\t\t\t\t\t$option .= $page->post_title;\n\t\t\t\t\t\t\t\t\t\t\t$option .= '</option>';\n\t\t\t\t\t\t\t\t\t\t\techo $option;\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t ?>\n </select>\n <br>\n </div>\n <div class=\"desc\"><?php _e('Select the Terms & Conditions page for new appointments','dpProAppointments'); ?></div>\n </div>\n </div>\n </div>\n <div class=\"clear\"></div>\n \n <div class=\"option option-select option_w\">\n <div class=\"option-inner\">\n <label class=\"titledesc\"><?php _e('Appointment Fields','dpProAppointments'); ?></label>\n <div class=\"formcontainer\">\n <div class=\"forminp\">\n <input type=\"checkbox\" value=\"city\" <?php echo (in_array('city', $dpProAppointments['appointment_fields']) ? \"checked='checked'\" : \"\")?> name='dpProAppointments_options[appointment_fields][]' class=\"checkbox\"/> <?php _e('City', 'dpProAppointments')?>\n <br>\n <input type=\"checkbox\" value=\"address\" <?php echo (in_array('address', $dpProAppointments['appointment_fields']) ? \"checked='checked'\" : \"\")?> name='dpProAppointments_options[appointment_fields][]' class=\"checkbox\"/> <?php _e('Address', 'dpProAppointments')?>\n <br>\n <input type=\"checkbox\" value=\"note\" <?php echo (in_array('note', $dpProAppointments['appointment_fields']) ? \"checked='checked'\" : \"\")?> name='dpProAppointments_options[appointment_fields][]' class=\"checkbox\"/> <?php _e('Note', 'dpProAppointments')?>\n <br>\n </div>\n <div class=\"desc\"><?php _e('Select the fields to display in the appointment form.','dpProAppointments'); ?></div>\n </div>\n </div>\n </div>\n <div class=\"clear\">\n \n <div class=\"option option-checkbox\">\n <div class=\"option-inner\">\n <label class=\"titledesc\"><?php _e('Allow not logged in users to set an appointment','dpProAppointments'); ?></label>\n <div class=\"formcontainer\">\n <div class=\"forminp\">\n <input type=\"checkbox\" name=\"dpProAppointments_options[appointment_not_logged]\" class=\"checkbox\" value=\"1\" <?php if($dpProAppointments['appointment_not_logged']) {?>checked=\"checked\" <?php }?> />\n <br>\n </div>\n <div class=\"desc\"><?php _e('A Full name and email field will be required in the appointment form.','dpProAppointments'); ?></div>\n </div>\n </div>\n </div>\n <div class=\"clear\"></div>\n \n <div class=\"option option-select option_w\">\n <div class=\"option-inner\">\n <label class=\"titledesc\"><?php _e('Email address to send notifications from:','dpProAppointments'); ?></label>\n <div class=\"formcontainer\">\n <div class=\"forminp\">\n <input type=\"text\" value=\"<?php echo $dpProAppointments['wp_mail_from']?>\" name='dpProAppointments_options[wp_mail_from]' class=\"large-text\" placeholder=\"wordpress@<?php echo str_replace(\"www.\", \"\", $_SERVER['HTTP_HOST'])?>\"/>\n <br>\n </div>\n <div class=\"desc\"></div>\n </div>\n </div>\n </div>\n <div class=\"clear\"></div>\n \n <div class=\"option option-select option_w\">\n <div class=\"option-inner\">\n <label class=\"titledesc\"><?php _e('Email that will receive the user after creating an appointment','dpProAppointments'); ?></label>\n <div class=\"formcontainer\">\n <div class=\"forminp\">\n <textarea cols=\"20\" rows=\"5\" name='dpProAppointments_options[appointment_email_template_user]'><?php echo $dpProAppointments['appointment_email_template_user']?></textarea>\n <br>\n </div>\n <div class=\"desc\"><?php _e('Template of the email that will receive the user. Use the reserved tags to display dynamic data.','dpProAppointments'); ?></div>\n </div>\n </div>\n </div>\n <div class=\"clear\"></div>\n \n <div class=\"option option-select option_w\">\n <div class=\"option-inner\">\n <label class=\"titledesc\"><?php _e('Email that will receive the admin when a user creates an appointment','dpProAppointments'); ?></label>\n <div class=\"formcontainer\">\n <div class=\"forminp\">\n <textarea cols=\"20\" rows=\"5\" name='dpProAppointments_options[appointment_email_template_admin]'><?php echo $dpProAppointments['appointment_email_template_admin']?></textarea>\n <br>\n </div>\n <div class=\"desc\"><?php _e('Template of the email that will receive the admin. Use the reserved tags to display dynamic data.','dpProAppointments'); ?></div>\n </div>\n </div>\n </div>\n <div class=\"clear\"></div>\n \n <!--\n <div class=\"option option-select option_w\">\n <div class=\"option-inner\">\n <label class=\"titledesc\"><?php _e('RTL (Right-to-left) Support','dpProAppointments'); ?></label>\n <div class=\"formcontainer\">\n <div class=\"forminp\">\n <input type=\"checkbox\" value=\"1\" <?php echo ($dpProAppointments['rtl_support'] ? \"checked='checked'\" : \"\")?> name='dpProAppointments_options[rtl_support]' class=\"checkbox\"/>\n <br>\n </div>\n <div class=\"desc\"><?php _e('Add RTL support for the calendars.','dpProAppointments'); ?></div>\n </div>\n </div>\n </div>\n <div class=\"clear\"></div>-->\n \n <h2 class=\"subtitle accordion_title\" onclick=\"showAccordionAppointments('div_reminders');\"><?php _e('Reminders','dpProAppointments'); ?></h2>\n \n <div id=\"div_reminders\" style=\"display:none;\">\n \t\n <div class=\"option option-select option_w\">\n <div class=\"option-inner\">\n <label class=\"titledesc\"><?php _e('Enable Reminders','dpProAppointments'); ?></label>\n <div class=\"formcontainer\">\n <div class=\"forminp\">\n <input type=\"checkbox\" value=\"1\" <?php echo ($dpProAppointments['reminders_enable'] ? \"checked='checked'\" : \"\")?> name='dpProAppointments_options[reminders_enable]' class=\"checkbox\"/>\n <br>\n </div>\n <div class=\"desc\"><?php _e('enable reminders for appointments.','dpProAppointments'); ?></div>\n </div>\n </div>\n </div>\n <div class=\"clear\"></div>\n \n <div class=\"option option-select\">\n <div class=\"option-inner\">\n <label class=\"titledesc\"><?php _e('Days of anticipation','dpProAppointments'); ?></label>\n <div class=\"formcontainer\">\n <div class=\"forminp\">\n <input type=\"number\" name=\"dpProAppointments_options[reminder_anticipation]\" id=\"dpProAppointments_reminder_anticipation\" class=\"large-text\" width=\"100px;\" min=\"0\" max=\"999\" value=\"<?php echo (is_numeric($dpProAppointments['reminder_anticipation']) ? $dpProAppointments['reminder_anticipation'] : 1) ?>\" />\n \n <br>\n </div>\n <div class=\"desc\"><?php _e('Number of days before the appointment to send the reminder. Default: 1.','dpProAppointments'); ?></div>\n </div>\n </div>\n </div>\n <div class=\"clear\"></div>\n \n <div class=\"option option-select option_w\">\n <?php if($dpProAppointments['appointment_reminder_template_user'] == \"\") {\n\t\t\t\t\t\t\t$dpProAppointments['appointment_reminder_template_user'] = \"Hi #USERNAME#,\\n\\nWe would like to remind you that the day #APPOINTMENT_DATE# you have an appointment.\\n\\nKind Regards.\\n#SITE_NAME#\";;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n <div class=\"option-inner\">\n <label class=\"titledesc\"><?php _e('Email that will receive the user as the appointment reminder','dpProAppointments'); ?></label>\n <div class=\"formcontainer\">\n <div class=\"forminp\">\n <textarea cols=\"20\" rows=\"5\" name='dpProAppointments_options[appointment_reminder_template_user]'><?php echo $dpProAppointments['appointment_reminder_template_user']?></textarea>\n <br>\n </div>\n <div class=\"desc\"><?php _e('Template of the email that will receive the user. Use the reserved tags to display dynamic data.','dpProAppointments'); ?></div>\n </div>\n </div>\n </div>\n <div class=\"clear\"></div>\n \n </div>\n \n <h2 class=\"subtitle accordion_title\" onclick=\"showAccordionAppointments('div_working_days');\"><?php _e('Working Days / Hours','dpProAppointments'); ?></h2>\n \n <div id=\"div_working_days\" style=\"display:none;\">\n \n \t<div class=\"option option-select no_border\" id=\"list-service\">\n <div class=\"option-inner\">\n <label class=\"titledesc\"><?php _e('Service','dpProAppointments'); ?></label>\n <div class=\"formcontainer\">\n <div class=\"forminp\">\n <select name=\"\" id=\"\" onchange=\"changeServiceWorkingDays(this.value);\">\n\t <option value=\"\"><?php _e('Default','dpProAppointments'); ?></option>\n \t<?php\n\t\t\t\t\t\t\t\t\t\t\t$tax_terms = get_terms('pro_appointments_service', array('hide_empty' => false));\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif(is_array($tax_terms)) {\n\t\t\t\t\t\t\t\t\t\t\tforeach ($tax_terms as $tax_term) {\n\t\t\t\t\t\t\t\t\t\t\t?>\n \t<option value=\"<?php echo $tax_term->term_id?>\"><?php echo $tax_term->name ?></option>\n <?php }\n\t\t\t\t\t\t\t\t\t\t\t}?>\n </select>\n <br>\n </div>\n <div class=\"desc\"><?php _e('Select a service to set the Working Days.','dpProAppointments'); ?></div>\n </div>\n </div>\n </div>\n <div class=\"clear\"></div>\n \t\n <div class=\"working_days_default working_days_divs\">\n \n <table class=\"widefat\" cellpadding=\"0\" cellspacing=\"0\" id=\"\">\n <thead>\n <tr style=\"cursor:default !important;\">\n <th><?php _e('Day','dpProAppointments'); ?></th>\n <th><?php _e('Working','dpProAppointments'); ?></th>\n <th><?php _e('Start','dpProAppointments'); ?></th>\n <th><?php _e('End','dpProAppointments'); ?></th>\n </tr>\n </thead>\n <tbody>\n \n <?php\n $daynames = array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');\n \n foreach($daynames as $key) {\n ?>\n \n <tr id=\"\">\n \n <td>\n <?php _e($key, 'dpProAppointments')?>\n </td>\n \n <td>\n <select name=\"dpProAppointments_options[working_days][<?php echo $key?>][work]\">\n <option value=\"1\" <?php echo ($dpProAppointments['working_days'][$key]['work'] == 1 ? 'selected=\"selected\"' : '')?>><?php _e('Yes', 'dpProAppointments')?></option>\n <option value=\"0\" <?php echo ($dpProAppointments['working_days'][$key]['work'] == 0 ? 'selected=\"selected\"' : '')?>><?php _e('No', 'dpProAppointments')?></option>\n </select>\n </td>\n \n <td>\n <select name=\"dpProAppointments_options[working_days][<?php echo $key?>][start]\">\n <?php \n for($hour = 0; $hour <= 23; $hour++) {\n for($min = 0; $min < 60; $min+=30) {\n $h_pad = str_pad($hour, 2, '0', STR_PAD_LEFT);\n $m_pad = str_pad($min, 2, '0', STR_PAD_LEFT);\n ?>\n \n <option value=\"<?php echo $h_pad.':'.$m_pad?>\" <?php echo ($dpProAppointments['working_days'][$key]['start'] == $h_pad.':'.$m_pad ? 'selected=\"selected\"' : '')?>><?php echo date(get_option('time_format'), mktime($hour, $min))?></option>\n \n <?php }\n }?>\n </select>\n </td>\n \n <td>\n <select name=\"dpProAppointments_options[working_days][<?php echo $key?>][end]\">\n <?php \n for($hour = 0; $hour <= 23; $hour++) {\n for($min = 0; $min < 60; $min+=30) {\n $h_pad = str_pad($hour, 2, '0', STR_PAD_LEFT);\n $m_pad = str_pad($min, 2, '0', STR_PAD_LEFT);\n ?>\n \n <option value=\"<?php echo $h_pad.':'.$m_pad?>\" <?php echo ($dpProAppointments['working_days'][$key]['end'] == $h_pad.':'.$m_pad ? 'selected=\"selected\"' : '')?>><?php echo date(get_option('time_format'), mktime($hour, $min))?></option>\n \n <?php }\n }?>\n </select>\n </td>\n \n </tr>\n <?php }?>\n </tbody>\n <tfoot>\n <tr style=\"cursor:default !important;\">\n <th><?php _e('Day','dpProAppointments'); ?></th>\n <th><?php _e('Working','dpProAppointments'); ?></th>\n <th><?php _e('Start','dpProAppointments'); ?></th>\n <th><?php _e('End','dpProAppointments'); ?></th>\n </tr>\n </tfoot>\n </table>\n \n <h4><?php _e('Exceptions', 'dpProAppointments')?></h4>\n \n <?php _e('Add specific days that users won\\'t be able to set any appointment, like holidays. Format YYYY-MM-DD. Add multiple days separated by comma. i.e: 2015-12-24,2015-12-25', 'dpProAppointments')?>\n \n <input type=\"text\" value=\"<?php echo $dpProAppointments['exceptions']?>\" placeholder=\"2015-12-24,2015-12-25\" name=\"dpProAppointments_options[exceptions]\">\n\t\t\t\t\t</div>\n \n <?php\n\t\t\t\t\tif(is_array($tax_terms)) {\n\t\t\t\t\t\tforeach ($tax_terms as $tax_term) {\n\t\t\t\t\t?>\n \t<div class=\"working_days_service_<?php echo $tax_term->term_id?> working_days_divs\" style=\"display:none;\">\n \n <table class=\"widefat\" cellpadding=\"0\" cellspacing=\"0\" id=\"\">\n <thead>\n <tr style=\"cursor:default !important;\">\n <th><?php _e('Day','dpProAppointments'); ?></th>\n <th><?php _e('Working','dpProAppointments'); ?></th>\n <th><?php _e('Start','dpProAppointments'); ?></th>\n <th><?php _e('End','dpProAppointments'); ?></th>\n </tr>\n </thead>\n <tbody>\n \n <?php\n $daynames = array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');\n \n foreach($daynames as $key) {\n ?>\n \n <tr id=\"\">\n \n <td>\n <?php _e($key, 'dpProAppointments')?>\n </td>\n \n <td>\n <select name=\"dpProAppointments_options[service_<?php echo $tax_term->term_id?>][working_days][<?php echo $key?>][work]\">\n <option value=\"1\" <?php echo ($dpProAppointments['service_'.$tax_term->term_id]['working_days'][$key]['work'] == 1 ? 'selected=\"selected\"' : '')?>><?php _e('Yes', 'dpProAppointments')?></option>\n <option value=\"0\" <?php echo ($dpProAppointments['service_'.$tax_term->term_id]['working_days'][$key]['work'] == 0 ? 'selected=\"selected\"' : '')?>><?php _e('No', 'dpProAppointments')?></option>\n </select>\n </td>\n \n <td>\n <select name=\"dpProAppointments_options[service_<?php echo $tax_term->term_id?>][working_days][<?php echo $key?>][start]\">\n <?php \n for($hour = 0; $hour <= 23; $hour++) {\n for($min = 0; $min < 60; $min+=30) {\n $h_pad = str_pad($hour, 2, '0', STR_PAD_LEFT);\n $m_pad = str_pad($min, 2, '0', STR_PAD_LEFT);\n ?>\n \n <option value=\"<?php echo $h_pad.':'.$m_pad?>\" <?php echo ($dpProAppointments['service_'.$tax_term->term_id]['working_days'][$key]['start'] == $h_pad.':'.$m_pad ? 'selected=\"selected\"' : '')?>><?php echo date(get_option('time_format'), mktime($hour, $min))?></option>\n \n <?php }\n }?>\n </select>\n </td>\n \n <td>\n <select name=\"dpProAppointments_options[service_<?php echo $tax_term->term_id?>][working_days][<?php echo $key?>][end]\">\n <?php \n for($hour = 0; $hour <= 23; $hour++) {\n for($min = 0; $min < 60; $min+=30) {\n $h_pad = str_pad($hour, 2, '0', STR_PAD_LEFT);\n $m_pad = str_pad($min, 2, '0', STR_PAD_LEFT);\n ?>\n \n <option value=\"<?php echo $h_pad.':'.$m_pad?>\" <?php echo ($dpProAppointments['service_'.$tax_term->term_id]['working_days'][$key]['end'] == $h_pad.':'.$m_pad ? 'selected=\"selected\"' : '')?>><?php echo date(get_option('time_format'), mktime($hour, $min))?></option>\n \n <?php }\n }?>\n </select>\n </td>\n \n </tr>\n <?php }?>\n </tbody>\n <tfoot>\n <tr style=\"cursor:default !important;\">\n <th><?php _e('Day','dpProAppointments'); ?></th>\n <th><?php _e('Working','dpProAppointments'); ?></th>\n <th><?php _e('Start','dpProAppointments'); ?></th>\n <th><?php _e('End','dpProAppointments'); ?></th>\n </tr>\n </tfoot>\n </table>\n \n <h4><?php _e('Exceptions', 'dpProAppointments')?></h4>\n \n <?php _e('Add specific days that users won\\'t be able to set any appointment, like holidays. Format YYYY-MM-DD. Add multiple days separated by comma. i.e: 2015-12-24,2015-12-25', 'dpProAppointments')?>\n \n <input type=\"text\" value=\"<?php echo $dpProAppointments['service_'.$tax_term->term_id]['exceptions']?>\" placeholder=\"2015-12-24,2015-12-25\" name=\"dpProAppointments_options[service_<?php echo $tax_term->term_id?>][exceptions]\">\n\t\t\t\t\t</div>\n \n <?php \n\t\t\t\t\t\t}\n\t\t\t\t\t}?>\n </div>\n \n </div>\n </div>\n </div>\n <div class=\"clear\"></div>\n </div>\n\t\n <p align=\"right\">\n\t\t<input type=\"submit\" class=\"button-primary\" value=\"<?php _e('Save Changes') ?>\" />\n </p>\n</form>\n\n<script type=\"text/javascript\">\nfunction changeServiceWorkingDays(value) {\n\tjQuery('.working_days_divs').hide();\n\t\n\tif(value != \"\") {\n\t\tjQuery('.working_days_service_'+value).show();\n\t} else {\n\t\tjQuery('.working_days_default').show();\n\t}\n}\n</script>\n \n</div> <!--end of float wrap -->\n\n\n<?php\t\n}", "title": "" }, { "docid": "9d9f97df8c6b7f64b483a045af885f74", "score": "0.57293284", "text": "public function update_social_site_settings() {\n unset($_POST['save']);\n $SEO_data ['id'] = 6;\n $SEO_data ['event'] = 'social_sites';\n $SEO_data ['details'] = json_encode($_POST);\n $check_settings_exist = $this->vsm->Check_settings_exist('settings', 6);\n if ($check_settings_exist == 0) {\n $this->sm->save_settings('settings', $SEO_data);\n } else {\n $this->sm->update_settings('settings', $SEO_data, 6);\n }\n $this->session->set_flashdata('message', display('update_message'));\n redirect('admin/Seo/social_sites');\n }", "title": "" }, { "docid": "5666c8373c6817d58aebdfc343957cf4", "score": "0.5728733", "text": "public function storeSetting()\n {\n }", "title": "" }, { "docid": "a15b02517cd557aea9fe8f0f3f98fdd0", "score": "0.5722474", "text": "public function sd_gmapsGeneralSettings(){\n\t\tif(isset($_POST[self::META_KEY_GMAP_SETTING_SUBMIT])){\n\t\t\tself::saveGeneralSettings();\n\t\t}\n\t\tinclude __DIR__.'/templates/backend/general-settings.php';\n\t}", "title": "" }, { "docid": "fb3fc1ff05eb4c7fef741b4fb7d85f06", "score": "0.57217324", "text": "function google_noscript_panel() {\n if (isset($_POST['save_no_script_settings'])) {\n $option_noscript_google_ua = $_POST['noscript_google_ua'];\n update_option('noscript_google_ua', $option_noscript_google_ua);\n ?>\n<div class=\"updated\">\n <p>No Script analytics settings saved</p>\n</div>\n<?php\n }\n?>\n<div class=\"wrap\">\n <h2>Google No Script Google Analytic Settings</h2>\n\n <form method=\"post\">\n <table class=\"form-table\">\n <tr valign=\"top\">\n <th scope=\"row\">Analytics Account ID</th>\n <td>\n <input name=\"noscript_google_ua\" type=\"text\" id=\"flickr_id\" value=\"\"<?php echo get_option('noscript_google_ua'); ?>\" size=\"20\" />\n </td>\n </tr>\n </table>\n <div class=\"submit\">\n <input type=\"submit\" name=\"save_no_script_settings\" value=\"\"<?php _e('Save Settings', 'save_no_script_settings') ?>\" />\n </div>\n </form>\n</div>\n<?php\n}", "title": "" }, { "docid": "43d37ba06ee43695a8d9ac08efce68c5", "score": "0.5720431", "text": "function panels_ab_random_access_settings_submit(&$form, &$form_state) {\n $form_state['values']['settings']['prob'] = $form_state['values']['settings']['prob'];\n}", "title": "" }, { "docid": "fca8487365e8e94eb134b346fe346fe8", "score": "0.5719331", "text": "function my_standard_settings($position, $form_id){\nif($position == 25){\n?>\n<li class=\"admin_label_setting field_setting\" style=\"display: list-item; \">\n<label for=\"field_placeholder\">Placeholder Text\n<!-- Tooltip to help users understand what this field does -->\n<a href=\"javascript:void(0);\" class=\"tooltip tooltip_form_field_placeholder\" tooltip=\"&lt;h6&gt;Placeholder&lt;/h6&gt;Enter the placeholder/default text for this field.\">(?)</a>\n</label>\n<input type=\"text\" id=\"field_placeholder\" class=\"fieldwidth-3\" size=\"35\" onkeyup=\"SetFieldProperty('placeholder', this.value);\">\n</li>\n<?php } }", "title": "" }, { "docid": "80143f76499678828f0aacd90c8511c2", "score": "0.571879", "text": "public static function add_settings( $array, $x ) {\n $default = $x['default'];\n $settings = $x['settings'];\n $array['mailster'] = array( \n 'hidden' => 'settings',\n 'name' => esc_html__( 'Mailster Settings', 'super-forms' ),\n 'label' => esc_html__( 'Mailster Settings', 'super-forms' ),\n 'fields' => array(\n 'mailster_enabled' => array(\n 'desc' => esc_html__( 'This will save a subscriber for Mailster', 'super-forms' ), \n 'default' => '',\n 'type' => 'checkbox', \n 'filter'=>true,\n 'values' => array(\n 'true' => esc_html__( 'Add Mailster subscriber', 'super-forms' ),\n )\n ),\n\n // @since 1.0.2 - conditionally save mailster subscriber based on user input\n 'mailster_conditionally_save' => array(\n 'hidden_setting' => true,\n 'default' => '',\n 'type' => 'checkbox',\n 'filter'=>true,\n 'values' => array(\n 'true' => esc_html__( 'Conditionally save subscriber based on user data', 'super-forms' ),\n ),\n 'parent' => 'mailster_enabled',\n 'filter_value' => 'true',\n ),\n 'mailster_conditionally_save_check' => array(\n 'hidden_setting' => true,\n 'type' => 'conditional_check',\n 'name' => esc_html__( 'Only save subscriber when following condition is met', 'super-forms' ),\n 'label' => esc_html__( 'Your are allowed to enter field {tags} to do the check', 'super-forms' ),\n 'default' => '',\n 'placeholder' => \"{fieldname},value\",\n 'filter'=>true,\n 'parent' => 'mailster_conditionally_save',\n 'filter_value' => 'true',\n 'allow_empty'=>true,\n ),\n\n 'mailster_email' => array(\n 'name' => esc_html__( 'Subscriber email address', 'super-forms' ), \n 'desc' => esc_html__( 'This will save the entered email by the user as the subsriber email address', 'super-forms' ), \n 'default' => '{email}',\n 'filter'=>true,\n 'parent' => 'mailster_enabled',\n 'filter_value' => 'true',\n 'allow_empty' => true,\n ),\n 'mailster_fields' => array(\n 'name' => esc_html__( 'Save Mailster user data', 'super-forms' ), \n 'label' => sprintf( esc_html__( 'Separate Mailster field and field_name by pipes \"|\" (put each on a new line).%sExample: mailster_field_name|super_forms_field_name%sWith this method you can save custom Mailster user data', 'super-forms' ), '<br />', '<br />' ),\n 'desc' => esc_html__( 'Enter the fields that need to be saved for a subscriber', 'super-forms' ), \n 'default' => \"lastname|last_name\\nfirstname|first_name\",\n 'type' => 'textarea',\n 'filter'=>true,\n 'parent' => 'mailster_enabled',\n 'filter_value' => 'true',\n 'allow_empty' => true,\n ),\n 'mailster_lists' => array(\n 'name' => esc_html__( 'Subscriber list ID(\\'s) separated by comma\\'s', 'super-forms' ), \n 'label' => esc_html__( 'You are allowed to use a {tag} if you want to allow the user to choose a list from your form', 'super-forms' ),\n 'desc' => esc_html__( 'Enter the list ID\\'s or enter a {tag}', 'super-forms' ), \n 'default' => '{lists}',\n 'filter'=>true,\n 'parent' => 'mailster_enabled',\n 'filter_value' => 'true',\n 'allow_empty' => true,\n ),\n\n )\n );\n return $array;\n }", "title": "" }, { "docid": "e6c98e9550ecc79228c2a7a74afc9272", "score": "0.57165676", "text": "function register_custom_settings() \n{\n\n register_setting('rw-theme-settings', 'rw_theme_settings');\n\n // Theme Settings\n add_settings_section('rw-theme-settings', 'Theme Settings', 'rw_theme_settings_text', 'rw-theme-settings');\n add_settings_field( 'default_image', 'Default Image', 'rw_default_image', 'rw-theme-settings', 'rw-theme-settings', array('label_for'=>'default_image'));\n\n // Google Analytics\n add_settings_section('rw-analytics-settings', 'Site Stats Settings', 'rw_ga_settings_text', 'rw-theme-settings');\n add_settings_field( 'ga_id', 'Google Analytics ID', 'rw_ga_id', 'rw-theme-settings', 'rw-analytics-settings', array('label_for'=>'ga_id'));\n\n // Facebook Stuff\n add_settings_section('rw-facebook-settings', 'Facebook Settings', 'rw_fb_settings_text', 'rw-theme-settings');\n add_settings_field( 'fb_page_url', 'Facebook Page URL', 'rw_fb_page_url', 'rw-theme-settings', 'rw-facebook-settings', array('label_for'=>'fb_page_url'));\n add_settings_field( 'fb_admins', 'Facebook Admin IDs (optional)', 'rw_fb_admins', 'rw-theme-settings', 'rw-facebook-settings', array('label_for'=>'fb_admins'));\n add_settings_field( 'fb_appid', 'Facebook Page ID (optional)', 'rw_fb_appid', 'rw-theme-settings', 'rw-facebook-settings', array('label_for'=>'fb_appid'));\n\n do_action( 'custom_settings_hook' );\n}", "title": "" }, { "docid": "cb3c1a735c1c92271ced9775486cf28e", "score": "0.57155514", "text": "function argentinagobar_migtram_campo_edit_form_submit($form, &$form_state) {\n foreach (array_keys($form_state['plugin']['defaults']) as $key) {\n if (isset($form_state['values'][$key])) {\n $form_state['conf'][$key] = $form_state['values'][$key];\n }\n }\n}", "title": "" }, { "docid": "092aabc6fe6955f3fe04e177a59d2009", "score": "0.57139814", "text": "function edan_record_settings_form($form, &$form_state) {\n $form['menu_record_page'] = array(\n '#type' => 'textfield',\n '#title' => t('Record Path'),\n '#default_value' => _edan_record_variable_get('menu_record_page'),\n '#description' => t('The base path for record pages.'),\n '#required' => TRUE,\n );\n\n $form['field_order'] = array(\n '#type' => 'textarea',\n '#title' => t('Field Order'),\n '#default_value' => @implode(\"\\n\", _edan_record_variable_get('field_order')),\n '#description' => t('Metadata to show on a record page. Each field should be on its own line. Leave blank for all. Enter 0 for none. If you want to specify a set of fields and then show the remaining add an * as the last line. Examples of topics: creditLine dataSource objectType.'),\n '#required' => FALSE,\n );\n\n // hpham: added settings for edan_image variables\n $image = variable_get('edan_image', array());\n\n $form['edan_image'] = array(\n '#type' => 'fieldset',\n '#title' => t('Image Settings'),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n '#tree' => TRUE\n );\n $form['edan_image']['ids'] = array(\n '#type' => 'textfield',\n '#title' => t('IDS Default Link'),\n '#default_value' => isset($image['ids']) ? $image['ids'] : 'http://ids.si.edu/ids/deliveryService',\n );\n $form['edan_image']['dynamic'] = array(\n '#type' => 'textfield',\n '#title' => t('IDS Dynamic Link'),\n '#default_value' => isset($image['dynamic']) ? $image['dynamic'] : 'http://ids.si.edu/ids/dynamic',\n );\n\n $form['edan_image']['thumbnail'] = array(\n '#type' => 'textfield',\n '#title' => t('Thumbnail'),\n '#default_value' => isset($image['thumbnail']) ? $image['thumbnail'] : '100',\n '#description' => t(\"Thumbnails are used for slideshow navigation.\"),\n );\n $form['edan_image']['medium'] = array(\n '#type' => 'textfield',\n '#title' => t('Search Results'),\n '#default_value' => isset($image['medium']) ? $image['medium'] : '300',\n '#description' => t(\"Set the image size for images when appearing as part of the search results.\"),\n );\n $form['edan_image']['large'] = array(\n '#type' => 'textfield',\n '#title' => t('Object Page'),\n '#default_value' => isset($image['large']) ? $image['large'] : '700',\n '#description' => t(\"Set the image size for the object page.\"),\n );\n\n $form['edan_image']['constrain'] = array(\n '#type' => 'select',\n '#title' => t('Constrain Image To'),\n '#options' => array(\n 'max_h' => t('Height'),\n 'max_w' => t('Width'),\n 'max' => t('Both')\n ),\n '#default_value' => isset($image['constrain']) ? $image['constrain'] : 'max',\n '#description' => t(\"Determine to apply the sizes above to the height, width or both.\"),\n );\n\n $form['show_within_site'] = array(\n '#type' => 'checkbox',\n '#title' => t('Always show EDAN Records within this website'),\n '#default_value' => _edan_record_variable_get('show_within_site'),\n '#description' => t(\"Check this box if you want to display all EDAN objects within this website. Leaving the box un-checked means that any EDAN Record that does not belong to this website's unit will be linked to its source record on another website.\"),\n '#required' => FALSE,\n );\n\n $form['actions'] = array('#type' => 'actions');\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "title": "" }, { "docid": "a22e58fc5bf7ba8a46769512efe00292", "score": "0.5710806", "text": "function nak_gp_setting_input() {\n\t\n\t\tglobal $get_page;\n\t\t\n\t\t// get option 'text_string' value from the database\n\t\t$options = get_option( 'nak_gp_options' );\n\t\t\n\t\t?>\n\t\t\n\t\t\n<div class=\"widget-liquid-left\">\n<div id=\"widgets-left\">\t\t\n\t\t\n\t\t<div class=\"postbox-container\">\n\t\t\n\t\t\t<div class=\"metabox-holder\">\n\t\t\t\n\t\t\t\t<div class=\"postbox\" id=\"settings\">\n\t\t\n\t\t\t\t\t<table class=\"form-table\">\n\t\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t\t\t<th scope=\"row\">Username / Email</th>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<input type=\"text\" name=\"nak_gp_options[username]\" value=\"<?php echo $options['username']; ?>\" />\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th scope=\"row\">Password</th>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<input type=\"password\" name=\"nak_gp_options[password]\" value=\"<?php echo $options['password']; ?>\" />\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th scope=\"row\">Number of album results per page</th>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<input type=\"number\" name=\"nak_gp_options[max_album_results]\" value=\"<?php echo $options['max_album_results']; ?>\" />\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th scope=\"row\">Album thumbnail size (px)</th>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<input type=\"number\" name=\"nak_gp_options[album_thumb_size]\" value=\"<?php echo $options['album_thumb_size']; ?>\" />\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th scope=\"row\">Number of image results per page</th>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<input type=\"number\" name=\"nak_gp_options[max_results]\" value=\"<?php echo $options['max_results']; ?>\" />\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th scope=\"row\">Thumbnail size (px)</th>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<input type=\"number\" name=\"nak_gp_options[thumb_size]\" value=\"<?php echo $options['thumb_size']; ?>\" />\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th scope=\"row\">Lightbox image size (px)</th>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<input type=\"number\" name=\"nak_gp_options[max_image_size]\" value=\"<?php echo $options['max_image_size']; ?>\" />\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th>Page to show album results on </th>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<select style=\"width:240px;\" name=\"nak_gp_options[album_results_page]\" id=\"\">\n\t\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\t\tforeach(list_pages() as $key => $page)\n\t\t\t\t\t\t\t\t{ \t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t?><option value=\"<?php echo $key; ?>\" <?php if ( $options['album_results_page'] == $key) { echo 'selected=\"selected\"'; } ?>><?php echo $page; ?></option>\n\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t<small>This is the page to place the shortcode, [nak_google_picasa_album_images]</small>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t</table>\n\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<input type=\"submit\" name=\"submit\" class=\"button-primary\" value=\"<?php _e('Save Changes') ?>\" />\n\n\t\t\t</div>\n\t\t\t\n\t\t</div>\n\t\t\n\t\t\n</div>\n</div>\t\t\n\t\t\n\t\t\n\t\t\n\t\t<?php\n\t}", "title": "" }, { "docid": "e8508ada57d298453ef05b0723d418c8", "score": "0.5710574", "text": "function display_options(){\n\n /*start general section*/\nadd_settings_section(\"dealer_general_section\", \"General Information <i class='fa fa-caret-right'></i>\", \"display_general_description\", \"dealership-information\" );\n add_settings_field(\"dealership_name\", \"Dealership Name\", \"display_single_text_element\", \"dealership-information\", \"dealer_general_section\", array('type'=>'text','label_for'=>\"dealership_name\", 'comment'=>'') );\n register_setting(\"dealer_information_section\", \"dealership_name\");\n add_settings_field(\"dealership_tagline\", \"Tag Line\", \"display_single_text_element\", \"dealership-information\", \"dealer_general_section\", array( 'type'=>'text','label_for'=>\"dealership_tagline\", 'comment'=>'') );\n register_setting(\"dealer_information_section\", \"dealership_tagline\");\n add_settings_field(\"dealership_makes\", \"Dealership Make(s)\", \"display_single_text_element\", \"dealership-information\", \"dealer_general_section\", array( 'type'=>'text','label_for'=>\"dealership_makes\", 'comment'=>'') );\n register_setting(\"dealer_information_section\", \"dealership_makes\");\n add_settings_field(\"dealership_manager\", \"Manager's Best Price Name\", \"display_single_text_element\", \"dealership-information\", \"dealer_general_section\", array( 'type'=>'text','label_for'=>\"dealership_manager\",'comment'=>'Defaults to use \"Manager\\'s\" if no name provided' ) );\n register_setting(\"dealer_information_section\", \"dealership_manager\" );\n add_settings_field(\"dealership_manager_pic\", \"Manager's Picture\", \"display_media_element\", \"dealership-information\", \"dealer_general_section\", array( 'label_for'=>\"dealership_manager_pic\" ) );\n register_setting(\"dealer_information_section\", \"dealership_manager_pic\", 'handle_file_upload');\n add_settings_field(\"dealership_disclaimer\", \"Standard Disclaimer\", \"display_single_textarea_element\", \"dealership-information\", \"dealer_general_section\", array( 'type'=>'textarea','label_for'=>\"dealership_disclaimer\", 'comment'=>'Displayed on any page the has inventory' ) );\n register_setting(\"dealer_information_section\", \"dealership_disclaimer\");\n\n /*start dealer contact section*/\nadd_settings_section(\"dealer_contact_person_section\", \"Dealership Contact Person <i class='fa fa-caret-right'></i>\", \"display_contact_description\", \"dealership-information\" );\n add_settings_field(\"contact_name\", \"Contact Name\", \"display_combined_text_element\", \"dealership-information\", \"dealer_contact_person_section\", array('type'=>'text','label_for'=>\"contact_name\", 'option'=>'dealership_contact_person', 'comment'=>'' ) );\n add_settings_field(\"contact_email\", \"Email\", \"display_combined_text_element\", \"dealership-information\", \"dealer_contact_person_section\", array( 'type'=>'email','label_for'=>\"contact_email\", 'option'=>'dealership_contact_person', 'comment'=>'' ) );\n add_settings_field(\"contact_phone\", \"Phone\", \"display_combined_text_element\", \"dealership-information\", \"dealer_contact_person_section\", array( 'type'=>'text','label_for'=>\"contact_phone\", 'option'=>'dealership_contact_person', 'comment'=>'' ) );\n add_settings_field(\"contact_mobile\", \"Mobile\", \"display_combined_text_element\", \"dealership-information\", \"dealer_contact_person_section\", array( 'type'=>'text','label_for'=>\"contact_mobile\", 'option'=>'dealership_contact_person', 'comment'=>'' ) );\n register_setting(\"dealer_information_section\", \"dealership_contact_person\");\n\n /*start address section*/\nadd_settings_section(\"dealer_address_section\", \"Dealership Address <i class='fa fa-caret-right'></i>\", \"display_address_description\", \"dealership-information\");\n add_settings_field(\"dealership_street\", \"Street\", \"display_combined_text_element\", \"dealership-information\", \"dealer_address_section\", array( 'type'=>'text','label_for'=>\"dealership_street\", 'option'=>'dealership_address', 'comment'=>'' ) );\n add_settings_field(\"dealership_city\", \"City\", \"display_combined_text_element\", \"dealership-information\", \"dealer_address_section\", array( 'type'=>'text','label_for'=>\"dealership_city\", 'option'=>'dealership_address', 'comment'=>'' ) );\n add_settings_field(\"dealership_state\", \"State/Province\", \"display_combined_text_element\", \"dealership-information\", \"dealer_address_section\", array( 'type'=>'text','label_for'=>\"dealership_state\", 'option'=>'dealership_address', 'comment'=>'Please use abbreviation' ) );\n add_settings_field(\"dealership_zip\", \"Zip/Postal\", \"display_combined_text_element\", \"dealership-information\", \"dealer_address_section\", array( 'type'=>'text','label_for'=>\"dealership_zip\", 'option'=>'dealership_address', 'comment'=>'' ) );\n $o_CurrentUser = wp_get_current_user();\n if ( $o_CurrentUser->allcaps['administrator'] == '1' )\n add_settings_field(\"dealership_country\", \"Country\", \"display_select\", \"dealership-information\", \"dealer_address_section\", array( 'countries'=> array( 'US', 'CA' ),'label_for'=>\"dealership_country\", 'option'=>'dealership_address', 'comment'=>'' ) );\n register_setting(\"dealer_information_section\", \"dealership_address\");\n\n /*Sales Hours section */\nadd_settings_section(\"dealer_sales_hours_section\", \"Sales Hours <i class='fa fa-caret-right'></i>\", \"display_hours_description\", \"dealership-information\");\n add_settings_field(\"monday\", \"Monday\", \"display_combined_text_element\", \"dealership-information\", \"dealer_sales_hours_section\", array( 'type'=>'text','label_for'=>\"monday\", 'option'=>'dealership_sales_hours', 'comment'=>'' ) );\n add_settings_field(\"tuesday\", \"Tuesday\", \"display_combined_text_element\", \"dealership-information\", \"dealer_sales_hours_section\", array( 'type'=>'text','label_for'=>\"tuesday\", 'option'=>'dealership_sales_hours', 'comment'=>'' ) );\n add_settings_field(\"wednesday\", \"Wednesday\", \"display_combined_text_element\", \"dealership-information\", \"dealer_sales_hours_section\", array( 'type'=>'text','label_for'=>\"wednesday\", 'option'=>'dealership_sales_hours', 'comment'=>'' ) );\n add_settings_field(\"thursday\", \"Thursday\", \"display_combined_text_element\", \"dealership-information\", \"dealer_sales_hours_section\", array( 'type'=>'text','label_for'=>\"thursday\", 'option'=>'dealership_sales_hours', 'comment'=>'' ) );\n add_settings_field(\"friday\", \"Friday\", \"display_combined_text_element\", \"dealership-information\", \"dealer_sales_hours_section\", array( 'type'=>'text','label_for'=>\"friday\", 'option'=>'dealership_sales_hours', 'comment'=>'' ) );\n add_settings_field(\"saturday\", \"Saturday\", \"display_combined_text_element\", \"dealership-information\", \"dealer_sales_hours_section\", array( 'type'=>'text','label_for'=>\"saturday\", 'option'=>'dealership_sales_hours', 'comment'=>'' ) );\n add_settings_field(\"sunday\", \"Sunday\", \"display_combined_text_element\", \"dealership-information\", \"dealer_sales_hours_section\", array( 'type'=>'text','label_for'=>\"sunday\", 'option'=>'dealership_sales_hours', 'comment'=>'' ) );\n register_setting(\"dealer_information_section\", \"dealership_sales_hours\");\n\n /*Phone number section*/\nadd_settings_section(\"dealer_phone_section\", \"Dealership Phone Numbers <i class='fa fa-caret-right'></i>\", \"display_phone_description\", \"dealership-information\");\n add_settings_field(\"toll_free\", \"Toll Free\", \"display_combined_text_element\", \"dealership-information\", \"dealer_phone_section\", array( 'type'=>'text','label_for'=>\"toll_free\", 'option'=>'dealership_phone', 'comment'=>'' ) );\n add_settings_field(\"new_phone\", \"New Phone\", \"display_combined_text_element\", \"dealership-information\", \"dealer_phone_section\", array( 'type'=>'text','label_for'=>\"new_phone\", 'option'=>'dealership_phone', 'comment'=>'' ) );\n add_settings_field(\"used_phone\", \"Used Phone\", \"display_combined_text_element\", \"dealership-information\", \"dealer_phone_section\", array( 'type'=>'text','label_for'=>\"used_phone\", 'option'=>'dealership_phone', 'comment'=>'' ) );\n add_settings_field(\"mobile_phone\", \"SMS for Mobile Phone\", \"display_combined_element\", \"dealership-information\", \"dealer_phone_section\", array( 'type'=>'text','label_for'=>\"mobile_phone\", 'option'=>'dealership_phone', 'comment'=>'If you have a carrier not on the list please contact support at [email protected] and it will be added.' ) );\n add_settings_field(\"fax\", \"Fax\", \"display_combined_text_element\", \"dealership-information\", \"dealer_phone_section\", array( 'type'=>'text','label_for'=>\"fax\", 'option'=>'dealership_phone', 'comment'=>'' ) );\n register_setting(\"dealer_information_section\", \"dealership_phone\");\n\n /*Emails section*/\nadd_settings_section(\"dealer_email_section\", \"Dealership Emails <i class='fa fa-caret-right'></i>\", \"display_email_description\", \"dealership-information\");\n \tadd_settings_field(\"default_email\", \"Default Email\", \"display_combined_text_element\", \"dealership-information\", \"dealer_email_section\", array( 'type'=>'text','label_for'=>\"default_email\", 'option'=>'dealership_emails', 'comment'=>'Default for non-sales submissions or if no address provided' ) );\n \tadd_settings_field(\"hr_email\", \"Human Resources Email\", \"display_combined_text_element\", \"dealership-information\", \"dealer_email_section\", array( 'type'=>'text','label_for'=>\"hr_email\", 'option'=>'dealership_emails', 'comment'=>'For HR leads' ) );\n \tadd_settings_field(\"sales_email\", \"Sales Email\", \"display_combined_text_element\", \"dealership-information\", \"dealer_email_section\", array( 'type'=>'text','label_for'=>\"sales_email\", 'option'=>'dealership_emails', 'comment'=>'For sales leads' ) );\n \tadd_settings_field(\"credit_email\", \"Credit Email\", \"display_combined_text_element\", \"dealership-information\", \"dealer_email_section\", array( 'type'=>'text','label_for'=>\"credit_email\", 'option'=>'dealership_emails', 'comment'=>'For credit leads, if not provided sales email will be used' ) );\n \tadd_settings_field(\"adf_email\", \"ADF Email\", \"display_combined_text_element\", \"dealership-information\", \"dealer_email_section\", array( 'type'=>'text','label_for'=>\"adf_email\", 'option'=>'dealership_emails', 'comment'=>'For leads emailed to ADF/xml format to DMS' ) );\n \tregister_setting(\"dealer_information_section\", \"dealership_emails\");\n\n /*Social Media Links*/\nadd_settings_section(\"dealer_social_media_section\", \"Social Media Links <i class='fa fa-caret-right'></i>\", \"display_social_description\", \"dealership-information\");\n add_settings_field(\"facebook_url\", \"Facebook URL\", \"display_combined_text_element\", \"dealership-information\", \"dealer_social_media_section\", array( 'type'=>'text','label_for'=>\"facebook_url\", 'option'=>'dealership_social_media_links', 'comment'=>'' ) );\n add_settings_field(\"twitter_url\", \"Twitter URL\", \"display_combined_text_element\", \"dealership-information\", \"dealer_social_media_section\", array( 'type'=>'text','label_for'=>\"twitter_url\", 'option'=>'dealership_social_media_links', 'comment'=>'' ) );\n add_settings_field(\"youtube_url\", \"YouTube URL\", \"display_combined_text_element\", \"dealership-information\", \"dealer_social_media_section\", array( 'type'=>'text','label_for'=>\"youtube_url\", 'option'=>'dealership_social_media_links', 'comment'=>'' ) );\n add_settings_field(\"google_plus_url\", \"Google Plus URL\", \"display_combined_text_element\", \"dealership-information\", \"dealer_social_media_section\", array( 'type'=>'text','label_for'=>\"google_plus_url\", 'option'=>'dealership_social_media_links', 'comment'=>'' ) );\n add_settings_field(\"instagram_url\", \"Instagram URL\", \"display_combined_text_element\", \"dealership-information\", \"dealer_social_media_section\", array( 'type'=>'text','label_for'=>\"instagram_url\", 'option'=>'dealership_social_media_links', 'comment'=>'' ) );\n register_setting(\"dealer_information_section\", \"dealership_social_media_links\");\n\n /*Tracking and Conversion Codes*/\nadd_settings_section(\"dealer_added_codes_section\", \"Added Codes <i class='fa fa-caret-right'></i>\", \"display_codes_description\", \"dealership-information\");\n add_settings_field(\"pre_head\", \"Placed Before Closing HEAD Tag\", \"display_combined_textarea_element\", \"dealership-information\", \"dealer_added_codes_section\", array( 'type'=>'textarea','label_for'=>\"pre_head\", 'option'=>'dealership_added_code', 'comment'=> 'All Pages - Code to be placed before closing HEAD tag') );\n add_settings_field(\"pre_body\", \"Placed Before Closing BODY Tags\", \"display_combined_textarea_element\", \"dealership-information\", \"dealer_added_codes_section\", array( 'type'=>'textarea','label_for'=>\"pre_body\", 'option'=>'dealership_added_code', 'comment'=> 'All Pages - Code to be placed before closing BODY tag') );\n add_settings_field(\"thank_you\", \"Thank You Page Only\", \"display_combined_textarea_element\", \"dealership-information\", \"dealer_added_codes_section\", array( 'type'=>'textarea','label_for'=>\"thank_you\", 'option'=>'dealership_added_code', 'comment'=> 'Code placed before closing Body tag') );\n add_settings_field(\"home_only\", \"Home Page Only\", \"display_combined_textarea_element\", \"dealership-information\", \"dealer_added_codes_section\", array( 'type'=>'textarea','label_for'=>\"home_only\", 'option'=>'dealership_added_code', 'comment'=> 'Code placed before closing Body tag') );\n add_settings_field(\"vdp_only\", \"VDP Page Only\", \"display_combined_textarea_element\", \"dealership-information\", \"dealer_added_codes_section\", array( 'type'=>'textarea','label_for'=>\"vdp_only\", 'option'=>'dealership_added_code', 'comment'=> 'Code placed on VDP ONLY before closing Body tag') );\n register_setting(\"dealer_information_section\", \"dealership_added_code\");\n\n /*Potratz Contact person section*/\nadd_settings_section(\"potratz_contact_person_section\", \"DLD Websites CSR <i class='fa fa-caret-right'></i>\", \"display_contact_description\", \"dealership-information\" );\n add_settings_field(\"contact_name\", \"Contact Name\", \"display_combined_text_element\", \"dealership-information\", \"potratz_contact_person_section\", array('type'=>'text','label_for'=>\"contact_name\", 'option'=>'potratz_contact_person', 'comment'=>'' ) );\n add_settings_field(\"contact_email\", \"Email\", \"display_combined_text_element\", \"dealership-information\", \"potratz_contact_person_section\", array( 'type'=>'email','label_for'=>\"contact_email\", 'option'=>'potratz_contact_person', 'comment'=>'' ) );\n add_settings_field(\"contact_phone\", \"Phone\", \"display_combined_text_element\", \"dealership-information\", \"potratz_contact_person_section\", array( 'type'=>'text','label_for'=>\"contact_phone\", 'option'=>'potratz_contact_person' , 'comment'=>'') );\n add_settings_field(\"contact_mobile\", \"Mobile\", \"display_combined_text_element\", \"dealership-information\", \"potratz_contact_person_section\", array( 'type'=>'text','label_for'=>\"contact_mobile\", 'option'=>'potratz_contact_person', 'comment'=>'' ) );\n register_setting(\"dealer_information_section\", \"potratz_contact_person\");\n\n /*Dealer Options section*/\nadd_settings_section(\"dealer_options_section\", \"Dealer Options <i class='fa fa-caret-right'></i>\", \"display_hide_site_option_description\", \"dealership-information\" );\n add_settings_field(\"label_new_msrp\", \"New MSRP\", \"display_combined_text_element\", \"dealership-information\", \"dealer_options_section\", array( 'type'=>'text','label_for'=>\"label_new_msrp\", 'option'=>'dld_labels', 'comment'=>'', 'values'=> 'MSRP' ) );\n add_settings_field(\"label_used_msrp\", \"Used MSRP\", \"display_combined_text_element\", \"dealership-information\", \"dealer_options_section\", array( 'type'=>'text','label_for'=>\"label_used_msrp\", 'option'=>'dld_labels', 'comment'=>'', 'values'=> 'Our Price' ) ); \n add_settings_field(\"label_discount\", \"Discount Label\", \"display_combined_text_element\", \"dealership-information\", \"dealer_options_section\", array( 'type'=>'text','label_for'=>\"label_discount\", 'option'=>'dld_labels', 'comment'=>'', 'values'=> 'Discount' ) );\n add_settings_field(\"label_new_sale_price\", \"New Sale Price\", \"display_combined_text_element\", \"dealership-information\", \"dealer_options_section\", array( 'type'=>'text','label_for'=>\"label_new_sale_price\", 'option'=>'dld_labels', 'comment'=>'', 'values'=> 'Sale Price' ) );\n add_settings_field(\"label_used_sale_price\", \"Used Sale Price\", \"display_combined_text_element\", \"dealership-information\", \"dealer_options_section\", array( 'type'=>'text','label_for'=>\"label_used_sale_price\", 'option'=>'dld_labels', 'comment'=>'', 'values'=> 'Now Price' ) );\n register_setting(\"dealer_information_section\", \"dld_labels\");\n\n add_settings_field(\"hide_text_us\", \"Hide Text Us\", \"display_select_checkbox\", \"dealership-information\", \"dealer_options_section\", array( 'option'=>'hide_site_options', 'label_for'=>\"hide_text_us\", 'values'=> '.text-us', 'comment'=>'' ) );\n add_settings_field(\"hide_fax_us\", \"Hide Fax Us\", \"display_select_checkbox\", \"dealership-information\", \"dealer_options_section\", array( 'option'=>'hide_site_options', 'label_for'=>\"hide_fax_us\", 'values'=> '.fax-us', 'comment'=>'' ) );\n add_settings_field(\"hide_request_broadcast\", \"Hide Request Broadcast\", \"display_select_checkbox\", \"dealership-information\", \"dealer_options_section\", array( 'option'=>'hide_site_options', 'label_for'=>\"hide_request_broadcast\", 'values'=> '.request-broadcast', 'comment'=>'' ) );\n add_settings_field(\"hide_facetime_option\", \"Hide Facetime Option\", \"display_select_checkbox\", \"dealership-information\", \"dealer_options_section\", array( 'option'=>'hide_site_options', 'label_for'=>\"hide_facetime_option\", 'values'=> '.facetime-option', 'comment'=>'' ) );\n register_setting(\"dealer_information_section\", \"hide_site_options\");\n}", "title": "" }, { "docid": "df81f6e54d7470ff3fba2738f688d381", "score": "0.5709209", "text": "function eme_options_register() {\n // and only those for the tab shown, otherwise the others get reset to empty values\n // The tab value is set in the form in the function eme_options_page. It needs to be set there as a hidden value when calling options.php, otherwise\n // it won't be known here and all values will be lost.\n if (!isset($_POST['option_page']) || ($_POST['option_page'] != \"eme-options\"))\n return;\n $options = array();\n $tab = isset( $_POST['tab'] ) ? esc_attr($_POST['tab']) : 'general';\n switch ( $tab ){\n\t case 'general' :\n $options = array ('eme_use_select_for_locations','eme_recurrence_enabled', 'eme_rsvp_enabled', 'eme_categories_enabled', 'eme_attributes_enabled', 'eme_gmap_is_active', 'eme_gmap_zooming', 'eme_load_js_in_header','eme_use_client_clock','eme_uninstall_drop_data','eme_shortcodes_in_widgets','eme_loop_protection','eme_enable_notes_placeholders');\n\t break;\n\t case 'seo' :\n $options = array ('eme_seo_permalink','eme_permalink_events_prefix','eme_permalink_locations_prefix');\n\t break;\n\t case 'access' :\n $options = array ('eme_cap_add_event', 'eme_cap_author_event', 'eme_cap_publish_event', 'eme_cap_list_events', 'eme_cap_edit_events', 'eme_cap_add_locations', 'eme_cap_author_locations', 'eme_cap_edit_locations', 'eme_cap_categories', 'eme_cap_templates', 'eme_cap_people', 'eme_cap_approve', 'eme_cap_registrations', 'eme_cap_forms', 'eme_cap_cleanup', 'eme_cap_settings','eme_cap_send_mails','eme_cap_send_other_mails');\n\t break;\n\t case 'events' :\n $options = array ('eme_events_page','eme_list_events_page','eme_display_calendar_in_events_page','eme_events_admin_limit','eme_event_list_number_items','eme_event_initial_state','eme_time_remove_leading_zeros','eme_event_list_item_format_header','eme_event_list_item_format','eme_event_list_item_format_footer','eme_event_page_title_format','eme_event_html_title_format','eme_single_event_format','eme_show_period_monthly_dateformat','eme_show_period_yearly_dateformat','eme_events_page_title','eme_no_events_message','eme_filter_form_format');\n\t break;\n\t case 'calendar' :\n $options = array ('eme_small_calendar_event_title_format','eme_small_calendar_event_title_separator','eme_full_calendar_event_format');\n\t break;\n\t case 'locations' :\n $options = array ('eme_location_list_format_header','eme_location_list_format_item','eme_location_list_format_footer','eme_location_page_title_format','eme_location_html_title_format','eme_single_location_format','eme_location_baloon_format','eme_location_event_list_item_format','eme_location_no_events_message',);\n\t break;\n\t case 'rss' :\n $options = array ('eme_rss_main_title','eme_rss_main_description','eme_rss_title_format','eme_rss_description_format','eme_rss_show_pubdate','eme_rss_pubdate_startdate','eme_ical_description_format','eme_ical_title_format');\n\t break;\n\t case 'rsvp' :\n $options = array ('eme_default_contact_person','eme_rsvp_registered_users_only','eme_rsvp_reg_for_new_events','eme_rsvp_require_approval','eme_rsvp_default_number_spaces','eme_rsvp_addbooking_min_spaces','eme_rsvp_addbooking_max_spaces','eme_captcha_for_booking','eme_rsvp_hide_full_events','eme_rsvp_addbooking_submit_string','eme_rsvp_delbooking_submit_string','eme_attendees_list_format','eme_bookings_list_header_format','eme_bookings_list_format','eme_bookings_list_footer_format','eme_registration_recorded_ok_html','eme_registration_form_format', 'eme_rsvp_number_days', 'eme_rsvp_number_hours');\n\t break;\n\t case 'mail' :\n $options = array ('eme_rsvp_mail_notify_is_active','eme_contactperson_email_body','eme_contactperson_cancelled_email_body','eme_contactperson_pending_email_body','eme_respondent_email_body','eme_registration_pending_email_body','eme_registration_cancelled_email_body','eme_registration_denied_email_body','eme_mail_sender_name','eme_mail_sender_address','eme_rsvp_mail_send_method','eme_smtp_host','eme_rsvp_mail_port','eme_rsvp_mail_SMTPAuth','eme_smtp_username','eme_smtp_password', 'eme_smtp_debug');\n\t break;\n\t case 'payments' :\n $options = array ('eme_payment_form_header_format','eme_payment_form_footer_format','eme_default_currency','eme_default_price','eme_paypal_url','eme_paypal_business','eme_2co_demo','eme_2co_business','eme_2co_secret','eme_google_checkout_type','eme_google_merchant_id','eme_google_merchant_key','eme_webmoney_purse', 'eme_webmoney_secret', 'eme_webmoney_demo', 'eme_paypal_s_encrypt', 'eme_paypal_s_pubcert', 'eme_paypal_s_privkey', 'eme_paypal_s_paypalcert', 'eme_paypal_s_certid','eme_fdgg_url','eme_store_name','eme_shared_secret');\n\t break;\n\t case 'other' :\n $options = array ('eme_thumbnail_size','eme_image_max_width','eme_image_max_height','eme_image_max_size','eme_event_html_headers_format','eme_location_html_headers_format','eme_fb_app_id','eme_global_zoom_factor','eme_indiv_zoom_factor','eme_global_maptype','eme_indiv_maptype');\n\t break;\n }\n\n foreach ( $options as $opt ) {\n register_setting ( 'eme-options', $opt, '' );\n }\n}", "title": "" } ]
abb9e14beb9da60bde363ac5f03c252d
Updates a particular model. If update is successful, the browser will be redirected to the 'view' page.
[ { "docid": "189f0b464cf200361462a29cd84fec8c", "score": "0.0", "text": "public function actionUpdate($id) {\n $dir = Yii::getPathOfAlias('webroot.uploads');\n $model = $this->loadModel($id);\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Version'])) {\n $model->attributes = $_POST['Version'];\n\n $model->updatefile = CUploadedFile::getInstance($model, 'updatefile');\n\n if ($model->validate()) {\n if ($model->updatefile !== null) {\n // Delete old file?\n $old_file_name = $dir . DIRECTORY_SEPARATOR . $model->download_url;\n if (file_exists($old_file_name)) {\n @unlink($old_file_name);\n }\n $model->file_name = $model->updatefile->getName();\n // 文件类型 \n $file_type = strtolower($model->updatefile->getExtensionName());\n // 存储文件名 \n $file_name = 'APP_' . date('YmdHis') . '_' . rand(1000, 9999) . '.' . $file_type;\n\n $model->updatefile->saveAs($dir . DIRECTORY_SEPARATOR . $file_name);\n $model->download_url = $file_name;\n }\n\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->id));\n }\n }\n\n $this->render('update', array(\n 'model' => $model,\n ));\n }", "title": "" } ]
[ { "docid": "6cb350e4523680fafd2c7d52459df6c2", "score": "0.8157837", "text": "public function actionUpdate()\n {\n if(Yii::$app->user->isGuest){\n return $this->redirect(['login']);\n }\n \n $id = Yii::$app->user->id;\n $model = $this->findModel($id);\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('_form', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "b91ed674944d85c5d1709ecf2c420899", "score": "0.78274006", "text": "public function actionUpdate()\n {\n $id=Auction::$app->request->post('id');\n if($id){\n $model = $this->findModel($id);\n if ($model->load(Auction::$app->request->post()) && $model->save()) {\n return 'Successfully Updated';\n } else {\n return $this->renderPartial('_form', [\n 'model' => $model,\n ]);\n }\n }\n }", "title": "" }, { "docid": "d9fbb8a6de555569f027e3b90f423fda", "score": "0.7720567", "text": "public function actionUpdate() {\r\n\t\t$id = 1;\r\n\t\t$model = $this->findModel ( $id );\r\n\t\t\r\n\t\tif ($model->load ( Yii::$app->request->post () ) && $model->save ()) {\r\n\t\t\treturn $this->redirect ( [ \r\n\t\t\t\t\t'view',\r\n\t\t\t\t\t'id' => $model->formalemail \r\n\t\t\t] );\r\n\t\t} else {\r\n\t\t\treturn $this->render ( 'update', [ \r\n\t\t\t\t\t'model' => $model \r\n\t\t\t] );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "7b8392fa4158873f782bf0f29d87a25b", "score": "0.76286685", "text": "public function actionUpdate($id) {\r\n\t\t$model = $this->findModel ( $id );\r\n\t\t\r\n\t\tif ($model->load ( Yii::$app->request->post () ) && $model->save ()) {\r\n\t\t\treturn $this->redirect ( [ \r\n\t\t\t\t\t'view',\r\n\t\t\t\t\t'id' => $model->id \r\n\t\t\t] );\r\n\t\t} else {\r\n\t\t\treturn $this->render ( 'update', [ \r\n\t\t\t\t\t'model' => $model \r\n\t\t\t] );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "8a872e05452a65207743b0302a3132c0", "score": "0.7546725", "text": "public function actionUpdate($id)\n{\n$model=$this->loadModel($id);\n\n// Uncomment the following line if AJAX validation is needed\n// $this->performAjaxValidation($model);\n\nif(isset($_POST['Otform']))\n{\n$model->attributes=$_POST['Otform'];\nif($model->save())\n$this->redirect(array('view','id'=>$model->id));\n}\n\n$this->render('update',array(\n'model'=>$model,\n));\n}", "title": "" }, { "docid": "283eac2156f4f79e75a01b23dca2cb58", "score": "0.7545539", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n \treturn $this->redirect(['index']);\n// return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "38aca80f8d1b15cd38a3d1cc3b2d125c", "score": "0.75170004", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "24bd922c1a303284b1548dc158691437", "score": "0.74920785", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) /*&& $model->save()*/) {\n\n\n return $this->redirect(['index']);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "14108140dff449540b749624a153c56f", "score": "0.74656767", "text": "public function actionUpdate($id) {\n\t\t$model = $this->findModel($id);\n\n\t\tif ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t\treturn $this->redirect(['view', 'id' => $model->id]);\n\t\t}\n\n\t\treturn $this->render('update', [\n\t\t\t\t'model' => $model,\n\t\t\t]);\n\t}", "title": "" }, { "docid": "d31d10cda1063a401e841975b12b8979", "score": "0.7458571", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n\n\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "c48d9d33925894b62bd26cccba8fe879", "score": "0.7450496", "text": "public function actionUpdate($id)\r\n {\r\n $model = $this->findModel($id);\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('update', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }", "title": "" }, { "docid": "b00f9cbe8c0dd8fdfc5836dbd46962bf", "score": "0.74450463", "text": "public function actionUpdate($id)\n\t{\n\t\t$model = $this->findModel($id);\n\n\t\tif ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t\treturn $this->redirect(['view', 'id' => $model->id]);\n\t\t} else {\n\t\t\treturn $this->render('update', [\n\t\t\t\t'model' => $model,\n\t\t\t]);\n\t\t}\n\t}", "title": "" }, { "docid": "241bbf192137c6a31f9b2525bd4f6e98", "score": "0.7429045", "text": "public function actionUpdate()\n {\n $model=$this->loadModel();\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if(isset($_POST['Dupak']))\n {\n $model->attributes=$_POST['Dupak'];\n if($model->save())\n $this->redirect(array('view','id'=>$model->id));\n }\n\n $this->render('update',array(\n 'model'=>$model,\n ));\n }", "title": "" }, { "docid": "07f0ffa13ddc44f350f35f9c8eeff23f", "score": "0.74242496", "text": "public function updating(Model $model);", "title": "" }, { "docid": "70ad1c7b905b74766263343711af0012", "score": "0.7421009", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post())) {\n $this->saveModel($model);\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "2e6608938bf6d6f5d4c2153ac9e39b9d", "score": "0.7416981", "text": "public function actionUpdate($id)\n\t{\n\t\t$model = $this->findModel($id);\n\n\t\tif ($this->request->isPost && $model->load($this->request->post()) && $model->save()) {\n\t\t\treturn $this->redirect(['view', 'id' => $model->id]);\n\t\t}\n\n\t\treturn $this->render('update', [\n\t\t\t'model' => $model,\n\t\t]);\n\t}", "title": "" }, { "docid": "b2a83b05319a8b5780eb854e3420a5b4", "score": "0.74043167", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post())) {\n if($model->validate()){\n $model->save();\n return $this->redirect(['view', 'id' => $model->id]);\n }\n }\n return $this->render('update', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "d98e34de6a057cced027ca0e4c7d0bb4", "score": "0.7401814", "text": "public function actionUpdate($id)\n\t{\n\t\t$model = $this->findModel($id);\n\n\t\tif ($model->load(\\Yii::$app->request->post()) && $model->save()) {\n\t\t\treturn $this->redirect(['index']);\n\t\t} else {\n\t\t\treturn $this->render('update', [\n\t\t\t\t'model' => $model,\n\t\t\t]);\n\t\t}\n\t}", "title": "" }, { "docid": "f4b0cdf980df28b54353586c4f0a6298", "score": "0.74000335", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index', 'id' => $model->id]);\n }\n return $this->render('update', ['model' => $model]);\n }", "title": "" }, { "docid": "89bf87694298755a39be089ba823f684", "score": "0.7370515", "text": "public function actionUpdate() {\n\t\t$slug = isset($_GET['slug']) ? $_GET['slug'] : '';\n//\t\t$model = $this->loadModel($id);\n\t\t$model = $this->loadModel($slug);\n\n\t\t$this->processForm($model);\n\t}", "title": "" }, { "docid": "ed68e4e423993b4da37e5591b199c2fa", "score": "0.73608327", "text": "public function actionUpdate($id) {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "ed68e4e423993b4da37e5591b199c2fa", "score": "0.73608327", "text": "public function actionUpdate($id) {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "ed68e4e423993b4da37e5591b199c2fa", "score": "0.73608327", "text": "public function actionUpdate($id) {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "ed68e4e423993b4da37e5591b199c2fa", "score": "0.73608327", "text": "public function actionUpdate($id) {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "ed68e4e423993b4da37e5591b199c2fa", "score": "0.73608327", "text": "public function actionUpdate($id) {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "ed68e4e423993b4da37e5591b199c2fa", "score": "0.73608327", "text": "public function actionUpdate($id) {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "6e9c93ff96fe81b4e2601c9c47b07124", "score": "0.73605216", "text": "public function actionUpdate()\r\n\t{\r\n\t\t$model=$this->loadModel();\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['Aspirantes']))\r\n\t\t{\r\n\t\t\t$model->attributes=$_POST['Aspirantes'];\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('update',array(\r\n\t\t\t'model'=>$model,\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "c5990b475b4bbf956c19e1f0a87bdcc9", "score": "0.73603815", "text": "public function updating($model) {\n\n }", "title": "" }, { "docid": "0a09a815a19c508214d8bb1c9c56417f", "score": "0.7347044", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "0a09a815a19c508214d8bb1c9c56417f", "score": "0.7347044", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "7b3902a34822729b171b7bc0f8625233", "score": "0.7345511", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "155aa8abeeb78b1193f47b0b1bd768b3", "score": "0.7343508", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "e41d50541c8150102b3915699aa06cda", "score": "0.73417103", "text": "public function update(Model $model);", "title": "" }, { "docid": "39c603e388e90fa00abf28adc8aedfb1", "score": "0.73376024", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->_id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "3c990dedb5ad662f30cbf706e1b47be6", "score": "0.7335342", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->name]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "3c990dedb5ad662f30cbf706e1b47be6", "score": "0.7335342", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->name]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "cea605afc73cc1c4a383a2fab97f26f6", "score": "0.7333959", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render(\n 'update',\n [\n 'model' => $model,\n ]\n );\n }\n }", "title": "" }, { "docid": "7b50d85822275f79027f190c8d3d768d", "score": "0.73306125", "text": "public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->idP]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "6a84fd481638052b7e20f6660725dc4e", "score": "0.7327564", "text": "public\n function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "b3a2033cbae40e37a0b964825d7b1638", "score": "0.73173875", "text": "public function actionUpdate($id) {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "f2b7d660b79be8897164520ee1b09492", "score": "0.73145986", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "f2b7d660b79be8897164520ee1b09492", "score": "0.73145986", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "f2b7d660b79be8897164520ee1b09492", "score": "0.73145986", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "638ca739a168a2ff60b914d8a07ee668", "score": "0.7314171", "text": "public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->session->setFlash('success', 'Well done! successfully to Update data! ');\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89b15d367f757f13cb1385ec6964f7ad", "score": "0.7313418", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\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('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" } ]
7811d55666551d1681c8c5c86379e938
Address Route index page
[ { "docid": "a1e9849091228f8851bc3b7235d83e33", "score": "0.6118697", "text": "public function index() {\n $id = auth()->guard('customer')->user()->id;\n\n $address = $this->getAddress($id);\n\n return view($this->_config['view'])->with('address', $address);\n }", "title": "" } ]
[ { "docid": "8a1f7cc1eebabd60cbc9fd2b29610788", "score": "0.71937793", "text": "public function index()\n {\n\n // return view('address::index');\n }", "title": "" }, { "docid": "71200df35c5a57fd16db0768f2ddd63b", "score": "0.6964989", "text": "public function index()\n {\n $addresses = Address::all();\n $title = 'Direccion';\n return view('pages.addressPage', compact('addresses', 'title'));\n }", "title": "" }, { "docid": "3cc06aba37a5d40f0517d9835cc4675b", "score": "0.6885397", "text": "public function index()\n {\n // Return address list with paginate\n return $address = Address::paginate(10);\n }", "title": "" }, { "docid": "27b583f30ed37ced9b0d9ca332ff3077", "score": "0.67667377", "text": "public function index()\n {\n $module = Module::get('Addresses');\n\n if(Module::hasAccess($module->id)) {\n return View('la.addresses.index', [\n 'show_actions' => $this->show_action,\n 'listing_cols' => Module::getListingColumns('Addresses'),\n 'module' => $module\n ]);\n } else {\n return redirect(config('laraadmin.adminRoute') . \"/\");\n }\n }", "title": "" }, { "docid": "424425a66f3bdf0649939aaeb163f949", "score": "0.6690816", "text": "public function index()\n\t{\n\t\t$data = new ViewObject();\n\n\t\t$data->items = $this->addresses_m->get_active_by_user($this->current_user->id);\n\n\t\t$this->template\n\t\t\t->set_breadcrumb('Addresses')\n\t \t\t->title(Settings::get('shop_name'))\n\t\t\t->build('nitrocart/my/addresses', $data);\n\n\t}", "title": "" }, { "docid": "5730db2224f615416534e0e37a85abb4", "score": "0.666357", "text": "public function index()\n {\n $address = Sentinel::getUser()->profile->address()->first();\n return view('user.address.index')->withAddress($address);\n }", "title": "" }, { "docid": "533aa34cd31e640b584373de627c9c57", "score": "0.6581619", "text": "public function index() {\n $rg = Registry::getInstance();\n $params = $rg->uri->params;\n $page=1;\n if (isset($params[0]) && is_numeric($params[0]) && $page>$params[0]) {\n $page= (int) ($params[0]);\n }\n }", "title": "" }, { "docid": "1e9add88f3b743edbf17ab243566fb0d", "score": "0.6560614", "text": "public function index()\n {\n $address=Address::all()->sortBy('id');\n return view('address.index',compact('address'));\n }", "title": "" }, { "docid": "2b7bd4449e2a1bfae711efccc84c6066", "score": "0.6482938", "text": "public function index()\n {\n $addresses = $this->addressRepository->all();\n\n return view('pearlskin::admin.addresses.index', compact('addresses'));\n }", "title": "" }, { "docid": "8c88b45f05458cc15033befcb5a829a1", "score": "0.64748853", "text": "public function index()\n {\n if($this->app->getViewType() == 'mhtml') $this->locate($this->createLink($this->config->locate->module, $this->config->locate->method, $this->config->locate->params));\n $this->locate($this->createLink('my', 'index'));\n }", "title": "" }, { "docid": "19b018a8c2368ebeb93d6ce8dc42fb3f", "score": "0.6451433", "text": "public abstract function index();", "title": "" }, { "docid": "09d05c875d3f46319738344d94adc810", "score": "0.6440316", "text": "public function index()\n\t{\n\t\t$this->home();\n\t}", "title": "" }, { "docid": "691c61341597d73884ff03a4372d3b93", "score": "0.64168084", "text": "abstract public function index();", "title": "" }, { "docid": "691c61341597d73884ff03a4372d3b93", "score": "0.64168084", "text": "abstract public function index();", "title": "" }, { "docid": "691c61341597d73884ff03a4372d3b93", "score": "0.64168084", "text": "abstract public function index();", "title": "" }, { "docid": "bb98b8c28706552e28e05f5ff2d4eb22", "score": "0.6410455", "text": "public function index()\n {\n $this->home();\n }", "title": "" }, { "docid": "429dc556699d23db5de96136f0685bb2", "score": "0.6401183", "text": "abstract function index();", "title": "" }, { "docid": "d507124d8c24c85293a344becb901d69", "score": "0.6387367", "text": "public function index(){\n $this->notFound();\n }", "title": "" }, { "docid": "89178798edf84f519a4d6cd0f460b6f7", "score": "0.63804144", "text": "private function DisplayIndex()\n\t{\t\n\t\t\n\t}", "title": "" }, { "docid": "33e3ab785c12ecdf7b5227a81d04aee2", "score": "0.6368896", "text": "public function index()\n {\n \n $data['title'] = 'index';\n \n $this->View->render('map/index', $data);\n }", "title": "" }, { "docid": "2b2b29a9b7217183f74771c366fd0cff", "score": "0.63665664", "text": "public function index()\n {\n $this->explore(0);\n }", "title": "" }, { "docid": "b3c460e9bb0b53ad4cef072110bebb68", "score": "0.63653445", "text": "function index() {\n $data['customer_address'] = $this->Customer_addres_model->get_all_customer_address();\n\n $data['_view'] = 'customer_addres/index';\n $this->load->view('layouts/main', $data);\n }", "title": "" }, { "docid": "1c863843d20ea435f3ca56a1082513cf", "score": "0.6355381", "text": "public function index(){}", "title": "" }, { "docid": "1c863843d20ea435f3ca56a1082513cf", "score": "0.6355381", "text": "public function index(){}", "title": "" }, { "docid": "f75e14b5b17eb93b04fa4a3ccb0c00b7", "score": "0.63538563", "text": "public function index(){\n\t\t$data['mainContent'] = 'landingPage/index';\n\t\t$this->landingPageRenderer('landingPage/index', $data);\n\t}", "title": "" }, { "docid": "ca8f7219b13ce4965ce022ad02c94e08", "score": "0.63518447", "text": "public function index(){\n\t\tis_header(); \n\t\t$this->view($_GET['url']);\n\t\tis_footer(); \n\t}", "title": "" }, { "docid": "ca261fcad64ad215b478b09d54b57e78", "score": "0.63489056", "text": "public function _route()\n\t{\n\t\tif(self::lock('byebye'))\n\t\t{\n\t\t\tself::error_page('byebye');\n\t\t\treturn;\n\t\t}\n\t\t$this->get()->ALL('byebye');\n\t}", "title": "" }, { "docid": "ab85a2be367bc314bb1df0ff1f233c75", "score": "0.63338727", "text": "public function routes();", "title": "" }, { "docid": "93a3d065f3554c5d333d5f3277a236ca", "score": "0.6329699", "text": "public function index()\n {\n // echo \"hi\";\n Log::info(Address::all());\n return Address::all();\n }", "title": "" }, { "docid": "ce8b9ad44fb7ea8cdb2048121f123448", "score": "0.63256395", "text": "public function indexAction() {\n\n $em = $this->getDoctrine()->getManager();\n\n $addresses = $em->getRepository('Workshop_5Bundle:Addres')->findAll();\n\n return $this->render('addres/index.html.twig', array(\n 'addresses' => $addresses,\n ));\n }", "title": "" }, { "docid": "740ff0fc704cbd55e038b7f55dc4b9a9", "score": "0.63239396", "text": "public function index()\n {\n return Address::all();\n }", "title": "" }, { "docid": "740ff0fc704cbd55e038b7f55dc4b9a9", "score": "0.63239396", "text": "public function index()\n {\n return Address::all();\n }", "title": "" }, { "docid": "740ff0fc704cbd55e038b7f55dc4b9a9", "score": "0.63239396", "text": "public function index()\n {\n return Address::all();\n }", "title": "" }, { "docid": "dd6a1412e8cf0a4bb3d6767097a40fe1", "score": "0.63132715", "text": "public function route();", "title": "" }, { "docid": "dd6a1412e8cf0a4bb3d6767097a40fe1", "score": "0.63132715", "text": "public function route();", "title": "" }, { "docid": "5713c66d4c0e1f737f9f4abf84812053", "score": "0.6290882", "text": "public function routeInfo();", "title": "" }, { "docid": "fb4af86be0dd11c626eb570bd8dddb34", "score": "0.62903565", "text": "public function index() {\n return Address::all();\n }", "title": "" }, { "docid": "982b158aa1e66600f73dc88187904591", "score": "0.6290053", "text": "public function index()\n {\n \t $facilities = Team::with('addresses')->get();\n return view('manage.address.index', compact('facilities'));\n }", "title": "" }, { "docid": "58d23acfc55d27622ae1282590f67f48", "score": "0.628318", "text": "public function index()\n\t{\n\t\tshow_404();\n\t}", "title": "" }, { "docid": "5f0dcd599be9947bce2dab5f8e2b3599", "score": "0.626262", "text": "public function indexAction() {}", "title": "" }, { "docid": "2bf17aecd1641d310dd213c706459002", "score": "0.62601674", "text": "function index() { }", "title": "" }, { "docid": "2bf17aecd1641d310dd213c706459002", "score": "0.62601674", "text": "function index() { }", "title": "" }, { "docid": "2bf17aecd1641d310dd213c706459002", "score": "0.62601674", "text": "function index() { }", "title": "" }, { "docid": "db891b8a4d0d94d6a235fa509578c18c", "score": "0.6259894", "text": "public function index()\n {\n\n $addresses = Address::all();\n return view('dashboard')->with('addresses', $addresses);\n }", "title": "" }, { "docid": "065a46f2f1f9b93fc62e449e4b4cc9a3", "score": "0.62595797", "text": "function index(){\n \n }", "title": "" }, { "docid": "9db35c74f316ceb21759e2bb1f9c401d", "score": "0.6239181", "text": "public function index()\n {\n $roads = Road::all();\n return view('roads.index', compact('roads'));\n }", "title": "" }, { "docid": "197338e1cde22bf12ff93bb8e31250a1", "score": "0.61981034", "text": "public function index()\n {\n //هنا هنعطي لكل واحد الدور بتاعه و صلاحياته\n if (!\\auth()->user()->ability('superAdmin', 'manage_customer_addresses,show_customer_addresses')) {\n return redirect('admin/index');\n }\n\n $customer_addresses = UserAddress::with('user')\n\n ->when(\\request()->keyword !=null, function($query){\n $query->search(\\request()->keyword);\n })\n ->when(\\request()->status !=null, function($query){\n $query->whereDefaultAddress(\\request()->status);\n })\n ->orderBy(\\request()->sort_by ?? 'id' , \\request()->order_by ?? 'desc')\n\n ->paginate(\\request()->limit_by ?? 10); //بمعني وانت راجع بالكاتبجوري هات معاك مجمع المنتجات الخاصة بكل كاتبجوري\n\n return view('backend.customer_addresses.index', compact('customer_addresses'));\n }", "title": "" }, { "docid": "676fd8c8600b15a3ea6fd04f4b67a7fa", "score": "0.61963856", "text": "public function index(){\n\t\t\n\t\t//if needed\n\t}", "title": "" }, { "docid": "8e517d320a45eacb3639af640367a678", "score": "0.61960715", "text": "public function index()\n {\n if (Auth::check()) {\n session()->forget('back_url');\n $addresses = Address::where('client_id', Auth::user()->id)->get();\n\n return view('view_address')->with(['addresses' => $addresses]);\n }\n return redirect()->route('login');\n }", "title": "" }, { "docid": "c193e28eed601790954e4249a3c610e2", "score": "0.61894417", "text": "public function index() {\n \t\n try {\n $body['locations'] = $this->locations->getLocations(false);\n \n } catch (Exception $e) {\n $this->functions->sendStackTrace($e);\n }\n\n $this->load->view('template/header', $header);\n $this->load->view('locations/index', $body);\n $this->load->view('template/footer');\n }", "title": "" }, { "docid": "6cecc6b7092bb8d922b412fe6819e4d6", "score": "0.61874235", "text": "public function indexAction() {\n\t\t\n\t\t}", "title": "" }, { "docid": "7c7128f1aa7e09b212d4ab332b284b27", "score": "0.6170448", "text": "public function index()\n {\n //defines default file for index() and default actions\n $result = $this->layout->render(dirname(__FILE__).DS.'views/main.php');\n $router->setBody($result);\n }", "title": "" }, { "docid": "15f7c632423c3a38fb37cdde2ac5314d", "score": "0.6163179", "text": "public function index()\n {\n $routes = route::all();\n\n return view('obrs.route.index', compact('routes'));\n }", "title": "" }, { "docid": "462a084808dd69f9380f9c41bff60e6f", "score": "0.61626035", "text": "public function index()\n\t{\n\t\t// show list of templates or redirect to search\n\t}", "title": "" }, { "docid": "bcf18e6ba2331e8701c51974e72229fa", "score": "0.61556447", "text": "public function actionIndex()\n\t{\n\t\t$location = XenForo_Application::get('options')->viewMapLocation;\n\t\t\t\t\n\t\t// get coordinate from URL\n\t\t$coordinates = $this->_input->filterSingle('coordinates', XenForo_Input::STRING);\n\t\t\n\t\t// get default coordinates\n\t\tif ($coordinates == '')\n\t\t{\n\t\t\t// get options from Admin CP -> Options -> View Map -> Location\n\t\t\t$coordinates = XenForo_Application::get('options')->viewMapDefaultCoordinates;\t\t\n\t\t}\n\t\t\n\t\t// throw error if data is missing\n\t\tif ($location == '' OR $coordinates == '')\n\t\t{\n\t\t\treturn $this->responseError(new XenForo_Phrase('viewmap_default_location_or_coordinates_missing_in_options'));\n\t\t}\n\t\t\n\t\t// redirect to viewmap.php location\n\t\theader ('location: ' . $location . '?coordinates=' . $coordinates);\n\t\t\n\t\t// exit\n\t\texit();\t\n\t}", "title": "" }, { "docid": "22623c531dba459881680a09eda1bbb3", "score": "0.61555064", "text": "public function index()\n {\n return response()->json(Address::with('partner','user','site')->where('deleted', 0)->paginate(15));\n }", "title": "" }, { "docid": "0584a571093f93d2853060143341bbfc", "score": "0.61542934", "text": "public function index ()\n {\n // Show the page\n View::Make('index');\n }", "title": "" }, { "docid": "72bf1bd21b752da36430ed21a9688aac", "score": "0.61531687", "text": "public function index()\n\t\t{\n\t\t\t$this->b404Error = true;\n\t\t\t\t\n\t\t}", "title": "" }, { "docid": "a0af317e7e798ffd774518ff7814932d", "score": "0.61519223", "text": "public function indexAction(){}", "title": "" }, { "docid": "32df705195ab3d89520da04caf377a72", "score": "0.61382806", "text": "public function hr_index() {\n\t\t$this->_index();\n\t}", "title": "" }, { "docid": "943dd4db1c40a0592eb1585173d44fb7", "score": "0.6134489", "text": "function index() {\r\n\t\t// nothing...\t\r\n\t}", "title": "" }, { "docid": "f564252f085bd7c9a563158d17606d0c", "score": "0.6134013", "text": "public function indexAction() {\n\t\t// send europe as default\n\t\t$this->view->coords = $this->europe;\n\t}", "title": "" }, { "docid": "f25768f4e0f00d5c1840aed7761a9e2d", "score": "0.61328596", "text": "function index()\r\n {\r\n $this->conf->page($this->module . 'index');\r\n }", "title": "" }, { "docid": "0d10d9dcf01d5cbb22c864061ea1f87d", "score": "0.61317635", "text": "public function index()\n {\n\n\t\t$data['title'] = \"Daftar Anchor\";\n\t\t\n\t\t$anchor['cor'] = $this->manchor->get_anchor_by_direktorat('corporate');\n\t\t$anchor['ib'] = $this->manchor->get_anchor_by_direktorat('institutional');\n\t\t$anchor['com'] = $this->manchor->get_anchor_by_direktorat('commercial');\n\t\t\n\t\t$data['header'] = $this->load->view('shared/header','',TRUE);\t\n\t\t$data['footer'] = $this->load->view('shared/footer','',TRUE);\n\t\t$data['content'] = $this->load->view('directorate/index',array('anchor' => $anchor),TRUE);\n\n\t\t$this->load->view('front',$data);\n \n }", "title": "" }, { "docid": "37dc160cbd261e85c883382b2a778cbd", "score": "0.6119881", "text": "public function Index() {\n\t//Set the title of the page\n$this->views->SetTitle($this->pageTitle);\n\t// Include index.tpl.php and pass an array with content\n$this->views->AddInclude(__DIR__ . '/index.tpl.php', array(\n\t'entries' => $this->guestbookModel->ReadAll(),\n\t'formAction' => $this->request->CreateUrl('guestbook/handler')\n\t ));\n\t }", "title": "" }, { "docid": "e04dac1a1171bc78ae7a00b576d6ab32", "score": "0.61190444", "text": "public function index();", "title": "" }, { "docid": "e04dac1a1171bc78ae7a00b576d6ab32", "score": "0.61190444", "text": "public function index();", "title": "" }, { "docid": "e04dac1a1171bc78ae7a00b576d6ab32", "score": "0.61190444", "text": "public function index();", "title": "" }, { "docid": "e04dac1a1171bc78ae7a00b576d6ab32", "score": "0.61190444", "text": "public function index();", "title": "" }, { "docid": "e470234a735d72d3a3b99155b61f7052", "score": "0.6117515", "text": "public function index()\n {\n $address = Address::paginate(10);\n return new AddressResource($address);\n }", "title": "" }, { "docid": "303c51e9622705c286e3bd9d90052c47", "score": "0.6116043", "text": "public function index()\n {\n $address = Address::where('user_id', Auth::id())->get();\n return $this->success(\"Address created\", AddressResource::collection($address));\n\n }", "title": "" }, { "docid": "1b781c727a5005c84b9a85c4c9c14027", "score": "0.61156833", "text": "public function index() {}", "title": "" }, { "docid": "cb67a746435c0d83ebf414443973bbe3", "score": "0.6113123", "text": "public function index(){\n\t \t\n\t}", "title": "" }, { "docid": "1d31627e8a5f9e2c748ff71616876f38", "score": "0.6094697", "text": "public function index()\n {\n $routes = Route::latest()->paginate(5);\n return view('route.list',compact('routes'))\n ->with('i', (request()->input('page', 1) -1) * 5);\n }", "title": "" }, { "docid": "282b193ec0d7453899cd8ebab6b9da67", "score": "0.6090111", "text": "public function getIndex(){\n\t\t//return view('pages.main');\n\t}", "title": "" }, { "docid": "50e255282051b9e9e5db71f94344b24a", "score": "0.6087983", "text": "public function index() {\n\n //@TODO Check Vanity URLS like\n //http://domain.com/tangstone\n //Redirect=> http://domain.com/profile/tangstone...\n //@TODO check if the URL is a command!\n //@TODO Check that the user is logged in!\n\n\n $this->redirect($this->uri->getURL('index'));\n }", "title": "" }, { "docid": "91436780195ca96ac1ea99b273ca9059", "score": "0.608099", "text": "abstract protected function routes ();", "title": "" }, { "docid": "b95cbd8cded1c0ddc8ef60b2e461c6ba", "score": "0.60773504", "text": "public function index()\n {\n return view('backend.tecdoc-brand-addresses.index');\n }", "title": "" }, { "docid": "5d9a5708acf149e8c5123150c9d25892", "score": "0.60753757", "text": "function index(){ }", "title": "" }, { "docid": "08a63cf27486f38175e808f55feea076", "score": "0.6067356", "text": "function drush_drupen_route_list() {\n drush_print(dt('Listing all routes.'));\n $urls = routeList();\n foreach ($urls as $url) {\n drush_print($url);\n }\n}", "title": "" }, { "docid": "8c752f3c17f9929faa11cbe9d2a670ca", "score": "0.6059878", "text": "function index() {\n\t\tshow_404();\n\t\t//header('Content-Type: text/plain');\n\t\t//print 'TBD';\n\t}", "title": "" }, { "docid": "28f53e65aaba3785f9965146cccfee50", "score": "0.60529923", "text": "public function indexAction() {\n \n }", "title": "" }, { "docid": "28f53e65aaba3785f9965146cccfee50", "score": "0.60529923", "text": "public function indexAction() {\n \n }", "title": "" }, { "docid": "f46929292cdc0bcf41bd59ee0ed6f803", "score": "0.6045765", "text": "public function index(){\r\n\t\techo \"index\";\r\n\t}", "title": "" }, { "docid": "e6c8741b5d134655b9c2b8dd778cefb8", "score": "0.6044154", "text": "function index()\n {\n // a main page yet ;-).\n $this->listings();\n }", "title": "" }, { "docid": "d1e40cda739e0e78e71d153b44759b69", "score": "0.603882", "text": "public function index() {\n\t\t\tView::render('maps');\n \t\t}", "title": "" }, { "docid": "580824ca6f9cf172b69dea922f92ec72", "score": "0.60367477", "text": "function index()\n {\n $this->actionNotFound('index');\n }", "title": "" }, { "docid": "033f1d0a6f4c685e7814b50e6310a7c7", "score": "0.603151", "text": "public abstract function actionIndex();", "title": "" }, { "docid": "e5199e628d7a82cc0a3307ca51338b35", "score": "0.60254455", "text": "public function index() {\n\t\t$data ['page'] = 'search/main';\n\t\t$data ['name'] = 'Scraping';\n\t\t$this->load->view ( 'template/template', $data );\n\t}", "title": "" }, { "docid": "05e3cfdc9b34170a22899545cc43fc96", "score": "0.60240567", "text": "public function indexAction() {\n\t\t\n\t}", "title": "" }, { "docid": "e555e7198524f48d7d251fed949e38b3", "score": "0.6022852", "text": "public function index()\n {\n $auth=Auth::guard('vendor')->user()->id;\n $data = array();\n $data['route_list'] = Route::get();\n return view('vendor.route.index',$data);\n }", "title": "" }, { "docid": "acdd6eeb908b3ff4e8cf803c36266f25", "score": "0.60221815", "text": "public function indexAction()\n {\n $this->view('index');\n }", "title": "" }, { "docid": "518f7f0b5e873620a02d2f66d22fcb33", "score": "0.6022088", "text": "function index()\r\n\t{\r\n\r\n\t}", "title": "" }, { "docid": "476819084e771e63c084ea3384d26c1d", "score": "0.60204345", "text": "public function GetPage()\n\t{\t\t\n\t\t$this->DisplayIndex();\n\t}", "title": "" }, { "docid": "8f01f3583832c7c9aef15d31b31c7cc5", "score": "0.60170215", "text": "public function index(){\n\t\tRouter::redirect(\"/\");\n\t}", "title": "" }, { "docid": "fde53275cfb20597cb8e895e712cfcf9", "score": "0.6014825", "text": "public function index()\n\t{\n\t\treturn View::make('backoffice.location.index');\n\t}", "title": "" }, { "docid": "afeb72a0307c0193520d3a0c2f470aed", "score": "0.6014175", "text": "public function page()\n\t{\n\t\t$this->index();\n\t}", "title": "" }, { "docid": "970e35836b9768276ac32a7f819d569f", "score": "0.6012859", "text": "public function index()\n {\n return \"Here is the listing page.\";\n }", "title": "" }, { "docid": "4639af45369ceb0566d6ffbbf0db227a", "score": "0.60106677", "text": "public function index() {\n $view = new PagesView();\n $view->views('index');\n }", "title": "" }, { "docid": "1c1f10b96dfd4b256cb96d7963c122f2", "score": "0.6008441", "text": "public function indexAction()\n\t\t{\n\t\t}", "title": "" } ]
7fb9e14d707be6b1779156de57c1650f
Nutze diese Funktion um einfach eine Ausgabe mit htmlspecialchars() zu erstellen.
[ { "docid": "e5f58cc94a7b70e222679ac0c0fe3c8d", "score": "0.68076265", "text": "function e(string $value) : string\n{\n return htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false);\n}", "title": "" } ]
[ { "docid": "36c38b69650a60ba10c8b38618ebb1e9", "score": "0.73627675", "text": "function htmlspecialchars($data = '', $mode = ENT_QUOTES)\n\t{\n\t\n\t}", "title": "" }, { "docid": "c8afb0423a32e149d3833c56b0b0e889", "score": "0.71251875", "text": "function e($s) { echo htmlspecialchars($s); }", "title": "" }, { "docid": "737678f7e91d270fc1366d9e39faaa24", "score": "0.69968957", "text": "function txt_htmlspecialchars($t=\"\")\n\t\t{\n\t\t\t// $t = str_replace( \"<\", \"&lt;\" , $t );\n\t\t\t// $t = str_replace( \">\", \"&gt;\" , $t );\n\t\t\t$t = str_replace( \"\\\\\", \"\" , $t );\n\t\t\t//$t = str_replace( '\"', \"\", $t );\n\t\t\t\n\t\t\treturn $t; // A nice cup of?\n\t\t}", "title": "" }, { "docid": "2a2ac0cd87abed39cd88bb6163122e35", "score": "0.69932467", "text": "function escape($input){\n\treturn htmlspecialchars(strip_tags($input));\n\n}", "title": "" }, { "docid": "1368c28baec5fd60f2da5e41c30188c1", "score": "0.6936523", "text": "public function htmlspecialchars(){\n // No error is generated, just filters the text\n $this->subject = htmlspecialchars($this->subject);\n }", "title": "" }, { "docid": "64e425a89fdfbf8769d42124ca1881c5", "score": "0.6901469", "text": "function escape($input){\n\n\treturn htmlspecialchars(strip_tags($input));\n\t\n}", "title": "" }, { "docid": "5f55adbf12554775523f9c92892c4297", "score": "0.6889016", "text": "function esc_attr($string)\n{\n return htmlspecialchars($string, ENT_QUOTES, 'UTF-8', false);\n}", "title": "" }, { "docid": "cc7836ab2b60677904891ce6cee1aa0b", "score": "0.6773898", "text": "function undo_htmlspecialchars($input) {\r\n\t$input = preg_replace(\"/&gt;/i\", \">\", $input);\r\n\t$input = preg_replace(\"/&lt;/i\", \"<\", $input);\r\n\t$input = preg_replace(\"/&quot;/i\", \"\\\"\", $input);\r\n\t$input = preg_replace(\"/&amp;/i\", \"&\", $input);\r\n\t\r\n\treturn $input;\r\n}", "title": "" }, { "docid": "786ba23b912f4a43fa1654ac4938fd0f", "score": "0.6764238", "text": "function e($string){\n if($string){\n htmlspecialchars($string);\n }\n }", "title": "" }, { "docid": "fe0edd09f0b4e877beb46b050f90e2b9", "score": "0.6761654", "text": "function limpia_entrada($variable){\r\n //htmlspecialchars, me ayuda a que no inyecten codigo html y puedan violar la seguridad\r\n return $variable = htmlspecialchars($variable);\r\n }", "title": "" }, { "docid": "0c3e8d8dafd86311186915aef075455f", "score": "0.67469645", "text": "function h($text) {\n return htmlspecialchars($text, ENT_QUOTES, Yii::app()->charset);\n}", "title": "" }, { "docid": "d580c5102b428655c8cfd79c675644e6", "score": "0.6745579", "text": "function tohtml($strValue)\r\n{\r\n return htmlspecialchars($strValue);\r\n}", "title": "" }, { "docid": "680ac055bf31691dfeab2c75ffc49a9f", "score": "0.674509", "text": "function h($text)\r\n{\r\n return htmlspecialchars($text, ENT_QUOTES, Yii::app()->charset);\r\n}", "title": "" }, { "docid": "112b952731e3e5b90d3ade75b89917ba", "score": "0.67274934", "text": "function filter(&$value)\n {\n $value = htmlspecialchars($value, ENT_QUOTES, 'UTF-8');\n }", "title": "" }, { "docid": "1b64ae33c5e457209af73e2f973b5627", "score": "0.67234206", "text": "function h($text)\n{\n return htmlspecialchars($text,ENT_QUOTES,Yii::app()->charset);\n}", "title": "" }, { "docid": "a32c6bfc362138e8b5dfff89d3ba5320", "score": "0.6710845", "text": "function e($string)\n{\n return htmlspecialchars($string, ENT_QUOTES, 'UTF-8', false);\n}", "title": "" }, { "docid": "b05553087414c173f51fbf0a8912a3d3", "score": "0.6707789", "text": "function e($value, $doubleEncode = true) {\n\t\treturn htmlspecialchars($value, ENT_QUOTES, 'UTF-8', $doubleEncode);\n\t}", "title": "" }, { "docid": "d5af8f24356bd351389f11ad30c75ada", "score": "0.66491616", "text": "function __($text)\n{\n echo(htmlspecialchars($text));\n}", "title": "" }, { "docid": "20b4c1141b994fecd7847b6dd4f8252e", "score": "0.6579906", "text": "function _e(string $input, bool $doubleEncode = true): string\n{\n return htmlspecialchars($input, ENT_QUOTES, 'UTF-8', $doubleEncode);\n}", "title": "" }, { "docid": "2432cf368889bc2ad33f87662cfd979b", "score": "0.6558981", "text": "function undo_htmlspecialchars($string) {\n\t\t$string = preg_replace(\"/&gt;/i\", \">\", $string);\n\t\t$string = preg_replace(\"/&lt;/i\", \"<\", $string);\n\t\t$string = preg_replace(\"/&quot;/i\", \"\\\"\", $string);\n\t\t$string = preg_replace(\"/&amp;/i\", \"&\", $string);\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "0aac8ab3828f3902ecaa4d9d8c9f3af2", "score": "0.6551234", "text": "function html_xss_clean($text)\n{\n return htmlspecialchars($text);\n}", "title": "" }, { "docid": "b8e7e7690ee7667134a5303720c4804d", "score": "0.65341175", "text": "function sanitize_html($string) {\n return htmlspecialchars($string);\n }", "title": "" }, { "docid": "d5de2ecd3aee0e8aec8fa12857dfac0c", "score": "0.6533425", "text": "function txt_htmlspecialchars($t=\"\")\n\t{\n\t\t// Use forward look up to only convert & not &#123;\n\t\t$t = preg_replace(\"/&(?!#[0-9]+;)/s\", '&amp;', $t );\n\t\t$t = str_replace( \"<\", \"&lt;\" , $t );\n\t\t$t = str_replace( \">\", \"&gt;\" , $t );\n\t\t$t = str_replace( '\"', \"&quot;\", $t );\n\t\t$t = str_replace( \"'\", '&#039;', $t );\n\n\t\treturn $t; // A nice cup of?\n\t}", "title": "" }, { "docid": "727bc27bf0d4673f290c709e2d9fa5cb", "score": "0.6519315", "text": "function h($data) {\n return htmlspecialchars($data);\n }", "title": "" }, { "docid": "f115e32dcf527f85128046afd95ae691", "score": "0.64955795", "text": "public function esc_value()\n\t\t{\n\t\treturn htmlspecialchars($this->value, ENT_QUOTES);\n\t\t}", "title": "" }, { "docid": "9729a321c782d30b8becfdaf2c0942f2", "score": "0.6495226", "text": "public static function e($value)\n {\n return \\htmlspecialchars($value, ENT_QUOTES, \"UTF-8\");\n }", "title": "" }, { "docid": "d3116ee4063ddc0e02b55aae1ae12965", "score": "0.64783424", "text": "function undo_htmlspecialchars($string)\r\n {\r\n $html = array (\r\n '&amp;' => '&',\r\n '&quot;' => '\"',\r\n '&lt;' => '<',\r\n '&gt;' => '>'\r\n );\r\n $string = strtr($string, $html);\r\n return ($string);\r\n }", "title": "" }, { "docid": "84bcd9392064093450021828c7b3d08d", "score": "0.64640003", "text": "function ha($text_to_escape){\n\treturn htmlspecialchars($text_to_escape, ENT_QUOTES, 'UTF-8');\n}", "title": "" }, { "docid": "5a5705c990910436cfbe781fdb75c8bc", "score": "0.6428962", "text": "function h($string=\"\"){\n return htmlspecialchars($string);\n}", "title": "" }, { "docid": "1642e0376a846dd30593a6b8250328e3", "score": "0.6412839", "text": "function undo_htmlspecialchars($escaped_string) {\r\n $search = array('&amp;', '&lt;', '&gt;');\r\n $replace = array('&', '<', '>');\r\n return str_replace($search, $replace, $escaped_string);\r\n }", "title": "" }, { "docid": "1dcec316577054db7b7e721d0906e581", "score": "0.6392865", "text": "public function getEscapedValue()\n {\n return htmlspecialchars($this->getValue());\n }", "title": "" }, { "docid": "d3453201ac3e95526be22a4ec85b8004", "score": "0.63878995", "text": "function h($string=\"\") {\n return htmlspecialchars($string);\n}", "title": "" }, { "docid": "9c027d08136cb549b74d5ee7af11e1ad", "score": "0.63583446", "text": "function h($string=\"\") {\n return htmlspecialchars($string);\n}", "title": "" }, { "docid": "dd6974780c19cc62b39acddb142ad756", "score": "0.6347349", "text": "function html ($data) {\n return htmlspecialchars(trim($data), ENT_QUOTES, 'UTF-8');\n}", "title": "" }, { "docid": "0e439e719eccb4486f3eb9cfca4ff1a7", "score": "0.63376087", "text": "function safe($string) {\r\n return htmlspecialchars($string, ENT_QUOTES, 'UTF-8');\r\n }", "title": "" }, { "docid": "6235780890f3aa2b5ebd5c080647140c", "score": "0.633617", "text": "function html($text)\n {\n return htmlspecialchars($text, ENT_QUOTES, 'UTF-8');\n }", "title": "" }, { "docid": "fd8a83e7cf467a26b84cb3cdaa7997dc", "score": "0.63257563", "text": "function db_output($string) {\r\nreturn htmlspecialchars($string);\r\n}", "title": "" }, { "docid": "af186e51cb61442f2efb15ef5afb62db", "score": "0.63138825", "text": "function quoteInput($s)\n {\n if ($this->SCRIPT_DECODE_MODE == 'entities')\n return str_replace(array('\"', '<', '>'), array('&quot;', '&lt;', '&gt;'), $s);\n else\n return htmlspecialchars($s);\n }", "title": "" }, { "docid": "bb1f5b1aa182b6513a64ab7a6ae89e16", "score": "0.63113624", "text": "function html($text) : string {\n return htmlspecialchars((string)$text, ENT_QUOTES | ENT_HTML5);\n}", "title": "" }, { "docid": "eb98ed877fd868a11cecfb1330961406", "score": "0.6307785", "text": "function quoteInput($s)\n\t{\n\t\tif ($this->SCRIPT_DECODE_MODE == 'entities')\n\t\t\treturn str_replace(array('\"', '<', '>'), array('&quot;', '&lt;', '&gt;'), $s);\n\t\telse\n\t\t\treturn htmlspecialchars($s);\n\t}", "title": "" }, { "docid": "bf3744bedda10069078d36aa684c28ed", "score": "0.6306183", "text": "function sanitize($dirty){\n return htmlentities($dirty, ENT_QUOTES, \"UTF-8\");\n}", "title": "" }, { "docid": "924e49715fac138c02d4b3329f1f0359", "score": "0.6294269", "text": "function undo_htmlspecialchars($escaped_string) {\n $search = array('&amp;', '&lt;', '&gt;', '&quot;');\n $replace = array('&', '<', '>', '\"');\n return str_replace($search, $replace, $escaped_string);\n }", "title": "" }, { "docid": "1b5650916bac30521a9368ece88a1ea2", "score": "0.6279334", "text": "public function getEscapedValue()\n {\n return htmlspecialchars($this->get('value'));\n }", "title": "" }, { "docid": "c237d826c5ca36e17f94c0bd9c8d3a9c", "score": "0.6269299", "text": "function h($text_to_escape){\n\treturn htmlspecialchars($text_to_escape, ENT_NOQUOTES, 'UTF-8');\n}", "title": "" }, { "docid": "81f217849d9edd030dab1db6ba3163cc", "score": "0.62669647", "text": "function confHtmlEnt($data)\n{\n return htmlentities($data, ENT_QUOTES, 'UTF-8');\n}", "title": "" }, { "docid": "0fb250b84270eff66a629f2ba02cea96", "score": "0.62627536", "text": "public static function safe(&$var) {\n return htmlspecialchars($var);\n }", "title": "" }, { "docid": "8b1b58afbd0b8d820df5ded4faf77e1a", "score": "0.6260843", "text": "function esc($payload) { \n return htmlspecialchars($payload, ENT_QUOTES, 'UTF-8'); \n }", "title": "" }, { "docid": "2af7ebfe247496d9792b30caa7c2a80b", "score": "0.62412274", "text": "function enc(?string $val): string\n{\n return $val ? htmlspecialchars($val, ENT_QUOTES, APP['charset'], false) : '';\n}", "title": "" }, { "docid": "2149d4ec464ce9b0c222b2e9ce97b26b", "score": "0.6227126", "text": "function test_name($data) {\n $data = htmlspecialchars($data);\n return $data;\n }", "title": "" }, { "docid": "92c83ceb448274a304903330bc733e6c", "score": "0.6223005", "text": "public function getWhomAttribute($value)\n\t{\n\t\treturn htmlspecialchars($value);\n\t}", "title": "" }, { "docid": "383be4faf4afa0571903467d81cae5c0", "score": "0.62217975", "text": "public static function htmlspecialchars($str) {\r\n\t\treturn htmlspecialchars($str, ENT_NOQUOTES, 'UTF-8');\r\n\t}", "title": "" }, { "docid": "dfecd0acaddee7504c6b2cad8e6a6be0", "score": "0.6215956", "text": "function escape($html) {\n return htmlspecialchars($html, ENT_QUOTES | ENT_SUBSTITUTE, \"UTF-8\");\n}", "title": "" }, { "docid": "dfecd0acaddee7504c6b2cad8e6a6be0", "score": "0.6215956", "text": "function escape($html) {\n return htmlspecialchars($html, ENT_QUOTES | ENT_SUBSTITUTE, \"UTF-8\");\n}", "title": "" }, { "docid": "2e64a928e3c6e41a34ff3a90b6d4bd5a", "score": "0.6213504", "text": "function sanitize($text) \n{ \n\t$text = str_replace(\"<\", \"&lt;\", $text); \n\t$text = str_replace(\">\", \"&gt;\", $text); \n\t$text = str_replace(\"\\\"\", \"&quot;\", $text); \n\t$text = str_replace(\"'\", \"&#039;\", $text); \n\t$text = addslashes($text); \n\t\n\treturn $text; \n}", "title": "" }, { "docid": "0ae12d2be578ea4791a4ca92c50d1efa", "score": "0.62077457", "text": "function smart_htmlspecialchars( $HTML_text )\n{\n\t// Get a table containing the HTML special characters translations\n\t$translation_table=get_html_translation_table (HTML_SPECIALCHARS);\n\n\t// Change the ampersand to translate to itself, to avoid getting &amp;\n\t$translation_table[ chr(38) ] = '&';\n\n\t// Perform replacements\n\t// Regular expression says: find an ampersand, check the text after it,\n\t// if the text after it is not one of the following, then replace the ampersand\n\t// with &amp;\n\t// a) any combination of up to 4 letters (upper or lower case) with at least 2 or 3 non whitespace characters, then a semicolon\n\t// b) a hash symbol, then between 2 and 7 digits\n\t// c) a hash symbol, an 'x' character, then between 2 and 7 digits\n\t// d) a hash symbol, an 'X' character, then between 2 and 7 digits\n\treturn preg_replace( \"/&(?![A-Za-z]{0,4}\\w{2,3};|#[0-9]{2,7}|#x[0-9]{2,7}|#X[0-9]{2,7};)/\",\"&amp;\" , strtr( $HTML_text, $translation_table ) );\n}", "title": "" }, { "docid": "1f0cd6a483ff33c8b314e2e01c56d784", "score": "0.6200452", "text": "private static function htmlspecialchars(string $value)\n {\n if (strpos($value, '&') !== false) {\n $value = htmlspecialchars($value);\n }\n\n return $value;\n }", "title": "" }, { "docid": "1e91f25015d4098be26b51f141b0c108", "score": "0.61935616", "text": "function e($value)\n{\n\treturn HTML::entities($value);\n}", "title": "" }, { "docid": "5815aceb51c715c0a0f11d796f74c3be", "score": "0.6192299", "text": "function n2_esc_attr($text) {\n $safe_text = n2_check_invalid_utf8($text);\n $safe_text = _n2_specialchars($safe_text, ENT_QUOTES);\n\n return $safe_text;\n}", "title": "" }, { "docid": "82b635ffc7260a5330fcb9d80de5044f", "score": "0.61570334", "text": "function esc($string)\n{\n return htmlspecialchars($string, NULL, 'UTF-8', false);\n}", "title": "" }, { "docid": "16dfe3a8522a4e1279f3baa5d407d033", "score": "0.615585", "text": "public function getHtmlSafeValue();", "title": "" }, { "docid": "58d8c5e0b921bd2bc19bede193b044b0", "score": "0.61381257", "text": "function h($string)\n{\n\treturn htmlspecialchars($string, ENT_QUOTES, 'utf-8');\n}", "title": "" }, { "docid": "530859f9ab74c9434741cb62916de792", "score": "0.6136905", "text": "function cms_html8($str = '') {\n return htmlspecialchars($str, ENT_QUOTES);//,'UTF-8': with this para invalid str becomes empty str;fm sidu 3.5 this para been turned off, any bug found please fix this then!!!\n}", "title": "" }, { "docid": "4b7fa32cde739ea50c6dcc2ef1e4d70f", "score": "0.61105865", "text": "private function sanitize($input)\n\t{\n\t\treturn htmlspecialchars(strip_tags(trim($input)));\n\t}", "title": "" }, { "docid": "caf3f176361783079573c92fc0a87460", "score": "0.6099277", "text": "public function setName($name)\n{\n$this->name = htmlspecialchars($name);\n\nreturn $this;\n}", "title": "" }, { "docid": "a7416cb680425175f8a8ec631f9bfa17", "score": "0.6094814", "text": "function htmlEscape($html){\n return htmlspecialchars($html, ENT_HTML5, 'UTF-8');\n}", "title": "" }, { "docid": "77a2f00d1295ba06d10f2a8fe1e62034", "score": "0.6090722", "text": "function Edit_user_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "742db0306f3ad6064bfe0ae99feb681c", "score": "0.6076471", "text": "function html(string $text = null): string\n{\n return htmlspecialchars($text, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');\n}", "title": "" }, { "docid": "f67f53ea41c48bbb6529e4acd1de521b", "score": "0.6073156", "text": "function block_annotate_process_usr_input($inputdata) {\n $dataencoded = json_encode ( $inputdata );\n return htmlspecialchars ( $dataencoded, ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML5, 'UTF-8' );\n}", "title": "" }, { "docid": "d32ad7135e922ed203ada90ad4cb9857", "score": "0.60470426", "text": "function e($value)\n\t{\n\t\treturn htmlentities($value, ENT_QUOTES, 'UTF-8', false);\n\t}", "title": "" }, { "docid": "44754a9bed81f8c79321c4212f5b4ff7", "score": "0.6036785", "text": "function safisha($data){\n $data=trim($data);\n $data=stripslashes($data);\n $data=htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "b03818ea90cd179a39bf234f76002603", "score": "0.60331535", "text": "function test_input($data){\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data,ENT_QUOTES);\r\n return $data; \r\n}", "title": "" }, { "docid": "e1c951f32322d61b0b72e132bbb1c2b5", "score": "0.6031373", "text": "function name()\r\n {\r\n return htmlspecialchars( $this->Name );\r\n }", "title": "" }, { "docid": "e1c951f32322d61b0b72e132bbb1c2b5", "score": "0.6031373", "text": "function name()\r\n {\r\n return htmlspecialchars( $this->Name );\r\n }", "title": "" }, { "docid": "7441d61ac538ebe23fd2fb54c593f9db", "score": "0.60205287", "text": "function anti_injection($data){\r\n $filter = stripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES)));\r\n return $filter;\r\n}", "title": "" }, { "docid": "6196f1d1cd3802ffd6b1db942ca9b6cc", "score": "0.6014182", "text": "function input_text($feldname, $label='Textfeld')\r\n { ?> \r\n <tr><td class='rechts'><?php print $label;?>: </td>\r\n <?php \r\n if (iswech() && isset($_POST['mailadresse']))\r\n { ?> \r\n <td><input type='text' name='<?php print $feldname;?>' value='<?php print htmlentities($_POST[$feldname]);?>'></td>\r\n <?php } elseif (isset($_SESSION['mailadresse']) && isset($_SESSION[$feldname]))\r\n { ?> \r\n <td><input type='text' name='<?php print $feldname;?>' value='<?php print htmlentities($_SESSION[$feldname]);?>'></td>\r\n <?php } else { ?> \r\n\t\t<td><input type='text' name='<?php print $feldname;?>'></td>\r\n <?php } ?> \r\n </tr>\r\n<?php }", "title": "" }, { "docid": "d6b04d8694cf6c85fd7cf1a43b0ead6f", "score": "0.6013219", "text": "function displayAsHtml ($input) {\n\n}", "title": "" }, { "docid": "7a14ef7eba5970ba2d01f5db8589c87b", "score": "0.60106224", "text": "function n2_esc_html($text) {\n $safe_text = n2_check_invalid_utf8($text);\n $safe_text = _n2_specialchars($safe_text, ENT_QUOTES);\n\n return $safe_text;\n}", "title": "" }, { "docid": "ca7cd8a8da39458ce64422c544bd7a35", "score": "0.60098207", "text": "function sanitizeInput($input)\n{\n $input = trim($input); // Trim whitespace from beginning/end\n $input = htmlspecialchars($input); // Convert special characters to HTML entities\n\n return $input;\n}", "title": "" }, { "docid": "c14a147cf1cd823a5727eb599d29cfb0", "score": "0.6008125", "text": "function vbulletin_htmlspecialchars_uni($text)\n {\n $text = preg_replace('/&(?!#[0-9]+;)/si', '&amp;', $text); // translates all non-unicode entities\n\n return str_replace(array('<', '>', '\"'), array('&lt;', '&gt;', '&quot;'), $text);\n }", "title": "" }, { "docid": "b55f967a45a5767a07667781aa362595", "score": "0.6004244", "text": "function sanitize($string) {\n return strip_tags(htmlspecialchars($string));\n}", "title": "" }, { "docid": "3ae941cd40e5218992d1a55e6752770b", "score": "0.5995577", "text": "function escape_tags($string) {\n\n\treturn(htmlspecialchars($string, ENT_COMPAT, 'UTF-8', false));\n\n}", "title": "" }, { "docid": "2f185746815b71bccae3f44ccb3cc241", "score": "0.5995328", "text": "function anti_injection($data){\n\t\t\t\t\t\t\t$filter = stripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES)));\n\t\t\t\t\t\t\treturn $filter;\n\t\t\t\t\t\t}", "title": "" }, { "docid": "f89053be8e7010bd017650fca680a25e", "score": "0.59921646", "text": "function sanitze(&$value) {\n //Add or remove filtering as you like\n $value = htmlspecialchars($value);\n $value = stripslashes($value);\n //$value = mysql_real_escape_string($value);\n}", "title": "" }, { "docid": "60c44b14fdc82d8e34c327e65f810d87", "score": "0.59878385", "text": "function custom_htmlentities($value)\n\t{\n\t\t//return htmlentities($value);\n\t\treturn $this->unicode_htmlentities($value);\n\t}", "title": "" }, { "docid": "8c0e387b30ade8a2a29c5ffccb94687f", "score": "0.5981635", "text": "function sanitize($data){\n\t//return mysql_real_escape_string($data);\n\treturn htmlentities(strip_tags(mysql_real_escape_string($data)));\n}", "title": "" }, { "docid": "b4297fb22eb9b2a0090b25d619e68b1d", "score": "0.59717643", "text": "function inspiry_sanitize_field( $str ) {\n\n\t\t$allowed_html = array(\n\t\t\t'a' => array(\n\t\t\t\t'href' => array(),\n\t\t\t\t'target' => array(),\n\t\t\t),\n\t\t\t'br' => array(),\n\t\t\t'strong' => array(),\n\t\t\t'i' => array(),\n\t\t\t'em' => array(),\n\t\t);\n\n\t\t$str = wp_kses( $str, $allowed_html );\n\n\t\treturn apply_filters( 'inspiry_sanitize_field', $str );\n\t}", "title": "" }, { "docid": "06449920cfa5d65d35b9faa3b586b572", "score": "0.59703314", "text": "function input ($s) {\r\n /*$s = stripslashes($s);\r\n $s = htmlentities($s);\r\n $s = htmlspecialchars($s, ENT_QUOTES);*/\r\n \tif (ini_get('magic_quotes_gpc')) $s = stripslashes($s);\r\n\t$search = array(\"\\\"\", \"'\", \"\\\\\", '\\\"', \"\\'\", \"<\", \">\", \"&nbsp;\");\r\n\t$replace = array(\"&quot;\", \"&#39;\", \"&#92;\", \"&quot;\", \"&#39;\", \"&lt;\", \"&gt;\", \" \");\r\n\t$s = str_replace($search, $replace, $s);\r\n\r\n\t//$s = htmlentities($s,null,\"UTF-8\");\r\n\t//$s = preg_replace('/[^\\x00-\\x7F]/e', '\"&#\".ord(\"$0\").\";\"', $s);\r\n return $s;\r\n}", "title": "" }, { "docid": "4969990d6282a8e098504ebd8563cc0f", "score": "0.5969821", "text": "function htmlspecialchars_ent($text,$quote_style=ENT_COMPAT,$doctype='HTML')\n\t{\n\t\t// re-establish default if overwritten because of third parameter\n\t\t// [ENT_COMPAT] => 2\n\t\t// [ENT_QUOTES] => 3\n\t\t// [ENT_NOQUOTES] => 0\n\t\tif (!in_array($quote_style,array(ENT_COMPAT,ENT_QUOTES,ENT_NOQUOTES)))\n\t\t{\n\t\t\t$quote_style = ENT_COMPAT;\n\t\t}\n\n\t\t// define patterns\n\t\t$terminator = ';|(?=($|[\\n<]|&lt;))';\t// semicolon; or end-of-string, newline or tag\n\t\t$numdec = '#[0-9]+';\t\t\t\t\t// numeric character reference (decimal)\n\t\t$numhex = '#x[0-9a-f]+';\t\t\t\t// numeric character reference (hexadecimal)\n\t\tif ($doctype == 'XML')\t\t\t\t\t// pure XML allows only named entities for special chars\n\t\t{\n\t\t\t// only valid named entities in XML (case-sensitive)\n\t\t\t$named = 'lt|gt|quot|apos|amp';\n\t\t\t$ignore_case = '';\n\t\t\t$entitystring = $named.'|'.$numdec.'|'.$numhex;\n\t\t}\n\t\telse\t\t\t\t\t\t\t\t\t// (X)HTML\n\t\t{\n\t\t\t$alpha = '[a-z]+';\t\t\t\t\t// character entity reference TODO $named='eacute|egrave|ccirc|...'\n\t\t\t$ignore_case = 'i';\t\t\t\t\t// names can consist of upper and lower case letters\n\t\t\t$entitystring = $alpha.'|'.$numdec.'|'.$numhex;\n\t\t}\n\t\t$escaped_entity = '&amp;('.$entitystring.')('.$terminator.')';\n\n\t\t// execute our replacement hsc_secure() function, passing on optional parameters\n\t\t$output = $this->hsc_secure($text,$quote_style);\n\n\t\t// \"repair\" escaped entities\n\t\t// modifiers: s = across lines, i = case-insensitive\n\t\t$output = preg_replace('/'.$escaped_entity.'/s'.$ignore_case,\"&$1;\",$output);\n\n\t\t// return output\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "41e0ce10fe23e5a53423cbaf91e911a8", "score": "0.5962219", "text": "function formatInput($data) {\n\t\t$data = trim($data);\n\t\t$data = stripslashes($data);\n\t\t$data = htmlspecialchars($data);\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "4e6f66c0ea19cef5cd08e1c5bae55ec5", "score": "0.5956759", "text": "function test_input($data)\n{\n $data=trim($data); //removing white spaces\n $data=stripslashes($data); // removing back slashes\n $data=htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "28020a592619447c6e0e33c05b628e56", "score": "0.5949282", "text": "public function enableHtml();", "title": "" }, { "docid": "1c672250a4a26a923ec89ea3ad8f6e98", "score": "0.59481883", "text": "public static function getClean($input){\n\t\treturn htmlspecialchars($input);\n\t}", "title": "" }, { "docid": "84ae73971e9122175c404b1fe5d436da", "score": "0.59382296", "text": "function escape($string = '')\n{\n return htmlspecialchars($string, ENT_COMPAT, 'UTF-8', false);\n}", "title": "" }, { "docid": "aac318171f3d1afdbec5b4fc631f1d5f", "score": "0.5931936", "text": "function anti_injection($data){\n $filter = stripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES)));\n return $filter;\n}", "title": "" }, { "docid": "3ab70d9fc5d19a02099fdbc7b67fa01c", "score": "0.5927471", "text": "function html_encode ($str) {\n return filter_var($str, FILTER_SANITIZE_FULL_SPECIAL_CHARS, ENT_QUOTES);\n}", "title": "" }, { "docid": "59c5553e95b9aeaf221e75893a7053a3", "score": "0.5923734", "text": "function filter_data($d){\n\t\t$d = stripslashes($d);\n\t\t$d = trim($d);\n\t\t$d = htmlspecialchars($d);\n\t\treturn $d;\n\t}", "title": "" }, { "docid": "9f0d308b2f6f245e47be4b9129fbe85f", "score": "0.5923455", "text": "function data_input($data){\r\n $data = trim($data);\r\n\r\n $data = stripslashes($data);\r\n\r\n $data = htmlspecialchars($data);\r\n\r\n return $data;\r\n\r\n }", "title": "" }, { "docid": "7c9b750f2f97896196293ab7b5e50729", "score": "0.59191895", "text": "function sanitize($in) {\n\treturn addslashes(htmlspecialchars(strip_tags(trim($in))));\n}", "title": "" }, { "docid": "e6302c67a54cad0d81baf0ab206d6253", "score": "0.59136707", "text": "function desctexttooltip($input)\r\n{\r\n\treturn str_replace(\"'\",\"%39\",preg_replace('/\\s\\s+/', '</br>', $input));\r\n}", "title": "" }, { "docid": "900f047dd1543776e8f02952cbe621a6", "score": "0.5913645", "text": "function cleanthis($inp)\n{\n $inp = mysql_real_escape_string(htmlspecialchars(strip_tags(trim($inp))));\n return $inp;\n}", "title": "" } ]
81a315b001737e6094d04c731048dd90
The owner of the mailbox
[ { "docid": "3ba656268c2cac08e70c23cd4d561c68", "score": "0.0", "text": "public function inbox() {\n return $this->hasOne(MailboxInbox::class);\n }", "title": "" } ]
[ { "docid": "d36d3e74304c1c8f02455b5d3f9966ae", "score": "0.7654919", "text": "public function getOwner()\n {\n return $this->getValue('owner');\n }", "title": "" }, { "docid": "da7a6f8dbbdd305d6f841c86a69077a3", "score": "0.75836486", "text": "public function owner()\n {\n if (! $owner = $this->bean->fetchAs('user')->owner) {\n $owner = R::dispense('user');\n }\n return $owner;\n }", "title": "" }, { "docid": "9a405806538b3f22e3d110b5ac3bb709", "score": "0.7564962", "text": "public function get_ownerName()\n {\n return $this->_ownerName;\n }", "title": "" }, { "docid": "9a9e10accf662f358191a305aaa35841", "score": "0.7544694", "text": "public function getMailOwner(){\n // The Owner Mail path\n $path = $this->getFormDir() . DIRECTORY_SEPARATOR . $this->getHandle() . self::APPEND_MAIL_OWNER_PART;\n\n // Return the path if it exists.\n return file_exists(Craft::getAlias($path)) ? $path : null;\n }", "title": "" }, { "docid": "17eb92b4fbf526c480ac87342e9a3201", "score": "0.75205654", "text": "public function getOwner()\n\t{\n\t\treturn $this->owner;\n\t}", "title": "" }, { "docid": "4406f3743dbde0a5c47f5f71fd0d96e5", "score": "0.75124025", "text": "public function getObjUserOwner()\n {\n return $this->objUserOwner;\n }", "title": "" }, { "docid": "fed4ec60cb6a1880281b1aae38d7d8a8", "score": "0.74966705", "text": "public function getOwner()\n {\n return $this->owner;\n }", "title": "" }, { "docid": "fed4ec60cb6a1880281b1aae38d7d8a8", "score": "0.74966705", "text": "public function getOwner()\n {\n return $this->owner;\n }", "title": "" }, { "docid": "fed4ec60cb6a1880281b1aae38d7d8a8", "score": "0.74966705", "text": "public function getOwner()\n {\n return $this->owner;\n }", "title": "" }, { "docid": "fed4ec60cb6a1880281b1aae38d7d8a8", "score": "0.74966705", "text": "public function getOwner()\n {\n return $this->owner;\n }", "title": "" }, { "docid": "fed4ec60cb6a1880281b1aae38d7d8a8", "score": "0.74966705", "text": "public function getOwner()\n {\n return $this->owner;\n }", "title": "" }, { "docid": "fed4ec60cb6a1880281b1aae38d7d8a8", "score": "0.74966705", "text": "public function getOwner()\n {\n return $this->owner;\n }", "title": "" }, { "docid": "fed4ec60cb6a1880281b1aae38d7d8a8", "score": "0.74966705", "text": "public function getOwner()\n {\n return $this->owner;\n }", "title": "" }, { "docid": "fed4ec60cb6a1880281b1aae38d7d8a8", "score": "0.74966705", "text": "public function getOwner()\n {\n return $this->owner;\n }", "title": "" }, { "docid": "fed4ec60cb6a1880281b1aae38d7d8a8", "score": "0.74966705", "text": "public function getOwner()\n {\n return $this->owner;\n }", "title": "" }, { "docid": "683d97f07171b40e93b43ebd8c35b68e", "score": "0.7479237", "text": "public function owner()\n {\n if(isset($this->user_id)) return $this->user;\n else return false;\n }", "title": "" }, { "docid": "b01c57136fedc0662360d9930d6def1a", "score": "0.74648225", "text": "function get_owner_id()\n {\n return $this->get_default_property(self :: PROPERTY_OWNER_ID);\n }", "title": "" }, { "docid": "f42aa77dabba884e97826523ee883e57", "score": "0.74623203", "text": "public function getOwner() {\n\t\treturn $this->owner;\n\t}", "title": "" }, { "docid": "f42aa77dabba884e97826523ee883e57", "score": "0.74623203", "text": "public function getOwner() {\n\t\treturn $this->owner;\n\t}", "title": "" }, { "docid": "e991bf88d283f75c4238383d0c0b0cdb", "score": "0.74575233", "text": "public function getOwner() : string\n {\n return $this->owner;\n }", "title": "" }, { "docid": "133fc04465c04928a931acd5eb413cac", "score": "0.7437253", "text": "public function getOwner()\n {\n return $this->getField('owner');\n }", "title": "" }, { "docid": "3b8211253e0da66fe29455cfd80a2045", "score": "0.73899895", "text": "public function owner()\n {\n return $this->owner;\n }", "title": "" }, { "docid": "cf18570977abbf6cfe303136b128d7ca", "score": "0.7386432", "text": "public function getOwner()\n {\n return $this->getRawValue('Owner');\n }", "title": "" }, { "docid": "293cdee49e12994169f6e1e68b7c7250", "score": "0.73527503", "text": "public function owner_id()# {{{\n {\n if(isset($this->user_id)) return $this->user_id;\n else return NULL;\n }", "title": "" }, { "docid": "2d68c245b29fd7faf25e8d185f247674", "score": "0.7348585", "text": "public function getOwner () : ?string\r\n {\r\n return $this->user->getId();\r\n }", "title": "" }, { "docid": "1d57a79323bbc45f3932664c6596c871", "score": "0.732347", "text": "public function user()\n {\n return $this->owner();\n }", "title": "" }, { "docid": "1d57a79323bbc45f3932664c6596c871", "score": "0.732347", "text": "public function user()\n {\n return $this->owner();\n }", "title": "" }, { "docid": "239b22f9ba5d56ea3534e45cf155e1d3", "score": "0.7294533", "text": "public function owner() { return $this->_m_owner; }", "title": "" }, { "docid": "fb5c849880dd30a64a5f065ade2b5979", "score": "0.7284022", "text": "public function getOwnerUserPrincipalName()\n {\n if (array_key_exists(\"ownerUserPrincipalName\", $this->_propDict)) {\n return $this->_propDict[\"ownerUserPrincipalName\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "f7cffa46dd4d123de9839831cff091c0", "score": "0.7272924", "text": "public function GetOwner()\n {\n if (!$this->Id) {\n add_log('ClientJobSchedule::GetOwner()', 'Id not set');\n return;\n }\n $sys = pdo_query('SELECT userid FROM client_jobschedule WHERE id=' . qnum($this->Id));\n $row = pdo_fetch_array($sys);\n return $row[0];\n }", "title": "" }, { "docid": "e480f5c345e92b25d1361ee1cf924efa", "score": "0.72595984", "text": "public function getOwnerId()\n {\n return $this->owner_id;\n }", "title": "" }, { "docid": "e480f5c345e92b25d1361ee1cf924efa", "score": "0.72595984", "text": "public function getOwnerId()\n {\n return $this->owner_id;\n }", "title": "" }, { "docid": "c6bcd0926bf7dbc13d8a827f48dc543e", "score": "0.7119884", "text": "public function getOwnerId() \n {\n return $this->_fields['OwnerId']['FieldValue'];\n }", "title": "" }, { "docid": "36c89c8d41bb0b9d22b7c0bc4ce0a5d9", "score": "0.7078613", "text": "public function get_ownerContact()\n {\n return $this->_ownerContact;\n }", "title": "" }, { "docid": "86c498c61759650ad3ad4dbe4d7f1bea", "score": "0.70540464", "text": "public function getOwnerId()\n {\n return $this->getId();\n }", "title": "" }, { "docid": "e478f2b2d1a5aa29db34a2d0f3c85596", "score": "0.69081676", "text": "public function getOwner()\n {\n return (int)$this->getDepartmentId() . '_' . (int)$this->getUserId();\n }", "title": "" }, { "docid": "cd8a637e4fe8bb8ea510bca6d61d8ffa", "score": "0.6880199", "text": "public function getOwnerOrganizationName()\n {\n if (array_key_exists(\"ownerOrganizationName\", $this->_propDict)) {\n return $this->_propDict[\"ownerOrganizationName\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "396fc711eacef7548cfe1dd225a68db6", "score": "0.6864674", "text": "function getBlogOwnerUser() {\n\t\t$blog_owner_email = get_bloginfo('admin_email');\n\t\t$blog_owner = get_user_by('email', $blog_owner_email);\n\t\treturn $blog_owner;\n\t}", "title": "" }, { "docid": "f4977693a256bc114f303727bd64fdac", "score": "0.6809647", "text": "public function getOwner()\n {\n foreach ($this->fraHasUsers as $fraHasUser) {\n if ($fraHasUser->isOwner()) {\n return $fraHasUser->getUser();\n }\n }\n\n return null;\n }", "title": "" }, { "docid": "d9a16dd35b6f1a90964e57851f65496a", "score": "0.6802738", "text": "public function getAircraftowner()\n\t{\n\t\treturn $this->aircraftowner;\n\t}", "title": "" }, { "docid": "c2b520ac8d6e2a9bc21a6e4551fa6ba2", "score": "0.67998004", "text": "public function get_owner_id() {\n\t\t\treturn (int) $this->post->post_author;\n\t\t}", "title": "" }, { "docid": "9a589173d334045e38f4af1196c6d86c", "score": "0.67406946", "text": "public function getConversationNameForOwner()\n {\n return $this->conversationNameForOwner;\n }", "title": "" }, { "docid": "d8d5b82d6797eb1d5b74cd0f5f1c5b84", "score": "0.67365414", "text": "public function getOwnerKey(): string\n {\n return property_exists($this, 'owner_key') ? $this->owner_key : 'user_id';\n }", "title": "" }, { "docid": "1464945eeeac11bdbda4b26f416b3515", "score": "0.67351866", "text": "public function getOwner();", "title": "" }, { "docid": "92a6926b2819cea22de05055f0cb4177", "score": "0.67242885", "text": "public function getOwnerDisplayName()\n {\n return $this->getField('ownerDisplayName');\n }", "title": "" }, { "docid": "d82bd65c08ea393c879765ac0940d9dd", "score": "0.6675685", "text": "public function getOwnerId();", "title": "" }, { "docid": "d82bd65c08ea393c879765ac0940d9dd", "score": "0.6675685", "text": "public function getOwnerId();", "title": "" }, { "docid": "4b165f3d35eca7ee883b67b0f9bcf38c", "score": "0.66594386", "text": "function getOwnerIdentifier();", "title": "" }, { "docid": "55423f1d522e71d1e25f27f29dd4b79a", "score": "0.65621585", "text": "public function getOwner($path) {\n\t\treturn \\OC_User::getUser();\n\t}", "title": "" }, { "docid": "511dd80d83d5de96674777bcb3f6f780", "score": "0.6504524", "text": "public function getOwner()\n {\n return $this->hasOne(User::className(), ['id' => 'owner_id']);\n }", "title": "" }, { "docid": "70f925600ab4b54b5004e130fa9053f7", "score": "0.6472364", "text": "public function getOwnerEntityId()\n {\n return $this->ownerEntityId;\n }", "title": "" }, { "docid": "b459ee6dbbe769cd55d3ca95268ccc12", "score": "0.6467859", "text": "public function getOwner() {\n\t\treturn $this->writer;\n\t}", "title": "" }, { "docid": "da34901f8b9367ca52d533e059503d77", "score": "0.64593136", "text": "public function getOwner($path) {\n\t\tif (is_object($this->user)) {\n\t\t\treturn $this->user->getUID();\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "337fd232bc9221a5c843a5b6a800169b", "score": "0.64575857", "text": "public function owner()\n {\n $userModel = Config::get('teamwork.user_model');\n $userKeyName = (new $userModel())->getKeyName();\n return $this->hasOne(Config::get('teamwork.user_model'), $userKeyName, Config::get('teamwork.team_owner_column'));\n }", "title": "" }, { "docid": "18a785267f209763dbdd2aa5d5717242", "score": "0.6399257", "text": "public function getOwner()\n {\n if ($this->getToken()) {\n $this->owner = $this->getResourceOwner($this->getToken());\n }\n\n return $this->owner;\n }", "title": "" }, { "docid": "c4b4617233b0427cd85c33eab2a33fcd", "score": "0.63162327", "text": "public function owner(){\n $twitter = $this->blog_author_twitter_username;\n $user = User::where('twitter_username', $twitter)->first();\n if ($user->exists) {\n return $user->id;\n }else{\n return false;\n }\n\n }", "title": "" }, { "docid": "69a38b83728e356c8be4695c8c5f1a1c", "score": "0.62928915", "text": "public function owner()\n {\n return $this->belongsTo(Base::$userModel, 'owner_id');\n }", "title": "" }, { "docid": "94efd55ef0aff8a395eb9a41fea24984", "score": "0.6274503", "text": "public function amIOwner() {\n // ...so basically this means is the reader as sessionUser in the chat\n $sessionUser = Yii::$app->user->identity;\n if ( empty($sessionUser) ) {\n return false;\n }\n $amIReader = 'reader' == $sessionUser->role;\n $is = $amIReader && ($this->readerId == $sessionUser->id);\n return $is;\n }", "title": "" }, { "docid": "345685f00427f39b50000a74f0e13230", "score": "0.6257639", "text": "public function getVoucherOwnerName()\n {\n return $this->voucher_owner_name;\n }", "title": "" }, { "docid": "e815b743cfb4e7805f6ba652eb902954", "score": "0.6253938", "text": "public function isOwner()\n {\n return (Yii::app()->user->crew->ID == $this->ID); \n }", "title": "" }, { "docid": "a26372df6957eb54acaa9d499b97c99c", "score": "0.6250146", "text": "public function owner()\n {\n $userModel = Config::get( 'restauranter.user_model' );\n $userKeyName = ( new $userModel() )->getKeyName();\n return $this->hasOne(Config::get('restauranter.user_model'), $userKeyName, \"owner_id\");\n }", "title": "" }, { "docid": "c91b692e0a55c0133cff14f759620104", "score": "0.6246053", "text": "function get_owner($file)\n{\n\tif(function_exists('fileowner') && function_exists('posix_getpwuid'))\n\t{\n\t\t@$tmp=posix_getpwuid(fileowner($file));\n\t\treturn $tmp['name'];\n\t}\n\treturn '';\n}", "title": "" }, { "docid": "6aa3dc87c7a47703bc0a9ad2ffe1d396", "score": "0.6195973", "text": "public function getVoucherOwnerId()\n {\n return $this->voucher_owner_id;\n }", "title": "" }, { "docid": "bea5186d106e324fe8a5fd0ca6e17575", "score": "0.61829", "text": "protected function getOwnerName() {\n $owner_name = strtolower(\n str_replace(\n array('Terminus\\\\', 'Models\\\\'),\n '',\n get_class($this->owner)\n )\n );\n return $owner_name;\n }", "title": "" }, { "docid": "463bc3d3bd2fba1572411224af18bd0a", "score": "0.61820215", "text": "public function resolveOwner() {\n $portal = Portal::driver('vlgportal');\n $portal->setToken(Auth::token());\n\n foreach ($portal->portalUsers()['users'] as $user) {\n if ($this->owner_user_id == $user['id']) {\n return $user['name'] . ' ' . $user['last_name'];\n }\n }\n\n return \"Onbekend\";\n }", "title": "" }, { "docid": "e136a11c056200e573e369eaf00c7723", "score": "0.61781013", "text": "public function owner()\n {\n return $this->belongsTo(config('multi-tenant.user_class'), 'owner_id');\n }", "title": "" }, { "docid": "babec43ff562925d969e2752ff2b3843", "score": "0.6173797", "text": "public function getOwnerUserPrincipalName(): ?string {\n $val = $this->getBackingStore()->get('ownerUserPrincipalName');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'ownerUserPrincipalName'\");\n }", "title": "" }, { "docid": "9f9bb3b9c5131baf49425e9bcf946226", "score": "0.61730176", "text": "public function owner()\n {\n \treturn $this->hasOne('App\\User', 'id', 'user_id');\n }", "title": "" }, { "docid": "c72443d127a2b8daa0bc747b6953784a", "score": "0.61642796", "text": "public function owner() {\n \n }", "title": "" }, { "docid": "4e24a242d7207dfa6f136546fb124974", "score": "0.61632496", "text": "function getOwnerObject() {\n if (!(isset($this->_owner) && is_object($this->_owner))) {\n if (isset($this->module) && is_object($this->module)) {\n $this->_owner = $this->module;\n }\n }\n return $this->_owner;\n }", "title": "" }, { "docid": "962eb1bf076cdede15a05e4e34c4790b", "score": "0.6143441", "text": "public function getOwnerType()\n {\n if (array_key_exists(\"ownerType\", $this->_propDict)) {\n if (is_a($this->_propDict[\"ownerType\"], \"\\Beta\\Microsoft\\Graph\\Model\\OwnerType\") || is_null($this->_propDict[\"ownerType\"])) {\n return $this->_propDict[\"ownerType\"];\n } else {\n $this->_propDict[\"ownerType\"] = new OwnerType($this->_propDict[\"ownerType\"]);\n return $this->_propDict[\"ownerType\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "8c3a80429a7c1f76e0ae52678b5276c5", "score": "0.6136372", "text": "public function getResourceOwnerName()\n {\n return $this->resourceOwnerName;\n }", "title": "" }, { "docid": "c38e2a9c845c95321e55992a5be43fbf", "score": "0.6134911", "text": "public function owner()\n {\n return $this->hasOne(User::class, 'id', 'user_id');\n }", "title": "" }, { "docid": "30afc008d6b372cd2037ce0816b15554", "score": "0.61287", "text": "public function getOwner(DirectoryIterator $file)\n {\n if (!function_exists('posix_getpwuid')) {\n // Windows, fallback, etc.\n return getenv('USERNAME') ?: getenv('USER');\n }\n\n $user = posix_getpwuid($file->getOwner());\n $group = posix_getgrgid($file->getGroup());\n\n $userName = !empty($user['name']) ? $user['name'] : '-?-';\n $groupName = !empty($group['name']) ? $group['name'] : '-?-';\n\n return $userName . ' / ' . $groupName;\n }", "title": "" }, { "docid": "01b0953e079fb2df9dae96394bec81be", "score": "0.6116121", "text": "public function getId()\n {\n return $this->ownerId;\n }", "title": "" }, { "docid": "30c74b9122c78c066af4603d2b522b26", "score": "0.60938364", "text": "public function isOwner()\n {\n return !Yii::$app->user->isGuest && Yii::$app->user->id == $this->user_id;\n }", "title": "" }, { "docid": "0de444b341f0bb58496e238312a38c8f", "score": "0.60886365", "text": "public function getOwner()\n\t{\n\t\treturn $this->model;\n\t}", "title": "" }, { "docid": "2ffb2922c5612de22655f1e701c41885", "score": "0.6085635", "text": "public function owner()\n {\n return $this->belongsTo(config('teams.user_model'), 'owner_id');\n }", "title": "" }, { "docid": "1c993417c4ec1615cd13c0673e1f4355", "score": "0.6058966", "text": "public function getOwner(): ?string {\n $val = $this->getBackingStore()->get('owner');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'owner'\");\n }", "title": "" }, { "docid": "1c993417c4ec1615cd13c0673e1f4355", "score": "0.6058966", "text": "public function getOwner(): ?string {\n $val = $this->getBackingStore()->get('owner');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'owner'\");\n }", "title": "" }, { "docid": "6df62462cf3dc4c1a38eeedeeb588a5d", "score": "0.6038168", "text": "public function getMailbox(): string {\n\t\treturn $this->mailbox;\n\t}", "title": "" }, { "docid": "64adc1e8feecc69f9e8d4c12184d5481", "score": "0.6038082", "text": "public function getTagOwnerId()\r\n\r\n\t{\r\n\r\n\t\treturn $this->ownerId;\r\n\r\n \t}", "title": "" }, { "docid": "cb72e24e06f57b8319b84d7f0b2e50aa", "score": "0.60362583", "text": "public function site_owner() {\n\t\t$app_id = Helper::get_settings( 'titles.facebook_app_id' );\n\t\tif ( 0 !== absint( $app_id ) ) {\n\t\t\t$this->tag( 'fb:app_id', $app_id );\n\t\t\treturn;\n\t\t}\n\n\t\t$admins = Helper::get_settings( 'titles.facebook_admin_id' );\n\t\tif ( '' !== trim( $admins ) ) {\n\t\t\t$this->tag( 'fb:admins', $admins );\n\t\t\treturn;\n\t\t}\n\t}", "title": "" }, { "docid": "286fea7c7ec7fd43461872328c4ded8a", "score": "0.60068935", "text": "function getRecipient() {\n\t\treturn mofilmUserManager::getInstanceByID($this->_ToUserID);\n\t}", "title": "" }, { "docid": "98ca2131d5806eabe72894fe61f8f870", "score": "0.60068727", "text": "public function __invoke() {\n return $this->owner;\n }", "title": "" }, { "docid": "1c28967af3592e8ea887bd63ef23b7f2", "score": "0.60059255", "text": "public function isOwner(): bool\n {\n return $this->owner;\n }", "title": "" }, { "docid": "127b9c836bf0c544dedd5323cffb3db2", "score": "0.59872586", "text": "public function getSharedBy()\n\t{\n\t\treturn UserUtil::getUser($this->user_id);\n\t}", "title": "" }, { "docid": "cb22664a8f04f1e21a2e289ae8ea8c34", "score": "0.5980666", "text": "public function getOwnerPrivateChannel(): string;", "title": "" }, { "docid": "3492094dcb6b736159294f76bc9e83e0", "score": "0.59591997", "text": "public function owner()\n {\n return $this->belongsTo('Crimibook\\User', 'user_id');\n }", "title": "" }, { "docid": "b51d472411f5d495bd46f52a29f39d19", "score": "0.5954173", "text": "public function owner()\n {\n return $this->belongsTo(\\App\\User::class, 'user_id', 'id');\n }", "title": "" }, { "docid": "f3ceeb7a4b00138fdc76fa5da5586dda", "score": "0.59411144", "text": "public function owner()\n {\n return $this->belongsTo('App\\Models\\User', 'owner_id');\n }", "title": "" }, { "docid": "37ae4e279534a05e638a72346a091df1", "score": "0.59409094", "text": "public function getEmailAttribute()\n {\n return $this->owner->email;\n }", "title": "" }, { "docid": "650aaaf274d2d0b0d884b3e792a3a729", "score": "0.59285235", "text": "public function getPrincipalEmail()\n {\n return $this->principalEmail;\n }", "title": "" }, { "docid": "98fa891cc917279d86662229d7b2343d", "score": "0.59279126", "text": "public static function getProcessOwner()\n {\n $unreadable = 'Undetectable';\n $user = '';\n try {\n if (function_exists('exec')) {\n $user = exec('whoami');\n }\n\n if (!strlen($user) && function_exists('posix_getpwuid') && function_exists('posix_geteuid')) {\n $user = posix_getpwuid(posix_geteuid());\n $user = $user['name'];\n }\n\n return strlen($user) ? $user : $unreadable;\n } catch (Exception $ex) {\n return $unreadable;\n }\n }", "title": "" }, { "docid": "d69dd0f1f0f4b1e13a5c4259e49d65ce", "score": "0.59191847", "text": "public function getUserInfo() {\n $this->user = $this->client->getResourceOwner($this->token);\n return $this->user;\n }", "title": "" }, { "docid": "7eee867d189be880777b09d0bb0d5711", "score": "0.5918875", "text": "public function owner()\n {\n return $this->belongsTo(User::class, 'email', 'email');\n }", "title": "" }, { "docid": "fe3d538bce8912ff74e9cad532adde86", "score": "0.5916026", "text": "public function owner()\n\t{\n\t\treturn $this->belongsTo(User::class, 'user_id');\n\t}", "title": "" }, { "docid": "4b690dd7fa3793e2f130390f98eb9045", "score": "0.59151804", "text": "public function owner()\n {\n return $this->belongsTo(User::class, 'owner_id');\n }", "title": "" }, { "docid": "4b690dd7fa3793e2f130390f98eb9045", "score": "0.59151804", "text": "public function owner()\n {\n return $this->belongsTo(User::class, 'owner_id');\n }", "title": "" }, { "docid": "c94e614c63f2b889c6ca50e62986878c", "score": "0.5912017", "text": "public function getOwnerRoleId() \n\t{\n\t\treturn $this->roleService->getOwnerRoleId() ;\n\t}", "title": "" }, { "docid": "7c9163346fe612712c9cd00945cd0ff0", "score": "0.5906728", "text": "public function getAlias()\n {\n return $this->owner->getId();\n }", "title": "" } ]
8c9de1b0a76d3ed68940255261543503
Register any authentication / authorization services.
[ { "docid": "d4f70657c7897ee2a157cbf4e1a06f3f", "score": "0.0", "text": "public function boot()\n {\n\n $this->registerPolicies();\n\n if(config('admin.menu_auth')){\n\n //注册权限\n $adminMenuPermissions = AdminMenu::with('roles')->get();\n\n foreach ($adminMenuPermissions as $adminMenuPermission) {\n\n Gate::define($adminMenuPermission->route, function(AdminUser $adminUser) use($adminMenuPermission) {\n\n return $adminUser->hasAdminMenuPermission($adminMenuPermission);\n\n });\n\n }\n\n }\n\n }", "title": "" } ]
[ { "docid": "887a00300ee5a53bf40d56031554838e", "score": "0.6863122", "text": "public function registerAuth()\n {\n $this->container->make(DingoAuth\\Auth::class)->extend('custom', function() {\n return $this->getAuth();\n });\n }", "title": "" }, { "docid": "4d07e5e052e708105f407931da8bed51", "score": "0.6856772", "text": "private function registerServices()\n {\n }", "title": "" }, { "docid": "14ce3dec3250ec2f7f3e1dc5340fa8bb", "score": "0.6842446", "text": "protected function registerServices()\n {\n $di = new FactoryDefault();\n\n $di->set('router', function () {\n $router = null;\n require_once __DIR__ . '/../apps/config/routes.php';\n return $router;\n });\n\n $this->setDI($di);\n }", "title": "" }, { "docid": "d93e1640f45a8dc5066a158135d41891", "score": "0.6794668", "text": "protected function registerServices()\n {\n // Register IoC bind aliases and singletons\n #$this->app->alias(\\Mrcore\\Appstub\\Appstub::class, \\Mrcore\\Appstub::class)\n #$this->app->singleton(\\Mrcore\\Appstub\\Appstub::class, \\Mrcore\\Appstub::class)\n\n // Register UrlServiceProvider (laravel override) for mreschke https ssl termination fix\n // FIXME in the fiture, fideloper fixed this, see https://github.com/fideloper/TrustedProxy\n $this->app->register(\\Mrcore\\Foundation\\Providers\\UrlServiceProvider::class);\n\n // Register other service providers\n $this->app->register(\\Collective\\Html\\HtmlServiceProvider::class);\n }", "title": "" }, { "docid": "c3a26b3c0ca468a83b6bbacc6a2ebecd", "score": "0.6786827", "text": "public static function register_services()\n {\n foreach (self::get_services() as $class) {\n $service = self::instantiate($class);\n if (method_exists($service, 'register')) {\n $service->register();\n }\n }\n }", "title": "" }, { "docid": "ceb176051845688c661d425d24061056", "score": "0.6723988", "text": "public function register()\n {\n $this->app->bind(AuthService::class, function ($app) {\n return new AuthService();\n });\n\n if (config('auth-management.enable')) {\n Event::subscribe(AuthEventSubscriber::class);\n }\n }", "title": "" }, { "docid": "087f1dcb2a720570b8c7e1947044bad3", "score": "0.66802853", "text": "public static function register_services(){\n foreach(self::get_services() as $class){\n $service = self::instantiate($class);\n\n if(method_exists($service, 'register')){\n $service->register();\n }\n }\n }", "title": "" }, { "docid": "6c355b6fe4d3868b8713ff1460c30a20", "score": "0.6679481", "text": "protected function registerServices()\n\t{\n\t\t/**\n\t\t * The application wide configuration\n\t\t */\n\t\t$config = include __DIR__ . '/../../../config/config.php';\n\t\t$this->di->set('config', $config);\n\n\t\t/**\n\t\t * Setup an events manager with priorities enabled\n\t\t */\n\t\t$eventsManager = new EventsManager();\n\t\t$eventsManager->enablePriorities(true);\n\t\t$this->setEventsManager($eventsManager);\n\n\t\t/**\n\t\t * Register namespaces for application classes\n\t\t */\n\t\t$loader = new Loader();\n\t\t$loader->registerNamespaces(\n\t\t\t[\n\t\t\t\t'<%=project.namespace %>\\Application' => __DIR__,\n\t\t\t\t'<%=project.namespace %>\\Application\\Controllers' => __DIR__ . '/controllers/',\n\t\t\t\t'<%=project.namespace %>\\Application\\Models' => __DIR__ . '/models/',\n\t\t\t\t'<%=project.namespace %>\\Application\\Router' => __DIR__ . '/router/'\n\t\t\t],\n\t\t\ttrue\n\t\t)->register();\n\n\t\t/**\n\t\t * Start the session the first time some component request the session service\n\t\t */\n\t\t$this->di->set(\n\t\t\t'session',\n\t\t\tfunction () {\n\t\t\t\t$session = new SessionAdapter();\n\t\t\t\t$session->start();\n\t\t\t\treturn $session;\n\t\t\t}\n\t\t);\n\n\t\t/**\n\t\t * Registering the application wide router with the standard routes set\n\t\t */\n\t\t$this->di->set('router', new ApplicationRouter());\n\n\t\t/**\n\t\t * Specify the use of metadata adapter\n\t\t */\n\t\t$this->di->set(\n\t\t\t'modelsMetadata',\n\t\t\t'\\Phalcon\\Mvc\\Model\\Metadata\\\\' . $config->application->models->metadata->adapter\n\t\t);\n\n\t\t/**\n\t\t * Specify the annotations cache adapter\n\t\t */\n\t\t$this->di->set(\n\t\t\t'annotations',\n\t\t\t'\\Phalcon\\Annotations\\Adapter\\\\' . $config->application->annotations->adapter\n\t\t);\n\n\t\t//Collection manager\n\t\t$this->di->set(\n\t\t\t'collectionManager',\n\t\t\tfunction () {\n\t\t\t\treturn new Manager();\n\t\t\t}\n\t\t);\n\t}", "title": "" }, { "docid": "56c6c2b34cbb519c882a566531cb960a", "score": "0.66658175", "text": "public function register(): void\n {\n $this->mergeConfigFrom($this->path() . '/config/security.php', 'security');\n $this->vendorConfig();\n $this->registerMiddlewares();\n }", "title": "" }, { "docid": "97f34fa0f426a0d45dfe4b1d2a4b4a73", "score": "0.665516", "text": "protected function registerServices()\n {\n $loader = new ServiceLoader($this);\n $loader->load($this->config->get('services'));\n }", "title": "" }, { "docid": "7a1f6a64f15b623a58420340e482e5d0", "score": "0.6619884", "text": "public function registerServices()\n {\n $container = $this->getContainer();\n\n $services = require config_path() . '/providers.php';\n\n if (is_array($services) && !empty($services)) {\n foreach ($services as $service) {\n\n $instance = new $service();\n\n $container[$instance->name()] = $instance->register();\n }\n }\n }", "title": "" }, { "docid": "e40e70c2d2a86217c8286ab934d79c02", "score": "0.6616864", "text": "public static function register_services() : void {\n\n\t\tforeach ( self::get_services() as $class ) {\n\n\t\t\t$service = self::instantiate( $class );\n\n\t\t\tif ( method_exists( $service, 'register' ) ) {\n\n\t\t\t\t$service->register();\n\n\t\t\t}\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "71416cd3cce6424ded97f7b306ec6ea0", "score": "0.65885955", "text": "public function register()\n {\n $this->app->bind(AuthInterface::class,Authenticate::class);\n }", "title": "" }, { "docid": "96bb4f53973d47eacb502ab25ed4f72d", "score": "0.6586969", "text": "public static function registerServices(){\n foreach (self::getServices() as $class) {\n $service = self::instantiate($class);\n if(method_exists($service,'register')){\n $service->register();\n }\n }\n }", "title": "" }, { "docid": "94aa2b2532b49f386945e0a553789ccf", "score": "0.65753114", "text": "public function register()\n {\n $this->app->bind('curl', CurlService::class);\n\n Auth::provider('oa', function () {\n return new OAUserProvider();\n });\n\n Auth::extend('oa', function ($app, $name, array $config) {\n return new OAGuard(Auth::createUserProvider($config['provider']), $app->make('request'));\n });\n }", "title": "" }, { "docid": "7c80c7ef0ed833a1b05187dd5dfc1952", "score": "0.65738875", "text": "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__ . '/Config/auth.php', 'veemo.auth'\n );\n\n $this->registerHelpers();\n\n $this->registerMiddlewares($this->app->router);\n }", "title": "" }, { "docid": "f4bce7ab24b860b65455405e7af802e6", "score": "0.6502897", "text": "public function register(): void\n {\n $this->registerServices();\n }", "title": "" }, { "docid": "76f87aa63423dce030d84ca16864cee0", "score": "0.6502682", "text": "public function register()\n {\n Auth::extend('sso', function ($app, $name, array $config) {\n // 返回一个 Illuminate\\Contracts\\Auth\\Guard 实例...\n\n return new SsoGuard(Auth::createUserProvider($config['provider']));\n });\n Auth::provider('sso', function ($app, array $config) {\n // 返回 Illuminate\\Contracts\\Auth\\UserProvider 实例...\n\n return new SsoUserProvider();\n });\n }", "title": "" }, { "docid": "4c6853960d55cd4f320785156a6c9c75", "score": "0.64582676", "text": "private function registerAuth()\n {\n $auth = new Auth($this->app);\n $this->app->bind('auth', $auth);\n }", "title": "" }, { "docid": "9cab4d93487ab5cade0b5237cbd13153", "score": "0.64288104", "text": "public function register()\n {\n // $this->registerUserService();\n }", "title": "" }, { "docid": "7bc326d90ce2f222c01e2d646eaa0b2e", "score": "0.6411626", "text": "protected function registerServiceProviders()\n {\n foreach ($this->localProviders as $provider)\n {\n $this->app->register($provider);\n }\n }", "title": "" }, { "docid": "7ef565973e24406db18c29e8f588c9c4", "score": "0.63994807", "text": "public function map()\n {\n (new Api([\n 'middleware' => ['api'],\n 'namespace' => $this->namespace,\n 'prefix' => 'v1/auth',\n 'as' => 'auth::',\n ]))->register();\n\n (new ApiAuth([\n 'middleware' => ['api', 'auth'],\n 'namespace' => $this->namespace,\n 'prefix' => 'v1/auth',\n 'as' => 'auth::',\n ]))->register();\n\n (new Api2Factor([\n 'middleware' => ['api', 'auth', 'twoFactorVerify'],\n 'namespace' => $this->namespace,\n 'prefix' => 'v1/auth',\n 'as' => 'auth::',\n ]))->register();\n }", "title": "" }, { "docid": "30679adc099059e6aa6f38dd2443f511", "score": "0.63692397", "text": "public function boot()\n {\n // Custom guards have been registered here\n Auth::extend('api2Provider', function (Container $app) {\n return new App2Guard($app['request']);\n });\n Auth::extend('api3Provider', function (Container $app) {\n return new App3Guard($app['request']);\n });\n\n $this->registerPolicies();\n\n //\n }", "title": "" }, { "docid": "8c4f6f72bcc1ecd6f91b652e55837699", "score": "0.63597083", "text": "public function register()\n {\n foreach ($this->services as $interface => $service) {\n App::bind($interface, $service);\n }\n }", "title": "" }, { "docid": "2d874979e3535143beaeecc853544164", "score": "0.6345326", "text": "public static function init_services()\n {\n foreach (self::get_services() as $class) {\n $service = self::instantiate($class);\n if(method_exists($service, 'register')){\n $service->register();\n }\n }\n }", "title": "" }, { "docid": "5ee68d04eb791bc222d2bc300ec3f770", "score": "0.6340855", "text": "public function register()\n {\n $this->registerPolicies();\n }", "title": "" }, { "docid": "b966420fae1a3375fedf74c03bfab58a", "score": "0.6336309", "text": "public function boot(): void\n {\n parent::registerPolicies();\n\n Passport::routes();\n\n Passport::tokensExpireIn(now()->addDays(15));\n\n Passport::refreshTokensExpireIn(now()->addDays(30));\n\n // Dynamically register permissions with Laravel's Gate.\n foreach ($this->getPermissions() as $permission) {\n Gate::define($permission->label, function (User $user) use ($permission) {\n return $user->hasPermission($permission);\n });\n }\n }", "title": "" }, { "docid": "e6b9e1b47a5497fd7b0ac2ef2e592cee", "score": "0.6333576", "text": "public function register()\n {\n return function ($container) {\n return new AuthService($container);\n };\n }", "title": "" }, { "docid": "34b5d4698df7b12025cd09c2cf4815c8", "score": "0.6322885", "text": "abstract protected function registerServices();", "title": "" }, { "docid": "c3e1207d9ce7c2cf91e31db1e4bb84d3", "score": "0.6283423", "text": "public function register()\n\t{\n\t\t$this->makeAllGrantTypes();\n $this->makeStorage();\n $this->makeOauth2();\n $this->makeGoogleClient();\n $this->makeRouteFilter();\n $this->makeAuthorizeRequest();\n $this->makeAuthorizeResponse();\n $this->makeTokenResponse();\n $this->makeAPIResponseArray();\n\t}", "title": "" }, { "docid": "a13e273384a62533d2e45d6a564003d3", "score": "0.6254952", "text": "public static function register() {\n\t\tadd_filter( 'authenticate', [ get_called_class(), 'apply_custom_authentication' ], 50, 3 );\n\t}", "title": "" }, { "docid": "15986541c0ab62906d86ae96a6b2b0d2", "score": "0.62462574", "text": "public function register(): void\n {\n parent::register();\n\n $this->registerConfig();\n\n $this->registerSeoHelperService();\n $this->registerSeoMetaService();\n $this->registerSeoOpenGraphService();\n $this->registerSeoTwitterService();\n }", "title": "" }, { "docid": "41684855bf0abd3d5c8d41c9ad6c7a07", "score": "0.62452894", "text": "public function register()\n {\n\n $this->app->bind(\n VacancyServiceInterface::class,\n VacancyService::class,\n );\n\n $this->app->bind(\n VacancyRepositoryInterface::class,\n VacancyRepository::class,\n );\n\n $this->app->bind(\n AuthServiceInterface::class,\n AuthService::class,\n );\n\n $this->app->bind(\n AuthRepositoryInterface::class,\n AuthRepository::class,\n );\n\n $this->app->bind(\n MailServiceInterface::class,\n MailService::class,\n );\n\n $this->app->bind(\n HashServiceInterface::class,\n HashService::class,\n );\n\n $this->app->bind(\n JwtServiceInterface::class,\n JwtService::class,\n );\n\n $this->app->bind(\n UserRepositoryInterface::class,\n UserRepository::class,\n );\n\n $this->app->bind(\n FtpServiceInterface::class,\n FtpService::class,\n );\n\n $this->app->bind(\n ProfileServiceInterface::class,\n ProfileService::class,\n );\n\n $this->app->bind(\n ProfileRepositoryInterface::class,\n ProfileRepository::class,\n );\n\n $this->app->bind(\n LocationRepositoryInterface::class,\n LocationRepository::class,\n );\n\n $this->app->bind(\n LocationServiceInterface::class,\n LocationService::class,\n );\n }", "title": "" }, { "docid": "efb6bedc74015f4590bb0f179dc0f6ad", "score": "0.62391704", "text": "private function registerApiAuth()\n {\n $this->app->bind('api-auth', function ($app) {\n return new ApiAuth($app);\n });\n\n $this->app->alias('api-auth', 'Rlogical\\ApiAuth\\ApiAuth');\n }", "title": "" }, { "docid": "95d9c6aa035232e9535449f51ab3e2c3", "score": "0.6226978", "text": "public function boot()\n {\n $this->registerUserInterface();\n $this->registerUserManagementInterface();\n }", "title": "" }, { "docid": "d98d9977a862a0f17245df402c5d9eb7", "score": "0.62189204", "text": "public function register()\n {\n $this->app->bind(UserAuthContract::class,UserAuthService::class);\n $this->app->bind(CompanySettingContract::class,CompanySettingService::class);\n }", "title": "" }, { "docid": "ebcec88a800a528a2515fe45eaf20504", "score": "0.621706", "text": "public function register()\n {\n if ($this->app->isLocal() && !empty($this->providers))\n {\n foreach ($this->providers as $provider)\n {\n $this->app->register($provider);\n }\n\n if (!empty($this->aliases))\n {\n foreach ($this->aliases as $alias => $facade)\n {\n $this->app->alias($alias, $facade);\n }\n }\n }\n }", "title": "" }, { "docid": "5a6cd90f3484bb835527c40d7bfdfae6", "score": "0.62103415", "text": "public function register() {\n $this->app->singleton('app.config.env', function($app) {\n return Config::pull(Config::ENVIRONMENT_VARS);\n });\n\n $this->app->singleton('app.auth.service', function($app) {\n $redisClient = new \\Predis\\Client('tcp://10.131.211.185:6379');\n $storage = new \\OAuth2\\Storage\\Redis($redisClient);\n $server = new \\OAuth2\\Server($storage);\n $server->addGrantType(new \\OAuth2\\GrantType\\ClientCredentials($storage));\n $server->addGrantType(new \\OAuth2\\GrantType\\AuthorizationCode($storage));\n\n $defaultScope = 'basic';\n \n $supportedScopes = array(\n 'basic',\n 'postonwall',\n 'accessphonenumber'\n );\n \n $memory = new \\OAuth2\\Storage\\Memory(array(\n 'default_scope' => $defaultScope,\n 'supported_scopes' => $supportedScopes\n ));\n \n $scopeUtil = new \\OAuth2\\Scope($memory);\n\n $server->setScopeUtil($scopeUtil);\n \n return $server;\n });\n\n $this->app->singleton('app.auth.storage', function($app) {\n $redisClient = new \\Predis\\Client('tcp://10.131.211.185:6379');\n $storage = new \\OAuth2\\Storage\\Redis($redisClient);\n return $storage;\n });\n }", "title": "" }, { "docid": "eb610935db5d51721696bf88cecc7cf5", "score": "0.62080383", "text": "public function registerAuth(): void\n {\n $provider_driver = config('dev-login.auth.provider_driver', 'config_user');\n $guard_name = config('dev-login.auth.guard_name', 'developer');\n\n Config::set('auth.guards.'.$guard_name, [\n 'driver' => 'session',\n 'provider' => $provider_driver,\n ]);\n Config::set('auth.providers.'.$provider_driver, [\n 'driver' => $provider_driver,\n ]);\n\n Auth::provider($provider_driver, function ($app, array $config) {\n return new ConfigUserProvider(config('dev-login.users', []));\n });\n }", "title": "" }, { "docid": "4ca9fe6f5364cf792922ee260505263a", "score": "0.6202224", "text": "protected function registerServices()\n {\n foreach (static::getServiceBindings() as $key => $value) {\n is_numeric($key)\n ? $this->app->singleton($value)\n : $this->app->singleton($key, $value);\n }\n }", "title": "" }, { "docid": "0a2bd9d8e33fd0345020c46882fa0982", "score": "0.6189072", "text": "public function register()\n {\n $this->registerAccess();\n $this->registerFacade();\n\n }", "title": "" }, { "docid": "5f4cfce518ed45bbf7256c2934629746", "score": "0.6173981", "text": "private function registerServiceProviders()\n {\n $this\n ->register(new SecurityServiceProvider())\n ->register(new DatabaseServiceProvider())\n ->register(new CommandServiceProvider())\n ->register(new SessionServiceProvider)\n ->register(new UrlGeneratorServiceProvider)\n ->register(new TwigServiceProvider(), array(\n 'twig.path' => array(\n BASE_DIR . 'themes/' . $this['config']->getValue('theme'),\n __DIR__ . '/../Templates',\n ),\n 'twig.options' => array(\n 'cache' => realpath(BASE_DIR . 'cache'),\n )\n ))\n ->register(new FormServiceProvider)\n ->register(new ValidatorServiceProvider)\n // Translator\n ->register(new TranslationServiceProvider, array(\n 'default' => $this['config']->getValue('default_lang')\n ))\n ->register(new AlgoliaSearchServiceProvider);\n\n $this['translator'] = $this->share($this->extend('translator', function (SymfonyTranslator $translator) {\n $translator->addLoader('yaml', new YamlFileLoader());\n foreach (array('messages', 'admin', 'validators') as $domain) {\n $translator->addResource('yaml', BASE_DIR.'locales/fr/'.$domain.'.yml', 'fr', $domain);\n $translator->addResource('yaml', BASE_DIR.'locales/en/'.$domain.'.yml', 'en', $domain);\n }\n return $translator;\n }));\n\n return $this;\n\n }", "title": "" }, { "docid": "4254861621f9d79ac48a2da436183927", "score": "0.61403865", "text": "public function boot(): void\n {\n $this->registerPolicies();\n\n $this->registerSpaRequestGuard();\n }", "title": "" }, { "docid": "b1250d096901cfed6583e98e1be5d2cf", "score": "0.6129588", "text": "public function register()\n {\n if (self::isAdmin()) {\n $this->registerConfig();\n $this->registerProviders();\n $this->registerAliases();\n }\n\n $this->registerCommands();\n }", "title": "" }, { "docid": "0dc4f33df4454267d6ba910f6fe6b76d", "score": "0.6125789", "text": "protected function registerServices()\n {\n $this->app->singleton('fxiaoke', function ($app) {\n $config = $app->make('config')->get('fxiaoke');\n return new FXK ($config);\n });\n }", "title": "" }, { "docid": "b3a7b5a18c02510a01238ac973f079c7", "score": "0.61236715", "text": "public function register()\n {\n $this->loadAdminAuthConfig();\n $this->registerThirdPartyVendors();\n $this->registerRouteMiddleware();\n }", "title": "" }, { "docid": "b3c352b304b275fc2b020b8d15986a0c", "score": "0.61210054", "text": "public function register()\n {\n $this->app->singleton(AuthService::class, static function ($app) {\n return new AuthService();\n });\n \n $this->app->singleton(ApiService::class, static function ($app) {\n return new ApiService();\n });\n }", "title": "" }, { "docid": "e4b124148ced0fba2b3a598e29ac90e4", "score": "0.61167103", "text": "public function register()\n {\n $this->registerApiAuth();\n\n $this->registerCommands();\n\n $this->mergeConfig();\n }", "title": "" }, { "docid": "ea24021c6f57aa5c07da8040c9e1ede8", "score": "0.6099842", "text": "protected function register() {\n\t\t$this->register_internal_endpoints();\n\t\t$this->register_endpoints();\n\n\t\t// Aka hooks.\n\t\t$this->register_processors();\n\t}", "title": "" }, { "docid": "3e6847ee02ae41d870fb4e7adb61ca52", "score": "0.6098752", "text": "public function register()\n {\n //\n $this->modelService();\n $this->manufactureService();\n $this->categoryService();\n $this->itemService();\n $this->saleOrderService();\n $this->conditionService();\n $this->whTransferService();\n $this->supplierService();\n }", "title": "" }, { "docid": "96cb33ed2e7fdfbc4632bd6de12e341d", "score": "0.60932285", "text": "public function register(): void\n {\n $this->app->register(MenuEventServiceProvider::class);\n $this->app->register(AuthServiceProvider::class);\n }", "title": "" }, { "docid": "197007083e53f4785b6819a0cd8ff33b", "score": "0.60804784", "text": "public function provideServices()\n {\n $vo = new AuthenticationVO();\n\n return [\n [$this->once(), 'authenticateUser', 'authenticateUser', $vo, true],\n [$this->once(), 'checkSessionStatus', 'checkSessionStatus', $vo, null],\n [$this->once(), 'login', 'login', $vo, 'foo'],\n [$this->once(), 'logout', 'logout', $vo, []],\n ];\n }", "title": "" }, { "docid": "e8e19c6f494c6137e857d41fd5e12deb", "score": "0.6075883", "text": "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__ . '/../install-stubs/config/admin-auth.php', 'admin-auth'\n );\n\n if (config('admin-auth.use_routes', true)) {\n $this->loadRoutesFrom(__DIR__ . '/../routes/web.php');\n }\n\n if (config('admin-auth.use_routes', true) && config('admin-auth.activations.self_activation_form_enabled',\n true)) {\n $this->loadRoutesFrom(__DIR__ . '/../routes/activation-form.php');\n }\n\n //This is just because laravel does not provide it by default, however expect in AuthenticationException that it exists\n if (!Route::has('login')) {\n Route::middleware(['web'])->namespace('Brackets\\AdminAuth\\Http\\Controllers')->group(function () {\n Route::get('/login', 'MissingRoutesController@redirect')->name('login');\n });\n }\n //This is just because in welcome.blade.php someone was lazy to check if also register route exists and ask only for login\n if (!Route::has('register')) {\n Route::middleware(['web'])->namespace('Brackets\\AdminAuth\\Http\\Controllers')->group(function () {\n Route::get('/register', 'MissingRoutesController@redirect')->name('register');\n });\n }\n\n app(\\Illuminate\\Routing\\Router::class)->pushMiddlewareToGroup('admin', CanAdmin::class);\n app(\\Illuminate\\Routing\\Router::class)->pushMiddlewareToGroup('admin', ApplyUserLocale::class);\n app(\\Illuminate\\Routing\\Router::class)->aliasMiddleware('guest.admin', RedirectIfAuthenticated::class);\n }", "title": "" }, { "docid": "4b1c9e83ba0d7adf29904f18814c19b9", "score": "0.60722405", "text": "public function register(): void\n {\n $this->registerConfigs();\n $this->registerEndpoints();\n }", "title": "" }, { "docid": "ead60496003762543f33f42b773404d4", "score": "0.60673004", "text": "public function boot()\n {\n $this->registerPolicies();\n\n // for API auth\n Passport::routes();\n }", "title": "" }, { "docid": "b53e35d67016d889ce2db202b6442579", "score": "0.60668933", "text": "protected function registerAuthorizationServer()\n {\n // The ResourceServer deals with authenticating requests, in other words validating tokens\n $this->app->bind(ResourceServer::class, function() {\n $cryptKey = new CryptKey($this->getKey(self::KEY_PUBLIC), null, DIRECTORY_SEPARATOR !== '\\\\');\n return new ResourceServer(\n $this->app->make(AccessTokenRepositoryInterface::class),\n $cryptKey,\n $this->app->make(DefaultValidator::class)\n );\n });\n\n // AuthorizationServer on the other hand deals with authorizing a session with a username and password and key and secret\n $this->app->when(AuthorizationServer::class)->needs('$privateKey')->give($this->getKey(self::KEY_PRIVATE));\n $this->app->when(AuthorizationServer::class)->needs('$publicKey')->give($this->getKey(self::KEY_PUBLIC));\n $this->app->when(AuthorizationServer::class)->needs('$encryptionKey')->give($this->app->make('config/database')->get('concrete.security.token.encryption'));\n $this->app->when(AuthorizationServer::class)->needs(ResponseTypeInterface::class)->give(function() {\n return $this->app->make(IdTokenResponse::class);\n });\n\n $this->app->extend(AuthorizationServer::class, function (AuthorizationServer $server) {\n\n $oneHourTTL = new \\DateInterval('PT1H');\n $oneDayTTL = new \\DateInterval('P1D');\n\n\n $config = $this->app->make('config');\n\n if ($config->get('concrete.api.grant_types.password_credentials')) {\n $server->enableGrantType($this->app->make(PasswordGrant::class), $oneHourTTL);\n }\n if ($config->get('concrete.api.grant_types.client_credentials')) {\n $server->enableGrantType($this->app->make(ClientCredentialsGrant::class), $oneHourTTL);\n }\n if ($config->get('concrete.api.grant_types.authorization_code')) {\n $server->enableGrantType($this->app->make(AuthCodeGrant::class, ['authCodeTTL' => $oneDayTTL]), $oneDayTTL);\n }\n if ($config->get('concrete.api.grant_types.refresh_token')) {\n $server->enableGrantType($this->app->make(RefreshTokenGrant::class), $oneHourTTL);\n }\n return $server;\n });\n\n // Register OAuth stuff\n $this->app->bind(AccessTokenRepositoryInterface::class, $this->repositoryFor(AccessToken::class));\n $this->app->bind(AuthCodeRepositoryInterface::class, $this->repositoryFor(AuthCode::class));\n $this->app->bind(ClientRepositoryInterface::class, $this->repositoryFor(Client::class));\n $this->app->bind(RefreshTokenRepositoryInterface::class, $this->repositoryFor(RefreshToken::class));\n $this->app->bind(ScopeRepositoryInterface::class, $this->repositoryFor(Scope::class));\n $this->app->bind(UserRepositoryInterface::class, $this->repositoryFactory(UserRepository::class, User::class));\n }", "title": "" }, { "docid": "b267b515babc15285a8ebfb019b6a8f8", "score": "0.6056839", "text": "public function register()\n {\n if ($this->app instanceof LumenApplication) {\n $this->app->configure('api'); // @codeCoverageIgnore\n }\n\n $this->mergeConfigFrom(__DIR__.'/../config/api.php', 'api');\n\n $this->registerClient();\n\n $this->registerToken();\n\n if ($this->app->runningInConsole()) {\n $this->registerForConsole();\n }\n }", "title": "" }, { "docid": "36612b4d02a6ad6ecf960933e3b3bdd0", "score": "0.60562944", "text": "public function register()\n {\n $this->registerProviders(collect($this->providers));\n // Register bindings.\n $this->registerBindings(collect($this->bindings));\n }", "title": "" }, { "docid": "cddf77398f948fc35b216a0e987a1bed", "score": "0.605625", "text": "public function register()\n {\n // app()->bind('App\\Services\\SocialService', function() {\n // return new \\App\\Services\\TwitterService('api-key-123');\n // });\n app()->bind('App\\Services\\SocialService', function() {\n return new \\App\\Services\\FacebookService('thing1', 'thing2');\n });\n }", "title": "" }, { "docid": "d9e22c599d2bd043c36264648ddcc425", "score": "0.6052856", "text": "public function register()\n {\n Passport::ignoreMigrations();\n\n // Register providers\n // $this->app->register(BroadcastServiceProvider::class);\n $this->app->register(EventServiceProvider::class);\n $this->app->register(RouteServiceProvider::class);\n// $this->app->register(AuthServiceProvider::class);\n }", "title": "" }, { "docid": "d8eaa4a0d0c0021bd90461cbfb6916e9", "score": "0.60522175", "text": "public function register(): void\n {\n $this->registerProviders([\n Providers\\AuthServiceProvider::class,\n Providers\\EventServiceProvider::class,\n Providers\\RouteServiceProvider::class,\n Providers\\ViewServiceProvider::class,\n ]);\n\n $this->registerModulesServiceProviders();\n\n $this->registerCommands([\n Console\\PublishCommand::class,\n Console\\SetupCommand::class,\n ]);\n\n $this->extendMetricsAuthorization();\n }", "title": "" }, { "docid": "0038bb1355e6c38f2ff0483c7f2498e6", "score": "0.60472715", "text": "public function register()\n {\n\n $this->registerPolicies(app(Gate::class));\n }", "title": "" }, { "docid": "42490f5af5b0144dee65186d924de506", "score": "0.604386", "text": "protected function registerBaseServiceProviders()\n {\n $this->register(new EventServiceProvider($this));\n $this->register(new LogServiceProvider($this));\n $this->register(new RoutingServiceProvider($this));\n }", "title": "" }, { "docid": "76934513715dfb5965f3305d6a3e42f3", "score": "0.60413915", "text": "private function serviceProviders()\n {\n // $this->app->register('Vinelab\\...\\...');\n }", "title": "" }, { "docid": "15951d20bfb6accff2a1d2c24b4e03c0", "score": "0.60413444", "text": "public function register_authentication_servers() {\n\t\tif ( ! $this->is_satispress_request() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ( $this->servers as $server ) {\n\t\t\tif ( ! $server instanceof Server ) {\n\t\t\t\tthrow new \\LogicException( 'Authentication servers must implement \\SatisPress\\Authentication\\Server.' );\n\t\t\t}\n\n\t\t\tadd_filter( 'determine_current_user', [ $server, 'authenticate' ] );\n\t\t\tadd_filter( 'rest_authentication_errors', [ $server, 'get_authentication_errors' ] );\n\t\t}\n\n\t\t// Allow cookie authentication to work for download requests.\n\t\tif ( 0 === strpos( $this->get_request_path(), '/satispress' ) ) {\n\t\t\tremove_filter( 'rest_authentication_errors', 'rest_cookie_check_errors', 100 );\n\t\t}\n\t}", "title": "" }, { "docid": "8719f4373b35757dbb3b072fa127ac4e", "score": "0.6037501", "text": "public function register()\n {\n $this->app['acl'] = $this->app->share(function ($app) {\n $user = $app['auth']->user();\n $acl = new Acl($user);\n $fn = $app['config']->get('acl::init', null);\n\n if ($fn) {\n $fn($acl);\n }\n\n return $acl;\n });\n }", "title": "" }, { "docid": "e0c410b4f975e6d8921ba451804bbecd", "score": "0.60349256", "text": "public function boot()\n {\n $this->registerPolicies();\n\n Gate::define('admin', function ($user) {\n return $user->role == \\App\\User::ROLE_ADMIN;\n });\n\n Gate::define('loja', function ($user) {\n return $user->role == \\App\\User::ROLE_LOJA;\n });\n\n Gate::define('cliente', function ($user) {\n return $user->role == \\App\\User::ROLE_USER;\n });\n\n Gate::define('entregador', function ($user) {\n return $user->role == \\App\\User::ROLE_DELIVERYMAN;\n });\n\n Auth::extend('logintoken', function ($app, $name, array $config) {\n\n $guard = new LoginTokenGuard('logintoken', Auth::createUserProvider($config['provider']), $this->app['session.store']);\n\n if (method_exists($guard, 'setCookieJar')) {\n $guard->setCookieJar($this->app['cookie']);\n }\n\n if (method_exists($guard, 'setDispatcher')) {\n $guard->setDispatcher($this->app['events']);\n }\n\n if (method_exists($guard, 'setRequest')) {\n $guard->setRequest($this->app->refresh('request', $guard, 'setRequest'));\n }\n\n return $guard;\n });\n }", "title": "" }, { "docid": "fbe64c931f8493bdf010ae34a6f2b59a", "score": "0.60292214", "text": "public function boot(): void\n {\n $this->registerPolicies();\n }", "title": "" }, { "docid": "fbe64c931f8493bdf010ae34a6f2b59a", "score": "0.60292214", "text": "public function boot(): void\n {\n $this->registerPolicies();\n }", "title": "" }, { "docid": "6bc3ea64f650ac34a3efdfb2be5ff725", "score": "0.6022471", "text": "public function register()\n {\n $this->app->bind(UserServiceInterface::class, UserService::class);\n $this->app->bind(AlbumServiceInterface::class, AlbumService::class);\n $this->app->bind(PostServiceInterface::class, PostService::class);\n $this->app->bind(PhotoServiceInterface::class, PhotoService::class);\n $this->app->bind(CommentServiceInterface::class, CommentService::class);\n $this->app->bind(TodoServiceInterface::class, TodoService::class);\n }", "title": "" }, { "docid": "a0069da6790e5547e3a7f70439db319e", "score": "0.600969", "text": "public function register()\n {\n $this->app->bind(AuthChecker::class, AuthChecker::class);\n\n $this->app->singleton(AuthChecker::class, function ($app) {\n return new AuthChecker($app, $app['request']);\n });\n\n $this->app->alias(AuthChecker::class, 'authchecker');\n\n $this->registerDependencies();\n }", "title": "" }, { "docid": "be03ab1486979d49bcef426fe4a0b7f1", "score": "0.60059196", "text": "public function register()\n {\n $config = $this->app->make(\"config\");\n if ($this->app->isInstalled() && $config->get('concrete.api.enabled')) {\n $router = $this->app->make(Router::class);\n $list = new ApiRouteList();\n $list->loadRoutes($router);\n $this->registerAuthorizationServer();\n }\n\n // Provide our public key to the BearerTokenValidator\n $this->app->extend(BearerTokenValidator::class, function(BearerTokenValidator $validator) {\n if (method_exists($validator, 'setPublicKey')) {\n $key = (string) $this->getKey(self::KEY_PUBLIC);\n $validator->setPublicKey(new CryptKey($key));\n }\n\n return $validator;\n });\n\n $this->app->singleton(SourceRegistry::class, function() {\n $sourceRegistry = new SourceRegistry();\n $sourceRegistry->addDefaultSources();;\n return $sourceRegistry;\n });\n }", "title": "" }, { "docid": "b4fe5a75b6b66edf2a1ecc58967a749b", "score": "0.6001839", "text": "public function register()\n {\n //login\n $this->app->bind('Domain\\Contracts\\Services\\UserLoginServiceContract', 'Domain\\Services\\UserLoginService');\n //me\n $this->app->bind('Domain\\Contracts\\Services\\MeServiceContract', 'Domain\\Services\\MeService');\n \n //user\n $this->app->bind('Domain\\Contracts\\Repositories\\UserRepositoryContract', 'Infrastructure\\Persistence\\Doctrine\\Repositories\\UserRepository');\n $this->app->bind('Domain\\Contracts\\Services\\UserServiceContract', 'Domain\\Services\\UserService');\n \n //company\n $this->app->bind('Domain\\Contracts\\Repositories\\CompanyRepositoryContract', 'Infrastructure\\Persistence\\Doctrine\\Repositories\\CompanyRepository');\n $this->app->bind('Domain\\Contracts\\Services\\CompanyServiceContract', 'Domain\\Services\\CompanyService');\n\n //country\n $this->app->bind('Domain\\Contracts\\Repositories\\CountryRepositoryContract', 'Infrastructure\\Persistence\\Doctrine\\Repositories\\CountryRepository');\n\n //state\n $this->app->bind('Domain\\Contracts\\Repositories\\StateRepositoryContract', 'Infrastructure\\Persistence\\Doctrine\\Repositories\\StateRepository');\n $this->app->bind('Domain\\Contracts\\Services\\StateServiceContract', 'Domain\\Services\\StateService');\n\n //city\n $this->app->bind('Domain\\Contracts\\Repositories\\CityRepositoryContract', 'Infrastructure\\Persistence\\Doctrine\\Repositories\\CityRepository');\n $this->app->bind('Domain\\Contracts\\Services\\CityServiceContract', 'Domain\\Services\\CityService');\n\n //plan\n $this->app->bind('Domain\\Contracts\\Repositories\\PlanRepositoryContract', 'Infrastructure\\Persistence\\Doctrine\\Repositories\\PlanRepository');\n\n //manager\n $this->app->bind('Domain\\Contracts\\Repositories\\ManagerRepositoryContract', 'Infrastructure\\Persistence\\Doctrine\\Repositories\\ManagerRepository');\n\n //customer\n $this->app->bind('Domain\\Contracts\\Repositories\\CustomerRepositoryContract', 'Infrastructure\\Persistence\\Doctrine\\Repositories\\CustomerRepository');\n\n }", "title": "" }, { "docid": "87845eefa5c4dabb4c46fef578254f73", "score": "0.6000359", "text": "public function register()\n {\n $this->registerAccess();\n $this->registerFacade();\n $this->registerBindings();\n }", "title": "" }, { "docid": "7f687a4f8ebf0479878b557feadefac1", "score": "0.60003203", "text": "public function register()\n {\n $this->registerServiceProviders();\n }", "title": "" }, { "docid": "ce812ef3fba40bc383f1db3afaa81d4e", "score": "0.59974796", "text": "public function register()\n {\n $this->registerAlias();\n\n $this->registerServices();\n }", "title": "" }, { "docid": "c812343ef8436b1ad0a0f7bf9cd3da47", "score": "0.5991443", "text": "public function register()\n {\n $this->app->bind(AuthenticationInterface::class, AuthenticationImplementation::class);\n\n $this->app->bind(LoanInterface::class, LoanImplementation::class);\n }", "title": "" }, { "docid": "fbbb425b3bd02bbcc276621894741fe7", "score": "0.5984223", "text": "public function register()\n {\n// $this->registerServices();\n $this->registerRepositories();\n }", "title": "" }, { "docid": "ca369caaa2730aad8a64d67f6f9d14d8", "score": "0.59671235", "text": "public function register()\n {\n\n $this->app->singleton('user_auth_service', function ($app) {\n return new UserAuthService(); // You can even put some params here\n });\n }", "title": "" }, { "docid": "6dd4b084b9b201ec61ddc57954e702ac", "score": "0.5959321", "text": "public function register()\n {\n $this->loadConfigs();\n $this->app->register(AmethystServiceProvider::class);\n }", "title": "" }, { "docid": "972b96c8194c303163fc86d259a65a9f", "score": "0.59527594", "text": "public function register()\n {\n $this->registerServices();\n $this->registerAliases();\n $this->registerMiddlewares();\n }", "title": "" }, { "docid": "2d4939787bc1e63cac132d42c285bb89", "score": "0.5952559", "text": "public function register()\n {\n $this->_basicRegister();\n\n $this->_serviceRegister();\n\n $this->_commandsRegister();\n }", "title": "" }, { "docid": "66f0c3b6d11614e5a90039a3456c784f", "score": "0.59525526", "text": "public function register()\n {\n $this->registerApi($this->app['config']['zuora'], $this->app[LoggerInterface::class]);\n }", "title": "" }, { "docid": "a81674fe8d9ac0779bc3b1511de1e1f4", "score": "0.59372604", "text": "public function boot()\n {\n $this->registerPolicies();\n\n Auth::provider( 'oauth', function(){\n return new UserProvider( new AuthenticatableUser() );\n } );\n }", "title": "" }, { "docid": "4e9bab5116778d6003f417ff9aa2a07c", "score": "0.5935661", "text": "public function register()\n {\n $this->app->register( RouteServiceProvider::class );\n $this->app->register( RepositoryServiceProvider::class );\n $this->app->register( AuthServiceProvider::class );\n $this->app->register( ImageServiceProvider::class );\n }", "title": "" }, { "docid": "59fe194ef09c45a4960e3466dd00552d", "score": "0.59345144", "text": "public function init(): void\n {\n parent::init();\n\n $this->userStore = $this->storeRegistry->get('User');\n $this->authentication = new Service($this->configuration, $this->storeRegistry);\n }", "title": "" }, { "docid": "a5c4cdc9beefabe8f3c75b9bc8f570f7", "score": "0.59321904", "text": "public function boot(): void\n {\n Fortify::viewPrefix('auth.');\n\n $this->configurePublishing();\n $this->configureRoutes();\n $this->configureCommands();\n $this->bootFortifyHandlers();\n }", "title": "" }, { "docid": "f8f08f4ea3860e9a5302652f75e75c05", "score": "0.5931968", "text": "public function boot()\n {\n foreach ($this->providers() as $provider) {\n $this->getProviderInstance($provider)->register();\n }\n }", "title": "" }, { "docid": "75974eaa0dfd1af7b4739e94f7259618", "score": "0.59287643", "text": "public function register(){\n $this->package('authority-php/authority-laravel');\n\n $this->app['authority'] = $this->app->share(function($app){\n $user = $app['auth']->user();\n $authority = new Authority($user);\n $fn = $app['config']->get('authority-laravel::initialize', null);\n\n if($fn) {\n $fn($authority);\n }\n\n return $authority;\n });\n\n $this->app->alias('authority', 'Authority\\Authority');\n }", "title": "" }, { "docid": "dbde3c2af05f55fb8df4261eeda74cbb", "score": "0.5927679", "text": "public function register()\n {\n $this->app->bind(\n ParserInterface::class,\n ParserService::class\n );\n $this->app->bind(\n SocialInterface::class,\n SocialService::class\n );\n }", "title": "" }, { "docid": "2d235fc9d876a14c87028d4fc3bea064", "score": "0.5927396", "text": "public function boot()\n {\n $this->registerPolicies();\n\n Passport::routes();\n\n // define a admin user role\n Gate::define('isAdmin', function($user) {\n return $user->role == 'admin';\n });\n\n // define a teacher user role\n Gate::define('isTeacher', function($user) {\n return $user->role == 'teacher';\n });\n\n // define a student role\n Gate::define('isStudent', function($user) {\n return $user->role == 'student';\n });\n\n // Roles based authorization\n Gate::before(\n function ($user, $ability) {\n if ($user->role === 'admin') {\n return true;\n }\n }\n );\n Gate::before(\n function ($user, $ability) {\n if ($user->role === 'teacher') {\n return true;\n }\n }\n );\n Gate::before(\n function ($user, $ability) {\n if ($user->role === 'student') {\n return true;\n }\n }\n );\n\n foreach (self::$permissions as $action=> $roles) {\n Gate::define(\n $action,\n function (User $user) use ($roles) {\n if (in_array($user->role, $roles)) {\n return true;\n }\n }\n );\n }\n\n }", "title": "" }, { "docid": "99791959e26eb98133fb6672dc1abfbf", "score": "0.5925633", "text": "public function boot()\n {\n $this->registerPolicies();\n\n Passport::routes(null, ['prefix' => 'api/oauth']);\n\n Passport::tokensExpireIn(now()->addHour());\n\n Passport::refreshTokensExpireIn(now()->addDay());\n }", "title": "" }, { "docid": "30b5634d7e2424c08850e9c98cc5c155", "score": "0.5923773", "text": "public function registerServices(DiInterface $di)\n\t{\t\t\n\t\t\t\t\n\t\t$dispatcher = $di->get(\"dispatcher\");\n\t\t\n\t\t//Registering a dispatcher\n\t\t$di->set('dispatcher', function() {\n\t\t\t$dispatcher = new Dispatcher();\n\t\t\t$dispatcher->setDefaultNamespace(\"LIPARENT\\Auth\\Controllers\");\n\t\t\treturn $dispatcher;\n\t\t});\n\n\t\t$di->set('view', function() {\n\t $view = new View(); \n\t\t\t$view->setViewsDir( APP_PATH . 'apps/modules/auth/views/');\t\n\t\t\t// $view->setMainView('auth_layout');\n\t\t\t$view->setLayoutsDir('../../../common/views/templates/default/');\t\t \n\t\t $view->setTemplateAfter('auth_layout');\n\n\t return $view;\n\t });\n\t\t\n\t\t$di->set('_view', function () {\n\t\t $view = new View(); \n\t\t\t$view->setViewsDir( APP_PATH . 'apps/modules/auth/views/');\t\t\n\t\t \t\t \n\n\t\t return $view;\n\t\t}, true);\t\n\t}", "title": "" }, { "docid": "98b16869bff4354d3f033e7091a95061", "score": "0.5921479", "text": "public function register()\n {\n $this->loadAdminAuthConfig();\n\n $this->registerRouteMiddleware();\n }", "title": "" }, { "docid": "6a39064a5ad836365aa76e2a50dfa694", "score": "0.5919516", "text": "public function register()\n {\n $this->app->bind(\n 'Authy\\AuthyApi', function ($app) {\n $authyKey = config('services.authy')['apiKey'];\n return new AuthyApi($authyKey);\n }\n );\n }", "title": "" }, { "docid": "b8f24c6453d25d074a78c72783ec55cd", "score": "0.5913905", "text": "public function register()\n {\n\n\n $this->app->singleton('requestPrincipal', function ($app) {\n return (new RequestPrincipal());\n });\n\n $this->app->bind(\n 'App\\Contracts\\AuthService',\n 'App\\Core\\Auth\\AuthServiceImpl');\n }", "title": "" }, { "docid": "7e4b33677eff8a76642f3d8cd19c1e8c", "score": "0.5912967", "text": "protected function registerGuard()\n {\n Auth::extend('passport', function ($app, $name, array $config) {\n return tap($this->makeGuard($config), function ($guard) {\n $this->app->refresh('request', $guard, 'setRequest');\n });\n });\n }", "title": "" }, { "docid": "362e7fb8411d3120d8a3e6d40b46c20a", "score": "0.5912017", "text": "public function boot()\n {\n Auth::viaRequest('repo', function (Request $request) {\n $authClient = app(AuthClient::class);\n\n $auth_type = $request->headers->get('php-auth-type', 'http-basic');\n $auth_user = $request->headers->get('php-auth-user');\n $auth_password = $request->headers->get('php-auth-pw');\n\n if(in_array(null, [$auth_user, $auth_password])){\n return new PublicUser($repository_type);\n }\n\n $response = $authClient->login($auth_type, $auth_user, $auth_password);\n\n return new RepositoryUser($response);\n });\n }", "title": "" }, { "docid": "65a3d820fc36129bbed6e78276458519", "score": "0.5908717", "text": "public function register()\n {\n $this->loadConfig();\n $this->bindInterfaces();\n $this->registerTrust();\n\n $this->registerPermissionFinder();\n $this->registerRoleFinder();\n\n $this->registerPermissionsCommand();\n $this->registerRolesCommand();\n }", "title": "" }, { "docid": "ab8d6f11ff2eb0858707ac01f4255175", "score": "0.59069234", "text": "public function boot()\n { \n $config = $this->app['config']->get('passport');\n\n Passport::routes();\n if (array_get($config, 'load_key_from')) {\n Passport::loadKeysFrom(array_get($config, 'load_key_from'));\n }\n\n if (array_key_exists('grant_types', $config)) {\n foreach ($config['grant_types'] as $grantIdentifier => $grantParams) {\n app(AuthorizationServer::class)->enableGrantType(\n $this->makeGrantType($grantParams['class']), Passport::tokensExpireIn()\n );\n }\n }\n\n // Passport::tokensExpireIn(now()->addDays(15));\n // Passport::refreshTokensExpireIn(now()->addDays(30));\n // Passport::personalAccessTokensExpireIn(now()->addMonths(6));\n }", "title": "" }, { "docid": "7897268aef8a2f1806c0d244a84254a9", "score": "0.59066045", "text": "protected function services()\n {\n }", "title": "" } ]
0dc058cfd1f62cd26a2d599340537200
announcement card in home page if $search isnt null app will search announcements with those parameters
[ { "docid": "ee2cd72e6237f5e1efc9c33bb752cced", "score": "0.64614594", "text": "public function scopeAnnouncement_card($query, $search = null, $orderBy = null){\n $query\n ->when($search, function ($query, $search) {\n $columns = implode(',',$this->searchable);\n return $query->whereRaw(\"MATCH ({$columns}) AGAINST (? IN BOOLEAN MODE)\" , $this->fullTextWildcards($search));\n })\n ->join('announcement_images', function ($join) {\n $join->on('announcements.id', '=', 'announcement_images.announcement_id')\n ->where('announcement_images.order_index', '=', 1);\n })\n ->join('images','announcement_images.image_id', '=', 'images.id')\n ->join('subcategories', 'announcements.subcategory_id', '=', 'subcategories.id')\n ->join('categories', 'subcategories.category_id', '=', 'categories.id')\n ->select(\"announcements.*\",\"categories.name AS category_name\",\"subcategories.name AS subcategory_name\",\"images.image_url\")\n ->when($orderBy, function ($query, $orderBy) {\n return $query->orderBy($orderBy, \"ASC\");\n })\n ;\n return $query;\n }", "title": "" } ]
[ { "docid": "de9ef533f145d901535e8ff2acd1397e", "score": "0.67802215", "text": "public function search(){\n\t\t$searchWord = $this->_get(\"search_word\", \"trim\", '');\n\t\t$id = $this->_get(\"id\", \"trim\", '');\n// \t\tdump($searchWord);\n\t\t$searchList = array('SDK下载','支付','登录回调','创建订单');\n\t\tif (empty($searchWord)) {\n\t\t\t$this->error ('关键字不能为空');;\n\t\t}\n\t\t$model = D('Article');\n\t\t$where = array();\n\t\t$where['title'] = array('like', '%'.$searchWord.'%');\n\t\t$info = $model->where($where)->select();\n\t\t\n\t\t$this->assign('info', $info);\n\t\t$this->assign('search_word', $searchWord);\n\t\t$this->assign('search_list', $searchList);\n// \t\tdump($info);\n\t\t$this->display(\"search\");\n\t}", "title": "" }, { "docid": "fb1ae22edad5e54bf25648b90fceb7d6", "score": "0.6576224", "text": "public function search() {\r\n\t\t$parishID = Convert::raw2sql($this->request->getVar('ParishID'));\t\t\r\n\t\tif(!$this->canAccess($parishID)){\r\n\t\t\treturn $this->renderWith(array('Unathorised_access', 'App'));\r\n\t\t}\r\n\t\t\n\t\t$this->title = \"Search house\";\n\t\t$this->list = $this->Results();\t\r\n return $this->renderWith(array('House_results', 'App'));\r\n }", "title": "" }, { "docid": "3e079fd10ab890285e2d1e1eb56febcc", "score": "0.65187", "text": "public function search()\n {\n\t\tif (Request::has('keyword')) {\n\t\t\t\n\t\t\t$data = $this->general_settings();\n\t\t\t\n\t\t\t$keyword = Request::input('keyword'); \n\t\t\tif(Request::input(\"keyword\") == \"\")\n\t\t\t{\n\t\t\t\t$post[0] = 0;\n\t\t\t}else\n\t\t\t{\t\n\t\t\t\t$data[\"keyword\"] = $keyword;\n\t\t\t\t$post = (new Search_m)->get_article_by_keyword($data);\n\t\t\t\tif(count($post) == 0)\n\t\t\t\t\t$post[0] = 0;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//get random news\n\t\t\t$random_news = $this->get_random();\n\t\t\t\n\t\t\t$headline_news = $this->get_headline();;\n\t\t\t$popular_news = $this->get_popular();\n\t\t\n\t\t\treturn view(\"Front/search\")\n\t\t\t\t->with(\"general_settings\", $data)\n\t\t\t\t->with(\"keyword\", $keyword)\n\t\t\t\t->with(\"list_category\", $data[\"list_category\"])\n\t\t\t\t->with(\"article\", $post)\n\t\t\t\t->with(\"random_news\", $random_news)\n\t\t\t\t->with(\"popular_news\", $popular_news)\n\t\t\t\t->with(\"headline_news\", $headline_news);\n \n\t\t}\n\t}", "title": "" }, { "docid": "7a5dc9a6e805588663abd0b51c51d563", "score": "0.6517453", "text": "public function search(Request $request): View\n {\n $announcements = Announcement::where(function ($query) use ($request) {\n $query\n ->where('title', 'like', '%'.$request->search.'%')\n ->orWhere('body', 'like', '%'.$request->search.'%');\n })->simplePaginate(5);\n\n return view('front.announcements.index', compact('announcements'));\n }", "title": "" }, { "docid": "206554a706a7c371b0d54f2641c24cf8", "score": "0.64871144", "text": "public function search() {}", "title": "" }, { "docid": "07237903049a2ec00269e1f8119ef3e0", "score": "0.6438388", "text": "public function search(){\n\t\t$parishID = Convert::raw2sql($this->request->getVar('ParishID'));\t\t\n\t\tif(!$this->canAccess($parishID)){\n\t\t\treturn $this->renderWith(array('Unathorised_access', 'App'));\n\t\t}\n\t\t\n\t\t\n\t\t$this->title = 'Search Catholic Magazine';\n\t\t$this->list = $this->Results();\n\t\treturn $this->renderWith(array('CatholicMagazine_results','App'));\n\t}", "title": "" }, { "docid": "9b71a14ec72e8ef3dfad789e76fba386", "score": "0.64133024", "text": "public function searchAction()\n {\n $numberPage = 1;\n if ($this->request->isPost()) {\n $query = Criteria::fromInput($this->di, \"MasSubject\" ,$this->request->getPost());\n $this->persistent->searchParams = $query->getParams();\n } else {\n $numberPage = $this->request->getQuery(\"page\", \"int\");\n }\n\n $parameters = [];\n\n if ($this->persistent->searchParams) {\n $parameters = $this->persistent->searchParams;\n\n\n }\n// $masClassGroup = MasClassGroup::find([$parameters , 'order' => 'ClassGroupSorting ASC' , 'conditions' => \" RecordStatus LIKE 'N' \" ]);\n $masSubject = MasSubject::find($parameters);\n $masSubject -> RecordStatus = 'N' ;\n\n\n\n\n if (count($masSubject) == 0) {\n $this->flash->notice(\"ไม่พบข้อมูลที่ต้องการค้นหา\");\n\n return $this->dispatcher->forward(\n [\n \"controller\" => \"masSubject\",\n \"action\" => \"index\",\n ]\n );\n }\n\n $paginator = new Paginator([\n \"data\" => $masSubject,\n \"limit\" => 10,\n \"page\" => $numberPage\n ]);\n\n $this->view->page = $paginator->getPaginate();\n $this->view->masSubject = $masSubject;\n }", "title": "" }, { "docid": "89da5ed4c296182de26060e648dab84d", "score": "0.6403405", "text": "public function search($search = null)\n {\n $slug = \"Recherche\";\n $notFound = null;\n\n if (isset($_POST['search']) && !empty($_POST['search'])) {\n\n // Affiche la recherche Film\n $search = $_POST['search'];\n $search = $this->model->getBySearch($search);\n\n }else{\n $notFound = \"L'artiste recherché n'est pas répertorié, mais vous pouvez nous envoyer des suggestions via le formulaire !\";\n }\n\n $pageTwig = 'Artists/showAllArtists.html.twig';\n $template = $this->twig->load($pageTwig);\n $artists = $this->model->getAllArtists();\n echo $template->render([\n 'slug' => $slug,\n 'artists' => $artists,\n 'search' => $search,\n 'notFound' => $notFound,\n 'alertMessage' => $_SESSION['receiveMessage']\n ]);\n }", "title": "" }, { "docid": "c5949f40d3117943c31ae8f51e72e63b", "score": "0.6371202", "text": "private function showSearchResults(): void\n {\n $search = $_GET[\"search\"];\n $order = $this->paginationInfo[\"order\"];\n $direction = $this->paginationInfo[\"direction\"];\n $page = $this->paginationInfo[\"page\"];\n $notify = $this->notify;\n $isAuth = $this->isAuth;\n $essences = $this->essenceDataGateway->searchEssences(\n $search,\n $this->paginationInfo[\"offset\"],\n $this->paginationInfo[\"perPage\"],\n $order,\n $direction\n );\n [\"totalPages\" => $totalPages, \"start\" => $start, \"end\" => $end] =\n $this->calculatePaginationParams($search);\n\n $params = compact(\n \"search\",\n \"order\",\n \"direction\",\n \"totalPages\",\n \"start\",\n \"end\",\n \"essences\",\n \"page\",\n \"notify\",\n \"isAuth\"\n );\n\n $this->render(__DIR__.\"/../../views/home.view.php\",$params);\n }", "title": "" }, { "docid": "047e33875807f88110193a911b427855", "score": "0.63617235", "text": "public function search($search);", "title": "" }, { "docid": "4318f1de1998bb69719da7790dd6a3bc", "score": "0.6334202", "text": "public function searchAction() {\r\n\r\n try {\r\n \r\n // Get press review type\r\n $typeId = $this->getParam('pageKey', null);\r\n \r\n // Get search parameters : tag id and search term\r\n $tagId = $this->getParam('tid', null);\r\n $searchTerm = $this->getParam(\"contentSearchTerm\", null);\r\n \r\n $pageNumber = $this->getParam($this->navigationParamName, null);\r\n \r\n if ($pageNumber) // Get press reviews from session when paging\r\n $pressReviews = $this->getResultsInSession($typeId);\r\n else { // Get press reviews from sql and and store them into session\r\n $pressReviews = $this->getPressReviews($typeId, $tagId, $searchTerm, false);\r\n $this->setResultsInSession($typeId, $pressReviews);\r\n }\r\n \r\n // Add common items to model view\r\n $this->addCommonListItemsToModelView($pageNumber, $tagId, $searchTerm, $pressReviews, $typeId);\r\n \r\n switch ($typeId) {\r\n case PressReviewTypes::ARTICLE :\r\n $this->render(\"list\");\r\n break;\r\n case PressReviewTypes::VIDEO :\r\n $this->render(\"videos\");\r\n break;\r\n }\r\n } catch (\\Exception $e) {\r\n Trace::addItem(sprintf(\"Une erreur s'est produite dans \\\"%s->%s\\\", TRACE : %s\\\"\", get_class(), __FUNCTION__, $e->getTraceAsString()));\r\n $this->forward(\"error\", \"error\", \"default\");\r\n }\r\n }", "title": "" }, { "docid": "9e73aadb30289dba4b28c36dd98d3686", "score": "0.6331268", "text": "public function search()\r\n\t{\r\n\r\n }", "title": "" }, { "docid": "b5af1551b20ff93ffc4affedd05d88f3", "score": "0.63293725", "text": "public function search()\r\n {\r\n }", "title": "" }, { "docid": "a544262c604e6c1ad3234b5fa6ecb639", "score": "0.6328102", "text": "public function show(Search $search)\n {\n //\n }", "title": "" }, { "docid": "3227983554abb9bacdc293dcaaf10eaa", "score": "0.63247526", "text": "public function search()\n {\n $input = Input::all();\n $request = \"\";\n $requestControle = false;\n if (isset($input['searchtool']) && !empty($input['searchtool'])) {\n $request .= \"`describe` LIKE '%\".$input['searchtool'].\"%' OR `title` LIKE '%\".$input['searchtool'].\"%'\";\n $requestControle = true;\n }\n\n if (isset($input['pricefirst']) && !empty($input['pricefirst'])) {\n $requestControle = true;\n if (!$input['searchtool']) {\n $request .= \" annonces.price >= \".$input['pricefirst'];\n } else {\n $request .= \" AND annonces.price >= \".$input['pricefirst'];\n }\n }\n\n if (isset($input['priceend']) && !empty($input['priceend'])) {\n $requestControle = true;\n if (!$input['searchtool']) {\n if (!$input['pricefirst']) {\n $request .= \" annonces.price <= \".$input['priceend'];\n } else {\n $request .= \" AND annonces.price <= \".$input['priceend'];\n }\n } else {\n if (!$input['pricefirst']) {\n $request .= \" AND annonces.price <= \".$input['priceend'];\n } else {\n $request .= \" AND annonces.price <= \".$input['priceend'];\n }\n }\n }\n\n if ($requestControle === true) {\n $seek = Annonce::whereRaw($request)->get();\n return view('adslist', compact('seek'));\n } else {\n Session::flash('flash_danger', 'Vous devez remplire au moins un des champs pour effectuer une recherche.');\n return redirect('allads');\n }\n\n }", "title": "" }, { "docid": "a333d36e4853763b769c02bfb87ead99", "score": "0.6306818", "text": "function search($p = array())\n {\n global $conn, $feedback;\n\n global $g_pager_params;\n\n $q = \"WHERE 1 \";\n\n $article_id = addslashes(htmlspecialchars(trim($p['article_id'])));\n if ($article_id != '') {\n $q .= \"AND ar.article_id = '\".$article_id.\"' \";\n }\n\n $keyword_id = addslashes(htmlspecialchars(trim($p['keyword_id'])));\n if ($keyword_id != '') {\n $q .= \"AND ar.keyword_id = '\".$keyword_id.\"' \";\n }\n\n $creation_role = addslashes(htmlspecialchars(trim($p['creation_role'])));\n if ($creation_role != '') {\n $q .= \"AND ar.creation_role LIKE '%\".$creation_role.\"%' \";\n }\n $creation_user_id = addslashes(htmlspecialchars(trim($p['creation_user_id'])));\n if ($creation_user_id != '') {\n $q .= \"AND ar.creation_user_id = '\".$creation_user_id.\"' \";\n }\n\n $language = addslashes(htmlspecialchars(trim($p['language'])));\n if ($language != '') {\n $q .= \"AND ar.language = '\".$language.\"' \";\n }\n \n $article_status = $p['article_status'];\n if (is_array($article_status) && !empty($article_status)) {\n $q .= \"AND ar.article_status IN ('\". implode(\"', '\", $article_status).\"') \";\n }\n else {\n $article_status = addslashes(htmlspecialchars(trim($article_status)));\n if ($article_status != '') {\n $q .= \"AND ar.article_status = '\".$article_status.\"' \";\n }\n }\n\n $title = addslashes(htmlspecialchars(trim($p['title'])));\n if ($title != '') {\n $q .= \"AND ar.title LIKE '%\".$title.\"%' \";\n }\n $body = addslashes(htmlspecialchars(trim($p['body'])));\n if ($body != '') {\n $q .= \"AND ar.body LIKE '%\".$body.\"%' \";\n }\n\n $campaign_id = addslashes(htmlspecialchars(trim($p['campaign_id'])));\n if ($campaign_id != '') {\n $q .= \"AND cc.campaign_id = '\".$campaign_id.\"' \";\n }\n $article_type = addslashes(htmlspecialchars(trim($p['article_type'])));\n if ($article_type != '') {\n $q .= \"AND ck.article_type = '\".$article_type.\"' \";\n }\n\n if (trim($p['keyword']) != '') {\n require_once CMS_INC_ROOT.'/Search.class.php';\n $search = new Search($p['keyword'], \"AND\"); // use AND operator\n if ($search->getError() != '') {\n //do nothing\n $feedback = $search->getError();\n } else {\n $q .= \"AND \".$search->getLikeCondition(\"CONCAT(ar.title, ar.body, ar.current_version_number, ck.keyword, ck.article_type, ck.keyword_description)\").\" \";\n }\n }\n\n require_once CMS_INC_ROOT.'/Client.class.php';\n if (user_is_loggedin()) {\n if (User::getPermission() == 1) {\n //$ql .= \"LEFT JOIN users AS u ON (ck.copy_writer_id = u.user_id) \";\n $q .= \"AND ck.copy_writer_id = '\".User::getID().\"'\";\n } elseif (User::getPermission() == 3) { // 2=>3\n //$ql .= \"LEFT JOIN users AS uc ON (ck.editor_id = u.user_id) \";\n $q .= \"AND ck.editor_id = '\".User::getID().\"'\";\n } else {\n //do nothing\n }\n } elseif (client_is_loggedin()) {\n $q .= \"AND cl.client_id = '\".Client::getID().\"'\";\n } else {\n return false;\n }\n\n $rs = &$conn->Execute(\"SELECT COUNT(ar.article_id) AS count FROM articles AS ar \".\n \"LEFT JOIN campaign_keyword AS ck ON (ck.keyword_id = ar.keyword_id) \".\n \"LEFT JOIN client_campaigns AS cc ON (ck.campaign_id = cc.campaign_id) \".\n \"LEFT JOIN `client` AS cl ON (cc.client_id = cl.client_id) \".$q);\n if ($rs) {\n $count = $rs->fields['count'];\n $rs->Close();\n }\n\n if ($count == 0 || !isset($count)) {\n //$feedback = \"Couldn\\'t find any information,Please try again\";//找不到相关的信息,请重新设置搜索条件\n return false;\n }\n\n $perpage = 50;\n if (trim($p['perPage']) > 0) {\n $perpage = $p['perPage'];\n }\n\n require_once 'Pager/Pager.php';\n $params = array(\n 'perPage' => $perpage,\n 'totalItems' => $count\n );\n $pager = &Pager::factory(array_merge($g_pager_params, $params));\n\n $q = \"SELECT ar.*, ck.keyword, ck.article_type, ck.keyword_description, ck.date_start, ck.date_end, cc.campaign_name, u.user_name AS creator, uc.user_name as copywriter \".\n \"FROM articles AS ar \".\n \"LEFT JOIN campaign_keyword AS ck ON (ck.keyword_id = ar.keyword_id) \".\n \"LEFT JOIN users AS u ON (u.user_id = ar.creation_user_id) \".\n \"LEFT JOIN users AS uc ON (ck.copy_writer_id = uc.user_id) \".\n \"LEFT JOIN users AS ue ON (ck.editor_id = ue.user_id) \".\n \"LEFT JOIN client_campaigns AS cc ON (ck.campaign_id = cc.campaign_id) \".\n \"LEFT JOIN `client` AS cl ON (cc.client_id = cl.client_id) \".$q;\n\n list($from, $to) = $pager->getOffsetByPageId();\n $rs = &$conn->SelectLimit($q, $params['perPage'], ($from - 1));\n if ($rs) {\n $result = array();\n $i = 0;\n while (!$rs->EOF) {\n $result[$i] = $rs->fields;\n $rs->MoveNext();\n $i ++;\n }\n $rs->Close();\n }\n\n return array('pager' => $pager->links,\n 'total' => $pager->numPages(),\n 'result' => $result);\n\n }", "title": "" }, { "docid": "a5bd5d12b297835f7f9a0a3e88aa3326", "score": "0.62814146", "text": "public function search()\n\t{\n\t}", "title": "" }, { "docid": "a5bd5d12b297835f7f9a0a3e88aa3326", "score": "0.62814146", "text": "public function search()\n\t{\n\t}", "title": "" }, { "docid": "0856885aa7d36cde8dc254061ad02d7b", "score": "0.6278564", "text": "public function search()\n\t{\n\t\tif($this->session->userdata('uid')==1){\n\t\t\t$data['authorized']=true;\n\t\t}else{\n\t\t\t$data['authorized']=false;\n\t\t}\n\t\tif(isset($_GET['find'])){\n\t\t\t$data['query']=$_GET['find'];\n\t\t}else{\n\t\t\t$data['query']=\"\";\n\t\t}\n\n\t\t$this->load->view('result',$data);\n\t\t$this->load->view('common/footer');\n\t}", "title": "" }, { "docid": "9cb99d41495a5fec5aef9091ae12416a", "score": "0.6277174", "text": "public function search($search = ''){\n\n\n $list_services = Service::where('the_status', 'open')->where('title', 'like', '%' . $search . '%')->paginate(15);\n\n return view('services/services', ['services' => $list_services]);\n }", "title": "" }, { "docid": "f55aad87f7062033dff2822e00be87c5", "score": "0.62663096", "text": "public function index(Request $request) {\n \n if($request->get('search')!=\"\"){\n // $publications = Publication::title($request->get('search'));\n $publications =Publication::whereLike(['titulo', 'categoria'], $request->get('search'))->where('state',1)->paginate(10);\n \n }else{ \n $publications = Publication::where('state',1)->paginate(10);}\n \n return view('publications.publications', ['publications' => $publications]); \n \n }", "title": "" }, { "docid": "8f8f86ba92f07264d4b782c1702271c4", "score": "0.6265701", "text": "public function search(request $search)\n {\n \n \n \n \n }", "title": "" }, { "docid": "51523d8111620b45da4b189d83cc7fb2", "score": "0.62465376", "text": "public function search();", "title": "" }, { "docid": "51523d8111620b45da4b189d83cc7fb2", "score": "0.62465376", "text": "public function search();", "title": "" }, { "docid": "045264b6c43a1d5fa650c0bd6edde201", "score": "0.62443674", "text": "public function search()\n\t{\n\n\t}", "title": "" }, { "docid": "ffd64f3c81607e3ac4250988b417f344", "score": "0.62433213", "text": "public function getSearch() {\n\t\t$keyword = Input::get('search');\n\n\t\t//search that student in Database\n\t\t$articles = $this->searchArticles($keyword);\n\n\t\t$pagetitle=\"search\";\n $this->vars = array_add($this->vars, 'pagetitle', $pagetitle);\n $content=view('content')->with(['articles'=>$articles,'pagetitle'=>$pagetitle])->render();\n\n\t\t$this->vars = array_add($this->vars, 'content', $content);\n\t\t$abouts = $this->getAbout();\n\t\t$asideArticles = $this->getPost(config(\"settings.resent_articles\"));\n\t\t$this->contentRightBar = view(\"indexBar\")->with([\"abouts\" => $abouts, \"asideArticles\" => $asideArticles]);\n\n\t\t//return display search result to user by using a view\n\t\treturn $this->renderOutput();\n\n\t}", "title": "" }, { "docid": "99496f23fd92467458eae6688225e49c", "score": "0.6228343", "text": "public static function search(){\n \n }", "title": "" }, { "docid": "7f78eed2275c342369a515626ce4ec3c", "score": "0.6225415", "text": "public function index()\n {\n $articles = Article::when(isset(request()->searchKey),function ($q){\n $searchKey = request()->searchKey;\n return $q->where(\"article_title\",\"like\",\"%$searchKey%\")->orwhere(\"article_description\",\"like\",\"%$searchKey%\");\n })->with(['getUser','getCategory'])->latest('id')->paginate(5);\n return view('article.index',compact('articles'));\n }", "title": "" }, { "docid": "66364d9fe12ae4e422caf36246709467", "score": "0.62133443", "text": "public function search( $idWbfsysAnnouncement, $access, $params )\n {\n\n $response = $this->getResponse();\n\n // if the entity is not loadable just break here\n // the tab will not be shown in the window\n if( !Webfrap::classLoadable( 'WbfsysRoleUser_Entity' ) )\n {\n Error::addError\n (\n 'tried so search for a nonexisting entity: wbfsys_role_user with the expected source wbfsys_role_user'\n );\n return array();\n }\n\n $db = $this->getDb();\n $orm = $db->getOrm();\n $httpRequest = $this->getRequest();\n $user = $this->getUser();\n $view = $this->getView();\n \n\t\t$extendedConditions = array();\n\n $condition = array();\n\n\n\n\n if( $free = $httpRequest->param( 'free_search' , Validator::TEXT ) )\n $condition['free'] = $free;\n\n if( !$fieldsWbfsysUserAnnouncement = $this->getRegisterd( 'search_fields_wbfsys_user_announcement' ) )\n {\n $fieldsWbfsysUserAnnouncement = $orm->getSearchCols( 'WbfsysUserAnnouncement' );\n }\n\n if( $refs = $httpRequest->dataSearchIds( 'search_wbfsys_user_announcement' ) )\n {\n $fieldsWbfsysUserAnnouncement = array_unique( array_merge\n (\n $fieldsWbfsysUserAnnouncement,\n $refs\n ));\n }\n\n $filterWbfsysUserAnnouncement = $httpRequest->checkSearchInput\n (\n $orm->getValidationData( 'WbfsysUserAnnouncement', $fieldsWbfsysUserAnnouncement ),\n $orm->getErrorMessages( 'WbfsysUserAnnouncement' ),\n 'search_wbfsys_user_announcement'\n );\n $condition['wbfsys_user_announcement'] = $filterWbfsysUserAnnouncement->getData();\n\n\n\n\n // create a new query object\n $query = $db->newQuery( 'WbfsysAnnouncement_Ref_Status_Table' );\n /* @var $query WbfsysAnnouncement_Ref_Status_Table_Query */\n $query->extendedConditions = $extendedConditions;\n\n // hard condition\n $query->setCondition( 'wbfsys_user_announcement.id_announcement = '.$idWbfsysAnnouncement );\n \n $validKeys = $access->fetchListIds\n ( \n $user->getProfileName(), \n $query, \n 'table', \n $condition, \n $params \n );\n\n $query->fetchInAcls\n (\n $validKeys,\n $params\n );\n\n\n\n return $query;\n\n }", "title": "" }, { "docid": "872047f75620e77c2c798d6615158077", "score": "0.62122554", "text": "public function search() : void\n\t{\n\t\tif (empty($this->query)) {\n\t\t\t$this->resetSearch();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$this->eligebleForPermission = $this->getAction()->search($this->query)->get();\n\t\t$this->isSearching = true;\n\t}", "title": "" }, { "docid": "6e5c6c69eb670e93e41e6a92da1a20db", "score": "0.6209871", "text": "public function search()\n\t{\n request()->validate([\n 'upit' => 'required'\n ]);\n\n\t\t$query = request('upit');\n\t\t$articles = Article::search($query)->paginate(5);\n\n\t\treturn view('blog.search', compact('articles'));\n\t}", "title": "" }, { "docid": "2a5ae8de4a66852cc1116102e21322c6", "score": "0.62077314", "text": "public function search() {\n\t\t\t$Recherches = $this->Components->load( 'WebrsaRecherchesOrientsstructs' );\n\t\t\t$Recherches->search();\n\t\t}", "title": "" }, { "docid": "fe8d3a0103670bb3596f1c3b5d5c85f5", "score": "0.62020683", "text": "public function search() {\n\n $term = !empty($this->request->query['term']) ? $this->request->query['term'] : '';\n\n if (!empty($term)) {\n $this->search_results($term, false);\n }\n\n $this->loadShoutbox();\n }", "title": "" }, { "docid": "1c2c5f9d47826e8f1ed89e1eaf0ef1df", "score": "0.61999017", "text": "public function searchArticle() {\n\n $expression = \"//div[contains(concat(' ',normalize-space(@class),' '),' view-news-listing ')]//div[contains(concat(' ',normalize-space(@class),' '),' attachment-before ')]//li [contains(concat(' ',normalize-space(@class),' '),' views-row-1 ')]//h2[contains(concat(' ',normalize-space(@class),' '),' news-title')]/a\";\n $searchText = $this->getSession()->getPage()->find('xpath',$expression);\n $search = $searchText->getText();\n\n return array(\n new When (\"I fill in \\\"edit-keys\\\" with \\\"$search\\\"\"),\n new When (\"I press \\\"edit-submit-news-listing\\\"\")\n );\n }", "title": "" }, { "docid": "11f55cf18ed37002abdaecf8eb3e05a1", "score": "0.6197058", "text": "public function search()\n {\n $search_string = $this->app['request']->query->get('search_string');\n $results = $this->app['pomm']\n ->getDefaultSession()\n ->getModel('Model\\PommProject\\PommSchema\\NewsModel')\n ->search($search_string, 15)\n ;\n\n return $this\n ->app['twig']\n ->render('blog_search_results.html.twig', ['news' => $results, 'search_string' => $search_string])\n ;\n }", "title": "" }, { "docid": "f6623905718e12790af75d187287b03b", "score": "0.61912644", "text": "public function search(){\n $modelCass = $this->models[2];\n $field = $this->data['field'];\n $what = $this->data['recherche'];\n if(!empty($what) && !empty($field)){\n if($this->$modelCass->isDateUsFr($what)){\n $what = $this->$modelCass->dateUs($what);\n }\n $d['searchResults'] = $this->$modelCass->search(array('field' => $field,\n 'what' => $what));\n if($d['searchResults']){\n foreach ($d['searchResults'] as $key => $value){\n $d['searchResults'][$key]['date_sortie'] = $this->$modelCass->dateFr($value['date_sortie']);\n }\n }\n $this->set($d);\n }\n }", "title": "" }, { "docid": "ceb84db578af2633d39a4f966ed5ba48", "score": "0.6185155", "text": "function search(){\n \n $this->archive();\n \n $this->View->add(\"page_header_title\", sprintf(__('Search Results For \"%s\"'), get_search_query()));\n \n /*\n * add filter to the content that hilights search results\n */\n \n add_filter(\"the_excerpt\", function($content){\n $query_words = explode(\" \", get_search_query());\n foreach($query_words as $word){\n $content = str_replace($word, \"<strong class='search-keyword-result'>\" .$word .\"</strong>\", $content);\n }\n return $content;\n });\n \n }", "title": "" }, { "docid": "48ef446715fc8a58fa45b91831e552ad", "score": "0.6180025", "text": "public function index() {\n $cond=array();\n //当有搜索内容时\n if(I('get.seach_name')){\n $cond['name']=array(\"like\",\"%\".I('get.seach_name').\"%\");\n }\n $this->assign($this->_model->getPageResult($cond));\n $this->display();\n }", "title": "" }, { "docid": "29e1e57644019c429166a10b5e822334", "score": "0.6178113", "text": "public function search() {\n $this->render(false, false);\n \n // parâmetros da requisição\n debug($this->request->params);\n}", "title": "" }, { "docid": "df3efeabe81b2581d56f1293fad4501d", "score": "0.6160554", "text": "public function search()\n\t{\n\t\t$request = array(\"name\" => $this->input->get(\"search\", TRUE));\n\n\t\t$data[\"members\"] = $this->Member->find_by($request);\n\t\t$data[\"main_content\"] =\t\"members/index\";\n\n\t\t$this->load->view(\"admin/template\", $data);\n\t}", "title": "" }, { "docid": "98fd2aef2ae3c7f06c5bba8eb7d9c41d", "score": "0.61543405", "text": "public function searchAction()\n {\n $searchQuery = $this->getParam('q');\n if(empty($searchQuery))\n return;\n\n $parameters = $this->getAllParams();\n $sources = array();\n foreach($parameters as $param => $value){\n if (strpos($param,'searchsource_') !== false && $value === \"1\") {\n $sources[] = str_replace('searchsource_','',$param);\n }\n }\n\n if(sizeof($sources)){\n $libcoService = new LibcoService();\n $result = $libcoService->search($searchQuery, $sources, $this->getCurrentPage());\n if(!empty($result)){\n // 'api/advancedsearch'\n if(empty($result['responces'])){\n $this->_helper->flashMessenger('Search result not returned from the server.', 'error');\n return;\n }\n $result = $result['responces'];\n $result = $libcoService->normalizeResult($result, $searchQuery);\n\n if ($result['totalResults']) {\n Zend_Registry::set('pagination', array(\n 'page' => $this->getCurrentPage(),\n 'per_page' => 100,\n 'total_results' => $result['totalResults']\n ));}\n $this->view->assign($result);\n }\n }\n else\n $this->_helper->flashMessenger('Search source not selected.', 'error');\n }", "title": "" }, { "docid": "a3aebd45f9fe8568bdc506f480098205", "score": "0.61391985", "text": "public function search($search = null){\n\n\t\t\t// if user try to search through the URL\n\t\t\tif(!isset($search)){\n\n\t\t\t\t$data = $this->Game->find('all');\t\t\t\t\n\t\t\t}\t\n\t\t\telse{\n\n\t\t\t\t$data = $this->Game->find('all',array('order'=>'year','conditions' => array('title LIKE' => '%'.$search.'%')\n\t\t\t\t\t));\n\t\t\t}\n\n\t\t\t$count = count($data);\n\t\t\t$gameInformation = array(\n\n\t\t\t\t\t'games'=> $data,\n\t\t\t\t\t'count'=> $count\n\t\t\t\t);\n\n\t\t\t$this->set($gameInformation);\n\t\t\t$this->render('index');\n\t\t}", "title": "" }, { "docid": "a2b0d513281d29168fed384a89f9b4f2", "score": "0.61326957", "text": "public function search(){\n $search_result = WebsiteConfig::where('kategori', 'contact')\n ->where('config.phone', 'like', '%'.Input::get('search').'%')\n ->paginate();\n \n $this->page_datas->datas = $search_result;\n $this->page_datas->id = null;\n //page attributes\n $this->page_attributes->page_title = 'Search Result: '.Input::get('search');\n //generate view\n $view_source = $this->view_source_root . '.index';\n $route_source = Request::route()->getName(); \n return $this->generateView($view_source , $route_source);\n }", "title": "" }, { "docid": "b2c43e76a854b7629c8476b142a894c8", "score": "0.6128673", "text": "public function searchAction() {\r\n// $query = $em->createQueryBuilder();\r\n $request = $this->get('request');\r\n $recherche = \"\";\r\n foreach ($request as $rq) {\r\n if ($rq instanceof \\Symfony\\Component\\HttpFoundation\\ParameterBag) {\r\n $param = $rq;\r\n $arrayParam = $param->all();\r\n if (isset($arrayParam['rech'])) {\r\n $recherche = isset($arrayParam['rech']) ? $arrayParam['rech'] : '';\r\n }\r\n }\r\n }\r\n// $this->searchDo($rech, $titre_art, $titre_ver, $titre_archive, $content_ver, $content_archive);\r\n// $param = \"%$rech%\";\r\n// $titre_art = $this->mySymfoQuery(\"a\", 'LooninsWikiBundle:Article', \"a.artTitre LIKE :rech\", $param);\r\n// $titre_ver = $this->mySymfoQuery(\"v\", 'LooninsWikiBundle:Version', \"v.verTitre LIKE :rech\", $param);\r\n// $titre_archive = $this->mySymfoQuery(\"ar\", 'LooninsWikiBundle:Versions', \"ar.verTitre LIKE :rech\", $param);\r\n//\r\n// $content_ver = $this->mySymfoQuery(\"v\", 'LooninsWikiBundle:Version', \"v.verContent LIKE :rech\", $param);\r\n// $content_archive = $this->mySymfoQuery(\"ar\", 'LooninsWikiBundle:Versions', \"ar.verContent LIKE :rech\", $param);\r\n\r\n $tab = explode(\" \", $recherche);\r\n $titre_art = array();\r\n $titre_ver = array();\r\n $titre_archive = array();\r\n $content_ver = array();\r\n $content_archive = array();\r\n foreach ($tab as $rech) {\r\n $param = \"%$rech%\";\r\n $line = $this->mySymfoQuery(\"a\", 'LooninsWikiBundle:Article', \"a.artTitre LIKE :rech\", $param);\r\n !in_array($line, $titre_art) ? $titre_art[] = $line : \"\";\r\n\r\n $line = $this->mySymfoQuery(\"v\", 'LooninsWikiBundle:Version', \"v.verTitre LIKE :rech\", $param);\r\n !in_array($line, $titre_ver) ? $titre_ver[] = $line : \"\";\r\n\r\n $line = $this->mySymfoQuery(\"ar\", 'LooninsWikiBundle:Versions', \"ar.verTitre LIKE :rech\", $param);\r\n !in_array($line, $titre_archive) ? $titre_archive[] = $line : \"\";\r\n\r\n $line = $this->mySymfoQuery(\"v\", 'LooninsWikiBundle:Version', \"v.verContent LIKE :rech\", $param);\r\n !in_array($line, $content_ver) ? $content_ver[] = $line : \"\";\r\n \r\n $line = $this->mySymfoQuery(\"ar\", 'LooninsWikiBundle:Versions', \"ar.verContent LIKE :rech\", $param);\r\n !in_array($line, $content_archive) ? $content_archive[] = $line : \"\";\r\n }\r\n\r\n \r\n\r\n\r\n $lines = array(\r\n \"titre_art\" => $titre_art,\r\n \"titre_ver\" => $titre_ver,\r\n \"titre_archive\" => $titre_archive,\r\n \"content_ver\" => $content_ver,\r\n \"content_archive\" => $content_archive\r\n );\r\n// die();\r\n return array(\r\n 'resultats' => $lines,\r\n 'rech' => $recherche,\r\n );\r\n }", "title": "" }, { "docid": "6420f98786a09767cef41c38af67f1f0", "score": "0.6123587", "text": "public function searchprocessAction() {\n\t\t$this->_helper->ajaxgrid->setConfig ( Newsletters::grid() )->search ();\n\t}", "title": "" }, { "docid": "ce84a61538783740ac320821cd1f0ea5", "score": "0.61184543", "text": "public function post_search()\n { \n\t if ( Auth::check() )\n\t\t{\t\t\t \n\t\t\t$search = Input::get( 'search' );\t \t\t \t\t\t \n\n\t\t\t$empall = DB::table( 'n_datageneral' ) \n\t\t\t ->where( 'fname', 'like', \"%$search%\" ) \n\t\t\t ->orWhere( 'lname', 'like', \"%$search%\" )\n\t\t\t ->orWhere( 'cid', 'like', \"%$search%\" )\n\t\t\t ->orWhere( 'mobile', 'like', \"%$search%\" )\t\t\t \n\t ->orderBy( 'datainfoID', 'asc')\n\t ->paginate( 10 );\t\t\t \n\t \n\t\t\t//view page create\n\t\t return View::make( 'emps.home', array( 'empall' => $empall ) );\t\n\t\t}\t\n\t\telse\n\t\t{\n\t\t\t//return login\n \t\treturn View::make( 'users.index' );\t\n\t\t}\t\n }", "title": "" }, { "docid": "48e5cd6c43674a6ebd1524f85b93d2bc", "score": "0.6114411", "text": "function search() {\n\n\t\t// breadcrumb urls\n\t\t$this->data['action_title'] = get_msg( 'prd_search' );\n\n\t\t// condition with search term\n\t\t$conds = array( 'searchterm' => $this->searchterm_handler( $this->input->post( 'searchterm' )) );\n\t\t$conds['status'] = 0;\n\n\t\t// pagination\n\t\t$this->data['rows_count'] = $this->Pending->count_all_by( $conds );\n\n\t\t// search data\n\t\t$this->data['pendings'] = $this->Pending->get_all_by( $conds, $this->pag['per_page'], $this->uri->segment( 4 ) );\n\n\t\t// load add list\n\t\tparent::search();\n\t}", "title": "" }, { "docid": "b9129cdbd111b0b90026824f5e9a0e82", "score": "0.6092162", "text": "public function search_article(){\n $this->data['title'] = 'Search Article';\n $this->page_name = 'articledetail';\n $this->dashboard = '';\n $this->data['content_view'] = 'search/search_article';\n $this->data['SearchSection'] = 'searcharticle';\n $this->data['SearchText'] = $this->input->post('SearchText');\n $this->data['content_view'] = 'search/search_article';\n $this->load->view($this->data['content_view'], $this->data);\n }", "title": "" }, { "docid": "cd152c94550447d740ae44ded4c01b2b", "score": "0.6091709", "text": "public function search(){\r\n\t\t$parishID = Convert::raw2sql($this->request->getVar('ParishID'));\t\t\r\n\t\tif(!$this->canAccess($parishID)){\r\n\t\t\treturn $this->renderWith(array('Unathorised_access', 'App'));\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t$this->title = 'Search Vehicle';\r\n\t\t$this->list = $this->Results();\r\n\t\treturn $this->renderWith(array('Vehicle_results','App'));\r\n\t}", "title": "" }, { "docid": "376d3d9dd0f93f81ea280706d6ea7d05", "score": "0.6087164", "text": "public function runSearch() {\n// $result = $model->where(Articles_Model::COLUMN_ID_CATEGORY.' = :idc', array('idc'=>$this->category()->getId()))->search($this->getSearchString());\n//\n// foreach ($result as $res) {\n//// if((string)$res->{Articles_Model::COLUMN_ANNOTATION} != null){\n//// $text = $res->{Articles_Model::COLUMN_ANNOTATION};\n//// } else {\n// $text = $res->{Articles_Model::COLUMN_TEXT};\n//// }\n// $this->addResult(\n// $res->{Articles_Model::COLUMN_NAME},\n// $this->link()->route('detail', array('urlkey' => $res->{Articles_Model::COLUMN_URLKEY})),\n// $text, $res->{Search::COLUMN_RELEVATION});\n// }\n }", "title": "" }, { "docid": "aa1ea2f2db85fab5def8b9c6c65dbc57", "score": "0.6081542", "text": "public function searchAction(Search $search = null)\n {\n $this->view->assign('search', $search);\n $this->view->assign('id', $GLOBALS['TSFE']->id);\n }", "title": "" }, { "docid": "555013e56c64895c677b41c8df01db86", "score": "0.60812545", "text": "public function actionSearch() {\n // renders the view file 'protected/views/site/index.php'\n // using the default layout 'protected/views/layouts/main.php'\n header(\"Cache-Control: no-store, no-cache, must-revalidate\");\n header(\"Expires: \" . date(\"r\"));\n\n Yii::app()->clientScript->registerMetaTag('noindex,noarchive', 'robots');\n $model = new SearchForm;\n $result = '';\n\n if (isset($_GET['SearchForm'])) {\n $model->attributes = $_GET['SearchForm'];\n\n if ($model->validate()) {\n $criteria = new CDbCriteria();\n $cat_id = ($model->category) ? $model->category : implode(' OR cat_id =', Article::model()->getNewscat());\n $author = (trim($model->author)) ? 'AND author_alias like \"%' . trim($model->author) . '%\" OR author0.name LIKE \"%' . $model->author . '%\"' : '';\n\n $criteria->condition = ' t.published = 1 ' . $author . ' AND(cat_id=' . $cat_id . ') AND (title LIKE :text OR `fulltext` like :text) ';\n $criteria->params = array(':text' => '%' . str_replace(' ', '%', trim($model->text)) . '%');\n $criteria->with = array('category', 'author0');\n $criteria->order = 't.id DESC';\n $criteria->limit = 100;\n $result = Article::model()->findAll($criteria);\n }\n }\n\n $this->layout = '//layouts/news/article';\n $this->render('search', array('model' => $model, 'results' => $result));\n }", "title": "" }, { "docid": "8c99079a9fe7d8aea64cd0a795f5587f", "score": "0.60753846", "text": "public function searchBerita($search)\n {\n }", "title": "" }, { "docid": "59510bc5fc3c6691ecd830e0df5bf4e2", "score": "0.60738415", "text": "public function search()\n {\n\n }", "title": "" }, { "docid": "59510bc5fc3c6691ecd830e0df5bf4e2", "score": "0.60738415", "text": "public function search()\n {\n\n }", "title": "" }, { "docid": "95504f83e726049dc3b531aac6e39269", "score": "0.60663515", "text": "public function searchContractors(Request $search);", "title": "" }, { "docid": "8c937f0ead18efd76f9ce0525523d58e", "score": "0.6064913", "text": "public function search() {\n\t $url['action'] = 'subjects';\n\t \n\t // build a URL will all the search elements in it\n\t // the resulting URL will be\n\t // example.com/cake/posts/index/Search.keywords:mykeyword/Search.tag_id:3\n\t foreach ($this->data as $k=>$v){\n\t foreach ($v as $kk=>$vv){\n\t $url[$k.'.'.$kk]=$vv;\n\t }\n\t }\n\t \n\t \n\t // redirect the user to the url\n\t $this->redirect($url, null, true);\n\t }", "title": "" }, { "docid": "52890054c9820ccccbdd7101a9bf67bd", "score": "0.60567856", "text": "public function searchAction()\n {\n //...\n }", "title": "" }, { "docid": "f11c435f6d343e0b7ea6059f38036304", "score": "0.60433877", "text": "public function actionSearch()\n {\n $model = new Govorganization('search');\n // Clear any default values.\n $model->unsetAttributes();\n\n if(isset($_GET['Govorganization'])) {\n $model->attributes = $_GET['Govorganization'];\n }\n\n $this->render('search', array(\n 'model' => $model,\n ));\n }", "title": "" }, { "docid": "4698d4ca1bcfbfc05ef4e904203e1c38", "score": "0.6033744", "text": "public function Makesearch($search)\n { $bycat = PostController::Makesearch($search);\n $cat = CategoryController::getCategory();\n // $latest = PostController::latestByCategory($category);\n return view('newapp.search')->with(['posts'=>$bycat, 'category'=>$search, 'cat'=>$cat, \n 'fulltitle'=>$search. ' - InsiderPerspective']);\n }", "title": "" }, { "docid": "81124c02c5c9bd5e5374619dec3b7118", "score": "0.6028402", "text": "public function showSearchNews() {\n\n $text_search = Input::get('text_search');\n $validator = Validator::make(\n array(\n 'text_search' => $text_search\n ), array(\n 'text_search' => 'required'\n )\n );\n if ($validator->fails()) {\n return Redirect::to('news-api-search')->withErrors($validator);\n } else {\n $url = Config::get('curl.search') . $text_search;\n\n $data = $this->_makeAPIRequest($url, \"GET\");\n\n if ($data['success']) {\n foreach ($data['data'] as $data_value) {\n if ($data_value->success) {\n $news = array(\n \"success\" => true,\n \"news\" => $data_value->data\n );\n return View::make('getShowSearchAPINews', $news);\n } else {\n $news = array(\n \"success\" => false,\n \"message\" => $data_value->message\n );\n return View::make('getShowSearchAPINews', $news);\n }\n }\n } else {\n $news = array(\n \"error\" => $data['message']\n );\n return View::make('getErrorApi', $news);\n }\n }\n }", "title": "" }, { "docid": "663e876e2facf29f6294fa84412e39c2", "score": "0.60235876", "text": "public function index(Request $request)\n {\n\n $count = $request->input('count',5);\n $search = $request->input('search','');\n $data = Announcement::where('announcement_title','like','%'.$search.'%')->paginate($count);\n //加载视图\n return view('admin.announcement.index',['data'=>$data,'request'=>$request->all()]);\n }", "title": "" }, { "docid": "ba09c7032d6669c68fbb83b017d2e2cd", "score": "0.6021566", "text": "public function searchAction()\n {\n $module = $this->params('module');\n $page = $this->params('page', 1);\n $title = $this->params('title');\n $code = $this->params('code');\n $category = $this->params('category');\n $categoryTitle = $this->params('categoryTitle');\n $tag = $this->params('tag');\n $favourite = $this->params('favourite');\n $recommended = $this->params('recommended');\n $related = $this->params('related');\n $product = $this->params('product');\n $limit = $this->params('limit');\n $order = $this->params('order');\n\n // Set has search result\n $hasSearchResult = true;\n\n // Clean title\n if (Pi::service('module')->isActive('search') && isset($title) && !empty($title)) {\n $title = Pi::api('api', 'search')->parseQuery($title);\n } elseif (isset($title) && !empty($title)) {\n $title = _strip($title);\n } else {\n $title = '';\n }\n\n // Clean category Title\n if (Pi::service('module')->isActive('search') && isset($categoryTitle) && !empty($categoryTitle)) {\n $categoryTitle = Pi::api('api', 'search')->parseQuery($categoryTitle);\n } elseif (isset($categoryTitle) && !empty($categoryTitle)) {\n $categoryTitle = _strip($categoryTitle);\n } else {\n $categoryTitle = '';\n }\n\n // Clean code\n if (isset($code) && !empty($code)) {\n $filter = new Filter\\HeadTitle;\n $code = $filter($code);\n } else {\n $code = '';\n }\n\n // Clean params\n $paramsClean = [];\n foreach ($_GET as $key => $value) {\n $key = _strip($key);\n $value = _strip($value);\n $paramsClean[$key] = $value;\n }\n\n // Get config\n $config = Pi::service('registry')->config->read($module);\n\n // Set empty result\n $result = [\n 'products' => [],\n 'categories' => [],\n 'filterList' => [],\n 'paginator' => [],\n 'condition' => [],\n 'price' => [],\n ];\n\n // Set where link\n $whereLink = ['status' => 1];\n if (!empty($recommended) && $recommended == 1) {\n $whereLink['recommended'] = 1;\n }\n if (!empty($code)) {\n $whereLink['code LIKE ?'] = '%' . $code . '%';\n }\n\n // Set page title\n $pageTitle = __('List of products');\n\n // Set order\n switch ($order) {\n case 'title':\n $order = ['title DESC', 'id DESC'];\n break;\n\n case 'titleASC':\n $order = ['title ASC', 'id ASC'];\n break;\n\n case 'hits':\n $order = ['hits DESC', 'id DESC'];\n break;\n\n case 'hitsASC':\n $order = ['hits ASC', 'id ASC'];\n break;\n\n case 'create':\n $order = ['time_create DESC', 'id DESC'];\n break;\n\n case 'createASC':\n $order = ['time_create ASC', 'id ASC'];\n break;\n\n case 'update':\n $order = ['time_update DESC', 'id DESC'];\n break;\n\n case 'updateASC':\n $order = ['time_update ASC', 'id ASC'];\n break;\n\n case 'recommended':\n $order = ['recommended DESC', 'time_create DESC', 'id DESC'];\n break;\n\n case 'price':\n $order = ['price DESC', 'id DESC'];\n break;\n\n case 'priceASC':\n $order = ['price ASC', 'id ASC'];\n break;\n\n case 'stock':\n $order = ['stock DESC', 'id DESC'];\n break;\n\n case 'stockASC':\n $order = ['stock ASC', 'id ASC'];\n break;\n\n case 'sold':\n $order = ['sold DESC', 'id DESC'];\n break;\n\n default:\n $order = ['time_create DESC', 'id DESC'];\n break;\n }\n\n // Get related\n if (!empty($related) && $related == 1 && !empty($product) && intval($product) > 0) {\n $productSingle = Pi::api('product', 'shop')->getProductLight(intval($product));\n $category = $productSingle['category_main'];\n }\n\n // Get category information from model\n if (!empty($category)) {\n // Get category\n if (is_numeric($category) && intval($category) > 0) {\n $category = Pi::api('category', 'shop')->getCategory(intval($category));\n } else {\n $category = Pi::api('category', 'shop')->getCategory($category, 'slug');\n }\n // Check category\n if (!$category || $category['status'] != 1) {\n return $result;\n }\n // category list\n $categories = Pi::api('category', 'shop')->categoryList($category['id']);\n // Get id list\n $categoryIDList = [];\n $categoryIDList[] = $category['id'];\n foreach ($categories as $singleCategory) {\n $categoryIDList[] = $singleCategory['id'];\n }\n // Set page title\n $pageTitle = sprintf(__('List of products on %s category'), $category['title']);\n }\n\n // Get tag list\n if (!empty($tag)) {\n $productIDTag = [];\n // Check favourite\n if (!Pi::service('module')->isActive('tag')) {\n return $result;\n }\n // Get id from tag module\n $tagList = Pi::service('tag')->getList($tag, $module);\n foreach ($tagList as $tagSingle) {\n $productIDTag[] = $tagSingle['item'];\n }\n // Set header and title\n $pageTitle = sprintf(__('All products from %s'), $tag);\n }\n\n // Get favourite list\n if (!empty($favourite) && $favourite == 1) {\n // Check favourite\n if (!Pi::service('module')->isActive('favourite')) {\n return $result;\n }\n // Get uid\n $uid = Pi::user()->getId();\n // Check user\n if (!$uid) {\n return $result;\n }\n // Get id from favourite module\n $productIDFavourite = Pi::api('favourite', 'favourite')->userFavourite($uid, $module);\n // Set page title\n $pageTitle = ('All favourite products by you');\n }\n\n // Get search form\n $filterList = Pi::api('attribute', 'shop')->filterList();\n $categoryList = Pi::registry('categoryList', 'shop')->read();\n\n // Set product ID list\n $checkTitle = false;\n $checkAttribute = false;\n $productIDList = [\n 'title' => [],\n 'attribute' => [],\n ];\n\n // Check title from product table\n if (isset($title) && !empty($title)) {\n $checkTitle = true;\n $titles = is_array($title) ? $title : [$title];\n $columns = ['id'];\n $select = $this->getModel('product')->select()->columns($columns)->where(\n function ($where) use ($titles, $recommended, $code) {\n $whereMain = clone $where;\n $whereTitleKey = clone $where;\n $whereSubTitleKey = clone $where;\n\n // Set where Main\n $whereMain->equalTo('status', 1);\n if (!empty($recommended) && $recommended == 1) {\n $whereMain->equalTo('recommended', 1);\n }\n if (!empty($code)) {\n $whereMain->like('code', '%' . $code . '%');\n }\n\n // Set where title\n foreach ($titles as $term) {\n $whereTitleKey->like('title', '%' . $term . '%')->and;\n }\n\n // Set where subtitle\n foreach ($titles as $term) {\n $whereSubTitleKey->like('subtitle', '%' . $term . '%')->and;\n }\n\n $where->andPredicate($whereMain)->andPredicate($whereTitleKey)->orPredicate($whereSubTitleKey);\n }\n )->order($order);\n $rowset = $this->getModel('product')->selectWith($select);\n foreach ($rowset as $row) {\n $productIDList['title'][$row->id] = $row->id;\n }\n }\n\n // Check attribute\n if (!empty($paramsClean)) {\n // Make attribute list\n $attributeList = [];\n foreach ($filterList as $filterSingle) {\n if (isset($paramsClean[$filterSingle['name']]) && !empty($paramsClean[$filterSingle['name']])) {\n $attributeList[$filterSingle['name']] = [\n 'field' => $filterSingle['id'],\n 'data' => $paramsClean[$filterSingle['name']],\n ];\n }\n }\n // Search on attribute\n if (!empty($attributeList)) {\n $checkAttribute = true;\n $column = ['product'];\n foreach ($attributeList as $attributeSingle) {\n $where = [\n 'field' => $attributeSingle['field'],\n 'data' => $attributeSingle['data'],\n ];\n $select = $this->getModel('field_data')->select()->where($where)->columns($column);\n $rowset = $this->getModel('field_data')->selectWith($select);\n foreach ($rowset as $row) {\n $productIDList['attribute'][$row->product] = $row->product;\n }\n }\n }\n }\n\n // Set info\n $product = [];\n $count = 0;\n\n $columns = ['product' => new Expression('DISTINCT product')];\n $limit = (intval($limit) > 0) ? intval($limit) : intval($config['view_perpage']);\n $offset = (int)($page - 1) * $limit;\n\n // Set category on where link\n if (isset($categoryIDList) && !empty($categoryIDList)) {\n $whereLink['category'] = $categoryIDList;\n }\n\n // Set product on where link from title and attribute\n if ($checkTitle && $checkAttribute) {\n if (!empty($productIDList['title']) && !empty($productIDList['attribute'])) {\n $whereLink['product'] = array_intersect($productIDList['title'], $productIDList['attribute']);\n } else {\n $hasSearchResult = false;\n }\n } elseif ($checkTitle) {\n if (!empty($productIDList['title'])) {\n $whereLink['product'] = $productIDList['title'];\n } else {\n $hasSearchResult = false;\n }\n } elseif ($checkAttribute) {\n if (!empty($productIDList['attribute'])) {\n $whereLink['product'] = $productIDList['attribute'];\n } else {\n $hasSearchResult = false;\n }\n }\n\n // Set favourite products on where link\n if (!empty($favourite) && $favourite == 1 && isset($productIDFavourite)) {\n if (isset($whereLink['product']) && !empty($whereLink['product'])) {\n $whereLink['product'] = array_intersect($productIDFavourite, $whereLink['product']);\n } elseif (!isset($whereLink['product']) || empty($whereLink['product'])) {\n $whereLink['product'] = $productIDFavourite;\n } else {\n $hasSearchResult = false;\n }\n }\n\n // Set tag products on where link\n if (!empty($tag) && isset($productIDTag)) {\n if (isset($whereLink['product']) && !empty($whereLink['product'])) {\n $whereLink['product'] = array_intersect($productIDTag, $whereLink['product']);\n } elseif (!isset($whereLink['product']) || empty($whereLink['product'])) {\n $whereLink['product'] = $productIDTag;\n } else {\n $hasSearchResult = false;\n }\n }\n\n // Get max price\n if ($config['view_price_filter']) {\n $columnsPrice = ['id', 'price'];\n $limitPrice = 1;\n $maxPrice = 1000;\n $minPrice = 0;\n\n $orderPrice = ['price DESC', 'id DESC'];\n $selectPrice = $this->getModel('link')->select()->where($whereLink)->columns($columnsPrice)->order($orderPrice)->limit($limitPrice);\n $rowPrice = $this->getModel('link')->selectWith($selectPrice)->current();\n if ($rowPrice) {\n $rowPrice = $rowPrice->toArray();\n $maxPrice = $rowPrice['price'];\n }\n\n $orderPrice = ['price ASC', 'id ASC'];\n $selectPrice = $this->getModel('link')->select()->where($whereLink)->columns($columnsPrice)->order($orderPrice)->limit($limitPrice);\n $rowPrice = $this->getModel('link')->selectWith($selectPrice)->current();\n if ($rowPrice) {\n $rowPrice = $rowPrice->toArray();\n $minPrice = $rowPrice['price'];\n }\n\n // Get select min price\n $minSelect = $minPrice;\n if (isset($paramsClean['minPrice']) && !empty($paramsClean['minPrice'])) {\n $minSelect = $paramsClean['minPrice'];\n if ($minSelect > $minPrice) {\n $whereLink['price >= ?'] = $minSelect;\n }\n }\n\n // Get select max price\n $maxSelect = $maxPrice;\n if (isset($paramsClean['maxPrice']) && !empty($paramsClean['maxPrice'])) {\n $maxSelect = $paramsClean['maxPrice'];\n if ($maxSelect < $maxPrice) {\n $whereLink['price <= ?'] = $maxSelect;\n }\n }\n } else {\n $minPrice = 0;\n $maxPrice = 0;\n $minSelect = 0;\n $maxSelect = 0;\n }\n\n // Check has Search Result\n if ($hasSearchResult) {\n // Get info from link table\n $select = $this->getModel('link')->select()->where($whereLink)->columns($columns)->order($order)->offset($offset)->limit($limit);\n $rowset = $this->getModel('link')->selectWith($select)->toArray();\n foreach ($rowset as $id) {\n $productIDSelect[] = $id['product'];\n }\n\n // Get list of product\n if (!empty($productIDSelect)) {\n $where = ['status' => 1, 'id' => $productIDSelect];\n $select = $this->getModel('product')->select()->where($where)->order($order);\n $rowset = $this->getModel('product')->selectWith($select);\n foreach ($rowset as $row) {\n $product[] = Pi::api('product', 'shop')->canonizeProductFilter($row, $categoryList, $filterList);\n }\n }\n\n // Get count\n $columnsCount = ['count' => new Expression('count(DISTINCT `product`)')];\n $select = $this->getModel('link')->select()->where($whereLink)->columns($columnsCount);\n $count = $this->getModel('link')->selectWith($select)->current()->count;\n }\n\n // Search on category\n $categoryList = [];\n if (!empty($categoryTitle)) {\n $whereCategory = ['status' => 1];\n $whereCategory['title LIKE ?'] = '%' . $categoryTitle . '%';\n $orderCategory = ['title DESC', 'id DESC'];\n $select = $this->getModel('category')->select()->where($whereCategory)->order($orderCategory)->offset($offset)->limit(\n $limit\n );\n $rowset = $this->getModel('category')->selectWith($select);\n foreach ($rowset as $row) {\n $categoryList[] = Pi::api('category', 'shop')->canonizeCategory($row);\n }\n }\n\n // Set column class\n switch ($config['view_column']) {\n case 1:\n $columnSize = 'col-md-12 col-12';\n break;\n\n case 2:\n $columnSize = 'col-md-6 col-12';\n break;\n\n case 3:\n $columnSize = 'col-md-4 col-12';\n break;\n\n case 4:\n $columnSize = 'col-md-3 col-12';\n break;\n\n case 6:\n $columnSize = 'col-md-2 col-12';\n break;\n\n default:\n $columnSize = 'col-md-3 col-12';\n break;\n }\n\n // Set result\n $result = [\n 'products' => $product,\n 'categories' => $categoryList,\n 'filterList' => $filterList,\n 'paginator' => [\n 'count' => $count,\n 'limit' => $limit,\n 'page' => $page,\n ],\n 'condition' => [\n 'title' => $pageTitle,\n 'urlCompare' => Pi::url($this->url('', ['controller' => 'compare'])),\n 'priceFilter' => $config['view_price_filter'],\n 'addToCart' => $config['view_add_to_cart'],\n 'columnSize' => $columnSize,\n ],\n 'price' => [\n 'minValue' => intval($minPrice),\n 'maxValue' => intval($maxPrice),\n 'minSelect' => intval($minSelect),\n 'maxSelect' => intval($maxSelect),\n 'step' => intval(($maxPrice - $minPrice) / 10),\n 'rightToLeft' => false,\n ],\n ];\n\n return $result;\n }", "title": "" }, { "docid": "aa36e2199eb3e59a9c403675dd62be9a", "score": "0.60121965", "text": "public function search()\n {\n\n $apiKey = \"4a8beb6a33b845edb52173f9f5764b62\";\n $adapter = new FurryBear\\Http\\Adapter\\Curl();\n $provider = new FurryBear\\Provider\\Source\\SunlightOpenStates($adapter, $apiKey);\n $output = new FurryBear\\Output\\Strategy\\JsonToArray();\n\n $fb = new FurryBear\\FurryBear();\n $fb->registerProvider($provider)->registerOutput($output);\n\n $params = array('state' => 'mo', 'chamber' => 'upper');\n $legislator = $fb->legislators->get($params);\n $data['legs'] = $legislator;\n\n $this->load->view(\"members/member_display\", $data);\n\n }", "title": "" }, { "docid": "5fc856de921c49d40ac77f33a81e1f75", "score": "0.6010706", "text": "public function search($search, $per_page);", "title": "" }, { "docid": "c4e19fee019c76507e459f86c08701b4", "score": "0.6009602", "text": "function action_search($query) {\n // the query is interpreted in JS\n $this->response->render('streetview', null, false);\n }", "title": "" }, { "docid": "24ab93f32013080cdf3f79aeb920bcc3", "score": "0.60049504", "text": "public function searchBeenews(Request $request)\n {\n $search = $request->search;\n $newsItems = News::where('status','LIKE', '%'.$search.'%')\n ->orWhere('author','LIKE', '%'.$search.'%')\n ->orWhere('title','LIKE', '%'.$search.'%')\n ->orWhere('description','LIKE', '%'.$search.'%')\n ->orWhere('source','LIKE', '%'.$search.'%')\n ->orWhere('country','LIKE', '%'.$search.'%')\n ->get();\n \n return view('beenews', compact('newsItems'));\n }", "title": "" }, { "docid": "cd187e03b812530f7405e45562c0624a", "score": "0.6003669", "text": "public function searchNews() {\n\t\t$this->moduleOff();\n\n\t\tif (!isset($this->params['searchText'])) {\n\t\t\tDooUriRouter::redirect(Doo::conf()->APP_URL);\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t$game = $this->getGame();\n\t\t$search = new Search();\n\t\t$list = array();\n\t\t$list['CategoryType'] = GAME_NEWS;\n\t\t$list['infoBox'] = MainHelper::loadInfoBox('Games', 'index', true);\n\t\t$p = User::getUser();\n\t\t$list['game'] = $game;\n\t\t$list['isAdmin'] = $p ? $p->canAccess('Edit News') : false;;\n\t\t$list['searchText'] = urldecode($this->params['searchText']);\n\t\t$newsTotal = $search->getSearchTotal(urldecode($this->params['searchText']), SEARCH_NEWS, SEARCH_GAME, $game->ID_GAME);\n\t\t$pager = $this->appendPagination($list, $game, $newsTotal, $game->GAME_URL . '/news/search/' . urlencode($list['searchText']) . '/page');\n\t\t$list['newsList'] = $search->getSearch(urldecode($this->params['searchText']), SEARCH_NEWS, $pager->limit, SEARCH_GAME, $game->ID_GAME);\n\t\t$list['searchTotal'] = $newsTotal;\n\n\t\t$data['title'] = $this->__('Search results');\n\t\t$data['body_class'] = 'search_games';\n\t\t$data['selected_menu'] = 'games';\n\t\t$data['left'] = MainHelper::gamesLeftSide($game);\n\t\t$data['right'] = PlayerHelper::playerRightSide();\n\t\t$data['content'] = $this->renderBlock('games/newsView', $list);\n\n\t\t$data['footer'] = MainHelper::bottomMenu();\n\t\t$data['header'] = MainHelper::topMenu();\n\t\t$this->render3Cols($data);\n\t}", "title": "" }, { "docid": "c0fa9cb8a42600cec3fa7f7ccba615de", "score": "0.6003545", "text": "protected function applySearch() {\n\n }", "title": "" }, { "docid": "9c725afb2c02990934f7d43003d799ff", "score": "0.599443", "text": "private function search(){\n\t $this->feed_url = $this->feed_bin['twitter'];\n\t $this->query = 'search.json';\n\t $this->query .= '?q=from:'.$this->handle;\n\n\t $this->get();\n\t}", "title": "" }, { "docid": "49504db151a32a0ce308a115fbabcef8", "score": "0.59877396", "text": "public function searchAction() {\n $auth = Zend_Auth::getInstance();\n if (!($auth->getIdentity()->account_type_id < 3)) {\n $this->_helper->redirector('index', 'index');\n }\n if ($this->getRequest()->isPost()) {\n $search = $this->getRequest()->getPost('id');\n $request = new Application_Model_DbTable_Request();\n $this->view->request = $request->getRequest($search);\n }\n }", "title": "" }, { "docid": "4acbfbd1743ce6be4f6fce6709cb9d9c", "score": "0.5979269", "text": "function search($entity_name,$column,$search_phrase=''){\n if(isset($_GET['clean-url'][\"{$entity_name}-search-phrase\"])){\n $search_phrase = sanitize($_GET['clean-url'][\"{$entity_name}-name\"]);\n }\n if(isset($_GET['clean-url'][\"{$entity_name}_id\"])){\n $location_id = sanitize($_GET['clean-url'][\"{$entity_name}-id\"]);\n }\n\n if(isset($_POST[\"{$entity_name}-search-phrase\"])){\n $search_phrase = sanitize($_POST[\"{$entity_name}-search-phrase\"]);\n }\n \n \n \n echo '\n <div id=\"search-'.$entity_name.'\" class=\"row d-flex flex-row-reverse m3 px-5 pt-3 bg-primary\">\n <form method=\"post\" class=\"flex-item\" action=\"'.BASE_PATH.'index.php/'.$entity_name.'/action/search/'.$entity_name.'/'.$column.'\">\n <div class=\"input-group \">\n <input type=\"text\" name=\"'.$entity_name.'-search-phrase\" class=\"form-control\" placeholder=\"Find '.$entity_name.'\">\n <span class=\"input-group-append\">\n <input type=\"submit\" name=\"search-'.$entity_name.'\" value=\"Search\" class=\"btn btn-info\" id=\"\" />\n </span>\n </div>\n </form>\n </div>';\n \n if(!empty($search_phrase)){\n $_SESSION[\"{$entity_name}s-list-info\"] = get_entities($entity_name,$column,$search_phrase);\n if(!is_json_request()){\n echo '<div class=\"row\">\n <div class=\"col-md-8 col-xs-12\"> \n <ul class=\"list-group\">';\n foreach($view_info['result'] as $result){\n $link_text = parse_text_for_output($result['description']);\n $endpoint = str_ireplace(' ','+',$result['id']);\n echo '<li class=\"list-group-item\">\n <a href=\"'.BASE_PATH.'index.php/room/action/show/room/'.$endpoint.'\">'.$link_text.'</a> ';\n show_timeago($result['timestamp']);\n echo '</li>';\n \n }\n echo '</ul>\n \n </div>';\n }\n }\n \n}", "title": "" }, { "docid": "0b22fb686ce62b14b687c38e99bc0cbd", "score": "0.597824", "text": "public function view()\n {\n $resetSearch = false;\n if ($this->request->isPost()) {\n if (!$this->token->validate('myboats-boats-search')) {\n $this->error->add($this->token->getErrorMessage());\n } else {\n $resetSearch = true;\n }\n }\n $searchController = $this->app->make(SearchController::class);\n $searchController->search($resetSearch);\n $result = $searchController->getSearchResultObject();\n $this->set('result', $result);\n $allowedPaginationSizes = array_combine($searchController->getAllowedPaginationSizes(), $searchController->getAllowedPaginationSizes());\n $params = $searchController->getStickyRequest()->getSearchRequest();\n $this->set('name', isset($params['name']) ? $params['name'] : '');\n $this->set('enabled', isset($params['enabled']) ? $params['enabled'] : '');\n if (isset($params['paginationSize']) && isset($allowedPaginationSizes[$params['paginationSize']])) {\n $paginationSize = (int) $params['paginationSize'];\n } else {\n $paginationSize = $searchController->getDefaultPaginationSize();\n }\n $this->set('paginationSize', $paginationSize);\n $this->set('allowedPaginationSizes', $allowedPaginationSizes);\n }", "title": "" }, { "docid": "f2f917361a1be30a1264ea6c14999ce4", "score": "0.59770244", "text": "public function searchAction(){\n // Type of company\n $companyType = $this->request->getQuery('type', 'string');\n // Pass the general parameters to the view.\n $this->view->setVar('company_type', $companyType);\n $this->view->setVar('title', ucfirst($companyType) . 's');\n $this->view->setVar('subtitle', '');\n // @todo::: Define controls.\n $this->view->setVar('show_submit', FALSE);\n //$this->view->setVar('submit_text', 'Submit');\n $this->view->setVar('show_cancel', FALSE);\n //$this->view->setVar('cancel_text', \"Cancel\");\n $this->view->setVar('main_form_id', 'search_company_form');\n $this->view->setVar('exit_to', $this->url->getBaseUri() . 'company/list?type=' . $companyType);\n }", "title": "" }, { "docid": "6e0757730da56533ad10978ca64640f1", "score": "0.59755194", "text": "public function search()\n\t{\n\t\t$params = self::_getRequestVars();\t// Read query params wheter post or get\n\t\tif(!empty($params['term']) && !empty($params['submit'])){\t\t// If at least a term is given perform search\n\t\t\t$data = array();\n\t\t\t// Make the call for content\n\t\t\t$results = $this->search_model->getContent($params);\n\t\t\t// Verify we got results and parse\n\t\t\tif(!empty($results['items']) && count($results['items']) > 0){\n\t\t\t\t// Store results for access in single view. Bomb if can't store.\n\t\t\t\tif($this->result_model->setResultList($results['items']) === false) {\n\t\t\t\t\t$data = self::_requestFail('Error storing search results for display.');\n\t\t\t\t} elseif($this->sources_model->setSourceList($results['sources']) === false) {\n\t\t\t\t\t$data = self::_requestFail('Error storing search results for display.');\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t// Search results are saved in the session.\n\t\t\t\t\t// Now redirect back to home page without search flag\n\t\t\t\t\t// and let it display stored session results\n\t\t\t\t\t$refreshParams = str_replace('&search=search', '', $_SERVER['QUERY_STRING']);\n\t\t\t\t\tredirect(\"search?{$refreshParams}\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No results returned\n\t\t\t\t// @todo Should always get results\n\t\t\t\t$data = self::_requestFail('No results found.');\n\t\t\t}\n\n\t\t} elseif(!empty($params['term']) && $this->session->userdata('resultList')) {\n\t\t\t// If here just display results stored in the session var.\n\t\t\t// @todo Will kill once cache solution is in place\n\t\t\t\n\t\t\t$data['status'] = 'ok';\n\t\t\t$data['items'] = $this->result_model->getResultList();\n\t\t\t\n\t\t} else {\n\t\t\t// If here no search term given.\n\t\t\t// @todo Same as above should always get results\n\t\t\t$data = self::_requestFail('Please enter a search term.');\n\t\t}\t\t\n\t\t// Load views and pass data\n\t\t$this->template->javascript->add(array('scripts/jquery-1.7.2.min.js', 'scripts/masonry.min.js', 'scripts/bootstrap.js', 'scripts/notifier-index.js' , 'scripts/orangebox.min.js'));\n // load view\n $this->template->title->set('Base Page');\n \t$this->template->content->view('new_index_view', $data);\n\t\t// publish the template\n $this->template->set_template('template_search');\n $this->template->publish();\n\t}", "title": "" }, { "docid": "ce258b711c91a600c4689def8ab5064f", "score": "0.59701616", "text": "function searchadminarticle(){\t//die('here');\n\t\t\t$this->layout = false;\n\t\t\t//$id=$this->Session->read('User.id');\n\t\t\t$q=$_REQUEST['searchword'];\n\t\t\t//pr($q);die;\n\t\t\t$search=$this->Article->query(\"select id,user_id,amount,title,category,summary,description,image,totaldonation from articles where(title like '%$q%') order by id LIMIT 3\");\n\t\t//pr($search); die('here');\n\t\t$this->set('search',$search);\n\t\t$this->set('q',$q);\n\t\t$html=$this->render();\n\t\techo $html;\n\t\tdie;\n\t}", "title": "" }, { "docid": "935b9ad7b91dfb402aaa58daea6128f1", "score": "0.59690565", "text": "private function search()\n {\n //Load and store parameters\n $criteria = $this->Request->get('criteria');\n $criteria = $criteria ? json_decode($criteria, true) : array();\n $timestamp = $this->Request->get('timestamp');\n $this->responseSetParam('criteria', $criteria);\n $this->responseSetParam('timestamp', $timestamp);\n\n //Search for matching recipes\n $RecipesLib = new RecipesLib($this->DB, $this->User);\n $this->responseSetContent($RecipesLib->search($criteria));\n $this->responseSetParam('overflow', $RecipesLib->searchOverflow());\n }", "title": "" }, { "docid": "5b350772f65f3a58bde7e60431bbf4ab", "score": "0.596296", "text": "public function index(){\n // return article::all(); //methode appelé article\n // $articles= article::all(); //stocke le resultat du modèle dans une variable\n // $articles= article::paginate(); //permet la pagnation\n $search=request('search');\n\n // $articles= article::where ('name','like',\"%$search%\")\n // ->orwhere ('body','like',\"%$search%\")\n // ->paginate(5); \n\n $articles= article::recherche($search)->paginate(5); //une autre façon de programmer en utilisant le scope \n //permet la pagnation\n\n return view('articles.index',['articles'=>$articles]);//spécifier la page view et le paramètre doit être envoyé via un tableau\n }", "title": "" }, { "docid": "b0f4fd5339dd89c50936fabaf9c797ce", "score": "0.5960737", "text": "public function search_result(){\r\n\t\t$this->_main_bdc_search();\r\n\t}", "title": "" }, { "docid": "371289b1dd5954aa4b0510cd49cf3dc9", "score": "0.59554905", "text": "public function indexAction() {\n $this->view->search = $this->_search;\n }", "title": "" }, { "docid": "76a412a282a95a8e42876a1ea93597d6", "score": "0.59529173", "text": "public function advanceSearch(Request $request)\n {\n $search_title = $request->title;\n $search_publisher = $request->publisher;\n $search_category = $request->category;\n\n if (empty($search_title) && empty($search_publisher) && empty($search_category)) {\n return $this->home_index();\n }\n\n if (empty($search_title) && empty($search_category)) {\n $books = Book::orderby('id', 'desc')->where('is_approved', 1)\n ->where('publisher_id', $search_publisher)\n ->paginate(10);\n } elseif (empty($search_title) && empty($search_publisher)) {\n $books = Book::orderby('id', 'desc')->where('is_approved', 1)\n ->where('category_id', $search_category)\n ->paginate(10);\n } else {\n $books = Book::orderby('id', 'desc')->where('is_approved', 1)->where('title', 'like', '%' . $search_title . '%')\n ->orwhere('description', 'like', '%' . $search_title . '%')\n ->orwhere('category_id', $search_category)\n ->orwhere('publisher_id', $search_publisher)\n ->paginate(10);\n }\n\n return view('frontend.pages.books.index', compact('books', 'search_title'));\n }", "title": "" }, { "docid": "c96858e307228977466f8ce32d32c0eb", "score": "0.5947238", "text": "public function search( $params=NULL ) {\n $page = $this->getPage();\n c::set( 'cache', FALSE);\n\n $query = Request::get( 'q' );\n $search = new Search( array( 'ignore'=>c::get('search.ignore', array('home','search','flush','crawl'))), $query);\n\n $page->title = 'Search results';\n $page->set( 'search', $search->searchPages());\n }", "title": "" }, { "docid": "9c38ba4ce2dff1944e1b891654197b01", "score": "0.59294915", "text": "public function index()\n {\n $user_id = Auth::id();\n $searchQuery = isset($_GET['search'])?trim($_GET['search']):\"\";\n $where = ['status'=>1,'user_id'=>$user_id];\n \n if(!empty($searchQuery)){\n $where = [\n ['test_title', 'LIKE', \"%$searchQuery%\"],\n ['status', '=', 1],\n ['user_id', '=', $user_id],\n ]; \n }\n $user_id = Auth::id();\n $list = JobInterviews::where($where)->paginate(10);\n return view('hrmodule.jobinterview.list')->with([\n 'listData' => $list,\n 'pageTitle' => \"Job Interviews\",\n ]);\n\n }", "title": "" }, { "docid": "45802c7d84fe9024d25b13d73faf6ea6", "score": "0.5923681", "text": "public function searchAction() {\n\n $count = 0;\n $search = $this->getRequest()->getParam('query');\n //$this->view->session->storage->search = $search;\n //echo \"<pre>\"; print_r($this->view->session->storage->search); echo \"</pre>\"; die('123'); \n $objUserModel = Application_Model_Users::getinstance();\n $objCategoryModel = Application_Model_Category::getinstance();\n $objClassTag = Application_Model_TeachingClasses::getinstance();\n\n // Search using firstname or last name \n if ($count == 0) {\n\n $Result = $objUserModel->searchUsersResult(trim(preg_replace('!\\s+!', ' ', $search))); //getting user_id,name,video url, video thumb url,video title and profile pik\n// echo '<pre>';print_r($Result); die;\n if (isset($Result)) {\n $this->view->detail = $Result;\n $count = $count + 1;\n }\n }\n\n // Search using category \n// if ($count == 0) {\n//\n// $Result = $objCategoryModel->getCategoryDetail($search);\n//\n// if (isset($Result)) {\n// $this->view->detail = $Result;\n// $count = $count + 1;\n// }\n// }\n//\n// // Search using classtags \n// if ($count == 0) {\n//\n// $Result = $objClassTag->getClassTags($search);\n//// echo \"<pre>\"; print_r($Result); echo \"</pre>\"; die('123');\n// if (isset($Result)) {\n// $this->view->detail = $Result;\n// $count = $count + 1;\n// }\n// }\n // when no match found\n if ($count == 0) {\n\n $this->_redirect('/noresult');\n }\n }", "title": "" }, { "docid": "fb68834e2b0ae1159d4bfab02c0ca59a", "score": "0.59156364", "text": "function searchAction(){\n \t\n \t\tif($this->_hasParam(\"type\")){\n \t\t\t$type = $this->getRequest()->getParam(\"type\");\n \t\t\n\t \t$form = new Form_Search(array('action' => $this->view->url(array('action' => 'listecomplete')),'method' => 'POST'), $type, $this->_request->getBaseUrl());\n\t\t\t$this->view->form = $form;\n\t \t\t \t\n\t \t\tif($this->_hasParam('data')){\n\t \t$search = $this->_request->getParam('data');\n\t \n\t \tif($this->_hasParam('layout')){\n\t \t\t$this->_helper->layout->disableLayout();\n\t \t\t$this->view->search = true;\n\t \t}else{\n\t\t \t$form->populate(array(\"search\"=>$search));\n\t \t}\t \t\n\t }else{\n\t\t $search = null;\n\t }\n\t\t\t$resume = new Resume();\n\t \t\t$this->view->resume = $resume->getAllAbstract(addslashes($search), $type);\n\t \t\t\n\t \t\t$history = new Zend_Session_Namespace('ariane');\n\t \t\t//Fil d'ariane\n\t \t\tif($type == \"author\"){\n\t\t \t\t$this->view->ariane = \"&nbsp;&raquo;&nbsp;\".$this->view->translate('Recherche par auteur');\n\t\t \t\t$history->searchType = \"<a href='\".$this->_request->getBaseUrl().\"/index/search/type/author/data/\".$search.\"'>\".$this->view->translate('Recherche par auteur').\"</a>\";\n\t \t\t}elseif($type == \"title\"){\n\t\t \t\t$this->view->ariane = \"&nbsp;&raquo;&nbsp;\".$this->view->translate('Recherche par titre');\n\t\t \t\t$history->searchType = \"<a href='\".$this->_request->getBaseUrl().\"/index/search/type/title/data/\".$search.\"'>\".$this->view->translate('Recherche par titre').\"</a>\";\n\t \t\t}\n\t \t\t$note = new Note();\n\t\t\t$this->view->note = $note->getNote();\n\t\t\t\n\t\t\t$this->render();\n\t\t}\n }", "title": "" }, { "docid": "978fc3a381f5ca21b301259827bc43b2", "score": "0.5914641", "text": "public function actionSearch()\n\t{\n\t\t$this->model = new Art();\t\t\n\t\t$this->model->unsetAttributes();\n\t\tif (isset($_GET['Art'])) {\n\t\t\t$this->model->attributes = $_GET['Art'];\n\t\t}\t\n\t\tif (isset($_GET['Art']['searchOrder'])) {\n\t\t\t$this->model->searchOrder = $_GET['Art']['searchOrder'];\n\t\t}\n if ($this->model->searchId) {\n\t\t\t$model = $this->loadModel($this->model->searchId, 'Art');\n if ($model) {\n\t\t\t\t$type = $model->getStoredResourceType();\n $this->redirect($this->createUrl($type.'/view', array('id' => $this->model->searchId)));\n }\n Yii::app()->user->setFlash('error', Yii::t('app', 'The id was not found'));\n $this->redirect($this->createUrl('site/index'));\n }\n\t\t/** the layout for the gird */\n $layout = isset($_GET['layout']) ? $_GET['layout'] : '';\n\t\tif (!in_array($layout, array('large', 'tiles', 'grid'))) {\n\t\t\t$layout = 'tiles';\n\t\t}\n\t\t$itemsPerPage = array('large' => 6, 'tiles' => 15, 'grid' => 30);\n\t\t$this->model->pageSize = $itemsPerPage[$layout];\n\t\t\n\t\t/**\n\t\t * try to find any Agent with the information given\n\t\t */\n\t//\t$this->model->agent = 'anne';\n\t\tif ($this->model->agent) {\n\t\t\t$agents = Agent::model()->findAll(array(\n\t\t\t\t\t\t\t'condition' => 'name LIKE :name', \n\t\t\t\t\t\t\t'params' => array(':name' => '%'.$this->model->agent.'%'),\n\t\t\t\t\t\t\t'order' => 'name',\n\t\t\t\t\t));\t\t\t\n\t\t} else {\n\t\t\t$agents = null;\n\t\t}\n\t\t$this->render('search' , array(\n\t\t\t\t'layout' => $layout,\n\t\t\t\t'agents' => $agents,\n\t\t));\n\t}", "title": "" }, { "docid": "dac8df92946af93ec2ad5ce048c0fde5", "score": "0.5913913", "text": "public function searchNews(Request $request)\n {\n $request->session()->put('keyword', $request->input('search'));\n $newsItems = Http::get('http://api.mediastack.com/v1/news', [\n 'access_key' => '12f2c17d23096ae1475353ae7ee0ed5b',\n 'languages' =>'en',\n 'countries' => auth()->user()->country,\n 'keywords' => $request->search,\n ]);\n \n return view('search', compact('newsItems'));\n }", "title": "" }, { "docid": "7f3380170f5e4067fe5c7d66fc504c3b", "score": "0.5913866", "text": "public function actionSearch()\n {\n $breadcrumbs = [\n ['Records', URLHelper::url('record'), true],\n ['Advanced Search', null, true]\n ];\n View::render('record.search', 'Advanced Search', $breadcrumbs);\n }", "title": "" }, { "docid": "a81e7541229f09891769e1ea3cd4efc1", "score": "0.58982503", "text": "function allocineSearch($title)\n{\n\n\t\n return search($title);\n}", "title": "" }, { "docid": "48995d7b68751a4f5a2d4d72440a2163", "score": "0.5887944", "text": "public function index(Request $request)\n {\n \n\n\n\n $searchByName = trim(request('search'));\n $searchByEmail = trim(request('search_byemail'));\n $searchByPhone = trim(request('search_byphone'));\n $searchByAgent = request('search_agent');\n// dd($searchByAgent);\n $agents = Agent::all();\n $agent_id = $request->agent;\n\n\n $show_ambassador='';\n $ambassadors = DB::table('ambassadors')\n ->join('cities', 'ambassadors.city', '=', 'cities.id')\n ->join('agents', 'ambassadors.agent_id', '=', 'agents.id')\n ->select('agents.name as agent_name', 'ambassadors.birth_date', 'ambassadors.first_name',\n 'ambassadors.second_name', 'ambassadors.email', 'ambassadors.phone',\n 'ambassadors.id as ambassador_id',\n 'cities.name as city_name', 'ambassadors.agent_id as agent_id')->orderBy('ambassador_id','desc');\n\n\n\n if(request()->has('search') && request()->get('search')!= '' ){\n $ambassadors->where(function ($q) use ($searchByName) {\n $q->where('ambassadors.first_name','like',\"%\".$searchByName.\"%\")\n ->orWhere('ambassadors.second_name','like',\"%\".$searchByName.\"%\");});\n }\n\n if(request()->has('search_byphone') && request()->get('search_byphone')!= '' ){\n $ambassadors->where(function ($q) use ($searchByPhone) {\n $q->where('ambassadors.phone','like',\"%\".$searchByPhone.\"%\");});\n }\n\n if(request()->has('search_byemail') && request()->get('search_byemail')!= '' ){\n $ambassadors->where(function ($q) use ($searchByEmail) {\n $q->where('ambassadors.email','like',\"%\".$searchByEmail.\"%\");});\n }\n\n if(request()->has('search_agent') && request()->get('search_agent') != '' ){\n $ambassadors->where(function ($q) use ($searchByAgent) {\n $q->where('agents.id',$searchByAgent);});\n }\n // dd($ambassadors->get());\n\n // if($agent_id){\n\n // $ambassadors = $ambassadors->where('ambassadors.agent_id', $agent_id);\n // }\n\n\n $ambassadors = $ambassadors->paginate(10);\n// dd($ambassadors);\n\n return view('admin.ambassadors.index')->with('searchByAgent', $searchByAgent)->with('agents', $agents)->with('show_ambassador',$show_ambassador)->with('ambassadors',$ambassadors)->with('searchByName',$searchByName)->with('searchByEmail',$searchByEmail)->with('searchByPhone',$searchByPhone)->with('agent_id',$agent_id);\n\n\n\n\n\n // }\n\n\n //->with('ambassadors', $ambassadors)\n //->with('agents', $agents);\n // ->with('show_ambassador', $show_ambassador);\n }", "title": "" }, { "docid": "00433833939a69e8640629ebeab2cd40", "score": "0.58865595", "text": "public function basicSearch()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "88e91eb4ecc8861a6ab573c24e58a699", "score": "0.58840764", "text": "public function search(Request $request){\n $search = $request->input('search');\n\n // Search in the title and body columns from the posts table\n $informations = Information::query()\n ->where('Blood_Type', 'LIKE', \"%{$search}%\")\n ->get();\n\n // Return the search view with the resluts compacted\n return view('informations.search', compact('informations'));\n}", "title": "" }, { "docid": "9585d3e537f103eb82a7c131bc9931d7", "score": "0.58824676", "text": "public function search(SearchQuery $searchQuery);", "title": "" }, { "docid": "2987ae8849bbc35fcecf64c90b2e6e61", "score": "0.588159", "text": "public function InitializeSearch($cn) {\r\n //SetDisplayValues($attributes) \r\n\r\n /* Campos de busqueda */\r\n $this->m_obj->GetField(\"mon_code\")->SetDisplayValues(Array(\"Name\"=>\"mon_code\", \"Label\"=>\"Mon. Nro\", \"Type\"=>\"int\", \"IsPK\"=>true, \"IsForDB\"=>true, \"Order\"=>101, \"Presentation\"=>\"INT\", \"IsNullable\"=>false, \"IsVisible\"=>true));\r\n $this->m_obj->GetField(\"cir_code\")->SetDisplayValues(Array(\"Name\"=>\"cir_code\", \"Label\"=>\"Circ. Nro\", \"Type\"=>\"int\", \"IsForDB\"=>true, \"Order\"=>102, \"Presentation\"=>\"CIRCUITOS\", \"IsNullable\"=>false, \"IsVisible\"=>true));\r\n $this->m_obj->GetField(\"use_code_operador\")->SetDisplayValues(Array(\"Name\"=>\"use_code_operador\", \"Label\"=>\"Oper.\", \"Type\"=>\"int\", \"IsForDB\"=>true, \"Order\"=>105, \"Presentation\"=>\"OPERADOR\", \"IsNullable\"=>false, \"IsVisible\"=>true));\r\n $this->m_obj->GetField(\"use_code_supervisor\")->SetDisplayValues(Array(\"Name\"=>\"use_code_supervisor\", \"Label\"=>\"Superv. Asignado\", \"Type\"=>\"int\", \"IsForDB\"=>true, \"Order\"=>106, \"Presentation\"=>\"SUPERVISOR\", \"IsNullable\"=>false, \"IsVisible\"=>true));\r\n $this->m_obj->GetField(\"mon_date\")->SetDisplayValues(Array(\"Name\"=>\"mon_date\", \"Label\"=>\"Fecha\", \"Type\"=>\"datetime\", \"IsForDB\"=>true, \"Order\"=>107, \"Presentation\"=>\"DATERANGE\"));\r\n $this->m_obj->GetField(\"mon_call_date\")->SetDisplayValues(Array(\"Name\"=>\"mon_call_date\", \"Label\"=>\"Fecha LLamada\", \"Type\"=>\"datetime\", \"IsForDB\"=>true, \"Order\"=>113, \"Presentation\"=>\"DATERANGE\", \"IsVisible\"=>true));\r\n $this->m_obj->GetField(\"mon_status\")->SetDisplayValues(Array(\"Name\"=>\"mon_status\", \"Label\"=>\"Estado\", \"Size\"=>20, \"IsForDB\"=>true, \"Order\"=>108, \"Presentation\"=>\"MON_STATUS\", \"IsVisible\"=>true));\r\n $this->m_obj->GetField(\"mon_forzado\")->SetDisplayValues(Array(\"Name\"=>\"mon_forzado\", \"Label\"=>\"Cierre\", \"Size\"=>2, \"IsForDB\"=>true, \"Order\"=>109, \"Presentation\"=>\"SINO\", \"IsVisible\"=>true));\r\n $this->m_obj->GetField(\"cli_call_code\")->SetDisplayValues(Array(\"Name\"=>\"cli_call_code\", \"Label\"=>\"Tipo\", \"Size\"=>200, \"IsForDB\"=>true, \"Order\"=>112, \"Presentation\"=>\"CLI_CALL\", \"IsVisible\"=>true));\r\n $this->m_obj->GetField(\"mon_aprobo\")->SetDisplayValues(Array(\"Name\"=>\"mon_aprobo\", \"Label\"=>\"Aprobado\", \"Size\"=>2, \"IsForDB\"=>true, \"Order\"=>117, \"Presentation\"=>\"SINO\", \"IsVisible\"=>true));\r\n $this->m_obj->GetField(\"mon_perjuicio_cliente\")->SetDisplayValues(Array(\"Name\"=>\"mon_perjuicio_cliente\", \"Label\"=>\"Req. Capacitac.\", \"Size\"=>2, \"IsForDB\"=>true, \"Order\"=>118, \"Presentation\"=>\"SINO\", \"IsVisible\"=>true));\r\n $this->m_obj->GetField(\"mon_date_aprox\")->SetDisplayValues(Array(\"Name\"=>\"mon_date_aprox\", \"Label\"=>\"Fecha Aprox\", \"Type\"=>\"datetime\", \"IsForDB\"=>true, \"Order\"=>122, \"Presentation\"=>\"DATETIME\"));\r\n }", "title": "" }, { "docid": "e2a38029925983f1bc1a3f5c4b3c6285", "score": "0.5875091", "text": "public function searchAction()\n {\n $kosts = $this->modelsManager\n ->createBuilder()\n ->from(Kost::class)\n ->where('nama LIKE :search:', \n [\n 'search' => '%' . $search . '%',\n ]\n )\n ->getQuery()\n ->execute();\n }", "title": "" }, { "docid": "65c14f34b5db28ff41182939fadc4df6", "score": "0.5874044", "text": "public function advertisement()\n {\n $peer_page = 15;\n $search = Input::get('search');\n $type = Input::get('tipo');\n $advertisements = Advertisement::Query();\n $advertisements = $advertisements->where('user_id',Auth::User()->id);\n if ($search <> \"\") {\n $advertisements->orwhereHasMorph('embedded','*', function (Builder $query) use ($search) {\n $query->where('title', 'like', \"%{$search}%\");\n });\n $advertisements->orwhereHasMorph('embedded','*', function (Builder $query) use ($search) {\n $query->where('description', 'like', \"%{$search}%\");\n });\n }\n if($type <> \"\"){\n if($type==1){\n $advertisements->Artist();\n }elseif($type==2){\n $advertisements->Professional();\n }\n\n }\n $advertisements = $advertisements->paginate($peer_page);\n if ($search) {\n $advertisements->appends(['search' => $search]);\n }\n if ($type) {\n $advertisements->appends(['tipo' => $type]);\n }\n return view('frontend.myaccount.advertisement', compact('advertisements'));\n }", "title": "" }, { "docid": "25032d096d43e3cceac2fd239a44778a", "score": "0.5872348", "text": "public function searchAction() {\n $searchContainer = new Main_Session_Search_Companies();\n $searchContainer->clearSearchData();\n\n if ($this->_request->isPost() && $this->getService('company')->search($searchContainer)) {\n $this->redirect($this->url('search_results'), array( 'exit' => true ));\n return;\n }\n\n $this->view->title = 'Search';\n $this->view->searchForm = Main_Service_Models::getStaticForm('search');\n }", "title": "" }, { "docid": "61a0a0444261408599a5dfed88076c2c", "score": "0.5869643", "text": "public function search() {\n \t \n \t$resultado = $this->load->view('frecuencias/search',array(),TRUE);\n \n \t$response = array('mensaje' => $resultado);\n \t$this->output\n \t->set_status_header(200)\n \t->set_content_type('application/json', 'utf-8')\n \t->set_output(json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES))\n \t->_display();\n \texit;\n \n }", "title": "" }, { "docid": "5786c7643c5fc78c104ab02b23a789c9", "score": "0.5867661", "text": "public function onSearch()\r\n {\r\n $data = $this->form->getData();\r\n \r\n // clear session filters\r\n TSession::setValue('LinksList_filter_lincodigo', NULL);\r\n TSession::setValue('LinksList_filter_artcodigo', NULL);\r\n\r\n if (isset($data->lincodigo) AND ($data->lincodigo)) {\r\n $filter = new TFilter('lincodigo', '=', $data->lincodigo); // create the filter\r\n TSession::setValue('LinksList_filter_lincodigo', $filter); // stores the filter in the session\r\n }\r\n \r\n if (isset($data->artcodigo) AND ($data->artcodigo)) {\r\n $filter = new TFilter('artcodigo', '=', $data->artcodigo); // create the filter\r\n TSession::setValue('LinksList_filter_artcodigo', $filter); // stores the filter in the session\r\n }\r\n\r\n \r\n // fill the form with data again\r\n $this->form->setData($data);\r\n \r\n // keep the search data in the session\r\n TSession::setValue('Musica_filter_data', $data);\r\n \r\n $param=array();\r\n $param['offset'] =0;\r\n $param['first_page']=1;\r\n $this->onReload($param);\r\n }", "title": "" }, { "docid": "606e91895291d09c563c98eab7f2cd6e", "score": "0.58658755", "text": "public function searchAction() {\n\t\t$form = $this->getForm ( '/admin/tickets/searchprocess' );\n\t\t$form->getElement ( 'save' )->setName ( 'search' );\n\t\t\n\t\t$this->view->form = $form;\n\t\t$this->render ( 'searchform' );\n\t}", "title": "" } ]
e8e9cbf2e0043cd7a7970cad82a39ce0
Adds a key or many keys (columns) to the result. Pass an array of keys or just one key or multiple (string) arguments
[ { "docid": "0dfe313e01d4f6a25cbd3deeb05dae77", "score": "0.49541157", "text": "public function withKey($key);", "title": "" } ]
[ { "docid": "48162cf2d34e5674014986c7d3c7287e", "score": "0.5966323", "text": "public function assoc($args) {\n\t\t// Rows is not an array\n\t\tif(!is_array($this->r['rows'])) { return false; }\n\t\t\n\t\t// Set temp rows variable\n\t\t$rows = array();\n\t\t\n\t\t// Super-cool dig function\n\t\t$dig = function($r, $rows, $args) use(&$dig) {\n\t\t\t$column = $r[array_shift($args)];\n\t\t\tif(!isset($rows[$column])) { $rows[$column] = array(); }\n\t\t\t$rows[$column] = (empty($args) ? $r : $dig($r, $rows[$column], $args));\n\t\t\treturn $rows;\n\t\t};\n\t\t\n\t\tif(is_array($args)) {\n\t\t// Arguments provided\n\t\t\t// Check for columns key\n\t\t\tif(!isset($args['columns'])) {\n\t\t\t\t// Make sure all columns exist\n\t\t\t\tforeach($args as $c) {\n\t\t\t\t\tif(!isset($this->r['rows'][0][$c])) { return false; }\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Loop through all rows and create associative array\n\t\t\t\tforeach($this->r['rows'] as $r) {\n\t\t\t\t\t$rows = $dig($r, $rows, $args);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Make sure all columns exist\n\t\t\t\tforeach($args['columns'] as $c) {\n\t\t\t\t\tif(!isset($this->r['rows'][0][$c])) { return false; }\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Set separator\n\t\t\t\t$separator = isset($args['separator']) ? $args['separator'] : ':';\n\t\t\t\t\n\t\t\t\t// Loop through all rows and create associative array\n\t\t\t\tforeach($this->r['rows'] as $r) {\n\t\t\t\t\t// Set build id array\n\t\t\t\t\t$_build_id = array();\n\t\t\t\t\t\n\t\t\t\t\t// Loop through columns and add to build id array\n\t\t\t\t\tforeach($args['columns'] as $c) {\n\t\t\t\t\t\tarray_push($_build_id, $r[$c]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Set the row value\n\t\t\t\t\t$rows[implode($separator, $_build_id)] = $r;\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t} else {\n\t\t// Column name provided\n\t\t\t// Column does not exist\n\t\t\tif(!isset($this->r['rows'][0][$args])) { return false; }\n\t\t\t\n\t\t\t// Loop through all rows and create associative array\n\t\t\tforeach($this->r['rows'] as $r) {\n\t\t\t\t$rows[$r[$args]] = $r;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Set new rows\n\t\t$this->r['rows'] = $rows;\n\t\t\n\t\treturn true;\n }", "title": "" }, { "docid": "a5a87828625779b98fc7be58a9910e36", "score": "0.5904606", "text": "public function sAdd(string $key, $value, ...$other_values) {}", "title": "" }, { "docid": "f31fc0fa5f08d767468f04c65892bd28", "score": "0.589051", "text": "public function columns(string ...$columns);", "title": "" }, { "docid": "eb0be538f475b004cfa0e512caa43a07", "score": "0.58494663", "text": "function setData($mysqli, $row, $keys) {\r\n $res = \"\";\r\n foreach ($keys as $key) {\r\n\tif ($res !== \"\") {\r\n\t $res = $res.\", \";\r\n\t}\r\n\t$res = $res.$key.\"='\".$mysqli->real_escape_string($row[$key]).\"'\";\r\n }\r\n return $res;\r\n}", "title": "" }, { "docid": "069f35c59f599852766c2e36fba5a475", "score": "0.58081067", "text": "function addKey($table, $fields, $indexname = '', $type = 'INDEX', $len = 0) {\n\n // si pas de nom d'index, on prend celui du ou des champs\n if (!$indexname) {\n if (is_array($fields)) {\n $indexname = implode($fields, \"_\");\n } else {\n $indexname = $fields;\n }\n }\n\n if (!isIndex($table, $indexname)) {\n if (is_array($fields)) {\n if ($len) {\n $fields = \"`\".implode($fields, \"`($len), `\").\"`($len)\";\n } else {\n $fields = \"`\".implode($fields, \"`, `\").\"`\";\n }\n } else if ($len) {\n $fields = \"`$fields`($len)\";\n } else {\n $fields = \"`$fields`\";\n }\n\n $this->change[$table][] = \"ADD $type `$indexname` ($fields)\";\n }\n }", "title": "" }, { "docid": "914afdb6277f495bfcc35f6a14c21be2", "score": "0.5734042", "text": "public function pfAdd($key, array $elements) {}", "title": "" }, { "docid": "4c2556c25412b2e4a9b53a16a51c8b4d", "score": "0.57236725", "text": "abstract public function addColumns();", "title": "" }, { "docid": "7bb03eed4268a24acc938ec5df03b823", "score": "0.5673146", "text": "function set_row($keys,$sql_set) {\r\n $sql_where = '';\r\n if (count($keys) > 0) {\r\n $sql_wheres = array();\r\n foreach ($keys as $key=>$val) {\r\n if (is_array($val)) die('setrow: multi value does not supported');\r\n $sql_wheres[] = \"`$key`='\".myaddslashes($val).\"'\";\r\n }\r\n $sql_where = ' where '.join(' and ',$sql_wheres);\r\n }\r\n if (is_array($sql_set)) { # Note, if using array, I DONOT support mysql function/expression!! use string for that.\r\n $sql_sets = array();\r\n foreach ($sql_set as $key=>$val) {\r\n $sql_sets[] = '`'.$key.'` = \\''.addslashes($url).'\\'';\r\n }\r\n $sql_set = join(',',$sql_sets);\r\n }\r\n assert($sql_where != ''); # safeguard against setting all rows\r\n $sql = 'update `'.$this->db_table.'` set '.$sql_set.$sql_where;\r\n #~ echo $sql;exit;\r\n $res = mysql_query($sql) or die('<br>'.$sql.'<br>'.mysql_error()); #do to database\r\n }", "title": "" }, { "docid": "a67de4d48992610803358207a5fa159b", "score": "0.5670946", "text": "public function hmset(string $key) {\n\n $set = $this->get($key, []);\n $args = func_get_args();\n $cnt = count($args);\n\n for ($i=1; $i < $cnt; $i++){\n $field = $args[$i];\n $value = isset($args[($i+1)]) ? $args[($i+1)] : null;\n\n $set[$field] = $value;\n $i = $i + 1;\n }\n\n $this->set($key, $set);\n }", "title": "" }, { "docid": "db53915b92ccb211131616d81afbbdb3", "score": "0.56142896", "text": "public function touch($key_or_array, ...$more_keys) {}", "title": "" }, { "docid": "3cd51fda4bbb618f34f30bb218ab9ac1", "score": "0.5548275", "text": "public function addKeys($keys, $order_id = null) {\n global $db;\n foreach ($keys as $key) {\n $sql = \"INSERT INTO \" . self::KEY_TABLE . \" (foretag_id, nyckel, order_id) values(\" . $this->getId() . \", '\" . Security::secure_data($key) . \"', \" . $order_id . \" )\";\n $db->query($sql);\n }\n }", "title": "" }, { "docid": "ab853cff01d046bfaf1c6e51746ad8ca", "score": "0.5535626", "text": "function arr_kv() {\r\n $args = func_get_args();\r\n $return = array();\r\n $key = null;\r\n foreach($args as $arg) {\r\n if(is_string($arg)) {\r\n $key = $arg;\r\n $return[$key] = array();\r\n }\r\n elseif(is_int($arg) && !empty($key)) {\r\n $return[$key][] = $arg;\r\n }\r\n }\r\n return $return;\r\n}", "title": "" }, { "docid": "b6a8069d692447b2ecc139a08eaf993f", "score": "0.55332917", "text": "public function addColumn($column_name, $key) {\r\n\t\t\r\n\t\t$this->columns[$column_name] = $key;\r\n\t\t\r\n\t\t// TODO: this php function may come in handy here:\r\n\t\t// array_keys\r\n\t\t\r\n\t}", "title": "" }, { "docid": "a9843ff3e5b3918c37fa4dfce533c8a6", "score": "0.5520415", "text": "abstract protected function addColumns();", "title": "" }, { "docid": "a38e14be2e200d59b8b7304a2b135845", "score": "0.55190164", "text": "public function keys($keys) {\n\n $processed_keys = array();\n\n try {\n \n if ( empty($keys) ) throw new DatabaseException('Invalid key/s',1011);\n\n else if ( is_array($keys) ) foreach ($keys as $key) array_push($processed_keys, $this->composeKey($key));\n\n else array_push($processed_keys, $this->composeKey($keys));\n\n\n } catch (DatabaseException $de) {\n \n throw $de;\n\n }\n\n $this->keys = implode(',', $processed_keys);\n\n $this->keys_array = $processed_keys;\n \n return $this;\n \n }", "title": "" }, { "docid": "3ecdbdaf196a1aa43cff1f311b7d4808", "score": "0.5494522", "text": "public function addRowKeys( $value){\n return $this->_add(1, $value);\n }", "title": "" }, { "docid": "e85e03d3369a89458fcdf70ed8ab1d9a", "score": "0.54681003", "text": "public function sAddArray($key, array $values) {}", "title": "" }, { "docid": "ebf959b4a465d44f04c8a55e7744a3aa", "score": "0.54422635", "text": "function AddHeader($keys)\n\t{\n\t\t$head = array_combine($keys,$keys);\n\t\t$this->Header()->NewRow($head);\n\t}", "title": "" }, { "docid": "55b5b015bd8c478fe76fae2f7587c68e", "score": "0.5441256", "text": "function newData($mysqli, $row, $keys) {\r\n $keysNames = join(\",\", $keys);\r\n $keysValues = array();\r\n\r\n for ($i = 0; $i < count($keys); $i++) {\r\n\t$keysValues[$i] = $mysqli->real_escape_string($row[$keys[$i]]);\r\n }\r\n\r\n return \"(\".$keysNames.\") VALUES ('\".join(\"','\", $keysValues).\"')\";\r\n}", "title": "" }, { "docid": "72afd89563636e7a21b6883e534fa435", "score": "0.5423979", "text": "public function column(string $keyOrPropertyOrMethod): array;", "title": "" }, { "docid": "ad64c443852f09bca142dabbf0f6283c", "score": "0.54226106", "text": "public function many(array $keys)\n {\n }", "title": "" }, { "docid": "7395ae7fc9114b35582f15289f20e729", "score": "0.54014546", "text": "public function setMultiple($key);", "title": "" }, { "docid": "4346786948e232c43af3abd83fbd5a28", "score": "0.53613496", "text": "function addAssocArrayRow() {\n\n}", "title": "" }, { "docid": "15a58593688980d33ba2f95a722db810", "score": "0.5344573", "text": "function insert_row($keys) {\r\n if (count($keys) > 0) {\r\n $sql_keys = array();\r\n $sql_values = array();\r\n foreach ($keys as $key=>$val) {\r\n if (is_array($val)) die('insertrow: multi value does not supported');\r\n $sql_keys[] = '`'.$key.'`';\r\n if ($val == 'Now()')\r\n $sql_values[] = myaddslashes($val);\r\n else\r\n $sql_values[] = \"'\".myaddslashes($val).\"'\";\r\n }\r\n $sql_keys = join(',',$sql_keys);\r\n $sql_values = join(',',$sql_values);\r\n }\r\n $sql = 'insert into `'.$this->db_table.'` ('.$sql_keys.') values ('.$sql_values.')';\r\n #~ echo '<br>'.$sql;\r\n $res = mysql_query($sql) or die('<br>'.$sql.'<br>'.mysql_error()); #do to database\r\n return mysql_insert_id();\r\n }", "title": "" }, { "docid": "137d539352d7101332d313997be37739", "score": "0.5320245", "text": "public function addTextSearchFields()\n {\n $columns = func_get_args();\n foreach ($columns as $column)\n {\n $this->TextSearchFields[] = $column;\n }\n }", "title": "" }, { "docid": "dac18b193150a012b46ec5b7b2cfad12", "score": "0.52882284", "text": "function add($key, $en = 'NULL', $vi = 'NULL', $ch = 'NULL') {\n\t\t\t$this->db->querySQL(\"INSERT INTO $this->table (keyLang, en, vi, ch) VALUES ('$key', N'$en', N'$vi', N'$ch')\");\n\t\t}", "title": "" }, { "docid": "f44b8b70f553fe83cdfb4ce5fc1f7a59", "score": "0.5276872", "text": "public function many(array $keys) : array;", "title": "" }, { "docid": "030784e8290c6f7eeb3eaeba4d567136", "score": "0.52499306", "text": "function array_column($input = null, $columnKey = null, $indexKey = null)\n{\n // parameters and trigger errors exactly as the built-in array_column()\n // does in PHP 5.5.\n $argc = func_num_args();\n $params = func_get_args();\n\n if ($argc < 2) {\n trigger_error(\"array_column() expects at least 2 parameters, {$argc} given\", E_USER_WARNING);\n return null;\n }\n\n if (!is_array($params[0])) {\n trigger_error('array_column() expects parameter 1 to be array, ' . gettype($params[0]) . ' given', E_USER_WARNING);\n return null;\n }\n\n if (!is_int($params[1])\n && !is_float($params[1])\n && !is_string($params[1])\n && $params[1] !== null\n && !(is_object($params[1]) && method_exists($params[1], '__toString'))\n ) {\n trigger_error('array_column(): The column key should be either a string or an integer', E_USER_WARNING);\n return false;\n }\n\n if (isset($params[2])\n && !is_int($params[2])\n && !is_float($params[2])\n && !is_string($params[2])\n && !(is_object($params[2]) && method_exists($params[2], '__toString'))\n ) {\n trigger_error('array_column(): The index key should be either a string or an integer', E_USER_WARNING);\n return false;\n }\n\n $paramsInput = $params[0];\n $paramsColumnKey = ($params[1] !== null) ? (string) $params[1] : null;\n\n $paramsIndexKey = null;\n if (isset($params[2])) {\n if (is_float($params[2]) || is_int($params[2])) {\n $paramsIndexKey = (int) $params[2];\n } else {\n $paramsIndexKey = (string) $params[2];\n }\n }\n\n $resultArray = array();\n\n foreach ($paramsInput as $row) {\n\n $key = $value = null;\n $keySet = $valueSet = false;\n\n if ($paramsIndexKey !== null && array_key_exists($paramsIndexKey, $row)) {\n $keySet = true;\n $key = (string) $row[$paramsIndexKey];\n }\n\n if ($paramsColumnKey === null) {\n $valueSet = true;\n $value = $row;\n } elseif (is_array($row) && array_key_exists($paramsColumnKey, $row)) {\n $valueSet = true;\n $value = $row[$paramsColumnKey];\n }\n\n if ($valueSet) {\n if ($keySet) {\n $resultArray[$key] = $value;\n } else {\n $resultArray[] = $value;\n }\n }\n\n }\n\n return $resultArray;\n}", "title": "" }, { "docid": "9dede088e93862c40ae0533ff822e162", "score": "0.5247671", "text": "public function addValueToRequest($key, $arguments = NULL) {\n \n if ($arguments === NULL) {\n $this->valuesToRequest[] = $key;\n }\n else {\n $this->valuesToRequest[] = ['key' => $key, 'args' => $arguments];\n }\n \n }", "title": "" }, { "docid": "46a7e65df273d8b23fce173420d21859", "score": "0.52354884", "text": "public function insert($tableName,$allData){\n $keys = implode(',', array_keys($allData));\n $values = implode(\"','\" , array_values($allData));\n $values = \"'\".$values.\"'\";\n\n $sql =<<<EOF\n INSERT INTO $tableName ($keys)\n VALUES ($values);\n\n \nEOF;\n\n $result = $this->conn->exec($sql);\n return $result; \n}", "title": "" }, { "docid": "ce636916b95bcf29770d946d6ab42d11", "score": "0.52342355", "text": "public function test_add_by_key_array() {\n\t\t$key = microtime();\n\t\t$value = array( 5, 'value' );\n\t\t$server_key_real = 'doughty';\n\n\t\t// Add array to memcached\n\t\t$this->assertTrue( $this->object_cache->addByKey( $server_key_real, $key, $value ) );\n\n\t\t// Verify correct value/type is returned\n\t\t$this->assertSame( $value, $this->object_cache->getByKey( $server_key_real, $key ) );\n\t}", "title": "" }, { "docid": "8a0ca958a0fe1d2ffbb37e084e25a698", "score": "0.52277035", "text": "public function addArray($bucketKeys) {}", "title": "" }, { "docid": "fba2d98fbed4a40b346a14f88ec3ccfb", "score": "0.51975733", "text": "public function selectByKey($tableName, $columns, $primaryKeys);", "title": "" }, { "docid": "9afd034ba57c1f25119df40e71ee3b63", "score": "0.51922905", "text": "public function addKeys($input): self\n {\n if (is_callable($input)) {\n $input = (array) app()->call($input);\n }\n\n $keys = array_keys($input);\n $values = array_values($input);\n\n foreach ($keys as $index => $key) {\n if (is_numeric($key)) {\n $this->keys[] = $this->prefix . $values[$index];\n $this->defaults[] = null;\n } else {\n $this->keys[] = $this->prefix . $key;\n $this->defaults[] = $values[$index];\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "4811fa3ead21ceb5b335f0279672451b", "score": "0.5189667", "text": "public function getMultiple($key);", "title": "" }, { "docid": "d39c0df4568b1fe5793c9d0f27368ab7", "score": "0.5187439", "text": "public function buildColumns(array|string $columns): string;", "title": "" }, { "docid": "c639e93e9678e651ac1210f78e170f22", "score": "0.517437", "text": "public function createTable($strName, $arrFields, $arrKeys);", "title": "" }, { "docid": "cf339094e098a1ed9df6b7a54ebb1f73", "score": "0.514898", "text": "public function addRow(array $cols = array());", "title": "" }, { "docid": "ea523cdaae50aa20a77facf98d95c799", "score": "0.5139799", "text": "function mysqlInsertArray($into, $keys, $values)\n {\n $keys = implode(\"`, `\", $keys);\n \t$values = implode(\"', '\",$values);\n\n \t//echo \"INSERT INTO $into (`$keys`)VALUES('\".$values.\"')\". \"<br />\\n\";\n \tmysql_query(\"INSERT INTO $into (`$keys`)VALUES('\".$values.\"')\");\n }", "title": "" }, { "docid": "2aec991bacfbf2940ca30377da1b09a8", "score": "0.5130948", "text": "public function getAddColumns($table, $columns = array());", "title": "" }, { "docid": "2e16cd8f7f81bc671c58e9ec63a24d20", "score": "0.5110418", "text": "public function addColumns($columns)\n {\n if (func_num_args() > 1) { // Support for $this->addColumns('col1', 'col2') notation.\n $columns = func_get_args();\n } elseif (is_string($columns)) {\n $columns = array($columns);\n }\n foreach ($columns as $alias => $column) {\n $alias = $this->extractAlias($column, $alias, true); // Zit er een alias in de $column string?\n if ($alias === null) {\n $this->columns[] = $column;\n } else {\n if (isset($this->columns[$alias])) {\n \\Sledgehammer\\notice('Overruling column(alias) \"'.$alias.'\"');\n }\n $this->columns[$alias] = $column;\n }\n }\n }", "title": "" }, { "docid": "ccf40c8fa5318078375b735b59b48956", "score": "0.50995934", "text": "function _insert($table, $keys, $values)\n {\n return 'INSERT INTO ' . $table . ' (' . implode(', ', $keys). ') VALUES (' . implode(', ', $values) . ')';\n }", "title": "" }, { "docid": "bd1bbaa7a54b4bc03c223155ecdab3b8", "score": "0.50808644", "text": "abstract public function add(string $key, $value);", "title": "" }, { "docid": "b45320db62c4408cabb595fd665b087f", "score": "0.50759786", "text": "function mysqlUpdateArray($table, $keys, $values, $where)\n {\n $set = array();\n for($i = 0; $i < count($keys); $i++)\n {\n $set[] = \"`\".$keys[$i].\"` = '\".addslashes($values[$i]).\"'\";\n }\n\n $sets = implode(\", \", $set);\n\n //echo \"UPDATE $table SET $sets WHERE $where\". \"<br />\\n\";\n mysql_query(\"UPDATE $table SET $sets WHERE $where\");\n\n }", "title": "" }, { "docid": "1cde0c22e690e2c6a35afac656c35dfa", "score": "0.5061144", "text": "final public function cols(...$keys):Cols\n {\n if($this->isColsEmpty())\n $this->colsLoad();\n\n return (empty($keys))? $this->cols:$this->cols->gets(...$keys);\n }", "title": "" }, { "docid": "11e1c8237fe2d74c44794df7090fead7", "score": "0.5057111", "text": "function generateAdditionalColumnsFromArrays($colNames, $colTables, $colFuncs) \n\t{\n\t\tif(TXTDBAPI_DEBUG) {\n\t\t\tdebug_printb(\"[generateAdditionalColumnsFromArrays] Trying to add the following columns:<br>\");\n\t\t\tprint_r($colNames); echo \"<br>\";\n\t\t\tprint_r($colTables); echo \"<br>\";\n\t\t\tprint_r($colFuncs); echo \"<br>\";\n\t\t}\n\t\t\t\t\n\t\tfor($i=0;$i<count($colNames);++$i) \n\t\t{\n\t\t\t// does this column allready exist ?\n\t\t\t$colNr = $this->findColNrByAttrs($colNames[$i], $colTables[$i], $colFuncs[$i]);\n\t\t\tif($colNr!=NOT_FOUND) {\n\t\t\t\tdebug_print(\"Column <b>\" . $colNames[$i] . \", \" . $colTables[$i]. \", \" . $colFuncs[$i] . \"</b> : allready exists!<br>\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\t\t\n\t\t\t// create additional columns for non-param function\n\t\t\tif($colFuncs[$i] && (!$colNames[$i])) \n\t\t\t{\n\t\t\t\tdebug_print(\"Column <b>\" . $colNames[$i] . \", \" . $colTables[$i]. \", \" . $colFuncs[$i] . \"</b> : creating additional Non-param-func column!<br>\");\n\t\t\t\t\n\t\t\t\t$this->addColumn(\"\",\"\",\"\",\"\",\"str\",\"\",$colFuncs[$i],\"\",false);\n\t\t\t\n\t\t\t\n\t\t\t// create additional column for non-column-param function\n\t\t\t} \n\t\t\telse if($colFuncs[$i] && $colNames[$i] && ( is_numeric($colNames[$i]) || has_quotes($colNames[$i]))) \n\t\t\t{\n\t\t\t\tdebug_print(\"Column <b>\" . $colNames[$i] . \", \" . $colTables[$i]. \", \" . $colFuncs[$i] . \"</b> : creating additional Non-column-param-func column!<br>\");\n\t\t\t\t$this->addColumn($colNames[$i],\"\",\"\",\"\",\"str\",\"\",$colFuncs[$i],\"\",false);\n\t\t\t} \n\t\t\telse if($colFuncs[$i] && $colNames[$i]) \n\t\t\t{\n\t\t\t\t\n\t\t\t\tdebug_print(\"Column <b>\" . $colNames[$i] . \", \" . $colTables[$i]. \", \" . $colFuncs[$i] . \"</b> : creating additional Param-func column!<br>\");\n\n\t\t\t\t// search column (without function)\n\t\t\t\t$colNr=$this->findColNrByAttrs($colNames[$i],$colTables[$i],\"\");\n\t\t\t\tif($colNr==NOT_FOUND) {\n\t\t\t\t\tdebug_print(\"Original NOT found!<br>\");\n\t\t\t\t\tprint_error_msg(\"Column '\".$colNames[$i].\"' not found\");\n\t\t\t\t\treturn NOT_FOUND;\n\t\t\t\t}\n\t\t\t\tdebug_print(\"Original found at $colNr<br>\");\n\t\t\t\t\n\t\t\t\t// add column\n\t\t\t\t$this->addColumn($this->colNames[$colNr], $this->colAliases[$colNr], $this->colTables[$colNr], $this->colTableAliases[$colNr], \"str\", \"\", $colFuncs[$i], \"\", false);\n\t\t\t\t$newCol=count($this->colNames)-1;\n\t\t\t\t// set function for new column\n\t\t\t\t$this->colFuncs[$newCol]=$colFuncs[$i];\n\t\t\t\n\t\t\t// add direct values ( no function)\n\t\t\t} \n\t\t\telse if( !$colFuncs[$i] && $colNames[$i] && ( is_numeric($colNames[$i]) || has_quotes($colNames[$i]))) \n\t\t\t{\n\t\t\t\tdebug_print(\"Column <b>\" . $colNames[$i] . \", \" . $colTables[$i]. \", \" . $colFuncs[$i] . \"</b> : creating direct value column!<br>\");\n\t\t\t \t$value=$colNames[$i];\n\t\t\t \tif(has_quotes($value)) {\n\t\t\t \t\tremove_quotes($value);\n\t\t\t \t}\n\t\t\t \t$this->addColumn($colNames[$i],\"\",\"\",\"\",\"str\",\"\",\"\",$value,true);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "3c4eb210dddb1401b12cc415ceef4b57", "score": "0.50530237", "text": "function array_column($input = null, $columnKey = null, $indexKey = null) {\n // Using func_get_args() in order to check for proper number of\n // parameters and trigger errors exactly as the built-in array_column()\n // does in PHP 5.5.\n $argc = func_num_args();\n $params = func_get_args();\n\n if ($argc < 2) {\n trigger_error(\"array_column() expects at least 2 parameters, {$argc} given\", E_USER_WARNING);\n return null;\n }\n\n if (!is_array($params[0])) {\n trigger_error('array_column() expects parameter 1 to be array, ' . gettype($params[0]) . ' given', E_USER_WARNING);\n return null;\n }\n\n if (!is_int($params[1]) && !is_float($params[1]) && !is_string($params[1]) && $params[1] !== null && !(is_object($params[1]) && method_exists($params[1], '__toString'))\n ) {\n trigger_error('array_column(): The column key should be either a string or an integer', E_USER_WARNING);\n return false;\n }\n\n if (isset($params[2]) && !is_int($params[2]) && !is_float($params[2]) && !is_string($params[2]) && !(is_object($params[2]) && method_exists($params[2], '__toString'))\n ) {\n trigger_error('array_column(): The index key should be either a string or an integer', E_USER_WARNING);\n return false;\n }\n\n $paramsInput = $params[0];\n $paramsColumnKey = ($params[1] !== null) ? (string) $params[1] : null;\n\n $paramsIndexKey = null;\n if (isset($params[2])) {\n if (is_float($params[2]) || is_int($params[2])) {\n $paramsIndexKey = (int) $params[2];\n } else {\n $paramsIndexKey = (string) $params[2];\n }\n }\n\n $resultArray = array();\n\n foreach ($paramsInput as $row) {\n\n $key = $value = null;\n $keySet = $valueSet = false;\n\n if ($paramsIndexKey !== null && array_key_exists($paramsIndexKey, $row)) {\n $keySet = true;\n $key = (string) $row[$paramsIndexKey];\n }\n\n if ($paramsColumnKey === null) {\n $valueSet = true;\n $value = $row;\n } elseif (is_array($row) && array_key_exists($paramsColumnKey, $row)) {\n $valueSet = true;\n $value = $row[$paramsColumnKey];\n }\n\n if ($valueSet) {\n if ($keySet) {\n $resultArray[$key] = $value;\n } else {\n $resultArray[] = $value;\n }\n }\n }\n\n return $resultArray;\n }", "title": "" }, { "docid": "3a96fc896897102a64f718c25ba36b00", "score": "0.50414926", "text": "function array_column($input = null, $columnKey = null, $indexKey = null)\n {\n // Using func_get_args() in order to check for proper number of\n // parameters and trigger errors exactly as the built-in array_column()\n // does in PHP 5.5.\n $argc = func_num_args();\n $params = func_get_args();\n\n if ($argc < 2) {\n trigger_error(\"array_column() expects at least 2 parameters, {$argc} given\", E_USER_WARNING);\n return null;\n }\n\n if (!is_array($params[0])) {\n trigger_error(\n 'array_column() expects parameter 1 to be array, ' . gettype($params[0]) . ' given',\n E_USER_WARNING\n );\n return null;\n }\n\n if (!is_int($params[1])\n && !is_float($params[1])\n && !is_string($params[1])\n && $params[1] !== null\n && !(is_object($params[1]) && method_exists($params[1], '__toString'))\n ) {\n trigger_error('array_column(): The column key should be either a string or an integer', E_USER_WARNING);\n return false;\n }\n\n if (isset($params[2])\n && !is_int($params[2])\n && !is_float($params[2])\n && !is_string($params[2])\n && !(is_object($params[2]) && method_exists($params[2], '__toString'))\n ) {\n trigger_error('array_column(): The index key should be either a string or an integer', E_USER_WARNING);\n return false;\n }\n\n $paramsInput = $params[0];\n $paramsColumnKey = ($params[1] !== null) ? (string) $params[1] : null;\n\n $paramsIndexKey = null;\n if (isset($params[2])) {\n if (is_float($params[2]) || is_int($params[2])) {\n $paramsIndexKey = (int) $params[2];\n } else {\n $paramsIndexKey = (string) $params[2];\n }\n }\n\n $resultArray = array();\n\n foreach ($paramsInput as $row) {\n $key = $value = null;\n $keySet = $valueSet = false;\n\n if ($paramsIndexKey !== null && array_key_exists($paramsIndexKey, $row)) {\n $keySet = true;\n $key = (string) $row[$paramsIndexKey];\n }\n\n if ($paramsColumnKey === null) {\n $valueSet = true;\n $value = $row;\n } elseif (is_array($row) && array_key_exists($paramsColumnKey, $row)) {\n $valueSet = true;\n $value = $row[$paramsColumnKey];\n }\n\n if ($valueSet) {\n if ($keySet) {\n $resultArray[$key] = $value;\n } else {\n $resultArray[] = $value;\n }\n }\n\n }\n\n return $resultArray;\n }", "title": "" }, { "docid": "3a96fc896897102a64f718c25ba36b00", "score": "0.50414926", "text": "function array_column($input = null, $columnKey = null, $indexKey = null)\n {\n // Using func_get_args() in order to check for proper number of\n // parameters and trigger errors exactly as the built-in array_column()\n // does in PHP 5.5.\n $argc = func_num_args();\n $params = func_get_args();\n\n if ($argc < 2) {\n trigger_error(\"array_column() expects at least 2 parameters, {$argc} given\", E_USER_WARNING);\n return null;\n }\n\n if (!is_array($params[0])) {\n trigger_error(\n 'array_column() expects parameter 1 to be array, ' . gettype($params[0]) . ' given',\n E_USER_WARNING\n );\n return null;\n }\n\n if (!is_int($params[1])\n && !is_float($params[1])\n && !is_string($params[1])\n && $params[1] !== null\n && !(is_object($params[1]) && method_exists($params[1], '__toString'))\n ) {\n trigger_error('array_column(): The column key should be either a string or an integer', E_USER_WARNING);\n return false;\n }\n\n if (isset($params[2])\n && !is_int($params[2])\n && !is_float($params[2])\n && !is_string($params[2])\n && !(is_object($params[2]) && method_exists($params[2], '__toString'))\n ) {\n trigger_error('array_column(): The index key should be either a string or an integer', E_USER_WARNING);\n return false;\n }\n\n $paramsInput = $params[0];\n $paramsColumnKey = ($params[1] !== null) ? (string) $params[1] : null;\n\n $paramsIndexKey = null;\n if (isset($params[2])) {\n if (is_float($params[2]) || is_int($params[2])) {\n $paramsIndexKey = (int) $params[2];\n } else {\n $paramsIndexKey = (string) $params[2];\n }\n }\n\n $resultArray = array();\n\n foreach ($paramsInput as $row) {\n $key = $value = null;\n $keySet = $valueSet = false;\n\n if ($paramsIndexKey !== null && array_key_exists($paramsIndexKey, $row)) {\n $keySet = true;\n $key = (string) $row[$paramsIndexKey];\n }\n\n if ($paramsColumnKey === null) {\n $valueSet = true;\n $value = $row;\n } elseif (is_array($row) && array_key_exists($paramsColumnKey, $row)) {\n $valueSet = true;\n $value = $row[$paramsColumnKey];\n }\n\n if ($valueSet) {\n if ($keySet) {\n $resultArray[$key] = $value;\n } else {\n $resultArray[] = $value;\n }\n }\n\n }\n\n return $resultArray;\n }", "title": "" }, { "docid": "05ed25ab5d7a2de1a704d1fc748d77ed", "score": "0.5038334", "text": "function array_column($input = null, $columnKey = null, $indexKey = null)\n {\n // Using func_get_args() in order to check for proper number of\n // parameters and trigger errors exactly as the built-in array_column()\n // does in PHP 5.5.\n $argc = func_num_args();\n $params = func_get_args();\n\n if ($argc < 2) {\n trigger_error(\"array_column() expects at least 2 parameters, {$argc} given\", E_USER_WARNING);\n return null;\n }\n\n if (!is_array($params[0])) {\n trigger_error('array_column() expects parameter 1 to be array, ' . gettype($params[0]) . ' given', E_USER_WARNING);\n return null;\n }\n\n if (!is_int($params[1])\n && !is_float($params[1])\n && !is_string($params[1])\n && $params[1] !== null\n && !(is_object($params[1]) && method_exists($params[1], '__toString'))\n ) {\n trigger_error('array_column(): The column key should be either a string or an integer', E_USER_WARNING);\n return false;\n }\n\n if (isset($params[2])\n && !is_int($params[2])\n && !is_float($params[2])\n && !is_string($params[2])\n && !(is_object($params[2]) && method_exists($params[2], '__toString'))\n ) {\n trigger_error('array_column(): The index key should be either a string or an integer', E_USER_WARNING);\n return false;\n }\n\n $paramsInput = $params[0];\n $paramsColumnKey = ($params[1] !== null) ? (string) $params[1] : null;\n\n $paramsIndexKey = null;\n if (isset($params[2])) {\n if (is_float($params[2]) || is_int($params[2])) {\n $paramsIndexKey = (int) $params[2];\n } else {\n $paramsIndexKey = (string) $params[2];\n }\n }\n\n $resultArray = array();\n\n foreach ($paramsInput as $row) {\n\n $key = $value = null;\n $keySet = $valueSet = false;\n\n if ($paramsIndexKey !== null && array_key_exists($paramsIndexKey, $row)) {\n $keySet = true;\n $key = (string) $row[$paramsIndexKey];\n }\n\n if ($paramsColumnKey === null) {\n $valueSet = true;\n $value = $row;\n } elseif (is_array($row) && array_key_exists($paramsColumnKey, $row)) {\n $valueSet = true;\n $value = $row[$paramsColumnKey];\n }\n\n if ($valueSet) {\n if ($keySet) {\n $resultArray[$key] = $value;\n } else {\n $resultArray[] = $value;\n }\n }\n\n }\n\n return $resultArray;\n }", "title": "" }, { "docid": "472f33985ca82b021fc52e8f3a28e67d", "score": "0.5036853", "text": "function & buildKeyList($keyName = null, $keyValue = null, array $array = array())\n\t{\n\t\t$tmpArray = array();\n\t\tforeach ($array as $row)\n\t\t{\n\t\t\t$tmpArray[$row[$keyName]] = $row[$keyValue];\n\t\t}\n\t\treturn $tmpArray;\n\t}", "title": "" }, { "docid": "63786d41282f320e02580f9d5f3dd8b0", "score": "0.5034626", "text": "public function loadAssocList($key = null, $column = null);", "title": "" }, { "docid": "ace018f20d8b42cd560d6132f0da8680", "score": "0.50251776", "text": "public function get (string ...$keys);", "title": "" }, { "docid": "d8595d70bea95469b9578a539cd936ea", "score": "0.50182605", "text": "function add_index($index, $table, $column) {\n global $langIndexAdded, $langIndexExists, $langToTable;\n\n $num_of_args = func_num_args();\n if ($num_of_args <= 3) {\n $ind_sql = Database::get()->queryArray(\"SHOW INDEX FROM $table\");\n foreach ($ind_sql as $i) {\n if ($i->Key_name == $index) {\n $retString = \"<p>$langIndexExists $table</p>\";\n return $retString;\n }\n }\n Database::get()->query(\"ALTER TABLE $table ADD INDEX `$index` ($column)\");\n } else {\n $arguments = func_get_args();\n // cut the first and second argument\n array_shift($arguments);\n array_shift($arguments);\n $st = '';\n for ($j = 0; $j < count($arguments); $j++) {\n $st .= $arguments[$j] . ',';\n }\n $ind_sql = Database::get()->queryArray(\"SHOW INDEXES FROM `$table`\");\n foreach ($ind_sql as $i) {\n if ($i->Key_name == $index) {\n $retString = \"<p>$langIndexExists $table</p>\";\n return $retString;\n }\n }\n $sql = \"ALTER TABLE $table ADD INDEX `$index` ($st)\";\n $sql = str_replace(',)', ')', $sql);\n Database::get()->query($sql);\n }\n $retString = \"<p>$langIndexAdded $langToTable $table</p>\";\n return $retString;\n}", "title": "" }, { "docid": "c32cdbf291e73241b2667e91a5164ec0", "score": "0.5013017", "text": "function updateData($data = array(), $keys = array(), $multi_rows = false, $quote = true)\n\t{\n\t\tforeach ($keys as $key)\n\t\t{\n\t\t\t$ustr[] = '`'.$key.'`=VALUES(`'.$key.'`)';\n\t\t}\n\n\t\tif($multi_rows)\n\t\t{\n\t\t\t// rows > 1\n\n\t\t\tif($quote)\n\t\t\t{\n\t\t\t\t$values = '(\\''.implode(\"','\",$data[0]).'\\')';\n\t\t\t\t$cnt = sizeof($data);\n\t\t\t\tfor($i=1; $i<$cnt; $i++)\n\t\t\t\t{\n\t\t\t\t\t$values .= ', ('.hcms_array_to_query($data[$i]).')';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$values = '('.implode(',',$data[0]).')';\n\t\t\t\t$cnt = sizeof($data);\n\t\t\t\tfor($i=1; $i<$cnt; $i++)\n\t\t\t\t{\n\t\t\t\t\t$values .= ', ('.implode(',',$data[$i]).')';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//\t\t\thcms_debug(\"INSERT INTO $this->table VALUES $values\".' ON DUPLICATE KEY UPDATE '.implode(', ',$ustr).';');\n\t\t\treturn $this->db->ExecuteNonQuery(\"INSERT INTO $this->table VALUES $values\".' ON DUPLICATE KEY UPDATE '.implode(', ',$ustr).';');\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->db->ExecuteNonQuery(\"INSERT INTO $this->table VALUES ('\".implode(\"','\",$data).'\\') ON DUPLICATE KEY UPDATE '.implode(', ',$ustr).';');\n\t\t}\n\t}", "title": "" }, { "docid": "ddba128ee6569cba03490742cc388260", "score": "0.501279", "text": "function array_column($input = null, $columnKey = null, $indexKey = null) {\n // parameters and trigger errors exactly as the built-in array_column()\n // does in PHP 5.5.\n $argc = func_num_args();\n $params = func_get_args();\n if ($argc < 2) {\n trigger_error('array_column() expects at least 2 parameters, {'.$argc.'} given', E_USER_WARNING);\n return null;\n }\n if (!is_array($params[0])) {\n trigger_error('array_column() expects parameter 1 to be array, '.gettype($params[0]).' given', E_USER_WARNING);\n return null;\n }\n if (!is_int($params[1]) && !is_float($params[1]) && !is_string($params[1]) && $params[1] !== null && !(is_object($params[1]) && method_exists($params[1], '__toString'))\n ) {\n trigger_error('array_column(): The column key should be either a string or an integer', E_USER_WARNING);\n return false;\n }\n if (isset($params[2]) && !is_int($params[2]) && !is_float($params[2]) && !is_string($params[2]) && !(is_object($params[2]) && method_exists($params[2], '__toString'))\n ) {\n trigger_error('array_column(): The index key should be either a string or an integer', E_USER_WARNING);\n return false;\n }\n $paramsInput = $params[0];\n $paramsColumnKey = ($params[1] !== null) ? (string) $params[1] : null;\n $paramsIndexKey = null;\n if (isset($params[2])) {\n if (is_float($params[2]) || is_int($params[2])) {\n $paramsIndexKey = (int) $params[2];\n } else {\n $paramsIndexKey = (string) $params[2];\n }\n }\n $resultArray = array();\n\n foreach ($paramsInput as $row) {\n $key = $value = null;\n $keySet = $valueSet = false;\n\n if ($paramsIndexKey !== null && array_key_exists($paramsIndexKey, $row)) {\n $keySet = true;\n $key = (string) $row[$paramsIndexKey];\n }\n if ($paramsColumnKey === null) {\n $valueSet = true;\n $value = $row;\n } elseif (is_array($row) && array_key_exists($paramsColumnKey, $row)) {\n $valueSet = true;\n $value = $row[$paramsColumnKey];\n }\n if ($valueSet) {\n if ($keySet) {\n $resultArray[$key] = $value;\n } else {\n $resultArray[] = $value;\n }\n }\n }\n return $resultArray;\n }", "title": "" }, { "docid": "69d5be0997cbdc02e74e7e6d16c366bb", "score": "0.49863872", "text": "public function multiget ($col, $keys, $slice_start = \"\", $slice_finish = \"\") {\n\n if (!in_array($col, $this->_column))\n throw Exception($col.\" is not a valid column space; check your cassandra.php config file\");\n\n return $this->_column[$col]->multiget($keys, $slice_start, $slice_finish);\n }", "title": "" }, { "docid": "35fdcde7a24193b3601e5ddb1eed200e", "score": "0.4962666", "text": "public function addColumns()\n {\n }", "title": "" }, { "docid": "aea736ea967e09743037cce7eb7405e4", "score": "0.49586055", "text": "static function keywordQueryBuilder($keys,$method,$not=false,$fields=array(),$customWildCards=false) {\r\n $qkey = array();\r\n $qkey[\"search\"] = \"keyword\";\r\n $qkey[\"key_words\"] = $keys;\r\n $qkey[\"key_method\"] = $method;\r\n if($not)\r\n $qkey[\"not\"] = $not;\r\n if(!empty($fields))\r\n $qkey[\"key_fields\"] = $fields;\r\n if($customWildCards)\r\n $qkey[\"custom_wildcards\"] = $customWildCards;\r\n return $qkey;\r\n }", "title": "" }, { "docid": "53f126bc53dde7943872eede1f333007", "score": "0.4954933", "text": "public function addArgument(string $key, $value): ArgumentsInterface;", "title": "" }, { "docid": "902ae0b9e14e4b8b0ba37a82591aa944", "score": "0.49487805", "text": "private static function addParam($_arr, $_key, $_value) {\n if (isset($_value))\n $_arr[$_key] = $_value;\n return $_arr;\n }", "title": "" }, { "docid": "6227516b7e60f5754fb0028e1901cb86", "score": "0.49431562", "text": "public function addTagsToKeys($tags, $keys);", "title": "" }, { "docid": "7ad3e26b5ac4f8ef2629f1821f58f74a", "score": "0.49409837", "text": "public function add(string $key, $value);", "title": "" }, { "docid": "7461e6ecf3d72288fa10a6abb51d25fe", "score": "0.49338728", "text": "abstract public function addField(&$ret, $table, $field, $spec, $keys_new = array());", "title": "" }, { "docid": "cf324fe447ec3b48880f32285ceb7841", "score": "0.4929452", "text": "function select($query, $key = NULL, $args = array())\n {\n $res = $this->query($query, $args);\n if (!$res)\n {\n return NULL;\n }\n $rows = array();\n while ($r = $res->fetch_array())\n {\n if ($key !== NULL)\n {\n $rows[$r[$key]] = $r;\n }\n else\n {\n $rows[] = $r;\n }\n }\n return $rows;\n }", "title": "" }, { "docid": "26fd6f7c90e94a363a4c54a0ea238499", "score": "0.4928138", "text": "public function multiInsert($parm){\n if (!is_array($parm)){\n throw new S_Exception(__METHOD__ . '参数不正确');\n }\n $sql_in = '';\n foreach ($parm as $k => $v){\n $sql_in .= $k . '=:'. $k . ',';\n }\n return $sql_in;\n }", "title": "" }, { "docid": "a439098cb960af344c76a94afbdec5c3", "score": "0.49277785", "text": "abstract public function addPrimaryKey(&$ret, $table, $fields);", "title": "" }, { "docid": "52c215a367d48dc44168cacc3275f63d", "score": "0.4925224", "text": "protected function _appendBase( $name, array $arguments ) {\n\t\textract( self::_convertArguments( 'append', $arguments ) );\n\t\tif ( isset( $value ) == false ) {\n\t\t\trequire_once 'My/KeyValueStore/Exception.php';\n\t\t\tthrow new My_KeyValueStore_Exception( 'Appending value does not specified.' );\n\t\t}\n\t\t\n\t\t$this->_connect();\n\t\t\n\t\t$result = self::$_connection->rPush( $name, $value );\n\t\tif ( $resut == false ) {\n\t\t\t$values = $this->_getBase( $name, null );\n\t\t\tif ( $values instanceof ArrayIterator == false && is_array( $values ) == false ) {\n\t\t\t\trequire_once 'My/KeyValueStore/Exception.php';\n\t\t\t\tthrow new My_KeyValueStore_Exception( 'Specified key having value is not array or unsupported append method.' );\n\t\t\t}\n\t\t\tif ( $values instanceof ArrayIterator ) {\n\t\t\t\t$values->append( $value );\n\t\t\t} elseif ( is_array( $values ) == true || $values == null ) {\n\t\t\t\tif ( method_exists( $this, ( '_getAppendKey' ) ) ) {\n\t\t\t\t\t// _getAppendKeyというメソッドが実装されていれば、そこからキーを取得する\n\t\t\t\t\t$appendKey = $this->_getAppendKey( $name, $userId );\n\t\t\t\t\tif ( $appendKey === false || $appendKey == null ) {\n\t\t\t\t\t\trequire_once 'My/KeyValueStore/Exception.php';\n\t\t\t\t\t\tthrow new My_KeyValueStore_Exception( 'Appending key name does not get.' );\n\t\t\t\t\t}\n\t\t\t\t\t$values[ $appendKey ] = $value;\n\t\t\t\t} else {\n\t\t\t\t\t// 無ければ現在の配列に追記する\n\t\t\t\t\t$values[] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// _setBase 実行用パラメータ生成\n\t\t\t$setArgs = array(\n\t\t\t\t$values,\n\t\t\t\t$expiration,\n\t\t\t);\n\t\t\t$result = $this->_setBase( $name, $setArgs );\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "248aeed2426dee6767a63ae67c110253", "score": "0.49223354", "text": "function Add($name, $type, $primaryKey=0, $unique = 0)\n\t{\n\t\tarray_push($this->cols,array($name,$type,$primaryKey,$unique));\n\t}", "title": "" }, { "docid": "00b904f2699c26738d1404119337c461", "score": "0.4894428", "text": "function insert($arg_input)\n\t{\n\t\tprint_r($arg_input);\n\t\tforeach ($arg_input as $key => $value)\n\t\t{\n//\t\t\t$column_list[] = $key;\n\t\t\tif (is_null($value))\n\t\t\t\t$value_list[] = 'NULL';\n\t\t\telse\n\t\t\t\t$value_list[] = $this->quoteValue($key, $this->cleanSql($this->serializeValueIfArray($value)));\n\t\t}\n\t\t$column_list = array_keys($arg_input);\n\t\t$column_list = implode(',', $column_list);\n\t\t$value_list = implode(',', $value_list);\n\t\t$sqlsyntax = 'INSERT INTO ' . $this->db_table . ' (' . $column_list . ') VALUES (' . $value_list . ')';\n\n\t\t$this->execSql($sqlsyntax);\n//\t\t$arg_auto_increment = $this->insert_id;\n\t\treturn (($this->db_error_no == 0) ? true : false);\n\t}", "title": "" }, { "docid": "7e002024844f5990917e5742eea9d4cd", "score": "0.4894023", "text": "function array_column($input = null, $columnKey = null, $reindex=false, $indexKey = null)\n\t{\n\t\t// parameters and trigger errors exactly as the built-in array_column()\n\t\t// does in PHP 5.5.\n\t\t$argc = func_num_args();\n\t\t$params = func_get_args();\n\n\t\tif ($argc < 2) {\n\t\t\ttrigger_error(\"array_column() expects at least 2 parameters, {$argc} given\", E_USER_WARNING);\n\t\t\treturn null;\n\t\t}\n\n\t\tif (!is_array($params[0])) {\n\t\t\ttrigger_error('array_column() expects parameter 1 to be array, ' . gettype($params[0]) . ' given', E_USER_WARNING);\n\t\t\treturn null;\n\t\t}\n\n\t\tif (!is_int($params[1])\n\t\t\t&& !is_float($params[1])\n\t\t\t&& !is_string($params[1])\n\t\t\t&& $params[1] !== null\n\t\t\t&& !(is_object($params[1]) && method_exists($params[1], '__toString'))\n\t\t) {\n\t\t\ttrigger_error('array_column(): The column key should be either a string or an integer', E_USER_WARNING);\n\t\t\treturn false;\n\t\t}\n\n\t\tif (isset($params[2])\n\t\t\t&& !is_int($params[2])\n\t\t\t&& !is_float($params[2])\n\t\t\t&& !is_string($params[2])\n\t\t\t&& !(is_object($params[2]) && method_exists($params[2], '__toString'))\n\t\t) {\n\t\t\ttrigger_error('array_column(): The index key should be either a string or an integer', E_USER_WARNING);\n\t\t\treturn false;\n\t\t}\n\n\t\t$paramsInput = $params[0];\n\t\t$paramsColumnKey = ($params[1] !== null) ? (string) $params[1] : null;\n\n\t\t$paramsIndexKey = null;\n\t\tif (isset($params[2])) {\n\t\t\tif (is_float($params[2]) || is_int($params[2])) {\n\t\t\t\t$paramsIndexKey = (int) $params[2];\n\t\t\t} else {\n\t\t\t\t$paramsIndexKey = (string) $params[2];\n\t\t\t}\n\t\t}\n\n\t\t$resultArray = array();\n\n\t\tforeach ($paramsInput as $rk=>$row) {\n\n\t\t\t$key = $value = null;\n\t\t\t$keySet = $valueSet = false;\n\n\t\t\tif ($paramsIndexKey !== null && array_key_exists($paramsIndexKey, $row)) {\n\t\t\t\t$keySet = true;\n\t\t\t\t$key = (string) $row[$paramsIndexKey];\n\t\t\t}\n\n\t\t\tif ($paramsColumnKey === null) {\n\t\t\t\t$valueSet = true;\n\t\t\t\t$value = $row;\n\t\t\t} elseif (is_array($row) && array_key_exists($paramsColumnKey, $row)) {\n\t\t\t\t$valueSet = true;\n\t\t\t\t$value = $row[$paramsColumnKey];\n\t\t\t}\n\n\t\t\tif ($valueSet) {\n\t\t\t\tif ($reindex && $keySet) {\n\t\t\t\t\t$resultArray[$key] = $value;\n\t\t\t\t} else if($reindex) {\n\t\t\t\t\t$resultArray[] = $value;\n\t\t\t\t} else {\n\t\t\t$resultArray[$rk] = $value;\n\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn $resultArray;\n\t}", "title": "" }, { "docid": "9978ab3caaedbb4c299985f262c29daf", "score": "0.48818573", "text": "public function assoc($query, $args = array(), $keyfield = 0, $valuefield = 1)\r\n\t{\r\n\t\tif($this->query($query, $args)) {\r\n\t\t\tif(is_string($valuefield) && class_exists($valuefield, true)) {\r\n\t\t\t\t$this->fetch_class = $valuefield;\r\n\t\t\t\t$result = $this->pdo_statement->fetchAll();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$result = $this->pdo_statement->fetchAll(PDO::FETCH_NUM);\r\n\t\t\t}\r\n\t\t\t$output = array();\r\n\t\t\tforeach($result as $item) {\r\n\t\t\t\tif(is_object($item)) {\r\n\t\t\t\t\t$output[$item->$keyfield] = $item;\r\n\t\t\t\t}\r\n\t\t\t\telseif(is_array($item)) {\r\n\t\t\t\t\t$output[$item[$keyfield]] = $item[$valuefield];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $output;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "2477090eedc39b3e4c210e2f4c56ea70", "score": "0.4880537", "text": "public function lists($column, $key = null);", "title": "" }, { "docid": "2477090eedc39b3e4c210e2f4c56ea70", "score": "0.4880537", "text": "public function lists($column, $key = null);", "title": "" }, { "docid": "97070a603efba0e6d7c2ffb20d2d3417", "score": "0.48723164", "text": "public function columns($columns);", "title": "" }, { "docid": "5e290ad90433f0fcfb174c7d4329bcd8", "score": "0.4861399", "text": "protected function _appendBase( $name, array $arguments ) {\n\t\textract( self::_convertArguments( 'append', $arguments ) );\n\t\tif ( isset( $value ) == false ) {\n\t\t\trequire_once 'My/KeyValueStore/Exception.php';\n\t\t\tthrow new My_KeyValueStore_Exception( 'Appending value does not specified.' );\n\t\t}\n\t\t\n\t\t$this->_connect();\n\t\t$values = $this->_getBase( $name, null );\n\t\tif ( $values instanceof ArrayIterator == false && is_array( $values ) == false ) {\n\t\t\trequire_once 'My/KeyValueStore/Exception.php';\n\t\t\tthrow new My_KeyValueStore_Exception( 'Specified key having value is not array or unsupported append method.' );\n\t\t}\n\t\tif ( $values instanceof ArrayIterator ) {\n\t\t\t$values->append( $value );\n\t\t} elseif ( is_array( $values ) == true || $values == null ) {\n\t\t\tif ( method_exists( $this, ( '_getAppendKey' ) ) ) {\n\t\t\t\t// _getAppendKeyというメソッドが実装されていれば、そこからキーを取得する\n\t\t\t\t$appendKey = $this->_getAppendKey( $name, $userId );\n\t\t\t\tif ( $appendKey === false || $appendKey == null ) {\n\t\t\t\t\trequire_once 'My/KeyValueStore/Exception.php';\n\t\t\t\t\tthrow new My_KeyValueStore_Exception( 'Appending key name does not get.' );\n\t\t\t\t}\n\t\t\t\t$values[ $appendKey ] = $value;\n\t\t\t} else {\n\t\t\t\t// 無ければ現在の配列に追記する\n\t\t\t\t$values[] = $value;\n\t\t\t}\n\t\t}\n\t\t// _setBase 実行用パラメータ生成\n\t\t$setArgs = array(\n\t\t\t\t$values,\n\t\t\t\t$expiration,\n\t\t);\n\t\treturn $this->_setBase( $name, $setArgs );\n\t}", "title": "" }, { "docid": "35722fdc60170b3d6a1d0d4433617057", "score": "0.48582122", "text": "public function putAll($key, array $values);", "title": "" }, { "docid": "66f82361a8de5f5cdb461b7fc634fe2e", "score": "0.485335", "text": "protected function setKey(array $key) {\n if ( $this->key != $key ) {\n if ( count($key) != count(static::PRIMARY_KEYS) ) throw new \\Exception('Wrong number of key fields');\n foreach(static::PRIMARY_KEYS as $field) {\n if ( empty($key[$field]) ) throw new \\Exception('Key: '.$field.' not found in '.json_encode($key));\n $this->data[$field] = $key[$field]; // load() also does this\n }\n if ( $this->isLoaded() ) $this->unload();\n $this->key = $key;\n }\n return $this;\n }", "title": "" }, { "docid": "b40d0bb239a96810cb2911049968550f", "score": "0.48480722", "text": "private function array_column($input = null, $columnKey = null, $indexKey = null)\n {\n // parameters and trigger errors exactly as the built-in array_column()\n // does in PHP 5.5.\n $argc = func_num_args();\n $params = func_get_args();\n\n if ($argc < 2) {\n trigger_error(\"array_column() expects at least 2 parameters, {$argc} given\", E_USER_WARNING);\n return null;\n }\n\n if (!is_array($params[0])) {\n trigger_error('array_column() expects parameter 1 to be array, ' . gettype($params[0]) . ' given', E_USER_WARNING);\n return null;\n }\n\n if (!is_int($params[1])\n && !is_float($params[1])\n && !is_string($params[1])\n && $params[1] !== null\n && !(is_object($params[1]) && method_exists($params[1], '__toString'))\n ) {\n trigger_error('array_column(): The column key should be either a string or an integer', E_USER_WARNING);\n return false;\n }\n\n if (isset($params[2])\n && !is_int($params[2])\n && !is_float($params[2])\n && !is_string($params[2])\n && !(is_object($params[2]) && method_exists($params[2], '__toString'))\n ) {\n trigger_error('array_column(): The index key should be either a string or an integer', E_USER_WARNING);\n return false;\n }\n\n $paramsInput = $params[0];\n $paramsColumnKey = ($params[1] !== null) ? (string) $params[1] : null;\n\n $paramsIndexKey = null;\n if (isset($params[2])) {\n if (is_float($params[2]) || is_int($params[2])) {\n $paramsIndexKey = (int) $params[2];\n } else {\n $paramsIndexKey = (string) $params[2];\n }\n }\n\n $resultArray = array();\n\n foreach ($paramsInput as $row) {\n\n $key = $value = null;\n $keySet = $valueSet = false;\n\n if ($paramsIndexKey !== null && array_key_exists($paramsIndexKey, $row)) {\n $keySet = true;\n $key = (string) $row[$paramsIndexKey];\n }\n\n if ($paramsColumnKey === null) {\n $valueSet = true;\n $value = $row;\n } elseif (is_array($row) && array_key_exists($paramsColumnKey, $row)) {\n $valueSet = true;\n $value = $row[$paramsColumnKey];\n }\n\n if ($valueSet) {\n if ($keySet) {\n $resultArray[$key] = $value;\n } else {\n $resultArray[] = $value;\n }\n }\n\n }\n\n return $resultArray;\n }", "title": "" }, { "docid": "f497b3208edf634b78aaf4b2305d07ef", "score": "0.48471496", "text": "public function getWithKey($query, array $parameters = [], $keyField);", "title": "" }, { "docid": "c3d79919e7c248dfe58863d1289ea0f8", "score": "0.4844487", "text": "function fromAssociativeArray($rows, $columnsToShow) {\n\n $makeRow = function($values) {\n $escaped = array_map(function($v) { return str_replace('\"', '\"\"', $v); }, $values);\n return '\"' . implode('\",\"', $escaped) . '\"';\n };\n\n $output = $makeRow($columnsToShow);\n foreach ($rows as $r) {\n $output .= \"\\n\";\n $values = array();\n foreach ($columnsToShow as $c) $values[$c] = $r[$c];\n $output .= $makeRow($values);\n }\n return $output;\n}", "title": "" }, { "docid": "9ed93ea1e5ce21bd7f8d5ef34ed56a5d", "score": "0.48423037", "text": "public function select(...$keys):self\n {\n if (is_array($keys[0])){\n $keys = $keys[0];\n }\n if ( $this->select === [\"*\"]){\n $this->select = $keys;\n } else {\n $this->select = array_merge($this->select, $keys);\n }\n return $this;\n }", "title": "" }, { "docid": "6d79ffb9f8ba89e26dce0b8cd41eb64d", "score": "0.48383105", "text": "public function insert($key, array $data)\n\t{\n\t\t$row = array_merge($this->_defaultFields, $data);\n\t\t$row[$this->_keyField] = $key;\n\n\t\t$this->_db->insert($this->_table, $row);\n\t}", "title": "" }, { "docid": "58f297cb89823c0882001325b5062411", "score": "0.4836164", "text": "function add_user_columns($column) {\r\n $column['province'] = 'Province';\r\n $column['company'] = 'Company';\r\n $column['department'] = 'Department';\r\n\r\n return $column;\r\n}", "title": "" }, { "docid": "23b6b2dad2c9d5228446810dadd5b015", "score": "0.48340556", "text": "protected function _insert_batch($table, $keys, $values) {\n return 'INSERT INTO ' . $table . ' (' . implode(', ', $keys) . ') VALUES ' . implode(', ', $values);\n }", "title": "" }, { "docid": "81a8ef42210532c3fe803465988aa3f5", "score": "0.48328638", "text": "public function add($key, $value);", "title": "" }, { "docid": "81a8ef42210532c3fe803465988aa3f5", "score": "0.48328638", "text": "public function add($key, $value);", "title": "" }, { "docid": "81a8ef42210532c3fe803465988aa3f5", "score": "0.48328638", "text": "public function add($key, $value);", "title": "" }, { "docid": "81a8ef42210532c3fe803465988aa3f5", "score": "0.48328638", "text": "public function add($key, $value);", "title": "" }, { "docid": "692fc87a44c11e7b6ac1c7ce66b59e90", "score": "0.482977", "text": "public function addRows(array $rows);", "title": "" }, { "docid": "231ed31f5d6c32e3d18064ea0e918f60", "score": "0.48293802", "text": "function update_userkeys_batch()\n\t{\n\t\t$strSQL = \"\";$i=0;$dataArray = $this->user_keys_batch;\n\t\t$strSQL .= \"UPDATE user_test_details\";\n\t\t$strSQL .= \" SET user_keys = CASE id\";\n\t\t$id_list=\"\";\n\t\tif(count($dataArray)>0)\n\t\t{\n\t\t\tforeach($dataArray as $key=>$value)\n\t\t\t{\n\t\t\t\t$strSQL .=\" WHEN '\".mysql_real_escape_string(trim($key)).\"' THEN '\".mysql_real_escape_string(trim($value)).\"'\";\n\t\t\t\t$id_list .= \"'\".$key.\"',\";\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$strSQL .= \" END WHERE id IN(\".substr($id_list,0,-1).\")\";\n\t\t\t$rsRES = mysql_query($strSQL,$this->connection) or die ( mysql_error() . $strSQL );\n\t\t\t//echo $strSQL;exit();\n\t\t\tif ( mysql_affected_rows($this->connection) > 0 ) {\n\t\t\t\t$this->update_count = mysql_affected_rows($this->connection);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "025734374135e1c0735c995116f21066", "score": "0.48160377", "text": "function add($data){\n\t\t\t$query = \"INSERT INTO \".$this->table.\"(\";\n\t\t\t$struct = \"\";\n\t\t\t$values = \" VALUES(\";\n\t\t\tforeach ($data as $key => $value) {\n\t\t\t\t$struct .= \"$key,\";\n\t\t\t\t$values .= \":$key,\"; \n\t\t\t}\n\t\t\t$struct = substr($struct, 0, strlen($struct)-1).\")\";\n\t\t\t$values = substr($values, 0, strlen($values)-1).\")\";\n\t\t\t$query .= $struct.$values;\n\t\t\t$sth = $this->dbh->prepare($query);\n\t\t\t$sth->execute($data);\n\t\t}", "title": "" }, { "docid": "d312a61dbd8d1dad0111cdb4884cf235", "score": "0.48131037", "text": "public function hasMultiple($key);", "title": "" }, { "docid": "298f54dd246c838520015e411ff9807e", "score": "0.480704", "text": "function mysql_on($data, $table_1, $table_2)\n {\n $return = '';\n foreach ($data as $key_pair) {\n if (!empty($return)) {\n $return .= ' and';\n }\n $return .= ' `' . $this->mysql->real_escape_string($table_1) . '`.`' . $this->mysql->real_escape_string($key_pair['key_1']) . '`';\n $return .= ' = `' . $this->mysql->real_escape_string($table_2) . '`.`' . $this->mysql->real_escape_string($key_pair['key_2']) . '`';\n }\n return $return;\n }", "title": "" }, { "docid": "0fa1cb63f1de7fe5f280cdb5b76f8296", "score": "0.47902602", "text": "public function addExtraName($key, $value);", "title": "" }, { "docid": "c5f133cd304d5cf4bee2588f85294f23", "score": "0.47774866", "text": "protected function appendBindings(string $key, string $sql, array $bindables) : string\n {\n $parts = explode('?', $sql);\n $i = 0;\n foreach (array_values($bindables) as $bindable) {\n if (is_array($bindable)) {\n continue;\n }\n if ($bindable instanceof Select) {\n $parts[$i] .= \"$bindable\";\n $parts[$i] = $this->appendBindings(\n $key,\n $parts[$i],\n $bindable->getBindings()\n );\n } else {\n $parts[$i] .= '?';\n $this->bindables[$key][] = $bindable;\n }\n ++$i;\n }\n $sql = implode('', $parts);\n return $sql;\n }", "title": "" }, { "docid": "52ec91472b76065f9368fcf1eb0dcba5", "score": "0.4776942", "text": "public function zadd($key, ...$dictionary)\n {\n if (is_array(end($dictionary))) {\n foreach (array_pop($dictionary) as $member => $score) {\n $dictionary[] = $score;\n $dictionary[] = $member;\n }\n }\n\n $key = $this->applyPrefix($key);\n\n return $this->executeRaw(array_merge(['zadd', $key], $dictionary));\n }", "title": "" }, { "docid": "21f24d6f5ed91d9a6abf956513ee01c7", "score": "0.47727263", "text": "public function loadRowList($key = null);", "title": "" }, { "docid": "18f76464b24294197c94aa6605188300", "score": "0.47697634", "text": "protected function addQuery($key, $value) {\n if (!isset($this->options['query'])) {\n $this->options['query'] = array();\n }\n\n $this->options['query'][$key] = $value;\n }", "title": "" }, { "docid": "d3f9bfa1af640a7c829f033dbdc50891", "score": "0.47688937", "text": "public function exists($key, ...$other_keys) {}", "title": "" } ]
81efea71f9161cefc413aa08d13d276e
Returns the minor device number.
[ { "docid": "dbe10cd6df763366d627730ab1889e70", "score": "0.7256975", "text": "public function getMinor()\n {\n return $this->fileStructure->minor;\n }", "title": "" } ]
[ { "docid": "db6a85efef02cd7ccfc64609ec90dbb6", "score": "0.7581376", "text": "public function getOsVersionMinor()\n {\n return $this->os_minor;\n }", "title": "" }, { "docid": "5eaa32e5d59cb59bf2fecbe72904d58f", "score": "0.7535147", "text": "public function getOsMinorVersion()\n {\n return $this->os_minor_version;\n }", "title": "" }, { "docid": "9d1676aa2e2da0a8d292d7b56129ff6c", "score": "0.74245846", "text": "public function getMinor()\n {\n return $this->minor;\n }", "title": "" }, { "docid": "89d9645bd05207872adc5658cdc1f203", "score": "0.73070705", "text": "public function getMinorVersion()\n {\n return $this->minor_version;\n }", "title": "" }, { "docid": "921d8c2c3cf6749c1730506f18e68e6e", "score": "0.6943479", "text": "public function versionMinor() { return $this->_m_versionMinor; }", "title": "" }, { "docid": "c73cc0816efb398bbaadf6ce0d58fb39", "score": "0.68899995", "text": "public function getOsMinorVersionUnwrapped()\n {\n return $this->readWrapperValue(\"os_minor_version\");\n }", "title": "" }, { "docid": "a230aac7e407e828c671b3748e343258", "score": "0.6849375", "text": "public function getBrowserVersionMinor()\n {\n return $this->browser_minor;\n }", "title": "" }, { "docid": "805506e621c8c0d189a5458e15833623", "score": "0.6603211", "text": "public function getMinorVersion() {}", "title": "" }, { "docid": "7b0168e6ef1c0f20dd0503482724391f", "score": "0.6540036", "text": "public function getMinorTickCount() {\r\n return $this->minorTickCount;\r\n }", "title": "" }, { "docid": "05612bb87cb52b0c0453bb8ded24fbce", "score": "0.64744747", "text": "public function getMinorVersion(): ?string {\n return $this->minorVersion;\n }", "title": "" }, { "docid": "1922cb4f71f81c124db2c398cfa50435", "score": "0.62568486", "text": "public function getDeviceSerialNumber()\n {\n return $this->deviceSerialNumber;\n }", "title": "" }, { "docid": "aff7e36cefc68f107c3d4f91b7824dca", "score": "0.6188811", "text": "public function getDeviceVersion()\n {\n return $this->device_version;\n }", "title": "" }, { "docid": "5eba25bcc7fa5ca8c4bf25fe06305090", "score": "0.6171645", "text": "public function getOsVersionMajor()\n {\n return $this->os_major;\n }", "title": "" }, { "docid": "8237ef03e9503ad057e3f03c2649e5a3", "score": "0.6144657", "text": "function getmaxno()\n\t{\n\t\t$this->db->select_max('device_no', 'no');\n\t\treturn $this->db->get($this->table);\n\t}", "title": "" }, { "docid": "6cdc66a85695e9a32c1c3d076f5fd462", "score": "0.6120697", "text": "public function getMajor()\n {\n return $this->major;\n }", "title": "" }, { "docid": "80c514ae2087c8102e092a4d07a18b97", "score": "0.6107298", "text": "public function getMajor() {\n return $this->major;\n }", "title": "" }, { "docid": "4afa5f77d20547668db051910dac3bfe", "score": "0.601601", "text": "public function getMajor()\n {\n return $this->fileStructure->major;\n }", "title": "" }, { "docid": "ef2a563eac176600558cf50363dc3ebe", "score": "0.591181", "text": "public function getDevice(): ?int\n {\n return $this->device;\n }", "title": "" }, { "docid": "5ca4454da4316563b0b5613c939f4378", "score": "0.5907553", "text": "public function minorUnit($value) {\n return $this->setProperty('minorUnit', $value);\n }", "title": "" }, { "docid": "991c011a85f10bb6f15ae948f5e35349", "score": "0.58993566", "text": "function getMajor() {\n\t\treturn $this->getInfo('Major');\n\t}", "title": "" }, { "docid": "a87b3de73827929f14df802aa44e5fd7", "score": "0.5795962", "text": "public function getDevice()\n {\n return $this->readOneof(9);\n }", "title": "" }, { "docid": "083f22f22fc6b0f6be84b5786f737a97", "score": "0.578046", "text": "public function getPlatform()\n {\n $value = $this->get(self::platform);\n return $value === null ? (integer)$value : $value;\n }", "title": "" }, { "docid": "9d12d02f3d25845e9f756f901dd50598", "score": "0.57804483", "text": "private function getBrowserMajorVer()\n {\n if(isset($this->browser->MajorVer))\n {\n return $this->browser->MajorVer;\n }\n else\n {\n return $this->browser->majorver;\n }\n }", "title": "" }, { "docid": "25f1d92df8dff759dc66b11ff83c346d", "score": "0.57483256", "text": "function get_version_max() {\n return $this->version_max;\n }", "title": "" }, { "docid": "d89ac182cb08dc048c38b4a053061072", "score": "0.5635238", "text": "public function testGetMinor(): void\n {\n $model = OsVersion::load([\n \"minor\" => 46290,\n ], $this->container);\n\n $this->assertSame(46290, $model->getMinor());\n }", "title": "" }, { "docid": "9e6f2ded155b4cb54210a306e6681621", "score": "0.5613094", "text": "public function getOsVersionPatch()\n {\n return $this->os_patch;\n }", "title": "" }, { "docid": "488791b2d8c8d8bc76ba49db29e54fa9", "score": "0.56042236", "text": "public function get_hardwareId(): string\n {\n // $serial is a str;\n\n $serial = $this->get_serialNumber();\n return $serial . '.module';\n }", "title": "" }, { "docid": "58b81df468d7d833fd8006017568ba67", "score": "0.5602226", "text": "public function setMinorVersion($var)\n {\n GPBUtil::checkInt32($var);\n $this->minor_version = $var;\n\n return $this;\n }", "title": "" }, { "docid": "7235db1b32aedfe11ce38e4e387363fe", "score": "0.56004745", "text": "public function getMajorishAttribute(): string\n {\n $majorish = $this->major;\n\n if ($this->major < 6) {\n $majorish .= '.' . $this->minor;\n }\n\n return $majorish;\n }", "title": "" }, { "docid": "c53a505cb15a39110d636d0b74c09421", "score": "0.5559698", "text": "public function getDevice()\n {\n return $this->fileStructure->device;\n }", "title": "" }, { "docid": "66b93481b94eac9a77b8afcad2c1311d", "score": "0.55174553", "text": "public function getBrowserVersionMajor()\n {\n return $this->browser_major;\n }", "title": "" }, { "docid": "0df6f47b81d32b428826bf15ff506c71", "score": "0.5498797", "text": "private function getPlatform()\n\t{\n\t\t$this->platform = mt_rand(1, 3);\n\n\t\treturn $this->platform;\n\t}", "title": "" }, { "docid": "4eb8abeae87ee06cfefeae2ac41d8913", "score": "0.5465699", "text": "public function getMaxNumber()\n {\n return $this->maxNumber;\n }", "title": "" }, { "docid": "92be7e51344ce3df31fb34c1c77c1924", "score": "0.54617786", "text": "public function getOsMajorVersion()\n {\n return $this->os_major_version;\n }", "title": "" }, { "docid": "f7bb9697b2558dbc7dbb03bd678e0301", "score": "0.5426604", "text": "public function getDeviceId()\n {\n return $this->device_id;\n }", "title": "" }, { "docid": "0b1b57ff6a1260f561c77af81c4bb3c0", "score": "0.5422546", "text": "public function get_serialNumber(): string\n {\n // $res is a string;\n // $dev is a YDevice;\n if ($this->_cacheExpiration == 0) {\n $dev = $this->_getDev();\n if (!($dev == null)) {\n return $dev->getSerialNumber();\n }\n if ($this->load(YAPI::$_yapiContext->GetCacheValidity()) != YAPI::SUCCESS) {\n return self::SERIALNUMBER_INVALID;\n }\n }\n $res = $this->_serialNumber;\n return $res;\n }", "title": "" }, { "docid": "474c767a15e15564cb7fb29a4918b1fe", "score": "0.53914285", "text": "public function getMajorAttribute()\n {\n return Str::before($this->version_number, '.');\n }", "title": "" }, { "docid": "47a866824e77dbf36010d32992ef361d", "score": "0.5391223", "text": "public function setMinor($minor)\n {\n $this->minor = $minor;\n\n return $this;\n }", "title": "" }, { "docid": "72429a1094d16e5ae9fcb500292b4c48", "score": "0.5385336", "text": "public function getDevice()\n {\n return $this->device;\n }", "title": "" }, { "docid": "72429a1094d16e5ae9fcb500292b4c48", "score": "0.5385336", "text": "public function getDevice()\n {\n return $this->device;\n }", "title": "" }, { "docid": "72429a1094d16e5ae9fcb500292b4c48", "score": "0.5385336", "text": "public function getDevice()\n {\n return $this->device;\n }", "title": "" }, { "docid": "72429a1094d16e5ae9fcb500292b4c48", "score": "0.5385336", "text": "public function getDevice()\n {\n return $this->device;\n }", "title": "" }, { "docid": "c236b3bdbe59c9bb8c377508bc96e019", "score": "0.53555727", "text": "public function versionMajor() { return $this->_m_versionMajor; }", "title": "" }, { "docid": "14e0243a79311c3ea7c07ec0f6bfcb0b", "score": "0.53505605", "text": "public function getSerialNumber() {\n\t\treturn self::$_serialNumber;\n\t}", "title": "" }, { "docid": "5fa40eb378c5783d2fff63f62ff1ea25", "score": "0.53036934", "text": "private function getMaxAvailableVersion()\n {\n echo \"Getting the max available version: \";\n\n $maxAvailableVersion = 0;\n\n foreach ($this->getDeltas() as $deltaNum => $delta) {\n if ($maxAvailableVersion < $deltaNum) {\n $maxAvailableVersion = $deltaNum;\n }\n }\n\n echo \"$maxAvailableVersion.\\n\";\n\n return $maxAvailableVersion;\n }", "title": "" }, { "docid": "582a76b318d5e3086773f2353e2d7888", "score": "0.5299648", "text": "public function getLabelVersionNo()\n\t{\n\t\treturn $this->labelVersionNo;\n\t}", "title": "" }, { "docid": "bdb84d6036b6ea35c4dcabf8f99f3ca9", "score": "0.5287099", "text": "public function getPlatform()\n\t{\n\n\t\treturn $this->getModelRow('platform');\n\t}", "title": "" }, { "docid": "85d9bd3b615dfb0c1f8473adffd7fc2a", "score": "0.5234063", "text": "public function getOsVersion()\n {\n return $this->os_version;\n }", "title": "" }, { "docid": "2196b86e442b147e21ab6eeded87e82b", "score": "0.52204365", "text": "public function getPrecioVentaMinorista()\n\t{\n\t\treturn $this->precio_venta_minorista;\n\t}", "title": "" }, { "docid": "3f573d92f8e47c338d3095a8547f5b94", "score": "0.5198321", "text": "public function getVersionNo()\n {\n return $this->versionNo;\n }", "title": "" }, { "docid": "cf83c0798af993e3879b37809e7bf552", "score": "0.51968235", "text": "public function getProductNum()\n {\n $value = $this->get(self::product_num);\n return $value === null ? (integer)$value : $value;\n }", "title": "" }, { "docid": "f133d2b11f8c7ea1e788f41a242e9a10", "score": "0.5196353", "text": "public function getDeviceModel() {}", "title": "" }, { "docid": "bb473ec56b64721d374327745a843a8e", "score": "0.5189427", "text": "public function version()\n {\n if ($this->_version === null) {\n if (file_exists($this->appPath.'VERSION')) {\n $this->_version = trim(str_replace(array('SERIAL', \"\\n\"),\n array('0', ''),\n file_get_contents($this->appPath.'VERSION')));\n } else {\n $this->_version = '0';\n }\n }\n\n return $this->_version;\n }", "title": "" }, { "docid": "af90601086b1d9a5718c5b030a3b3e77", "score": "0.51885915", "text": "function getLatestBatteryNumber( $conn, $batchNo )\n{\n\t$result = mysqli_query($conn, \"SELECT battery_num FROM released_batteries WHERE batch_num='$batchNo' ORDER BY battery_num DESC LIMIT 1;\");\n\n\tif ( mysqli_num_rows($result) > 0) {\n\t\tif($row = mysqli_fetch_array($result)) {\n\t\t\treturn (int)($row[\"battery_num\"]);\n\t\t}\n\t\telse{\n\t\t\treturn 0;\n\t\t}\n\t} else {\n\t\treturn 0;\n\t}\n}", "title": "" }, { "docid": "ea234e44fe3c5b0a168c0b35cbd932d8", "score": "0.5179221", "text": "public function getSerialNumber()\n {\n return $this->serialNumber;\n }", "title": "" }, { "docid": "6f7479c388f094eb38c53ff3e456827e", "score": "0.515114", "text": "public function getPlatformID()\n {\n return $this->platformID;\n }", "title": "" }, { "docid": "906a71ec2c1c39fe5b8ef27a5f992381", "score": "0.5150141", "text": "public function getPlatform()\n\t{\n\t\treturn $this->platform;\n\t}", "title": "" }, { "docid": "efc61ea2f56031dde91fc98656e01d43", "score": "0.5143491", "text": "public function getDeviceId()\n {\n return $this->deviceId;\n }", "title": "" }, { "docid": "7f804712f46900948edf4c4ae4b9955b", "score": "0.5140961", "text": "public function getMajorVersion()\n {\n return $this->major_version;\n }", "title": "" }, { "docid": "42d3a5046272ff7b3a3041bfc978c059", "score": "0.5132173", "text": "public function getOsVersion() : string\n {\n return $this->osVersion;\n }", "title": "" }, { "docid": "aefae3d0c1f750dab70395117337b845", "score": "0.512803", "text": "public function getLastBatchNo()\n {\n $query = \"SELECT max(BatchNumber) AS BatchNumber FROM voucherbatch\";\n $sql = Yii::app()->db->createCommand($query);\n $result = $sql->queryRow();\n \n if($result['BatchNumber'] > 0)\n return $result['BatchNumber'] + 1;\n else\n return 1;\n }", "title": "" }, { "docid": "5e43fbf86a960f2e03756016484d71ef", "score": "0.51273197", "text": "public function getSerial() : int\n {\n return $this->getValue('nb_domain_zone_serial');\n }", "title": "" }, { "docid": "33b275e4454c90912a4cbf16a3d164a7", "score": "0.5126573", "text": "public function getOsMajorVersionUnwrapped()\n {\n return $this->readWrapperValue(\"os_major_version\");\n }", "title": "" }, { "docid": "026ae591c9fac8787cba88766e313b42", "score": "0.51217353", "text": "private function getFirmwareVersion()\n {\n return $this->getRemote($this->RemoteQuery['ip'], \"SNMPv2-MIB::sysDescr.0\", $this->RemoteQuery['community'], \"STRING:\");\n }", "title": "" }, { "docid": "cd61b89adb1d770236b5efc66a06b500", "score": "0.51151514", "text": "public function getMachine()\n {\n return php_uname('m');\n }", "title": "" }, { "docid": "aac86c843415f75b6b1492dd88fb09b5", "score": "0.51042396", "text": "public function getRelease()\n {\n return php_uname('r');\n }", "title": "" }, { "docid": "773235952ee1c83b437ba78902a87e61", "score": "0.50986534", "text": "public function getPlatform_id()\n {\n return $this->platform_id;\n }", "title": "" }, { "docid": "30888e1a6a50539753b97ccd4f4aa798", "score": "0.5091335", "text": "public function getPlatform()\n {\n return $this->platform;\n }", "title": "" }, { "docid": "711a5a2b7aac6d4aba259514f0158b8e", "score": "0.5086905", "text": "public final function getBuild()\n {\n /**\n * DO NOT FORGET !!! to update GEMS__PATCH_LEVELS:\n *\n * For new installations the initial patch level should\n * be THIS LEVEL plus one.\n *\n * This means that future patches for will be loaded,\n * but that previous patches are ignored.\n */\n return 59;\n }", "title": "" }, { "docid": "4c06fa8e0ac51ee56295d3e626c5cc62", "score": "0.50822365", "text": "public function getmaxNumberDisregardChipCount()\n {\n return $this->maxNumberDisregardChipCount;\n }", "title": "" }, { "docid": "78315fb7b50cc29d0dda22e32e620eea", "score": "0.5076063", "text": "public function getMax()\r\n {\r\n if (count($this->aNotes) === 0) {\r\n return 0;\r\n }\r\n $fMax = $this->aNotes[0];\r\n foreach ($this->aNotes as $fNote) {\r\n if ($fNote > $fMax) {\r\n $fMax = $fNote;\r\n }\r\n }\r\n return $fMax;\r\n }", "title": "" }, { "docid": "69b979e78b19f7b6569edf5b22bfa378", "score": "0.5031947", "text": "public function getHeaderPlatformGID()\r\n\t{\r\n\t\treturn $this->headers[SONIC_HEADER__PLATFORM_GID];\r\n\t}", "title": "" }, { "docid": "f45bd199734fca0a1ea171efb108577c", "score": "0.50279915", "text": "public function getMasterDevice ()\n {\n if (!isset($this->_masterDevice))\n {\n $this->_masterDevice = MasterDeviceMapper::getInstance()->find($this->masterDeviceId);\n }\n\n return $this->_masterDevice;\n }", "title": "" }, { "docid": "f45bd199734fca0a1ea171efb108577c", "score": "0.50279915", "text": "public function getMasterDevice ()\n {\n if (!isset($this->_masterDevice))\n {\n $this->_masterDevice = MasterDeviceMapper::getInstance()->find($this->masterDeviceId);\n }\n\n return $this->_masterDevice;\n }", "title": "" }, { "docid": "dfdb1064ffb50981acf89b75f814f521", "score": "0.5026245", "text": "public function getPlatformNo():string\n {\n return $this->platformNo; \n }", "title": "" }, { "docid": "ba66afbdfd9713addc62e61a32d2b3a0", "score": "0.5022241", "text": "public function getInfoSerialNumber() {\n //\n // 3COM\n return PNMSnmp::get($this, '1.3.6.1.2.1.47.1.1.1.1.11.1', Yii::app()->params['cacheTtlGetSnmp']);\n }", "title": "" }, { "docid": "ab01ce65a9b207a62f5212c457c1bbe8", "score": "0.50170714", "text": "public function getLatestCanon(){\n\t\t$sql = \"SELECT * FROM tbl_product WHERE brandId='9' ORDER BY pid DESC LIMIT 1\";\n\t\t$result = $this->db->select($sql);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "8190adc247558399788a741381889dec", "score": "0.50155413", "text": "public function getPlatform()\n {\n return $this->parser->getPlatform();\n }", "title": "" }, { "docid": "81993cbb45bc9bb00c48074d751e40c6", "score": "0.5012611", "text": "function getCalibrationMaxSerial($DbConnection)\n{\n\t$query =\"select Max(sno)+1 as seiral_no from calibration\"; \n\t$result=mysql_query($query,$DbConnection);\n\t$row=mysql_fetch_row($result);\n\treturn $row[0];\n}", "title": "" }, { "docid": "4493a9c94918f4dc3054ce4e2834fc1f", "score": "0.5005852", "text": "public function getDeviceModel()\n {\n return $this->deviceModel;\n }", "title": "" }, { "docid": "3dca26397604874ba269022fa764ff5a", "score": "0.49863794", "text": "public function getMajorVersion(): string {\n return $this->majorVersion;\n }", "title": "" }, { "docid": "b5f6b6dcd782b40888cab6be5543a650", "score": "0.49807832", "text": "public function EngineVersionNumber() {\n $version = $this->EngineVersion();\n $start = strpos($version['VERSION'], '.');\n return intval(substr($version['VERSION'], 0, $start));\n }", "title": "" }, { "docid": "44ffa954344ef2a4327bb49946cb0bb8", "score": "0.49736878", "text": "static public function GetDeviceID() {\n if (isset(self::$devid))\n return self::$devid;\n else\n return false;\n }", "title": "" }, { "docid": "ba6ab3c025c6764fe71c4c6e96720e69", "score": "0.49465176", "text": "public function getFirmware()\n {/*{{{*/\n return $this->_firmware;\n }", "title": "" }, { "docid": "dfc8506e2b46d9d7512c1fc6b15a64f8", "score": "0.49456665", "text": "public function setOsMinorVersionUnwrapped($var)\n {\n $this->writeWrapperValue(\"os_minor_version\", $var);\n return $this;}", "title": "" }, { "docid": "e17c3a922ae0972b2b422a8d8a80ed5c", "score": "0.49456054", "text": "private function getSymfonyVersion()\n {\n $symfonyVersion = \\Symfony\\Component\\HttpKernel\\Kernel::VERSION;\n $symfonyVersion = explode('.', $symfonyVersion, -1);\n $symfonyMajorMinorVersion = implode('.', $symfonyVersion);\n return $symfonyMajorMinorVersion;\n }", "title": "" }, { "docid": "5dce8647bf5389ae7e4614c0d64aa226", "score": "0.4938722", "text": "public function getLongVersion()\n {\n return $this->PRODUCT . ' ' . $this->RELEASE . '.' . $this->DEV_LEVEL . ' '\n . $this->DEV_STATUS . ' [ ' . $this->CODENAME . ' ] ' . $this->RELDATE . ' '\n . $this->RELTIME . ' ' . $this->RELTZ;\n }", "title": "" }, { "docid": "d5dc9283dae61f3544d136baf3185aeb", "score": "0.4936562", "text": "public function getDeviceId()\n {\n if (array_key_exists(\"deviceId\", $this->_propDict)) {\n return $this->_propDict[\"deviceId\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "05f291a5ffdea92b53982901dcc2afc6", "score": "0.49293032", "text": "public function getMdmMinimumOSVersion()\n {\n if (array_key_exists(\"mdmMinimumOSVersion\", $this->_propDict)) {\n return $this->_propDict[\"mdmMinimumOSVersion\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "1ce1e98abcdf4d35f8a0b188222476ed", "score": "0.4919515", "text": "public function getDeviceManufacturer()\n {\n return $this->deviceManufacturer;\n }", "title": "" }, { "docid": "11f602b61b2c3487e661c287cb725e5f", "score": "0.4915844", "text": "public function getKey()\n\t{\n\t\treturn 'B Major';\n\t}", "title": "" }, { "docid": "2ffffebdd981d9f2723ba5bce268e882", "score": "0.4908239", "text": "protected static function max_id(){\n\n\t\t$rows = static::_scandir(static::path());\n\n\t\tif($rows){\n\n\t\t\tforeach ($rows as &$value) {\n\n\t\t\t\t$row[] = str_replace(EXT, '', $value);\n\n\t\t\t\tunset($value);\n\t\t\t}\n\n\t\t}else{\n\n\t\t\t$row = array(0);\n\t\t}\n\n\t\treturn intval(max($row));\n\t}", "title": "" }, { "docid": "cdc8dd67e279c8cbb8e1d66a74f4186d", "score": "0.48977262", "text": "public function getExtensionVersion()\n {\n $moduleInfo = $this->moduleList->getOne(self::MODULE_CODE);\n\n return $moduleInfo['setup_version'];\n }", "title": "" }, { "docid": "cdc8dd67e279c8cbb8e1d66a74f4186d", "score": "0.48977262", "text": "public function getExtensionVersion()\n {\n $moduleInfo = $this->moduleList->getOne(self::MODULE_CODE);\n\n return $moduleInfo['setup_version'];\n }", "title": "" }, { "docid": "753e6c7d8b31c0258380e8f96230828e", "score": "0.4892418", "text": "public function minorTicks($value) {\n return $this->setProperty('minorTicks', $value);\n }", "title": "" }, { "docid": "f5c4a96c95476c185695587077446bf5", "score": "0.48873866", "text": "public function getServerVersion ()\n {\n $this->_connect();\n\n try\n\t\t{\n $version = $this->_connection->getAttribute(EhrlichAndreas_Db_Abstract::ATTR_SERVER_VERSION);\n }\n\t\tcatch (Exception $e)\n\t\t{\n // In case of the driver doesn't support getting attributes\n return null;\n }\n\n $matches = array();\n\n if (preg_match('/((?:[0-9]{1,2}\\.){1,3}[0-9]{1,2})/', $version, $matches))\n {\n return $matches[1];\n }\n else\n {\n return null;\n }\n }", "title": "" }, { "docid": "427dfcd9ba1fc393db5915df87212b89", "score": "0.48785728", "text": "public function getYoungestPatchRelease() {}", "title": "" }, { "docid": "263e22fccafaa8badee2e168dc432b56", "score": "0.48762977", "text": "function get_maxcustindexrecnbr($debug = false) {\n\t\t$q = (new QueryBuilder())->table('custindex');\n\t\t$q->field($q->expr('MAX(recno)'));\n\t\t$sql = DplusWire::wire('database')->prepare($q->render());\n\t\tif ($debug) {\n\t\t\treturn $q->generate_sqlquery();\n\t\t} else {\n\t\t\t$sql->execute();\n\t\t\treturn $sql->fetchColumn();\n\t\t}\n\t}", "title": "" }, { "docid": "1ebbc414b6573f747137a1cca008f309", "score": "0.48740393", "text": "protected function getMinimumPatchLevel()\r\n {\r\n static $level;\r\n\r\n if (! $level) {\r\n $level = intval($this->db->fetchOne(\"SELECT COALESCE(MIN(gpl_level), 1) FROM gems__patch_levels\"));\r\n }\r\n\r\n return $level;\r\n }", "title": "" }, { "docid": "6762898187bbdc341734d685b121e28d", "score": "0.48649117", "text": "public function version() {\n\t\t$app = $this->app;\n\t\treturn intval($app::VERSION);\n\t}", "title": "" } ]
b246c4199841b18e1276b349ccb1975b
Gets an existing Wide Pay charge based on the notification ID
[ { "docid": "019145a7f7e9347339b67c39b3aa16e7", "score": "0.6928387", "text": "public function getNotificationCharge($notification_id)\n {\n return $this->apiRequest('recebimentos/cobrancas/notificacao', ['id' => $notification_id], 'POST');\n }", "title": "" } ]
[ { "docid": "def4b34dca00382e4d8044a761d698af", "score": "0.6184393", "text": "public function get_application_charge($charge_id){\n $uri = \"/admin/recurring_application_charges/\" . $charge_id . \".json\";\n $shopify_api = $this->_shopifyApi();\n $the_charge = $shopify_api('GET', $uri, []);\n return $the_charge;\n }", "title": "" }, { "docid": "273edc7911947a487b86f070d1ea0163", "score": "0.5855056", "text": "public function get_notification($id)\n {\n return $this->db->get_where('custom_notifications', array('notification_id' => $id));\n }", "title": "" }, { "docid": "a2ae4ee60be88a557ac0666176191105", "score": "0.57809174", "text": "public function get_single(int $notifID) : Notification {\n\n\t\t//Perform database request\n\t\t$conditions = \"WHERE id = ?\";\n\t\t$values = array($notifID);\n\n\t\t//Perform the request\n\t\t$result = CS::get()->db->select(self::NOTIFICATIONS_TABLE, $conditions, $values);\n\n\t\t//Check for error\n\t\tif(count($result) == 0)\n\t\t\treturn new Notification(); //Return empty notification\n\t\t\n\t\t//Parse and return notification\n\t\treturn $this->dbToNotification($result[0]);\n\n\t}", "title": "" }, { "docid": "f29c74a0acc5692021beae679b49b7d8", "score": "0.5743483", "text": "public function charge($id = null)\n {\n return new Charge($this->gateway, $this->getNativeResponse(), $id);\n }", "title": "" }, { "docid": "f29c74a0acc5692021beae679b49b7d8", "score": "0.5743483", "text": "public function charge($id = null)\n {\n return new Charge($this->gateway, $this->getNativeResponse(), $id);\n }", "title": "" }, { "docid": "80116a754fb3285a9b35e44336deb230", "score": "0.57224524", "text": "public function getCharge($charge_id)\n {\n return $this->apiRequest('recebimentos/cobrancas/consultar', ['id' => $charge_id], 'POST');\n }", "title": "" }, { "docid": "79174affa5a3637640c3aea6e827b506", "score": "0.57221526", "text": "public function getCharges($id){\n\n $url = \"https://api.commerce.coinbase.com/charges/$id\";\n\n try{\n\n $ch = curl_init();\n curl_setopt($ch,CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\"X-CC-Api-Key:$this->apikey\",\n \"X-CC-Version: 2018-03-22\",'Content-Type: application/json'));\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $result = curl_exec($ch);\n curl_close($ch);\n return $result;\n }catch (\\Exception $exception){\n\n return $exception;\n }\n\n\n }", "title": "" }, { "docid": "bf057c9f6c732e06308e69654f04114e", "score": "0.57097036", "text": "abstract public function getCharge();", "title": "" }, { "docid": "fa527fb35bc57624f207414a3327eb92", "score": "0.5695933", "text": "public function getChargeCurrencyId() {\n\treturn $this->storeContainer->getCurrencyHandler()->getWorkingCurrencyId();\n }", "title": "" }, { "docid": "584aa17e8157d7853115f46b2d64cb6e", "score": "0.56563795", "text": "public function getPayment($id){\n $uri = '/collections/notifications/'.$id;\n if($this->sandBox()){\n $uri = '/sandbox'.$uri;\n }\n try {\n $response = CurlClient::get(CurlClient::buildQuery(self::API_URL . $uri, [\n 'access_token' => $this->accessToken()\n ]));\n return new Payment($response['response']['collection']);\n }catch (Exception $e){\n return null;\n }\n }", "title": "" }, { "docid": "3845f7f33deef5c554267a2527a16f4a", "score": "0.5654369", "text": "public function getByNotificationId($user,int $notificationId): Notification;", "title": "" }, { "docid": "83c1986a1ebf02d767750ae7acbd2d61", "score": "0.5558373", "text": "public function getCharge()\n {\n return $this->charge;\n }", "title": "" }, { "docid": "83c1986a1ebf02d767750ae7acbd2d61", "score": "0.5558373", "text": "public function getCharge()\n {\n return $this->charge;\n }", "title": "" }, { "docid": "f3f1c600fb89045d5163124138abbf5e", "score": "0.55525184", "text": "private function getNotification($id)\n {\n /** @var Notification $notification */\n $class = $this->notificationClass;\n $notification = $class::findOne($id);\n if (!$notification) {\n throw new HttpException(404, \"Unknown notification\");\n }\n if ($notification->user_id != $this->user_id) {\n throw new HttpException(500, \"Not your notification\");\n }\n return $notification;\n }", "title": "" }, { "docid": "7733fab38f282fad3bfc96f6ef5e0e67", "score": "0.54696673", "text": "public function getById($id)\n {\n return $this->paymentRepository->getById($id);\n }", "title": "" }, { "docid": "f0fdbfb102c8d93b5eb46c93b09e06f3", "score": "0.54559636", "text": "private function _fetchNotification($id, $w=false)\n {\n return $this->fetchObj($this->_getMapper(), $id, $w);\n }", "title": "" }, { "docid": "543d6bfd28995ca50c642bd6021a893d", "score": "0.54448956", "text": "public function getNotification($id) {\n\n if (Notification::where('id', $id)->exists()) {\n\n $notification = Notification::where('id', $id)->get()->toJson(JSON_PRETTY_PRINT);\n return response($notification, 200);\n\n } else {\n return response()->json([\n \"message\" => \"Notification not found\"\n ], 404);\n }\n\n }", "title": "" }, { "docid": "3fc8dcdf417fa8bf3ce48a791756b1e4", "score": "0.5422151", "text": "function wpf_global_get_charge( $product_id, $name, $option_id = 0 ) {\r\n global $wpf_products;\r\n if ( isset( $wpf_products[$product_id][$name] ) && \r\n isset( $wpf_products[$product_id][$name]['charges'] ) &&\r\n isset( $wpf_products[$product_id][$name]['charges'][$option_id] ) ) {\r\n return wpf_format_charge( $wpf_products[$product_id][$name]['charges'][$option_id] ); \r\n }\r\n return 'unset';\r\n}", "title": "" }, { "docid": "517d0250538c981c40c902b62eb12df0", "score": "0.5406088", "text": "public function getId()\n {\n return $this->charge_response['id'];\n }", "title": "" }, { "docid": "f4dce0d15d6b152c4567c8ccee206c0d", "score": "0.54", "text": "public function charge()\n {\n if (!$this->_order || !$this->_order->getId()) {\n throw new \\Magento\\Framework\\Exception\\LocalizedException(__('The order does not exist.'));\n }\n\n $payload = $this->_payloadHelper->getChargePayload($this->_order);\n\n $this->_logger->debug(\"Charge Payload:- \" . $this->_helper->jsonEncode($payload));\n\n try {\n $charge = $this->getApi()\n ->chargesCreate($payload, $this->genIdempotencyKey());\n\n $this->_logger->debug(\"Charge Response:- \" . $this->_helper->jsonEncode($charge));\n\n if (isset($charge->error)) {\n throw new \\Magento\\Framework\\Exception\\LocalizedException(__('Could not create the charge'));\n }\n\n if (!$charge->getState() || !$charge->getId()) {\n throw new \\Magento\\Framework\\Exception\\LocalizedException(__('Invalid Charge'));\n }\n\n $this->_logger->debug($this->_helper->__(\"Charge State:- %s\", $charge->getState()));\n\n if ($charge->getId()) {\n $additionalPaymentInfo = $this->_order->getPayment()->getAdditionalInformation();\n $additionalPaymentInfo['receipt_number'] = $charge->getReceiptNumber();\n $additionalPaymentInfo['zip_charge_id'] = $charge->getId();\n $payment = $this->_order->getPayment()\n ->setAdditionalInformation($additionalPaymentInfo);\n $this->_orderPaymentRepository->save($payment);\n }\n\n $this->_chargeResponse($charge, $this->_config->isCharge());\n } catch (\\Zip\\ZipPayment\\MerchantApi\\Lib\\ApiException $e) {\n list($apiError, $message, $logMessage) = $this->_helper->handleException($e);\n\n // Cancel the order\n $this->_helper->cancelOrder($this->_order, $apiError);\n throw new \\Magento\\Framework\\Exception\\LocalizedException(__($message));\n }\n return $charge;\n }", "title": "" }, { "docid": "c49068693981f80c139f16bb05fa2163", "score": "0.5354033", "text": "public function getChargePermission(int $storeId, string $chargePermissionId)\n {\n $response = $this->clientFactory->create($storeId)->getChargePermission($chargePermissionId);\n\n return $this->processResponse($response, __FUNCTION__);\n }", "title": "" }, { "docid": "e5a994b24632d80ca08a43b07c4bff74", "score": "0.5346577", "text": "public function getPayment($id)\r\n {\r\n $conn=$this->connect();\r\n $sql= \"SELECT * FROM payments WHERE Payment_ID = \".$id;\r\n $get_result= $conn->query($sql) or die(\"Can't connect to the payments table\");\r\n if($get_result!=false)\r\n {\r\n $pay=$get_result->fetch_assoc();\r\n $payment= new Payment($pay[\"Payment_ID\"], $pay[\"Contractor_CO_Num\"], $pay[\"Payment_Amount\"], \r\n $pay[\"Proposal_ID\"], $pay[\"Payment_Status\"], $pay[\"PAYMENT_DATE\"]);\r\n $get_result->free();\r\n $conn->close();\r\n return $payment;\r\n \r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }", "title": "" }, { "docid": "e4ce6e7e3a3bb6c24de0de737415830c", "score": "0.5346356", "text": "public function get($id, $fields = null)\n {\n return $this->client->get(\"application_charges/{$id}.json\", 'application_charge', $this->prepareParams($fields));\n }", "title": "" }, { "docid": "9629b1d967bb7612a6d8ce337be1ac59", "score": "0.5340007", "text": "public function get( $id = null )\n {\n if ( $id && $errors = $this->myValidator( [ 'id' => $id ], $this->rules['get'] ) ) return $errors;\n \n $chargeObj = new Charge;\n if ( $id ) {\n $chargeData = $chargeObj::find( $id )->getAttributes();\n $chargeData = array_map( 'strtoupper', $chargeData );\n $chargeData['amount'] = (float) $chargeData['amount'];\n } else {\n $chargeData = json_decode( $chargeObj::select( 'payment_id', 'amount' )->orderBy( 'payment_id', 'asc' )->get() );\n }\n \n return $this->myResponse( $chargeData ? \n [ $chargeData, 200 ] :\n [ [ 'error' => $this->rules['get_error'] ], 404 ] \n );\n }", "title": "" }, { "docid": "57f3907dae258fdb189d3e22bc4dcca5", "score": "0.5311112", "text": "public function getCharges();", "title": "" }, { "docid": "ef8792a10587a71c90be9449c152202a", "score": "0.5268236", "text": "function getPixCharge($invoiceId) {\r\n\r\n return find('tblgerencianetpix', 'invoiceid', $invoiceId);\r\n\r\n}", "title": "" }, { "docid": "4a19e311abfd92887c741cab183bfa06", "score": "0.52530384", "text": "public function getOrderShippingCharge($order_id) {\n $shipping_charge = 0;\n $sql = \"select value from sps_order_total where order_id='{$order_id}' and title like '%Shipping:'\";\n $query = $this->db->query($sql);\n\n if ($query->rows) { \n return $query->row['value'];\n }\n }", "title": "" }, { "docid": "1a32ee0f380094cb17a8323de21c3e3b", "score": "0.52524734", "text": "function paymentGet($payment_id){\r\n\t\t$method='payment.get';\r\n\t\t$tags=array(\r\n\t\t\t'payment_id'=>$payment_id\r\n\t\t);\r\n\t\t$response=$this->prepare_xml($method,$tags);\r\n\t\t$obj=$this->xml_obj($response,'full');\r\n\t\treturn $obj;\r\n\t}", "title": "" }, { "docid": "c3c4ed97ae1074f287209ca8996a25e5", "score": "0.5193931", "text": "function getContribution($id) {\n return $this->ContributionsQuery()->findPk($id);\n }", "title": "" }, { "docid": "a71f4ad94340fabc234084dbbff515c2", "score": "0.51919067", "text": "abstract public function getMessageCharge($messageId);", "title": "" }, { "docid": "7172e268f0525e80b55c41a45c050130", "score": "0.51803327", "text": "public function getCampaignByPromoID($promoID) {\n\t\t// Build query, prep, and bind\n\t\t$sql = \"SELECT partner_campaign.* FROM partner_campaign \n\t\t\tLEFT JOIN partner_promocode ON partner_campaign.id = partner_promocode.campaignid \n\t\t\tWHERE partner_promocode.id = :promoID \";\n\t\t$statement = $this->PDODB->prepare($sql);\n\t\t$statement->bindValue(\":promoID\", $promoID);\n\n\t\t// Execute the query\n\t\t$statement->execute();\n\n\t\t// Fetch object\n\t\t$CampaignObject = $statement->fetchObject();\n\n\t\t// Return the object\n\t\treturn $CampaignObject;\n\t}", "title": "" }, { "docid": "2d75cff13afef085ed60a93624b40977", "score": "0.5160127", "text": "public function charge(Request $request){\n // See your keys here: https://dashboard.stripe.com/account/apikeys\n \\Stripe\\Stripe::setApiKey(\"sk_test_f2eiG8tsfC8Y8CYcYNevtt3f00MXDBLS00\");\n\n $intent = \\Stripe\\PaymentIntent::retrieve(\"pi_Aabcxyz01aDfoo\");\n $charges = $intent->charges->data;\n }", "title": "" }, { "docid": "096de63769530f1b06966f3ad4b0822b", "score": "0.5157211", "text": "public function show(Charge $charge)\n {\n return $charge;\n }", "title": "" }, { "docid": "5803ada05ff1663f9c712c7402f8613f", "score": "0.51523906", "text": "public function findById($id){\n $commission = Commission::where('id',$id)->first();\n return $commission;\n }", "title": "" }, { "docid": "3a0c2937704ef7fa9b7d34c586e9c315", "score": "0.51519024", "text": "function get_charge_by_userid($userId)\n {\n return $this->db->get_where('payment_logs',array('userid' => $userId ))->row_array();\n }", "title": "" }, { "docid": "183c7dff11219a336069310f7805a2e4", "score": "0.51393855", "text": "public function getNotification();", "title": "" }, { "docid": "d0e3ede55938cc99a612cbcf7f2d8644", "score": "0.5136123", "text": "public function charge($paymentInfo)\n {\n \t\t$phoneType = $this->getPhoneType($paymentInfo['phone_number']);\n\n \t\t$mfsType = '\\Rahasi\\Services\\Payments\\Mfs\\Operators\\PayWith'.$phoneType;\n\n \t\treturn (new $mfsType($this->mfs))->charge($paymentInfo);\n }", "title": "" }, { "docid": "1c0cfbf68f336b0fa999f44d4d276ba0", "score": "0.51002634", "text": "public function find($id) {\n return $this->payment->find($id);\n }", "title": "" }, { "docid": "a2f8e7b3cb132f30332cd9dbafd8c3bd", "score": "0.5090793", "text": "public function getChargemembership() {\n\t\treturn $this->chargemembership;\n\t}", "title": "" }, { "docid": "6a70130b7555fd70f77a4c0491908992", "score": "0.50792325", "text": "public function getStripePaymentIntent($stripePI_id): object\n {\n \\Stripe\\Stripe::setApiKey($this->secretkey);\n $stripePI = \\Stripe\\PaymentIntent::retrieve($stripePI_id);\n\n return $stripePI;\n }", "title": "" }, { "docid": "e20f6e5421185734786c9469e70c9443", "score": "0.5063888", "text": "public static function getByID($id) {\n\t\tif (array_key_exists($id, self::$badge_dictionary)) {\n\t\t\treturn self::$badge_dictionary[$id];\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "title": "" }, { "docid": "a0adc2658d96cde84ba820845ba93036", "score": "0.50566775", "text": "function createPixCharge($api_instance, $gatewayParams)\r\n\r\n{\r\n\r\n // Pix Parameters\r\n\r\n $pixKey = $gatewayParams['pixKey'];\r\n\r\n $pixDays = $gatewayParams['pixDays'];\r\n\r\n $pixDescription = $gatewayParams['description'];\r\n\r\n $pixDiscount = str_replace('%', '', $gatewayParams['pixDiscount']);\r\n\r\n\r\n\r\n if (empty($pixKey)) {\r\n\r\n showException('Exception', array('Chave Pix não informada. Verificar as configurações do Portal de Pagamento.'));\r\n\r\n\r\n\r\n } else {\r\n\r\n // Calculating pix amount with discount\r\n\r\n $pixAmount = $gatewayParams['amount'];\r\n\r\n $total = (double)$pixAmount - ((($pixAmount) * $pixDiscount) /100);\r\n\r\n $total = number_format((double)$total, 2, '.', '');\r\n\r\n if (strpos($gatewayParams['paramsPix']['clientDocumentPix'],'/')) {\r\n\r\n $document = str_replace('/','',str_replace('-','',str_replace('.','',$gatewayParams['paramsPix']['clientDocumentPix']))); \r\n\r\n \r\n\r\n }else{\r\n\r\n $document = str_replace('-','',str_replace('.','',$gatewayParams['paramsPix']['clientDocumentPix']));\r\n\r\n }\r\n\r\n \r\n\r\n $requestBody = [\r\n\r\n 'calendario' => [\r\n\r\n 'expiracao' => $pixDays * 86400 // Multiplying by 86400 (1 day seconds) because the API expects to receive a value in seconds\r\n\r\n ],\r\n\r\n 'devedor'=>[\r\n\r\n 'cpf'=> $document,\r\n\r\n 'nome'=> $gatewayParams['paramsPix']['clientNamePix']\r\n\r\n ],\r\n\r\n 'valor' => [\r\n\r\n 'original' => strval($total) // String value from amount\r\n\r\n ],\r\n\r\n 'chave' => $pixKey,\r\n\r\n \"infoAdicionais\" => [\r\n\r\n [\r\n\r\n \"nome\" => \"Pagamento em\",\r\n\r\n \"valor\" => $gatewayParams['companyname']\r\n\r\n ],\r\n\r\n [\r\n\r\n \"nome\" => \"Número do Pedido\",\r\n\r\n \"valor\" => \"#\".$gatewayParams['invoiceid']\r\n\r\n ]\r\n\r\n ]\r\n\r\n ];\r\n\r\n \r\n\r\n return createImmediateCharge($api_instance, $requestBody);\r\n\r\n }\r\n\r\n}", "title": "" }, { "docid": "4338c434655c2fa8a40f5a9f56759967", "score": "0.5054723", "text": "public static function getNotification($id) {\n $db = new Database();\n $q = \"SELECT * FROM notification WHERE id='{$id}'\";\n $result = $db->createQuery($q);\n if (count($result) > 0) {\n return $result;\n } else {\n return FALSE;\n }\n }", "title": "" }, { "docid": "c43d76a091fa1c74b5fc784043d5d673", "score": "0.5048687", "text": "public function show($id)\n {\n $responseShowNotification = Notification::where('id_notification', $id)->first();\n if(is_object($responseShowNotification))\n {\n return $responseShowNotification;\n }\n else\n {\n return\n [\n 'message' => 'Data Not Found',\n 'Code' => 500\n ];\n }\n }", "title": "" }, { "docid": "cdbef16130ef2f02405a2ecccf43fcd4", "score": "0.5042972", "text": "public static function readNotification(string $notification_id)\n {\n $fetchMail = (new Note())->findGuardType()->user()->load('notification')\n ->notification()\n ->withTrashed()\n ->findOrFail($notification_id);\n\n //change status\n $fetchMail->update([\n 'status' => true,\n ]);\n\n return $fetchMail;\n }", "title": "" }, { "docid": "b51feda6fb5b71334157b827989cfd91", "score": "0.50331825", "text": "public function asStripeCharge()\n {\n $charges = $this->user->asStripeCustomer()->charges();\n\n if (! $charges) {\n throw new LogicException('The Stripe customer does not have any charges.');\n }\n\n return $charges->retrieve($this->stripe_id);\n }", "title": "" }, { "docid": "36b0163268e6096f9a02f68920024264", "score": "0.5030801", "text": "public function details($notification_id){\n $notofication=Notification::findOrFail($notification_id);\n $current_user=auth()->guard('admin')->user();\n\n if($notofication->user_id!=$current_user->id){\n abort(403,'Notofication not belongs to you'.'<a href=\"'.route('admin.dashboard').'\" class=\"btn btn-success\">Back to Dashboard</a>');\n }\n\n $notofication->update([\n 'is_read'=>true\n ]);\n\n return redirect($notofication->redirect_path);\n \n }", "title": "" }, { "docid": "32935725463f145c4aa3928fc3876a0b", "score": "0.5011107", "text": "public function actionRead($id)\n {\n $notification = $this->getNotification($id);\n $notification->read = 1;\n $notification->save();\n return $notification;\n }", "title": "" }, { "docid": "9e7e2ad7e4e3e286603b9b1f1d0240c7", "score": "0.50000453", "text": "public function get($id)\n {\n return OrderRequest::withTrashed()->with(\"payment\")->where(\"id\", $id)->first();\n }", "title": "" }, { "docid": "0374cba5c1d4486beda78679c1df721f", "score": "0.49972498", "text": "public function getCharge(): int\n {\n return $this->charge;\n }", "title": "" }, { "docid": "e2f3671f2c5c7e386fcac407f17daa01", "score": "0.4984151", "text": "function GetNotification($notifyID, $Limit) {\r\n global $Config;\r\n $addsql = (!empty($notifyID)) ? (\" and notifyID = '\" . $notifyID . \"'\") : (\"\");\r\n $Limit = (!empty($Limit)) ? (\" limit 0, \" . $Limit) : (\"\");\r\n $sql = \"select * from notification where locationID = '\" . $_SESSION['locationID'] . \"' and depID = '\" . $Config['CurrentDepID'] . \"' \" . $addsql . \" order by notifyDate desc \" . $Limit;\r\n return $this->query($sql, 1);\r\n }", "title": "" }, { "docid": "343ed8e15236ea86d29f7314946f5a26", "score": "0.49839926", "text": "public function findCoForRecord($id) {\n // CoAnnouncements get their CO via the CoAnnouncementChannel\n\n $args = array();\n $args['conditions'][$this->alias.'.id'] = $id;\n $args['contain'][] = 'CoAnnouncementChannel';\n\n $ann = $this->find('first', $args);\n \n if(!empty($ann['CoAnnouncementChannel']['co_id'])) {\n return $ann['CoAnnouncementChannel']['co_id'];\n } else {\n return parent::findCoForRecord($id);\n }\n }", "title": "" }, { "docid": "41672c929e0aa990079a206f79dd804f", "score": "0.4983904", "text": "function refundCharge($api_instance, $gatewayParams)\r\n\r\n{\r\n\r\n $invoiceId = $gatewayParams['invoiceid'];\r\n\r\n $e2eId = getValue('tblgerencianetpix', ['invoiceid' => $invoiceId], 'e2eid');\r\n\r\n\r\n\r\n if (empty($e2eId)) {\r\n\r\n showException('Efí Exception', array(\"Fatura #$invoiceId não possui pagamentos a serem reembolsados.\"));\r\n\r\n\r\n\r\n } else {\r\n\r\n $requestParams = [\r\n\r\n 'e2eId' => $e2eId,\r\n\r\n 'id' => uniqid()\r\n\r\n ];\r\n\r\n\r\n\r\n $requestBody = [\r\n\r\n 'valor' => $gatewayParams['amount']\r\n\r\n ];\r\n\r\n\r\n\r\n // Requesting Pix Devolution\r\n\r\n return devolution($api_instance, $requestParams, $requestBody);\r\n\r\n }\r\n\r\n}", "title": "" }, { "docid": "adf5e54faafd48e2637feed65f851eb9", "score": "0.49828807", "text": "function get_invoice($id){\n\n $sql = \"select * from paymentgateway where CUST_ID='\".$id.\"' and STATUS='success' order by TXNDATE desc\";\n\n $data = $this->db->query($sql, $id);\n\n return $data->result();\n\n }", "title": "" }, { "docid": "3a499cfab240209c8c7a14447453d752", "score": "0.49773192", "text": "public function get($id)\n {\n //Insertion de l'ID de l'entreprise\n $id_E = $this->session->userdata('staff_user_id_entreprise');\n\n $this->db->select('*,tblfactureinternepaymentrecords.id as paymentid');\n $this->db->join('tblinvoicepaymentsmodes', 'tblinvoicepaymentsmodes.id = tblfactureinternepaymentrecords.paymentmode', 'left');\n $this->db->order_by('tblfactureinternepaymentrecords.id', 'asc');\n $this->db->where('tblfactureinternepaymentrecords.id', $id);\n $this->db->where('tblfactureinternepaymentrecords.id_entreprise', $id_E);\n $payment = $this->db->get('tblfactureinternepaymentrecords')->row();\n\n if (!$payment) {\n return false;\n }\n\n return $payment;\n }", "title": "" }, { "docid": "6d7253e559d6fb9cccfb3056d6cf3a20", "score": "0.49759153", "text": "public function confim_payment_of_pledge($id = '')\n {\n if ($id)\n {\n $sql_1 = \"UPDATE crm_pledge_log set is_confirmed = 'Y' where wants_to_donate_id = \".$id;\n $result_1 = $this->db->query($sql_1);\n $sql_2 = \"UPDATE crm_wants_to_donate_queue set is_confirmed = 'Y' where id = \".$id;\n $result_2 = $this->db->query($sql_2);\n $relation = array(\n 'fields' => '*',\n \"conditions\" => \"wants_to_donate_id = \". $id\n );\n $result = $this->pledgeLog_m->get_relation('', $relation, false);\n $relation = array(\n 'fields' => '*',\n \"conditions\" => \"donetores_queue_id = \". $result[0]['donetores_queue_id']. \" AND is_confirmed = 'Y'\"\n );\n $resultt = $this->pledgeLog_m->get_relation('', $relation, false);\n if (count($resultt) == 2)\n {\n $sql_2 = \"UPDATE crm_donetores_queue set is_confirmed = 'Y', is_deleted = 'Y' where id = \".$result[0]['donetores_queue_id'];\n $result_2 = $this->db->query($sql_2);\n }\n if ($result_1 AND $result_2)\n {\n $this->session->set_flashdata('success','Payment confirmation is done successfully.');\n }\n else\n {\n $this->session->set_flashdata('danger','Please try again later.');\n }\n // send push notification for the owner\n $user_detail = $this->user_m->get($result[0]['investor_id']);\n $user_detail_to = $this->user_m->get($result[0]['borrower_id']);\n $admin_notification = $user_detail->first_name.' '.$user_detail->last_name.\" just received GHS100 from \". $user_detail_to->first_name. ' '. $user_detail_to->last_name;\n $notification_id = insert_notification_detail('pledge',\"Members received donation\",\"You just received GHS100 from \". $user_detail_to->first_name. ' '. $user_detail_to->last_name ,$admin_notification, $result[0]['investor_id']); // common helper function\n $pay_load_data = set_payload('pledge', $notification_id, \"You just received GHS100 from \". $user_detail_to->first_name. ' '. $user_detail_to->last_name );\n if ($user_detail->device_type == '0')\n {\n send_push_notification($user_detail->device_token, false, $pay_load_data);//library notification\n }\n unset($user_detail);\n unset($user_detail_to);\n // send push notification to opposite party\n $user_detail = $this->user_m->get($result[0]['borrower_id']);\n $user_detail_to = $this->user_m->get($result[0]['investor_id']);\n $admin_notification = $user_detail->first_name.' '.$user_detail->last_name.\" just donated GHS100 to \". $user_detail_to->first_name. ' '. $user_detail_to->last_name;\n $notification_id = insert_notification_detail('pledge',\"Member's pledge\",\"You just donated GHS100 to \". $user_detail_to->first_name. ' '. $user_detail_to->last_name , $admin_notification,$result[0]['borrower_id']); // common helper function\n $pay_load_data = set_payload('pledge', $notification_id, \"You just donated GHS100 to \". $user_detail_to->first_name. ' '. $user_detail_to->last_name );\n if ($user_detail->device_type == '0')\n {\n send_push_notification($user_detail->device_token, false, $pay_load_data);//library notification\n }\n unset($user_detail);\n unset($user_detail_to);\n redirect('pledge_history');\n }\n else\n {\n show_404(current_url());\n exit;\n }\n }", "title": "" }, { "docid": "9ee98a42aa7e216ee06a8f7d1ddd7e3a", "score": "0.49734032", "text": "public static function findById($id)\n {\n return self::getDiscountCouponById($id);\n }", "title": "" }, { "docid": "f53cb3d5665e237c0a4dfe9b0675713e", "score": "0.49676642", "text": "public function activate_application_charge($charge_id){\n $uri = \"/admin/recurring_application_charges/\" . $charge_id . \"/activate.json\";\n $shopify_api = $this->_shopifyApi();\n $the_charge = $shopify_api('POST', $uri, []);\n return $the_charge;\n }", "title": "" }, { "docid": "204a4685bf644adf65875279f454b5f1", "score": "0.49672326", "text": "protected function deprecated_get_charge_id_from_post() {\n\t\t/** backward compatible with WooCommerce v2.x series **/\n\t\t$order_id = version_compare( WC()->version, '3.0.0', '>=' ) ? $this->order()->get_id() : $this->order()->id;\n\n\t\t$posts = get_posts(\n\t\t\tarray(\n\t\t\t\t'post_type' => 'netpay_charge_items',\n\t\t\t\t'meta_query' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'key' => '_wc_order_id',\n\t\t\t\t\t\t'value' => $order_id,\n\t\t\t\t\t\t'compare' => '='\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\tif ( empty( $posts ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$post = $posts[0];\n\t\t$value = get_post_custom_values( '_netpay_charge_id', $post->ID );\n\n\t\tif ( ! is_null( $value ) && ! empty( $value ) ) {\n\t\t\treturn $value[0];\n\t\t}\n\t}", "title": "" }, { "docid": "451cc5b8f6c613a1ca9fac828402d16d", "score": "0.49617684", "text": "public function getById(int $id, array $with=[])\n {\n return $this->invoice->with($with)->findOrFail($id);\n }", "title": "" }, { "docid": "e812692401cdfb8f4a7b50adef929b2c", "score": "0.49494576", "text": "public function getPromoById($id);", "title": "" }, { "docid": "ef4a118f40357f02cf645687df1cd409", "score": "0.4942602", "text": "function soco_contribution_data( $contribution_id ){\r\n\tglobal $wpdb;\r\n\tif ( $contribution_id > 0 ) {\r\n\t\t$contribution_data_sql = \"\r\n\t\tSELECT\r\n\t\t soco_contributions.idcontributions,\r\n\t\t soco_contributions.contribution_type_id,\r\n\t\t soco_contributions.amount,\r\n\t\t soco_contributions.cycle_amount,\r\n\t\t soco_contributions.contribution_date,\r\n\t\t soco_contributions.receipt_type_id,\r\n\t\t soco_contributions.contributor_type_id,\r\n\t\t soco_contributions.donor_id,\r\n\t\t soco_contributions.electioneering,\r\n\t\t soco_contributions.notes,\r\n\t\t soco_contributions.event_id,\r\n\t\t soco_contributions.contribution_category_id,\r\n\t\t soco_contributions.gift_type_id\r\n\t\tFROM\r\n\t\t soco_contributions\r\n\t\tWHERE\r\n\t\t soco_contributions.idcontributions = $contribution_id\";\r\n\t\t$contribution_data = $wpdb->get_row( $contribution_data_sql );\r\n\t}\r\n\treturn $contribution_data;\r\n}", "title": "" }, { "docid": "453eb3cae52e7cc81f2b9d8efbdc9774", "score": "0.49236256", "text": "public function getById_get( $id ) \n {\n // get winners pending by playerId\n $result = $this->campaign->getById( $id );\n // format result\n $this->formatResponse( $result );\n }", "title": "" }, { "docid": "0079eca10a54ee8855e2d95c28f06ee7", "score": "0.49221638", "text": "function chargeType()\n {\n return \"fixed rate\";\n }", "title": "" }, { "docid": "25f85bfa3e9821643d779e92c6995041", "score": "0.49177486", "text": "public function capture_payment($order_id) {\n $order = new WC_Order($order_id);\n\n if ($order->payment_method == 'openpay') {\n $charge = get_post_meta($order_id, '_openpay_charge_id', true);\n $captured = get_post_meta($order_id, '_openpay_charge_captured', true);\n\n if ($charge && $captured == 'no') {\n $openpay = new WC_Gateway_Openpay();\n\n $result = $openpay->openpay_request(array(\n 'amount' => $order->order_total * 100\n ), 'charges/' . $charge . '/capture');\n\n if (is_wp_error($result)) {\n $order->add_order_note(__('Unable to capture charge!', 'openpay-woosubscriptions') . ' ' . $result->get_error_message());\n } else {\n $order->add_order_note(sprintf(__('Openpay charge complete (Charge ID: %s)', 'openpay-woosubscriptions'), $result->id));\n update_post_meta($order->id, '_openpay_charge_captured', 'yes');\n\n // Store other data such as fees\n update_post_meta($order->id, 'Openpay Payment ID', $result->id);\n update_post_meta($order->id, 'Openpay Fee', number_format($result->fee / 100, 2, '.', ''));\n update_post_meta($order->id, 'Net Revenue From Openpay', ( $order->order_total - number_format($result->fee / 100, 2, '.', '')));\n }\n }\n }\n }", "title": "" }, { "docid": "430b742a5190ea56d415bfdc87834d3d", "score": "0.49157685", "text": "function get_credit_payment_by_id($crp_id) {\n\t\t// Select\n\t\t$this->db->select('crp.*, cr.*, o.*, CONCAT(e.e_fname, \\' \\', e.e_lname) AS attended_name, (cr_amount - (SELECT SUM(crp_amount_payed) FROM credit_payments WHERE cr_id = crp.cr_id AND crp_date <= crp.crp_date)) AS remaining_credit', FALSE);\n\t\t$this->db->from('credit_payments crp');\n\t\t$this->db->join('credits cr', 'crp.cr_id = cr.cr_id', 'left');\n\t\t$this->db->join('orders o', 'cr.o_id = o.o_id', 'left');\n\t\t$this->db->join('employees e', 'crp.crp_attended_by = e.e_id', 'left');\n\t\t$this->db->where('crp.crp_id', $crp_id);\n\n\t\t// Get Data\n\t\t$query = $this->db->get();\n\t\treturn $query->result_array();\n\t}", "title": "" }, { "docid": "c259b1b864d2884fb02f202d9607c5aa", "score": "0.4910181", "text": "function payment_get($id = NULL) {\n\n $result = $this->dash_model->get_payment($id);\n $this->response($result,API::HTTP_OK);\n}", "title": "" }, { "docid": "bea9689194d3a4c70969a6baf8b4fc65", "score": "0.49100602", "text": "public function charge()\n {\n return $this->hasMany(Payment::class);\n }", "title": "" }, { "docid": "c858ea2fd831ff5999b8f186cdc3a22c", "score": "0.48996907", "text": "public function get_charge_id_from_order() {\n\t\tif ( $charge_id = $this->order()->get_transaction_id() ) {\n\t\t\treturn $charge_id;\n\t\t}\n\n\t\t/**\n\t\t * @deprecated 3.4\n\t\t * The following code are for backward compatible only.\n\t\t */\n\t\t// Backward compatible for NetPay v3.0 - v3.3\n\t\t$order_id = version_compare( WC()->version, '3.0.0', '>=' ) ? $this->order()->get_id() : $this->order()->id;\n\t\t$charge_id = get_post_meta( $order_id, self::CHARGE_ID, true );\n\n\t\t// Backward compatible for NetPay v1.2.3\n\t\tif ( empty( $charge_id ) ) {\n\t\t\t$charge_id = $this->deprecated_get_charge_id_from_post();\n\t\t}\n\n\t\treturn $charge_id;\n\t}", "title": "" }, { "docid": "5919fd28bef687302847f25a86883fdc", "score": "0.48948792", "text": "public static function getDiscountPurchase()\n\t{\n\t\t$exist_account = Tbl_chart_of_account::where(\"account_shop_id\", Accounting::getShopId())->where(\"account_code\", \"discount-purchase\")->first();\n if(!$exist_account)\n {\n $insert[\"account_shop_id\"] = Accounting::getShopId();\n $insert[\"account_type_id\"] = 11;\n $insert[\"account_number\"] = \"00000\";\n $insert[\"account_name\"] = \"Purchase Discount\";\n $insert[\"account_description\"] = \"Purchase Discount\";\n $insert[\"account_protected\"] = 1;\n $insert[\"account_code\"] = \"discount-puchase\";\n \n return Tbl_chart_of_account::insertGetId($insert);\n }\n\n return $exist_account->account_id;\n\t}", "title": "" }, { "docid": "065c8d4f7c6f414864426e99725c61e7", "score": "0.48921022", "text": "public function getCampaign($id) {\n\t\treturn $this->reportingService->getCampaign($id);\n\t}", "title": "" }, { "docid": "f066b0807a6b16359b77d60c15e0ad9b", "score": "0.48917207", "text": "function freeaddons_donations_donation_details( $payment_id ) {\n\n $payment = new Give_Payment( $payment_id );\n $payment_meta = $payment->get_meta();\n $referral_url = esc_url($payment_meta['_give_current_url']);\n\n\tif ( $referral_url ) : ?>\n\n\t\t<div id=\"give-engraving-message\" class=\"give-admin-box-inside\">\n\t\t\t<p><strong><?php esc_html_e( 'Referral URL:', 'give' ); ?></strong><br />\n\t\t\t<a href=\"<?php echo $referral_url; ?>\" target=\"_blank\" rel=\"noopener noreferrer\"><?php echo $referral_url; ?></a>\n\t\t</div>\n\n\t<?php endif;\n\n}", "title": "" }, { "docid": "49693d6adaaac89a45e0666948cc3e38", "score": "0.4888306", "text": "public function getStripeId();", "title": "" }, { "docid": "9266c24cbaf731b48a8ec6def898a1df", "score": "0.48694253", "text": "public function getGwItemRate($id);", "title": "" }, { "docid": "5ff3cfe24690e13af431a3926554ba50", "score": "0.48663807", "text": "function find_badge($con, $badge_id){\n $sql = \"SELECT * FROM badges WHERE id = $badge_id LIMIT 1\";\n $r = mysqli_query($con, $sql) or die(mysqli_error($con));\n return mysqli_fetch_assoc($r);\n}", "title": "" }, { "docid": "5546d10bfbd9726331397ccd34291735", "score": "0.4857505", "text": "function fetchNotification($user_id)\n{\n\treturn $notifications = Notification::where([\n\t\t'user_id' => $user_id,\n\t\t'read' => 0\n\t])->get();\t\n}", "title": "" }, { "docid": "5298baf3e4e5b03b6464251052427089", "score": "0.48543644", "text": "public function getDonationById($id)\n {\n return $this->model->getById($id, $this->relationCol);\n }", "title": "" }, { "docid": "d506b9c7021baeb146b6b6215139c761", "score": "0.48515418", "text": "public static function find(string $transactionId)\n {\n try {\n $charge = ConektaCharge::find($transactionId);\n } catch (ConektaError $e) {\n throw new Exception($e->getMessage());\n } catch (Exception $e) {\n throw $e;\n }\n\n return static::convertToObject($charge);\n }", "title": "" }, { "docid": "1e4e8e16e2f49629c521a5ca61949c43", "score": "0.4850677", "text": "public static function getPaymentById($id)\n {\n return self::findOne(['payment_id' => $id]);\n }", "title": "" }, { "docid": "4eac179f8e85b031c9b32c9912e7a6f9", "score": "0.48501417", "text": "public function show($id) {\n return Donations::find($id);\n }", "title": "" }, { "docid": "d1a5973fde9b5a602f341f60db407c18", "score": "0.48463398", "text": "public function findById($id) {\n $notifications = $this->CI->Notification_model->get($id);\n return $notifications;\n }", "title": "" }, { "docid": "69f8b522178da40ae00e0ac9cd9642cd", "score": "0.48384264", "text": "public function get_notification_data($id)\r\n {\r\n $query = $this->db->query('select * from planesusuarios left join notificaciones on planId = notificacionPlanId where notificacionId = ' . $id);\r\n return $query->row();\r\n }", "title": "" }, { "docid": "70536347643f5c4073abfd4044a8643f", "score": "0.48340362", "text": "public function chargeStripe($customerId, $key, $stripeAcc, $amount)\n {\n // $this->load->library('encrypt');\n // $key = $this->encrypt->decode($key);\n $key = $this->my_decrypt($key, ENCRYPTION_KEY_256BIT);\n \n $this->load->model('booking/Bookingmodel');\n $constants = $this->Bookingmodel->getConstants();\n require_once (APPPATH . STRIPE_PATH);\n require_once (APPPATH . STRIPE_LIB_PATH);\n Stripe\\Stripe::setApiKey($key);\n $token = \\Stripe\\Token::create(\n array(\"customer\" => $customerId), array(\"stripe_account\" => $stripeAcc)\n // id of the connected account\n );\n try {\n $charge = \\Stripe\\Charge::create(array(\n \"amount\" => $amount,\n \"currency\" => \"usd\",\n \"source\" => $token['id'],\n \"description\" => \"Driveway charge\",\n \"application_fee\" => $constants->applicationFees\n )\n , array(\n \"stripe_account\" => $stripeAcc\n ));\n $chargeId = $charge['id'];\n return array(\n MESSAGE => $charge[STATUS],\n CHARGEID => $chargeId,\n TOKEN => ''\n );\n } catch (\\Stripe\\Error\\Stripe_InvalidRequestError $e) {\n $body = $e->getJsonBody();\n $err = $body [ERROR];\n return array(\n MESSAGE => $err [MESSAGE],\n TOKEN => ''\n );\n } catch (\\Stripe\\Error\\Stripe_Erro $e) {\n $body = $e->getJsonBody();\n $err = $body [ERROR];\n return array(\n MESSAGE => $err [MESSAGE],\n TOKEN => ''\n );\n } catch (\\Stripe\\Error\\ApiConnection $e) {\n return array(\n MESSAGE => 'Network communication with Payment Gateway failed',\n TOKEN => ''\n );\n }\n }", "title": "" }, { "docid": "8545f8110d1f92b4e65c4d8682d15624", "score": "0.48314577", "text": "public function paymentChargeOnAuthorizeShouldBePossibleUsingPaymentId(): void\n {\n $card = $this->heidelpay->createPaymentType($this->createCardObject());\n $authorization = $this->heidelpay->authorize(100.00, 'EUR', $card, 'http://heidelpay.com', null, null, null, null, false);\n $charge = $this->heidelpay->chargePayment($authorization->getPaymentId());\n\n $this->assertNotEmpty($charge->getId());\n }", "title": "" }, { "docid": "67d84d01067db2e07b9296a218c63dc6", "score": "0.4827172", "text": "public static function charge($params = [], $options = []) {\n\t\t$options += ['mode' => 'default'];\n\t\treturn self::adapter($options['mode'])->charge($params);\n\t}", "title": "" }, { "docid": "613af09d48247011d490b37f13a21a90", "score": "0.4819942", "text": "public function get($id = '')\n {\n\n $this->db->select('*, tblcurrencies.id as currencyid, tblinvoices.id as id, tblcurrencies.name as currency_name');\n $this->db->from('tblinvoices');\n $this->db->join('tblcurrencies', 'tblcurrencies.id = tblinvoices.currency', 'left');\n\n if (is_numeric($id)) {\n $this->db->where('tblinvoices' . '.id', $id);\n\n $invoice = $this->db->get()->row();\n\n if ($invoice) {\n $invoice->items = $this->get_invoice_items($id);\n $this->load->model('payments_model');\n $this->load->model('clients_model');\n $invoice->client = $this->clients_model->get($invoice->clientid);\n $invoice->payments = $this->payments_model->get_invoice_payments($id);\n }\n\n return $invoice;\n }\n return $this->db->get()->result_array();\n }", "title": "" }, { "docid": "35815e98f7f6ea9f2c973c2d3d1c736c", "score": "0.4817863", "text": "function hook_subscription_charge ($charge_id, $subscription_id) {\n\t\t$CI =& get_instance();\n\n\t\t$CI->load->model('store/taxes_model');\n\n\t\tif ($tax = $CI->taxes_model->get_tax_for_subscription($subscription_id)) {\n\t\t\t$CI->taxes_model->record_tax($tax['tax_id'], $charge_id, 0, $tax['tax_amount']);\n\t\t}\n\t}", "title": "" }, { "docid": "5d16acc6dcb4395e8517a1a7a3cda115", "score": "0.4813313", "text": "private static function getStripePendingInvoice(string $stripe_customer_id) : array\n {\n // https://stripe.com/docs/api/subscriptions/list\n\n // if we don't have a customer id, return the properties with empty values\n if (strlen($stripe_customer_id) === 0)\n return self::mapStripePendingInvoiceInfo(array());\n\n $stripe_secret_key = $GLOBALS['g_config']->stripe_secret_key ?? false;\n if ($stripe_secret_key === false)\n throw new \\Flexio\\Base\\Exception(\\Flexio\\Base\\Error::ERROR_GENERAL);\n\n $get_data = array(\n 'customer' => $stripe_customer_id ?? ''\n );\n $query_str = http_build_query($get_data);\n\n $headers = array();\n $headers[] = 'Authorization: Bearer ' . $stripe_secret_key;\n $stripe_api_endpoint = \"https://api.stripe.com/v1/invoices/upcoming\";\n $url = $stripe_api_endpoint . '?' . $query_str;\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_HTTPGET, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);\n curl_setopt($ch, CURLOPT_URL, $url);\n $httpresult = curl_exec($ch);\n $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n curl_close($ch);\n\n if ($httpcode !== 200)\n {\n $error = @json_decode($httpresult, true);\n $message = $error['error']['message'] ?? '';\n throw new \\Flexio\\Base\\Exception(\\Flexio\\Base\\Error::READ_FAILED, $message);\n }\n\n // stripe supports more than one source per customer, but we only\n // expose one card in the billing info; get the first source item\n $pending_invoice_info = @json_decode($httpresult, true);\n return self::mapStripePendingInvoiceInfo($pending_invoice_info);\n }", "title": "" }, { "docid": "88b4245be30f4c30ab4cb5071b5bcab0", "score": "0.48131686", "text": "function get_officer_by_badgeID($badgeID)\n {\n global $conn;\n\n //query the database to select all data from the qp_officer table and some data from qp_station by badgeID\n $sql = 'SELECT qp_officer.* FROM qp_officer WHERE qp_officer.badgeID = :badgeID ORDER BY firstName';\n //use a prepared statement to enhance security\n $statement = $conn->prepare($sql);\n $statement->bindValue(':badgeID', $badgeID);\n $statement->execute();\n //use the fetch() method to retrieve a single row\n $result = $statement->fetch();\n $statement->closeCursor();\n return $result;\n }", "title": "" }, { "docid": "28fcffab50df0c5260f64a83c34112db", "score": "0.4796987", "text": "function getAllNotifications_get(){\r\n // Load needed models\r\n $this->load->model('notification_model');\r\n // Change user's credit AND Get new credit\r\n $data['notification']['broadcast'] = $this->notification_model->get_current_broadcasts();\r\n $this->response($data, 200);\r\n }", "title": "" }, { "docid": "c067b57ea1f21e8eb50026a5c25358c6", "score": "0.47811693", "text": "public function getCommission($id) {\r\n return $this->updateAuthTokensAndReturn(Api::getInstance()->getAdvertiserCommission($this, $id));\r\n }", "title": "" }, { "docid": "92781d6cf22dd4acb54261224f49ac64", "score": "0.47783795", "text": "public function getAccountingReportById($id)\r\n {\r\n\r\n return $this->em()->find('BackOfficeBundle:Accounting', $id);\r\n }", "title": "" }, { "docid": "e7775b2db12fdc8e9008a6a72bc8d7b9", "score": "0.47759548", "text": "public function get( $id ) {\n\n\t\t$promotion = $this->getPromotion( $id );\n\n\t\treturn $promotion;\n\t}", "title": "" }, { "docid": "8eea5786561507aec3899b1e67ea8114", "score": "0.47683662", "text": "protected function getChargeResponse() {\n\t$transaction = $this->getTransactionTable()->findByOrderAndType($this->getWorkingOrderId(), ORDER_TRANSACTION_TYPES_CHRONOPAY_TRANSACTION, $this->getPaymentGatewayId());\n\t$paReq = $this->getTransactionTable()->findByOrderAndType($this->getWorkingOrderId(), ORDER_TRANSACTION_TYPES_CHRONOPAY_PAREQ, $this->getPaymentGatewayId());\n\t$md = $this->getTransactionTable()->findByOrderAndType($this->getWorkingOrderId(), ORDER_TRANSACTION_TYPES_CHRONOPAY_MD, $this->getPaymentGatewayId());\n\t$acsUrl = $this->getTransactionTable()->findByOrderAndType($this->getWorkingOrderId(), ORDER_TRANSACTION_TYPES_CHRONOPAY_ACSURL, $this->getPaymentGatewayId());\n\n\treturn array(\n\t 'transaction' => (isset($transaction ['transaction']) ? $transaction ['transaction'] : ''),\n\t 'paReq' => (isset($paReq ['transaction']) ? $paReq ['transaction'] : ''),\n\t 'md' => (isset($md ['transaction']) ? $md ['transaction'] : ''),\n\t 'acsUrl' => (isset($acsUrl ['transaction']) ? $acsUrl ['transaction'] : ''));\n }", "title": "" }, { "docid": "69b7da03644ef935b08d9cc92d5c0ecc", "score": "0.4758587", "text": "function wmf_civicrm_get_legacy_paypal_subscription($msg) {\n // We include recently-canceled donations because PayPal has apparently\n // not communicated about their ID migration to the team that makes their\n // audit files, leading a ton of subscriptions to be mistakenly canceled\n // starting around October 2018.\n // civicrm_contribution.trxn_id is the individual payment ID prefixed with\n // RECURRING PAYPAL\n // civicrm_contribution_recur.trxn_id is what PayPal sends as the subscr_id\n // field. For legacy subscriptions that was always S-%.\n // In case someone has multiple legacy PayPal subscriptions, prefer the one\n // with the closest amount, then the most recent.\n $query = \"SELECT ccr.*\n FROM civicrm_contribution_recur ccr\n INNER JOIN civicrm_email e ON ccr.contact_id = e.contact_id\n INNER JOIN civicrm_contribution c ON c.contribution_recur_id = ccr.id\n WHERE email = %1\n AND c.trxn_id LIKE 'RECURRING PAYPAL %'\n AND ccr.trxn_id LIKE 'S-%'\n AND (ccr.cancel_date IS NULL OR ccr.cancel_date > '2018-09-01')\n AND (ccr.end_date IS NULL OR ccr.end_date > '2018-09-01')\n ORDER BY ABS(ccr.amount - %2) ASC, c.receive_date DESC\n LIMIT 1\";\n $dao = CRM_Core_DAO::executeQuery($query, [\n 1 => [$msg['email'], 'String'],\n 2 => [$msg['gross'], 'Float'],\n ]);\n\n if (!$dao->fetch()) {\n return FALSE;\n }\n\n return $dao;\n}", "title": "" }, { "docid": "91bde99ecf57fc67b10cd9b470717b46", "score": "0.4758558", "text": "public function getCampaignByID($campaignID) {\n\t\t// Build query, prep, and bind\n\t\t$sql = \"SELECT * FROM partner_campaign WHERE id = :campaignID \";\n\t\t$statement = $this->PDODB->prepare($sql);\n\t\t$statement->bindValue(\":campaignID\", $campaignID);\n\n\t\t// Execute the query\n\t\t$statement->execute();\n\n\t\t// Fetch object\n\t\t$CampaignObject = $statement->fetchObject();\n\n\t\t// Return the object\n\t\treturn $CampaignObject;\n\t}", "title": "" }, { "docid": "e9b20702e8a931a475717b83cb39252d", "score": "0.47554782", "text": "public function getChargeStatus() {\n try {\n $uri = 'mocapay/partner/v2/charge/'.$this->getPartnerTxID().'/status?currency='.$this->getCurrency() != ''? $this->getCurrency(): 'VND';\n\n return MocaRestClient::get($uri,'application/json', \"ONLINE\",$this->getAccessToken());\n } catch (Exception $e) {\n return 'Caught exception: ' . $e->getMessage() . \"\\n\";\n }\n }", "title": "" }, { "docid": "85d662a3fc84b4c5222237cfa080ce47", "score": "0.47434118", "text": "public function getNotificationMessage($cid,$id) {\n\t\t$sql = $this->_db->fetchAll('SELECT * FROM announcements WHERE (fkcompany_id='.$cid.' OR fkcompany_id=0)');\n\t\treturn $sql;\t\n\t}", "title": "" }, { "docid": "3c3ceb5876ac2ddf4c6d543987443c2a", "score": "0.47432417", "text": "public function get_one_purchase($id)\n\t{\n\t\t$que = $this->db->get_where($this->table, array('id' => $id));\n\t\t$user = $que->row();\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "23b257aafad874b2d474efeff18b5915", "score": "0.47393438", "text": "public function getCampaign(){\n $campaignModel = CampaignModel::getInstance();\n return $campaignModel->getCampaign($this->campaign_id);\n }", "title": "" } ]
aa77b30a522494db959c14643b8280d6
LOL NOPE, we use libsodium's defaults!
[ { "docid": "5a590a84b9b3a4528471dd899edce74e", "score": "0.0", "text": "public function __construct(array $options = [])\n {\n }", "title": "" } ]
[ { "docid": "db9d48879297f3c5d12628158dabde00", "score": "0.6207192", "text": "protected function setup_defaults() {}", "title": "" }, { "docid": "c38a3ba64ad921052ff967e29049c87a", "score": "0.5863991", "text": "public function _default()\n {}", "title": "" }, { "docid": "60f269038233cc4408800221be750dad", "score": "0.5744814", "text": "function _DEFAULT()\n\t{\n\t}", "title": "" }, { "docid": "75c4e0659c8fcfd166a391eca56c3af1", "score": "0.5618803", "text": "abstract public function getDefaultDriver(): string;", "title": "" }, { "docid": "afc36a52ba9dbe1a95d45b12a4c9c103", "score": "0.56107694", "text": "abstract protected function defaultsForApp();", "title": "" }, { "docid": "166d7e120b88931b83e83833172987fc", "score": "0.5593789", "text": "public static function default();", "title": "" }, { "docid": "79e0aa53b1a31fbe00039c291dad1100", "score": "0.5589533", "text": "public function getDefault();", "title": "" }, { "docid": "44e9897e767a4dd466ccb9f848b39376", "score": "0.54716235", "text": "abstract protected function defaultsForFrontend();", "title": "" }, { "docid": "a58d0f3910a25b225d2fb1dbc7960ad0", "score": "0.54692745", "text": "function testDefaultValues() {\r\n }", "title": "" }, { "docid": "6cc306b84ca4538bd5191d48ab02e2fb", "score": "0.54265475", "text": "function _setDefaults()\n {\n }", "title": "" }, { "docid": "b3e4ceff43655fa6e194bdcb48b99d7f", "score": "0.5287348", "text": "public function nopriv() {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "92d0e2b4607a836e2955c604ba1062b9", "score": "0.5279897", "text": "abstract public function getDefaultValue();", "title": "" }, { "docid": "840b548add9a2e78de614e56e163b895", "score": "0.5260045", "text": "abstract function getDefaultValue();", "title": "" }, { "docid": "840b548add9a2e78de614e56e163b895", "score": "0.5260045", "text": "abstract function getDefaultValue();", "title": "" }, { "docid": "50df9a7d76b08e1baf89b5f3dd6e1876", "score": "0.5196153", "text": "function testOverwritingDefaultParser(){\n\t\t$_SESSION['test']='Overwriting default parser test';\n\t\t$string=\"<?xml version='1.0'?>\n \t\t\t\t<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'\n \t\t\txmlns:exterms='http://www.example.org/terms/'>\n\t\t\t\t\t<rdf:Description rdf:about='http://www.example.org/index.html'>\n\t\t\t\t\t\t<exterms:creation-date>August 16, 1999</exterms:creation-date>\n\t\t\t\t\t</rdf:Description>\n\t\t\t\t</rdf:RDF>\";\n\t\t// delete default prefixes\n\t\tglobal $default_prefixes;\n\t\t$backup = $default_prefixes;\n\t\tforeach ($default_prefixes as $name => $pref){\n\t\t\tunset ($default_prefixes[$name]);\n\t\t}\n\t\t$default_prefixes=array('foo' => RDF_NAMESPACE_URI);\n\t\t$model = new MemModel();\n\t\t$model->load($string);\n\t\t$nmsp = $model->getParsedNamespaces();\n\t\t$this->assertEqual($nmsp[RDF_NAMESPACE_URI],'rdf');\n\t\t$default_prefixes = $backup;\n\t}", "title": "" }, { "docid": "52a0f2c1781f91fa579b0df07ffaee4f", "score": "0.51789486", "text": "function wpi_null(){ return null;}", "title": "" }, { "docid": "a09225a5631e9f9f13ace1bfdca08df8", "score": "0.5176907", "text": "protected function _init()\r\n {\r\n // Overwrite me plz!\r\n }", "title": "" }, { "docid": "04123f611fc4aba55161116b1e4fb10d", "score": "0.5119302", "text": "public function getDefaultVariant();", "title": "" }, { "docid": "3c525505ba2a139be7e584e97b462efc", "score": "0.5115039", "text": "abstract public function getDefaultProduct();", "title": "" }, { "docid": "f98d2c33df6242cece87a6e76d1d74c7", "score": "0.5108768", "text": "public function getDefaultManual();", "title": "" }, { "docid": "e7dc2f24bcc6be160ecc8b2426af4b8a", "score": "0.5080937", "text": "public function testSupportDefault()\n {\n static::assertFalse($this->fixture->supports(uniqid(), uniqid()));\n }", "title": "" }, { "docid": "6caafbe86a5e31170255caf75f714236", "score": "0.5070138", "text": "function setup_polling_defaults() {\n\tglobal $g, $config;\n\tif($config['system']['polling_each_burst'])\n\t\tmwexec(\"sysctl kern.polling.each_burst={$config['system']['polling_each_burst']}\");\n\tif($config['system']['polling_burst_max'])\n\t\tmwexec(\"sysctl kern.polling.burst_max={$config['system']['polling_burst_max']}\");\n\tif($config['system']['polling_user_frac'])\n\t\tmwexec(\"sysctl kern.polling.user_frac={$config['system']['polling_user_frac']}\");\n}", "title": "" }, { "docid": "32ddb931fc2c76fb6b228ccbc28918fb", "score": "0.50687456", "text": "private function init_default( $default ) {\n\t\t$this->default = $default;\n\t}", "title": "" }, { "docid": "2f2b489e6188f3fe2dd4ea22e2760630", "score": "0.5055898", "text": "protected function getDefault()\n {\n return 0;\n }", "title": "" }, { "docid": "bd2598cd1945c8ef6082cbddd458e762", "score": "0.50464934", "text": "protected function obr() {\r\n }", "title": "" }, { "docid": "a81eae6501644d2f83349f0a2750cecc", "score": "0.504458", "text": "protected function _noop()\n\t{\n\t\treturn;\n\t}", "title": "" }, { "docid": "ac4d3aa0138c6c0eb95886e414f19338", "score": "0.5041319", "text": "private function deng() {\n }", "title": "" }, { "docid": "ac4d3aa0138c6c0eb95886e414f19338", "score": "0.5041319", "text": "private function deng() {\n }", "title": "" }, { "docid": "14fcf1e7d97a5f1d296916d3558df28b", "score": "0.50271356", "text": "function driver_default_documents() {\n\t\treturn array(8 => 'licence_front',\n\t\t\t9 => 'licence_back',\n\t\t\t10 => 'registeration_certificate',\n\t\t\t11 => 'insurance',\n\t\t\t12 => 'motor_certiticate');\n\t}", "title": "" }, { "docid": "6b5cd8766c111fcd181f9194c110e544", "score": "0.50210094", "text": "private function baseConf(){\n\t\t\n\t}", "title": "" }, { "docid": "4e17f792332319231a378864b62abb7d", "score": "0.50172436", "text": "function default_value() { return LSP_OUTSIDE; }", "title": "" }, { "docid": "0e799349937c74af97516e24782eff5c", "score": "0.5016367", "text": "function __construct() {\r\n\t\t\t// inheriting all what is set.\r\n\t\t\tparent::__construct();\r\n\r\n\t\t\t// Since the parent's version is 1, increase it.\r\n\t\t\t// The version property is protected, so we can access it here.\r\n\t\t\t$this->version++;\r\n\r\n\t\t\t// Set the chip's default value to an empty string.\r\n\t\t\t$this->chip = '';\r\n\t\t}", "title": "" }, { "docid": "0c2364721779c6398ad8aaf899ab48a7", "score": "0.50125283", "text": "public function testHack()\n\t{\n // Do nothing\n }", "title": "" }, { "docid": "c9c787ae6feb278d18f9f3c991cc1959", "score": "0.50119084", "text": "private function init()\n\t{\n\t\treturn;\n\t}", "title": "" }, { "docid": "6c7e1072c0ff82753cd8c4906d909d2d", "score": "0.49956077", "text": "function load_default_constants()\n{\n\t$defaults = array(\n\t\t'AUTH_LOG_FILE_COUNT' ,\n\t\t'AUTO_UPGRADE' ,\n\t\t'CHECK_UPGRADE' ,\n\t\t'DEFAULT_HELP_URL' ,\n\t\t'EXPORT' ,\n\t\t'FILE_SELECTOR' ,\n\t\t'FOOTER' ,\n\t\t'FORGOTTEN_YOUR_PASSWORD_URL' ,\n\t\t'GEOIP_URL' ,\n\t\t'PORT_URL' ,\n\t\t'GOOGLE_ANALYTICS' ,\n\t\t'LOCALE' ,\n\t\t'LOGS_MAX' ,\n\t\t'LOGS_REFRESH' ,\n\t\t'MAX_SEARCH_LOG_TIME' ,\n\t\t'NAV_TITLE' ,\n\t\t'NOTIFICATION' ,\n\t\t'NOTIFICATION_TITLE' ,\n\t\t'PIMPMYLOG_ISSUE_LINK' ,\n\t\t'PIMPMYLOG_VERSION_URL' ,\n\t\t'PULL_TO_REFRESH' ,\n\t\t'SORT_LOG_FILES' ,\n\t\t'TAG_SORT_TAG' ,\n\t\t'TAG_NOT_TAGGED_FILES_ON_TOP' ,\n\t\t'TAG_DISPLAY_LOG_FILES_COUNT' ,\n\t\t'TITLE' ,\n\t\t'TITLE_FILE' ,\n\t\t'UPGRADE_MANUALLY_URL' ,\n\t\t'USER_CONFIGURATION_DIR' ,\n\t);\n\tforeach ( $defaults as $d )\n\t{\n\t\tif ( ! defined( $d ) )\n\t\t{\n\t\t\tif ( defined( 'DEFAULT_' . $d ) )\n\t\t\t{\n\t\t\t\tdefine( $d , constant( 'DEFAULT_' . $d ) );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdie( \"Constant 'DEFAULT_$d' is not defined!\" );\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "ddf316881af58a005b3478286ec1a0d5", "score": "0.4989639", "text": "protected function __init() {\r\n\t\t// do nothing for now\r\n\t}", "title": "" }, { "docid": "2d7904c1bc10860affb6747185276fb7", "score": "0.4979992", "text": "function setDefault();", "title": "" }, { "docid": "190ec4fc9dfa8dbc1e65f1f40298ccb5", "score": "0.49789026", "text": "public function setDefaults();", "title": "" }, { "docid": "8aaf128e7ad76bee28add9e139f1340c", "score": "0.49708286", "text": "public function getDefaultMode(): string;", "title": "" }, { "docid": "e782e45d15202e91f2ae3c0a2f032a17", "score": "0.4966613", "text": "protected function loadDefaultCodes()\n\t{\n\n\t}", "title": "" }, { "docid": "ada89c62e680f9603b199fa33507587f", "score": "0.494755", "text": "private function init()\n {\n $this->os_name = php_uname('s');\n $this->os_version = php_uname('r');\n $this->os_architecture = php_uname('m');\n $this->php_version = preg_split('/\\\\./', phpversion());\n }", "title": "" }, { "docid": "fd80f46bfa202a8abb8bb5eca2ef0c74", "score": "0.4943419", "text": "function testOverwritingDefaultManual(){\n\t\t$_SESSION['test']='Overwriting default manual test';\n\t\t$model = new MemModel();\n\t\t$pars = new N3Parser();\n\t\t$model = $pars->parse2model($this->_generateModelString());\n\t\t$ser = new RdfSerializer();\n\t\t$string = $ser->serialize($model);\n\t\t$model2 = new MemModel();\n\t\t$model2->load($string);\n\t\t$this->assertEqual($model2->parsedNamespaces[RDF_NAMESPACE_URI],'rdf');\n\t\t$model2->addNamespace('foo',RDF_NAMESPACE_URI);\n\t\t$this->assertEqual($model2->parsedNamespaces[RDF_NAMESPACE_URI],'foo');\n\t\t$model2->removeNamespace(RDF_NAMESPACE_URI);\n\t\t//$this->assertEqual($model2->parsedNamespaces[RDF_NAMESPACE_URI] , null);\n\t}", "title": "" }, { "docid": "089b3114d1dab9d876e472782f1d02f0", "score": "0.49322572", "text": "function bsd_common () {\n $this->parser = new Parser();\n $this->parser->df_param = \"\"; \n }", "title": "" }, { "docid": "3b2bf770b1b8f215d6c248f2d3813dda", "score": "0.49287874", "text": "#[Pure]\nfunction intlz_create_default() {}", "title": "" }, { "docid": "a9bfc87063389e44429b718d0ee157d0", "score": "0.49198985", "text": "protected function _init() {\n\t}", "title": "" }, { "docid": "ab5e0e481e316431f5d0668b5b9cdc61", "score": "0.4899702", "text": "function __construct()\n\t{\n\t\t// won't affect installs of the extension outside the BizzWiki platform.\n\t\tif (defined('NS_BIZZWIKI')) self::$exemptNamespaces[] = NS_BIZZWIKI;\n\t\tif (defined('NS_FILESYSTEM')) self::$exemptNamespaces[] = NS_FILESYSTEM;\n\t}", "title": "" }, { "docid": "b4ab1303d54403e876b3d5e1c82e564a", "score": "0.4898193", "text": "function _setDefaults()\n {\n $this->options['prefix'] = 'sessiondata:';\n $this->options['memcache'] = null;\n }", "title": "" }, { "docid": "bc65be1396882960e2da2cad2886701c", "score": "0.4895745", "text": "public function getDefaultSettings();", "title": "" }, { "docid": "ddbff624f1252165ae22979e526b4075", "score": "0.48949885", "text": "public static function loadDefaults ()\n {\n self::ll('compatability');\n \n //Load Default classes into CW:\n self::l('Router');\n self::l('Console');\n self::l('Debugging');\n self::l('Database');\n self::l('Security');\n self::l('View');\n self::l('Session');\n self::l('Diagnostics');\n self::l('Translator');\n \n }", "title": "" }, { "docid": "3f0ffb4b0f77c910963ebe69f2a0e645", "score": "0.48891598", "text": "function init_config_nono() {\r\n\r\n\t$liste_meta = array(\r\n\t\t'nono_base_version' => '0.2',\r\n\t\t\r\n\t\t'keywords_nono' => '',\r\n\t\t'copyright_nono' => '',\r\n\t\t'redacteur_nono' => '',\r\n\t\t'directeur_nono' => '',\r\n\t\t\r\n\t\t'nb_evens_nono' => '0',\r\n\t\t'voir_cal_nono' => 'non',\r\n\t\t'voir_une_nono' => 'non',\r\n\t\t'nb_articles_nono' => '3',\r\n\t\t'nb_breves_nono' => '2',\r\n\t\t'nb_sites_nono' => '0',\r\n\t\t'nb_syndic_nono' => '0',\r\n\t\t'nb_messages_nono' => '0',\r\n\r\n\t\t'voir_menu_nono' => 'non',\r\n\t\t'nom_menu1_nono' => '',\r\n\t\t'url_menu1_nono' => '',\r\n\t\t'nom_menu2_nono' => '',\r\n\t\t'url_menu2_nono' => '',\r\n\t\t'nom_menu3_nono' => '',\r\n\t\t'url_menu3_nono' => '',\r\n\t\t'nom_menu4_nono' => '',\r\n\t\t'url_menu4_nono' => '',\r\n\t\t'nom_menu5_nono' => '',\r\n\t\t'url_menu5_nono' => '',\r\n\t\t\r\n\t\t'activer_edito' => 'non',\r\n\t\t'id_edito' => '0',\r\n\t\t'activer_meslogos' => 'non',\r\n\t\t'id_meslogos' => '0'\r\n\t\t);\r\n\twhile (list($nom, $valeur) = each($liste_meta)) {\r\n\t\tif (!$GLOBALS['meta'][$nom]) {\r\n\t\t\tecrire_meta($nom, $valeur);\r\n\t\t\t$modifs = true;\r\n\t\t}\r\n\t}\r\n\r\n\tif ($modifs) ecrire_metas();\r\n}", "title": "" }, { "docid": "75d3832fee3b93a5d636e06ef5096250", "score": "0.48835707", "text": "public function getDefaultFlag();", "title": "" }, { "docid": "e343f56b9db691eb4af98e7ab51518cf", "score": "0.48744828", "text": "public function init()\n {\n // dummy\n }", "title": "" }, { "docid": "d7c8b11a2b1fa7b4cfc5702388f11010", "score": "0.4872254", "text": "public function get_info_defaults()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n // TODO: implementent extensions\n }", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.48681194", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.48681194", "text": "protected function init() {}", "title": "" }, { "docid": "bba9c4aa06dfa4d389f7915b83379169", "score": "0.48631185", "text": "function testUsingDefault(){\n\t\t$_SESSION['test']='Using default array test';\n\t\t$model = new MemModel();\n\t\t$pars = new N3Parser();\n\t\t$model = $pars->parse2model($this->_generateModelString());\n\t\t// delete default prefixes\n\t\tglobal $default_prefixes;\n\t\t$backup = $default_prefixes;\n\t\tforeach ($default_prefixes as $name => $pref){\n\t\t\tunset ($default_prefixes[$name]);\n\t\t}\n\t\t$default_prefixes=array('xxx' => RDF_NAMESPACE_URI);\n\t\t// serialize model;\n\t\t$ser = new RdfSerializer();\n\t\t$save = $ser->serialize($model);\n\t\t$model1 = new MemModel();\n\t\t$model1->load($save);\n\n\t\t$this->assertEqual($model1->parsedNamespaces[RDF_NAMESPACE_URI],'xxx');\n\t\t$model1->removeNamespace(RDF_NAMESPACE_URI);\n\t\t//$this->assertEqual($model1->parsedNamespaces[RDF_NAMESPACE_URI] , null);\n\t\t$default_prefixes = $backup;\n\t}", "title": "" }, { "docid": "c7f105f69bff4261745ceb6874f6a92a", "score": "0.485315", "text": "protected function init(): void\n {\n // do nothing by default\n }", "title": "" }, { "docid": "40d6657ec97276bb9d23ffa8b1c166e3", "score": "0.48507476", "text": "function getDefaultAttribs()\n\t{\n\t\t$o = \"admin_template=admin\ndetaillink=0\nempty_data_msg=No data found\nadvanced-filter=0\nshow-table-nav=1\nshow-table-filters=1\nshow-table-add=1\npdf=\nrss=0\nfeed_title=\nfeed_date=\nrsslimit=150\nrsslimitmax=2500\ncsv_import_frontend=0\ncsv_export_frontend=0\ncsvfullname=0\naccess=0\nallow_view_details=0\nallow_edit_details=0\nallow_add=0\nallow_delete=0\ngroup_by_order=\ngroup_by_order_dir=ASC\nprefilter_query=\nrequire-filter=0\";\n\t\treturn $o;\n\t}", "title": "" }, { "docid": "9965d87a8fd2376c72ee115a61a89b55", "score": "0.48479047", "text": "function setDefaults() \n {\n\t $this->defaults = array(\n\t\t \"mode\" => \"tags\",\n\t\t \"width\" => 250,\n\t\t \"height\" => 250,\n\t\t \"max\" => 10,\n\t\t \"tcolor\" => \"000000\",\n\t\t \"tcolor2\" => \"666666\",\n\t\t \"hicolor\" => \"990000\",\n\t\t \"bgcolor\" => \"eeeeee\",\n\t\t \"trans\" => \"false\",\n\t\t \"tspeed\" => 100,\n\t\t \"distr\" => \"true\",\n\t\t \"fontname\" => \"Helvetica, Arial\",\n\t\t \"fontfallback\" => \"_sans\"\n\t );\n }", "title": "" }, { "docid": "d734fb01e5e953300032c66f44c14f86", "score": "0.48458117", "text": "public function setupDefaults(): void\n {\n vsce_uokms_client_setup_defaults_php($this->ctx);\n }", "title": "" }, { "docid": "8e4030d58c6f22ec00f7b170ca34b659", "score": "0.48447588", "text": "public static function set_default_options( ) {\n\t\t\n\t\t//register settings\n\t\t//load settings\n\t\t\n\t}", "title": "" }, { "docid": "29a9a57e60eaece171a47d853d3b2305", "score": "0.48374757", "text": "public function applyDefaultValues()\n\t{\n\t\t$this->algorithm = 'sha1';\n\t\t$this->is_active = true;\n\t\t$this->is_super_admin = false;\n\t}", "title": "" }, { "docid": "d86fcd1451bda0a4bc92d13204f6bbc1", "score": "0.48369232", "text": "protected function stub()\n {\n }", "title": "" }, { "docid": "77d531fe9c670ec8b03f8f51b9afc503", "score": "0.48320287", "text": "function default_pod($pod)\n\t{\n\t\tif(!empty($pod->pages) && gettype($pod->pages)==='string') {\n\t\t\t$output = '<li>'.$pod->pages.'</li>';\n\t\t}\n\t\telse {\n\t\t\t$output = '<li><em class=\"empty\">No records returned</em></li>';\n\t\t}\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "4b273063f6e4d865e552b8f07a4623c8", "score": "0.48272717", "text": "protected function _init()\n {\n }", "title": "" }, { "docid": "4b273063f6e4d865e552b8f07a4623c8", "score": "0.48272717", "text": "protected function _init()\n {\n }", "title": "" }, { "docid": "4b273063f6e4d865e552b8f07a4623c8", "score": "0.48272717", "text": "protected function _init()\n {\n }", "title": "" }, { "docid": "4b273063f6e4d865e552b8f07a4623c8", "score": "0.48272717", "text": "protected function _init()\n {\n }", "title": "" }, { "docid": "eb90722980c60dab4756b0fff60da66e", "score": "0.4820523", "text": "protected function init()\n\t{\n\t}", "title": "" }, { "docid": "a41261d9a45dadc9e3af4d30720d682a", "score": "0.48201185", "text": "protected function _init()\n {\n\n }", "title": "" }, { "docid": "7ec8935427cf59c3edac09f81f3b0450", "score": "0.48127404", "text": "function cpo_add_defaults() {\r\n\t$tmp = get_option('cpo_core_options');\r\n if(($tmp['chk_default_options_db']=='1')||(!is_array($tmp))) {\r\n\t\tdelete_option('cpo_core_options'); // so we don't have to reset all the 'off' checkboxes too! (don't think this is needed but leave for now)\r\n\t\t$arr = array(\t\"events\" => \"1\",\r\n\t\t\t\t\t\t\"groups\" => \"1\",\r\n\t\t\t\t\t\t\"people\" => \"1\",\r\n\t\t\t\t\t\t\"prayers\" => \"1\",\r\n\t\t\t\t\t\t\"photos\" => \"1\",\r\n\t\t\t\t\t\t\"widgetcontent\" => \"1\",\r\n\t\t);\r\n\t\tupdate_option('cpo_core_options', $arr);\r\n\t}\r\n}", "title": "" }, { "docid": "270f25f7d1cf47dc89029921f42376af", "score": "0.47978193", "text": "public function getDefaults() {\n return array(\n 'debugExt' => 0,\n 'textExt' => 0,\n 'arrayExt' => 0,\n 'dateExt' => 0,\n 'intlExt' => 0,\n 'fileExistsHelper' => 0,\n 'widontHelper' => 0,\n 'kalongFeature' => 0\n );\n }", "title": "" }, { "docid": "b72f1a06dbae881d50ebff3d621da090", "score": "0.47970718", "text": "abstract protected function _init();", "title": "" }, { "docid": "b72f1a06dbae881d50ebff3d621da090", "score": "0.47970718", "text": "abstract protected function _init();", "title": "" }, { "docid": "b72f1a06dbae881d50ebff3d621da090", "score": "0.47970718", "text": "abstract protected function _init();", "title": "" }, { "docid": "96bd53faa1daff56fdd7f4056c617089", "score": "0.4795289", "text": "function dummy()\n {\n }", "title": "" }, { "docid": "bbdf983ed00cc7884a76355069c07d66", "score": "0.47780168", "text": "function dummy() {}", "title": "" }, { "docid": "fac069b93cb6dbd471e6bb41bdceeb9e", "score": "0.47720307", "text": "public function initalise()\n\t{\n\t\tdie('User-agent: *\nDisallow: '.DOCUMENT_PATH.'/cart/'.PHP_EOL.\n'Disallow: '.DOCUMENT_PATH.'/toggle/'.PHP_EOL.\n'Disallow: '.DOCUMENT_PATH.'/options/'.PHP_EOL.\n'Disallow: '.DOCUMENT_PATH.'/skin/pre-load-images/'.PHP_EOL\n\t\t);\n\t}", "title": "" }, { "docid": "dd2360e3653d974be70d0ef3386b5847", "score": "0.47712404", "text": "public function getDescription() {\n\t\treturn 'Pure PHP implementation, please try to install and use the libsodium PHP extension for a better performance';\n\t}", "title": "" }, { "docid": "23e6bf4ba742685bc754dadf2033f483", "score": "0.47665426", "text": "public function setupDefaults(): void\n {\n vscf_round5_setup_defaults_php($this->ctx);\n }", "title": "" }, { "docid": "1e4ff94dd7d37b87e5777b0bd1ad062d", "score": "0.47624975", "text": "function platform();", "title": "" }, { "docid": "ea28160e5b54b247ecc29fdc82aadddd", "score": "0.47568488", "text": "private function __construct() { /* Do nothing here */\n\t\t}", "title": "" }, { "docid": "8ec75a1f489f7064eb251b7d4f6a1f55", "score": "0.47539103", "text": "protected static function getDriver()\n {\n return null;\n }", "title": "" }, { "docid": "5d8bcc5cdee7b57ecdb27bd70cc4ee22", "score": "0.47526905", "text": "function eis_default_status() {\n\tglobal $eis_dev_conf,$eis_dev_status;\n\teis_set_predefined_var_status();\n\treset($eis_dev_conf[\"status\"]);\n\tforeach($eis_dev_conf[\"status\"] as $k=>$v) $eis_dev_status[$k]=$v;\n}", "title": "" }, { "docid": "07673023b733ecc7ca02f6ecc12e5d26", "score": "0.47491726", "text": "function ocifreestatement () {}", "title": "" }, { "docid": "c006e4ba8bfef503479bb2a380a87e69", "score": "0.47411487", "text": "public function testReadingDefault()\n {\n $this->testName = 'Reading default' . $this->getCacheSuffix();\n $this->doTests();\n }", "title": "" }, { "docid": "ace9f4a4a08197294db4772fc3409bb4", "score": "0.47410974", "text": "private function __construct( )\t{}", "title": "" }, { "docid": "219dce81fa06471b4406520d3d807317", "score": "0.4738892", "text": "public function applyDefaultValues()\n\t{\n\t}", "title": "" }, { "docid": "219dce81fa06471b4406520d3d807317", "score": "0.4738892", "text": "public function applyDefaultValues()\n\t{\n\t}", "title": "" }, { "docid": "219dce81fa06471b4406520d3d807317", "score": "0.4738892", "text": "public function applyDefaultValues()\n\t{\n\t}", "title": "" }, { "docid": "219dce81fa06471b4406520d3d807317", "score": "0.4738892", "text": "public function applyDefaultValues()\n\t{\n\t}", "title": "" }, { "docid": "219dce81fa06471b4406520d3d807317", "score": "0.4738892", "text": "public function applyDefaultValues()\n\t{\n\t}", "title": "" }, { "docid": "320144b19b247a480e73b1f89b4a9cec", "score": "0.47387615", "text": "function defaultdomaine() {\r\n $domaine = new stdClass();\r\n \t$domaine->id = 0;\r\n\t\t$domaine->code_domaine=\"\";\r\n\t\t$domaine->description_domaine=\"\";\r\n\t\t$domaine->num_domaine=0;\r\n\t\t$domaine->nb_competences=0;\r\n\t\t$domaine->ref_referentiel=0;\r\n return $domaine;\r\n }", "title": "" }, { "docid": "bbbfde5de3d2c79372dac8fb4c1b2248", "score": "0.47357517", "text": "abstract protected function init();", "title": "" }, { "docid": "bbbfde5de3d2c79372dac8fb4c1b2248", "score": "0.47357517", "text": "abstract protected function init();", "title": "" }, { "docid": "bbbfde5de3d2c79372dac8fb4c1b2248", "score": "0.47357517", "text": "abstract protected function init();", "title": "" }, { "docid": "bbbfde5de3d2c79372dac8fb4c1b2248", "score": "0.47357517", "text": "abstract protected function init();", "title": "" }, { "docid": "bbbfde5de3d2c79372dac8fb4c1b2248", "score": "0.47357517", "text": "abstract protected function init();", "title": "" }, { "docid": "bbbfde5de3d2c79372dac8fb4c1b2248", "score": "0.47357517", "text": "abstract protected function init();", "title": "" }, { "docid": "bbbfde5de3d2c79372dac8fb4c1b2248", "score": "0.47357517", "text": "abstract protected function init();", "title": "" }, { "docid": "bbbfde5de3d2c79372dac8fb4c1b2248", "score": "0.47357517", "text": "abstract protected function init();", "title": "" } ]
0012ae815f9b0dd71c5f31b54a13c053
Use as function to build DeleteTodoController Odj Grabs renderer and model from DIC and instantiates Controller
[ { "docid": "a4839ea7a36196428ebf9eb50e1ec158", "score": "0.68039954", "text": "public function __invoke(ContainerInterface $container)\n {\n $todoModel = $container->get('TodoModel');\n return new DeleteTodoController($todoModel);\n }", "title": "" } ]
[ { "docid": "586d07833162bcc0f3d9ef3beb9597eb", "score": "0.60719347", "text": "private function makeController()\r\n {\r\n\r\n new MakeController($this, $this->files);\r\n\r\n }", "title": "" }, { "docid": "e221633d04fc2f4f5f4d8a2362428823", "score": "0.57914287", "text": "abstract protected function controllerConstruct();", "title": "" }, { "docid": "5905a13dea41ead7716acf26c8e1b561", "score": "0.57775855", "text": "public function createController() \n\t{\n if (!class_exists($this->controller))\n {\n new InvalidPageException(Method::GET, null);\n header('Location: /document/pagenotfound'); \n }\n \n return new $this->controller($this->action,$this->urlvalues, $this->postvalues, $this->filevalues, $this->id, $this->userid, $this->state, $this->admin);\n\t}", "title": "" }, { "docid": "eb37e4dee761270c9f8b5b6b3ed2264e", "score": "0.56243646", "text": "public function deleteAction(){\n\n\t\t$this->view = 'index';\n\n\t\tGenerator::scaffold($this->form, $this->scaffold);\n\n\t\t$modelName = EntityManager::getEntityName($this->getSource());\n\t\tif(!EntityManager::isEntity($modelName)){\n\t\t\tthrow new StandardFormException('No hay un modelo \"'.$this->getSource().'\" para hacer la operación de actualización');\n\t\t\treturn $this->routeTo(array('action' => 'index'));\n\t\t}\n\n\t\tif(!$this->{$modelName}->isDumped()){\n\t\t\t$this->{$modelName}->dumpModel();\n\t\t}\n\n\t\tforeach($this->{$modelName}->getAttributesNames() as $fieldName){\n\t\t\tif(isset($_REQUEST[\"fl_$fieldName\"])){\n\t\t\t\t$this->{$modelName}->$fieldName = $_REQUEST[\"fl_$fieldName\"];\n\t\t\t} else {\n\t\t\t\t$this->{$modelName}->$fieldName = \"\";\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Busca si existe un método o un llamado variable al método\n\t\t * before_delete, si este método devuelve false termina la ejecución\n\t\t * de la acción\n\t\t */\n\t\tif(method_exists($this, \"beforeDelete\")){\n\t\t\tif($this->beforeDelete()===false){\n\t\t\t\tif(!Router::getRouted()){\n\t\t\t\t\treturn $this->routeTo(array('action' => 'index'));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(Router::getRouted()){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} else {\n\t\t\tif(isset($this->beforeDelete)){\n\t\t\t\tif($this->{$this->beforeDelete}()===false){\n\t\t\t\t\tif(!Router::getRouted()){\n\t\t\t\t\t\treturn $this->routeTo(array('action' => 'index'));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(Router::getRouted()){\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t/**\n\t\t * Utilizamos el modelo ActiveRecord para eliminar el registro\n\t\t */\n\t\tif($this->{$modelName}->delete()){\n\t\t\tif($this->successDeleteMessage!=''){\n\t\t\t\tFlash::success($this->successDeleteMessage);\n\t\t\t} else {\n\t\t\t\tFlash::success(\"Se eliminó correctamente el registro\");\n\t\t\t}\n\t\t} else {\n\t\t\tif($this->failureDeleteMessage!=''){\n\t\t\t\tFlash::error($this->failureDeleteMessage);\n\t\t\t} else {\n\t\t\t\tFlash::error(\"Hubo un error al eliminar el registro\");\n\t\t\t}\n\t\t}\n\t\tforeach($this->{$modelName}->getAttributesNames() as $fieldName){\n\t\t\t$_REQUEST[\"fl_$fieldName\"] = $this->{$modelName}->readAttribute($fieldName);\n\t\t}\n\n\t\t/**\n\t\t * Busca si existe un método o un llamado variable al método\n\t\t * after_delete\n\t\t */\n\t\tif(method_exists($this, \"afterDelete\")){\n\t\t\t$this->afterDelete();\n\t\t\tif(Router::getRouted()){\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\tif(isset($this->afterDelete)){\n\t\t\t\t$this->{$this->afterDelete}();\n\t\t\t\tif(Router::getRouted()){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Muestra el Formulario en la accion index\n\t\treturn $this->routeTo(array('action' => 'index'));\n\t}", "title": "" }, { "docid": "57a2f0e48006954d124a0f2f1ad5c4a2", "score": "0.5574911", "text": "public function deleteAction() {\n return new ViewModel();\n }", "title": "" }, { "docid": "7d9ac12a4d97aa8d0d1ae48667d4d9e6", "score": "0.5535964", "text": "protected function buildControllerContext() {}", "title": "" }, { "docid": "b02f50b1acf1967c3f86abfcd8d93b24", "score": "0.5535608", "text": "public function __construct(){\n $url = $this->parseUrl();\n // controlador y accion por defecto\n if ( $url == null) {\n $url[0] = \"ControlUsuarios\";\n //$url[0] = \"controlusuario\";\n $url[1] = \"listar\";\n \n }\n\n //comprobamos que exista el archivo en el directorio controllers\n if(file_exists(self::CONTROLLERS_PATH.ucfirst($url[0]) . \".php\"))\n {\n \n //nombre del archivo a llamar\n $this->_controller = ucfirst($url[0]);\n //eliminamos el controlador de url, así sólo nos quedaran el metodo unset($url[0]);\n unset($url[0]); \n }else{\n \n include APPPATH . \"/vistas/errores/404.php\"; \n exit;\n }\n\n //obtenemos la clase con su espacio de nombres\n \n $fullClass = self::NAMESPACE_CONTROLLERS.$this->_controller; \n //$fullClass = self::NAMESPACE_CONTROLLERS.$this->_controller; \n //asociamos la instancia a $this->_controller\n \n \n include_once \"/Applications/XAMPP/xamppfiles/htdocs/prueba/anexo10-p32-ejercicio/app/controladores/ControlUsuarios.php\";\n include_once \"/Applications/XAMPP/xamppfiles/htdocs/prueba/anexo10-p32-ejercicio/app/modelos/Usuarios.php\";\n include_once \"/Applications/XAMPP/xamppfiles/htdocs/prueba/anexo10-p32-ejercicio/app/interfaces/Crud.php\";\n include_once \"/Applications/XAMPP/xamppfiles/htdocs/prueba/anexo10-p32-ejercicio/app/core/View.php\";\n\n $this->_controller = new $fullClass;\n \n //si existe el segundo segmento comprobamos que el método exista en esa clase\n if(isset($url[1])){\n //aquí tenemos el método\n $this->_method = $url[1];\n if(method_exists($this->_controller, $url[1])){\n unset($url[1]); \n }else{\n throw new \\Exception(\"Controlador: {$fullClass} Metodo: {$this->_method} Desconocido\", 1);\n }\n }\n\n //asociamos el resto de segmentos a $this->_params para pasarlos al método llamado.\n $this->_params = $url ? array_values($url) : [];\n }", "title": "" }, { "docid": "4bc21b0c0a6a100e801c22696b9d9484", "score": "0.5531402", "text": "protected function _initControllers()\n\t{\n\t\t// inicializando controladores\n\t\t$this->_formularioDecoratorGrupoAssocagGrupoOPController = Basico_OPController_FormularioDecoratorGrupoAssocagGrupo::getInstance();\n\n\t\treturn;\n\t}", "title": "" }, { "docid": "95c55b5934df2b2fef9a9c0ba3e78c91", "score": "0.5511204", "text": "protected function setupController()\n {\n }", "title": "" }, { "docid": "88a72e1c8a3b541250666d8d876df9b1", "score": "0.5414154", "text": "public function createController($pi, array $params)\n {\n $container = include __DIR__ . '/dic.php';\n $class = __NAMESPACE__ . '\\\\Controller';\n\n return $container->get($class);\n }", "title": "" }, { "docid": "f06d6c7397d7f05d27d5555730151d35", "score": "0.5413711", "text": "public function deleteEquipoController(){\n\t\t\t\t\t\t\t//se obtiene el id mediante el metodo get\n\t\t\t\t\t\tif (isset($_GET['id'])) {\n\t\t\t\t\t\t\t//se manda mediante la funcion delete jugador con dos paramentros el id obtenido y el nombre de la tabla\n\t\t\t\t\t\t\t$respuesta = Datos::deleteEquipo($_GET['id'], 'equipos');\n\t\t\t\t\t\t\t\t//condicion para la eliminacion completada\n\t\t\t\t\t\t\tif($respuesta == \"success\"){\n\t\t\t\t\t\t\t\theader(\"location:index1.php?action=equipos\");\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\techo 'Error al eliminar equipo';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}", "title": "" }, { "docid": "7768e52ada3641234c165223358c3965", "score": "0.5406829", "text": "private function getController(): IndexController\n {\n return new IndexController($this->getContainer());\n }", "title": "" }, { "docid": "40f73be6ff50aaa31634ebfff605297a", "score": "0.53908205", "text": "private function _createControllerModel()\n {\n\n //echo \"creando archivo de controller\";\n\n $model_controller = new \\application\\modules\\system\\model\\ControllerModel();\n $model_module = new \\application\\modules\\system\\model\\ModuleModel();\n\n // lets set the controller params\n $model_controller->controller_description = 'Controller created automatically '\n . ' from model';\n $model_controller->controller_model_id = $this->_id_value;\n $model_controller->controller_name = strtolower($this->_model_name);\n $model_controller->controller_module = $model_module->find('module', ['id_module' => $this->_module_id], 'one')->module;\n $model_controller->controller_module_id = $this->_module_id;\n $model_controller->view_dependency = $this->_controller_dependencys;\n $model_controller->controller_path = __MODULEFOLDER__ . '/' . $model_controller->controller_module . '/controller/';\n\n //create a new controller for this model\n $model_controller->createController();\n\n // create asociatcion , module,controller->model\n $model_controller_model = new ModuleControllerModel();\n $model_controller_model->id_controller = $model_controller->_id_value;\n $model_controller_model->id_module = $this->_module_id;\n $model_controller_model->id_model = $this->_id_value;\n $model_controller_model->createModelControllerModule();\n }", "title": "" }, { "docid": "4b83dec6b24f4f923c1ce547a3d9c6db", "score": "0.53703547", "text": "public function GenerateController()\n {\n $fileName2='../application/controller/'.$this->className.\"sController.php\";\n\n $fn=fopen($fileName2,'w') or die(\"can't open file\");\n $stringData=\"<?php \\n \\n require_once('controller.php');\\n\";\n\n fwrite($fn,$stringData);\n $string=\"\\n if(isset($\".\"_REQUEST['\".\"action\".\"'])){\\n $\".\"controller_templet=new Controller($\".\"_REQUEST['action']);\\n\\t if($\".\"controller_templet->getAction()=='view'){\\n\";\n $string.=\"\\t\\t $\".$this->className.\"=new \".$this->className.\"Service();\\n \\t\\t echo json_encode( $\".$this->className.\"->view());\\n }\";\n fwrite($fn,$string);\n //fwrite($fn,$stringData);\n $string2=\"\\t else if($\".\"controller_templet->getAction()=='add'){\\n\";\n $string2.=\"\\t \\t $\".$this->className.\"=new \".$this->className.\"Service();\\n \";\n fwrite($fn,$string2);\n //set varible\n for($i=1;$i<sizeof($this->table_names);$i++){\n\n $string3=\"\\t \\t $\".$this->className.\"->set\".$this->table_names[$i].\"($\".\"_REQUEST['\".$this->table_names[$i].\"']);\\n\";\n fwrite($fn,$string3);\n }\n $string4=\"\\t \\t echo json_encode( $\".$this->className.\"->save());\\n }\\n else if($\".\"controller_templet->getAction()=='edit'){\\n \\t \\t $\".$this->className.\"=new \".$this->className.\"Service();\\n \";\n fwrite($fn,$string4);\n for($i=0;$i<sizeof($this->table_names);$i++){\n\n $string3=\"\\t \\t $\".$this->className.\"->set\".$this->table_names[$i].\"($\".\"_REQUEST['\".$this->table_names[$i].\"']);\\n\";\n fwrite($fn,$string3);\n }\n $string4=\"\\t \\t echo json_encode( $\".$this->className.\"->update()); }\\n else if($\".\"controller_templet->getAction()=='delete'){\\n \\t \\t $\".$this->className.\"=new \".$this->className.\"Service();\\n \";\n fwrite($fn,$string4);\n $string3=\"\\t \\t $\".$this->className.\"->set\".$this->table_names[0].\"($\".\"_REQUEST['\".$this->table_names[0].\"']);\\n\";\n fwrite($fn,$string3);\n $string5=\"echo json_encode( $\".$this->className.\"->delete()); \\n}else if($\".\"controller_templet->getAction()=='viewCombo'){ \\n\\t\\t $\".$this->className.\"=new \".$this->className.\"Service();\\n \\t\\t echo json_encode( $\".$this->className.\"->viewConbox());\\n\\t\\t} \\n} ?>\";\n fwrite($fn,$string5);\n fclose($fn);\n }", "title": "" }, { "docid": "8fc472ca59d683f1b71ce35c8d9cd840", "score": "0.5357724", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') ? $modelName : null,\n ]);\n }", "title": "" }, { "docid": "cd98ae6932161ed0431f62e5eec26b70", "score": "0.53565115", "text": "function __contruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contruct();//Chamando o construtor da classe pai\n\t}", "title": "" }, { "docid": "c93c248aa366a21a75f395554a1b6d92", "score": "0.53305554", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('tenant:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') ? $modelName : null,\n ]);\n }", "title": "" }, { "docid": "2340da4739a3d4f3af4a806c3b40163c", "score": "0.5309074", "text": "public function incluirController() {\n $controller = $this->name . 'Controller';\n $this->controller = new $controller;\n }", "title": "" }, { "docid": "1f3acdf88cb0b7dccd1cab7a0e225b29", "score": "0.5297432", "text": "public static function createController($config, $comm = null) {\n\n $templateDirectory = __DIR__.'/stubs';\n\n CoreHelper::log(\"info\", \"Creating controller...\", $comm);\n $md = file_get_contents($templateDirectory.\"/controller.stub\");\n\n $md = str_replace(\"__controller_class_name__\", $config->controllerName, $md);\n $md = str_replace(\"__model_name__\", $config->modelName, $md);\n $md = str_replace(\"__crud_name__\", $config->crudName, $md);\n $md = str_replace(\"__view_column__\", $config->crud->view_col, $md);\n\n // Listing columns\n $listing_cols = \"\";\n foreach ($config->crud->fields as $field) {\n $listing_cols .= \"'\".$field['colname'].\"', \";\n }\n $listing_cols = trim($listing_cols, \", \");\n\n // Module\n $module = Module::where('slug', $config->crud->module);\n\n $md = str_replace(\"__listing_cols__\", $listing_cols, $md);\n $md = str_replace(\"__view_folder__\", snake_case($config->crudName), $md);\n $md = str_replace(\"__route_resource__\", snake_case($config->crudName), $md);\n $md = str_replace(\"__db_table_name__\", $config->dbTableName, $md);\n $md = str_replace(\"__singular_var__\", $config->singularVar, $md);\n $md = str_replace(\"__module__\", $module['name'], $md);\n\n file_put_contents(base_path('app/Modules/'.$module['name'].'/Http/Controllers/'.$config->controllerName.\".php\"), $md);\n }", "title": "" }, { "docid": "bde69b1caf6908a1c910028860a59058", "score": "0.5255731", "text": "public function deleteDeporteController(){\n\t\t\t\t\t\t\t//se obtiene el id mediante el metodo get\n\t\t\t\t\t\tif (isset($_GET['id'])) {\n\t\t\t\t\t\t\t//se manda mediante la funcion delete jugador con dos paramentros el id obtenido y el nombre de la tabla\n\t\t\t\t\t\t\t$respuesta = Datos::deleteDeporte($_GET['id'], 'deportes');\n\t\t\t\t\t\t\t\t//condicion para la eliminacion completada\n\t\t\t\t\t\t\tif($respuesta == \"success\"){\n\t\t\t\t\t\t\t\theader(\"location:index1.php?action=deportes\");\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\techo 'Error al eliminar usuario';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}", "title": "" }, { "docid": "6ce64ff6ecd75521659293ab8c2717ff", "score": "0.52538526", "text": "function Controller()\r\n {\r\n $privilegios = $this->validar();\r\n\r\n switch($privilegios)\r\n {\r\n \r\n case 0: \r\n $this->dispatcher = new Publico();\r\n break;\r\n case 1:\r\n $this->dispatcher = new Portal();\r\n break;\r\n case 4:\r\n $this->dispatcher = new Privado();\r\n break;\r\n case 5:\r\n $this->dispatcher = new SubAdmin();\r\n break;\r\n case 6:\r\n $this->dispatcher = new Empleado();\r\n break;\r\n case 9:\r\n $this->dispatcher = new Admin();\r\n break;\r\n case -1:\r\n default:\r\n $this->dispatcher = new Error();\r\n break;\r\n }\r\n \r\n $this->dispatcher->dispatch();\r\n \r\n return;\r\n }", "title": "" }, { "docid": "bd1ee0eb805b9537f7b5fffd7bc75869", "score": "0.5194244", "text": "protected function createController()\n\t{\n\t\t$this->createParentControllerIfNotExists();\n\n\t\t$this->create('Controller', $this->data->get('controller.path'), [\n\t\t\t'name' => $this->data->get('controller.name'),\n\t\t\t'namespace' => $this->data->get('controller.namespace'),\n\t\t\t'parent' => $this->data->get('base_controller.name'),\n\t\t\t'parent_namespaced' => $this->data->get('base_controller.namespaced'),\n\t\t]);\n\t}", "title": "" }, { "docid": "f5c573357e8982b856f3cf95f34207d4", "score": "0.5188594", "text": "public function controller()\n {\n $this->setClassname($this->getArgument(0));\n\n $this->generateClass('Http/Controllers', 'controller.stub', [\n 'classname' => $this->getClassname(),\n ]);\n }", "title": "" }, { "docid": "441ddd8ff482b1f4a290fc202d094f4f", "score": "0.517494", "text": "public function __construct(\\Jazzee\\Interfaces\\AdminController $controller);", "title": "" }, { "docid": "3931ba5a979acbd9aa891f561cae7af4", "score": "0.5169612", "text": "public static function GetController($action)\n\t{\n\t\t$controller = null;\n\n\t\tswitch ($action) {\n\t\t\tcase 'search':\n\t\t\t\t$controller = new Controller_Search();\n\t\t\t\tbreak;\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('plain', true);\n\t\t\t\tbreak;\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('plain', true);\n\t\t\t\tbreak;\n\t\t\tcase 'history':\n\t\t\t\t$controller = new Controller_History();\n\t\t\t\tbreak;\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new Controller_Snapshot();\n\t\t\t\tbreak;\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new Controller_Tag();\n\t\t\t\tbreak;\n\t\t\tcase 'tags':\n\t\t\t\t$controller = new Controller_Tags();\n\t\t\t\tbreak;\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new Controller_Heads();\n\t\t\t\tbreak;\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new Controller_Blame();\n\t\t\t\tbreak;\n\t\t\tcase 'blob':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('plain', true);\n\t\t\t\tbreak;\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GITPHP_FEED_FORMAT_RSS);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GITPHP_FEED_FORMAT_ATOM);\n\t\t\t\tbreak;\n\t\t\tcase 'commit':\n\t\t\t\t$controller = new Controller_Commit();\n\t\t\t\tbreak;\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new Controller_Project();\n\t\t\t\tbreak;\n case 'tree':\n\t\t\tdefault:\n $controller = new Controller_Tree();\n\t\t}\n\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "733f0fe0fea9174303eced593052e37d", "score": "0.51687485", "text": "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}", "title": "" }, { "docid": "ab1cb66e4ea5f6709ca6b9444df42925", "score": "0.5155611", "text": "public function __construct () \r\n\t\t{\r\n\t\t\t// Get the controller values, action and parameter from URL and set class properties.\r\n\t\t\t$this->get_url_data();\r\n\r\n\t\t\t/**\r\n\t\t\t * Check if controller exists.\r\n\t\t\t * If not add the standard controller (controllers/home-controller.php) and call index() method.\r\n\t\t\t*/\r\n\t\t\tif ( ! $this->controlador )\r\n\t\t\t{\r\n\t\t\t\t// Add the standard controller\r\n\t\t\t\trequire_once ABSPATH . '/controllers/home-controller.php';\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t * Generate controller object \"home-controller.php\"\r\n\t\t\t\t * This controller should have a class called HomeController\r\n\t\t\t\t*/\r\n\t\t\t\t$this->controlador = new HomeController();\r\n\r\n\t\t\t\t// Call index() method\r\n\t\t\t\t$this->controlador->index();\r\n\t\t\t\treturn;\t\t\t\r\n\t\t\t} // ! $this->controlador\r\n\r\n\t\t\t// If controller doesn't exist, nothing happens\r\n\t\t\tif ( ! file_exists( ABSPATH . '/controllers/' . $this->controlador . '.php' ) ) \r\n\t\t\t{\r\n\t\t\t\t// Page not found\r\n\t\t\t\trequire_once ABSPATH . $this->not_found;\r\n\t\t\t\treturn;\r\n\t\t\t} // file_exists\r\n\r\n\t\t\t// Include controller file\r\n\t\t\trequire_once ABSPATH . '/controllers/' . $this->controlador . '.php';\r\n\r\n\t\t\t/**\r\n\t\t\t * Remove invalid characters from controller name to generate class name.\r\n\t\t\t * e.g: If file name is \"news-controller.php\", the class should be named NewsController.\r\n\t\t\t*/\r\n\t\t\t$this->controlador = preg_replace( '/[^a-zA-Z]/i', '', $this->controlador );\r\n\r\n\t\t\t// If controller's class doesn't exist, nothing happens\r\n\t\t\tif ( ! class_exists( $this->controlador ) ) \r\n\t\t\t{\r\n\t\t\t\t// Page not found\r\n\t\t\t\trequire_once ABSPATH . $this->not_found;\r\n\t\t\t\treturn;\r\n\t\t\t} // class_exists\r\n\r\n\t\t\t// Generate controller class's object and send the parameters\r\n\t\t\t$this->controlador = new $this->controlador( $this->parametros );\r\n\r\n\t\t\t// Remove invalid characters fromethod name.\r\n\t\t\t$this->acao = preg_replace( '/[^a-zA-Z]/i', '', $this->acao );\r\n\r\n\t\t\t// If the method exists, run it and send the parameters\r\n\t\t\tif ( method_exists( $this->controlador, $this->acao ) )\r\n\t\t\t{\r\n\t\t\t\t$this->controlador->{$this->acao}( $this->parametros );\r\n\t\t\t\treturn;\r\n\t\t\t} // method_exists\r\n\r\n\t\t\t// Without action, calls index method\r\n\t\t\tif ( ! $this->acao && method_exists( $this->controlador, 'index' ) ) \r\n\t\t\t{\r\n\t\t\t\t$this->controlador->index( $this->parametros );\t\t\r\n\t\t\t\treturn;\r\n\t\t\t} // ! $this->acao \r\n\r\n\t\t\t// Page not found\r\n\t\t\trequire_once ABSPATH . $this->not_found;\r\n\t\t\treturn;\r\n\t\t}", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.5153378", "text": "public function getController();", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.5153378", "text": "public function getController();", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.5153378", "text": "public function getController();", "title": "" }, { "docid": "44397456b6f80012d882544513cb3343", "score": "0.51166886", "text": "private function makeContoller()\n {\n $this->warn(\"Creating Controller\");\n\n $contents = file_get_contents( __DIR__.'../../../resources/base_files/controller.php');\n $updated_contents = $this->updateFileContents($contents);\n $path = base_path() .'/packages/'.$this->packageName.'/Http/Controllers/'.$this->packageName.'Controller.php';\n\n file_put_contents($path, $updated_contents);\n }", "title": "" }, { "docid": "5ee037c10be1543297e78b6e61dc8d1d", "score": "0.5112558", "text": "protected function _initControllers()\n\t{\n\t\treturn;\n\t}", "title": "" }, { "docid": "248ff31c61f968019725b4450263883b", "score": "0.5088582", "text": "public function deleteJugadorController(){\n\t\t\t\t\t\t//se obtiene el id mediante el metodo get\n\t\t\t\t\tif (isset($_GET['id'])) {\n\t\t\t\t\t\t//se manda mediante la funcion delete jugador con dos paramentros el id obtenido y el nombre de la tabla\n\t\t\t\t\t\t$respuesta = Datos::deleteJugador($_GET['id'], 'jugadores');\n\t\t\t\t\t\t\t//condicion para la eliminacion completada\n\t\t\t\t\t\tif($respuesta == \"success\"){\n\t\t\t\t\t\t\theader(\"location:index1.php?action=jugadores\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\techo 'Error al eliminar usuario';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "2c9f91428eafa122e1d7b48880bbee49", "score": "0.5080922", "text": "private function __construct()\n {\n $url = $this->parseUrl();\n\n if (!empty($url[0])) {\n\n //comprobamos que exista el archivo en el directorio Controllers\n if (file_exists(self::CONTROLLERS_PATH . $url[0] . \".php\")) {\n\n $this->_controller = ucfirst($url[0]);\n unset($url[0]);\n } else {\n echo self::CONTROLLERS_PATH . ucfirst($url[0]) . \".php\";\n //include VIEWSPATH . DS . \"errors\" . DS . \"404.php\";\n exit;\n }\n } else {\n $this->_controller = \"Usuarios\";\n }\n\n //obtenemos la clase con su espacio de nombres\n $fullClass = self::NAMESPACE_CONTROLLERS . $this->_controller;\n\n //asociamos la instancia a $this->_controller\n $this->_controller = new $fullClass;\n // validamos si existe un metodo\n if (isset($url[1])) {\n\n //aquí tenemos el método\n $this->_method = $url[1];\n // si existe un metodo procedemos a borrar la posicion correspondiente\n if (method_exists($this->_controller, $this->_method)) {\n\n unset($url[1]);\n } else {\n throw new \\Exception(\"Error Processing Method {$this->_method}\", 1);\n }\n }\n\n //asociamos el resto del array a $this->_params para pasarlos al método llamado, por defecto será un array vacío\n $this->_params = $url ? array_values($url) : [];\n\n }", "title": "" }, { "docid": "517870a2866ebb52fa85d6f73aa3c8d7", "score": "0.507001", "text": "public function deleteController(Request $request){\n $data = $request->json()->all();\n $controller = Controller::findOrFail($data['id']);\n $response = $controller->delete();\n return response()->json($controller, 201);\n }", "title": "" }, { "docid": "d57ef5a3ee0ea199899f50a3bc03b48b", "score": "0.50653225", "text": "public function createController($pi, array $params)\n {\n $page = isset($params['page']) ? $params['page'] : 'main';\n $page = preg_replace('/_page$/', '', $page);\n $class = 'phpList\\plugin\\\\' . $pi . '\\\\' . ucfirst($page) . 'Controller';\n\n return new $class();\n }", "title": "" }, { "docid": "6fc89ee046244b2357eaf363b393840e", "score": "0.50577", "text": "function __construct(){\n $url = isset($_GET['url']) ? $_GET['url'] : null;\n # Quitando las / que puedan haber al final de la url\n $url = rtrim($url, '/');\n # Separando la url por /\n $url = explode('/', $url);\n\n if(empty($url[0])){\n $file_controller = 'controllers/auth.php';\n\n require_once $file_controller; #Cargando el controlador de login\n\n $controller = new Auth();\n $controller->loadModel('auth');\n $controller->render();\n return false;\n }\n # Si no esta vacio se le asigna el controlador\n $file_controller = 'controllers/' . $url[0] . '.php';\n\n if(file_exists($file_controller)){\n \n require_once $file_controller;\n\n $controller = new $url[0];\n $controller->loadModel($url[0]);\n\n if(isset($url[1])){\n\n if(method_exists($controller, $url[1])){\n\n if(isset($url[2])){\n # Nro de parametros (le saco los dos primeros del controlador y del metodo)\n $num_params = count($url) - 2;\n $params = [];\n\n for ($i=0; $i < $num_params; $i++) { \n array_push($params, $url[$i] + 2);\n }\n\n $controller->{$url[1]}($params);\n\n }else{\n # No tiene parametros, se llama al metodo tal cual\n $controller->{$url[1]}(); # Llamado a funcion dinamico\n }\n\n }else{\n # Error, no existe el metodo\n $controller = new Errors();\n }\n\n }else{\n # No hay metodo a cargar, carga el default\n $controller->render();\n }\n\n }else{\n # No existe el archivo, manda error 404\n $controller = new Errors();\n $controller->render();\n }\n }", "title": "" }, { "docid": "f6387048e5e339506d91142e89b9e3b4", "score": "0.50567055", "text": "public function index()\n {\n $this->data['title'] = translate('index_title');\n $this->data['subtitle'] = translate('index_description');\n\n // Sets buttons\n $this->data['buttons'][] = [\n 'type' => 'a',\n 'text' => translate('header_button_create', true),\n 'href' => site_url($this->directory . $this->controller . '/create'),\n 'class' => 'btn btn-success btn-labeled heading-btn',\n 'id' => '',\n 'icon' => 'icon-plus-circle2',\n ];\n\n $this->data['buttons'][] = [\n 'type' => 'button',\n 'text' => translate('header_button_delete', true),\n 'class' => 'btn btn-danger btn-labeled heading-btn',\n 'id' => 'deleteSelectedItems',\n 'icon' => 'icon-trash',\n 'additional' => [\n 'data-href' => site_url($this->directory . $this->controller . '/delete')\n ]\n ];\n\n // Sets Table columns\n $this->data['fields'] = ['id', 'name', 'slug', 'code', 'directory', 'direction', 'status'];\n\n if ($this->data['fields']) {\n foreach ($this->data['fields'] as $field) {\n $this->data['columns'][$field] = [\n 'table' => [\n $this->data['current_lang'] => translate('table_head_' . $field),\n ],\n ];\n }\n }\n\n // Checks GET method, session and collects field records\n\n if ($this->input->get('fields')) {\n $this->data['fields'] = $this->input->get('fields');\n $this->session->set_userdata($this->controller . '_fields', $this->input->get('fields'));\n } elseif ($this->session->has_userdata($this->controller . '_fields')) {\n $this->data['fields'] = $this->session->userdata($this->controller . '_fields');\n } else {\n $this->data['fields'] = array_keys($this->data['columns']);\n }\n\n foreach ($this->data['fields'] as $field) {\n $columns[$field] = $this->data['columns'][$field];\n }\n\n // Sets search field\n $this->data['search_field'] = [\n 'name' => [\n 'property' => 'search',\n 'type' => 'search',\n 'name' => 'name',\n 'class' => 'form-control',\n 'value' => $this->input->get('name'),\n 'placeholder' => translate('search_placeholder', true),\n ],\n ];\n\n // Filters for banned and not specified name\n $filter = [];\n if ($this->input->get('status') != null) {\n $filter['status'] = $this->input->get('status');\n }\n if ($this->input->get('name') != null) {\n $filter['name LIKE \"%' . $this->input->get('name') . '%\"'] = null;\n }\n\n // Sorts by column and order\n $sort = [\n 'column' => ($this->input->get('column')) ? $this->input->get('column') : 'created_at',\n 'order' => ($this->input->get('order')) ? $this->input->get('order') : 'DESC',\n ];\n\n // Gets records count from database\n $this->data['total_rows'] = $this->{$this->model}->filter($filter)->count_rows();\n $segment_array = $this->uri->segment_array();\n $page = (ctype_digit(end($segment_array))) ? (int)end($segment_array) : 1;\n\n // Checks if per_page retrieved from GET method and sets per_page to session and to data.\n if ($this->input->get('per_page')) {\n $this->data['per_page'] = (int)$this->input->get('per_page');\n\n ${$this->controller . '_per_page'} = (int)$this->input->get('per_page');\n $this->session->set_userdata($this->controller . '_per_page', ${$this->controller . '_per_page'});\n } elseif ($this->session->has_userdata($this->controller . '_per_page')) {\n $this->data['per_page'] = $this->session->userdata($this->controller . '_per_page');\n } else {\n $this->data['per_page'] = 10;\n }\n\n $this->data['message'] = ($this->session->flashdata('message')) ? $this->session->flashdata('message') : '';\n\n // Gets all records from database with given criterias\n $total_rows = $this->{$this->model}->where($filter)->count_rows();\n $rows = $this->{$this->model}->fields($this->data['fields'])->filter($filter)->order_by($sort['column'], $sort['order'])->limit($this->data['per_page'], $page - 1)->all();\n\n // Sets action button options\n $action_buttons = [\n 'edit' => true,\n 'delete' => true,\n 'custom' => [\n [\n 'href_value' => 'directory',\n 'icon' => 'icon-folder',\n 'text' => 'Translate',\n 'href' => site_url_multi($this->admin_url.'/translation/directory/'),\n ],\n ],\n ];\n\n // Sets custom row's data options\n $custom_rows_data = [\n [\n 'column' => 'status',\n 'callback' => 'get_status',\n 'params' => '',\n ],\n ];\n\n // Generates Table with given records\n $this->wc_table->set_module(false);\n $this->wc_table->set_columns($columns);\n $this->wc_table->set_rows($rows);\n $this->wc_table->set_custom_rows($custom_rows_data);\n $this->wc_table->set_action($action_buttons);\n $this->data['table'] = $this->wc_table->generate();\n\n // Sets Pagination options and initialize\n $config['base_url'] = site_url_multi($this->directory . $this->controller . '/index');\n $config['total_rows'] = $total_rows;\n $config['per_page'] = $this->data['per_page'];\n $config['reuse_query_string'] = true;\n $config['use_page_numbers'] = true;\n\n $this->pagination->initialize($config);\n $this->data['pagination'] = $this->pagination->create_links();\n\n // Sets Breadcrumb links\n $this->data['breadcrumb_links'][] = [\n 'text' => translate('breadcrumb_link_all', true),\n 'href' => site_url($this->directory . $this->controller),\n 'icon_class' => 'icon-database position-left',\n 'label_value' => $this->{$this->model}->count_rows(),\n 'label_class' => 'label label-primary position-right',\n ];\n\n $this->data['breadcrumb_links'][] = [\n 'text' => translate('breadcrumb_link_active', true),\n 'href' => site_url($this->directory . $this->controller . '?status=1'),\n 'icon_class' => 'icon-shield-check position-left',\n 'label_value' => $this->{$this->model}->filter(['status' => 1])->count_rows(),\n 'label_class' => 'label label-success position-right',\n ];\n\n $this->data['breadcrumb_links'][] = [\n 'text' => translate('breadcrumb_link_deactive', true),\n 'href' => site_url($this->directory . $this->controller . '?status=0'),\n 'icon_class' => 'icon-shield-notice position-left',\n 'label_value' => $this->{$this->model}->filter(['status' => 0])->count_rows(),\n 'label_class' => 'label label-warning position-right',\n ];\n\n $this->data['breadcrumb_links'][] = [\n 'text' => translate('breadcrumb_link_trash', true),\n 'href' => site_url($this->directory . $this->controller . '/trash'),\n 'icon_class' => 'icon-trash position-left',\n 'label_value' => $this->{$this->model}->only_trashed()->count_rows(),\n 'label_class' => 'label label-danger position-right',\n ];\n\n $this->template->render();\n }", "title": "" }, { "docid": "adb31cc89366698aa5547192a77b1f97", "score": "0.50486624", "text": "public function criarControllerAction()\n {\n $form = $this->getServiceLocator()->get('Gerador\\Form\\CriarControllerForm');\n $service = $this->getServiceLocator()->get('Gerador\\Service\\GeradorService');\n\n $objRequest = $this->getRequest();\n\n if ($objRequest->isPost()) {\n $form->setData($objRequest->getPost());\n if ($form->isValid()) {\n $arrDataFromForm = $form->getData();\n\n try {\n $service->createController($arrDataFromForm);\n //return $this->redirect()\n // ->toRoute($this->route, array('controller' => 'gerador', 'action' => 'criarController'));\n } catch (\\Exception $objException) {\n $this->flashMessenger()->addErrorMessage($objException->getMessage());\n }\n } else {\n echo (\"Form Inválido\");\n }\n }\n\n return new ViewModel(compact('form'));\n }", "title": "" }, { "docid": "7331c814af4e81fd1046087aa34d05b6", "score": "0.50472534", "text": "public function todo(): TodoRequestBuilder {\n return new TodoRequestBuilder($this->pathParameters, $this->requestAdapter);\n }", "title": "" }, { "docid": "13df0226079967fd8472c800727e5386", "score": "0.5040159", "text": "public function __construct(){\n\n $url = $this->getUrl();\n\n // evaluamos que el controlador exista\n if (file_exists('../app/controllers/' . ucwords($url[0]) . '.php')) {\n\n // si existe se remplaza al controllerActual\n $this->controllerActual = $url[0];\n unset($url[0]); // destruimos el elemento 0 actual, por el que se ha ingresado en la url \n\n }\n\n require_once '../app/controllers/' . $this->controllerActual . '.php';\n $this->controllerActual = new $this->controllerActual;\n\n // evaluamos que el metodo se alla enviado e la url\n if (isset($url[1])) {\n\n if (method_exists($this->controllerActual, $url[1])) {\n\n $this->metodoActual = $url[1];\n unset($url[1]);\n\n }\n\n }\n\n // obteniendo parametros\n $this->parametros = $url ? array_values($url) : [];\n call_user_func_array([$this->controllerActual, $this->metodoActual], $this->parametros);\n\n }", "title": "" }, { "docid": "6162340ba63026c9f43162c37fa217c5", "score": "0.50379765", "text": "public function deleteEquipoController(){\n\t\t// Obtenemos el ID del aquipo a borrar\n\t\tif(isset($_GET[\"idEquipo\"])){\n\t\t\t$datosController = $_GET[\"idEquipo\"];\n\t\t\t// Mandamos los datos al modelo del carrera a eliminar\n\t\t\t$respuesta = EquipoData::deleteEquipoModel($datosController, \"equipos\");\n\t\t\t// Si se realiza el proceso con exito\n\t\t\tif($respuesta == \"success\"){\n\t\t\t\t// Direccionamos a la vista de Equipos\n\t\t\t\techo \"<script type='text/javascript'>\n\t\t\t \twindow.location = 'index.php?action=ver-equipos';\n\t\t\t \t</script>\";\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c0f8cdb5ace2b52257e1becbed37d7d0", "score": "0.50379103", "text": "protected function generateController()\n\t{\n\t\tforeach ($this->files as $key => $file) {\n\t\t\t$file = $this->formatContent($file);\n\t\t\t\n\t\t\t$this->makeFile($key, $file);\n\t\t}\n\t}", "title": "" }, { "docid": "dc93100e2b404faf21602dc947dc841a", "score": "0.502154", "text": "public function deleteAction() {\n }", "title": "" }, { "docid": "80f1638a89cc4263d9a1e8e6f137a75f", "score": "0.50207573", "text": "function getController()\n\t\t{\n\t\t\t$controllerInstance = & get_instance();\n\t\t\t$controllerData = $controllerInstance->getData();\n\t\t}", "title": "" }, { "docid": "d57a13e96b207607fc9ba7327e52d77e", "score": "0.50185364", "text": "private function _buildController($controller_name) {\r\n\t\t\r\n\t\t$model_name = Inflector::singularize($controller_name);\r\n\t\t$controller_name = Inflector::pluralize($controller_name);\r\n\r\n\t\t$this->controller = new Controller();\r\n\t\t$collection = new ComponentCollection();\r\n\t\t$this->controller->request = new CakeRequest();\r\n\t\t$this->Image =& new ImageComponent($collection);\r\n\t\t$this->PDFMenu =& new PDFMenuComponent($collection);\r\n\r\n\t\t$this->controller->name = $controller_name;\r\n\t\t$this->controller->{$model_name} = $this->{$model_name};\r\n\r\n\t\t$this->Image->initialize($this->controller, $this->files_dry_run);\r\n\t\t$this->PDFMenu->initialize($this->controller, $this->files_dry_run);\r\n\r\n\t}", "title": "" }, { "docid": "f1e4574372829c076246cd2d97807e98", "score": "0.5017391", "text": "public function __construct()\r\n\t{\r\n\t\t\r\n\t\t\r\n\t\tif (!isset($_GET['url']))\r\n\t\t{\r\n\t\t\t$url='site/index';\r\n\t\t}\r\n\t\telse {\n\t\t\t$url=$_GET['url'];\n\t\t}\n\t\t\t\n\t\t\r\n\t\t//Trim and explode data\r\n\t\t$this->url=rtrim($url,'/');\r\n\t\t$this->url=explode('/', $this->url);\r\n\t\t\r\n\t\t//asign index to the second position if url format == /controller/\r\n\t\tif (count($this->url)==1)\r\n\t\t{\r\n\t\t\t $this->url=array_merge($this->url,array('index'));\r\n\t\t}\r\n\t\t\r\n\t\t//Format controller to be nameController\r\n\t\t$control=$this->url[0].'Controller';\r\n\t\t\r\n\t\t//check if controller does not exist:\r\n\t\tif (file_exists(dirname(dirname(__FILE__)).'/controller/'.$control.\".php\")==FALSE)\r\n\t\t{\r\n\t\t\t$control='errorController';\r\n\t\t}\r\n\t\t\r\n\t\t//instantiate class from URL // create a new controller\r\n\t\t$controller=new $control;\r\n\t\t//instantiate model from URL\r\n\t\t$controller->loadModel($this->url[0]);\r\n\t\t\r\n\t\t//Get Method from URL with Arguments\r\n\t\tif (isset($this->url[2]))\r\n\t\t{\r\n\t\t\t$controller->{$this->url[1]}($this->url[2]);\t\r\n\t\t}\r\n\t\t\r\n\t\t//Get Method from URL\r\n\t\tif (isset($this->url[1]))\r\n\t\t{\r\n\t\t\t$controller->{$this->url[1]}();\t\r\n\t\t}\r\n\t\t\r\n\t}", "title": "" }, { "docid": "feaa9cda25e1119c8673a0964cb215d5", "score": "0.501575", "text": "protected function getMaker_AutoCommand_MakeControllerService()\n {\n include_once \\dirname(__DIR__, 4).'\\\\vendor\\\\symfony\\\\console\\\\Command\\\\Command.php';\n include_once \\dirname(__DIR__, 4).'\\\\vendor\\\\symfony\\\\maker-bundle\\\\src\\\\Command\\\\MakerCommand.php';\n include_once \\dirname(__DIR__, 4).'\\\\vendor\\\\symfony\\\\maker-bundle\\\\src\\\\MakerInterface.php';\n include_once \\dirname(__DIR__, 4).'\\\\vendor\\\\symfony\\\\maker-bundle\\\\src\\\\Maker\\\\AbstractMaker.php';\n include_once \\dirname(__DIR__, 4).'\\\\vendor\\\\symfony\\\\maker-bundle\\\\src\\\\Maker\\\\MakeController.php';\n\n $a = ($this->privates['maker.file_manager'] ?? $this->getMaker_FileManagerService());\n\n $this->privates['maker.auto_command.make_controller'] = $instance = new \\Symfony\\Bundle\\MakerBundle\\Command\\MakerCommand(new \\Symfony\\Bundle\\MakerBundle\\Maker\\MakeController($a), $a, ($this->privates['maker.generator'] ?? $this->getMaker_GeneratorService()));\n\n $instance->setName('make:controller');\n\n return $instance;\n }", "title": "" }, { "docid": "e391ad7de7d9c70f4f5ada285f6f9e34", "score": "0.50144184", "text": "public function __construct()\n {\n $model = 'Model'.str_replace('Controller','',static::class);\n $this->request = $GLOBALS['request'];\n $this->response = $GLOBALS['response'];\n $this->model = new $model;\n }", "title": "" }, { "docid": "0966949503be1f5c983c4f6f695dba92", "score": "0.5013561", "text": "public function __construct()\n {\n parent::__construct();\n $this->app = new Application();\n $this->controller = $this->app->getController();\n\n//\n }", "title": "" }, { "docid": "00d58d695e96137b9f0236247bc560f2", "score": "0.50082475", "text": "public function __construct()\n {\n \n //print_r($_GET);\n Session::init();\n //print_r($_GET);\n //;//controller bat dau\n $controller =\"home\";\n $method ='index';\n $id = ''; \n if(isset($_GET['url'])):\n $url=explode('/',rtrim($_GET['url'],'/'));\n // print_r($url);\n if(isset($url[0]) && file_exists('Controllers/'.$url[0].'Controller.php'))\n {\n $controller = $url[0];\n }\n\n if(isset($url[1]) )\n {\n $method = $url[1];\n }\n\n if(isset($url[2]) )\n {\n $id = $url[2];\n }\n endif; \n \n // if(Session::get('logindtl')):\n // if($controller=='login' && $method =='index'):\n // $controller = 'admin';\n // endif; \n \n // else:\n // $controller='login'; \n \n // endif;\n\n \n $model = ucfirst($controller);\n $controllerName = $controller.\"Controller\";\n \n include(\"Controllers/$controllerName.php\");\n $cont_obj = new $controllerName;\n // $cont_obj->loadModel($model);\n \n if(method_exists($cont_obj,$method))/*Trả về TRUE nếu phương thức method_name đã được định nghĩa trong đối tượng object, nếu không là FALSE.*/ \n $cont_obj->{$method}($id);\n else\n $cont_obj->index();\n\n }", "title": "" }, { "docid": "5b7a0c8ec7bb8950407fda35d0208608", "score": "0.5001356", "text": "public function delete($controller, $parameters = array());", "title": "" }, { "docid": "b327f30a2114560543450f05e31a181b", "score": "0.49948516", "text": "public function __construct()\n\t\t{\n\t\t\t$this->Controller = $this->getController().'Controller';\n\n\t\t\t// On inclut le model de la class controller\n\t\t\t$model = $this->getController().'Model';\n\t\t\t// on test que le fichier model existe\n\t\t\tif(file_exists(ROOT_PAGES.$this->getController().__DS__.$model.'.php'))\n\t\t\t{\n\t\t\t\tinclude ROOT_PAGES.$this->getController().__DS__.$model.'.php';\t\n\t\t\t\t$this->$model = new $model($this->getController());\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "d3a8814eebcafc63ebfb87fd1cb3f8b6", "score": "0.49945778", "text": "public function delete(){\r\n \r\n $id = $this->registry->router->id;\r\n if (isset($id) and ($id != '')){\r\n $contable_obj = new contabilidadModel();\r\n $contable = $contable_obj->_get($id);\r\n $data['contable'] = $contable[0];\r\n } /**/ \r\n $this->registry->template->show('deleteContabilidadAdmin',$data);\r\n }", "title": "" }, { "docid": "6d22add10fa68cef458f5bce88d0fc82", "score": "0.4983655", "text": "public static function create()\n\t{\n\t\t//check, if an ObjectController instance already exists\n\t\tif(ObjectController::$objectController == null)\n\t\t{\n\t\t\tObjectController::$objectController = new ObjectController();\n\t\t}\n\n\t\treturn ObjectController::$objectController;\n\t}", "title": "" }, { "docid": "daf4abae96e90570b8d69ab878700c0b", "score": "0.49823466", "text": "public function __construct()\n {\n $this->base = new BaseController(self::table, self::id);\n }", "title": "" }, { "docid": "9b5c2275d9ffcaf65871350494345c0c", "score": "0.4979809", "text": "function &get_instance(){\n\t return Controller::get_instance();\n\t }", "title": "" }, { "docid": "4e233c3af39c52401c722025ac2e8a7e", "score": "0.4978992", "text": "public function deleteEndpoint()\n {\n $stack = $this->getMiddleware(Controller\\DeleteActionController::class);\n $this->app->delete(\"/{$this->name}/{id}\", $stack, \"{$this->name}.delete\");\n return $this;\n }", "title": "" }, { "docid": "f9309d26e7adeaaaaad38aa62e7d22b9", "score": "0.4970395", "text": "public function __construct() {\n\n $url = $this->parseURL();\n\n // set controller dari url\n if( file_exists( '../app/controllers/' . $url[0] . '.php' ) ) {\n\n $this->controller = $url[0];\n unset ( $url[0] );\n\n }\n\n // memanggil file controller berdasarkan url\n require_once '../app/controllers/' . $this->controller . '.php';\n $this->controller = new $this->controller;\n\n // set method dari url\n if( isset( $url[1] ) ) {\n\n if( method_exists( $this->controller, $url[1] ) ) {\n\n $this->method = $url[1];\n unset( $url[1] );\n\n }\n\n }\n\n // set parameters dari url\n if( !empty( $url ) ) {\n\n $this->params = array_values( $url );\n\n }\n\n // menjalankan controller, method, dan parameter yang ada\n call_user_func_array( [ $this->controller, $this->method ], $this->params );\n\n }", "title": "" }, { "docid": "53355a54bdfca52319b0b386c404dc0c", "score": "0.49669492", "text": "private function instantiateControllers()\n {\n $this->app['payments.controller'] = function () {\n return new PaymentsController($this->app['payments.service'], $this->app['payments.validator']);\n };\n }", "title": "" }, { "docid": "ed2768b45ec18f2ef2be1b7e005e44de", "score": "0.49647158", "text": "protected function generateControllers()\n {\n self::generateName();\n self::dependencies();\n $this->functions = get_class_methods($this);\n $this->functionsCheck();\n }", "title": "" }, { "docid": "35c04f36e6686376a85a41edc2a73614", "score": "0.49463752", "text": "public function run()\n {\n $url = self::parseUrl(); // Get sanitized url array\n\n if (file_exists(Path::CONTROLLER_PATH . ucfirst($url[0]) . self::CONTROLLER . \".php\")) {\n $this->controller = ucfirst($url[0]) . self::CONTROLLER; // Capitalize firts letter of controller file\n unset($url[0]); // Remove controller name from url\n }\n \n // Create a new instance of founded controller.\n $className = $this->namespace . $this->controller;\n $this->controller = new $className;\n\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]); // Remove method name from url\n }\n }\n\n $this->params = $url ? array_values($url) : [];\n\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "title": "" }, { "docid": "86fda0b9ac6a34122e9bdf9ba9795781", "score": "0.49404255", "text": "public function __construct(){\n\n $url = $this->parseUrl();\n\n //does the controller file exist\n if(file_exists('../app/controllers/' . $url[0] . '.php')){\n $this->controller = $url[0]; //replace the home controller\n unset($url[0]);\n }\n\n require_once '../app/controllers/' . $this->controller . '.php';\n $this->controller = new $this->controller;\n\n //does the method exist in the given controller\n if(isset($url[1])){\n if(method_exists($this->controller, $url[1])){\n $this->method = $url[1]; //replace the index method\n unset($url[1]);\n }\n }\n\n //if $url has values rebase array and pass it\n //else the $url is empty pass an empty array\n $this->params = $url ? array_values($url) : [];\n\n //uses the controller obj to call the method in that controller and passes the param array\n call_user_func_array([$this->controller, $this->method], $this->params);\n //var_dump($this->params);\n }", "title": "" }, { "docid": "6beaf7c819d1595e8195f7d8f9fe6ad1", "score": "0.4937967", "text": "public function getController() {\n $request = $this->getRequest(); // gets value of request\n \n if ($_SESSION[\"verified\"] == true) { // checks if user is logged inn\n \n // checks for request and returns controller to handle spesific request\n switch ($request) {\n case \"home\":\n return new HomeController($request);\n \n case \"transfer\" :\n case \"getTransferRestriction\" :\n case \"transferProduct\" : \n case \"getuserAndGroupRes\" : \n return new TransferController($request);\n \n case \"sale\" :\n case \"withdrawProduct\" : \n case \"getProdQuantity\" : \n case \"mySales\" : \n case \"getMySales\" : \n case \"getSalesFromID\" : \n case \"editMySale\" : \n case \"getResCount\" :\n case \"getLastSaleInfo\" :\n case \"getAllLastSaleInfo\" :\n case \"getStoProFromCat\" : \n case \"getSalesMacFromID\" : \n return new SaleController($request);\n \n case \"return\" :\n case \"myReturns\" :\n case \"getMyReturns\" :\n case \"returnProduct\" :\n case \"getReturnsFromID\" : \n case \"editMyReturn\" :\n case \"stockDelivery\" : \n return new ReturnController($request);\n \n case \"getAllProductInfo\" :\n case \"getProductByID\" :\n case \"getProductLocation\" : \n return new ProductController($request); \n \n case \"getAllStorageInfo\" : \n case \"getStorageByID\" :\n case \"getStorageRestriction\" :\n case \"getStorageProduct\" : \n case \"chartProduct\" : \n case \"stocktacking\" : \n return new StorageController($request); \n \n case \"getUserInfo\" : \n case \"getUserByID\" : \n case \"getUserRestriction\" : \n case \"editUser\" :\n case \"editUserEngine\" :\n case \"employeeTraning\" : \n case \"editLoggedInUser\" : \n return new UserController($request);\n \n case \"loginEngine\":\n case \"logOut\" :\n return new LoginController($request);\n \n case \"uploadImageShortcut2\" :\n return new mediaController($request);\n \n case \"sendInventarWarning\" :\n case \"newPassword\" : \n return new EmailController($request); \n \n case \"getCatWithProd\" : \n case \"getCatWithMedia\" : \n case \"getCatWithProdAndSto\" : \n return new CategoryController($request); \n }\n \n // only give access to function if user have userlever \"Administrator\"\n if ($_SESSION[\"userLevel\"] == \"Administrator\") { \n switch ($request) {\n case \"productAdm\" :\n case \"addProductEngine\" :\n case \"editProductEngine\" :\n case \"deleteProductEngine\" : \n case \"getProductFromCategory\" : \n case \"getLowInventory\" :\n return new ProductController($request);\n \n case \"storageAdm\":\n case \"addStorageEngine\":\n case \"editStorageEngine\" :\n case \"deleteStorageEngine\" :\n case \"deleteSingleProd\" : \n case \"emailWarning\" : \n case \"setWarningLimit\" : \n case \"getInventoryMac\" : \n return new StorageController($request);\n \n case \"userAdm\" :\n case \"editUserEngine\" : \n case \"addRestriction\" : \n case \"addUserEngine\" : \n case \"deleteUserEngine\" : \n case \"deleteSingleRes\" :\n return new UserController($request); \n \n case \"mediaAdm\" :\n case \"uploadImage\" : \n case \"getAllMediaInfo\" :\n case \"uploadImageShortcut\" :\n case \"getMediaByID\" : \n case \"editMedia\" : \n case \"deleteMedia\" :\n case \"getMediaFromCategory\" : \n return new mediaController($request);\n \n case \"addCategoryEngine\" :\n case \"categoryAdm\" : \n case \"getAllCategoryInfo\" :\n case \"getCategorySearchResult\" :\n case \"getCategoryByID\" :\n case \"deleteCategoryEngine\" :\n case \"editCategoryEngine\" :\n return new CategoryController($request);\n \n case \"showUserSale\" :\n return new SaleController($request);\n \n case \"showUserReturns\" :\n case \"getReturnsMacFromID\" : \n return new ReturnController($request);\n \n case \"logg\" :\n case \"getAllLoggInfo\" :\n case \"getLatestLoggInfo\" :\n case \"loggCheck\" :\n case \"getLoggCheckStatus\" : \n case \"getAdvanceSearchData\" : \n case \"advanceLoggSearch\" : \n return new LoggController($request);\n \n case \"groupAdm\":\n case \"addGroupEngine\" :\n case \"getGroupSearchResult\" :\n case \"getGroupByID\" :\n case \"deleteGroupEngine\" : \n case \"editGroupEngine\" : \n case \"addGroupRestriction\" :\n case \"getAllGroupInfo\" : \n case \"addGroupMember\" :\n case \"getGroupMember\" :\n case \"getGroupRestriction\" :\n case \"deleteGroupMember\" :\n case \"deleteGroupRestriction\" :\n case \"getGroupRestrictionFromSto\" : \n case \"getGroupMembershipFromUserID\" : \n return new GroupController($request);\n }\n }\n \n \n } else {\n // if user is not verified (not logged in), start login controller to display login page\n return new LoginController();\n }\n }", "title": "" }, { "docid": "15b4430f2520dd590fd3f5beaec12f70", "score": "0.49359298", "text": "public function render ()\n {\n $this->_controller = '\n<?php\n\nclass ' . $this->_name . ' extends application_controller implements genesis\n{\n\n ' . $this->render_properties () . '\n\n public $' . $this->_name . ';\n\n public function __Construct ()\n {\n parent::__Construct ();\n\n $this->c_con = new ' . $this->_name . '_model ();\n $this->' . $this->_name . ' = $this->c_con;\n $this->type = \"' . $this->_name . '\";\n\n $this->useImage();\n // This is actioned in Trait - forms (\\core\\helpers\\forms)\n $this->forms->setActionTable ( \\'' . $this->_name . '\\' );\n }\n\n /**\n * Use the index method to display a list of everything in the section\n */\n public function index ()\n {\n if (!!$_POST[ \\'delete\\' ]) {\n $number_deleted = $this->' . $this->_name . '->delete( $_POST[ \\'delete\\' ], array ( \\'image\\' ) );\n $this->addTag ( \\'alert\\', $this->forms->getDelete( $number_deleted ) );\n }\n\n $data = $this->' . $this->_name . '->all();\n\n $this->addTag ( \\'data\\', $data );\n $this->addTag ( \\'page_title\\', \\'' . ucfirst ( $this->_name ) . '\\' );\n $this->addTag ( \\'table\\', \\'' . $this->_name . '\\' );\n $this->setView ( \\'' . $this->_name . '/list\\' );\n }\n\n /**\n * Solely \\'Creates\\' a article - nothing more\n */\n public function add ()\n {\n // This is actioned in Trait - forms (\\core\\helpers\\forms)\n $this->actionInsert ();\n\n $this->addStyle ( \\'upload\\' );\n }\n\n /**\n * Displays a article and Saves\n * @param int $id - the ID of the news article to edit\n */\n public function edit ( $id = \"\" )\n {\n $this->' . $this->_name . '->id = !!$id ? $id : $_POST[\\'' . $this->_name . '\\'][\\'id\\'];\n\n if ( post_set() ) {\n $_POST[ \\'' . $this->_name . '\\' ][ \\'image_id\\' ] = $this->images->id;\n $this->' . $this->_name . '->save( $_POST[ \\'' . $this->_name . '\\' ] );\n $success = $this->forms->getSuccessMessage ();\n }\n\n $this->' . $this->_name . '->find( $this->' . $this->_name . '->id );\n //$this->images->find( $this->' . $this->_name . '->image_id );\n if (!!$_POST[ \\'image\\' ]) {\n $this->saveImage ( $this->images );\n }\n\n\n // Sets the form values by the properties set through the Find method in active record\n $tags = $this->forms->setFormValues ( $this->' . $this->_name . ' );\n\n $this->mergeTags ( $tags );\n // Setting the image so we can do deletion on it\n $this->addTag ( \\'image\\', $this->images->id );\n\n $images = $this->get_multiple_images ();\n $this->addTag ( \\'images\\', $images );\n $this->addTag ( \\'success\\', $success );\n $this->addStyle ( \\'upload\\' );\n\n $this->setView ( \\'' . $this->_name . '/add\\' );\n }\n\n ' . $this->render_methods () . '\n}\n?>';\n\n //Save the controller\n if ( file_put_contents ( '../app/controllers/' . $this->_name . '.php', $this->_controller ) )\n display ( \"The controller was saved successfully.\\n\" );\n else\n display ( \"Something went wrong, Try again.\\n\" );\n }", "title": "" }, { "docid": "9cc4338971da43a1d08118bd6efa1f93", "score": "0.49323943", "text": "public function reciveController() {\n $className = \"Application\\\\Modules\\\\\" . $this->_module . \"\\\\Controllers\\\\\" . $this->_controller;\n\n if (class_exists($className)) {\n $OController = new $className;\n if (method_exists($OController, $this->_action)) {\n $reflection = new \\ReflectionMethod($OController, $this->_action);\n\n if (count(Request::getOptions()) >= $reflection->getNumberOfRequiredParameters()) {\n $OController->setAction($this->action);\n\n return $OController;\n }\n Error::throwError('Nie przekazano wszystkich wymaganych parametrów');\n }\n Error::throwError('Akcja: ' . $this->_action . ' nie istnieje.');\n }\n Error::throwError('Klasa kontrollera: ' . $className . ' nie istnieje.');\n }", "title": "" }, { "docid": "ca48ca54e7ee23e698527a1716bb0b49", "score": "0.49249187", "text": "protected function getFrontendController() {}", "title": "" }, { "docid": "44a408f511f11b367eee17067420b3df", "score": "0.4922154", "text": "function __construct()\n {\n parent::Controller();\n }", "title": "" }, { "docid": "b2ea7d9559c2a76708aab2d780d5d2c4", "score": "0.49204955", "text": "public function __construct($model) \n { \n \techo \"IN CONTROLLER\";\n $this->model = $model;\n echo \"Controller instantiated\";\n }", "title": "" }, { "docid": "cb636a4bd71a574d37ddab166dd7fcc1", "score": "0.49191585", "text": "private function createController($name, $option = \"false\")\n {\n $container = controllers_path();\n $name = preg_replace('/controller/i', 'Controller', ucfirst($name));\n $append = <<<EOF\n\n /**\n * Controller Index\n *\n * @return mixed\n **/\n public function index()\n {\n\n }\n\n\n /**\n * Fetch resource\n *\n * @return mixed\n **/\n public function fetch()\n {\n\n }\n\n\n /**\n * Show all/a resource(s)\n *\n * @param \\$id\n * @return mixed\n **/\n public function show(\\$id)\n\t{\n\n\t}\n\n\n /**\n * Create a resource\n *\n * @return mixed\n * */\n public function create()\n {\n\n }\n\n\n /**\n * Store the resource\n *\n * @return mixed\n * */\n public function store()\n {\n\n }\n\n\n /**\n * Edit a resource\n *\n * @param \\$id\n * @return mixed\n */\n public function edit(\\$id)\n {\n\n }\n\n\n /**\n * update the resource\n *\n * @return mixed\n */\n public function update()\n {\n\n }\n\n\n /**\n * Destroy a resource\n *\n * @param \\$id\n */\n public function destroy(\\$id)\n {\n\n }\n\n\nEOF;\n\n /**\n * if $option is 'empty', return an empty class\n */\n $methods = ($option == \"true\") ? '' : $append;\n\n $sub = preg_replace('/(.*)\\/(.*)/', '$2', $name);\n $data = <<<EOF\n<?php\n\nclass {$sub}\n{\n {$methods}\n}\n\nEOF;\n\n if (file_exists(\"{$container}/{$name}.php\")):\n return die(\"controller '{$name}' already exists.\\n\");\n endif;\n\n $file = fopen(\"{$container}/{$name}.php\", 'x');\n fwrite($file, $data);\n\n return die(\"'{$sub}' class created.\\n\");\n }", "title": "" }, { "docid": "1f2e1d614948e97c5458bf6e03e576fb", "score": "0.4917188", "text": "protected function getMainREFMEDControllerService()\n {\n include_once \\dirname(__DIR__, 4).'\\\\vendor\\\\symfony\\\\framework-bundle\\\\Controller\\\\ControllerTrait.php';\n include_once \\dirname(__DIR__, 4).'\\\\vendor\\\\symfony\\\\framework-bundle\\\\Controller\\\\AbstractController.php';\n include_once \\dirname(__DIR__, 4).'\\\\src\\\\Controller\\\\MainREFMEDController.php';\n\n $this->services['App\\\\Controller\\\\MainREFMEDController'] = $instance = new \\App\\Controller\\MainREFMEDController(($this->privates['App\\\\Repository\\\\DoctorRepository'] ?? $this->getDoctorRepositoryService()), ($this->privates['App\\\\Repository\\\\PharmacyRepository'] ?? $this->getPharmacyRepositoryService()), ($this->privates['App\\\\Repository\\\\LaboratoryRepository'] ?? $this->getLaboratoryRepositoryService()), ($this->privates['App\\\\Repository\\\\DrugsRepository'] ?? $this->getDrugsRepositoryService()), ($this->services['knp_paginator'] ?? $this->getKnpPaginatorService()));\n\n $instance->setContainer(($this->privates['.service_locator.vdmMuyE'] ?? $this->get_ServiceLocator_VdmMuyEService())->withContext('App\\\\Controller\\\\MainREFMEDController', $this));\n\n return $instance;\n }", "title": "" }, { "docid": "7796a7da99004b0ea01f94d8fa4b1a58", "score": "0.491319", "text": "private function createDeleteForm(TodoPriority $todoPriority)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('todopriority_delete', array('id' => $todoPriority->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "0f33b4b2cb8f3975e4c876b87ff7373f", "score": "0.491034", "text": "public function deleteAction()\n {\n $id = $this->params()->fromRoute('id');\n $what = \"interpreter\";\n $name = $this->params()->fromPost('name');\n $entity = $this->entityManager->find(Entity\\Interpreter::class, $id);\n\n return $this->delete(compact('entity', 'what', 'name', 'id'));\n }", "title": "" }, { "docid": "dd12cc7434003b79740f4cfb2a5f5466", "score": "0.49043575", "text": "function get_controller()\n\t{\n\t $uri = $this->uri->fetch_uri();\n\n //Es necesario traer al controlador del config?\n\t\tif ($this->uri->get_uri_string() == '/' OR ! $this->uri->get_uri_string())\n {\n $uri = $this->_set_default_controller();\n }\n\n //Revisa las rutas predefinidas para sobreescribir la actual\n $segments = $this->_rutas($uri); \n\n //Aun no hay metodo?\n if ( empty($this->metodo) OR ! isset($this->metodo))\n {\n $this->metodo = ( ! empty($segments[1])) ? $segments[1] : 'index';\n }\n\n\t\treturn $this->_load_controller();\n\t}", "title": "" }, { "docid": "aae808077ff79570fe5d98a95da80516", "score": "0.48936248", "text": "public static function delete()\r\n {\r\n \r\n $record = new todo();\r\n $record->delete($_REQUEST['id']);\r\n \r\n header(\"Location: index.php?page=tasks&action=getById\");\r\n }", "title": "" }, { "docid": "b97fcdbb82dbccd05d780cbe2ff0f383", "score": "0.48900315", "text": "public function createComponentItemDeleteForm() {\n\t\t$form = new \\Nette\\Application\\UI\\Form;\n\t\t$form->addHidden('item_id');\n\t\t$form->addSubmit('item_delete', 'Smazat')->setHtmlAttribute('class', 'ajax');\n\t\t$form->onSuccess[] = [$this, 'signalPolozkadelete'];\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "62ed68069cbb83f7cc26a16f320dec0f", "score": "0.48803857", "text": "public function buildDependency() {\n $class = strtolower(str_singular($this->getAttribute('name')));\n $vendor = ucfirst($this->getAttribute('module')['vendor']);\n $name = ucfirst($this->getAttribute('module')['name']);\n\n /**\n * Generate api routes for controller .\n */\n $routesGenerator = RoutesGenerator::getInstance();\n $routesGenerator\n ->addReplacement([\n 'route' => 'Route::resource('.str_plural($class).', '.'Modules\\\\'. ucfirst($vendor) . '\\\\' . $name . '\\\\controllers\\\\' . ucfirst($class) . 'ApiController'.');',\n ]);\n\n /**\n * Generate controller .\n */\n (new ControllerGenerator)\n ->addReplacement([\n 'namespace' => 'Modules\\\\' . $vendor . '\\\\' . $name . '\\\\controllers;',\n 'index_action' => ' ',\n 'create_action' => ' ',\n 'store_action' => ' ',\n 'show_action' => ' ',\n 'edit_action' => ' ',\n 'update_action' => ' ',\n 'destroy_action' => ' ',\n ])\n ->save(\n $this->getAttribute('path') . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR . ucfirst($class) .'ApiController.php'\n );\n\n return $this;\n }", "title": "" }, { "docid": "aeebb18e7c1649a0075d196f641bb7b9", "score": "0.48785964", "text": "private static function initDispatch()\n\t{\n\t\t//nom de class de controller:Home\\Controller\\StudentController\n\t\t$controllerClassName = PLAT.\"\\\\\".\"Controller\".\"\\\\\".CONTROLLER . \"Controller\";\n\t\t//creer objet de controller class(plat.controller.ccontreoller)(nommer standard)\n\t\t$controllerObj = new $controllerClassName();\n\n\t\t//manupuler differentes function ver action index\n\t\t$action_name = ACTION;\n\t\t$controllerObj->$action_name();\n\t}", "title": "" }, { "docid": "34844035a0c313ec42e7eaf1afa3065d", "score": "0.48693758", "text": "public function setupController()\n {\n \t$serviceLocator = $this->getApplicationServiceLocator();\n \t\n $this->setController(new ComponentsController( $serviceLocator ));\n $this->getController()->setServiceLocator( $serviceLocator );\n $this->setRequest(new Request());\n $this->setRouteMatch(new RouteMatch(array('controller' => '\\UIComponents\\Controller\\Components', 'action' => 'index')));\n $this->setEvent(new MvcEvent());\n $config = $serviceLocator->get('Config');\n $routerConfig = isset($config['router']) ? $config['router'] : array();\n $router = HttpRouter::factory($routerConfig);\n $this->getEvent()->setRouter($router);\n $this->getEvent()->setRouteMatch($this->getRouteMatch());\n $this->getController()->setEvent($this->getEvent());\n $this->setResponse(new Response());\n \n $this->setZfcUserValidAuthMock();\n }", "title": "" }, { "docid": "a727f8325ad45ee3484de9bbb115236a", "score": "0.48655564", "text": "public function deleteAlumnoController(){\r\n\t\t// Obtenemos el ID del alumno a borrar\r\n\t\tif(isset($_GET[\"idBorrar\"])){\r\n\t\t\t$datosController = $_GET[\"idBorrar\"];\r\n\t\t\t// Mandamos los datos al modelo del alumno a eliminar\r\n\t\t\t$respuesta = AlumnoData::deleteAlumnoModel($datosController, \"alumnos\");\r\n\t\t\t// Si se realiza el proceso con exito\r\n\t\t\tif($respuesta == \"success\"){\r\n\t\t\t\t// Direccionamos a la vista de alumnos\r\n\t\t\t\theader(\"location:index.php?action=Alumnos\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "338a7daa0b1bc301e4ad1bc190aa9c57", "score": "0.48594162", "text": "static public function run(){\n\t\t$instance = new AdminController();\n\t\t$instance->init();\n\t\t$instance->handleRequest();\t\n\t}", "title": "" }, { "docid": "21e0086694efa7cdaa2d3fa9e075b188", "score": "0.48498458", "text": "public function delete(){\n \n $logic = new ProviderLogic();\n \n $res = $logic->delete($_POST[\"id\"]);\n \n View::renderJson($res);\n }", "title": "" }, { "docid": "15c6e078c3c16223bac30040cef740e8", "score": "0.48420873", "text": "public function __construct(){\n\t\t$url= $this->getUrl();\n\n\t\t/*---------- Busca en el controlador pa posicion [0] ----------*/\n\t\tif ($url!=null) { //Evita el warning trying\n\t\t\tif (file_exists('../app/controllers/'.ucwords($url[0]).'.php')) {\n\t\t\t\t// Si existe ponle default\n\t\t\t\t$this->currentController= ucwords($url[0]);\n\t\t\t\t// Elimina el url[0]\n\t\t\t\tunset($url[0]);\n\t\t\t}\n\t\t}\n\t\t// Incluyendo el controlador\n\t\trequire_once '../app/controllers/'.$this->currentController.'.php';\n\t\t// Instanciando la clase Controlador\n\t\t$this->currentController= new $this->currentController;\n\n\n\n\t\t//*---------- Busca en el controlador pa posicion [1] ----------*/\n\t\tif ($url!=null) {\n\t\t\tif (isset($url[1])) {\n\t\t\t\t// Checa si el metodo existe en el controlador\n\t\t\t\tif (method_exists($this->currentController, $url[1])) {\n\t\t\t\t\t$this->currentMethod= $url[1];\t\n\t\t\t\t\t// Elimina el url[0]\n\t\t\t\t\tunset($url[1]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// echo $this->currentMethod;\n\t\t\t// Obteniendo parametros\n\t\t\t$this->params = $url ? array_values($url) : [];\n\t\t\t// Call back con parametros de los $array\n\t\t\tcall_user_func_array([$this->currentController, $this->currentMethod], $this->params);\n\n\t\t}\n\n\n\n\t}", "title": "" }, { "docid": "320e267b303f4685e52514f9cdbd0cf6", "score": "0.48339996", "text": "public function createControllerByID($id)\r\n {\r\n $ret = parent::createControllerByID($id);\r\n if (!empty($ret)) {\r\n return $ret;\r\n } else {\r\n $this->controllerNamespace = $this->fallbackControllerNamespace;\r\n return parent::createControllerByID($id);\r\n }\r\n }", "title": "" }, { "docid": "59842058d24bf5485ac1d6bf3ac7121e", "score": "0.48238972", "text": "public function getController()\n\t{\n\t\t\n\t\t$this->controller = $this->_getController();\n\t\t\n\t\t$controllerClass = '\\\\VirX\\\\Qaton\\\\'.$this->_getControllerClass($this->controller['controller']);\n\t\t\n\t\tif (is_file($this->controller['controller']))\n\t\t{\n\t\t\trequire_once($this->controller['controller']); // TODO: Move this to an autoloader later \n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_issue_404();\n\t\t}\n\t\t\n\t\tif (class_exists($controllerClass))\n\t\t{\n\t\t\t$pageController = new $controllerClass;\n\t\t\t\n\t\t\tif (isset($this->controller['call'][0]))\n\t\t\t{\n\t\t\t\t$calledMethod = $this->controller['call'][0];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$calledMethod = DEFAULT_METHOD;\n\t\t\t}\n\t\t\t\n\t\t\tif ($calledMethod == '' || $calledMethod == '/')\n\t\t\t{\n\t\t\t\t$calledMethod = DEFAULT_METHOD;\n\t\t\t}\n\t\t\t\n\t\t\tif (method_exists($pageController, $calledMethod))\n\t\t\t{\n\t\t\t\t\n\t\t\t\tif (isset($this->controller['call']))\n\t\t\t\t{\n\t\t\t\t\t$params = $this->controller['call'];\n\t\t\t\t\tunset($params[0]);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$params = array();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$reflection = new \\ReflectionMethod($pageController, $calledMethod);\n\t\t\t\t\n\t\t\t\tif ($reflection->getNumberOfRequiredParameters() > count($params))\n\t\t\t\t{\n\t\t\t\t\tif (DEBUG === true)\n\t\t\t\t\t{\n\t\t\t\t\t\techo \"Required: \";\n\t\t\t\t\t\tforeach($reflection->getParameters() as $param)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo $param->name.', ';\n\t\t\t\t\t\t}\n\t\t\t\t\t\texit('Fatal Error: Incomplete Request'); // TODO: Proper error handling\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\texit('Fatal Error: Incomplete Request'); // TODO: Proper error handling\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcall_user_func_array(array($pageController, $calledMethod), array_values($params));\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (DEBUG === true)\n\t\t\t\t{\n\t\t\t\t\texit(\"Controller `{$calledMethod}` Method Does Not Exist\"); // TODO: Use proper erorr handling\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->_issue_404();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (DEBUG === true)\n\t\t\t{\n\t\t\t\texit(\"Class does not exist `{$controllerClass}`\"); // TODO: Use proper erorr handling\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->_issue_404();\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "37c1761f34bd25c78e1433a8267e6583", "score": "0.48235968", "text": "public function generate_table($controller_edit = NULL, $params = array(), $controller_delete = NULL) {\n\t if (isset($params['leyenda'])) {\n\t\t $this->table->set_caption($params['leyenda']);\n\t }\n if (isset($params['cabecera'])) {\n $this->table->set_heading($params['cabecera']);\n }\n if (isset($params['open'])) {\n $this->table->set_template(array('table_open' => $params['open']));\n }\n if (isset($params['datos'])) {\n $i = count($params['cabecera']);\n $j = 0;\n foreach ($params['datos']->result_array() as $dato) {\n $dato = str_replace(\",\", \"\", $dato);\n if ($j <= $i) {\n \n \t////\n \tif (isset($params['url_campo']) AND isset($params['edit']) AND isset($params['delete'])) {\n \t\t$a_edit = anchor(site_url($controller_edit . \"/\" . $dato[$params['url_campo']]), \" \" , 'class=\"'.$params['edit'].'\"');\n \t\t$a_delete = anchor(site_url($controller_delete. \"/\" . $dato[$params['url_campo']]), \" \" , \"class='\".$params['delete'].\"' data-id='\".$params['url_campo'].\"'\");\n \t\t$this->table->add_row(explode(\",\", implode(\",\", $dato) . ',' . $a_edit. ',' . $a_delete));\n \t}\n \telseif (isset($params['url_campo']) AND isset($params['edit']) AND !isset($params['delete'])) {\n \t\t$a_edit = anchor(site_url($controller_edit . \"/\" . $dato[$params['url_campo']]), \" \" , 'class=\"'.$params['edit'].'\"');\n \t\t$this->table->add_row(explode(\",\", implode(\",\", $dato) . ',' . $a_edit));\t\n \t}\n \telseif (isset($params['url_campo']) AND isset($params['delete']) AND !isset($params['edit'])) {\n \t\t$a_delete = anchor(site_url($controller_delete. \"/\" . $dato[$params['url_campo']]), \" \" , \"class='\".$params['delete'].\"' data-id='\".$params['url_campo'].\"'\");\n \t\t$this->table->add_row(explode(\",\", implode(\",\", $dato) . ',' . $a_delete));\t\n \t}\n \telse{\n \t\t$this->table->add_row(explode(\",\", implode(\",\", $dato)));\n \t}\n\n \t///\n/*\n if (isset($params['edit'])) {\n if (isset($params['url_campo'])) {\n $a_edit = anchor(site_url($controller_edit . \"/\" . $dato[$params['url_campo']]), \" \" , \"class='\".$dato[$params['edit']].\"'\");\n // cambios para poder borrar\n\t\t \tif (isset($params['delete'])) {\n\t\t \t$a_delete = anchor(site_url($controller_delete. \"/\" . $dato[$params['url_campo']]), \" \" , \"class='\".$dato[$params['delete']].\"' id='\".$dato[$params['url_campo']].\"'\");\n\t\t \t$this->table->add_row(explode(\",\", implode(\",\", $dato) . ',' . $a_edit. ',' . $a_delete));\n\t\t } else {\n\t\t \t$this->table->add_row(explode(\",\", implode(\",\", $dato) . ',' . $a_edit));\t\n\t\t }\n\t\t \t// fin de los cabios \n } else {\n $this->table->add_row(explode(\",\", implode(\",\", $dato)));\n }\n } else {\n $this->table->add_row(explode(\",\", implode(\",\", $dato)));\n }\n*/\n //$this->table->add_row(explode(\",\", implode(\",\", $dato)));\n }\n }\n }\n return $this->table->generate();\n }", "title": "" }, { "docid": "85ce2faaab2f738d464b8e593b227bbc", "score": "0.48212782", "text": "private function use_controller() {\n\n\t\t// Find out which controller to use.\n\t\tif ( $this->request->is_front ) {\n\n\t\t\t$Controller = new Front;\n\n\t\t} elseif ( $this->request->is_dashboard ) {\n\n\t\t\t$Controller = new Dashboard;\n\n\t\t} elseif ( $this->request->is_system ) {\n\n\t\t\t$Controller = new System;\n\n\t\t} elseif ( $this->request->is_auth ) {\n\n\t\t\t$Controller = new Auth;\n\n\t\t} elseif ( $this->request->is_api ) {\n\n\t\t\t$Controller = new API;\n\n\t\t}\n\n\t\t// Load the route.\n\t\t$Controller->load_route( $this->request );\n\n\t}", "title": "" }, { "docid": "dddd0bc08a8b7ea09d06ad19ab0dff92", "score": "0.4816317", "text": "function __construct()\r\n {\r\n $this->dominio = new DominioModel();\r\n\r\n }", "title": "" }, { "docid": "530a7bbb5e7a59167866eb4db53c0525", "score": "0.48144752", "text": "public function __construct(){\n //------- ruter ---------\n $this->router = Router::getInstance();\n $this->router->getController();\n //------- ruter END---------\n \n $this->defaultSettings();\n $this->createController();\n }", "title": "" }, { "docid": "d5f6720cbd350439da72d056143cd371", "score": "0.48123464", "text": "static public function run(){\n\t\t$instance = new POSAdminController();\n\t\t$instance->init();\n\t\t$instance->handleRequest();\t\n\t}", "title": "" }, { "docid": "9804a4a66033de14e0cdf6f5019a6d2d", "score": "0.48101082", "text": "public function controller($controller){ return $this; }", "title": "" }, { "docid": "7a6a697a9297b145cee436f5556afcb0", "score": "0.4808929", "text": "function controller ( &$Model, &$controller ) {\n\t\t$this->controller = $controller;\n\t}", "title": "" }, { "docid": "68d24f7394b249af438517bdce81976d", "score": "0.4803053", "text": "private function createDeleteForm( Noticia $noticium ) {\n\t\treturn $this->createFormBuilder()\n\t\t ->setAction( $this->generateUrl( 'noticias_delete', array( 'id' => $noticium->getId() ) ) )\n\t\t ->setMethod( 'DELETE' )\n\t\t ->getForm();\n\t}", "title": "" }, { "docid": "e8c4d1216fbe3fe07a7bfbdd93917c18", "score": "0.48004588", "text": "public function doAction() {\n $res = null;\n\n if ($this->isGET()) {\n if (isset($this->qs['page'])) {\n $controllerObject = $this->todo->getController($this->qs['page']);\n\n if ($controllerObject instanceof Controller)\n $res = $controllerObject->getRequest($this->qs);\n else\n $res = HTTPMethod::getError(HTTPMethod::REQUEST_UNAVAIABLE);\n }\n } elseif (isset($this->content['todo'])) {\n $controllerObject = $this->todo->getController($this->content['todo']);\n\n if ($controllerObject instanceof Controller) {\n if ($this->isPOST())\n $res = $controllerObject->postRequest($this->content);\n elseif ($this->isPUT())\n $res = $controllerObject->putRequest($this->content);\n elseif ($this->isDELETE())\n $res = $controllerObject->deleteRequest($this->content);\n else\n $res = HTTPMethod::getError(HTTPMethod::NOT_IMPLEMENTED);\n } else\n $res = HTTPMethod::getError(HTTPMethod::REQUEST_UNAVAIABLE);\n } else {\n $res = HTTPMethod::getError(HTTPMethod::NOT_IMPLEMENTED);\n }\n\n $this->sendMessage($res);\n }", "title": "" }, { "docid": "8bd8a371ef6d76e6eb14f83410f0ed17", "score": "0.47987378", "text": "public function jsonDeleteAction()\n {\n $id = (int) $this->getRequest()->getParam('id');\n\n if (empty($id)) {\n throw new Zend_Controller_Action_Exception(self::ID_REQUIRED_TEXT, 400);\n }\n\n $model = $this->getModelObject()->find($id);\n if (empty($model)) {\n throw new Zend_Controller_Action_Exception(self::NOT_FOUND, 404);\n }\n\n if ($model->hasField('projectId')) {\n Phprojekt::setCurrentProjectId($model->projectId);\n }\n\t$TimeTracker = new My_Timetracker();\n\t$responseTT = $TimeTracker->execDeleteAction($model, $this->getModelObject());\n\t// It allows to delete no matter the response from Timetracker (Only when is one to one)\n\t$responseTT = true;\n\n if ($model instanceof Phprojekt_ActiveRecord_Abstract && $responseTT) {\n $tmp = Default_Helpers_Delete::delete($model);\n if ($tmp === false) {\n $message = Phprojekt::getInstance()->translate(self::DELETE_FALSE_TEXT);\n $resultType = 'error';\n } else {\n $message = Phprojekt::getInstance()->translate(self::DELETE_TRUE_TEXT);\n $resultType = 'success';\n }\n $return = array('type' => $resultType,\n 'message' => $message,\n 'id' => $id);\n\n Phprojekt_Converter_Json::echoConvert($return);\n } else {\n throw new Zend_Controller_Action_Exception(self::NOT_FOUND, 404);\n }\n }", "title": "" }, { "docid": "df206b51af190c78d40f349a9ca3622c", "score": "0.47931296", "text": "private function buildController(Request $request) {\n // With redirection, all incoming URLs are like :\n // index.php?controller=XXX&action=YYY&id=ZZZ\n $controllerSuffix = \"Home\"; // Default controller suffix is \"Home\" to call ControllerHome\n if ($request->existsParameter('controller')) {\n $controllerSuffix = $request->getParameter('controller');\n // First letter to uppercase\n $controllerSuffix = ucfirst(strtolower($controllerSuffix));\n }\n // Once we have the Suffix we can create the controller filename\n $controllerClass = \"Controller\" . $controllerSuffix;\n $controllerFilePath = \"Controller/\" . $controllerClass . \".php\";\n if (file_exists($controllerFilePath)) {\n // Now the right controller matching with the url request is required\n require($controllerFilePath);\n // We instantiate a new controller object \n $controller = new $controllerClass();\n $controller->setRequest($request);\n return $controller;\n }\n else\n throw new Exception(\"File '$controllerFilePath' not found\");\n }", "title": "" }, { "docid": "b66520e95c0073ed1338cdabcc341854", "score": "0.47908399", "text": "public function __construct() {\n $this->Router = new Router($_SERVER);\n \n // Carrego el controlador d'autenticitat i miro si tenim algun token\n $AuthToken = (isset($_GET['AuthToken'])) ? $_GET['AuthToken'] : '';\n $this->Auth = new AuthController();\n $this->Auth->DecodeToken($AuthToken);\n \n\n $this->WebController = new WebController();\n\n // Creem la vista\n $this->executeView();\n\n }", "title": "" }, { "docid": "a53a0f93b8878ee4dda75ca550236b38", "score": "0.4786541", "text": "private function initializeControllers() {\n $this->listControllers = array(\n 'items' => array('controller'=>new ItemsListController(), 'functions' => array('GET'=> 'getAllItems','PUT'=>'updateAnItem','POST'=>'insertAnItem')),\n 'items/current' => array('controller'=>new ItemsListController(), 'functions' => array('GET'=> 'getCurrentItem'))\n );\n }", "title": "" }, { "docid": "00bbc0c6ccb8753eacb351df9f2c194d", "score": "0.47862196", "text": "public function dispatch(){ \n \n if(!@include_once CTRLS_PATH.$this->_datagram['controller'].'.php'){\n die (\"Error loading \".$this->_datagram['controller'].\" controller\");\n }\n \n $class = ucfirst($this->_datagram['controller']);\n $this->_controller = new $class();\n \n if(isset($this->_datagram['method'])){\n $method = $this->_datagram['method'];\n } else {\n //default method\n $method = 'index';\n }\n\n if(method_exists($class,$method)){\n if(isset($this->_datagram['args'])){\n $args = $this->_datagram['args'];\n } else {\n $args = array(null);\n }\n \n // is cache system enabled?\n if($this->_cache->enable == 1){\n // check cache file life time\n $this->_cache->check($this->_router->getPath());\n if(!$this->_cache->showcache){\n call_user_func_array(array($this->_controller,$method),$args);\n }\n } else {\n call_user_func_array(array($this->_controller,$method),$args);\n }\n }\n $this->_benchmark->mark(\"dispatch_complete\");\n }", "title": "" }, { "docid": "cde12989fefb5d0776a2824285ad44a2", "score": "0.4784427", "text": "public function __construct()\n\t{\n\t\t// load the models that this controller will make use of\n\t\t$this->models = ['News','Tag'];\n\t\t$this->loadModels();\n\t}", "title": "" } ]
26d38fa794089ed3626f0f3e241ed724
Get a CSRF Token value as stored in the session, or create one if it doesn't yet exist
[ { "docid": "4e703581fd451a933b072a298bd86bf2", "score": "0.6707445", "text": "public function getTokenValue()\n\t{\n\t\t$tokenName = $this->getTokenName();\n\t\t$tokenValue = $_SESSION['token'][$tokenName];\n\t\tif(empty($tokenValue)) {\n\t\t\t$tokenValue = \\Imanager\\Util::randomToken(32);\n\t\t\t$_SESSION['token'][$tokenName] = $tokenValue;\n\t\t}\n\t\treturn $tokenValue;\n\t}", "title": "" } ]
[ { "docid": "3569104d7637685183b573370b4f6d99", "score": "0.7664652", "text": "public static function csrfTokenGet() {\n $csrfToken = null;\n\n if(!isset($_SESSION['csrfTokenCreatedAt']) || ($_SESSION['csrfTokenCreatedAt'] - time() > 21600)) { //1hr\n $_SESSION['csrfToken'] = password_hash(uniqid(self::$applicationName), PASSWORD_BCRYPT);\n $_SESSION['csrfTokenCreatedAt'] = time();\n }\n $csrfToken = $_SESSION['csrfToken'];\n\n return $csrfToken;\n }", "title": "" }, { "docid": "91cf30e93a6b4e56d88674d97b68f138", "score": "0.7575133", "text": "function generate_csrf_token(){\n if(!isset($_SESSION[\"csrf_token\"])) {\n // No token present, generate a new one\n $token = csrf_token();\n $_SESSION['csrf_token'] = $token;\n } else {\n // Reuse the token\n $token = $_SESSION[\"csrf_token\"];\n }\n return $token;\n }", "title": "" }, { "docid": "5ca7b384c193502e9fa7631108a5618d", "score": "0.7531109", "text": "public static function get_token() {\n\t\t\t\n\t\t\t// Bring in the $session variable\n\t\t\tglobal $session;\n\t\t\t// Check if there is a csrf_token in the $_SESSION\n\t\t\tif(!$session->get('csrf_token')) {\n\t\t\t\t// Token doesn't exist, create one\n\t\t\t\tself::set_token();\n\t\t\t} \n\t\t\t// Return the token\n\t\t\treturn $session->get('csrf_token');\n\t\t}", "title": "" }, { "docid": "34fc374a12426fce5fee27853304e379", "score": "0.72850484", "text": "public function csrf_token()\n\t{\n\t\tif(isset($_SESSION['csrf_token'])) return $_SESSION['csrf_token'];\n\t\telse return NULL;\n\t}", "title": "" }, { "docid": "7ec7fee8e98f1fc45f7e445b860e5edb", "score": "0.7143383", "text": "public function getCsrfToken()\n\t{\n\t\tif ($this->_csrfToken === null)\n\t\t{\n\t\t\t$cookie = $this->getCookies()->itemAt($this->csrfTokenName);\n\n\t\t\t// Reset the CSRF token cookie if it's not set, or for another user.\n\t\t\tif (!$cookie || ($this->_csrfToken = $cookie->value) == null || !$this->csrfTokenValidForCurrentUser($cookie->value))\n\t\t\t{\n\t\t\t\t$cookie = $this->createCsrfCookie();\n\t\t\t\t$this->_csrfToken = $cookie->value;\n\t\t\t\t$this->getCookies()->add($cookie->name, $cookie);\n\t\t\t}\n\t\t}\n\n\t\treturn $this->_csrfToken;\n\t}", "title": "" }, { "docid": "ddcbd2825bd1e6f2e09ccd9c177c5905", "score": "0.70874566", "text": "public static function makeToken ()\n {\n $max_time = 60 * 60 * 24; // token is valid for 1 day\n $csrf_token = Session::get(\"__token\");\n $stored_time = Session::get(\"__token\" . '_time');\n\n if ($max_time + $stored_time <= time() || empty($csrf_token)) {\n Session::set(\"__token\", md5(uniqid(rand(), true)));\n Session::set(\"__token\" . '_time', time());\n }\n\n return Session::get(\"__token\");\n }", "title": "" }, { "docid": "a87645bb000b3e6df2368785e0d2e710", "score": "0.70862454", "text": "function f_csrf_token(){\r\n if(!isset($_SESSION['_token'])){\r\n $_SESSION['_token'] = bin2hex(random_bytes(32));\r\n }\r\n return $_SESSION['_token'];\r\n}", "title": "" }, { "docid": "43ae3d4fc691f28320eacc4bae3c9cae", "score": "0.70633566", "text": "function get_csrf_token() {\n if (!session_id()) session_start();\n return $_SESSION[\"__O_ANTI_CSRF_TOKEN\"];\n}", "title": "" }, { "docid": "033f42398c8e7d491f4e57691eb8c2df", "score": "0.700508", "text": "function csrf_token(){\n $token = sha1( rand(1, 1000) . '$$' . date('H.i.s') . 'digg' );\n $_SESSION['csrf_token'] = $token;\n return $token;\n }", "title": "" }, { "docid": "294aecfb19a756df2625eef755dcb955", "score": "0.6967276", "text": "public function getToken()\n {\n if (!isset($_SESSION['MFW_csrf-token'])) {\n $this->generateNewToken(128);\n }\n\n return $_SESSION['MFW_csrf-token'];\n }", "title": "" }, { "docid": "85cbfe1c42cbdd9a25c66d1c745b42ca", "score": "0.6907764", "text": "protected function getToken()\n {\n if (!isset($_SESSION['MFW_csrf-token'])) {\n throw new RuntimeException('There is no CSRF token generated.');\n }\n\n return $_SESSION['MFW_csrf-token'];\n }", "title": "" }, { "docid": "d0e805ce022f709764060bc626f5bfe5", "score": "0.6828232", "text": "function generate_csrftoken()\n{\n if (!isset($_SESSION[\"csrf_token\"])) $_SESSION[\"csrf_token\"] = bin2hex(random_bytes(64));\n return $_SESSION[\"csrf_token\"];\n}", "title": "" }, { "docid": "48b6283a1ea81b39f8e131add94d44c8", "score": "0.67774165", "text": "function csrf_token()\n {\n $session = app('session');\n\n if (isset($session)) {\n return $session->token();\n }\n\n throw new RuntimeException('Application session store not set.');\n }", "title": "" }, { "docid": "a093452bba8451d2bb551f49a6e851d5", "score": "0.67533386", "text": "public function CreateToken()\n {\n $current_url = $_SERVER['HTTP_X_FORWARDED_PROTO'].\"://\".$_SERVER[\"HTTP_HOST\"].$_SERVER[\"REQUEST_URI\"];\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n $expire_to = 15 * 60; // Expires in 15 minutes\n $time_expire = time() + $expire_to;\n $token = CSRF::GenString();\n \n $GLOBALS['DB']->Insert('csrf', ['token' => $token, 'ip' => $ip, 'url' => $current_url, 'expire_time' => $time_expire]);\n return $token;\n }", "title": "" }, { "docid": "38b18614d83e80c2a59f81db6028c570", "score": "0.67250276", "text": "function once_csrf_token($option=false){\n\t\t// Generate token && return\n\t\tif($option==false){\n\t\t\t$_SESSION['csrf_token'] = md5($this->data['api_key'].''.$this->data['time']);\n\t\t}\n\t\t\t\n\t\treturn $_SESSION['csrf_token'];\n\t}", "title": "" }, { "docid": "0e7befed03802faa298ce5786edaa5ae", "score": "0.67158496", "text": "public static function csrfToken()\n {\n // return AES::encrypt(SECRET_KEY, session_id() . time());\n return AES::encrypt( SECRET_KEY, session_id() );\n }", "title": "" }, { "docid": "34fd7f1a47e4d3daeb8d256dcef62502", "score": "0.6686246", "text": "function setCSRFToken(string $requestName = \"\"): string\n{\n $token = getRandomString();\n $_SESSION[$requestName . \"_csrf_token\"] = $token;\n $_SESSION[$requestName . \"_csrf_time\"] = time();\n return $token;\n}", "title": "" }, { "docid": "d2dd1414c7400399f1bda9cf6c424441", "score": "0.66668063", "text": "function csrf_token(): ?string\n{\n $appKey = env('APP_KEY');\n\n if (!$appKey) {\n throw AppException::missingAppKey();\n }\n\n return Csrf::generateToken(session(), $appKey);\n}", "title": "" }, { "docid": "a8b468ae01d2fa97c98ad7b41946dda4", "score": "0.65158844", "text": "public function generateCSRFToken();", "title": "" }, { "docid": "589d924a1ebf6a0c0736b72cba470f0c", "score": "0.65060556", "text": "function loadToken() {\r\n\t\treturn isset($_SESSION['token']) ? $_SESSION['token'] : null;\r\n\t}", "title": "" }, { "docid": "55416904013b9ecbc2423258914d2b0d", "score": "0.6505965", "text": "function csrf()\n{\n $csrfToken = md5(uniqid(mt_rand(), true));\n\n $_SESSION['csrfToken'] = $csrfToken;\n $res['input'] = '<input type=\"hidden\" name=\"csrfKey\" value=\"' . $csrfToken . '\" />';\n $res['token'] = $csrfToken;\n return $res;\n}", "title": "" }, { "docid": "cf804a70a472f93ac6f3f1ed934c1da2", "score": "0.65000325", "text": "function csrf_token()\n {\n return shy(Shy\\Http\\Contracts\\Session::class)->token();\n }", "title": "" }, { "docid": "e417cbcf5989373ae9258775d0c65993", "score": "0.64586115", "text": "public function loadTokenCSRFToken();", "title": "" }, { "docid": "6c6431717e079b04c7d8c43dcbf547b1", "score": "0.64503324", "text": "protected function getCsrf()\n {\n if (empty($_SESSION['csrf'])) {\n $this->setCsrf();\n }\n\n $this->csrf_token = $_SESSION['csrf'] ? $_SESSION['csrf'] : null;\n\n return $this->csrf_token;\n }", "title": "" }, { "docid": "350fed15789c07f80befceb055f24ca0", "score": "0.6449428", "text": "protected function get_stored_token() {\n global $SESSION;\n\n $name = $this->get_tokenname();\n\n if (isset($SESSION->{$name})) {\n return $SESSION->{$name};\n }\n\n return null;\n }", "title": "" }, { "docid": "86e4a0bb4f7afa97bfcc17e4abc578cf", "score": "0.6446169", "text": "function csrf_token()\n {\n return app()->make('session')->token();\n }", "title": "" }, { "docid": "91884193c277f4496adbf609d1208820", "score": "0.6418651", "text": "private static function set_token() {\n\t\t\t// Bring in the $session variable\n\t\t\tglobal $session;\n\t\t\t// Generate a random token of 64 length\n\t\t\t$token = self::generate_token(64);\n\t\t\t// Store it in the $_SESSION\n\t\t\t$session->set('csrf_token', $token);\n\t\t}", "title": "" }, { "docid": "c7951d5c8ec7aec732077eaed12ef780", "score": "0.6371076", "text": "protected function _editToken()\n {\n if ($token = Mage::getSingleton('core/session')->getData('editToken')) {\n Mage::getSingleton('core/session')->unsetData('editToken');\n return $token;\n }\n return $token;\n }", "title": "" }, { "docid": "79f74770790610a87cb36eaaf3293321", "score": "0.63538706", "text": "private function set_session_token() {\n\t\tif (!isset($_SESSION[$this->session_token_name])) {\n\t\t\t$application = \\Skeleton\\Core\\Application::get();\n\n\t\t\tif ($application->event_exists('security', 'csrf_generate_session_token')) {\n\t\t\t\t$this->session_token = $application->call_event('security', 'csrf_generate_session_token');\n\t\t\t} else {\n\t\t\t\t$this->session_token = bin2hex(random_bytes(32));\n\t\t\t}\n\n\t\t\t$_SESSION[$this->session_token_name] = $this->session_token;\n\t\t} else {\n\t\t\t$this->session_token = $_SESSION[$this->session_token_name];\n\t\t}\n\t}", "title": "" }, { "docid": "3820be8f84a66d8a9c68063fd1ee855d", "score": "0.63420486", "text": "public function getCSRFToken():string;", "title": "" }, { "docid": "4d956d67d48cdb38457720a9cfa3b8e3", "score": "0.63138443", "text": "function get_form_token($id) {\n global $user;\n\n if (store_get('site-token') == NULL) {\n $site_token = mt_rand();\n store_set('site-token', $site_token);\n } else {\n $site_token = store_get('site-token');\n }\n \n if ($user == NULL) {\n return md5($id . $site_token);\n } else {\n return md5(session_id() . $id . $site_token);\n }\n}", "title": "" }, { "docid": "e25898646c518377dbf6ad97a2ab1fb6", "score": "0.6297633", "text": "public static function getFormToken()\n {\n if (!static::$_form_token) {\n static::$_form_token = random_string();\n $_SESSION['form_token'] = static::$_form_token;\n }\n\n return static::$_form_token;\n }", "title": "" }, { "docid": "0edf9a7f673315df1d7d353d10d5da85", "score": "0.6288346", "text": "public function getCsrfToken(): ?string\n {\n return $this->csrfToken;\n }", "title": "" }, { "docid": "d91f22d2d146323957d4640ff2f0a53b", "score": "0.62878406", "text": "protected function retrieveSessionToken() {}", "title": "" }, { "docid": "d91f22d2d146323957d4640ff2f0a53b", "score": "0.6285655", "text": "protected function retrieveSessionToken() {}", "title": "" }, { "docid": "d91f22d2d146323957d4640ff2f0a53b", "score": "0.6285655", "text": "protected function retrieveSessionToken() {}", "title": "" }, { "docid": "d91f22d2d146323957d4640ff2f0a53b", "score": "0.6285264", "text": "protected function retrieveSessionToken() {}", "title": "" }, { "docid": "2c5a51f69356964402166bdd29759d56", "score": "0.62804735", "text": "function createCSRFToken(): string\n{\n $token = bin2hex(openssl_random_pseudo_bytes(16));\n\n if (!isset($_SESSION['x-centreon-token']) || !is_array($_SESSION['x-centreon-token'])) {\n $_SESSION['x-centreon-token'] = [];\n $_SESSION['x-centreon-token-generated-at'] = [];\n }\n\n $_SESSION['x-centreon-token'][] = $token;\n $_SESSION['x-centreon-token-generated-at'][(string)$token] = time();\n\n return $token;\n}", "title": "" }, { "docid": "18a25af50508751768392eb3518a3cba", "score": "0.6255749", "text": "public static function get(): self {\n\t\tif (!isset(self::$csrf)) {\n\t\t\tself::$csrf = new self();\n\t\t}\n\n\t\treturn self::$csrf;\n\t}", "title": "" }, { "docid": "1bdef2d4e2f1f827264ee272e1d68c4c", "score": "0.62360156", "text": "function val_csrf(){\n if($_REQUEST[\"_token\"] == $_SESSION[\"csrf_token\"]) {\n return true;\n }else{\n return false;\n }\n}", "title": "" }, { "docid": "2d16a1e661256854559bb2504cd35cc6", "score": "0.6234578", "text": "public function generateCsrfToken()\n {\n return call_user_func($this->tokenGenerator);\n }", "title": "" }, { "docid": "06076af51e9500f871c585d45774a73c", "score": "0.62312937", "text": "public static function generate()\n {\n // Generates a CSRF token if it has not been generated.\n if (!Session::has(self::CSRF_KEY) || empty(Session::get(self::CSRF_KEY)))\n {\n // Generates a new CSRF token for the next request.\n Session::set(self::CSRF_KEY, str_random(self::CSRF_LENGTH));\n }\n }", "title": "" }, { "docid": "6b148efd4442a4e4b2a16bb296afed46", "score": "0.6197876", "text": "function obtener_token(){\n $token = md5(uniqid(rand(),true));\n $this->session->set_userdata('token',$token);\n return $token;\n }", "title": "" }, { "docid": "f2713a88e69ae2ad4db729d9ec3b7921", "score": "0.61828434", "text": "private static function getTokenFromCookie()\n {\n if (isset($_COOKIE[self::ACCESS_TOKEN_COOKIE_KEY]) ?? $_COOKIE[self::ACCESS_TOKEN_COOKIE_KEY] != '') {\n $cookieValue = $_COOKIE[self::ACCESS_TOKEN_COOKIE_KEY];\n return self::convertToInstance($cookieValue);\n }\n \n return null;\n }", "title": "" }, { "docid": "d22a9f86c91b5d352ee10e0418665abc", "score": "0.6170013", "text": "public static function getToken() {\n return session(\"auth_token\", \"\");\n }", "title": "" }, { "docid": "cbcaae62d9603426059e2819c7157349", "score": "0.6167901", "text": "function csrf_token_is_valid()\r\n{\r\n if (isset($_POST['csrf_token'])) {\r\n $user_token = $_POST['csrf_token'];\r\n $stored_token = $_SESSION['csrf_token'];\r\n return $user_token === $stored_token;\r\n }\r\n\r\n return false;\r\n}", "title": "" }, { "docid": "d526456da7b3d2c0fca8f4c5b419c5f8", "score": "0.61440545", "text": "public static function csrfToken(){\n return self::hiddenField('YII_CSRF_TOKEN', Yii::app()->request->csrfToken);\n }", "title": "" }, { "docid": "6e5b1f7d12fe008dc294f610aa745872", "score": "0.60638624", "text": "public function getCsrfToken(): string\n {\n return $this->csrfToken->generate($this->userID);\n }", "title": "" }, { "docid": "8cdd9f3824bff6279aac14373d4d46b3", "score": "0.60540986", "text": "public function persistSessionToken() {}", "title": "" }, { "docid": "8cdd9f3824bff6279aac14373d4d46b3", "score": "0.60540986", "text": "public function persistSessionToken() {}", "title": "" }, { "docid": "8cdd9f3824bff6279aac14373d4d46b3", "score": "0.60540986", "text": "public function persistSessionToken() {}", "title": "" }, { "docid": "8cdd9f3824bff6279aac14373d4d46b3", "score": "0.60540986", "text": "public function persistSessionToken() {}", "title": "" }, { "docid": "647932d223b86bc25a1ab750f2d9f274", "score": "0.6046228", "text": "public static function generateToken()\r\n {\r\n $_SESSION['CSRF_TOKEN'] = bin2hex(openssl_random_pseudo_bytes(32));\r\n }", "title": "" }, { "docid": "bbc5a2874b3600c6d961485060451d08", "score": "0.5993788", "text": "private function getToken(): ?string\n {\n $request = $this->requestStack->getCurrentRequest();\n\n $token = null;\n\n\n if (null !== $request) {\n $token = $request->headers->get('token', null);\n }\n\n $this->token = $token;\n\n return $token;\n }", "title": "" }, { "docid": "eb6f98a25fd1ea2396e1647ab56d65df", "score": "0.5988447", "text": "public function getToken() {\n if ($this -> check()) {\n \n $this -> token = $this -> tokenauth -> createToken($this -> user -> getAuthIdentifier());\n return $this -> token;\n }\n elseif ($this -> check() && !is_null($this -> token)) {\n return $this -> token;\n }\n\n }", "title": "" }, { "docid": "e61e0b7ef0503fa7d657940426acaf49", "score": "0.59648705", "text": "protected function generateSessionToken() {}", "title": "" }, { "docid": "0d431471d6da1a6aca05c93b0e8f6fae", "score": "0.59520286", "text": "public function getCsrfToken() {\n if (!$this->securityContext->isInitialized() || !$this->authenticationManager->isAuthenticated()) {\n return '';\n }\n $csrfToken = $this->securityContext->getCsrfProtectionToken();\n\n return $csrfToken;\n }", "title": "" }, { "docid": "abff72316f5f4ebe2da031b059b1661b", "score": "0.5947333", "text": "function csrf_field()\n {\n return '<input type=\"hidden\" name=\"_token\" value=\"' . csrf_token() . '\">';\n }", "title": "" }, { "docid": "942e171837c4a6d2912a417a37d82d5e", "score": "0.5940184", "text": "function token_generator(){ \n\n\t$token = $_SESSION['token'] = md5(uniqid(mt_rand(), true));\n\n\treturn $token;\n}", "title": "" }, { "docid": "f3865644fb516244532ca47cc1690452", "score": "0.59329844", "text": "function createToken($name)\n{\n\t$token=NULL;\n\t$token=uniqid(rand(), true);\n\t$_SESSION[$name.'Token']=$token;\n\t$_SESSION[$name.'Token_time']=time();\n\treturn $token;\n}", "title": "" }, { "docid": "d642cb4dc4a8493e624f5daaa2244b3a", "score": "0.5925539", "text": "protected function establishCSRFTokenState() {\n if ($this->state === null) {\n $this->state = md5(uniqid(mt_rand(), true));\n $this->setPersistentData('state', $this->state);\n }\n }", "title": "" }, { "docid": "0d938c02a5c96fab5a4e01408111790e", "score": "0.5924871", "text": "abstract public function persistSessionToken() ;", "title": "" }, { "docid": "47cd1d47934ff58f66c707aa02a1df9c", "score": "0.59196645", "text": "public static function get_session_token()\n {\n $session = Session::instance();\n $token = $session->get(self::$SESSION_TOKEN_NAME);\n if (!$token) {\n $token = text::random('alnum', 16);\n self::set_session_token($token);\n }\n return $token;\n }", "title": "" }, { "docid": "59d8bdcc3fb8a75df472a48cfc87c064", "score": "0.5913339", "text": "function pushToken() {\n $token = md5( 'session.dumb' . time() . mt_rand(1,100*100) . __DIR__ );\n $this->_pushToken( $token );\n $this->session_token = $token;\n return $token;\n }", "title": "" }, { "docid": "286d6f17aa0c4bc77906fd022150661a", "score": "0.59110814", "text": "public function csrfToken($csfrName, $inputName = null);", "title": "" }, { "docid": "3f7a08718f6f02ab8b70fe8bf3957ae9", "score": "0.5907546", "text": "public function getCsrfToken($regenerate = false)\n {\n return Session::token();\n }", "title": "" }, { "docid": "fd766a0e6811e4b255fd2505e258ef7f", "score": "0.59050685", "text": "public function getRememberToken(): ?string;", "title": "" }, { "docid": "ca2e4d9806c73b71c0810498bcfbb9ac", "score": "0.58940834", "text": "abstract protected function retrieveSessionToken() ;", "title": "" }, { "docid": "12e98aa8a27f1ba87a14026b4fea751c", "score": "0.58883744", "text": "public static function cross_check()\n {\n $current_token = get_session('csrf_token');\n\n $req_token = \"\";\n if (!empty($_SERVER['HTTP_X_CSRF_TOKEN'])) {\n $req_token = $_SERVER['HTTP_X_CSRF_TOKEN'];\n } elseif (!empty($_REQUEST['csrf_token'])) {\n $req_token = $_REQUEST['csrf_token'];\n }\n\n if ($req_token != $current_token) {\n render_error(\"Cross-site request forgery detected. Please contact the system administrator for more information\", 403);\n exit;\n }\n\n return null;\n }", "title": "" }, { "docid": "97d7c4963b384190db9238b1641bbe69", "score": "0.58817154", "text": "static function generateToken() {\n $token = Cache::get(\"token\", false);\n if ($token) {\n return $token;\n } else {\n $time = floor(time() / 1000);\n $token = md5(bin2hex($time));\n new Cache(\"token\", $token);\n return $token;\n }\n }", "title": "" }, { "docid": "e69fd26aa36f479b050c74c782c82c76", "score": "0.5871924", "text": "function check_csrf($post_token) {\r\n //This function was released in PHP 5.6.0.\r\n //It allows us to perform a timing attack safe string comparison.\r\n if(!function_exists('hash_equals')) {\r\n function hash_equals($str1, $str2) {\r\n if(strlen($str1) != strlen($str2)) {\r\n return false;\r\n } else {\r\n $res = $str1 ^ $str2;\r\n $ret = 0;\r\n for($i = strlen($res) - 1; $i >= 0; $i--) $ret |= ord($res[$i]);\r\n return !$ret;\r\n }\r\n }\r\n }\r\n\r\n //Make sure that the token POST variable exists.\r\n if(!isset($_POST['token'])){\r\n $csrf_status = false;\r\n } else {\r\n $csrf_status = true;\r\n }\r\n\r\n //It exists, so compare the token we received against the\r\n //token that we have stored as a session variable.\r\n if(hash_equals($post_token, $_SESSION['token']) === false){\r\n $csrf_status = false;\r\n } else {\r\n $csrf_status = true;\r\n }\r\n\r\n return $csrf_status;\r\n}", "title": "" }, { "docid": "ae2210bd07a83aa70d4f1276271777bb", "score": "0.58683646", "text": "public function generateAndReturnToken() : String\n\t{\n\t\t$token = base64_encode(openssl_random_pseudo_bytes(32));\n\t\t$this->driver->delete(config('session')->get('csrf_token_input_name'));\n\t\t$this->driver->create(\n\t\t\tconfig('session')->get('csrf_token_input_name'),\n\t\t\t$token,\n\t\t\t86400\n\t\t);\n\n\t\treturn $token;\n\t}", "title": "" }, { "docid": "7d5c046f36cb57eda06118e820343fce", "score": "0.58681995", "text": "public function set_token($replace=true) {\n\t\tif ( ! $replace && isset($_COOKIE[self::$csrf_cookie]) &&\n preg_match('#^[0-9a-f]{32}$#iS', $_COOKIE[self::$csrf_cookie]) === 1) {\n $this->token = $_COOKIE[self::$csrf_cookie];\n\t\t\treturn $this->token;\n\t\t}\n\n\t\t$rand_bytes = '';\n\t\t$length = 16;\n if ( function_exists('openssl_random_pseudo_bytes') ) {\n $rand_bytes = openssl_random_pseudo_bytes($length);\n } else if ( is_php('5.4') && is_readable('/dev/urandom') ) {\n $fp = fopen('/dev/urandom', 'rb');\n if ( ! empty($fp) ) {\n stream_set_chunk_size($fp, $length);\n $rand_bytes = fread($fp, $length);\n fclose($fp);\n }\n } else if ( defined('MCRYPT_DEV_URANDOM') ) {\n //fallback for < PHP 5.3\n $rand_bytes = mcrypt_create_iv($length, MCRYPT_DEV_URANDOM);\n }\n\t\t\n\t\t$this->token = empty($rand_bytes) ? md5( uniqid( mt_rand(), true) ) : bin2hex($rand_bytes);\n\t\tsetcookie(self::$csrf_cookie, $this->token, 0, '/');\n\t\treturn $this->token;\n\t}", "title": "" }, { "docid": "df3abd7bb2f9dd4fb0f7cb01ea47dcf0", "score": "0.5864259", "text": "function getCSRF()\n{\n\t$return[\"csrf\"] = $_SESSION[\"csrf\"];\n\t$return[\"pastCsrf\"] = $_SESSION[\"pastCsrf\"];\n\n\treturn $return;\n}", "title": "" }, { "docid": "c3e350a4a427210c0014c1e042ce5468", "score": "0.5859174", "text": "public static function generate()\n {\n $maxTime = 60*60*24;\n $tokenSession = Config::get(\"SESSION_TOKEN\");\n $token = Session::get($tokenSession);\n $tokenSessionTime = Config::get(\"SESSION_TOKEN_TIME\");\n $tokenTime = Session::get($tokenSessionTime);\n if ($maxTime + $tokenTime <= time() || empty($token)) {\n Session::put(Config::get(\"SESSION_TOKEN\"), md5(uniqid(rand(), true)));\n Session::put($tokenSessionTime, time());\n }\n return Session::get($tokenSession);\n }", "title": "" }, { "docid": "1599ab7035a6aecf6825c6580a1a0563", "score": "0.5837231", "text": "function updateCSRF()\n{\n\t//If the current minute is >= 30, round down to 30, else, round down to 00\n\t$minute = (date(\"i\") >= 30) ? \"30\" : \"00\";\n\n\t//Construct a string of the current date and time rounded to the previous half-hour\n\t$time = (date(\"Y-m-d H:\") . $minute);\n\n\t$past = (new datetime(\"30 minutes ago\"));\n\t\n\t$pastMinute = $past->format(\"i\");\n\t$pastMinute = ($pastMinute >= 30) ? \"30\" : \"00\";\n\n\t//Create a CSRF token string for the previous 30 minutes with the date, time, and user's username\n\t$pastCsrfToken = ($past->format(\"Y-m-d H:\") . $pastMinute . \" \" . $_SESSION[\"userInfo\"][\"userName\"]);\n\n\t//Create a CSRF token string for the current 30 minutes with the date, time, and user's username\n\t$csrfToken = $time . \" \" . $_SESSION[\"userInfo\"][\"userName\"];\n\n\t//Return the hashed value of the current and previous CSRF tokens\n\t$_SESSION[\"csrf\"] = md5($csrfToken);\n\t$_SESSION[\"pastCsrf\"] = md5($pastCsrfToken);\n\n}", "title": "" }, { "docid": "53e8a07928de75383ab7f6b04336909b", "score": "0.58281404", "text": "public function newInstance(Session $session)\n {\n $segment = $session->getSegment('Aura\\Session\\CsrfToken');\n return new CsrfToken($segment, $this->randval);\n }", "title": "" }, { "docid": "bcb632c5c0e417dd37fcdfe1bb5d9ee4", "score": "0.5817445", "text": "public function actionToken()\n {\n return SignupForm::getSessionToken();\n }", "title": "" }, { "docid": "c7a708c0095a4bc934b28c60225e4183", "score": "0.5812504", "text": "public function getRememberToken()\n {\n return null;\n }", "title": "" }, { "docid": "53eef81fd4a48f9a4788d299cf7ae5f1", "score": "0.58074677", "text": "public function it_gets_the_csrf_token()\n {\n $response = $this->call('GET', '/frontend/session/csrf');\n $this->assertSame($response->content(), csrf_token());\n }", "title": "" }, { "docid": "e2b53ff7e94bf0ff8ff148184123b194", "score": "0.58059543", "text": "function csrf_token_create(\n string $realm,\n string $identity,\n string $secretKey,\n ?int $timestamp = null,\n int $tolerance = MSZ_CSRF_TOLERANCE\n): string {\n $timestamp = $timestamp ?? time();\n $token = bin2hex(pack('Vv', $timestamp, $tolerance));\n\n return $token . csrf_token_hash(\n MSZ_CSRF_HASH_ALGO,\n $realm,\n $identity,\n $secretKey,\n $timestamp,\n $tolerance\n );\n}", "title": "" }, { "docid": "833680e247c154e951b7f5bce07e31dc", "score": "0.5796575", "text": "public function getToken()\n\t{\n\t\treturn static::createFormToken($this->target_form_id ? $this->target_form_id : $this->id);\n\t}", "title": "" }, { "docid": "cede346f88f1896fa7ae1fb93cdd74c3", "score": "0.57951784", "text": "public function getCsrfField(): string\n {\n return '<input type=\"hidden\" name=\"_token\" value=\"' . $this->session->getToken() . '\">';\n }", "title": "" }, { "docid": "fc5c68247f281fdecfbaa3e7695963ad", "score": "0.5791755", "text": "function token_generator(){\n\n\t$token = $_SESSION['token'] = md5(uniqid(mt_rand(), true)); //creates unique id with a random number as a prefix. more secure than a static prefix.\n\treturn $token;\n}", "title": "" }, { "docid": "5a7a9da077ecfc5780baeb2f906321b7", "score": "0.57916087", "text": "function createCsrfToken($action) {\r\n $this->authenticated();\r\n \r\n $db = $this->getDB();\r\n $sessionId = $this->container['user']['Ga_Session_Id'];\r\n \r\n // FIXME TEST\r\n //throw new Exception(\"ensure failures are checked\");\r\n \r\n return GroboAuth\\DataAccess::createCsrfToken($db, $sessionId, $action);\r\n }", "title": "" }, { "docid": "4bc4b1fc80a52c30b6381b5ec4b9e1a7", "score": "0.5790194", "text": "public function setToken()\n {\n $token = str_random(10);\n\n if (self::where('token', '=', $token)->exists()) {\n $this->setToken();\n }\n\n $this->token = $token;\n $this->save();\n\n return $token;\n }", "title": "" }, { "docid": "ad4883b384357cba9adc718cacb76f86", "score": "0.57831025", "text": "public function createToken ($tokenName = 'form_token', $tokenExpirationTime = 300) {\n\t\tif (isset($_SESSION[$tokenName])) {\n\t\t\t$this->token['name'] = $tokenName;\n\t\t\t$this->token['value'] = $_SESSION[$tokenName];\n\t\t\t$this->token['expirationTime'] = $_SESSION[\"{$tokenName}_expiration_time\"];\n\t\t} else {\n\t\t\tif (!is_null($this->token['name']))\n\t\t\t\t$this->unsetToken($this->token); // Unset previous token\n\n\t\t\t$this->token['name'] = $tokenName;\n\t\t\t$this->token['value'] = md5(uniqid('auth', true));\n\n\t\t\tif (is_null($this->token['expirationTime']))\n\t\t\t\t$this->token['expirationTime'] = $tokenExpirationTime;\n\n\t\t\t$_SESSION[$tokenName] = $this->token['value'];\n\t\t\t$_SESSION[\"{$tokenName}_time\"] = time();\n\t\t\t$_SESSION[\"{$tokenName}_expiration_time\"] = $this->token['expirationTime'];\n\t\t}\n\n\t\treturn $this->token;\n\t}", "title": "" }, { "docid": "738bd9c7a6da5bb3e2cec425922d2bd1", "score": "0.5769452", "text": "public function get_session_token() {\n\t\treturn $this->session_token;\n\t}", "title": "" }, { "docid": "8ade7fd2e1b3adb0d5051b81de7dcf60", "score": "0.5761124", "text": "public function getRememberToken()\n {\n return $this->_token;\n }", "title": "" }, { "docid": "94cb4ce642857afa2326ef47df33c139", "score": "0.57539153", "text": "function buildCsrfToken()\n{\n /* for csrf protection, the nonce will be formed from a hash of several variables \n that make up the session, concatenated, but should be stable between requests,\n along with some random salt (defined above) */\n global $csrf_nonce, $csrf_salt, $action, $orgid, $csrf_expdate;\n\t$csrf_expdate = new DateTime(NULL, new DateTimeZone(\"UTC\"));\n\t$csrf_expdate->add(new DateInterval(\"PT4H\")); /* CSRF token expires in 4 hours */\n $token = $orgid . $action . $_SERVER['SERVER_SIGNATURE'] . $_SERVER['SCRIPT_FILENAME'] . $csrf_expdate->format('U') . session_id() . $csrf_salt;\n //echo \"<!-- DEBUG token = $token -->\\n\";\n $csrf_nonce = hash(\"sha256\", $token);\n}", "title": "" }, { "docid": "530a113476a7ea75501c123c632b16c0", "score": "0.5751199", "text": "public function getCsrf()\n {\n return $this->security->getToken();\n }", "title": "" }, { "docid": "530a113476a7ea75501c123c632b16c0", "score": "0.5751199", "text": "public function getCsrf()\n {\n return $this->security->getToken();\n }", "title": "" }, { "docid": "2312104aca19927f24fb8723a21e56f5", "score": "0.57482666", "text": "public function getRememberToken()\n {\n }", "title": "" }, { "docid": "ccad94a97d6d28549c9dff402e456f90", "score": "0.5743985", "text": "protected function _getFormToken($request)\n\t{\n\t\trequire_once('Zend/Dom/Query.php');\n\t\t$dom = new Zend_Dom_Query($request->getBody());\n\t\t$form_token_control = $dom->query('input[name=\"__FORM_TOKEN\"]');\n\t\t$form_token = $form_token_control->current()->getAttribute('value');\n\n\t\treturn $form_token;\n\t}", "title": "" }, { "docid": "c9d55069aab5526bc3efaf54edb794aa", "score": "0.5743284", "text": "private function generateCSRFToken(){\n $now = time();\n \n try {\n $string = random_bytes(32);\n return bin2hex($string . $now);\n } catch (Exception $e) {\n return $e->getMessage();\n }\n }", "title": "" }, { "docid": "3050991b9185c0a9f110d4c9bed8e3d4", "score": "0.57397085", "text": "public static function generateToken()\n {\n if (!Session::has('token'))\n {\n $random_token = base64_decode(openssl_random_pseudo_bytes(32));\n Session::add('token', $random_token);\n }\n\n return Session::get('token');\n }", "title": "" }, { "docid": "03e976608005192a83995dfb7a53199c", "score": "0.5735036", "text": "public function retrieveToken(): ?string;", "title": "" }, { "docid": "411974f47412b8cedb4f864be23b9fa9", "score": "0.5733648", "text": "public function generate_csrf_token($form_name)\n {\n //FIXME: replace SHA512/rand method with more powerful entropy generator\n //create token using sha512\n $token = hash('sha512', mt_rand(0, mt_getrandmax()));\n\n //set token in session\n $_SESSION['token'][$form_name] = $token;\n\n return $token;\n }", "title": "" }, { "docid": "ddb7a3fbd4ac203202b750944a95b945", "score": "0.5721179", "text": "public function getRememberToken(){\n return $this->token;\n }", "title": "" }, { "docid": "e1b3529764bc6d551a8e8ccdecaf74e0", "score": "0.5708212", "text": "function csrf_field()\n {\n return new HtmlString('<input type=\"hidden\" name=\"_token\" value=\"'.csrf_token().'\">');\n }", "title": "" } ]
c845efd78925c4bce7cf221f57dba2e6
A function that adds Terminal, StackerTagID, and SerialNumber each with corresponding status.
[ { "docid": "447eedf809302b536caef495d32b3641", "score": "0.5557864", "text": "public function actionAddStackerInfo() {\n $module = \"AddStackerInfo\";\n $APIMethodID = APILogsModel::API_METHOD_ADDSTACKERINFO;\n $transMsg = \"\";\n $errorCode = \"\";\n\n $request = $this->_readJsonRequest();\n if (isset($request['StackerTagID']) && isset($request['SerialNumber']) && isset($request['TerminalName'])) {\n if (($request['StackerTagID']) == \"\" || ($request['SerialNumber']) == \"\" || ($request['TerminalName']) == \"\") {\n $transMsg = 'One or more fields is not set or is blank.';\n $errorCode = 1;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n } else {\n $stackerTagID = trim($request['StackerTagID']);\n $serialNumber = trim($request['SerialNumber']);\n $status = 1;\n $terminalName = trim($request['TerminalName']);\n if (ctype_alnum($stackerTagID) && ctype_alnum($serialNumber) && is_numeric($status) && ctype_alnum($terminalName)) {\n if (($status == CommonController::STACKER_INFO_STATUS_ON_STOCK) || ($status == CommonController::STACKER_INFO_STATUS_ACTIVE) || ($status == CommonController::STACKER_INFO_STATUS_DEACTIVATED)) {\n $terminalName = Yii::app()->params['SitePrefix'] . $terminalName;\n $stackerInfoModel = new StackerInfoModel();\n $isTerminalExists = $stackerInfoModel->isTerminalExists($terminalName);\n $isStackerTagIDExists = $stackerInfoModel->isStackerTagIDExists($stackerTagID);\n $isSerialNumberExists = $stackerInfoModel->isSerialNumberExists($serialNumber);\n\n if ($isStackerTagIDExists == 0) {\n if ($isSerialNumberExists == 0) {\n if ($isTerminalExists > 0) {\n $isTerminalActive = $stackerInfoModel->checkIfTerminalIsActive($terminalName);\n if ($isTerminalActive > 0) {\n $transMsg = 'Stacker may be active or onstock.';\n $errorCode = 15;\n $otherInfo = \"StackerTagID: \" . $stackerTagID . \" | SerialNumber: \" . $serialNumber . \" | TerminalName: \" . $terminalName . \" |\";\n Utilities::errorLogger($transMsg, $module, $otherInfo);\n } else {\n $apiTransdetails = 'StackerTagID = ' . $stackerTagID . ', SN = ' . $serialNumber . ', TerminalName = ' . $terminalName;\n $logID = $this->_insertIntoAPILogs($APIMethodID, $apiTransdetails);\n $stackerInfoID = $stackerInfoModel->addStackerInfo($stackerTagID, $serialNumber, $status, $terminalName);\n if ($stackerInfoID > 0) {\n $transMsg = 'Transaction successful.';\n $errorCode = 0;\n $apiStatus = 1;\n $referenceID = $stackerInfoID;\n } else {\n $transMsg = 'Failed to add stacker info.';\n $errorCode = 16;\n $apiStatus = 2;\n $referenceID = '';\n $otherInfo = \"StackerTagID: \" . $stackerTagID . \" | SerialNumber: \" . $serialNumber . \" | TerminalName: \" . $terminalName . \" |\";\n Utilities::errorLogger($transMsg, $module, $otherInfo);\n }\n $this->_updateAPILogs($APIMethodID, $logID, $apiStatus, $referenceID);\n }\n } else {\n $apiTransdetails = 'StackerTagID = ' . $stackerTagID . ', SN = ' . $serialNumber . ', TerminalName = ' . $terminalName;\n $logID = $this->_insertIntoAPILogs($APIMethodID, $apiTransdetails);\n $stackerInfoID = $stackerInfoModel->addStackerInfo($stackerTagID, $serialNumber, $status, $terminalName);\n if ($stackerInfoID > 0) {\n $transMsg = 'Transaction successful.';\n $errorCode = 0;\n $apiStatus = 1;\n $referenceID = $stackerInfoID;\n } else {\n $transMsg = 'Failed to add stacker info.';\n $errorCode = 16;\n $apiStatus = 2;\n $referenceID = '';\n $otherInfo = \"StackerTagID: \" . $stackerTagID . \" | SerialNumber: \" . $serialNumber . \" | TerminalName: \" . $terminalName . \" |\";\n Utilities::errorLogger($transMsg, $module, $otherInfo);\n }\n $this->_updateAPILogs($APIMethodID, $logID, $apiStatus, $referenceID);\n }\n } else {\n $serialNumberActive = $stackerInfoModel->checkIfSerialNumberIsActive($serialNumber);\n if ($serialNumberActive > 0) {\n $transMsg = 'Serial Number is already active in another terminal.';\n $errorCode = 38;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n } else {\n if ($isTerminalExists > 0) {\n $isTerminalActive = $stackerInfoModel->checkIfTerminalIsActive($terminalName);\n if ($isTerminalActive > 0) {\n $stackerInfoID = $stackerInfoModel->addStackerInfo($stackerTagID, $serialNumber, $status, $terminalName);\n $transMsg = 'Stacker may be active or onstock.';\n $errorCode = 15;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n } else {\n $apiTransdetails = 'StackerTagID = ' . $stackerTagID . ', SN = ' . $serialNumber . ', TerminalName = ' . $terminalName;\n $logID = $this->_insertIntoAPILogs($APIMethodID, $apiTransdetails);\n if ($stackerInfoID > 0) {\n $transMsg = 'Transaction successful.';\n $errorCode = 0;\n $apiStatus = 1;\n $referenceID = $stackerInfoID;\n } else {\n $transMsg = 'Failed to add stacker info.';\n $errorCode = 16;\n $apiStatus = 2;\n $referenceID = '';\n $otherInfo = \"StackerTagID: \" . $stackerTagID . \" | SerialNumber: \" . $serialNumber . \" | TerminalName: \" . $terminalName . \" |\";\n Utilities::errorLogger($transMsg, $module, $otherInfo);\n }\n $this->_updateAPILogs($APIMethodID, $logID, $apiStatus, $referenceID);\n }\n } else {\n $apiTransdetails = 'StackerTagID = ' . $stackerTagID . ', SN = ' . $serialNumber . ', TerminalName = ' . $terminalName;\n $logID = $this->_insertIntoAPILogs($APIMethodID, $apiTransdetails);\n $stackerInfoID = $stackerInfoModel->addStackerInfo($stackerTagID, $serialNumber, $status, $terminalName);\n if ($stackerInfoID > 0) {\n $transMsg = 'Transaction successful.';\n $errorCode = 0;\n $apiStatus = 1;\n $referenceID = $stackerInfoID;\n } else {\n $transMsg = 'Failed to add stacker info.';\n $errorCode = 16;\n $apiStatus = 2;\n $referenceID = '';\n $otherInfo = \"StackerTagID: \" . $stackerTagID . \" | SerialNumber: \" . $serialNumber . \" | TerminalName: \" . $terminalName . \" |\";\n Utilities::errorLogger($transMsg, $module, $otherInfo);\n }\n $this->_updateAPILogs($APIMethodID, $logID, $apiStatus, $referenceID);\n }\n }\n }\n } else {\n $stackerTagIDActive = $stackerInfoModel->checkIfStackerTagIDIsActive($stackerTagID);\n if ($stackerTagIDActive > 0) {\n $transMsg = 'Stacker Tag ID is already active in another terminal.';\n $errorCode = 37;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n } else {\n $serialNumberActive = $stackerInfoModel->checkIfSerialNumberIsActive($serialNumber);\n if ($serialNumberActive > 0) {\n $transMsg = 'Serial Number is already active in another terminal.';\n $errorCode = 37;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n } else {\n if ($isSerialNumberExists == 0) {\n if ($isTerminalExists > 0) {\n $isTerminalActive = $stackerInfoModel->checkIfTerminalIsActive($terminalName);\n if ($isTerminalActive > 0) {\n $transMsg = 'Stacker may be active or onstock.';\n $errorCode = 15;\n $otherInfo = \"StackerTagID: \" . $stackerTagID . \" | SerialNumber: \" . $serialNumber . \" | TerminalName: \" . $terminalName . \" |\";\n Utilities::errorLogger($transMsg, $module, $otherInfo);\n } else {\n\n $apiTransdetails = 'StackerTagID = ' . $stackerTagID . ', SN = ' . $serialNumber . ', TerminalName = ' . $terminalName;\n $logID = $this->_insertIntoAPILogs($APIMethodID, $apiTransdetails);\n if ($stackerInfoID > 0) {\n $transMsg = 'Transaction successful.';\n $errorCode = 0;\n $apiStatus = 1;\n $referenceID = $stackerInfoID;\n } else {\n $transMsg = 'Failed to add stacker info.';\n $errorCode = 16;\n $apiStatus = 2;\n $referenceID = '';\n $otherInfo = \"StackerTagID: \" . $stackerTagID . \" | SerialNumber: \" . $serialNumber . \" | TerminalName: \" . $terminalName . \" |\";\n Utilities::errorLogger($transMsg, $module, $otherInfo);\n }\n $this->_updateAPILogs($APIMethodID, $logID, $apiStatus, $referenceID);\n }\n } else {\n $apiTransdetails = 'StackerTagID = ' . $stackerTagID . ', SN = ' . $serialNumber . ', TerminalName = ' . $terminalName;\n $logID = $this->_insertIntoAPILogs($APIMethodID, $apiTransdetails);\n $stackerInfoID = $stackerInfoModel->addStackerInfo($stackerTagID, $serialNumber, $status, $terminalName);\n if ($stackerInfoID > 0) {\n $transMsg = 'Transaction successful.';\n $errorCode = 0;\n $apiStatus = 1;\n $referenceID = $stackerInfoID;\n } else {\n $transMsg = 'Failed to add stacker info.';\n $errorCode = 16;\n $apiStatus = 2;\n $referenceID = '';\n $otherInfo = \"StackerTagID: \" . $stackerTagID . \" | SerialNumber: \" . $serialNumber . \" | TerminalName: \" . $terminalName . \" |\";\n Utilities::errorLogger($transMsg, $module, $otherInfo);\n }\n $this->_updateAPILogs($APIMethodID, $logID, $apiStatus, $referenceID);\n }\n } else {\n $serialNumberActive = $stackerInfoModel->checkIfSerialNumberIsActive($serialNumber);\n if ($serialNumberActive > 0) {\n $transMsg = 'Serial Number is already active in another terminal.';\n $errorCode = 38;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n } else {\n if ($isTerminalExists > 0) {\n $isTerminalActive = $stackerInfoModel->checkIfTerminalIsActive($terminalName);\n if ($isTerminalActive > 0) {\n $transMsg = 'Stacker may be active or onstock.';\n $errorCode = 15;\n $otherInfo = \"StackerTagID: \" . $stackerTagID . \" | SerialNumber: \" . $serialNumber . \" | TerminalName: \" . $terminalName . \" |\";\n Utilities::errorLogger($transMsg, $module, $otherInfo);\n } else {\n $apiTransdetails = 'StackerTagID = ' . $stackerTagID . ', SN = ' . $serialNumber . ', TerminalName = ' . $terminalName;\n $logID = $this->_insertIntoAPILogs($APIMethodID, $apiTransdetails);\n $stackerInfoID = $stackerInfoModel->addStackerInfo($stackerTagID, $serialNumber, $status, $terminalName);\n if ($stackerInfoID > 0) {\n $transMsg = 'Transaction successful.';\n $errorCode = 0;\n $apiStatus = 1;\n $referenceID = $stackerInfoID;\n } else {\n $transMsg = 'Failed to add stacker info.';\n $errorCode = 16;\n $apiStatus = 2;\n $referenceID = '';\n $otherInfo = \"StackerTagID: \" . $stackerTagID . \" | SerialNumber: \" . $serialNumber . \" | TerminalName: \" . $terminalName . \" |\";\n Utilities::errorLogger($transMsg, $module, $otherInfo);\n }\n $this->_updateAPILogs($APIMethodID, $logID, $apiStatus, $referenceID);\n }\n } else {\n $apiTransdetails = 'StackerTagID = ' . $stackerTagID . ', SN = ' . $serialNumber . ', TerminalName = ' . $terminalName;\n $logID = $this->_insertIntoAPILogs($APIMethodID, $apiTransdetails);\n $stackerInfoID = $stackerInfoModel->addStackerInfo($stackerTagID, $serialNumber, $status, $terminalName);\n if ($stackerInfoID > 0) {\n $transMsg = 'Transaction successful.';\n $errorCode = 0;\n $apiStatus = 1;\n $referenceID = $stackerInfoID;\n } else {\n $transMsg = 'Failed to add stacker info.';\n $errorCode = 16;\n $apiStatus = 2;\n $referenceID = '';\n $otherInfo = \"StackerTagID: \" . $stackerTagID . \" | SerialNumber: \" . $serialNumber . \" | TerminalName: \" . $terminalName . \" |\";\n Utilities::errorLogger($transMsg, $module, $otherInfo);\n }\n $this->_updateAPILogs($APIMethodID, $logID, $apiStatus, $referenceID);\n }\n }\n }\n }\n }\n }\n } else {\n $transMsg = 'Invalid Status.';\n $errorCode = 12;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n }\n } else {\n $transMsg = 'Invalid input parameter.';\n $errorCode = 2;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n }\n }\n } else {\n $transMsg = 'One or more fields is not set or is blank.';\n $errorCode = 1;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n }\n $this->_sendResponse(200, CJSON::encode(CommonController::StackerRetMsg($module, $transMsg, $errorCode)));\n }", "title": "" } ]
[ { "docid": "19253ba0af11107e962e951605326bc9", "score": "0.52961904", "text": "public function actionUpdateStackerInfo() {\n $module = \"UpdateStackerInfo\";\n $transMsg = \"\";\n $errorCode = \"\";\n\n $request = $this->_readJsonRequest();\n if (isset($request['StackerTagID']) && isset($request['SerialNumber']) && isset($request['Status']) && isset($request['TerminalName'])) {\n if (($request['StackerTagID']) == \"\" || ($request['SerialNumber']) == \"\" || ($request['Status']) == \"\" || ($request['TerminalName']) == \"\") {\n $transMsg = 'One or more fields is not set or is blank.';\n $errorCode = 1;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n $this->_sendResponse(200, CJSON::encode(CommonController::StackerRetMsg($module, $transMsg, $errorCode)));\n } else {\n $stackerTagID = trim($request['StackerTagID']);\n $serialNumber = trim($request['SerialNumber']);\n $status = trim($request['Status']);\n $terminalName = trim($request['TerminalName']);\n\n if (ctype_alnum($stackerTagID) && ctype_alnum($serialNumber) && is_numeric($status) && ctype_alnum($terminalName)) {\n\n if (($status == CommonController::STACKER_INFO_STATUS_ON_STOCK) || ($status == CommonController::STACKER_INFO_STATUS_ACTIVE) || ($status == CommonController::STACKER_INFO_STATUS_DEACTIVATED)) {\n $terminalName = Yii::app()->params['SitePrefix'] . $terminalName;\n $stackerInfoModel = new StackerInfoModel();\n $isStackerTagIDExists = $stackerInfoModel->isStackerTagIDExists($stackerTagID);\n\n if ($isStackerTagIDExists > 0) {\n $isSerialNumberExists = $stackerInfoModel->isSerialNumberExists($serialNumber);\n if ($isSerialNumberExists > 0) {\n $isTerminalExists = $stackerInfoModel->isTerminalExists($terminalName);\n if ($isTerminalExists > 0) {\n $terminalStatus = $stackerInfoModel->checkTerminalStatus($terminalName, $serialNumber);\n\n if ($status == $terminalStatus) {\n $stat = $terminalStatus['Status'];\n if ($stat == CommonController::STACKER_INFO_STATUS_ON_STOCK) {\n $statusStatement = 'On Stock';\n } else if ($stat == CommonController::STACKER_INFO_STATUS_ACTIVE) {\n $statusStatement = 'Active';\n } else if ($stat == CommonController::STACKER_INFO_STATUS_DEACTIVATED) {\n $statusStatement = 'Deactivated';\n }\n\n $transMsg = 'Terminal status is already ' . $statusStatement . '.';\n $errorCode = 25;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n $this->_sendResponse(200, CJSON::encode(CommonController::StackerRetMsg($module, $transMsg, $errorCode)));\n } else {\n $stackerInfo = $stackerInfoModel->getStackerInfoIDByData($stackerTagID, $serialNumber, $terminalName);\n if (!empty($stackerInfo)) {\n $stackerInfoID = $stackerInfo['StackerInfoID'];\n $updateStackerInfo = $stackerInfoModel->updateStackerInfo($stackerInfoID, $status);\n\n if ($updateStackerInfo > 0) {\n $transMsg = 'Transaction successful.';\n $errorCode = 0;\n $this->_sendResponse(200, CJSON::encode(CommonController::StackerRetMsg($module, $transMsg, $errorCode)));\n } else {\n $transMsg = 'Failed to update stacker info.';\n $errorCode = 20;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n $this->_sendResponse(200, CJSON::encode(CommonController::StackerRetMsg($module, $transMsg, $errorCode)));\n }\n } else {\n $transMsg = 'One or more values did not matched.';\n $errorCode = 19;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n $this->_sendResponse(200, CJSON::encode(CommonController::StackerRetMsg($module, $transMsg, $errorCode)));\n }\n }\n } else {\n $transMsg = 'Terminal does not exist.';\n $errorCode = 3;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n $this->_sendResponse(200, CJSON::encode(CommonController::StackerRetMsg($module, $transMsg, $errorCode)));\n }\n } else {\n $transMsg = 'Serial Number does not exist.';\n $errorCode = 18;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n $this->_sendResponse(200, CJSON::encode(CommonController::StackerRetMsg($module, $transMsg, $errorCode)));\n }\n } else {\n $transMsg = 'Stacker Tag ID does not exist.';\n $errorCode = 17;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n $this->_sendResponse(200, CJSON::encode(CommonController::StackerRetMsg($module, $transMsg, $errorCode)));\n }\n } else {\n $transMsg = 'Invalid Status.';\n $errorCode = 12;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n $this->_sendResponse(200, CJSON::encode(CommonController::StackerRetMsg($module, $transMsg, $errorCode)));\n }\n } else {\n $transMsg = 'Invalid input parameter.';\n $errorCode = 2;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n $this->_sendResponse(200, CJSON::encode(CommonController::StackerRetMsg($module, $transMsg, $errorCode)));\n }\n }\n } else {\n $transMsg = 'One or more fields is not set or is blank.';\n $errorCode = 1;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n $this->_sendResponse(200, CJSON::encode(CommonController::StackerRetMsg($module, $transMsg, $errorCode)));\n }\n }", "title": "" }, { "docid": "5bf527d88cebd233e604edffff926199", "score": "0.5095615", "text": "public function status() {\n\t\tparent::main();\n\t\t$this->out(\"Type \\t\\tUsed \\t\\tTotal \\t\\tAvailable\");\n\t\t$this->hr();\n\t\tforeach (call_user_func_array(array($this->_Cleaner, 'status'), $this->args) as $type => $values) {\n\t\t\t$this->out(sprintf(\n\t\t\t\t\"%s \\t%s \\t%s \\t%s\",\n\t\t\t\tstr_pad(Inflector::humanize($type), 10, ' '),\n\t\t\t\tstr_pad(convert($values['used']), 10, ' '),\n\t\t\t\tstr_pad(convert($values['total']), 10, ' '),\n\t\t\t\tstr_pad(convert($values['available']), 10, ' ')\n\t\t\t));\n\t\t}\n\t}", "title": "" }, { "docid": "84d9ab850125251219e43b7e5befb199", "score": "0.473465", "text": "function dpsp_add_serial_status_icon( $slug, $type, $name ) {\n\n\tif( $slug != 'serial-key' )\n\t\treturn;\n\n\t$dpsp_settings \t\t= get_option( 'dpsp_settings', array() );\n\t$dpsp_serial_status = get_option( 'dpsp_product_serial_status', '' );\n\n\tif( empty( $dpsp_settings['product_serial'] ) && empty( $dpsp_serial_status ) )\n\t\treturn;\n\n\tswitch ( $dpsp_serial_status ) {\n\t\tcase 1:\n\t\tcase 2:\n\t\t\techo '<span title=\"' . __( 'Serial key is valid.', 'social-pug' ) . '\" class=\"dashicons dashicons-yes\"></span>';\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\techo '<span title=\"' . __( 'Serial key is invalid or missing.', 'social-pug' ) . '\" class=\"dashicons dashicons-warning\"></span>';\n\t\t\tbreak;\n\t\t\n\t}\n\n}", "title": "" }, { "docid": "dc9c4d3b41ade829dac2eba2a72a2772", "score": "0.47115058", "text": "function statusExtra() {\n $this->sendCmd();\n $respuesta = file(\"C:\\Tools\\respuesta.ans\", \"w\");\n $lineas = count($respuesta);\n for ($i = 0; $i < $lineas; $i++) {\n $repStatusExtra = $respuesta[$i];\n }\n\n return $repStatusExtra;\n }", "title": "" }, { "docid": "8a36416060bd9ffed0a37f7b52809fe2", "score": "0.47036946", "text": "function wc_register_production_status() {\n //0. Not Started.\n//1. Supplies Ordered.\n//1. Supplies Delivered.\n//2. In Production.\n//3. Production Completed.\n//4. In Delivery.\n//5. Delivery Completed.\n $production_statuses = array(\n 'wc-not-started' => array(\n 'label' => _x( 'Not Started', 'Production status', 'woocommerce' ),\n 'public' => false,\n 'exclude_from_search' => false,\n 'show_in_admin_all_list' => true,\n 'show_in_admin_status_list' => true,\n 'label_count' => _n_noop( 'Not started <span class=\"count\">(%s)</span>', 'Pending start <span class=\"count\">(%s)</span>', 'woocommerce' ),\n ),\n 'wc-supplies-ordered' => array(\n 'label' => _x( 'Supplies Ordered', 'Production status', 'woocommerce' ),\n 'public' => false,\n 'exclude_from_search' => false,\n 'show_in_admin_all_list' => true,\n 'show_in_admin_status_list' => true,\n 'label_count' => _n_noop( 'Supplies ordered <span class=\"count\">(%s)</span>', 'Supplies ordered <span class=\"count\">(%s)</span>', 'woocommerce' ),\n ),\n 'wc-supp-delivered' => array(\n 'label' => _x( 'Supplies Delivered', 'Production status', 'woocommerce' ),\n 'public' => false,\n 'exclude_from_search' => false,\n 'show_in_admin_all_list' => true,\n 'show_in_admin_status_list' => true,\n 'label_count' => _n_noop( 'Supplies Delivered <span class=\"count\">(%s)</span>', 'Supplies Delivered <span class=\"count\">(%s)</span>', 'woocommerce' ),\n ),\n 'wc-in-production' => array(\n 'label' => _x( 'In Production', 'Production status', 'woocommerce' ),\n 'public' => false,\n 'exclude_from_search' => false,\n 'show_in_admin_all_list' => true,\n 'show_in_admin_status_list' => true,\n 'label_count' => _n_noop( 'Completed <span class=\"count\">(%s)</span>', 'Completed <span class=\"count\">(%s)</span>', 'woocommerce' ),\n ),\n 'wc-prd-completed' => array(\n 'label' => _x( 'Production Completed', 'Production status', 'woocommerce' ),\n 'public' => false,\n 'exclude_from_search' => false,\n 'show_in_admin_all_list' => true,\n 'show_in_admin_status_list' => true,\n 'label_count' => _n_noop( 'Production Completed <span class=\"count\">(%s)</span>', 'Production Completed <span class=\"count\">(%s)</span>', 'woocommerce' ),\n )\n );\n \n\n foreach ( $production_statuses as $production_status => $values ) {\n register_post_status( $production_status, $values );\n }\n}", "title": "" }, { "docid": "f297a387da5ea291c9f5c5fadbc3f442", "score": "0.4700557", "text": "public function status(){\n\t\n\t $this->_query_check();\n\t if($this->error_found == true){\n\t $this->set([\n 'items' => [],\n 'success' => false,\n 'message' => $this->error_message,\n '_serialize' => ['items','success','message']\n ]);\n return;\n\t }\n\t \n\t $this->_get_nbi_password();\n\t if($this->error_found == true){\n\t $this->set([\n 'items' => [],\n 'success' => false,\n 'message' => $this->error_message,\n '_serialize' => ['items','success','message']\n ]);\n return;\n\t }\n\n $data = [\n 'Vendor' => $this->Vendor,\n 'RequestPassword' => $this->northbound,\n 'APIVersion' => $this->APIVersion,\n 'RequestCategory' => $this->RequestCategory,\n 'RequestType' => 'Status',\n 'UE-MAC' => $this->client_mac\n ];\n\n $data = json_encode($data);\n\n $results = $this->_api_http_call($this->api_url, $data);\n\n $return_array = (array) json_decode($results->body()); \n\n $this->set([\n 'data' => $return_array,\n 'success' => true,\n '_serialize' => ['data','success']\n ]);\n\t}", "title": "" }, { "docid": "3e08fb6759755aba0fb0fb74d62dcaa9", "score": "0.46960744", "text": "function terminal_detect($SERVER)\n{\n#print_r($SERVER);\n\n#AASTRA\nif(stristr($SERVER['HTTP_USER_AGENT'],'Aastra'))\n\t{\n\t#AASTRA XML Terminal API\n\t$value=preg_split('/ MAC:/',$SERVER['HTTP_USER_AGENT']);\n\t$fin=preg_split('/ /',$value[1]);\n\t$value[1]=preg_replace('/\\-/','',$fin[0]);\n\t$value[2]=preg_replace('/V:/','',$fin[1]);\n\t$terminal['VENDOR'] = \"AASTRA\";\n\t$terminal['IP']=$SERVER['REMOTE_ADDR']; # Terminal IP\n\t$terminal['LANG']=$SERVER['HTTP_ACCEPT_LANGUAGE']; # Terminal Language\n\t$terminal['AGENT']=$value[0]; # User Agent\n\t$terminal['NUMBER']=$value[1]; # Extension Number\n\t$terminal['FIRMWARE']=$value[2]; # OMM Firmware\n\t}\n\t\n#HTML\nif(stristr($SERVER['HTTP_USER_AGENT'],'Mozilla'))\n\t{\n\t$terminal['VENDOR'] = \"HTML\";\n\t$terminal['IP']=$SERVER['REMOTE_ADDR']; # Terminal IP\n\t$terminal['LANG']=$SERVER['HTTP_ACCEPT_LANGUAGE']; # Terminal Language\n\t$terminal['HTTP_USER_AGENT']=$SERVER['HTTP_USER_AGENT'];\n\t}\n\nreturn $terminal;\n}", "title": "" }, { "docid": "ef0b2d92ac4c19158694f94be694968b", "score": "0.46726397", "text": "public function run()\n {\n Status::create([\n 'name' => 'To do'\n ]);\n Status::create([\n 'name' => 'In process'\n ]);\n Status::create([\n 'name' => 'Done'\n ]);\n }", "title": "" }, { "docid": "9b573483a63b7eb2e1834038762c2152", "score": "0.46498492", "text": "function add_active_rental_order_statuses( $order_statuses ) {\n\n $new_order_statuses = array();\n\n // add new order status after processing\n foreach ( $order_statuses as $key => $status ) {\n\n $new_order_statuses[ $key ] = $status;\n\n if ( 'wc-processing' === $key ) {\n $new_order_statuses['wc-active-rental'] = 'Active Rental';\n }\n }\n\n return $new_order_statuses;\n}", "title": "" }, { "docid": "9957287f51600e776ece7bb87f9d3aee", "score": "0.46312886", "text": "public function run()\n {\n foreach ($this->transportStatus as $status) {\n DB::table('transport_status')->insert([\n 'name' => $status,\n ]);\n }\n }", "title": "" }, { "docid": "06df9abfac3c71787947689231c1eece", "score": "0.4615375", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Status::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $statuses = array(\n array('id' => '1', 'type' => 'active-inactive', 'name' => 'Active', 'background_color' => 'label-success', 'status' => 'Active', 'created_at' => '2019-09-19 07:37:20', 'updated_at' => '2019-09-19 07:37:20', 'deleted_at' => NULL),\n array('id' => '2', 'type' => 'active-inactive', 'name' => 'Inactive', 'background_color' => 'label-danger', 'status' => 'Active', 'created_at' => '2019-09-19 07:37:20', 'updated_at' => '2019-09-19 07:37:20', 'deleted_at' => NULL),\n array('id' => '3', 'type' => 'product-availability-status', 'name' => 'Available now', 'background_color' => 'label-success bg-slate', 'status' => 'Active', 'created_at' => '2019-09-19 07:37:20', 'updated_at' => '2019-09-19 07:37:20', 'deleted_at' => NULL),\n array('id' => '4', 'type' => 'product-availability-status', 'name' => 'Not Available', 'background_color' => 'label-default', 'status' => 'Active', 'created_at' => '2019-09-19 07:37:20', 'updated_at' => '2019-09-19 07:37:20', 'deleted_at' => NULL),\n array('id' => '5', 'type' => 'product-availability-status', 'name' => 'Disabled', 'background_color' => 'label-danger', 'status' => 'Active', 'created_at' => '2019-09-19 07:37:21', 'updated_at' => '2019-09-19 07:37:21', 'deleted_at' => NULL),\n array('id' => '6', 'type' => 'product-availability-status', 'name' => 'Banned', 'background_color' => 'label-warning', 'status' => 'Active', 'created_at' => '2019-09-19 07:37:21', 'updated_at' => '2019-09-19 07:37:21', 'deleted_at' => NULL),\n array('id' => '7', 'type' => 'suspicious-product-report', 'name' => 'Pending', 'background_color' => 'label-default', 'status' => 'Active', 'created_at' => '2019-09-19 07:37:21', 'updated_at' => '2019-09-19 07:37:21', 'deleted_at' => NULL),\n array('id' => '8', 'type' => 'suspicious-product-report', 'name' => 'Viewed', 'background_color' => 'label-success bg-slate', 'status' => 'Active', 'created_at' => '2019-09-19 07:37:21', 'updated_at' => '2019-09-19 07:37:21', 'deleted_at' => NULL),\n array('id' => '9', 'type' => 'suspicious-product-report', 'name' => 'Canceled', 'background_color' => 'label-danger', 'status' => 'Active', 'created_at' => '2019-09-19 07:37:21', 'updated_at' => '2019-09-19 07:37:21', 'deleted_at' => NULL),\n array('id' => '10', 'type' => 'suspicious-product-report', 'name' => 'Complete', 'background_color' => 'label-success', 'status' => 'Active', 'created_at' => '2019-09-19 07:37:21', 'updated_at' => '2019-09-19 07:37:21', 'deleted_at' => NULL),\n array('id' => '11', 'type' => 'order-status', 'name' => 'Pending', 'background_color' => 'label-success bg-slate', 'status' => 'Active', 'created_at' => '2019-09-19 07:37:21', 'updated_at' => '2019-09-19 07:37:21', 'deleted_at' => NULL),\n array('id' => '12', 'type' => 'order-status', 'name' => 'Approved', 'background_color' => 'label-success', 'status' => 'Active', 'created_at' => '2019-09-19 07:37:21', 'updated_at' => '2019-09-19 07:37:21', 'deleted_at' => NULL),\n array('id' => '13', 'type' => 'order-status', 'name' => 'Rejected', 'background_color' => 'label-success', 'status' => 'Active', 'created_at' => '2019-09-19 07:37:21', 'updated_at' => '2019-09-19 07:37:21', 'deleted_at' => NULL),\n array('id' => '14', 'type' => 'order-status', 'name' => 'Payed', 'background_color' => 'label-danger', 'status' => 'Active', 'created_at' => '2019-09-19 07:37:21', 'updated_at' => '2019-09-19 07:37:21', 'deleted_at' => NULL),\n array('id' => '15', 'type' => 'order-status', 'name' => 'Delivered', 'background_color' => 'label-info', 'status' => 'Active', 'created_at' => '2019-09-19 07:37:21', 'updated_at' => '2019-09-19 07:37:21', 'deleted_at' => NULL),\n array('id' => '16', 'type' => 'order-status', 'name' => 'Received', 'background_color' => 'label-success', 'status' => 'Active', 'created_at' => '2019-09-19 07:37:21', 'updated_at' => '2019-09-19 07:37:21', 'deleted_at' => NULL),\n array('id' => '17', 'type' => 'order-status', 'name' => 'Completed', 'background_color' => 'label-success', 'status' => 'Active', 'created_at' => '2019-09-19 07:37:21', 'updated_at' => '2019-09-19 07:37:21', 'deleted_at' => NULL)\n );\n Status::insert($statuses);\n }", "title": "" }, { "docid": "b658eec7c10afa52e86e90748f965645", "score": "0.45923045", "text": "private function switchStatus()\n {\n switch($this->key)\n {\n case \"atuantes\": $this->tipo = 0; $this->nome = \"atuantes\"; $this->pegarLista(); break;\n case \"fechados\": $this->tipo = 1; $this->nome = \"fechados\"; $this->pegarLista(); break;\n case \"enviados\": $this->tipo = 2; $this->nome = \"enviados\"; $this->pegarLista(); break;\n case \"recebidos\": $this->tipo = 3; $this->nome = \"recebidos\"; $this->pegarLista(); break;\n case \"show\": $this->showContato(); break;\n default: $this->tipo = 0; $this->nome = \"atuantes\"; $this->pegarLista(); break;\n }\n }", "title": "" }, { "docid": "5fe996e65022f6aed6fe3f03c488d06b", "score": "0.45555776", "text": "public function run()\n {\n Status::insert([\n [\n 'name' => 'Cancelado',\n 'description' => 'Pedido cancelado',\n 'type' => 'order',\n 'color' => '#3043cf'\n ], [\n 'name' => 'Pendente',\n 'description' => '',\n 'type' => 'order',\n 'color' => '#e38b19'\n ], [\n 'name' => 'Concluido',\n 'description' => '',\n 'type' => 'order',\n 'color' => '#2de319'\n ], [\n 'name' => 'Cancelado',\n 'description' => 'Compromisso cancelado',\n 'type' => 'appointment',\n 'color' => '#3043cf'\n ], [\n 'name' => 'Pendente',\n 'description' => '',\n 'type' => 'appointment',\n 'color' => '#e38b19'\n ], [\n 'name' => 'Concluido',\n 'description' => '',\n 'type' => 'appointment',\n 'color' => '#2de319'\n ], [\n 'name' => 'Em atraso',\n 'description' => '',\n 'type' => 'appointment',\n 'color' => '#ff2200'\n ], [\n 'name' => 'Estoque zerado',\n 'description' => 'Quando a quantidade do item é igual a 0',\n 'type' => 'item',\n 'color' => '#cf7230'\n ]\n ]);\n }", "title": "" }, { "docid": "0fc754bb5ad138765613e16082217e8b", "score": "0.4547431", "text": "function LEDSstatus() {\n\n\tIDLed();\n\tFAULTLed();\n}", "title": "" }, { "docid": "5b065b544d9fa9d8a78b63986a2cbaa1", "score": "0.45414224", "text": "public function run()\n {\n DB::table('hrm_recruitment_statuses')->insert([\n \t[\n \t\t'recruitment_status'=>'New',\n \t\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n \t],\n \t[\n \t\t'recruitment_status'=>'Progress',\n \t\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n \t],\n \t[\n \t\t'recruitment_status'=>'Passed',\n \t\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n \t],\n \t[\n \t\t'recruitment_status'=>'Failed',\n \t\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n \t],\n \t[\n \t\t'recruitment_status' =>'Offered',\n \t\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n \t],\n \t[\n \t\t'recruitment_status' =>'Recruited',\n \t\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n \t],\n \t[\n \t\t'recruitment_status' =>'Discarded',\n \t\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n \t],\n [\n 'recruitment_status' =>'On hold',\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]\n\n ]);\n }", "title": "" }, { "docid": "ce822a76d11d04847c57a78711bfbf7d", "score": "0.45330143", "text": "function set_status(string $state, string $description): void\n{\n global $payload;\n global $log_location;\n global $url_prefix;\n static $didfail = false;\n global $environment_url;\n if ('failure' === $state) {\n $didfail = true;\n }\n if ('error' === $state) {\n $didfail = true;\n }\n if ($didfail && 'success' === $state) {\n return; // don't send this\n }\n if ('deployment' !== $_SERVER['HTTP_X_GITHUB_EVENT']) {\n return;\n }\n\n $data = [\n 'state' => $state,\n 'log_url' => 'https://' . $_SERVER['SERVER_NAME'] . '/' . $url_prefix\n . $payload['repository']['name'] . '/' . $payload['deployment']['environment'] . '/'\n . $payload['deployment']['sha'] . '/' . $payload['deployment']['id']\n . ('in_progress' === $state ? '/' : '/plain.txt'),\n 'description' => $description,\n ];\n\n if (isset($environment_url[$payload['repository']['name']][$payload['deployment']['environment']])) {\n $data['environment_url'] = $environment_url[$payload['repository']['name']]\n [$payload['deployment']['environment']];\n }\n\n github(\n $payload['deployment']['statuses_url'],\n $data,\n 'setting status',\n 'application/vnd.github.ant-man-preview+json, application/vnd.github.flash-preview+json'\n );\n if ('in_progress' === $state) {\n return;\n }\n\n file_put_contents($log_location . '/plain.txt', \"\\n# \" . $description . \"\\n\", FILE_APPEND);\n}", "title": "" }, { "docid": "3614d3077fd494fd6171fe68c48587fe", "score": "0.44751903", "text": "protected function buildOrderStatusFields(): void\n {\n $isLogistic = $this->isLogisticMode();\n //====================================================================//\n // Order Current Status\n $this->fieldsFactory()->create(SPL_T_VARCHAR)\n ->identifier(\"status\")\n ->name(\"Order Status\")\n ->microData(\n \"http://schema.org/Order\",\n $isLogistic ? \"mainStatus\" : \"orderStatus\"\n )\n ->addChoice(OrderStatus::CANCELED, \"Cancelled\")\n ->addChoice(OrderStatus::DRAFT, \"Draft\")\n ->addChoice(OrderStatus::PROCESSING, \"Processing\")\n ->addChoice(OrderStatus::IN_TRANSIT, \"Shipment Done\")\n ->addChoice(OrderStatus::DELIVERED, \"Delivered\")\n ->isReadOnly()\n ;\n }", "title": "" }, { "docid": "4dafb17d547c4b9a994cd12025bfefa7", "score": "0.44729498", "text": "function renderStatusLine();", "title": "" }, { "docid": "e5994ee99422a4b5c6c5cf3a14d2e156", "score": "0.44671258", "text": "public function actionLogStackerSession() {\n $request = $this->_readJsonRequest();\n\n $transMsg = '';\n $errorCode = '';\n $collectedBy = '';\n $module = 'LogStackerSession';\n $APIMethodID = APILogsModel::API_METHOD_LOGSTACKERSESSION;\n if (isset($request['TerminalName']) && isset($request['SerialNumber']) && isset($request['Action'])) {\n\n if (($request['TerminalName'] == \"\") || ($request['SerialNumber'] == \"\") || ($request['Action'] == \"\")) {\n $transMsg = 'One or more fields is not set or is blank.';\n $errorCode = 1;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n } else {\n if (ctype_alnum($request['TerminalName']) && ctype_alnum($request['SerialNumber']) && is_numeric($request['Action'])) {\n\n $_stackerSessionsModel = new StackerSessionsModel();\n $_stackerInfoModel = new StackerInfoModel();\n $terminalName = trim($request['TerminalName']);\n $serialNumber = trim($request['SerialNumber']);\n $action = trim($request['Action']);\n $sc = Yii::app()->params['SitePrefix'] . $terminalName;\n\n if ($action == 1) {\n $countTerminal = $_stackerInfoModel->isTerminalExists($sc);\n if ($countTerminal > 0) {\n $stackerInfoID = $_stackerInfoModel->checkIfTerminalAndSerialMatched($terminalName, $serialNumber);\n\n if (!empty($stackerInfoID)) {\n $isTerminalActive = $_stackerInfoModel->checkTerminalStatus($terminalName, $serialNumber);\n if ($isTerminalActive == CommonController::STACKER_INFO_STATUS_ACTIVE) {\n $countTerminalStatus = $_stackerSessionsModel->isTerminalStatusNotValid($sc);\n\n if ($countTerminalStatus >= 0) {\n $countTerminalEnded = $_stackerSessionsModel->isTerminalSessionUnendedExists($sc);\n if ($countTerminalEnded == 0) {\n//\n// $isNotYetValidated = $_stackerSessionsModel->isTerminalStatusNotYetValidated($stackerInfoID);\n// if ($isNotYetValidated == 0) {\n $apiTransdetails = 'SN: ' . $serialNumber . ', Action: ' . $action . ', TName: ' . $terminalName;\n $logID = $this->_insertIntoAPILogs($APIMethodID, $apiTransdetails);\n $stackerSessionID = $_stackerSessionsModel->insertStacker($sc, $stackerInfoID, 0);\n if ($stackerSessionID != false) {\n $transMsg = 'Transaction successful.';\n $errorCode = 0;\n $apiStatus = 1;\n $referenceID = $stackerSessionID;\n } else {\n $transMsg = 'Transaction failed.';\n $errorCode = 5;\n $apiStatus = 2;\n $referenceID = '';\n $otherInfo = \"TerminalName:\" . $terminalName . \" | SerialNumber: \" . $serialNumber . \" | Action: \" . $action . \" | \";\n Utilities::errorLogger($transMsg, $module, $otherInfo);\n }\n $this->_updateAPILogs($APIMethodID, $logID, $apiStatus, $referenceID);\n// } else {\n// $transMsg = 'Terminal stacker session has not yet been validated.';\n// $errorCode = 26;\n// Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n// $this->_sendResponse(200, CJSON::encode(CommonController::StackerRetMsg($module, $transMsg, $errorCode)));\n// }\n } else {\n $transMsg = 'Terminal already has a stacker session.';\n $errorCode = 2;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n }\n } else {\n $transMsg = 'Terminal already has a stacker session.';\n $errorCode = 2;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n }\n } else {\n $transMsg = 'Terminal stacker is inactive.';\n $errorCode = 32;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n }\n } else {\n $transMsg = 'Terminal and Serial Number did not match.';\n $errorCode = 2;\n $otherInfo = \"TerminalName:\" . $terminalName . \" | SerialNumber: \" . $serialNumber . \" | Action: \" . $action . \" | CollectedBy: \" . $collectedBy . \" | \";\n Utilities::errorLogger($transMsg, $module, $otherInfo);\n }\n } else {\n $transMsg = 'Terminal does not exist.';\n $errorCode = 3;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n }\n } else if ($action == 2) {\n if (isset($request['CollectedBy']) && isset($request['CollectedBy'])) {\n $collectedBy = trim($request['CollectedBy']);\n if (empty($collectedBy) || $collectedBy == \"\") {\n $transMsg = 'Collected By is required when ending a stacker session.';\n $errorCode = 36;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n } else {\n if (ctype_alnum($request['TerminalName'])) {\n $countTerminal = $_stackerInfoModel->isTerminalExists($sc);\n if ($countTerminal > 0) {\n //check if terminal and serial are matched\n $stackerInfoID = $_stackerInfoModel->checkIfTerminalAndSerialMatched($terminalName, $serialNumber);\n if (!empty($stackerInfoID))\n {\n\n $stackerSessionID = $_stackerSessionsModel->getStackerSessionIDByTerminalName($sc);\n if (!empty($stackerSessionID)) {\n $apiTransdetails = 'SN: ' . $serialNumber . ', Action: ' . $action . ', TName: ' . $terminalName . ', Collected By: ' . $collectedBy;\n $logID = $this->_insertIntoAPILogs($APIMethodID, $apiTransdetails);\n if ($_stackerSessionsModel->removeStacker($stackerSessionID, 1, $collectedBy) == true) {\n $transMsg = 'Transaction successful.';\n $errorCode = 0;\n $apiStatus = 1;\n $referenceID = $stackerSessionID;\n } else {\n $transMsg = 'Transaction failed.';\n $errorCode = 5;\n $apiStatus = 2;\n $referenceID = $stackerSessionID;\n $otherInfo = \"TerminalName:\" . $terminalName . \" | SerialNumber: \" . $serialNumber . \" | Action: \" . $action . \" | CollectedBy: \" . $collectedBy . \" | \";\n Utilities::errorLogger($transMsg, $module, $otherInfo);\n }\n $this->_updateAPILogs($APIMethodID, $logID, $apiStatus, $referenceID);\n } else {\n $transMsg = 'Terminal has no active stacker session.';\n $errorCode = 6;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n }\n } \n else\n {\n $transMsg = 'Terminal and Serial Number did not match.';\n $errorCode = 2;\n $otherInfo = \"TerminalName:\" . $terminalName . \" | SerialNumber: \" . $serialNumber . \" | Action: \" . $action . \" | CollectedBy: \" . $collectedBy . \" | \";\n Utilities::errorLogger($transMsg, $module, $otherInfo);\n }\n }\n else {\n $transMsg = 'Terminal does not exist.';\n $errorCode = 3;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n }\n } else {\n $transMsg = 'Invalid Collected By.';\n $errorCode = 35;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n }\n }\n } else {\n $transMsg = 'Collected By is required when ending a stacker session.';\n $errorCode = 36;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n }\n } else {\n $transMsg = 'Invalid input parameter.';\n $errorCode = 2;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n }\n } else {\n $transMsg = 'Invalid input parameter.';\n $errorCode = 2;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n }\n }\n } else {\n $transMsg = 'One or more fields is not set or is blank.';\n $errorCode = 1;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n }\n $this->_sendResponse(200, CJSON::encode(CommonController::StackerRetMsg($module, $transMsg, $errorCode)));\n }", "title": "" }, { "docid": "d5d9bfc8ba4ac59c221f94e72bb76b64", "score": "0.44592908", "text": "public function status()\r\n {\r\n $this->info();\r\n\r\n // Players and teams\r\n while ($this->p->getLength() and ($type = $this->p->readInt8())) {\r\n if ($type == 1) $this->getSub('players');\r\n else if ($type == 2) $this->getSub('teams');\r\n else {\r\n $this->getSub('players');\r\n $this->getSub('teams');\r\n }\r\n }\r\n }", "title": "" }, { "docid": "401cfe1cc7d926db6bd0db19b7dc26a2", "score": "0.44574952", "text": "public function getAddStatus($idStatus);", "title": "" }, { "docid": "26bd51eb3cf54740e87f3ca35724f865", "score": "0.44547066", "text": "public function add_custom_status() {\n\n if( isset( $_POST['submit'] ) && isset( $_POST['action'] ) && $_POST['action'] == 'add-new' ) {\n\n if( ! current_user_can( 'ow_edit_workflow' ) ) {\n wp_die( __( 'You are not allowed to create custom statuses.', 'oasisworkflow' ) );\n }\n\n check_admin_referer( 'custom-status-add-nonce' );\n\n // Validate and sanitize the form data\n $term = sanitize_text_field( trim( $_POST['status_name'] ) );\n $slug = sanitize_text_field( trim( $_POST['slug_name'] ) );\n $slug = $slug ? $slug : sanitize_title( $term );\n $status_description = stripslashes( wp_filter_nohtml_kses( trim( $_POST['status_description'] ) ) );\n //handle_add_custom_status\n $args = array(\n 'slug' => $slug,\n 'description' => $status_description\n );\n $response = wp_insert_term( $term, $this->taxonomy_key, $args );\n if( is_wp_error( $response ) ) {\n wp_die( __( 'Could not add status: ', 'oasisworkflow' ) . $response->get_error_message() );\n }\n\n add_action( 'admin_notices', array( $this, 'custom_status_added' ) );\n }\n }", "title": "" }, { "docid": "14c4e2585eb936842c571bad076c5afe", "score": "0.44505206", "text": "public function run()\n {\n OrderStatus::insert([\n \t['name' => 'New', 'badge' => 'badge-primary'],\n \t['name' => 'In progress', 'badge' => 'badge-info'],\n ['name' => 'Submitted for approval', 'badge' => 'badge-info'],\n ['name' => 'Requested for revision', 'badge' => 'badge-warning'],\n \t['name' => 'Completed', 'badge' => 'badge-success'],\n \t['name' => 'On hold', 'badge' => 'badge-secondary'],\n \t['name' => 'Canceled', 'badge' => 'badge-dark'],\n ['name' => 'Refunded', 'badge' => 'badge-danger'], \n ['name' => 'Pending Payment', 'badge' => 'badge-dark'],\n ['name' => 'Payment needs approval', 'badge' => 'badge-danger'],\n \t['name' => 'Payment Disapproved', 'badge' => 'badge-dark'],\n \n // ['name' => 'Submitted for QA', 'badge' => 'badge-danger'], \n ]);\n }", "title": "" }, { "docid": "8c4f1acdf8b94910937f1faa6f3e1810", "score": "0.44402102", "text": "public function run()\n {\n $Status = ['Accepted', 'Picked Up', 'in Transit', 'Delievered', 'complete', 'SOS'];\n $Count = count($Status);\n for ($i=0; $i < $Count; $i++) { \n\n\t \tStatus::create([\n\t 'status_name' => $Status[$i]\n\t ]);\n\n \t}\n }", "title": "" }, { "docid": "637b108e855ce6fe591e4c3f9bb713e4", "score": "0.44275072", "text": "public function run()\n {\n $statuses = [\n ['id' => 'ac', 'description' => 'Active - Activo'],\n ['id' => 'av', 'description' => 'Available - Disponible'],\n ['id' => 'co', 'description' => 'Completed - Completado'],\n ['id' => 'ca', 'description' => 'Cancelled - Cancelado'],\n ['id' => 'di', 'description' => 'Disabled - Deshabilitado'],\n ['id' => 'en', 'description' => 'Enabled - Habilitado'],\n ['id' => 'in', 'description' => 'Inactive - Inactivo'],\n ['id' => 'ne', 'description' => 'New - Nuevo'],\n ['id' => 'pe', 'description' => 'Pending - Pendiente'],\n ['id' => 'pr', 'description' => 'Processed - Procesada'],\n ['id' => 'un', 'description' => 'Unavailable - Agotado'],\n ['id' => 've', 'description' => 'Verified - Verificado'],\n ];\n\n foreach ($statuses as $row) {\n App\\Status::create($row);\n }\n }", "title": "" }, { "docid": "adf98fdba2e1a635dff2688c33b20520", "score": "0.44129494", "text": "private function getStatusServices()\n {\n // file pid service openfire is /var/run/openfire.pid\n // file pid service hylafax no founded but name services are hfaxd and faxq\n // file pid service iaxmodem is /var/run/iaxmodem.pid\n // file pid service postfix is /var/spool/postfix/pid/master.pid (can't to access to file by own permit,is better to use by CMD the serviceName is master)\n // file pid service mysql is /var/run/mysqld/mysqld.pid (can't to access to file by own permit,is better to use by CMD the serviceName is mysqld)\n // file pid service apache is /var/run/httpd.pid\n // file pid service call_center is /opt/elastix/dialer/dialerd.pid\n\n $arrSERVICES[\"Asterisk\"][\"status_service\"] = $this->_existPID_ByFile(\"/var/run/asterisk/asterisk.pid\",\"asterisk\");\n $arrSERVICES[\"Asterisk\"][\"activate\"] = $this->_isActivate(\"asterisk\");\n $arrSERVICES[\"Asterisk\"][\"name_service\"] = \"Telephony Service\";\n\n $arrSERVICES[\"OpenFire\"][\"status_service\"] = $this->_existPID_ByFile(\"/var/run/openfire.pid\",\"openfire\");\n $arrSERVICES[\"OpenFire\"][\"activate\"] = $this->_isActivate(\"openfire\");\n $arrSERVICES[\"OpenFire\"][\"name_service\"] = \"Instant Messaging Service\";\n\n $arrSERVICES[\"Hylafax\"][\"status_service\"] = $this->getStatusHylafax();\n $arrSERVICES[\"Hylafax\"][\"activate\"] = $this->_isActivate(\"hylafax\");\n $arrSERVICES[\"Hylafax\"][\"name_service\"] = \"Fax Service\";\n/*\n $arrSERVICES[\"IAXModem\"][\"status_service\"] = $this->_existPID_ByFile(\"/var/run/iaxmodem.pid\",\"iaxmodem\");\n $arrSERVICES[\"IAXModem\"][\"name_service\"] = \"IAXModem Service\";\n*/\n $arrSERVICES[\"Postfix\"][\"status_service\"] = $this->_existPID_ByCMD(\"master\",\"postfix\");\n $arrSERVICES[\"Postfix\"][\"activate\"] = $this->_isActivate(\"postfix\");\n $arrSERVICES[\"Postfix\"][\"name_service\"] = \"Email Service\";\n\n $arrSERVICES[\"MySQL\"][\"status_service\"] = $this->_existPID_ByCMD(\"mysqld\",\"mysqld\");\n $arrSERVICES[\"MySQL\"][\"activate\"] = $this->_isActivate(\"mysqld\");\n $arrSERVICES[\"MySQL\"][\"name_service\"] = \"Database Service\";\n\n $arrSERVICES[\"Apache\"][\"status_service\"] = $this->_existPID_ByCMD('httpd',\"httpd\");\n $arrSERVICES[\"Apache\"][\"activate\"] = $this->_isActivate(\"httpd\");\n $arrSERVICES[\"Apache\"][\"name_service\"] = \"Web Server\";\n\n $arrSERVICES[\"Dialer\"][\"status_service\"] = $this->_existPID_ByFile(\"/opt/elastix/dialer/dialerd.pid\",\"elastixdialer\");\n $arrSERVICES[\"Dialer\"][\"activate\"] = $this->_isActivate(\"elastixdialer\");\n $arrSERVICES[\"Dialer\"][\"name_service\"] = \"Elastix Call Center Service\";\n\n return $arrSERVICES;\n }", "title": "" }, { "docid": "5fb28c1c4c4488eaa5e5085e907b4971", "score": "0.44116187", "text": "function status()\n{\nif ($len = strspn($this->data, '0123456789', $this->position))\n{\n$this->status_code = (int) substr($this->data, $this->position, $len);\n$this->position += $len;\n$this->state = 'reason';\n}\nelse\n{\n$this->state = false;\n}\n}", "title": "" }, { "docid": "c1b862db11f3caac45d822dd39a7b02f", "score": "0.4392159", "text": "function getDetailedStatus() ;", "title": "" }, { "docid": "04a92848cc7778e1e6b0b1f5761f077b", "score": "0.4390334", "text": "public function getStatus()\n {\n $this->sendToMaster('setWorkerStatus', ['status' => $this->status,'startTime' => $this->startTime]);\n $this->sendToManage('setProcessStatus', ['status' => $this->status,'startTime' => $this->startTime]);\n }", "title": "" }, { "docid": "fc92b33e012b0afba2c2ce31d0c450b0", "score": "0.43871847", "text": "public function createTicketStatus(TicketStatus $request)\n {\n return $this->ticket->createTicketStatus($request);\n }", "title": "" }, { "docid": "e6b71da02997cbd48913e6ded513567e", "score": "0.43845034", "text": "public static function parse(array $statusData)\n {\n //TIME,Wed Dec 23 12:52:08 2015,1450875128\n //HEADER,CLIENT_LIST,Common Name,Real Address,Virtual Address,Bytes Received,Bytes Sent,Connected Since,Connected Since (time_t),Username\n //CLIENT_LIST,fkooman_ziptest,::ffff:91.64.87.183,10.42.42.2,127707,127903,Wed Dec 23 12:49:15 2015,1450874955,UNDEF\n //CLIENT_LIST,sebas_tuxed_SGS6,::ffff:83.83.194.107,10.42.42.3,127229,180419,Wed Dec 23 12:05:28 2015,1450872328,UNDEF\n //HEADER,ROUTING_TABLE,Virtual Address,Common Name,Real Address,Last Ref,Last Ref (time_t)\n //ROUTING_TABLE,10.42.42.2,fkooman_ziptest,::ffff:91.64.87.183,Wed Dec 23 12:52:07 2015,1450875127\n //ROUTING_TABLE,fd00:4242:4242::1000,fkooman_ziptest,::ffff:91.64.87.183,Wed Dec 23 12:50:42 2015,1450875042\n //ROUTING_TABLE,fd00:4242:4242::1001,sebas_tuxed_SGS6,::ffff:83.83.194.107,Wed Dec 23 12:28:53 2015,1450873733\n //ROUTING_TABLE,10.42.42.3,sebas_tuxed_SGS6,::ffff:83.83.194.107,Wed Dec 23 12:50:46 2015,1450875046\n //GLOBAL_STATS,Max bcast/mcast queue length,0\n //END\n\n // for now, we log all statusData to get a good corpus for writing\n // tests\n\n //error_log(json_encode($statusData));\n\n $clientListStart = 0;\n $routingTableStart = 0;\n $globalStatsStart = 0;\n\n for ($i = 0; $i < sizeof($statusData); ++$i) {\n if (0 === strpos($statusData[$i], 'HEADER,CLIENT_LIST')) {\n $clientListStart = $i;\n }\n if (0 === strpos($statusData[$i], 'HEADER,ROUTING_TABLE')) {\n $routingTableStart = $i;\n }\n if (0 === strpos($statusData[$i], 'GLOBAL_STATS')) {\n $globalStatsStart = $i;\n }\n }\n\n $parsedClientList = self::parseClientList(array_slice($statusData, $clientListStart, $routingTableStart - $clientListStart));\n $parsedRoutingTable = self::parseRoutingTable(array_slice($statusData, $routingTableStart, $globalStatsStart - $routingTableStart));\n\n // merge routing table in client list\n foreach ($parsedClientList as $key => $value) {\n if (!array_key_exists($key, $parsedRoutingTable)) {\n $parsedClientList[$key]['virtual_address'] = array();\n } else {\n $parsedClientList[$key]['virtual_address'] = $parsedRoutingTable[$key];\n }\n }\n\n return array_values($parsedClientList);\n }", "title": "" }, { "docid": "d9f441aa0a9f1c28ae3624a71e60849b", "score": "0.4383598", "text": "public static function custom_paypal_txn_status() {\n\t\t\tforeach(self::$paypal_payment_statuses as $k => $v) {\n\t\t\t\tregister_post_status($k, array(\n\t\t\t\t\t'label' => $v['label'],\n\t\t\t\t\t'public' => true,\n\t\t\t\t\t'exclude_from_search' => false,\n\t\t\t\t\t'show_in_admin_all_list' => true,\n\t\t\t\t\t'show_in_admin_status_list' => true,\n\t\t\t\t\t'label_count' => _n_noop($v['label'] . ' <span class=\"count\">(%s)</span>', $v['label'] . ' <span class=\"count\">(%s)</span>' ),\n\t\t\t\t));\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "98726ed87520901af2bc048210323258", "score": "0.4367594", "text": "public function __construct() {\n $this->status = array();\n }", "title": "" }, { "docid": "3821bbe1836ebcbc971173175cf80bec", "score": "0.43636376", "text": "private function getStatus(){\n\t\t$this->retrieveStatus();\n\t}", "title": "" }, { "docid": "16aeafd0b964fe0a2a922f8b1507c076", "score": "0.43614346", "text": "function insert_status() {\n\t\t// if there is no auto_increment field, please remove it\n\t\t$sql = \"INSERT INTO grd_status (user_id, prob_id, res_id) VALUES (?,?,?)\";\t\t\n\t\t$query = $this->db->query($sql, array($this->id,$this->probid, $this->status));\n\t\t$this->last_insert_id = $this->db->insert_id();\n\t\t\t\t\n\t\t\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "8c39f7db5f2c54e578e9087dfef35eeb", "score": "0.4361412", "text": "public function run()\n {\n Status::create([\n \"name\"=>\"未激活\",\n \"tag\"=>\"PV\",\n ]);\n Status::create([\n \"name\"=>\"活动\",\n \"tag\"=>\"A\",\n ]);\n Status::create([\n \"name\"=>\"待审核\",\n \"tag\"=>\"PA\",\n ]);\n Status::create([\n \"name\"=>\"关闭\",\n \"tag\"=>\"C\",\n ]);\n }", "title": "" }, { "docid": "5b357c51ef306498ccee265b2f4e1126", "score": "0.43497312", "text": "function parse_hlds_status($StatusString): array\n {\n\n try {\n $params[0] = array(\"name\" => 'hostname', \"pattern\" => \"^hostname\\s*:\\s*(.*)$\");\n $params[1] = array(\"name\" => 'version', \"pattern\" => \"version\\s*:\\s*(.*)$\");\n $params[2] = array(\"name\" => 'udp/ip', \"pattern\" => \"udp\\/ip\\s*:\\s*(.*)\");\n $params[3] = array(\"name\" => 'map', \"pattern\" => \"map\\s*:\\s*([\\w-]+).*$\");\n $params[4] = array(\"name\" => 'maxplayers', \"pattern\" => \"players\\s*:\\s*(\\d+).*\\((\\d+).*\\)$\");\n\n $matches = array();\n foreach ($params as $param) {\n preg_match(\"/\" . $param['pattern'] . \"/im\", $StatusString, $matches);\n $out[$param['name']] = $matches[1];\n }\n /*\n *\tParse player data\n *\t- locate # at begining of line to signify start of table\n *\t- locate second player count \"\\d+ users\" which is the end of the table\n *\t- parse the table\n */\n\n preg_match('/#\\s*(\\d+)\\s+(\"GOTV\")\\s*(\\w*)\\s*(\\w*)\\s*(\\d*)[\\r\\n]+/im', $StatusString, $matches);\n if (count($matches) > 0) {\n $out['gotv']['bot'] = [\n 'id' => $matches[1],\n 'botname' => $matches[2],\n 'type' => $matches[3],\n 'status' => $matches[4],\n 'tickrate' => $matches[5]];\n\n $StatusString = str_replace($matches[0], \"\", $StatusString);\n }\n\n $botAmount = 0;\n while (preg_match('/#\\s*(\\d+)\\s+(\"\\w+\")\\s*(\\w*)\\s*(\\w*)\\s*(\\d*)[\\r\\n]+/im', $StatusString, $matches)) {\n $out['bots']['bot' . ($botAmount + 1)] = [\n 'id' => $matches[1],\n 'botname' => $matches[2],\n 'type' => $matches[3],\n 'status' => $matches[4],\n 'tickrate' => $matches[5]];\n $botAmount++;\n $StatusString = str_replace($matches[0], \"\", $StatusString);\n }\n\n $out['botAmount'] = $botAmount;\n // Isolate player data table\n preg_match(\"/^#/im\", $StatusString, $matches, PREG_OFFSET_CAPTURE);\n $iStart = $matches[0][1];\n\n preg_match(\"/#end/im\", $StatusString, $matches, PREG_OFFSET_CAPTURE);\n $iEnd = $matches[0][1];\n\n $PlayerDataString = trim(substr($StatusString, $iStart, $iEnd - $iStart));\n\n // Convert to an array\n $PlayerDataArray = preg_split(\"/(\\r\\n|\\n|\\r)/\", $PlayerDataString);\n\n // Parse header\n $header = explode_by_whitespace(array_shift($PlayerDataArray));\n\n\n // Parse player data\n $playerAmount = 0;\n $PlayerList = array();\n foreach ($PlayerDataArray as $player) {\n $PlayerList[$playerAmount++] = parse_player_line($player);\n }\n $out['playerAmount'] = $playerAmount;\n $out['players'] = $PlayerList;\n } catch (Exception $e) {\n return ['statusFormatted' => false,\n 'error' => $e->getMessage()];\n }\n $out['statusFormatted'] = true;\n return $out;\n }", "title": "" }, { "docid": "6cbe5732d34f5a2b1c7cc18bc9747867", "score": "0.43295375", "text": "function getStatus() ;", "title": "" }, { "docid": "aee6153b59eeb4ff2e24bb3d5a40ece6", "score": "0.43286204", "text": "public function run()\n {\n TransactionStatus::create([\n 'name' => 'started',\n 'description' => 'Iniciado',\n ]);\n\n TransactionStatus::create([\n 'name' => 'pending',\n 'description' => 'Pendiente',\n ]);\n\n TransactionStatus::create([\n 'name' => 'sended',\n 'description' => 'Enviado',\n ]);\n\n TransactionStatus::create([\n 'name' => 'approved',\n 'description' => 'Aprobado',\n ]);\n\n TransactionStatus::create([\n 'name' => 'finished',\n 'description' => 'Finalizado',\n ]);\n }", "title": "" }, { "docid": "4b1c1295bed5e3c93671c1ffffea119f", "score": "0.4313939", "text": "public function insert($terminalCode, $commandType){ \n try{\n $this->beginTransaction();\n $stmt = $this->dbh->prepare('INSERT INTO spyderrequestlogs (TerminalCode, CommandType, DateCreated, \n Status) VALUES (:terminal_code, :command_type, now(6), 0)');\n\n $stmt->bindValue(':terminal_code', $terminalCode);\n $stmt->bindValue(':command_type', $commandType);\n \n $stmt->execute();\n $spyderrequestlogsID = $this->getLastInsertId();\n try {\n $this->dbh->commit();\n return $spyderrequestlogsID;\n } catch(Exception $e) {\n $this->dbh->rollBack();\n return false;\n }\n } catch (Exception $e) {\n $this->dbh->rollBack();\n return false;\n }\n }", "title": "" }, { "docid": "59d58f3682d1fbdc005f5662d08677fd", "score": "0.43087667", "text": "public function run()\n {\n $arr_status=['Pending','Accepted','Done','Rejected'];\n\n foreach($arr_status as $s)\n {\n Status::create(['name'=>$s]);\n }\n }", "title": "" }, { "docid": "ded9db59c464a00db57fd1a2e44cf4d6", "score": "0.43086055", "text": "public function add(){\n\t\t\tif (Auth::validToken($this->db,$this->token,$this->username)){\n $roles = Auth::getRoleID($this->db,$this->token);\n if ($roles < 3){\n \t\t $newusername = strtolower($this->username);\t\n\t\t\t\t\t$newstatusid = Validation::integerOnly($this->statusid);\t\t\t\n\t\t \ttry {\n\t\t\t\t \t$this->db->beginTransaction();\n\t\t\t\t\t\t$sql = \"INSERT INTO log_data (CodeID,Description,StatusID,Created_at,Username) \n\t\t \t\t\tVALUES (:codeid,:description,:statusid,current_timestamp,:username);\";\n\t\t\t\t \t$stmt = $this->db->prepare($sql);\n\t\t\t\t\t\t$stmt->bindParam(':codeid', $this->codeid, PDO::PARAM_STR);\n\t\t\t\t\t\t$stmt->bindParam(':description', $this->description, PDO::PARAM_STR);\n\t\t\t\t\t\t$stmt->bindParam(':statusid', $newstatusid, PDO::PARAM_STR);\n\t\t\t\t\t\t$stmt->bindParam(':username', $newusername, PDO::PARAM_STR);\n\t\t \t\t\tif ($stmt->execute()) {\n\t\t\t\t\t\t\t$data = [\n\t\t \t\t\t\t\t'status' => 'success',\n\t\t\t \t\t\t\t'code' => 'RS101',\n\t\t\t\t \t\t\t'message' => CustomHandlers::getreSlimMessage('RS101',$this->lang)\n\t\t\t\t\t \t];\t\n \t\t\t\t\t} else {\n\t \t\t\t\t\t$data = [\n\t\t \t\t\t\t\t'status' => 'error',\n\t\t\t\t\t \t\t'code' => 'RS201',\n\t\t\t\t\t\t\t\t'message' => CustomHandlers::getreSlimMessage('RS201',$this->lang)\n\t\t\t\t\t \t];\n\t\t\t\t\t\t}\n\t \t\t\t\t$this->db->commit();\n\t\t\t\t } catch (PDOException $e) {\n \t\t\t\t\t$data = [\n\t \t \t\t\t'status' => 'error',\n\t\t \t\t\t 'code' => $e->getCode(),\n \t\t\t\t \t'message' => $e->getMessage()\n\t \t\t\t\t];\n\t\t\t\t\t $this->db->rollBack();\n\t\t\t\t\t}\n\t\t\t\t} else {\n $data = [\n 'status' => 'error',\n 'code' => 'RS404',\n 'message' => CustomHandlers::getreSlimMessage('RS404',$this->lang)\n ];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$data = [\n\t \t\t\t'status' => 'error',\n\t\t\t\t 'code' => 'RS401',\n\t\t\t\t\t'message' => CustomHandlers::getreSlimMessage('RS401',$this->lang)\n \t\t\t];\n\t\t\t}\n\t\t\treturn JSON::encode($data,true);\n\t\t\t$this->db = null;\n }", "title": "" }, { "docid": "a2321f50ade2192f8c1a393a12152a1a", "score": "0.43083245", "text": "function write_status(&$fd, &$key, &$row)\n{\n \n fprintf($fd, \"%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,\\n\", date('YmdHi'), $key, $row['Name'], $row['Engine'], \n $row['Row_format'], $row['Rows'], $row['Avg_row_length'], $row['Data_length'], $row['Index_length'], \n $row['Data_free'], $row['Collation'], $row['Auto_increment'], $row['Create_time'], $row['Update_time']);\n}", "title": "" }, { "docid": "763ccb31dba06ea7ec57637254609e64", "score": "0.4304199", "text": "function status($stat, $tunnel_id){\n $html=\"\";\n /* if($stat >= 0 && $stat < 2) {\n $html .= '<input type=\"hidden\" class=\"edit_status_s\" name=\"status\" value=' . $stat . '>';\n $html .= '<div class=\"status st_ch_status_' . $stat . ' tunnel_stat_' . $tunnel_id . '\" type=\"data\" data-toggle=\"tooltip\" title=\"Active\" data-cast=\"' . $_SESSION['user_id'] . '\" data-val=\"' . $stat . '\" data-id=\"' . $tunnel_id . '\"><i class=\"fa fa-fw fa-circle\"></i></div>';\n }*/\n if($stat==1){\n $html.='<input type=\"hidden\" class=\"edit_status_s\" name=\"status\" value=1>';\n $html.='<div class=\"status tunnel_stat_'.$tunnel_id.'\" type=\"data\" data-toggle=\"tooltip\" title=\"Active\" data-cast=\"'.$_SESSION['user_id'].'\" data-val=\"1\" data-id=\"'.$tunnel_id.'\"><i class=\"fa fa-fw fa-circle\" style=\"color:#1D9E74\"></i></div>';\n\n }else if($stat==0){\n $html.='<input type=\"hidden\" class=\"edit_status_s\" name=\"status\" value=0>';\n $html.='<div class=\"status tunnel_stat_'.$tunnel_id.'\" type=\"data\" data-toggle=\"tooltip\" title=\"Inactive\" data-cast=\"'.$_SESSION['user_id'].'\" data-val=\"0\" data-id=\"'.$tunnel_id.'\"><i class=\"fa fa-fw fa-circle\" style=\"color:#DA3838\"></i></div>';\n }\n return $html;\n}", "title": "" }, { "docid": "f130ed727067d1eeae82346b166a2c75", "score": "0.43035397", "text": "static function _getVPNStatus(){\n\t\t$openvpnStatusFile = Configure::read(\"OpenVPNStatusFile\");\n\t\t$status = file_get_contents($openvpnStatusFile);\n\n\t\t$re = \"/OpenVPN CLIENT LIST\\\\nUpdated,(.*)\\\\n([\\\\w-,.: \\\\n]*)\\\\nROUTING TABLE\\\\n([\\\\w-,.: \\\\n]*)\\\\nGLOBAL STATS\\\\n([\\\\w-,.: \\\\/\\\\n]*)\\\\nEND/iu\"; \n\n\t\tpreg_match($re, $status, $matches);\n\t\t\n\t\tlist($data, $lastUpdate, $connected, $routing, $global) = $matches;\n\t\t$connected = explode(\"\\n\",$connected);\n\t\t$connectedColumns = array_shift($connected);\n\t\t$connectedColumns = explode(\",\",$connectedColumns);\n\t\t$listeCo = array();\n\t\tforeach($connected as $i => $c){\n\t\t\t$user = explode(\",\",$c);\n\t\t\tlist($cn, $real_addr, $b_rx, $b_tx, $conn_since) = $user;\n\t\t\t$listeCo[$real_addr] = array(\n\t\t\t\t\"cn\" => $cn, \n\t\t\t\t\"real_addr\" => $real_addr, \n\t\t\t\t\"b_rx\" => VpnController::_convertSize($b_rx),\n\t\t\t\t\"b_tx\" => VpnController::_convertSize($b_tx),\n\t\t\t\t\"b_rx_raw\" => $b_rx,\n\t\t\t\t\"b_tx_raw\" => $b_tx,\n\t\t\t\t\"conn_since\" => $conn_since,\n\t\t\t\t\"virt_addr\" => \"\",\n\t\t\t\t\"last_ref\" => \"\"\n\t\t\t);\n\t\t}\n\n\t\t$routing = explode(\"\\n\",$routing);\n\t\t$routingColumns = array_shift($routing);\n\t\t$routingColumns = explode(\",\",$routingColumns);\n\t\tforeach($routing as $i => $c){\n\t\t\t$route = explode(\",\",$c);\n\t\t\tlist($virt_addr, $cn, $real_addr, $last_ref) = $route;\n\t\t\t$listeCo[$real_addr][\"error\"] = ($cn != $listeCo[$real_addr][\"cn\"]);\n\t\t\t$listeCo[$real_addr][\"virt_addr\"] = $virt_addr;\n\t\t\t$listeCo[$real_addr][\"last_ref\"] = $last_ref;\n\t\t}\n\t\treturn $listeCo;\n\t}", "title": "" }, { "docid": "edc20a9d7c1bfac3d21b612d35172112", "score": "0.4292235", "text": "protected function parseStatus($object, $jsonParent) {\n $statusArray = $object->getStatus();\n $statusParser = new StatusStructureJsonParser();\n $serviceJsonArray = $this->buildJsonArray(\"status\", $statusArray, $statusParser);\n $jsonParent->addElement($serviceJsonArray);\n }", "title": "" }, { "docid": "197dcb4ff530e9b11474e4adbafb236a", "score": "0.4284268", "text": "function dpsp_update_serial_key_status( $old_settings = array() , $new_settings = array() ) {\n\n\t$serial = ( isset( $new_settings['product_serial'] ) ? $new_settings['product_serial'] : '' );\n\n\t// Get serial status\n\t$serial_status = dpsp_get_serial_key_status( $serial );\n\n\tif( !is_null( $serial_status ) )\n\t\tupdate_option( 'dpsp_product_serial_status', $serial_status );\n\telse\n\t\tupdate_option( 'dpsp_product_serial_status', '' );\n\n}", "title": "" }, { "docid": "9914cc5073ee2f3b5259e810a0b6d338", "score": "0.42779347", "text": "public static function addStatusToBillogram( $order_statuses ) {\n\t\t// add new order status after processing\n\t\tforeach ( self::getStatuses() as $key => $status ) {\n\t\t\t$order_statuses[ $key ] = $status['label'];\n\t\t}\n\t\treturn $order_statuses;\n\t}", "title": "" }, { "docid": "4e1535b918f886365a59d8918ef63c39", "score": "0.4264471", "text": "public function run()\n {\n if (TransactionStatus::count() == 0) {\n $statuses = [\n ['name'=> 'Beli','type'=> 'in'],\n ['name'=> 'Jual','type'=> 'out'],\n ['name'=> 'Hibah','type'=> 'in'],\n ['name'=> 'Dipinjam','type'=> 'out'],\n ['name'=> 'Penyesuaian','type'=> 'in'],\n ['name'=> 'Penyesuaian','type'=> 'out'],\n ];\n foreach ($statuses as $i) {\n TransactionStatus::create($i);\n }\n }\n }", "title": "" }, { "docid": "679b6c198f0f663ce3732206ae2fb2c3", "score": "0.42570397", "text": "public function run()\n {\n Status::create([\n 'value' => 'Quote In'\n ]);\n Status::create([\n 'value' => 'Supplier Quote'\n ]);\n Status::create([\n 'value' => 'Quote Out'\n ]);\n Status::create([\n 'value' => 'New Job'\n ]);\n Status::create([\n 'value' => 'Production'\n ]);\n Status::create([\n 'value' => 'Incoming'\n ]);\n Status::create([\n 'value' => 'Delivery'\n ]);\n Status::create([\n 'value' => 'Invoice'\n ]);\n Status::create([\n 'value' => 'Complete'\n ]);\n Status::create([\n 'value' => 'Cancel'\n ]);\n }", "title": "" }, { "docid": "48e8e5ac1586f9701ad861d3de2e73bd", "score": "0.4251076", "text": "function add_awaiting_shipment_to_order_statuses( $order_statuses ) {\r\n $new_order_statuses = array();\r\n // add new order status after processing\r\n foreach ( $order_statuses as $key => $status ) {\r\n $new_order_statuses[ $key ] = $status;\r\n if ( 'wc-processing' === $key ) {\r\n $new_order_statuses['wc-pay_on_account'] = 'Payment On Account';\r\n }\r\n }\r\n return $new_order_statuses;\r\n}", "title": "" }, { "docid": "bb8d22bb084b5709094f8e8c05f8b439", "score": "0.4238937", "text": "private function setStatus($status)\r\n {\r\n $vaildStatusBoolean = false;\r\n \r\n // checks to make sure the status is vaild\r\n switch($status) {\r\n case \"Created\":\r\n $vaildStatusBoolean = true;\r\n break;\r\n case \"RA Requested\":\r\n $vaildStatusBoolean = true;\r\n break;\r\n case \"Shipped\":\r\n $vaildStatusBoolean = true;\r\n break;\r\n case \"Complete\":\r\n $vaildStatusBoolean = true;\r\n break;\r\n case \"Cancelled\":\r\n $vaildStatusBoolean = true;\r\n break; \r\n }\r\n \r\n // if vaild status, assign status to the global variable\r\n if($vaildStatusBoolean == true)\r\n {\r\n $this->status = $status;\r\n }\r\n else{\r\n die(\"<h2> Error - Invaild Repair Status - Must be ethier Created, RA Requested, Shipped, Complete, Cancelled\");\r\n }\r\n }", "title": "" }, { "docid": "c9edbe9add063f30b4d2f2055806d972", "score": "0.42383933", "text": "public function run()\n {\n # Define starting status codes\n $statuses = ['Needs Update', 'In Progress', 'Ready For Use', 'Marked For Deletion'];\n\n foreach ($statuses as $statusItem) {\n $status = new Status();\n $status->status_code = $statusItem;\n $status->save();\n }\n }", "title": "" }, { "docid": "8b45e266b1a4a2f4e9ae9e820733b06d", "score": "0.4233995", "text": "function addStatusToData($status, $statusMessage, $count, $data)\n {\n header(\"HTTP/1.1 $status $statusMessage\");\n $response['status'] = $status;\n $response['message'] = $statusMessage;\n $response['totalBookInDB'] = $count;\n $response['response'] = $data;\n return $response;\n }", "title": "" }, { "docid": "22987e77ef96dc63cf4c9b784d253b2b", "score": "0.42337206", "text": "public function register_custom_statuses() {\n $args = array( 'hide_empty' => false );\n $custom_statuses = get_terms( $this->taxonomy_key, $args );\n foreach ( $custom_statuses as $status ) {\n register_post_status( $status->slug, array(\n 'label' => $status->name,\n 'protected' => true,\n '_builtin' => false,\n 'label_count' => _n_noop( \"{$status->name} <span class='count'>(%s)</span>\", \"{$status->name} <span class='count'>(%s)</span>\" )\n ) );\n }\n }", "title": "" }, { "docid": "b907b6b89dc658afe073ef7e7cb68e8e", "score": "0.42335317", "text": "public function changestatus() {\n\t\tif (!$this->session->userdata('logged_in')) {\n\t\t\tredirect('user/login');\n\t\t}\n\n\t\t$statusid = $this->input->post('statusid');\n\t\t$controllername = $this->input->post('controllername');\n//\t$displayid = $this->input->post('displayid');\n\n\t\tif($this->input->post('statusvalue')) {\n\t\t\t$statusVal = 0;\n\t\t\t$statusRow = '<span statusid='.$statusid.' statusvalue='.$statusVal.' controllername='.$controllername.' style=\"color: #ff0000; cursor: pointer;\" title=\"In Active\"><i class=\"fa fa-2x fa-ban\" aria-hidden=\"true\"></i></span>';\n\t\t} else {\n\t\t\t$statusVal = 1;\n\t\t\t$statusRow = '<span statusid='.$statusid.' statusvalue='.$statusVal.' controllername='.$controllername.' style=\"color: #00a65a; cursor: pointer;\" title=\"Active\"><i class=\"fa fa-2x fa-check\" aria-hidden=\"true\"></i></span>';\n\t\t}\n\n\t\t$changes = $this->Service_model->changeStatus($statusid, $statusVal);\n\t\tif($changes) {\n\t\t\techo $statusRow;\n\t\t} else {\n\t\t\techo 'Server problem';\n\t\t}\n\t}", "title": "" }, { "docid": "e833621b19acd8d542003f48cc617947", "score": "0.42332506", "text": "public function cronCurrentInventoryStatus()\n {\n // check if next token exists before proceeding with regular call.\n if ($this->helper->getInventoryNextToken()) {\n $response = $this->inventory->getListInventorySupplyByNextToken($this->helper->getInventoryNextToken());\n } else {\n // used -1 day since inventory changes are from given time to present,\n // current time would not return data.\n $startTime = gmdate(\"Y-m-d\\TH:i:s.\\\\0\\\\0\\\\0\\\\Z\", strtotime('-1 day'));\n $response = $this->inventory->getFulfillmentInventoryList([], $startTime);\n }\n\n if ($response) {\n // if there is a list of updates to provided skus, process them.\n $supplyList = $response->getListInventorySupplyResult()\n ->getInventorySupplyList()\n ->getmember();\n if ($supplyList) {\n $this->updateInventoryProcessStatus($supplyList);\n }\n\n $nextToken = $response->getListInventorySupplyResult()->getNextToken();\n\n if ($nextToken) {\n $this->helper->setInventoryNextToken($nextToken);\n } else {\n $this->helper->setInventoryNextToken('');\n }\n } else {\n // If no response, make sure next token is set to empty string for future calls.\n // It's possible call was made with invalid token\n $this->helper->setInventoryNextToken('');\n }\n }", "title": "" }, { "docid": "cc88de0b35dbdf6b61ba194fc3a9deb8", "score": "0.42289373", "text": "public function run()\n {\n //\n Status::create(['name' => 'IR']);\n Status::create(['name' => 'Activate']);\n Status::create(['name' => 'Stand 1']);\n Status::create(['name' => 'Stand 4']);\n Status::create(['name' => 'ICE']);\n }", "title": "" }, { "docid": "b209f65b0f055cb1e2108b73d6414d73", "score": "0.42288268", "text": "public function run()\n {\n # Define starting data for status codes mapped to products\n $products = [\n #Engines\n 102486 => ['Needs Update', 'In Progress'],\n 101183 => ['Ready For Use'],\n 102290 => ['Needs Update', 'In Progress'],\n 101138 => ['Marked For Deletion'],\n 101238 => ['Marked For Deletion'],\n 102289 => ['In Progress'],\n #Coolers\n 102400 => ['Ready For Use'],\n 102340 => ['Marked For Deletion'],\n 102365 => ['Needs Update', 'In Progress'],\n 101253 => ['Needs Update', 'In Progress'],\n 102322 => ['Ready For Use'],\n #Compressors\n 101187 => ['Ready For Use'],\n 102280 => ['Ready For Use'],\n 102279 => ['Ready For Use'],\n 102281 => ['Needs Update', 'In Progress'],\n 102278 => ['Marked For Deletion'],\n #Panels\n 102405 => ['Ready For Use'],\n 100211 => ['Needs Update', 'In Progress'],\n 100401 => ['Needs Update', 'In Progress'],\n 102478 => ['Marked For Deletion'],\n 103180 => ['Marked For Deletion'],\n 100838 => ['Ready For Use'],\n #Motors\n 103297 => ['Marked For Deletion'],\n 102477 => ['Needs Update', 'In Progress'],\n 102742 => ['Ready For Use'],\n 102295 => ['Ready For Use'],\n 103070 => ['Ready For Use']\n\n ];\n\n # Fill in status codes/products starting relations into database\n foreach ($products as $item_number => $statusCodes) {\n $product = Product::where('item_number', 'like', $item_number)->first();\n\n foreach ($statusCodes as $statusCode) {\n $status = Status::where('status_code', 'like', $statusCode)->first();\n $product->statuses()->save($status);\n }\n }\n }", "title": "" }, { "docid": "425dabb484e201fdefba461504f9e97e", "score": "0.42167398", "text": "public function run()\n {\n $company = \\App\\Company::first();\n\n DB::table('rest_statuses')->insert([\n ['id' => RestStatus::YUUKYU_1, 'name' => '有給', 'company_id' => $company->id, 'unit_type' => 1, 'paid_type' => 1,],\n ['id' => RestStatus::YUUKYU_2, 'name' => '有休', 'company_id' => $company->id, 'unit_type' => 1, 'paid_type' => 1,],\n ['id' => RestStatus::ZENKYUU_1, 'name' => '前給', 'company_id' => $company->id, 'unit_type' => 0, 'paid_type' => 1,],\n ['id' => RestStatus::ZENKYUU_2, 'name' => '前休', 'company_id' => $company->id, 'unit_type' => 0, 'paid_type' => 1,],\n ['id' => RestStatus::GOKYUU_1, 'name' => '後給', 'company_id' => $company->id, 'unit_type' => 0, 'paid_type' => 1,],\n ['id' => RestStatus::GOKYUU_2, 'name' => '後休', 'company_id' => $company->id, 'unit_type' => 0, 'paid_type' => 1,],\n ['id' => RestStatus::JIYUU, 'name' => '時有', 'company_id' => $company->id, 'unit_type' => 0, 'paid_type' => 1,],\n ['id' => RestStatus::HANKYUU_1, 'name' => '半給', 'company_id' => $company->id, 'unit_type' => 0, 'paid_type' => 1,],\n ['id' => RestStatus::HANKYUU_2, 'name' => '半休', 'company_id' => $company->id, 'unit_type' => 0, 'paid_type' => 1,],\n ]);\n }", "title": "" }, { "docid": "d15e77437653b07ab079bfe0b1932dfb", "score": "0.42162848", "text": "function _commerce_cielo_set_status_message($reponse) {\n $message = array(\n 'status' => '',\n 'message' => '',\n );\n\n if (isset($reponse['status'])) {\n // No transaction errors have occured.\n $message['status'] = $reponse['status'];\n $message['message'] = t('Status Code: @code', array('@code' => $message['status']));\n\n foreach ($reponse as $process => $values) {\n if (is_array($values)) {\n // Payment tab message.\n if (key_exists('mensagem', $values)) {\n // Assemble payment tab message.\n $message['message'] .= '<br />' . t(\"@process: @message\", array('@process' => $process, '@message' => $values['mensagem']));\n }\n }\n }\n }\n elseif (isset($reponse['codigo'])) {\n // The remote server reported an error.\n $message['status'] = check_plain($reponse['codigo']);\n $message['message'] = t('Error Code: @code', array('@code' => $reponse['codigo']));\n $message['message'] .= '<br />' . t('Error Message: @message', array('@message' => $reponse['mensagem']));\n }\n\n return $message;\n}", "title": "" }, { "docid": "9917ff64e71d7b0fa2759010b738d169", "score": "0.4215871", "text": "public function run()\n {\n $statuses = [\n 'Validated',\n 'Waiting for review',\n 'Correction in progress',\n ];\n\n foreach ($statuses as $status) {\n Status::create([\n 'label' => $status\n ]);\n }\n }", "title": "" }, { "docid": "d6c4ac60a4b730a0dffe7afbde490043", "score": "0.42134625", "text": "function addStatus($personalId,$sFname,$sLname,$status,$employer,$sPhone){\n\t\t$strQuery=\"insert into status set PERSONAL_ID=$personalId,SPOUSE_FNAME='$sFname',SPOUSE_LNAME='$sLname',\n\t\tSTATUS='$status',EMPLOYER='$employer',SPOUSE_PHONE='$sPhone'\";\n\t\t\n\t\treturn $this->query($strQuery);\n\t}", "title": "" }, { "docid": "c8ad39c941a3b7c576023eb220525b22", "score": "0.42127016", "text": "protected function splitPlayerStatus($attributes, $playerStatus) {\n if($attributes[0] != 'userid') {\n $playerStatus = preg_replace('/^\\d+ +/', '', $playerStatus);\n }\n\n $firstQuote = strpos($playerStatus, '\"');\n $lastQuote = strrpos($playerStatus, '\"');\n $data = array(\n substr($playerStatus, 0, $firstQuote),\n substr($playerStatus, $firstQuote + 1, $lastQuote - 1 - $firstQuote),\n substr($playerStatus, $lastQuote + 1)\n );\n\n $data = array_merge(\n array_filter(preg_split(\"/\\s+/\", trim($data[0]))),\n array($data[1]),\n preg_split(\"/\\s+/\", trim($data[2]))\n );\n $data = array_values($data);\n\n if(sizeof($attributes) > sizeof($data) &&\n in_array('state', $attributes)) {\n array_splice($data, 3, 0, array(null, null, null));\n } elseif(sizeof($attributes) < sizeof($data)) {\n unset($data[1]);\n $data = array_values($data);\n }\n\n $playerData = array();\n for($i = 0; $i < sizeof($data); $i ++) {\n $playerData[$attributes[$i]] = $data[$i];\n }\n\n return $playerData;\n }", "title": "" }, { "docid": "fce233cb613aed307061f93307b8c5bb", "score": "0.42049876", "text": "public function run()\r\n\t{\r\n\t\tDB::table('statuses')->delete();\r\n\r\n\t\tStatus::create(['description' => 'REQUEST']);\r\n\t\tStatus::create(['description' => 'SAVED']);\r\n\t\tStatus::create(['description' => 'QUOTED']);\r\n\t\tStatus::create(['description' => 'LAPSED']);\r\n\t\tStatus::create(['description' => 'DECLINED']);\r\n\t\tStatus::create(['description' => 'SUBMITTED']);\r\n\t\tStatus::create(['description' => 'ORDERED']);\r\n\t\tStatus::create(['description' => 'IN PROGRESS']);\r\n\t\tStatus::create(['description' => 'SHIPPED']);\r\n\t\tStatus::create(['description' => 'COMPLETED']);\r\n\t}", "title": "" }, { "docid": "2757fb34728acaf5e60d3abf9ef3630f", "score": "0.4203663", "text": "public function getStatus()\n {\n $this->redirectUser(array('admin','board'));\n\n $s = $this->Settings->getStatus();\n $data['data'] = array();\n\n if ($s->num_rows()>0) {\n $demo_disable = ($this->config->item('demo')?'disabled':'');\n foreach ($s->result() as $key => $v) {\n $data['data'][] = array(\n $v->status_name,\n $v->status_number,\n $v->status_text,\n '<label class=\"label label-'.$v->status_type.'\">'.$v->status_type.'</label>',\n '<a href=\"\" data-id=\"'.$v->id.'\" class=\"'.$demo_disable.' btn btn-xs btn-warning xwb-edit-status\">'.lang('btn_edit').'</a>\n <a href=\"\" data-id=\"'.$v->id.'\" class=\"'.$demo_disable.' btn btn-xs btn-danger xwb-del-status\">'.lang('btn_delete').'</a>',\n );\n }\n }\n echo $this->xwbJsonEncode($data);\n }", "title": "" }, { "docid": "c5b8bfb19506a2a681397963ffd680a6", "score": "0.42032117", "text": "function colorize_status($status)\n{\n global $pass_txt_style;\n global $fail_txt_style;\n global $indeterminate_txt_style;\n global $style_end;\n\n # add color to the status\n if ( $status == \"PASS\" || $status == \"EXPECTED_TO_FAIL\" ) {\n return $pass_txt_style . $status . $style_end;\n }\n elseif ( $status == \"FAIL\" ) {\n return $fail_txt_style . $status . $style_end;\n }\n elseif ( $status == \"INDETERMINATE\" ) {\n return $indeterminate_txt_style . $status . $style_end;\n }\n else {\n return $status;\n }\n}", "title": "" }, { "docid": "8f69ce0e2563970c6827f8a9d04d288e", "score": "0.4194947", "text": "function wb_status_info($step,$status,$msg) {\n\t$status_msg = \"\";\n\tswitch($msg) {\n\t\tcase 1: \n\t\t\tswitch($status) {\n\t\t\t\tcase 'info':\n\t\t \t$status_msg = '<strong>Welcome!</strong> Please insert or upload XML to import.';\n\t\t\t\tbreak;\n\t\t\t\tcase 'alert':\n\t\t \t$status_msg = '<strong>Alert!</strong> The events in this XML file are already imported.';\n\t\t\t\tbreak;\n\t\t\t\tcase 'success':\n\t\t \t$status_msg = '<strong>Success!</strong> You have imported XML file successfully. ('.$_REQUEST['event_c'].') Events imported.';\n\t\t\t\tbreak;\n\t\t\t\tcase 'error':\n\t\t \t$status_msg = '<strong>Error!</strong> Your XML file was not imported. Please check your xml file.';\n\t\t\t\tbreak;\n\t\t\t}\n\t\tbreak;\n\t\tcase 2:\n\t\t\tswitch($status) {\n\t\t\t\tcase 'info':\n\t\t \t$status_msg = '';\n\t\t\t\tbreak;\n\t\t\t\tcase 'alert':\n\t\t \t$status_msg = '<strong>Alert!</strong> There are no events to update.';\n\t\t\t\tbreak;\n\t\t\t\tcase 'success':\n\t\t \t$status_msg = '<strong>Success!</strong> All events adresses updated.';\n\t\t\t\tbreak;\n\t\t\t\tcase 'error':\n\t\t \t$status_msg = '<strong>Error!</strong> Google Map api disconnected. Please try again.';\n\t\t\t\tbreak;\n\t\t\t} \n\t\tbreak;\n\t\tcase 3:\n\t\t\tswitch($status) {\n\t\t\t\tcase 'info':\n\t\t \t$status_msg = '';\n\t\t\t\tbreak;\n\t\t\t\tcase 'alert':\n\t\t \t$status_msg = '<strong>Alert!</strong> There are no events to commit.';\n\t\t\t\tbreak;\n\t\t\t\tcase 'success':\n\t\t \t$status_msg = '<strong>Success!</strong> All selected events committed.';\n\t\t\t\tbreak;\n\t\t\t\tcase 'error':\n\t\t \t$status_msg = '<strong>Error!</strong> Some Location or Event failed to commit. Please try again.';\n\t\t\t\tbreak;\n\t\t\t} \n\t\tbreak;\n\t\tcase 4:\n\t\t\tswitch($status) {\n\t\t\t\tcase 'info':\n\t\t \t$status_msg = '';\n\t\t\t\tbreak;\n\t\t\t\tcase 'alert':\n\t\t \t$status_msg = '<strong>Alert!</strong> There are no draft events to publish. Go to Next Step';\n\t\t\t\tbreak;\n\t\t\t\tcase 'success':\n\t\t \t$status_msg = '<strong>Success!</strong> All draft events are published.';\n\t\t\t\tbreak;\n\t\t\t\tcase 'error':\n\t\t \t$status_msg = '<strong>Error!</strong> Some Event failed to publish. Please try again.';\n\t\t\t\tbreak;\n\t\t\t} \n\t\tbreak;\n\t\tcase 5:\n\t\t\tswitch($status) {\n\t\t\t\tcase 'info':\n\t\t \t$status_msg = '';\n\t\t\t\tbreak;\n\t\t\t\tcase 'alert':\n\t\t \t$status_msg = '<strong>Alert!</strong> There are no tickets of events to publish.';\n\t\t\t\tbreak;\n\t\t\t\tcase 'success':\n\t\t \t$status_msg = '<strong>Success!</strong> All tickets of events are published.';\n\t\t\t\tbreak;\n\t\t\t\tcase 'error':\n\t\t \t$status_msg = '<strong>Error!</strong> Some Ticket failed to publish. Please try again.';\n\t\t\t\tbreak;\n\t\t\t} \n\t\tbreak;\n\t}\n\t\n\tif($status) {\n\t\techo '<div class=\"alert alert-'.$status.'\">\n\t\t \t\t\t<button type=\"button\" class=\"close\" data-dismiss=\"alert\">×</button>\n\t\t \t'.$status_msg.'\n\t\t \t\t</div>';\n\t}\n}", "title": "" }, { "docid": "38183f99531b369144c6a1486e1898af", "score": "0.41938764", "text": "public function setStatus( $status )\n {\n // add a cariage return\n $status .= \"\\n\";\n \n fwrite( $this->_outputStream, $status );\n }", "title": "" }, { "docid": "436385ca1f14e46b815b7c11c4281833", "score": "0.41911528", "text": "public function status()\n {\n if (isset($this->session->data['last_order_id']) && $this->session->data['last_order_id'] !== null) {\n $this->load->model('checkout/order');\n $order = $this->model_checkout_order->getOrder($this->session->data['last_order_id']);\n switch ($order['order_status_id']) {\n case $this->config->get($this->getConfigKey('status_processing')):\n die('0');\n case $this->config->get($this->getConfigKey('status_completed')):\n unset($this->session->data['last_order_id']);\n die('1');\n default:\n unset($this->session->data['last_order_id']);\n die('-1');\n }\n } else {\n die('NO');\n }\n }", "title": "" }, { "docid": "8ac3ca0e40ff5be10715a59778807175", "score": "0.4186193", "text": "function cne_ac_insert_report_status( $r ) {\r\n\r\n if ( is_admin() || !bbp_get_view_all() )\r\n return $r;\r\n\r\n if ( ! isset( $r['post_status'] ) )\r\n return $r;\r\n\r\n $statuses = explode( ',', $r['post_status'] );\r\n\r\n $statuses[] = cne_ac_get_post_status_report();\r\n\r\n $r['post_status'] = implode( ',', $statuses );\r\n\r\n return $r;\r\n}", "title": "" }, { "docid": "739007fe355b9abc9f7b1a7e0029dbfb", "score": "0.41823366", "text": "public function actionLogStackerTransaction() {\n //******************* DISABLE Genesis Reload *********************//\n//$transMsg = 'Reload using genesis terminal is temporarily disabled Please Use Cashier Load tab';\n//$errorCode = 29;\n//$module = 'LogStackerTransaction';\n//Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n//$this->_sendResponse(200, CJSON::encode(CommonController::StackerRetMsg($module, $transMsg, $errorCode)));\n//exit;\n $request = $this->_readJsonRequest();\n $module = 'LogStackerTransaction';\n $APIMethodID = APILogsModel::API_METHOD_LOGSTACKERTRANSACTION;\n $transMsg = '';\n $errorCode = '';\n Yii::import('application.components.VoucherTicketAPIWrapper');\n\n $voucherticket = new VoucherTicketAPIWrapper();\n $stackerBatchID = \"\";\n //Required input must be set\n if (isset($request['TrackingID']) && isset($request['TerminalName']) && isset($request['TransType']) && isset($request['Amount']) &&\n isset($request['CashType']) && isset($request['Source']) && isset($request['StackerBatchID']) && isset($request['MembershipCardNumber'])) {\n\n if (($request['TrackingID']) == \"\" || ($request['TerminalName']) == \"\" || ($request['TransType']) == \"\" ||\n ($request['Amount']) == \"\" || ($request['CashType']) == \"\" || ($request['Source']) == \"\" ||\n ($request['StackerBatchID']) == \"\" || ($request['MembershipCardNumber']) == \"\") {\n $transMsg = 'One or more fields is not set or is blank.';\n $errorCode = 1;\n } else {\n\n if (ctype_alnum($request['TrackingID']) && ctype_alnum($request['TerminalName']) && is_numeric($request['TransType']) &&\n is_numeric($request['Amount']) && is_numeric($request['CashType']) && is_numeric($request['Source']) &&\n is_numeric($request['StackerBatchID']) && ctype_alnum($request['MembershipCardNumber'])) {\n\n $terminalName = trim($request['TerminalName']);\n $sc = Yii::app()->params['SitePrefix'] . $terminalName; //Blank prefix\n $sc2 = Yii::app()->params['SitePrefix2'] . $terminalName; //Prefix (eg. ICSA-)\n $source = trim($request['Source']);\n $amount = trim($request['Amount']);\n $allowedAmount = Yii::app()->params['allowedAmount'];\n $transType = trim($request['TransType']);\n $paymentType = trim($request['CashType']);\n $trackingID = trim($request['TrackingID']);\n $stackerBatchID = trim($request['StackerBatchID']);\n $cardNumber = '';\n\n //Load all modules to be used\n $_stackerDetails = new StackerDetailsModel();\n $_stackerInfoModel = new StackerInfoModel();\n $_stackerSummaryModels = new StackerSummaryModels();\n $_stackerSessionsModels = new StackerSessionsModel();\n $_memberCardsModel = new MemberCardsModel();\n $_terminalsModel = new TerminalsModel();\n $_EGMSessions = new EGMSessionsModel();\n $_accountsModel = new AccountsModel();\n $_refCashDenominationModel = new RefCashDenominationModel();\n $_stackerSessionCashDenomModel = new StackerSessionCashDenomModel();\n// $getSiteID = $_terminalsModel->getTerminalIDByCode($sc2);\n// $siteID = $getSiteID[0]['SiteID'];\n// $enabledSite = Yii::app()->params['enabledSite'];\n// if ($siteID == $enabledSite){\n if ($amount >= $allowedAmount) { //Input amount should be greater than or equal to allowed amount\n $isTrackingIDExists = $_stackerDetails->isTrackingIDExists($trackingID);\n\n if ($isTrackingIDExists == 0) { //TrackingID must should be unique\n if ($source == CommonController::SOURCE_KAPI || $source == CommonController::SOURCE_EGM || $source == CommonController::SOURCE_CASHIER) { //Source must only be KAPI, EGM, or Cashier\n $stackerInfoID = $_stackerInfoModel->getStackerInfoIDByTerminalName($sc);\n $isStackerBatchIDExists = $_stackerSummaryModels->isStackerBatchIdExists($stackerBatchID); //equal to StackerSummaryID\n\n if ($isStackerBatchIDExists > 0) { //Check if StackerBatchID/StackerSummaryID is existing\n $totalDeposit = $_stackerSummaryModels->getTotalDepositByID($stackerBatchID); //Get the total deposit\n $finalTotalDeposit = $totalDeposit + $amount; //The value when we update Deposit in stackersessions\n $totalReload = $_stackerSummaryModels->getTotalReloadByID($stackerBatchID); //Get the total reload\n $finalTotalReload = $totalReload + $amount; //The value when we update Reload in stackersessions\n\n if ($stackerInfoID > 0) { //Check if Terminal Stacker is existing\n $stackerSessionID = $_stackerSessionsModels->getStackerSessionIDByTerminalName($sc);\n\n if (!empty($stackerSessionID)) { //Check if Terminal Stacker has a session\n if ($transType == CommonController::TRANS_TYPE_DEPOSIT || $transType == CommonController::TRANS_TYPE_RELOAD) { //Execute if transaction type is deposit or reload\n $terminals = $_terminalsModel->getTerminalIDByCode($sc2);\n\n if (!empty($terminals)) { //If Terminal exists in Kronus (npos database)\n $isEGMSession = $_EGMSessions->checkSessionIfExists($terminals[0]['TerminalID']);\n\n if ($isEGMSession > 0) { //If Terminal has an EGM session\n $terminalID = $terminals[0]['TerminalID']; //Regular\n $isEGMSessionExists = $isEGMSession; //Regular session\n } else { //If Terminal has no Regular EGM session\n $terminalID = $terminals[1]['TerminalID']; //VIP\n $isEGMSessionExists = $_EGMSessions->checkSessionIfExists($terminalID); //VIP session\n }\n //Each Site has a Virtual Cashier assigned\n $accountTypeID = CommonController::ACOUNTTYPE_ID_VIRTUAL_CASHIER;\n $AID = $_accountsModel->getAIDByAccountTypeIDAndTerminalID($accountTypeID, $terminalID); //AID of Virtual Cashier\n } else {\n $transMsg = 'Terminal does not exist.';\n $errorCode = 3;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n $this->_sendResponse(200, CJSON::encode(CommonController::StackerRetMsg($module, $transMsg, $errorCode)));\n exit;\n }\n\n if (isset($request['MembershipCardNumber']) && ctype_alnum($request['MembershipCardNumber'])) {\n $cardNumber = trim($request['MembershipCardNumber']);\n $MID = $_memberCardsModel->getMIDByCardNumber($cardNumber);\n if (!empty($MID)) { //If membership card number is existing\n if ($isEGMSessionExists > 0) { //If Terminal has an EGM session\n $isTerminalMIDMatched = $_EGMSessions->isTerminalMIDMatched($terminalID, $MID);\n if ((int) $isTerminalMIDMatched > 0) {\n $isTerminalStackerBatchIDMatched = $_EGMSessions->isTerminalStackerBatchIDMatched($terminalID, $stackerBatchID);\n if ($isTerminalStackerBatchIDMatched > 0) {\n if ($paymentType == CommonController::PAYMENT_TYPE_CASH) { //If payment type is cash\n $voucherCode = '';\n $stackerSessionDetails = $_stackerSessionsModels->getStackerSessionDetails($stackerSessionID);\n $cashAmount = (int) $stackerSessionDetails['CashAmount'] + $amount;\n $ticketCount = (int) $stackerSessionDetails['TicketCount'];\n $cashCount = (int) $stackerSessionDetails['CashCount'] + 1;\n $quantity = (int) $stackerSessionDetails['Quantity'] + 1;\n $totalAmount = (int) $stackerSessionDetails['TotalAmount'] + $amount;\n\n $denominationID = (int) $_refCashDenominationModel->getDenominationIDByAmount($amount);\n //If cash or bill denomination was found and status is active in ref_cashdenomination\n if (!empty($denominationID)) {\n $denominationCountDetails = $_stackerSessionCashDenomModel->getDenomCountBySessionIDAndDenomID($stackerSessionID, $denominationID);\n $denominationExists = $_stackerSessionCashDenomModel->isDenominationExists($stackerSessionID, $denominationID);\n\n if ($denominationExists > 0) {\n //If denomination is already existing in stackercashdenomination, we only need to update the table with denominationcount plus one\n $denomination = (int) $denominationCountDetails;\n $denominationCount = $denomination + 1;\n $returnValue = $_stackerSessionsModels->updateStackerSessionsDataCashDenom($cashCount, $ticketCount, $quantity, $cashAmount, $totalAmount, $stackerSessionID, $denominationID, $denominationCount, $stackerBatchID, $amount, $transType, $paymentType, $voucherCode, $trackingID, $finalTotalDeposit, $finalTotalReload, $AID);\n } else {\n //If denomination is non-existent in stackercashdenomination, we need to insert to the table with denominationcount of one\n $denominationCount = 1;\n $returnValue = $_stackerSessionsModels->updateStackerSessionsInsertDataCashDenom($cashCount, $ticketCount, $quantity, $cashAmount, $totalAmount, $stackerSessionID, $denominationID, $denominationCount, $stackerBatchID, $amount, $transType, $paymentType, $voucherCode, $trackingID, $finalTotalDeposit, $finalTotalReload, $AID);\n }\n $apiTransdetails = 'TransType = ' . $transType . ', Amount = ' . $amount . ', TID = ' . $terminalID . ', CashType = ' . $paymentType . ', TicketCode = \"\", SBatchID = ' . $stackerBatchID . ', MID = ' . $MID;\n $logID = $this->_insertIntoAPILogs($APIMethodID, $apiTransdetails, $trackingID);\n if ($returnValue > 0) {\n $transMsg = 'Transaction successful';\n $errorCode = 0;\n $apiStatus = 1;\n } else {\n $transMsg = 'Transaction failed.';\n $errorCode = 5;\n $apiStatus = 2;\n $otherInfo = \"TerminalName: \" . $terminalName . \" | MID: \" . $MID . \" | TransType: \" . $transType . \" | CashType: \" . $paymentType . \" | TicketCode: | Amount: \" . $amount . \"|\";\n Utilities::errorLogger($transMsg, $module, $otherInfo);\n }\n $referenceID = $stackerBatchID;\n $this->_updateAPILogs($APIMethodID, $logID, $apiStatus, $referenceID);\n } else {\n $transMsg = 'Cash denomination amount is invalid.';\n $errorCode = 31;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n }\n \n } else if ($paymentType == CommonController::PAYMENT_TYPE_TICKET) { //If payment type is ticket\n if (isset($request['VoucherTicketBarcode'])) {\n if (ctype_alnum($request['VoucherTicketBarcode'])) {\n $voucherCode = trim($request['VoucherTicketBarcode']);\n $ticketsModel = new TicketsModel();\n $ticketAmountData = $ticketsModel->getAmountByTicketCode($voucherCode);\n\n $compareAmount1 = (int) $amount;\n $compareAmount2 = (int) $ticketAmountData;\n\n if ($compareAmount1 == $compareAmount2) {\n //Verify first if the Ticket is valid before using it. Call VerifyTicket of VAPI (API of Voucher Management System)\n $verifyVoucherResult = $voucherticket->verifyTicket($voucherCode, $terminalName, $AID, $source, $cardNumber);\n //If VerifyTicket returns no error, retry using the ticket by calling again the UseTicket of VAPI (API of Voucher Management System)\n if (isset($verifyVoucherResult['VerifyTicket']['ErrorCode']) && $verifyVoucherResult['VerifyTicket']['ErrorCode'] == 0) {\n //Call UseTicket of VAPI (API of Voucher Management System)\n $useVoucherResult = $voucherticket->useTicket($terminalName, $voucherCode, $AID, $source, $trackingID, $cardNumber, $amount);\n\n //If UseTicket returns no error\n if (isset($useVoucherResult['UseTicket']['ErrorCode']) && $useVoucherResult['UseTicket']['ErrorCode'] == 0) {\n\n $stackerSessionID = (int) $stackerSessionID;\n $stackerSessionDetails = $_stackerSessionsModels->getStackerSessionDetails($stackerSessionID);\n\n $cashAmount = (int) $stackerSessionDetails['CashAmount'];\n $ticketCount = (int) $stackerSessionDetails['TicketCount'] + 1;\n $cashCount = (int) $stackerSessionDetails['CashCount'];\n $quantity = (int) $stackerSessionDetails['Quantity'] + 1;\n $totalAmount = (int) $stackerSessionDetails['TotalAmount'] + $amount;\n $apiTransdetails = 'TransType = ' . $transType . ', Amount = ' . $amount . ', TID = ' . $terminalID . ', CashType = ' . $paymentType . ', TicketCode = ' . $voucherCode . ', SBatchID = ' . $stackerBatchID . ', MID = ' . $MID;\n $logID = $this->_insertIntoAPILogs($APIMethodID, $apiTransdetails, $trackingID);\n $returnValue = $_stackerSessionsModels->updateStackerSessionsDetailsTickets($quantity, $amount, $totalAmount, $stackerSessionID, $transType, $paymentType, $voucherCode, $trackingID, $stackerBatchID, $finalTotalDeposit, $finalTotalReload, $AID, $ticketCount);\n if ($returnValue > 0) {\n $transMsg = 'Transaction successful.';\n $errorCode = 0;\n $apiStatus = 1;\n } else {\n $transMsg = 'Transaction failed.';\n $errorCode = 5;\n $apiStatus = 2;\n $otherInfo = \"TerminalName: \" . $terminalName . \" | MID: \" . $MID . \" | TransType: \" . $transType . \" | CashType: \" . $paymentType . \" | TicketCode: \" . $voucherCode . \" | Amount: \" . $amount . \"|\";\n Utilities::errorLogger($transMsg, $module, $otherInfo);\n }\n $referenceID = $stackerBatchID;\n $this->_updateAPILogs($APIMethodID, $logID, $apiStatus, $referenceID);\n } else {\n //If UseTicket returns an error, retry using the ticket by calling first the VerifyTicket of VAPI (API of Voucher Management System)\n $verifyVoucherResult = $voucherticket->verifyTicket($voucherCode, $terminalName, $AID, $source, $cardNumber);\n //If VerifyTicket returns no error, retry using the ticket by calling again the UseTicket of VAPI (API of Voucher Management System)\n if (isset($verifyVoucherResult['VerifyTicket']['ErrorCode']) && $verifyVoucherResult['VerifyTicket']['ErrorCode'] == 0) {\n $useVoucherResult = $voucherticket->useTicket($terminalName, $voucherCode, $AID, $source, $trackingID, $cardNumber, $amount);\n\n //If UseTicket returns no error, finally, we need to update the necessary tables to be updated\n if (isset($useVoucherResult['UseTicket']['ErrorCode']) && $useVoucherResult['UseTicket']['ErrorCode'] == 0) {\n $stackerSessionID = (int) $stackerSessionID;\n $stackerSessionDetails = $_stackerSessionsModels->getStackerSessionDetails($stackerSessionID);\n $cashAmount = (int) $stackerSessionDetails['CashAmount'];\n $ticketCount = (int) $stackerSessionDetails['TicketCount'] + 1;\n $cashCount = (int) $stackerSessionDetails['CashCount'];\n $quantity = (int) $stackerSessionDetails['Quantity'] + 1;\n $totalAmount = (int) $stackerSessionDetails['TotalAmount'] + $amount;\n $ticketCode = $voucherCode;\n $apiTransdetails = 'TransType = ' . $transType . ', Amount = ' . $amount . ', TID = ' . $terminalID . ', CashType = ' . $paymentType . ', TicketCode = ' . $ticketCode . ', SBatchID = ' . $stackerBatchID . ', MID = ' . $MID;\n $logID = $this->_insertIntoAPILogs($APIMethodID, $apiTransdetails, $trackingID);\n $returnValue = $_stackerSessionsModels->updateStackerSessionsDetails($quantity, $amount, $totalAmount, $stackerSessionID, $transType, $paymentType, $voucherCode, $trackingID, $stackerBatchID, $finalTotalDeposit, $finalTotalReload, $AID);\n if ($returnValue > 0) {\n $transMsg = 'Transaction successful.';\n $errorCode = 0;\n $apiStatus = 1;\n } else {\n $transMsg = 'Transaction failed.';\n $errorCode = 5;\n $apiStatus = 2;\n $otherInfo = \"TerminalName: \" . $terminalName . \" | MID: \" . $MID . \" | TransType: \" . $transType . \" | CashType: \" . $paymentType . \" | TicketCode: \" . $voucherCode . \" | Amount: \" . $amount . \"|\";\n Utilities::errorLogger($transMsg, $module, $otherInfo);\n }\n $referenceID = $stackerBatchID;\n $this->_updateAPILogs($APIMethodID, $logID, $apiStatus, $referenceID);\n } else {\n $transMsg = $useVoucherResult['UseTicket']['TransactionMessage'];\n $errorCode = $useVoucherResult['UseTicket']['ErrorCode'];\n $otherInfo = \"TerminalName: \" . $terminalName . \" | MID: \" . $MID . \" | TransType: \" . $transType . \" | CashType: \" . $paymentType . \" | TicketCode: \" . $voucherCode . \" | Amount: \" . $amount . \"|\";\n Utilities::errorLogger($transMsg, $module, $otherInfo);\n }\n } else {\n $transMsg = $verifyVoucherResult['VerifyTicket']['TransactionMessage'];\n $errorCode = $verifyVoucherResult['VerifyTicket']['ErrorCode'];\n $otherInfo = \"TerminalName: \" . $terminalName . \" | MID: \" . $MID . \" | TransType: \" . $transType . \" | CashType: \" . $paymentType . \" | TicketCode: \" . $voucherCode . \" | Amount: \" . $amount . \"|\";\n Utilities::errorLogger($transMsg, $module, $otherInfo);\n }\n }\n } else {\n $transMsg = $verifyVoucherResult['VerifyTicket']['TransactionMessage'];\n $errorCode = $verifyVoucherResult['VerifyTicket']['ErrorCode'];\n $otherInfo = \"TerminalName: \" . $terminalName . \" | MID: \" . $MID . \" | TransType: \" . $transType . \" | CashType: \" . $paymentType . \" | TicketCode: \" . $voucherCode . \" | Amount: \" . $amount . \"|\";\n Utilities::errorLogger($transMsg, $module, $otherInfo);\n }\n } else {\n $transMsg = 'Amount should be equal to Ticket Amount.';\n $errorCode = 34;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n }\n } else {\n $transMsg = 'Invalid Voucher Code.';\n $errorCode = 45;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n }\n } else {\n $transMsg = 'Voucher Code is required.';\n $errorCode = 11;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n }\n } else {\n $transMsg = 'Invalid Payment Type.';\n $errorCode = 28;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n }\n } else {\n $transMsg = 'Terminal and StackerBatchID does not match in EGM session.';\n $errorCode = 44;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n }\n } else {\n $transMsg = 'Terminal and CardNumber does not match in EGM Session.';\n $errorCode = 33;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n }\n } else {\n $transMsg = 'Terminal has no active EGM session.';\n $errorCode = 25;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n }\n } else {\n $transMsg = 'Invalid Card Number.';\n $errorCode = 7;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n }\n } else {\n $transMsg = 'Card Number is required.';\n $errorCode = 30;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n }\n } else {\n $transMsg = 'Invalid Transaction Type.';\n $errorCode = 27;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n }\n } else {\n $transMsg = 'Terminal has no active stacker session.';\n $errorCode = 6;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n }\n } else {\n $transMsg = 'Terminal does not exist.';\n $errorCode = 3;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n }\n } else {\n $transMsg = 'Stacker Batch ID does not exist.';\n $errorCode = 22;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n }\n } else {\n $transMsg = 'Invalid Source.';\n $errorCode = 29;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n }\n } else {\n $transMsg = 'Tracking ID already exists.';\n $errorCode = 24;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n }\n } else {\n $transMsg = 'Amount must be greater than or equal to .' . $allowedAmount;\n $errorCode = 4;\n Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n }\n// }else\n// {\n// // ******************* DISABLE Genesis Reload *********************//\n// $transMsg = 'Reload using genesis terminal is temporarily disabled Please Use Cashier Load tab';\n// $errorCode = 29;\n// $module = 'LogStackerTransaction';\n// Utilities::log(\"Error Message: \" . $transMsg . \" ErrorCode: \" . $errorCode);\n// $this->_sendResponse(200, CJSON::encode(CommonController::StackerRetMsg($module, $transMsg, $errorCode)));\n// exit;\n// }\n } else {\n $transMsg = 'Invalid input parameter.';\n $errorCode = 2;\n }\n }\n } else {\n $transMsg = 'One or more fields is not set or is blank.';\n $errorCode = 1;\n }\n $this->_sendResponse(200, CJSON::encode(CommonController::StackerRetMsg($module, $transMsg, $errorCode, \"\", \"\", \"\", \"\", $stackerBatchID)));\n }", "title": "" }, { "docid": "375293fd4f0b88f91f992bcdee39895a", "score": "0.4181684", "text": "function getServicesStateNbr()\n{\n\t$sockets = getEonConfig(\"sockets\",\"array\");\n\n\t$result = array();\n\t$nbr_services_pending = 0;\n\t$nbr_services_ok = 0;\n\t$nbr_services_warning = 0;\n\t$nbr_services_critical = 0;\n\t$nbr_services_unknown = 0;\n\n\tforeach($sockets as $socket){\n\t\t$socket_parts = explode(\":\", $socket);\n\t\t$socket_type = $socket_parts[0];\n\t\t$socket_address = $socket_parts[1];\n\t\t$socket_port = $socket_parts[2];\n\t\t$socket_path = $socket_parts[3];\n\t\t\n\t\t// check if socket disabled\n\t\tif(isset($socket_parts[4])) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// check if socket is up\n\t\tif( checkHost($socket_type, $socket_address, $socket_port, $socket_path) ){\n\t\t\tif($socket_port == -1){\n\t\t\t\t$socket_port = \"\";\n\t\t\t\t$socket_address = \"\";\n\t\t\t}\n\t\t\t$options = array(\n\t\t\t\t'socketType' => $socket_type,\n\t\t\t\t'socketAddress' => $socket_address,\n\t\t\t\t'socketPort' => $socket_port,\n\t\t\t\t'socketPath' => $socket_path,\n\t\t\t);\n\t\t\t\n\t\t\t// construct mklivestatus request, and get the response\n\t\t\t$client = new Client($options);\n\n\t\t\t// get all service PENDING\n\t\t\t$nbr_pending = $client\n\t\t\t\t->get('services')\n\t\t\t\t->stat('has_been_checked = 0')\n\t\t\t\t->filter('host_contacts >= '. $_SERVER[\"REMOTE_USER\"])\n\t\t\t\t->execute();\n\n\t\t\t// construct mklivestatus request, and get the response\n\t\t\t$response = $client\n\t\t\t\t->get('services')\n\t\t\t\t->stat('state = 0')\n\t\t\t\t->stat('state = 1')\n\t\t\t\t->stat('state = 2')\n\t\t\t\t->stat('state = 3')\n\t\t\t\t->filter('has_been_checked = 1')\n\t\t\t\t->filter('host_contacts >= '. $_SERVER[\"REMOTE_USER\"])\n\t\t\t\t->execute();\n\n\t\t\t$nbr_services_pending += $nbr_pending[0][0];\n\t\t\t$nbr_services_ok += $response[0][0];\n\t\t\t$nbr_services_warning += $response[0][1];\n\t\t\t$nbr_services_critical += $response[0][2];\n\t\t\t$nbr_services_unknown += $response[0][3];\n\t\t}\n\t}\n\n\t// fill an empty array with previous response, in order to have a beautiful JSON to use\n\tarray_push($result, $nbr_services_pending);\n\tarray_push($result, $nbr_services_ok);\n\tarray_push($result, $nbr_services_warning);\n\tarray_push($result, $nbr_services_critical);\n\tarray_push($result, $nbr_services_unknown);\n\t\n\t// response for the Ajax call\n\techo json_encode($result);\n}", "title": "" }, { "docid": "cb58c7cfb0c4d6e7a1c147cd6b89563c", "score": "0.41764817", "text": "public function updateProductStockStatuses($command);", "title": "" }, { "docid": "8c148453abefa5f9b409b91557befe8b", "score": "0.41762093", "text": "private function setArrShiftStatus()\n {\n foreach ($this->config_handler->arrayShiftsByPart as $shiftPart => $arrShifts) {\n foreach ($arrShifts as $shift) {\n $this->arrShiftStatus[$shift] = new ShiftStatus($this->date, $shift, $shiftPart, $this->config_handler);\n }\n }\n }", "title": "" }, { "docid": "dea6b79c66ece236158955fada334f88", "score": "0.41748798", "text": "public function processStatusEvent()\n {\n try {\n $params = $this->_validateEventData();\n $msg = '';\n switch($params['status']) {\n case self::PAYNOVA_STATUS_FAIL: //fail\n $msg = Mage::helper('paynovapayment')->__('Payment failed.');\n $this->_processCancel($msg);\n break;\n case self::PAYNOVA_STATUS_CANCEL: //cancel\n $msg = Mage::helper('paynovapayment')->__('Payment was canceled.');\n $this->_processCancel($msg);\n break;\n case self::PAYNOVA_STATUS_PENDING: //pending\n $msg = Mage::helper('paynovapayment')->__('Pending bank transfer created.');\n $this->_processSale($params['status'], $msg);\n break;\n case self::PAYNOVA_STATUS_SUCCESS: //ok\n $msg = Mage::helper('paynovapayment')->__('The amount has been authorized and captured by Paynova.');\n $this->_processSale($params['status'], $msg);\n break;\n case self::PAYNOVA_STATUS_APPROVED: //ok\n $msg = Mage::helper('paynovapayment')->__('The amount has been authorized and captured by Paynova.');\n $this->_processSale($params['status'], $msg);\n break;\n }\n return $msg;\n } catch (Mage_Core_Exception $e) {\n return $e->getMessage();\n } catch(Exception $e) {\n Mage::logException($e);\n }\n return;\n }", "title": "" }, { "docid": "425d158f7b28f802cf4cc2645e3e1875", "score": "0.4174706", "text": "public static function status($status)\n {\n }", "title": "" }, { "docid": "647ef67d8ee24dc8795894f83fd03373", "score": "0.4172504", "text": "function journal()\n {\n\n \t //Opening Port...\n\t $this->_open_port('COM8');\n //Setting DTR to False\n ser_setDTR(False);\n \n //Waiting for 1 second...\n sleep(1);\n \n //Checking the serial Numbers of the SDC \n\n $string=substr($this->_string_to_hex(), 1);\n \n $string_array=explode(' ', '01 25 24 EE 42 05 30 31 37 3E 03');\n $bytes=\" \";\n //write the first bit\n foreach ($string_array as $string_hex=>$value)\n {\n \t $bytes=\" \".(('0x'.$value+128) % 256) - 128;\n \t ser_writebyte(\"$bytes\\r\\n\");\n }\n \n sleep(1);\n \n //Send request to the SDC asking the response \n $str = ser_read();\n\n //Displaying the Response\n echo $str;\n \n //Closing the response\n ser_close();\n }", "title": "" }, { "docid": "f21252f68fa7110abc128df6d14d1b1f", "score": "0.41670483", "text": "protected function createStatus(Github $gitHub, TrackerProject $project, $issueNumber, Status $status, $sha = '')\n\t{\n\t\tif (!$sha)\n\t\t{\n\t\t\t// Get the SHA of the last commit.\n\t\t\t$pullRequest = $gitHub->pulls->get(\n\t\t\t\t$project->gh_user, $project->gh_project, $issueNumber\n\t\t\t);\n\n\t\t\t$sha = $pullRequest->head->sha;\n\t\t}\n\n\t\treturn $gitHub->repositories->statuses->create(\n\t\t\t$project->gh_user, $project->gh_project, $sha,\n\t\t\t$status->state, $status->targetUrl, $status->description, $status->context\n\t\t);\n\t}", "title": "" }, { "docid": "352afc6eef389074dcfeaa6a704bc56f", "score": "0.41625264", "text": "public function run()\n\t{\n\t\tStatus::Create([\n 'user_id' => User::where('username', 'test1')->first()->id,\n 'message' => 'First status message'\n ]);\n Status::Create([\n 'user_id' => User::where('username', 'test1')->first()->id,\n 'message' => 'Second status message'\n ]);\n Status::Create([\n 'user_id' => User::where('username', 'test2')->first()->id,\n 'message' => 'Third status message - from other user'\n ]);\n }", "title": "" }, { "docid": "a573d9a58cd3a9e2855a96b79351a2ac", "score": "0.41591147", "text": "public function register_shipwire_order_status_taxonomy() {\n\n\t\tregister_taxonomy( 'shipwire_order_status', array( 'shop_order' ),\n\t\t\tarray(\n\t\t\t\t'hierarchical' => false,\n\t\t\t\t'update_count_callback' => '_update_generic_term_count',\n\t\t\t\t'show_ui' => false,\n\t\t\t\t'show_in_nav_menus' => false,\n\t\t\t\t'query_var' => ( is_admin() ),\n\t\t\t\t'rewrite' => false,\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "a1d886faf8a13434663dd5c2edf7e519", "score": "0.4158963", "text": "public function addDefault()\n {\n if (Input::get('act') != '' || OrderStatus::countAll() > 0) {\n return;\n }\n\n $arrStatus = array(\n array(\n 'name' => 'Pending',\n 'welcomescreen' => '1',\n ),\n array(\n 'name' => 'Processing',\n ),\n array(\n 'name' => 'Complete',\n 'paid' => '1',\n ),\n array(\n 'name' => 'On Hold',\n ),\n array(\n 'name' => 'Cancelled',\n )\n );\n\n $sorting = 0;\n\n foreach ($arrStatus as $arrData) {\n $objStatus = new OrderStatus();\n $objStatus->setRow($arrData);\n $objStatus->sorting = $sorting;\n $objStatus->save();\n\n $sorting += 128;\n }\n }", "title": "" }, { "docid": "b7fa3c492f7f1d054b745243af0094a2", "score": "0.41577792", "text": "abstract protected function insert_interface_flex_ria($batch_id, $status, $dto_obj);", "title": "" }, { "docid": "07093e55d489ba443f5944086da67ec6", "score": "0.41496935", "text": "function getNewStatus ($method) {\n\n\t\tif (isset($method->status_pending) and $method->status_pending!=\"\") {\n\t\t\treturn $method->status_pending;\n\t\t} else {\n\t\t\treturn 'P';\n\t\t}\n\t}", "title": "" }, { "docid": "73810ff4776bb15bff33c8a22581e11f", "score": "0.41490915", "text": "public function add_new_subscription_statuses($subscription_statuses)\n {\n $subscription_statuses['wc-like-on-hold'] = _x('Falla pago inicial', 'Subscription status', 'custom-wcs-status-texts');\n $subscription_statuses['wc-late-payment'] = _x('Pago Demorado', 'Subscription status', 'custom-wcs-status-texts');\n $subscription_statuses['wc-late-payment-30'] = _x('Pago Demorado 30', 'Subscription status', 'custom-wcs-status-texts');\n $subscription_statuses['wc-late-payment-60'] = _x('Pago Demorado 60', 'Subscription status', 'custom-wcs-status-texts');\n $subscription_statuses['wc-late-payment-90'] = _x('Pago Demorado 90', 'Subscription status', 'custom-wcs-status-texts');\n $subscription_statuses['wc-late-payment-120'] = _x('Pago Demorado 120', 'Subscription status', 'custom-wcs-status-texts');\n $subscription_statuses['wc-late-payment-150'] = _x('Pago Demorado 150', 'Subscription status', 'custom-wcs-status-texts');\n $subscription_statuses['wc-late-payment-180'] = _x('Pago Demorado 180', 'Subscription status', 'custom-wcs-status-texts');\n $subscription_statuses['wc-fraud'] = _x('Fraude', 'Subscription status', 'custom-wcs-status-texts');\n $subscription_statuses['wc-bad-payment'] = _x('No Pago', 'Subscription status', 'custom-wcs-status-texts');\n $subscription_statuses['wc-expired-offer'] = _x('Finalizado Oferta Aceptada', 'Subscription status', 'custom-wcs-status-texts');\n return $subscription_statuses;\n }", "title": "" }, { "docid": "d809cd028a9e15253f9152f7939951ed", "score": "0.41441017", "text": "protected function statusUpdated() {\n\t}", "title": "" }, { "docid": "dd98944b36737706fe55d7a4571288f2", "score": "0.41438046", "text": "public function run()\n {\n $status = [\n [\n 'status' => 'Neu',\n 'color' => '#ffffff'\n ],\n [\n 'status' => 'Telefontermin Calendly',\n 'color' => '#0000ff'\n ],\n [\n 'status' => 'Telefontermin proDERM',\n 'color' => '#0000ff'\n ],\n [\n 'status' => 'Termin Neuaufnahme',\n 'color' => '#0000ff'\n ],\n [\n 'status' => 'Tel. nicht erreicht',\n 'color' => '#ffff00'\n ],\n [\n 'status' => 'Auf AB gesprochen',\n 'color' => '#ffff00'\n ],\n [\n 'status' => 'Email geschickt',\n 'color' => '#ffff00'\n ],\n [\n 'status' => 'No Response',\n 'color' => '#ffa500'\n ],\n [\n 'status' => 'Nicht erschienen',\n 'color' => '#ffa500'\n ],\n [\n 'status' => 'Kein Interesse',\n 'color' => '#ff0000'\n ],\n [\n 'status' => 'Nicht geeignet',\n 'color' => '#ff0000'\n ],\n [\n 'status' => 'Wiedervorlage',\n 'color' => '#ffff00'\n ],\n [\n 'status' => 'Sonstiges',\n 'color' => '#ffff00'\n ],\n [\n 'status' => 'Aufgenommen',\n 'color' => '#188038'\n ]\n ];\n\n foreach ($status as $item) {\n DB::table('statuses')->insert([\n 'name' => $item['status'],\n 'color' => $item['color']\n ]);\n }\n }", "title": "" }, { "docid": "65df4aa5012b250d0c91c11017c63262", "score": "0.41406757", "text": "public function run()\n {\n $statuses = [\n [\n 'name' => 'Successful',\n 'slug' => 'successful'\n ],\n [\n 'name' => 'Failed',\n 'slug' => 'failed'\n ],\n [\n 'name' => 'Pending',\n 'slug' => 'pending'\n ],\n [\n 'name' => 'Refunded',\n 'slug' => 'refunded'\n ],\n [\n 'name' => 'Cancelled',\n 'slug' => 'cancelled'\n ],\n [\n 'name' => 'Other',\n 'slug' => 'other'\n ],\n ];\n\n DB::table('transaction_statuses')->insert($statuses);\n }", "title": "" }, { "docid": "ec296b08ac30f1686d855e881e756749", "score": "0.41335127", "text": "function setStatCode($status);", "title": "" }, { "docid": "b35fa9c32637d6f420db9e6c50a5ea1e", "score": "0.4125759", "text": "public function status()\r\n {\r\n if (!is_admin()) {\r\n access_denied('Ticket Statuses');\r\n }\r\n if ($this->input->post()) {\r\n if (!$this->input->post('id')) {\r\n $id = $this->tickets_model->add_ticket_status($this->input->post());\r\n if ($id) {\r\n set_alert('success', _l('added_successfuly', _l('ticket_status')));\r\n }\r\n } else {\r\n $data = $this->input->post();\r\n $id = $data['id'];\r\n unset($data['id']);\r\n $success = $this->tickets_model->update_ticket_status($data, $id);\r\n if ($success) {\r\n set_alert('success', _l('updated_successfuly', _l('ticket_status')));\r\n }\r\n }\r\n die;\r\n }\r\n }", "title": "" }, { "docid": "24967805d269686d550a72cc0d74f7fc", "score": "0.41191715", "text": "private function postProcessStatusArray(array $statusArray, Logger $logger)\n\t{\n\t\t$session = Session::getInstance();\n\t\t$configuration = Configuration::getInstance();\n\t\t$scanID = $session->get('scanID');\n\t\t$scanRecord = $this->tmpInstance()->findOrFail($scanID);\n\t\t$currentTime = new Date();\n\t\t$warnings = $logger->getAndResetWarnings();\n\n\t\t// Apply common updates to the backup record\n\t\t$scanRecord->bind([\n\t\t\t'totalfiles' => $session->get('scannedFiles'),\n\t\t\t'scanend' => $currentTime->toSql(),\n\t\t]);\n\n\t\t// More work to do\n\t\tif ($statusArray['HasRun'] && (empty($statusArray['Error'])))\n\t\t{\n\t\t\t$logger->debug('** More work necessary. Will resume in the next step.');\n\n\t\t\t$scanRecord->save([\n\t\t\t\t'status' => 'run',\n\t\t\t]);\n\n\t\t\t// Still have work to do\n\t\t\treturn [\n\t\t\t\t'status' => true,\n\t\t\t\t'done' => false,\n\t\t\t\t'error' => '',\n\t\t\t\t'warnings' => $warnings,\n\t\t\t];\n\t\t}\n\n\t\t// An error occurred\n\t\tif (!empty($statusArray['Error']))\n\t\t{\n\t\t\t$logger->debug('** An error occurred. The scan has died.');\n\n\t\t\t$scanRecord->save([\n\t\t\t\t'status' => 'fail',\n\t\t\t]);\n\t\t\t$session->reset();\n\n\t\t\treturn [\n\t\t\t\t'status' => false,\n\t\t\t\t'done' => true,\n\t\t\t\t'error' => $statusArray['Error'],\n\t\t\t\t'warnings' => $warnings,\n\t\t\t];\n\t\t}\n\n\t\t// Just finished\n\t\t// -- Send emails, if necessary\n\t\tif ($scanRecord->origin != 'backend')\n\t\t{\n\t\t\t$logger->debug('Finished scanning. Evaluating whether to send email with scan results.');\n\t\t\t$email = new Email($configuration, $session, $logger);\n\t\t\t$email->sendEmail();\n\t\t}\n\n\t\t$logger->debug('** This scan is now finished.');\n\t\t$scanRecord->save([\n\t\t\t'status' => 'complete',\n\t\t]);\n\t\t$session->reset();\n\n\t\treturn [\n\t\t\t'status' => true,\n\t\t\t'done' => true,\n\t\t\t'error' => '',\n\t\t\t'warnings' => $warnings,\n\t\t];\n\t}", "title": "" }, { "docid": "e97e429cc5ae53c1a9a147ebe60f987f", "score": "0.41171563", "text": "public function run()\n {\n\n $branch = ['MAIN', 'CEB', 'ILO', 'MEY', 'BIC', 'ZAM', 'GEN', 'DVO', 'BTN'];\n\n $counter = [\n [\n 'cnt' => 3,\n 'type' => 'RO001',\n 'signatories' => 'Checked By',\n 'signee' => 'Admin 2',\n 'designation' => 'Administrator',\n 'lookupcode' => 'R003',\n ], [\n 'cnt' => 2,\n 'type' => 'DL001',\n 'signatories' => 'Checked By',\n 'signee' => 'Admin 2',\n 'designation' => 'Administrator',\n 'lookupcode' => 'R003',\n ], [\n 'cnt' => 2,\n 'type' => 'RR001',\n 'signatories' => 'Checked By',\n 'signee' => 'Admin 2',\n 'designation' => 'Administrator',\n 'lookupcode' => 'R003',\n ], [\n 'cnt' => 2,\n 'type' => 'RM001',\n 'signatories' => 'Checked By',\n 'signee' => 'Admin 2',\n 'designation' => 'Administrator',\n 'lookupcode' => 'R003',\n ], [\n 'cnt' => 2,\n 'type' => 'RJ001',\n 'signatories' => 'Checked By',\n 'signee' => 'Admin 2',\n 'designation' => 'Administrator',\n 'lookupcode' => 'R003',\n ], [\n 'cnt' => 2,\n 'type' => 'AD001',\n 'signatories' => 'Checked By',\n 'signee' => 'Admin 2',\n 'designation' => 'Administrator',\n 'lookupcode' => 'R003',\n ], [\n 'cnt' => 1,\n 'type' => 'SH001',\n 'signatories' => 'Checked By',\n 'signee' => 'Kreus Pagulayan',\n 'designation' => 'Log. Trans. Assistant',\n 'lookupcode' => 'R001',\n ], [\n 'cnt' => 1,\n 'type' => 'SH001',\n 'signatories' => 'Approved By',\n 'signee' => 'Candice Chung',\n 'designation' => 'President',\n 'lookupcode' => 'R001',\n ], [\n 'cnt' => 3,\n 'type' => 'PL001',\n 'signatories' => 'Checked By',\n 'signee' => 'Admin 2',\n 'designation' => 'Administrator',\n 'lookupcode' => 'R002',\n ],\n\n ];\n\n foreach ($branch as $value) {\n foreach ($counter as $value2) {\n for ($i = 0; $i < $value2['cnt']; $i++) {\n $data = [\n [\n 'type' => $value2['type'],\n 'branch' => $value,\n 'signatories' => $value2['signatories'],\n 'signee' => $value2['signee'],\n 'designation' => $value2['designation'],\n 'lookupcode' => $value2['lookupcode'],\n 'created_at' => now(),\n 'updated_at' => now(),\n ],\n ];\n\n Signatory::insert($data);\n }\n }\n }\n }", "title": "" }, { "docid": "2a392ec06702bc7d69b74e9c6aa924e3", "score": "0.41153756", "text": "function getStatus(){\n\t\t$qry=$this->db->get('statuses');\n\t\t$count=$qry->num_rows();\n\t\t\t$s= $qry->result_array();\n\t\t\n\t\t\tfor($i=0;$i<$count;$i++){\n\t\t\t\n\t\t\t$status[$s[$i]['id']]=$s[$i]['name'];\n\t\t\t}\n\t\t\treturn $status;\n\t}", "title": "" }, { "docid": "c163bc80d040a7b3d20f90ee87440000", "score": "0.41106436", "text": "public function run()\n {\n $status = new VSStatus();\n $status->title = 'Onay bekliyor.';\n $status->code = 1;\n $status->text = ':team onay bekliyor.';\n $status->save();\n\n $status = new VSStatus();\n $status->title = 'Davet edilen takım kabul etti.';\n $status->code = 2;\n $status->text = ':team kabul etti.';\n $status->save();\n\n $status = new VSStatus();\n $status->title = 'Davet edilen takım reddetti.';\n $status->code = 3;\n $status->text = ':team reddetti.';\n $status->save();\n\n $status = new VSStatus();\n $status->title = 'Davet eden takım kabul etti.';\n $status->code = 4;\n $status->text = ':team kabul etti.';\n $status->save();\n\n $status = new VSStatus();\n $status->title = 'Davet eden takım iptal etti.';\n $status->code = 5;\n $status->text = ':team iptal etti.';\n $status->save();\n }", "title": "" }, { "docid": "3155786691caa4dc5433ef904d0c8141", "score": "0.41102293", "text": "function status(){\r\n\t\t\r\n\t}", "title": "" }, { "docid": "570a25f0226bcdda9cb02fc921bc05a9", "score": "0.41082582", "text": "protected function ip6tablesStatus(): void\n {\n $data[] = [];\n\n $reflection = new ReflectionObject($this->shieldon);\n $t = $reflection->getProperty('properties');\n $t->setAccessible(true);\n $properties = $t->getValue($this->shieldon);\n\n $iptablesWatchingFolder = $properties['iptables_watching_folder'];\n\n // The iptables log files.\n $ipv6StatusFile = $iptablesWatchingFolder . '/ipv6_status.log';\n $ipv6Status = '';\n\n if (file_exists($ipv6StatusFile)) {\n $ipv6Status = file_get_contents($ipv6StatusFile);\n }\n\n $data['ipv6Status'] = $ipv6Status;\n\n $this->renderPage('panel/ip6tables_status', ['data' => $data]);\n }", "title": "" }, { "docid": "570a25f0226bcdda9cb02fc921bc05a9", "score": "0.41082582", "text": "protected function ip6tablesStatus(): void\n {\n $data[] = [];\n\n $reflection = new ReflectionObject($this->shieldon);\n $t = $reflection->getProperty('properties');\n $t->setAccessible(true);\n $properties = $t->getValue($this->shieldon);\n\n $iptablesWatchingFolder = $properties['iptables_watching_folder'];\n\n // The iptables log files.\n $ipv6StatusFile = $iptablesWatchingFolder . '/ipv6_status.log';\n $ipv6Status = '';\n\n if (file_exists($ipv6StatusFile)) {\n $ipv6Status = file_get_contents($ipv6StatusFile);\n }\n\n $data['ipv6Status'] = $ipv6Status;\n\n $this->renderPage('panel/ip6tables_status', ['data' => $data]);\n }", "title": "" }, { "docid": "d4e7659ef3480293a442007fbbd184aa", "score": "0.41033593", "text": "public function get_order_status()\n\t{\n\t\t$orders = [];\n\n\t\t// Send Request to get the html from the order's screen\n\t\t$request = $this->_http->get($this->_order_status_url, [ 'cookies' => true ]);\n\t\n\t\t// Prase Html\t\n\t\t$html = (string) $request->getBody();\t\t\n\t\t$dom = pQuery::parseStr($html);\n\t\t\n\t\t// Get the order table node.\n\t\t$nodes = $dom->query('#combinedOrderStatusTable tbody tr');\n\t\t\n\t\t// Loop through the table.\n\t\tforeach($nodes AS $key => $row)\n\t\t{\n\t\t\t$order = [];\n\t\t\t\n\t\t\tforeach($row->query('td') AS $key2 => $row2)\n\t\t\t{\n\t\t\t\t$order[] = $row2->text();\n\t\t\t}\n\t\t\t\n\t\t\t$orders[] = [\n\t\t\t\t'type' => $order[1],\n\t\t\t\t'action' => $order[2],\n\t\t\t\t'order_qty' => $order[3],\n\t\t\t\t'remaining_qty' => $order[4],\n\t\t\t\t'security' => $order[5],\n\t\t\t\t'ticker' => str_ireplace('...', '', $order[6]),\n\t\t\t\t'price' => $order[7],\n\t\t\t\t'time_in_force' => (isset($order[8])) ? $order[8] : '',\n\t\t\t\t'open_date_time' => (isset($order[10])) ? $order[10] : '',\n\t\t\t\t'status' => (isset($order[11])) ? $order[11] : '',\n\t\t\t\t'spread' => 0\n\t\t\t]; \n\t\t}\n\t\t\n\t\t// Clean up orders data.\n\t\tforeach($orders AS $key => $row)\n\t\t{\n\t\t\tif(empty($row['time_in_force']))\n\t\t\t{\n\t\t\t\t$orders[$key]['time_in_force'] = $orders[$key-1]['time_in_force'];\n\t\t\t\t$orders[$key]['spread'] = $key - 1;\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(empty($row['open_date_time']))\n\t\t\t{\n\t\t\t\t$orders[$key]['open_date_time'] = $orders[$key-1]['open_date_time'];\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(empty($row['status']))\n\t\t\t{\n\t\t\t\t$orders[$key]['status'] = $orders[$key-1]['status'];\t\t\t\n\t\t\t}\t\n\t\t\t\n\t\t\tif(empty($row['price']))\n\t\t\t{\n\t\t\t\t$orders[$key]['price'] = $orders[$key-1]['price'];\t\t\t\n\t\t\t}\t\t\t\t\t\t\t\t\t\n\t\t}\n\t\t\n\t\t// Return data.\n\t\treturn $orders;\n\t}", "title": "" }, { "docid": "50ed213907d60b1298e13e177c88a5e5", "score": "0.41003332", "text": "public function getDetailedSystemStatus() {}", "title": "" }, { "docid": "23c0884aca7c66e3a679570aaa61bba3", "score": "0.4100305", "text": "protected function getPlayerStatusAttributes($statusHeader) {\n $statusAttributes = array();\n foreach(preg_split(\"/\\s+/\", $statusHeader) as $attribute) {\n if($attribute == 'connected') {\n $statusAttributes[] = 'time';\n } else if($attribute == 'frag') {\n $statusAttributes[] = 'score';\n } else {\n $statusAttributes[] = $attribute;\n }\n }\n\n return $statusAttributes;\n }", "title": "" } ]
46c81470621a65c91d6b3a0c73ec7b9b
Operation shoeCustomerGroupProductAsync Show customer group product
[ { "docid": "db3930c0a20283cc000b7abb9fe47621", "score": "0.0", "text": "public function shoeCustomerGroupProductAsync($number, $product)\n {\n return $this->shoeCustomerGroupProductAsyncWithHttpInfo($number, $product)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" } ]
[ { "docid": "d1f2c023e4314e240ac385aae63ae66c", "score": "0.612698", "text": "function v2_getProductGroups() {\n\t$action = new ProductGroupsApiAction();\n\t$action->execute();\n}", "title": "" }, { "docid": "46b3754912366106b85292ce05605969", "score": "0.59037113", "text": "public function show(Group $group)\n {\n //\n }", "title": "" }, { "docid": "46b3754912366106b85292ce05605969", "score": "0.59037113", "text": "public function show(Group $group)\n {\n //\n }", "title": "" }, { "docid": "46b3754912366106b85292ce05605969", "score": "0.59037113", "text": "public function show(Group $group)\n {\n //\n }", "title": "" }, { "docid": "46b3754912366106b85292ce05605969", "score": "0.59037113", "text": "public function show(Group $group)\n {\n //\n }", "title": "" }, { "docid": "7c388d07e932d7be3a70484f82965c80", "score": "0.5841226", "text": "public function show(Product $product){\n \n }", "title": "" }, { "docid": "2211e9605a70024759bf4930575fee11", "score": "0.574583", "text": "public function show($product)\n {\n //\n }", "title": "" }, { "docid": "68b5d345e6745cf032a810fdb002c0da", "score": "0.5729277", "text": "public function show(Product $product) {\n //\n }", "title": "" }, { "docid": "68b5d345e6745cf032a810fdb002c0da", "score": "0.5729277", "text": "public function show(Product $product) {\n //\n }", "title": "" }, { "docid": "68b5d345e6745cf032a810fdb002c0da", "score": "0.5729277", "text": "public function show(Product $product) {\n //\n }", "title": "" }, { "docid": "5b9ba57fb824e31d7938fa093fb4e2e6", "score": "0.57012266", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "55ff8635624858ea7aeb3637a187e126", "score": "0.5700428", "text": "public function show(product $product)\n {\n //\n }", "title": "" }, { "docid": "55ff8635624858ea7aeb3637a187e126", "score": "0.5700428", "text": "public function show(product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5698396", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "7d15301a1a4aab51ab20a0ce3669a250", "score": "0.5677914", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "b06b34041ed4a5ab980dfae923b8dea0", "score": "0.5657079", "text": "public function show()\n {\n return view('product::show');\n }", "title": "" }, { "docid": "164cdbe78372d684beef454eeb714f6b", "score": "0.5642938", "text": "public function show()\r\n {\r\n return view('product::show');\r\n }", "title": "" }, { "docid": "073d9f81a65b8dc6abd0fd780051287a", "score": "0.5639708", "text": "public function showProducts(){\n\t\t\n\t\t\t$crud = new grocery_CRUD();\n\t\t\t$crud->set_table('productos');\n\t\t\t$crud->columns('nombre','codigo','descripcion','precio', 'cantidad_dispo');\n\t\t\t \n\t\t\t$output = $crud->render();\n\t\t\t \n\t\t\t$this->_example_output($output);\n\t\t\t\n\t}", "title": "" }, { "docid": "7840af238cc4868f478d926a00cf48ef", "score": "0.56347865", "text": "public function show(Product $product)\n {\n\n }", "title": "" }, { "docid": "7840af238cc4868f478d926a00cf48ef", "score": "0.56347865", "text": "public function show(Product $product)\n {\n\n }", "title": "" }, { "docid": "401ab74645c062df89b280e7b61899c0", "score": "0.5609668", "text": "public function index()\n {\n $slug = 'products';\n $groups = Group::orderBy('created_at', 'DESC')->paginate(50);\n return view('admin.groups.index', compact('slug', 'groups'));\n }", "title": "" }, { "docid": "61cb44a30cef67bd1c619b050148dd7d", "score": "0.56016165", "text": "public function show(Product $product)\n {\n //s\n }", "title": "" }, { "docid": "c13bd2841041d231e2a2151deba5010a", "score": "0.55949813", "text": "public function show(PurchaseOrderProduct $purchaseOrderProduct)\n {\n //\n }", "title": "" }, { "docid": "bef550287fc1a5f5a49d60ce3a216799", "score": "0.5581412", "text": "public function show(Product $product)\n {\n\n\n }", "title": "" }, { "docid": "7a3fa8df315a9d024f9ea7eb2f8e424c", "score": "0.55779856", "text": "public function show($product)\n {\n\n }", "title": "" }, { "docid": "7a3fa8df315a9d024f9ea7eb2f8e424c", "score": "0.55779856", "text": "public function show($product)\n {\n\n }", "title": "" }, { "docid": "a8ec0709188accbc61219f5839b565b0", "score": "0.55557525", "text": "public function actionIndex()\n {\n $searchModel = new ProductGroupSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "46a62c4db5d0a49aea176757c66b76c6", "score": "0.55377865", "text": "public function show(serviceProduct $serviceProduct)\n {\n //\n }", "title": "" }, { "docid": "d6f6f97185387ef2e9f4ef1aafe9fe9c", "score": "0.5527999", "text": "public function show(Group $group)\n {\n return $this->showOne(new GroupResource($group), 200);\n }", "title": "" }, { "docid": "946e24a52a40afa3eb0dd0bc8ec0bf79", "score": "0.55170435", "text": "public function showAccountCustomer()\n {\n // $productID = OrderProduct::whereIn('order_id', $orderID)->pluck('product_id');\n\n $orders = Order::with('products')->where('user_id', Auth::id())->orderBy('id','DESC')->get();\n // dump($orders->toArray());\n // dump($order->toArray());\n // dump($product->toArray());\n\n return view('customers.customer-infor', compact('orders'));\n }", "title": "" }, { "docid": "926bf1e10e165d906cefe7163d3c875e", "score": "0.5516612", "text": "public function show(Product $product){\n return response()->json([\n 'product' => $product,\n 'category_ids' => $product->category()->visible()->pluck('id'),\n ]);\n }", "title": "" }, { "docid": "5a153139f5475571933cc2122664ae78", "score": "0.54819226", "text": "public function show(ProductCategory $productCategory)\n {\n //\n }", "title": "" }, { "docid": "5a153139f5475571933cc2122664ae78", "score": "0.54819226", "text": "public function show(ProductCategory $productCategory)\n {\n //\n }", "title": "" }, { "docid": "583091b1d0f0fb710841f8d3f125e12b", "score": "0.5480195", "text": "public function index()\n {\n $userID = Auth::guard('marchant')->user()->id;\n $products = Product::with('brand', 'category', 'subCategory')->where('author_id', $userID)->get();\n\n return view('marchant.product.product', compact('products'));\n\n }", "title": "" }, { "docid": "5aa4af6e8b7a169ee26412ec0bb05ec9", "score": "0.5476994", "text": "public function show(Product $product)\n {\n \n return view('seller.products.show',['pp'=> $product]);\n }", "title": "" }, { "docid": "4431d03f6b509d22256042dbe93b1e22", "score": "0.5462732", "text": "function showProduct()\n {\n $data = Product::all();\n return view('productForm', ['product' => $data]);\n }", "title": "" }, { "docid": "a269fb547c51b489e82c451e64b01e41", "score": "0.5456471", "text": "public function show(Product $product)\n {\n //\n return $product->all();\n }", "title": "" }, { "docid": "260e2bf63d19dc07ca8e397e14c3b136", "score": "0.5451646", "text": "public function showProducts();", "title": "" }, { "docid": "1ea68bd47e840a0074973b39fa20417f", "score": "0.54174185", "text": "public function showAction(Group $group)\n {\n $deleteForm = $this->createDeleteForm($group);\n\n return $this->render('UniAccountBundle:Group:show.html.twig', array(\n 'group' => $group,\n 'deleteForm' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "f2d5550b924a6f75955949f0a3b7c9fa", "score": "0.54167956", "text": "public function show(PromotionProduct $promotionProduct)\n {\n //\n }", "title": "" }, { "docid": "ccce83d95616a4d0f1b352084ed99b8d", "score": "0.5400707", "text": "function displayProductForPurchase($productId){\r\n $this->getProduct($productId)->viewProduct();\r\n }", "title": "" }, { "docid": "5dfb6311fcf9eea7a506cf46c3e99d01", "score": "0.53882396", "text": "public function showAction(Product $product)\n {\n// die(var_dump($this->productService->getAttributesValues($product)));\n\n return $this->render('product/show.html.twig', array(\n 'data' => $this->productService->getAttributesValues($product),\n 'product' => $product,\n 'categoryName' => $product->getCategory(),\n 'categories' => $this->categoryService->getAllCategories(),\n 'isConsist' => in_array($product->getId(), $_SESSION['cart']),\n ));\n }", "title": "" }, { "docid": "89b60a13472e8f66da0dd90236d6a09b", "score": "0.53819346", "text": "public function getProductGroupView()\n {\n return $this->product_group_view;\n }", "title": "" }, { "docid": "0a7dedc542efea14cc78293f665294e1", "score": "0.537567", "text": "public function getProductByCategory(){\n $products = ProductIndexResource::collection(Product::withScopes($this->scopes())->paginate($this->paginate_number));\n if($products){\n return $this->returnData('products', $products);\n }\n }", "title": "" }, { "docid": "eec1ba2c6aa3778b75b52f4111cc952d", "score": "0.5373846", "text": "public function show(Product $product)\n {\n // Search record for id\n return $product;\n }", "title": "" }, { "docid": "da38b59bf90b2ac77f84f3dab68710d1", "score": "0.5359472", "text": "public function index()\n {\n //\t\t\n\t\t$data['records'] = \\App\\Models\\Customer_group::where('created_by', Auth::user()->id)->orderBy('customer_group_row_id', 'asc')->get();\n\t\treturn view('customer_group.customer_group_home', ['data'=>$data]);\n }", "title": "" }, { "docid": "6874a8cac52606b38e02bc484247b10f", "score": "0.5358084", "text": "public function getIdGroupProduct()\n {\n return $this->id_group_product;\n }", "title": "" }, { "docid": "d6bfb08994c1b4f45973d60240a50d9e", "score": "0.53567606", "text": "public function show(Group $group)\n\t{\n\t\t//$group = Group::findOrFail($id);\n\t\treturn view('group.show', compact('group'));\n\t}", "title": "" }, { "docid": "c48792dae3383f009b76a74961c5bb6d", "score": "0.5355702", "text": "public function show(Product $product)\n {\n return $product;\n }", "title": "" }, { "docid": "c48792dae3383f009b76a74961c5bb6d", "score": "0.5355702", "text": "public function show(Product $product)\n {\n return $product;\n }", "title": "" }, { "docid": "c48792dae3383f009b76a74961c5bb6d", "score": "0.5355702", "text": "public function show(Product $product)\n {\n return $product;\n }", "title": "" }, { "docid": "c48792dae3383f009b76a74961c5bb6d", "score": "0.5355702", "text": "public function show(Product $product)\n {\n return $product;\n }", "title": "" }, { "docid": "c48792dae3383f009b76a74961c5bb6d", "score": "0.5355702", "text": "public function show(Product $product)\n {\n return $product;\n }", "title": "" } ]
ecf9e0f95fc1d7e02442b5d424e40a04
/ valid de modification email
[ { "docid": "7fcbdf2e683a54a8bce396abc93bbb96", "score": "0.7560226", "text": "public function gestion_valid_email() {\n $uti = Utilisateur::get_by_pseudo($_SESSION['pseudo']);\n if (!isset($_SESSION['connect'])) {\n $content = \"<div class='warning'><p>Vous n'êtes pas connecté.</p></div>\";\n } else {\n if ($uti != null) {\n if (isset($_POST['submit'])) {\n $uti->set_email($_POST['email']);\n echo \"<div class='success'><p>Votre adresse mail a été modifié.</p></div>\";\n } else {\n $content = \"<div class='warning'><p>Formulaire non validé. Vous ne pouvez pas ajouter de point troc.</p></div>\";\n }\n } else {\n $content = \"<div class='warning'><p>Erreur lors de l'identification de votre compte.</p></div>\";\n }\n }\n }", "title": "" } ]
[ { "docid": "ecf3156e9b0dea2971be61a213baa443", "score": "0.7300102", "text": "public function modifierEmail()\n {\n $email = $_POST['email'];\n $email = strtolower(filter_var($email, FILTER_VALIDATE_EMAIL));\n\n if ($email === \"\") {\n $_SESSION['error_new_mail'] = \"\";\n\n header(\"Location:?ctrl=utilisateur&method=modifForm&id=\" . $_GET['id']);\n die;\n }\n\n $manager = new UtilisateurManager();\n\n // Si l'email existe déjà\n if ($manager->findByEmail($email)) {\n echo $_SESSION['email_exist'] = \"\";\n header(\"Location:?ctrl=utilisateur&method=editProfil&id=\" . $_GET['id']);\n die;\n } else {\n $manager->modifEmail($_GET['id'], $email);\n Session::setUser($_SESSION['user']->setEmail($email));\n header(\"Location:?ctrl=utilisateur&method=editProfil&id=\" . $_GET['id']);\n die;\n }\n }", "title": "" }, { "docid": "5c20d7f30c6728fa1d7b55b7bcb32eb0", "score": "0.6937916", "text": "public function emailTest ()\n {\n if (\n preg_match($this->rules['email']['mask'], $this->fields['email']) == 0\n || strlen($this->fields['email']) > $this->rules['email']['max']){\n $this->validationErrors[] = \"Incorrect email.\";\n }\n }", "title": "" }, { "docid": "90e15a921ad0f3e68ef1bfd369f7ea57", "score": "0.68563765", "text": "function emailIsValid($email,&$reason) {\r\n // ad-hoc seznam spolehlových domén pro zrychlení kontroly\r\n $spolehlive= array(\r\n 'proglas.cz','setkani.org', // kvůli lokální DNA v Proglasu\r\n 'volny.cz','seznam.cz','gmail.com','centrum.cz',\r\n 'email.cz','post.cz','quick.cz','tiscali.cz');\r\n $isValid= true;\r\n $reasons= array();\r\n $atIndex= strrpos($email, \"@\");\r\n if (is_bool($atIndex) && !$atIndex) {\r\n $isValid= false;\r\n $reasons[]= \"chybí @\";\r\n }\r\n else {\r\n $domain= substr($email, $atIndex+1);\r\n $local= substr($email, 0, $atIndex);\r\n $localLen= strlen($local);\r\n $domainLen= strlen($domain);\r\n if ($localLen < 1 || $localLen > 64) {\r\n $isValid= false;\r\n $reasons[]= \"dlouhé jméno\";\r\n }\r\n else if ($domainLen < 1) {\r\n $isValid= false;\r\n $reasons[]= \"chybí doména\";\r\n }\r\n else if ($domainLen > 255) {\r\n $isValid= false;\r\n $reasons[]= \"dlouhá doména\";\r\n }\r\n else if ($local[0] == '.' || $local[$localLen-1] == '.') {\r\n $reasons[]= \"tečka na kraji\";\r\n $isValid= false;\r\n }\r\n else if (preg_match('/\\\\.\\\\./', $local)) {\r\n $reasons[]= \"dvě tečky ve jménu\";\r\n $isValid= false;\r\n }\r\n else if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain)) {\r\n $reasons[]= \"chybný znak v doméně\";\r\n $isValid= false;\r\n }\r\n else if (preg_match('/\\\\.\\\\./', $domain)) {\r\n $reasons[]= \"dvě tečky v doméně\";\r\n $isValid= false;\r\n }\r\n else if (!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/', \r\n str_replace(\"\\\\\\\\\",\"\",$local))) {\r\n $reasons[]= \"chybný znak ve jménu\";\r\n if (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/',\r\n str_replace(\"\\\\\\\\\",\"\",$local))) {\r\n $isValid= false;\r\n }\r\n }\r\n if ( !in_array($domain,$spolehlive) ) {\r\n if ($isValid && !(checkdnsrr($domain,\"MX\") || checkdnsrr($domain,\"A\"))) {\r\n $reasons[]= \"$domain je neznámá doména\";\r\n $isValid= false;\r\n }\r\n }\r\n }\r\n $reason= count($reasons) ? implode(', ',$reasons) : '';\r\n return $isValid;\r\n}", "title": "" }, { "docid": "3f4753d6b1ff98d4978398f1ebc00849", "score": "0.6853778", "text": "public function validateEmail(){\n }", "title": "" }, { "docid": "3e083e3b73be8ee7d4dbdc0c9702e1c2", "score": "0.6829979", "text": "function validarEmail($cadena){\n try{\n $cadena= trim($cadena);\n if(strlen( $cadena)<=40){\n $pattern = \"/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/\";\n if (preg_match($pattern, $cadena)) {\n return TRUE;\n }\n return FALSE;\n \n }else\n return FALSE;\n }catch (Exception $e){\n return FALSE;\n } \n}", "title": "" }, { "docid": "86415a3115abc050c5ba95e568c29585", "score": "0.6802223", "text": "function es_email($correu, $mensaje_error){\n if(preg_match(\"/^([\\w\\d-\\.]+\\@[\\w\\d-\\.]+[ ]*,[ ]*)*[\\w\\d-\\.]+\\@[\\w\\d-\\.]+$/\",$correu));\n else{\n error($mensaje_error);\n exit;\n }\n}", "title": "" }, { "docid": "8141283c358504f33aae2a1c25a8996c", "score": "0.6765475", "text": "function mf_validate_email($value) {\r\n\t\tglobal $mf_lang;\r\n\r\n\t\t$error_message = $mf_lang['val_email'];\r\n\t\t\r\n\t\tif(!empty($value[0])){\r\n\t\t\t$regex = '/^[A-z0-9][\\w.-]*@[A-z0-9][\\w\\-\\.]*\\.[A-z0-9]{2,6}$/';\r\n\t\t\t$result = preg_match($regex, $value[0]);\r\n\t\t\t\r\n\t\t\tif(empty($result)){\r\n\t\t\t\treturn sprintf($error_message,'%s',$value[0]);\r\n\t\t\t}else{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "c9a3fdb7f217823688ef508da54449b0", "score": "0.674686", "text": "function email($email) {\n if (null == $email || !regexp::email($email)) {\n echo 'Indirizzo email non valido';\n } else {\n echo 'OK';\n }\n }", "title": "" }, { "docid": "efcf3e5984718d1a6affde262c054bde", "score": "0.6741997", "text": "function email_valid($temp_email) {\r\n if ($temp_email!='' && preg_match ( \"/@/\", $temp_email ) == 1) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n\t}", "title": "" }, { "docid": "366594f465377670b5b24d55c2323f4d", "score": "0.67240024", "text": "function validaremail($email){ \n if (!ereg(\"^([a-zA-Z0-9._]+)@([a-zA-Z0-9.-]+).([a-zA-Z]{2,4})$\",$email)){ \n return FALSE; \n } else { \n return TRUE; \n } \n}", "title": "" }, { "docid": "0d626a03c4e455820ac4f8d424f5a1b8", "score": "0.67140317", "text": "private function EnviarEmail() {\r\n\r\n// setando conteudo do email para avisos\t\r\n }", "title": "" }, { "docid": "0b593b4e89eb09207a3f930d1f14a5fe", "score": "0.6695203", "text": "function validaemail($email){\n if (!ereg('^([a-zA-Z0-9.-_])*([@])([a-z0-9]).([a-z]{2,3})',$email)){\n $mensagem='E-mail Inv&aacute;lido!';\n return $mensagem;\n }\n else{\n //Valida o dominio\n $dominio=explode('@',$email);\n if(!checkdnsrr($dominio[1],'A')){\n $mensagem='E-mail Inv&aacute;lido!';\n return $mensagem;\n }\n else{return true;} // Retorno true para indicar que o e-mail é valido\n }\n }", "title": "" }, { "docid": "7520809282bb02e95edac34a3bc93f21", "score": "0.668097", "text": "function checkmail ($youremail) {\n\nif (ereg('^[-!#$%&\\'*+\\\\./0-9=?A-Z^_`a-z{|}~]+'.'@'.'[-!#$%&\\'*+\\\\/0-9=?A-Z^_`a-z{|}~]+\\.'.\n'[-!#$%&\\'*+\\\\./0-9=?A-Z^_`a-z{|}~]+$', $youremail)) {\n\treturn true;\n} else {\n\treturn false;\n} \n}", "title": "" }, { "docid": "fc9442d97b8701b2ab52dd5223619e10", "score": "0.66808766", "text": "public function validarEmail(){\n\t\t\t//verifica si el campo esta vacio\n\t\t\tif (empty($this->email)) {\n \t\t$this->emailErr = \"Email is required\";\n \t\t} else {\n \t\t\t//comprueba el texto\n \t\t$email = test_input($this->email);\n \t\t//verifica si el correo esta bien formado\n \t\tif (!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n \t\t$this->emailErr = \"Invalid email format\";\n \t\t}\n \t\t}\n\t\t}", "title": "" }, { "docid": "5b3eb87b25e66b753c0631149fe62db8", "score": "0.66745895", "text": "function Vemail($email)\r\n{\r\n $email = $_POST['email'];\r\n // Queremos que el email tenga un formato adecuado\r\n if (! preg_match(\"/([\\w\\-]+\\@[\\w\\-]+\\.[\\w\\-]+)/\", $email)) {\r\n return 1;\r\n } else\r\n return 0;\r\n}", "title": "" }, { "docid": "928c780228515c69179be44b616e2085", "score": "0.66695523", "text": "public function validMail()\n {\n if(preg_match(self::REGEMAIL, $this->email))\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "90250b72e6a6271ea143db8f6019f8b4", "score": "0.66693825", "text": "function verificar_email($string){\r\n\t$var = $_REQUEST[$string];\r\n\tif (ereg('[^a-zA-Z0-9@.\\-_]', $var) == true){\r\n\t\treturn false;\r\n\t}else{\r\n\t\tlist($usuario, $dominio) = explode(\"@\", $var, 2);\r\n\t\tif (ereg('@', trim($usuario))){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (ereg('@', trim($dominio))){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t/*list($part1, $part2) = explode(\".\", $dominio, 2);\r\n\t\tif(strlen($part1) == 0 || strlen($part2) ==0 ){\r\n\t\t\techo \".\".$part1.\".\".$part2.\".\";\r\n\t\t\treturn false;\r\n\t\t}*/\r\n\t\treturn true;\r\n\t}\r\n}", "title": "" }, { "docid": "532f7d5241ae6bbd04130f2488af7e00", "score": "0.666868", "text": "function validate_email($email_raw)\n// Copied (i.e., \"stolen\") directly from the php doc site.\n {\n $email_nr = eregi_replace(\"\\n\", \"\", $email_raw);\n $email = eregi_replace(\" +\", \"\", $email_nr);\n $email = strtolower( $email );\n // do the eregi to look for bad characters\n if( !eregi(\"^[a-z0-9]+([_\\\\.-][a-z0-9]+)*\". \"@([a-z0-9]+([\\.-][a-z0-9]+))*$\",$email) ){\n // okay not a good email\n $feedback = '<font color=#FF0000>Erro: \"' . $email . '\" não é um email valido.</font>';\n return $feedback;\n } else {\n // okay now check the domain\n // split the email at the @ and check what's left\n $item = explode(\"@\", $email);\n $domain = $item[\"1\"];\n if ( ( gethostbyname($domain) == $domain ) )\n {\n if ( gethostbyname(\"www.\" . $domain) == \"www.\" . $domain )\n {\n $feedback = '<font color=#FF0000>Erro: O dominio \"' . $domain . '\" nao esta correto.</font>';\n return $feedback;\n }\n // ?\n $feedback = \"valid\";\n return $feedback;\n } else {\n $feedback = \"valid\";\n return $feedback;\n }\n }\n }", "title": "" }, { "docid": "7bb2deec77c63a032989645f0c076c58", "score": "0.6666714", "text": "public function is_email($email){\r\n\t\t/*\r\n\t\t if (preg_match('/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/i',$email)){ \r\n\t\t\t return TRUE; \r\n\t\t } else {\r\n\t\t\t return FALSE; \r\n\t\t }*/\r\n\t\t\r\n\t\r\n\t \t$mail_correcto = 0; \r\n\t \t//compruebo unas cosas primeras \r\n\t \tif ((strlen($email) >= 6) && (substr_count($email,\"@\") == 1) && (substr($email,0,1) != \"@\") && (substr($email,strlen($email)-1,1) != \"@\")){ \r\n\t \t if ((!strstr($email,\"'\")) && (!strstr($email,\"\\\"\")) && (!strstr($email,\"\\\\\")) && (!strstr($email,\"\\$\")) && (!strstr($email,\" \"))) { \r\n\t \t //miro si tiene caracter . \r\n\t \t if (substr_count($email,\".\")>= 1){ \r\n\t \t //obtengo la terminacion del dominio \r\n\t \t $term_dom = substr(strrchr ($email, '.'),1); \r\n\t \t //compruebo que la terminación del dominio sea correcta \r\n\t \t if (strlen($term_dom)>1 && strlen($term_dom)<5 && (!strstr($term_dom,\"@\")) ){ \r\n\t \t //compruebo que lo de antes del dominio sea correcto \r\n\t \t $antes_dom = substr($email,0,strlen($email) - strlen($term_dom) - 1); \r\n\t \t $caracter_ult = substr($antes_dom,strlen($antes_dom)-1,1); \r\n\t \t if ($caracter_ult != \"@\" && $caracter_ult != \".\"){ \r\n\t \t $mail_correcto = 1; \r\n\t \t } \r\n\t \t } \r\n\t \t } \r\n\t \t } \r\n\t \t} \r\n\t \tif ($mail_correcto){\r\n\t \t return 1;} \r\n\t \telse{ \r\n\t \t return 0; \t\t\r\n\t \t}\t \r\n\t \r\n\t}", "title": "" }, { "docid": "e732f62ae62b51467002bb5988155c4a", "score": "0.66255015", "text": "public function validEmail($email) {\n$this->email = $email;\n\nif(!filter_var($this->email, FILTER_VALIDATE_EMAIL)) {\nreturn FALSE;\n}\nelse {\nreturn TRUE;\n}\n}", "title": "" }, { "docid": "65ea3ca70b266bdbb6f9256a9d07ae6d", "score": "0.66235894", "text": "function valid_user_email($str, $type)\n\t{\n\t\tif ( ! $type)\n\t\t{\n\t\t\t$type = 'update';\n\t\t}\n\n\t\t$str = trim_nbs($str);\n\n\t\t// Is email valid?\n\n\t\tif ( ! $this->valid_email($str))\n\t\t{\n\t\t\t$this->set_message('valid_user_email', $this->CI->lang->line('invalid_email_address'));\n\t\t\treturn FALSE;\n\t\t}\n\n\n\t\tif ($current = $this->old_value('email'))\n\t\t{\n\t\t\tif ($current != $str)\n\t\t\t{\n\t\t\t\t$type = 'new';\n\t\t\t}\n\t\t}\n\n\t\tif ($type == 'new')\n\t\t{\n\t\t\t// Is email banned?\n\n\t\t\tif ($this->CI->session->ban_check('email', $str))\n\t\t\t{\n\t\t\t\t$this->set_message('valid_user_email', $this->CI->lang->line('email_taken'));\n\t\t\t\treturn FALSE;\n\t\t\t}\n\n\n\t\t\t// Duplicate emails?\n\n\t\t\t$this->CI->db->where('email', $str);\n\t\t\t$count = $this->CI->db->count_all_results('members');\n\n\t\t\tif ($count > 0)\n\t\t\t{\n\t\t\t\t$this->set_message('valid_user_email', $this->CI->lang->line('email_taken'));\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "fd4c1787b6db0ad027f233e48952c000", "score": "0.6617123", "text": "function _webform_edit_smg_email_validate($element, &$form_state) {\n if ($form_state['values']['user_email']) {\n $form_state['values']['value'] = '%useremail';\n }\n}", "title": "" }, { "docid": "a47c185117587094135e92dbe9e83181", "score": "0.6610235", "text": "static function validateEmailSyntax($email) {\n $atom = '[-a-z0-9!#$%&\\'*+/=?^_`{|}~]'; // allowed characters for part before \"at\" character\n $domain = '([-a-z0-9]*[a-z0-9]+)'; // allowed characters for part after \"at\" character\n $regex = '^'.$atom.'+'. // One or more atom characters.\n '(\\.'.$atom.'+)*'. // Followed by zero or more dot separated sets of one or more atom characters.\n '@'. // Followed by an \"at\" character.\n '('.$domain.'{1,63}\\.)+'. // Followed by one or max 63 domain characters (dot separated).\n $domain.'{2,63}'. // Must be followed by one set consisting a period of two\n '$'; // or max 63 domain characters.\n if(eregi($regex,$email)) return true;\n else return false;\n }", "title": "" }, { "docid": "7062828b9ad29431ef064d87107fe91c", "score": "0.6606628", "text": "public function validEmailValidDataProvider() {}", "title": "" }, { "docid": "fbbacb02178501b20e3dc7f6d08781ff", "score": "0.6603026", "text": "protected function emailvalidate() {\n\t\t$user = new User($this->db);\n\t\t\n\t\t$json = $user->checkEmailAvailability(); \n\t}", "title": "" }, { "docid": "b12535542d2068c8643ae35aa94dfcd7", "score": "0.66021603", "text": "function valid_email($email) \n {\n global $error_in_email;\n if (!filter_var($email, FILTER_VALIDATE_EMAIL)) \n {\n return 0;\n }\n return 1;\n }", "title": "" }, { "docid": "a6eff56e49144040ce4089c6e36d5667", "score": "0.66018784", "text": "function validatemail()\n\t{\n\t\t\n\t\tif($_POST['email']!='' and $_POST['email']=='')\n\t\t{\n\t\t $message = \"Required Field Cannot be blank/Invalid Email\";\n\t\t\t$this->Assign(\"email\",'',\"noempty/emailcheck\",$message);echo'l';exit;\n\t\t}\n\t\t\n\t\t/*else\n\t\t{\n\t\t\t$message = \"Invalid Emails\";\n \t\t\t$this->Assign(\"email\",'',\"noempty\",$message);\n\t\t}\n\t\t$message = \"Required Field Cannot be blank/Invalid Email\";\n\t\t$this->Assign(\"email\",trim($_POST['email']),\"noempty/emailcheck\",$message);*/\n\t\t$this->PerformValidation(''.$_SESSION['base_url'].'/index.php?do=forgetpwd');\n\t}", "title": "" }, { "docid": "a5cb3e45932a5b342153dd49705a4600", "score": "0.65797806", "text": "public static function emailValido($email,$idNotaC){\n\n if (strlen($email) < 10 || strlen($email) > 50) {\n return false;\n }\n if(NotaCompartidaMapper::estaEmail($email,$idNotaC)){\n return true;\n }else{\n\n return false;\n\n }\n }", "title": "" }, { "docid": "5d159456aff0a6c8201fcbfe7124dd29", "score": "0.6575073", "text": "function validaEmail($valor){\n\tif(filter_var($valor,FILTER_VALIDATE_EMAIL)===false){\n\t\treturn false;\n\t}\n\telse{\n\t\treturn true;\n\t}\n}", "title": "" }, { "docid": "c89e7bace56bd9fb51b3be08bdddf73f", "score": "0.65677637", "text": "function _content_reminder_email_element_validate($element, &$form_state, $form) {\n if (!empty($element['#value']) && !valid_email_address($element['#value'])) {\n form_error($element, t('Please enter a valid email address.'));\n }\n}", "title": "" }, { "docid": "3e3fc0fc217e0582563346acc75139ab", "score": "0.6562013", "text": "private function EnviarEmail(){\n \n // setando conteudo do email para avisos\t\n\n \n }", "title": "" }, { "docid": "83c3bfb822977fde0268329504787e90", "score": "0.6558114", "text": "function verifMail($fmail) {\n\t\tif (!filter_var($fmail, FILTER_VALIDATE_EMAIL)) { return FALSE; }\n\t\telse { return TRUE; }\n\t}", "title": "" }, { "docid": "56d604ad088ef6ed6039710c58b5d621", "score": "0.65553725", "text": "function test_mail($addmail){\n if (!filter_var($addmail, FILTER_VALIDATE_EMAIL)) {\n $mailError = 'Sorry the mail address is invalid, it should respect this format [email protected] .';\n return $mailError; // mettre le return dans le if sinon la variable est indéfinie \n }\n \n }", "title": "" }, { "docid": "c06bf5c7b02f4def30971b54aeefb968", "score": "0.6552491", "text": "function comprobar_email($email){\n $mail_correcto = 0;\n //compruebo unas cosas primeras\n if ((strlen($email) >= 6) && (substr_count($email,\"@\") == 1) && (substr($email,0,1) != \"@\") && (substr($email,strlen($email)-1,1) != \"@\")){\n if ((!strstr($email,\"'\")) && (!strstr($email,\"\\\"\")) && (!strstr($email,\"\\\\\")) && (!strstr($email,\"\\$\")) && (!strstr($email,\" \"))) {\n //miro si tiene caracter .\n if (substr_count($email,\".\")>= 1){\n //obtengo la terminacion del dominio\n $term_dom = substr(strrchr ($email, '.'),1);\n //compruebo que la terminación del dominio sea correcta\n if (strlen($term_dom)>1 && strlen($term_dom)<5 && (!strstr($term_dom,\"@\")) ){\n //compruebo que lo de antes del dominio sea correcto\n $antes_dom = substr($email,0,strlen($email) - strlen($term_dom) - 1);\n $caracter_ult = substr($antes_dom,strlen($antes_dom)-1,1);\n if ($caracter_ult != \"@\" && $caracter_ult != \".\"){\n $mail_correcto = 1;\n }\n }\n }\n }\n }\n if ($mail_correcto){\n return 1;\n }else{\n return 0;\n }\n\n }", "title": "" }, { "docid": "bdd08220e38e24a18361d86d1918f967", "score": "0.6549281", "text": "public function testEmail()\n\t{\n\t\t$this->assertTrue(validate_email('[email protected]'), '[email protected] is a valid email address');\n\n\t\t$this->assertFalse(validate_email('al @fx.fr'), 'al @fx.fr is not a valid email address');\n\n\t\t$this->assertFalse(validate_email('al'), 'al is not a valid email address');\n\t}", "title": "" }, { "docid": "710da474335bc55ba6ad2ad84e38d334", "score": "0.6538338", "text": "function Comprobar_email(){\n\t$correcto = true;\n\n\t//realiza la comprobacion del dato\n\tif(strlen($this->email)<3){\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"email\");//guarda un mensaje de error\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00003\");//guarda un mensaje de error\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo no numérico demasiado corto\");//guarda un mensaje de error\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\n\t//realiza la comprobacion del dato\n\tif(strlen($this->email)>60){\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"email\");//guarda un mensaje de error\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00002\");//guarda un mensaje de error\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo demasiado largo\");//guarda un mensaje de error\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//realiza la comprobacion del dato\n\tif(!preg_match(\"/^[-\\w.%+]{1,64}@(?:[A-Z0-9-]{1,63}\\.){1,125}[A-Z]{2,63}$/i\",$this->email)){\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"email\");//guarda un mensaje de error\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00120\");//guarda un mensaje de error\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Formato email erróneo\");//guarda un mensaje de error\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\t\t\t\t \n\treturn $correcto;\n}", "title": "" }, { "docid": "17c35302c83fae5f317a7a770608d31b", "score": "0.6538202", "text": "function _webform_validate_smg_email($form_element, &$form_state) {\n require_once(drupal_get_path('module', 'playbook_fields') . '/includes/emails_exclude.inc');\n\n $component = $form_element['#webform_component'];\n $value = trim($form_element['#value']);\n list($user, $domain) = explode('@', $value);\n\n if ($value !== '' && !valid_email_address($value)) {\n form_error($form_element, t('%value is not a valid email address.', array('%value' => $value)));\n } elseif ($component['extra']['work_email'] && in_array($domain, $emails_exclude)) {\n form_error($form_element, t('Email addresses from public providers are not allowed. Please use your work email address.'));\n } else {\n form_set_value($form_element, $value, $form_state);\n }\n}", "title": "" }, { "docid": "60512a57a625328c303e1c6ecce70ea5", "score": "0.6535658", "text": "public function validateEmail() {\n $this->load->model(\"Supperadmin\");\n return $this->Supperadmin->validateEmail();\n }", "title": "" }, { "docid": "265ac17bec9274c437fd87ba6dfc78ec", "score": "0.6534999", "text": "public function emailAction(){\n $validator = new EmailAddress();\n $var = '[email protected]';\n //$var = '[email protected]';//true\n //$var = 'minh@[email protected]';//false\n //$var = '\"minh@abc\"@gmail.com';//true\n if ($validator->isValid($var)){\n echo $var;\n }\n else \n {\n $messages = $validator->getMessages();\n foreach($messages as $message){\n echo $message.'<br>';\n }\n }\n\n return false;\n\n }", "title": "" }, { "docid": "f052d3f6d0733d8ea62dcfb56060ab66", "score": "0.6532738", "text": "function _validate_mail($mail){\n\t\t// if (preg_match('/^[-!#$%&\\'*+\\\\./0-9=?A-Z^_`a-z{|}~]+'.'@'.'[-!#$%&\\'*+\\\\/0-9=?A-Z^_`a-z{|}~]+\\.'.'[-!#$%&\\'*+\\\\./0-9=?A-Z^_`a-z{|}~]+$/',$mail)){\n\t\t// \treturn true;\n\t\t// }\n\t\treturn true;\n\t\t//return $this->_debug(4, $mail);\n\t}", "title": "" }, { "docid": "6b428c7c7c6eca76194a193459a2f2ee", "score": "0.65198964", "text": "public function testEmailExtension() {\n $this->assertTrue($this->validator->isValid(\"[email protected]\"));\n\n $this->assertTrue($this->validator->isValid(\"[email protected]\"));\n\n $this->assertTrue($this->validator->isValid(\"[email protected]\"));\n\n $this->assertTrue($this->validator->isValid(\"[email protected]\"));\n\n $this->assertFalse($this->validator->isValid(\"jsmith@apache.\"));\n\n $this->assertFalse($this->validator->isValid(\"[email protected]\"));\n\n $this->assertTrue($this->validator->isValid(\"[email protected]\"));\n\n $this->assertFalse($this->validator->isValid(\"[email protected]\"));\n }", "title": "" }, { "docid": "2dfa6106ff9d83273625c2da30a1f56b", "score": "0.6512418", "text": "public function testEmail()\n {\n // $email = \"[email protected]\";\n // $result = (bool) filter_var($email, FILTER_VALIDATE_EMAIL);\n\n $result = Email::validate('[email protected]');\n $this->assertTrue($result);\n\n $result2 = Email::validate('joelfzop@@gmail.com');\n $this->assertFalse($result2);\n }", "title": "" }, { "docid": "f9d64263529b7c368bdab1d232dc4f5c", "score": "0.6511097", "text": "function validEmail(String $email) {\n\t\t\t\t\t\t\tglobal $errCtr;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (empty($email)) {\n\t\t\t\t\t\t\t\techo \"<script>alert('Nothing was entered for email');</script>\";\n\t\t\t\t\t\t\t\t$errCtr++;\n\t\t\t\t\t\t\t} elseif (!preg_match(\"/^([\\S]{1,}[@][\\w]{4,}[\\.][a-z]{2,4})$/\", $email)) {\t// checks if email does or does not contain an @ symbol\n\t\t\t\t\t\t\t\techo \"<script>alert('$email is invalid, email should look something like this: [email protected]');</script>\";\n\t\t\t\t\t\t\t\t$email = \"\";\n\t\t\t\t\t\t\t\t$errCtr++;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn $email;\n\t\t\t\t\t\t}", "title": "" }, { "docid": "182c59866e78e6ff0efeea341864f5d0", "score": "0.650761", "text": "function verificarEmail($email){ \n \t\tif (filter_var($email , FILTER_VALIDATE_EMAIL ) or ($email == \"-\")){\n \t\treturn true; \n \t\t}\n\t\telse { \n \t\treturn false; \n\t\t} \n\t}", "title": "" }, { "docid": "b537b78dd2fa6f16cab692d9429e38ea", "score": "0.6498233", "text": "function validate_email($field_input, array &$field): bool\n{\n $pattern = \"/^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,})$/i\";\n if (!preg_match($pattern, $field_input)) {\n $field['error'] = \"Iveskite tikra el.pasta!\";\n\n return false;\n }\n\n return true;\n}", "title": "" }, { "docid": "bc5080cc81b1114657c2d91f9f3b268a", "score": "0.6494384", "text": "function validateEmail($email){\r\n if(strlen($email) == 0)\r\n return false;\r\n // esta escrito,pero NO es VALIDO email\r\n else if(!filter_var($_POST['email'], FILTER_SANITIZE_EMAIL))\r\n return false;\r\n // todo el mail es ok\r\n else\r\n return true;\r\n}", "title": "" }, { "docid": "c195222b7670ca37591caee35d0717bf", "score": "0.6494156", "text": "public function checkMailREGEX ()\n\t\t\t {\n\t\t\t\t\tif (preg_match('#^.+@.+\\..+#',$this->_mail))\n\t\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t\t$this->_mailREGEXBoolean = TRUE; \n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\theader('Location: inscription.php?check=regex');\t\n\t\t\t\t\t\t$this->_mailREGEXBoolean = FALSE; \n\t\t\t\t\t}\t\n\t\t\t }", "title": "" }, { "docid": "b6448627f10c7c8261991dd0352d68de", "score": "0.6468918", "text": "function VerifierAdresseMail($adresse)\n{\n if(strlen($adresse)>254)\n {\n return 'Votre adresse est trop longue.';\n }\n\n\n //Caractères non-ASCII autorisés dans un nom de domaine .eu :\n\n $nonASCII='ďđēĕėęěĝğġģĥħĩīĭįıĵķĺļľŀłńņňʼnŋōŏőoeŕŗřśŝsťŧ';\n $nonASCII.='ďđēĕėęěĝğġģĥħĩīĭįıĵķĺļľŀłńņňʼnŋōŏőoeŕŗřśŝsťŧ';\n $nonASCII.='ũūŭůűųŵŷźżztșțΐάέήίΰαβγδεζηθικλμνξοπρςστυφ';\n $nonASCII.='χψωϊϋόύώабвгдежзийклмнопрстуфхцчшщъыьэюяt';\n $nonASCII.='ἀἁἂἃἄἅἆἇἐἑἒἓἔἕἠἡἢἣἤἥἦἧἰἱἲἳἴἵἶἷὀὁὂὃὄὅὐὑὒὓὔ';\n $nonASCII.='ὕὖὗὠὡὢὣὤὥὦὧὰάὲέὴήὶίὸόὺύὼώᾀᾁᾂᾃᾄᾅᾆᾇᾐᾑᾒᾓᾔᾕᾖᾗ';\n $nonASCII.='ᾠᾡᾢᾣᾤᾥᾦᾧᾰᾱᾲᾳᾴᾶᾷῂῃῄῆῇῐῑῒΐῖῗῠῡῢΰῤῥῦῧῲῳῴῶῷ';\n // note : 1 caractète non-ASCII vos 2 octets en UTF-8\n\n\n $syntaxe=\"#^[[:alnum:][:punct:]]{1,64}@[[:alnum:]-.$nonASCII]{2,253}\\.[[:alpha:].]{2,6}$#\";\n\n if(!preg_match($syntaxe,$adresse))\n {\n return 'Votre adresse e-mail n\\'est pas valide.';\n }\n}", "title": "" }, { "docid": "87bc2600478aeb46a8148086f0a1ad6f", "score": "0.64677703", "text": "public function validEmailInvalidDataProvider() {}", "title": "" }, { "docid": "fccea98cffcf55bb6eb2a3fe51801021", "score": "0.6467469", "text": "private static function emailValidate($data){\n\t\t\tif( filter_var($data,FILTER_VALIDATE_EMAIL) ) return 1;\n\t\t\telse self::$error[] = \"email_error\";\n\t\t\treturn 0;\n\t\t}", "title": "" }, { "docid": "61c73a9e5670ccceb4fc42423fba2490", "score": "0.64622253", "text": "function email_is_valid($email) {\r\n\t\t\t\t\t\t\t return preg_match('/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$/i',$email);\r\n\t\t\t\t\t\t\t}", "title": "" }, { "docid": "37e254ed61d32a2831862ac44e39f904", "score": "0.64541435", "text": "function validateEmail()\r\n\t{\r\n\t\tglobal $inEmail, $valid_form, $inEmailErrMsg;\t\t//Use the GLOBAL Version of these variables instead of making them local\r\n\t\t$inEmailErrMsg = \"\";\t\t\t\t\t\t\t\t//Clear the error message. \r\n\t\tif (!filter_var($inEmail, FILTER_VALIDATE_EMAIL)) \r\n\t\t{\r\n\t\t\t$valid_form = false;\t\t\t\t\t//Invalid name so the form is invalid\r\n\t\t\t$inEmailErrMsg = \"Not a valid email address\";\t//Error message for this validation\t\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "39dd5d92e5035018836d1e3b96e7e829", "score": "0.6448853", "text": "function validEmail()\n{\n //define an error variable\n global $emailErr;\n $regex = \"/^([a-zA-Z0-9\\+_\\-]+)(\\.[a-zA-Z0-9\\+_\\-]+)*@([a-z0-9\\-]+\\.)+[a-z]{2,6}$/\";//define a pattern for a valid email\n if (!preg_match($regex, $_POST[\"email\"])) {//checking if entered email is valid or not\n $emailErr = \"Please Enter a Valid Email\";\n return false;\n } else {\n return true;\n }\n}", "title": "" }, { "docid": "e46f0f2169bbcaa9d2313885f2e2993e", "score": "0.6443941", "text": "function cp_isValid_email($email){\r\n if(!preg_match(\"/^[a-z0-9._-]+@[a-z0-9._-]+\\.[a-z]{2,4}$/\",$email)){\r\n return 1;\r\n }\r\n if(strlen($email) > 255){\r\n return 2;\r\n }\r\n\r\n return 0;\r\n}", "title": "" }, { "docid": "5d5f97e36b8105b663bde1d68ad5bf10", "score": "0.64375305", "text": "function verifier_input_email(&$erreur, $input){\n\t$err = '';\n\t$data= _request($input);\n\tif (!$data)\n\t\t$err = _T('etat_civil:info_obligatoire');\n\telseif (!email_valide($data))\n\t\t$err = _T('etat_civil:email_non_valide');\n\t\n\tif ($err) $erreur[$input] = $err;\n}", "title": "" }, { "docid": "7c22cd7a96c80a4c96bc20523b7f9936", "score": "0.6437399", "text": "function validate_email_id($Email,$ReEnterEmail){\n\tif (!preg_match(\"/([\\w\\-]+\\@[\\w\\-]+\\.[\\w\\-]+)/\",$Email)) {\n\t\t\t\t\t $emailErr = \"Invalid email format\";\n\t\t\t\t\t echo \"<br/>\";\n\t\t\t\t\t echo $emailErr;\n\t\t\t\t\t //header('Refresh: 5; URL=http://localhost:8080/Shelly/ui/Login.html');\n\t\t\t\t\t return \"nonValidated\";\n\t\t\t\t\t}\n\tif($Email!=$ReEnterEmail){\n\t\t\t\t\t echo \"<br/>\".\" Enail Id and Re-Enter Email id is not matching ..... resubmit the sign Up Form\";\n\t\t\t\t\t //header('Refresh: 5; URL=http://localhost:8080/Shelly/ui/Login.html');\n\t\t\t\t\t return \"nonValidated\";\n\t}\n\telse{\n\t\treturn \"Validated\";\n\t}\n}", "title": "" }, { "docid": "97ad222164f76cf1d147bd38ac271b2b", "score": "0.6432216", "text": "function check_email($variable){\nif(preg_match(\"/^[_a-zA-Z0-9-]+(\\.[_a-zA-Z0-9-]+)*@([_a-zA-Z0-9-]+\\.)*[a-zA-Z0-9-]{2,200}\\.[a-zA-Z]{2,6}$/\", $variable ))\n\treturn true;\nreturn false;\n}", "title": "" }, { "docid": "03326dfb8469b4a615e7e368ed9ee086", "score": "0.6427328", "text": "function valid_email($email) {\r\n\t if (strlen($email)) {\r\n\t\t $regexp=\"/^[a-z0-9]+([_\\\\.-][a-z0-9]+)*@([a-z0-9]+([\\.-][a-z0-9]+)*)+\\\\.[a-z]{2,}$/i\";\r\n\t\t if ( !preg_match($regexp, $email) ) {\r\n\t\t $_obweb->addErr(\"Email address is not correct\\n\");\r\n\t\t return false;\r\n\t\t }\r\n\t }\r\n\t return true;\r\n\t}", "title": "" }, { "docid": "900a2ec50c26920496285517043e697b", "score": "0.6415674", "text": "function valMail($email) {\n if (preg_match('/[a-z0-9_\\.\\-]+@[a-z0-9_\\.\\-]*[a-z0-9_\\.\\-]+\\.[a-z]{2,4}$/', $email)) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "dfea3daf8d914fc07db5d906decb7689", "score": "0.6410128", "text": "public function email() {\n $email = '[email protected]';\n echo Kohana::debug($email).'<br/>';\n if(valid::email($email) == true) {\n echo \"Valid email\";\n } else {\n echo \"Invalid email\";\n }\n }", "title": "" }, { "docid": "3fb8d5c71bd9a0968918f3da3ea872a9", "score": "0.64034104", "text": "function check_email($str) {\n\n $email = $this->Travel_model->check_email($str, $this->user_id);\n\n\n\n if ($email) {\n\n $this->form_validation->set_message('check_email', lang('error_email_in_use'));\n\n return FALSE;\n } else {\n\n return TRUE;\n }\n }", "title": "" }, { "docid": "8fcd3e94c6c6dafe7e1147bab699c505", "score": "0.6380427", "text": "function is_email($Invoer)\n{\n return (bool)(preg_match(\"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$^\",$Invoer));\n}", "title": "" }, { "docid": "05423df5c414a0af4daa269623cc7fd7", "score": "0.6379107", "text": "function verifEmailSyntaxe($email)\n {\n return(filter_var($email, FILTER_VALIDATE_EMAIL)) ? true : false ;\n }", "title": "" }, { "docid": "288ee101c0fed8589946662ef63680da", "score": "0.6378853", "text": "function ValidarEmail($email){\n\tif (!preg_match (\"/^[A-Za-z0-9]+([_.-][A-Za-z0-9]+)*@[A-Za-z0-9]+([_.-][A-Za-z0-9]+)*\\\\.[A-Za-z0-9]{2,4}$/\", $email) &&\n\t\t!$email == \"\")\n\t return false;\n\telse\n\t return true;\n}", "title": "" }, { "docid": "bc7a897b71b09223b031ae3f4ef3f66d", "score": "0.63772136", "text": "function _element_email_validate($element, &$form_state) {\n if (!valid_email_address($element['#value'])) {\n form_error($element, t('The @name option must contain a valid email address.', array('@name' => $element['#title'])));\n }\n}", "title": "" }, { "docid": "64b3cf1bf547a1ba50841a28d869095c", "score": "0.6374769", "text": "function validate_email($email)\r\n {\r\n try{\r\n //check if email est sous la bonne format\r\n if(preg_match('/[-0-9a-zA-Z.+_]+@[-0-9a-zA-Z.+_]+.[a-zA-Z]{2,4}/', $email)){\r\n //echo 'Bon Votre Adresse Email est correcte. <br>';\r\n return TRUE;\r\n }\r\n else {\r\n return FALSE;\r\n }\r\n }\r\n catch(Exception $e)\r\n {\r\n echo \"ERROR: \".$e;\r\n }\r\n }", "title": "" }, { "docid": "06d24b92d93c8d015eb209127c230e7b", "score": "0.6374326", "text": "public function ajax_validate_email() {\n\n\t\tif ( empty( $_POST['email'] ) )\n\t\t\t$msg = array( 'code' => 'error', 'valid_address_message' => __( 'You must enter an email address.', $this->plugin_slug ) );\n\n\t\tif ( ! is_email( $_POST['email'] ) ) {\n\t\t\t$msg = array( 'valid_address' => 0, 'valid_address_message' => __( 'Please enter a valid email address.', $this->plugin_slug ) );\n\t\t} else if ( get_user_by( 'email', $_POST['email'] ) ) {\n\t\t\t$msg = array( 'valid_address' => 0, 'valid_address_message' => sprintf( __( 'That email address is already in use. Have you <a href=\"%s\">forgotten your password?</a>', $this->plugin_slug ), wp_lostpassword_url() ) );\n\t\t} else {\n\t\t\t// Finally, check for restricted domains\n\t\t\t$maybe_error = $this->email_laundry( $_POST['email'] );\n\n\t\t\tif ( empty( $maybe_error ) ) {\n\t\t\t\t$msg = array( 'valid_address' => 1, 'valid_address_message' => __( 'This email address is valid.', $this->plugin_slug ) );\n\t\t\t} else {\n\t\t\t\t$msg = array( 'valid_address' => 0, 'valid_address_message' => $maybe_error );\n\t\t\t}\n\n\t\t}\n\n\t\t$msg = apply_filters( 'cc_registration_extras_email_validate_message', $msg );\n\n\t\tdie( json_encode( $msg ) );\n\t}", "title": "" }, { "docid": "af706701c090a73520258923b0309916", "score": "0.63739157", "text": "public function testUpdateInvalidMail(){\n\t\t//create a message , try to update it without actually updating it and watch it fail\n\t\t$mail = new Mail(null, $this->VALID_MAILSUBJECT, $this->mailSenderId->getProfileId(),$this->mailReceiverId->getProfileId(), $this->VALID_MAILGUNID, $this->VALID_MAILCONTENT);\n\t\t$mail->update($this->getPDO());\n\t}", "title": "" }, { "docid": "55701d5247e29bdc3e4d96ac70eb2503", "score": "0.6372139", "text": "function is_valid_email($email)\r\n{ \r\n return eregi(\"^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,3})$\", $email);\r\n}", "title": "" }, { "docid": "7fe957c09fb3c215eb2baf15ae1ef272", "score": "0.6370243", "text": "function validateEmail(&$errMessage){\n if (empty($_POST[\"email\"])){\n $errMessage=$errMessage.\"e-mail is empty !\";\n }else{\n $email=cleanInput($_POST[\"email\"]);\n if(!filter_var($email, FILTER_VALIDATE_EMAIL)){\n $errMessage=$errMessage.\"Invalidate email !\";\n } \n return $email;\n }\n\n}", "title": "" }, { "docid": "3168b7cfd91859931eff5b44fe00258f", "score": "0.6365833", "text": "public function testCheckEmailSyntax()\n {\n\n }", "title": "" }, { "docid": "81aca2c3158e95bcd66c797ddf6d81ed", "score": "0.6365076", "text": "public function validaEmail($vemail){\n\t\t\n\t\t$email \t= \"/[[:alnum:]]\\@[[:alnum:]]+(\\.[[:alnum:]])+/\";\n\t\t\n\t\t$mail = strip_tags(htmlentities(trim($vemail)));\n\t\t\n\t\tif(@preg_match($email, $mail)){\n\t\t\t\t\treturn true;\n\t\t\t }else{\n\t\t\t\t\tThrow new Exception (\"Digite um email válido!\"); \n\t\t\t }//Fim IF\n\t\t\n\t}", "title": "" }, { "docid": "a52226fb931a87008cd325a7189739f5", "score": "0.6360782", "text": "private function email($name, $value){\n if(filter_var($value, FILTER_VALIDATE_EMAIL)){\n return TRUE; \n }else{\n $this->add_message($name, 'email');\n return FALSE;\n }\n }", "title": "" }, { "docid": "374f2abb5b401f87c4d4570f2e613e20", "score": "0.63600147", "text": "function Valid_mail($mail)\n{\n if (!filter_var($mail, FILTER_VALIDATE_EMAIL)) {\n return (0);\n }\n return (1);\n}", "title": "" }, { "docid": "5afe6ba8845c0f620e195c9a9d4dbb6a", "score": "0.6352174", "text": "function validarEmailSinException(string $eCorreo): bool{\r\n if (!filter_var($eCorreo, FILTER_VALIDATE_EMAIL)){\r\n return false;\r\n }\r\n return true;\r\n }", "title": "" }, { "docid": "9497639b358c4f275df9c689ed36f386", "score": "0.63514566", "text": "function sp_wpcp_customize_validate_email( $validity, $value, $wp_customize ) {\n\n\t\tif ( ! sanitize_email( $value ) ) {\n\t\t\t$validity->add( 'required', esc_html__( 'Please enter a valid email address.', 'wp-carousel-pro' ) );\n\t\t}\n\n\t\treturn $validity;\n\n\t}", "title": "" }, { "docid": "1699f83b7f5605a1d260dfdefc4a3db6", "score": "0.63397473", "text": "function validarEmail(string $eCorreo){\r\n if (!filter_var($eCorreo, FILTER_VALIDATE_EMAIL)){\r\n throw new Exception('<div class=\"errorAviso\">El email es incorrecto y salta la excepción.</div><br>');\r\n }\r\n\r\n }", "title": "" }, { "docid": "d5eec041048021aa000f684cf8470b03", "score": "0.6338422", "text": "function validaEmail($email) {\r\n\t$conta = \"^[a-zA-Z0-9\\._-]+@\";\r\n\t$domino = \"[a-zA-Z0-9\\._-]+.\";\r\n\t$extensao = \"([a-zA-Z]{2,4})$\";\r\n\t$pattern = $conta.$domino.$extensao;\r\n\tif (ereg($pattern, $email))\r\n\treturn true;\r\n\telse\r\n\treturn false;\r\n\t}", "title": "" }, { "docid": "223ceae6bee8379001bed96b86d60d5f", "score": "0.6333868", "text": "function validateMessage()\n {\n global $CONF, $member, $manager;\n\n if ( !$CONF['AllowMemberMail'] )\n {\n return _ERROR_MEMBERMAILDISABLED;\n }\n\n if ( !$member->isLoggedIn() && !$CONF['NonmemberMail'] )\n {\n return _ERROR_DISALLOWED;\n }\n\n if ( !$member->isLoggedIn() && (!isValidMailAddress(postVar('frommail') ) ) )\n {\n return _ERROR_BADMAILADDRESS;\n }\n\n // let plugins do verification (any plugin which thinks the comment is invalid\n // can change 'error' to something other than '')\n $result = '';\n $param = array(\n 'type' => 'membermail',\n 'error' => &$result\n );\n $manager->notify('ValidateForm', $param);\n\n return $result;\n\n }", "title": "" }, { "docid": "d91586456f78157bffd84def4698e91b", "score": "0.63332516", "text": "private function compareEmail(){\n\t\tif ($this->new_email != $this->new_email) {\n\t\t\t$this->result[\"error\"] = \"Veuillez saisir deux adresses identiques.\";\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "8c727df1324c2a2442b94c042fae575d", "score": "0.63278633", "text": "function ValidateEmail($data)\n\t{\n\t\tif(strlen($data) < 5 || strpos($data, '@') == false || strpos($data, '.') == false || stripos($data, ' ') != false)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}", "title": "" }, { "docid": "a3a859823cf5eb43b7493d0e1d83bfc9", "score": "0.6321547", "text": "function validateExisringEmail()\n\t{\n\n\t\t$ObjClsDBInteraction = new class_dbconnector();\n\n\t\t$sSQL = \"SELECT news_letter_email FROM tbl_news_letter WHERE news_letter_id IS NOT NULL\";\n\t\tif(isset($this->news_letter_email) && $this->news_letter_email!=\"\")\n\t\t{\n\t\t\t$sSQL .= \" AND news_letter_email = '$this->news_letter_email' \";\n\t\t}\n\t\tif(isset($this->news_letter_id) && $this->news_letter_id!=\"\")\n\t\t{\n\t\t\t$sSQL .= \" AND news_letter_id != $this->news_letter_id\";\n\t\t}\n\t\t//echo $sSQL . \";<br><br><br>\";\n\t\t$objRecordSet = $ObjClsDBInteraction -> select($sSQL);\n\t\tif(mysql_num_rows($objRecordSet)>0)\n\t\t{\n\t\t\t$objRecordSet = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$objRecordSet = false;\n\t\t}\n\t\t$ObjClsDBInteraction->connection_close();\n\t\treturn $objRecordSet;\n\t}", "title": "" }, { "docid": "db047cbc00ba9e21bf079487c66ea089", "score": "0.6314785", "text": "function validate_email($attr, $msg) {\n\t\tif(preg_match(\n\t\t\t\t'/^[-!#$%&\\'*+\\\\.\\/0-9=?A-Z^_`{|}~]+'. // the user name\n\t\t\t\t'@'. // the ubiquitous at-sign\n\t\t\t\t'([-0-9A-Z]+\\.)+' . // host, sub-, and domain names\n\t\t\t\t'([0-9A-Z]){2,4}$/i', // top-level domain (TLD)\n\t\t\t\ttrim($this->_attributes[$attr]))) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\t$this->_errors[] = array($attr, $msg);\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "9775a1082621760dd357b03ff7bd935f", "score": "0.6305281", "text": "function email_seems_valid($email)\n{\n return (preg_match('#^[0-9a-z_\\.\\+-]+@([0-9a-z][0-9a-z-]*[0-9a-z]\\.)+[a-z]{2,}$#i', $email)\n and !preg_match('#@.*--#', $email));\n}", "title": "" }, { "docid": "4a2e9b3bc55d7645ac5cdd932a25c551", "score": "0.6298994", "text": "function validateEmail( $em )\n\t{\n\t\t$pattern = '/^[a-z\\d]+(?:[\\-\\.\\_][a-z\\d]+)*[a-z\\d]+@[\\w\\d]+(?:[-\\.][a-z\\d][a-z\\d\\-]*[a-z\\d])*[a-z\\d]+\\.([a-z]{2,4})(\\.([a-z]{2,4}))*$/i';\n\t\treturn preg_match($pattern,$em) ? true : false;\n\t}", "title": "" }, { "docid": "ef906cdcc677a2fdd2436df042d4fbe8", "score": "0.62962824", "text": "function validateEmail(){\n $this->load->model('tokens');\n $data['titleMessage'] = \"Email validation\";\n\n if($this->tokens->validMail($this->uri->segment(3, '#'))){\n $this->load->model('users');\n \n $token = $this->tokens->getToken($this->uri->segment(3));\n $user = $this->users->getUserByUsername($token['username']);\n \n if($this->users->getUserByEmail($user['email']) == null) {\n $this->tokens->deleteEmail($token['username']);\n $this->users->setValidEmail($token['username'], true);\n $data['message'] = \"Your email is validated!\";\n } else {\n $data['message'] = \"This email address is already validated on another account.\";\n }\n } else {\n $data['error'] = \"Token does not exist or has expired!\";\n }\n $this->load->view('message', $data);\n }", "title": "" }, { "docid": "246f5736eebd2187f8613fc6adaa13e0", "score": "0.62828934", "text": "public function cek_email () {\n\t\t\t\n\t\t}", "title": "" }, { "docid": "e9ff08e687d24b1dfa49d5cdac1697a5", "score": "0.62798893", "text": "function emailChk($key, $email) {\r\n \t// First, we check that there's one @ symbol, and that the lengths are right\r\n \tif (!ereg(\"^[^@]{1,64}@[^@]{1,255}$\", $email)) {\r\n \t// Email invalid because wrong number of characters in one section, or wrong number of @ symbols.\r\n \t$msg[$key] = $key.'をフリガナ入力してください。';\r\n \t}\r\n \r\n \t// Split it into sections to make life easier\r\n \t$email_array = explode(\"@\", $email);\r\n \t$local_array = explode(\".\", $email_array[0]);\r\n \tfor ($i = 0; $i < sizeof($local_array); $i++) {\r\n \t if (!ereg(\"^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\\.-]{0,63})|(\\\"[^(\\\\|\\\")]{0,62}\\\"))$\", $local_array[$i])) {\r\n \t$msg[$key] = $key.'をフリガナ入力してください。';\r\n \t}\r\n \t} \r\n \r\n \tif (!ereg(\"^\\[?[0-9\\.]+\\]?$\", $email_array[1])) { // Check if domain is IP. If not, it should be valid domain name\r\n \t$domain_array = explode(\".\", $email_array[1]);\r\n \tif (sizeof($domain_array) < 2) {\r\n $msg[$key] = $key.'をフリガナ入力してください。';\r\n \t}\r\n \t\r\n \tfor ($i = 0; $i < sizeof($domain_array); $i++) {\r\n \tif (!ereg(\"^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$\", $domain_array[$i])) {\r\n \t$msg[$key] = $key.'をフリガナ入力してください。';\r\n \treturn $msg;\r\n \t}\r\n \t}\r\n \t}\r\n \t\r\n \t\r\n \t}", "title": "" }, { "docid": "d64c1bd2fa4b742c048466955a3e888c", "score": "0.62795156", "text": "function reg_wizard_validate_email($form, &$form_state) {\n if (empty($form_state['input']['mail'])) {\n form_set_error('mail', 'You must enter an email address to continue.');\n }\n // If the field is not empty we need to check a couple things.\n else if ($mail = $form_state['input']['mail']) {\n // Make sure the email is a valid email first.\n if (!valid_email_address($mail)) {\n form_set_error('mail', t('Please enter a valid email address to continue.'));\n }\n // If the email is valid let's make sure it doesn't exist in our system\n // already. We can do this by trying to load the user with that email. If\n // we get a $user back then it does exist, otherwise we continue.\n else if ($user = user_load_by_mail($mail)) {\n form_set_error('mail', t('This email appears to already exist. Do you already have an account? If you have forgotten your password, !password.', array('!password' => l('request a new password', 'user/password'))));\n }\n }\n}", "title": "" }, { "docid": "b0fbaca98e26c5179d936af17a1836a8", "score": "0.62758046", "text": "function check_email($value) {\n\t\tif (!filter_var($value, FILTER_VALIDATE_EMAIL)) {\n\t\treturn array('ok' => false, 'msg' => \"Your email is not valid\");\n\t\t}\n\t\telse return array('ok'=>true,'value'=>$value);\n\t}", "title": "" }, { "docid": "98ad674d1331e3a6fe1a334167ee9615", "score": "0.62724054", "text": "function checkmail($email)\r\n{\r\n if(preg_match(\"(^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\\\.[a-z]{2,4}$)\", $email))\r\n {\r\n return TRUE;\r\n }\r\n return FALSE;\r\n}", "title": "" }, { "docid": "f9a33bccb56dec4b995f8509269905b6", "score": "0.62683207", "text": "function is_valid_email($mail) {\n\t// simple: \t\"/^[-_a-z0-9]+(\\.[-_a-z0-9]+)*@[-a-z0-9]+(\\.[-a-z0-9]+)*\\.[a-z]{2,6}$/i\"\n\t$r = 0;\n\tif($mail) {\n\t\t$p =\t\"/^[-_a-z0-9]+(\\.[-_a-z0-9]+)*@[-a-z0-9]+(\\.[-a-z0-9]+)*\\.(\";\n\t\t// TLD (01-30-2004)\n\t\t$p .=\t\"com|edu|gov|int|mil|net|org|aero|biz|coop|info|museum|name|pro|arpa\";\n\t\t// ccTLD (01-30-2004)\n\t\t$p .=\t\"ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|az|ba|bb|bd|\";\n\t\t$p .=\t\"be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|\";\n\t\t$p .=\t\"cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|\";\n\t\t$p .=\t\"ec|ee|eg|eh|er|es|et|fi|fj|fk|fm|fo|fr|ga|gd|ge|gf|gg|gh|gi|\";\n\t\t$p .=\t\"gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|\";\n\t\t$p .=\t\"im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|\";\n\t\t$p .=\t\"ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mk|ml|\";\n\t\t$p .=\t\"mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|\";\n\t\t$p .=\t\"nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|\";\n\t\t$p .=\t\"py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|\";\n\t\t$p .=\t\"sr|st|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|\";\n\t\t$p .=\t\"tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|\";\n\t\t$p .=\t\"za|zm|zw\";\n\t\t$p .=\t\")$/i\";\n\n\t\t$r = preg_match($p, $mail) ? 1 : 0;\n\t}\n\treturn $r;\n}", "title": "" }, { "docid": "2588a1876950aea2fd5295bae93534da", "score": "0.62673724", "text": "public function testValidEmail()\n {\n $this\n ->submitEmail('[email protected]')\n ->seeSuccessMessage(trans('public.words.forgotten.reminderRequestReceived'));\n }", "title": "" }, { "docid": "36d799abb4d6f6d917f075707c92ce1c", "score": "0.62657344", "text": "public function checkUniqueEmailUpdate()\n\t{\n\t\tif( $this->scenario == 'update' )\n\t\t{\n\t\t\t$user = Members::model()->exists('email=:email AND id!=:id', array(':email'=>$this->email, ':id'=>$this->id));\n\t\t\tif( $user )\n\t\t\t{\n\t\t\t\t$this->addError('email', Yii::t('adminmembers', 'Sorry, That email is already in use by another member.'));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "f78c797ec121d858e2e5b387b1ca12ce", "score": "0.6263349", "text": "function itg_personalization_validate_by_usermail() {\n $input = check_plain($_POST['usermail']);\n $is_user_valid = user_load_by_mail($input);\n if ($is_user_valid) {\n echo 'false';\n }\n else {\n echo 'true';\n }\n}", "title": "" }, { "docid": "ce17235cff30b284ae37a3f5e652e354", "score": "0.6256157", "text": "function verifmail($var)\r\n {\r\n\t $var=filter_var($var,FILTER_VALIDATE_EMAIL);\r\n\t return $var;\r\n }", "title": "" }, { "docid": "985340bc0b9eac9d4a28e4e28b6b2362", "score": "0.625353", "text": "static function validarEmail($email){\n return preg_match('#^[a-z0-9.!\\#$%&\\'*+-/=?^_`{|}~]+@([0-9.]+|([^\\s\\'\"<>]+\\.+[a-z]{2,6}))$#si', $email);\n }", "title": "" }, { "docid": "ee51beb12de007f68c002b2051de56b5", "score": "0.6252252", "text": "public function Check_Email()\n\t{\n\t\t$this->load->library('form_validation');\n\t\t\n\t\t$configValidation = array(\n array(\n 'field' => 'email', \n 'label' => parent::_getFieldTitle('email'), \n 'rules' => 'trim|required|max_length[255]|valid_email|callback__unique_field[email]'\n )\n );\n\n\t\t$this->form_validation->set_rules($configValidation);\n\t\t\t\n\t\tif ($this->form_validation->run() == FALSE)\n\t\t{\n\t\t\tdie( \"<span class='red'>\".validation_errors().\"</span>\" );\n\t\t}\n\t\telse \n\t\t{\n\t\t\tdie( \"<span class='green'>\".language('email_available').\"</span>\" );\n\t\t}\n\t}", "title": "" }, { "docid": "9fd00eaf5dff227b6808742f764a6835", "score": "0.6251902", "text": "private function email($data)\n {\n if (filter_var($data, FILTER_VALIDATE_EMAIL)) {\n return true;\n }else {\n return $data . 'is not a valid email';\n }\n }", "title": "" }, { "docid": "48d192c8bc7b4d72a694179fa7551fd2", "score": "0.6248596", "text": "private function validateFieldEmail($value) {\n if (!valid_email_address($value)) {\n $this->validate = FALSE;\n }\n }", "title": "" } ]
c1e0e6a4175ca8a07c54572f7ee0a77a
Gets the value of cod_prod.
[ { "docid": "bdf2d2dcebcec62b9e6ba80be82ca63b", "score": "0.796934", "text": "public function getCodProd() {\n\t\treturn $this->cod_prod;\n\t}", "title": "" } ]
[ { "docid": "f002aa4ee5f2beba387c9d72dd494ad1", "score": "0.65296024", "text": "public function getProd_cost()\n {\n return $this->prod_cost;\n }", "title": "" }, { "docid": "a8e45929db3f53e956a53e94417f1647", "score": "0.64030486", "text": "public function getQBCProd()\n {\n return $this->qBCProd;\n }", "title": "" }, { "docid": "0237b5112d52b77a0289e549b312b692", "score": "0.6379681", "text": "public function getProValor()\n\t{\n\t\treturn $this->pro_valor;\n\t}", "title": "" }, { "docid": "0ef4c28aeb6eea57fc883fad6ca010e7", "score": "0.6252799", "text": "public function getCodProducto()\n {\n return $this->codProducto;\n }", "title": "" }, { "docid": "69153a991e01a763855f4dc892ed9bb9", "score": "0.6248378", "text": "public function getProductCode()\r\n {\r\n return $this->getField(self::PRODUCT_CODE);\r\n }", "title": "" }, { "docid": "3afae12e613546eb9ab9c1cca522176c", "score": "0.61250913", "text": "public function CelkovaCena()\n\t{\n\t\t$produkty = $this->VypisObsah();\n\t\t$celkovaCena = 0;\n\t\tfor($i = 0; $i<count($produkty);$i++){\n\n\t\t$celkovaCena += $produkty[$i]['cena']*$produkty[$i]['pocet'];\n\t\t}\n\t\treturn $celkovaCena;\n\t}", "title": "" }, { "docid": "91018c27ec897501e219779b6032cdb3", "score": "0.6108291", "text": "public function getProCodigo()\n\t{\n\t\treturn $this->pro_codigo;\n\t}", "title": "" }, { "docid": "281e117182f60d41ab62431290b7ee97", "score": "0.6051371", "text": "public function getProd_price()\n {\n return $this->prod_price;\n }", "title": "" }, { "docid": "9a43be95596c4c07ca511f64919dcbfa", "score": "0.6036653", "text": "function getCode()\n {\n return $this->productCode;\n }", "title": "" }, { "docid": "6fdf27dd370c32ea8e929e49015c9064", "score": "0.6034391", "text": "public function getCodCot()\r\n {\r\n return $this->codCot;\r\n }", "title": "" }, { "docid": "a69320f19cd44e6ece891036421dd1b7", "score": "0.5972366", "text": "public function getProd_unit()\n {\n return $this->prod_unit;\n }", "title": "" }, { "docid": "8a4e1cd1c20fa4bebe2197f9750868be", "score": "0.59334546", "text": "public function getValoriseCp() {\n return $this->valoriseCp;\n }", "title": "" }, { "docid": "83d359f61042d1c333f229307b537b47", "score": "0.5917329", "text": "public function getCodfun()\n {\n return $this->_codfun;\n }", "title": "" }, { "docid": "ef2354b083724e44e8c679b460ab0959", "score": "0.58771056", "text": "public function getProductValue()\n {\n $this->product = $this->factory_adapter->getProductValue();\n\n return $this->product;\n }", "title": "" }, { "docid": "c4636a84d0b074fdacabfb62ab74cda8", "score": "0.5865934", "text": "public function GetValue () \n\t{\n\t\t$this->Value = $this->Local * $this->Price * $this->Count;\n\t\treturn ($this->Value);\n\t}", "title": "" }, { "docid": "5a0862b0af5788bb5bc1557db16e7dbe", "score": "0.57925373", "text": "public function getValue()\n\t{\n\t\treturn $this->amount * $this->unit->getUnit();\n\t}", "title": "" }, { "docid": "e2d154bbe30eafc47770cf337318ed6f", "score": "0.57570165", "text": "public function getProductValueById()\n\t{\n\t\t$product_id = $this->input->post('product_id');\n\t\tif($product_id) {\n\t\t\t$product_data = $this->model_products->getProductData($product_id);\n\t\t\techo json_encode($product_data);\n\t\t}\n\t}", "title": "" }, { "docid": "e2d154bbe30eafc47770cf337318ed6f", "score": "0.57570165", "text": "public function getProductValueById()\n\t{\n\t\t$product_id = $this->input->post('product_id');\n\t\tif($product_id) {\n\t\t\t$product_data = $this->model_products->getProductData($product_id);\n\t\t\techo json_encode($product_data);\n\t\t}\n\t}", "title": "" }, { "docid": "b0c7b3cf73280c8c141a467fb3cb5796", "score": "0.5745254", "text": "public function getProdutoCdProduto()\n {\n return $this->produto_Cd_produto;\n }", "title": "" }, { "docid": "6dbfc0c7daff9e76602904c9f395debc", "score": "0.57275516", "text": "public function getProd_id()\n {\n return $this->prod_id;\n }", "title": "" }, { "docid": "3fb9ba7f0681399630fae7b106487e9b", "score": "0.57240486", "text": "public function setCodProd($cod_prod) {\n\t\t$this->cod_prod = $cod_prod;\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "1dfa4ac58d1a179f9448d663874f0a46", "score": "0.57069093", "text": "public function getPrecioValue()\n {\n return $this->precio->getValue();\n }", "title": "" }, { "docid": "d8482651adde2013f40a994b9d941e8f", "score": "0.5691333", "text": "public function getProductionCost(){\n }", "title": "" }, { "docid": "6e73624ec58c2fb70c27372d93bba0f9", "score": "0.56889284", "text": "public function getCodcaj(){\n\t\treturn $this->codcaj;\n\t}", "title": "" }, { "docid": "6e73624ec58c2fb70c27372d93bba0f9", "score": "0.56889284", "text": "public function getCodcaj(){\n\t\treturn $this->codcaj;\n\t}", "title": "" }, { "docid": "b05686a9758a574dd72f7bd83a209e49", "score": "0.56797856", "text": "public function getCodeValue()\n {\n return $this->codeValue;\n }", "title": "" }, { "docid": "b0eff925295aca510b62d93370762c1a", "score": "0.56614405", "text": "public function getProductCode(): ?string\n {\n return $this->productCode;\n }", "title": "" }, { "docid": "04d613a73c91d8955ea4f70553bd5982", "score": "0.5618895", "text": "public function getCodeValue() {\n return $this->codeValue;\n }", "title": "" }, { "docid": "6cf16b72e105e9fbfac756924f1edd5d", "score": "0.5606449", "text": "public function precio_final($id_prod)\n\t{\n\t\t$query = $this->db->get_where('productos', array('id' => $id_prod))->row_array();\n\t\t$con_descuento = ($query['descuento']) ? $query['precio'] - ($query['precio'] * $query['descuento'] / 100) : $query['precio'];\n\t\t$con_iva = ($query['iva']) ? $con_descuento + ($con_descuento * $query['iva'] / 100) : $con_descuento;\n\t\treturn round($con_iva, 2);\n\t}", "title": "" }, { "docid": "52b09a0efc67bfd97e7b93b1f027f711", "score": "0.5585965", "text": "public function getProd_desc()\n {\n return $this->prod_desc;\n }", "title": "" }, { "docid": "daaa0e520b1d583f2d4e8c2195f79d48", "score": "0.55804974", "text": "public function getValue()\n {\n return $this->money->getValue();\n }", "title": "" }, { "docid": "1351c2fbefe81bd0ef6b9d865db47461", "score": "0.5540902", "text": "public function getProCodigoContable()\n\t{\n\t\treturn $this->pro_codigo_contable;\n\t}", "title": "" }, { "docid": "b73a8a95e0070b41b2c7f0a091347abb", "score": "0.55196536", "text": "public function getCdCentroProducao()\n {\n return $this->cd_centro_producao;\n }", "title": "" }, { "docid": "d5135e12826933d424938cadfbbcd965", "score": "0.5503599", "text": "public function getcpm(){\n\n return $this->getCookieProyectoM();\n }", "title": "" }, { "docid": "8c89ac0049e9445d938d815def015900", "score": "0.5491574", "text": "public function getConducta()\r\n {\r\n return $this->conducta;\r\n }", "title": "" }, { "docid": "74fb7e5638e38122212eae2781ab99b8", "score": "0.5480002", "text": "function coupon_value( $code, $total ) {\r\n\t\treturn ProSites_Helper_Coupons::coupon_value( $code, $total );\r\n\t}", "title": "" }, { "docid": "dc264fa40938ccfbc58cabf82e74b026", "score": "0.54525405", "text": "public function getProEstCodigo()\n\t{\n\t\treturn $this->pro_est_codigo;\n\t}", "title": "" }, { "docid": "15c556ed731b51b9f93a598bedcea975", "score": "0.5445365", "text": "public function getcpm(){\n\n return $this->getCookieProyectoM();\n \t}", "title": "" }, { "docid": "f289b5fd6ab2fe5f19236e8c67edb397", "score": "0.54391694", "text": "public function get_valuation() {\n\n\t\t$product_ids = get_posts( array(\n\t\t\t'post_type' => array( 'product', 'product_variation' ),\n\t\t\t'fields' => 'ids',\n\t\t\t'nopaging' => true,\n\t\t\t'posts_per_page' => - 1,\n\t\t\t'post_status' => 'publish',\n\t\t) );\n\n\t\t$valuation = array( 'at_cost' => 0, 'at_retail' => 0 );\n\n\t\tif ( ! empty( $product_ids ) ) {\n\n\t\t\tforeach ( $product_ids as $product_id ) {\n\n\t\t\t\t$product = wc_get_product( $product_id );\n\n\t\t\t\tif ( ! $product->managing_stock() || $product->is_type( 'variable' ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$stock_qty = (int) $product->get_stock_quantity();\n\t\t\t\t$cost = (float) WC_COG_Product::get_cost( $product );\n\t\t\t\t$price = (float) $product->get_price();\n\n\t\t\t\t$valuation['at_cost'] += $cost * $stock_qty;\n\t\t\t\t$valuation['at_retail'] += $price * $stock_qty;\n\t\t\t}\n\t\t}\n\n\t\treturn $valuation;\n\t}", "title": "" }, { "docid": "62d751a6779907a6f49045086ec97a02", "score": "0.54260993", "text": "public function getCodRua() {\n \n return $this->iCodRua;\n \n }", "title": "" }, { "docid": "ad5100a87e8a8bd2f1038750c6a439e4", "score": "0.5395345", "text": "public function getCodOp()\n {\n return $this->cod_op;\n }", "title": "" }, { "docid": "a4e85656daf571dedb54000ada4fe066", "score": "0.5391878", "text": "function getEntidadeProduto() {\n return $this->entidadeProduto;\n }", "title": "" }, { "docid": "0b140e4319fecb5551221c865d7b5e4a", "score": "0.53913444", "text": "public function getProEjeCodigo()\n\t{\n\t\treturn $this->pro_eje_codigo;\n\t}", "title": "" }, { "docid": "0e76a7936f7d630c6112e079cbf8fc68", "score": "0.53890383", "text": "function getCodeNumeric() {\n\t\treturn $this->getData('codeNumeric');\n\t}", "title": "" }, { "docid": "3a9614d73ed9eefab17cdad884da1012", "score": "0.53789043", "text": "public function getCodiProf($value) {\n\t\treturn $this->codi_prof;\n\t}", "title": "" }, { "docid": "3d06228e929585ff23bc02eee030b5e1", "score": "0.5360522", "text": "public function getProductData(){\r\n\t\treturn $this->product_data;\r\n\t}", "title": "" }, { "docid": "a43bb3dd1e0dbc5c853b0a5ab080dcde", "score": "0.53595966", "text": "public function getOrder_value(){\n\t\t$value=0;\n\t\tforeach($this->list_item as $id => $content){\n\t\t\t$content=(array)$content;\n\t\t\t$product=Product::model()->findByPk($id);\n\t\t\tif(isset($product)){\n\t\t\t\t$value +=$content['amount']*$content['num_price'];\n\t\t\t}\n\t\t}\t\t\n\t\treturn number_format($value, 0, ',', '.').' '.$content['unit_price'];\n\t}", "title": "" }, { "docid": "c396aa6ba826ae30912c9d740f4af052", "score": "0.5353189", "text": "public function getCoaCode()\r\n {\r\n return $this->get(\"coaCode\");\r\n }", "title": "" }, { "docid": "b680ab46594207339353da43a022a8fe", "score": "0.53472346", "text": "public function getCurrencyCode();", "title": "" }, { "docid": "5696f685d339138b8c4692fcf9314cf3", "score": "0.53455675", "text": "function getProduct($p2c_ID){\n \t$q = \"SELECT *\n\t\t\t\tFROM\n\t\t\t\t\t`base_Product_Channel`\n\n\t\t\t\tJOIN `Product`\n\t\t\t\tON `prod_ID` = `p2c_ProductID`\n\n\t\t\t\tJOIN `PureCode`\n\t\t\t\tON `pure_Code` = `prod_PureCode`\n\t\t\t\tJOIN `PureCodeTerminal`\n\t\t\t\tON `trm_ID` = `pure_TerminalID`\n\t\t\t\tJOIN `PureCodeCategory`\n\t\t\t\tON `pcat_ID` = `pure_categoryID`\n\t\t\t\tJOIN `PureCodeType`\n\t\t\t\tON `pct_ID` = `pure_typeID`\n\t\t\t\tJOIN `User`\n\t\t\t\tON `usr_ID` = `pure_LastModifiedBy`\n\n\t\t\t\tJOIN `ProductType`\n\t\t\t\tON `pt_ID` = `prod_ProductTypeID`\n\n\t\t\t\tJOIN `base_Channel`\n\t\t\t\tON `cha_ID` = `p2c_ChannelID`\n\n\t\t\t\tLEFT JOIN `base_Price`\n\t\t\t\tON `prc_ID` = `p2c_PricePolicy`\n\n\t\t\t\tWHERE\n\t\t\t\t\t`p2c_ID` = '$p2c_ID'\";\n\t\t$res = $this->db->query($q);\n\t\treturn $res->fetch_all(MYSQL_ASSOC);\n }", "title": "" }, { "docid": "822213044339e52bdabb6a13e6211602", "score": "0.53441054", "text": "public function getTipoProd(){\n $consulta = \"SELECT GRAL_PAR_PRO_COD,GRAL_PAR_PRO_DESC \n FROM gral_param_propios \n WHERE GRAL_PAR_PRO_GRP=2300 AND GRAL_PAR_PRO_COD <>0\";\n return $this->mysql->query($consulta);\n }", "title": "" }, { "docid": "25c6906805e85fa8892adbdea1e93ac6", "score": "0.53407294", "text": "public function getCartDetailPrice();", "title": "" }, { "docid": "3f9d65212b51942ca7cf6dda75506bb4", "score": "0.5337431", "text": "function getProduct_price_curr() { return $this->product_price_curr; }", "title": "" }, { "docid": "ef87a678ea4cc7b3e708f830067f191c", "score": "0.53370255", "text": "public function getCurrencyCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "9c0030f6da3fa99c20e4c415bb4704ef", "score": "0.5323866", "text": "public function getproductprice(Request $request){\n $data = $request->all();\n //echo \"<pre>\"; print_r($data); die;\n $proArr = explode(\"-\",$data['idSize']);\n $proAttr = product_attributes::where(['product_id' => $proArr[0],'size' => $proArr[1]])->first();\n /* $getCurrencyRates = Product::getCurrencyRates($proAttr->price);\n echo $proAttr->price.\"-\".$getCurrencyRates['USD_Rate'].\"-\".$getCurrencyRates['GBP_Rate'].\"-\".$getCurrencyRates['EUR_Rate']; */\n echo $proAttr->price;\n echo \"#\";\n echo $proAttr->stock;\n }", "title": "" }, { "docid": "5217ea78fead21fff41efc422aa5db4e", "score": "0.5317342", "text": "public function nactiProdukty(){\n return $this->produkty;\n }", "title": "" }, { "docid": "0f7a90ec4263c2f9052b55a8aa033f72", "score": "0.53155893", "text": "public function getCCHProductCodes() {\n $curl = curl_init($this->URL.'entity/productMapping/getCCHProductCodes');\n \n\t\t\t\t//Attach the header\n curl_setopt($curl, CURLOPT_HTTPHEADER, $this->multiHeaders);\n \n\t\t\t\t//Make the call and then close the connection\n $response = curl_exec($curl);\n curl_close($curl);\n }", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5312467", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5312467", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5312467", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5312467", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5312467", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5312467", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5312467", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5312467", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5312467", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5312467", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5312467", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5312467", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5312467", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5312467", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5312467", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5312467", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5312467", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5312467", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5312467", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5312467", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5312467", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5312467", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5312467", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5312467", "text": "public function getValue();", "title": "" }, { "docid": "a9198a61aed90c0b7fadaa690ea567f2", "score": "0.5305938", "text": "public function getQuantidade() {\n return $this->nQuantidade;\n }", "title": "" }, { "docid": "38197c791ba7b8a5a95af18d54d59c69", "score": "0.52897763", "text": "public function getCodtipfun()\n {\n return $this->_codtipfun;\n }", "title": "" }, { "docid": "a5b26a965a971bbe9f6de9aa0e06125a", "score": "0.5289193", "text": "public function getCode() : string\n {\n return $this->currencyCode;\n }", "title": "" }, { "docid": "31f93aa68ad78d4a0ad36dd803bde87f", "score": "0.52878064", "text": "public function getProductUseCode($product_id){\r\n\t\treturn $this->db->select('p.*,t.purchase_tax_value as tax_value')\r\n\t\t\t ->from('products p')\r\n\t\t\t ->join('tax t','p.tax_id = t.tax_id','left')\r\n\t\t\t ->where('p.product_id',$product_id)\r\n\t\t ->get()\r\n\t\t ->result();\r\n\t}", "title": "" }, { "docid": "815b5be67caf2c880dc15c4a6b16b7cd", "score": "0.5285369", "text": "public function getStockValueAttribute()\n {\n return $this->stockQuantity * $this->cost_price;\n }", "title": "" }, { "docid": "c80a604044e619f13d50a31c74d69ff2", "score": "0.52833664", "text": "public function getcbopensionentidad() {\n\t\t\n\t\t$idpension = $this->input->post('idpension');\n\t\t$resultado = $this->mcontratos->getcbopensionentidad($idpension);\n\t\techo json_encode($resultado);\n\t}", "title": "" }, { "docid": "1ff4db0270ba24d6d68243840defdf60", "score": "0.52779377", "text": "public function getPlantCode()\r\n {\r\n $filePath = '/var/log/Redington_Catalog_Qty.log';\r\n try {\r\n $salesOrg = $this->getSalesOrg();\r\n $distribution = $this->getDistributionChannel();\r\n $sourceCollection = $this->sourceCollectionFactory->create()\r\n ->addFieldToFilter('enabled', 1)\r\n ->addFieldToFilter('distribution', $distribution)\r\n ->addFieldToFilter('sap_account_code', $salesOrg);\r\n return $sourceCollection->getFirstItem()->getPlantCode();\r\n } catch (\\Exception $e) {\r\n $this->logMessage('Error in getting pant code'.$e->getMessage(), $filePath);\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "cb7117141b5ea1413c9fb554022cc733", "score": "0.5274962", "text": "public function getProTippCodigo()\n\t{\n\t\treturn $this->pro_tipp_codigo;\n\t}", "title": "" }, { "docid": "46d68e08a26e8060a6ed3ff495d5f646", "score": "0.52723986", "text": "public function getValue(IsotopeProduct $product);", "title": "" }, { "docid": "7bd0facfb906b1940430ca6ba3ffa9f0", "score": "0.52708095", "text": "function retrieve_voucher_value()\n\t{\n\t\t$data = array();\n\t\t$coupon_id = ($this->input->post('voucher_id')) ? $this->input->post('voucher_id') : 0;\n\t\t$payment = ($this->input->post('payment')) ? $this->input->post('payment') : '';\n\t\t//$coupon_id = 1;\n\t\t//$payment = 'Point';\n\t\n\t\t//check table first\n\t\t$vouchers = $this->Voucher_model->get_voucher($coupon_id);\n\t\n\t\n\t\t$value = 0;\n\t\tif($vouchers){\n\t\t\tif($payment == 'Credit'){\n\t\t\t\t$value = $vouchers->credit_consume;\n\t\t\t}else{\n\t\t\t\t$value = $vouchers->point_consume;\n\t\t\t}\n\t\t}else{\n\t\t\t$value\t\t= 0;\n\t\t}\n\t\n\t\techo $value;\n\t}", "title": "" }, { "docid": "3a38cd3276342141ef210e2970a2c7af", "score": "0.52678514", "text": "public function getFedExCSPProductId() {\r\n return inship_fedexship_get($this->handle, 16 );\r\n }", "title": "" }, { "docid": "a68cb6a33be6be29e191ef32b681af4b", "score": "0.526637", "text": "public function getEstadoProd(){\n $consulta = \"SELECT GRAL_PAR_PRO_COD,GRAL_PAR_PRO_DESC \n FROM gral_param_propios \n WHERE GRAL_PAR_PRO_GRP=2200 AND GRAL_PAR_PRO_COD <>0\";\n return $this->mysql->query($consulta);\n }", "title": "" }, { "docid": "3ebb3b285eb24bb5e56a40240a2f0f3f", "score": "0.5264469", "text": "function findProdotto($finalOutput,$cod){\n $sum = 0;\n for($i=0; $i< count($finalOutput);$i++){\n if($finalOutput[$i][0] == $cod){\n $sum+=$finalOutput[i][3];\n }\n }\n return $sum;\n }", "title": "" }, { "docid": "8a735e96acd65b36d4dbd71c773b9f73", "score": "0.5254555", "text": "public function get_price_value()\n {\n return $this->price_value;\n }", "title": "" }, { "docid": "7a0f451ec708599340d6ca60172a80f2", "score": "0.5251346", "text": "function getC_p()\n {\n if (!isset($this->sc_p) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->sc_p;\n }", "title": "" }, { "docid": "c64ed785ca0413950315823ee961c7f6", "score": "0.52417696", "text": "public function getCartelle() {\n \treturn $this->cartelle;\n }", "title": "" }, { "docid": "8dc5b9bbc14a79ef99676a953d9d8030", "score": "0.5235645", "text": "public function getCurrencyCode()\n\t{\n\t\t$column = self::COL_CURRENCY_CODE;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (string)$v;\n\t\t}\n\n\t\treturn $v;\n\t}", "title": "" }, { "docid": "3202b626c014493c6fc3692250d52d98", "score": "0.5230881", "text": "public function getGoodsValue()\n {\n return $this->goodsValue;\n }", "title": "" }, { "docid": "361f28421f31f46e7b8e83a169ca8e8c", "score": "0.5229157", "text": "private function getLootValue()\n {\n return array_reduce($this->items, function ($carry, $item) {\n return $carry + ($item['data']['vendor_value'] * $item['quantity']);\n });\n }", "title": "" } ]
e80ef97d98ec29d09f4f6f8836f424b8
/ get previous and next links to base on event date instead of publication date; Display navigation to next/previous post when applicable.
[ { "docid": "e1294557ad41ad457b844b6427346ed0", "score": "0.7164605", "text": "function twentythirteen_post_nav() {\r\n\tglobal $post;\r\n \r\n if($post->post_type === \"bf_events\") {\r\n global $wpdb;\r\n $now = time() + ( get_option( 'gmt_offset' ) * 3600 );\r\n $today = intval( $now / 86400 ) * 86400;\r\n $previous = $wpdb->get_row(\"SELECT `wp_posts`.`ID`, `wp_posts`.`post_title` as title\r\n FROM $wpdb->postmeta wp_postmeta\r\n LEFT JOIN $wpdb->posts wp_posts ON `wp_postmeta`.`post_id` = `wp_posts`.`ID` \r\n WHERE `wp_postmeta`.`meta_key` = 'bf_events_startdate'\r\n AND `wp_postmeta`.`meta_value` < \" . get_post_meta($post->ID, 'bf_events_startdate', true) . \"\r\n AND wp_posts.post_status = 'publish'\r\n ORDER BY wp_postmeta.meta_value DESC\r\n LIMIT 1\");\r\n $next = $wpdb->get_row(\"SELECT `wp_posts`.`ID`, `wp_posts`.`post_title` as title\r\n FROM $wpdb->postmeta wp_postmeta\r\n LEFT JOIN $wpdb->posts wp_posts ON `wp_postmeta`.`post_id` = `wp_posts`.`ID` \r\n WHERE `wp_postmeta`.`meta_key` = 'bf_events_startdate'\r\n AND `wp_postmeta`.`meta_value` > \" . get_post_meta($post->ID, 'bf_events_startdate', true) . \"\r\n AND wp_posts.post_status = 'publish'\r\n ORDER BY wp_postmeta.meta_value ASC\r\n LIMIT 1\");\r\n } else {\r\n\r\n\r\n // Don't print empty markup if there's nowhere to navigate.\r\n $previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true );\r\n $next = get_adjacent_post( false, '', false );\r\n }\r\n\r\n\tif ( ! $next && ! $previous )\r\n\t\treturn;\r\n\t?>\r\n\t<nav class=\"navigation post-navigation\" role=\"navigation\">\r\n\t\t<h1 class=\"screen-reader-text\"><?php _e( 'Post navigation', 'twentythirteen' ); ?></h1>\r\n\t\t<div class=\"nav-links\">\r\n <?php\r\n if($post->post_type === \"bf_events\" ) {\r\n if($previous) { ?>\r\n <a href=\"<?=home_url('?post_type=bf_events&p=' . $previous->ID)?>\" rel=\"prev\"><span class=\"meta-nav\">←</span> <?=$previous->title;?></a>\r\n <?php }\r\n if($next) { ?>\r\n <a href=\"<?=home_url('?post_type=bf_events&p=' . $next->ID);?>\" rel=\"next\"> <?=$next->title;?> <span class=\"meta-nav\">→</span></a>\r\n <?php }\r\n } else {\t\r\n\t\t\tprevious_post_link( '%link', _x( '<span class=\"meta-nav\">&larr;</span> %title', 'Previous post link', 'twentythirteen' ) ); \r\n\t\t\tnext_post_link( '%link', _x( '%title <span class=\"meta-nav\">&rarr;</span>', 'Next post link', 'twentythirteen' ) );\r\n } ?>\r\n\r\n\t\t</div><!-- .nav-links -->\r\n\t</nav><!-- .navigation -->\r\n\t<?php\r\n}", "title": "" } ]
[ { "docid": "bb49e2e51703a280c5d83edf7bbb60f2", "score": "0.6711074", "text": "public function getPreviousLink();", "title": "" }, { "docid": "186f70a422710c212da2eb1b09161ed8", "score": "0.66177243", "text": "function classic_get_previous_post_link() {\t\n\t$settings = wptouch_get_settings();\n\n\t$prev_post = get_adjacent_post( false, $settings->classic_excluded_categories ); \n\tif ( $prev_post ) {\n\t\t$prev_url = get_permalink( $prev_post->ID ); \n\t\techo '<a href=\"' . $prev_url . '\" class=\"nav-back ajax-link\">' . __( \"Prev\", \"wptouch-pro\" ) . '</a>';\n\t}\n}", "title": "" }, { "docid": "ce2bd2fcc049a024b5b55f1c4dd83ef5", "score": "0.6537228", "text": "function print_previous_video_link( $before = '', $after = '' ) {\n $previous_video = get_previous_post( TRUE, ' ', 'playlist' );\n if ( $previous_video ) {\n $number = get_post_meta( $previous_video->ID, '_episode', true );\n previous_post_link( $before . '%link' . $after, $number . '. %title', TRUE, ' ', 'playlist' );\n } else {\n _e( 'You are at the first episode', 'makigas-theme' );\n }\n}", "title": "" }, { "docid": "7c38bf6483f9156f7debece50b742aeb", "score": "0.64916176", "text": "function _get_nav() {\n global $ec3;\n $idprev = '';\n $idnext = '';\n if(empty($this->id)) {\n $ec3previd = \"ec3_prev\";\n $ec3nextid = \"ec3_next\";\n $ec3spinnerid = \"ec3_spinner\";\n $ec3publishid = \"ec3_publish\";\n } else {\n $ec3previd = \"$this->id-ec3_prev\";\n $ec3nextid = \"$this->id-ec3_next\";\n $ec3spinnerid = \"$this->id-ec3_spinner\";\n $ec3publishid = \"$this->id-ec3_publish\";\n if($this->id=='wp-calendar') {\n // For compatibility with standard wp-calendar.\n $idprev = ' id=\"prev\"';\n $idnext = ' id=\"next\"';\n }\n }\n $nav = '\n <thead>\n <tr class=\"nav\">\n ';\n\n // Previous month\n $prev=$this->begin_dateobj->prev_month();\n $nav .= '\n <td'.$idprev.'><a id=\"'.$ec3previd.'\" href=\"'.$prev->month_link($this->show_only_events).'\">&laquo;&nbsp;'.$prev->month_abbrev().'</a></td>\n ';\n // Selected month\n $title = sprintf(\n __('View posts for %1$s %2$s'),\n $this->begin_dateobj->month_name(),\n $this->begin_dateobj->year_num\n );\n $nav .= '\n <td colspan=\"5\">\n <a href=\"'.$this->begin_dateobj->month_link($this->show_only_events).'\" title=\"'. $title .'\">'.$this->begin_dateobj->month_name().' '.$this->begin_dateobj->year_num.'</a>\n </td>\n ';\n // Next month\n $next=$this->limit_dateobj;\n $nav .= '\n <td'.$idnext.'><a id=\"'.$ec3nextid.'\" href=\"'.$next->month_link($this->show_only_events).'\"'.'>'.$next->month_abbrev().'&nbsp;&raquo;</a></td>\n </tr>\n '.$this->_thead.'\n </thead>\n <tfoot>\n <tr>\n <td colspan=\"7\">\n <img id=\"'.$ec3spinnerid.'\" style=\"display:none\" src=\"'.$ec3->myfiles.'/images/loading.gif\" alt=\"spinner\" />\n ';\n // iCalendar link.\n $webcal=get_feed_link('ical');\n // Macintosh always understands webcal:// protocol.\n // It's hard to guess on other platforms, so stick to http://\n if(strstr($_SERVER['HTTP_USER_AGENT'],'Mac OS X'))\n $webcal=preg_replace('/^http:/','webcal:',$webcal);\n $nav .= '\n <a id=\"'.$ec3publishid.'\" href=\"'.$webcal.'\" title=\"'.__('Subscribe to iCalendar.','ec3').'\"><img src=\"'.$ec3->myfiles.'/images/ical-icon_12x12px.gif\" alt=\"iCalendar\" /></a>\n ';\n $nav .= '\n </td>\n </tr>\n </tfoot>\n';\n return $nav;\n }", "title": "" }, { "docid": "a8e8389fbec419cd1b6e90b743c6324b", "score": "0.6478501", "text": "function ipress_prev_next_posts_nav() {\n\n // get prev & next links\n $prev_link = get_previous_posts_link( '&#x000AB; ' . __( 'Previous', 'ipress' ) );\n $next_link = get_next_posts_link( __( 'Next', 'ipress' ) . ' &#x000BB;' );\n\n // set link html\n $prev = $prev_link ? '<div class=\"pagination-previous alignleft\">' . $prev_link . '</div>' : '';\n $next = $next_link ? '<div class=\"pagination-next alignright\">' . $next_link . '</div>' : '';\n\n // set link wrapper\n $nav = ipress_html( [\n 'html' => '<div %s>',\n 'context' => 'archive-pagination',\n 'echo' => false,\n ] );\n\n // construct link\n $nav .= $prev . $next . '</div>';\n \n // output if valid\n if ( $prev || $next ) { echo $nav; }\n}", "title": "" }, { "docid": "91b967302658abdae8f48d10794cf9c4", "score": "0.6358696", "text": "function dbdb_prev_page_link() {\n\tglobal $post;\n\t\n\tif ( isset($post->post_parent) && $post->post_parent > 0 ) {\n\t$children = get_pages('&sort_column=post_date&sort_order=asc&child_of='.$post->post_parent.'&parent='.$post->post_parent);\n\t};\n\t\n\t// throw the children ids into an array\n\tforeach( $children as $child ) { $child_id_array[] = $child->ID; }\n\t\n\t$prev_page_id = relative_value_array($child_id_array, $post->ID, -1);\n\t\n\t$output = '';\n\tif( '' != $prev_page_id ) {\n\t$output .= '<a href=\"' . get_page_link($prev_page_id) . '\"><span class=\"fa fa-angle-double-left\" aria-hidden=\"true\"></span> '. get_the_title($prev_page_id) . '</a>';\n\t}\n\treturn $output;\n\t}", "title": "" }, { "docid": "da9144f4842194f79c8939d8429a16e0", "score": "0.6350288", "text": "function topic_nav_links() {\n\treturn '<div class=\"topic-nav\"><span class=\"nav-next\">' .\n\t\tget_next_post_link('%link', 'Next Topic <span style=\"font-family: ETmodules;\">&#x3d;</span>', true, [], 'project_category') .\n\t\t'</span><span class=\"nav-previous\">' .\n\t\tget_previous_post_link('%link', '<span style=\"font-family: ETmodules;\">&#x3c;</span> Previous Topic', true, [], 'project_category') .\n\t\t'</span></div>';\n}", "title": "" }, { "docid": "e4e80e52c63ecb92c4511971a6de82f9", "score": "0.6311508", "text": "function _udyux_get_prev_paged_link() {\n\tglobal $paged;\n $paged = $paged ?: 1;\n return array(\n 'link' => is_paged() ? get_pagenum_link($paged - 1) : null,\n 'label' => get_field('paged_nav_prev_label', 'options')\n );\n}", "title": "" }, { "docid": "48cc39bba4d820010c5a0091c1fd4beb", "score": "0.6302698", "text": "function displayPreviousEvents(){\n $sql = 'SELECT id, title, date, event_id, type FROM events';\n $ret = execSQL($sql);\n if(!$ret){\n return false;\n }else{\n echo '<table>\n <tr>\n <th>Title</th>\n <th>Date</th>\n <th>Event</th>\n <th>Type</th>\n <th>Link</th>\n </tr>';\n while($row = $ret->fetchArray(SQLITE3_ASSOC)){\n echo '<tr>\n <td>' . $row['title'] . '</td>\n <td>' . $row['date'] . '</td>\n <td>' . getEventTitle($row['event']) . '</td>\n <td>' . $row['type'] . '</td>\n <td><a href=\"event_display.php?id=' . $row['id'] . '\">Click Here</a></td> \n </tr>';\n }\n echo '</table>';\n }\n }", "title": "" }, { "docid": "2b79a8173022e71e1cc625d5c1b217d3", "score": "0.62736297", "text": "function charity_is_hope_tribe_events_get_period_links($links, $page, $delimiter='') {\n\t\tif (!empty($links)) return $links;\n\t\tglobal $post;\n\t\tif ($page == 'tribe_day' && is_object($post))\n\t\t\t$links = '<a class=\"breadcrumbs_item cat_parent\" href=\"' . esc_url(tribe_get_gridview_link(false)) . '\">' . date_i18n(tribe_get_option('monthAndYearFormat', 'F Y' ), strtotime(tribe_get_month_view_date())) . '</a>';\n\t\treturn $links;\n\t}", "title": "" }, { "docid": "8698353047f436cc76493575f4cf902b", "score": "0.6230501", "text": "function wp_link_pages_args_prevnext_add($args) {\r\n global $page, $numpages, $more, $pagenow;\r\n\r\n if (!$args['next_or_number'] == 'next_and_number') \r\n return $args; \r\n\r\n $args['next_or_number'] = 'number'; // Keep numbering for the main part\r\n if (!$more)\r\n return $args;\r\n\r\n if($page-1) // There is a previous page\r\n $args['before'] .= _wp_link_page($page-1)\r\n . $args['link_before']. $args['previouspagelink'] . $args['link_after'] . '</a>';\r\n\r\n if ($page<$numpages) // There is a next page\r\n $args['after'] = _wp_link_page($page+1)\r\n . $args['link_before'] . $args['nextpagelink'] . $args['link_after'] . '</a>'\r\n . $args['after'];\r\n\r\n return $args;\r\n}", "title": "" }, { "docid": "32d8901aea6be935880a6146d1c63298", "score": "0.6200654", "text": "function photoblogster_post_navigation() {\n\t// Don't print empty markup if there's nowhere to navigate.\n\t$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );\n\t$next = get_adjacent_post( false, '', false );\n\n\tif ( ! $next && ! $previous ) {\n\t\treturn;\n\t}\n\t?>\n\t<nav class=\"navigation\">\n\t\t<h2 class=\"screen-reader-text\"><?php esc_html_e( 'Post navigation', 'photoblogster' ); ?></h2>\n\t\t<div class=\"nav-links\">\n\t\t\t<div class=\"row\">\n\t\t\t\t<!-- Get Next Post -->\n\t\t\t<?php\n\t\t\t$prev_post = get_previous_post();\n\t\t\tif (!empty( $prev_post )){\n\t\t\t\t?>\n\t\t\t\t<div class=\"col-md-6 prev-article\">\n\t\t\t\t\t<a class=\"\" href=\"<?php echo esc_url(get_permalink( $prev_post->ID )); ?>\"><span class=\"next-prev-text\"><?php esc_html_e('Previous ','photoblogster'); ?>\n\t\t\t\t\t</span><p><?php if(get_the_title( $prev_post->ID ) != ''){echo get_the_title( $prev_post->ID );} else { esc_html_e('Previous Post','photoblogster'); }?></p></a>\n\t\t\t\t</div>\n\t\t\t\t<?php } \n\t\t\t\telse { \n\t\t\t\t\techo '<div class=\"col-md-6\">';\n\t\t\t\t\techo '</div>';\n\t\t\t\t} ?>\n\n\t\t\t\t<?php\n\t\t\t\t$next_post = get_next_post();\n\t\t\t\tif ( is_a( $next_post , 'WP_Post' ) ) { \n\t\t\t\t\t?>\n\t\t\t\t\t<div class=\"col-md-6 next-article\">\n\t\t\t\t\t\t<a class=\"\" href=\"<?php echo esc_url(get_permalink( $next_post->ID )); ?>\"><span class=\"next-prev-text\">\n\t\t\t\t\t\t\t<?php esc_html_e(' Next','photoblogster'); ?></span><p><?php if(get_the_title( $next_post->ID ) != ''){echo get_the_title( $next_post->ID );} else { esc_html_e('Next Post','photoblogster'); }?></p></a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<?php } \n\t\t\t\t\t\telse { \n\t\t\t\t\t\t\techo '<div class=\"col-md-6\">';\n\t\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t} ?>\n\n\t\t\t\t\t\t<!-- Get Previous Post -->\n\n\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div><!-- .nav-links -->\n\t\t\t\t</nav><!-- .navigation-->\n\t\t\t\t<?php\n\t\t\t}", "title": "" }, { "docid": "db5d703f67951dedcb0d09c78e44935e", "score": "0.6187484", "text": "function ipress_prev_next_post_nav() {\n\n // single post only\n if ( ! is_singular( 'post' ) ) { return; }\n\n // start wrapper\n $output = ipress_html( [\n 'html' => '<div %s>',\n 'context' => 'adjacent-post-pagination',\n 'echo' => false\n ] );\n\n // genrate output\n $output .= sprintf( '<div class=\"pagination-previous alignleft\">%s</div>', previous_post_link() );\n $output .= sprintf( '<div class=\"pagination-next alignright\">%s</div></div>', next_post_link() );\n\n // send output\n echo $output;\n}", "title": "" }, { "docid": "1a0327ce2695a3880cbfe42267b74737", "score": "0.61702776", "text": "function digicorp_prev_next_links() {\n if ( 'post' === get_post_type() ) : ?>\n <div class=\"blog-micro-wrapper\">\n <div class=\"postpager\">\n <ul class=\"pager row\">\n <li class=\"previous col-md-6 col-sm-12 text-right\">\n <?php\n $prev_post = get_previous_post(true);\n if (!empty($prev_post)) {\n $prev_thumb_url = get_the_post_thumbnail_url($prev_post,'thumbnail');\n if ( empty($prev_thumb_url) ) { $prev_thumb_url = get_template_directory_uri() . '/assets/dist/images/post-default.png'; }\n ?>\n <div class=\"post\">\n <div class=\"mini-widget-thumb\">\n <a href=\"<?php echo esc_url(get_permalink($prev_post->ID)); ?>\">\n <img alt=\"<?php echo esc_attr($prev_post->post_title) ?>\" src=\"<?php echo esc_url($prev_thumb_url) ?>\" class=\"img-responsive alignright img-circle\">\n </a>\n </div>\n <div class=\"mini-widget-title\">\n <a href=\"<?php echo esc_url(get_permalink($prev_post->ID)); ?>\"><?php echo esc_attr($prev_post->post_title) ?><br/>\n <small><?php _e('< Previous Post', 'digicorpdomain' ); ?></small></a>\n </div>\n </div>\n <?php } ?>\n </li>\n <li class=\"next col-md-6 col-sm-12 text-left\">\n <?php\n $next_post = get_next_post(true);\n if (!empty($next_post)) {\n $next_thumb_url = get_the_post_thumbnail_url($next_post,'thumbnail');\n if ( empty($next_thumb_url) ) { $next_thumb_url = get_template_directory_uri() . '/assets/dist/images/post-default.png'; }\n ?>\n <div class=\"post\">\n <div class=\"mini-widget-thumb\">\n <a href=\"<?php echo esc_url(get_permalink($next_post->ID)); ?>\">\n <img alt=\"<?php echo esc_attr($next_post->post_title) ?>\" src=\"<?php echo esc_url($next_thumb_url) ?>\" class=\"img-responsive alignleft img-circle\">\n </a>\n </div>\n <div class=\"mini-widget-title\">\n <a href=\"<?php echo esc_url(get_permalink($next_post->ID)); ?>\"><?php echo esc_attr($next_post->post_title) ?><br/>\n <small><?php _e('Next Post >', 'digicorpdomain' ); ?></small></a>\n </div>\n </div>\n <?php } ?>\n </li>\n </ul>\n </div><!-- end postpager -->\n </div><!-- end post-micro -->\n <?php endif;\n }", "title": "" }, { "docid": "8f8c4e720bbf2711cf28dd7938705320", "score": "0.6164428", "text": "private function createNavigation() {\n $nextMonth = $this->todayMonth == 12 ? 1 : intval($this->todayMonth) + 1;\n $nextYear = $this->todayMonth == 12 ? intval($this->todayYear) + 1 : $this->todayYear;\n $preMonth = $this->todayMonth == 1 ? 12 : intval($this->todayMonth) - 1;\n $preYear = $this->todayMonth == 1 ? intval($this->todayYear) - 1 : $this->todayYear;\n\n return\n '<div class=\"header\">' .\n '<a class=\"prev\" href=\"/home_maintenance_manager/public/calendarcontroller/0' . $preMonth . '/' . $preYear . '\"><</a>' .\n '<span class=\"title\">' . date('Y M', strtotime($this->todayYear . '-' . $this->todayMonth . '-1')) . '</span>' .\n '<a class=\"next\" href=\"/home_maintenance_manager/public/calendarcontroller/0' . $nextMonth . '/' . $nextYear . '\">></a>' .\n '</div>';\n }", "title": "" }, { "docid": "9ee6701460de8edac20d24a3f5b99352", "score": "0.61282283", "text": "function classic_archive_navigation_back() {\n\tif ( is_search() ) {\n\t\tprevious_posts_link( __( 'Back in Search', \"wptouch-pro\" ) );\n\t} elseif ( is_category() ) {\n\t\tprevious_posts_link( __( 'Back in Category', \"wptouch-pro\" ) );\n\t} elseif ( is_tag() ) {\n\t\tprevious_posts_link( __( 'Back in Tag', \"wptouch-pro\" ) );\n\t} elseif ( is_day() ) {\n\t\tprevious_posts_link( __( 'Back One Day', \"wptouch-pro\" ) );\n\t} elseif ( is_month() ) {\n\t\tprevious_posts_link( __( 'Back One Month', \"wptouch-pro\" ) );\n\t} elseif ( is_year() ) {\n\t\tprevious_posts_link( __( 'Back One Year', \"wptouch-pro\" ) );\n\t}\n}", "title": "" }, { "docid": "cb8f9b9fcf125516fca0a142fbd4cac1", "score": "0.61076045", "text": "function charity_is_hope_tribe_events_previous_month() {\n\t\t$url = tribe_get_previous_month_link();\n\t\t$text = tribe_get_previous_month_text();\n\t\t$date = Tribe__Events__Main::instance()->previousMonth( tribe_get_month_view_date() );\n\t\treturn '<a data-month=\"' . $date . '\" href=\"' . esc_url($url ). '\" rel=\"prev\"><span>&laquo;</span> ' . $text . ' </a>';\n\t}", "title": "" }, { "docid": "8888e02ddc8c481a9e1a6034685d2f5b", "score": "0.6107296", "text": "function wp_link_pages_args_prevnext_add($args)\n{\n\tglobal $page, $numpages, $more, $pagenow;\n\n\tif (!$args['next_or_number'] == 'next_and_number')\n return $args; # exit early\n\n $args['next_or_number'] = 'number'; # keep numbering for the main part\n if (!$more)\n return $args; # exit early\n\n if($page-1) # there is a previous page\n $args['before'] .= '<li>' . _wp_link_page($page-1)\n . $args['link_before']. $args['previouspagelink'] . $args['link_after'] . '</a></li>'\n ;\n\n if ($page<$numpages) # there is a next page\n $args['after'] = '<li>' . _wp_link_page($page+1)\n . $args['link_before'] . $args['nextpagelink'] . $args['link_after'] . '</a></li>'\n . $args['after']\n ;\n\n return $args;\n}", "title": "" }, { "docid": "daf16a2e1ca32a233cb27a9971c6b2fb", "score": "0.60735023", "text": "public function getPreviousPageUrl();", "title": "" }, { "docid": "b6d7da5573d38e1a59b98add4df6a615", "score": "0.60312927", "text": "function us_get_post_prevnext() {\n\n\t// TODO Create for singular pages https://codex.wordpress.org/Next_and_Previous_Links#The_Next_and_Previous_Pages\n\t$result = array();\n\tif ( is_singular( 'us_portfolio' ) ) {\n\t\tglobal $us_post_prevnext_exclude_ids;\n\t\tif ( $us_post_prevnext_exclude_ids === NULL ) {\n\t\t\t// Getting the list of portfolio items that are not supposed to have their own pages (external links or lightboxes)\n\t\t\tglobal $wpdb;\n\t\t\t$wpdb_query = 'SELECT `post_id` FROM `' . $wpdb->postmeta . '` ';\n\t\t\t$wpdb_query .= 'WHERE (`meta_key`=\\'us_lightbox\\' AND `meta_value`=\\'1\\') ';\n\t\t\t$wpdb_query .= 'OR (`meta_key`=\\'us_custom_link\\' AND `meta_value` != \\'\\')';\n\t\t\t$us_post_prevnext_exclude_ids = apply_filters( 'us_get_post_prevnext_exclude_ids', $wpdb->get_col( $wpdb_query ) );\n\t\t\tif ( ! empty( $us_post_prevnext_exclude_ids ) ) {\n\t\t\t\tadd_filter( 'get_next_post_where', 'us_exclude_hidden_portfolios_from_prevnext' );\n\t\t\t\tadd_filter( 'get_previous_post_where', 'us_exclude_hidden_portfolios_from_prevnext' );\n\t\t\t}\n\t\t}\n\t\t$in_same_term = ! ! us_get_option( 'portfolio_prevnext_category' );\n\t\t$next_post = get_next_post( $in_same_term, '', 'us_portfolio_category' );\n\t\t$prev_post = get_previous_post( $in_same_term, '', 'us_portfolio_category' );\n\t} else {\n\t\t$next_post = get_next_post( FALSE );\n\t\t$prev_post = get_previous_post( FALSE );\n\t}\n\tif ( ! empty( $prev_post ) ) {\n\t\t$result['prev'] = array(\n\t\t\t'link' => get_permalink( $prev_post->ID ),\n\t\t\t'title' => get_the_title( $prev_post->ID ),\n\t\t\t'meta' => __( 'Previous post', 'us' ),\n\t\t);\n\t}\n\tif ( ! empty( $next_post ) ) {\n\t\t$result['next'] = array(\n\t\t\t'link' => get_permalink( $next_post->ID ),\n\t\t\t'title' => get_the_title( $next_post->ID ),\n\t\t\t'meta' => __( 'Next post', 'us' ),\n\t\t);\n\t}\n\n\treturn $result;\n}", "title": "" }, { "docid": "e7298737e9bc9779174d0d7751a6b0ad", "score": "0.60222745", "text": "function listing_manager_front_woocommerce_add_next_prev() {\n\tget_template_part( 'templates/content', 'next-prev-links' );\n}", "title": "" }, { "docid": "1fb179611eefde62c02a9416e9dc060c", "score": "0.6014713", "text": "function enable_custom_date_adjacent_post_link( string $post_type, string $meta_key ): void {\n\tadd_filter(\n\t\t'get_next_post_join',\n\t\tfunction ( $join, $in_same_term, $excluded_terms, $tx, $post ) use ( $post_type, $meta_key ) {\n\t\t\tglobal $wpdb;\n\t\t\tif ( $post->post_type === $post_type ) {\n\t\t\t\t$join .= \" INNER JOIN $wpdb->postmeta ON ( p.ID = $wpdb->postmeta.post_id )\";\n\t\t\t}\n\t\t\treturn $join;\n\t\t},\n\t\t10,\n\t\t5\n\t);\n\tadd_filter(\n\t\t'get_next_post_where',\n\t\tfunction ( $where, $in_same_term, $excluded_terms, $tx, $post ) use ( $post_type, $meta_key ) {\n\t\t\tglobal $wpdb;\n\t\t\tif ( $post->post_type === $post_type ) {\n\t\t\t\t$m = get_post_meta( $post->ID, $meta_key, true );\n\t\t\t\t$where = preg_replace( '/(p.post_date [><] \\'.*\\') AND/U', \"( $wpdb->postmeta.meta_key = '$meta_key' ) AND ( ( $wpdb->postmeta.meta_value = '$m' AND $1 ) OR ( $wpdb->postmeta.meta_value > '$m' ) ) AND\", $where );\n\t\t\t}\n\t\t\treturn $where;\n\t\t},\n\t\t10,\n\t\t5\n\t);\n\tadd_filter(\n\t\t'get_next_post_sort',\n\t\tfunction ( $sort, $post ) use ( $post_type, $meta_key ) {\n\t\t\tglobal $wpdb;\n\t\t\tif ( $post->post_type === $post_type ) {\n\t\t\t\t$sort = str_replace( 'ORDER BY', \"ORDER BY CAST($wpdb->postmeta.meta_value AS DATE) ASC,\", $sort );\n\t\t\t}\n\t\t\treturn $sort;\n\t\t},\n\t\t10,\n\t\t2\n\t);\n\n\tadd_filter(\n\t\t'get_previous_post_join',\n\t\tfunction ( $join, $in_same_term, $excluded_terms, $tx, $post ) use ( $post_type, $meta_key ) {\n\t\t\tglobal $wpdb;\n\t\t\tif ( $post->post_type === $post_type ) {\n\t\t\t\t$join .= \" INNER JOIN $wpdb->postmeta ON ( p.ID = $wpdb->postmeta.post_id )\";\n\t\t\t}\n\t\t\treturn $join;\n\t\t},\n\t\t10,\n\t\t5\n\t);\n\tadd_filter(\n\t\t'get_previous_post_where',\n\t\tfunction ( $where, $in_same_term, $excluded_terms, $tx, $post ) use ( $post_type, $meta_key ) {\n\t\t\tglobal $wpdb;\n\t\t\tif ( $post->post_type === $post_type ) {\n\t\t\t\t$m = get_post_meta( $post->ID, $meta_key, true );\n\t\t\t\t$where = preg_replace( '/(p.post_date [><] \\'.*\\') AND/U', \"( $wpdb->postmeta.meta_key = '$meta_key' ) AND ( ( $wpdb->postmeta.meta_value = '$m' AND $1 ) OR ( $wpdb->postmeta.meta_value < '$m' ) ) AND\", $where );\n\t\t\t}\n\t\t\treturn $where;\n\t\t},\n\t\t10,\n\t\t5\n\t);\n\tadd_filter(\n\t\t'get_previous_post_sort',\n\t\tfunction ( $sort, $post ) use ( $post_type, $meta_key ) {\n\t\t\tglobal $wpdb;\n\t\t\tif ( $post->post_type === $post_type ) {\n\t\t\t\t$sort = str_replace( 'ORDER BY', \"ORDER BY CAST($wpdb->postmeta.meta_value AS DATE) DESC,\", $sort );\n\t\t\t}\n\t\t\treturn $sort;\n\t\t},\n\t\t10,\n\t\t2\n\t);\n}", "title": "" }, { "docid": "2cd0588ce3c7b0b17d971e103a50bdf5", "score": "0.59813", "text": "function twentynineteen_the_posts_navigation()\n{\n the_posts_pagination(\n array(\n 'mid_size' => 2,\n 'prev_text' => '&laquo; <span class=\"nav-prev-text\">Newer</span>',\n 'next_text' => '<span class=\"nav-next-text\">Older</span> &r aquo;',\n )\n );\n}", "title": "" }, { "docid": "0cdb265f7511379de1200bb734e1231c", "score": "0.59758186", "text": "function storefront_post_nav()\n{\n $args = [\n 'next_text' => '<span class=\"screen-reader-text\">' . esc_html__('Next post:', 'storefront') . ' </span>%title',\n 'prev_text' => '<span class=\"screen-reader-text\">' . esc_html__('Previous post:', 'storefront') . ' </span>%title',\n 'in_same_term' => true,\n ];\n\n the_post_navigation($args);\n}", "title": "" }, { "docid": "c100e4522fa7b2b7ca26956524bff54f", "score": "0.58832", "text": "function navPage($item)\n{\n// If item is empty return null\nif(!$item) return;\n// $out is where we store the markup we are creating in this function\n$out = '';\n// Prev Next Button\n\t\t$p_next = $item->next();\n\t\t$p_prev = $item->prev();\n// link to the prev blog post, if there is one\n\t\tif ($p_prev->id) {\n\t\t$out .= \"<a href='$p_prev->url'>\";\n\t\t$out .= icon('arrow-left') . $p_prev->title . \"</a>\";\n\t\t}\n// link to the next blog post, if there is one\n\t\tif ($p_next->id) {\n\t\t\t\t$out .= \"<a href='$p_next->url'>\";\n\t\t\t\t$out .= $p_next->title . icon('arrow-right') . \"</a>\";\n\t\t}\n\t\treturn $out;\n}", "title": "" }, { "docid": "354a4b4cb93a5c9735d0d5be1228b431", "score": "0.58672774", "text": "function link_structure(){\n\t\treturn get_post_type_archive_link('event');\n\t}", "title": "" }, { "docid": "785c81abed98a5f9f9e000b09c7e0b07", "score": "0.58612514", "text": "public function PaginationAbsolutePrevLink() {\n $posts = $this->PaginatedList();\n if ($posts->NotFirstPage()) {\n return Director::absoluteURL($posts->PrevLink());\n }\n }", "title": "" }, { "docid": "690baf6e2b0454fb7dddaab975bf6508", "score": "0.5837559", "text": "function fw_theme_post_nav() {\n $previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '',\n true );\n $next = get_adjacent_post( false, '', false );\n\n if ( ! $next && ! $previous ) {\n return;\n }\n\n ?>\n <nav class=\"navigation post-navigation\" role=\"navigation\">\n <h1 class=\"screen-reader-text\"><?php echo esc_html__( 'Post navigation', 'flox' ); ?></h1>\n\n <div class=\"nav-links\">\n <?php\n if ( is_attachment() ) :\n previous_post_link( '%link', ckav_esc( '<span class=\"meta-nav\">'.esc_html__( 'Published In', 'flox' ).'</span> %title' ) );\n else :\n previous_post_link( '%link', ckav_esc( '<span class=\"meta-nav\">'.esc_html__( 'Previous Post', 'flox' ).'</span> %title' ) );\n next_post_link( '%link', ckav_esc( '<span class=\"meta-nav\">'.esc_html__( 'Next Post', 'flox' ).'</span> %title' ) );\n endif;\n ?>\n </div>\n <!-- .nav-links -->\n </nav><!-- .navigation -->\n <?php\n }", "title": "" }, { "docid": "840acb6a122267cf10abfa9fe0827acb", "score": "0.5806376", "text": "function custom_next_previous()\n{\n if ($search = $_GET['search']) {\n // Sets the current item ID to the variable $current\n $current = item('id');\n \n // Get an array of all the items from the search, and all the IDs\n $list = get_items(array('search'=>$search),total_results());\n foreach ($list as &$value) {\n $itemIds[] = $value->id;\n }\n \n // Find where we currently are in the result set\n $key = array_search($current, $itemIds);\n \n // If we aren't at the beginning, print a Previous link\n if ($key > 0) {\n $previousItem = $list[$key - 1];\n $previousUrl = item_uri('show', $previousItem) . '?' . $_SERVER['QUERY_STRING'];\n echo '<li><a href=\"' . $previousUrl . '\">Previous Item</a></li>';\n }\n \n // If we aren't at the end, print a Next link\n if ($key < count($list) - 1) {\n $nextItem = $list[$key + 1];\n $nextUrl = item_uri('show', $nextItem) . '?' . $_SERVER['QUERY_STRING'];\n echo '<li class=\"next\"><a href=\"' . $nextUrl . '\">Next Item</a></li>';\n }\n } else {\n // If a search was not run, then the normal next/previous navigation is displayed.\n echo '<li>'.link_to_previous_item('Previous Item').'</li>';\n echo '<li class=\"next\">'.link_to_next_item('Next Item').'</li>';\n }\n}", "title": "" }, { "docid": "f199acebaf9b2bb32906d2536c748d10", "score": "0.5799683", "text": "public function getPrevEventUrl()\n {\n $event = $this->helper->getPrevEvent($this->getEvent());\n if ($event && $eventId = $event->getId()) {\n return $this->_urlBuilder->getUrl(self::URL_PATH_DETAILS, ['id' => $eventId]);\n }\n return false;\n }", "title": "" }, { "docid": "4499d82b0e2bb4675fbf0fddea8f7216", "score": "0.57796985", "text": "function print_next_video_link( $before = '', $after = '' ) {\n $next_video = get_next_post( TRUE, ' ', 'playlist' );\n if ( $next_video ) {\n $number = get_post_meta( $next_video->ID, '_episode', true );\n next_post_link( $before . '%link' . $after, $number . '. %title', TRUE, ' ', 'playlist' );\n } else {\n _e( 'You are at the last episode', 'makigas-theme' );\n }\n}", "title": "" }, { "docid": "ce65cbcc91cd49ae0bb69622e2e93023", "score": "0.5777406", "text": "public static function previous_post_link($args = array()) {\n if (self::previous_post($args)->id) {\n return html::anchor(self::previous_post($args)->link, T::_('Previous post') . ': ' . self::previous_post($args)->title);\n }\n }", "title": "" }, { "docid": "1035e97a463a7f82736205b311a54272", "score": "0.5750248", "text": "function pagination($totalposts, $p, $lpm1, $prev, $next) {\n $adjacents = 3;\n if ($totalposts > 1) {\n $pagination .= \"<center><div>\";\n //previous button\n if ($p > 1)\n $pagination.= \"<a href=\\\"?pg=$prev\\\"><< Previous</a> \";\n else\n $pagination.= \"<span class=\\\"disabled\\\"><< Previous</span> \";\n if ($totalposts < 7 + ($adjacents * 2)) {\n for ($counter = 1; $counter <= $totalposts; $counter++) {\n if ($counter == $p)\n $pagination.= \"<span class=\\\"current\\\">$counter</span>\";\n else\n $pagination.= \" <a href=\\\"?pg=$counter\\\">$counter</a> \";\n }\n }elseif ($totalposts > 5 + ($adjacents * 2)) {\n if ($p < 1 + ($adjacents * 2)) {\n for ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++) {\n if ($counter == $p)\n $pagination.= \" <span class=\\\"current\\\">$counter</span> \";\n else\n $pagination.= \" <a href=\\\"?pg=$counter\\\">$counter</a> \";\n }\n $pagination.= \" ... \";\n $pagination.= \" <a href=\\\"?pg=$lpm1\\\">$lpm1</a> \";\n $pagination.= \" <a href=\\\"?pg=$totalposts\\\">$totalposts</a> \";\n }\n //in middle; hide some front and some back\n elseif ($totalposts - ($adjacents * 2) > $p && $p > ($adjacents * 2)) {\n $pagination.= \" <a href=\\\"?pg=1\\\">1</a> \";\n $pagination.= \" <a href=\\\"?pg=2\\\">2</a> \";\n $pagination.= \" ... \";\n for ($counter = $p - $adjacents; $counter <= $p + $adjacents; $counter++) {\n if ($counter == $p)\n $pagination.= \" <span class=\\\"current\\\">$counter</span> \";\n else\n $pagination.= \" <a href=\\\"?pg=$counter\\\">$counter</a> \";\n }\n $pagination.= \" ... \";\n $pagination.= \" <a href=\\\"?pg=$lpm1\\\">$lpm1</a> \";\n $pagination.= \" <a href=\\\"?pg=$totalposts\\\">$totalposts</a> \";\n }else {\n $pagination.= \" <a href=\\\"?pg=1\\\">1</a> \";\n $pagination.= \" <a href=\\\"?pg=2\\\">2</a> \";\n $pagination.= \" ... \";\n for ($counter = $totalposts - (2 + ($adjacents * 2)); $counter <= $totalposts; $counter++) {\n if ($counter == $p)\n $pagination.= \" <span class=\\\"current\\\">$counter</span> \";\n else\n $pagination.= \" <a href=\\\"?pg=$counter\\\">$counter</a> \";\n }\n }\n }\n if ($p < $counter - 1)\n $pagination.= \" <a href=\\\"?pg=$next\\\">Next >></a>\";\n else\n $pagination.= \" <span class=\\\"disabled\\\">Next >></span>\";\n $pagination.= \"</center>\\n\";\n }\n return $pagination;\n}", "title": "" }, { "docid": "043aadc2cb884ee5dbfaca392dbc57bc", "score": "0.5738505", "text": "function lfe_get_other_events( $parent_id, $background_style, $menu_text_color ) {\n\t$related_events = lfe_get_related_events( $parent_id );\n\n\techo '<li class=\"page_item page_item_has_children other-events\">';\n\tif ( is_lfeventsci() ) {\n\t\techo '<a>View All Events</a>';\n\t} else {\n\t\techo '<a>查看所有活动<br>View All Events</a>';\n\t}\n\techo '<ul class=\"children\" style=\"' . esc_html( $background_style ) . '\">';\n\techo '<li><a href=\"https://events.linuxfoundation.org/\"><img src=\"' . get_stylesheet_directory_uri() . '/dist/assets/images/' . foundationpress_asset_path( 'logo_lfevents_' . $menu_text_color . '.svg' ) . '\"><span class=\"subtext\">All Upcoming Events</span></a></li>'; //phpcs:ignore\n\n\tforeach ( $related_events as $p ) {\n\t\t$logo = get_post_meta( $p['ID'], 'lfes_' . $menu_text_color . '_logo', true );\n\t\tif ( $logo ) {\n\t\t\t$event_link_content = '<img src=\"' . wp_get_attachment_url( $logo ) . '\" alt=\"' . get_the_title( $p['ID'] ) . '\">';\n\t\t} else {\n\t\t\t$event_link_content = get_the_title( $p['ID'] );\n\t\t}\n\n\t\techo '<li><a href=\"' . esc_url( lfe_get_event_url( $p['ID'] ) ) . '\">' . $event_link_content . '</a></li>'; //phpcs:ignore\n\t}\n\n\t$term = wp_get_post_terms( $parent_id, 'lfevent-category', array( 'fields' => 'all' ) );\n\n\tif ( $term[0] ) {\n\t\techo '<li><a href=\"https://events.linuxfoundation.org/about/calendar/archive/?_sft_lfevent-category=' . $term[0]->slug . '\"><span class=\"subtext\">Past ' . $term[0]->name . '</span></a></li>'; //phpcs:ignore\n\t} else {\n\t\techo '<li><a href=\"https://events.linuxfoundation.org/about/calendar/archive/\"><span class=\"subtext\">All Past Events</span></a></li>'; //phpcs:ignore\n\t}\n\n\t$extra_link_text = get_post_meta( $parent_id, 'lfes_extra_vae_link_text', true );\n\t$extra_link_url = get_post_meta( $parent_id, 'lfes_extra_vae_link_url', true );\n\tif ( $extra_link_text && $extra_link_url ) {\n\t\techo '<li class=\"external-link\"><a target=\"_blank\" href=\"' . esc_attr( $extra_link_url ) . '\"><span class=\"subtext\">'; //phpcs:ignore\n\t\techo esc_html( $extra_link_text ) . ' ';\n\t\techo esc_html( get_template_part( 'template-parts/svg/external-link' ) );\n\t\techo '</span></a></li>';\n\t}\n\n\techo '</ul></li>';\n}", "title": "" }, { "docid": "6bb24641cfafca96f3e7b77dead8aafd", "score": "0.5714596", "text": "function make_nav_links($state, $storyid, $nextstory_is, $neweststory_is, $prevstory_is, $oldeststory_is) {\n\tif($state == 'prev') {\n\t\t$resource = mysql_query(\"SELECT Noun FROM \".STORIES_TBL.\" WHERE StoryID < \".$storyid.\" ORDER BY StoryID DESC LIMIT 1\");\n \t$not_orphaned = mysql_fetch_array($resource);\n\t} elseif ($state = 'next') {\n\t\t$resource = mysql_query(\"SELECT Noun FROM \".STORIES_TBL.\" WHERE StoryID > \".$storyid.\" ORDER BY StoryID ASC LIMIT 1\");\n \t$not_orphaned = mysql_fetch_array($resource);\n\t}\n\t\n // 'Orphaned' meaning a story that is either the oldest or newest; not sandwiched between other stories.\n if($state == 'next') {\n\t if($not_orphaned) {\n\t \t$linkurl = str_replace('{URL}', 'index.php?noun='.$not_orphaned['Noun'], $nextstory_is);\n\t } else {\n\t \t$linkurl = $neweststory_is;\n\t }\n\t} elseif ($state = 'prev') {\n\t if($not_orphaned) {\n\t \t$linkurl = str_replace('{URL}', 'index.php?noun='.$not_orphaned['Noun'], $prevstory_is);\n\t } else {\n\t \t$linkurl = $oldeststory_is;\n\t }\n\t}\n\treturn $linkurl;\n}", "title": "" }, { "docid": "7dd7fc4ac190e0977fd6f81d67fbbb6b", "score": "0.5708984", "text": "function twentythirteen_post_nav() {\n global $post;\n\n // Don't print empty markup if there's nowhere to navigate.\n $previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true );\n $next = get_adjacent_post( false, '', false );\n\n if ( ! $next && ! $previous )\n return;\n ?>\n <nav class=\"navigation post-navigation\" role=\"navigation\">\n <h1 class=\"screen-reader-text\"><?php _e( 'Post navigation', 'twentythirteen' ); ?></h1>\n <div class=\"nav-links\">\n\n <?php previous_post_link( '%link', _x( '<span class=\"meta-nav\">&larr;</span> %title', 'Previous post link', 'twentythirteen' ) ); ?>\n <?php next_post_link( '%link', _x( '%title <span class=\"meta-nav\">&rarr;</span>', 'Next post link', 'twentythirteen' ) ); ?>\n\n </div><!-- .nav-links -->\n </nav><!-- .navigation -->\n <?php\n}", "title": "" }, { "docid": "be31286dead3b33d49683691b25ea3f1", "score": "0.56918603", "text": "function classic_archive_navigation_next() {\n\tif ( is_search() ) {\n\t\tnext_posts_link( __( 'Next in Search', \"wptouch-pro\" ) );\n\t} elseif ( is_category() ) {\t\t \n\t\tnext_posts_link( __( 'Next in Category', \"wptouch-pro\" ) );\n\t} elseif ( is_tag() ) {\n\t\tnext_posts_link( __( 'Next in Tag', \"wptouch-pro\" ) );\n\t} elseif ( is_day() ) {\n\t\tnext_posts_link( __( 'Next One Day', \"wptouch-pro\" ) );\n\t} elseif ( is_month() ) {\n\t\tnext_posts_link( __( 'Next One Month', \"wptouch-pro\" ) );\n\t} elseif ( is_year() ) {\n\t\tnext_posts_link( __( 'Next One Year', \"wptouch-pro\" ) );\n\t}\n}", "title": "" }, { "docid": "6eb64b0bd5191767b551950dfa1e0734", "score": "0.5687138", "text": "function epf_date_nav_title($params) {\n $granularity = $params['granularity'];\n $view = $params['view'];\n $date_info = $view->date_info;\n $link = !empty($params['link']) ? $params['link'] : FALSE;\n $format = !empty($params['format']) ? $params['format'] : NULL;\n switch ($granularity) {\n case 'month':\n $format = !empty($format) ? $format : (empty($date_info->mini) ? 'F Y' : 'F');\n $title = date_format_date($date_info->min_date, 'custom', $format);\n $date_arg = $date_info->year . '-' . date_pad($date_info->month);\n break;\n }\n if (!empty($date_info->mini) || $link) {\n // Month navigation titles are used as links in the mini view.\n $attributes = array('title' => t('View full page month'));\n $url = url('events/'.$date_arg);//date_pager_url($view, $granularity, $date_arg, TRUE);\n return l($title, $url, array('attributes' => $attributes));\n }\n else {\n return $title;\n }\n}", "title": "" }, { "docid": "17ea39e06fc23b3f14f46038b972f44f", "score": "0.5677749", "text": "function understrap_post_nav() {\n\t\t$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );\n\t\t$next = get_adjacent_post( false, '', false );\n\n\t\tif ( ! $next && ! $previous ) {\n\t\t\treturn;\n\t\t}\n\t\t?>\n\t\t<nav class=\"container navigation post-navigation\">\n\t\t\t<h2 class=\"sr-only\"><?php esc_html_e( 'Post navigation', 'understrap' ); ?></h2>\n\t\t\t<div class=\"row nav-links justify-content-between\">\n\t\t\t\t<?php\n\t\t\t\tif ( get_previous_post_link() ) {\n\t\t\t\t\tprevious_post_link( '<span class=\"nav-previous\">%link</span>', _x( '<i class=\"fa fa-angle-left\"></i>&nbsp;%title', 'Previous post link', 'understrap' ) );\n\t\t\t\t}\n\t\t\t\tif ( get_next_post_link() ) {\n\t\t\t\t\tnext_post_link( '<span class=\"nav-next\">%link</span>', _x( '%title&nbsp;<i class=\"fa fa-angle-right\"></i>', 'Next post link', 'understrap' ) );\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t</div><!-- .nav-links -->\n\t\t</nav><!-- .navigation -->\n\t\t<?php\n\t}", "title": "" }, { "docid": "5552f075b95e3cfb689b8f17a6c50055", "score": "0.5669495", "text": "function prom_post_nav() {\n global $post;\n\n // Don't print empty markup if there's nowhere to navigate.\n $previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true );\n $next = get_adjacent_post( false, '', false );\n\n if ( ! $next && ! $previous )\n return;\n ?>\n <nav class=\"navigation post-navigation\" role=\"navigation\">\n <h1 class=\"screen-reader-text\"><?php _e( 'Post navigation', 'productivemuslim' ); ?></h1>\n <div class=\"nav-links\">\n \n <?php if ( $previous ) : ?>\n <div class=\"nav-previous\">\n <?php previous_post_link( '%link', _x( '<span class=\"meta-nav\">&larr;</span> <span class=\"meta-title\">%title</span>', 'Previous post link', 'productivemuslim' ) ); ?>\n </div>\n <?php endif; ?>\n \n <?php if ( $next ) : ?>\n <div class=\"nav-next\">\n <?php next_post_link( '%link', _x( '<span class=\"meta-title\">%title</span> <span class=\"meta-nav\">&rarr;</span>', 'Next post link', 'productivemuslim' ) ); ?>\n </div>\n <?php endif; ?>\n\n </div><!-- .nav-links -->\n </nav><!-- .navigation -->\n <?php\n}", "title": "" }, { "docid": "a9da97374db5c544fa07f362ba79bf3d", "score": "0.5635388", "text": "function bpxl_post_nav() {\n\t// Don't print empty markup if there's nowhere to navigate.\n\t$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );\n\t$next = get_adjacent_post( false, '', false );\n\n\tif ( ! $next && ! $previous ) {\n\t\treturn;\n\t}\n\n\t?>\n\t<nav class=\"navigation post-navigation single-box clearfix\" role=\"navigation\">\n\t\t<div class=\"nav-links\">\n\t\t\t<?php\n\t\t\tif ( is_attachment() ) :\n\t\t\t\tnext_post_link('<div class=\"alignleft post-nav-links prev-link-wrapper\"><div class=\"next-link\"><span class=\"uppercase\">'. __(\"Published In\",\"bloompixel\") .'</span> %link'.\"</div></div>\");\n\t\t\telse :\n\t\t\t\tprevious_post_link('<div class=\"alignleft post-nav-links prev-link-wrapper\"><div class=\"prev-link\"><span class=\"uppercase\">'. __(\"Previous Article\",\"bloompixel\").'</span> %link'.\"</div></div>\");\n\t\t\t\tnext_post_link('<div class=\"alignright post-nav-links next-link-wrapper\"><div class=\"next-link\"><span class=\"uppercase\">'. __(\"Next Article\",\"bloompixel\") .'</span> %link'.\"</div></div>\");\n\t\t\tendif;\n\t\t\t?>\n\t\t</div><!-- .nav-links -->\n\t</nav><!-- .navigation -->\n\t<?php\n}", "title": "" }, { "docid": "ebf5ea532d960d72e4e122d8b262cbe9", "score": "0.56341386", "text": "function charity_is_hope_post_get_period_links($links, $page, $delimiter='') {\n\t\tif (!empty($links)) return $links;\n\t\tglobal $post;\n\t\tif (in_array($page, array('archives_day', 'archives_month')) && is_object($post)) {\n\t\t\t$year = get_the_time('Y'); \n\t\t\t$month = get_the_time('m'); \n\t\t\t$links = '<a class=\"breadcrumbs_item cat_parent\" href=\"' . esc_url(get_year_link( $year )) . '\">' . ($year) . '</a>';\n\t\t\tif ($page == 'archives_day')\n\t\t\t\t$links .= (!empty($links) ? $delimiter : '') . '<a class=\"breadcrumbs_item cat_parent\" href=\"' . esc_url(get_month_link( $year, $month )) . '\">' . trim(charity_is_hope_get_date_translations(get_the_date('F'))) . '</a>';\n\t\t}\n\t\treturn $links;\n\t}", "title": "" }, { "docid": "2c4f64b2f14b2953ad5ee15a7f81af50", "score": "0.5633112", "text": "public function getLinks()\n {\n $re_links = ''; // the variable that will contein the links and will be returned\n $currentpage = $this->idpage + 1; // because the page index starts from 0, adds 1 to set the current page\n $pag_get = '?pg='; // the name for the GET value added in URL\n\n // if $totalpages>0 and totalpages higher or equal to $currentpage\n if ($this->totalpages > 0 && $this->totalpages >= $currentpage) {\n // linksto first and previous page, if it isn't the first page\n if ($currentpage > 1) {\n // show << for link to 1st page\n $re_links .= ' <a href=\"' . $this->pag . '\" title=\"Link 1\">First &lt;&lt;</a> &nbsp; ';\n\n $prevpage = $currentpage - 1; // the number of the previous page\n // show < for link to previous page, if higher then 1\n if ($prevpage > 1) $re_links .= ' <a href=\"' . $this->pag . $pag_get . $prevpage . '\" title=\"Link ' . $prevpage . '\">Previous &lt;</a> &nbsp;';\n }\n\n // sets the links in the range of the current page\n for ($x = ($currentpage - $this->range); $x <= ($currentpage + $this->range); $x++) {\n // if it's a number between 0 and last page\n if (($x > 0) && ($x <= $this->totalpages)) {\n // if it's the number of current page, show the number without link, otherwise add link\n if ($x == $currentpage) $re_links .= ' [<b>' . $x . '</b>] ';\n else $re_links .= ' <a href=\"' . $this->pag . $pag_get . $x . '\" title=\"Link ' . $x . '\">' . $x . '</a> ';\n }\n }\n\n // If the current page is not final, adds link to next and last page\n if ($currentpage != $this->totalpages) {\n $nextpage = $currentpage + 1;\n // show > for next page (if higher then $this->range and less then totalpages)\n if ($nextpage > $this->range && $nextpage < $this->totalpages) $re_links .= '&nbsp; <a href=\"' . $this->pag . $pag_get . $nextpage . '\" title=\"Link ' . $nextpage . '\">&gt; Next</a> ';\n // show >> for last page, if higher than $this->range\n if ($this->totalpages > $this->range) $re_links .= ' &nbsp; <a href=\"' . $this->pag . $pag_get . $this->totalpages . '\" title=\"Link ' . $this->totalpages . '\">&gt;&gt; Last (' . $this->totalpages . ')</a> ';\n }\n }\n\n // adds all links into a DIV and return it\n if (strlen($re_links) > 1) $re_links = '<div class=\"linkspg\">' . $re_links . '</div>';\n return $re_links;\n }", "title": "" }, { "docid": "1e36b67e18c7c59753393a0444b5453e", "score": "0.5630577", "text": "function processPagination() {\n\t\tglobal $app_strings;\n\t\tif(empty($this->data['pageData']['urls']['prevPage'])) {\n\t\t\t$startLink = SugarThemeRegistry::current()->getImage(\"start_off\", \"border='0' align='absmiddle'\",null,null,'.gif',$app_strings['LNK_LIST_START']).\"&nbsp;\".$app_strings['LNK_LIST_START'];\n\t\t\t$prevLink = SugarThemeRegistry::current()->getImage(\"previous_off\", \"border='0' align='absmiddle'\",null,null,'.gif',$app_strings['LNK_LIST_PREVIOUS']).\"&nbsp;\".$app_strings['LNK_LIST_PREVIOUS'];\n\t\t}\n\t\telse {\n\t\t\t\t$startLink = \"<a href=\\\"{$this->data['pageData']['urls']['startPage']}\\\" >\".SugarThemeRegistry::current()->getImage(\"start\",\"border='0' align='absmiddle'\",null,null,'.gif',$app_strings['LNK_LIST_START']).\"&nbsp;\".$app_strings['LNK_LIST_START'].\"</a>\";\n\t\t\t\t$prevLink = \"<a href=\\\"{$this->data['pageData']['urls']['prevPage']}\\\" >\".SugarThemeRegistry::current()->getImage(\"previous\",\"border='0' align='absmiddle'\",null,null,'.gif',$app_strings['LNK_LIST_PREVIOUS']).\"&nbsp;\".$app_strings['LNK_LIST_PREVIOUS'].\"</a>\";\n\t\t}\n\n\t\tif(!$this->data['pageData']['offsets']['totalCounted']) {\n\t\t\t$endLink = $app_strings['LNK_LIST_END'].\"&nbsp;\".SugarThemeRegistry::current()->getImage(\"end_off\",\"border='0' align='absmiddle'\",null,null,'.gif',$app_strings['LNK_LIST_END']);\n\t\t}\n\t\telse {\n\t\t\t\t$endLink = \"<a href=\\\"{$this->data['pageData']['urls']['endPage']}\\\" >\".$app_strings['LNK_LIST_END'].\"&nbsp;\".SugarThemeRegistry::current()->getImage(\"end\",\"border='0' align='absmiddle'\",null,null,'.gif',$app_strings['LNK_LIST_END']).\"</a>\";\n\t\t\t\t\n\t\t}\n\t\tif(empty($this->data['pageData']['urls']['nextPage'])){\n\t\t\t$nextLink = $app_strings['LNK_LIST_NEXT'].\"&nbsp;\".SugarThemeRegistry::current()->getImage(\"next_off\",\"border='0' align='absmiddle'\",null,null,'.gif',$app_strings['LNK_LIST_NEXT']);\n\t\t}else{\n\t\t\t\t$nextLink = \"<a href=\\\"{$this->data['pageData']['urls']['nextPage']}\\\" >\".$app_strings['LNK_LIST_NEXT'].\"&nbsp;\".SugarThemeRegistry::current()->getImage(\"next\",\"border='0' align='absmiddle'\",null,null,'.gif',$app_strings['LNK_LIST_NEXT']).\"</a>\";\n\t\t}\n\t\t\n\t\tif($this->export) $export_link = $this->buildExportLink();\n\t\telse $export_link = '';\n\t\tif($this->mailMerge)$merge_link = $this->buildMergeLink();\n\t\telse $merge_link = '';\n\t\tif($this->multiSelect) $selected_objects_span = $this->buildSelectedObjectsSpan();\n\t\telse $selected_objects_span = '';\n\n\t\t$htmlText = \"<tr class='pagination' role='presentation'>\\n\"\n\t\t\t\t. \"<td COLSPAN=\\\"20\\\" align=\\\"right\\\">\\n\"\n\t\t\t\t. \"<table border=\\\"0\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" width=\\\"100%\\\"><tr><td align=\\\"left\\\">$export_link$merge_link$selected_objects_span</td>\\n\"\n\t\t\t\t. \"<td nowrap align=\\\"right\\\">\".$startLink.\"&nbsp;&nbsp;\".$prevLink.\"&nbsp;&nbsp;<span class='pageNumbers'>(\".($this->data['pageData']['offsets']['current'] + 1) .\" - \".($this->data['pageData']['offsets']['current'] + $this->rowCount)\n\t\t\t\t. \" \".$app_strings['LBL_LIST_OF'].\" \".$this->data['pageData']['offsets']['total'];\n\t\tif(!$this->data['pageData']['offsets']['totalCounted']){\n\t\t\t$htmlText .= '+';\t\n\t\t}\n\t\t$htmlText .=\")</span>&nbsp;&nbsp;\".$nextLink.\"&nbsp;&nbsp;\";\n\t\tif($this->data['pageData']['offsets']['totalCounted']){\n\t\t\t$htmlText .= $endLink;\n\t\t}\n\t\t$htmlText .=\"</td></tr></table>\\n</td>\\n</tr>\\n\";\n\n\t\t$this->xtpl->assign(\"PAGINATION\", $htmlText);\n\t}", "title": "" }, { "docid": "71d2a151c32bea404f998590d016a862", "score": "0.5625263", "text": "function tfs_post_nav() {\n\t\t$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );\n\t\t$next = get_adjacent_post( false, '', false );\n\n\t\tif ( ! $next && ! $previous ) {\n\t\t\treturn;\n\t\t}\n\t\t?>\n\t\t\t\t<nav class=\"container navigation post-navigation\">\n\t\t\t\t\t<h2 class=\"sr-only\"><?php _e( 'Post navigation', 'vslmd' ); ?></h2>\n\t\t\t\t\t<div class=\"row justify-content-between\">\n\t\t\t\t\t\t<?php\n\n\t\t\t\t\t\t\tif ( get_previous_post_link() ) {\n\t\t\t\t\t\t\t\tprevious_post_link( '<span class=\"blog-navigation-button\">%link</span>', _x( '<i class=\"fa fa-angle-left\"></i>&nbsp;%title', 'Previous post link', 'vslmd' ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( get_next_post_link() ) {\n\t\t\t\t\t\t\t\tnext_post_link( '<span class=\"blog-navigation-button\">%link</span>', _x( '%title&nbsp;<i class=\"fa fa-angle-right\"></i>', 'Next post link', 'vslmd' ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t</div><!-- .nav-links -->\n\t\t\t\t</nav><!-- .navigation -->\n\n\t\t<?php\n\t}", "title": "" }, { "docid": "87b626a9483fe99efe4dc066f9d84992", "score": "0.56108737", "text": "function ss_post_nav() {\n\tglobal $post;\n\n\t// Don't print empty markup if there's nowhere to navigate.\n\t$previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true );\n\t$next = get_adjacent_post( false, '', false );\n\n\tif ( ! $next && ! $previous )\n\t\treturn;\n\t?>\n\t<nav id=\"nav-below\" class=\"nav-pagination clearfix\">\n <div class=\"nav-previous\">\n \t<?php previous_post_link( '%link', _x('Previous Post','test1','ss' ) ); ?>\n </div>\n <div class=\"nav-next\">\n \t<?php next_post_link( '%link', _x( 'Next Post','test2','ss' ) ); ?>\n </div>\n </nav> \n\t<?php\n}", "title": "" }, { "docid": "86f9dfe4fcdd0be4be3d5c869ccecc4d", "score": "0.56093013", "text": "abstract public function prev(): ?Link;", "title": "" }, { "docid": "2b427230c3b95d89efdddd48a58ebc4c", "score": "0.56078815", "text": "function set_Links($prev_next=5)\r\n\t{\r\n\t\t$this->prev_next = $prev_next;\r\n\t}", "title": "" }, { "docid": "17adfb0269ce3a918723d3a24f2852e2", "score": "0.56075156", "text": "function nextPrev($curpage, $pages) { //Pagination\n $next_prev = \"\";\n\n if (($curpage - 1) <= 0) {\n $next_prev .= \"Previous\";\n } else {\n $next_prev .= \"<a href=\\\"\" . $_SERVER['PHP_SELF'] . \"&pages=\" . ($curpage - 1) . \"\\\">Previous</a>\";\n }\n\n $next_prev .= \" | \";\n\n if (($curpage + 1) > $pages) {\n $next_prev .= \"Next\";\n } else {\n $next_prev .= \"<a href=\\\"\" . $_SERVER['PHP_SELF'] . \"&pages=\" . ($curpage + 1) . \"\\\">Next</a>\";\n }\n return $next_prev;\n }", "title": "" }, { "docid": "e9fe06bafa39150dc3a52e6f16f737ce", "score": "0.56073666", "text": "function df_single_pagination() {\r\n\t\t/* Check if post not single or post number not one */\r\n\t\tif ( ( wp_count_posts()->publish < 2 ) || !is_single() )\r\n return;\r\n\r\n /* Build the html */\r\n $html = '<div class=\"df-pagination df-single-paging\">';\r\n $html .= '<div class=\"row\">';\r\n $html .= '<div class=\"nav-prev col-md-6 col-sm-12\">';\r\n $html .= df_get_post_img( false, true );\r\n $html .= get_previous_post_link( '<div class=\"text-content\">' );\r\n $html .= get_previous_post_link( '%link', '<span class=\"prev-article\">' . esc_attr__( 'Previous Article', 'applique' ) . '</span>' );\r\n $html .= get_previous_post_link( '<h4>' . esc_attr__( '%link', 'applique' ) . '</h4>' );\r\n $html .= get_previous_post_link( '%link', '<span class=\"more-article\">' . esc_attr__( 'Read More', 'applique' ) . '</span>' );\r\n $html .= get_previous_post_link( '</div>' );\r\n $html .= '</div>'; // end .nav-prev\r\n $html .= '<div class=\"nav-next col-md-6 col-sm-12\">';\r\n $html .= df_get_post_img( true, false );\r\n $html .= get_next_post_link( '<div class=\"text-content\">' );\r\n $html .= get_next_post_link( '%link', '<span class=\"prev-article\">' . esc_attr__( 'Next Article', 'applique' ) . '</span>' );\r\n $html .= get_next_post_link( '<h4>' . esc_attr__( '%link', 'applique' ) . '</h4>' );\r\n $html .= get_next_post_link( '%link', '<span class=\"more-article\">' . esc_attr__( 'Read More', 'applique' ) . '</span>' );\r\n $html .= get_next_post_link( '</div>' );\r\n $html .= '</div>'; // end .nav-next\r\n $html .= '<div class=\"clear\"></div>';\r\n $html .= '</div>'; // end .row\r\n $html .= '<svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"100%\" height=\"8px\" viewBox=\"550 5 100 8\">\r\n <g>\r\n <polygon fill=\"#231F20\" points=\"24.629,8.174 30.374,13 30.925,13 24.629,7.711 \"/>\r\n <polygon fill=\"#231F20\" points=\"26.034,5 35.558,13 36.108,13 26.586,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"31.415,5 40.94,13 41.489,13 31.966,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"36.465,5 45.801,12.842 46.231,12.741 37.017,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"48.755,10.627 42.058,5 41.506,5 48.325,10.728 \"/>\r\n <polygon fill=\"#231F20\" points=\"51.237,8.441 47.144,5 46.592,5 50.808,8.542 \"/>\r\n <polygon fill=\"#231F20\" points=\"53.657,6.223 52.202,5 51.649,5 53.228,6.324 \"/>\r\n <polygon fill=\"#231F20\" points=\"55.733,5 46.849,13 47.392,13 56.276,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"60.874,5 51.987,13 52.532,13 61.417,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"66.455,5 66.015,5 57.128,13 57.671,13 66.536,5.018 \"/>\r\n <polygon fill=\"#231F20\" points=\"68.174,7.684 62.269,13 62.812,13 68.174,8.172 68.174,8.174 73.919,13 74.47,13 68.174,7.711 \"/>\r\n <polygon fill=\"#231F20\" points=\"24.629,11.547 26.358,13 26.909,13 24.629,11.085 \"/>\r\n <polygon fill=\"#231F20\" points=\"68.174,11.025 65.979,13 66.522,13 68.174,11.514 68.174,11.547 69.903,13 70.454,13\r\n 68.174,11.085 \"/>\r\n <polygon fill=\"#231F20\" points=\"69.579,5 79.103,13 79.653,13 70.131,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"74.96,5 84.485,13 85.035,13 75.511,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"80.01,5 89.346,12.842 89.777,12.741 80.562,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"92.3,10.627 85.603,5 85.051,5 91.87,10.728 \"/>\r\n <polygon fill=\"#231F20\" points=\"94.782,8.441 90.688,5 90.137,5 94.353,8.542 \"/>\r\n <polygon fill=\"#231F20\" points=\"97.202,6.223 95.747,5 95.194,5 96.772,6.324 \"/>\r\n <polygon fill=\"#231F20\" points=\"99.278,5 90.395,13 90.937,13 99.821,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"104.419,5 95.532,13 96.077,13 104.962,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"110,5 109.56,5 100.673,13 101.216,13 110.081,5.018 \"/>\r\n <polygon fill=\"#231F20\" points=\"111.719,7.684 105.813,13 106.356,13 111.719,8.172 111.719,8.174 117.464,13 118.015,13\r\n 111.719,7.711 \"/>\r\n <polygon fill=\"#231F20\" points=\"111.719,11.025 109.524,13 110.067,13 111.719,11.514 111.719,11.547 113.448,13 113.999,13\r\n 111.719,11.085 \"/>\r\n <polygon fill=\"#231F20\" points=\"113.124,5 122.647,13 123.198,13 113.676,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"118.505,5 128.03,13 128.58,13 119.056,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"123.555,5 132.891,12.842 133.322,12.741 124.106,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"135.845,10.627 129.147,5 128.596,5 135.415,10.728 \"/>\r\n <polygon fill=\"#231F20\" points=\"138.327,8.441 134.233,5 133.682,5 137.897,8.542 \"/>\r\n <polygon fill=\"#231F20\" points=\"140.747,6.223 139.292,5 138.739,5 140.317,6.324 \"/>\r\n <polygon fill=\"#231F20\" points=\"142.823,5 133.939,13 134.481,13 143.366,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"147.964,5 139.077,13 139.622,13 148.507,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"153.545,5 153.104,5 144.218,13 144.761,13 153.626,5.018 \"/>\r\n <polygon fill=\"#231F20\" points=\"155.264,7.684 149.358,13 149.901,13 155.264,8.172 155.264,8.174 161.009,13 161.56,13\r\n 155.264,7.711 \"/>\r\n <polygon fill=\"#231F20\" points=\"155.264,11.025 153.069,13 153.612,13 155.264,11.514 155.264,11.547 156.993,13 157.544,13\r\n 155.264,11.085 \"/>\r\n <polygon fill=\"#231F20\" points=\"156.669,5 166.192,13 166.743,13 157.221,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"162.05,5 171.575,13 172.125,13 162.601,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"167.1,5 176.436,12.842 176.867,12.741 167.651,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"179.39,10.627 172.692,5 172.141,5 178.96,10.728 \"/>\r\n <polygon fill=\"#231F20\" points=\"181.872,8.441 177.778,5 177.227,5 181.442,8.542 \"/>\r\n <polygon fill=\"#231F20\" points=\"184.292,6.223 182.837,5 182.284,5 183.862,6.324 \"/>\r\n <polygon fill=\"#231F20\" points=\"186.368,5 177.484,13 178.026,13 186.911,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"191.509,5 182.622,13 183.167,13 192.052,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"197.09,5 196.649,5 187.763,13 188.306,13 197.171,5.018 \"/>\r\n <polygon fill=\"#231F20\" points=\"198.809,7.684 192.903,13 193.446,13 198.809,8.172 198.809,8.174 204.554,13 205.104,13\r\n 198.809,7.711 \"/>\r\n <polygon fill=\"#231F20\" points=\"198.809,11.025 196.614,13 197.157,13 198.809,11.514 198.809,11.547 200.538,13 201.089,13\r\n 198.809,11.085 \"/>\r\n <polygon fill=\"#231F20\" points=\"200.214,5 209.737,13 210.288,13 200.766,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"205.595,5 215.12,13 215.67,13 206.146,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"210.645,5 219.98,12.842 220.412,12.741 211.196,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"222.935,10.627 216.237,5 215.686,5 222.505,10.728 \"/>\r\n <polygon fill=\"#231F20\" points=\"225.417,8.441 221.323,5 220.771,5 224.987,8.542 \"/>\r\n <polygon fill=\"#231F20\" points=\"227.837,6.223 226.382,5 225.829,5 227.407,6.324 \"/>\r\n <polygon fill=\"#231F20\" points=\"229.913,5 221.029,13 221.571,13 230.456,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"235.054,5 226.167,13 226.712,13 235.597,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"240.635,5 240.194,5 231.308,13 231.851,13 240.716,5.018 \"/>\r\n <polygon fill=\"#231F20\" points=\"242.354,7.684 236.448,13 236.991,13 242.354,8.172 242.354,8.174 248.099,13 248.649,13\r\n 242.354,7.711 \"/>\r\n <polygon fill=\"#231F20\" points=\"242.354,11.025 240.159,13 240.702,13 242.354,11.514 242.354,11.547 244.083,13 244.634,13\r\n 242.354,11.085 \"/>\r\n <polygon fill=\"#231F20\" points=\"243.759,5 253.282,13 253.833,13 244.311,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"249.14,5 258.665,13 259.215,13 249.69,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"254.189,5 263.525,12.842 263.957,12.741 254.741,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"266.479,10.627 259.782,5 259.23,5 266.05,10.728 \"/>\r\n <polygon fill=\"#231F20\" points=\"268.962,8.441 264.868,5 264.316,5 268.532,8.542 \"/>\r\n <polygon fill=\"#231F20\" points=\"271.382,6.223 269.927,5 269.374,5 270.952,6.324 \"/>\r\n <polygon fill=\"#231F20\" points=\"273.458,5 264.574,13 265.116,13 274.001,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"278.599,5 269.712,13 270.257,13 279.142,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"284.18,5 283.739,5 274.853,13 275.396,13 284.261,5.018 \"/>\r\n <polygon fill=\"#231F20\" points=\"285.898,7.684 279.993,13 280.536,13 285.898,8.172 285.898,8.174 291.644,13 292.194,13\r\n 285.898,7.711 \"/>\r\n <polygon fill=\"#231F20\" points=\"285.898,11.025 283.704,13 284.247,13 285.898,11.514 285.898,11.547 287.628,13 288.179,13\r\n 285.898,11.085 \"/>\r\n <polygon fill=\"#231F20\" points=\"287.304,5 296.827,13 297.378,13 287.855,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"292.685,5 302.21,13 302.76,13 293.235,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"297.734,5 307.07,12.842 307.502,12.741 298.286,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"310.024,10.627 303.327,5 302.775,5 309.595,10.728 \"/>\r\n <polygon fill=\"#231F20\" points=\"312.507,8.441 308.413,5 307.861,5 312.077,8.542 \"/>\r\n <polygon fill=\"#231F20\" points=\"314.927,6.223 313.472,5 312.919,5 314.497,6.324 \"/>\r\n <polygon fill=\"#231F20\" points=\"317.003,5 308.119,13 308.661,13 317.546,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"322.144,5 313.257,13 313.802,13 322.687,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"327.725,5 327.284,5 318.397,13 318.94,13 327.806,5.018 \"/>\r\n <polygon fill=\"#231F20\" points=\"329.443,7.684 323.538,13 324.081,13 329.443,8.172 329.443,8.174 335.188,13 335.739,13\r\n 329.443,7.711 \"/>\r\n <polygon fill=\"#231F20\" points=\"329.443,11.025 327.249,13 327.792,13 329.443,11.514 329.443,11.547 331.173,13 331.724,13\r\n 329.443,11.085 \"/>\r\n <polygon fill=\"#231F20\" points=\"330.849,5 340.372,13 340.923,13 331.4,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"336.229,5 345.755,13 346.305,13 336.78,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"341.279,5 350.615,12.842 351.047,12.741 341.831,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"353.569,10.627 346.872,5 346.32,5 353.14,10.728 \"/>\r\n <polygon fill=\"#231F20\" points=\"356.052,8.441 351.958,5 351.406,5 355.622,8.542 \"/>\r\n <polygon fill=\"#231F20\" points=\"358.472,6.223 357.017,5 356.464,5 358.042,6.324 \"/>\r\n <polygon fill=\"#231F20\" points=\"360.548,5 351.664,13 352.206,13 361.091,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"365.688,5 356.802,13 357.347,13 366.231,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"371.27,5 370.829,5 361.942,13 362.485,13 371.351,5.018 \"/>\r\n <polygon fill=\"#231F20\" points=\"372.988,7.684 367.083,13 367.626,13 372.988,8.172 372.988,8.174 378.733,13 379.284,13\r\n 372.988,7.711 \"/>\r\n <polygon fill=\"#231F20\" points=\"372.988,11.025 370.794,13 371.337,13 372.988,11.514 372.988,11.547 374.718,13 375.269,13\r\n 372.988,11.085 \"/>\r\n <polygon fill=\"#231F20\" points=\"374.394,5 383.917,13 384.468,13 374.945,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"379.774,5 389.3,13 389.85,13 380.325,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"384.824,5 394.16,12.842 394.592,12.741 385.376,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"397.114,10.627 390.417,5 389.865,5 396.685,10.728 \"/>\r\n <polygon fill=\"#231F20\" points=\"399.597,8.441 395.503,5 394.951,5 399.167,8.542 \"/>\r\n <polygon fill=\"#231F20\" points=\"402.017,6.223 400.562,5 400.009,5 401.587,6.324 \"/>\r\n <polygon fill=\"#231F20\" points=\"404.093,5 395.209,13 395.751,13 404.636,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"409.233,5 400.347,13 400.892,13 409.776,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"414.814,5 414.374,5 405.487,13 406.03,13 414.896,5.018 \"/>\r\n <polygon fill=\"#231F20\" points=\"416.533,7.684 410.628,13 411.171,13 416.533,8.172 416.533,8.174 422.278,13 422.829,13\r\n 416.533,7.711 \"/>\r\n <polygon fill=\"#231F20\" points=\"416.533,11.025 414.339,13 414.882,13 416.533,11.514 416.533,11.547 418.263,13 418.813,13\r\n 416.533,11.085 \"/>\r\n <polygon fill=\"#231F20\" points=\"417.938,5 427.462,13 428.013,13 418.49,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"423.319,5 432.845,13 433.395,13 423.87,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"428.369,5 437.705,12.842 438.137,12.741 428.921,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"440.659,10.627 433.962,5 433.41,5 440.229,10.728 \"/>\r\n <polygon fill=\"#231F20\" points=\"443.142,8.441 439.048,5 438.496,5 442.712,8.542 \"/>\r\n <polygon fill=\"#231F20\" points=\"445.562,6.223 444.106,5 443.554,5 445.132,6.324 \"/>\r\n <polygon fill=\"#231F20\" points=\"447.638,5 438.754,13 439.296,13 448.181,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"452.778,5 443.892,13 444.437,13 453.321,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"458.359,5 457.919,5 449.032,13 449.575,13 458.44,5.018 \"/>\r\n <polygon fill=\"#231F20\" points=\"460.078,7.684 454.173,13 454.716,13 460.078,8.172 460.078,8.174 465.823,13 466.374,13\r\n 460.078,7.711 \"/>\r\n <polygon fill=\"#231F20\" points=\"460.078,11.025 457.884,13 458.427,13 460.078,11.514 460.078,11.547 461.808,13 462.358,13\r\n 460.078,11.085 \"/>\r\n <polygon fill=\"#231F20\" points=\"461.483,5 471.007,13 471.558,13 462.035,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"466.864,5 476.39,13 476.939,13 467.415,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"471.914,5 481.25,12.842 481.682,12.741 472.466,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"484.204,10.627 477.507,5 476.955,5 483.774,10.728 \"/>\r\n <polygon fill=\"#231F20\" points=\"486.687,8.441 482.593,5 482.041,5 486.257,8.542 \"/>\r\n <polygon fill=\"#231F20\" points=\"489.106,6.223 487.651,5 487.099,5 488.677,6.324 \"/>\r\n <polygon fill=\"#231F20\" points=\"491.183,5 482.299,13 482.841,13 491.726,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"496.323,5 487.437,13 487.981,13 496.866,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"501.904,5 501.464,5 492.577,13 493.12,13 501.985,5.018 \"/>\r\n <polygon fill=\"#231F20\" points=\"503.623,7.684 497.718,13 498.261,13 503.623,8.172 503.623,8.174 509.368,13 509.919,13\r\n 503.623,7.711 \"/>\r\n <polygon fill=\"#231F20\" points=\"503.623,11.025 501.429,13 501.972,13 503.623,11.514 503.623,11.547 505.353,13 505.903,13\r\n 503.623,11.085 \"/>\r\n <polygon fill=\"#231F20\" points=\"505.028,5 514.552,13 515.103,13 505.58,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"510.409,5 519.935,13 520.484,13 510.96,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"515.459,5 524.795,12.842 525.227,12.741 516.011,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"527.749,10.627 521.052,5 520.5,5 527.319,10.728 \"/>\r\n <polygon fill=\"#231F20\" points=\"530.231,8.441 526.138,5 525.586,5 529.802,8.542 \"/>\r\n <polygon fill=\"#231F20\" points=\"532.651,6.223 531.196,5 530.644,5 532.222,6.324 \"/>\r\n <polygon fill=\"#231F20\" points=\"534.728,5 525.844,13 526.386,13 535.271,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"539.868,5 530.981,13 531.526,13 540.411,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"545.449,5 545.009,5 536.122,13 536.665,13 545.53,5.018 \"/>\r\n <polygon fill=\"#231F20\" points=\"547.168,7.684 541.263,13 541.806,13 547.168,8.172 547.168,8.174 552.913,13 553.464,13\r\n 547.168,7.711 \"/>\r\n <polygon fill=\"#231F20\" points=\"547.168,11.025 544.974,13 545.517,13 547.168,11.514 547.168,11.547 548.897,13 549.448,13\r\n 547.168,11.085 \"/>\r\n <polygon fill=\"#231F20\" points=\"548.573,5 558.097,13 558.647,13 549.125,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"553.954,5 563.479,13 564.029,13 554.505,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"559.004,5 568.34,12.842 568.771,12.741 559.556,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"571.294,10.627 564.597,5 564.045,5 570.864,10.728 \"/>\r\n <polygon fill=\"#231F20\" points=\"573.776,8.441 569.683,5 569.131,5 573.347,8.542 \"/>\r\n <polygon fill=\"#231F20\" points=\"576.196,6.223 574.741,5 574.188,5 575.767,6.324 \"/>\r\n <polygon fill=\"#231F20\" points=\"578.272,5 569.389,13 569.931,13 578.815,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"583.413,5 574.526,13 575.071,13 583.956,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"588.994,5 588.554,5 579.667,13 580.21,13 589.075,5.018 \"/>\r\n <polygon fill=\"#231F20\" points=\"590.713,7.684 584.808,13 585.351,13 590.713,8.172 590.713,8.174 596.458,13 597.009,13\r\n 590.713,7.711 \"/>\r\n <polygon fill=\"#231F20\" points=\"590.713,11.025 588.519,13 589.062,13 590.713,11.514 590.713,11.547 592.442,13 592.993,13\r\n 590.713,11.085 \"/>\r\n <polygon fill=\"#231F20\" points=\"592.118,5 601.642,13 602.192,13 592.67,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"597.499,5 607.024,13 607.574,13 598.05,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"602.549,5 611.885,12.842 612.316,12.741 603.101,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"614.839,10.627 608.142,5 607.59,5 614.409,10.728 \"/>\r\n <polygon fill=\"#231F20\" points=\"617.321,8.441 613.228,5 612.676,5 616.892,8.542 \"/>\r\n <polygon fill=\"#231F20\" points=\"619.741,6.223 618.286,5 617.733,5 619.312,6.324 \"/>\r\n <polygon fill=\"#231F20\" points=\"621.817,5 612.934,13 613.476,13 622.36,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"626.958,5 618.071,13 618.616,13 627.501,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"632.539,5 632.099,5 623.212,13 623.755,13 632.62,5.018 \"/>\r\n <polygon fill=\"#231F20\" points=\"634.258,7.684 628.353,13 628.896,13 634.258,8.172 634.258,8.174 640.003,13 640.554,13\r\n 634.258,7.711 \"/>\r\n <polygon fill=\"#231F20\" points=\"634.258,11.025 632.063,13 632.606,13 634.258,11.514 634.258,11.547 635.987,13 636.538,13\r\n 634.258,11.085 \"/>\r\n <polygon fill=\"#231F20\" points=\"635.663,5 645.187,13 645.737,13 636.215,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"641.044,5 650.569,13 651.119,13 641.595,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"646.094,5 655.43,12.842 655.861,12.741 646.646,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"658.384,10.627 651.687,5 651.135,5 657.954,10.728 \"/>\r\n <polygon fill=\"#231F20\" points=\"660.866,8.441 656.772,5 656.221,5 660.437,8.542 \"/>\r\n <polygon fill=\"#231F20\" points=\"663.286,6.223 661.831,5 661.278,5 662.856,6.324 \"/>\r\n <polygon fill=\"#231F20\" points=\"665.362,5 656.479,13 657.021,13 665.905,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"670.503,5 661.616,13 662.161,13 671.046,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"676.084,5 675.644,5 666.757,13 667.3,13 676.165,5.018 \"/>\r\n <polygon fill=\"#231F20\" points=\"677.803,7.684 671.897,13 672.44,13 677.803,8.172 677.803,8.174 683.548,13 684.099,13\r\n 677.803,7.711 \"/>\r\n <polygon fill=\"#231F20\" points=\"677.803,11.025 675.608,13 676.151,13 677.803,11.514 677.803,11.547 679.532,13 680.083,13\r\n 677.803,11.085 \"/>\r\n <polygon fill=\"#231F20\" points=\"679.208,5 688.731,13 689.282,13 679.76,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"684.589,5 694.114,13 694.664,13 685.14,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"689.639,5 698.975,12.842 699.406,12.741 690.19,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"701.929,10.627 695.231,5 694.68,5 701.499,10.728 \"/>\r\n <polygon fill=\"#231F20\" points=\"704.411,8.441 700.317,5 699.766,5 703.981,8.542 \"/>\r\n <polygon fill=\"#231F20\" points=\"706.831,6.223 705.376,5 704.823,5 706.401,6.324 \"/>\r\n <polygon fill=\"#231F20\" points=\"708.907,5 700.023,13 700.565,13 709.45,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"714.048,5 705.161,13 705.706,13 714.591,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"719.629,5 719.188,5 710.302,13 710.845,13 719.71,5.018 \"/>\r\n <polygon fill=\"#231F20\" points=\"721.348,7.684 715.442,13 715.985,13 721.348,8.172 721.348,8.174 727.093,13 727.644,13\r\n 721.348,7.711 \"/>\r\n <polygon fill=\"#231F20\" points=\"721.348,11.025 719.153,13 719.696,13 721.348,11.514 721.348,11.547 723.077,13 723.628,13\r\n 721.348,11.085 \"/>\r\n <polygon fill=\"#231F20\" points=\"722.753,5 732.276,13 732.827,13 723.305,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"728.134,5 737.659,13 738.209,13 728.685,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"733.184,5 742.52,12.842 742.951,12.741 733.735,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"745.474,10.627 738.776,5 738.225,5 745.044,10.728 \"/>\r\n <polygon fill=\"#231F20\" points=\"747.956,8.441 743.862,5 743.311,5 747.526,8.542 \"/>\r\n <polygon fill=\"#231F20\" points=\"750.376,6.223 748.921,5 748.368,5 749.946,6.324 \"/>\r\n <polygon fill=\"#231F20\" points=\"752.452,5 743.568,13 744.11,13 752.995,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"757.593,5 748.706,13 749.251,13 758.136,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"763.174,5 762.733,5 753.847,13 754.39,13 763.255,5.018 \"/>\r\n <polygon fill=\"#231F20\" points=\"764.893,7.684 758.987,13 759.53,13 764.893,8.172 764.893,8.174 770.638,13 771.188,13\r\n 764.893,7.711 \"/>\r\n <polygon fill=\"#231F20\" points=\"764.893,11.025 762.698,13 763.241,13 764.893,11.514 764.893,11.547 766.622,13 767.173,13\r\n 764.893,11.085 \"/>\r\n <polygon fill=\"#231F20\" points=\"766.298,5 775.821,13 776.372,13 766.85,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"771.679,5 781.204,13 781.754,13 772.229,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"776.729,5 786.064,12.842 786.496,12.741 777.28,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"789.019,10.627 782.321,5 781.77,5 788.589,10.728 \"/>\r\n <polygon fill=\"#231F20\" points=\"791.501,8.441 787.407,5 786.855,5 791.071,8.542 \"/>\r\n <polygon fill=\"#231F20\" points=\"793.921,6.223 792.466,5 791.913,5 793.491,6.324 \"/>\r\n <polygon fill=\"#231F20\" points=\"795.997,5 787.113,13 787.655,13 796.54,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"801.138,5 792.251,13 792.796,13 801.681,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"806.719,5 806.278,5 797.392,13 797.935,13 806.8,5.018 \"/>\r\n <polygon fill=\"#231F20\" points=\"808.438,7.684 802.532,13 803.075,13 808.438,8.172 808.438,8.174 814.183,13 814.733,13\r\n 808.438,7.711 \"/>\r\n <polygon fill=\"#231F20\" points=\"808.438,11.025 806.243,13 806.786,13 808.438,11.514 808.438,11.547 810.167,13 810.718,13\r\n 808.438,11.085 \"/>\r\n <polygon fill=\"#231F20\" points=\"809.843,5 819.366,13 819.917,13 810.395,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"815.224,5 824.749,13 825.299,13 815.774,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"820.273,5 829.609,12.842 830.041,12.741 820.825,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"832.563,10.627 825.866,5 825.314,5 832.134,10.728 \"/>\r\n <polygon fill=\"#231F20\" points=\"835.046,8.441 830.952,5 830.4,5 834.616,8.542 \"/>\r\n <polygon fill=\"#231F20\" points=\"837.466,6.223 836.011,5 835.458,5 837.036,6.324 \"/>\r\n <polygon fill=\"#231F20\" points=\"839.542,5 830.658,13 831.2,13 840.085,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"844.683,5 835.796,13 836.341,13 845.226,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"850.264,5 849.823,5 840.937,13 841.479,13 850.345,5.018 \"/>\r\n <polygon fill=\"#231F20\" points=\"851.982,7.684 846.077,13 846.62,13 851.982,8.172 851.982,8.174 857.728,13 858.278,13\r\n 851.982,7.711 \"/>\r\n <polygon fill=\"#231F20\" points=\"851.982,11.025 849.788,13 850.331,13 851.982,11.514 851.982,11.547 853.712,13 854.263,13\r\n 851.982,11.085 \"/>\r\n <polygon fill=\"#231F20\" points=\"853.388,5 862.911,13 863.462,13 853.939,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"858.769,5 868.294,13 868.844,13 859.319,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"863.818,5 873.154,12.842 873.586,12.741 864.37,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"876.108,10.627 869.411,5 868.859,5 875.679,10.728 \"/>\r\n <polygon fill=\"#231F20\" points=\"878.591,8.441 874.497,5 873.945,5 878.161,8.542 \"/>\r\n <polygon fill=\"#231F20\" points=\"881.011,6.223 879.556,5 879.003,5 880.581,6.324 \"/>\r\n <polygon fill=\"#231F20\" points=\"883.087,5 874.203,13 874.745,13 883.63,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"888.228,5 879.341,13 879.886,13 888.771,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"893.809,5 893.368,5 884.481,13 885.024,13 893.89,5.018 \"/>\r\n <polygon fill=\"#231F20\" points=\"895.527,7.684 889.622,13 890.165,13 895.527,8.172 895.527,8.174 901.272,13 901.823,13\r\n 895.527,7.711 \"/>\r\n <polygon fill=\"#231F20\" points=\"895.527,11.025 893.333,13 893.876,13 895.527,11.514 895.527,11.547 897.257,13 897.808,13\r\n 895.527,11.085 \"/>\r\n <polygon fill=\"#231F20\" points=\"896.933,5 906.456,13 907.007,13 897.484,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"902.313,5 911.839,13 912.389,13 902.864,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"907.363,5 916.699,12.842 917.131,12.741 907.915,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"919.653,10.627 912.956,5 912.404,5 919.224,10.728 \"/>\r\n <polygon fill=\"#231F20\" points=\"922.136,8.441 918.042,5 917.49,5 921.706,8.542 \"/>\r\n <polygon fill=\"#231F20\" points=\"924.556,6.223 923.101,5 922.548,5 924.126,6.324 \"/>\r\n <polygon fill=\"#231F20\" points=\"926.632,5 917.748,13 918.29,13 927.175,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"931.772,5 922.886,13 923.431,13 932.315,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"937.354,5 936.913,5 928.026,13 928.569,13 937.435,5.018 \"/>\r\n <polygon fill=\"#231F20\" points=\"939.072,7.684 933.167,13 933.71,13 939.072,8.172 939.072,8.174 944.817,13 945.368,13\r\n 939.072,7.711 \"/>\r\n <polygon fill=\"#231F20\" points=\"939.072,11.025 936.878,13 937.421,13 939.072,11.514 939.072,11.547 940.802,13 941.353,13\r\n 939.072,11.085 \"/>\r\n <polygon fill=\"#231F20\" points=\"940.478,5 950.001,13 950.552,13 941.029,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"945.858,5 955.384,13 955.934,13 946.409,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"950.908,5 960.244,12.842 960.676,12.741 951.46,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"963.198,10.627 956.501,5 955.949,5 962.769,10.728 \"/>\r\n <polygon fill=\"#231F20\" points=\"965.681,8.441 961.587,5 961.035,5 965.251,8.542 \"/>\r\n <polygon fill=\"#231F20\" points=\"968.101,6.223 966.646,5 966.093,5 967.671,6.324 \"/>\r\n <polygon fill=\"#231F20\" points=\"970.177,5 961.293,13 961.835,13 970.72,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"975.317,5 966.431,13 966.976,13 975.86,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"980.898,5 980.458,5 971.571,13 972.114,13 980.979,5.018 \"/>\r\n <polygon fill=\"#231F20\" points=\"982.617,7.684 976.712,13 977.255,13 982.617,8.172 982.617,8.174 988.362,13 988.913,13\r\n 982.617,7.711 \"/>\r\n <polygon fill=\"#231F20\" points=\"982.617,11.025 980.423,13 980.966,13 982.617,11.514 982.617,11.547 984.347,13 984.897,13\r\n 982.617,11.085 \"/>\r\n <polygon fill=\"#231F20\" points=\"984.022,5 993.546,13 994.097,13 984.574,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"989.403,5 998.929,13 999.479,13 989.954,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"994.453,5 1003.789,12.842 1004.221,12.741 995.005,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"1006.743,10.627 1000.046,5 999.494,5 1006.313,10.728 \"/>\r\n <polygon fill=\"#231F20\" points=\"1009.226,8.441 1005.132,5 1004.58,5 1008.796,8.542 \"/>\r\n <polygon fill=\"#231F20\" points=\"1011.646,6.223 1010.19,5 1009.638,5 1011.216,6.324 \"/>\r\n <polygon fill=\"#231F20\" points=\"1013.722,5 1004.838,13 1005.38,13 1014.265,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"1018.862,5 1009.976,13 1010.521,13 1019.405,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"1024.443,5 1024.003,5 1015.116,13 1015.659,13 1024.524,5.018 \"/>\r\n <polygon fill=\"#231F20\" points=\"1026.162,7.684 1020.257,13 1020.8,13 1026.162,8.172 1026.162,8.174 1031.907,13 1032.458,13\r\n 1026.162,7.711 \"/>\r\n <polygon fill=\"#231F20\" points=\"1026.162,11.025 1023.968,13 1024.511,13 1026.162,11.514 1026.162,11.547 1027.892,13\r\n 1028.442,13 1026.162,11.085 \"/>\r\n <polygon fill=\"#231F20\" points=\"1027.567,5 1037.091,13 1037.642,13 1028.119,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"1032.948,5 1042.474,13 1043.023,13 1033.499,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"1037.998,5 1047.334,12.842 1047.766,12.741 1038.55,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"1050.288,10.627 1043.591,5 1043.039,5 1049.858,10.728 \"/>\r\n <polygon fill=\"#231F20\" points=\"1052.771,8.441 1048.677,5 1048.125,5 1052.341,8.542 \"/>\r\n <polygon fill=\"#231F20\" points=\"1055.19,6.223 1053.735,5 1053.183,5 1054.761,6.324 \"/>\r\n <polygon fill=\"#231F20\" points=\"1057.267,5 1048.383,13 1048.925,13 1057.81,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"1062.407,5 1053.521,13 1054.065,13 1062.95,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"1067.988,5 1067.548,5 1058.661,13 1059.204,13 1068.069,5.018 \"/>\r\n <polygon fill=\"#231F20\" points=\"1069.707,7.684 1063.802,13 1064.345,13 1069.707,8.172 1069.707,8.174 1075.452,13 1076.003,13\r\n 1069.707,7.711 \"/>\r\n <polygon fill=\"#231F20\" points=\"1069.707,11.025 1067.513,13 1068.056,13 1069.707,11.514 1069.707,11.547 1071.437,13\r\n 1071.987,13 1069.707,11.085 \"/>\r\n <polygon fill=\"#231F20\" points=\"1071.112,5 1080.636,13 1081.187,13 1071.664,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"1076.493,5 1086.019,13 1086.568,13 1077.044,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"1081.543,5 1090.879,12.842 1091.311,12.741 1082.095,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"1093.833,10.627 1087.136,5 1086.584,5 1093.403,10.728 \"/>\r\n <polygon fill=\"#231F20\" points=\"1096.315,8.441 1092.222,5 1091.67,5 1095.886,8.542 \"/>\r\n <polygon fill=\"#231F20\" points=\"1098.735,6.223 1097.28,5 1096.728,5 1098.306,6.324 \"/>\r\n <polygon fill=\"#231F20\" points=\"1100.812,5 1091.928,13 1092.47,13 1101.354,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"1105.952,5 1097.065,13 1097.61,13 1106.495,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"1111.533,5 1111.093,5 1102.206,13 1102.749,13 1111.614,5.018 \"/>\r\n <polygon fill=\"#231F20\" points=\"1113.252,7.684 1107.347,13 1107.89,13 1113.252,8.172 1113.252,8.174 1118.997,13 1119.548,13\r\n 1113.252,7.711 \"/>\r\n <polygon fill=\"#231F20\" points=\"1113.252,11.025 1111.058,13 1111.601,13 1113.252,11.514 1113.252,11.547 1114.981,13\r\n 1115.532,13 1113.252,11.085 \"/>\r\n <polygon fill=\"#231F20\" points=\"1114.657,5 1124.181,13 1124.731,13 1115.209,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"1120.038,5 1129.563,13 1130.113,13 1120.589,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"1125.088,5 1134.424,12.842 1134.855,12.741 1125.64,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"1137.378,10.627 1130.681,5 1130.129,5 1136.948,10.728 \"/>\r\n <polygon fill=\"#231F20\" points=\"1139.86,8.441 1135.767,5 1135.215,5 1139.431,8.542 \"/>\r\n <polygon fill=\"#231F20\" points=\"1142.28,6.223 1140.825,5 1140.272,5 1141.851,6.324 \"/>\r\n <polygon fill=\"#231F20\" points=\"1144.356,5 1135.473,13 1136.015,13 1144.899,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"1149.497,5 1140.61,13 1141.155,13 1150.04,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"1155.078,5 1154.638,5 1145.751,13 1146.294,13 1155.159,5.018 \"/>\r\n <polygon fill=\"#231F20\" points=\"1156.797,7.684 1150.892,13 1151.435,13 1156.797,8.172 1156.797,8.174 1162.542,13 1163.093,13\r\n 1156.797,7.711 \"/>\r\n <polygon fill=\"#231F20\" points=\"1156.797,11.025 1154.603,13 1155.146,13 1156.797,11.514 1156.797,11.547 1158.526,13\r\n 1159.077,13 1156.797,11.085 \"/>\r\n <polygon fill=\"#231F20\" points=\"1158.202,5 1167.726,13 1168.276,13 1158.754,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"1163.583,5 1173.108,13 1173.658,13 1164.134,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"1168.633,5 1177.969,12.842 1178.4,12.741 1169.185,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"1180.923,10.627 1174.226,5 1173.674,5 1180.493,10.728 \"/>\r\n <polygon fill=\"#231F20\" points=\"1183.405,8.441 1179.312,5 1178.76,5 1182.976,8.542 \"/>\r\n <polygon fill=\"#231F20\" points=\"1185.825,6.223 1184.37,5 1183.817,5 1185.396,6.324 \"/>\r\n <polygon fill=\"#231F20\" points=\"1187.901,5 1179.018,13 1179.56,13 1188.444,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"1193.042,5 1184.155,13 1184.7,13 1193.585,5 \"/>\r\n <polygon fill=\"#231F20\" points=\"1189.296,13 1189.839,13 1194.629,8.688 1194.629,8.199 \"/>\r\n <polygon fill=\"#231F20\" points=\"1194.629,13 1194.629,12.827 1194.437,13 \"/>\r\n </g>\r\n </svg>';\r\n $html .= '</div>';\r\n\r\n print( $html );\r\n\r\n\t}", "title": "" }, { "docid": "cd325e92498abbf92191d142fff02725", "score": "0.5590396", "text": "protected function getPrevLink()\n {\n $nNumber = ($this->currentPage > 1 ? $this->currentPage - 1 : 0);\n return $this->getLink($nNumber, 'prev', $this->previousText, $this->previousText);\n }", "title": "" }, { "docid": "e7eab51fa156904b9e153f43df2de358", "score": "0.5585427", "text": "function print_events($link,$type)\n{\n if ($type=='next')\n {\n $title='Next Event';\n $timearrow='>=';\n $cancelled=' where e.cancel=0';\n $family='';\n $limit = ' limit 1';\n }\n if ($type=='nextfam')\n {\n \t$title=$_SESSION['family_name'].' Next Event';\n \t$timearrow='>=';\n \t$cancelled=' where e.cancel=0';\n \t$family=\" and f.family_id=\".$_SESSION['family_id'];\n \t$limit = ' limit 1';\n }\n if ($type=='upcoming')\n {\n $title='Upcoming Events';\n $timearrow='>=';\n $cancelled=' where e.cancel=0';\n $family='';\n $limit = '';\n }\n elseif ($type=='cancelled')\n {\n $title='Cancelled Events';\n $timearrow='>';\n $cancelled=' where e.cancel=1';\n $family='';\n $limit = '';\n }\n elseif ($type=='past')\n {\n $title='Past Events';\n $timearrow='<';\n $cancelled='';\n $family='';\n $limit = '';\n }\n if (empty($_SESSION['user']))\n {\n $limit = ' limit 1';\n }\n echo '<h2>'.$title.'</h2>';\n $sql = \"select * from (select e.event_id,f.name,e.family_id,ad.line1,ad.city,ad.state,d.month,d.day,d.year,str_to_date(concat(concat(month,'/',greatest(day,1)),'/',year),'%m/%d/%Y') dt from date d join event e on d.date_id=e.date_id join family f on f.family_id=e.family_id join address ad on ad.address_id=f.address_id\".$cancelled.$family.\") as a where a.dt\".$timearrow.\"curdate() order by year,month\".$limit;\n logger($link,$sql);\n $data = mysqli_query($link,$sql);\n while (list($event_id,$fam_name,$fam_id,$line1,$city,$state,$month,$day,$year,$date)=mysqli_fetch_row($data))\n {\n echo '<table border=\"1\" width=\"80%\"><tr><td colspan=\"2\">';\n echo '<b>'.date(\"F\",strtotime($date)).' '.$year.'</b><br><b>Host:</b> '.$fam_name.'<br><b>Date:</b>';\n if ($day<1)\n {\n echo '<b>TBD</b>';\n }\n else\n {\n echo date(\"D\",strtotime($date)).', '.date(\"M\",strtotime($date)).' '.$day;\n }\n echo '<br><b>Time:</b> 4pm';\n echo '<br><b>Location:</b> '.$line1.' '.$city.', '.$state.'</td></tr>';\n if ($type!='upcoming')\n {\n echo '<tr><td valign=\"top\" width=\"50%\"><table border=\"1\" width=\"100%\"><tr><td colspan=\"2\" align=\"center\"><b>Dishes</b></td></tr>';\n $sql1 = 'select food,e.event_id,fa.name,e.notes from food f left join (select * from food_for_event where event_id='.$event_id.' and on_menu=1) as e on f.food_id=e.food_id left join event ev on e.event_id=ev.event_id left join family fa on fa.family_id=e.family_id order by f.food_id';\n logger($link,$sql1);\n $data1 = mysqli_query($link,$sql1);\n while (list($food,$on_menu,$family_name,$notes)=mysqli_fetch_row($data1))\n {\n if ($on_menu!=\"\")\n {\n echo '<tr><td width=\"55%\">';\n if ($family_name!=\"\")\n {\n echo '<b>'.$family_name.'</b>';\n }\n $note=\"\";\n if ($notes!=\"\")\n {\n $note='<br><i>&nbsp;&nbsp-'.$notes;\n }\n echo '</td><td>'.$food.$note.'</td></tr>';\n }\n }\n echo '</table></td><td valign=\"top\">';\n echo '<table border=\"1\" width=\"100%\"><tr><td colspan=\"2\" align=\"center\"><b>Attending</b>';\n $sql1 = 'select name,first_name from person p join family f on p.family_id=f.family_id join attending a on p.person_id=a.person_id where a.event_id='.$event_id.' and coming=1';\n logger($link,$sql1);\n $data1 = mysqli_query($link,$sql1);\n $prev_name=\"\";\n while (list($family_name,$first)=mysqli_fetch_row($data1))\n {\n if ($prev_name!=$family_name)\n {\n $prev_name=$family_name;\n echo '</td></tr><tr><td width=\"75%\">';\n echo '<b>'.$family_name.'</b>';\n echo '</td><td>'.$first;\n }\n else\n {\n echo '<br>'.$first;\n }\n }\n echo '</td></tr></table>';\n echo '</td></tr>';\n }\n echo '</table><br>';\n if ((empty($_SESSION['user']) && $type=='upcoming'))\n {\n \tbreak;\n }\n }\n}", "title": "" }, { "docid": "4e32597241d973492f1655b13055266f", "score": "0.5575217", "text": "function ewd_post_nav() {\n?>\n<nav id=\"nav-single\">\n\t<h3 class=\"assistive-text\"><?php _e( 'Post navigation', 'echotheme' ); ?></h3>\n\t<span class=\"nav-previous\"><?php previous_post_link( '%link', __( '<span class=\"meta-nav\">&larr;</span> Previous', 'twentyeleven' ), true ); ?></span>\n\t<span class=\"nav-next\"><?php next_post_link( '%link', __( 'Next <span class=\"meta-nav\">&rarr;</span>', 'echotheme' ), true ); ?></span>\n</nav><!-- #nav-single -->\n<?php\n}", "title": "" }, { "docid": "dacc0ddc0299e73e75f2ff851bccf7c2", "score": "0.5567509", "text": "function twentythirteen_post_nav() {\n\tglobal $post;\n\n\t// Don't print empty markup if there's nowhere to navigate.\n\t$previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true );\n\t$next = get_adjacent_post( false, '', false );\n\n\tif ( ! $next && ! $previous )\n\t\treturn;\n\t?>\n\t<nav class=\"navigation paging-navigation\" role=\"navigation\">\n\t\t<h1 class=\"screen-reader-text\"><?php _e( 'Post navigation', 'twentythirteen' ); ?></h1>\n\t\t<div class=\"nav-links-wide\">\n\n\t\t <div class=\"nav-previous\">\n <?php previous_post_link( '%link', _x( '<span class=\"meta-nav\">&larr;</span> %title', 'Previous post link', 'twentythirteen' ) ); ?>\n </div>\n\t\t <div class=\"nav-next\">\n\t\t\t<?php next_post_link( '%link', _x( '%title <span class=\"meta-nav\">&rarr;</span>', 'Next post link', 'twentythirteen' ) ); ?>\n </div>\n\n\t\t</div><!-- .nav-links -->\n\t</nav><!-- .navigation -->\n\t<?php\n}", "title": "" }, { "docid": "1856c1c3fdd6246c3f0aca857e5cc903", "score": "0.5550244", "text": "function dbdb_next_page_link() {\n\tglobal $post;\n\t\n\tif ( isset($post->post_parent) && $post->post_parent > 0 ) {\n\t$children = get_pages('&sort_column=post_date&sort_order=asc&child_of='.$post->post_parent.'&parent='.$post->post_parent);\n\t};\n\t\n\t// throw the children ids into an array\n\tforeach( $children as $child ) { $child_id_array[] = $child->ID; }\n\t\n\t$next_page_id = relative_value_array($child_id_array, $post->ID, 1);\n\t\n\t$output = '';\n\tif( '' != $next_page_id ) {\n\t$output .= '<a href=\"' . get_page_link($next_page_id) . '\">'. get_the_title($next_page_id) . ' <span class=\"fa fa-angle-double-right\" aria-hidden=\"true\"></span></a>';\n\t}\n\treturn $output;\n\t}", "title": "" }, { "docid": "e06a3fd2f152bac2ff5fc4ec80bdbf51", "score": "0.55376136", "text": "function cde_get_event_date_link($year = 0, $month = 0, $day = 0)\r\n{\r\n\tglobal $wp_rewrite;\r\n\r\n\t$archive = get_post_type_archive_link('event');\r\n\r\n\t$year = (int)$year;\r\n\t$month = (int)$month;\r\n\t$day = (int)$day;\r\n\r\n\tif($year === 0 && $month === 0 && $day === 0)\r\n\t\treturn $archive;\r\n\r\n\t$cde_year = $year;\r\n\t$cde_month = str_pad($month, 2, '0', STR_PAD_LEFT);\r\n\t$cde_day = str_pad($day, 2, '0', STR_PAD_LEFT);\r\n\r\n\tif($day !== 0)\r\n\t\t$link_date = compact('cde_year', 'cde_month', 'cde_day');\r\n\telseif($month !== 0)\r\n\t\t$link_date = compact('cde_year', 'cde_month');\r\n\telse\r\n\t\t$link_date = compact('cde_year');\r\n\r\n\tif(!empty($archive) && $wp_rewrite->using_mod_rewrite_permalinks() && ($permastruct = $wp_rewrite->get_extra_permastruct('event_ondate')))\r\n\t{\r\n\t\t$archive = apply_filters('post_type_archive_link', home_url(str_replace('%event_ondate%', implode('/', $link_date), $permastruct)), 'event');\r\n\t}\r\n\telse\r\n\t\t$archive = add_query_arg('event_ondate', implode('-', $link_date), $archive);\r\n\r\n\treturn $archive;\r\n}", "title": "" }, { "docid": "283e6e4a2dcfcd0a5ed89336a9bb8d6b", "score": "0.55291086", "text": "public function PrevLink() {\n\t\tif($this->pageStart - $this->pageLength >= 0) {\n\t\t\treturn $this->pagingBaseUrl . ($this->pageStart / $this->pageLength);\n\t\t}\n\t}", "title": "" }, { "docid": "6d99381bd87f072af31bcdd1b378cbfd", "score": "0.5512995", "text": "function p2_post_nav()\r\n{\r\n\t\r\n\tob_start();\r\n\t\r\n\tprevious_post_link('%link', '&laquo; %title');\r\n\techo ' &mdash; ';\r\n\tnext_post_link('%link', '%title &raquo;');\r\n\t\r\n\t$contents = ob_get_contents();\r\n\t\r\n\tob_end_clean();\r\n\t\r\n\t$contents = trim($contents, ' &mdash; ');\r\n\techo $contents;\r\n\t\r\n}", "title": "" }, { "docid": "faffefc911d23a28cce1780f5daec18e", "score": "0.5502478", "text": "function et3_theme_framework_post_nav() {\n global $post;\n\n // Don't print empty markup if there's nowhere to navigate.\n $previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true );\n $next = get_adjacent_post( false, '', false );\n\n if ( ! $next && ! $previous )\n return;\n ?>\n\t<nav class=\"navigation post-navigation\" role=\"navigation\">\n\t\t<div class=\"nav-links clearfix\">\n\t\t\t<?php\n\t\t\t$prev_post = get_previous_post();\n\t\t\tif (!empty( $prev_post )): ?>\n\t\t\t <a class=\"btn btn-default post-prev left\" href=\"<?php echo get_permalink( $prev_post->ID ); ?>\"><i class=\"fa fa-angle-left\"></i><?php echo esc_attr($prev_post->post_title); ?></a>\n\t\t\t<?php endif; ?>\n\t\t\t<?php\n\t\t\t$next_post = get_next_post();\n\t\t\tif ( is_a( $next_post , 'WP_Post' ) ) { ?>\n\t\t\t <a class=\"btn btn-default post-next right\" href=\"<?php echo get_permalink( $next_post->ID ); ?>\"><?php echo get_the_title( $next_post->ID ); ?><i class=\"fa fa-angle-right\"></i></a>\n\t\t\t<?php } ?>\n\n\t\t\t</div><!-- .nav-links -->\n\t</nav><!-- .navigation -->\n\t<?php\n}", "title": "" }, { "docid": "e9015e3460f93510f53719a13481a61f", "score": "0.5484871", "text": "function rbge_trail_nav($atts){\n \n $widget = '<div class=\"rbge-trail-nav-wrapper\" >';\n\n if(!empty($atts['next'])){\n //$widget .= '<div class=\"rbge-trail-nav-next\" >';\n $widget .= '<a class=\"rbge-trail-nav-next\" href=\"/archives/'. $atts['next'] . '\"/>';\n $widget .= get_the_title($atts['next']);\n $widget .= '<span class=\"rbge-trail-nav-label\">Next: </span>';\n $widget .= '</a>';\n //$widget .= '</div>';\n }\n\n if(!empty($atts['previous'])){\n //$widget .= '<div class=\"rbge-trail-nav-previous\" >';\n $widget .= '<a class=\"rbge-trail-nav-previous\" href=\"/archives/'. $atts['previous'] . '\"/>';\n $widget .= '<span class=\"rbge-trail-nav-label\">Previous: </span>';\n $widget .= get_the_title($atts['previous']);\n $widget .= '</a>';\n // $widget .= '</div>';\n }\n \n\n $widget .= '</div>';\n \n return $widget;\n\n}", "title": "" }, { "docid": "3bcd3f9514460726eeaa233862fa5366", "score": "0.5483175", "text": "public function get_previous_url()\n {\n // phpcs:enable\n\t\t$param_array = array();\n\t\tif ($this->start < $this->per_page) {\n\t\t\t$sub = 0;\n\t\t} else {\n\t\t\t$sub = $this->per_page;\n\t\t}\n\t\t$param_array['start'] = $this->start - $sub;\n\t\t$param_array['end'] = $this->end - $sub;\n\t\tif ($this->categorie != 0) {\n\t\t\t$param_array['categorie'] = $this->categorie;\n\t\t}\n\t\t$param = http_build_query($param_array);\n\t\treturn $this->url.\"&\".$param;\n }", "title": "" }, { "docid": "4f397e273f2ad94aa577eb6c00fbd9fa", "score": "0.5469803", "text": "public function renderPreviousAndNext()\n\t{\n\t\tif ($this->controls === false || !(isset($this->controls[0], $this->controls[1]))) {\n\t\t\treturn;\n\t\t}\n\t\techo Html::a($this->controls[0], '#' . $this->options['id'], array(\n\t\t\t\t'class' => 'left carousel-control',\n\t\t\t\t'data-slide' => 'prev',\n\t\t\t)) . \"\\n\"\n\t\t\t. Html::a($this->controls[1], '#' . $this->options['id'], array(\n\t\t\t\t'class' => 'right carousel-control',\n\t\t\t\t'data-slide' => 'next',\n\t\t\t));\n\t}", "title": "" }, { "docid": "7b17ec7abee5c3c410c6610cd925176c", "score": "0.5449642", "text": "public function prevNews()\n {\n $prev = $this->newsManager()->prev();\n\n if (!$prev) {\n return null;\n }\n\n return $this->newsFormatNav($prev);\n }", "title": "" }, { "docid": "bfd2b0f965f9f5fe5c8593c2e6addc3e", "score": "0.54414046", "text": "function ghostbird_paged_nav( $before = '', $after = '' ) {\n\t$clear = '<div class=\"clear\"></div>';\n\t$left = '<span>' . esc_html__( '&laquo;', 'ghostbird' ) . '</span>';\n\t$right = '<span>' . esc_html__( '&raquo;', 'ghostbird' ) . '</span>';\n\tif ( is_singular() ) {\n\t\tprint $before;\n\t\tprevious_post_link( '<div class=\"older-posts\">%link</div>', sprintf( __( 'Next %1$s', 'ghostbird' ), $right ) );\n\t\tnext_post_link( '<div class=\"newer-posts\">%link</div>', sprintf( __( '%1$s Back', 'ghostbird' ), $left ) );\n\t\tprint $clear . $after;\n\t}\n\telse {\n\t\t$next = get_next_posts_link( sprintf( __( 'More %1$s', 'ghostbird' ), $right ) );\n\t\tif ( ! empty( $next ) ) {\n\t\t\t$next = '<div class=\"more-posts\">' . $next . '</div>';\n\t\t}\n\t\t$prev = get_previous_posts_link( sprintf( __( '%1$s Back', 'ghostbird' ), $left ) );\n\t\tif ( ! empty( $prev ) ) {\n\t\t\t$prev = '<div class=\"back-posts\">' . $prev . '</div>';\n\t\t}\n\t\tif ( ! empty( $prev ) || ! empty( $next ) ) {\n\t\t\tprint \"\\n\" . $before . $prev . $next . $clear . $after;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "bce81176cb150956c2c2ad0fbb31df4b", "score": "0.5428089", "text": "public function next_prev( $return ) {\n\t\t\tif ( is_singular( 'tribe_events' ) ) {\n\t\t\t\t$return = false;\n\t\t\t}\n\t\t\treturn $return;\n\t\t}", "title": "" }, { "docid": "6e5db96d6265e8d5522e837214a38d06", "score": "0.5422025", "text": "function mp_ssv_events_content_theme_default($upcomingEvents, $pastEvents)\n{\n $hasUpcomingEvents = $upcomingEvents->have_posts();\n $hasPastEvents = $pastEvents->have_posts();\n if ($hasUpcomingEvents || $hasPastEvents) {\n if ($hasUpcomingEvents) {\n ?>\n <header class=\"full-width-entry-header\" style=\"margin: 15px 0;\">\n <div class=\"parallax-container primary\" style=\"height: 75px;\">\n <div class=\"shade darken-1 valign-wrapper\" style=\"height: 100%\">\n <h1 class=\"entry-title center-align white-text valign events-archive-header\">Upcoming Events</h1>\n </div>\n </div>\n </header>\n <?php\n while ($upcomingEvents->have_posts()) {\n $upcomingEvents->the_post();\n require 'event-views/archive-preview.php';\n }\n }\n if ($hasPastEvents) {\n ?>\n <header class=\"full-width-entry-header\" style=\"margin: 15px 0;\">\n <div class=\"parallax-container primary\" style=\"height: 75px;\">\n <div class=\"shade darken-1 valign-wrapper\" style=\"height: 100%\">\n <h1 class=\"entry-title center-align white-text valign events-archive-header\">Past Events</h1>\n </div>\n </div>\n </header>\n <?php\n while ($pastEvents->have_posts()) {\n $pastEvents->the_post();\n require 'event-views/archive-preview.php';\n }\n }\n if (function_exists('mp_ssv_get_pagination')) {\n echo mp_ssv_get_pagination();\n } else {\n echo paginate_links();\n }\n } else {\n get_template_part('template-parts/content', 'none');\n }\n}", "title": "" }, { "docid": "386ab7edfee9929830028ae1c9a483b8", "score": "0.54101163", "text": "public function getPrevPageUrl()\n {\n return $this->getPageUrl($this->page - 1); \n }", "title": "" }, { "docid": "3585e9118d88d1f24d73b5d1d92a0cfc", "score": "0.5403328", "text": "protected function getPreviousPageRoute()\n {\n return ['name' => 'lva-director_change/licence_history', 'params' => ['application' => $this->getIdentifier()]];\n }", "title": "" }, { "docid": "45e2d162b919a4c80e01477b6721cf51", "score": "0.540236", "text": "function sowe_posts_prev($format) {\n $format = str_replace('href=', 'class=\"prev\" href=', $format);\n return $format;\n}", "title": "" }, { "docid": "37bc12c03830c5b6fd8aa6a703c4fa07", "score": "0.5399896", "text": "public function renderPrevLink( $data = null )\r\n\t\t\t {\r\n\t\t\t $link = self::quickCheck( $this->getPage() - 1 ) ? $this->makeUrl( $this->getPage() - 1 ) : $this->makeUrl( $this->getPage() );\r\n\t\t\t $text = is_string( $data ) ? $this->replaceText( $data ) : false;\r\n\t\t\t return $text ? '<a href=\"' . $link . '\">' . $text . '</a>' : $link;\r\n\t\t\t }", "title": "" }, { "docid": "d12871dd273bb33ba38a282f6d42635d", "score": "0.53948134", "text": "protected function get_link( $post ) {\n\t\treturn tribe_get_event_link( $post );\n\t}", "title": "" }, { "docid": "4efbf2c9c194cef285c32fbf1f473aff", "score": "0.5386914", "text": "function show_past_event ( $category=\"\", $start_date=\"1/1/2017\", $num_post=10 ) {\n\n $time = strtotime( $start_date );\n $start_date = date( 'Y-m-d H:i:s', $time );\n\n if ( $category == \"\" ) {\n $events = tribe_get_events( array(\n 'posts_per_page' => $num_post,\n 'order' => 'DESC',\n 'eventDisplay'=>'past',\n 'start_date' => $start_date,\n ));\n } else {\n $events = tribe_get_events( array(\n 'posts_per_page' => $num_post,\n 'eventDisplay'=>'past',\n 'start_date' => $start_date,\n 'order' => 'DESC',\n 'tax_query'=> array(\n array(\n 'taxonomy' => 'tribe_events_cat',\n 'field' => 'slug',\n 'terms' => $category\n )\n )\n ));\n }\n\n echo '<div class=\"past-events-banner background-hammerBlue margin-top-80 margin-bottom-80\"><div class=\"marginLeft marginRight\"><h1 class=\"color-white\">PAST EVENTS</h1></div></div>';\n\n $counter = 1;\n foreach ( $events as $post ) {\n setup_postdata( $post );\n $postID = $post->ID;\n $category_text = tribe_get_text_categories($postID);\n $category_color = tribe_get_color_for_categories($category_text);\n\n echo '<div class=\"event-container margin-top-50\">';\n echo '<div class=\"event-list-img-logo-container\">';\n // Show only when category is not specified\n if ( $category == \"\" ) {\n $logo_url = get_logo_url($category_text);\n $logo_style_text = get_logo_css_margin_past_event_list($category_text);\n echo '<img class=\"event-list-logo\" src=\"'.$logo_url.'\" style=\"'.$logo_style_text.'\">';\n }\n echo tribe_event_featured_image( $post->ID, null, 'medium' );\n echo '</div>';\n\n echo '<div id=\"event-subcontainer2-with-logo\" class=\"margin-left-60\" style=\"padding-right: 5%;\">';\n echo '<h2><a href=\"'.esc_url( tribe_get_event_link($postID) ).'\">'.$post->post_title.'</a><h2>';\n echo '<!-- Subtitle -->';\n echo '<h4 class=\"subtitle\">';\n echo get_post_meta($postID, 'Subtitle', true);\n echo '</h4>';\n echo '<!-- End of Subtitle -->';\n echo '<div class=\"tribe-events-list-event-description tribe-events-content description entry-summary\">';\n echo '<p>'.get_the_excerpt($postID).'</p>';\n echo'</div>';\n echo '</div>';\n\n echo '<div id=\"event-subcontainer3\" class=\"margin-left-20\">';\n echo '<span style=\"font-size: 13px; font-weight: 700\">'.show_event_dates($post->ID).'</span>';\n echo '<a href=\"'.esc_url( tribe_get_event_link($postID) ).'\" class=\"button learn-more-button\" rel=\"bookmark\" style=\"background-color: var('.$category_color.');\">Learn More</a>';\n echo '</div>';\n echo '</div>';\n $counter++;\n }\n}", "title": "" }, { "docid": "79ae07cc65d7ac4853288522401580c2", "score": "0.5357609", "text": "function cc_modify_event_read_more_link() {\n global $post;\n if($post->post_type == 'event') {\n return '...';\n }\n}", "title": "" }, { "docid": "bde87a6e858162d991e0259d91a4e997", "score": "0.5356034", "text": "public function setPrevNext()\n {\n if ($this->prevEvent && $this->nextEvent) {\n return $this;\n }\n $entries = $this->entries();\n\n $isPrev = false;\n $isNext = false;\n $firstEvent = false;\n $lastEvent = false;\n\n foreach ($entries as $event) {\n // Obtain th first event.\n if (!$firstEvent) {\n $firstEvent = $event;\n }\n $lastEvent = $event;\n // Find the current event\n if ($event->id() == $this->currentEvent()['id']) {\n $isNext = true;\n $isPrev = true;\n\n continue;\n }\n if (!$isPrev) {\n $this->prevEvent = $event;\n }\n // Store the next event\n if ($isNext) {\n $this->nextEvent = $event;\n\n $isNext = false;\n }\n }\n\n if ($this->entryCycle()) {\n if (!$this->nextEvent) {\n $this->nextEvent = $firstEvent;\n }\n\n if (!$this->prevEvent) {\n $this->prevEvent = $lastEvent;\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "dbbe48c541169c6d9201eb2c3c64a1c5", "score": "0.53508914", "text": "function the_reader_posts_pagination() {\n\n\tglobal $wp_query;\n\n\t$pages = (int) $wp_query->max_num_pages;\n\t$current = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;\n\t$elements = array();\n\n\t// No pagination required if there is only one page\n\tif ( $pages < 2 ) {\n\t\treturn;\n\t}\n\n\t// First of all we add the previous link\n\t$prev_page = $current - 1;\n\t$prev_link = 0 === $prev_page || 1 === $prev_page ? home_url() : home_url( '/page/' . $prev_page );\n\t$prev_class = 1 === $current ? 'class=\"disabled\"' : '';\n\t$elements[] = '<li><a href=\"' . $prev_link . '\" ' . $prev_class . '>Previous</a></li>';\n\n\tfor ( $i = 1; $i <= $pages; $i ++ ) {\n\n\t\t$li = '<li';\n\n\t\tif ( $i === $current ) {\n\t\t\t$li .= ' class=\"active\"';\n\t\t}\n\n\t\t$li .= '>';\n\t\t$elements[] = $li . '<a href=\"' . home_url( '/page/' . $i ) . '\">' . $i . '</a></li>';\n\n\t}\n\n\t// Finally we add the next link\n\t$next_page = $current + 1;\n\t$next_link = $next_page > $pages ? home_url( '/page/' . $pages ) : home_url( '/page/' . $next_page );\n\t$next_class = $current === $pages ? 'class=\"disabled\"' : '';\n\t$elements[] = '<li><a href=\"' . $next_link . '\" ' . $next_class . '>Next</a></li>';\n\n\techo '<ul class=\"navigate-page\">' . implode( \"\\n\", $elements ) . '</ul>';\n\n}", "title": "" }, { "docid": "8360aabe97396b7bb5f0246d6f3d08f7", "score": "0.5350716", "text": "function the_post_navigation()\n{\n\t// Don't print empty markup if there's nowhere to navigate.\n\t$previous = (is_attachment()) ? get_post(get_post()->post_parent) : get_adjacent_post(false, '', true);\n\t$next = get_adjacent_post(false, '', false);\n\n\tif (!$next && !$previous) {\n\t\treturn;\n\t}\n\t?>\n\t<nav class=\"navigation post-navigation\" role=\"navigation\">\n\t\t<h2 class=\"screen-reader-text\"><?php esc_html_e('Post navigation', 'kmc'); ?></h2>\n\t\t<div class=\"nav-links\">\n\t\t\t<?php\n\t\tprevious_post_link('<div class=\"nav-previous\">%link</div>', '%title');\n\t\tnext_post_link('<div class=\"nav-next\">%link</div>', '%title');\n\t\t?>\n\t\t</div><!-- .nav-links -->\n\t</nav><!-- .navigation -->\n\t<?php\n\n}", "title": "" }, { "docid": "237c1c76f3b5f265bd96d90d658ad6e8", "score": "0.53449214", "text": "function wp_link_pages_extended($args = '') {\n\n\t$defaults = array(\n\t\t'before' => '<ul class=\"pagination\"><li class=\"disabled\"><a href=\"\">' . __('Pages:', 'roots') . '</a></li>', \n\t\t'after' => '</ul>',\n\t\t'link_before' => '', \n\t\t'link_after' => '',\n\t\t'next_or_number' => 'number', \n\t\t'nextpagelink' => __('Next page', 'roots' ),\n\t\t'previouspagelink' => __('Previous page', 'roots' ), \n\t\t'pagelink' => '%',\n\t\t'before_page' => '' , \n\t\t'before_current_page' => '', \n\t\t'after_page' => '',\n\t\t'echo' => 1\n\t);\n\n\t$r = wp_parse_args( $args, $defaults );\n\t$r = apply_filters( 'wp_link_pages_args', $r );\n\textract( $r, EXTR_SKIP );\n\n\tglobal $page, $numpages, $multipage, $more, $pagenow;\n\n\t$output = '';\n\tif ( $multipage ) {\n\t\tif ( 'number' == $next_or_number ) {\n\t\t\t$output .= $before;\n\t\t\tfor ( $i = 1; $i < ($numpages+1); $i = $i + 1 ) {\n\t\t\t\t$j = str_replace('%',$i,$pagelink);\n\t\t\t\tif ( ($i != $page) || ((!$more) && ($page==1)) ) {\n\t\t\t\t\t$output .= $before_page;\n\t\t\t\t\t$output .= _wp_link_page($i);\n\t\t\t\t} else {\n\t\t\t\t\t$output .= $before_current_page;\n\t\t\t\t\t$output .= '<a href=\"#\">';\n\t\t\t\t}\n\t\t\t\t$output .= $link_before . $j . $link_after;\n\t\t\t\t$output .= '</a>';\n\t\t\t\t$output .= $after_page;\n\t\t\t}\n\t\t\t$output .= $after;\n\t\t} else {\n\t\t\tif ( $more ) {\n\t\t\t\t$output .= $before;\n\t\t\t\t$i = $page - 1;\n\t\t\t\tif ( $i && $more ) {\n\t\t\t\t\t$output .= $before_page;\n\t\t\t\t\t$output .= _wp_link_page($i);\n\t\t\t\t\t$output .= $link_before. $previouspagelink . $link_after . '</a>';\n\t\t\t\t\t$output .= $after_page;\n\t\t\t\t}\n\t\t\t\t$i = $page + 1;\n\t\t\t\tif ( $i <= $numpages && $more ) {\n\t\t\t\t\t$output .= $before_page;\n\t\t\t\t\t$output .= _wp_link_page($i);\n\t\t\t\t\t$output .= $link_before. $nextpagelink . $link_after . '</a>';\n\t\t\t\t\t$output .= $after_page;\n\t\t\t\t}\n\t\t\t\t$output .= $after;\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( $echo )\n\t\techo $output;\n\n\treturn $output;\n}", "title": "" }, { "docid": "3637a40587684e4272b4e87ee75bbf91", "score": "0.53381574", "text": "public function nextNews()\n {\n $next = $this->newsManager()->next();\n\n if (!$next) {\n return null;\n }\n\n return $this->newsFormatNav($next);\n }", "title": "" }, { "docid": "1f85fd54738ddae65b161df7c5f61bd4", "score": "0.53368306", "text": "function show_recurring_dates ( $event_id, $is_home=false ) {\n $dates = tribe_get_recurrence_start_dates( $event_id );\n $counter = 0;\n foreach ($dates as $date) {\n $date_text = strtotime($date);\n if ($is_home) {\n if ($counter < 2) {\n echo '<span class=\"tribe-event-date-start\">'.date('F j \\@ g:i a', $date_text).'</span>, ';\n } else if ($counter == 2){\n echo '<span class=\"tribe-event-date-start\">'.date('F j \\@ g:i a', $date_text).'</span>... <a href='.tribe_get_event_meta( $event_id, ‘_EventURL’, true ).'>More dates</a>';\n echo tribe_get_event_meta( $event_id, ‘_EventURL’, true );\n } else {\n break;\n }\n $counter++;\n \n } else {\n echo '<span class=\"tribe-event-date-start\">'.date('F j \\@ g:i a', $date_text).'</span><br>';\n }\n }\n}", "title": "" }, { "docid": "5fe26334ff913fcefadf17c47b0ec43a", "score": "0.5334194", "text": "function timeline_slider(){\r\n ob_start(); ?> \r\n\r\n <?php \r\n $query = new WP_Query(array(\r\n 'post_type' => 'Timeline'\r\n ));\r\n if( $query->have_posts() ){\r\n ?>\r\n\r\n <section class=\"horizontal-timeline\">\r\n\r\n <div class=\"timeline\">\r\n <div class=\"events-wrapper\">\r\n <div class=\"events\">\r\n <ol>\r\n <?php\r\n $counter = 0; // Counter for posts\r\n $getThisMany = -1; // Number of posts to pull\r\n $recentPosts = new WP_Query(array(\r\n 'post_type' => 'Timeline',\r\n 'showposts' => $getThisMany, \r\n 'offset' => 0, // Set this to 1 to skip over first post, 2 to skip the first two, etc.\r\n 'order' => 'ASC', // Puts new posts first, to put oldest posts first, change to 'ASC'\r\n 'post__not_in' => get_option(\"sticky_posts\"), // Ignore sticky posts for this particular query\r\n ));\r\n ?>\r\n <?php while ($recentPosts->have_posts()) : $recentPosts->the_post(); ?>\r\n <li><a class=\"timeline-links-<?php echo $counter++; ?> <?php if ($counter == 1) echo 'selected'; ?>\" href=\"#0\" data-date=\"<?php echo get_the_date('j/m/Y'); ?>\"><?php echo get_the_date('Y'); ?></a></li>\r\n <?php endwhile; wp_reset_postdata(); ?>\r\n </ol>\r\n <span class=\"filling-line\" aria-hidden=\"true\"></span>\r\n </div>\r\n </div>\r\n <ul class=\"timeline-navigation\">\r\n <li><a href=\"#0\" class=\"prev inactive\">Prev</a></li>\r\n <li><a href=\"#0\" class=\"next\">Next</a></li>\r\n </ul>\r\n </div>\r\n\r\n <div class=\"events-content\">\r\n <ol>\r\n <?php\r\n $timelineCounter = 0; // Counter for posts\r\n $timelineGetThisMany = -1; // Number of posts to pull\r\n $timelineRecentPosts = new WP_Query(array(\r\n 'post_type' => 'Timeline',\r\n 'showposts' => $timelineGetThisMany, \r\n 'offset' => 0, // Set this to 1 to skip over first post, 2 to skip the first two, etc.\r\n 'order' => 'ASC', // Puts new posts first, to put oldest posts first, change to 'ASC'\r\n 'post__not_in' => get_option(\"sticky_posts\"), // Ignore sticky posts for this particular query\r\n ));\r\n ?>\r\n <?php while ($timelineRecentPosts->have_posts()) : $timelineRecentPosts->the_post(); ?>\r\n <li class=\"timeline-content-<?php echo $timelineCounter++; ?> <?php if ($timelineCounter == 1) echo 'selected'; ?>\" data-date=\"<?php echo get_the_date('j/m/Y'); ?>\">\r\n <?php /* <h2><a href=\"<?php echo get_permalink( get_the_ID() );?>\"><?php echo get_the_title(); ?></a></h2> */ ?>\r\n <h2><span><?php echo get_the_date('Y'); ?></span><?php echo get_the_title(); ?></h2>\r\n \r\n <?php the_excerpt(); ?>\r\n <a class=\"button\" href=\"<?php echo get_permalink( get_the_ID() );?>\">Read More</a>\r\n </li>\r\n <?php endwhile; wp_reset_postdata(); ?>\r\n </ol>\r\n </div>\r\n\r\n </section>\r\n\r\n <?php \r\n } else {\r\n echo 'no posts found, maybe log in and make some<br><a href=\"/wp-admin/edit.php?post_type=timeline\">Go make one</a>';\r\n }\r\n wp_reset_postdata();\r\n ?>\r\n\r\n <?php return ob_get_clean();\r\n}", "title": "" }, { "docid": "76faf38fa733ee9e84a07813f94c38b3", "score": "0.533091", "text": "function mahi_get_adjacent_post($direction = 'prev', $post_types = 'post') {\n global $post, $wpdb;\n\n if(empty($post)) return NULL;\n if(!$post_types) return NULL;\n\n if(is_array($post_types)){\n $txt = '';\n for($i = 0; $i <= count($post_types) - 1; $i++){\n $txt .= \"'\".$post_types[$i].\"'\";\n if($i != count($post_types) - 1) $txt .= ', ';\n }\n $post_types = $txt;\n }\n\n $current_post_date = $post->post_date;\n\n $join = '';\n $in_same_cat = FALSE;\n $excluded_categories = '';\n $adjacent = $direction == 'prev' ? 'previous' : 'next';\n $op = $direction == 'prev' ? '<' : '>';\n $order = $direction == 'prev' ? 'DESC' : 'ASC';\n\n $join = apply_filters( \"get_{$adjacent}_post_join\", $join, $in_same_cat, $excluded_categories );\n $where = apply_filters( \"get_{$adjacent}_post_where\", $wpdb->prepare(\"WHERE p.post_date $op %s AND p.post_type IN({$post_types}) AND p.post_status = 'publish'\", $current_post_date), $in_same_cat, $excluded_categories );\n $sort = apply_filters( \"get_{$adjacent}_post_sort\", \"ORDER BY p.post_date $order LIMIT 1\" );\n\n $query = \"SELECT p.* FROM $wpdb->posts AS p $join $where $sort\";\n\n $query_key = 'adjacent_post_' . md5($query);\n $result = wp_cache_get($query_key, 'counts');\n if ( false !== $result )\n return $result;\n\n $result = $wpdb->get_row(\"SELECT p.* FROM $wpdb->posts AS p $join $where $sort\");\n if ( null === $result )\n $result = '';\n\n wp_cache_set($query_key, $result, 'counts');\n return $result;\n}", "title": "" }, { "docid": "1b5898d39051246d14b2e6c96ab723e2", "score": "0.532696", "text": "function prev1()\n {\n\n // If session has been initiated and current count \n // points to anything but the first entry\n if (($_SESSION!=NULL) & $_SESSION['count']>=1)\n\n {\n // Generate the link to previous page in history, \n // including a flag to make the page realize \n // it doesn't have to go into the list as a new entry\n echo \"<a href=\".\n $_SESSION['pageadd'][$_SESSION['count']-1].\n \"?prev=1>Back</a>\";\n echo '<br>';\n }\n }", "title": "" }, { "docid": "4ec02090a683116e579214d37dbe2e91", "score": "0.53111005", "text": "abstract public function getPrev($date);", "title": "" }, { "docid": "c38a906fe74b19f01128fc6f9745fae3", "score": "0.5308411", "text": "public function get_previous_link($text = '<<')\n\t{\n // phpcs:enable\n\t\treturn '<a href=\"'.$this->get_previous_url().'\" class=\"button\">'.$text.'</a>';\n\t}", "title": "" }, { "docid": "4a1c485ad95ba47e54306046353a2d7e", "score": "0.5305927", "text": "function emerald_page_navi($before = '', $after = '') {\n\tglobal $wpdb, $wp_query;\n\t$request = $wp_query->request;\n\t$posts_per_page = intval(get_query_var('posts_per_page'));\n\t$paged = intval(get_query_var('paged'));\n\t$numposts = $wp_query->found_posts;\n\t$max_page = $wp_query->max_num_pages;\n\tif ( $numposts <= $posts_per_page ) { return; }\n\tif(empty($paged) || $paged == 0) {\n\t\t$paged = 1;\n\t}\n\t$pages_to_show = 7;\n\t$pages_to_show_minus_1 = $pages_to_show-1;\n\t$half_page_start = floor($pages_to_show_minus_1/2);\n\t$half_page_end = ceil($pages_to_show_minus_1/2);\n\t$start_page = $paged - $half_page_start;\n\tif($start_page <= 0) {\n\t\t$start_page = 1;\n\t}\n\t$end_page = $paged + $half_page_end;\n\tif(($end_page - $start_page) != $pages_to_show_minus_1) {\n\t\t$end_page = $start_page + $pages_to_show_minus_1;\n\t}\n\tif($end_page > $max_page) {\n\t\t$start_page = $max_page - $pages_to_show_minus_1;\n\t\t$end_page = $max_page;\n\t}\n\tif($start_page <= 0) {\n\t\t$start_page = 1;\n\t}\n\techo $before.'<nav class=\"page-navigation\"><ol class=\"emerald_page_navi clearfix\">'.\"\";\n\tif ($start_page >= 2 && $pages_to_show < $max_page) {\n\t\t$first_page_text = __( \"First\", 'emeraldtheme' );\n\t\techo '<li class=\"bpn-first-page-link\"><a href=\"'.get_pagenum_link().'\" title=\"'.$first_page_text.'\">'.$first_page_text.'</a></li>';\n\t}\n\techo '<li class=\"bpn-prev-link\">';\n\tprevious_posts_link('<<');\n\techo '</li>';\n\tfor($i = $start_page; $i <= $end_page; $i++) {\n\t\tif($i == $paged) {\n\t\t\techo '<li class=\"bpn-current\">'.$i.'</li>';\n\t\t} else {\n\t\t\techo '<li><a href=\"'.get_pagenum_link($i).'\">'.$i.'</a></li>';\n\t\t}\n\t}\n\techo '<li class=\"bpn-next-link\">';\n\tnext_posts_link('>>');\n\techo '</li>';\n\tif ($end_page < $max_page) {\n\t\t$last_page_text = __( \"Last\", 'emeraldtheme' );\n\t\techo '<li class=\"bpn-last-page-link\"><a href=\"'.get_pagenum_link($max_page).'\" title=\"'.$last_page_text.'\">'.$last_page_text.'</a></li>';\n\t}\n\techo '</ol></nav>'.$after.\"\";\n}", "title": "" }, { "docid": "37ed4cca69443b2f9bef60f7fc6cb7de", "score": "0.52992934", "text": "function jbst4_page_navi($before = '', $after = '') {\n\tglobal $wpdb, $wp_query;\n\t$request = $wp_query->request;\n\t$posts_per_page = intval(get_query_var('posts_per_page'));\n\t$paged = intval(get_query_var('paged'));\n\t$numposts = $wp_query->found_posts;\n\t$max_page = $wp_query->max_num_pages;\n\tif ( $numposts <= $posts_per_page ) { return; }\n\tif(empty($paged) || $paged == 0) {\n\t\t$paged = 1;\n\t}\n\t$pages_to_show = 7;\n\t$pages_to_show_minus_1 = $pages_to_show-1;\n\t$half_page_start = floor($pages_to_show_minus_1/2);\n\t$half_page_end = ceil($pages_to_show_minus_1/2);\n\t$start_page = $paged - $half_page_start;\n\tif($start_page <= 0) {\n\t\t$start_page = 1;\n\t}\n\t$end_page = $paged + $half_page_end;\n\tif(($end_page - $start_page) != $pages_to_show_minus_1) {\n\t\t$end_page = $start_page + $pages_to_show_minus_1;\n\t}\n\tif($end_page > $max_page) {\n\t\t$start_page = $max_page - $pages_to_show_minus_1;\n\t\t$end_page = $max_page;\n\t}\n\tif($start_page <= 0) {\n\t\t$start_page = 1;\n\t}\n\techo $before.'<nav style=\"text-align:center\"><ul class=\"pagination\">'.\"\";\n\tif ($start_page >= 2 && $pages_to_show < $max_page) {\n\t\t$first_page_text = __( \"First\", 'jbst-4' );\n\t\techo '<li class=\"page-link\"><a href=\"'.get_pagenum_link().'\" title=\"'.$first_page_text.'\">'.$first_page_text.'</a></li>';\n\t}\n\techo '<li class=\"page-item\">';\n\tprevious_posts_link('<span aria-hidden=\"true\">&laquo;</span>\n <span class=\"sr-only\">'. __( 'Previous', 'jbst-4' ) .'</span>');\n\techo '</li>';\n\tfor($i = $start_page; $i <= $end_page; $i++) {\n\t\tif($i == $paged) {\n\t\t\techo '<li class=\"page-item active\"><span class=\"page-link\"> '.$i.' </span></li>';\n\t\t} else {\n\t\t\techo '<li class=\"page-item\"><a class=\"page-link\" href=\"'.get_pagenum_link($i).'\">'.$i.'</a></li>';\n\t\t}\n\t}\n\techo '<li class=\"page-item\">';\n\tnext_posts_link('<span aria-hidden=\"true\">&raquo;</span>\n <span class=\"sr-only\">'. __( 'Next', 'jbst-4' ) .'</span>'); \n\techo '</li>';\n\tif ($end_page < $max_page) {\n\t\t$last_page_text = __( \"Last\", 'jbst-4' );\n\t\techo '<li class=\"page-item\"><a class=\"page-link\" href=\"'.get_pagenum_link($max_page).'\" title=\"'.$last_page_text.'\">'.$last_page_text.'</a></li>';\n\t}\n\techo '</ul></nav>'.$after.\"\";\n}", "title": "" }, { "docid": "6b7c776c09b75f558fd753bde1b7b73b", "score": "0.5290818", "text": "public static function get_single_post_navigation(){\n\n ?>\n\n <nav id=\"pb-post-navigation\" class=\"clearfix\">\n <div class=\"left\">\n <?php previous_post_link( '%link', '<span>Previous Post </span> %title' ); ?>\n </div>\n <div class=\"right\">\n <?php next_post_link( '%link', '<span>Next Post</span> %title' ); ?>\n </div>\n </nav><!-- end #post-navigation -->\n\n <?php\n\n }", "title": "" }, { "docid": "1e2f56659994168435bfe9e7017e81b7", "score": "0.5286958", "text": "function nhsm_pre_get_posts( $query ) {\n if($query->is_main_query() && !is_admin()){\n if ( is_post_type_archive('event') || is_tax('event-category') ) {\n $query->set('post_type', 'event');\n if(isset($_GET['show'])){\n $scope = sanitize_title($_GET['show']);\n }\n else $scope = 'upcoming';\n if($scope === 'past'){\n $query->set('event_show_past_events', true);\n $query->set('event_start_before', date('Y-m-d'));\n $query->set('event_date_range', 'between');\n $query->set('order', 'DESC');\n }\n elseif($scope === 'upcoming'){\n $query->set('event_show_past_events', false);\n $query->set('order', 'ASC');\n }\n\n }\n }\n\n if( $query->is_main_query() && is_search() && !is_admin()){\n //Exclude homepage from search\n $query->set('post__not_in', array(get_option('page_on_front')));\n\n //set search to only posts and pages (handle other post types in search template)\n $query->set('post_type', ['post', 'page', 'event']);\n }\n\n return $query;\n}", "title": "" }, { "docid": "df6bba7f7714d681b9f1687ee5b9d367", "score": "0.5282048", "text": "function output_pagination($start, $count, $extra = '', $is_end = false)\n{\n $next_start_num = $start + $count;\n $last_start_num = $start - $count;\n if ($last_start_num < 0) {\n $last_start_num = 0;\n }\n echo('<p>');\n if ($start > 0) {\n echo(\"<a href='?start=$last_start_num&count=$count$extra'><- Last</a> |\");\n } else {\n echo('<- Last |');\n }\n if ($is_end === true) {\n echo(\" Next ->\");\n } else {\n echo(\" <a href='?start=$next_start_num&count=$count$extra'>Next -></a>\");\n }\n echo('</p>');\n}", "title": "" }, { "docid": "af9c99bf1a51316d0463ab1ebc8e3035", "score": "0.52701867", "text": "public function compareRevisionsPagination()\n {\n $view = $this->getView();\n $fromRevision = $view->fromRevision;\n $toRevision = $view->toRevision;\n return sprintf(\n '<nav class=\"pagination\" role=\"navigation\">%s%s</nav>',\n $fromRevision['parentid']\n ? $view->hyperlink('', $view->url(null, ['from-revision-id' => $fromRevision['parentid'], 'to-revision-id' => $fromRevision['revid']], true), ['class' => 'previous o-icon-prev button', 'title' => $view->translate('Older revision')])\n : '<span class=\"previous o-icon-prev button inactive\"></span>',\n $toRevision['childid']\n ? $view->hyperlink('', $view->url(null, ['from-revision-id' => $toRevision['revid'], 'to-revision-id' => $toRevision['childid']], true), ['class' => 'next o-icon-next button', 'title' => $view->translate('Newer revision')])\n : '<span class=\"next o-icon-next button inactive\"></span>'\n );\n }", "title": "" }, { "docid": "c5923c32ac25b8994f620ff1f3537cac", "score": "0.5265349", "text": "function addPrevButton(){\n\t\t$this->addButton('Previous')->redirect($this->api->page, array('step'=>$this->current-1));\n\t}", "title": "" }, { "docid": "5a970ac074d999979c53c2849fad5fc9", "score": "0.52627873", "text": "public function getPrevious();", "title": "" }, { "docid": "fe6ea891e2eb2278da67ca852f05b02f", "score": "0.52573824", "text": "public function getNav() {\r\n\t\t$url = $this->getUrl();\r\n\t\t$result = \"\\n\";\r\n\t\tfor ($i = 0; $i < $this->length; $i++) {\r\n\t\t\t$id = ($this->xml->page[$i]->attributes()->id == 'index')?'':$this->xml->page[$i]->attributes()->id;\r\n\t\t\t$result .= '<li><a href=\"'.$url.(($this->rewrite())?(($id=='')?'':$id.'.html'):(($id=='')?'':'?page='.$id)).'\" >'.$this->xml->page[$i]->attributes()->title.\"</a></li>\\n\";\r\n\t\t}\t\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "d14ce242e163acc59b28fb6170931587", "score": "0.52538115", "text": "function lfe_get_related_events( $parent_id ) {\n\t$related_events = array();\n\n\t$related_events_override = get_post_meta( $parent_id, 'lfes_related_events', true );\n\n\tif ( $related_events_override ) {\n\t\t$args = array(\n\t\t\t'post_type' => 'page',\n\t\t\t'post_parent' => 0,\n\t\t\t'post__in' => explode( ',', $related_events_override ), // ignores current post.\n\t\t\t'no_found_rows' => true, // used to improve performance.\n\t\t\t'meta_query' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'key' => 'lfes_event_has_passed',\n\t\t\t\t\t'compare' => '!=',\n\t\t\t\t\t'value' => '1',\n\t\t\t\t),\n\t\t\t),\n\t\t\t'orderby' => 'meta_value',\n\t\t\t'meta_key' => 'lfes_date_start',\n\t\t\t'order' => 'ASC',\n\t\t);\n\n\t} else {\n\t\t$term = wp_get_post_terms( $parent_id, 'lfevent-category', array( 'fields' => 'ids' ) );\n\n\t\t$args = array(\n\t\t\t'post_type' => 'page',\n\t\t\t'post_parent' => 0,\n\t\t\t'no_found_rows' => true, // used to improve performance.\n\t\t\t'post__not_in' => array( $parent_id ), // ignores current post.\n\t\t\t'tax_query' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'taxonomy' => 'lfevent-category',\n\t\t\t\t\t'field' => 'term_id',\n\t\t\t\t\t'terms' => $term[0],\n\t\t\t\t),\n\t\t\t),\n\t\t\t'meta_query' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'key' => 'lfes_event_has_passed',\n\t\t\t\t\t'compare' => '!=',\n\t\t\t\t\t'value' => '1',\n\t\t\t\t),\n\t\t\t),\n\t\t\t'orderby' => 'meta_value',\n\t\t\t'meta_key' => 'lfes_date_start',\n\t\t\t'order' => 'ASC',\n\t\t\t'posts_per_page' => 2,\n\t\t);\n\n\t}\n\n\t$the_query = new WP_Query( $args );\n\n\tif ( $the_query->have_posts() ) {\n\t\twhile ( $the_query->have_posts() ) {\n\t\t\t$the_query->the_post();\n\t\t\t$related_events[] = array( 'ID' => get_the_ID() );\n\t\t}\n\t}\n\twp_reset_postdata(); // Restore original Post Data.\n\n\treturn $related_events;\n\n}", "title": "" }, { "docid": "2eb413adf3528a260494b879d039a8d7", "score": "0.52532166", "text": "public function getNextEventUrl()\n {\n $event = $this->helper->getNextEvent($this->getEvent());\n if ($event && $eventId = $event->getId()) {\n return $this->_urlBuilder->getUrl(self::URL_PATH_DETAILS, ['id' => $eventId]);\n }\n return false;\n }", "title": "" }, { "docid": "8b782b09723e9a0180e10413d3289eee", "score": "0.5252714", "text": "function charity_is_hope_tribe_events_next_month() {\n\t\t$url = tribe_get_next_month_link();\n\t\t$text = tribe_get_next_month_text();\n\t\t$date = Tribe__Events__Main::instance()->nextMonth( tribe_get_month_view_date() );\n\t\treturn '<a data-month=\"' . $date . '\" href=\"' . esc_url($url) . '\" rel=\"next\">' . $text . ' <span>&raquo;</span></a>';\n\t}", "title": "" }, { "docid": "8e42535990668460050358d47057b8d9", "score": "0.5249786", "text": "function getPrevPageURL() {\n\treturn getPageURL(getCurrentPage() - 1);\n}", "title": "" }, { "docid": "34c06b2099276990f6a478043ed4fbdf", "score": "0.5249336", "text": "function create_links()\n\t{\n\t\t// If our item count or per-page total is zero there is no need to continue.\n\t\tif ($this->total_rows == 0 OR $this->per_page == 0)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\t// Calculate the total number of pages\n\t\t$num_pages = ceil($this->total_rows / $this->per_page);\n\n\t\t// Is there only one page? Hm... nothing more to do here then.\n\t\tif ($num_pages == 1)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\t$this->num_links = (int)$this->num_links;\n\n\t\tif ( ! is_numeric($this->cur_page))\n\t\t{\n\t\t\t$this->cur_page = 1;\n\t\t}\n\n\t\t// Is the page number beyond the result range?\n\t\t// If so we show the last page\n\t\tif ($this->cur_page > $num_pages)\n\t\t{\n\t\t\t$this->cur_page = $num_pages;\n\t\t}\n\n\t\t// Calculate the start and end numbers. These determine\n\t\t// which number to start and end the digit links with\n\t\t$start = (($this->cur_page - $this->num_links) > 0) ? $this->cur_page - ($this->num_links - 1) : 1;\n\t\t$end = (($this->cur_page + $this->num_links) < $num_pages) ? $this->cur_page + $this->num_links : $num_pages;\n\t\t\n\t\t//确保一开始显示时页面的数量是$this->num_links×2个 (页数够的话)\n\t\tif($num_pages - $this->cur_page < $this->num_links )\n\t\t{\n\t\t\t$start = $start - ($this->num_links - ($num_pages - $this->cur_page));\n\t\t}\t\t\n\t\tif($start < 1){\n\t\t\t$start = 1;\n\t\t}\n\t\tif($this->cur_page - $this->num_links<0 )\n\t\t{\n\t\t\t$end = $end + ($this->num_links - $this->cur_page);\n\t\t}\n\t\tif($end > $num_pages)\n\t\t{\n\t\t\t$end = $num_pages;\n\t\t}\n\t\t\t\t\n\t\t$this->base_url = rtrim($this->base_url).'&amp;'.$this->query_string_segment.'=';\n\n\t\t// And here we go...\n\t\t$output = '';\n\n\t\tif($this->show_total_num == 1)\n\t\t{\n\t\t\t$output .= $this->total_num_tag_open.$this->total_rows.$this->total_num_tag_close;\n\t\t}\n\t\t\n\n\n\t\t// Render the \"previous\" link\n\t\tif ($this->prev_link !== FALSE AND $this->cur_page != 1)\n\t\t{\n\t\t\t$i = $this->cur_page - 1;\n\n\t\t\tif ($i == 0 && $this->first_url != '')\n\t\t\t{\n\t\t\t\t$output .= $this->prev_tag_open.'<a '.$this->anchor_class.'href=\"'.$this->first_url.'\">'.$this->prev_link.'</a>'.$this->prev_tag_close;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$i = ($i == 0) ? '' : $this->prefix.$i.$this->suffix;\n\t\t\t\t$output .= $this->prev_tag_open.'<a '.$this->anchor_class.'href=\"'.$this->base_url.$i.'\">'.$this->prev_link.'</a>'.$this->prev_tag_close;\n\t\t\t}\n\n\t\t}\n\t\t\n\t\tif( $this->next_prev_link_together == 1)\n\t\t{\n\t\t\t// Render the \"next\" link\n\t\t\tif ($this->next_link !== FALSE AND $this->cur_page < $num_pages)\n\t\t\t{\n\t\t\t\t$output .= $this->next_tag_open.'<a '.$this->anchor_class.'href=\"'.$this->base_url.$this->prefix.($this->cur_page + 1).$this->suffix.'\">'.$this->next_link.'</a>'.$this->next_tag_close;\n\t\t\t}\t\t\t\n\t\t}\n\n\t\t// Render the pages\n\t\tif ($this->display_pages !== FALSE)\n\t\t{\n\t\t\t$output .= $this->page_num_area_tag_open;\n\t\t\t// Render the \"First\" link\n\t\t\tif ($this->is_show_first_last_link && $this->first_link !== FALSE && $start > 1)\n\t\t\t{\n\t\t\t\t$first_url = ($this->first_url == '') ? $this->base_url.'1' : $this->first_url;\n\t\t\t\t$output .= $this->first_tag_open.'<a '.$this->anchor_class.'href=\"'.$first_url.'\">'.$this->first_link.'</a>'.$this->first_tag_close;\n\t\t\t}\t\t\t\n\t\t\t// Write the digit links\n\t\t\tfor ($loop = $start ; $loop <= $end; $loop++)\n\t\t\t{\n\n\t\t\t\tif ($this->cur_page == $loop)\n\t\t\t\t{\n\t\t\t\t\t$output .= $this->cur_tag_open.$loop.$this->cur_tag_close; // Current page\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$n = $loop;\n\n\t\t\t\t\tif ($n == '' && $this->first_url != '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$output .= $this->num_tag_open.'<a '.$this->anchor_class.'href=\"'.$this->first_url.'\">'.$loop.'</a>'.$this->num_tag_close;\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$n = ($n == '') ? '' : $this->prefix.$n.$this->suffix;\n\n\t\t\t\t\t\t$output .= $this->num_tag_open.'<a '.$this->anchor_class.'href=\"'.$this->base_url.$n.'\">'.$loop.'</a>'.$this->num_tag_close;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t// Render the \"Last\" link\n\t\t\tif ($this->is_show_first_last_link && $this->last_link !== FALSE && $end < $num_pages)\n\t\t\t{\n\t\t\t\t$i = $num_pages;\n\t\t\t\t$output .= $this->last_tag_open.'<a '.$this->anchor_class.'href=\"'.$this->base_url.$i.$this->prefix.$this->suffix.'\">'.$num_pages.'</a>'.$this->last_tag_close;\n\t\t\t}\t\t\t\n\t\t\t$output .= $this->page_num_area_tag_close;\n\t\t}\n\n\t\tif( $this->next_prev_link_together != 1)\n\t\t{\n\t\t\t// Render the \"next\" link\n\t\t\tif ($this->next_link !== FALSE AND $this->cur_page < $num_pages)\n\t\t\t{\n\t\t\t\t$output .= $this->next_tag_open.'<a '.$this->anchor_class.'href=\"'.$this->base_url.$this->prefix.($this->cur_page + 1).$this->suffix.'\">'.$this->next_link.'</a>'.$this->next_tag_close;\n\t\t\t}\n\t\t}\n\n\n\t\t$output .= '<form action=\"'.$this->base_url.'\" class=\"page_nav_jump\" method=\"get\" id=\"pageForm\" onsubmit=\"document.getElementById(\\'gotopagebutton\\').click(); return false;\"> 第 <input type=\"text\" class=\"text\" name=\"page\" id=\"inputPage\" size=\"3\"> 页 <input id=\"gotopagebutton\" onClick=\"var page = parseInt(this.previousSibling.previousSibling.value); if(page<1 || isNaN(page)){page=1;}else if(page>'.$num_pages.'){page='.$num_pages.';} location.href=\\''.$this->base_url.'\\'+page;\" type=\"button\" class=\"submit\" value=\"跳转\"> \n\t\t\t\t\t</form>';\n\t\t// Kill double slashes. Note: Sometimes we can end up with a double slash\n\t\t// in the penultimate link so we'll kill all double slashes.\n\t\t$output = preg_replace(\"#([^:])//+#\", \"\\\\1/\", $output);\n\n\t\t// Add the wrapper HTML if exists\n\t\t$output = $this->full_tag_open.$output.$this->full_tag_close;\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "d68da36f58b03068dd105ab51d17c92c", "score": "0.5242218", "text": "function getPagesLinks( $link ) {\r\n\t\t$txt = '';\r\n\r\n\t\t$displayed_pages = 10;\r\n\t\t$total_pages = $this->limit ? ceil( $this->total / $this->limit ) : 0;\r\n\t\t$this_page = $this->limit ? ceil( ($this->limitstart+1) / $this->limit ) : 1;\r\n\t\t$start_loop = (floor(($this_page-1)/$displayed_pages))*$displayed_pages+1;\r\n\t\tif ($start_loop + $displayed_pages - 1 < $total_pages) {\r\n\t\t\t$stop_loop = $start_loop + $displayed_pages - 1;\r\n\t\t} else {\r\n\t\t\t$stop_loop = $total_pages;\r\n\t\t}\r\n\r\n\t\t$link .= '&amp;limit='. $this->limit;\r\n\r\n\t\tif (!defined( '_PN_LT' ) || !defined( '_PN_RT' ) ) {\r\n\t\t\tDEFINE('_PN_LT','&lt;');\r\n\t\t\tDEFINE('_PN_RT','&gt;');\r\n\t\t}\r\n\r\n\t\t$pnSpace = '';\r\n\t\tif (_PN_LT || _PN_RT) $pnSpace = \"&nbsp;\";\r\n\r\n\t\tif ($this_page > 1) {\r\n\t\t\t$page = ($this_page - 2) * $this->limit;\r\n\t\t\t//$txt .= '<a href=\"'. JRoute::_( \"$link&amp;limitstart=0\" ) .'\" class=\"hwdpsNav\" title=\"'. _PN_START .'\">&laquo;</a> ';\r\n\t\t\t$txt .= '<a href=\"'. JRoute::_( \"$link&amp;limitstart=$page\" ) .'\" class=\"hwdpsNav\" title=\"'. _HWDPS_PN_PREVIOUS .'\">'._HWDPS_PN_PREVIOUS.'</a> ';\r\n\t\t} else {\r\n\t\t\t//$txt .= '<span class=\"hwdpsNav\">&laquo;</span> ';\r\n\t\t\t$txt .= '<span class=\"hwdpsNav\">'._HWDPS_PN_PREVIOUS.'</span> ';\r\n\t\t}\r\n\r\n\t\tfor ($i=$start_loop; $i <= $stop_loop; $i++) {\r\n\t\t\t$page = ($i - 1) * $this->limit;\r\n\t\t\tif ($i == $this_page) {\r\n\t\t\t\t$txt .= '<span class=\"hwdpsNav\">'. $i .'</span> ';\r\n\t\t\t} else {\r\n\t\t\t\t$txt .= '<a href=\"'. JRoute::_( $link .'&amp;limitstart='. $page ) .'\" class=\"hwdpsNav\"><strong>'. $i .'</strong></a> ';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($this_page < $total_pages) {\r\n\t\t\t$page = $this_page * $this->limit;\r\n\t\t\t$end_page = ($total_pages-1) * $this->limit;\r\n\t\t\t$txt .= '<a href=\"'. JRoute::_( $link .'&amp;limitstart='. $page ) .'\" class=\"hwdpsNav\" title=\"'. _HWDPS_PN_NEXT .'\">'._HWDPS_PN_NEXT.'</a> ';\r\n\t\t\t//$txt .= '<a href=\"'. JRoute::_( $link .'&amp;limitstart='. $end_page ) .'\" class=\"hwdpsNav\" title=\"'. _PN_END .'\">&raquo;</a>';\r\n\t\t} else {\r\n\t\t\t$txt .= '<span class=\"hwdpsNav\">'._HWDPS_PN_NEXT.'</span> ';\r\n\t\t\t//$txt .= '<span class=\"hwdpsNav\">&raquo;</span>';\r\n\t\t}\r\n\t\treturn $txt;\r\n\t}", "title": "" }, { "docid": "a4c7a76af0fe73d366b8ea423b9e01fd", "score": "0.52292836", "text": "function reverseLinks() {\n return array(\n\n );\n }", "title": "" } ]
96bfc7c5bcd3e19fc11545e85fd6de50
Sort files in the patch files directory (ascending or descending depending on $undo boolean)
[ { "docid": "e25d595df6a76f1c53907d2377808a41", "score": "0.5881753", "text": "protected function sortFiles(&$files)\n {\n ksort($files);\n }", "title": "" } ]
[ { "docid": "ccf7245ae0d64a0bca4fafa59b3d4ffb", "score": "0.67680264", "text": "private function sortFiles()\n {\n $files = array_diff(scandir($this->migrationsDirectory), array('.', '..'));\n if ($files) {\n $self = $this;\n usort(\n $files,\n function ($file1, $file2) use ($self) {\n $file1Version = $self->getFileVersion($file1);\n $file2Version = $self->getFileVersion($file2);\n\n return version_compare($file1Version, $file2Version);\n }\n );\n\n foreach ($files as $file) {\n $fileVersion = $this->getFileVersion($file);\n if (version_compare($this->version, $fileVersion, '<')) {\n $this->sortedFilesForExecution[] = $file;\n }\n }\n }\n }", "title": "" }, { "docid": "8a92000080e457d41580b8278121c692", "score": "0.6175507", "text": "function sortFilesAscending($thisFiles) {\n \tusort($thisFiles, \"cmpFA\");\n \treturn $thisFiles;\n }", "title": "" }, { "docid": "f7b44be6e52e7f56837b8ce3baf1c484", "score": "0.60930026", "text": "function _modsort($a,$b){\n if($a['mtime'] < $b['mtime']) return -1;\n if($a['mtime'] > $b['mtime']) return 1;\n return strcmp($a['file'],$b['file']);\n }", "title": "" }, { "docid": "995810a68f086dd5cc99c4f2904d2240", "score": "0.60928625", "text": "protected function externalSort() {\n\t\t$this->chunk();\n\n\t\t// To be confirmed/implemented\n\t\t// After file split put them back together in the right order\n\t\techo \"External sort TBC\\n\";\n\t}", "title": "" }, { "docid": "05f7549aab753d0e94bb84befe289473", "score": "0.6024619", "text": "function filesOrder( $uid, $inc, $option, $cat_id ) {\n\tglobal $mainframe;\n $database = &JFactory::getDBO();\n\n\t$row = new jlist_files( $database );\n\t$row->load( $uid );\n $row->move( $inc );\n\n\t$mainframe->redirect( 'index.php?option=com_jdownloads&task=files.list&cat_id='.$cat_id );\n}", "title": "" }, { "docid": "33bc14345362e6989c30ad5d0a206b60", "score": "0.593919", "text": "private function sortOptions()\r\n {\r\n $pageActions = array(); // For the result\r\n // Sort changes by file\r\n usort($this->changeAr, \"cmp\");\r\n\r\n foreach ($this->changeAr as $line) {\r\n $file = $line['file'];\r\n $action = $line['action'];\r\n if (array_key_exists($file, $pageActions)) {\r\n continue;\r\n }\r\n $pageActions[$file] = $action;\r\n }\r\n// print_r($pageActions);\r\n return $pageActions;\r\n }", "title": "" }, { "docid": "2985cf2fea8527c16c96af72621a0ed5", "score": "0.59271306", "text": "public function sort()\n {\n if ($this->request->is('post')) {\n $order = explode(\",\", $_POST['order']);\n $i = 1;\n foreach ($order as $photo) {\n $this->Archivo->read(null, $photo);\n $this->Archivo->set('order', $i);\n $this->Archivo->save();\n $i++;\n }\n }\n\n $this->render(false, false);\n }", "title": "" }, { "docid": "3b9c1a0e2f4db1cb4abebc4d9a249fed", "score": "0.5885406", "text": "function sortDateAscending($thisFiles) {\n \tusort($thisFiles, \"cmpDA\");\n \treturn $thisFiles;\n }", "title": "" }, { "docid": "5a0338d39bdb770ca35d2fa02a736ba4", "score": "0.5815352", "text": "public function sortByFileSetDisplayOrder()\r\n {\r\n $this->query->orderBy('fsDisplayOrder', 'asc');\r\n }", "title": "" }, { "docid": "df532b2a669a89e986a43c13471bf926", "score": "0.5806761", "text": "function sortFilesDescending($thisFiles) {\n \tusort($thisFiles, \"cmpFD\");\n \treturn $thisFiles;\n }", "title": "" }, { "docid": "03381527af4f90b88655c63b47ff53dc", "score": "0.5739277", "text": "public function sort(array $paths);", "title": "" }, { "docid": "f426e16cbcd4f2e6d446c61da71f9752", "score": "0.5678613", "text": "function SetupSortOrder() {\n\n\t\t// Check for Ctrl pressed\n\t\t$bCtrl = (@$_GET[\"ctrl\"] <> \"\");\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = @$_GET[\"order\"];\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->fecha_tamizaje, $bCtrl); // fecha_tamizaje\n\t\t\t$this->UpdateSort($this->id_centro, $bCtrl); // id_centro\n\t\t\t$this->UpdateSort($this->apellidopaterno, $bCtrl); // apellidopaterno\n\t\t\t$this->UpdateSort($this->apellidomaterno, $bCtrl); // apellidomaterno\n\t\t\t$this->UpdateSort($this->nombre, $bCtrl); // nombre\n\t\t\t$this->UpdateSort($this->ci, $bCtrl); // ci\n\t\t\t$this->UpdateSort($this->fecha_nacimiento, $bCtrl); // fecha_nacimiento\n\t\t\t$this->UpdateSort($this->dias, $bCtrl); // dias\n\t\t\t$this->UpdateSort($this->semanas, $bCtrl); // semanas\n\t\t\t$this->UpdateSort($this->meses, $bCtrl); // meses\n\t\t\t$this->UpdateSort($this->sexo, $bCtrl); // sexo\n\t\t\t$this->UpdateSort($this->discapacidad, $bCtrl); // discapacidad\n\t\t\t$this->UpdateSort($this->id_tipodiscapacidad, $bCtrl); // id_tipodiscapacidad\n\t\t\t$this->UpdateSort($this->resultado, $bCtrl); // resultado\n\t\t\t$this->UpdateSort($this->resultadotamizaje, $bCtrl); // resultadotamizaje\n\t\t\t$this->UpdateSort($this->tapon, $bCtrl); // tapon\n\t\t\t$this->UpdateSort($this->tipo, $bCtrl); // tipo\n\t\t\t$this->UpdateSort($this->repetirprueba, $bCtrl); // repetirprueba\n\t\t\t$this->UpdateSort($this->observaciones, $bCtrl); // observaciones\n\t\t\t$this->UpdateSort($this->id_apoderado, $bCtrl); // id_apoderado\n\t\t\t$this->UpdateSort($this->id_referencia, $bCtrl); // id_referencia\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "title": "" }, { "docid": "5827911cfbdf27ea30ac315b203a8740", "score": "0.56511325", "text": "public static function sortListBasedOnFilename($a, $b){\n\t\tif ($a == $b) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn ($a < $b) ? -1 : 1;\n\t}", "title": "" }, { "docid": "f28c91e28c18222fd922f3bcd6bd0b33", "score": "0.5610848", "text": "public function sort()\n {\n return function (\\SplFileInfo $a, \\SplFileInfo $b) {\n preg_match(self::PATTERN, $a->getFileName(), $version_a);\n preg_match(self::PATTERN, $b->getFileName(), $version_b);\n return ((int)$version_a[1] < (int)$version_b[1]) ? -1 : 1;\n };\n }", "title": "" }, { "docid": "727fa5f277aeabee0382889ac4082ef6", "score": "0.5591338", "text": "private function sortFiles(&$array){\n if(isset($array['files'])) sort($array['files']);\n if(isset($array['images'])) sort($array['images']);\n }", "title": "" }, { "docid": "a6afb9821fb4fe78a6f5593a137015b3", "score": "0.5585976", "text": "function SetUpSortOrder() {\n\n\t\t// Check for Ctrl pressed\n\t\t$bCtrl = (@$_GET[\"ctrl\"] <> \"\");\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->tgl, $bCtrl); // tgl\n\t\t\t$this->UpdateSort($this->no_spp, $bCtrl); // no_spp\n\t\t\t$this->UpdateSort($this->jns_spp, $bCtrl); // jns_spp\n\t\t\t$this->UpdateSort($this->kd_mata, $bCtrl); // kd_mata\n\t\t\t$this->UpdateSort($this->urai, $bCtrl); // urai\n\t\t\t$this->UpdateSort($this->jmlh, $bCtrl); // jmlh\n\t\t\t$this->UpdateSort($this->jmlh1, $bCtrl); // jmlh1\n\t\t\t$this->UpdateSort($this->jmlh2, $bCtrl); // jmlh2\n\t\t\t$this->UpdateSort($this->jmlh3, $bCtrl); // jmlh3\n\t\t\t$this->UpdateSort($this->jmlh4, $bCtrl); // jmlh4\n\t\t\t$this->UpdateSort($this->nm_perus, $bCtrl); // nm_perus\n\t\t\t$this->UpdateSort($this->alamat, $bCtrl); // alamat\n\t\t\t$this->UpdateSort($this->npwp, $bCtrl); // npwp\n\t\t\t$this->UpdateSort($this->pimpinan, $bCtrl); // pimpinan\n\t\t\t$this->UpdateSort($this->bank, $bCtrl); // bank\n\t\t\t$this->UpdateSort($this->rek, $bCtrl); // rek\n\t\t\t$this->UpdateSort($this->nospm, $bCtrl); // nospm\n\t\t\t$this->UpdateSort($this->tglspm, $bCtrl); // tglspm\n\t\t\t$this->UpdateSort($this->ppn, $bCtrl); // ppn\n\t\t\t$this->UpdateSort($this->ps21, $bCtrl); // ps21\n\t\t\t$this->UpdateSort($this->ps22, $bCtrl); // ps22\n\t\t\t$this->UpdateSort($this->ps23, $bCtrl); // ps23\n\t\t\t$this->UpdateSort($this->ps4, $bCtrl); // ps4\n\t\t\t$this->UpdateSort($this->kodespm, $bCtrl); // kodespm\n\t\t\t$this->UpdateSort($this->nambud, $bCtrl); // nambud\n\t\t\t$this->UpdateSort($this->nppk, $bCtrl); // nppk\n\t\t\t$this->UpdateSort($this->nipppk, $bCtrl); // nipppk\n\t\t\t$this->UpdateSort($this->prog, $bCtrl); // prog\n\t\t\t$this->UpdateSort($this->prog1, $bCtrl); // prog1\n\t\t\t$this->UpdateSort($this->bayar, $bCtrl); // bayar\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "title": "" }, { "docid": "4f8d2281128e5239e7563e112f404d02", "score": "0.5546858", "text": "function sortSizeAscending($thisFiles) {\n \tusort($thisFiles, \"cmpSA\");\n \treturn $thisFiles;\n }", "title": "" }, { "docid": "2a9f72c9a84220405f664f5874420c37", "score": "0.55345625", "text": "function SortFiles($a, $b) {\r\n $aIsDir = is_dir($a);\r\n $bIsDir = is_dir($b);\r\n if ($aIsDir === $bIsDir)\r\n return strnatcasecmp($a, $b); // both are dirs or files\r\n elseif ($aIsDir && !$bIsDir)\r\n return -1; // if $a is dir - it should be before $b\r\n elseif (!$aIsDir && $bIsDir)\r\n return 1; // $b is dir, should be before $a\r\n}", "title": "" }, { "docid": "e7b80d158f37928235ddb6912f9e3677", "score": "0.5515286", "text": "private function sort(): void\n {\n if (!$this->dirtyIndex) {\n return;\n }\n\n $newIndex = [];\n $index = 0;\n\n foreach ($this->pages as $hash => $page) {\n $order = $page->getOrder();\n\n if (null === $order) {\n $newIndex[$hash] = $index;\n ++$index;\n } else {\n $newIndex[$hash] = $order;\n }\n }\n\n asort($newIndex);\n\n $this->index = $newIndex;\n $this->dirtyIndex = false;\n }", "title": "" }, { "docid": "0144f29bd683b2a1d936c0f2075201a1", "score": "0.54504174", "text": "protected function sortAndSavePackageStates() {}", "title": "" }, { "docid": "0144f29bd683b2a1d936c0f2075201a1", "score": "0.54504174", "text": "protected function sortAndSavePackageStates() {}", "title": "" }, { "docid": "0144f29bd683b2a1d936c0f2075201a1", "score": "0.5449014", "text": "protected function sortAndSavePackageStates() {}", "title": "" }, { "docid": "00c39071334a17e95fd0f7aa4659d19d", "score": "0.5434397", "text": "protected function applySorting()\n\t{\n\t\t$i = 1;\n\t\tparse_str($this->order, $list);\n\t\tforeach ($list as $field => $dir) {\n\t\t\t$this->dataSource->sort($field, $dir === 'a' ? IDataSource::ASCENDING : IDataSource::DESCENDING);\n\t\t\t$list[$field] = array($dir, $i++);\n\t\t}\n\t\treturn $list;\n\t}", "title": "" }, { "docid": "e82d6f3b3008f076c1cb2462edbf6ee7", "score": "0.53866076", "text": "public function forceSortAndSavePackageStates() {}", "title": "" }, { "docid": "2210110b27a34b16879d7752b68a3cd9", "score": "0.5384396", "text": "public function organize()\n\t{\n\t\t$this->applyFilters();\n\t\t$this->totFilesCount = $this->getFilesCount();\n\t\t$this->sort();\n\t}", "title": "" }, { "docid": "e360ceae4666ca2fcedc85e26acc8177", "score": "0.53750825", "text": "public function sortDirection();", "title": "" }, { "docid": "3f4b9ecb0a920c9129e508b05a7ab69f", "score": "0.5372942", "text": "public function sortStrategy();", "title": "" }, { "docid": "3f1572715ee71090022a07f248890086", "score": "0.5300355", "text": "function sortDateDescending($thisFiles) {\n \tusort($thisFiles, \"cmpDD\");\n \treturn $thisFiles;\n }", "title": "" }, { "docid": "dce0ed122cc79874d31f2155464c99ff", "score": "0.52915525", "text": "function _datesort($a,$b){\n $da = $this->_meta($a,'cdate');\n $db = $this->_meta($b,'cdate');\n if($da < $db) return -1;\n if($da > $db) return 1;\n return strcmp($a['file'],$b['file']);\n }", "title": "" }, { "docid": "836b868bedf3069a04a199b5526fba41", "score": "0.52588767", "text": "function usort_reorder($a,$b){\r\r\n $orderby = (!empty($_REQUEST['orderby'])) ? $_REQUEST['orderby'] : 'chat_date'; //If no sort, default to title\r\r\n $order = (!empty($_REQUEST['order'])) ? $_REQUEST['order'] : 'asc'; //If no order, default to asc\r\r\n $result = strcmp($a[$orderby], $b[$orderby]); //Determine sort order\r\r\n return ($order==='asc') ? $result : -$result; //Send final sort direction to usort\r\r\n }", "title": "" }, { "docid": "2d991b998949362eb2183e165f9679c8", "score": "0.52568984", "text": "function bp_docs_get_sort_order( $orderby = 'modified' ) {\n\n\t$new_order\t= false;\n\n\t// We only want a non-default order if we are currently ordered by this $orderby\n\t// The default order is Last Edited, so we must account for that\n\t$current_orderby\t= !empty( $_GET['orderby'] ) ? $_GET['orderby'] : apply_filters( 'bp_docs_default_sort_order', 'modified' );\n\n\tif ( $orderby == $current_orderby ) {\n\t\t// Default sort orders are different for different fields\n\t\tif ( empty( $_GET['order'] ) ) {\n\t\t\t// If no order is explicitly stated, we must provide one.\n\t\t\t// It'll be different for date fields (should be DESC)\n\t\t\tif ( 'modified' == $current_orderby || 'date' == $current_orderby )\n\t\t\t\t$current_order = 'DESC';\n\t\t\telse\n\t\t\t\t$current_order = 'ASC';\n\t\t} else {\n\t\t\t$current_order = $_GET['order'];\n\t\t}\n\n\t\t$new_order = 'ASC' == $current_order ? 'DESC' : 'ASC';\n\t}\n\n\treturn apply_filters( 'bp_docs_get_sort_order', $new_order );\n}", "title": "" }, { "docid": "23b9b40e64be711e69720103e2d3b739", "score": "0.5204331", "text": "public function asort() {}", "title": "" }, { "docid": "0c0b9e4d2b6594d550523ac33190abe7", "score": "0.51953053", "text": "public function sortquery( $p_dir ) {}", "title": "" }, { "docid": "6ac26f23a83cc107c4a84b07553db5d6", "score": "0.51799667", "text": "function sortSizeDescending($thisFiles) {\n \tusort($thisFiles, \"cmpSD\");\n \treturn $thisFiles;\n }", "title": "" }, { "docid": "05fe6854309df704047d247f9d8f22c9", "score": "0.5168165", "text": "private function sort()\r\n\t{\r\n\t\t// sort menu\r\n\t\t$menuOrder = array();\r\n\t\t$menuOrderNames = array();\r\n\t\tforeach ($this->items as $key => $row)\r\n\t\t{\r\n\t\t\t$menuOrder[$key] = !is_null($row->order) ? $row->order : 9999;\r\n\t\t\t$menuOrderNames[$key] = $key;\r\n\t\t}\r\n\t\tarray_multisort($menuOrder, SORT_ASC, $menuOrderNames, SORT_ASC, $this->items);\r\n\t}", "title": "" }, { "docid": "0db0e550d26a86dea1c8ae4d118e3736", "score": "0.514497", "text": "function getSort() {\n return 999;\n }", "title": "" }, { "docid": "4c9f98f8d1b983edde23d34f664d6c30", "score": "0.5140556", "text": "private function getMigrations()\n {\n $files = [];\n $dir = @opendir($this->getMigrationDirectory());\n while ($file = @readdir($dir)) {\n if (substr($file, 0, strlen(static::MIGRATE_FILE_PREFIX_VESSY)) == static::MIGRATE_FILE_PREFIX_VESSY) {\n $files[] = $file;\n }\n if (substr($file, 0, strlen(static::MIGRATE_FILE_PREFIX_CECO)) == static::MIGRATE_FILE_PREFIX_CECO) {\n $files[] = $file;\n }\n }\n asort($files);\n\n return $files;\n }", "title": "" }, { "docid": "a3a32f8b43334fd394dd99d1eef0497b", "score": "0.5140142", "text": "private static function sort($a, $b) {\n $a_is_dir = isset($a['files']);\n $b_is_dir = isset($b['files']);\n\n // dir > file\n if ($a_is_dir && !$b_is_dir) {\n return -1;\n } else if (!$a_is_dir && $b_is_dir) {\n return 1;\n }\n\n return strcasecmp($a['name'], $b['name']);\n }", "title": "" }, { "docid": "8a22a7625a7b5bab96ec8f98daf34c20", "score": "0.5135832", "text": "public function sort(int $sortFlags = \\SORT_REGULAR): void;", "title": "" }, { "docid": "7aad63f5d089a40d959306915b60c927", "score": "0.513541", "text": "public function rSort(int $sortFlags = \\SORT_REGULAR): void;", "title": "" }, { "docid": "d29709f511f9b253b66865376756005e", "score": "0.51331115", "text": "public function getSortOrder();", "title": "" }, { "docid": "2c6093ee908d02c6b6e8de2279c9c965", "score": "0.51059103", "text": "function _buildContentOrderByPending()\n\t{\n\t\t$field = $this->getField();\n\n\t\tif (!$field || !$field->item_id)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\t$upload_context = 'fc_upload_history.item_' . $field->item_id . '_field_' . $field->id;\n\t\t$session_files = JFactory::getSession()->get($upload_context, array());\n\n\t\t$file_ids = isset($session_files['ids_pending'])\n\t\t\t? $session_files['ids_pending']\n\t\t\t: array();\n\n\t\t$orderby = $file_ids\n\t\t\t? ' ORDER BY FIELD(a.id, ' . implode(', ', ArrayHelper::toInteger($file_ids)) . ')'\n\t\t\t: '';\n\t\treturn $orderby;\n\t}", "title": "" }, { "docid": "bb799f2250c154b987fffd306b2256a2", "score": "0.5105207", "text": "function order()\n\t{\n\t\t$this->file_names();\n\t\t$this->order.=\"<TR><TD><a href='\".$this->file_names.\"' onMouseOver=\\\"smsg('View All Records');return document.prs_return\\\" onMouseOut=\\\"nosmsg('Done');return document.prs_return\\\">All</a></TD><TD >|</TD>\";\n\t\tfor($i=65;$i<91;$i++)\n\t\t{\t\t\n\t\t\t$this->order.=\"<TD><a class=la href='$file_names?order=\".chr($i).\"' onMouseOver=\\\"smsg('View By \".chr($i).\"');return document.prs_return\\\" onMouseOut=\\\"nosmsg('Done');return document.prs_return\\\">\".chr($i).\"</a></TD><TD class=lg>|</TD>\";\n\t\t}\n\t\treturn $this->order.=\"</TR>\";\n\t}", "title": "" }, { "docid": "ef16088d864632ec2feaad7f19b3d5d9", "score": "0.50991315", "text": "function fm_reorder_folders_list($obj1, $obj2) {\r\n\t$size1 = explode(\"/\",$obj1['stored_filename']);\r\n\t$size2 = explode(\"/\",$obj2['stored_filename']);\r\n\r\n\tif (count($size1) == count($size2)) {\r\n\t\treturn 0;\r\n\t}\r\n\tif (count($size1) > count($size2)) {\r\n\t\treturn 1;\r\n\t}\r\n\tif (count($size1) < count($size2)) {\r\n\t\treturn -1;\r\n\t}\r\n}", "title": "" }, { "docid": "21bedc18a00423ac02adb28639518deb", "score": "0.50987494", "text": "protected function _buildContentOrderBy()\n\t{\n global $jlistConfig;\n $app\t\t= JFactory::getApplication('site');\n\t\t$db\t\t\t= $this->getDbo();\n\t\t$params\t\t= $this->state->params;\n\t\t$itemid\t\t= JRequest::getInt('catid', 0) . ':' . JRequest::getInt('Itemid', 0);\n\t\t$orderCol\t= $app->getUserStateFromRequest('com_jdownloads.category.' . $itemid . '.filter_order', 'filter_order', '', 'string');\n if ($orderCol == ''){\n $orderCol = $this->state->get('list.ordering');\n }\n\t\t$orderDirn\t= $app->getUserStateFromRequest('com_jdownloads.category.' . $itemid . '.filter_order_Dir', 'filter_order_Dir', '', 'cmd');\n if ($orderDirn == ''){\n $orderDirn = $this->state->get('list.direction');\n }\n \n $orderby\t= ' ';\n\n\t\tif (!in_array($orderCol, $this->filter_fields)) {\n\t\t\t$orderCol = null;\n\t\t}\n\n\t\tif (!in_array(strtoupper($orderDirn), array('ASC', 'DESC', ''))) {\n\t\t\t$orderDirn = '';\n\t\t}\n\n\t\t/* if ($orderCol && $orderDirn) {\n\t\t\t$orderby .= $db->escape($orderCol) . ' ' . $db->escape($orderDirn) . ' ';\n\t\t} else {\n $orderby .= $db->escape($orderCol) .' ';\n \n } */\n \n\t\t$filesOrderby\t\t= $params->get('orderby_sec', '');\n // we have uses in the jD configuration the old numerical values (to be compatible) so we must correct it here at first\n $config_cats_order = JDHelper::getCorrectedOrderbyValues('primary', $jlistConfig['cats.order']);\n\t\t$categoryOrderby\t= $params->def('orderby_pri', $config_cats_order);\n\n if ($filesOrderby){\n\t\t $secondary\t\t\t= JDContentHelperQuery::orderbySecondary($filesOrderby) . ' ';\n } else {\n $secondary = JDContentHelperQuery::orderbySecondary($orderCol) . ' ';\n } \n\t\n $primary\t\t\t= JDContentHelperQuery::orderbyPrimary($categoryOrderby);\n\n\t\t$orderby .= $db->escape($primary) . ' ' . $db->escape($secondary) . ' '; // a.created ';\n \n\t\treturn $orderby;\n\t}", "title": "" }, { "docid": "83b8012c345d66a70d918b54e9eae257", "score": "0.50860935", "text": "function _whatsup_sort_extensions($a, $b) {\n $a_name = empty($a['name'])?'':$a['name'];\n $b_name = empty($b['name'])?'':$b['name'];\n \n $cmp = strcmp($a_name, $b_name);\n \n if (!$cmp) {\n \t$cmp = ($a['number'] < $b['number'])? -1 : 1; \n }\n \n return $cmp;\n}", "title": "" }, { "docid": "3902ebc6dc0bee257763a8d6b71ddbd7", "score": "0.5080624", "text": "function getSort(){\n return 999;\n }", "title": "" }, { "docid": "3902ebc6dc0bee257763a8d6b71ddbd7", "score": "0.5080624", "text": "function getSort(){\n return 999;\n }", "title": "" }, { "docid": "1ce942b9bd2e7faa4ba51cb1cac8419f", "score": "0.5071669", "text": "public function sortASC() {\n $this->addOrder('e.EventDate', 'ASC');\n }", "title": "" }, { "docid": "c55b0237c3da1ed4f5784e065c440068", "score": "0.50633615", "text": "public function getExtensionSortOrder()\n {\n return 10;\n }", "title": "" }, { "docid": "18cfad4ef2933ee96b2a10a8025ca1c3", "score": "0.505962", "text": "public function cms_reorder() {\n\t\t$this->autoRender = false;\n\t\tforeach($this->request->query['sortable'] as $k=>$v) {\n\t\t\t$this->Page->id = end(explode('row_',$v));\n\t\t\t$this->Page->set('position',$k);\n\t\t\t$this->Page->save();\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "778152c2abd719fcec7d44460cac115c", "score": "0.5053377", "text": "public function sort()\n\t{\n\t\t//debug('$this->sortBy', $this->sortBy);\n\t\tif ($this->sortable && $this->sortBy) {\n\t\t\t//print view_table($this->data);\n\t\t\tif ($this->data instanceof ArrayPlus) {\n\t\t\t\t$this->data->uasort([$this, 'tabSortByUrl']);\n\t\t\t} else {\n\t\t\t\tuasort($this->data, [$this, 'tabSortByUrl']); // $this->sortBy is used inside\n\t\t\t}\n\t\t\t//print view_table($this->data);\n\t\t\t//debug($this->thes[$this->sortBy]);\n\t\t\tif (isset($this->thes[$this->sortBy])) {\n\t\t\t\tif (is_array($this->thes[$this->sortBy])) {\n\t\t\t\t\t$th = &$this->thes[$this->sortBy]['name'];\n\t\t\t\t} else {\n\t\t\t\t\t$th = &$this->thes[$this->sortBy];\n\t\t\t\t}\n\t\t\t\tif ($th\n\t\t\t\t\t&& !str_endsWith($th, $this->arrowAsc)\n\t\t\t\t\t&& !str_endsWith($th, $this->arrowDesc)\n\t\t\t\t) {\n\t\t\t\t\t$th .= $this->sortOrder ? $this->arrowDesc : $this->arrowAsc;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//debug_pre_print_backtrace();\n\t\t//debug($this->thes[$this->sortBy]);\n\t}", "title": "" }, { "docid": "de2d233a44f7617f5397c0b4434968a1", "score": "0.5051049", "text": "function usort_reorder( $a, $b ) {\n\t $orderby = ( ! empty( $_GET['orderby'] ) ) ? $_GET['orderby'] : 'note_ID';\n\t // If no order, default to asc\n\t $order = ( ! empty($_GET['order'] ) ) ? $_GET['order'] : 'asc';\n\t // Determine sort order\n\t $result = strcmp( $a[$orderby], $b[$orderby] );\n\t // Send final sort direction to usort\n\t return ( $order === 'asc' ) ? $result : -$result;\n\t}", "title": "" }, { "docid": "10eba47d88612637114270f92a61712e", "score": "0.5046031", "text": "private function _sort()\n {\n \t// if no quizzes return\n \tif ($this->count() == 0) {return;}\n \tusort ($this->quiz_objects, array(\"Quiz\", \"cmpObj\"));\n \t//usort ($this->quiz_objects, \"cmpObj\");\n }", "title": "" }, { "docid": "1f8c7c91257b75bcbbc2a69eaff56c6f", "score": "0.5042559", "text": "function _buildContentOrderBy($q = false)\n\t{\n\t\t$filter_order = $this->getState('filter_order');\n\t\t$filter_order_Dir = $this->getState('filter_order_Dir');\n\n\t\tif ($filter_order=='a.filename_displayed') $filter_order = ' CASE WHEN a.filename_original<>\"\" THEN a.filename_original ELSE a.filename END ';\n\t\t$orderby \t= ' ORDER BY '.$filter_order.' '.$filter_order_Dir.', a.filename';\n\n\t\treturn $orderby;\n\t}", "title": "" }, { "docid": "fa3ffff6882323d12cf91c1e44d0c184", "score": "0.503562", "text": "public function testSortTripss()\n {\n $this->markTestIncomplete(\n 'This test has not been implemented yet.'\n );\n }", "title": "" }, { "docid": "108f051451dcabde854a57e8eb655324", "score": "0.50236595", "text": "protected function sortHandler()\n {\n usort($this->handlers, function(BaseFileHandler $a, BaseFileHandler $b) {\n return strcmp($a->position, $b->position);\n });\n }", "title": "" }, { "docid": "6f464d7a836a26b0ff77f14e39b27d93", "score": "0.5010598", "text": "function SetupSortOrder() {\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = @$_GET[\"order\"];\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->nombre_contacto); // nombre_contacto\n\t\t\t$this->UpdateSort($this->name); // name\n\t\t\t$this->UpdateSort($this->lastname); // lastname\n\t\t\t$this->UpdateSort($this->_email); // email\n\t\t\t$this->UpdateSort($this->address); // address\n\t\t\t$this->UpdateSort($this->phone); // phone\n\t\t\t$this->UpdateSort($this->cell); // cell\n\t\t\t$this->UpdateSort($this->created_at); // created_at\n\t\t\t$this->UpdateSort($this->id_sucursal); // id_sucursal\n\t\t\t$this->UpdateSort($this->tipoinmueble); // tipoinmueble\n\t\t\t$this->UpdateSort($this->tipovehiculo); // tipovehiculo\n\t\t\t$this->UpdateSort($this->tipomaquinaria); // tipomaquinaria\n\t\t\t$this->UpdateSort($this->tipomercaderia); // tipomercaderia\n\t\t\t$this->UpdateSort($this->tipoespecial); // tipoespecial\n\t\t\t$this->UpdateSort($this->email_contacto); // email_contacto\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "title": "" }, { "docid": "8c3fb3c4d7ad10b96b9ad8266c9c66c0", "score": "0.50052345", "text": "function getSort(){\n return 301;\n }", "title": "" }, { "docid": "46659538a188f4cc5f9e4ed2071198e1", "score": "0.49988034", "text": "public function asort();", "title": "" }, { "docid": "c7a3dbe67997d327b988118de8b52c21", "score": "0.49907804", "text": "public function sort()\n {\n // Sort bundles\n sort($this->bundles, SORT_STRING | SORT_FLAG_CASE);\n\n // Sort domains\n sort($this->domains, SORT_STRING | SORT_FLAG_CASE);\n\n // Sort locales\n sort($this->locales, SORT_STRING | SORT_FLAG_CASE);\n\n // Sort files\n ksort($this->files, SORT_STRING | SORT_FLAG_CASE);\n foreach (array_keys($this->files) as $bundle) {\n ksort($this->files[$bundle], SORT_STRING | SORT_FLAG_CASE);\n foreach (array_keys($this->files[$bundle]) as $path) {\n sort($this->files[$bundle][$path], SORT_STRING | SORT_FLAG_CASE);\n }\n }\n\n // Sort messages\n ksort($this->messages, SORT_STRING | SORT_FLAG_CASE);\n foreach (array_keys($this->messages) as $bundle) {\n ksort($this->messages[$bundle], SORT_STRING | SORT_FLAG_CASE);\n foreach (array_keys($this->messages[$bundle]) as $domain) {\n ksort($this->messages[$bundle][$domain], SORT_STRING | SORT_FLAG_CASE);\n foreach (array_keys($this->messages[$bundle][$domain]) as $locale) {\n ksort($this->messages[$bundle][$domain][$locale], SORT_STRING | SORT_FLAG_CASE);\n }\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "08fb595c8a114fafb9b46df28fafb86d", "score": "0.49897987", "text": "function asort() {\n\t\t$this->_iterator->asort();\n\t}", "title": "" }, { "docid": "67e0d664645ede2e1659cff82eed00c1", "score": "0.4987458", "text": "protected function sortAvailablePackagesByDependencies() {}", "title": "" }, { "docid": "9b11fc4b741bf8bd7f3d514bc14cd238", "score": "0.49847057", "text": "function script_embeder_sort_function($a, $b){\n\tif($a['order']<$b['order']){\n\t\treturn -1;\n\t}else{\n\t\treturn ($a['order']>$b['order'])? 1 : 0;\n\t}\n}", "title": "" }, { "docid": "a1234a40f9aabcca472364b132d5e532", "score": "0.49812806", "text": "function update_sort_order()\n\t{\n\t\t$page_id = $this->input->post('sort_id');\n\t\t$row_sort_order = $this->input->post('row_sort_order');\n\t\t$this->Text_image_slider_model->update_sort_order($page_id, $row_sort_order);\n\t}", "title": "" }, { "docid": "267d48b907c132c931da46ac5080af87", "score": "0.49708298", "text": "function _get_sorting_direction_options()\n {\n return array(__('Ascending', 'nggallery') => 'ASC', __('Descending', 'nggallery') => 'DESC');\n }", "title": "" }, { "docid": "58242822138b1358f5ecc99b3daff013", "score": "0.4967757", "text": "public function sort() {\n $this->sort($this->arrayList);\n }", "title": "" }, { "docid": "64f4e868025b153bdd93decab19f1fce", "score": "0.4965658", "text": "public function process_sort_callback() {\n\t\tglobal $wpdb;\n\t\t\n\t\t$data = array();\n\n\t\tforeach ( $_REQUEST['order'] as $k ) {\n\t\t\tif ( 'root' !== $k['item_id'] ) {\n\t\t\t\t$data[] = array(\n\t\t\t\t\t'field_id' => $k['item_id'],\n\t\t\t\t\t'parent' => $k['parent_id']\n\t\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tforeach ( $data as $k => $v ) {\n\t\t\t/* Update each field with it's new sequence and parent ID */\n\t\t\t$wpdb->update( $this->field_table_name, array( 'field_sequence' => $k, 'field_parent' => $v['parent'] ), array( 'field_id' => $v['field_id'] ) );\n\t\t}\n\n\t\tdie(1);\n\t}", "title": "" }, { "docid": "171d52f05fd987666c819d7b0e331358", "score": "0.49636227", "text": "public function sortDESC() {\n $this->addOrder('e.EventDate', 'DESC');\n }", "title": "" }, { "docid": "af73ec688f447ffc48e55dc47f637110", "score": "0.4962614", "text": "function main($_o){\r\n\r\n $path = (!empty($_o[\"p\"])) ? $_o[\"p\"] : \"\";\r\n $path2 = \"P:/develope/www/dpa/__20120605/\" . $path;\r\n $path1 = \"P:/develope/www/dpa/eswine/\" . $path;\r\n\r\n $l_arr1 = transPath($path1);\r\n $l_arr2 = transPath($path2);\r\n print_r($l_arr1);\r\n print_r($l_arr2);\r\n\r\n //\r\n $l_diff1 = array_diff($l_arr1,$l_arr2);\r\n sort($l_diff1);\r\n $l_diff2 = array_diff($l_arr2,$l_arr1);\r\n sort($l_diff2);\r\n print_r($l_diff1);\r\n print_r($l_diff2);\r\n}", "title": "" }, { "docid": "9a71d14e372ec640ab58822f5d4196c4", "score": "0.49601355", "text": "public static function sort_dir_by_date( $dir, $sort = \"DESC\", $disagree_type = array( \".php\" ) ) {\n\n\t\t$ignored = array( '.', '..', '.svn', '.htaccess' );\n\t\t$files = array();\n\t\tforeach ( scandir( $dir ) as $file ) {\n\t\t\tif ( in_array( $file, $ignored ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( count( $disagree_type ) > 0 ) {\n\t\t\t\tforeach ( $disagree_type as $type ) {\n\t\t\t\t\tif ( strlen( stristr( $file, $type ) ) > 0 ) {\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\t$files[ $file ] = filemtime( $dir . '/' . $file );\n\t\t}\n\n\t\tif ( $sort == \"DESC\" ) {\n\t\t\tarsort( $files, SORT_NUMERIC );\n\t\t} else {\n\t\t\tasort( $files, SORT_NUMERIC );\n\t\t}\n\n\t\t$files = array_keys( $files );\n\t\treturn $files;\n\t}", "title": "" }, { "docid": "826e27834182e7e4b4ee53f2d71c5538", "score": "0.4957439", "text": "function _doGetAppliedOrderBy() {\n if (!$this->sortArray) return '';\n $crit = [];\n foreach ($this->sortArray as $path => $dir) {\n $arrPath = Ac_Util::pathToArray($path);\n $tableField = [];\n $field = array_pop($arrPath);\n if ($path) $tableField[] = Ac_Util::arrayToPath($arrPath); // first add alias\n else if ($this->defaultAlias) $tableField[] = $this->defaultAlias;\n $tableField[] = $field; // then add field name\n $ord = $this->_db->nameQuote($tableField); // `alias`.`field`\n if (!$dir) $ord .= ' DESC';\n $crit[] = $ord;\n }\n return implode(\", \", $crit);\n }", "title": "" }, { "docid": "3047a671ea1d91ed2f803401849500a7", "score": "0.4952386", "text": "function getSort(){\n return 155;\n }", "title": "" }, { "docid": "1647c938e160069ae0ef55a1a6493e8e", "score": "0.49455035", "text": "function init_sort(){\r\n\t\t$out='';\r\n\r\n\t\tif($this->sort===true or $this->sort==''){\r\n\t\t\tfor($i=0; $i<count($this->data[0]); $i++){\r\n\t\t\t\t$out.=($out ? '_' : '').'t';\r\n\t\t\t}\r\n\t\t\t$this->sort=$out;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "10a38224ac233820037d1edbf26bb8e8", "score": "0.49426958", "text": "protected function sortByResourceMap() {\n\n\t\t$resourceMap = $this->getResourceMap();\n\t\t$sortOrder = array_flip(array_keys($resourceMap));\n\n\t\t$this->resources->sort(function ($a, $b) use ($sortOrder) {\n\t\t\treturn $sortOrder[$a->getKey()] > $sortOrder[$b->getKey()];\n\t\t});\n\t}", "title": "" }, { "docid": "18bac6c008e771f380b42e79bef141ba", "score": "0.49412814", "text": "private function sort()\n {\n $sortRaw = $this->request->get('sort');\n\n $direction = Str::startsWith($sortRaw, '-') ? 'DESC' : 'ASC';\n $sortBy = Str::after($sortRaw, '-');\n\n $this->guardSorting($sortBy);\n\n $this->builder->orderBy($sortBy, $direction);\n }", "title": "" }, { "docid": "516390177c68cb728e815d126d3b915e", "score": "0.49364114", "text": "function languagelesson_sort_by_ordering($lessonid) {\n global $DB;\n \n $pages = $DB->get_records('languagelesson_pages', array('lessonid'=>$lessonid));\n\n // Make sure they are in order by field ordering.\n $order = array();\n foreach ($pages as $key => $obj) {\n $order[$key] = $obj->ordering;\n }\n array_multisort($order, SORT_ASC, $pages);\n \n $pagecount = count($pages);\n $keys = array_keys($pages);\n \n $i = array_shift($keys);\n $last = array_pop($keys);\n \n $prev = $pages[$i];\n $prev->prevpageid = 0;\n $prev->nextpageid = $pages[$i += 1];\n $DB->update_record('languagelesson_pages', $prev);\n \n while ($i < $pagecount) {\n $thispage = $pages[$i];\n $thispage->prevpageid = $prev->id;\n if (!$pages[$i += 1]) {\n $thispage->nextpageid = 0;\n $DB->update_record('languagelesson_pages', $thispage);\n break;\n } else {\n $thispage->nextpageid = $i;\n }\n $DB->update_record($thispage);\n $prev = $thispage;\n }\n \n }", "title": "" }, { "docid": "e3ed54aba23228ff467bddbd2292046b", "score": "0.4935655", "text": "function action_sort($a, $b) {\r return $a['priority'] > $b['priority'] ? 1 : -1;\r}", "title": "" }, { "docid": "c7b17c11a23557e3bac6229e1906fb5a", "score": "0.49347904", "text": "public function getSorts();", "title": "" }, { "docid": "cb9ddb32c5b21bc2c7c2404a09313549", "score": "0.49233484", "text": "function usort_reorder($a,$b)\r\n\t\t{\r\n $orderby = (!empty($_REQUEST['orderby'])) ? $_REQUEST['orderby'] : ''; /*If no sort, default to title*/\r\n $order = (!empty($_REQUEST['order'])) ? $_REQUEST['order'] : ''; /*If no order, default to asc*/\r\n $result = strcmp($a[$orderby], $b[$orderby]); /*Determine sort order*/\r\n return ($order==='desc') ? $result : -$result; /*Send final sort direction to usort*/\r\n }", "title": "" }, { "docid": "f7b52039a143d45233bed4fed1d569e0", "score": "0.49191442", "text": "private function sortUploadedData(array $data)\n {\n usort($data, function ($a, $b) {\n $cmp = strcmp($a->name, $b->name);\n if ($cmp != 0) {\n return $cmp;\n }\n return strcmp($a->author, $b->author);\n });\n\n return $data;\n }", "title": "" }, { "docid": "a4651c99a3291165494bb1f2a4dd969b", "score": "0.49162614", "text": "function sortKolejnosc($data, $dostep)\n {\n Permission::check($dostep);\n\n $poz = new stdClass();\n\n switch ($data['kierunek']) {\n case 'down':\n $poz->aktualna = SQL::one(\"SELECT `\".$data['ColumnSort'].\"` FROM `\".$data['table'].\"` WHERE \".$data['ColumnId'].\" = \".$data['id'].\" LIMIT 1\");\n $poz->nowa = (int)$poz->aktualna - 1;\n $poz->aktualnie_zajmuje = SQL::one(\"SELECT \".$data['ColumnId'].\" FROM `\".$data['table'].\"` WHERE `\".$data['ColumnSort'].\"` = $poz->nowa LIMIT 1\");\n if($poz->nowa <= 0){\n return;\n }\n\n SQL::update($data['table'], [\n $data['ColumnSort'] => $poz->nowa,\n ],\n $data['id'],\n $data['ColumnId']\n );\n\n SQL::update($data['table'], [\n $data['ColumnSort'] => $poz->aktualna,\n ],\n $poz->aktualnie_zajmuje,\n $data['ColumnId']\n );\n\n break;\n\n case 'up':\n $poz->aktualna = SQL::one(\"SELECT `\".$data['ColumnSort'].\"` FROM `\".$data['table'].\"` WHERE \".$data['ColumnId'].\" = \".$data['id'].\" LIMIT 1\");\n $poz->nowa = (int)$poz->aktualna + 1;\n $poz->aktualnie_zajmuje = SQL::one(\"SELECT \".$data['ColumnId'].\" FROM `\".$data['table'].\"` WHERE `\".$data['ColumnSort'].\"` = $poz->nowa LIMIT 1\");\n\n $poz->najwieksza = SQL::one(\"SELECT `\".$data['ColumnSort'].\"` FROM `\".$data['table'].\"` ORDER BY `\".$data['ColumnSort'].\"` DESC LIMIT 1\");\n if($poz->nowa > $poz->najwieksza){\n return;\n }\n\n SQL::update($data['table'], [\n $data['ColumnSort'] => $poz->nowa,\n ],\n $data['id'],\n $data['ColumnId']\n );\n\n SQL::update($data['table'], [\n $data['ColumnSort'] => $poz->aktualna,\n ],\n $poz->aktualnie_zajmuje,\n $data['ColumnId']\n );\n\n break;\n }\n }", "title": "" }, { "docid": "ea498e02380dc70f287946fb71beebb1", "score": "0.49152422", "text": "function ItemsForm_SortItems()\n {\n $reverse=$this->CGI_GET($this->ModuleName.\"_Reverse\");\n $sorts=$this->ItemsForm_Sort();\n if (empty($sorts)) { return; }\n\n $filter=\"\";\n foreach ($sorts as $sort)\n {\n if ($this->ItemData[ $sort ][ \"Sql\" ]==\"INT\")\n {\n $filter.=\".#{%08d}\".$sort.\"\";\n }\n else\n {\n $filter.=\".#\".$sort.\"\";\n }\n }\n\n $items=$this->Args[ \"Items\" ];\n\n $ritems=array();\n foreach ($this->Args[ \"Items\" ] as $item)\n {\n $sortkey=$this->FilterHash($filter,$item);\n $ritems[ $sortkey ]=$item;\n }\n\n $sortkeys=array_keys($ritems);\n sort($sortkeys);\n\n $this->Args[ \"Items\" ]=array();;\n foreach ($sortkeys as $sortkey)\n {\n array_push($this->Args[ \"Items\" ],$ritems[ $sortkey ]);\n }\n\n if ($reverse==1)\n {\n $this->Args[ \"Items\" ]=array_reverse($this->Args[ \"Items\" ]);\n }\n }", "title": "" }, { "docid": "ff2749775065bc5cdf3de433564d1aa7", "score": "0.49146566", "text": "function articleSort()\n {\n if(!$this->checkAccessGroup(1)){\n return;\n }\n $i = 0;\n $index = 0;\n $parent = array(0);\n $children = array($this->input->post('data',TRUE));\n $children[$index] = json_decode($children[$index]);\n do{\n $data = $children[$index];\n foreach($data as $key=>$item){\n $i++;\n $update_data = array(\n 'order'=>$i,\n 'parent'=>$parent[$index]\n );\n $this->Articles_model->edit($item->id, $update_data);\n if(isset($item->children)){\n $parent[$index+1] = $item->id;\n $children[$index+1] = $item->children;\n }\n }\n $index++;\n }while(isset($children[$index]));\n $this->systemSuccess(\"Your articles has been successfully sorted.\", ARTICLES_ADMIN_URL.\"article\");\n }", "title": "" }, { "docid": "654c68080d446301e9e04599051ed273", "score": "0.4905814", "text": "function usort_reorder($a,$b){\n $orderby = (!empty($_REQUEST['orderby'])) ? $_REQUEST['orderby'] : 'title'; //If no sort, default to title\n $order = (!empty($_REQUEST['order'])) ? $_REQUEST['order'] : 'asc'; //If no order, default to asc\n $result = strcmp($a[$orderby], $b[$orderby]); //Determine sort order\n return ($order==='asc') ? $result : -$result; //Send final sort direction to usort\n }", "title": "" }, { "docid": "850aaf25832a14ab65e0d189d22025d3", "score": "0.4905016", "text": "function scandir ($directory, $sorting_order = 'SCANDIR_SORT_ASCENDING', $context = null) {}", "title": "" }, { "docid": "73d0375bd4b82d246738700c653e065b", "score": "0.49038282", "text": "function sort($a, $b)\n\t{\n\t\treturn ($a->rang > $b->rang ? 1 : -1); //rastecki\n\t}", "title": "" }, { "docid": "ee3707b4422d469fdb9081231a8d5658", "score": "0.48996124", "text": "function findAllSorted($sort = 'id', $dir = 'asc');", "title": "" }, { "docid": "48a8378ec74105fd392069a55b402a68", "score": "0.48979154", "text": "public function sortLists () {\n\t\tforeach ($this->layerList as $layer) {\n\t\t\t$layer->sortLists();\n\t\t}\n\t\tuasort($this->layerList, array(\"WmtsLayer\", \"compareNames\"));\n\t}", "title": "" }, { "docid": "3a20ee3e29c42c0c211b6fbeab8dd2f0", "score": "0.48973623", "text": "function SetUpSortOrder() {\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$this->UpdateSort($this->identries); // identries\r\n\t\t\t$this->UpdateSort($this->titulo); // titulo\r\n\t\t\t$this->UpdateSort($this->id); // id\r\n\t\t\t$this->UpdateSort($this->islive); // islive\r\n\t\t\t$this->UpdateSort($this->tool_id); // tool_id\r\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "409b9745f2b387a4be1fe7fc3306005b", "score": "0.48914528", "text": "function languagelesson_reorder_pages($lessonid) {\n global $DB;\n $startpage = $DB->get_record(\"languagelesson_pages\", array('lessonid'=> $lessonid, 'prevpageid'=>0));\n $order = 0;\n $DB->set_field(\"languagelesson_pages\", 'ordering', $order, array('id'=>$startpage->id));\n $order++;\n $nextpageid = $DB->get_field(\"languagelesson_pages\", 'id', array('id'=>$startpage->nextpageid));\n\n for (; $nextpageid != 0; $order++) {\n $DB->set_field(\"languagelesson_pages\", 'ordering', $order, array('id'=>$nextpageid));\n $nextpageid = (int)$DB->get_field(\"languagelesson_pages\", 'nextpageid', array('id'=>$nextpageid));\n }\n}", "title": "" }, { "docid": "f8dba9e42d034a1896208a44b69a69c5", "score": "0.488957", "text": "function getSort(){\n\treturn 281;\n}", "title": "" }, { "docid": "f39ef53dcea894a25097f422bebc6b81", "score": "0.48891994", "text": "private static function sort()\n\t{\n\t\t//Setup order of importantance\n\t\t$changefreqs = array(\n\t\t\t'hourly' => 5,\n\t\t\t'daily' => 4,\n\t\t\t'weekly' => 3,\n\t\t\t'monthly' => 2,\n\t\t\t'yearly' => 1,\n\t\t\t'never' => 0\n\t\t);\n\n\t\t//Setup invidual arrays to sort by\n\t\tforeach(static::$links as $index => $link)\n\t\t{\n\t\t\t$priority[$index] = $link->priority ? $link->priority : 0;\n\t\t\t$changefreq[$index] = $link->changefreq ? $changefreqs[$link->changefreq] : 0;\n\t\t\t$loc[$index] = $link->loc;\n\t\t}\n\n\t\tarray_multisort($priority, SORT_DESC, $changefreq, SORT_DESC, $loc, SORT_ASC, static::$links);\n\t}", "title": "" }, { "docid": "5281eba49d939e996b57eec8b62346e3", "score": "0.48792943", "text": "function getSort(){\n return 555;\n }", "title": "" }, { "docid": "d3b22cfacf49708ce75f0bd80a4cc0da", "score": "0.48777667", "text": "public function sort(): void {\n $r = new Stack();\n while (!$r->isEmpty()) {\n $tmp = $this->pop();\n\n while ((!$r->isEmpty()) && (Comparator::lessThan($r->peek(), $tmp))) {\n $this->push($r->pop());\n }\n\n $r->push($tmp);\n }\n\n while (!$r->isEmpty()) {\n $this->push($r->pop());\n }\n }", "title": "" }, { "docid": "943cbb0818b8b7907907f9d83f193d6b", "score": "0.48773924", "text": "protected function decksOrderAsc()\n {\n $request = $this->request();\n\n $this->result()\n ->changeRequest('decks_current_condition', $request['decks_order_asc'])\n ->changeRequest('decks_current_order', 'ASC')\n ->setCurrent('Decks_shared');\n }", "title": "" }, { "docid": "01d4dfacb137443989d901f654ad3ee0", "score": "0.48658383", "text": "function cmpFA($a,$b) {\n\treturn strcasecmp($a['file'],$b['file']); \t}", "title": "" }, { "docid": "d9cd81cfa034947f00d400d5aa6833cd", "score": "0.48609534", "text": "function categoriesOrder( $uid, $inc, $option ) {\n\tglobal $mainframe;\n $database = &JFactory::getDBO();\n\t$row = new jlist_cats( $database );\n\t$row->load( $uid );\n $row->move( $inc );\n\t$mainframe->redirect( \"index.php?option=com_jdownloads&task=categories.list\" );\n}", "title": "" }, { "docid": "006a6182d9c5914a0b79f1e06b0d929c", "score": "0.48581833", "text": "public function processListQueryOrderBy() {\n\t\tif (!empty($this->values['\\Object\\Form\\Model\\Dummy\\Sort'])) {\n\t\t\tforeach ($this->values['\\Object\\Form\\Model\\Dummy\\Sort'] as $k => $v) {\n\t\t\t\tif (!empty($v['__sort'])) {\n\t\t\t\t\t$name = $this->detail_fields['\\Object\\Form\\Model\\Dummy\\Sort']['elements']['__sort']['options']['options'][$v['__sort']]['name'];\n\t\t\t\t\t$this->misc_settings['list']['sort'][$name] = $v['__order'];\n\t\t\t\t\t$this->query->orderby([$v['__sort'] => $v['__order']]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e3e50d98e2ae88747d799bdcaae21c15", "score": "0.48577693", "text": "public static function reorder() {\n\t\t$msg = '';\n\n\t\tglobal $dealofday;\n\t\t$args = array();\n\t\t$args['post_type'] = 'product';\n\t\t$args['meta_key'] = 'dod_is_in_dod';\n\t\t$args['meta_value'] = 'on';\n\t\t$args['orderby'] = \"menu_order\";\n\t\t$args['order'] = 'ASC';\n\t\tadd_filter('posts_results', array(&$dealofday, 'order_by_featured'), PHP_INT_MAX, 2);\n\t\t$query = new WP_Query($args);\n\n\t\tinclude 'views/_reorder_deals.php';\n\t\twp_enqueue_script('jquery-ui-sortable');\n\t}", "title": "" } ]
2d9afcf29208d0ba60cac1c13042c419
get the size of the table, in other words, the max number of items in the table
[ { "docid": "72a92e83b4544565456baae968be526a", "score": "0.72755975", "text": "public function Size() {\n return $this->RowCount() * $this->_coln;\n }", "title": "" } ]
[ { "docid": "1536aa0a3c93455cecc4fee4dbf5a8fd", "score": "0.73829913", "text": "public function size()\n {\n $this->items();\n return count($this->rows);\n }", "title": "" }, { "docid": "9a430970c9029e3060d1509dfa72478c", "score": "0.72896445", "text": "public function getLimitPurchaseInformationTableSize()\n {\n return Mage::getStoreConfig(self::XML_PATH_LIMIT_TABLE_SIZE);\n }", "title": "" }, { "docid": "d65445bcf88e3fda6747556716a1c2c3", "score": "0.72855", "text": "public function getNumberOfRows(){\n\t\t$this->processItems();\n\t\treturn sizeof($this->m_items);\n\t}", "title": "" }, { "docid": "dcbdc0b2c236fd971c680f04d960e4db", "score": "0.72747046", "text": "public function getSize()\n {\n return count($this->id);\n }", "title": "" }, { "docid": "06d5f7ee856b8fb1db7cb232f66a8d53", "score": "0.7176387", "text": "public function tableSize(string $table, string $type = ''): int\n {\n $size = 0;\n if (bbn\\Str::checkName($table)) {\n\n if ($type === 'data') {\n $function = \"pg_relation_size\";\n }\n elseif ($type === 'index') {\n $function = \"pg_indexes_size\";\n }\n else {\n $function = \"pg_total_relation_size\";\n }\n\n $row = $this->getRow(\"SELECT $function(?)\", $table);\n\n if (!$row) {\n throw new \\Exception(X::_('Table ') . $table . X::_(' Not found'));\n }\n\n $size = current(array_values($row));\n }\n\n return $size;\n }", "title": "" }, { "docid": "40d55cb04c45a692836fe3eafe004d3c", "score": "0.7169963", "text": "public function getSize()\n {\n if (null === $this->_totalRecords) {\n $this->_totalRecords = count($this->getItems());\n }\n return (int)$this->_totalRecords;\n }", "title": "" }, { "docid": "70df09633e3aa531bfc8572de81d8b63", "score": "0.7169853", "text": "public function numEntries() {\n return $this->size;\n }", "title": "" }, { "docid": "b28ec334bf7733c88f1af308882434d4", "score": "0.7157053", "text": "public function getMaxSize() : int;", "title": "" }, { "docid": "487ad0a0179a1c16662dc51390eb649f", "score": "0.7141807", "text": "public function fullDatabaseSize() {\n\n\t\t$tables = mysql_list_tables($database, $db);\n\t\tif (!$tables) {\n\t\t\treturn - 1;\n\t\t}\n\n\t\t$tableCount = mysql_num_rows($tables);\n\t\t$size = 0;\n\n\t\tfor ($i = 0; $i < $tableCount; $i++) {\n\t\t\t$tname = mysql_tablename($tables, $i);\n\t\t\t$r = mysql_query(\"SHOW TABLE STATUS FROM \" . $database . \" LIKE '\" . $tname . \"'\");\n\t\t\t$data = mysql_fetch_array($r);\n\t\t\t$size += ($data['Index_length'] + $data['Data_length']);\n\t\t}\n\t\treturn $size;\n\t}", "title": "" }, { "docid": "f4290c304577241194b4df33ae774bd6", "score": "0.71153545", "text": "private function get_table_size( $database_name, $table_name ) {\n\t\tglobal $wpdb;\n\t\t$size = $wpdb->get_var( $wpdb->prepare(\n\t\t\t\"SELECT SUM(data_length + index_length) FROM information_schema.TABLES where table_schema = '%s' and Table_Name = '%s' GROUP BY Table_Name LIMIT 1\",\n\t\t\t$database_name,\n\t\t\t$table_name\n\t\t)\n\t\t);\n\n\t\treturn $size;\n\t}", "title": "" }, { "docid": "91931a87e3068bdb61920e0e61337aee", "score": "0.70463306", "text": "public function getSize()\n {\n return (new \\yii\\db\\Query())\n ->select('*')\n ->from($this->tableName)\n ->where(['status' => self::STATUS_READY])\n ->count('*', $this->db); \n }", "title": "" }, { "docid": "4377c9f109983ed32ba659abceaf2c89", "score": "0.70072186", "text": "public function maxsize(): int\n {\n return $this->max_size;\n }", "title": "" }, { "docid": "9e61c183e12a5b15ce1947629cff4d98", "score": "0.70006186", "text": "public function size() : int\r\n \t\t{\r\n \t\t\t$size = mysqli_num_rows($this->query);\r\n \t\t\treturn $size;\r\n \t\t}", "title": "" }, { "docid": "88cc91b08ff1969f4be64929f5ff49e2", "score": "0.6937638", "text": "public function size(): int\n {\n return $this->count();\n }", "title": "" }, { "docid": "6c22ddbb67302400353afa7e3fbd709d", "score": "0.68571585", "text": "public function count(){\n\t\treturn sizeof($this->items);\n\t}", "title": "" }, { "docid": "73fc58634f4e4f4f2d3bff5f432033ce", "score": "0.68510455", "text": "protected function get_size_of($strTable)\n\t{\n\t\t$objStatus = $this->resConnection->query(\"SHOW TABLE STATUS LIKE '\" . $strTable . \"'\")\n\t\t\t\t\t\t\t\t\t\t ->fetch_object();\n\n\t\treturn ($objStatus->Data_length + $objStatus->Index_length);\n\t}", "title": "" }, { "docid": "f9bc4c9af33283d77997d7d4db264759", "score": "0.6802292", "text": "public function size()\n {\n return size($this->getItems());\n }", "title": "" }, { "docid": "b4ca9aca0a19804ec28d8d09a2052d6f", "score": "0.6792926", "text": "public function sizeSQLite()\n {\n $result = $this->fetchOne('PRAGMA PAGE_SIZE');\n $page_size = (int) $result[0];\n $result = $this->fetchOne('PRAGMA PAGE_COUNT');\n $page_count = (int) $result[0];\n return $page_size * $page_count / 1024.0/1024.0;\n }", "title": "" }, { "docid": "bac1ab99550ba70b18e763f0d1d96514", "score": "0.67752206", "text": "public function size(): int\n {\n\t\treturn $this->size;\n\t}", "title": "" }, { "docid": "46efa3016df184e88b101ea5eeca7282", "score": "0.67687637", "text": "public function getLength() {\n \n switch ( $this->model ) {\n\n case (\"MYSQLI\"):\n \n $return = $this->raw_data->num_rows;\n \n break;\n\n case (\"MYSQL_PDO\"):\n case (\"SQLITE_PDO\"):\n case (\"ORACLE_PDO\"):\n case (\"DBLIB_PDO\"):\n\n if ( is_null($this->data) ) $this->getData();\n\n $return = count($this->data);\n\n break;\n\n case (\"DB2\"):\n\n $return = db2_num_fields($this->raw_data);\n \n break;\n\n case (\"POSTGRESQL\"):\n\n $return = pg_num_rows($this->raw_data);\n \n break;\n\n }\n\n return $return;\n \n }", "title": "" }, { "docid": "286a812e5475511a8f6ce416c9f90091", "score": "0.6740494", "text": "public function size() {\n\n return count( $this->data );\n }", "title": "" }, { "docid": "be836c2ee06b9746dc7f5cb897b40a00", "score": "0.673191", "text": "public function count()\n {\n return $this->listSize;\n }", "title": "" }, { "docid": "d2b15be69d8c40f314d2ffb2d4bc45b7", "score": "0.6725478", "text": "public function size()\n\t{\n\t\t$size = 0;\n\t\tforeach ($this as $value) {\n\t\t\t$size++;\n\t\t}\n\t\treturn $size;\n\t}", "title": "" }, { "docid": "7c7ceac5b2953abfeb555bafcce2ec4a", "score": "0.67238605", "text": "function _getRowCount( $tableAbstract )\n\t{\n\t\t$db =& $this->_getDB();\n\t\tif($this->getError()) return;\n\n\t\t$sql = \"SELECT COUNT(*) FROM `$tableAbstract`\";\n\t\t$db->setQuery( $sql );\n\t\t$this->_maxRange = $this->_hasJoomFish ? $db->loadResult(false) : $db->loadResult();\n\t\tJoomlapackLogger::WriteLog(_JP_LOG_DEBUG, \"Rows on \" . $this->_nextTable . \" : \" . $this->_maxRange);\n\n\t\treturn $this->_maxRange;\n\t}", "title": "" }, { "docid": "61299f58693ec0a8d102a6736a9de629", "score": "0.67064834", "text": "public function getSize()\n {\n return count($this->parent);\n }", "title": "" }, { "docid": "82c9af8f9ab62ade80da25c7af66d646", "score": "0.6695349", "text": "public function getTotalSize(){}", "title": "" }, { "docid": "82c9af8f9ab62ade80da25c7af66d646", "score": "0.6695349", "text": "public function getTotalSize(){}", "title": "" }, { "docid": "ad7e5202adb36992ccc987f8ca449a90", "score": "0.66941524", "text": "function size()\n {\n $count = 0 ;\n $this->stepThrough($count) ;\n return $count ;\n }", "title": "" }, { "docid": "6fda46ed4ddea0befeb9159637b49da5", "score": "0.6686413", "text": "public function count()\n {\n return $this->size;\n }", "title": "" }, { "docid": "0f8d1d7c517b38c2c6921667b67e6c58", "score": "0.66826886", "text": "public function getNumRows() {\n return sizeof($this->rows);\n }", "title": "" }, { "docid": "57b4dc246b5577ca0368ab315e149307", "score": "0.6677562", "text": "public function size() {\n return $this->s['size'];\n }", "title": "" }, { "docid": "eea8a2147edd33acd5024b3e1cce7ae8", "score": "0.66733766", "text": "public function size()\n {\n return count($this->index);\n }", "title": "" }, { "docid": "5f406dfe8754c7a038ae703bcd0d9684", "score": "0.6671574", "text": "public function getSize()\n {\n return count($this->crown);\n }", "title": "" }, { "docid": "6daef14dabdf90918fe9435e97da647f", "score": "0.666903", "text": "public function count() {\n return sizeof($this->_data);\n }", "title": "" }, { "docid": "6daef14dabdf90918fe9435e97da647f", "score": "0.666903", "text": "public function count() {\n return sizeof($this->_data);\n }", "title": "" }, { "docid": "b27d9339ebe443532df368beb20e8b8f", "score": "0.66644645", "text": "public function length()\n {\n $queryBuilder = $this->connection->createQueryBuilder();\n /** @var Statement $statement */\n $statement = $queryBuilder\n ->select('COUNT(q.id)')\n ->from($this->tableName, 'q')\n ->execute();\n\n return (int) $statement->fetchColumn();\n }", "title": "" }, { "docid": "0d611c3cdf5c67c326bbeebc27b85821", "score": "0.6662506", "text": "public function getIndexedItemsSize()\n {\n if (array_key_exists(\"indexedItemsSize\", $this->_propDict)) {\n return $this->_propDict[\"indexedItemsSize\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "005306e2c6d351db1d9332992679e6d9", "score": "0.66545844", "text": "public function estimateTotal()\n {\n return sizeof($this->tables) * ((int) $this->params['db_schema'] + (int) $this->params['db_data']);\n }", "title": "" }, { "docid": "ac823a39db56dc45a749e016df472cff", "score": "0.66478086", "text": "public function length()\n {\n return $this->count();\n }", "title": "" }, { "docid": "45a6ff5f59bb64f91f4a38f1aef7e5b2", "score": "0.66284776", "text": "public function size(): int\n {\n return count($this->fields) - 1;\n }", "title": "" }, { "docid": "48c71353136bab6a438f281d08825d1a", "score": "0.6626763", "text": "public function size() {\n return $this->getListaDuplamenteEncadeada()->size();\n }", "title": "" }, { "docid": "88f089b6ef250fe719d9c0469c98baa7", "score": "0.6623601", "text": "public function size(): int;", "title": "" }, { "docid": "88f089b6ef250fe719d9c0469c98baa7", "score": "0.6623601", "text": "public function size(): int;", "title": "" }, { "docid": "88f089b6ef250fe719d9c0469c98baa7", "score": "0.6623601", "text": "public function size(): int;", "title": "" }, { "docid": "7ab966e7ad6e5152473fa83721820faf", "score": "0.6602673", "text": "public function getUnindexedItemsSize()\n {\n if (array_key_exists(\"unindexedItemsSize\", $this->_propDict)) {\n return $this->_propDict[\"unindexedItemsSize\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "466a12dfc27a55376388d32e4e47cc64", "score": "0.66026646", "text": "public function getCount()\n {\n return sizeof($this->getMyProducts());\n }", "title": "" }, { "docid": "b9c0ecbe0c0e60ef7a71f9d53e53af0c", "score": "0.6590792", "text": "public function getSize()\n\t{\n\t\treturn $this->data['size'];\n\t}", "title": "" }, { "docid": "94e47989731bb1858aed7c4dafb3e7f6", "score": "0.6587852", "text": "function get_table_sizes()\n {\n global $wpdb;\n\n static $return;\n\n if (!empty($return)) {\n return $return;\n }\n\n $return = array();\n\n $sql = $wpdb->prepare(\n \"SELECT TABLE_NAME AS 'table',\n\t\t\tROUND( ( data_length + index_length ) / 1024, 0 ) AS 'size'\n\t\t\tFROM INFORMATION_SCHEMA.TABLES\n\t\t\tWHERE table_schema = %s\n\t\t\tAND table_type = %s\n\t\t\tORDER BY TABLE_NAME\",\n DB_NAME,\n 'BASE TABLE'\n );\n\n $results = $wpdb->get_results($sql, ARRAY_A);\n\n if (!empty($results)) {\n foreach ($results as $result) {\n if ($this->get_legacy_alter_table_name() == $result['table']) {\n continue;\n }\n $return[$result['table']] = $result['size'];\n }\n }\n\n // \"regular\" is passed to the filter as the scope for backwards compatibility (a possible but never used scope was \"temp\").\n return apply_filters('wpmdb_table_sizes', $return, 'regular');\n }", "title": "" }, { "docid": "78914abc752ef07b78405fcfc27b9f83", "score": "0.6586279", "text": "public function getMaxRows() {\n return $this->maxRows;\n }", "title": "" }, { "docid": "1f24d43bace77c1ab44a31dc365790d6", "score": "0.6572404", "text": "abstract public function getDataSize(): int;", "title": "" }, { "docid": "bb707427d92c549b705bd6ae73ca0752", "score": "0.6571443", "text": "public function getSize();", "title": "" }, { "docid": "bb707427d92c549b705bd6ae73ca0752", "score": "0.6571443", "text": "public function getSize();", "title": "" }, { "docid": "bb707427d92c549b705bd6ae73ca0752", "score": "0.6571443", "text": "public function getSize();", "title": "" }, { "docid": "bb707427d92c549b705bd6ae73ca0752", "score": "0.6571443", "text": "public function getSize();", "title": "" }, { "docid": "bb707427d92c549b705bd6ae73ca0752", "score": "0.6571443", "text": "public function getSize();", "title": "" }, { "docid": "bb707427d92c549b705bd6ae73ca0752", "score": "0.6571443", "text": "public function getSize();", "title": "" }, { "docid": "bb707427d92c549b705bd6ae73ca0752", "score": "0.6571443", "text": "public function getSize();", "title": "" }, { "docid": "bb707427d92c549b705bd6ae73ca0752", "score": "0.6571443", "text": "public function getSize();", "title": "" }, { "docid": "bb707427d92c549b705bd6ae73ca0752", "score": "0.6571443", "text": "public function getSize();", "title": "" }, { "docid": "bb707427d92c549b705bd6ae73ca0752", "score": "0.6571443", "text": "public function getSize();", "title": "" }, { "docid": "bb707427d92c549b705bd6ae73ca0752", "score": "0.6571443", "text": "public function getSize();", "title": "" }, { "docid": "4882df82b4de4a473c6a7ff7cdeef305", "score": "0.65592444", "text": "public function itemCount() : int {\n \treturn count($this->data);\n }", "title": "" }, { "docid": "449135973aaee3c16a707c0272e82fc8", "score": "0.65580505", "text": "public function getSize(): int\n {\n return $this->size;\n }", "title": "" }, { "docid": "449135973aaee3c16a707c0272e82fc8", "score": "0.65580505", "text": "public function getSize(): int\n {\n return $this->size;\n }", "title": "" }, { "docid": "449135973aaee3c16a707c0272e82fc8", "score": "0.65580505", "text": "public function getSize(): int\n {\n return $this->size;\n }", "title": "" }, { "docid": "449135973aaee3c16a707c0272e82fc8", "score": "0.65580505", "text": "public function getSize(): int\n {\n return $this->size;\n }", "title": "" }, { "docid": "d060557880c372157701fea4d440f1a5", "score": "0.65538615", "text": "public function dbsize() {\n \treturn (int) $this->fetchOne('dbsize', array(), 0);\n }", "title": "" }, { "docid": "582eabaecd52caec7e980d45d1943765", "score": "0.65499467", "text": "public function getSize() {\n global $_DB;\n \n $rs = $_DB->query(\"SELECT COUNT(*) AS queue_size FROM #__queue WHERE STATUS='\".Q_STATUS_INQUEUE.\"'\");\n if ($rec = $rs->fetch_array()) {\n return $rec['queue_size'];\n } else {\n return 0;\n }\n }", "title": "" }, { "docid": "24ab6406e7d7aaa17edc223fc8004988", "score": "0.6547923", "text": "public function getSize(): int\n {\n return $this->_size;\n }", "title": "" }, { "docid": "67f941880bf98bb5079b8acd66d30e3d", "score": "0.6546146", "text": "public function size():int;", "title": "" }, { "docid": "001e6a4bd8f0db0187d75526aca5ce61", "score": "0.65353715", "text": "function size()\r\n\t{\r\n\t\treturn $this->model->size();\r\n\t}", "title": "" }, { "docid": "b3aef0f10640d618c9a81b57b3681f38", "score": "0.6532321", "text": "public function getSize()\n {\n if (!isset($this->count)) {\n $entityManager = $this->getServiceLocator()->get('Doctrine\\ORM\\EntityManager');\n $sql = \"SELECT COUNT(o) FROM $this->entityName o \";\n if (!empty($this->parentId) && !empty($this->parentCode)) {\n $sql .= \"WHERE o.$this->parentCode = $this->parentId \";\n }\n \n $this->count = $entityManager\n ->createQuery($sql)\n ->getSingleScalarResult();\n }\n\n return $this->count;\n }", "title": "" }, { "docid": "2c379c644f83f10ca9a92efb6f41cc6f", "score": "0.65270936", "text": "public static function getSize();", "title": "" }, { "docid": "db9fa37aef78e75a8e1d7964eb2196c0", "score": "0.6526883", "text": "public function get_num_records();", "title": "" }, { "docid": "e9e381cc546f3d58e921c5972c3035aa", "score": "0.65120035", "text": "public function size()\n {\n return $this->size;\n }", "title": "" }, { "docid": "cddca6a551834b50c686abf2f3fffce7", "score": "0.65109766", "text": "public function size() { \n return sizeof($this->_elements);\n }", "title": "" }, { "docid": "17d14bec4b84b22c092db570945d5a27", "score": "0.64871377", "text": "public function size()\n {\n return $this->list->size();\n }", "title": "" }, { "docid": "65b746ba0f62d660167313fa60596587", "score": "0.6486312", "text": "public function getsize(){}", "title": "" }, { "docid": "2c1817d4427fe5cbf40f001cf675bce1", "score": "0.6486257", "text": "public function getExpectedDatasetSize();", "title": "" }, { "docid": "6d072f983ce9279155c4bfabfffcba9d", "score": "0.6483041", "text": "public function getSize() {}", "title": "" }, { "docid": "d8df3cb15a769fbd1dd92c96bba1a663", "score": "0.6477152", "text": "public function size();", "title": "" }, { "docid": "d8df3cb15a769fbd1dd92c96bba1a663", "score": "0.6477152", "text": "public function size();", "title": "" }, { "docid": "d8df3cb15a769fbd1dd92c96bba1a663", "score": "0.6477152", "text": "public function size();", "title": "" }, { "docid": "6b4181ae1e8273e7f58267449a2bc952", "score": "0.6477128", "text": "public function size()\n {\n if($this->connection['driver'] == 'mysql'){\n return $this->sizeMySQL();\n }\n\n if($this->connection['driver'] == 'sqlite'){\n return $this->sizeSQLite();\n }\n }", "title": "" }, { "docid": "ce8edd774c96e8b343eb57b0250200f6", "score": "0.6476352", "text": "public function size() {\n return $this->_tuple->getSize();\n }", "title": "" }, { "docid": "1d967fdfdce37dd5d651fec0149f2d53", "score": "0.6476245", "text": "protected function getTableWidth()\n {\n return array_reduce(\n $this->columns,\n function($width, $col) { $width += $col->width; return $width; },\n 0\n );\n }", "title": "" }, { "docid": "8719ca2448a701691bff0ea96a231ceb", "score": "0.64732295", "text": "public function size()\n\t{\n\t\t//Return the size of the data array\n\t\treturn count($this->data);\n\t}", "title": "" }, { "docid": "41fe2020dbbb779baa467805da5aae79", "score": "0.6471021", "text": "public function size() {\n\t\t\n\t\t//Dhtechnologies_Ediconnectorbase_Model_Main::logDebug( \"typeIndex=\".var_export($this->typeIndex,true),10);\n\t\treturn count($this->typeIndex);\n\t}", "title": "" }, { "docid": "ce6b8a0f49e19e03d93bdeafb3ec8153", "score": "0.6461938", "text": "public function size() {\n return $this->size;\n }", "title": "" }, { "docid": "eb327deb4546444316b15ab66e423b96", "score": "0.64547056", "text": "public function getSize(){\n\t\t//echo \"GET SIZE\\n\";\n\t\t//print_r($this->tags);\n\t\treturn count($this->tags);\n\t}", "title": "" }, { "docid": "214e2860168c0b70c460cb22a97f04da", "score": "0.6449674", "text": "function documents_total_space() {\n\t$TABLE_ITEMPROPERTY = Database::get_course_table ( TABLE_ITEM_PROPERTY );\n\t$TABLE_DOCUMENT = Database::get_course_table ( TABLE_DOCUMENT );\n\t\n\t$sql = \"SELECT SUM(size)\n\tFROM \" . $TABLE_ITEMPROPERTY . \" AS props, \" . $TABLE_DOCUMENT . \" AS docs\n\tWHERE docs.id = props.ref\n\tAND props.tool = '\" . TOOL_DOCUMENT . \"'\n\tAND props.visibility <> 2\";\n\t\n\t$document_total_size = Database::get_scalar_value ( $sql );\n\t\n\treturn $document_total_size;\n}", "title": "" }, { "docid": "9cd810e83bf86247c994e4a4e63757e6", "score": "0.64495885", "text": "public function getSize () {}", "title": "" }, { "docid": "100e690515445ae42062664357163d7d", "score": "0.64434785", "text": "public function getSize()\n\t{\n\t\treturn $this->size;\n\t}", "title": "" }, { "docid": "cb2a2836ad79a788516f1ee9a545ab88", "score": "0.6442107", "text": "public function length() {\n\t\tif ( !$this->res ) {\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn $this->res->numRows();\n\t\t}\n\t}", "title": "" }, { "docid": "8583f7a3c5a33a7a7005dfca9e969f7b", "score": "0.64406323", "text": "public function getMaxItems() {\n\t\treturn $this->maxItems;\n\t}", "title": "" }, { "docid": "8a586df84a83d5be25f119159cf294cf", "score": "0.64293504", "text": "function getSize(): int\n {\n return $this->size;\n }", "title": "" }, { "docid": "7753589052dba8642f21d64791782a14", "score": "0.64289546", "text": "public function count(): int\n {\n return $this->size();\n }", "title": "" }, { "docid": "c0c4be3262726e26ffef286016349762", "score": "0.6418322", "text": "public function getMaxItems()\n {\n return $this->_maxItems;\n }", "title": "" }, { "docid": "dc4d77432c78ae7520a2f529783a3e33", "score": "0.64162076", "text": "public function size(): int\n {\n return count($this->array);\n }", "title": "" }, { "docid": "c794591c78473592b9587f703cb7fa7a", "score": "0.64100504", "text": "public function getSize()\n {\n return $this->get(self::RESULT_SIZE);\n }", "title": "" } ]
8ef242df6ad03ea33f54ee76ecc344c0
Bootstrap any application services.
[ { "docid": "28ace7656b4625d46db168bcf32447b1", "score": "0.0", "text": "public function boot()\n {\n// Schema::defaultStringLength(191);\n DriverManager::loadDriver(FacebookDriver::class);\n }", "title": "" } ]
[ { "docid": "eaf2e21f856d8ba833fe2b0f1b22e618", "score": "0.7835865", "text": "public function bootServices()\n {\n $this->loadCommandBus();\n $this->loadEventAdapter();\n }", "title": "" }, { "docid": "b761bee9acc0eb4a26ff4281066f2b08", "score": "0.7758765", "text": "public function bootServices()\n {\n foreach ($this->serviceProviders as $serviceProvider) {\n $serviceProvider->boot();\n }\n }", "title": "" }, { "docid": "b9c6b57c4a4af16f094fbbcb0566c6f5", "score": "0.76891965", "text": "protected function bootstrap() {\n\t\tforeach ( $this->get_services() as $service ) {\n\t\t\tif ( method_exists( $service, 'boot' ) ) {\n\t $service->boot();\n\t }\n\t\t}\n\t}", "title": "" }, { "docid": "5a722d65bbda26084d9599125302c614", "score": "0.7483636", "text": "public static function boot()\n {\n $services = config('providers');\n foreach ($services as $service) {\n call_user_func([$service, 'boot']);\n }\n }", "title": "" }, { "docid": "1f4d3ce823fe36392421e3246b6b95c1", "score": "0.7454962", "text": "public function boot()\n {\n array_walk($this->serviceProviders, function ($p) {\n $this->bootProvider($p);\n });\n }", "title": "" }, { "docid": "18aeebcf4ce066aef0b10de8b6bdc21f", "score": "0.7335113", "text": "public function boot()\n {\n $loader = $this->app->make('composer_loader');\n\n $list = File::directories(realpath(__DIR__.'/../../plugins'));\n\n foreach ($list as $dir) {\n $config = require $dir.'/candy.php';\n\n $namespace = 'GetCandy\\\\Plugins\\\\'.$config['namespace_suffix'].'\\\\';\n\n $loader->setPsr4($namespace, $dir.'/src/');\n\n $serviceProvider = $namespace.$config['service_provider'];\n\n $this->app->register($serviceProvider);\n }\n }", "title": "" }, { "docid": "374cec27322643427c092bb4c7fbf2e2", "score": "0.72734725", "text": "public function boot() {\n\n $this->handleConfigs();\n\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n\n }", "title": "" }, { "docid": "7e646dc7a80d72ec1699fa90df7accf3", "score": "0.7150985", "text": "public function boot() : void\n {\n $configLoader = new ConfigSettingsService($this->app->environment());\n $configLoader->load();\n }", "title": "" }, { "docid": "ed9f5ee6e7b27c9a781841e4e66ef134", "score": "0.70952195", "text": "public function boot() {\n\t\t$this->initConsoleApp();\n\t\t$this->initCommands();\n\t\t$this->runConsoleApp();\n\t}", "title": "" }, { "docid": "5d76afc2ee22659c2cbf0078019d466a", "score": "0.7081085", "text": "public function boot()\n {\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "5d76afc2ee22659c2cbf0078019d466a", "score": "0.7081085", "text": "public function boot()\n {\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "663fb2589400202b93132cf024dcb827", "score": "0.70635116", "text": "public function boot()\n {\n $this->bootstrap();\n $this->bootstrapConsole();\n }", "title": "" }, { "docid": "b82c6d981269f2e1111e3ab8c103c8f4", "score": "0.70489717", "text": "public function boot(): void\n {\n $this->bootFrontendEssentials();\n\n if (! $this->app->make(AdminEnvironment::class)->check(request())) {\n return;\n }\n\n /*\n * ------------------------------------\n * Boot required for admin\n * ------------------------------------\n */\n $this->bootChiefSquanto();\n $this->bootEvents();\n\n (new ViewServiceProvider($this->app))->boot();\n (new FormsServiceProvider($this->app))->boot();\n (new TableServiceProvider($this->app))->boot();\n (new AssetsServiceProvider($this->app))->boot();\n (new SquantoManagerServiceProvider($this->app))->boot();\n $this->sitemapServiceProvider->boot();\n\n // Sitemap command is used by both cli and web scripts\n $this->commands(['command.chief:sitemap']);\n $this->app->bind('command.chief:sitemap', GenerateSitemap::class);\n\n if ($this->app->runningInConsole()) {\n (new ConsoleServiceProvider($this->app))->boot();\n }\n }", "title": "" }, { "docid": "b118f5c1c453ea06a15fd54854e7d352", "score": "0.7017134", "text": "public function boot()\n {\n $this->loadJsonTranslationsFrom(DASHBOARD_PATH.'/resources/lang');\n $this->registerViews();\n $this->registerProviders();\n $this->registerConfig();\n $this->registerDatabase();\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "973fdf45aafb87fdfacaa05a40d7ab4a", "score": "0.7005313", "text": "public function boot()\n {\n // Event for when you create a new user\n Event::listen(\n UserVerifyEvent::class,\n [SendUserVerifyListener::class, 'handle']\n );\n\n // Load some commands\n if ($this->app->runningInConsole()) {\n $this->commands([\n Republish::class,\n Install::class,\n ]);\n }\n\n // Loading the middlewhere\n $this->app['router']->aliasMiddleware(\n 'boot_token',\n \\Mariojgt\\Firetakeaway\\Middleware\\BootTokenApi::class\n );\n\n // Load firetakeaway views\n $this->loadViewsFrom(__DIR__.'/views', 'firetakeaway');\n // Load firetakeaway routes\n $this->loadRoutesFrom(__DIR__.'/Routes/web.php');\n $this->loadRoutesFrom(__DIR__.'/Routes/auth.php');\n $this->loadRoutesFrom(__DIR__.'/Routes/api.php');\n // Load Migrations\n $this->loadMigrationsFrom(__DIR__.'/database/migrations');\n }", "title": "" }, { "docid": "a938aa369274ea76ffa3eafb09b288ed", "score": "0.69963557", "text": "public function boot()\n {\n // Default settings that we want to apply to all our projects\n Schema::defaultStringLength(191);\n Paginator::defaultView('pagination.uikit');\n\n //Routes\n $this->loadRoutesFrom(__DIR__ . '/../routes/web.php');\n\n $this->loadViewsFrom(__DIR__ . '/../resources/views', 'laravel-uikit');\n\n if (!$this->app->runningInConsole()) {\n return;\n }\n\n $this->commands([\n Console\\InstallCommand::class,\n ]);\n }", "title": "" }, { "docid": "a2a6f840ae8752aef01ab127725df8c8", "score": "0.69927543", "text": "public function boot()\n {\n if (! config('app.installed')) {\n return;\n }\n\n $this->registerEnabledProviders();\n $this->setupFacebook();\n $this->setupGoogle();\n }", "title": "" }, { "docid": "c5d194493e92605e301c49bdbb8cba27", "score": "0.69757956", "text": "public function boot()\n {\n //Publish the cfg\n $this->publishes([\n __DIR__ . '/config/laravel-service.php' => config_path('laravel-service.php')\n ]);\n //Setting up commands\n if ($this->app->runningInConsole()) {\n $this->commands([\n MakeService::class,\n ListService::class,\n EnableService::class,\n DisableService::class,\n UpdatePackage::class,\n GenerateServiceDocumentation::class\n ]);\n }\n }", "title": "" }, { "docid": "23c2ffc97113b94a65aa1d29e33d845f", "score": "0.6967439", "text": "public function boot()\n {\n // print_r($this->app['config']->get('services'));\n // 发布配置文件\n // 可以查看文档: https://xueyuanjun.com/post/19515.html#toc_2\n // $this->publishes([\n // dirname(__DIR__).'/BaiduTranslate/config.php' => config_path('baidu_translate.php'), // 要创建配置文件的文件\n // ], 'config');\n\n\n /**\n * Perform post-registration booting of services.\n * 如果扩展包包含路由,可以使用 loadRoutesFrom 方法加载它们\n * @return void\n */\n // $this->loadRoutesFrom(dirname(__DIR__).'/Routes/routeLang.php');\n\n\n //如果你的扩展包包含数据库迁移,可以使用 loadMigrationsFrom 方法告知 Laravel 如何加载它们。\n // loadMigrationsFrom 方法接收扩展包迁移的路径作为其唯一参数:\n // $this->loadMigrationsFrom(__DIR__.'/path/to/migrations');\n\n\n // 要在 Laravel 中注册扩展包视图,需要告诉 Laravel 视图在哪,可以使用服务提供者的 loadViewsFrom 方法\n // $this->loadViewsFrom(__DIR__.'/path/to/views', 'courier');\n\n\n // 注册扩展包的 Artisan 命令\n// if ($this->app->runningInConsole()) {\n// $this->commands([\n// JWTSecretGenerate::class,\n// ]);\n// }\n\n }", "title": "" }, { "docid": "ec37c74229c47d27099c47657c023b75", "score": "0.69612724", "text": "public function boot()\n {\n $this->app->bind(GeoCoordinatesApiService::class, function (): GeoCoordinatesApiService {\n return new GeoCoordinatesApiService(\n config('geocoder.key'),\n app()->make(Geocoder::class)\n );\n });\n\n $this->app->bind(UserRepositoryInterface::class, UserRepository::class);\n $this->app->bind(ClientRepositoryInterface::class, ClientRepository::class);\n }", "title": "" }, { "docid": "981117cbfb19cc94bce23fdea54a9c02", "score": "0.69570184", "text": "public function boot()\n {\n Schema::defaultStringLength(191);\n $this->app->bind(\n 'App\\Contracts\\v1\\AuthInterface',\n 'App\\Services\\v1\\AuthService'\n );\n $this->app->bind(\n 'App\\Contracts\\v1\\AdminInterface',\n 'App\\Services\\v1\\AdminService'\n );\n $this->app->bind(\n 'App\\Contracts\\v1\\EventInterface',\n 'App\\Services\\v1\\EventService'\n );\n $this->app->bind(\n 'App\\Contracts\\v1\\ReminderInterface',\n 'App\\Services\\v1\\ReminderService'\n );\n $this->app->bind(\n 'App\\Contracts\\v1\\EmailsInterface',\n 'App\\Services\\v1\\EmailsService'\n );\n $this->app->bind(\n 'App\\Contracts\\v1\\SettingInterface',\n 'App\\Services\\v1\\SettingService'\n );\n $this->app->bind(\n 'App\\Contracts\\v1\\CampaignsInterface',\n 'App\\Services\\v1\\CampaignsService'\n );\n }", "title": "" }, { "docid": "8ff3a37d8ea964a02d920c45f63bba1e", "score": "0.6955807", "text": "public function boot()\n {\n $this->setupConfig($this->app);\n }", "title": "" }, { "docid": "d81a76cf431610bb5627427ab0de6e1d", "score": "0.69363075", "text": "public function boot(): void\n {\n $this->setupConfig($this->app);\n }", "title": "" }, { "docid": "3214f2a0ee1a20a52156aa47471012ab", "score": "0.6933354", "text": "public function boot()\n {\n $this->strapViews();\n $this->strapMigrations();\n $this->strapCommands();\n $this->strapTranslations();\n $this->strapRoutes();\n\n $this->registerPolicies();\n }", "title": "" }, { "docid": "690ab6a9eddc82cece34018fa07bab75", "score": "0.69311684", "text": "public function boot()\n {\n $this->registerPolicies();\n\n $httpClient = new Client();\n $authAppBaseUrl = config('services.auth_app.base_url');\n $authAppService = new AuthAppService($httpClient, $authAppBaseUrl);\n $this->app->instance(AuthAppService::class, $authAppService);\n\n Auth::viaRequest('auth-app', function (Request $request) {\n /** @var AuthAppService $authAppService */\n $authAppService = resolve(AuthAppService::class);\n $tokenHeader = $request->header('Authorization');\n $tokenValue = preg_replace('/Bearer\\s+/', '', $tokenHeader);\n return $authAppService->getUserByAccessToken($tokenValue);\n });\n }", "title": "" }, { "docid": "28deabcb7d4043e0942f462b6d218444", "score": "0.6929805", "text": "public function boot()\n {\n $this->loadContainersInternalMiddlewares();\n }", "title": "" }, { "docid": "9ae290f3d8e6c908bcabe7278dadbc1b", "score": "0.69199294", "text": "public function boot()\n {\n $router = $this->app['router'];\n $router->pushMiddlewareToGroup('web', ServiceMiddleware::class);\n $this->loadRoutesFrom(__DIR__.'/../routes/web.php');\n $this->loadRoutesFrom(__DIR__.'/../routes/api.php');\n $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'service');\n\n $this->loadViewsFrom(__DIR__.'/../resources/views', 'service');\n\n\n $this->publishes([\n __DIR__.'/../public' => public_path('vendor/jmrashed'),\n ], 'jmrashed');\n $this->commands([\n MigrateStatusCommand::class,\n ]);\n }", "title": "" }, { "docid": "084f850c3f633035741db251f0ffb3a3", "score": "0.6912811", "text": "public function boot()\n\t{\n\t\t$this->package('asmoyo/core');\n\t\t$this->app->register('Intervention\\Image\\ImageServiceProvider');\n\n\t\t$this->registerConnection();\n\t\t$this->registerRepository();\n\t\t$this->registerAsmoyo();\n\t\t$this->errorHandler();\n\n\t\trequire_once __DIR__.'/../../filters.php';\n\t\trequire_once __DIR__.'/../../routes.php';\n\t}", "title": "" }, { "docid": "dae1083e643a5802172ecbd3b8af041e", "score": "0.6902526", "text": "public function boot()\n {\n $applicationFileName = with(new ReflectionClass('\\Anwendungen\\Applications\\ApplicationsServiceProvider'))->getFileName();\n $applicationPath = dirname($applicationFileName);\n\n $this->loadViewsFrom($applicationPath . '/../../resources/views', 'applications');\n\n include $applicationPath . '/../../routes/api.php';\n include $applicationPath . '/../../routes/web.php';\n }", "title": "" }, { "docid": "c7b4db2c11e2e4aad8d7dabf79b068d5", "score": "0.689316", "text": "public function boot(): void\n {\n if ($this->isBooted()) {\n return;\n }\n\n array_walk($this->serviceProviders, function (ServiceProvider $provider) {\n $this->bootProvider($provider);\n });\n\n $this->booted = true;\n }", "title": "" }, { "docid": "1451bef3935057cc91a4c58ec8733095", "score": "0.68843544", "text": "public function boot()\n {\n // Bootstrap code here.\n }", "title": "" }, { "docid": "1451bef3935057cc91a4c58ec8733095", "score": "0.68843544", "text": "public function boot()\n {\n // Bootstrap code here.\n }", "title": "" }, { "docid": "dc56400e14d71d74c7dbb862ac6a463c", "score": "0.68768096", "text": "public function boot()\n {\n $container = $this->getContainer();\n\n // Load route of application\n $container->get(FileSystem::class)->load('/routes/web.php');\n $container->get(FileSystem::class)->load('/routes/api.php');\n }", "title": "" }, { "docid": "80eaa87d6bcab6f40b70fbea345f926a", "score": "0.68754333", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->bootInConsole();\n }\n\n // Load pusher\n $this->loadPusher();\n\n // Load routes\n $this->loadRoutesFrom(__DIR__.'/routes/boilerplate.php');\n if (file_exists(base_path('routes/boilerplate.php'))) {\n $this->loadRoutesFrom(base_path('routes/boilerplate.php'));\n }\n\n // Load migrations, views and translations from current directory\n $this->loadMigrationsFrom(__DIR__.'/database/migrations');\n $this->loadViewsFrom(__DIR__.'/resources/views/components', 'boilerplate');\n $this->loadViewsFrom(__DIR__.'/resources/views', 'boilerplate');\n $this->loadJSONTranslationsFrom(__DIR__.'/resources/lang');\n $this->loadTranslationsFrom(__DIR__.'/resources/lang', 'boilerplate');\n\n // Add the impersonate middleware into the default web middleware group\n if (config('boilerplate.app.allowImpersonate', false)) {\n $this->router->pushMiddlewareToGroup('web', BoilerplateImpersonate::class);\n }\n\n // Load view composers\n $this->viewComposers();\n }", "title": "" }, { "docid": "ad23349e053d244387ad5ea0981c3654", "score": "0.6869926", "text": "public function boot()\n\t{\n\t\t//set default time to New York\n\t\tdate_default_timezone_set('America/New_York');\n\t\t\n\t\t//add forms support (TODO: check if support already available)\n\t\t$loader = AliasLoader::getInstance();\n\t\tif ($loader) {\n\t $loader->alias('Form', \\Collective\\Html\\FormFacade::class);\n \t$loader->alias('HTML', \\Collective\\Html\\HtmlFacade::class);\n\t\t}\n\t\tApp::register('Collective\\Html\\HtmlServiceProvider');\n\n\t\t//register middleware\n\t\t$router = $this->app['router'];\n\t\tif ($router) {\n\t\t\t$router->middleware('AppHTTPS', 'Belif\\Mobile\\Middleware\\HTTPSMiddleware');\n//\t\t\t$router->middleware('AppAuth', 'Soup\\Mobile\\Middleware\\AuthMiddleware');\t\n//\t\t\t$router->middleware('AppSignUp', 'Soup\\Mobile\\Middleware\\SignUpMiddleware');\n//\t\t\t$router->middleware('NewSignUp', 'Soup\\Mobile\\Middleware\\InquiryRegisteredMiddleware');\n\t\t\t$router->middleware('ProductAvailable', 'Belif\\Mobile\\Middleware\\AvailableMiddleware');\n\t\t\t$router->middleware('ProductRequired', 'Belif\\Mobile\\Middleware\\ProductMiddleware');\n\t\t\t$router->middleware('EmailRequired', 'Belif\\Mobile\\Middleware\\EmailMiddleware');\n\t\t\t$router->middleware('AppMobile', 'Belif\\Mobile\\Middleware\\MobileMiddleware');\n\t\t\t$router->middleware('AppDesktop', 'Belif\\Mobile\\Middleware\\DesktopMiddleware');\n\t\t}\n\n\t\t//include package routes\n\t\tinclude __DIR__.'/routes.php';\n\t\t\n\t\t//include package composers\n\t\tinclude __DIR__.'/composers.php';\n\t\t\n\t\t//include package helpers\n\t\tinclude __DIR__.'/helpers/CMSHelper.php';\n\t\tinclude __DIR__.'/helpers/DataHelper.php';\n\n\t\t//load views\n\t\t$this->loadViewsFrom(__DIR__.'/views', 'belif');\n\n\t\t//publish assets\n\t\t$this->publishes([\n\t\t __DIR__.'/../public' => public_path('belif/mobile'),\n\t\t], 'public');\n\n\t\t// force HTTPS (used because Nginx runs HTTP behind AWS portal)\n if (env('APP_ENV') != 'local') {\n\t\t \\URL::forceSchema('https');\n }\n\n\t}", "title": "" }, { "docid": "679596d7110f06eaa7dfb9b9c5bf9f67", "score": "0.68538994", "text": "public function boot()\n {\n $this->app->bind('App\\Services\\TeamService', function() {\n return new TeamService;\n });\n }", "title": "" }, { "docid": "a9551c60873b959df72705c886ee145b", "score": "0.68496245", "text": "public function boot()\n {\n $this->registerContainerBindings();\n\n // MariaDB compatibility\n Schema::defaultStringLength(191);\n\n // Register these service providers only on non-production envs\n if ($this->app->environment('local', 'testing', 'acceptance')) {\n $this->app->register(\\Sepehr\\BehatLaravelJs\\ServiceProvider::class);\n }\n }", "title": "" }, { "docid": "95bc038d52a676d55be285462de1d363", "score": "0.68424505", "text": "public function boot()\n {\n $this->loadViewsFrom(__DIR__.'/../resources/views', 'nova-installer');\n\n $this->app->booted(function () {\n $this->routes();\n });\n\n if ($this->app->runningInConsole()) {\n $this->commands([\n NovaPackageDiscoveryCommand::class,\n ]);\n\n $this->publishes([\n __DIR__.'/../config/config.php' => config_path('nova-installer.php'),\n ], 'config');\n }\n }", "title": "" }, { "docid": "6ad69d4c95a61516515bd342a97b7c85", "score": "0.684079", "text": "public function boot() {\n\n\t\tif ($this->app->runningInConsole()) {\n\t\t\t$this->commands([\n\t\t\t\t\\Electrik\\Console\\InstallCommand::class,\n\t\t\t\t\\Electrik\\Console\\MakeCommand::class,\n\t\t\t]);\n\t\t}\n\t}", "title": "" }, { "docid": "20d8cadc33e266e4f6f8d40885e1d352", "score": "0.6829763", "text": "private function bootstrap()\n {\n $this->bootstrapConfigs();\n\n $this->bootstrapMiddleware();\n\n $this->loadResources();\n\n $this->registerBladeDirectives();\n\n }", "title": "" }, { "docid": "ac0f67f830c49b58ced70da7eee56013", "score": "0.6829213", "text": "public function boot()\n {\n $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'jijoel');\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n\n $this->loadBladeConfigDirective();\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "c7c39fbd5c2d85d1ad57194d8e560bca", "score": "0.68247193", "text": "public function boot()\n {\n // Bootstrap code here.\n $this->app->when(JusibeChannel::class)\n ->needs(JusibeClient::class)\n ->give(function () {\n\n $jusibeConfig = config('services.jusibe');\n\n if(is_null($jusibeConfig)) {\n throw InvalidConfiguration::configurationNotSet();\n }\n\n return new JusibeClient(\n $jusibeConfig['key'],\n $jusibeConfig['token']\n );\n });\n }", "title": "" }, { "docid": "3b053054ebe7363fe446daef0faeb667", "score": "0.68204576", "text": "public function boot(): void\n {\n $this->loadTranslationsFrom($this->lang, 'ApiHelper');\n\n $this->app['router']->aliasMiddleware('ApiHelperRateLimiter', CustomRateLimiter::class);\n\n if ($this->app->runningInConsole()) {\n $this->publishes([\n $this->stubPath => resource_path('stubs/joy2362'),\n ], 'service-generator-stub');\n \n $this->publishes([\n $this->lang => $this->app->langPath('joy2362/service-generator'),\n ], 'service-generator-lang');\n }\n }", "title": "" }, { "docid": "bf335797bd12ac7bd69869fdf05a7fe3", "score": "0.6814658", "text": "public function boot()\n {\n $this->client = new HttpClient([\n 'base_uri' => 'https://api.ipdata.co/',\n 'query' => [\n 'api-key' => $this->config('key'),\n ],\n ]);\n }", "title": "" }, { "docid": "0ef38d564689845078fc7f057c2e74bf", "score": "0.6813649", "text": "public function boot()\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'morshadun');\n // $this->loadViewsFrom(__DIR__.'/../resources/views', 'morshadun');\n // $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n // $this->loadRoutesFrom(__DIR__.'/routes.php');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "417f12b102dd2d58b19394140307597b", "score": "0.6810656", "text": "public function boot()\n {\n $packageBaseDir = __DIR__ . '/../../';\n // load migrations\n $this->loadMigrationsFrom($packageBaseDir . 'database/migrations');\n // load routes\n $this->loadRoutesFrom($packageBaseDir . 'routes/api.php');\n\n // register commands and schedules\n if ($this->app->runningInConsole()) {\n $this->commands([\n CompleteDeposits::class,\n SendWithdrawals::class\n ]);\n\n $this->app->booted(function () {\n $schedule = $this->app->make(Schedule::class);\n $schedule->command('deposits:complete')->everyMinute();\n $schedule->command('withdrawals:send')->everyFiveMinutes();\n });\n }\n }", "title": "" }, { "docid": "6452287bebdfc527d887a0811fe4df80", "score": "0.6794344", "text": "public function boot()\n {\n Schema::defaultStringLength(191);\n\n // 如果在后台运行, 启动后台服务\n if (request()->is('admin*') || app()->runningInConsole()) {\n\n // 注册门面\n AliasLoader::getInstance()->alias('Admin', Admin::class);\n\n $this->app->register(AdminServiceProvider::class);\n }\n }", "title": "" }, { "docid": "5d41fdf8ee46a7fe059a165222bc8135", "score": "0.6794079", "text": "public function boot()\n {\n dd(\"Initing Greeting service\");\n }", "title": "" }, { "docid": "3656a14f697a3c3407d2130bdcdc9717", "score": "0.67924017", "text": "public function boot()\n {\n // main\n Blade::component(Hamburger::class, 'main-hamburger');\n Blade::component(Logo::class, 'main-logo');\n Blade::component(Header::class, 'main-header');\n Blade::component(LeftMenu::class, 'main-left-menu');\n Blade::component(RightMenu::class, 'main-right-menu');\n Blade::component(Footer::class, 'main-footer');\n\n // home\n Blade::component(QuickStart::class, 'home-quick-start');\n Blade::component(Procedure::class, 'home-procedure');\n Blade::component(About::class, 'home-about');\n Blade::component(Advantage::class, 'home-advantage');\n Blade::component(ActiveDevelopers::class, 'home-active-developers');\n Blade::component(TopDevelopers::class, 'home-top-developers');\n Blade::component(Tasks::class, 'home-tasks');\n Blade::component(Portfolio::class, 'home-portfolio');\n Blade::component(TopCategories::class, 'home-top-categories');\n Paginator::useBootstrap();\n\n }", "title": "" }, { "docid": "03072715c4d8b8d257a07a85de8100b5", "score": "0.67919844", "text": "public function boot()\n {\n $this->client = new HttpClient([\n 'base_uri' => 'https://api.2ip.ua/',\n /*\n 'query' => [\n 'some_option' => $this->config('some_option'),\n ],*/\n ]);\n }", "title": "" }, { "docid": "5c51fa61c7693ebc5d794dc99b931a68", "score": "0.678935", "text": "public function boot()\n {\n /**\n * @property \\MicroweberPackages\\Tax $tax_manager\n */\n $this->app->singleton('tax_manager', function ($app) {\n return new TaxManager();\n });\n\n $this->loadMigrationsFrom(__DIR__ . '/database/migrations/');\n\n $this->loadRoutesFrom((__DIR__) . '/routes/api.php');\n $this->loadRoutesFrom((__DIR__) . '/routes/web.php');\n }", "title": "" }, { "docid": "5c37fe8921963295ca54bd81803fd0e5", "score": "0.67772704", "text": "public function boot() {\n\t\t$this->app->resolve( Component::class )->boot();\n\t}", "title": "" }, { "docid": "cd35b656f1e953856055dab496689f83", "score": "0.6776648", "text": "public function boot(): void\n {\n $this->loadMigrationsFrom(__DIR__.'/../migrations');\n $this->loadRoutesFrom(__DIR__.'/../routes/web.php');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "e51f3f6962eb3d10832be100dbcc457f", "score": "0.6772497", "text": "public function boot()\n {\n $this->app->singleton(RolesHelper::class);\n }", "title": "" }, { "docid": "9322e16c4850e25e81848c9457b7d0f5", "score": "0.6769552", "text": "public function boot()\n { \n $this->app->booted(function () {\n $this->routes();\n }); \n\n Nova::serving(function() {\n Nova::resources([\n SmsPanel::class\n ]);\n });\n }", "title": "" }, { "docid": "afd9b4c598dd7cf03d017530a97d857c", "score": "0.6753913", "text": "public function boot() {\n\n /*\n * Services we need for admin\n */\n $this->app['view']->composer([\n 'layouts.template.admin.default',\n 'layouts.template.admin.page-with-aside']\n ,Composers\\AddAdminUser::class);\n $this->app['view']->composer('layouts.upload', Composers\\AddAdminUser::class);\n\n /*\n * Services we need for FrontEnd\n */\n\n $this->app['view']->composer('layouts.template.frontend.default', Composers\\InjectPages::class);\n\n /*\n * Theme View finder service\n */\n $this->app['view']->setFinder($this->app['theme.finder']);\n }", "title": "" }, { "docid": "4ff97677e61f11349b55f3bd61247c27", "score": "0.67494", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__.'/../config/api-vendors.php' => config_path('api-vendors.php'),\n ], 'config');\n\n $this->commands([\n ApiVendorMakeCommand::class,\n ]);\n }\n\n }", "title": "" }, { "docid": "9e3fc11e04f7de6fc85e4d6af0b039bb", "score": "0.67369443", "text": "public function boot()\n {\n Framework::laravel();\n app(Factory::class)->load(__DIR__ . '/factories');\n }", "title": "" }, { "docid": "44b6d399481468a53330e1bf9a7c91d4", "score": "0.67271423", "text": "public function boot()\n {\n app()->booted(function () {\n $this->booted();\n });\n }", "title": "" }, { "docid": "44b6d399481468a53330e1bf9a7c91d4", "score": "0.67271423", "text": "public function boot()\n {\n app()->booted(function () {\n $this->booted();\n });\n }", "title": "" }, { "docid": "44b6d399481468a53330e1bf9a7c91d4", "score": "0.67271423", "text": "public function boot()\n {\n app()->booted(function () {\n $this->booted();\n });\n }", "title": "" }, { "docid": "5205febcf261d910caa87ebadb02bd72", "score": "0.6714531", "text": "public function boot()\n {\n $this->loadTranslationsFrom(module_path('sports', 'Resources/Lang', 'app'), 'sports');\n $this->loadViewsFrom(module_path('sports', 'Resources/Views', 'app'), 'sports');\n $this->loadMigrationsFrom(module_path('sports', 'Database/Migrations', 'app'), 'sports');\n $this->loadConfigsFrom(module_path('sports', 'Config', 'app'));\n $this->loadFactoriesFrom(module_path('sports', 'Database/Factories', 'app'));\n }", "title": "" }, { "docid": "204f47da7d67f353a2fce1dfee9b05a1", "score": "0.6711476", "text": "public function boot()\n {\n\n $this->app->translate_manager->addTranslateProvider(TranslateOption::class);\n\n $aliasLoader = AliasLoader::getInstance();\n $aliasLoader->alias('Option', OptionFacade::class);\n\n $this->loadRoutesFrom(dirname(__DIR__) . '/routes/api.php');\n\n }", "title": "" }, { "docid": "668144f874f4974974f67c82d3986f1c", "score": "0.6704716", "text": "public function boot()\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'ihjordanov');\n\t $this->loadMigrationsFrom(__DIR__.'/Database/migrations');\n\t $this->loadRoutesFrom(__DIR__.'/routes/web.php');\n\t $this->loadViewsFrom(__DIR__.'/resources/views', 'contactform');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "cdfbc08253af7a88551d9060b7ecd427", "score": "0.6704272", "text": "public function boot()\n {\n $this->loadViewsFrom(__DIR__ . '/../resources/views', 'tanwencms');\n\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__ . '/../resources/assets' => public_path('vendor/laravel-ecommerce'),\n //__DIR__ . '/../resources/lang' => resource_path('lang'),\n __DIR__ . '/../database/migrations' => database_path('migrations'),\n ]);\n\n $this->commands([\n InstallCommand::class,\n BootPermissionsCommand::class\n ]);\n }\n\n //AppBootstrap::boot();\n\n //AdminBootstrap::boot();\n }", "title": "" }, { "docid": "193af5fb48cf57c21c2ec7203d32108d", "score": "0.6696647", "text": "public function boot()\n {\n // Configs\n $this->publishes([\n __DIR__.'/../config/anti-spam.php' => config_path('anti-spam.php'),\n ], 'configs');\n\n // Migrations\n $this->publishes([\n __DIR__ . '/../database/migrations' => base_path('database/migrations')\n ], 'migrations');\n\n // Services\n $this->app->bind(SpamServiceInterface::class, AkismetSpamService::class);\n $this->app->singleton(SpamServiceInterface::class, function ($app) {\n return new AkismetSpamService(new \\GuzzleHttp\\Client);\n });\n }", "title": "" }, { "docid": "d8420c5fbdbb2304230a90ec7ca2ad5c", "score": "0.66882426", "text": "public function boot(): void\n {\n $this->bootConsoleCommands();\n\n $this->bootPublishConfig();\n\n $this->bootAutoDiscoverActions();\n }", "title": "" }, { "docid": "ddb9e1a91a44c5f3a5274f026585dd3e", "score": "0.6686095", "text": "public function boot() {\n\t\t\t\n\t\t\t$this->app->singleton(\n\t\t\t Geolocation::class, function () {\n\t\t\t\t\n\t\t\t\treturn new Geolocation(config('project.tomtom_api_key'));\n\t\t\t});\n\t\t\t\n\t\t\t$this->app->singleton(\n\t\t\t TokenUtil::class, function () {\n\t\t\t\t\n\t\t\t\treturn new TokenUtil(config('project.token_key'));\n\t\t\t});\n\t\t\t\n\t\t\t$this->app->singleton(\n\t\t\t BraintreeGateway::class, function () {\n\t\t\t\t\n\t\t\t\treturn new BraintreeGateway(config('project.braintree'));\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "8c1521775b9fa91d09d9ce4ddef2c056", "score": "0.66833824", "text": "public function boot()\n {\n $this->setupConfigs();\n $this->setupFacades();\n $this->setupMigrations(); \n }", "title": "" }, { "docid": "c842be6467963aa652df6cf8d2bd141e", "score": "0.66832143", "text": "public function boot()\n {\n $this->configurePublishing();\n $this->configureRoutes();\n $this->configureResources();\n $this->passwordLessWebauthn();\n }", "title": "" }, { "docid": "01cf91796bf7d86894702a96b5d2fd73", "score": "0.6681657", "text": "public function boot()\n {\n\n if(!is_file(base_path('.env'))) {\n copy(base_path('.env.example'), base_path('.env'));\n }\n $this->genKey();\n if(!is_file(database_path('app.sqlite'))) {\n // first time setup\n touch(database_path('app.sqlite'));\n Artisan::call('migrate', array('--path' => 'database/migrations', '--force' => true, '--seed' => true));\n //Cache\n //Artisan::call('config:cache');\n //Artisan::call('route:cache');\n }\n if(is_file(database_path('app.sqlite'))) {\n if(Schema::hasTable('settings')) {\n\n // check version to see if an upgrade is needed\n $db_version = Setting::_fetch('version');\n $app_version = config('app.version');\n if(version_compare($app_version, $db_version) == 1) { // app is higher than db, so need to run migrations etc\n Artisan::call('migrate', array('--path' => 'database/migrations', '--force' => true, '--seed' => true)); \n }\n\n } else {\n Artisan::call('migrate', array('--path' => 'database/migrations', '--force' => true, '--seed' => true)); \n }\n\n }\n\n if(!is_file(public_path('storage/.gitignore'))) {\n Artisan::call('storage:link');\n \\Session::put('current_user', null);\n }\n \n $applications = Application::all();\n if($applications->count() <= 0) {\n if (class_exists('ZipArchive')) {\n ProcessApps::dispatch();\n } else {\n die(\"You are missing php-zip\");\n }\n \n }\n\n // User specific settings need to go here as session isn't available at this point in the app\n view()->composer('*', function ($view) \n {\n\n if(isset($_SERVER['HTTP_AUTHORIZATION']) && !empty($_SERVER['HTTP_AUTHORIZATION'])) {\n list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = \n explode(':', base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6)));\n }\n if(!\\Auth::check()) {\n if(isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])\n && !empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW'])) {\n $credentials = ['username' => $_SERVER['PHP_AUTH_USER'], 'password' => $_SERVER['PHP_AUTH_PW']];\n \n if (\\Auth::attempt($credentials, true)) {\n // Authentication passed...\n $user = \\Auth::user();\n //\\Session::put('current_user', $user);\n session(['current_user' => $user]); \n }\n }\n elseif(isset($_SERVER['REMOTE_USER']) && !empty($_SERVER['REMOTE_USER'])) {\n $user = User::where('username', $_SERVER['REMOTE_USER'])->first();\n if ($user) {\n \\Auth::login($user, true);\n session(['current_user' => $user]);\n }\n }\n }\n\n\n $alt_bg = '';\n if($bg_image = Setting::fetch('background_image')) {\n $alt_bg = ' style=\"background-image: url(storage/'.$bg_image.')\"';\n }\n $lang = Setting::fetch('language');\n \\App::setLocale($lang);\n\n $allusers = User::all();\n $current_user = User::currentUser();\n\n $view->with('alt_bg', $alt_bg ); \n $view->with('allusers', $allusers ); \n $view->with('current_user', $current_user ); \n\n \n \n \n }); \n\n $this->app['view']->addNamespace('SupportedApps', app_path('SupportedApps'));\n\n\n if (env('FORCE_HTTPS') === true) {\n \\URL::forceScheme('https');\n }\n\n if(env('APP_URL') != 'http://localhost') {\n \\URL::forceRootUrl(env('APP_URL'));\n }\n\n }", "title": "" }, { "docid": "ffd64a8f410688fccd0030123255cbc0", "score": "0.66816163", "text": "public function boot()\n {\n $this->packagePublish();\n $this->observers();\n $this->macros();\n $this->viewComp();\n $this->command();\n $this->app['simplemenu'];\n }", "title": "" }, { "docid": "23f3959e887270dc3ea75522c7da7931", "score": "0.66790426", "text": "public function boot()\n {\n $this->publishTests();\n $this->publishMigrations();\n\n $this->app->booted(function () {\n $this->defineRoutes();\n });\n }", "title": "" }, { "docid": "bc26486e4d14a707eb221681af4e6564", "score": "0.66745174", "text": "public function boot(): void\n {\n $this->loadViews();\n $this->loadTranslations();\n\n if ($this->app->runningInConsole()) {\n $this->publishMultipleConfig();\n $this->publishViews();\n $this->publishTranslations();\n $this->publishAssets();\n }\n }", "title": "" }, { "docid": "605911944be1f19e942d496d27550729", "score": "0.6672465", "text": "public function boot(Application $app)\n {\n\n }", "title": "" }, { "docid": "605911944be1f19e942d496d27550729", "score": "0.6672465", "text": "public function boot(Application $app)\n {\n\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" } ]
4d9bbbf3cba6fa1bb4cdc7717913bd37
Determine if the user is authorized to make this request.
[ { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.0", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" } ]
[ { "docid": "adc35a96694d73041eb8bde60a1a3a34", "score": "0.8355789", "text": "public function authorize()\n {\n // Only authenticated user can make this request\n if (Auth()->check())\n {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "ab304c783faee46f4bfcd668aef382ed", "score": "0.8316764", "text": "public function authorize()\n {\n return !empty($this->user());\n }", "title": "" }, { "docid": "972861a0767f1651ba9390269d0bed4c", "score": "0.8298197", "text": "public function authorize()\n {\n return $this->user() ? true : false;\n }", "title": "" }, { "docid": "9fb39029db943b6c00f8b0416336e051", "score": "0.82641774", "text": "public function authorize()\n {\n return $this->session()->has('user');\n }", "title": "" }, { "docid": "fcfb63ecb1a251cccb15666df80b13c7", "score": "0.8224853", "text": "public function authorize(): bool\n {\n return $this->user() ? false : true;\n }", "title": "" }, { "docid": "cd58cb21236055146d0631c695bd675c", "score": "0.81994826", "text": "public function authorize()\n {\n $currentUser = Auth::user();\n if ($currentUser) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "f89dd901910229737db0bf93ff8f3931", "score": "0.8176987", "text": "public function authorize()\n {\n /** @TODO Add some logic if we had an logged in user */\n return true;\n }", "title": "" }, { "docid": "fe7942fa38f8651aa4b7129b29dd1d1e", "score": "0.8078659", "text": "public function isAuthorized()\n {\n $url = Wasabi::getCurrentUrlArray();\n return $this->Guardian->hasAccess($url);\n }", "title": "" }, { "docid": "d4ee9d74fbc4689718f3bfffd469b17f", "score": "0.8077387", "text": "public function authorize(): bool\n {\n return $this->isAuthenticated();\n }", "title": "" }, { "docid": "ee7af7835fdae0f354ca4a681cfddbe7", "score": "0.8070438", "text": "public function isAuthorized();", "title": "" }, { "docid": "ee7af7835fdae0f354ca4a681cfddbe7", "score": "0.8070438", "text": "public function isAuthorized();", "title": "" }, { "docid": "0100c2aada1683446958e4e76f2103ba", "score": "0.80562174", "text": "public function authorize()\n {\n // We could add logic to see if the user is authorized here,\n // but we'll just return true for now.\n return true;\n }", "title": "" }, { "docid": "9864a2910bcb5ac1bb00f01d27b3f5ea", "score": "0.80122817", "text": "public function authorize()\n {\n return $this->user()->isTutor() || $this->user()->isManager();\n }", "title": "" }, { "docid": "a8c8c09cb968c49f7f1cede8d97b58f3", "score": "0.8008559", "text": "protected function _isAuthorized() {\n /*\n * Grant SEARCH access with limited properties \n * to all authenticated users.\n */\n return $this->getAuthenticatedUserId() !== null;\n }", "title": "" }, { "docid": "1b6a3c96509c51728c18eb22ddc4ef07", "score": "0.80070806", "text": "public function authorize()\n {\n $resource = new Resource();\n\n # If this resource is not user restricted, then everyone is authorized\n if (!$resource->userRestricted) {\n return true;\n }\n\n # If they're not logged in, they can't be authorized\n if (!$this->user()) {\n return false;\n }\n\n # If the request includes an id, we need to find that resource by id\n # and check that its user_id matches the id of the requesting user\n if (!is_null($this->route('id'))) {\n return $this->user()->id == $resource->find($this->route('id'))->user_id;\n }\n\n # If they passed all the above tests, we can assume they're authorized\n return true;\n\n # Note: If this function returns false, it will return a AccessDeniedHttpException which is\n # handled in /app/Exceptions/handler.php\n }", "title": "" }, { "docid": "11d00b1f48d4cc15f5c92d010a5f5e62", "score": "0.8005187", "text": "public function authorize()\n {\n return $this->user()->isVender() || $this->user()->isManager();\n }", "title": "" }, { "docid": "47f5f6ef32e8e61162898128dd80a95d", "score": "0.8002675", "text": "public function authorize()\n {\n\n $user = auth()->user();\n\n if ($user) {\n\n return $this->route('user') == $user->id || parent::authorize();\n\n }\n\n return parent::authorize();\n\n }", "title": "" }, { "docid": "c248f8ba22f6f83af27cac89bf60310a", "score": "0.79907674", "text": "public function authorize()\n {\n return !empty(Auth::user()) && ($this->user()->isAnAdmin() || $this->user()->hasRole('user'));\n }", "title": "" }, { "docid": "120024147e0d07455ff16dadfcf576c7", "score": "0.7983516", "text": "protected function _isAuthorized() {\n /*\n * Grant READ access to all authenticated users.\n */\n return $this->getAuthenticatedUserId() !== null;\n }", "title": "" }, { "docid": "41d5dece90c6add56f884abc5bf47f48", "score": "0.79750776", "text": "public function authorize()\n {\n if (auth()->user()) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "8e64a8c8c86463cae319675933f00c0b", "score": "0.7974814", "text": "public function authorize()\n {\n if ($this->hasHeader('Authorization')) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "be83a984de04d66702a6852553713052", "score": "0.796319", "text": "public function authorize()\n {\n if($this->user_id == auth()->id()){\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "7732e3ab483372b00fdc2cb4b472004f", "score": "0.7961244", "text": "public function authorize()\n {\n return $this->user()->isAuthorizeToDo('create_user'); // the current user has authorize to do this action // handle this request\n // the current user able to hanle apprequest or not\n // true or false\n }", "title": "" }, { "docid": "6765b354df3096a695bdb38aef959b4d", "score": "0.79444546", "text": "public function authorize()\n {\n return get_auth() ? true : false;\n }", "title": "" }, { "docid": "36f3c7906210d61365fe5a99291981d3", "score": "0.79402375", "text": "public function isAuthorised()\n {\n if ($this->_localHttpClient instanceof Zend_Oauth_Client) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "f0b1eaa4aa74e330af73093d56dc9f1f", "score": "0.79374945", "text": "public function authorize()\n {\n return $this->user()->isStudent() && $this->user()->id === (int) $this->route('user');\n }", "title": "" }, { "docid": "7bdaa7230c89721688f2760800097b82", "score": "0.7933899", "text": "public function isAuthorised()\n {\n if ($this->getHttpClient() instanceof Zend_Oauth_Client) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "68cbbf2a944e943c11bb4d48842aef74", "score": "0.7932432", "text": "public function authorize()\r\n {\r\n if (! isset(Auth::user()->id)) {\r\n return false;\r\n }\r\n return true;\r\n }", "title": "" }, { "docid": "f67047af10168c954e0461ccee092cd4", "score": "0.7917862", "text": "public static function isAuthorized(){\n //var_dump(self::$userId);\n if (self::get('loggedIn') == true && self::get('role') === 'admin' || self::get('role') === 'owner'){\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "4be5f6b4a02a2177fd6d661387728e07", "score": "0.7916705", "text": "public function authorize()\n\t{\n // id from the route\n $userId = $this->route('users');\n // our logged in user\n $loggedInUser = Auth::user();\n\n return $userId == $loggedInUser->id;\n\t}", "title": "" }, { "docid": "8f5796b47b92d878d279cc7ad0c1b777", "score": "0.7916447", "text": "public function authorize()\n {\n return $this->cashFlow->user_id === auth()->id();\n }", "title": "" }, { "docid": "8f5796b47b92d878d279cc7ad0c1b777", "score": "0.7916447", "text": "public function authorize()\n {\n return $this->cashFlow->user_id === auth()->id();\n }", "title": "" }, { "docid": "9b94895dc20d68381be023e36dfdb70f", "score": "0.79124725", "text": "public function authorize()\n {\n return $this->user() && ! $this->user()->hasApplied($this->route('listings'));\n }", "title": "" }, { "docid": "1f1b526c2e161bc81b6b3ad24fee4f98", "score": "0.79104656", "text": "public function authorize()\n {\n return request()\n ->session()\n ->has('api_credential');\n }", "title": "" }, { "docid": "03d0b522d18c554467cc1aa94c6a65e0", "score": "0.7906645", "text": "public function authorize()\n {\n if(auth()->check() && auth()->id() == $this->user()->id) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "6b66583b30d913681a3895039cb8f20a", "score": "0.78992593", "text": "public function authorize()\n {\n if($this->user->developer)\n return false;\n\n return true;\n }", "title": "" }, { "docid": "4ab1bd1c767498681666520521fbb793", "score": "0.7891409", "text": "public function authorize(): bool\n {\n return (bool) $this->authUser();\n }", "title": "" }, { "docid": "066d8bcbe1273ac6dd744df4e6ee84a3", "score": "0.78863513", "text": "public function authorize()\n {\n if (is_user_logged_in() and (is_super_admin() or is_user_admin())) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "4fac191b87dae973b42a1df4499533b7", "score": "0.7875656", "text": "public function authorize()\n {\n return (auth()->check()) ? true : false;\n }", "title": "" }, { "docid": "935a0da134c0bfa79ad09ddb3e7615c5", "score": "0.78689", "text": "public function authorize()\n {\n return request()->session()->has('api_credential');\n }", "title": "" }, { "docid": "814317e12ad9f7d9e7a1068d6f509c91", "score": "0.7868439", "text": "public function authorize() : bool\n {\n return auth()->user()->id == $this->user->id || auth()->user()->isAdmin();\n }", "title": "" }, { "docid": "8909924144c3d37ec8115d5b29ef2570", "score": "0.786283", "text": "public function authorize()\n {\n return $this->user() && $this->user()->isCustomer();\n }", "title": "" }, { "docid": "20970467e823cfff4065d1dc431760b1", "score": "0.78493035", "text": "public function authorize()\n {\n if (Auth::user()) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "b2b8f582e041149f60c47ca7061fa246", "score": "0.78396213", "text": "public function authorize()\n {\n return auth()->user()->is_admin || ($this->user->id === auth()->user()->id);\n }", "title": "" }, { "docid": "92f46160581d771397664abb7f5d01cf", "score": "0.78379375", "text": "public function authorize()\n {\n $user_id =$this->route('user');\n $owner = User::find($user_id);\n\n if (auth()->user()->isAdmin() || auth()->user()->can('user-edit') || $owner->id == auth()->user()->id) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "9d4f0991306ec577948f388945541900", "score": "0.78253984", "text": "public function authorize()\n\t{\n\t\treturn true; // noos dice si el usuario esta autorizado a hacer el request\n\t}", "title": "" }, { "docid": "b889ff5ec8686c51cf071f19989aabe4", "score": "0.78240913", "text": "public function authorize()\n {\n $user = User::first();\n if( $user->id === Auth::user()->id )\n {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "0c70ba9abaf5a7d99fb1bab041216404", "score": "0.7823623", "text": "public function authorize()\n\t{\n\t\tif ( $this->report != null ) {\n\t\t\treturn Auth::user()->isMyReport( $this->report );\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "d87b5a9aa779609bb2bb1cb740f1f074", "score": "0.77952063", "text": "public function isAuthorized()\n {\n $admin_id = $this->storage->getParam('id', 'admin_user');\n if (empty($admin_id)) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "e44b62f87dba8a7e1dfb82bc22a4649f", "score": "0.7791976", "text": "public function isAuthorized() {\n\t\treturn $this->authorized;\n\t}", "title": "" }, { "docid": "0bbf195050f52499df4cc42ff19df4c4", "score": "0.77875996", "text": "public function authorize()\n {\n if ($this->getMethod() == 'PUT') {\n return Auth::id() && $this->income_source->user_id == Auth::id();\n }\n\n return true;\n }", "title": "" }, { "docid": "65c29d91fac65e74497808631b6e4b85", "score": "0.77833813", "text": "public function authorize(): bool\n {\n return (\n $this->route('note')->public ||\n ($this->user('api') && $this->route('note')->author_id === $this->user('api')->id)\n );\n }", "title": "" }, { "docid": "0c5acd04242b11ada42962c187851765", "score": "0.77815884", "text": "public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }", "title": "" }, { "docid": "fb6ea203589d167b8037629a4573af29", "score": "0.7766291", "text": "public function is_authorizing() {\n\t\t\tif ( null !== $this->is_authorizing ) {\n\t\t\t\treturn $this->is_authorizing;\n\t\t\t}\n\n\t\t\t$this->is_authorizing = false;\n\n\t\t\tif ( isset(\n\t\t\t\t$_REQUEST['step'],\n\t\t\t\t$_REQUEST['auth_key'],\n\t\t\t\t$_REQUEST['auth_nonce'],\n\t\t\t\t$_REQUEST['oauth_token'],\n\t\t\t\t$_REQUEST['oauth_verifier']\n\t\t\t) && 'authorize' === $_REQUEST['step'] ) {\n\n\t\t\t\t$nonce_check = wp_verify_nonce( $_REQUEST['auth_nonce'], md5( __FILE__ ) );\n\t\t\t\t$key_check = $_REQUEST['auth_key'] === $this->key();\n\n\t\t\t\tif ( $key_check && $nonce_check ) {\n\t\t\t\t\t$this->do_authorization( $_REQUEST['oauth_token'], $_REQUEST['oauth_verifier'] );\n\t\t\t\t\t$this->is_authorizing = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $this->is_authorizing;\n\t\t}", "title": "" }, { "docid": "1714c85cf301a951e8eeb7b376185f51", "score": "0.7765456", "text": "public function authorize()\n {\n return $this->checkRoundBelongsToUser();\n }", "title": "" }, { "docid": "d3172913da6058cf33cec13a0e8db79d", "score": "0.7758293", "text": "public function authorize()\n {\n return $this->user['id'] == auth()->id() || auth()->user()->can('update-user');\n }", "title": "" }, { "docid": "6c54f18f4172a8a09209e06ec935ba40", "score": "0.77551585", "text": "public function isAuthorized() {\n\t\t// any registered user can access public functions\n\t\tif (empty($this->request->params['admin'])) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// only admins can access admin functions\n\t\tif (isset($this->request->params['admin'])) {\n\t\t\treturn $this->viewVars['admin'];\n\t\t}\n\n\t\t// default deny\n\t\treturn false;\n\t}", "title": "" }, { "docid": "5b4c01003b40c31053fde7580331e0fc", "score": "0.77388614", "text": "public function authorize()\n {\n if (Auth::user()) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "47467235771b3418ebafbb0bfb548200", "score": "0.77224797", "text": "public function authorize()\n {\n $accessor = $this->user();\n $user = $this->route('user');\n\n return ($accessor->isAdmin() || $accessor->hasKey('delete-users')) && \n $accessor->id !== $user->id;\n }", "title": "" }, { "docid": "977c162efbb9ce6cf5f45729c4416c11", "score": "0.7717961", "text": "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "title": "" }, { "docid": "9568f3ee06a6b53c99fe11769ee38a9d", "score": "0.7705229", "text": "public function authorize()\n\t{\n\t\treturn (\\Auth::user())?true:false;\n\t}", "title": "" }, { "docid": "426cda0d9d9abca5284b668b40ff14f9", "score": "0.7704101", "text": "public function is_authorized()\n {\n return $this->authorized;\n }", "title": "" }, { "docid": "b603c020266fe703daa11dd1efd17072", "score": "0.7696665", "text": "public function authorize(): bool\n {\n return $this->check([\n 'hasAccess',\n ]);\n }", "title": "" }, { "docid": "2caee8c98f9fa6b3d18f4c85acdc51be", "score": "0.7694095", "text": "public function authorize()\n {\n if ($this->user && $this->user->hasPermission('manage_collections') ) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "ac1054b1ef252fa9c56b539e2b62c04d", "score": "0.76873296", "text": "public function isAuthorized() {\n return true;\n }", "title": "" }, { "docid": "ce7615ada94d77903dcda219733e0101", "score": "0.76865685", "text": "function isAuthorized() {\n\t\tif (isset($this->params['admin']) && !$this->Auth->user('is_admin')) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "4b759a1ec836514ab70263a05b5e41fa", "score": "0.7685683", "text": "public function authorize()\n {\n return auth()->id() !== null;\n }", "title": "" }, { "docid": "afc806484ee5fb780a52f3cd7d044797", "score": "0.7678082", "text": "public function authorize()\n {\n return (!\\Auth::check()) ? false : true;\n }", "title": "" }, { "docid": "916dc1f5e13701950d9b9cb2d153aa2a", "score": "0.7667574", "text": "public function isAuthorized() {\n\t\treturn (static::$defaultOptions[\"token\"] != null);\n\t}", "title": "" }, { "docid": "23b0612316c813fda4cbcff3cf073e6b", "score": "0.76587313", "text": "public function authorize()\n {\n $user = $this->user();\n\n $attempt = strpos($this->url(), 'attempts/') !== false ? \n $this->route('attempt')->id :\n $this->input('attempt', null);\n\n\n return $user->isAdmin() || $user->hasKey('get-answers') || \n ($user->isEntrant() && $user->attempts->search(function ($item, $key) use ($attempt) {\n return $item->id == $attempt;\n }) !== false);\n }", "title": "" }, { "docid": "a94dfca9a2167a21f0a4cf1902aa9dfb", "score": "0.7653725", "text": "public function authorize(): bool\n {\n if ($thread = $this->route('thread')) {\n return $this->isAllowed('manage', $thread, false);\n }\n\n return $this->isAuthenticated();\n }", "title": "" }, { "docid": "dd8da692cd5fb39f910b4855915f1d56", "score": "0.765313", "text": "public static function authorized(): bool\n {\n return static::$authorized;\n }", "title": "" }, { "docid": "862f2d833e96dfe116cb39f2e073e367", "score": "0.76457196", "text": "function isAuthorized(){\n return $this->__permitted($this->name,$this->action);\n }", "title": "" }, { "docid": "53c5f0c4fa8207a234a9b417437c4cd4", "score": "0.7642205", "text": "public function authorize()\n {\n $user = (new UsersRepository(new User()))->findById($this->route()->parameter('customer_id'));\n if($user == null || !$user->isCustomer())\n return false;\n\n return ($this->user()->can('view','customers'));\n }", "title": "" }, { "docid": "18b8a928b66334f320dd82070f104153", "score": "0.7634513", "text": "public function authorize(): bool\n\t{\n\t\treturn Auth::check(); // logged only\n\t}", "title": "" }, { "docid": "9f3c670f61dc2e1072dc4435eac4ff2c", "score": "0.76288444", "text": "public function authorize()\n {\n $loggedUser = Auth::user();\n if ($loggedUser->isSuperAdmin()) return true;\n if ((int) $this->channel->owner === $loggedUser->id) return true;\n return false;\n }", "title": "" }, { "docid": "7a7033a893be15fc89a66ffd56455805", "score": "0.76231825", "text": "public function authorize()\n {\n if (auth()->user()->isUser() && $this->request->get(\"change-type\") == ChangeType::$JUST_DO_IT) {\n return true;\n } elseif (auth()->user()->isAdvancedUser()) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "389d185711adca20471037cf0fc0e191", "score": "0.76142395", "text": "public function isAuthorized() {\n }", "title": "" }, { "docid": "dac595333da84dfb8ae02f841a4b3dea", "score": "0.7612475", "text": "public function authorize()\n {\n return auth()->check() == true;\n }", "title": "" }, { "docid": "dac595333da84dfb8ae02f841a4b3dea", "score": "0.7612475", "text": "public function authorize()\n {\n return auth()->check() == true;\n }", "title": "" }, { "docid": "aba018d053857fe93f34999b2738beeb", "score": "0.76118004", "text": "public function authorize()\n {\n if(!Auth::user())\n {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "b91f8e26f317a5e8f22aa4795c9e583c", "score": "0.7610991", "text": "public function authorize()\n {\n $playlist = Playlist::find($this->playlist_id);\n\n return $playlist->user_id == $this->user()->id;\n }", "title": "" }, { "docid": "66e87070456441d5aa6c85033d0671f7", "score": "0.7603854", "text": "public function authorize()\n {\n // we don't need to worry about authorization since this request\n // is run through the web middleware\n return true;\n }", "title": "" }, { "docid": "415147c08656c83854f37d0a7222b5d2", "score": "0.7603785", "text": "public function authorize()\n {\n return AccessController::isWebmaster(LoginController::currentUser());\n }", "title": "" }, { "docid": "b53f2e6ba3e6ffffdbdacd2107d152ef", "score": "0.7596413", "text": "public function authorize()\n {\n try {\n $this->user = User::findOrFail(\n session('2fa:user:id')\n );\n } catch (Exception $exc) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "8042fff0ac7381554608b935ba0d67a6", "score": "0.75953287", "text": "public function authorize()\n {\n if (is_user_logged_in() and (is_super_admin() or is_user_admin())) {\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "0a87129281ac88bc52550592dc749e38", "score": "0.75936615", "text": "public function isAuthorized() {\n $userName = array_key_exists('PHP_AUTH_USER', $this->server) ? $this->server['PHP_AUTH_USER'] : '';\n $password = array_key_exists('PHP_AUTH_PW', $this->server) ? $this->server['PHP_AUTH_PW'] : '';\n\n // check if they correspond with stored username and pwd\n if ($userName == USG_USER && $password == USG_PASSWORD) {\n return TRUE;\n }\n else {\n // not authorized\n return FALSE;\n }\n }", "title": "" }, { "docid": "c0abf9af731de996600b5160897948da", "score": "0.75876194", "text": "public function authorize()\n {\n $user = Auth::user();\n $application = Application::find($this->route('application'));\n return $user->can('application-show') || $user->id == json_decode($application->data)->notifiable_id || $user->id == $application->notifiable_id;\n }", "title": "" }, { "docid": "9caaa3b963ad6ea8c5bda41afad0395e", "score": "0.75863177", "text": "public function authorize()\n {\n // the user must be verified\n $user = Request::user();\n\n // there must NOT be a grader for the user\n $grader = Grader::where('user_id', $user->id)->first();\n\n return $user && $user->verified && !$user->hasRole('grader_a');\n }", "title": "" }, { "docid": "dedd9095f571d210cdbaecbf89a29b33", "score": "0.75845", "text": "public function authorize()\n\t{\n\t\tif($this->auth->guest()) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "a981d993bb17cac28179f71252f3c701", "score": "0.75800586", "text": "public function authorize()\n {\n\n $id = $this->route('user');\n $user = User::findOrFail($id);\n if (Auth::User() && (Auth::User()->can('add_courses')) || compareObjects($user, Auth::User())) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "70479b1db281d5425742b8ae4d692f99", "score": "0.75707924", "text": "public function authorize()\n {\n if ($this->user && $this->user->hasPermission('manage_products') ) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "5c9958efdd33dc44bf7a575d6d7e8650", "score": "0.7569363", "text": "public function authorize()\n {\n $user = LoginController::currentUser();\n return AccessController::isMembership($user) || AccessController::isPledgeEducator($user);\n }", "title": "" }, { "docid": "d9bbceb0e04be12bdfdc0f84c97ff4be", "score": "0.755171", "text": "public function authorize()\n {\n // TODO: Check if has business\n return session()->has('id');\n }", "title": "" }, { "docid": "19d337a1c01d0f128707b4f21b7eeb25", "score": "0.7549949", "text": "public function authorize()\n {\n $user = \\Auth::user();\n if($user->hasRoles(['admin', 'super admin'])) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "e360f4ed1f4a9e30b9dfd178953ebc8b", "score": "0.754158", "text": "public function authorize()\n {\n // Honestly, this check is pointless.\n $project = $this->route('project');\n return $project && $this->user()->can('view', $project);\n }", "title": "" }, { "docid": "fbbab516209ed116dd71b2b3682a1051", "score": "0.75411296", "text": "public function authorize(): bool\n\t{\n\t\treturn auth()->check();\n\t}", "title": "" }, { "docid": "fb8784c2e2f0335c7944320710db40e3", "score": "0.7537616", "text": "public function authorize()\n {\n return $this->channel->user_id === auth()->user()->id;\n }", "title": "" }, { "docid": "3451bd5f2da3187ee767088eb263e611", "score": "0.7537061", "text": "public function authorize()\n {\n // @todo: check auth\n return true;\n }", "title": "" }, { "docid": "7279229781f9f3f8534cda9c5640a250", "score": "0.7532822", "text": "public function authorize() {\n $profile = $this->route('profiles');\n if(!is_null($user = \\Auth::user())) {\n return $user->is_admin || (!is_null($user->profile) && $user->profile->id == $profile);\n }\n return false;\n }", "title": "" }, { "docid": "2514777a1bbc235fd440b8816b9ba9bb", "score": "0.75278896", "text": "public function authorize()\n {\n // Auth is checked in the controller via auth middleware\n return true;\n }", "title": "" } ]
456b69eb66d822c721ed69aa34af5d4c
Constructor. Checks if the cURL extention is available. Sets values for `$this>upload_dir` and `$this>statistics`.
[ { "docid": "240ee7ee14a7fe8bd49dce74e570a7d6", "score": "0.7537318", "text": "public function __construct() {\n\n\t\t// abort if cURL extention is not available\n\t\tif ( ! extension_loaded( 'curl' ) || ! function_exists( 'curl_init' ) ) {\n\t\t\tWP_CLI::error( 'Please install/enable the cURL PHP extension.' );\n\t\t}\n\n\t\t// cache uploads directory path\n\t\t$this->upload_dir = wp_upload_dir()[ 'basedir' ];\n\n\t\t// setup `$this->statistics` values\n\t\tforeach ( array(\n\t\t\t'attachments', 'files', 'compared', 'changed', 'unknown', 'uploaded',\n\t\t\t'kraked', 'failed', 'samesize', 'size', 'saved' ) as $key\n\t\t) { $this->statistics[ $key ] = 0; }\n\n\t}", "title": "" } ]
[ { "docid": "4ede709e851f54cdd8664af5329f75f1", "score": "0.6611287", "text": "public function __construct()\n {\n\n $this->auth = null;\n\n // Check for cURL on server\n if (!is_callable('curl_init')) {\n throw new Exception(\"Error - PHP cURL extension is not enabled on the server. cURL is required by many of the methods in the mb-toolbox library.\");\n }\n\n $this->mbConfig = MB_Configuration::getInstance();\n $this->statHat = $this->mbConfig->getProperty('statHat');\n $this->mbToolboxcURL = new MB_Toolbox_cURL();\n }", "title": "" }, { "docid": "4dae9057cbbe81697af2af2ca2634ec0", "score": "0.6490586", "text": "public function __construct()\n {\n if (!function_exists('curl_init')) {\n new DPxError('Sorry cURL is not installed!');\n }\n\n // Create a new cURL resource handle\n $this->ch = curl_init();\n $this->setReturnType();\n $this->set(CURLOPT_FAILONERROR, true);\n }", "title": "" }, { "docid": "f35c423428436d0dd22e8d3ee2b703bf", "score": "0.6296234", "text": "public function __construct() {\r\n\t\t$this->curl = curl_init();\r\n\t}", "title": "" }, { "docid": "ce6f3d487df9211ee3ed7b10331d1050", "score": "0.6272895", "text": "public function __construct(){\n\t\tif(!function_exists(\"curl_init\"))\n\t\t\tthrow new Exception(\"cUrl has to be enabled!\");\n\t}", "title": "" }, { "docid": "507315f80fa0a63be2a771f6a41e0406", "score": "0.6219896", "text": "public function __construct()\n {\n if (!extension_loaded('curl')) {\n throw new Exception('cURL not loaded'); //@codeCoverageIgnore\n }\n $this->curl = curl_init();\n $this->setOption(CURLOPT_USERAGENT, self::USER_AGENT);\n $this->setOption(CURLOPT_HEADER, true);\n $this->setOption(CURLOPT_RETURNTRANSFER, true);\n }", "title": "" }, { "docid": "97aab53f086dc93cf798ca859c833e24", "score": "0.62059855", "text": "public function __construct ()\n {\n $this->_curl = curl_init();\n // Set some sensible defaults.\n curl_setopt_array($this->_curl, [\n CURLOPT_AUTOREFERER => true,\n CURLOPT_FOLLOWLOCATION => true,\n CURLOPT_MAXREDIRS => 5,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_HEADER => true,\n CURLINFO_HEADER_OUT => true,\n ]);\n }", "title": "" }, { "docid": "a3dfa2e2cb0c59042dfce44554144cf2", "score": "0.61300594", "text": "public function __construct()\n {\n $this->ch = curl_init();\n curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, TRUE);\n curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n }", "title": "" }, { "docid": "9b37f88c0bb8c2e613907c88027701cb", "score": "0.6125312", "text": "public function __construct()\n\t{\n\t\t$this->uploadUrl = null;\n\t\t$this->progressUrl = null;\n\t}", "title": "" }, { "docid": "4bd03c051e0e0a17c6fb946208a73508", "score": "0.61038697", "text": "protected function _construct()\n {\n $this\n ->setChunkSize($this->_getHelper()->getDataMaxSizeInBytes())\n ->setWithCredentials(false)\n ->setForceChunkSize(false)\n ->setQuery(\n [\n 'form_key' => Mage::getSingleton('core/session')->getFormKey()\n ]\n )\n ->setMethod(self::UPLOAD_TYPE)\n ->setAllowDuplicateUploads(true)\n ->setPrioritizeFirstAndLastChunk(false)\n ->setTestChunks(self::TEST_CHUNKS)\n ->setSpeedSmoothingFactor(self::SMOOTH_UPLOAD_FACTOR)\n ->setProgressCallbacksInterval(self::PROGRESS_CALLBACK_INTERVAL)\n ->setSuccessStatuses([200, 201, 202])\n ->setPermanentErrors([404, 415, 500, 501]);\n }", "title": "" }, { "docid": "a1b7a40b6600f6070391d8e2adcbd200", "score": "0.60763824", "text": "public function __construct()\r\n {\r\n $this->curl = curl_init();\r\n\r\n curl_setopt($this->curl, CURLOPT_FOLLOWLOCATION, true); //Follow redirects, if any\r\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($this->curl, CURLOPT_HEADER, false); //We don't need the header\r\n curl_setopt($this->curl, CURLOPT_ENCODING, \"\"); // Accept any encoding\r\n curl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER, false);\r\n }", "title": "" }, { "docid": "2f70848a0e7b136545b41a28a74dfba5", "score": "0.601055", "text": "public function __construct(){\n\t\tif(!in_array('curl',get_loaded_extensions())){\n\t\t\tthrow new Exception('É preciso instalar o cURL, veja em: http://curl.haxx.se/docs/install.html');\n\t\t}\n\n\t\t$settings = Config::get('twitter.auth');\n\n\t\tif(count(array_intersect_key(array_flip($this->settings),$settings))!=count($this->settings)){\n\t\t\tthrow new Exception('Tenha certeza que definiu corretamente os parâmetros');\n\t\t}\n\n\t\tforeach($settings AS $setting=> $value){\n\t\t\t$this->$setting = $value;\n\t\t}\n\t}", "title": "" }, { "docid": "51c5372c93897084910d703f5aec3510", "score": "0.5976761", "text": "private function __construct() {\n $this->curl = curl_init();\n\t\tcurl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_AUTOREFERER, true); // This make sure will follow redirects\n curl_setopt($this->curl, CURLOPT_FOLLOWLOCATION, true); // This too\n curl_setopt($this->curl, CURLOPT_HEADER, true); // THis verbose option for extracting the headers\n curl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST, 2);\n $this->baseURL = App42Config::getInstance()->getBaseURL();\n $this->customCodeURL = App42Config::getInstance()->getCustomCodeURL();\n }", "title": "" }, { "docid": "468dbc1a1152ef8f39f7ed71831c6117", "score": "0.5969237", "text": "public function __construct()\n\t{\n\t\t$this->headers = array();\n\n\t\t$this->options[CURLOPT_HEADERFUNCTION] = array($this, 'parseHeader');\n\t\t$this->options[CURLOPT_WRITEFUNCTION] = array($this, 'parseBody');\n\n\t\tif (!ini_get(\"open_basedir\")) {\n\t\t\t$this->options[CURLOPT_FOLLOWLOCATION] = true;\n\t\t} else {\n\t\t\t$this->followLocation = true;\n\t\t}\n\n\t\tif ($options = Net_Http::getOptions()) {\n\t\t\t$this->options = array_replace($this->options, $options);\n\t\t}\n\t}", "title": "" }, { "docid": "75c94639bdb2b46703cc2c880203819f", "score": "0.59448", "text": "function __construct($url = '') {\n\t\tif (! function_exists ( 'curl_init' )) {\n\t\t\ttrigger_error ( 'cURL Class - PHP was not built with --with-curl, rebuild PHP to use cURL.' );\n\t\t}\n\t\t\n\t\tif ($url)\n\t\t\t$this->create ( $url );\n\t}", "title": "" }, { "docid": "9a68b161d6a765c92caf912b6804bed6", "score": "0.59273213", "text": "public function __construct()\n {\n $this->doInitCurl();\n }", "title": "" }, { "docid": "ca878356cc03f196a1e31b9e2ef6b4fa", "score": "0.59261525", "text": "public function init()\n {\n if ($this->curl === null) {\n $this->curl = curl_init();\n }\n }", "title": "" }, { "docid": "47a2bec8424381c2becf5893c5786eae", "score": "0.5900108", "text": "public function __construct() {\r\n\t\t$this->initCURL();\r\n\t}", "title": "" }, { "docid": "375d0179e24789587097cb7c820bda47", "score": "0.5873291", "text": "public function initialize() {\n $this->ch = curl_init();\n }", "title": "" }, { "docid": "9aebd0363ee9d5114d6455c1cf7fd59f", "score": "0.5869772", "text": "public function __construct()\n {\n //Initializes a new cURL object\n $this->curl_handler = curl_init();\n //Set CURLOPT_USERAGENT to show that human access\n curl_setopt($this->curl_handler, CURLOPT_USERAGENT, 'C3P0');\n //Set CURLOPT_RETURNTRANSFER to ensure that cURL returns the result rather than display it\n curl_setopt($this->curl_handler, CURLOPT_RETURNTRANSFER, true);\n }", "title": "" }, { "docid": "6681b5ddecb09a7bbe1aeef2ebf8174b", "score": "0.58641493", "text": "function __construct(){\n $this->initializeCurl();\n }", "title": "" }, { "docid": "e7d5a5bf618d81b1b72073a65d5be667", "score": "0.5832507", "text": "public function __construct()\n\t{\n\t\tglobal $option, $mainframe, $allowedExtensions;\n\t\tglobal $target_path, $error, $errorcode, $errormsg, $clientupload_val, $s3bucket_video;\n\t\tparent::__construct();\n\n\t\t// Get global configuration\n\t\t$mainframe = JFactory::getApplication();\n\t\t$option = JRequest::getVar('option');\n\t\t$target_path = $error = '';\n\t\t$errorcode = 12;\n\t\t$clientupload_val = \"false\";\n\t\t$errormsg[0] = \" File Uploaded Successfully\";\n\t\t$errormsg[1] = \" Cancelled by user\";\n\t\t$errormsg[2] = \" Invalid File type specified\";\n\t\t$errormsg[3] = \" Your File Exceeds Server Limit size\";\n\t\t$errormsg[4] = \" Unknown Error Occured\";\n\t\t$errormsg[5] = \" The uploaded file exceeds the upload_max_filesize directive in php.ini\";\n\t\t$errormsg[6] = \" The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form\";\n\t\t$errormsg[7] = \" The uploaded file was only partially uploaded\";\n\t\t$errormsg[8] = \" No file was uploaded\";\n\t\t$errormsg[9] = \" Missing a temporary folder\";\n\t\t$errormsg[10] = \" Failed to write file to disk\";\n\t\t$errormsg[11] = \" File upload stopped by extension\";\n\t\t$errormsg[12] = \" Unknown upload error.\";\n\t\t$errormsg[13] = \" Please check post_max_size in php.ini settings\";\n\t}", "title": "" }, { "docid": "e4a71270822463bfbadfcb119b80a00a", "score": "0.5824589", "text": "function __construct($options = array())\n {\n $this->curlOptions = array_key_exists('curlOptions', $options) ? $options['curlOptions'] : array();\n\n $this->curlInfo = array();\n $this->curlErrNum = 0;\n $this->curlErrMsg = '';\n $this->callTime = 0;\n }", "title": "" }, { "docid": "dadc0e9e213089a9c25b0dead1150d65", "score": "0.5823312", "text": "public function _construct()\n /* initialize the object\n *\n */\n {\n \tif ($this->_has('cache')&&(@is_object($this->_tx->cache))) $this->_tx->cache->register_table('files_index');\n \t\n \t# publish variables\n \t$this->_tx->_publish('max_upload_size', $this->max_upload_size);\n \t$this->_tx->_publish('upload_root', $this->upload_root);\n \t\n \t# retrieve the system upload settings\n \t$post_max_size = ini_get('post_max_size');\n \t$upload_max_filesize = ini_get('upload_max_filesize');\n \t\n \t# set the max upload size\n \tif (intval($upload_max_filesize) < intval($post_max_size)) {\n \t\t$this->max_upload_size = $upload_max_filesize;\n \t} else {\n \t\t$this->max_upload_size = $post_max_size;\n \t}\n }", "title": "" }, { "docid": "478a45e73fab3c84e9ad84ad784413ff", "score": "0.58149236", "text": "public function __construct() {\n $this->curlDefaultParams = \\Config::get('uc.global.defaultCurlParams');\n }", "title": "" }, { "docid": "df9a6a9518a1cbf6b0282383c2df158b", "score": "0.5806491", "text": "public function __construct()\n {\n if (false == $this->master = curl_multi_init()) {\n throw new RuntimeException(\"Error initializing cURL\");\n }\n $this->options = array();\n }", "title": "" }, { "docid": "3e5d091bfab5c027c3ced1586b985b78", "score": "0.58026356", "text": "private function __construct() {\n\n\t\t$this->processBranch($_FILES, $this->files_by_name);\n\n\t}", "title": "" }, { "docid": "66e03d3541a24a9a0f4394971aedc45b", "score": "0.57722026", "text": "function __construct($dir = \"\", $extension = \"\", $max_size = 0, $allow_overwrite = false, $allow_rename = true)\r\n\t{\r\n\t\tparent::__construct();\r\n\t\t\r\n\t\t/*******\tSet the directory for upload\t*******/\r\n\r\n\t\t$this->dir_path = trim(_FILE_UPLOAD_DIR, \"/,\\, \").\"/\";\t//\tsets class variable with value from config\r\n\r\n\t\tif($dir != \"\")\r\n\t\t{\t//\t if a new directory has to be created in the uploaded path\r\n\t\t\t$dir = $this->dir_path.trim($dir,\"/,\\, \").\"/\";\r\n\r\n\t\t\tif(!file_exists($dir))\r\n\t\t\t{\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tif(!mkdir($dir, null, true))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->functions->setErrorMessage(\"Failed to create directory\");\r\n\t\t\t\t\t\t$this->block_upload = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcatch (Exception $e)\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->functions->setErrorMessage(\"Failed to create directory\");\r\n\t\t\t\t\t$this->block_upload = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(!is_dir($dir))\r\n\t\t\t{\t//\t if the created one or existing one is not a directory\r\n\t\t\t\t$this->functions->setErrorMessage(\"Failed to create directory\");\r\n\t\t\t\t$this->block_upload = true;\r\n\t\t\t}\r\n\r\n\t\t\t$this->dir_path = $dir;\r\n\t\t}\r\n\r\n\t\t/*******\tSet the extension list\t*******/\r\n\r\n\t\t$this->setFileExtensions();\t//\tsets the class variable with the values from config\r\n\r\n\t\tif($extension != \"\")\r\n\t\t{\r\n\t\t\tif(!$this->addFileExtension($extension))\r\n\t\t\t{\t//\tif extension addition fails\r\n\t\t\t\t$this->functions->setErrorMessage(\"The extension cannot be allowed to upload\");\r\n\t\t\t\t$this->block_upload = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/*******\tSet the max_file_upload_size\t*******/\r\n\t\tif($max_size != 0)\r\n\t\t\t$this->max_upload_size = $max_size;\r\n\t\telse\r\n\t\t\t$this->max_upload_size = _FILE_MAX_UPLOAD_SIZE;\r\n\r\n\t\t/*******\tSet whether the file can be overwritten\t*******/\r\n\t\t$this->allow_overwrite = $allow_overwrite;\r\n\r\n\t\t/*******\tSet whether the file can be renamed\t*******/\r\n\t\t$this->allow_rename = $allow_rename;\r\n\t}", "title": "" }, { "docid": "36c4f699cd9703984200bc593d683757", "score": "0.5769696", "text": "public function __construct(Upload $upload)\n {\n $this->upload = $upload;\n }", "title": "" }, { "docid": "570ed91b68927c7f698aa6e6fdb4ea75", "score": "0.5748245", "text": "public function __construct($test)\n {\n if (!function_exists('curl_version')) {\n throw new CurlRequestException('Curl extension is either not enabled or not installed');\n }\n\n parent::__construct($test);\n }", "title": "" }, { "docid": "35bd64ca324c62358a68dbf4c969b136", "score": "0.5728634", "text": "public function __construct()\n {\n $this->setColumnsMeta(array(\n 'accessFileSize'=> array('FSO'),\n ));\n\n $this->setMultiLangColumnsList(array(\n ));\n\n $this->setAvailableLangs(array('es', 'eu'));\n\n $this->setParentList(array(\n ));\n\n $this->setDependentList(array(\n ));\n\n\n\n\n $this->_defaultValues = array(\n 'uploadOn' => 'CURRENT_TIMESTAMP',\n );\n\n $this->_initFileObjects();\n parent::__construct();\n }", "title": "" }, { "docid": "8b6f7d709295dc55d03b884b9d86ac1b", "score": "0.57229704", "text": "public function __construct($options = array()) {\n\t\tif (ini_get ( 'file_uploads' ) == false) {\n\t\t\trequire_once 'Zend/File/Transfer/Exception.php';\n\t\t\tthrow new Zend_File_Transfer_Exception ( 'File uploads are not allowed in your php config!' );\n\t\t}\n\t\t\n\t\t$this->setOptions ( $options );\n\t\t$this->_prepareFiles ();\n\t\t$this->addValidator ( 'Upload', false, $this->_files );\n\t}", "title": "" }, { "docid": "85586b0ddb922fd252dc37be01048c61", "score": "0.5717643", "text": "public function __construct() {\r\n\r\n if(false === function_exists('curl_init')) {\r\n throw new BadMethodCallException(sprintf('Function \"curl_init\" should be loaded to use %s', __CLASS__));\r\n }\r\n\r\n parent :: __construct();\r\n }", "title": "" }, { "docid": "7cedc38684d3e9360760780604d6d4e7", "score": "0.56965256", "text": "public function __construct()\n {\n $this->curl = new Curl();\n }", "title": "" }, { "docid": "bd85e9e2b3375d201a688e454a38e08b", "score": "0.5686113", "text": "private function __construct()\n {\n $this->caller = new CurlCaller();\n\n if (!$this->caller->isAvailable()) {\n $this->caller = new FgcCaller();\n }\n }", "title": "" }, { "docid": "dbbb9ce612e052616a4e4161846c940d", "score": "0.5684889", "text": "public function __construct()\n\t{\n\t\t$this->curl = new Curl;\n\t}", "title": "" }, { "docid": "6c0ec93d0e9973025d7c35f2a7524ffa", "score": "0.5681329", "text": "private function curlInit() {\n\n $this->ch = curl_init();\n\n }", "title": "" }, { "docid": "be78e80d2ebb124a7ebed5f82398bbf1", "score": "0.5663705", "text": "public function __construct(Curl $curl)\n {\n $this->curl = $curl;\n }", "title": "" }, { "docid": "468dd5f05c79e1eb3826bf679a972c25", "score": "0.5657837", "text": "public function __construct($url)\n {\n $this->_handle = curl_init($url);\n }", "title": "" }, { "docid": "4af23e76836f98c2dca1bfb3fd0d34ac", "score": "0.56550455", "text": "function __construct()\n {\n $this->multiHandle = curl_multi_init();\n }", "title": "" }, { "docid": "e86203801e58a2d1f2f08d6f5f4f9abf", "score": "0.5636344", "text": "public function __construct(){\n parent:: __construct();\n\t\t$this->output->enable_profiler(TRUE);\n\t\t\n\t\t$this->load->library('upload');\n\t\t$this->load->helper(array('form', 'url','file'));\n }", "title": "" }, { "docid": "78fdbfd0ecf487bfb450a938845a6978", "score": "0.5626867", "text": "public final function __construct()\r\n\t{\r\n\t\t/*\r\n\t\t$this->setApplication(Application::getInstance());\r\n\t\t$this->setAllowedExtensions(array_map(\"strtolower\", $this->getApplication()->getConfig()->getImageUploaderAllowedExtensions()));\r\n\t\t$this->setSizeLimit((int) $this->getApplication()->getConfig()->getMaxUploadSizeLimitBytes());\r\n\t\t$this->setUploadDirectory($this->getApplication()->getConfig()->getUploadServerTempPath());\r\n\t\t$this->setUploadWebPath($this->getApplication()->getConfig()->getUploadTempPath());\r\n\t\t$this->setUploadFormInputName($this->getApplication()->getConfig()->getImageUploaderFormPostInputName());\r\n\t\t$this->setUploadFileMethod();\r\n\t\t$this->setErrors(array());\r\n\t\t*/\r\n\t\t$this->setErrors(array()); \r\n\t}", "title": "" }, { "docid": "6f586b372e75bcce93d8d2e551cef5bc", "score": "0.5621159", "text": "public function __construct()\n {\n $this->ch = curl_init();\n $this->uid = dechex(rand(0, 99999999));\n curl_setopt($this->ch, CURLOPT_COOKIEJAR, '/tmp/cluewikibot.cookies.' . $this->uid . '.dat');\n curl_setopt($this->ch, CURLOPT_COOKIEFILE, '/tmp/cluewikibot.cookies.' . $this->uid . '.dat');\n curl_setopt($this->ch, CURLOPT_MAXCONNECTS, 100);\n curl_setopt($this->ch, CURLOPT_USERAGENT, 'ClueBot/2.0');\n curl_setopt($this->ch, CURLOPT_ENCODING, '');\n curl_setopt($this->ch, CURLOPT_FORBID_REUSE, 1);\n curl_setopt($this->ch, CURLOPT_FRESH_CONNECT, 1);\n if (isset(Config::$proxyhost) and isset(Config::$proxyport) and\n (Config::$proxyport != null) and (Config::$proxyhost != null)\n ) {\n curl_setopt($this->ch, CURLOPT_PROXYTYPE, isset(Config::$proxytype) ? Config::$proxytype : CURLPROXY_HTTP);\n curl_setopt($this->ch, CURLOPT_PROXY, Config::$proxyhost);\n curl_setopt($this->ch, CURLOPT_PROXYPORT, Config::$proxyport);\n }\n $this->postfollowredirs = 0;\n $this->getfollowredirs = 1;\n }", "title": "" }, { "docid": "4292f850d98f220259c282b970219562", "score": "0.55934674", "text": "public function __construct()\n {\n if ($dh = opendir($this->localdir)) {\n while (($file = readdir($dh)) !== false) {\n if (pathinfo($file, PATHINFO_EXTENSION) === 'zip'\n || pathinfo($file, PATHINFO_EXTENSION) === 'gz'\n || pathinfo($file, PATHINFO_EXTENSION) === 'rar'\n ) {\n $this->zipfiles[] = $file;\n }\n }\n closedir($dh);\n\n if (!empty($this->zipfiles)) {\n $this->status = array('info' => '.zip or .gz or .rar files found, ready for extraction');\n } else {\n $this->status = array('info' => 'No .zip or .gz or rar files found. So only zipping functionality available.');\n }\n }\n }", "title": "" }, { "docid": "b278783738a54dbbbca77b2f960ebbce", "score": "0.5585765", "text": "public function __construct() {\n\n // WordPress's own filesystem class.\n global $wp_filesystem;\n\n // Create the upload directory if it doesn't exist.\n if ( !is_dir(VISUALBUDGET_UPLOAD_PATH) ) {\n $wp_filesystem->mkdir(VISUALBUDGET_UPLOAD_PATH);\n }\n\n // Create the trash directory if it doesn't exist.\n if ( !is_dir(VISUALBUDGET_UPLOAD_PATH . 'trash/') ) {\n $wp_filesystem->mkdir(VISUALBUDGET_UPLOAD_PATH . 'trash/');\n }\n\n // Create the settings directory if it doesn't exist.\n if ( !is_dir(VISUALBUDGET_UPLOAD_PATH . 'settings/') ) {\n $wp_filesystem->mkdir(VISUALBUDGET_UPLOAD_PATH . 'settings/');\n }\n\n // Create the aliases file if it doesn't exist.\n if ( !file_exists(VISUALBUDGET_ALIASES_PATH) ) {\n $wp_filesystem->put_contents(VISUALBUDGET_ALIASES_PATH, '{}');\n }\n\n // Create the config file if it doesn't exist.\n if ( !file_exists(VISUALBUDGET_CONFIG_PATH) ) {\n $wp_filesystem->put_contents(VISUALBUDGET_CONFIG_PATH, '{}');\n\n // Set defaults.\n $defaults = array(\n \"avg_tax_bill\" => 4500,\n \"default_tax_year\" => \"current\",\n \"fiscal_year_start\" => \"jul\"\n );\n\n $this->update_config($defaults);\n }\n }", "title": "" }, { "docid": "cb083ea3266db6dc71d318996e5431d1", "score": "0.55856526", "text": "public function __construct(){\r\n\r\n\t\t\tinclude_once '../config.php';\r\n\t\t\t//include_once \"../../site/lib/functions.php\";\r\n\t\t\t\r\n\t\t\t$this->storeId = $storeID;\r\n\t\t\t$this->userStatus = $userStatus;\r\n\t\t\t// $this->userStatus = \"SUBSCRIBED\";\r\n\t\t\t$this->promoId = $promo;\r\n\t\t\t$this->linkUrl = $linkUrl;\r\n\t\t\t$this->subParam = $subParam;\r\n\r\n\t\t\t$this->curlObj = new Curl\\Curl();\r\n\r\n\r\n\t\t}", "title": "" }, { "docid": "bad67d60ef68121c8b0b5b7532c31f9e", "score": "0.55780894", "text": "public function __construct(array $config = array(), $url = NULL)\n\t{\n\t\t// Merge supplied config with the default settings\n\t\t$config += Kohana::config('curl');\n\n\t\t// Assign config to this class\n\t\t$this->config = $config;\n\n\t\tif ( ! function_exists('curl_init'))\n\t\t\tthrow new Kohana_User_Exception(__CLASS__.'.'.__METHOD__.'()', 'Curl failed to initialise. '.$e->getMessage());\n\n\t\t// Init curl\n\t\t$this->connection = curl_init();\n\n\t\t// Assign options by relation\n\t\t$this->options = & $this->config['options'];\n\n\t\t// If there is a URL supplied, add it to the Curl options\n\t\tif ($url !== NULL)\n\t\t\t$this->options[CURLOPT_URL] = $url;\n\n\t\t// Set this executed to FALSE;\n\t\t$this->executed = FALSE;\n\n\t\t// Load Cache library instance if required\n\t\tif ($this->config['cache'])\n\t\t\t$this->cache = Cache::instance();\n\t}", "title": "" }, { "docid": "55744fd18ba6e770ad4e7fb57686c7e5", "score": "0.5576625", "text": "public function __construct() {\r\n\r\n\t\t// call parent constructor\r\n\t\tparent::__construct();\r\n\r\n\t\t// set defaults\r\n\t\t$params = JComponentHelper::getParams('com_media');\r\n\t\t$this->config->set('files', array('_source_dir' => $params->get('file_path'), '_extensions' => $this->_extensions, '_max_upload_size' => '1024'));\r\n\t\t\r\n\t\t// set joomla file path\r\n\t\t$this->_joomla_file_path = $params->get('file_path') ? $params->get('file_path') : 'images';\r\n\t\t\r\n\t\t// set callbacks\r\n\t\t$this->registerCallback('uploadFiles');\r\n\t\t$this->registerCallback('getfiledetails');\r\n\t\t$this->registerCallback('files');\r\n\t\t$this->registerCallback('delete');\r\n\t\t$this->registerCallback('newfolder');\r\n\t}", "title": "" }, { "docid": "7a2e0a8ad79312b2d3337e6bc7a0acac", "score": "0.5572764", "text": "public function __construct()\n {\n parent::__construct();\n $adapter = new Zend_Http_Client_Adapter_Curl();\n $this->setAdapter($adapter);\n $adapter->setConfig(\n array(\n 'curloptions' => array(\n CURLOPT_SSL_VERIFYPEER => 0,\n CURLOPT_SSL_VERIFYHOST => 0\n )\n )\n );\n }", "title": "" }, { "docid": "838e10176ab97ef5fd0e691288ba7add", "score": "0.5564188", "text": "public function __construct($url = null, array $options = [])\n {\n assert('extension_loaded(\\'curl\\')');\n\n //NULL parms no longer allowed in CURL Set Opts, etc.\n if (empty($url)) {\n $this->handle = curl_init();\n } else {\n $this->handle = curl_init($url);\n }\n\n $this->setOptions($this->curlDefaults + $options, true);\n }", "title": "" }, { "docid": "b44b88c18682e62901f6bd0f829d4a8e", "score": "0.5558172", "text": "public function __construct()\n {\n parent::__construct();\n\n $this->curl = new Curl();\n $this->curl->setHeader('Host', config('job-core.usajobs_host'));\n $this->curl->setHeader('User-Agent', config('job-core.usajobs_email'));\n $this->curl->setHeader('Authorization-Key', config('job-core.usajobs_key'));\n }", "title": "" }, { "docid": "40f3e3c227ec32d93ecbf5181ad1390d", "score": "0.55534345", "text": "private function initCurl() {\n $curl = curl_init();\n\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_FAILONERROR, true);\n\n $this->curl = $curl;\n }", "title": "" }, { "docid": "328ee7320530b2b90324b6d837d6e14f", "score": "0.55445045", "text": "public function __construct(array $requestData)\n\t{\n\t\t$this->requestData = $requestData;\n\n\t\t$this->uploadBasePath = BASE_PATH . DIRECTORY_SEPARATOR . self::UPLOAD_BASE_PATH;\n\n\t\t$this->fileInfo = getimagesize($this->requestData['tmp_name']);\n\n\t}", "title": "" }, { "docid": "55ad3879eebfab4f8fbb4426a724c8f6", "score": "0.55390334", "text": "private function setCurlOptions() {\n\n\t\t# Get default curl options\n\t\t$curlOptions = $this->getDefaultCurlOptions();\n\n\t\t# Set method of curl request\n\t\t$curlOptions[CURLOPT_CUSTOMREQUEST] = strtoupper($this->arrData['method']);\n\n\t\tif(isset($this->arrData['inputdata']['files'])) {\n\n\t\t\t# Get files from api request\n\t\t\t$files = $this->arrData['inputdata']['files'];\n\n\t\t\t# If there are files to be uploaded, add these to curl post fields\n\t\t\tif(count($files)){\n\t\t\t\t$i = 0;\n\t\t\t\t$arrFiles = array();\n\t\t\t\tforeach($files as $file){\n\t\t\t\t\t$finfo = finfo_open(FILEINFO_MIME_TYPE);\n\t\t\t\t\t$postFieldOption = $this->getCurlValue($file['tmp_name'], finfo_file($finfo,$file['tmp_name']), $file['name']);\n\t\t\t\t\t$arrFiles['file'.$i] = $postFieldOption;//'@'.$file['tmp_name'];\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t\t$curlOptions[CURLOPT_POSTFIELDS] = $arrFiles;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif(count($this->arrData['inputdata'])){\n\t\t\t\t$curlOptions[CURLOPT_POSTFIELDS] = json_encode($this->arrData['inputdata']);\n\t\t\t}\n\t\t}\n\n\t\t# Return curl options\n\t\treturn $curlOptions;\n\t}", "title": "" }, { "docid": "a582a4aabe8a255adfaea8cf4a4b6bb4", "score": "0.55314714", "text": "public function __construct()\n {\n $this->multi_curl = curl_multi_init();\n $this->setCallback([$this, 'callback']);\n }", "title": "" }, { "docid": "c529fc2addb1802cb4cff2b3a15473b2", "score": "0.55255777", "text": "public function __construct()\n {\n if (3 == func_num_args()) {\n $this->fileData = func_get_arg(0);\n $this->name = func_get_arg(1);\n $this->extensionAttributes = func_get_arg(2);\n }\n }", "title": "" }, { "docid": "191b2a177ba7f814875d4d476d88fcd0", "score": "0.55217403", "text": "public function __construct() {\n\t\tif ( isset( $_REQUEST['jtgiffy_url'] ) ) {\n\t\t\tupdate_option( 'jtgiffy_url', esc_url( $_REQUEST['jtgiffy_url'] ) );\n\t\t}\n\t\t$this->gif_url = get_option( 'jtgiffy_url', site_url( '/gifs' ) );\n\t\t$this->gif_path = trailingslashit( str_ireplace( site_url(), untrailingslashit( ABSPATH ), $this->gif_url ) ) .'*.gif';\n\n\t}", "title": "" }, { "docid": "6646ef50b045c028d884d4434d99b263", "score": "0.5517069", "text": "public function __construct()\n {\n\tif( ! extension_loaded('curl') )\n\t throw new RunException('Curl extension that required by Rest Resource is not available.');\n\t\n\t// Get the client request method\n\t$this->requestMethod = strtoupper($_SERVER['REQUEST_METHOD']);\n }", "title": "" }, { "docid": "21f923c46281f340250fb78ce15deef1", "score": "0.55139095", "text": "public function __construct()\n\t{\n\t\tself::$message = $this->update_info();\n\t\t$this->init();\n\t\tself::$file_path = get_option( 'file_path' );\n\t}", "title": "" }, { "docid": "b9d6a6562850904c696565ff56e66599", "score": "0.5508223", "text": "protected function init()\n {\n $this->curlHandle = curl_init();\n\n curl_setopt($this->curlHandle, CURLOPT_SSLVERSION, CURL_SSLVERSION_DEFAULT);\n curl_setopt($this->curlHandle, CURLOPT_SSL_VERIFYPEER, true);\n curl_setopt($this->curlHandle, CURLOPT_SSL_VERIFYHOST, 2);\n curl_setopt($this->curlHandle, CURLOPT_USERAGENT, \"KontoSecure-PHP\");\n curl_setopt($this->curlHandle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curlHandle, CURLOPT_URL, $this->baseUrl);\n curl_setopt($this->curlHandle, CURLOPT_CONNECTTIMEOUT, 15);\n curl_setopt($this->curlHandle, CURLOPT_CUSTOMREQUEST, 'POST');\n curl_setopt($this->curlHandle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);\n curl_setopt($this->curlHandle, CURLOPT_ENCODING, '');\n curl_setopt($this->curlHandle, CURLOPT_MAXREDIRS, 0);\n curl_setopt($this->curlHandle, CURLOPT_TIMEOUT, 30);\n curl_setopt($this->curlHandle, CURLOPT_HTTPHEADER, array(\"cache-control: no-cache\"));\n }", "title": "" }, { "docid": "90b31d0cfae1a01a9557899e34a1fa58", "score": "0.5496245", "text": "protected function initializeCurl() {\n $this->curl = curl_init();\n curl_setopt( $this->curl, CURLOPT_RETURNTRANSFER, true );\n curl_setopt( $this->curl, CURLOPT_SSL_VERIFYPEER, false );\n }", "title": "" }, { "docid": "3f706a9157342fe25536d64a8760f55c", "score": "0.5490581", "text": "public function __construct($url)\n {\n if (!function_exists('curl_init')) {\n throw new WebthumbnailException(\"Curl is not supported by your version of PHP!\");\n }\n \n $ch = curl_init($url);\n if (!$ch) {\n throw new WebthumbnailException(\"curl_init failed!\");\n }\n \n $referer = '-';\n if (isset($_SERVER) && isset($_SERVER['HTTP_REFERER'])) {\n $referer = $_SERVER['HTTP_REFERER'];\n }\n \n $userAgent = 'Webthumbnail.org Client PHP/'.phpversion();\n if (isset($_SERVER) && isset($_SERVER['SERVER_SOFTWARE'])) {\n $userAgent .= ' ' . $_SERVER['SERVER_SOFTWARE'];\n }\n \n curl_setopt($ch, CURLOPT_REFERER, $referer);\n curl_setopt($ch, CURLOPT_USERAGENT, $userAgent);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t\n if (!ini_get('open_basedir') && !ini_get('safe_mode')) {\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n }\n \n $this->_response = curl_exec($ch);\n if (!$this->_response) {\n throw new WebthumbnailException(\"curl_exec failed!\");\n }\n \n $this->_statusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n $this->_contentType = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);\n $this->_contentLength = curl_getinfo($ch, CURLINFO_CONTENT_LENGTH_DOWNLOAD);\n \n curl_close($ch);\n }", "title": "" }, { "docid": "3f706a9157342fe25536d64a8760f55c", "score": "0.5490581", "text": "public function __construct($url)\n {\n if (!function_exists('curl_init')) {\n throw new WebthumbnailException(\"Curl is not supported by your version of PHP!\");\n }\n \n $ch = curl_init($url);\n if (!$ch) {\n throw new WebthumbnailException(\"curl_init failed!\");\n }\n \n $referer = '-';\n if (isset($_SERVER) && isset($_SERVER['HTTP_REFERER'])) {\n $referer = $_SERVER['HTTP_REFERER'];\n }\n \n $userAgent = 'Webthumbnail.org Client PHP/'.phpversion();\n if (isset($_SERVER) && isset($_SERVER['SERVER_SOFTWARE'])) {\n $userAgent .= ' ' . $_SERVER['SERVER_SOFTWARE'];\n }\n \n curl_setopt($ch, CURLOPT_REFERER, $referer);\n curl_setopt($ch, CURLOPT_USERAGENT, $userAgent);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t\n if (!ini_get('open_basedir') && !ini_get('safe_mode')) {\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n }\n \n $this->_response = curl_exec($ch);\n if (!$this->_response) {\n throw new WebthumbnailException(\"curl_exec failed!\");\n }\n \n $this->_statusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n $this->_contentType = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);\n $this->_contentLength = curl_getinfo($ch, CURLINFO_CONTENT_LENGTH_DOWNLOAD);\n \n curl_close($ch);\n }", "title": "" }, { "docid": "7de6818807411a9557d127f310c70d4a", "score": "0.54900247", "text": "public function __construct($request,$field,$filename,$allowExt,$drive,$type)\n {\n $this->request = $request;\n $this->field = $field;\n $this->filename = $filename;\n $this->allowExt = $allowExt;\n $this->drive = $drive;\n $this->type = $type;\n\n }", "title": "" }, { "docid": "d4a44e5b62364eb27649a62eda536341", "score": "0.5489726", "text": "public function __construct($urlParams = array()) {\r\n\t\t\t\r\n\t\t\t// Call Global Functions\r\n\t\t\tglobal $conn;\r\n\t\t\tglobal $url;\r\n\r\n\r\n\t\t\t// Allow sub-controllers to use the url variable\r\n\r\n\t\t\t$this->url = $url->trimURL();\r\n\t\t\t$this->urlParams = $urlParams;\r\n\t\t\t\r\n\t\t\t// If there is a parameter in the URL\r\n\t\t\tif (!empty($urlParams)) {\r\n\t\t\t\t\r\n\t\t\t\t# Check if File exists\r\n\t\t\t\t$this->fileExists($urlParams[0]);\r\n\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "792a8372152e7c3937032214c2967d84", "score": "0.5480123", "text": "public function __construct($uploadedFile) {\n if($uploadedFile['error'] == 0){\n $this->file = $uploadedFile;\n } else {\n echo $uploadedFile['error'];\n }\n }", "title": "" }, { "docid": "d2c73214ebe5f79e96687db9ba05219c", "score": "0.54677564", "text": "public function __construct() {\n foreach ($this->extensions as $name => $title) {\n if (!extension_loaded($name)) {\n $this->errCode = 500;\n $this->errMsg = \"This library needs the [$title] extension.\";\n }\n }\n // Checks that all required functions exist\n foreach ($this->functions as $func) {\n if (!function_exists($func)) {\n $this->errCode = 500;\n $this->errMsg = \"This library needs the [$func] function.\";\n }\n }\n // If the PHP version is strictly lower than 5.2.0\n if (version_compare(phpversion(), $this->phpMin, '<')) {\n $this->errCode = 500;\n $this->errMsg = \"This library needs PHP [$this->phpMin] or newer.\";\n }\n \n $this->init = ($this->errCode == 200 ? true : false);\n }", "title": "" }, { "docid": "c0c8950d6185294cd90143910f615739", "score": "0.54648656", "text": "protected function __construct() {\n\t\t$this->basename = plugin_basename( __FILE__ );\n\t\t$this->url = plugin_dir_url( __FILE__ );\n\t\t$this->path = plugin_dir_path( __FILE__ );\n\t}", "title": "" }, { "docid": "c0c8950d6185294cd90143910f615739", "score": "0.54648656", "text": "protected function __construct() {\n\t\t$this->basename = plugin_basename( __FILE__ );\n\t\t$this->url = plugin_dir_url( __FILE__ );\n\t\t$this->path = plugin_dir_path( __FILE__ );\n\t}", "title": "" }, { "docid": "8fc50617a930efc22d2926fb3d915c32", "score": "0.5457944", "text": "public function __construct(array $config = array())\n {\n $this->checkExtension();\n }", "title": "" }, { "docid": "c60f228420521ae8ea5bfba237cda8d1", "score": "0.5448793", "text": "public function __construct(FileLibrary $fileUpload)\n {\n $this->fileUpload = $fileUpload;\n }", "title": "" }, { "docid": "65b96d40add55d765cc332f75c3d40b3", "score": "0.54421645", "text": "protected function _construct()\n {\n $this->_init('tofeeq_files/uploads', 'id');\n }", "title": "" }, { "docid": "595253acacb5dfdd0dc7acb52c297aa8", "score": "0.54357105", "text": "public function __construct($config)\n {\n $this->curl = new Curl();\n $this->config = $config;\n }", "title": "" }, { "docid": "c6b841ce0101f39b8e34578fb09b6fda", "score": "0.5434365", "text": "public function __construct(){\n\t\t$this->resource = curl_multi_init();\n\t}", "title": "" }, { "docid": "69d8072c91c1252c6ea2de08f0b4b141", "score": "0.54214305", "text": "public function __construct()\n {\n // Initialise values\n $this->path = '';\n $this->isUrl = false;\n\n // Initialize parent\n parent::__construct();\n }", "title": "" }, { "docid": "d76cdc4b336029ceadd8feab0913dce7", "score": "0.5409565", "text": "public function __construct($url)\n\t{\n\t\t$this->_logger = new HttpNilLogger();\n\t\t$this->_url = $url;\n\t\t$this->_ch = curl_init();\n\t\t$this->_headers = array();\n\t}", "title": "" }, { "docid": "298b6ab63ab38d8aef9045ba559d0066", "score": "0.5397248", "text": "public function __construct($request, $file)\n {\n //\n $this->request = $request;\n $this->file = $file;\n }", "title": "" }, { "docid": "44174e943f76b39a3ef620679a861042", "score": "0.53931195", "text": "function __construct()\n\t{\n\t\t//Create CI instance to load library and helper\n\t\t$this->CI =& get_instance();\n\t\t\t\t\t\n\t\t// image upload configuration\n\t\t$config['upload_path'] = './uploads';\n\t\t$config['allowed_types'] = $this->CI->config->item('image_type');\n\t\t$config['overwrite'] = FALSE;\n\t\t\n\t\t// initialize config and load library\n\t\t$this->CI->load->helper('file');\n\t\t$this->CI->load->library('upload');\n\t\t$this->CI->load->library('image_lib');\n\t\t$this->CI->upload->initialize($config);\n\t}", "title": "" }, { "docid": "2203eb8f4a6682de05573a49e1962d95", "score": "0.5391241", "text": "protected function init()\n {\n $resource = curl_init();\n\n if ($resource === false) {\n throw new Exception('curl_init() failed');\n }\n\n $this->resource = $resource;\n }", "title": "" }, { "docid": "06cba4ca30dc98feb5b407745346820c", "score": "0.5390644", "text": "private function setupCURL() {\n\t\t$this->ch = curl_init();\n\t}", "title": "" }, { "docid": "67110239b217b597ec515cead35fcd54", "score": "0.5389498", "text": "protected function initCURL(){\r\n\t\t$this->curl = curl_init();\r\n\t\tcurl_setopt($this->curl, CURLOPT_FOLLOWLOCATION, true);\r\n\t\tcurl_setopt($this->curl, CURLOPT_HEADER, false);\r\n\t\tcurl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER, false);\r\n\t\tcurl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST, true);\r\n\t\tcurl_setopt($this->curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);\r\n\t\tcurl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\r\n\t\tcurl_setopt($this->curl, CURLOPT_CONNECTTIMEOUT, 5);\r\n\t\tcurl_setopt($this->curl, CURLOPT_AUTOREFERER, TRUE);\r\n\t\tcurl_setopt($this->curl, CURLOPT_HEADERFUNCTION, array($this, 'parseHeaders'));\r\n\t}", "title": "" }, { "docid": "6c2c1b7ef0983ae831b36b5c33f45a64", "score": "0.53809124", "text": "public function __construct($file) {\n // pasa a minusculas\n \n $this->_name = strtolower(str_replace(' ', '_', $file['name']));\n $this->_type = ($file['type']);\n $this->_tmp_name = ($file['tmp_name']);\n $this->_size = ($file['size']); \n \n if($file['error'] != 0){\n array_push($this->_errors , $file['error']); \n } \n }", "title": "" }, { "docid": "f7a8a0627629990164be3fb5a0301515", "score": "0.5374701", "text": "public function __construct()\r\n {\r\n $this->app = \\Yee\\Yee::getInstance();\r\n $this->db = $this->app->db['cassandra'];\r\n $this->uploadDir = $this->app->config( 'upload.path' );\r\n $this->response['success'] = true;\r\n\r\n $this->fileHandler = new FileHandler();\r\n $this->folderHandler = new FolderHandler();\r\n\r\n //USER MUST BE PICKED FROM ELSEWHERE\r\n $this->user = \"FS\";\r\n }", "title": "" }, { "docid": "844f7789febbda9f9a4f9c653addb504", "score": "0.5358817", "text": "public function __construct()\r\n\t\t{\r\n\t\t\tif ( !in_array( 'curl', get_loaded_extensions() ) ) \r\n\t\t\t\tthrow new \\Exception( 'You need to install cURL, see: http://curl.haxx.se/docs/install.html' );\r\n\t\t\t\t\r\n\t\t\treturn $this;\r\n\t\t}", "title": "" }, { "docid": "bbb0d9706555f7956c98662df7e5c6b4", "score": "0.53576434", "text": "public function __construct()\n {\n $this->CI =& get_instance();\n $this->CI->load->library('upload', $config);\n $this->upload = $this->CI->upload;\n $this->input = $this->CI->input;\n $this->CI->load->model('file_model', '', TRUE);\n\t\t$this->file_model = $this->CI->file_model;\n }", "title": "" }, { "docid": "54fd2e2a01f296bd7d54f4352ed36fc9", "score": "0.53548145", "text": "public function init()\n {\n $this->setAllowRenameFiles(true);\n $this->setAllowCreateFolders(true);\n $this->setFilesDispersion(true);\n $this->setAllowedExtensions(array_keys($this->_allowedMimeTypes));\n $this->addValidateCallback('catalog_product_image',\n Mage::helper('catalog/image'), 'validateUploadFile');\n $this->addValidateCallback(\n Mage_Core_Model_File_Validator_Image::NAME,\n Mage::getModel('core/file_validator_image'),\n 'validate'\n );\n $this->_uploadType = self::SINGLE_STYLE;\n }", "title": "" }, { "docid": "e530d2d2a630e5c3a313e0af68312afc", "score": "0.5353756", "text": "private function _curl_init($url) {\n }", "title": "" }, { "docid": "beb7bc8587f765d7d415a31ce03c77be", "score": "0.53530294", "text": "protected function Init()\n {\n $this->SetUploadInfo();\n\n $eol = \"\\r\\n\";\n $this->uploadHeaders = \"User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0\".$eol.\n \"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\".$eol.\n \"Accept-Language: en-US,en;q=0.5\".$eol.\n \"Accept-Encoding: gzip, deflate\".$eol.\n \"Referer: https://upload.af/\".$eol.\n 'Origin: https://upload.af'.$eol.\n \"Connection: close\".$eol; //keep-alive;;\n\n $this->formParameters_FirstPart = array(\n 'sess_id' => 'j8u75hzn7ngzj2e1',\n 'utype' => 'reg',\n 'file_descr' => 'botload',\n 'file_public' => '',\n 'link_rcpt' => '',\n 'link_pass' => '',\n 'to_folder' => '',\n 'upload' => 'Start upload',\n '' => 'Add more',\n 'keepalive' => '1',\n );\n $this->formParameters_file_NamePart = 'file_0';//'files[]';\n $this->formParameters_LastPart = array();//'file_description[]' => '' );\n }", "title": "" }, { "docid": "6f1425648cca5985685b5003faa9dfb1", "score": "0.5344174", "text": "public function __construct( $url ) {\n\t\t$this->handle = curl_init($url);\n\t\t$this->headerFunction = [ $this, '___parseHeader' ];\n\t}", "title": "" }, { "docid": "9a7ebef5175a84b09691a50a573c5bc5", "score": "0.5342656", "text": "public function __construct() {\n\t\t//Set up cURL.\n\t\t$this->setupCURL();\n\n\t\t//Login.\n\t\t$this->login();\n\t}", "title": "" }, { "docid": "472e1bf7c14b5edc7828f6d63e3fe5dd", "score": "0.53407454", "text": "public function __construct(){\n parent::__construct();\n\t\t$this->ParentUploadir = \"uploads/\";\n $this->Uploadir = $this->ParentUploadir . \"test-avatar/\";\n $this->DirAssets = base_url() . \"uploads/test-avatar/\";\n if (!file_exists($this->Uploadir)) {\n mkdir($this->Uploadir, 0777);\n }\n }", "title": "" }, { "docid": "1b9199d561f04e53b52e8b9d543a6fac", "score": "0.5330195", "text": "public function __construct($url) \n {\n $this->_httpMethod = RESTFULRequest::HTTP_METHOD_GET;\n $this->_encoding = 'UTF-8';\n $this->_options = array();\n $this->_chunked = false;\n $this->_params = array();\n $this->_body = null;\n $this->_url = $url;\n $this->_fput = null;\n\n // only used in multipart requests\n $this->_multipart = null;\n\n $this->_headers = array();\n\n // Get result as a string instead of printing it out\n $this->_options[CURLOPT_RETURNTRANSFER] = true;\n \n $this->setProxy(self::$_defaultProxyHost, self::$_defaultProxyPort);\n $this->setAcceptAllCerts(self::$_defaultAcceptAllCerts);\n }", "title": "" }, { "docid": "f9a144c6947edbe8e9198cd78aca4186", "score": "0.53246814", "text": "public function __construct(array $data)\n {\n $this->name = $this->getBaseName($data['name']);\n $this->type = $data['type'] ?: 'application/octet-stream';\n $this->path = $data['tmp_name'];\n $this->size = $data['size'];\n $this->error = $data['error'] ?: \\UPLOAD_ERR_OK;\n\n parent::__construct($this->path);\n }", "title": "" }, { "docid": "59fe536a42042ce0e0f62d843ca6de9a", "score": "0.5322052", "text": "public function __construct()\n {\n parent::__construct();\n\n $this->path = '/Users/paulb/Projects/code4kc/cmr/cmr-clinic-admin-api/data';\n $this->file_name = 'Background-Check–AL.xls';\n\n// $this->path = '/Users/paulb/Projects/code4kc/cmr/cmr-clinic-admin-api/storage/app/applicant_histories';\n// $this->file_name = '1tddDwTHs2p73tzjatk0CderxpM1Xx4ej2VFL2FT.xls';\n }", "title": "" }, { "docid": "128922abbab15ca9128760c14dcc4f14", "score": "0.5320337", "text": "public function __construct($url)\n\t\t{\n\t\t\tif (!$this->readUrl($url,$ssl,$host,$port,$path,$user,$pass)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\tparent::__construct($host,$port);\n\t\t\t$this->useSSL($ssl);\n\t\t\t$this->setAuthorization($user,$pass);\n\t\t\t\n\t\t\t$this->path = $path;\n\t\t\t$this->user_agent = 'Clearbricks XML/RPC Client';\n\t\t}", "title": "" }, { "docid": "5300602f370e319f83f1642ea2f26b1b", "score": "0.5310816", "text": "public function __construct($type = NULL, $fieldname = \"\", $uploaddir = NULL){\n\t/* set the accepted file types to the ones provided in the argument */\n $this->type = $type;\n \n /* set the form file input field to the one provided in the argument */\n\t$this->fieldname = $fieldname;\n \n /* set the permanent storage directory to the one provided in the argument */\n\t$this->uploaddir = $uploaddir;\n \n /* retrieve the temporary file name from the submitted form and set it to the tempfile variable */\n\t$this->tmpfile = $_FILES[$this->fieldname]['tmp_name'];\n \n /* set the targetname*/\n\t$this->targetname = basename($_FILES[$this->fieldname]['name']);\n \n /* set the target */\n\t$this->target = $this->uploaddir.\"/\".$this->targetname;\n \n /* get the file size */\n\t$this->filesize = $_FILES[$this->fieldname]['size'];\n }", "title": "" }, { "docid": "0a214c7bca37e8eb31546c63414bc0de", "score": "0.53051764", "text": "public function __construct($url) {\n\t\t\t$this->credentials = array();\n\t\t\t$this->fields = array();\n\t\t\t$this->header = array();\n\t\t\t$this->options = array(\n\t\t\t\tCURLOPT_HEADER => FALSE,\n\t\t\t\tCURLOPT_RETURNTRANSFER => TRUE,\n\t\t\t);\n\t\t\t$this->url = array(\n\t\t\t\tCURLOPT_URL => $url,\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "a3a2deef2912d6b72e72c7a7b332e5f6", "score": "0.5294821", "text": "public function __construct() {\n //$this->request = $requestObject;\n // Include new config file in each page ,where we need data from configuration\n $config_data = include(\"../site_config.php\");\n $this->url = $config_data['api_dir'] . 'getReport.php';\n }", "title": "" }, { "docid": "b627b82116174d29742bdd16e03b12b5", "score": "0.5287165", "text": "public function __construct(string $filePath, string $storage, int $width = 0, int $height = 0, bool $upload = true)\n {\n $this->width = $width;\n $this->height = $height;\n\n $this->path = $filePath;\n\n $this->storage = $storage;\n\n $this->uploadToRemote = $upload;\n }", "title": "" }, { "docid": "e0fc23ad265149a057a7daf316ac4bd5", "score": "0.5287051", "text": "public function __construct()\n {\n // $this->password = getenv('DHL_KEY') ?: config('dhl.DHL_KEY');\n // $this->_mode = getenv('DHL_MODE') ?: config('app.env');\n // $this->accountNumber = getenv('DHL_ACCOUNT') ?: config('dhl.api.accountNumber');\n $this->username = config('env.DHL_ID') ?: config('dhl.DHL_ID');\n $this->password = config('env.DHL_KEY') ?: config('dhl.DHL_KEY');\n $this->_mode = config('env.DHL_MODE') ?: config('app.env');\n $this->accountNumber = config('env.DHL_ACCOUNT') ?: config('dhl.api.accountNumber');\n $this->type = \"curl\";\n }", "title": "" }, { "docid": "eda1ba97a6053fb63ba12f5a678fe7c6", "score": "0.5273409", "text": "public function __construct($url, $fullFilePath)\n {\n $this->url = $url;\n $this->fullFilePath = $fullFilePath;\n }", "title": "" } ]
305c55b4e28dbd75739dc0b9df315bca
Header ( ) HTML Header
[ { "docid": "fd3f9a713f53f1b642a6967f3df9e2f4", "score": "0.7532669", "text": "static function Header()\n\t\t{\n\t\t\t$_[] = '<header id=\"header\">';\n\t\t\t$_[] = '<div id=\"logo-group\">';\n\t\t\t$_[] = '<span id=\"logo\"><h1 id=\"logo\"><span class=\"highlight\">MEDIA</span><span class=\"plain\">Universal</span></h1></span>';\n\t\t\t$_[] = self::Header_Notifications();\n\t\t\t$_[] = '</div>';\n\t\t\t$_[] = self::Header_Projects();\n\t\t\t$_[] = self::Header_Right();\n\t\t\t$_[] = '</header>';\n\t\t\t$_ = implode('',$_);\n\t\t\treturn $_;\n\t\t}", "title": "" } ]
[ { "docid": "8bb112ebe5a0cc12ec8e048dce141051", "score": "0.83223486", "text": "public function Header() {\n $this->writeHTML($this->header_html);\n $this->SetTopMargin($this->getY() - 3);\n $this->SetFontSize('10');\n $this->MultiCell(0, 0, $this->getPage(), 0, '', FALSE, 0, 153.5, 72);\n }", "title": "" }, { "docid": "310da3e51659fd3f1980ca4740de6120", "score": "0.8312744", "text": "function Header()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "b154077e3d03efd93e9360884edfefa3", "score": "0.82595074", "text": "public function outputHtmlHeader();", "title": "" }, { "docid": "47d158ebf76840b956cc58fc1f1c3f7b", "score": "0.81930184", "text": "function Header() {\n }", "title": "" }, { "docid": "a0dccbbc20f5a43ae169300b966a5985", "score": "0.81276095", "text": "public function header()\n {\n echo '<header></header>';\n }", "title": "" }, { "docid": "3ab07109e8b95a28fd5811297d699d5c", "score": "0.810267", "text": "function Header() \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(255, 255, 255); \n $this->SetTextColor(0 , 0, 0); \n // $this->Cell(0,20, '', 0,1,'C', 1); \n // $this->Image('logo.png', 10, 10, 15, '', 'JPG', '', 'T', false, 300, '', false, false, 0, false, false, false);\n $this->writeHTML($this->xheadertext,true, false, false, true,''); \n }", "title": "" }, { "docid": "9a42036ac954bd31d29669c2e6e47cd3", "score": "0.8038523", "text": "function Header(){}", "title": "" }, { "docid": "468021891196cccd34dad5551b9aae1b", "score": "0.80266476", "text": "public function printHTMLHeader(){//generates the Header when called\n\t\t$newHeader = new Header;\n\t\t$newHeader->printHTMLHeader();\t\t\n\t}", "title": "" }, { "docid": "e9889503437407dfcfd5484991557f70", "score": "0.80133945", "text": "function Header() {\n\t// nop\n }", "title": "" }, { "docid": "9791198975bc6a82cd24334b2c3a7b53", "score": "0.7991326", "text": "function Header() {\n }", "title": "" }, { "docid": "2a430fccdefd2f0bdb79aac8bad256fc", "score": "0.7982634", "text": "function Header() {\n }", "title": "" }, { "docid": "deec1cb00f33277f50433341f5e0ab73", "score": "0.79489017", "text": "function Header()\n\t{\n\t\t//$logo = PATH_site.($xml->tr->td->img->dir).'logo.png';\n\t\t//$this->Image($logo,1,1,17,8);\n\t}", "title": "" }, { "docid": "c91b195aec6921363b20ee5b4219cc0e", "score": "0.7806283", "text": "public static function getHeader() {\n\t\t$nomeSito = 'BandBoard';\n\t\treturn\t'<div id=\"header\">' .\n\t\t\t\t'<h1 xml:lang=\"en\" lang=\"en\">' . $nomeSito . '</h1>' .\n\t\t\t'</div>';\n\t}", "title": "" }, { "docid": "3c49b66141222f085ce075a1f1b0387d", "score": "0.7768137", "text": "public function renderHeader()\n {\n $headHtml = <<< HEAD\n <div class=\"ui-box-head\">\n <h3 class=\"ui-box-head-title\">{$this->headTitle}</h3>\n <span class=\"ui-box-head-text\">{$this->headText}</span>\n <a href=\"#\" class=\"ui-box-head-more\">{$this->headMore}</a>\n </div>\nHEAD;\n echo $headHtml ;\n }", "title": "" }, { "docid": "b6ce5f53d76e68584b2f89f10c62f269", "score": "0.77617145", "text": "function makeHeader($title){\n $this->html .= heading($title); \n }", "title": "" }, { "docid": "8abc48d5e9e1986f006567b3c550c379", "score": "0.77364147", "text": "public function Header() {\n\t\t// Logo\n\t\t$this->SetFont( 'helvetica', 'I', 8 );\n\t\t$this->Cell( 0, 10, get_bloginfo( 'url' ), 0, 1, 'R', 0, '', 0 );\n\t}", "title": "" }, { "docid": "a32d50b76d6e2050e5b5556e6b42aa94", "score": "0.7712603", "text": "protected function getHeaderHtml()\n\t{\n\t\t$ground = '<header class=\"page-header\">';\n\t\t$path = '';\n\t\t$fruition = '</header>';\n\t\t\n\t\t$path .= '<h1>Journal</h1>';\n\t\t\n\t\t$path .= '<div class=\"page-header-link\">';\n\t\t$path .= '<a href=\"/journal/add\">Add Time</a>';\n\t\t$path .= '</div>';\n\t\t\n\t\treturn $ground . $path . $fruition;\n\t}", "title": "" }, { "docid": "c652c610d1f733160cb82563abb91c7e", "score": "0.7687773", "text": "function _htmlHeader()\n {\n $header = '<html>' . \"\\n\" . '<head>' . \"\\n\"\n . '<meta charset=\"utf-8\">' . \"\\n\"\n . '<title>' . $this->wiki->getTitle() . '</title>' . \"\\n\"\n . $this->_getWikiStyle()\n . '</head>' . \"\\n\" . '<body>' . \"\\n\"\n ;\n\n return $header;\n }", "title": "" }, { "docid": "c330476187783775c575eeb13bbedf26", "score": "0.7648852", "text": "public function header() {}", "title": "" }, { "docid": "c5792cb2bd9964fc841d38218195dbfb", "score": "0.7616643", "text": "function page_header()\n\t{\n\t\tif ($this->_screenbasic['donehead'] != 'FALSE')\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\tif (!$this->_screenbasic['title'] OR $this->_screenbasic['title'] == 'NONE')\n\t\t{\n\t\t\t$outtitle = $this->phrases['title'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$outtitle = $this->_screenbasic['title'];\n\t\t}\n\n\t\t$css = '<style type=\"text/css\">.isucc { color: green; } .ifail { color: red; }</style><link rel=\"shortcut icon\" href=\"/favicon.ico\" type=\"image/x-icon\" />';\n\n\t\tif ($this->_screenbasic['autosubmit'] == '0')\n\t\t{\n\t\t\t$string = \"<html>\\n\\t<head>\\n\\t<title>{$this->_screenbasic['title']}</title>\\n\\t{$css}\\n\\t</head>\\n\\t<body>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$string = '<html><head><title>' . $outtitle . '</title>' . $css . '</head><body onload=\"document.name.submit();\">';\n\t\t}\n\n\t\t$string .= \"\\n\\t<b>\" . $this->phrases['remove'] . \"</b>\\n\";\n\t\t$string .= \"\\n\\t<b><br>\" . $this->phrases['build_version'] . $this->_build_version . \"</b>\\n\";\n\n\t\t$this->_screenbasic['donehead'] = 'TRUE';\n\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "21f9d06a142022ba1e68fc879bbcbfaf", "score": "0.76086324", "text": "public function html_header($data) {\n // but will do for alpha version\n echo \"<!DOCTYPE html>\";\n echo \"<html><head><title>\" . $data['title'] . \"</title>\";\n echo \"<meta charset='utf-8'></head><body>\";\n }", "title": "" }, { "docid": "ba998eb8415d8a8bb7d895cae97f8c13", "score": "0.75919104", "text": "function printHeader(){\n\t\t$this->menuObj->baseHeader($this->icon,$this->theme,$this->title,$this->scripts,$this->frame);\n\t}", "title": "" }, { "docid": "d55a86a56045abc417b9a083db235f0e", "score": "0.7590171", "text": "protected function pageheader() {\n\n ?>\n <html>\n <head>\n <link rel=\"stylesheet\" type=\"text/css\" href=\"sample.css\" \n media=\"screen\" />\n </head>\n\n <body bgcolor=white>\n\n <div id=\"header\">\n Sample using Advanced Authorization project bookmark with REDCapAPI\n </div>\n\n <div id=\"maincontent\">\n\n <?php\n return true;\n }", "title": "" }, { "docid": "8002110a12e8b75713815106a57dfd33", "score": "0.7587423", "text": "function Header () {\n global $gTHEMELOCATION;\n global $zOLDAPPLE;\n global $zAUTHUSER, $zLOCALUSER;\n\n $zLOCALUSER->Access (FALSE, FALSE, FALSE, \"/admin/\");\n \n if ( !$zAUTHUSER->Anonymous) {\n // Choose which logged in header to use.\n if ($zLOCALUSER->userAccess->r == TRUE) {\n // Push the admin header.\n $zOLDAPPLE->IncludeFile (\"$gTHEMELOCATION/objects/header/admin.aobj\");\n } else {\n if ($zAUTHUSER->Remote) {\n // Push the local logged-in header.\n $zOLDAPPLE->IncludeFile (\"$gTHEMELOCATION/objects/header/remote.aobj\", INCLUDE_SECURITY_NONE);\n } else {\n // Push the local logged-in header.\n $zOLDAPPLE->IncludeFile (\"$gTHEMELOCATION/objects/header/focus.aobj\");\n } // if\n } \n } else {\n // Push the anonymous header.\n $zOLDAPPLE->IncludeFile (\"$gTHEMELOCATION/objects/header/main.aobj\");\n } // if\n \n }", "title": "" }, { "docid": "898cd670a68bd0e8a24084e9c40a8a52", "score": "0.75762576", "text": "function headercreate() {\n\t\t$html = '<div id=\"header\" class=\"header\">Fill in everything you know about your source:</div>';\n\t\techo $html;\n\t}", "title": "" }, { "docid": "81714e20f715e2e476aef0108025a6d5", "score": "0.75716347", "text": "public function defineHeader() \n {\n \n $this->objMakePdf->SetTextColor(51,51,51);\n $this->objMakePdf->SetDrawColor(51,51,51);\n $this->objMakePdf->SetLineWidth(0.2);\n $this->objMakePdf->Image($this->objMakePdf->public_path.$this->objMakePdf->getLogotipoEmpresa(),10,4,50);\n //$this->objMakePdf->Image($this->objMakePdf->public_path.$this->objMakePdf->getLogotipoQualidade(),52,10,25);\n $this->objMakePdf->SetFont('Arial','B',11);\n \n //$tmpTxt = substr($this->headerTitle,0.110);\n $tmpTxt = substr(\"{$this->objMakePdf->getHeaderTitle()}\",0.110);\n\n //$this->Cell(80,10,utf8_decode($tmpTxt),0,0,'R');\n $this->objMakePdf->setXY(80,10);\n $this->objMakePdf->MultiCell(120,5,utf8_decode($tmpTxt),0,'R');\n $this->objMakePdf->Ln(15); \n \n }", "title": "" }, { "docid": "e95ad6ad5c56bbf14b07c4e70fbb08ba", "score": "0.7570746", "text": "public function header()\n {\n echo $this->renderFile($this->absolutePath().'/layouts/_header.php');\n }", "title": "" }, { "docid": "c728cd629816be05676e5432a2760848", "score": "0.75310373", "text": "public function displayContentHeader()\r\n { \r\n?> \r\n\r\n <div class = \"header\"><img id=\"logo\" src=\"retwork_artwork.png\" alt=\"RetWork Logo\">\r\n\t\r\n\t\t<div class=\"menu\"><a href=\"index.html\">New Search</a></div>\r\n\t\t<div class=\"menu\"><a href=\"addJobForm.html\">Post Job</a></div>\r\n\t</div>\r\n<?php\r\n }", "title": "" }, { "docid": "0d58181cbaf8cec3647d988a6c9255a6", "score": "0.75129116", "text": "function hypha_setHeader($html) {\n\t\tglobal $hyphaXml;\n\t\t$hyphaXml->requireLock();\n\t\tsetInnerHtml($hyphaXml->getElementsByTagName('header')->Item(0), $html);\n\t}", "title": "" }, { "docid": "b20a32517faf49a12efa0a4b3aee2813", "score": "0.7511288", "text": "private static function showHeader() {\n\t?>\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\" xml:lang=\"en\" lang=\"en\">\n <head>\n\t\t\t<title>Fari Diagnostics</title>\n <?php self::css(); ?>\n\t\t\t<?php self::jsToggle(); ?>\n\t\t</head>\n\t\t<body>\n <div id=\"title\"><b><?php echo FARI; ?></b> running <b><?php echo APP_VERSION; ?></b></div>\n\t<?php\n\t}", "title": "" }, { "docid": "8946e7543b510990ddd8de99492e4391", "score": "0.7486374", "text": "public function Header()\n {\n }", "title": "" }, { "docid": "528f28619f3065d1ccbcffa8ffe9722e", "score": "0.746534", "text": "public function print_header() {\n global $PAGE, $OUTPUT;\n $this->set_url();\n $PAGE->set_pagelayout('embedded');\n echo $OUTPUT->header();\n echo $OUTPUT->heading(format_string($this->title), 1, 'socialwiki-printable-title');\n }", "title": "" }, { "docid": "d98cd33120ba53973e569e9306392d0f", "score": "0.7463565", "text": "public function print_header() {\n }", "title": "" }, { "docid": "f550e3ea2e67f39d5a1349e4be50b278", "score": "0.74594474", "text": "function hypha_getHeader() {\n\t\tglobal $hyphaXml;\n\t\treturn getInnerHtml($hyphaXml->getElementsByTagName('header')->Item(0));\n\t}", "title": "" }, { "docid": "53c62acac756669dae3dfff25c94022b", "score": "0.7445152", "text": "public function showheader()\r\n\t{\r\n\t\treturn $this->header;\r\n\t}", "title": "" }, { "docid": "e6f6d7b3a62f8f55e2229efe9eee00ec", "score": "0.7442033", "text": "function Header()\n\t{\n\t\t$this->SetFont('Arial','B',30);\n\t\t$this->SetTextColor(224,224,224);\n\t\t$this->RotatedText(35,220,'Kerala Police - Travel Pass - Approved',45);\n\n\t}", "title": "" }, { "docid": "c76d5df749f23bce124d71ee311c1010", "score": "0.7440883", "text": "public function Header(){\n\t\t\t\t$this->Image('resources/i/logo-corto.png',10,15,30);\n\t\t\t\t$this->SetFont('Arial','',12);\n\t\t\t\t$this->ln(12);\n\t\t\t\tdate_default_timezone_set(\"America/Argentina/Buenos_Aires\");\n\t\t\t\t$this->Cell(0,10,date('j\\/m\\/Y \\a \\l\\a\\s H:i \\h\\s'/*, time() - 10800*/),'B',1,'R');\n\t\t\t\t$this->Ln(10);\n\t }", "title": "" }, { "docid": "e1feed8ddbdce2d69378619b06d2fdc4", "score": "0.74351877", "text": "function frontendHeader() {\n\t\t$this->output( 'ihaf_insert_header' );\n\t}", "title": "" }, { "docid": "909bc03217d29e72b9888ae5c6aec39b", "score": "0.7410514", "text": "function render_lr_header(){\r\n echo \"<h2 style='margin:0;' class='k-header'>sympol foundation lavish resources</h2>\";\r\n }", "title": "" }, { "docid": "8c3331ea206870e9ee8a21efa1a3ea31", "score": "0.74054384", "text": "function html_header() {\n\t\techo '<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>'.\"\\n\";\n\t\techo '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//FR\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">'.\"\\n\";\n\t\techo ''.\"\\n\";\n\t\techo '<!-- html_header start -->'.\"\\n\";\n\t\techo ''.\"\\n\";\n\t\techo '<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"fr\" lang=\"fr\">'.\"\\n\";\n\t\techo ' <head>'.\"\\n\";\n\t\techo ' <title>albumphotos version '.$_SESSION['version'].' - '.$_SESSION['album'].' - '.$_SESSION['album_comments'].'</title>'.\"\\n\";\n\t\techo ' <link type=\"text/css\" rel=\"stylesheet\" href=\"'.$_SESSION['css'].'\" />'.\"\\n\";\n\t\techo ' <meta http-equiv=\"Content-type\" content=\"text/html; charset=ISO-8859-1\" />'.\"\\n\";\n\t\techo ' </head>'.\"\\n\";\n\t\techo ' <body>'.\"\\n\";\n\t\techo \"\\n\";\n\t\techo '<!-- html_header end -->'.\"\\n\";\n\t\techo \"\\n\";\n\t}", "title": "" }, { "docid": "6ff4fc119b40e88cfef7f87747338fc0", "score": "0.7382106", "text": "function main_header($a_header_title)\n\t{\n\t\tglobal $lng;\n\n\t\t$this->tpl->getStandardTemplate();\n\t\t$this->tpl->setTitle($a_header_title);\n\t\t$this->displayLocator();\n\t\t//$this->setAdminTabs($a_type);\n\t}", "title": "" }, { "docid": "763eee236c73742a36400fb807f88343", "score": "0.7369771", "text": "function renderHeader(){\n $header = <<<EOT\n<header>\n<div class=\"container\">\n<h1>Soccer Store</h1>\n</div>\n</header>\nEOT;\n echo $header;\n }", "title": "" }, { "docid": "9047bf62e948802eb751cfa27bd68f61", "score": "0.73680484", "text": "public function Header() {\n\t\t$ormargins = $this->getOriginalMargins();\n\t\t$headerfont = $this->getHeaderFont();\n\t\t$headerdata = $this->getHeaderData();\n\t\tif (($headerdata['logo']) && ($headerdata['logo'] != K_BLANK_IMAGE)) {\n\t\t\t$this->Image(K_PATH_IMAGES.$headerdata['logo'], $this->GetX(), $this->getHeaderMargin(), $headerdata['logo_width']);\n\t\t\t$imgy = $this->getImageRBY();\n\t\t} else {\n\t\t\t$imgy = $this->GetY();\n\t\t}\n\t\t$cell_height = round(($this->getCellHeightRatio() * $headerfont[2]) / $this->getScaleFactor(), 2);\n\t\t// set starting margin for text data cell\n\t\tif ($this->getRTL()) {\n\t\t\t$header_x = $ormargins['right'] + ($headerdata['logo_width'] * 1.1);\n\t\t} else {\n\t\t\t$header_x = $ormargins['left'] + ($headerdata['logo_width'] * 1.1);\n\t\t}\n\t\t$this->SetTextColor(0, 0, 0);\n\t\t// header title\n\t\t$this->SetFont($headerfont[0], 'B', $headerfont[2] + 1);\n\t\t$this->SetX($header_x);\n\t\t$this->Cell(0, $cell_height, $headerdata['title'], 0, 1, '', 0, '', 0);\n\t\t// header string\n\t\t$this->SetFont($headerfont[0], $headerfont[1], $headerfont[2]);\n\t\t$this->SetX($header_x);\n\t\tif ($headerdata['string']) $this->MultiCell(0, $cell_height, $headerdata['string'], 0, '', 0, 1, '', '', true, 0, false);\n\t\t// print an ending header line\n\t\t$this->SetLineStyle(array('width' => 0.25 / $this->getScaleFactor(), 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));\n\t\t$this->SetY((2.835 / $this->getScaleFactor()) + max($imgy, $this->GetY()));\n\t\tif ($this->getRTL()) {\n\t\t\t$this->SetX($ormargins['right']);\n\t\t} else {\n\t\t\t$this->SetX($ormargins['left']);\n\t\t}\n\t\t$this->Cell(0, 0, '', 'T', 0, 'C');\n\t}", "title": "" }, { "docid": "246d21241aa9e6386f797a395d839aba", "score": "0.7366067", "text": "function displayHeader()\n\t\t{\n\t\t\t// display the WEB PAGE standards\n\t\t\techo \"<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>\";\n\t\t\techo \"<html xmlns='http://www.w3.org/1999/xhtml'>\";\n \n // open the HTML tag. The HTML tag will be closed at the DISPLAY FOOTER METHOD\n\t\t\techo \"<head>\";\n echo \"<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>\"; \n\t\t\t\n\t\t\t// display the title and subtitle that is found above the file menu\n\t\t\techo \"<title>\".$this -> title.\" | \".$this -> subtitle.\"</title>\";\n\t\t\t\n\t\t\t// display the CSS properties of the page and set the theme path which is queried from the database\n\t\t\t$themeQuery = mysql_query(\"SELECT path FROM argus_themes WHERE status = 'ENABLED'\") or die(mysql_error());\n\t\t\t$path = mysql_result($themeQuery,0,\"path\");\n\t\t\t\n\t\t\t// set the CSS path for NON-MEMBERS, MEMBERS, CONTRIBUTORS, and ADMINISTRATORS\n\t\t\tswitch($this -> position)\n\t\t\t{\n\t\t\t\tcase null:\n\t\t\t\t\t// CSS PATH for NON-MEMBERS\n\t\t\t\t\techo \"<link href='\".$path.\"' rel='stylesheet' type='text/css'>\";\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\t// CSS PATH for MEMBERS, CONTRIBUTORS, and ADMINISTRATORS\n\t\t\t\t\techo \"<link href='../\".$path.\"' rel='stylesheet' type='text/css'>\";\n\t\t\t}\n\t\t\t\n // close the head\n echo \"</head>\";\n \n\t\t\treturn;\n\t\t}", "title": "" }, { "docid": "05423c8185d1f291ce3e07a85f61191d", "score": "0.7362977", "text": "public function Header(){\n \tif(is_callable($this->__layout['header'])){\n \t\t$this->__layout['header']();\n \t}else{\n \t\tparent::Header();\n \t}\n }", "title": "" }, { "docid": "a26c53264658213e09da604dbeb68c6b", "score": "0.7358299", "text": "public function Header() {\n $bMargin = $this->getBreakMargin();\n $auto_page_break = $this->AutoPageBreak;\n $this->SetAutoPageBreak(false, 0);\n $this->SetAutoPageBreak($auto_page_break, $bMargin);\n $this->setPageMark();\n }", "title": "" }, { "docid": "5d0d2114caa86a490c21df38c07c3242", "score": "0.7352279", "text": "public function renderHeader()\n {\n $this->view->renderView(\"header.php\");\n }", "title": "" }, { "docid": "d0b6763d10a3e22d23bb966180dd879c", "score": "0.7329746", "text": "function Header()\n{\n}", "title": "" }, { "docid": "d0b6763d10a3e22d23bb966180dd879c", "score": "0.7329746", "text": "function Header()\n{\n}", "title": "" }, { "docid": "fe12969276191c4549d0f1ae5e0ac625", "score": "0.73244405", "text": "protected function HeaderCard() {\n\t\t$header = '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\t\t\t<html xmlns=\"http://www.w3.org/1999/xhtml\">\n\t\t\t<head>\n\t\t\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n\t\t\t\t<title>Greeting by ' . $this->mSendFromName . '</title>\n\t\t\t\t<style type=\"text/css\">\n\t\t\t\t<!--\n\t\t\t\tbody { background-color:' . $this->mBg . ';}\n\t\t\t\t#cb img {\n\t\t\t\t\tmargin-top: 0px;\n\t\t\t\t\tmargin-right: 5px;\n\t\t\t\t\tmargin-bottom: 5px;\n\t\t\t\t\tmargin-left: 0px;\n\t\t\t\t\tpadding-top: 0px;\n\t\t\t\t\tpadding-right: 5px;\n\t\t\t\t\tpadding-bottom: 5px;\n\t\t\t\t\tpadding-left: 0px;\n\t\t\t\t\tbackground-color: #808080;}\n\n\t\t\t\tp#text {\n\t\t\t\tcolor\t\t:\t' .\t$this->mTextColor . ';\n\t\t\t\tfont-family: \\'' . $this->mTextFont . '\\';\n\t\t\t\tfont-size:\t' . $this->mTextSize . ';';\n\t\tif(!empty($this->mTextStyle)) {\n\t\t\tswitch($this->mTextStyle) {\n\t\t\t\tcase 'bold':\n\t\t\t\t\t$header .= \t'font-weight: bold;';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'italic':\n\t\t\t\t\t$header .= \t'font-style: italic;';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'underline':\n\t\t\t\t\t$header .= \t'text-decoration: underline;';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t$header .= \t'}\n\t\t\t\t\t-->\n\t\t\t\t</style>\n\t\t\t</head>';\n\n\n\t\treturn $header;\n\t}", "title": "" }, { "docid": "6677b7650c47dd1c2744d975bef59706", "score": "0.731296", "text": "public function Header() {\n /* /*$this->Image('imagenes/logo.png',10,8,22);\n $this->SetFont('Arial','B',13);\n $this->Cell(30);\n $this->Cell(120,10,'ESCUELA X',0,0,'C');\n $this->Ln('5');\n $this->SetFont('Arial','B',8);\n $this->Cell(30);\n $this->Cell(120,10,'INFORMACION DE CONTACTO',0,0,'C');\n $this->Ln(20); */\n }", "title": "" }, { "docid": "5fc9af8aef2ebe02132de6da173df42a", "score": "0.7307394", "text": "private function printHTMLHeader()\n {\n echo <<<EOT\n<!DOCTYPE html>\n<html>\n <head>\n <title>Sound of the City REST API</title>\n\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n </head>\n\n <body>\nEOT;\n }", "title": "" }, { "docid": "7471e09e299cc21bc727431538590a29", "score": "0.72883", "text": "public function print_header() {\n global $OUTPUT, $PAGE;\n $PAGE->set_heading(format_string($PAGE->course->fullname));\n $this->set_url();\n $this->set_session_url();\n\n $this->create_navbar();\n echo $OUTPUT->header();\n echo $this->wikioutput->content_area_begin();\n\n $this->print_help();\n $this->print_pagetitle();\n $this->setup_tabs();\n // Tabs are associated with pageid, so if page is empty, tabs should be disabled.\n if (!empty($this->page) && !empty($this->tabs)) {\n $tabthing = $this->wikioutput->tabs($this->page, $this->tabs, $this->taboptions); // Calls tabs function in renderer.\n echo $tabthing;\n }\n }", "title": "" }, { "docid": "d9b9d82669dc1f44099a50566b5e938b", "score": "0.7285964", "text": "public function Header()\n\t{\n\t\t $this->SetFont('Arial','B',15);\n\t\t $this->Cell(80);\n\t\t $this->Cell(30,10,$this->article->titre);\n\t\t $this->Ln(10);\n\t\t $this->SetFont('Arial','',10);\n\t\t $this->Cell(30,10,$this->article->auteur);\n\t\t $this->Cell(30,10,date(\"d-m-Y\", strtotime($this->article->dateCreation))) ;\n\t\t $this->Ln(20);\n\t}", "title": "" }, { "docid": "022110763c15d690e70b6df6c4965fe2", "score": "0.7274977", "text": "function Header() {\r\n\t\t\t\r\n\t\t\t\t$headerColumns = $_GET['selectedcolumns'];\r\n\t\t\t\tif (isset($_GET['title'])) { $title = $_GET['title']; }\r\n\t\t\r\n\t\t\t\t// Colors, line width and bold font\r\n\t\t\t\t$this->Image('../css/DataTables-1.10.15/images/VCS Logo.png',10,6,50,0);\r\n\t\t\t\t$this->SetFillColor(39,77,165);\r\n\t\t\t\t$this->SetTextColor(0);\r\n\t\t\t\t$this->SetDrawColor(0);\r\n\t\t\t\t$this->SetFont('Arial','B',20);\r\n\t\t\t\t$this->Cell(0,10,$title,0,0,'C');\r\n\t\t\t\t$this->Ln();\r\n\t\t\t\t$this->Ln();\r\n\t\t\t\t$this->SetFont('Arial','B',10);\r\n\t\t\t\t$this->SetTextColor(255);\r\n\t\t\t\t\r\n\t\t\t\t// Header\r\n\t\t\t\tfor($i=0;$i<count($headerColumns);$i++)\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->Cell(45,8,$headerColumns[$i],1,0,'J',true,true);\r\n\t\t\t\t\t$this->Ln();\r\n\t\t\t\t\r\n\t\t}", "title": "" }, { "docid": "083c9353e4b697435953fcb6eb2160fc", "score": "0.72596484", "text": "public static function buildHeader()\n\t{\n\t\trequire_once 'HTML/Template/IT.php';\n\t\t$tpl = new \\HTML_Template_IT(dirname(__FILE__) . '/../html');\n\t\t$tpl->loadTemplatefile('header.html');\n\t\t$tpl->touchBlock('header');\n\t\t$tpl->parse('header');\n\t\treturn $tpl->get('header');\n\t}", "title": "" }, { "docid": "d407a5be0097ef48d4873780cde140ea", "score": "0.7234124", "text": "function CJadminHeader() {\n\t}", "title": "" }, { "docid": "fb67fda0a8bd393363c35e3a4e3ba8a1", "score": "0.72140545", "text": "function displayHeader(){\n ?>\n <header>\n <!-- insert path to the logo -->\n <img src=\"img/abi-logo.jpg\" alt=\"AbisLogo\">\n <h1 class=\"headerTitle\">Active Bretagne Informatique</h1>\n </header>\n<?php\n}", "title": "" }, { "docid": "5961c0c9c51d7c4e5c73bb4f2af512fe", "score": "0.72077936", "text": "function Header($title = 'Welcome', $params = array()) {\n\t\tif (isset($_POST['ajax'])) {\n\t\t\t$this->CI->load->view('site/messages');\n\t\t\treturn;\n\t\t}\n\t\theader(\"Content-Type: text/html; charset=utf-8\");\n\n\t\t$params['title'] = $title;\n\t\t$params['span'] = isset($params['span']) ? $params['span'] : true;\n\t\t$this->headerparams = $params;\n\n\t\t$this->CI->load->view('site/' . $this->Theme . '/header', $params);\n\t\t$this->_spewed_headers = TRUE;\n\t}", "title": "" }, { "docid": "103e7bcb742cc07530fa7ed794398406", "score": "0.72063315", "text": "protected function displayHeader()\n {\n // Display the page start in case of an html page\n $this->displayPageStart();\n\n // Show the title\n $this->displayTitle();\n $this->display( PHP_EOL );\n }", "title": "" }, { "docid": "913ebb25c2792c1601a2702c1489e12e", "score": "0.7204689", "text": "function renderHeader($i18n) {\n\techo '<!-- header -->\n\t\t<div id=\"logo\">\n\t\t\t<a href=\"index.php\"><img src=\"', $i18n->msg('header_imageURL'), '\" alt=\"FACT-Finder\" /></a>\n\t\t</div>\n\t';\n}", "title": "" }, { "docid": "b2b6d7c67dbb315441fa0ac2137d0a4a", "score": "0.71894926", "text": "function Header()\r\n {\r\n //Pengaturan Font Header\r\n $this->SetFont('Times','B',14); //jenis font : Times New Romans, Bold, ukuran 14\r\n //untuk warna background Header\r\n $this->SetFillColor(255,255,255);\r\n //untuk warna text\r\n $this->SetTextColor(0,0,0);\r\n //Menampilkan tulisan di halaman\r\n $this->Cell(25,1,'Laporan Hasil Prediksi Prestasi Akademik Mahasiswa','',0,'C',1); //TBLR (untuk garis)=> B = Bottom,\r\n // L = Left, R = Right\r\n //untuk garis, C = center\r\n }", "title": "" }, { "docid": "0058764ecd6d54bbb6d4b1f21de29134", "score": "0.7184254", "text": "private static function print_hed_header()\n\t{\n\t\tprint \"<!DOCTYPE html>\\n\";\n\t\tprint \"<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\" xml:lang=\\\"en\\\" lang=\\\"en\\\">\\n\";\n\t\tprint \"<head>\\n\";\n\t\tprint \"\\t<meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\"/>\\n\";\n\t\tprint \"</head>\\n\";\n\t\tprint \"<body>\\n\";\n\t}", "title": "" }, { "docid": "dc755020e424637cab9bffd62071affb", "score": "0.7183337", "text": "public function Header() {\n\t\t\n\t\tif($this->lineHeaderTable){\n\t\t\t//$this->setY(22.6);\t\n\t\t\t$this->setY(15);\n\t\t\t$w = 198.3;\n\t\t\t$this ->Line($this->GetX(),$this->GetY(),$w, $this->GetY(), array('width'=>0.3));\n\t\t}else{\n\t\t\t$this->setY(22.8);\t\n\t\t\t//$this->setY(15);\n\t\t\t$w = 198.3;\n\t\t\t$this ->Line($this->GetX(),$this->GetY(),$w, $this->GetY(), array('width'=>0.3));\n\t\t}\n\t\t\n }", "title": "" }, { "docid": "edb581be41be8dc726e0b432063c8e20", "score": "0.7176129", "text": "function Header()\r\n\t\t{\r\n\t\t\t//de la clase se utiliza el atributo Image\r\n\t\t\t//ruta de la imagen, posision en milim. en X,Y y tamaño de la imagen\r\n\t\t\t$this->Image('../media/logo.png', 15, 8, 40 );\r\n\t\t\t$this->SetFont('Arial','B',20);\r\n\t\t\t$this->Cell(40);\r\n\t\t\t$this->Cell(110,20, 'Reporte de encuesta',0,0,'C');\r\n\t\t\t$this->Ln(25);\r\n\t\t}", "title": "" }, { "docid": "cfb58da49b57927117cb495dfa0cb235", "score": "0.71546245", "text": "function Header()\n\t\t{\n\t\t\t$this->SetFont('Helvetica','B',11);\n\t\t\t//$this->SetY(2);\n\t\t\t// Move to the right\n\t\t\t$this->Cell(0,5,$this->edicao.\" Congresso de \".\n\t\t\t\"Iniciação Científica da UFLA\",0,0,\"R\");\n\t\t\t$this->Ln(10);\n\t\t}", "title": "" }, { "docid": "475da7bb7df77eb5261522a5a9e9a7b9", "score": "0.7148265", "text": "function Header()\r\n\t{\r\n\t\t$this->Image('../img/timbre1.JPG',15,5,180,20); //Logo\r\n\t\t$this->SetFont('Arial','B',10); //Arial bold 10\r\n\t\t$this->Ln(18);//Line break\r\n\t\r\n\t\t$this->Cell(25,7,\"\",0,\"\",\"\");\r\n\t\t$this->Cell(140,7,\"Relatório de Ordens de Serviço - Controle de Extratos\",1,\"\",\"C\");// O alinhamento é feito na própria cécula\r\n\t\t\t$this->Ln();\r\n\t\t\t$this->SetFont('Arial','b',10);\r\n\t\t\t$this->Cell(25,7,\"\",0,\"\",\"\");\r\n\t\t$this->Cell(30,7,\"O. S. - Item\",1);\r\n\t\t$this->Cell(30,7,\"Barcode/N.F.\",1);\r\n\t\t$this->Cell(30,7,\"Série\",1);\r\n\t\t$this->Cell(30,7,\"Orçamento\",1);\r\n\t\t$this->Cell(20,7,\"Finalizado\",1);\r\n\t\t$this->Ln();\r\n\t}", "title": "" }, { "docid": "da5c36134b0d79cb925e20b9e9eb8592", "score": "0.71364146", "text": "function set_header()\n{\n global $app_name, $app_dir;\n // Start HTML vx.xx output\n echo \"<html>\";\n // Print headers\n echo \"<head>\";\n echo \"<meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=ISO-8859-1\\\">\";\n echo \"<meta name=\\\"DESCRIPTION\\\" content=\\\"a web interface to run TINKER molecular modelling on the EGEE grid\\\">\";\n echo \"<meta name=\\\"AUTHOR\\\" content=\\\"EMBnet/CNB\\\">\";\n echo \"<meta name=\\\"COPYRIGHT\\\" content=\\\"(c) 2004-5 by CSIC - Open Source Software\\\">\";\n echo \"<meta name=\\\"GENERATOR\\\" content=\\\"$app_name\\\">\";\n echo \"<link rel=\\\"StyleSheet\\\" href=\\\"$app_dir/style/style.css\\\" type=\\\"text/css\\\"/>\";\n echo \"<link rel=\\\"shortcut icon\\\" href=\\\"$app_dir/images/favicon.ico\\\"/>\";\n echo \"<title=\\\"$app_name\\\">\";\n echo \"</head>\";\n // Prepare body\n echo \"<body bgcolor=\\\"white\\\" background=\\\"$app_dir/images/6h2o-w-small.gif\\\" link=\\\"ffc600\\\" VLINK=\\\"#cc9900\\\" ALINK=\\\"#4682b4\\\">\";\n}", "title": "" }, { "docid": "1685d1423ec6361d3682feb4d45a4d25", "score": "0.71356", "text": "public function Header()\n {\n $this->SetFont('Arial', 'B', 15);\n $this->centreImage(base_path('app/Images/image1.png'));\n $this->Cell(80);\n $this->Cell(10, 30, 'INCIDENT REPORT', 0, 0, 'C');\n }", "title": "" }, { "docid": "64aa94c103ee1ac65149664a09e16a21", "score": "0.7133455", "text": "protected function renderHeader()\n\t{\n\t\t$button = $this->renderCloseButton();\n\t\tif ($button !== null) {\n\t\t\t$this->header = $button . \"\\n\" . $this->header;\n\t\t}\n\t\tif ($this->header !== null) {\n\t\t\treturn Html::tag('div', \"\\n\" . $this->header . \"\\n\", array('class' => 'header'));\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "title": "" }, { "docid": "4b3b8b841753efdb58e5e59f55ae325f", "score": "0.7132095", "text": "public function startHeader()\n {\n return $this->startRow('head');\n }", "title": "" }, { "docid": "5b3b96c57292ee1329df0b5b03a4035a", "score": "0.7129611", "text": "function printHeader($pageTitle)\n\n{\n\nprint <<<ENDHTM\n\n\n\n<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n\n\t\"http://www.w3.org/TR/html4/loose.dtd\">\n\n\n\n<html>\n\n<head>\n\n<title>$pageTitle</title>\n\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n\n<style type=\"text/css\">\n\nbody {\n\n\tfont: 14px Verdana;\n\n}\n\nh1,h2,p,pre {\n\n\tpadding: 0px 0px 10px 0px;\n\n\tmargin: 0;\n\n}\n\nform {\n\n\tpadding: 0;\n\n\tmargin: 0;\n\n}\n\n</style>\n\n</head>\n\n\n\n<body>\n\n<img src=\"BAAdmin.gif\"><br />\n\n<h1>$pageTitle</h1>\n\n\n\nENDHTM;\n\n}", "title": "" }, { "docid": "bc82f851df3f59a5e1e33c717fb4f00b", "score": "0.7126415", "text": "public static function showHeader(){\n global $CONFIG_ADMINLOGIN;\n global $WEBROOT;\n oc_require('templates/header.php');;\n }", "title": "" }, { "docid": "69f043b72f562ea3ee01160174745a1a", "score": "0.7122944", "text": "function drawHeader () {\n\n }", "title": "" }, { "docid": "7543d903dec4dcbe2b877c554a18a697", "score": "0.7117999", "text": "function zeus_header() {\n\n\t\techo apply_filters( 'zues_site_branding_open', '<div ' . zeus_get_attr( 'branding' ) . '>');\n\n\t\t\tif ( get_header_image() ) {\n\t\t\t\tdo_action( 'zeus_header_image' );\n\t\t\t} else {\n\t\t\t\tdo_action( 'zeus_header_text' );\n\t\t\t}\n\n\t\techo apply_filters( 'zues_site_branding_close', '</div><!-- .site-branding -->');\n\n\t}", "title": "" }, { "docid": "1139ecfa377886a962dd5df5cd84c076", "score": "0.71114725", "text": "public abstract function get_header();", "title": "" }, { "docid": "14090c8a2a14d54e58bbabd64db49563", "score": "0.710449", "text": "public function get_header() {\n $pos = strpos($this->_header,'</head>');\n\n // echo the header and 'inject' the wp_head hook\n echo substr($this->_header, 0, $pos);\n wp_head();\n echo substr($this->_header, $pos);\n }", "title": "" }, { "docid": "3c83c6e0af28f15a746f7a6da28ffcd5", "score": "0.7082276", "text": "public function Header() {\n if (is_null($this->_tplIdx)) {\n $this->setSourceFile('PDFDocument.pdf');\n $this->_tplIdx = $this->importPage(1);\n }\n $this->useTemplate($this->_tplIdx);\n \n $this->SetFont('DejaVu', 'B', 9);\n $this->SetTextColor(255);\n $this->SetXY(60.5, 24.8);\n $text = 'tFPDF (v' . tFPDF_VERSION . ') and FPDI (v'\n \t . FPDI_VERSION . ')';\n $this->Cell(0, 8.6, $text);\n $this->Ln(10);\n }", "title": "" }, { "docid": "82a1a7b0612a11e77fdeacc7236a7b02", "score": "0.70748574", "text": "function Header(){\n\t\tif ($header=$this->bpt_data['headers']) {\n\t //Colors, line width and bold font\n\t $this->SetFillColor(120);\n\t $this->SetTextColor(255);\n\t $this->SetDrawColor(0);\n\t $this->SetLineWidth(.3);\n\t $this->SetFont( '','B','8' );\n\t \n\t $x = $this->GetX();\n\t\t$y = $this->GetY();\n\t\t$leftMargin = $x;\n\t\t\n\t //Header\n\t $header=$this->bpt_data['headers'];\n\t \n\t // exit('<pre>'.print_r($header,true).'</pre>');\n\t //\t$w=$this->GetStringWidth($header[$i]->name)+6;\n\n\t\t//$this->SetX((210-$w)/2);\n\t //$w=$this->GetStringWidth($header)+6;\n\t $width=floor(250 / count($header));\n\t for($i=0;$i<count($header);$i++){\n\t \n\t \t\t$this->SetY($y); //set pointer back to previous values\n\t\t\t\t$this->SetX($x);\n\t\t\t\t$x=$this->GetX()+$width;\n\t\t\t\t$y=$this->GetY();\n\t\t\t\t\n\t $this->MultiCell($width,7,$header[$i]->name,1,0,'C',true);\n\t // $this->Ln();\n\t \t }\n\t }\n\t}", "title": "" }, { "docid": "e4a193ac385eb871c59d3a1177e66823", "score": "0.7071695", "text": "function Header() {\r\n if (is_null($this->_tplIdx)) {\r\n $this->setSourceFile('sample.pdf');\r\n $this->_tplIdx = $this->importPage(1);\r\n }\r\n $this->useTemplate($this->_tplIdx);\r\n\r\n }", "title": "" }, { "docid": "670207ebf7c1cf13d5731690c6581e2b", "score": "0.7062777", "text": "function Header()\n {\n //Logo\n $this->Image('pc_invoice_logo.png',10,8,0,0,'PNG','http://princesscraft.com');\n \n //Setup the address\n $this->SetFont('Arial','B',10);\n //Title\n $this->Cell(35);\n $this->Cell(35,11.5,'',0,1,'L');\n $this->Cell(35);\n $this->Cell(35,1.2,'Princess Craft Campers and Trailers',0,1,'L');\n $this->Ln();\n $this->SetFont('Arial','B',8);\n $this->Cell(35);\n $this->Cell(30,1.2,'102 N 1st St',0,1,'L');\n $this->Ln();\n $this->Cell(35);\n $this->Cell(30,1.2,'Pflugerville, TX 78660-2754',0,1,'L');\n $this->Ln();\n $this->Cell(35);\n $this->Cell(30,1.2,'Toll-Free: (800) 338-7123',0,1,'L');\n $this->Ln();\n $this->Cell(35);\n $this->Cell(30,1.2,'Phone: (512) 251-4536',0,1,'L');\n $this->Ln();\n $this->Cell(35);\n $this->Cell(30,1.2,'Fax: (512) 251-3134',0,1,'L');\n $this->Ln();\n $this->Cell(35);\n $this->Cell(9,1.2,'Email: ',0,0,'L');\n $this->Cell(0,1.2,'[email protected]',0,0,'L',0,'mailto:[email protected]');\n $this->Ln();\n }", "title": "" }, { "docid": "4418af54cea12663bdd0d72d61a33be6", "score": "0.70574653", "text": "public function renderHeader() {\n\t\tif($this->headerView !== null) {\n\t\t\t$owner=$this->getOwner();\n\t\t\t$viewFile=$owner->getViewFile($this->headerView);\n\t\t\t$data=$this->viewData;\n\t\t\t$data['widget']=$this;\n\t\t\t$owner->renderFile($viewFile,$data);\n\t\t}\n\t}", "title": "" }, { "docid": "c49ae31215823a88580f734f78af6f84", "score": "0.705498", "text": "protected function bodyHeaderContent() {\n echo 'Home';\n }", "title": "" }, { "docid": "0674aba503745f067ffda34566b75629", "score": "0.7048344", "text": "function do_header()\n\t{\n\t\t$GLOBALS['egw_info']['flags']['include_xajax'] = true;\n\t\t// tell egw_framework to include wz_tooltip\n\t\t$GLOBALS['egw_info']['flags']['include_wz_tooltip'] = true;\n\t\t$GLOBALS['egw']->common->egw_header();\n\n\t\tif ($_GET['msg']) echo '<p class=\"redItalic\" align=\"center\">'.html::htmlspecialchars($_GET['msg']).\"</p>\\n\";\n\n\t\tif ($this->group_warning) echo '<p class=\"redItalic\" align=\"center\">'.$this->group_warning.\"</p>\\n\";\n\t}", "title": "" }, { "docid": "d954295763f0c8f7e7ae6a49a9cd52a7", "score": "0.70438963", "text": "function layoutH1($header1 = NULL) {\n\t\tif(isset($header1)) {\n\t\t\tprint \"<h1> \".$header1.\" </h1>\".PHP_EOL;\n\t\t}\n\t}", "title": "" }, { "docid": "a3d59832099d159e9a0509c7d115aaaf", "score": "0.70423806", "text": "function printheader() {\n global $html;\n if ($query != '') {\n // do query \n } else {\n $a = split('<h1>',$html); \n if (sizeof($a) > 1) {\n $a = split('</h1>',$a[1]);\n ?><table class=\"header\"><tr><td><?php\n echo $a[0];\n ?></td></tr></table><?php\n } else {\n }\n }\n}", "title": "" }, { "docid": "5cf12f632099225f62dab299dea7627e", "score": "0.7017854", "text": "public function loadHeader($header)\n {\n echo ('<head>\n <meta charset=\"utf-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\">\n <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->\n <meta name=\"description\" content=\"\">\n <meta name=\"author\" content=\"\">\n <link rel=\"icon\" href=\"../../favicon.ico\">\n\n <script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js\"></script>\n <script src=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js\"></script>\n <title>Swazi Plastics</title>\n\n <!-- Bootstrap core CSS -->\n <link href=\"lib/css/bootstrap.css\" rel=\"stylesheet\">\n\n <!-- Custom styles for this template -->\n <link href=\"jumbotron.css\" rel=\"stylesheet\">\n </head>');\n }", "title": "" }, { "docid": "879c6fba671a17f264330331128905e8", "score": "0.70122755", "text": "function modify_header() {\n\techo '<div id=\"header\"><nav id=\"header-nav\" class=\"clearfix\">';\n}", "title": "" }, { "docid": "6fc7404c331a5435cf795334583133a6", "score": "0.7010189", "text": "function Header()\n{\n $this->SetFont('Arial','',9);\n\t$this->Image('img/intn.jpg',10,4,-300,0,'','../../InformeCargos.php');\n // Move to the right\n $this->Cell(80);\n // Framed title\n\t$this->text(25,22,utf8_decode('Instituto Nacional de Tecnología, Normalización y Metrología'));\n\t$this->text(296,22,'Sistema - Sueldos');\n\t//$this->Cell(30,10,'noc',0,0,'C');\n // Line break\n $this->Ln(20);\n\t$this->SetDrawColor(0,0,0);\n\t$this->SetLineWidth(.2);\n\t$this->Line(343,23,9,23);//largor,ubicacion derecha,inicio,ubicacion izquierda\n}", "title": "" }, { "docid": "5a0aaa0626ec5bc89642d6dec892d4d9", "score": "0.70011216", "text": "public function getLoggedInHeader() {\n\t\t$html = \n\t\t\t\"<div id='loggedInHeader'>\n\t\t\t\tInloggad som \".$_SESSION['USERNAME'].\" <br />\n\t\t\t\t<a class='logoutBtn' href='?\".self::$LOGOUT.\"'>Logga ut</a>\n\t\t\t</div>\";\n\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "9c15e66aa33e2093eac7deebba8e9982", "score": "0.69919467", "text": "public function notabsheader() {\n \treturn $this->output->header();\n }", "title": "" }, { "docid": "79589c90da049610420b535eb7a7bacd", "score": "0.69856125", "text": "function BC_header($part='',$params = array()){\n\tglobal $theme_root;\n\tBC_get_component('html-header', $params);\n}", "title": "" }, { "docid": "4dda155d27d86f96a90b03be4eb90d5e", "score": "0.6984281", "text": "function PrintHeader()\n{?><div id=\"container\">\n<div class='Header'>\n<img alt='movie reel' id='HeaderLogo' src=\"imag/movie-reel.jpg\" height=\"50\"/><br/>\n<div id='TitleText'><b>My Video</b> Collection</div>\n<div id='SubTitle'>An individual video library</div>\n</div>\n<?}", "title": "" }, { "docid": "5c4acbfd141cab0e506de9c8f1329c9e", "score": "0.6981883", "text": "protected function renderHeader()\n {\n\n Html::addCssClass($this->headerOptions, 'box-header well');\n // TODO add Original title ?\n $this->headerOptions['data-original-title'] = '' ;\n\n $headerIcons = is_array($this->headerIcons) ? implode(\"\\n\", $this->headerIcons) : $this->headerIcons;\n\n $headerContent = <<< HEADER\n <h2>{$this->headerTitle}</h2>\n <div class=\"box-icon\">\n {$headerIcons}\n </div>\nHEADER;\n return Html::tag('div', \"\\n\" . $headerContent . \"\\n\", $this->headerOptions);\n\n }", "title": "" }, { "docid": "459363fcad790974ff0f04ca67efe230", "score": "0.6977289", "text": "function page_header($title, $size = 'h1', $subtitle = '')\n\t{\n\t\t$str = \"\";\n\t\t$str .= \"<div class=\\\"page-header\\\">\\n\";\n\t\t$str .= \" <h\".$size.\">\".$title.\" <small>\".$subtitle.\"</small></h\".$size.\">\\n\";\n\t\t$str .= \"</div>\\n\";\n\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "1730fd1d7533a9feb41f1ff12b2787a1", "score": "0.6976769", "text": "function page_header($title)\r\n{\r\n\tglobal $charsetencoding,$skins,$skinindex,$headerpage,$include_location,$cfg_folder_name,$dft_language,$phpExt;\r\n\r\n\t$bodytag = $skins[$skinindex][\"bodytag\"];\r\n\techo \"<!DOCTYPE HTML PUBLIC \\\"-//W3C//DTD HTML 4.01 Transitional//EN\\\" \\\"http://www.w3.org/TR/html4/loose.dtd\\\">\r\n<html lang=\\\"$dft_language\\\">\r\n<head>\r\n<title>$title</title>\\n\";\r\n\tif ($charsetencoding != \"\")\r\n\t{ echo \"<meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=$charsetencoding\\\">\\n\"; }\r\n\techo \"<link rel=\\\"stylesheet\\\" href=\\\"styles.css\\\" type=\\\"text/css\\\">\r\n</head>\r\n<body $bodytag>\r\n<table width=\\\"100%\\\" cellspacing=\\\"0\\\" cellpadding=\\\"10\\\" border=\\\"0\\\" align=\\\"center\\\">\r\n<tr>\r\n<td class=\\\"main\\\">\r\n<br>\\n\";\r\n\r\n\t// Include user portion of page if present\r\n\tif (isset($headerpage) && $headerpage != \"\")\r\n\t{ $header_path = $include_location.$cfg_folder_name.'/'.$headerpage; }\r\n\tif (isset($header_path) && file_exists($header_path) && filesize($header_path) != 0)\r\n\t{ include($header_path); }\r\n}", "title": "" }, { "docid": "e28a575afb56dd9fcec833210a83c280", "score": "0.6976437", "text": "function header() {\n\t\t\t\techo '<div class=\"wrap\">';\n\t\t\t\techo '<h2>' . __( 'Import Demo Data for &#8220;' . HIPPO_THEME_NAME . '&#8221; theme', 'hippo-plugin' ) . '</h2>';\n\n\n\t\t\t}", "title": "" }, { "docid": "3a4b260680198180581d2d0bbeb7338f", "score": "0.69694966", "text": "public static function print_header()\n {\n $tpl_data = array();\n $menu = self::getMainMenu();\n\n // init template search paths\n self::initPaths();\n\n // the original list, ordered by parent -> children (if the\n // templates renders the HTML output)\n $lb = CAT_Object::lb();\n $lb->set('__id_key','id');\n\n $tpl_data['MAIN_MENU'] = $lb->sort($menu,0);\n\n // recursive list\n $tpl_data['MAIN_MENU_RECURSIVE'] = $lb->buildRecursion($menu);\n\n // render list (ul)\n $lb->set(array(\n 'top_ul_class' => 'nav',\n 'ul_class' => 'nav',\n 'current_li_class' => 'active'\n ));\n $tpl_data['MAIN_MENU_UL'] = $lb->buildList($menu);\n\n self::getInstance()->log()->addDebug('printing header');\n self::getInstance()->tpl()->output('header', $tpl_data);\n }", "title": "" }, { "docid": "39efa5a0aad895bb9d15f4c2c37cc1ec", "score": "0.6966472", "text": "public function header($lessontitle, $activityname) {\n\n //$context = context_module::instance($cm->id);\n\n // Header setup\n $this->page->set_title($this->page->course->shortname.\": \".$activityname);\n $this->page->set_heading($this->page->course->fullname);\n $output = $this->output->header();\n\n $output .= $this->output->heading($lessontitle);\n\n return $output;\n }", "title": "" }, { "docid": "525407165eeb42cb2bc1cb0085ca1c1a", "score": "0.69664663", "text": "public function outPutHeader()\n\t{\n\t\t$output = \"<!doctype html>\\n\";\n\t\t$output .= \"<html>\\n\";\n\t\t$output .= \"<head>\\n\";\n\t\t$output .= \"<title>\".$this->title.\" \".count($this->script).\"</title>\\n\";\n\t\t$output .= (\"<script type=\\\"text/javascript\\\" src=\\\"http://code.jquery.com/jquery-latest.min.js\\\"></script>\\n\");\n\t\tfor($i = 0;$i<count($this->script);$i++)\n\t\t{\n\t\t\t $output .= (\"<script type=\\\"text/javascript\\\" src=\\\"scripts/\".$this->script[$i].\"\\\"></script>\\n\");\n\t\t}\n\t\tfor($i = 0;$i<count($this->style);$i++)\n\t\t{\n\t\t\t $output .= (\"<link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"styles/\".$this->style[$i].\"\\\">\\n\");\n\t\t}\n\t\t$output .= \"</head>\\n\";\n\t\t$output .= \"<body>\\n<div class=\\\"main\\\">\\n\";\n\t\t\n\t\techo $output;\n\t}", "title": "" } ]
277551fe166f2e7647a484a011dd9887
/ Description: Use to get country list
[ { "docid": "7031d42390d2f620a4e374824683a61b", "score": "0.7392688", "text": "function getCountries() {\r\n /* Define section */\r\n $Return = array('Data' => array('Records' => array()));\r\n /* Define variables - ends */\r\n $Query = $this->db->query(\"SELECT CountryCode,CountryName,phonecode FROM `set_location_country` ORDER BY CountryName ASC\");\r\n if ($Query->num_rows() > 0) {\r\n $Return['Data']['Records'] = $Query->result_array();\r\n return $Return;\r\n }\r\n return FALSE;\r\n }", "title": "" } ]
[ { "docid": "43463b209b144aedae02970668ef277a", "score": "0.87645775", "text": "function getCountryList() {\n\t\t\n\t\t$countries = array(\n\t\t\t'Afghanistan',\n\t\t\t'Albania',\n\t\t\t'Algeria',\n\t\t\t'American Samoa',\n\t\t\t'Andorra',\n\t\t\t'Angola',\n\t\t\t'Anguilla',\n\t\t\t'Antarctica',\n\t\t\t'Antigua and Barbuda',\n\t\t\t'Argentina',\n\t\t\t'Armenia',\n\t\t\t'Aruba',\n\t\t\t'Australia',\n\t\t\t'Austria',\n\t\t\t'Azerbaijan',\n\t\t\t'Bahamas',\n\t\t\t'Bahrain',\n\t\t\t'Bangladesh',\n\t\t\t'Barbados',\n\t\t\t'Belarus',\n\t\t\t'Belgium',\n\t\t\t'Belize',\n\t\t\t'Benin',\n\t\t\t'Bermuda',\n\t\t\t'Bhutan',\n\t\t\t'Bolivia',\n\t\t\t'Bosnia and Herzegovina',\n\t\t\t'Botswana',\n\t\t\t'Bouvet Island',\n\t\t\t'Brazil',\n\t\t\t'British Indian Ocean Territory',\n\t\t\t'British Virgin Islands',\n\t\t\t'Brunei Darussalam',\n\t\t\t'Bulgaria',\n\t\t\t'Burkina Faso',\n\t\t\t'Burundi',\n\t\t\t'Cambodia',\n\t\t\t'Cameroon',\n\t\t\t'Canada',\n\t\t\t'Cape Verde',\n\t\t\t'Cayman Islands',\n\t\t\t'Central African Republic',\n\t\t\t'Chad',\n\t\t\t'Chile',\n\t\t\t'China',\n\t\t\t'Christmas Island',\n\t\t\t'Cocos Keeling Islands',\n\t\t\t'Colombia',\n\t\t\t'Comoros',\n\t\t\t'Congo',\n\t\t\t'Congo',\n\t\t\t'Cook Islands',\n\t\t\t'Costa Rica',\n\t\t\t'Croatia',\n\t\t\t'Cuba',\n\t\t\t'Cyprus',\n\t\t\t'Czech Republic',\n\t\t\t'Denmark',\n\t\t\t'Djibouti',\n\t\t\t'Dominica',\n\t\t\t'Dominican Republic',\n\t\t\t'Ecuador',\n\t\t\t'Egypt',\n\t\t\t'El Salvador',\n\t\t\t'Equatorial Guinea',\n\t\t\t'Eritrea',\n\t\t\t'Estonia',\n\t\t\t'Ethiopia',\n\t\t\t'Falkland Islands Malvinas',\n\t\t\t'Faroe Islands',\n\t\t\t'Fiji',\n\t\t\t'Finland',\n\t\t\t'France',\n\t\t\t'French Guiana',\n\t\t\t'French Polynesia',\n\t\t\t'French Southern Territories',\n\t\t\t'Gabon',\n\t\t\t'Gambia',\n\t\t\t'Georgia',\n\t\t\t'Germany',\n\t\t\t'Ghana',\n\t\t\t'Gibraltar',\n\t\t\t'Greece',\n\t\t\t'Greenland',\n\t\t\t'Grenada',\n\t\t\t'Guadeloupe',\n\t\t\t'Guam',\n\t\t\t'Guatemala',\n\t\t\t'Guernsey',\n\t\t\t'Guinea',\n\t\t\t'Guinea-Bissau',\n\t\t\t'Guyana',\n\t\t\t'Haiti',\n\t\t\t'Heard Island and Mcdonald Islands',\n\t\t\t'Honduras',\n\t\t\t'Hong Kong',\n\t\t\t'Hungary',\n\t\t\t'Iceland',\n\t\t\t'India',\n\t\t\t'Indonesia',\n\t\t\t'Iran',\n\t\t\t'Iraq',\n\t\t\t'Ireland',\n\t\t\t'Isle of Man',\n\t\t\t'Israel',\n\t\t\t'Italy',\n\t\t\t'Jamaica',\n\t\t\t'Japan',\n\t\t\t'Jersey',\n\t\t\t'Jordan',\n\t\t\t'Kazakhstan',\n\t\t\t'Kenya',\n\t\t\t'Kiribati',\n\t\t\t'Korea',\n\t\t\t'Korea',\n\t\t\t'Kuwait',\n\t\t\t'Kyrgyzstan',\n\t\t\t'Laos',\n\t\t\t'Latvia',\n\t\t\t'Lebanon',\n\t\t\t'Lesotho',\n\t\t\t'Liberia',\n\t\t\t'Libya',\n\t\t\t'Liechtenstein',\n\t\t\t'Lithuania',\n\t\t\t'Luxembourg',\n\t\t\t'Macao',\n\t\t\t'Macedonia',\n\t\t\t'Madagascar',\n\t\t\t'Malawi',\n\t\t\t'Malaysia',\n\t\t\t'Maldives',\n\t\t\t'Mali',\n\t\t\t'Malta',\n\t\t\t'Marshall Islands',\n\t\t\t'Martinique',\n\t\t\t'Mauritania',\n\t\t\t'Mauritius',\n\t\t\t'Mayotte',\n\t\t\t'Mexico',\n\t\t\t'Micronesia',\n\t\t\t'Moldova',\n\t\t\t'Monaco',\n\t\t\t'Mongolia',\n\t\t\t'Montenegro',\n\t\t\t'Montserrat',\n\t\t\t'Morocco',\n\t\t\t'Mozambique',\n\t\t\t'Myanmar',\n\t\t\t'Namibia',\n\t\t\t'Nauru',\n\t\t\t'Nepal',\n\t\t\t'Netherlands',\n\t\t\t'Netherlands Antilles',\n\t\t\t'New Caledonia',\n\t\t\t'New Zealand',\n\t\t\t'Nicaragua',\n\t\t\t'Niger',\n\t\t\t'Nigeria',\n\t\t\t'Niue',\n\t\t\t'Norfolk Island',\n\t\t\t'Northern Mariana Islands',\n\t\t\t'Norway',\n\t\t\t'Oman',\n\t\t\t'Pakistan',\n\t\t\t'Palau',\n\t\t\t'Palestinian Territory',\n\t\t\t'Panama',\n\t\t\t'Papua New Guinea',\n\t\t\t'Paraguay',\n\t\t\t'Peru',\n\t\t\t'Philippines',\n\t\t\t'Pitcairn',\n\t\t\t'Poland',\n\t\t\t'Portugal',\n\t\t\t'Puerto Rico',\n\t\t\t'Qatar',\n\t\t\t'Reunion',\n\t\t\t'Romania',\n\t\t\t'Russian Federation',\n\t\t\t'Rwanda',\n\t\t\t'Saint Barth Lemy',\n\t\t\t'Saint Helena',\n\t\t\t'Saint Kitts and Nevis',\n\t\t\t'Saint Lucia',\n\t\t\t'Saint Martin',\n\t\t\t'Saint Pierre and Miquelon',\n\t\t\t'Saint Vincent and the Grenadines',\n\t\t\t'Samoa',\n\t\t\t'San Marino',\n\t\t\t'Sao Tome and Principe',\n\t\t\t'Saudi Arabia',\n\t\t\t'Senegal',\n\t\t\t'Serbia',\n\t\t\t'Seychelles',\n\t\t\t'Sierra Leone',\n\t\t\t'Singapore',\n\t\t\t'Slovakia',\n\t\t\t'Slovenia',\n\t\t\t'Solomon Islands',\n\t\t\t'Somalia',\n\t\t\t'South Africa',\n\t\t\t'South Georgia and the South Sandwich Islands',\n\t\t\t'South Sudan',\n\t\t\t'Spain',\n\t\t\t'Sri Lanka',\n\t\t\t'Sudan',\n\t\t\t'Suriname',\n\t\t\t'Svalbard and Jan Mayen',\n\t\t\t'Swaziland',\n\t\t\t'Sweden',\n\t\t\t'Switzerland',\n\t\t\t'Syrian Arab Republic',\n\t\t\t'Taiwan',\n\t\t\t'Tajikistan',\n\t\t\t'Tanzania',\n\t\t\t'Thailand',\n\t\t\t'Timor-Leste',\n\t\t\t'Togo',\n\t\t\t'Tokelau',\n\t\t\t'Tonga',\n\t\t\t'Trinidad and Tobago',\n\t\t\t'Tunisia',\n\t\t\t'Turkey',\n\t\t\t'Turkmenistan',\n\t\t\t'Turks and Caicos Islands',\n\t\t\t'Tuvalu',\n\t\t\t'Uganda',\n\t\t\t'Ukraine',\n\t\t\t'United Arab Emirates',\n\t\t\t'United Kingdom',\n\t\t\t'United States',\n\t\t\t'United States Minor Outlying Islands',\n\t\t\t'Uruguay',\n\t\t\t'Uzbekistan',\n\t\t\t'Vatican City',\n\t\t\t'Vanuatu',\n\t\t\t'Venezuela',\n\t\t\t'Viet Nam',\n\t\t\t'U.S. Virgin Islands',\n\t\t\t'Wallis and Futuna',\n\t\t\t'Western Sahara',\n\t\t\t'Yemen',\n\t\t\t'Zambia',\n\t\t\t'Zimbabwe'\n\t\t);\n\t\t\n\t\treturn $countries;\n\t}", "title": "" }, { "docid": "32d5f3389d4ccf2a52b32e8e36d8726d", "score": "0.85404164", "text": "function getCountries();", "title": "" }, { "docid": "35fd994e3f80a0383fe3c5594743abd1", "score": "0.85319555", "text": "public function getCountries();", "title": "" }, { "docid": "3068d755ac72fcc99d93fb18e2645ae5", "score": "0.84889275", "text": "function countryList() {\n $arrClms = array(\n 'country_id',\n 'name',\n );\n $varOrderBy = 'name ASC ';\n $arrRes = $this->select(TABLE_COUNTRY, $arrClms);\n //pre($arrRes);\n return $arrRes;\n }", "title": "" }, { "docid": "167a9c158b4132484090ac6951c3e562", "score": "0.84800965", "text": "function countries_list(){\n\t\n\t\t$sql=\"SELECT * FROM \".$this->prefix().\"countries \";\n\t\treturn $this->query($sql);\n\t}", "title": "" }, { "docid": "2e57544686cd6708d241a086f7a463c6", "score": "0.82524776", "text": "public function all_country_get() {\r\n $response = $this->api_v100_model->get_all_country();\r\n $this->response($response,200);\r\n }", "title": "" }, { "docid": "2b4b167d32ad25955847f14d5097e445", "score": "0.8244237", "text": "function get_country_options()\n {\n clearos_profile(__METHOD__, __LINE__);\n \n $country = new Country();\n return $country->get_list();\n }", "title": "" }, { "docid": "a2a6296e94108a7a3e8357def53f96f1", "score": "0.824301", "text": "public function countrieslist()\n {\n $query = $this->db->get('tbl_country');\n return $query->result();\n }", "title": "" }, { "docid": "c372077d57294fa5f64f564d73de3cdb", "score": "0.8233854", "text": "public function getCountriesList(){\n\t\treturn array (\n\t\t 'AD' => 'Andorra',\n\t\t 'AE' => 'United Arab Emirates',\n\t\t 'AF' => 'Afghanistan',\n\t\t 'AG' => 'Antigua and Barbuda',\n\t\t 'AI' => 'Anguilla',\n\t\t 'AL' => 'Albania',\n\t\t 'AM' => 'Armenia',\n\t\t 'AN' => 'Netherlands Antilles',\n\t\t 'AO' => 'Angola',\n\t\t 'AQ' => 'Antarctica',\n\t\t 'AR' => 'Argentina',\n\t\t 'AS' => 'American Samoa',\n\t\t 'AT' => 'Austria',\n\t\t 'AU' => 'Australia',\n\t\t 'AW' => 'Aruba',\n\t\t 'AX' => 'Åland Islands',\n\t\t 'AZ' => 'Azerbaijan',\n\t\t 'BA' => 'Bosnia and Herzegovina',\n\t\t 'BB' => 'Barbados',\n\t\t 'BD' => 'Bangladesh',\n\t\t 'BE' => 'Belgium',\n\t\t 'BF' => 'Burkina Faso',\n\t\t 'BG' => 'Bulgaria',\n\t\t 'BH' => 'Bahrain',\n\t\t 'BI' => 'Burundi',\n\t\t 'BJ' => 'Benin',\n\t\t 'BL' => 'Saint Barthélemy',\n\t\t 'BM' => 'Bermuda',\n\t\t 'BN' => 'Brunei',\n\t\t 'BO' => 'Bolivia',\n\t\t 'BQ' => 'British Antarctic Territory',\n\t\t 'BR' => 'Brazil',\n\t\t 'BS' => 'Bahamas',\n\t\t 'BT' => 'Bhutan',\n\t\t 'BV' => 'Bouvet Island',\n\t\t 'BW' => 'Botswana',\n\t\t 'BY' => 'Belarus',\n\t\t 'BZ' => 'Belize',\n\t\t 'CA' => 'Canada',\n\t\t 'CC' => 'Cocos [Keeling] Islands',\n\t\t 'CD' => 'Congo - Kinshasa',\n\t\t 'CF' => 'Central African Republic',\n\t\t 'CG' => 'Congo - Brazzaville',\n\t\t 'CH' => 'Switzerland',\n\t\t 'CI' => 'Côte d`Ivoire',\n\t\t 'CK' => 'Cook Islands',\n\t\t 'CL' => 'Chile',\n\t\t 'CM' => 'Cameroon',\n\t\t 'CN' => 'China',\n\t\t 'CO' => 'Colombia',\n\t\t 'CR' => 'Costa Rica',\n\t\t 'CS' => 'Serbia and Montenegro',\n\t\t 'CT' => 'Canton and Enderbury Islands',\n\t\t 'CU' => 'Cuba',\n\t\t 'CV' => 'Cape Verde',\n\t\t 'CX' => 'Christmas Island',\n\t\t 'CY' => 'Cyprus',\n\t\t 'CZ' => 'Czech Republic',\n\t\t 'DD' => 'East Germany',\n\t\t 'DE' => 'Germany',\n\t\t 'DJ' => 'Djibouti',\n\t\t 'DK' => 'Denmark',\n\t\t 'DM' => 'Dominica',\n\t\t 'DO' => 'Dominican Republic',\n\t\t 'DZ' => 'Algeria',\n\t\t 'EC' => 'Ecuador',\n\t\t 'EE' => 'Estonia',\n\t\t 'EG' => 'Egypt',\n\t\t 'EH' => 'Western Sahara',\n\t\t 'ER' => 'Eritrea',\n\t\t 'ES' => 'Spain',\n\t\t 'ET' => 'Ethiopia',\n\t\t 'FI' => 'Finland',\n\t\t 'FJ' => 'Fiji',\n\t\t 'FK' => 'Falkland Islands',\n\t\t 'FM' => 'Micronesia',\n\t\t 'FO' => 'Faroe Islands',\n\t\t 'FQ' => 'French Southern and Antarctic Territories',\n\t\t 'FR' => 'France',\n\t\t 'FX' => 'Metropolitan France',\n\t\t 'GA' => 'Gabon',\n\t\t 'GB' => 'United Kingdom',\n\t\t 'GD' => 'Grenada',\n\t\t 'GE' => 'Georgia',\n\t\t 'GF' => 'French Guiana',\n\t\t 'GG' => 'Guernsey',\n\t\t 'GH' => 'Ghana',\n\t\t 'GI' => 'Gibraltar',\n\t\t 'GL' => 'Greenland',\n\t\t 'GM' => 'Gambia',\n\t\t 'GN' => 'Guinea',\n\t\t 'GP' => 'Guadeloupe',\n\t\t 'GQ' => 'Equatorial Guinea',\n\t\t 'GR' => 'Greece',\n\t\t 'GS' => 'South Georgia and the South Sandwich Islands',\n\t\t 'GT' => 'Guatemala',\n\t\t 'GU' => 'Guam',\n\t\t 'GW' => 'Guinea-Bissau',\n\t\t 'GY' => 'Guyana',\n\t\t 'HK' => 'Hong Kong SAR China',\n\t\t 'HM' => 'Heard Island and McDonald Islands',\n\t\t 'HN' => 'Honduras',\n\t\t 'HR' => 'Croatia',\n\t\t 'HT' => 'Haiti',\n\t\t 'HU' => 'Hungary',\n\t\t 'ID' => 'Indonesia',\n\t\t 'IE' => 'Ireland',\n\t\t 'IL' => 'Israel',\n\t\t 'IM' => 'Isle of Man',\n\t\t 'IN' => 'India',\n\t\t 'IO' => 'British Indian Ocean Territory',\n\t\t 'IQ' => 'Iraq',\n\t\t 'IR' => 'Iran',\n\t\t 'IS' => 'Iceland',\n\t\t 'IT' => 'Italy',\n\t\t 'JE' => 'Jersey',\n\t\t 'JM' => 'Jamaica',\n\t\t 'JO' => 'Jordan',\n\t\t 'JP' => 'Japan',\n\t\t 'JT' => 'Johnston Island',\n\t\t 'KE' => 'Kenya',\n\t\t 'KG' => 'Kyrgyzstan',\n\t\t 'KH' => 'Cambodia',\n\t\t 'KI' => 'Kiribati',\n\t\t 'KM' => 'Comoros',\n\t\t 'KN' => 'Saint Kitts and Nevis',\n\t\t 'KP' => 'North Korea',\n\t\t 'KR' => 'South Korea',\n\t\t 'KW' => 'Kuwait',\n\t\t 'KY' => 'Cayman Islands',\n\t\t 'KZ' => 'Kazakhstan',\n\t\t 'LA' => 'Laos',\n\t\t 'LB' => 'Lebanon',\n\t\t 'LC' => 'Saint Lucia',\n\t\t 'LI' => 'Liechtenstein',\n\t\t 'LK' => 'Sri Lanka',\n\t\t 'LR' => 'Liberia',\n\t\t 'LS' => 'Lesotho',\n\t\t 'LT' => 'Lithuania',\n\t\t 'LU' => 'Luxembourg',\n\t\t 'LV' => 'Latvia',\n\t\t 'LY' => 'Libya',\n\t\t 'MA' => 'Morocco',\n\t\t 'MC' => 'Monaco',\n\t\t 'MD' => 'Moldova',\n\t\t 'ME' => 'Montenegro',\n\t\t 'MF' => 'Saint Martin',\n\t\t 'MG' => 'Madagascar',\n\t\t 'MH' => 'Marshall Islands',\n\t\t 'MI' => 'Midway Islands',\n\t\t 'MK' => 'Macedonia',\n\t\t 'ML' => 'Mali',\n\t\t 'MM' => 'Myanmar [Burma]',\n\t\t 'MN' => 'Mongolia',\n\t\t 'MO' => 'Macau SAR China',\n\t\t 'MP' => 'Northern Mariana Islands',\n\t\t 'MQ' => 'Martinique',\n\t\t 'MR' => 'Mauritania',\n\t\t 'MS' => 'Montserrat',\n\t\t 'MT' => 'Malta',\n\t\t 'MU' => 'Mauritius',\n\t\t 'MV' => 'Maldives',\n\t\t 'MW' => 'Malawi',\n\t\t 'MX' => 'Mexico',\n\t\t 'MY' => 'Malaysia',\n\t\t 'MZ' => 'Mozambique',\n\t\t 'NA' => 'Namibia',\n\t\t 'NC' => 'New Caledonia',\n\t\t 'NE' => 'Niger',\n\t\t 'NF' => 'Norfolk Island',\n\t\t 'NG' => 'Nigeria',\n\t\t 'NI' => 'Nicaragua',\n\t\t 'NL' => 'Netherlands',\n\t\t 'NO' => 'Norway',\n\t\t 'NP' => 'Nepal',\n\t\t 'NQ' => 'Dronning Maud Land',\n\t\t 'NR' => 'Nauru',\n\t\t 'NT' => 'Neutral Zone',\n\t\t 'NU' => 'Niue',\n\t\t 'NZ' => 'New Zealand',\n\t\t 'OM' => 'Oman',\n\t\t 'PA' => 'Panama',\n\t\t 'PC' => 'Pacific Islands Trust Territory',\n\t\t 'PE' => 'Peru',\n\t\t 'PF' => 'French Polynesia',\n\t\t 'PG' => 'Papua New Guinea',\n\t\t 'PH' => 'Philippines',\n\t\t 'PK' => 'Pakistan',\n\t\t 'PL' => 'Poland',\n\t\t 'PM' => 'Saint Pierre and Miquelon',\n\t\t 'PN' => 'Pitcairn Islands',\n\t\t 'PR' => 'Puerto Rico',\n\t\t 'PS' => 'Palestinian Territories',\n\t\t 'PT' => 'Portugal',\n\t\t 'PU' => 'U.S. Miscellaneous Pacific Islands',\n\t\t 'PW' => 'Palau',\n\t\t 'PY' => 'Paraguay',\n\t\t 'PZ' => 'Panama Canal Zone',\n\t\t 'QA' => 'Qatar',\n\t\t 'RE' => 'Réunion',\n\t\t 'RO' => 'Romania',\n\t\t 'RS' => 'Serbia',\n\t\t 'RU' => 'Russia',\n\t\t 'RW' => 'Rwanda',\n\t\t 'SA' => 'Saudi Arabia',\n\t\t 'SB' => 'Solomon Islands',\n\t\t 'SC' => 'Seychelles',\n\t\t 'SD' => 'Sudan',\n\t\t 'SE' => 'Sweden',\n\t\t 'SG' => 'Singapore',\n\t\t 'SH' => 'Saint Helena',\n\t\t 'SI' => 'Slovenia',\n\t\t 'SJ' => 'Svalbard and Jan Mayen',\n\t\t 'SK' => 'Slovakia',\n\t\t 'SL' => 'Sierra Leone',\n\t\t 'SM' => 'San Marino',\n\t\t 'SN' => 'Senegal',\n\t\t 'SO' => 'Somalia',\n\t\t 'SR' => 'Suriname',\n\t\t 'ST' => 'São Tomé and Príncipe',\n\t\t 'SU' => 'Union of Soviet Socialist Republics',\n\t\t 'SV' => 'El Salvador',\n\t\t 'SY' => 'Syria',\n\t\t 'SZ' => 'Swaziland',\n\t\t 'TC' => 'Turks and Caicos Islands',\n\t\t 'TD' => 'Chad',\n\t\t 'TF' => 'French Southern Territories',\n\t\t 'TG' => 'Togo',\n\t\t 'TH' => 'Thailand',\n\t\t 'TJ' => 'Tajikistan',\n\t\t 'TK' => 'Tokelau',\n\t\t 'TL' => 'Timor-Leste',\n\t\t 'TM' => 'Turkmenistan',\n\t\t 'TN' => 'Tunisia',\n\t\t 'TO' => 'Tonga',\n\t\t 'TR' => 'Turkey',\n\t\t 'TT' => 'Trinidad and Tobago',\n\t\t 'TV' => 'Tuvalu',\n\t\t 'TW' => 'Taiwan',\n\t\t 'TZ' => 'Tanzania',\n\t\t 'UA' => 'Ukraine',\n\t\t 'UG' => 'Uganda',\n\t\t 'UM' => 'U.S. Minor Outlying Islands',\n\t\t 'US' => 'United States',\n\t\t 'UY' => 'Uruguay',\n\t\t 'UZ' => 'Uzbekistan',\n\t\t 'VA' => 'Vatican City',\n\t\t 'VC' => 'Saint Vincent and the Grenadines',\n\t\t 'VD' => 'North Vietnam',\n\t\t 'VE' => 'Venezuela',\n\t\t 'VG' => 'British Virgin Islands',\n\t\t 'VI' => 'U.S. Virgin Islands',\n\t\t 'VN' => 'Vietnam',\n\t\t 'VU' => 'Vanuatu',\n\t\t 'WF' => 'Wallis and Futuna',\n\t\t 'WK' => 'Wake Island',\n\t\t 'WS' => 'Samoa',\n\t\t 'YD' => 'People\\'s Democratic Republic of Yemen',\n\t\t 'YE' => 'Yemen',\n\n\t\t 'YT' => 'Mayotte',\n\t\t 'ZA' => 'South Africa',\n\t\t 'ZM' => 'Zambia',\n\t\t 'ZW' => 'Zimbabwe',\n\t\t 'ZZ' => 'Unknown or Invalid Region',\n\t\t);\n\t}", "title": "" }, { "docid": "0448fee6968136d0a329752c964271de", "score": "0.8231819", "text": "public function get_country_list(){\n\t\t $this->table = 'tbl_cat_country';\n\t\t \n\t\t $result = json_encode($this->select_all());\n\t\t return $result;\n\t\t}", "title": "" }, { "docid": "6d2328087449b3ae9b8eb721d2bb82b3", "score": "0.81776905", "text": "function getCountryList() {\n\n\t\tAPP::import('Model','Country');\n\n\t\t$this->Country = new Country(); \n\n\t\treturn $this->Country->find('list',array('fields'=>array('id','name'),'order'=>array('name')));\n\n\t}", "title": "" }, { "docid": "2a2fc44771dac60010cce66986c90d6d", "score": "0.813252", "text": "public static function getCountryList()\n {\n return [\n 'AF' => 'Afghanistan',\n 'AX' => 'Åland Islands',\n 'AL' => 'Albania',\n 'DZ' => 'Algeria',\n 'AS' => 'American Samoa',\n 'AD' => 'Andorra',\n 'AO' => 'Angola',\n 'AI' => 'Anguilla',\n 'AQ' => 'Antarctica',\n 'AG' => 'Antigua & Barbuda',\n 'AR' => 'Argentina',\n 'AM' => 'Armenia',\n 'AW' => 'Aruba',\n 'AC' => 'Ascension Island',\n 'AU' => 'Australia',\n 'AT' => 'Austria',\n 'AZ' => 'Azerbaijan',\n 'BS' => 'Bahamas',\n 'BH' => 'Bahrain',\n 'BD' => 'Bangladesh',\n 'BB' => 'Barbados',\n 'BY' => 'Belarus',\n 'BE' => 'Belgium',\n 'BZ' => 'Belize',\n 'BJ' => 'Benin',\n 'BM' => 'Bermuda',\n 'BT' => 'Bhutan',\n 'BO' => 'Bolivia',\n 'BA' => 'Bosnia & Herzegovina',\n 'BW' => 'Botswana',\n 'BR' => 'Brazil',\n 'IO' => 'British Indian Ocean Territory',\n 'VG' => 'British Virgin Islands',\n 'BN' => 'Brunei',\n 'BG' => 'Bulgaria',\n 'BF' => 'Burkina Faso',\n 'BI' => 'Burundi',\n 'KH' => 'Cambodia',\n 'CM' => 'Cameroon',\n 'CA' => 'Canada',\n 'IC' => 'Canary Islands',\n 'CV' => 'Cape Verde',\n 'BQ' => 'Caribbean Netherlands',\n 'KY' => 'Cayman Islands',\n 'CF' => 'Central African Republic',\n 'EA' => 'Ceuta & Melilla',\n 'TD' => 'Chad',\n 'CL' => 'Chile',\n 'CN' => 'China',\n 'CX' => 'Christmas Island',\n 'CC' => 'Cocos (Keeling) Islands',\n 'CO' => 'Colombia',\n 'KM' => 'Comoros',\n 'CG' => 'Congo - Brazzaville',\n 'CD' => 'Congo - Kinshasa',\n 'CK' => 'Cook Islands',\n 'CR' => 'Costa Rica',\n 'CI' => 'Côte d’Ivoire',\n 'HR' => 'Croatia',\n 'CU' => 'Cuba',\n 'CW' => 'Curaçao',\n 'CY' => 'Cyprus',\n 'CZ' => 'Czech Republic',\n 'DK' => 'Denmark',\n 'DG' => 'Diego Garcia',\n 'DJ' => 'Djibouti',\n 'DM' => 'Dominica',\n 'DO' => 'Dominican Republic',\n 'EC' => 'Ecuador',\n 'EG' => 'Egypt',\n 'SV' => 'El Salvador',\n 'GQ' => 'Equatorial Guinea',\n 'ER' => 'Eritrea',\n 'EE' => 'Estonia',\n 'ET' => 'Ethiopia',\n 'FK' => 'Falkland Islands',\n 'FO' => 'Faroe Islands',\n 'FJ' => 'Fiji',\n 'FI' => 'Finland',\n 'FR' => 'France',\n 'GF' => 'French Guiana',\n 'PF' => 'French Polynesia',\n 'TF' => 'French Southern Territories',\n 'GA' => 'Gabon',\n 'GM' => 'Gambia',\n 'GE' => 'Georgia',\n 'DE' => 'Germany',\n 'GH' => 'Ghana',\n 'GI' => 'Gibraltar',\n 'GR' => 'Greece',\n 'GL' => 'Greenland',\n 'GD' => 'Grenada',\n 'GP' => 'Guadeloupe',\n 'GU' => 'Guam',\n 'GT' => 'Guatemala',\n 'GG' => 'Guernsey',\n 'GN' => 'Guinea',\n 'GW' => 'Guinea-Bissau',\n 'GY' => 'Guyana',\n 'HT' => 'Haiti',\n 'HN' => 'Honduras',\n 'HK' => 'Hong Kong SAR China',\n 'HU' => 'Hungary',\n 'IS' => 'Iceland',\n 'IN' => 'India',\n 'ID' => 'Indonesia',\n 'IR' => 'Iran',\n 'IQ' => 'Iraq',\n 'IE' => 'Ireland',\n 'IM' => 'Isle of Man',\n 'IL' => 'Israel',\n 'IT' => 'Italy',\n 'JM' => 'Jamaica',\n 'JP' => 'Japan',\n 'JE' => 'Jersey',\n 'JO' => 'Jordan',\n 'KZ' => 'Kazakhstan',\n 'KE' => 'Kenya',\n 'KI' => 'Kiribati',\n 'XK' => 'Kosovo',\n 'KW' => 'Kuwait',\n 'KG' => 'Kyrgyzstan',\n 'LA' => 'Laos',\n 'LV' => 'Latvia',\n 'LB' => 'Lebanon',\n 'LS' => 'Lesotho',\n 'LR' => 'Liberia',\n 'LY' => 'Libya',\n 'LI' => 'Liechtenstein',\n 'LT' => 'Lithuania',\n 'LU' => 'Luxembourg',\n 'MO' => 'Macau SAR China',\n 'MK' => 'Macedonia',\n 'MG' => 'Madagascar',\n 'MW' => 'Malawi',\n 'MY' => 'Malaysia',\n 'MV' => 'Maldives',\n 'ML' => 'Mali',\n 'MT' => 'Malta',\n 'MH' => 'Marshall Islands',\n 'MQ' => 'Martinique',\n 'MR' => 'Mauritania',\n 'MU' => 'Mauritius',\n 'YT' => 'Mayotte',\n 'MX' => 'Mexico',\n 'FM' => 'Micronesia',\n 'MD' => 'Moldova',\n 'MC' => 'Monaco',\n 'MN' => 'Mongolia',\n 'ME' => 'Montenegro',\n 'MS' => 'Montserrat',\n 'MA' => 'Morocco',\n 'MZ' => 'Mozambique',\n 'MM' => 'Myanmar (Burma)',\n 'NA' => 'Namibia',\n 'NR' => 'Nauru',\n 'NP' => 'Nepal',\n 'NL' => 'Netherlands',\n 'NC' => 'New Caledonia',\n 'NZ' => 'New Zealand',\n 'NI' => 'Nicaragua',\n 'NE' => 'Niger',\n 'NG' => 'Nigeria',\n 'NU' => 'Niue',\n 'NF' => 'Norfolk Island',\n 'KP' => 'North Korea',\n 'MP' => 'Northern Mariana Islands',\n 'NO' => 'Norway',\n 'OM' => 'Oman',\n 'PK' => 'Pakistan',\n 'PW' => 'Palau',\n 'PS' => 'Palestinian Territories',\n 'PA' => 'Panama',\n 'PG' => 'Papua New Guinea',\n 'PY' => 'Paraguay',\n 'PE' => 'Peru',\n 'PH' => 'Philippines',\n 'PN' => 'Pitcairn Islands',\n 'PL' => 'Poland',\n 'PT' => 'Portugal',\n 'PR' => 'Puerto Rico',\n 'QA' => 'Qatar',\n 'RE' => 'Réunion',\n 'RO' => 'Romania',\n 'RU' => 'Russia',\n 'RW' => 'Rwanda',\n 'WS' => 'Samoa',\n 'SM' => 'San Marino',\n 'ST' => 'São Tomé & Príncipe',\n 'SA' => 'Saudi Arabia',\n 'SN' => 'Senegal',\n 'RS' => 'Serbia',\n 'SC' => 'Seychelles',\n 'SL' => 'Sierra Leone',\n 'SG' => 'Singapore',\n 'SX' => 'Sint Maarten',\n 'SK' => 'Slovakia',\n 'SI' => 'Slovenia',\n 'SB' => 'Solomon Islands',\n 'SO' => 'Somalia',\n 'ZA' => 'South Africa',\n 'GS' => 'South Georgia & South Sandwich Islands',\n 'KR' => 'South Korea',\n 'SS' => 'South Sudan',\n 'ES' => 'Spain',\n 'LK' => 'Sri Lanka',\n 'BL' => 'St. Barthélemy',\n 'SH' => 'St. Helena',\n 'KN' => 'St. Kitts & Nevis',\n 'LC' => 'St. Lucia',\n 'MF' => 'St. Martin',\n 'PM' => 'St. Pierre & Miquelon',\n 'VC' => 'St. Vincent & Grenadines',\n 'SD' => 'Sudan',\n 'SR' => 'Suriname',\n 'SJ' => 'Svalbard & Jan Mayen',\n 'SZ' => 'Swaziland',\n 'SE' => 'Sweden',\n 'CH' => 'Switzerland',\n 'SY' => 'Syria',\n 'TW' => 'Taiwan',\n 'TJ' => 'Tajikistan',\n 'TZ' => 'Tanzania',\n 'TH' => 'Thailand',\n 'TL' => 'Timor-Leste',\n 'TG' => 'Togo',\n 'TK' => 'Tokelau',\n 'TO' => 'Tonga',\n 'TT' => 'Trinidad & Tobago',\n 'TA' => 'Tristan da Cunha',\n 'TN' => 'Tunisia',\n 'TR' => 'Turkey',\n 'TM' => 'Turkmenistan',\n 'TC' => 'Turks & Caicos Islands',\n 'TV' => 'Tuvalu',\n 'UM' => 'U.S. Outlying Islands',\n 'VI' => 'U.S. Virgin Islands',\n 'UG' => 'Uganda',\n 'UA' => 'Ukraine',\n 'AE' => 'United Arab Emirates',\n 'GB' => 'United Kingdom',\n 'US' => 'United States',\n 'UY' => 'Uruguay',\n 'UZ' => 'Uzbekistan',\n 'VU' => 'Vanuatu',\n 'VA' => 'Vatican City',\n 'VE' => 'Venezuela',\n 'VN' => 'Vietnam',\n 'WF' => 'Wallis & Futuna',\n 'EH' => 'Western Sahara',\n 'YE' => 'Yemen',\n 'ZM' => 'Zambia',\n 'ZW' => 'Zimbabwe',\n ];\n }", "title": "" }, { "docid": "5182caa5c37bf7acdf8c1895eb25c68f", "score": "0.8040794", "text": "private function _getCountryList(){\n\t\t$sql = \"SELECT * FROM iso_countries ORDER BY countryName\";\n\t\t$query = mysql_query($sql);\n\t\t$listOfCountries = array();\n\t\t$counter=0;\n\t\twhile($row = mysql_fetch_array($query)){\n\t\t\t$listOfCountries[$counter]=smCountries::_processRow($row);\n\t\t\t$counter++;\n\t\t}\t\n\t\treturn($listOfCountries);\n\t}", "title": "" }, { "docid": "75f15578aee1aad4f944ee6cd0e6f7ed", "score": "0.80196476", "text": "public function countries() {\n $country_data = [];\n try {\n // Do service call and build out the return data.\n $response = $this->client->get('api/codeset/countries');\n $json_data = Json::decode($response->getBody());\n foreach ($json_data as $row) {\n // For options...\n $country_data[$row[\"countryCodeTwoChar\"]] = $row[\"description\"];\n }\n } catch (RequestException $exception) {\n $msg = t(\"Failed to retrieve country field data: :code - :msg\", [\":code\" => $exception->getCode(), \":msg\" => $exception->getMessage()]);\n \\Drupal::logger('asu_degree_rfi')->error($msg);\n \\Drupal::messenger()->addError(t('Please try again in 5 minutes.') . ' ' . $msg);\n }\n return $country_data;\n }", "title": "" }, { "docid": "7186ea2dd481437f14227641d377d438", "score": "0.78292054", "text": "public function getCountryList() {\n $this->db->select('cm_country_code CM_COUNTRY_CODE, cm_country_desc CM_COUNTRY_DESC');\n $this->db->from('ims_hris.country_main');\n $this->db->order_by(\"CM_COUNTRY_DESC\");\n $q = $this->db->get();\n\t\t \n return $q->result();\n }", "title": "" }, { "docid": "af8a0881b4efe14779735618fd5c15e4", "score": "0.78270227", "text": "public function getCountry();", "title": "" }, { "docid": "af8a0881b4efe14779735618fd5c15e4", "score": "0.78270227", "text": "public function getCountry();", "title": "" }, { "docid": "af8a0881b4efe14779735618fd5c15e4", "score": "0.78270227", "text": "public function getCountry();", "title": "" }, { "docid": "af8a0881b4efe14779735618fd5c15e4", "score": "0.78270227", "text": "public function getCountry();", "title": "" }, { "docid": "af8a0881b4efe14779735618fd5c15e4", "score": "0.78270227", "text": "public function getCountry();", "title": "" }, { "docid": "7f407aa49c6828674dc0d29cd2cf0b7e", "score": "0.7793257", "text": "function countriesList(){\n\t\treturn array(\"Afghanistan\",\"Albania\",\"Algeria\",\"Andorra\",\"Angola\",\"Antigua and Barbuda\",\"Argentina\",\"Armenia\",\"Australia\",\"Austria\",\"Azerbaijan\",\"Bahamas\",\"Bahrain\",\"Bangladesh\",\"Barbados\",\"Belarus\",\"Belgium\",\"Belize\",\"Benin\",\"Bhutan\",\"Bolivia\",\"Bosnia and Herzegovina\",\"Botswana\",\"Brazil\",\"Brunei\",\"Bulgaria\",\"Burkina Faso\",\"Burundi\",\"Cambodia\",\"Cameroon\",\"Canada\",\"Cape Verde\",\"Central African Republic\",\"Chad\",\"Chile\",\"China\",\"Colombi\",\"Comoros\",\"Congo (Brazzaville)\",\"Congo\",\"Costa Rica\",\"Cote d'Ivoire\",\"Croatia\",\"Cuba\",\"Cyprus\",\"Czech Republic\",\"Denmark\",\"Djibouti\",\"Dominica\",\"Dominican Republic\",\"East Timor (Timor Timur)\",\"Ecuador\",\"Egypt\",\"El Salvador\",\"Equatorial Guinea\",\"Eritrea\",\"Estonia\",\"Ethiopia\",\"Fiji\",\"Finland\",\"France\",\"Gabon\",\"Gambia, The\",\"Georgia\",\"Germany\",\"Ghana\",\"Greece\",\"Grenada\",\"Guatemala\",\"Guinea\",\"Guinea-Bissau\",\"Guyana\",\"Haiti\",\"Honduras\",\"Hungary\",\"Iceland\",\"India\",\"Indonesia\",\"Iran\",\"Iraq\",\"Ireland\",\"Israel\",\"Italy\",\"Jamaica\",\"Japan\",\"Jordan\",\"Kazakhstan\",\"Kenya\",\"Kiribati\",\"Korea, North\",\"Korea, South\",\"Kuwait\",\"Kyrgyzstan\",\"Laos\",\"Latvia\",\"Lebanon\",\"Lesotho\",\"Liberia\",\"Libya\",\"Liechtenstein\",\"Lithuania\",\"Luxembourg\",\"Macedonia\",\"Madagascar\",\"Malawi\",\"Malaysia\",\"Maldives\",\"Mali\",\"Malta\",\"Marshall Islands\",\"Mauritania\",\"Mauritius\",\"Mexico\",\"Micronesia\",\"Moldova\",\"Monaco\",\"Mongolia\",\"Morocco\",\"Mozambique\",\"Myanmar\",\"Namibia\",\"Nauru\",\"Nepa\",\"Netherlands\",\"New Zealand\",\"Nicaragua\",\"Niger\",\"Nigeria\",\"Norway\",\"Oman\",\"Pakistan\",\"Palau\",\"Panama\",\"Papua New Guinea\",\"Paraguay\",\"Peru\",\"Philippines\",\"Poland\",\"Portugal\",\"Qatar\",\"Romania\",\"Russia\",\"Rwanda\",\"Saint Kitts and Nevis\",\"Saint Lucia\",\"Saint Vincent\",\"Samoa\",\"San Marino\",\"Sao Tome and Principe\",\"Saudi Arabia\",\"Senegal\",\"Serbia and Montenegro\",\"Seychelles\",\"Sierra Leone\",\"Singapore\",\"Slovakia\",\"Slovenia\",\"Solomon Islands\",\"Somalia\",\"South Africa\",\"Spain\",\"Sri Lanka\",\"Sudan\",\"Suriname\",\"Swaziland\",\"Sweden\",\"Switzerland\",\"Syria\",\"Taiwan\",\"Tajikistan\",\"Tanzania\",\"Thailand\",\"Togo\",\"Tonga\",\"Trinidad and Tobago\",\"Tunisia\",\"Turkey\",\"Turkmenistan\",\"Tuvalu\",\"Uganda\",\"Ukraine\",\"United Arab Emirates\",\"United Kingdom\",\"United States\",\"Uruguay\",\"Uzbekistan\",\"Vanuatu\",\"Vatican City\",\"Venezuela\",\"Vietnam\",\"Yemen\",\"Zambia\",\"Zimbabwe\");\n\t}", "title": "" }, { "docid": "498cfc1aabf2b16926a0a980a3f7d37a", "score": "0.7768738", "text": "public static function getCountryOptions();", "title": "" }, { "docid": "b7a4bb4336558b615870700b63e6eb0e", "score": "0.7751577", "text": "public function list_country_codes()\n {\n return $this->fetch_results('/api/s/' . $this->site . '/stat/ccode');\n }", "title": "" }, { "docid": "0f7470f35320e6f5a6993710b35c9f1a", "score": "0.77512", "text": "function list_countries(){\n\treturn array(\n \n\t\"AF\" => \"Afghanistan\",\n\t\"AL\" => \"Albania\",\n\t\"DZ\" => \"Algeria\",\n\t\"AS\" => \"American Samoa\",\n\t\"AD\" => \"Andorra\",\n\t\"AO\" => \"Angola\",\n\t\"AI\" => \"Anguilla\",\n\t\"AQ\" => \"Antarctica\",\n\t\"AG\" => \"Antigua And Barbuda\",\n\t\"AR\" => \"Argentina\",\n\t\"AM\" => \"Armenia\",\n\t\"AW\" => \"Aruba\",\n\t\"AU\" => \"Australia\",\n\t\"AT\" => \"Austria\",\n\t\"AZ\" => \"Azerbaijan\",\n\t\"BS\" => \"Bahamas\",\n\t\"BH\" => \"Bahrain\",\n\t\"BD\" => \"Bangladesh\",\n\t\"BB\" => \"Barbados\",\n\t\"BY\" => \"Belarus\",\n\t\"BE\" => \"Belgium\",\n\t\"BZ\" => \"Belize\",\n\t\"BJ\" => \"Benin\",\n\t\"BM\" => \"Bermuda\",\n\t\"BT\" => \"Bhutan\",\n\t\"BO\" => \"Bolivia\",\n\t\"BA\" => \"Bosnia And Herzegowina\",\n\t\"BW\" => \"Botswana\",\n\t\"BV\" => \"Bouvet Island\",\n\t\"BR\" => \"Brazil\",\n\t\"IO\" => \"British Indian Ocean Territory\",\n\t\"BN\" => \"Brunei Darussalam\",\n\t\"BG\" => \"Bulgaria\",\n\t\"BF\" => \"Burkina Faso\",\n\t\"BI\" => \"Burundi\",\n\t\"KH\" => \"Cambodia\",\n\t\"CM\" => \"Cameroon\",\n\t\"CA\" => \"Canada\",\n\t\"CV\" => \"Cape Verde\",\n\t\"KY\" => \"Cayman Islands\",\n\t\"CF\" => \"Central African Republic\",\n\t\"TD\" => \"Chad\",\n\t\"CL\" => \"Chile\",\n\t\"CN\" => \"China\",\n\t\"CX\" => \"Christmas Island\",\n\t\"CC\" => \"Cocos (Keeling) Islands\",\n\t\"CO\" => \"Colombia\",\n\t\"KM\" => \"Comoros\",\n\t\"CG\" => \"Congo\",\n\t\"CD\" => \"Congo, The Democratic Republic Of The\",\n\t\"CK\" => \"Cook Islands\",\n\t\"CR\" => \"Costa Rica\",\n\t\"CI\" => \"Cote D'Ivoire\",\n\t\"HR\" => \"Croatia (Local Name: Hrvatska)\",\n\t\"CU\" => \"Cuba\",\n\t\"CY\" => \"Cyprus\",\n\t\"CZ\" => \"Czech Republic\",\n\t\"DK\" => \"Denmark\",\n\t\"DJ\" => \"Djibouti\",\n\t\"DM\" => \"Dominica\",\n\t\"DO\" => \"Dominican Republic\",\n\t\"TP\" => \"East Timor\",\n\t\"EC\" => \"Ecuador\",\n\t\"EG\" => \"Egypt\",\n\t\"SV\" => \"El Salvador\",\n\t\"GQ\" => \"Equatorial Guinea\",\n\t\"ER\" => \"Eritrea\",\n\t\"EE\" => \"Estonia\",\n\t\"ET\" => \"Ethiopia\",\n\t\"FK\" => \"Falkland Islands (Malvinas)\",\n\t\"FO\" => \"Faroe Islands\",\n\t\"FJ\" => \"Fiji\",\n\t\"FI\" => \"Finland\",\n\t\"FR\" => \"France\",\n\t\"FX\" => \"France, Metropolitan\",\n\t\"GF\" => \"French Guiana\",\n\t\"PF\" => \"French Polynesia\",\n\t\"TF\" => \"French Southern Territories\",\n\t\"GA\" => \"Gabon\",\n\t\"GM\" => \"Gambia\",\n\t\"GE\" => \"Georgia\",\n\t\"DE\" => \"Germany\",\n\t\"GH\" => \"Ghana\",\n\t\"GI\" => \"Gibraltar\",\n\t\"GR\" => \"Greece\",\n\t\"GL\" => \"Greenland\",\n\t\"GD\" => \"Grenada\",\n\t\"GP\" => \"Guadeloupe\",\n\t\"GU\" => \"Guam\",\n\t\"GT\" => \"Guatemala\",\n\t\"GN\" => \"Guinea\",\n\t\"GW\" => \"Guinea-Bissau\",\n\t\"GY\" => \"Guyana\",\n\t\"HT\" => \"Haiti\",\n\t\"HM\" => \"Heard And Mc Donald Islands\",\n\t\"VA\" => \"Holy See (Vatican City State)\",\n\t\"HN\" => \"Honduras\",\n\t\"HK\" => \"Hong Kong\",\n\t\"HU\" => \"Hungary\",\n\t\"IS\" => \"Iceland\",\n\t\"IN\" => \"India\",\n\t\"ID\" => \"Indonesia\",\n\t\"IR\" => \"Iran (Islamic Republic Of)\",\n\t\"IQ\" => \"Iraq\",\n\t\"IE\" => \"Ireland\",\n\t\"IL\" => \"Israel\",\n\t\"IT\" => \"Italy\",\n\t\"JM\" => \"Jamaica\",\n\t\"JP\" => \"Japan\",\n\t\"JO\" => \"Jordan\",\n\t\"KZ\" => \"Kazakhstan\",\n\t\"KE\" => \"Kenya\",\n\t\"KI\" => \"Kiribati\",\n\t\"KP\" => \"Korea, Democratic People's Republic Of\",\n\t\"KR\" => \"Korea, Republic Of\",\n\t\"KW\" => \"Kuwait\",\n\t\"KG\" => \"Kyrgyzstan\",\n\t\"LA\" => \"Lao People's Democratic Republic\",\n\t\"LV\" => \"Latvia\",\n\t\"LB\" => \"Lebanon\",\n\t\"LS\" => \"Lesotho\",\n\t\"LR\" => \"Liberia\",\n\t\"LY\" => \"Libyan Arab Jamahiriya\",\n\t\"LI\" => \"Liechtenstein\",\n\t\"LT\" => \"Lithuania\",\n\t\"LU\" => \"Luxembourg\",\n\t\"MO\" => \"Macau\",\n\t\"MK\" => \"Macedonia, Former Yugoslav Republic Of\",\n\t\"MG\" => \"Madagascar\",\n\t\"MW\" => \"Malawi\",\n\t\"MY\" => \"Malaysia\",\n\t\"MV\" => \"Maldives\",\n\t\"ML\" => \"Mali\",\n\t\"MT\" => \"Malta\",\n\t\"MH\" => \"Marshall Islands\",\n\t\"MQ\" => \"Martinique\",\n\t\"MR\" => \"Mauritania\",\n\t\"MU\" => \"Mauritius\",\n\t\"YT\" => \"Mayotte\",\n\t\"MX\" => \"Mexico\",\n\t\"FM\" => \"Micronesia, Federated States Of\",\n\t\"MD\" => \"Moldova, Republic Of\",\n\t\"MC\" => \"Monaco\",\n\t\"MN\" => \"Mongolia\",\n\t\"MS\" => \"Montserrat\",\n\t\"MA\" => \"Morocco\",\n\t\"MZ\" => \"Mozambique\",\n\t\"MM\" => \"Myanmar\",\n\t\"NA\" => \"Namibia\",\n\t\"NR\" => \"Nauru\",\n\t\"NP\" => \"Nepal\",\n\t\"NL\" => \"Netherlands\",\n\t\"AN\" => \"Netherlands Antilles\",\n\t\"NC\" => \"New Caledonia\",\n\t\"NZ\" => \"New Zealand\",\n\t\"NI\" => \"Nicaragua\",\n\t\"NE\" => \"Niger\",\n\t\"NG\" => \"Nigeria\",\n\t\"NU\" => \"Niue\",\n\t\"NF\" => \"Norfolk Island\",\n\t\"MP\" => \"Northern Mariana Islands\",\n\t\"NO\" => \"Norway\",\n\t\"OM\" => \"Oman\",\n\t\"PK\" => \"Pakistan\",\n\t\"PW\" => \"Palau\",\n\t\"PA\" => \"Panama\",\n\t\"PG\" => \"Papua New Guinea\",\n\t\"PY\" => \"Paraguay\",\n\t\"PE\" => \"Peru\",\n\t\"PH\" => \"Philippines\",\n\t\"PN\" => \"Pitcairn\",\n\t\"PL\" => \"Poland\",\n\t\"PT\" => \"Portugal\",\n\t\"PR\" => \"Puerto Rico\",\n\t\"QA\" => \"Qatar\",\n\t\"RE\" => \"Reunion\",\n\t\"RO\" => \"Romania\",\n\t\"RU\" => \"Russian Federation\",\n\t\"RW\" => \"Rwanda\",\n\t\"KN\" => \"Saint Kitts And Nevis\",\n\t\"LC\" => \"Saint Lucia\",\n\t\"VC\" => \"Saint Vincent And The Grenadines\",\n\t\"WS\" => \"Samoa\",\n\t\"SM\" => \"San Marino\",\n\t\"ST\" => \"Sao Tome And Principe\",\n\t\"SA\" => \"Saudi Arabia\",\n\t\"SN\" => \"Senegal\",\n\t\"SC\" => \"Seychelles\",\n\t\"SL\" => \"Sierra Leone\",\n\t\"SG\" => \"Singapore\",\n\t\"SK\" => \"Slovakia (Slovak Republic)\",\n\t\"SI\" => \"Slovenia\",\n\t\"SB\" => \"Solomon Islands\",\n\t\"SO\" => \"Somalia\",\n\t\"ZA\" => \"South Africa\",\n\t\"GS\" => \"South Georgia, South Sandwich Islands\",\n\t\"ES\" => \"Spain\",\n\t\"LK\" => \"Sri Lanka\",\n\t\"SH\" => \"St. Helena\",\n\t\"PM\" => \"St. Pierre And Miquelon\",\n\t\"SD\" => \"Sudan\",\n\t\"SR\" => \"Suriname\",\n\t\"SJ\" => \"Svalbard And Jan Mayen Islands\",\n\t\"SZ\" => \"Swaziland\",\n\t\"SE\" => \"Sweden\",\n\t\"CH\" => \"Switzerland\",\n\t\"SY\" => \"Syrian Arab Republic\",\n\t\"TW\" => \"Taiwan\",\n\t\"TJ\" => \"Tajikistan\",\n\t\"TZ\" => \"Tanzania, United Republic Of\",\n\t\"TH\" => \"Thailand\",\n\t\"TG\" => \"Togo\",\n\t\"TK\" => \"Tokelau\",\n\t\"TO\" => \"Tonga\",\n\t\"TT\" => \"Trinidad And Tobago\",\n\t\"TN\" => \"Tunisia\",\n\t\"TR\" => \"Turkey\",\n\t\"TM\" => \"Turkmenistan\",\n\t\"TC\" => \"Turks And Caicos Islands\",\n\t\"TV\" => \"Tuvalu\",\n\t\"UG\" => \"Uganda\",\n\t\"UA\" => \"Ukraine\",\n\t\"AE\" => \"United Arab Emirates\",\n\t\"GB\" => \"United Kingdom\",\n\t\"US\" => \"United States\",\n\t\"UM\" => \"United States Minor Outlying Islands\",\n\t\"UY\" => \"Uruguay\",\n\t\"UZ\" => \"Uzbekistan\",\n\t\"VU\" => \"Vanuatu\",\n\t\"VE\" => \"Venezuela\",\n\t\"VN\" => \"Viet Nam\",\n\t\"VG\" => \"Virgin Islands (British)\",\n\t\"VI\" => \"Virgin Islands (U.S.)\",\n\t\"WF\" => \"Wallis And Futuna Islands\",\n\t\"EH\" => \"Western Sahara\",\n\t\"YE\" => \"Yemen\",\n\t\"YU\" => \"Yugoslavia\",\n\t\"ZM\" => \"Zambia\",\n\t\"ZW\" => \"Zimbabwe\");\n}", "title": "" }, { "docid": "c0bb774cd3975a43de429693cfb0f747", "score": "0.7726917", "text": "function getCountries() {\n\t\treturn $this->getData('countries');\n\t}", "title": "" }, { "docid": "141936b3a4ce9f05821e392cc3c99082", "score": "0.77155566", "text": "public function getSchemeCountries();", "title": "" }, { "docid": "7f0c2c7b49c7a0da580e1bdd79bf06b2", "score": "0.7657486", "text": "public static function getAllCountries(){\r\n $db = new Db();\r\n $tableName = $db->tablePrefix.'countries';\r\n $fileds = \" country_name \";\r\n $where = \" country_name != '' \";\r\n $result = $db->selectQuery(\"SELECT $fileds FROM $tableName WHERE $where\");\r\n return $result;\r\n }", "title": "" }, { "docid": "d0fda16056a561eb23d097da45be6344", "score": "0.76392096", "text": "public function getCountries()\n {\n return [\n \"AF\" => \"Afghanistan\",\n \"AX\" => \"Aland Islands\",\n \"AL\" => \"Albania\",\n \"DZ\" => \"Algeria\",\n \"AS\" => \"American Samoa\",\n \"AD\" => \"Andorra\",\n \"AO\" => \"Angola\",\n \"AI\" => \"Anguilla\",\n \"AQ\" => \"Antarctica\",\n \"AG\" => \"Antigua And Barbuda\",\n \"AR\" => \"Argentina\",\n \"AM\" => \"Armenia\",\n \"AW\" => \"Aruba\",\n \"AU\" => \"Australia\",\n \"AT\" => \"Austria\",\n \"AZ\" => \"Azerbaijan\",\n \"BS\" => \"Bahamas\",\n \"BH\" => \"Bahrain\",\n \"BD\" => \"Bangladesh\",\n \"BB\" => \"Barbados\",\n \"BY\" => \"Belarus\",\n \"BE\" => \"Belgium\",\n \"BZ\" => \"Belize\",\n \"BJ\" => \"Benin\",\n \"BM\" => \"Bermuda\",\n \"BT\" => \"Bhutan\",\n \"BO\" => \"Bolivia\",\n \"BA\" => \"Bosnia And Herzegovina\",\n \"BW\" => \"Botswana\",\n \"BV\" => \"Bouvet Island\",\n \"BR\" => \"Brazil\",\n \"IO\" => \"British Indian Ocean Territory\",\n \"BN\" => \"Brunei Darussalam\",\n \"BG\" => \"Bulgaria\",\n \"BF\" => \"Burkina Faso\",\n \"BI\" => \"Burundi\",\n \"KH\" => \"Cambodia\",\n \"CM\" => \"Cameroon\",\n \"CA\" => \"Canada\",\n \"CV\" => \"Cape Verde\",\n \"KY\" => \"Cayman Islands\",\n \"CF\" => \"Central African Republic\",\n \"TD\" => \"Chad\",\n \"CL\" => \"Chile\",\n \"CN\" => \"China\",\n \"CX\" => \"Christmas Island\",\n \"CC\" => \"Cocos (Keeling) Islands\",\n \"CO\" => \"Colombia\",\n \"KM\" => \"Comoros\",\n \"CG\" => \"Congo\",\n \"CD\" => \"Democratic Republic of Congo\",\n \"CK\" => \"Cook Islands\",\n \"CR\" => \"Costa Rica\",\n \"CI\" => \"Cote D\\\"Ivoire\",\n \"HR\" => \"Croatia\",\n \"CU\" => \"Cuba\",\n \"CY\" => \"Cyprus\",\n \"CZ\" => \"Czech Republic\",\n \"DK\" => \"Denmark\",\n \"DJ\" => \"Djibouti\",\n \"DM\" => \"Dominica\",\n \"DO\" => \"Dominican Republic\",\n \"EC\" => \"Ecuador\",\n \"EG\" => \"Egypt\",\n \"SV\" => \"El Salvador\",\n \"GQ\" => \"Equatorial Guinea\",\n \"ER\" => \"Eritrea\",\n \"EE\" => \"Estonia\",\n \"ET\" => \"Ethiopia\",\n \"FK\" => \"Falkland Islands (Malvinas)\",\n \"FO\" => \"Faroe Islands\",\n \"FJ\" => \"Fiji\",\n \"FI\" => \"Finland\",\n \"FR\" => \"France\",\n \"GF\" => \"French Guiana\",\n \"PF\" => \"French Polynesia\",\n \"TF\" => \"French Southern Territories\",\n \"GA\" => \"Gabon\",\n \"GM\" => \"Gambia\",\n \"GE\" => \"Georgia\",\n \"DE\" => \"Germany\",\n \"GH\" => \"Ghana\",\n \"GI\" => \"Gibraltar\",\n \"GR\" => \"Greece\",\n \"GL\" => \"Greenland\",\n \"GD\" => \"Grenada\",\n \"GP\" => \"Guadeloupe\",\n \"GU\" => \"Guam\",\n \"GT\" => \"Guatemala\",\n \"GG\" => \"Guernsey\",\n \"GN\" => \"Guinea\",\n \"GW\" => \"Guinea-Bissau\",\n \"GY\" => \"Guyana\",\n \"HT\" => \"Haiti\",\n \"HM\" => \"Heard Island & Mcdonald Islands\",\n \"VA\" => \"Holy See (Vatican City State)\",\n \"HN\" => \"Honduras\",\n \"HK\" => \"Hong Kong\",\n \"HU\" => \"Hungary\",\n \"IS\" => \"Iceland\",\n \"IN\" => \"India\",\n \"ID\" => \"Indonesia\",\n \"IR\" => \"Islamic Republic Of Iran\",\n \"IQ\" => \"Iraq\",\n \"IE\" => \"Ireland\",\n \"IM\" => \"Isle Of Man\",\n \"IL\" => \"Israel\",\n \"IT\" => \"Italy\",\n \"JM\" => \"Jamaica\",\n \"JP\" => \"Japan\",\n \"JE\" => \"Jersey\",\n \"JO\" => \"Jordan\",\n \"KZ\" => \"Kazakhstan\",\n \"KE\" => \"Kenya\",\n \"KI\" => \"Kiribati\",\n \"KR\" => \"Korea\",\n \"XK\" => \"Kosovo\",\n \"KW\" => \"Kuwait\",\n \"KG\" => \"Kyrgyzstan\",\n \"KP\" => \"North Korea\",\n \"LA\" => \"Lao People\\\"s Democratic Republic\",\n \"LV\" => \"Latvia\",\n \"LB\" => \"Lebanon\",\n \"LS\" => \"Lesotho\",\n \"LR\" => \"Liberia\",\n \"LY\" => \"Libyan Arab Jamahiriya\",\n \"LI\" => \"Liechtenstein\",\n \"LT\" => \"Lithuania\",\n \"LU\" => \"Luxembourg\",\n \"MO\" => \"Macao\",\n \"MK\" => \"Macedonia\",\n \"MG\" => \"Madagascar\",\n \"MW\" => \"Malawi\",\n \"MY\" => \"Malaysia\",\n \"MV\" => \"Maldives\",\n \"ML\" => \"Mali\",\n \"MT\" => \"Malta\",\n \"MH\" => \"Marshall Islands\",\n \"MQ\" => \"Martinique\",\n \"MR\" => \"Mauritania\",\n \"MU\" => \"Mauritius\",\n \"YT\" => \"Mayotte\",\n \"MX\" => \"Mexico\",\n \"FM\" => \"Federated States Of Micronesia\",\n \"MD\" => \"Moldova\",\n \"MC\" => \"Monaco\",\n \"MN\" => \"Mongolia\",\n \"ME\" => \"Montenegro\",\n \"MS\" => \"Montserrat\",\n \"MA\" => \"Morocco\",\n \"MZ\" => \"Mozambique\",\n \"MM\" => \"Myanmar\",\n \"NA\" => \"Namibia\",\n \"NR\" => \"Nauru\",\n \"NP\" => \"Nepal\",\n \"NL\" => \"Netherlands\",\n \"AN\" => \"Netherlands Antilles\",\n \"NC\" => \"New Caledonia\",\n \"NZ\" => \"New Zealand\",\n \"NI\" => \"Nicaragua\",\n \"NE\" => \"Niger\",\n \"NG\" => \"Nigeria\",\n \"NU\" => \"Niue\",\n \"NF\" => \"Norfolk Island\",\n \"MP\" => \"Northern Mariana Islands\",\n \"NO\" => \"Norway\",\n \"OM\" => \"Oman\",\n \"PK\" => \"Pakistan\",\n \"PW\" => \"Palau\",\n \"PS\" => \"Palestinian Territory, Occupied\",\n \"PA\" => \"Panama\",\n \"PG\" => \"Papua New Guinea\",\n \"PY\" => \"Paraguay\",\n \"PE\" => \"Peru\",\n \"PH\" => \"Philippines\",\n \"PN\" => \"Pitcairn\",\n \"PL\" => \"Poland\",\n \"PT\" => \"Portugal\",\n \"PR\" => \"Puerto Rico\",\n \"QA\" => \"Qatar\",\n \"RE\" => \"Reunion\",\n \"RO\" => \"Romania\",\n \"RU\" => \"Russian Federation\",\n \"RW\" => \"Rwanda\",\n \"BL\" => \"Saint Barthelemy\",\n \"SH\" => \"Saint Helena\",\n \"KN\" => \"Saint Kitts And Nevis\",\n \"LC\" => \"Saint Lucia\",\n \"MF\" => \"Saint Martin\",\n \"PM\" => \"Saint Pierre And Miquelon\",\n \"VC\" => \"Saint Vincent And Grenadines\",\n \"WS\" => \"Samoa\",\n \"SM\" => \"San Marino\",\n \"ST\" => \"Sao Tome And Principe\",\n \"SA\" => \"Saudi Arabia\",\n \"SN\" => \"Senegal\",\n \"RS\" => \"Serbia\",\n \"SC\" => \"Seychelles\",\n \"SL\" => \"Sierra Leone\",\n \"SG\" => \"Singapore\",\n \"SK\" => \"Slovakia\",\n \"SI\" => \"Slovenia\",\n \"SB\" => \"Solomon Islands\",\n \"SO\" => \"Somalia\",\n \"XS\" => \"Somaliland\",\n \"ZA\" => \"South Africa\",\n \"GS\" => \"South Georgia And Sandwich Isl.\",\n \"SS\" => \"South Sudan\",\n \"ES\" => \"Spain\",\n \"LK\" => \"Sri Lanka\",\n \"SD\" => \"Sudan\",\n \"SR\" => \"Suriname\",\n \"SJ\" => \"Svalbard And Jan Mayen\",\n \"SZ\" => \"Swaziland\",\n \"SE\" => \"Sweden\",\n \"CH\" => \"Switzerland\",\n \"SY\" => \"Syrian Arab Republic\",\n \"TW\" => \"Taiwan\",\n \"TJ\" => \"Tajikistan\",\n \"TZ\" => \"Tanzania\",\n \"TH\" => \"Thailand\",\n \"TL\" => \"Timor-Leste\",\n \"TG\" => \"Togo\",\n \"TK\" => \"Tokelau\",\n \"TO\" => \"Tonga\",\n \"TT\" => \"Trinidad And Tobago\",\n \"TN\" => \"Tunisia\",\n \"TR\" => \"Turkey\",\n \"TM\" => \"Turkmenistan\",\n \"TC\" => \"Turks And Caicos Islands\",\n \"TV\" => \"Tuvalu\",\n \"UG\" => \"Uganda\",\n \"UA\" => \"Ukraine\",\n \"AE\" => \"United Arab Emirates\",\n \"GB\" => \"United Kingdom\",\n \"US\" => \"United States\",\n \"UM\" => \"United States Outlying Islands\",\n \"UY\" => \"Uruguay\",\n \"UZ\" => \"Uzbekistan\",\n \"VU\" => \"Vanuatu\",\n \"VE\" => \"Venezuela\",\n \"VN\" => \"Viet Nam\",\n \"VG\" => \"Virgin Islands, British\",\n \"VI\" => \"Virgin Islands, U.S.\",\n \"WF\" => \"Wallis And Futuna\",\n \"EH\" => \"Western Sahara\",\n \"YE\" => \"Yemen\",\n \"ZM\" => \"Zambia\",\n \"ZW\" => \"Zimbabwe\",\n \"X\" => \"Unknown\"\n ];\n }", "title": "" }, { "docid": "a01a1e89998f30afcc8ea69e77675fc1", "score": "0.7632675", "text": "public function countries()\n {\n return $this->countries;\n }", "title": "" }, { "docid": "5be9481dc731589e7d47292a549af839", "score": "0.7627043", "text": "public function get_countries() {\r\n\t\tif ( empty( $this->countries ) ) {\r\n\t\t\t$this->countries = apply_filters( 'charitable_countries', include( charitable()->get_path('directory') . 'i18n/countries.php' ) );\t\r\n\t\t}\t\r\n\r\n\t\treturn $this->countries;\r\n\t}", "title": "" }, { "docid": "8e65d3474854d5432a0cd42cf51392b5", "score": "0.7585542", "text": "function google_geocode_country_list() {\n return array(\n /* Albania */ 'al',\n /* Argentina */ 'ar',\n /* Australia */ 'au',\n /* Austria */ 'at',\n /* Belarus */ 'by',\n /* Belgium */ 'be',\n /* Bosnia and Herzegovina */ 'ba',\n /* Brazil */ 'br',\n /* Bulgaria */ 'bg',\n /* Canada */ 'ca',\n /* Chile */ 'cl',\n /* China */ 'cn',\n /* Croatia */ 'hr',\n /* Czech Republic */ 'cz',\n /* Denmark */ 'dk',\n /* Ecuador */ 'ec',\n /* El Salvador */ 'sv',\n /* Estonia */ 'ee',\n /* Finland */ 'fi',\n /* France */ 'fr',\n /* Germany */ 'de',\n /* Greece */ 'gr',\n /* Hong Kong */ 'hk',\n /* Hungary */ 'hu',\n /* India */ 'in',\n /* Ireland */ 'ie',\n /* Italy */ 'it',\n\t/* Israel */ 'il',\n /* Japan */ 'jp',\n /* Kenya */ 'ke',\n /* Latvia */ 'lv',\n /* Lebanon */ 'lb',\n /* Liechtenstein */ 'li',\n /* Lithuania */ 'lt',\n /* Luxembourg */ 'lu',\n /* Macau */ 'mo',\n /* Macedonia */ 'mk',\n /* Malaysia */ 'my',\n /* Mexico */ 'mx',\n /* Moldova */ 'md',\n /* Montenegro */ 'me',\n /* Netherlands */ 'nl',\n /* New Zealand */ 'nz',\n /* Nicaragua */ 'ni',\n /* Norway */ 'no',\n /* Panama */ 'pa',\n /* Poland */ 'pl',\n /* Portugal */ 'pt',\n /* Romania */ 'ro',\n /* Russia */ 'ru',\n /* San Marino */ 'sm',\n /* Serbia */ 'rs',\n /* Singapore */ 'sg',\n /* Slovakia */ 'sk',\n /* Slovenia */ 'si',\n /* South Korea */ 'kr',\n /* Spain */ 'es',\n /* Sweden */ 'se',\n /* Switzerland */ 'ch',\n /* Taiwan */ 'tw',\n /* Thailand */ 'th',\n /* Turkey */ 'tr',\n /* Ukraine */ 'ua',\n /* United Kingdom */ 'uk',\n /* United States */ 'us',\n /* Uruguay */ 'uy',\n );\n}", "title": "" }, { "docid": "84a893a7a54704c4b1ddfd909f4ba4a0", "score": "0.7571444", "text": "public function getCountriesAction()\r\n\t{\r\n\t\t$url = Utils::countryservice();\r\n\t\t$data = Utils::curl($url);\r\n\t\techo $this->responseJson($data);\r\n\t}", "title": "" }, { "docid": "91564c6fe469a45ba1f753fdd934914b", "score": "0.75708574", "text": "function wcorg_get_countries() {\n\trequire_once( WP_PLUGIN_DIR . '/wordcamp-payments/includes/wordcamp-budgets.php' );\n\n\treturn WordCamp_Budgets::get_valid_countries_iso3166();\n}", "title": "" }, { "docid": "50f694ae7c691b8effad6853b5469028", "score": "0.7557485", "text": "public static function country()\n {\n global $json_api;\n try {\n $query = $json_api->query;\n $platform_countries = \"\";\n if (isset($query->platform)) {\n if ($query->platform == 'android') {\n $platform_countries = 'countryandroid';\n } else if ($query->platform == 'ios') {\n $platform_countries = 'countryios_nd';\n }\n } else {\n //that is the countries for the post type rewards\n $platform_countries = 'country';\n }\n $cat_list = new ListTax(array(\n 'type' => APPDISPLAY,\n 'child_of' => 0,\n 'parent' => '',\n 'orderby' => 'name',\n 'order' => 'ASC',\n 'hide_empty' => 0,\n 'hierarchical' => 1,\n 'exclude' => '',\n 'include' => '',\n 'number' => '',\n 'taxonomy' => $platform_countries,\n 'pad_counts' => false\n ));\n $cat_list->listCountry();\n api_handler::outSuccessDataWeSoft($cat_list->getResultArr());\n } catch (Exception $e) {\n api_handler::outFail($e->getCode(), $e->getMessage());\n }\n }", "title": "" }, { "docid": "2fecf32f4008b19c8e2ec14ddbcd35f2", "score": "0.7551781", "text": "public static function getAllCountriesList()\n {\n return CHtml::listData(CitizenType::model()->findAll(), 'id', 'name');\n\t}", "title": "" }, { "docid": "3e890c2f00ab4322c37dccad684ea870", "score": "0.7525022", "text": "function get_countries()\n{\n $iso = (new League\\ISO3166\\ISO3166)->getAll();\n\n return collect($iso)->pluck('name', 'alpha2');\n}", "title": "" }, { "docid": "c1bbda4bd1303fbd39d2042ac1ad13da", "score": "0.7479764", "text": "public function getCountriesData(): CountryCollection;", "title": "" }, { "docid": "362488d4d03bc73585c7c935264e6478", "score": "0.7474433", "text": "public static function GetCountries() {\n\t\tif(empty(self::$_countries)) {\n\t\t\t// From http://en.wikipedia.org/wiki/ISO_3166-2\n\t\t\tself::$_countries = array(\n\t\t\t\t\t'AD' => array('name' => 'Andorra'),\n\t\t\t\t\t'AE' => array('name' => 'United Arab Emirates'),\n\t\t\t\t\t'AF' => array('name' => 'Afghanistan'),\n\t\t\t\t\t'AG' => array('name' => 'Antigua and Barbuda'),\n\t\t\t\t\t'AI' => array('name' => 'Anguilla'),\n\t\t\t\t\t'AL' => array('name' => 'Albania'),\n\t\t\t\t\t'AM' => array('name' => 'Armenia'),\n\t\t\t\t\t'AN' => array('name' => 'Netherlands Antilles'),\n\t\t\t\t\t'AO' => array('name' => 'Angola'),\n\t\t\t\t\t'AQ' => array('name' => 'Antarctica'),\n\t\t\t\t\t'AR' => array('name' => 'Argentina'),\n\t\t\t\t\t'AS' => array('name' => 'American Samoa'),\n\t\t\t\t\t'AT' => array('name' => 'Austria'),\n\t\t\t\t\t'AU' => array('name' => 'Australia'),\n\t\t\t\t\t'AW' => array('name' => 'Aruba'),\n\t\t\t\t\t'AX' => array('name' => 'Åland Islands'),\n\t\t\t\t\t'AZ' => array('name' => 'Azerbaijan'),\n\t\t\t\t\t'BA' => array('name' => 'Bosnia and Herzegovina'),\n\t\t\t\t\t'BB' => array('name' => 'Barbados'),\n\t\t\t\t\t'BD' => array('name' => 'Bangladesh'),\n\t\t\t\t\t'BE' => array('name' => 'Belgium'),\n\t\t\t\t\t'BF' => array('name' => 'Burkina Faso'),\n\t\t\t\t\t'BG' => array('name' => 'Bulgaria'),\n\t\t\t\t\t'BH' => array('name' => 'Bahrain'),\n\t\t\t\t\t'BI' => array('name' => 'Burundi'),\n\t\t\t\t\t'BJ' => array('name' => 'Benin'),\n\t\t\t\t\t'BL' => array('name' => 'Saint Barthélemy'),\n\t\t\t\t\t'BM' => array('name' => 'Bermuda'),\n\t\t\t\t\t'BN' => array('name' => 'Brunei'),\n\t\t\t\t\t'BO' => array('name' => 'Bolivia'),\n\t\t\t\t\t'BR' => array('name' => 'Brazil'),\n\t\t\t\t\t'BS' => array('name' => 'Bahamas'),\n\t\t\t\t\t'BT' => array('name' => 'Bhutan'),\n\t\t\t\t\t'BV' => array('name' => 'Bouvet Island'),\n\t\t\t\t\t'BW' => array('name' => 'Botswana'),\n\t\t\t\t\t'BY' => array('name' => 'Belarus'),\n\t\t\t\t\t'BZ' => array('name' => 'Belize'),\n\t\t\t\t\t'CA' => array('name' => 'Canada'),\n\t\t\t\t\t'CC' => array('name' => 'Cocos Islands'),\n\t\t\t\t\t'CD' => array('name' => 'Congo, Democratic Republic of the'),\n\t\t\t\t\t'CF' => array('name' => 'Central African Republic'),\n\t\t\t\t\t'CG' => array('name' => 'Congo, Republic of the'),\n\t\t\t\t\t'CH' => array('name' => 'Switzerland'),\n\t\t\t\t\t'CI' => array('name' => 'Ivory Coast'),\n\t\t\t\t\t'CK' => array('name' => 'Cook Islands'),\n\t\t\t\t\t'CL' => array('name' => 'Chile'),\n\t\t\t\t\t'CM' => array('name' => 'Cameroon'),\n\t\t\t\t\t'CN' => array('name' => 'China'),\n\t\t\t\t\t'CO' => array('name' => 'Colombia'),\n\t\t\t\t\t'CR' => array('name' => 'Costa Rica'),\n\t\t\t\t\t'CU' => array('name' => 'Cuba'),\n\t\t\t\t\t'CV' => array('name' => 'Cape Verde'),\n\t\t\t\t\t'CX' => array('name' => 'Christmas Island'),\n\t\t\t\t\t'CY' => array('name' => 'Cyprus'),\n\t\t\t\t\t'CZ' => array('name' => 'Czech Republic'),\n\t\t\t\t\t'DE' => array('name' => 'Germany'),\n\t\t\t\t\t'DJ' => array('name' => 'Djibouti'),\n\t\t\t\t\t'DK' => array('name' => 'Denmark'),\n\t\t\t\t\t'DM' => array('name' => 'Dominica'),\n\t\t\t\t\t'DO' => array('name' => 'Dominican Republic'),\n\t\t\t\t\t'DZ' => array('name' => 'Algeria'),\n\t\t\t\t\t'EC' => array('name' => 'Ecuador'),\n\t\t\t\t\t'EE' => array('name' => 'Estonia'),\n\t\t\t\t\t'EG' => array('name' => 'Egypt'),\n\t\t\t\t\t'EH' => array('name' => 'Western Sahara'),\n\t\t\t\t\t'ER' => array('name' => 'Eritrea'),\n\t\t\t\t\t'ES' => array('name' => 'Spain'),\n\t\t\t\t\t'ET' => array('name' => 'Ethiopia'),\n\t\t\t\t\t'FI' => array('name' => 'Finland'),\n\t\t\t\t\t'FJ' => array('name' => 'Fiji'),\n\t\t\t\t\t'FK' => array('name' => 'Falkland Islands'),\n\t\t\t\t\t'FM' => array('name' => 'Micronesia'),\n\t\t\t\t\t'FO' => array('name' => 'Faroe Islands'),\n\t\t\t\t\t'FR' => array('name' => 'France'),\n\t\t\t\t\t'GA' => array('name' => 'Gabon'),\n\t\t\t\t\t'GB' => array('name' => 'United Kingdom'),\n\t\t\t\t\t'GD' => array('name' => 'Grenada'),\n\t\t\t\t\t'GE' => array('name' => 'Georgia'),\n\t\t\t\t\t'GF' => array('name' => 'French Guiana'),\n\t\t\t\t\t'GG' => array('name' => 'Guernsey'),\n\t\t\t\t\t'GH' => array('name' => 'Ghana'),\n\t\t\t\t\t'GI' => array('name' => 'Gibraltar'),\n\t\t\t\t\t'GL' => array('name' => 'Greenland'),\n\t\t\t\t\t'GM' => array('name' => 'Gambia'),\n\t\t\t\t\t'GN' => array('name' => 'Guinea'),\n\t\t\t\t\t'GP' => array('name' => 'Guadeloupe'),\n\t\t\t\t\t'GQ' => array('name' => 'Equatorial Guinea'),\n\t\t\t\t\t'GR' => array('name' => 'Greece'),\n\t\t\t\t\t'GS' => array('name' => 'South Georgia'),\n\t\t\t\t\t'GT' => array('name' => 'Guatemala'),\n\t\t\t\t\t'GU' => array('name' => 'Guam'),\n\t\t\t\t\t'GW' => array('name' => 'Guinea-Bissau'),\n\t\t\t\t\t'GY' => array('name' => 'Guyana'),\n\t\t\t\t\t'HK' => array('name' => 'Hong Kong'),\n\t\t\t\t\t'HM' => array('name' => 'Heard Island and McDonald Islands'),\n\t\t\t\t\t'HN' => array('name' => 'Honduras'),\n\t\t\t\t\t'HR' => array('name' => 'Croatia'),\n\t\t\t\t\t'HT' => array('name' => 'Haiti'),\n\t\t\t\t\t'HU' => array('name' => 'Hungary'),\n\t\t\t\t\t'ID' => array('name' => 'Indonesia'),\n\t\t\t\t\t'IE' => array('name' => 'Ireland'),\n\t\t\t\t\t'IL' => array('name' => 'Israel'),\n\t\t\t\t\t'IM' => array('name' => 'Isle of Man'),\n\t\t\t\t\t'IN' => array('name' => 'India'),\n\t\t\t\t\t'IO' => array('name' => 'British Indian Ocean Territory'),\n\t\t\t\t\t'IQ' => array('name' => 'Iraq'),\n\t\t\t\t\t'IR' => array('name' => 'Iran'),\n\t\t\t\t\t'IS' => array('name' => 'Iceland'),\n\t\t\t\t\t'IT' => array('name' => 'Italy'),\n\t\t\t\t\t'JE' => array('name' => 'Jersey'),\n\t\t\t\t\t'JM' => array('name' => 'Jamaica'),\n\t\t\t\t\t'JO' => array('name' => 'Jordan'),\n\t\t\t\t\t'JP' => array('name' => 'Japan'),\n\t\t\t\t\t'KE' => array('name' => 'Kenya'),\n\t\t\t\t\t'KG' => array('name' => 'Kyrgyzstan'),\n\t\t\t\t\t'KH' => array('name' => 'Cambodia'),\n\t\t\t\t\t'KI' => array('name' => 'Kiribati'),\n\t\t\t\t\t'KM' => array('name' => 'Comoros'),\n\t\t\t\t\t'KN' => array('name' => 'Saint Kitts and Nevis'),\n\t\t\t\t\t'KP' => array('name' => 'North Korea'),\n\t\t\t\t\t'KR' => array('name' => 'South Korea'),\n\t\t\t\t\t'KW' => array('name' => 'Kuwait'),\n\t\t\t\t\t'KY' => array('name' => 'Cayman Islands'),\n\t\t\t\t\t'KZ' => array('name' => 'Kazakhstan'),\n\t\t\t\t\t'LA' => array('name' => 'Laos'),\n\t\t\t\t\t'LB' => array('name' => 'Lebanon'),\n\t\t\t\t\t'LC' => array('name' => 'Saint Lucia'),\n\t\t\t\t\t'LI' => array('name' => 'Liechtenstein'),\n\t\t\t\t\t'LK' => array('name' => 'Sri Lanka'),\n\t\t\t\t\t'LR' => array('name' => 'Liberia'),\n\t\t\t\t\t'LS' => array('name' => 'Lesotho'),\n\t\t\t\t\t'LT' => array('name' => 'Lithuania'),\n\t\t\t\t\t'LU' => array('name' => 'Luxembourg'),\n\t\t\t\t\t'LV' => array('name' => 'Latvia'),\n\t\t\t\t\t'LY' => array('name' => 'Libya'),\n\t\t\t\t\t'MA' => array('name' => 'Morocco'),\n\t\t\t\t\t'MC' => array('name' => 'Monaco'),\n\t\t\t\t\t'MD' => array('name' => 'Moldova'),\n\t\t\t\t\t'ME' => array('name' => 'Montenegro'),\n\t\t\t\t\t'MF' => array('name' => 'Saint Martin'),\n\t\t\t\t\t'MG' => array('name' => 'Madagascar'),\n\t\t\t\t\t'MH' => array('name' => 'Marshall Islands'),\n\t\t\t\t\t'MK' => array('name' => 'Macedonia'),\n\t\t\t\t\t'ML' => array('name' => 'Mali'),\n\t\t\t\t\t'MM' => array('name' => 'Myanmar'),\n\t\t\t\t\t'MN' => array('name' => 'Mongolia'),\n\t\t\t\t\t'MO' => array('name' => 'Macau'),\n\t\t\t\t\t'MP' => array('name' => 'Northern Mariana Islands'),\n\t\t\t\t\t'MQ' => array('name' => 'Martinique'),\n\t\t\t\t\t'MR' => array('name' => 'Mauritania'),\n\t\t\t\t\t'MS' => array('name' => 'Montserrat'),\n\t\t\t\t\t'MT' => array('name' => 'Malta'),\n\t\t\t\t\t'MU' => array('name' => 'Mauritius'),\n\t\t\t\t\t'MV' => array('name' => 'Maldives'),\n\t\t\t\t\t'MW' => array('name' => 'Malawi'),\n\t\t\t\t\t'MX' => array('name' => 'Mexico'),\n\t\t\t\t\t'MY' => array('name' => 'Malaysia'),\n\t\t\t\t\t'MZ' => array('name' => 'Mozambique'),\n\t\t\t\t\t'NA' => array('name' => 'Namibia'),\n\t\t\t\t\t'NC' => array('name' => 'New Caledonia'),\n\t\t\t\t\t'NE' => array('name' => 'Niger'),\n\t\t\t\t\t'NF' => array('name' => 'Norfolk Island'),\n\t\t\t\t\t'NG' => array('name' => 'Nigeria'),\n\t\t\t\t\t'NI' => array('name' => 'Nicaragua'),\n\t\t\t\t\t'NL' => array('name' => 'Netherlands'),\n\t\t\t\t\t'NO' => array('name' => 'Norway'),\n\t\t\t\t\t'NP' => array('name' => 'Nepal'),\n\t\t\t\t\t'NR' => array('name' => 'Nauru'),\n\t\t\t\t\t'NU' => array('name' => 'Niue'),\n\t\t\t\t\t'NZ' => array('name' => 'New Zealand'),\n\t\t\t\t\t'OM' => array('name' => 'Oman'),\n\t\t\t\t\t'PA' => array('name' => 'Panama'),\n\t\t\t\t\t'PE' => array('name' => 'Peru'),\n\t\t\t\t\t'PF' => array('name' => 'French Polynesia'),\n\t\t\t\t\t'PG' => array('name' => 'Papua New Guinea'),\n\t\t\t\t\t'PH' => array('name' => 'Philippines'),\n\t\t\t\t\t'PK' => array('name' => 'Pakistan'),\n\t\t\t\t\t'PL' => array('name' => 'Poland'),\n\t\t\t\t\t'PM' => array('name' => 'Saint Pierre and Miquelon'),\n\t\t\t\t\t'PN' => array('name' => 'Pitcairn Islands'),\n\t\t\t\t\t'PR' => array('name' => 'Puerto Rico'),\n\t\t\t\t\t'PS' => array('name' => 'Palestine'),\n\t\t\t\t\t'PT' => array('name' => 'Portugal'),\n\t\t\t\t\t'PW' => array('name' => 'Palau'),\n\t\t\t\t\t'PY' => array('name' => 'Paraguay'),\n\t\t\t\t\t'QA' => array('name' => 'Qatar'),\n\t\t\t\t\t'RE' => array('name' => 'Réunion'),\n\t\t\t\t\t'RO' => array('name' => 'Romania'),\n\t\t\t\t\t'RS' => array('name' => 'Serbia'),\n\t\t\t\t\t'RU' => array('name' => 'Russia'),\n\t\t\t\t\t'RW' => array('name' => 'Rwanda'),\n\t\t\t\t\t'SA' => array('name' => 'Saudi Arabia'),\n\t\t\t\t\t'SB' => array('name' => 'Solomon Islands'),\n\t\t\t\t\t'SC' => array('name' => 'Seychelles'),\n\t\t\t\t\t'SD' => array('name' => 'Sudan'),\n\t\t\t\t\t'SE' => array('name' => 'Sweden'),\n\t\t\t\t\t'SG' => array('name' => 'Singapore'),\n\t\t\t\t\t'SH' => array('name' => 'Saint Helena'),\n\t\t\t\t\t'SI' => array('name' => 'Slovenia'),\n\t\t\t\t\t'SJ' => array('name' => 'Svalbard and Jan Mayen Island'),\n\t\t\t\t\t'SK' => array('name' => 'Slovakia'),\n\t\t\t\t\t'SL' => array('name' => 'Sierra Leone'),\n\t\t\t\t\t'SM' => array('name' => 'San Marino'),\n\t\t\t\t\t'SN' => array('name' => 'Senegal'),\n\t\t\t\t\t'SO' => array('name' => 'Somalia'),\n\t\t\t\t\t'SR' => array('name' => 'Suriname'),\n\t\t\t\t\t'ST' => array('name' => 'Saint Tome and Principe'),\n\t\t\t\t\t'SV' => array('name' => 'El Salvador'),\n\t\t\t\t\t'SX' => array('name' => 'Sint Maarten'),\n\t\t\t\t\t'SY' => array('name' => 'Syria'),\n\t\t\t\t\t'SZ' => array('name' => 'Swaziland'),\n\t\t\t\t\t'TC' => array('name' => 'Turks and Caicos Islands'),\n\t\t\t\t\t'TD' => array('name' => 'Chad'),\n\t\t\t\t\t'TF' => array('name' => 'French Southern Lands'),\n\t\t\t\t\t'TG' => array('name' => 'Togo'),\n\t\t\t\t\t'TH' => array('name' => 'Thailand'),\n\t\t\t\t\t'TJ' => array('name' => 'Tajikistan'),\n\t\t\t\t\t'TK' => array('name' => 'Tokelau'),\n\t\t\t\t\t'TL' => array('name' => 'East Timor'),\n\t\t\t\t\t'TM' => array('name' => 'Turkmenistan'),\n\t\t\t\t\t'TN' => array('name' => 'Tunisia'),\n\t\t\t\t\t'TO' => array('name' => 'Tonga'),\n\t\t\t\t\t'TR' => array('name' => 'Turkey'),\n\t\t\t\t\t'TT' => array('name' => 'Trinidad and Tobago'),\n\t\t\t\t\t'TV' => array('name' => 'Tuvalu'),\n\t\t\t\t\t'TW' => array('name' => 'Taiwan'),\n\t\t\t\t\t'TZ' => array('name' => 'Tanzania'),\n\t\t\t\t\t'UA' => array('name' => 'Ukraine'),\n\t\t\t\t\t'UG' => array('name' => 'Uganda'),\n\t\t\t\t\t'UM' => array('name' => 'United States Minor Outlying Islands'),\n\t\t\t\t\t'US' => array('name' => 'United States of America'),\n\t\t\t\t\t'UY' => array('name' => 'Uruguay'),\n\t\t\t\t\t'UZ' => array('name' => 'Uzbekistan'),\n\t\t\t\t\t'VA' => array('name' => 'Vatican City'),\n\t\t\t\t\t'VC' => array('name' => 'Saint Vincent and the Grenadines'),\n\t\t\t\t\t'VE' => array('name' => 'Venezuela'),\n\t\t\t\t\t'VG' => array('name' => 'British Virgin Islands'),\n\t\t\t\t\t'VI' => array('name' => 'United States Virgin Islands'),\n\t\t\t\t\t'VN' => array('name' => 'Vietnam'),\n\t\t\t\t\t'VU' => array('name' => 'Vanuatu'),\n\t\t\t\t\t'WF' => array('name' => 'Wallis and Futuna'),\n\t\t\t\t\t'WS' => array('name' => 'Samoa'),\n\t\t\t\t\t'YE' => array('name' => 'Yemen'),\n\t\t\t\t\t'YT' => array('name' => 'Mayotte'),\n\t\t\t\t\t'ZA' => array('name' => 'South Africa'),\n\t\t\t\t\t'ZM' => array('name' => 'Zambia'),\n\t\t\t\t\t'ZW' => array('name' => 'Zimbabwe')\n\t\t\t);\n\t\t}\n\t\treturn self::$_countries;\n\t}", "title": "" }, { "docid": "87e3bbc53e6d832b6d6daa3bb5f22db1", "score": "0.7455837", "text": "function adminglobalcountrieslist(){\n$collection = $GLOBALS['db']->countries;\n\nif($collection->count(array()) < 5){\n$country = array(\"us\"=>\"United States\",\"af\" =>\"Afghanistan\",\"ax\"=>\"Aland Islands\",\"al\"=>\"Albania\",\"dz\"=>\"Algeria\",\"as\"=>\"American Samoa\",\"ad\"=>\"Andorra\",\"ao\"=>\"Angola\",\"ai\"=>\"Anguilla\",\"aq\"=>\"Antarctica\",\"ag\"=>\"Antigua and Barbuda\",\"ar\"=>\"Argentina\",\"am\"=>\"Armenia\",\"aw\"=>\"Aruba\",\"au\"=>\"Australia\",\"at\"=>\"Austria\",\"az\"=>\"Azerbaijan\",\"bs\"=>\"Bahamas\",\"bh\"=>\"Bahrain\",\"bd\"=>\"Bangladesh\",\"bb\"=>\"Barbados\",\"by\"=>\"Belarus\",\"be\"=>\"Belgium\",\"bz\"=>\"Belize\",\"bj\"=>\"Benin\",\"bm\"=>\"Bermuda\",\"bt\"=>\"Bhutan\",\"bo\"=>\"Bolivia\",\"ba\"=>\"Bosnia and Herzegovina\",\"bw\"=>\"Botswana\",\"bv\"=>\"Bouvet Island\",\"br\"=>\"Brazil\",\"io\"=>\"British Indian Ocean Territory\",\"bn\"=>\"Brunei Darussalam\",\"bg\"=>\"Bulgaria\",\"bf\"=>\"Burkina Faso\",\"bi\"=>\"Burundi\",\"kh\"=>\"Cambodia\",\"cm\"=>\"Cameroon\",\"ca\"=>\"Canada\",\"cv\"=>\"Cape Verde\",\"cb\"=>\"Caribbean Nations\",\"ky\"=>\"Cayman Islands\",\"cf\"=>\"Central African Republic\",\"td\"=>\"Chad\",\"cl\"=>\"Chile\",\"cn\"=>\"China\",\"cx\"=>\"Christmas Island\",\"cc\"=>\"Cocos (Keeling) Islands\",\"co\"=>\"Colombia\",\"km\"=>\"Comoros\",\"cg\"=>\"Congo\",\"ck\"=>\"Cook Islands\",\"cr\"=>\"Costa Rica\",\"ci\"=>\"Cote D'Ivoire (Ivory Coast)\",\"hr\"=>\"Croatia\",\"cu\"=>\"Cuba\",\"cy\"=>\"Cyprus\",\"cz\"=>\"Czech Republic\",\"cd\"=>\"Democratic Republic of the Congo\",\"dk\"=>\"Denmark\",\"dj\"=>\"Djibouti\",\"dm\"=>\"Dominica\",\"do\"=>\"Dominican Republic\",\"tp\"=>\"East Timor\",\"ec\"=>\"Ecuador\",\"eg\"=>\"Egypt\",\"sv\"=>\"El Salvador\",\"gq\"=>\"Equatorial Guinea\",\"er\"=>\"Eritrea\",\"ee\"=>\"Estonia\",\"et\"=>\"Ethiopia\",\"fk\"=>\"Falkland Islands (Malvinas)\",\"fo\"=>\"Faroe Islands\",\"fm\"=>\"Federated States of Micronesia\",\"fj\"=>\"Fiji\",\"fi\"=>\"Finland\",\"fr\"=>\"France\",\"gf\"=>\"French Guiana\",\"pf\"=>\"French Polynesia\",\"tf\"=>\"French Southern Territories\",\"ga\"=>\"Gabon\",\"gm\"=>\"Gambia\",\"ge\"=>\"Georgia\",\"de\"=>\"Germany\",\"gh\"=>\"Ghana\",\"gi\"=>\"Gibraltar\",\"gr\"=>\"Greece\",\"gl\"=>\"Greenland\",\"gd\"=>\"Grenada\",\"gp\"=>\"Guadeloupe\",\"gu\"=>\"Guam\",\"gt\"=>\"Guatemala\",\"gg\"=>\"Guernsey\",\"gn\"=>\"Guinea\",\"gw\"=>\"Guinea-Bissau\",\"gy\"=>\"Guyana\",\"ht\"=>\"Haiti\",\"hm\"=>\"Heard Island and McDonald Islands\",\"hn\"=>\"Honduras\",\"hk\"=>\"Hong Kong\",\"hu\"=>\"Hungary\",\"is\"=>\"Iceland\",\"in\"=>\"India\",\"id\"=>\"Indonesia\",\"ir\"=>\"Iran\",\"iq\"=>\"Iraq\",\"ie\"=>\"Ireland\",\"im\"=>\"Isle of Man\",\"il\"=>\"Israel\",\"it\"=>\"Italy\",\"jm\"=>\"Jamaica\",\"jp\"=>\"Japan\",\"je\"=>\"Jersey\",\"jo\"=>\"Jordan\",\"kz\"=>\"Kazakhstan\",\"ke\"=>\"Kenya\",\"ki\"=>\"Kiribati\",\"kr\"=>\"Korea\",\"kp\"=>\"Korea (North)\",\"ko\"=>\"Kosovo\",\"kw\"=>\"Kuwait\",\"kg\"=>\"Kyrgyzstan\",\"la\"=>\"Laos\",\"lv\"=>\"Latvia\",\"lb\"=>\"Lebanon\",\"ls\"=>\"Lesotho\",\"lr\"=>\"Liberia\",\"ly\"=>\"Libya\",\"li\"=>\"Liechtenstein\",\"lt\"=>\"Lithuania\",\"lu\"=>\"Luxembourg\",\"mo\"=>\"Macao\",\"mk\"=>\"Macedonia\",\"mg\"=>\"Madagascar\",\"mw\"=>\"Malawi\",\"my\"=>\"Malaysia\",\"mv\"=>\"Maldives\",\"ml\"=>\"Mali\",\"mt\"=>\"Malta\",\"mh\"=>\"Marshall Islands\",\"mq\"=>\"Martinique\",\"mr\"=>\"Mauritania\",\"mu\"=>\"Mauritius\",\"yt\"=>\"Mayotte\",\"mx\"=>\"Mexico\",\"md\"=>\"Moldova\",\"mc\"=>\"Monaco\",\"mn\"=>\"Mongolia\",\"me\"=>\"Montenegro\",\"ms\"=>\"Montserrat\",\"ma\"=>\"Morocco\",\"mz\"=>\"Mozambique\",\"mm\"=>\"Myanmar\",\"na\"=>\"Namibia\",\"nr\"=>\"Nauru\",\"np\"=>\"Nepal\",\"nl\"=>\"Netherlands\",\"an\"=>\"Netherlands Antilles\",\"nc\"=>\"New Caledonia\",\"nz\"=>\"New Zealand\",\"ni\"=>\"Nicaragua\",\"ne\"=>\"Niger\",\"ng\"=>\"Nigeria\",\"nu\"=>\"Niue\",\"nf\"=>\"Norfolk Island\",\"mp\"=>\"Northern Mariana Islands\",\"no\"=>\"Norway\",\"pk\"=>\"Pakistan\",\"pw\"=>\"Palau\",\"ps\"=>\"Palestinian Territory\",\"pa\"=>\"Panama\",\"pg\"=>\"Papua New Guinea\",\"py\"=>\"Paraguay\",\"pe\"=>\"Peru\",\"ph\"=>\"Philippines\",\"pn\"=>\"Pitcairn\",\"pl\"=>\"Poland\",\"pt\"=>\"Portugal\",\"pr\"=>\"Puerto Rico\",\"qa\"=>\"Qatar\",\"re\"=>\"Reunion\",\"ro\"=>\"Romania\",\"ru\"=>\"Russian Federation\",\"rw\"=>\"Rwanda\",\"gs\"=>\"S. Georgia and S. Sandwich Islands\",\"sh\"=>\"Saint Helena\",\"kn\"=>\"Saint Kitts and Nevis\",\"lc\"=>\"Saint Lucia\",\"pm\"=>\"Saint Pierre and Miquelon\",\"vc\"=>\"Saint Vincent and the Grenadines\",\"ws\"=>\"Samoa\",\"sm\"=>\"San Marino\",\"st\"=>\"Sao Tome and Principe\",\"sa\"=>\"Saudi Arabia\",\"sn\"=>\"Senegal\",\"rs\"=>\"Serbia\",\"cs\"=>\"Serbia and Montenegro\",\"sc\"=>\"Seychelles\",\"sl\"=>\"Sierra Leone\",\"sg\"=>\"Singapore\",\"sk\"=>\"Slovak Republic\",\"si\"=>\"Slovenia\",\"sb\"=>\"Solomon Islands\",\"so\"=>\"Somalia\",\"za\"=>\"South Africa\",\"ss\"=>\"South Sudan\",\"es\"=>\"Spain\",\"lk\"=>\"Sri Lanka\",\"sd\"=>\"Sudan\",\"om\"=>\"Sultanate of Oman\",\"sr\"=>\"Suriname\",\"sj\"=>\"Svalbard and Jan Mayen\",\"sz\"=>\"Swaziland\",\"se\"=>\"Sweden\",\"ch\"=>\"Switzerland\",\"sy\"=>\"Syria\",\"tw\"=>\"Taiwan\",\"tj\"=>\"Tajikistan\",\"tz\"=>\"Tanzania\",\"th\"=>\"Thailand\",\"tl\"=>\"Timor-Leste\",\"tg\"=>\"Togo\",\"tk\"=>\"Tokelau\",\"to\"=>\"Tonga\",\"tt\"=>\"Trinidad and Tobago\",\"tn\"=>\"Tunisia\",\"tr\"=>\"Turkey\",\"tm\"=>\"Turkmenistan\",\"tc\"=>\"Turks and Caicos Islands\",\"tv\"=>\"Tuvalu\",\"ug\"=>\"Uganda\",\"ua\"=>\"Ukraine\",\"ae\"=>\"United Arab Emirates\",\"gb\"=>\"United Kingdom\",\"uy\"=>\"Uruguay\",\"uz\"=>\"Uzbekistan\",\"vu\"=>\"Vanuatu\",\"va\"=>\"Vatican City State (Holy See)\",\"ve\"=>\"Venezuela\",\"vn\"=>\"Vietnam\",\"vg\"=>\"Virgin Islands (British)\",\"vi\"=>\"Virgin Islands (U.S.)\",\"wf\"=>\"Wallis and Futuna\",\"eh\"=>\"Western Sahara\",\"ye\"=>\"Yemen\",\"zm\"=>\"Zambia\",\"zw\"=>\"Zimbabwe\",\"oo\"=>\"Other\");\nforeach($country as $title){\n//echo $title;\n$data = array(\n \"title\" => $title,\n \"status\" => \"1\",\n \"created\" => time(),\n \"updated\" => time()\n);\n$collection->insert($data);\n}\n\n}\n\n$query = array();\nreturn $collection->find($query);\n\n}", "title": "" }, { "docid": "88fa6e0bd55f202e1abc1cb566c65d60", "score": "0.7441931", "text": "public function countries($list){\n return $this->withMeta([\n 'countries' => $list\n ]);\n }", "title": "" }, { "docid": "9aafc8be25571863535592d3644d99f5", "score": "0.7430262", "text": "public function getCountryList()\n {\n $data_result['status'] = 0;\n $result = Common::getCountryList();\n if(count($result) > 0)\n {\n foreach ($result as $key => $value) {\n $data[$key]['id'] = $value->id;\n $data[$key]['name'] = $value->name;\n $data[$key]['status'] = $value->status;\n }\n $data_result['status'] = 1;\n $data_result['message_list'] = \"Country list.\";\n $data_result['data'] = $data;\n return response($data_result, 200)->header('Content-Type', 'application/json'); die;\n }\n else \n {\n $data_result['status'] = 0;\n $data_result['message'] =\"Data not found\";\n return response($data_result, 200)->header('Content-Type', 'application/json'); die;\n }\n }", "title": "" }, { "docid": "01cb1b2d6de2400f1eacb13f69fd1f6c", "score": "0.742737", "text": "function getCountry($cc);", "title": "" }, { "docid": "a000cd7c61f7a8de8ff46a6b7bf4d488", "score": "0.74200684", "text": "public function retrieveCountryList()\r\n {\r\n $sql = \"select distinct(country) from NATIONAL_FLOWER\";\r\n $stmt = $this->connectionManager->getConnection()->prepare($sql);\r\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\r\n $stmt->execute();\r\n\r\n $result = [];\r\n // $item = an NationalFlower object \r\n while ($row = $stmt->fetch()) {\r\n $result[] = $row['country']; // a string\r\n }\r\n\r\n $stmt->closeCursor();\r\n\r\n return $result;\r\n }", "title": "" }, { "docid": "e41a5e6dc195ee1a6bbd54371727da12", "score": "0.7412114", "text": "public function countries()\n {\n $countries = Country::select('id','name','iso_3166_2','iso_3166_3')->get();\n return CountryResource::collection($countries);\n }", "title": "" }, { "docid": "2577acb20d33a207f0abf39d135e772a", "score": "0.74010664", "text": "public function getCountry()\n {\n }", "title": "" }, { "docid": "f4a734887f772f5eb598304b8297597b", "score": "0.7385292", "text": "public function testDataElementsGetCountryCodes()\n {\n }", "title": "" }, { "docid": "5cd7b033578171da1962cb1df81e6416", "score": "0.7384445", "text": "function get_countries() {\n\t\t\t$this->countries = json_decode(file_get_contents('JSON/countries.json'),true);\n\t\t}", "title": "" }, { "docid": "26f3d1560b3990af42df12d76e59ab37", "score": "0.73571074", "text": "public function getCountries($language_id = Client::LANGUAGE_ID_EN_US);", "title": "" }, { "docid": "2a38a09004890588c8c464b41a3674b1", "score": "0.7338877", "text": "public static function countries()\n {\n return \\DB::table('countries')->orderBy('name', 'asc')->pluck('name', 'id');\n }", "title": "" }, { "docid": "e1ea0104edeb413bc0d36bdd3603af60", "score": "0.7326432", "text": "public function loadCountries(){\r\n $data = $this->addon->readCountries();\r\n foreach ($data as $row) {\r\n echo \"<option value='\".$row[\"id\"].\"'>\".$row[\"name\"].\"</option>\";\r\n }\r\n }", "title": "" }, { "docid": "7577b227508847a322059d58395c1d5b", "score": "0.73218864", "text": "public static function getCountries()\n {\n try {\n $results = Db::getInstance()->executeS(\n 'SELECT ldc.id_country, c.iso_code, cl.name FROM ' . _DB_PREFIX_ . 'lengow_default_carrier as ldc\n INNER JOIN ' . _DB_PREFIX_ . 'country as c ON ldc.id_country = c.id_country\n INNER JOIN ' . _DB_PREFIX_ . 'country_lang as cl ON c.id_country = cl.id_country\n AND cl.id_lang = ' . (int)Context::getContext()->language->id . '\n GROUP BY ldc.id_country'\n );\n return !empty($results) ? $results : false;\n } catch (PrestaShopDatabaseException $e) {\n return false;\n }\n }", "title": "" }, { "docid": "cb3d1d83952e517ea8e85919d8f1909d", "score": "0.7306903", "text": "public function countries()\n {\n // A country is a contact in the PUM database\n $sql = <<<SQL\n SELECT distinctrow cntr.id country_id\n , cntr.iso_code\n , cntr.name\n FROM civicrm_contact cc\n JOIN civicrm_group_contact cgc ON (cgc.contact_id = cc.id and cgc.group_id=%1 and cgc.status='Added')\n JOIN civicrm_value_country vc ON (vc.entity_id=cc.id)\n JOIN civicrm_country cntr ON (cntr.id=vc.civicrm_country_id)\n WHERE cc.contact_type = 'Organization' AND cc.contact_sub_type LIKE '%Country%'\nSQL;\n set_time_limit(0);\n $rest = new CRM_CMS_Rest();\n $remote = $rest->getAll('Country');\n $remoteCountries = [];\n foreach ($remote['Items'] as $key => $item) {\n $remoteCountries[$item['Item']['country_id']] = $item['Item']['Id'];\n }\n $dao = CRM_Core_DAO::executeQuery($sql, [\n 1 => [$this->countryGroupId, 'Integer'],\n ]\n );\n while($dao->fetch()){\n $result = [\n 'country_id' => $dao->country_id,\n 'iso_code' => $dao->iso_code,\n 'name' => $dao->name,\n ];\n if(key_exists($dao->country_id,$remoteCountries)){\n $rest->update('Country',$remoteCountries[$dao->country_id],$result);\n unset($remoteCountries[$dao->country_id]);\n } else {\n $rest->create('Country',$result);\n };\n }\n\n foreach($remoteCountries as $remoteCountryId){\n $rest->delete('Country',$remoteCountryId);\n }\n }", "title": "" }, { "docid": "fd1edb3bdfaea105e11cbe754eedefe7", "score": "0.7301613", "text": "public function shippingCountries();", "title": "" }, { "docid": "608bcafd519c277e71eded0017bf71eb", "score": "0.7284741", "text": "public static function getAllCountriesInfos()\n {\n $sql = \"SELECT ISO, LABEL FROM Countries\";\n $result = array();\n\n try\n {\n $query = Database::getInstance()->prepare($sql);\n $query->execute();\n $countries = $query->fetchAll(PDO::FETCH_ASSOC);\n $size = count($countries);\n for($i = 0;$i < $size;$i++)\n {\n array_push($result,new Country($countries[$i]['ISO'],$countries[$i]['LABEL']));\n }\n }\n catch(Exception $e)\n {\n return FALSE;\n }\n return $result;\n }", "title": "" }, { "docid": "765b32b1e5bcde344b910267c0b938cc", "score": "0.7269521", "text": "public function getCountries()\n{\n foreach (CountryStorage::getAll() as $id=>$content) {\n $key = $content->id;\n $value = $content->name;\n $countryoptions[$key] = $value;\n }\n return $countryoptions;\n}", "title": "" }, { "docid": "c28aec6085220e34b20482dd918664b3", "score": "0.726755", "text": "public function country_get()\n\t{\n\n\t\tif($_SERVER['REQUEST_METHOD'] != \"GET\")\n\t\t{\n\t\t $this->response('Not Acceptable',406);\n\t\t}\n\t\t$country_list_arr=array();\n\n\t\t$this->load->model('Table_model');\n\t\t$country_list_arr=$this->Table_model->GetCountry();\n\t\tif(count($country_list_arr)>0)\n\t\t{\n\t\t\t$this->response(array('status'=>'success','country'=>$country_list_arr), 200);\n\t\t}\n\t\telse\n\t\t\t$this->response(array('status'=>'failed','message'=>'No records in database'),200);\n\t\n\t\n\t}", "title": "" }, { "docid": "db1d3c2c33fed284d21a51df89c5047f", "score": "0.7259926", "text": "private function getCountries()\n {\n $retarray = [];\n\n foreach ($this->new_countryList as $region => $sublist) \n {\n foreach ($sublist as $code => $name) \n {\n $retarray[] = ['code2' => $code, 'name' => $name, 'region' => $region ];\n }\n }\n\n //insert countries\n $__insert_date__ = date(\"Y-m-d H:i:s\");\n $data = [];\n foreach( $retarray as $key => $value)\n {\n $data[] = \n [\n 'name' => $value['name'],\n 'code2' => $value['code2'],\n 'code3' => '',\n 'region' => $value['region'],\n 'enabled' => 1,\n 'created_by' => $this->current_user->id,\n 'created' => $__insert_date__,\n ];\n }\n\n return $data;\n }", "title": "" }, { "docid": "fd0a05607f0bc2d8580c4668ddf0fe90", "score": "0.7249699", "text": "public function listCountries() {\r\n\t\t// Get the google data from the feed.\r\n\t\t$xml = $this->_listCountriesXml;\r\n\r\n\t\t// Loop through google data and find all valid entries.\r\n\t\t$regionclean = array();\r\n\t\tforeach($xml->entry as $region) {\r\n\t\t\t$pos = strpos($region->content, 'geocoding:') + 11;\r\n\t\t\t$geocoding = substr($region->content, $pos, strpos($region->content, ',', $pos) - $pos);\r\n\t\t\tif (strpos($geocoding, \"Yes\") !== FALSE) {\r\n\t\t\t\t$regionclean[] = htmlentities($region->title);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Get the countries list and clean it up so that names will match to google.\r\n\t\t// The regex removes parenthetical items so that both of the \"Congo\" entries\r\n\t\t// and the \"Coco Islands\" work.\r\n\t\t// The $countriesfixes overwrites values in the Drupal API countries list\r\n\t\t// with values that will match to google's entries.\r\n\t\t// \"Sao Tome and Principe\" are non-accented in the Drupal API so the entry\r\n\t\t// here is to match the htmlentities() fix in the foreach loop below.\r\n\t\t// Note: it may be neccessary to adjust/add to the fixes list in the future\r\n\t\t// if google adds countries that don't match the Drupal API list for whatever\r\n\t\t// reason.\r\n\t\t$countries = $this->listCountriesISO();\r\n\t\t$regex = \"#[ (].*[)]#e\";\r\n\t\t$cntryclean = preg_replace($regex, \"\", $countries);\r\n\t\t$countriesfixes = array_merge($cntryclean, array(\r\n\t\t\t\t\"hk\" => \"China\",\r\n\t\t\t\t\"mo\" => \"China\",\r\n\t\t\t\t\"pn\" => \"Pitcairn Islands\",\r\n\t\t\t\t\"wf\" => \"Wallis Futuna\",\r\n\t\t\t\t\"st\" => \"S&Atilde;&pound;o Tom&Atilde;&copy; and Pr&Atilde;&shy;ncipe\",\r\n\t\t));\r\n\r\n\t\t// Compare new google data found to fixed country name values and return\r\n\t\t// matches with abbreviations as keys.\r\n\t\t$googlematched = array_intersect($countriesfixes, $regionclean);\r\n\r\n\t\t// Compare new keys to original Drupal API and return the array with the\r\n\t\t// original name values.\r\n\t\t$fixedkeys = array_intersect_key($countries, $googlematched);\r\n\t\treturn array_keys($fixedkeys);\r\n\t}", "title": "" }, { "docid": "496630e56afece34684b6395214ddbac", "score": "0.72400457", "text": "public function get_eurovoc_european_countries() {\n $query = 'SELECT DISTINCT ?narrower_term_name\n WHERE{\n ?micro_thesaruse skos:prefLabel ?micro_thesaruse_name. \n FILTER (REGEX (?micro_thesaruse_name, \"Northern Europe\") \n || REGEX (?micro_thesaruse_name,\"Southern Europe\") \n || REGEX (?micro_thesaruse_name, \"Western Europe\") \n || REGEX (?micro_thesaruse_name, \"Eastern Europe\")) \n OPTIONAL{?narrower_term skos:broader ?micro_thesaruse. \n ?narrower_term skos:prefLabel ?narrower_term_name.\n FILTER (LANG(?narrower_term_name)=\"en\")}\n } ORDER BY ?narrower_term_name';\n $results = SPARQL::runSPARQLQuery($query);\n $jsnResults = json_decode($results);\n $list_countries = [];\n if (!empty($jsnResults)) {\n foreach ($jsnResults->results->bindings as $res) {\n $list_countries[] = $res->narrower_term_name->value;\n }\n }\n return $list_countries;\n }", "title": "" }, { "docid": "6af085ebed5c8f88afbc66e10fac54a3", "score": "0.72105134", "text": "function webseo24h_tie_get_countries()\n{\t\n\t$countries_array = array(\"\n Vietnam, \n United States,\n\tThailand,\n\tLaos,\n\tCambodia,\n\tSingapore,\n\tMalaysia,\n\tIndonesia,\n\tAfghanistan,\n\tAlbania,\n\tAlgeria,\n\tAmerican Samoa,\n\tAndorra,\n\tAngola,\n\tAnguilla,\n\tAntigua and Barbuda,\n\tArgentina,\n\tArmenia,\n\tAruba,\n\tAustralia,\n\tAustria,\n\tAzerbaijan,\n\tBahamas,\n\tBahrain,\n\tBangladesh,\n\tBarbados,\n\tBelarus,\n\tBelgium,\n\tBelize,\n\tBenin,\n\tBermuda,\n\tBhutan,\n\tBolivia,\n\tBosnia-Herzegovina,\n\tBotswana,\n\tBouvet Island,\n\tBrazil,\n\tBrunei,\n\tBulgaria,\n\tBurkina Faso,\n\tBurundi,\n\tCameroon,\n\tCanada,\n\tCape Verde,\n\tCayman Islands,\n\tCentral African Republic,\n\tChad,\n\tChile,\n\tChina,\n\tChristmas Island,\n\tCocos (Keeling) Islands,\n\tColombia,\n\tComoros,\n\tCongo, Democratic Republic of the (Zaire),\n\tCongo, Republic of,\n\tCook Islands,\n\tCosta Rica,\n\tCroatia,\n\tCuba,\n\tCyprus,\n\tCzech Republic,\n\tDenmark,\n\tDjibouti,\n\tDominica,\n\tDominican Republic,\n\tEcuador,\n\tEgypt,\n\tEl Salvador,\n\tEquatorial Guinea,\n\tEritrea,\n\tEstonia,\n\tEthiopia,\n\tFalkland Islands,\n\tFaroe Islands,\n\tFiji,\n\tFinland,\n\tFrance,\n\tFrench Guiana,\n\tGabon,\n\tGambia,\n\tGeorgia,\n\tGermany,\n\tGhana,\n\tGibraltar,\n\tGreece,\n\tGreenland,\n\tGrenada,\n\tGuadeloupe (French),\n\tGuam (USA),\n\tGuatemala,\n\tGuinea,\n\tGuinea Bissau,\n\tGuyana,\n\tHaiti,\n\tHoly See,\n\tHonduras,\n\tHong Kong,\n\tHungary,\n\tIceland,\n\tIndia,\n\tIran,\n\tIraq,\n\tIreland,\n\tIsrael,\n\tItaly,\n\tIvory Coast (Cote D`Ivoire),\n\tJamaica,\n\tJapan,\n\tJordan,\n\tKazakhstan,\n\tKenya,\n\tKiribati,\n\tKuwait,\n\tKyrgyzstan,\n\tLatvia,\n\tLebanon,\n\tLesotho,\n\tLiberia,\n\tLibya,\n\tLiechtenstein,\n\tLithuania,\n\tLuxembourg,\n\tMacau,\n\tMacedonia,\n\tMadagascar,\n\tMalawi,\n\tMaldives,\n\tMali,\n\tMalta,\n\tMarshall Islands,\n\tMartinique (French),\n\tMauritania,\n\tMauritius,\n\tMayotte,\n\tMexico,\n\tMicronesia,\n\tMoldova,\n\tMonaco,\n\tMongolia,\n\tMontenegro,\n\tMontserrat,\n\tMorocco,\n\tMozambique,\n\tMyanmar,\n\tNamibia,\n\tNauru,\n\tNepal,\n\tNetherlands,\n\tNetherlands Antilles,\n\tNew Caledonia (French),\n\tNew Zealand,\n\tNicaragua,\n\tNiger,\n\tNigeria,\n\tNiue,\n\tNorfolk Island,\n\tNorth Korea,\n\tNorthern Mariana Islands,\n\tNorway,\n\tOman,\n\tPakistan,\n\tPalau,\n\tPanama,\n\tPapua New Guinea,\n\tParaguay,\n\tPeru,\n\tPhilippines,\n\tPitcairn Island,\n\tPoland,\n\tPolynesia (French),\n\tPortugal,\n\tPuerto Rico,\n\tQatar,\n\tReunion,\n\tRomania,\n\tRussia,\n\tRwanda,\n\tSaint Helena,\n\tSaint Kitts and Nevis,\n\tSaint Lucia,\n\tSaint Pierre and Miquelon,\n\tSaint Vincent and Grenadines,\n\tSamoa,\n\tSan Marino,\n\tSao Tome and Principe,\n\tSaudi Arabia,\n\tSenegal,\n\tSerbia,\n\tSeychelles,\n\tSierra Leone,\n\tSlovakia,\n\tSlovenia,\n\tSolomon Islands,\n\tSomalia,\n\tSouth Africa,\n\tSouth Georgia and South Sandwich Islands,\n\tSouth Korea,\n\tSpain,\n\tSri Lanka,\n\tSudan,\n\tSuriname,\n\tSvalbard and Jan Mayen Islands,\n\tSwaziland,\n\tSweden,\n\tSwitzerland,\n\tSyria,\n\tTaiwan,\n\tTajikistan,\n\tTanzania,\n\tTimor-Leste (East Timor),\n\tTogo,\n\tTokelau,\n\tTonga,\n\tTrinidad and Tobago,\n\tTunisia,\n\tTurkey,\n\tTurkmenistan,\n\tTurks and Caicos Islands,\n\tTuvalu,\n\tUganda,\n\tUkraine,\n\tUnited Arab Emirates,\n\tUnited Kingdom,\t\n\tUruguay,\n\tUzbekistan,\t\n\tVanuatu,\n\tVenezuela,\n\tVirgin Islands,\n\tWallis and Futuna Islands,\n\tYemen,\n\tZambia,\n\tZimbabwe\");\n\t\t\t\n\t//print_r($countries);\t\n\t$countries = explode(',', $countries_array[0]);\t\n\treturn $countries;\n}", "title": "" }, { "docid": "20f3969d690dd0f299268bb4bec2b241", "score": "0.7208745", "text": "public function getCountryOptions()\n {\n $rows = $this->getOptions('country');\n $countries = array();\n foreach ($rows as $row) {\n if ($row['name'] != null) {\n $countries[$row['country_id']] = $row['name'];\n }\n }\n return $countries;\n }", "title": "" }, { "docid": "a1708781e580355c63aabb94aac7bb8b", "score": "0.718532", "text": "public function bookStoreGetCountriesData_get()\n {\n $countryid = $this->get('countryid');\n $response = $this->login->getCountryStates($countryid);\n if ($response['success'] == true)\n {\n //$output['status'] = REST_Controller::HTTP_OK;\n $output['data'] = $response['data'];\n $this->response($output,REST_Controller::HTTP_OK);\n }\n else\n {\n $this->response(['status'=>REST_Controller::HTTP_BAD_REQUEST], REST_Controller::HTTP_CONFLICT);\n }\n }", "title": "" }, { "docid": "2ccafacd6c6f4ed637eb8bd7842b7a73", "score": "0.716798", "text": "public static function getCountries()\n {\n $db = PDOConnection::getConnection();\n\n $sql = 'SELECT * FROM country';\n $result = $db->prepare($sql);\n $result->setFetchMode(PDO::FETCH_ASSOC);\n $result->execute();\n return $result->fetchAll();\n }", "title": "" }, { "docid": "1b35c1aa278d10f0374edc24951bf41b", "score": "0.71599966", "text": "public function getAllCountries(){\n\t\t$this->output->set_content_type('application/json');\n\t\t$countries = $this->Api_model->getAllCountries();\n\t\tif($countries){\n\t\t\t$this->output->set_output(json_encode(['result' => 1, 'msg' =>'Data Found' , 'data' => $countries]));\n\t\t}else{\n\t\t\t$this->output->set_output(json_encode(['result' => -1, 'msg' =>'No data found' , 'data' => 'No data found']));\n\t\t}\n\t}", "title": "" }, { "docid": "9d82a59cbbabc5347617dd3be5210f27", "score": "0.7139", "text": "public static function getActiveCountries()\n {\n $list = new Country\\Listing();\n $list->setCondition(\"active = 1\");\n\n return $list->getCountries();\n }", "title": "" }, { "docid": "2607bc91dc6ebc4a13b1a4b0a7835062", "score": "0.71328807", "text": "function countries() \n{\n $countries = array( 'US' => 'United States', 'CA' => 'Canada', 'UK' => 'United Kingdom', 'AU' => 'Australia', 'AF' => 'Afghanistan', 'AL' => 'Albania', 'DZ' => 'Algeria', 'AS' => 'American Samoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AI' => 'Anguilla', 'AQ' => 'Antarctica', 'AG' => 'Antigua and Barbuda', 'AR' => 'Argentina', 'AM' => 'Armenia', 'AW' => 'Aruba', 'AT' => 'Austria', 'AZ' => 'Azerbaijan', 'BS' => 'Bahamas', 'BH' => 'Bahrain', 'BD' => 'Bangladesh', 'BB' => 'Barbados', 'BY' => 'Belarus', 'BE' => 'Belgium', 'BZ' => 'Belize', 'BJ' => 'Benin', 'BM' => 'Bermuda', 'BT' => 'Bhutan', 'BO' => 'Bolivia', 'BA' => 'Bosnia and Herzegovina', 'BW' => 'Botswana', 'BR' => 'Brazil', 'BN' => 'Brunei Darussalam', 'BG' => 'Bulgaria', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'KH' => 'Cambodia', 'CM' => 'Cameroon', 'CV' => 'Cape Verde', 'KY' => 'Cayman Islands', 'CF' => 'Central African Republic', 'TD' => 'Chad', 'CL' => 'Chile', 'CN' => 'China', 'CX' => 'Christmas Island', 'CC' => 'Cocos (Keeling) Islands', 'CO' => 'Colombia', 'KM' => 'Comoros', 'CG' => 'Congo', 'CD' => 'Congo, The Democratic Republic of the', 'CK' => 'Cook Islands', 'CR' => 'Costa Rica', 'CI' => 'Cote D`Ivoire', 'HR' => 'Croatia', 'CY' => 'Cyprus', 'CZ' => 'Czech Republic', 'DK' => 'Denmark', 'DJ' => 'Djibouti', 'DM' => 'Dominica', 'DO' => 'Dominican Republic', 'EC' => 'Ecuador', 'EG' => 'Egypt', 'SV' => 'El Salvador', 'GQ' => 'Equatorial Guinea', 'ER' => 'Eritrea', 'EE' => 'Estonia', 'ET' => 'Ethiopia', 'FK' => 'Falkland Islands (Malvinas)', 'FO' => 'Faroe Islands', 'FJ' => 'Fiji', 'FI' => 'Finland', 'FR' => 'France', 'GF' => 'French Guiana', 'PF' => 'French Polynesia', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Georgia', 'DE' => 'Germany', 'GH' => 'Ghana', 'GI' => 'Gibraltar', 'GR' => 'Greece', 'GL' => 'Greenland', 'GD' => 'Grenada', 'GP' => 'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Guinea-Bissau', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Hungary', 'IS' => 'Iceland', 'IN' => 'India', 'ID' => 'Indonesia', 'IR' => 'Iran (Islamic Republic Of)', 'IQ' => 'Iraq', 'IE' => 'Ireland', 'IL' => 'Israel', 'IT' => 'Italy', 'JM' => 'Jamaica', 'JP' => 'Japan', 'JO' => 'Jordan', 'KZ' => 'Kazakhstan', 'KE' => 'Kenya', 'KI' => 'Kiribati', 'KP' => 'Korea North', 'KR' => 'Korea South', 'KW' => 'Kuwait', 'KG' => 'Kyrgyzstan', 'LA' => 'Laos', 'LV' => 'Latvia', 'LB' => 'Lebanon', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LI' => 'Liechtenstein', 'LT' => 'Lithuania', 'LU' => 'Luxembourg', 'MO' => 'Macau', 'MK' => 'Macedonia', 'MG' => 'Madagascar', 'MW' => 'Malawi', 'MY' => 'Malaysia', 'MV' => 'Maldives', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Marshall Islands', 'MQ' => 'Martinique', 'MR' => 'Mauritania', 'MU' => 'Mauritius', 'MX' => 'Mexico', 'FM' => 'Micronesia', 'MD' => 'Moldova', 'MC' => 'Monaco', 'MN' => 'Mongolia', 'MS' => 'Montserrat', 'MA' => 'Morocco', 'MZ' => 'Mozambique', 'NA' => 'Namibia', 'NP' => 'Nepal', 'NL' => 'Netherlands', 'AN' => 'Netherlands Antilles', 'NC' => 'New Caledonia', 'NZ' => 'New Zealand', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'NO' => 'Norway', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PW' => 'Palau', 'PS' => 'Palestine Autonomous', 'PA' => 'Panama', 'PG' => 'Papua New Guinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Philippines', 'PL' => 'Poland', 'PT' => 'Portugal', 'PR' => 'Puerto Rico', 'QA' => 'Qatar', 'RE' => 'Reunion', 'RO' => 'Romania', 'RU' => 'Russian Federation', 'RW' => 'Rwanda', 'VC' => 'Saint Vincent and the Grenadines', 'MP' => 'Saipan', 'SM' => 'San Marino', 'SA' => 'Saudi Arabia', 'SN' => 'Senegal', 'SC' => 'Seychelles', 'SL' => 'Sierra Leone', 'SG' => 'Singapore', 'SK' => 'Slovak Republic', 'SI' => 'Slovenia', 'SO' => 'Somalia', 'ZA' => 'South Africa', 'ES' => 'Spain', 'LK' => 'Sri Lanka', 'KN' => 'St. Kitts/Nevis', 'LC' => 'St. Lucia', 'SD' => 'Sudan', 'SR' => 'Suriname', 'SZ' => 'Swaziland', 'SE' => 'Sweden', 'CH' => 'Switzerland', 'SY' => 'Syria', 'TW' => 'Taiwan', 'TI' => 'Tajikistan', 'TZ' => 'Tanzania', 'TH' => 'Thailand', 'TG' => 'Togo', 'TK' => 'Tokelau', 'TO' => 'Tonga', 'TT' => 'Trinidad and Tobago', 'TN' => 'Tunisia', 'TR' => 'Turkey', 'TM' => 'Turkmenistan', 'TC' => 'Turks and Caicos Islands', 'TV' => 'Tuvalu', 'UG' => 'Uganda', 'UA' => 'Ukraine', 'AE' => 'United Arab Emirates', 'UY' => 'Uruguay', 'UZ' => 'Uzbekistan', 'VU' => 'Vanuatu', 'VE' => 'Venezuela', 'VN' => 'Viet Nam', 'VG' => 'Virgin Islands (British)', 'VI' => 'Virgin Islands (U.S.)', 'WF' => 'Wallis and Futuna Islands', 'YE' => 'Yemen', 'YU' => 'Yugoslavia', 'ZM' => 'Zambia', 'ZW' => 'Zimbabwe');\n return $countries;\n}", "title": "" }, { "docid": "75c353f34498d95894e8ef3d5d1baafc", "score": "0.7118281", "text": "public function allowedCountries();", "title": "" }, { "docid": "85f4c57a811f2f62f903c59cb58280ae", "score": "0.7110565", "text": "private function &getCountries() {\n if (!isset($this->countries)) {\n $this->countries = string_to_hash(file_get_contents(dirname(__FILE__) . '/config/iso3166.ini'));\n }\n return $this->countries;\n }", "title": "" }, { "docid": "e0da476755429f3687b3e05091e8a38d", "score": "0.709313", "text": "function getCountries($locale=null, $country_code=null)\n\t{\n\t\t$andLocale = \"\";\n\t\tif ($locale){\n\t\t\t$andLocale = \" AND \".TBL_COUNTRIES_L18N.\".locale_code = '\".$locale.\"' \";\n\t\t}\n\t\t$this->db->cache_on();\n\t\t\n\t\t$this->db\n\t\t->select(\"*, CONCAT(\".TBL_COUNTRIES.\".country_code, ' (', \".TBL_COUNTRIES_L18N.\".country_name, ')' ) AS country_label\")->from( TBL_COUNTRIES )\n\t\t->join( TBL_COUNTRIES_L18N, TBL_COUNTRIES .\".country_code = \".TBL_COUNTRIES_L18N.\".country_code $andLocale \", \"inner\");\n\t\n\t\tif ($country_code){\n\t\t\t$this->db->where(\"country_code\", $country_code);\n\t\t}\n\t\n\t\t$query = $this->db->get();\n\t\n\t\t$this->db->cache_off();\n\t\t\n\t\tif (! $query){\n\t\t\treturn new BASE_Result(null, $this->generateErrorMessage(), null, E_STATUS_CODE::DB_ERROR);\n\t\t}\n\t\n\t\t$data_obj\t= $query->result_object();\n\t\t$data\t\t= array();\n\t\tforeach ($data_obj as $key => $value)\n\t\t{\n\t\t\t$cc = $value->country_code;\n\t\t\t\t\n\t\t\t$data[$cc][\"iso_2\"] \t\t\t= $value->country_code;\n\t\t\t$data[$cc][\"iso_3\"] \t\t\t= $value->iso_3;\n\t\t\t$data[$cc][\"population\"] \t\t= $value->population;\n\t\t\t$data[$cc][\"area\"] \t\t\t\t= $value->area;\n\t\t\t$data[$cc][\"gdp\"] \t\t\t\t= $value->gdp;\n\t\t\t$data[$cc][\"phone_code\"]\t\t= $value->phone_code;\n\t\t\t$data[$cc][\"country_label\"]\t\t= $value->country_label;\n\t\t\t$data[$cc][\"european_union\"]\t= $value->european_union;\n\n\t\t\tif ($locale){\n\t\t\t\t$data[$cc][\"country_name\"]\t= $value->country_name;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$data[$cc][\"text\"][$value->locale_code] = $value->country_name;\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t$return = new BASE_Result($data, $this->generateErrorMessage(), null, E_STATUS_CODE::SUCCESS);\n\t\n\t\twrite2Debugfile(self::DEBUG_FILENAME, \"getCountries locale[$locale] country[$country_code]:\\n\".$this->lastQuery().\"\\n\".print_r($return, true));\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "ba13932b23fae06dfe0cce800b085604", "score": "0.7092814", "text": "public function country() {\n\t\tif (!isset($_GET['id'])) return self::jsonResult(false, \"Invalid arguments\", 403);\n\t\t$map = Countries::get($_GET['id']);\n\t\tif (!$map) return self::jsonResult(false, \"Map not found\");\n\t\treturn self::jsonResult(true, $map);\n\t}", "title": "" }, { "docid": "6aa7e57db832ce7282eb35b81c330d28", "score": "0.70779234", "text": "public function getCountryRecords(): array\n {\n return $this->countryRecords;\n }", "title": "" }, { "docid": "256eeeb61a0c504c76b2347d5af0e370", "score": "0.7064564", "text": "public function countryList(Request $request) {\n $countryList = DB::table('profile_country')->get();\n if (count($countryList)) {\n $response['code'] = 200;\n $response['message'] = \"Country found successfully\";\n foreach ($countryList as $key => $value) {\n $response['payload'][$key]['country_name'] = $value->nicename;\n $response['payload'][$key]['country_code'] = $value->phonecode;\n }\n } else {\n $response['code'] = 401;\n $response['message'] = \"No country found\";\n }\n return response()->json($response)->setStatusCode($response['code'], $response['message']);\n }", "title": "" }, { "docid": "2ce6ca4e17f5309ce45ab1bca8c6a5ac", "score": "0.70578015", "text": "protected function getAllCountryList() {\n if (!$this->_AllCountryList) {\n $this->_AllCountryList = $this->getLayout()->createBlock(\n '\\Excellence\\Geoip\\Block\\Adminhtml\\Form\\Field\\AllCountry', '', ['data' => ['is_render_to_js_template' => true]]\n );\n }\n return $this->_AllCountryList;\n }", "title": "" }, { "docid": "6d94ca35135d5a361398a0b411261877", "score": "0.70503986", "text": "public static function getAllCountries()\n {\n $locales = \\ResourceBundle::getLocales('');\n $r = [];\n foreach ($locales as $locale) {\n $c = \\Locale::getRegion($locale);\n if (2 === strlen($c)) {\n $r[$c] = \\Locale::getDisplayRegion($locale);\n }\n }\n ksort($r);\n return $r;\n }", "title": "" }, { "docid": "b3ee5337dec4de216d8fdb99d6899ce1", "score": "0.70439243", "text": "public function index()\n {\n $countries = Country::with('divisions')\n ->withFilters([\n 'has_shipping_methods' => new CountryFilter(),\n ])\n ->get();\n\n return CountryResource::collection($countries);\n }", "title": "" }, { "docid": "f1d64235f55caf499f92a1cff18d2692", "score": "0.7022643", "text": "public function getCountries()\n {\n $countries = null;\n $responseJson = null;\n //dd('Inside list entities controller');\n\n try\n {\n $countries = $this->commonService->getCountries();\n\n if(!empty($countries))\n {\n $responseJson = new ResponseJson(ErrorEnum::SUCCESS, trans('messages.'.ErrorEnum::COUNTRY_LIST_SUCCESS));\n }\n else\n {\n $responseJson = new ResponseJson(ErrorEnum::SUCCESS, trans('messages.'.ErrorEnum::NO_COUNTRY_LIST_FOUND));\n }\n\n $responseJson->setObj($countries);\n $responseJson->sendSuccessResponse();\n }\n catch(HelperException $helperExc)\n {\n //dd($helperExc);\n $errorMsg = $helperExc->getMessageForCode();\n $msg = AppendMessage::appendMessage($helperExc);\n Log::error($msg);\n }\n catch(Exception $exc)\n {\n //dd($exc);\n $msg = AppendMessage::appendGeneralException($exc);\n Log::error($msg);\n }\n\n return $responseJson;\n }", "title": "" }, { "docid": "25429868a0935e4316ae1c942a06a094", "score": "0.70156145", "text": "public function actionCountryList($q = null) {\n $data = GeoCountry::getCountriesByName($q);\n $out = [];\n foreach ($data as $d) {\n $out[] = ['value' => $d['country_name']];\n }\n\n return $out;\n }", "title": "" }, { "docid": "1a4181f3548b63802c0139295532b101", "score": "0.70152575", "text": "public static function coutriesForDDL(){\n\t\t$sql = mysql_query(\"SELECT countryName FROM iso_countries ORDER BY countryName\");\n\t\twhile($row = mysql_fetch_array($sql)){\n\t\t\t$countryArray[$row['countryName']] = $row['countryName'];\n\t\t}\n\t\treturn($countryArray);\n\t}", "title": "" }, { "docid": "4bc3d6118de30c03bb64e10812b07ffc", "score": "0.6987242", "text": "function com_get_countries($default = '') {\n $countries_array = array();\n if ($default) {\n $countries_array[] = array('id' => '',\n 'text' => $default);\n }\n $countries_query = mysql_query(\"select countries_id, countries_name from \" . TABLE_COUNTRIES . \" order by countries_name\");\n while ($countries = mysql_fetch_array($countries_query)) {\n $countries_array[] = array('id' => $countries['countries_id'],\n 'text' => $countries['countries_name']);\n }\n\n return $countries_array;\n }", "title": "" }, { "docid": "4aa07c9aa0d329f5f7319fc10395b698", "score": "0.6986649", "text": "public function list()\n {\n $data['title'] = \"Country\";\n $data['country'] = Country::all();\n return view('admin.country.list',$data);\n }", "title": "" }, { "docid": "0ac76f318d64cfc4e0e5a34ec9a1ad80", "score": "0.6983092", "text": "public function get_all_country(){\n\t\t\t$this->db->select('*');\n\t\t\t$this->db->from($this->table_name);\n\t\t\t$this->db->where('is_active', 'Y');\n\t\t\t$query = $this->db->get();\n\t\t\t//print($this->db->last_query());\n\t\t\treturn $query->result();\n\t\t}", "title": "" }, { "docid": "515c5df7dcb784066370fa5b957733f0", "score": "0.697529", "text": "protected function getCountryIds() {\n $this->countries = [\n 1 => 'DE',\n 2 => 'AT',\n 3 => 'BE',\n 4 => 'CH',\n 5 => 'CY',\n 6 => 'CZ',\n 7 => 'DK',\n 8 => 'ES',\n 9 => 'EE',\n 10 => 'FR',\n 11 => 'FI',\n 12 => 'GB',\n 13 => 'GR',\n 14 => 'HU',\n 15 => 'IT',\n 16 => 'IE',\n 17 => 'LU',\n 18 => 'LV',\n 19 => 'MT',\n 20 => 'NO',\n 21 => 'NL',\n 22 => 'PT',\n 23 => 'PL',\n 24 => 'SE',\n 25 => 'SG',\n 26 => 'SK',\n 27 => 'SI',\n 28 => 'US'\n ];\n // TODO Add remaining countries\n }", "title": "" }, { "docid": "165f1bd21b3d99fcc57f433d2b62fb17", "score": "0.6972167", "text": "function em_get_countries($add_blank = false, $sort = true){\n\tglobal $em_countries_array;\n\tif( !is_array($em_countries_array) ){\n\t\t$em_countries_array_i18n = array();\n\t\t$em_countries_array_i18n['cs'] = array ('AF' => 'Afghanistan', 'AL' => 'Albánie', 'DZ' => 'Alžírsko', 'AS' => 'Americká Samoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antarctica', 'AG' => 'Antigua a Barbuda', 'AR' => 'Argentina', 'AM' => 'Arménie', 'AW' => 'Aruba', 'AU' => 'Austrálie', 'AT' => 'Rakousko', 'AZ' => 'Ázerbájdžán', 'BS' => 'Bahamy', 'BH' => 'Bahrajn', 'BD' => 'Bangladéš', 'BB' => 'Barbados', 'BY' => 'Belorusko', 'BE' => 'Belgie', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Benin', 'BT' => 'Bhútán', 'BO' => 'Bolívie', 'BA' => 'Bosna a Hercegovina', 'BW' => 'Botswana', 'BR' => 'Brazílie', 'VG' => 'Britské Panenské ostrovy', 'BN' => 'Brunej', 'BG' => 'Bulharsko', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'Pobreží slonoviny', 'KH' => 'Kambodža', 'CM' => 'Kamerun', 'CA' => 'Kanada', 'CV' => 'Kapverdy', 'KY'=>'Kajmanské ostrovy', 'CF' => 'Stredoafrická republika', 'TD' => 'Cad', 'CL' => 'Chile', 'CN' => 'Cína', 'CO' => 'Kolumbie', 'KM' => 'Komory', 'CR' => 'Kostarika', 'HR' => 'Chorvatsko', 'CU' => 'Kuba', 'CY' => 'Kypr', 'CZ' => 'Česká republika', 'KP' => 'Severní Korea', 'CD' => 'Democratic Republic of the Congo', 'DK' => 'Dánsko', 'DJ' => 'Džibuti', 'DM' => 'Dominika', 'DO' => 'Dominikánská republika', 'EC' => 'Ekvádor', 'EG' => 'Egypt', 'SV' => 'Salvador', 'XE' => 'England', 'GQ' => 'Rovníková Guinea', 'ER' => 'Eritrea', 'EE' => 'Estonsko', 'ET' => 'Etiopie','FO' => 'Faerské','FJ' => 'Fidži', 'FI' => 'Finsko', 'FR' => 'Francie', 'PF' => 'Francouzská Polynésie', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Gruzie', 'DE' => 'Nemecko', 'GH' => 'Ghana', 'GR' => 'Recko', 'GL' => 'Grónsko', 'GD' => 'Grenada', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Guiné-Bissau', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Madarsko', 'IS' => 'Island', 'IN' => 'Indie', 'ID' => 'Indonésie', 'IR' => 'Írán', 'IQ' => 'Irák', 'IE' => 'Irsko', 'IL' => 'Izrael', 'IT' => 'Itálie', 'JE'=>'Jersey', 'JM' => 'Jamajka', 'JP' => 'Japonsko', 'JO' => 'Jordánsko', 'KZ' => 'Kazachstán', 'KE' => 'Kena', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Kuvajt', 'KG' => 'Kyrgyzstán', 'LA' => 'Laos', 'LV' => 'Lotyšsko', 'LB' => 'Libanon', 'LS' => 'Lesotho', 'LR' => 'Libérie', 'LY' => 'Libye', 'LI' => 'Lichtenštejnsko', 'LT' => 'Litva', 'LU' => 'Lucembursko', 'MO' => 'Macao', 'MK' => 'Makedonie', 'MG' => 'Madagaskar', 'MW' => 'Malawi', 'MY' => 'Malajsie', 'MV' => 'Maledivy', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Marshallovy ostrovy', 'MQ' => 'Martinik', 'MU' => 'Mauricius', 'MR' => 'Mauritánie', 'MX' => 'Mexiko', 'FM' => 'Micronésie', 'MD' => 'Moldávie', 'MC' => 'Monako', 'MN' => 'Mongolsko', 'ME' => 'Cerná Hora', 'MA' => 'Maroko', 'MZ' => 'Mozambik', 'MM' => 'Myanmar(Burma)', 'NA' => 'Namibie', 'NR' => 'Nauru', 'NP' => 'Nepál', 'NL' => 'Holandsko', 'AN' => 'Nizozemské Antily', 'NC' => 'Nová Kaledonie', 'NZ' => 'Nový Zéland', 'NI' => 'Nikaragua', 'NE' => 'Niger', 'NG' => 'Nigérie', 'XI' => 'Northern Ireland', 'MP' => 'Severní Mariany', 'NO' => 'Norsko', 'OM' => 'Omán', 'PK' => 'Pákistán', 'PW' => 'Palau', 'PS' => 'Palestina', 'PA' => 'Panama', 'PG' => 'Papua-Nová Guinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Filipíny', 'PL' => 'Polsko', 'PT' => 'Portugalsko', 'PR' => 'Portoriko', 'QA' => 'Katar', 'CG' => 'Republic of the Congo', 'RN' => 'Réunion', 'RO' => 'Rumunsko', 'RU' => 'Rusko', 'RW' => 'Rwanda', 'ST' => 'Svatý Tomáš a Princuv ostrov', 'KN' => 'Svatý Kryštof a Nevis', 'LC' => 'Svatá Lucie', 'VC' => 'Svatý Vincenc a Grenadiny', 'WS' => 'Samoa', 'SM' => 'San Marino', 'SA' => 'Saúdská Arábie', 'XS' => 'Skotsko', 'SN' => 'Senegal', 'RS' => 'Srbsko', 'SC' => 'Seychely', 'SL' => 'Sierra Leone', 'SG' => 'Singapur', 'SK' => 'Slovensko', 'SI' => 'Slovinsko', 'SB' => 'Šalamounovy ostrovy', 'SO' => 'Somálsko', 'ZA' => 'Jihoafrická republika', 'KR' => 'Jižní Korea', 'ES' => 'Španělsko', 'LK' => 'Srí Lanka', 'SD' => 'Súdán', 'SR' => 'Surinam', 'SZ' => 'Svazijsko', 'SE' => 'Švédsko', 'CH' => 'Švýcarsko', 'SY' => 'Sýrie', 'TW' => 'Tchaj-wan', 'TJ' => 'Tádžikistán', 'TZ' => 'Tanzanie', 'TH' => 'Thajsko', 'TL' => 'Východní Timor', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinidad a Tobago', 'TN' => 'Tunisko', 'TR' => 'Turecko', 'TM' => 'Turkmenistán', 'TV' => 'Tuvalu', 'VI' => 'Americké Panenské ostrovy', 'UG' => 'Uganda', 'UA' => 'Ukrajina', 'AE' => 'Spojené arabské emiráty', 'GB' => 'Spojené království', 'US' => 'Spojené státy', 'UY' => 'Uruguay', 'UZ' => 'Uzbekistán', 'VU' => 'Nové Hebridy', 'VA' => 'Vatikán', 'VE' => 'Venezuela', 'VN' => 'Vietnam', 'XW' => 'Wales', 'YE' => 'Jemen', 'ZM' => 'Zambie', 'ZW' => 'Zimbabwe' );\n\t\t$em_countries_array_i18n['da'] = array ('AF' => 'Afghanistan', 'AL' => 'Albanien', 'DZ' => 'Algeriet', 'AS' => 'Amerikansk Samoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antarktis', 'AG' => 'Antigua og Barbuda', 'AR' => 'Argentina', 'AM' => 'Armenien', 'AW' => 'Aruba', 'AU' => 'Australien', 'AT' => 'Østrig', 'AZ' => 'Aserbajdsjan', 'BS' => 'Bahamas', 'BH' => 'Bahrain', 'BD' => 'Bangladesh', 'BB' => 'Barbados', 'BY' => 'Belarus', 'BE' => 'Belgien', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Benin', 'BT' => 'Bhutan', 'BO' => 'Bolivia', 'BA' => 'Bosnien-Hercegovina', 'BW' => 'Botswana', 'BR' => 'Brasilien', 'VG' => 'De Britiske Jomfruøer', 'BN' => 'Brunei', 'BG' => 'Bulgarien', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'Côte d\\'Ivoire', 'KH' => 'Cambodja', 'CM' => 'Cameroun', 'CA' => 'Canada', 'CV' => 'Kap Verde', 'KY'=>'Caymanøerne', 'CF' => 'Den Centralafrikanske Republik', 'TD' => 'Tchad', 'CL' => 'Chile', 'CN' => 'Kina', 'CO' => 'Colombia', 'KM' => 'Comorerne', 'CR' => 'Costa Rica', 'HR' => 'Kroatien', 'CU' => 'Cuba', 'CY' => 'Cypern', 'CZ' => 'Tjekkiet', 'KP' => 'Nordkorea', 'CD' => 'Congo', 'DK' => 'Danmark', 'DJ' => 'Djibouti', 'DM' => 'Dominica', 'DO' => 'Den Dominikanske Republik', 'EC' => 'Ecuador', 'EG' => 'Egypten', 'SV' => 'El Salvador', 'XE' => 'England', 'GQ' => 'Ækvatorialguinea', 'ER' => 'Eritrea', 'EE' => 'Estland', 'ET' => 'Etiopien','FO' => 'Færøerne', 'FJ' => 'Fiji', 'FI' => 'Finland', 'FR' => 'Frankrig', 'PF' => 'Fransk Polynesien', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Georgien', 'DE' => 'Tyskland', 'GH' => 'Ghana', 'GR' => 'Grækenland', 'GL' => 'Grønland (Kalaallit Nunaat)', 'GD' => 'Grenada', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Guinea-Bissau', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HN' => 'Honduras', 'HK' => 'Hongkong', 'HU' => 'Ungarn', 'IS' => 'Island', 'IN' => 'Indien', 'ID' => 'Indonesien', 'IR' => 'Iran', 'IQ' => 'Irak', 'IE' => 'Irland', 'IL' => 'Israel', 'IT' => 'Italien', 'JE'=>'Jersey', 'JM' => 'Jamaica', 'JP' => 'Japan', 'JO' => 'Jordan', 'KZ' => 'Kasakhstan', 'KE' => 'Kenya', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Kuwait', 'KG' => 'Kirgisistan', 'LA' => 'Laos', 'LV' => 'Letland', 'LB' => 'Libanon', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LY' => 'Libyen', 'LI' => 'Liechtenstein', 'LT' => 'Litauen', 'LU' => 'Luxembourg', 'MO' => 'Macao', 'MK' => 'Makedonien', 'MG' => 'Madagaskar', 'MW' => 'Malawi', 'MY' => 'Malaysia', 'MV' => 'Maldiverne', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Marshalløerne', 'MQ' => 'Martinique', 'MU' => 'Mauritius', 'MR' => 'Mauretanien', 'MX' => 'Mexico', 'FM' => 'Mikronesien', 'MD' => 'Moldova', 'MC' => 'Monaco', 'MN' => 'Mongoliet', 'ME' => 'Montenegro', 'MA' => 'Marokko', 'MZ' => 'Mozambique', 'MM' => 'Myanmar(Burma)', 'NA' => 'Namibia', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Nederlandene', 'AN' => 'De Nederlandske Antiller', 'NC' => 'Ny Kaledonien', 'NZ' => 'New Zealand', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'XI' => 'Northern Ireland', 'MP' => 'Nordmarianerne', 'NO' => 'Norge', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PW' => 'Palau', 'PS' => 'Palestine', 'PA' => 'Panama', 'PG' => 'Papua Ny Guinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Filippinerne', 'PL' => 'Polen', 'PT' => 'Portugal', 'PR' => 'Puerto Rico', 'QA' => 'Qatar', 'CG' => 'Republic of the Congo', 'RN' => 'Réunion', 'RO' => 'Rumænien', 'RU' => 'Rusland', 'RW' => 'Rwanda', 'ST' => 'São Tomé og Príncipe', 'KN' => 'Saint Kitts og Nevis', 'LC' => 'Saint Lucia', 'VC' => 'Saint Vincent og Grenadinerne', 'WS' => 'Samoa', 'SM' => 'San Marino', 'SA' => 'Saudi-Arabien', 'XS' => 'Scotland', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seychellerne', 'SL' => 'Sierra Leone', 'SG' => 'Singapore', 'SK' => 'Slovakiet', 'SI' => 'Slovenien', 'SB' => 'Salomonøerne', 'SO' => 'Somalia', 'ZA' => 'Sydafrika', 'KR' => 'Sydkorea', 'ES' => 'Spanien', 'LK' => 'Sri Lanka', 'SD' => 'Sudan', 'SR' => 'Surinam', 'SZ' => 'Swaziland', 'SE' => 'Sverige', 'CH' => 'Schweiz', 'SY' => 'Syrien', 'TW' => 'Taiwan', 'TJ' => 'Tadsjikistan', 'TZ' => 'Tanzania', 'TH' => 'Thailand', 'TL' => 'Østtimor', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinidad og Tobago', 'TN' => 'Tunesien', 'TR' => 'Tyrkiet', 'TM' => 'Turkmenistan', 'TV' => 'Tuvalu', 'VI' => 'De Amerikanske Jomfruøer', 'UG' => 'Uganda', 'UA' => 'Ukraine', 'AE' => 'De Forenede Arabiske Emirater', 'GB' => 'Det Forenede Kongerige', 'US' => 'USA', 'UY' => 'Uruguay', 'UZ' => 'Usbekistan', 'VU' => 'Vanuatu', 'VA' => 'Vatikanstaten', 'VE' => 'Venezuela', 'VN' => 'Vietnam', 'XW' => 'Wales', 'YE' => 'Yemen', 'ZM' => 'Zambia', 'ZW' => 'Zimbabwe' );\n\t\t$em_countries_array_i18n['es'] = array ('AF' => 'Afganistán', 'AL' => 'Albania', 'DZ' => 'Argelia', 'AS' => 'Samoa Americana', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antártida', 'AG' => 'Antigua y Barbuda', 'AR' => 'Argentina', 'AM' => 'Armenia', 'AW' => 'Aruba', 'AU' => 'Australia', 'AT' => 'Austria', 'AZ' => 'Azerbaiyán', 'BS' => 'Bahamas', 'BH' => 'Bahráin', 'BD' => 'Bangladesh', 'BB' => 'Barbados', 'BY' => 'Bielorrusia', 'BE' => 'Bélgica', 'BZ' => 'Belice', 'BM' => 'Bermuda', 'BJ' => 'Benin', 'BT' => 'Bután', 'BO' => 'Bolivia', 'BA' => 'Bosnia y Hercegovina', 'BW' => 'Botsuana', 'BR' => 'Brasil', 'VG' => 'Islas Vírgenes Británicas', 'BN' => 'Brunéi', 'BG' => 'Bulgaria', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'Costa de Marfil', 'KH' => 'Camboya', 'CM' => 'Camerún', 'CA' => 'Canadá', 'CV' => 'Cabo Verde', 'KY'=>'Islas Caimán', 'CF' => 'República Centroafricana', 'TD' => 'Chad', 'CL' => 'Chile', 'CN' => 'China', 'CO' => 'Colombia', 'KM' => 'Comoras', 'CR' => 'Costa Rica', 'HR' => 'Croacia', 'CU' => 'Cuba', 'CY' => 'Chipre', 'CZ' => 'República Checa', 'KP' => 'Corea del Norte', 'CD' => 'República Democrática del Congo', 'DK' => 'Dinamarca', 'DJ' => 'Yibuti', 'DM' => 'Dominica', 'DO' => 'República Dominicana', 'EC' => 'Ecuador', 'EG' => 'Egipto', 'SV' => 'El Salvador', 'XE' => 'England', 'GQ' => 'Guinea Ecuatorial', 'ER' => 'Eritrea','FO' => 'Islas Faroe', 'EE' => 'Estonia', 'ET' => 'Etiopía', 'FJ' => 'Fiyi', 'FI' => 'Finlandia', 'FR' => 'Francia', 'PF' => 'Polinesia Francesa', 'GA' => 'Gabón', 'GM' => 'Gambia', 'GE' => 'Georgia', 'DE' => 'Alemania', 'GH' => 'Ghana', 'GR' => 'Grecia', 'GL' => 'Groenlandia', 'GD' => 'Granada', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Guinea-Bissau', 'GY' => 'Guyana', 'HT' => 'Haití', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Hungría', 'IS' => 'Islandia', 'IN' => 'India', 'ID' => 'Indonesia', 'IR' => 'Irán', 'IQ' => 'Iraq', 'IE' => 'Irlanda', 'IL' => 'Israel', 'IT' => 'Italia', 'JE'=>'Jersey', 'JM' => 'Jamaica', 'JP' => 'Japón', 'JO' => 'Jordania', 'KZ' => 'Kazajistán', 'KE' => 'Kenia', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Kuwait', 'KG' => 'Kirguizistán', 'LA' => 'Laos', 'LV' => 'Letonia', 'LB' => 'Líbano', 'LS' => 'Lesoto', 'LR' => 'Liberia', 'LY' => 'Libia', 'LI' => 'Liechtenstein', 'LT' => 'Lituania', 'LU' => 'Luxemburgo', 'MO' => 'Macao', 'MK' => 'Macedonia', 'MG' => 'Madagascar', 'MW' => 'Malaui', 'MY' => 'Malasia', 'MV' => 'Maldivas', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Islas Marshall', 'MQ' => 'Martinica', 'MU' => 'Mauricio', 'MR' => 'Mauritania', 'MX' => 'México', 'FM' => 'Micronesia', 'MD' => 'Moldavia', 'MC' => 'Mónaco', 'MN' => 'Mongolia', 'ME' => 'Montenegro', 'MA' => 'Marruecos', 'MZ' => 'Mozambique', 'MM' => 'Myanmar(Burma)', 'NA' => 'Namibia', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Países Bajos', 'AN' => 'Antillas Neerlandesas', 'NC' => 'Nueva Caledonia', 'NZ' => 'Nueva Zelanda', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'XI' => 'Northern Ireland', 'MP' => 'Islas Marianas del Norte', 'NO' => 'Noruega', 'OM' => 'Omán', 'PK' => 'Pakistán', 'PW' => 'Palaos', 'PS' => 'Palestine', 'PA' => 'Panamá', 'PG' => 'Papúa-Nueva Guinea', 'PY' => 'Paraguay', 'PE' => 'Perú', 'PH' => 'Filipinas', 'PL' => 'Polonia', 'PT' => 'Portugal', 'PR' => 'Puerto Rico', 'QA' => 'Qatar', 'CG' => 'Republic of the Congo', 'RN' => 'Réunion', 'RO' => 'Rumania', 'RU' => 'Russia', 'RW' => 'Ruanda', 'ST' => 'Santo Tomé y Príncipe', 'KN' => 'San Cristóbal y Nieves', 'LC' => 'Santa Lucía', 'VC' => 'San Vicente y las Granadinas', 'WS' => 'Samoa', 'SM' => 'San Marino', 'SA' => 'Arabia Saudí', 'XS' => 'Scotland', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seychelles', 'SL' => 'Sierra Leona', 'SG' => 'Singapur', 'SK' => 'Eslovaquia', 'SI' => 'Eslovenia', 'SB' => 'Islas Salomón', 'SO' => 'Somalia', 'ZA' => 'Sudáfrica', 'KR' => 'Corea del Sur', 'ES' => 'España', 'LK' => 'Sri Lanka', 'SD' => 'Sudán', 'SR' => 'Surinam', 'SZ' => 'Suazilandia', 'SE' => 'Suecia', 'CH' => 'Suiza', 'SY' => 'Siria', 'TW' => 'Taiwán', 'TJ' => 'Tayikistán', 'TZ' => 'Tanzania', 'TH' => 'Tailandia', 'TL' => 'Timor Oriental', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinidad y Tobago', 'TN' => 'Túnez', 'TR' => 'Turquía', 'TM' => 'Turkmenistán', 'TV' => 'Tuvalu', 'VI' => 'Islas Vírgenes Americanas', 'UG' => 'Uganda', 'UA' => 'Ucrania', 'AE' => 'Emiratos Árabes Unidos', 'GB' => 'Reino Unido', 'US' => 'Estados Unidos', 'UY' => 'Uruguay', 'UZ' => 'Uzbekistán', 'VU' => 'Vanuatu', 'VA' => 'El Vaticano', 'VE' => 'Venezuela', 'VN' => 'Vietnam', 'XW' => 'Wales', 'YE' => 'Yemen', 'ZM' => 'Zambia', 'ZW' => 'Zimbabue' );\n\t\t$em_countries_array_i18n['fr'] = array ('AF' => 'Afghanistan', 'AL' => 'Albanie', 'DZ' => 'Algérie', 'AS' => 'Samoa américaines', 'AD' => 'Andorre', 'AO' => 'Angola', 'AQ' => 'Antarctique', 'AG' => 'Antigua-et-Barbuda', 'AR' => 'Argentine', 'AM' => 'Arménie', 'AW' => 'Aruba', 'AU' => 'Australie', 'AT' => 'Autriche', 'AZ' => 'Azerbaïdjan', 'BS' => 'Bahamas', 'BH' => 'Bahreïn', 'BD' => 'Bangladesh', 'BB' => 'Barbade', 'BY' => 'Biélorussie', 'BE' => 'Belgique', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Bénin', 'BT' => 'Bhoutan', 'BO' => 'Bolivie', 'BA' => 'Bosnie-Herzégovine', 'BW' => 'Botswana', 'BR' => 'Brésil', 'VG' => 'Iles Vierges britanniques', 'BN' => 'Brunei', 'BG' => 'Bulgarie', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'C&ocirc;te D\\'Ivoire', 'KH' => 'Cambodge', 'CM' => 'Cameroun', 'CA' => 'Canada', 'CV' => 'Cap-Vert', 'KY'=>'Iles Cayman', 'CF' => 'République centrafricaine', 'TD' => 'Tchad', 'CL' => 'Chili', 'CN' => 'Chine', 'CO' => 'Colombie', 'KM' => 'Comores', 'CR' => 'Costa Rica', 'HR' => 'Croatie', 'CU' => 'Cuba', 'CY' => 'Chypre', 'CZ' => 'République tchèque', 'KP' => 'Corée du Nord', 'CD' => 'République démocratique du Congo', 'DK' => 'Danemark', 'DJ' => 'Djibouti', 'DM' => 'Dominique', 'DO' => 'République dominicaine', 'EC' => 'Équateur', 'EG' => 'Égypte', 'SV' => 'Salvador', 'XE' => 'England', 'GQ' => 'Guinée équatoriale', 'ER' => 'Érythrée', 'EE' => 'Estonie', 'ET' => 'Éthiopie','FO' => 'Îles Féroé', 'FJ' => 'Iles Fidji', 'FI' => 'Finlande', 'FR' => 'France', 'PF' => 'Polynésie française', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Géorgie', 'DE' => 'Allemagne', 'GH' => 'Ghana', 'GR' => 'Grèce', 'GL' => 'Groenland', 'GD' => 'Grenade', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinée', 'GW' => 'Guinée-Bissao', 'GY' => 'Guyana', 'HT' => 'Haïti', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Hongrie', 'IS' => 'Islande', 'IN' => 'Inde', 'ID' => 'Indonésie', 'IR' => 'Iran', 'IQ' => 'Iraq', 'IE' => 'Irlande', 'IL' => 'Israël', 'IT' => 'Italie', 'JE'=>'Jersey', 'JM' => 'Jamaïque', 'JP' => 'Japon', 'JO' => 'Jordanie', 'KZ' => 'Kazakhstan', 'KE' => 'Kenya', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Koweït', 'KG' => 'Kirghizistan', 'LA' => 'Laos', 'LV' => 'Lettonie', 'LB' => 'Liban', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LY' => 'Libye', 'LI' => 'Liechtenstein', 'LT' => 'Lituanie', 'LU' => 'Luxembourg', 'MO' => 'Macao', 'MK' => 'Macédoine', 'MG' => 'Madagascar', 'MW' => 'Malawi', 'MY' => 'Malaisie', 'MV' => 'Maldives', 'ML' => 'Mali', 'MT' => 'Malte', 'MH' => 'Iles Marshall', 'MQ' => 'Martinique', 'MU' => 'Maurice', 'MR' => 'Mauritanie', 'MX' => 'Mexique', 'FM' => 'Micronésie', 'MD' => 'Moldavie', 'MC' => 'Monaco', 'MN' => 'Mongolie', 'ME' => 'Montenegro', 'MA' => 'Maroc', 'MZ' => 'Mozambique', 'MM' => 'le Myanmar', 'NA' => 'Namibie', 'NR' => 'Nauru', 'NP' => 'Népal', 'NL' => 'Pays-Bas', 'AN' => 'Antilles néerlandaises', 'NC' => 'Nouvelle-Calédonie', 'NZ' => 'Nouvelle-Zélande', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'XI' => 'Northern Ireland', 'MP' => 'Mariannes du Nord', 'NO' => 'Norvège', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PW' => 'Palau', 'PS' => 'Palestine', 'PA' => 'Panama', 'PG' => 'Papouasie-Nouvelle-Guinée', 'PY' => 'Paraguay', 'PE' => 'Pérou', 'PH' => 'Philippines', 'PL' => 'Pologne', 'PT' => 'Portugal', 'PR' => 'Porto Rico', 'QA' => 'Qatar', 'CG' => 'Republic of the Congo', 'RN' => 'Réunion', 'RO' => 'Roumanie', 'RU' => 'Russie', 'RW' => 'Rwanda', 'ST' => 'Sao Tomé-et-Principe', 'KN' => 'Saint-Christophe-et-Niévès', 'LC' => 'Sainte-Lucie', 'VC' => 'Saint-Vincent-et-les-Grenadines', 'WS' => 'Samoa', 'SM' => 'Saint-Marin', 'SA' => 'Arabie saoudite', 'XS' => 'Scotland', 'SN' => 'Sénégal', 'RS' => 'Serbia', 'SC' => 'Seychelles', 'SL' => 'Sierra Leone', 'SG' => 'Singapour', 'SK' => 'Slovaquie', 'SI' => 'Slovénie', 'SB' => 'Iles Salomon', 'SO' => 'Somalie', 'ZA' => 'Afrique du Sud', 'KR' => 'Corée du Sud', 'ES' => 'Espagne', 'LK' => 'Sri Lanka', 'SD' => 'Soudan', 'SR' => 'Suriname', 'SZ' => 'Swaziland', 'SE' => 'Suède', 'CH' => 'Suisse', 'SY' => 'Syrie', 'TW' => 'Taïwan', 'TJ' => 'Tadjikistan', 'TZ' => 'Tanzanie', 'TH' => 'Thaïlande', 'TL' => 'Timor Oriental', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinité-et-Tobago', 'TN' => 'Tunisie', 'TR' => 'Turquie', 'TM' => 'Turkménistan', 'TV' => 'Tuvalu', 'VI' => 'Iles Vierges américaines', 'UG' => 'Ouganda', 'UA' => 'Ukraine', 'AE' => 'Émirats arabes unis', 'GB' => 'Royaume-Uni', 'US' => 'États-Unis', 'UY' => 'Uruguay', 'UZ' => 'Ouzbékistan', 'VU' => 'Vanuatu', 'VA' => 'Saint-Siège', 'VE' => 'Venezuela', 'VN' => 'Viêt Nam', 'XW' => 'Wales', 'YE' => 'Yémen', 'ZM' => 'Zambie', 'ZW' => 'Zimbabwe' );\n\t\t$em_countries_array_i18n['de'] = array ('AF' => 'Afghanistan', 'AL' => 'Albanien', 'DZ' => 'Algerien', 'AS' => 'Amerikanisch-Samoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antarktis', 'AG' => 'Antigua und Barbuda', 'AR' => 'Argentinien', 'AM' => 'Armenien', 'AW' => 'Aruba', 'AU' => 'Australien', 'AT' => 'Österreich', 'AZ' => 'Aserbaidschan', 'BS' => 'Bahamas', 'BH' => 'Bahrain', 'BD' => 'Bangladesch', 'BB' => 'Barbados', 'BY' => 'Belarus', 'BE' => 'Belgien', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Benin', 'BT' => 'Bhutan', 'BO' => 'Bolivien', 'BA' => 'Bosnien und Herzegowina', 'BW' => 'Botsuana', 'BR' => 'Brasilien', 'VG' => 'Britische Jungferninseln', 'BN' => 'Brunei Darussalam', 'BG' => 'Bulgarien', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'C&ocirc;te D\\'Ivoire', 'KH' => 'Kambodscha', 'CM' => 'Kamerun', 'CA' => 'Kanada', 'CV' => 'Kap Verde', 'KY'=>'Kaimaninseln', 'CF' => 'Zentralafrikanische Republik', 'TD' => 'Tschad', 'CL' => 'Chile', 'CN' => 'China', 'CO' => 'Kolumbien', 'KM' => 'Komoren', 'CR' => 'Costa Rica', 'HR' => 'Kroatien', 'CU' => 'Kuba', 'CY' => 'Zypern', 'CZ' => 'Tschechische Republik', 'KP' => 'Demokratische Volksrepublik Korea', 'CD' => 'Demokratische Republik Kongo', 'DK' => 'Dänemark', 'DJ' => 'Dschibuti', 'DM' => 'Dominica', 'DO' => 'Dominikanische Republik', 'EC' => 'Ecuador', 'EG' => 'Ägypten', 'SV' => 'El Salvador', 'XE' => 'England', 'GQ' => 'Äquatorialguinea', 'ER' => 'Eritrea', 'EE' => 'Estland', 'ET' => 'Äthiopien','FO' => 'Färöer Inseln', 'FJ' => 'Fidschi', 'FI' => 'Finnland', 'FR' => 'Frankreich', 'PF' => 'Französisch-Polynesien', 'GA' => 'Gabun', 'GM' => 'Gambia', 'GE' => 'Georgien', 'DE' => 'Deutschland', 'GH' => 'Ghana', 'GR' => 'Griechenland', 'GL' => 'Grönland', 'GD' => 'Grenada', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Guinea-Bissau', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HN' => 'Honduras', 'HK' => 'HongKong', 'HU' => 'Ungarn', 'IS' => 'Island', 'IN' => 'Indien', 'ID' => 'Indonesien', 'IR' => 'Iran', 'IQ' => 'Irak', 'IE' => 'Irland', 'IL' => 'Israel', 'IT' => 'Italien', 'JE'=>'Jersey', 'JM' => 'Jamaika', 'JP' => 'Japan', 'JO' => 'Jordanien', 'KZ' => 'Kasachstan', 'KE' => 'Kenia', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Kuwait', 'KG' => 'Kirgisistan', 'LA' => 'Laos', 'LV' => 'Lettland', 'LB' => 'Libanon', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LY' => 'Libyen', 'LI' => 'Liechtenstein', 'LT' => 'Litauen', 'LU' => 'Luxemburg', 'MO' => 'Macau', 'MK' => 'Mazedonien', 'MG' => 'Madagaskar', 'MW' => 'Malawi', 'MY' => 'Malaysia', 'MV' => 'Malediven', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Marshallinseln', 'MQ' => 'Martinique', 'MU' => 'Mauritius', 'MR' => 'Mauretanien', 'MX' => 'Mexiko', 'FM' => 'Mikronesien', 'MD' => 'Republik Moldau', 'MC' => 'Monaco', 'MN' => 'Mongolei', 'ME' => 'Montenegro', 'MA' => 'Marokko', 'MZ' => 'Mosambik', 'MM' => 'Myanmar(Burma)', 'NA' => 'Namibia', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Niederlande', 'AN' => 'Niederländische Antillen', 'NC' => 'Neukaledonien', 'NZ' => 'Neuseeland', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'XI' => 'Northern Ireland', 'MP' => 'Nördliche Marianen', 'NO' => 'Norwegen', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PW' => 'Palau', 'PS' => 'Palestine', 'PA' => 'Panama', 'PG' => 'Papua-Neuguinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Philippinen', 'PL' => 'Polen', 'PT' => 'Portugal', 'PR' => 'Puerto Rico', 'QA' => 'Katar', 'CG' => 'Kongo', 'RN' => 'Réunion', 'RO' => 'Rumänien', 'RU' => 'Russische Föderation', 'RW' => 'Ruanda', 'ST' => 'São Tomé und Príncipe', 'KN' => 'St. Kitts und Nevis', 'LC' => 'St. Lucia', 'VC' => 'St. Vincent und die Grenadinen', 'WS' => 'Samoa', 'SM' => 'San Marino', 'SA' => 'Saudi-Arabien', 'XS' => 'Scotland', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seychellen', 'SL' => 'Sierra Leone', 'SG' => 'Singapur', 'SK' => 'Slowakei', 'SI' => 'Slowenien', 'SB' => 'Salomonen', 'SO' => 'Somalia', 'ZA' => 'Südafrika', 'KR' => 'Republik Korea', 'ES' => 'Spanien', 'LK' => 'Sri Lanka', 'SD' => 'Sudan', 'SR' => 'Suriname', 'SZ' => 'Swasiland', 'SE' => 'Schweden', 'CH' => 'Schweiz', 'SY' => 'Syrien', 'TW' => 'Taiwan', 'TJ' => 'Tadschikistan', 'TZ' => 'Tansania', 'TH' => 'Thailand', 'TL' => 'Osttimor', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinidad und Tobago', 'TN' => 'Tunesien', 'TR' => 'Türkei', 'TM' => 'Turkmenistan', 'TV' => 'Tuvalu', 'VI' => 'Amerikanische Jungferninseln', 'UG' => 'Uganda', 'UA' => 'Ukraine', 'AE' => 'Vereinigte Arabische Emirate', 'GB' => 'Vereinigtes Königreich', 'US' => 'Vereinigte Staaten', 'UY' => 'Uruguay', 'UZ' => 'Usbekistan', 'VU' => 'Vanuatu', 'VA' => 'Vatikanstadt', 'VE' => 'Venezuela', 'VN' => 'Vietnam', 'XW' => 'Wales', 'YE' => 'Jemen', 'ZM' => 'Sambia', 'ZW' => 'Simbabwe' );\n\t\t$em_countries_array_i18n['hu'] = array ('AF' => 'Afganisztán', 'AL' => 'Albánia', 'DZ' => 'Algéria', 'AS' => 'Amerikai Szamoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antarktisz', 'AG' => 'Antigua és Barbuda', 'AR' => 'Argentína', 'AM' => 'Örményország', 'AW' => 'Aruba', 'AU' => 'Ausztrália', 'AT' => 'Ausztria', 'AZ' => 'Azerbajdzsán', 'BS' => 'Bahamas', 'BH' => 'Bahrein', 'BD' => 'Banglades', 'BB' => 'Barbados', 'BY' => 'Belorusszia', 'BE' => 'Belgium', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Benin', 'BT' => 'Bhután', 'BO' => 'Bolívia', 'BA' => 'Bosznia-Hercegovina', 'BW' => 'Botswana', 'BR' => 'Brazília', 'VG' => 'Brit Virgin-szigetek', 'BN' => 'Brunei Darussalam', 'BG' => 'Bulgária', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'Côte d\\'Ivoire (Elefántcsontpart)', 'KH' => 'Kambodzsa', 'CM' => 'Kamerun', 'CA' => 'Kanada', 'CV' => 'Zöld-foki-szigetek', 'KY'=>'Kajmán-szigetek', 'CF' => 'Közép-Afrikai Köztársaság', 'TD' => 'Csád', 'CL' => 'Chile', 'CN' => 'Kína', 'CO' => 'Kolumbia', 'KM' => 'Comore-szigetek', 'CR' => 'Costa Rica', 'HR' => 'Horvátország', 'CU' => 'Kuba', 'CY' => 'Ciprus', 'CZ' => 'Cseh Köztársaság', 'KP' => 'Koreai Népi Demokratikus Köztársaság', 'CD' => 'Kongói Demokratikus Köztársaság', 'DK' => 'Dánia', 'DJ' => 'Dzsibuti', 'DM' => 'Dominika', 'DO' => 'Dominikai Köztársaság', 'EC' => 'Ecuador', 'EG' => 'Egyiptom', 'SV' => 'El Salvador', 'XE' => 'England', 'GQ' => 'Egyenlítõi Guinea', 'ER' => 'Eritrea', 'EE' => 'Észtország', 'ET' => 'Etiópia','FO' => 'Faroe Szigetek', 'FJ' => 'Fidzsi', 'FI' => 'Finnország', 'FR' => 'Franciaország', 'PF' => 'Francia Polinézia', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'GrLzia', 'DE' => 'Németország', 'GH' => 'Ghána', 'GR' => 'Görögország', 'GL' => 'Grönland', 'GD' => 'Grenada', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Bissau-Guinea', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Magyarország', 'IS' => 'Izland', 'IN' => 'India', 'ID' => 'Indonézia', 'IR' => 'Irán', 'IQ' => 'Irak', 'IE' => 'Írország', 'IL' => 'Izrael', 'IT' => 'Olaszország', 'JE'=>'Jersey', 'JM' => 'Jamaica', 'JP' => 'Japán', 'JO' => 'Jordánia', 'KZ' => 'Kazahsztán', 'KE' => 'Kenya', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Kuvait', 'KG' => 'Kirgizisztán', 'LA' => 'Lao Népi Demokratikus Köztársaság', 'LV' => 'Litvánia', 'LB' => 'Libanon', 'LS' => 'Lesotho', 'LR' => 'Libéria', 'LY' => 'Líbia', 'LI' => 'Liechtenstein', 'LT' => 'Litvánia', 'LU' => 'Luxemburg', 'MO' => 'Makaó', 'MK' => 'Macedónia', 'MG' => 'Madagaszkár', 'MW' => 'Malawi', 'MY' => 'Malajzia', 'MV' => 'Maldív-szigetek', 'ML' => 'Mali', 'MT' => 'Málta', 'MH' => 'Marshall-szigetek', 'MQ' => 'Martinique', 'MU' => 'Mauritius', 'MR' => 'Mauritánia', 'MX' => 'Mexikó', 'FM' => 'Mikronéziai Szövetségi Államok', 'MD' => 'Moldva', 'MC' => 'Monaco', 'MN' => 'Mongólia', 'ME' => 'Montenegro', 'MA' => 'Marokkó', 'MZ' => 'Mozambik', 'MM' => 'Myanmar(Burma)', 'NA' => 'Namíbia', 'NR' => 'Nauru', 'NP' => 'Nepál', 'NL' => 'Hollandia', 'AN' => 'Holland Antillák', 'NC' => 'Új-Kaledónia', 'NZ' => 'Új-Zéland', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigéria', 'XI' => 'Northern Ireland', 'MP' => 'Észak-Mariana-szigetek', 'NO' => 'Norvégia', 'OM' => 'Omán', 'PK' => 'Pakisztán', 'PW' => 'Palau', 'PS' => 'Palestine', 'PA' => 'Panama', 'PG' => 'Pápua Új-Guinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Fülöp-szigetek', 'PL' => 'Lengyelország', 'PT' => 'Portugália', 'PR' => 'Puerto Rico', 'QA' => 'Katar', 'CG' => 'Kongó', 'RN' => 'Réunion', 'RO' => 'Románia', 'RU' => 'Orosz Föderáció', 'RW' => 'Ruanda', 'ST' => 'Sao Tome és Principe', 'KN' => 'Saint Kitts és Nevis', 'LC' => 'Szent Lucia', 'VC' => 'Saint Vincent és Grenadines', 'WS' => 'Szamoa', 'SM' => 'San Marino', 'SA' => 'SzaLd-Arábia', 'XS' => 'Scotland', 'SN' => 'Szenegál', 'RS' => 'Serbia', 'SC' => 'Seychelle-szigetek', 'SL' => 'Sierra Leone', 'SG' => 'SzingapLr', 'SK' => 'Szlovákia', 'SI' => 'Szlovénia', 'SB' => 'Salamon-szigetek', 'SO' => 'Szomália', 'ZA' => 'Dél-Afrika', 'KR' => 'Koreai Köztársaság', 'ES' => 'Spanyolország', 'LK' => 'Srí Lanka', 'SD' => 'Szudán', 'SR' => 'Suriname', 'SZ' => 'Szváziföld', 'SE' => 'Svédország', 'CH' => 'Svájc', 'SY' => 'Szíriai Arab Köztársaság', 'TW' => 'Tajvan', 'TJ' => 'Tádzsikisztán', 'TZ' => 'Tanzániai Egyesült Köztársaság', 'TH' => 'Thaiföld', 'TL' => 'Kelet-Timor', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinidad és Tobago', 'TN' => 'Tunézia', 'TR' => 'Törökország', 'TM' => 'Türkmenisztán', 'TV' => 'Tuvalu', 'VI' => 'Amerikai Virgin-szigetek', 'UG' => 'Uganda', 'UA' => 'Ukrajna', 'AE' => 'Egyesült Arab Emirátusok', 'GB' => 'Egyesült Királyság', 'US' => 'Egyesült Államok', 'UY' => 'Uruguay', 'UZ' => 'Üzbegisztán', 'VU' => 'Vanuatu', 'VA' => 'Vatikán', 'VE' => 'Venezuela', 'VN' => 'Vietnám', 'XW' => 'Wales', 'YE' => 'Jemen', 'ZM' => 'Zambia', 'ZW' => 'Zimbabwe' );\n\t\t$em_countries_array_i18n['it'] = array ('AF' => 'Afghanistan', 'AL' => 'Albania', 'DZ' => 'Algeria', 'AS' => 'Samoa americane', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antartide', 'AG' => 'Antigua e Barbuda', 'AR' => 'Argentina', 'AM' => 'Armenia', 'AW' => 'Aruba', 'AU' => 'Australia', 'AT' => 'Austria', 'AZ' => 'Azerbaigian', 'BS' => 'Bahamas', 'BH' => 'Bahrein', 'BD' => 'Bangladesh', 'BB' => 'Barbados', 'BY' => 'Bielorussia', 'BE' => 'Belgio', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Benin', 'BT' => 'Bhutan', 'BO' => 'Bolivia', 'BA' => 'Bosnia-Erzegovina', 'BW' => 'Botswana', 'BR' => 'Brasile', 'VG' => 'Isole Vergini britanniche', 'BN' => 'Brunei', 'BG' => 'Bulgaria', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'Costa d\\'Avorio', 'KH' => 'Cambogia', 'CM' => 'Camerun', 'CA' => 'Canada', 'CV' => 'Capo Verde', 'KY'=>'Isole Cayman', 'CF' => 'Repubblica Centrafricana', 'TD' => 'Ciad', 'CL' => 'Cile', 'CN' => 'Cina', 'CO' => 'Colombia', 'KM' => 'Comore', 'CR' => 'Costa Rica', 'HR' => 'Croazia', 'CU' => 'Cuba', 'CY' => 'Cipro', 'CZ' => 'Repubblica ceca', 'KP' => 'Corea del Nord', 'CD' => 'Congo', 'DK' => 'Danimarca', 'DJ' => 'Gibuti', 'DM' => 'Dominica', 'DO' => 'Dominican Republic', 'EC' => 'Ecuador', 'EG' => 'Egitto', 'SV' => 'El Salvador', 'XE' => 'England', 'GQ' => 'Guinea Equatoriale', 'ER' => 'Eritrea', 'EE' => 'Estonia', 'ET' => 'Etiopia','FO' => 'Isole Faroe', 'FJ' => 'Figi', 'FI' => 'Finlandia', 'FR' => 'Francia', 'PF' => 'Polinesia francese', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Georgia', 'DE' => 'Germania', 'GH' => 'Ghana', 'GR' => 'Grecia', 'GL' => 'Groenlandia', 'GD' => 'Grenada', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Guinea Bissau', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Ungheria', 'IS' => 'Islanda', 'IN' => 'India', 'ID' => 'Indonesia', 'IR' => 'Iran', 'IQ' => 'Iraq', 'IE' => 'Irlanda', 'IL' => 'Israele', 'IT' => 'Italia', 'JE'=>'Jersey', 'JM' => 'Giamaica', 'JP' => 'Giappone', 'JO' => 'Giordania', 'KZ' => 'Kazakistan', 'KE' => 'Kenya', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Kuwait', 'KG' => 'Kirghizistan', 'LA' => 'Laos', 'LV' => 'Lettonia', 'LB' => 'Libano', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LY' => 'Libia', 'LI' => 'Liechtenstein', 'LT' => 'Lituania', 'LU' => 'Lussemburgo', 'MO' => 'Macao', 'MK' => 'Macedonia', 'MG' => 'Madagascar', 'MW' => 'Malawi', 'MY' => 'Malesia', 'MV' => 'Maldive', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Isole Marshall', 'MQ' => 'Martinica', 'MU' => 'Maurizio', 'MR' => 'Mauritania', 'MX' => 'Messico', 'FM' => 'Micronesia', 'MD' => 'Moldavia', 'MC' => 'Monaco', 'MN' => 'Mongolia', 'ME' => 'Montenegro', 'MA' => 'Marocco', 'MZ' => 'Mozambico', 'MM' => 'Myanmar(Birmania)', 'NA' => 'Namibia', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Paesi Bassi', 'AN' => 'Antille olandesi', 'NC' => 'Nuova Caledonia', 'NZ' => 'Nuova Zelanda', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'XI' => 'Northern Ireland', 'MP' => 'Marianne settentrionali', 'NO' => 'Norvegia', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PW' => 'Palau', 'PS' => 'Palestine', 'PA' => 'Panama', 'PG' => 'Papua Nuova Guinea', 'PY' => 'Paraguay', 'PE' => 'Perù', 'PH' => 'Filippine', 'PL' => 'Polonia', 'PT' => 'Portogallo', 'PR' => 'Portorico', 'QA' => 'Qatar', 'CG' => 'Republic of the Congo', 'RN' => 'Réunion', 'RO' => 'Romania', 'RU' => 'Russia', 'RW' => 'Ruanda', 'ST' => 'São Tomé e Príncipe', 'KN' => 'Saint Christopher e Nevis', 'LC' => 'Saint Lucia', 'VC' => 'Saint Vincent e Grenadine', 'WS' => 'Samoa', 'SM' => 'San Marino', 'SA' => 'Arabia Saudita', 'XS' => 'Scotland', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seicelle', 'SL' => 'Sierra Leone', 'SG' => 'Singapore', 'SK' => 'Slovacchia', 'SI' => 'Slovenia', 'SB' => 'Isole Salomone', 'SO' => 'Somalia', 'ZA' => 'Sudafrica', 'KR' => 'Corea del Sud', 'ES' => 'Spagna', 'LK' => 'Sri Lanka', 'SD' => 'Sudan', 'SR' => 'Suriname', 'SZ' => 'Swaziland', 'SE' => 'Svezia', 'CH' => 'Svizzera', 'SY' => 'Siria', 'TW' => 'Taiwan', 'TJ' => 'Tagikistan', 'TZ' => 'Tanzania', 'TH' => 'Thailandia', 'TL' => 'Timor-Leste', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinidad e Tobago', 'TN' => 'Tunisia', 'TR' => 'Turchia', 'TM' => 'Turkmenistan', 'TV' => 'Tuvalu', 'VI' => 'Isole Vergini americane', 'UG' => 'Uganda', 'UA' => 'Ucraina', 'AE' => 'Emirati arabi uniti', 'GB' => 'Regno Unito', 'US' => 'Stati Uniti', 'UY' => 'Uruguay', 'UZ' => 'Uzbekistan', 'VU' => 'Vanuatu', 'VA' => 'Vaticano', 'VE' => 'Venezuela', 'VN' => 'Vietnam', 'XW' => 'Wales', 'YE' => 'Yemen', 'ZM' => 'Zambia', 'ZW' => 'Zimbabwe' );\n\t\t$em_countries_array_i18n['nl'] = array ('AF' => 'Afghanistan', 'AL' => 'Albanië', 'DZ' => 'Algerije', 'AS' => 'Amerikaans-Samoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antarctica', 'AG' => 'Antigua en Barbuda', 'AR' => 'Argentinië', 'AM' => 'Armenië', 'AW' => 'Aruba', 'AU' => 'Australië', 'AT' => 'Oostenrijk', 'AZ' => 'Azerbeidzjan', 'BS' => 'Bahamas', 'BH' => 'Bahrein', 'BD' => 'Bangladesh', 'BB' => 'Barbados', 'BY' => 'Belarus', 'BE' => 'België', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Benin', 'BT' => 'Bhutan', 'BO' => 'Bolivia', 'BA' => 'Bosnië en Herzegovina', 'BW' => 'Botswana', 'BR' => 'Brazilië', 'VG' => 'Britse Maagdeneilanden', 'BN' => 'Brunei', 'BG' => 'Bulgarije', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'Ivoorkust', 'KH' => 'Cambodja', 'CM' => 'Kameroen', 'CA' => 'Canada', 'CV' => 'Kaapverdië', 'KY'=>'Caymaneilanden', 'CF' => 'Centraal-Afrikaanse Republiek', 'TD' => 'Tsjaad', 'CL' => 'Chili', 'CN' => 'China', 'CO' => 'Colombia', 'KM' => 'Comoren', 'CR' => 'Costa Rica', 'HR' => 'Kroatië', 'CU' => 'Cuba', 'CY' => 'Cyprus', 'CZ' => 'Tsjechië', 'KP' => 'Noord-Korea', 'CD' => 'Democratische Republiek Congo', 'DK' => 'Denemarken', 'DJ' => 'Djibouti', 'DM' => 'Dominica', 'DO' => 'Dominicaanse Republiek', 'EC' => 'Ecuador', 'EG' => 'Egypte', 'SV' => 'El Salvador', 'XE' => 'England', 'GQ' => 'Equatoriaal-Guinea', 'ER' => 'Eritrea', 'EE' => 'Estland', 'ET' => 'Ethiopië','FO' => 'Faeröer', 'FJ' => 'Fiji', 'FI' => 'Finland', 'FR' => 'Frankrijk', 'PF' => 'Frans-Polynesië', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Georgië', 'DE' => 'Duitsland', 'GH' => 'Ghana', 'GR' => 'Griekenland', 'GL' => 'Groenland', 'GD' => 'Grenada', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinee', 'GW' => 'Guinee-Bissau', 'GY' => 'Guyana', 'HT' => 'Haïti', 'HN' => 'Honduras', 'HK' => 'HongKong', 'HU' => 'Hongarije', 'IS' => 'IJsland', 'IN' => 'India', 'ID' => 'Indonesië', 'IR' => 'Iran', 'IQ' => 'Irak', 'IE' => 'Ierland', 'IL' => 'Israël', 'IT' => 'Italië', 'JE'=>'Jersey', 'JM' => 'Jamaica', 'JP' => 'Japan', 'JO' => 'Jordanië', 'KZ' => 'Kazachstan', 'KE' => 'Kenia', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Koeweit', 'KG' => 'Kirgizië', 'LA' => 'Laos', 'LV' => 'Letland', 'LB' => 'Libanon', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LY' => 'Libië', 'LI' => 'Liechtenstein', 'LT' => 'Litouwen', 'LU' => 'Luxemburg', 'MO' => 'Macau', 'MK' => 'Macedonië', 'MG' => 'Madagaskar', 'MW' => 'Malawi', 'MY' => 'Maleisië', 'MV' => 'Maldiven', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Marshalleilanden', 'MQ' => 'Martinique', 'MU' => 'Mauritius', 'MR' => 'Mauritanië', 'MX' => 'Mexico', 'FM' => 'Micronesia', 'MD' => 'Moldavië', 'MC' => 'Monaco', 'MN' => 'Mongolië', 'ME' => 'Montenegro', 'MA' => 'Marokko', 'MZ' => 'Mozambique', 'MM' => 'Myanmar(Burma)', 'NA' => 'Namibië', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Nederland', 'AN' => 'Nederlandse Antillen', 'NC' => 'Nieuw-Caledonië', 'NZ' => 'Nieuw-Zeeland', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'XI' => 'Northern Ireland', 'MP' => 'Noordelijke Marianen', 'NO' => 'Noorwegen', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PW' => 'Palau', 'PS' => 'Palestine', 'PA' => 'Panama', 'PG' => 'Papoea-Nieuw-Guinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Filipijnen', 'PL' => 'Polen', 'PT' => 'Portugal', 'PR' => 'Puerto Rico', 'QA' => 'Qatar', 'CG' => 'Republic of the Congo', 'RN' => 'Réunion', 'RO' => 'Roemenië', 'RU' => 'Rusland', 'RW' => 'Rwanda', 'ST' => 'Sao Tomé en Principe', 'KN' => 'Saint Kitts en Nevis', 'LC' => 'Saint Lucia', 'VC' => 'Saint Vincent en de Grenadines', 'WS' => 'Samoa', 'SM' => 'San Marino', 'SA' => 'Saudi-Arabië', 'XS' => 'Scotland', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seychellen', 'SL' => 'Sierra Leone', 'SG' => 'Singapore', 'SK' => 'Slowakije', 'SI' => 'Slovenië', 'SB' => 'Salomonseilanden', 'SO' => 'Somalië', 'ZA' => 'Zuid-Afrika', 'KR' => 'Zuid-Korea', 'ES' => 'Spanje', 'LK' => 'Sri Lanka', 'SD' => 'Sudan', 'SR' => 'Suriname', 'SZ' => 'Swaziland', 'SE' => 'Zweden', 'CH' => 'Zwitserland', 'SY' => 'Syrië', 'TW' => 'Taiwan', 'TJ' => 'Tadzjikistan', 'TZ' => 'Tanzania', 'TH' => 'Thailand', 'TL' => 'Timor-Leste', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinidad en Tobago', 'TN' => 'Tunesië', 'TR' => 'Turkije', 'TM' => 'Turkmenistan', 'TV' => 'Tuvalu', 'VI' => 'Amerikaanse Maagdeneilanden', 'UG' => 'Uganda', 'UA' => 'Oekraïne', 'AE' => 'Verenigde Arabische Emiraten', 'GB' => 'Verenigd Koninkrijk', 'US' => 'Verenigde Staten', 'UY' => 'Uruguay', 'UZ' => 'Oezbekistan', 'VU' => 'Vanuatu', 'VA' => 'Vaticaanstad', 'VE' => 'Venezuela', 'VN' => 'Vietnam', 'XW' => 'Wales', 'YE' => 'Jemen', 'ZM' => 'Zambia', 'ZW' => 'Zimbabwe' );\n\t\t$em_countries_array_i18n['pt'] = array ('AF' => 'Afeganistão', 'AL' => 'Albânia', 'DZ' => 'Argélia', 'AS' => 'Samoa Americana', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antárctida', 'AG' => 'Antígua e Barbuda', 'AR' => 'Argentina', 'AM' => 'Arménia', 'AW' => 'Aruba', 'AU' => 'Austrália', 'AT' => 'Áustria', 'AZ' => 'Azerbaijão', 'BS' => 'Baamas', 'BH' => 'Barém', 'BD' => 'Bangladeche', 'BB' => 'Barbados', 'BY' => 'Bielorrússia', 'BE' => 'Bélgica', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Benim', 'BT' => 'Butão', 'BO' => 'Bolívia', 'BA' => 'Bósnia e Herzegovina', 'BW' => 'Botsuana', 'BR' => 'Brasil', 'VG' => 'Ilhas Virgens Britânicas', 'BN' => 'Brunei', 'BG' => 'Bulgária', 'BF' => 'Burquina Faso', 'BI' => 'Burúndi', 'CI' => 'Costa do Marfim', 'KH' => 'Camboja', 'CM' => 'Camarões', 'CA' => 'Canadá', 'CV' => 'Cabo Verde', 'KY'=>'Ilhas Caimão', 'CF' => 'República Centro-Africana', 'TD' => 'Chade', 'CL' => 'Chile', 'CN' => 'China', 'CO' => 'Colômbia', 'KM' => 'Comores', 'CR' => 'Costa Rica', 'HR' => 'Croácia', 'CU' => 'Cuba', 'CY' => 'Chipre', 'CZ' => 'República Checa', 'KP' => 'Coreia do Norte', 'CD' => 'Congo-Kinshasa', 'DK' => 'Dinamarca', 'DJ' => 'Jibuti', 'DM' => 'Domínica', 'DO' => 'República Dominicana', 'EC' => 'Equador', 'EG' => 'Egipto', 'SV' => 'Salvador', 'XE' => 'England', 'GQ' => 'Guiné Equatorial', 'ER' => 'Eritreia', 'EE' => 'Estónia', 'ET' => 'Etiópia','FO' => 'ilhas Faroe', 'FJ' => 'Fiji', 'FI' => 'Finlândia', 'FR' => 'França', 'PF' => 'Polinésia Francesa', 'GA' => 'Gabão', 'GM' => 'Gambia', 'GE' => 'Geórgia', 'DE' => 'Alemanha', 'GH' => 'Gana', 'GR' => 'Grécia', 'GL' => 'Gronelândia', 'GD' => 'Granada', 'GP' =>'Guadeloupe', 'GU' => 'Guame', 'GT' => 'Guatemala', 'GN' => 'Guiné', 'GW' => 'Guiné-Bissau', 'GY' => 'Guiana', 'HT' => 'Haiti', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Hungria', 'IS' => 'Islândia', 'IN' => 'Índia', 'ID' => 'Indonésia', 'IR' => 'Irão', 'IQ' => 'Iraque', 'IE' => 'Irlanda', 'IL' => 'Israel', 'IT' => 'Itália', 'JE'=>'Jersey', 'JM' => 'Jamaica', 'JP' => 'Japão', 'JO' => 'Jordânia', 'KZ' => 'Cazaquistão', 'KE' => 'Quénia', 'KI' => 'Quiribáti', 'KV' => 'Kosovo', 'KW' => 'Kuwait', 'KG' => 'Quirguizistão', 'LA' => 'Laos', 'LV' => 'Letónia', 'LB' => 'Líbano', 'LS' => 'Lesoto', 'LR' => 'Libéria', 'LY' => 'Líbia', 'LI' => 'Listenstaine', 'LT' => 'Lituânia', 'LU' => 'Luxemburgo', 'MO' => 'Macau', 'MK' => 'Macedónia', 'MG' => 'Madagáscar', 'MW' => 'Malávi', 'MY' => 'Malásia', 'MV' => 'Maldivas', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Ilhas Marshall', 'MQ' => 'Martinica', 'MU' => 'Maurícia', 'MR' => 'Mauritânia', 'MX' => 'México', 'FM' => 'Micronésia', 'MD' => 'Moldávia', 'MC' => 'Mónaco', 'MN' => 'Mongólia', 'ME' => 'Montenegro', 'MA' => 'Marrocos', 'MZ' => 'Moçambique', 'MM' => 'Birmânia', 'NA' => 'Namíbia', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Países Baixos', 'AN' => 'Antilhas Neerlandesas', 'NC' => 'Nova Caledónia', 'NZ' => 'Nova Zelândia', 'NI' => 'Nicarágua', 'NE' => 'Níger', 'NG' => 'Nigéria', 'XI' => 'Northern Ireland', 'MP' => 'Marianas do Norte', 'NO' => 'Noruega', 'OM' => 'Omã', 'PK' => 'Paquistão', 'PW' => 'Palau', 'PS' => 'Palestine', 'PA' => 'Panamá', 'PG' => 'Papua-Nova Guiné', 'PY' => 'Paraguai', 'PE' => 'Peru', 'PH' => 'Filipinas', 'PL' => 'Polónia', 'PT' => 'Portugal', 'PR' => 'Porto Rico', 'QA' => 'Catar', 'CG' => 'Republic of the Congo', 'RN' => 'Réunion', 'RO' => 'Roménia', 'RU' => 'Rússia', 'RW' => 'Ruanda', 'ST' => 'São Tomé e Príncipe', 'KN' => 'São Cristóvão e Neves', 'LC' => 'Santa Lúcia', 'VC' => 'São Vicente e Granadinas', 'WS' => 'Samoa', 'SM' => 'São Marinho', 'SA' => 'Arábia Saudita', 'XS' => 'Scotland', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seicheles', 'SL' => 'Serra Leoa', 'SG' => 'Singapura', 'SK' => 'Eslováquia', 'SI' => 'Eslovénia', 'SB' => 'Ilhas Salomão', 'SO' => 'Somália', 'ZA' => 'África do Sul', 'KR' => 'Coreia do Sul', 'ES' => 'Espanha', 'LK' => 'Sri Lanca', 'SD' => 'Sudão', 'SR' => 'Suriname', 'SZ' => 'Suazilândia', 'SE' => 'Suécia', 'CH' => 'Suíça', 'SY' => 'Síria', 'TW' => 'Taiwan', 'TJ' => 'Tajiquistão', 'TZ' => 'Tanzânia', 'TH' => 'Tailândia', 'TL' => 'Timor-Leste', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trindade e Tobago', 'TN' => 'Tunísia', 'TR' => 'Turquia', 'TM' => 'Turquemenistão', 'TV' => 'Tuvalu', 'VI' => 'Ilhas Virgens Americanas', 'UG' => 'Uganda', 'UA' => 'Ucrânia', 'AE' => 'Emiratos Árabes Unidos', 'GB' => 'Reino Unido', 'US' => 'Estados Unidos', 'UY' => 'Uruguai', 'UZ' => 'Usbequistão', 'VU' => 'Vanuatu', 'VA' => 'Vaticano', 'VE' => 'Venezuela', 'VN' => 'Vietname', 'XW' => 'Wales', 'YE' => 'Iémen', 'ZM' => 'Zâmbia', 'ZW' => 'Zimbabué' );\n\t\t$em_countries_array_i18n['ru'] = array ('AF' => 'Афганистан', 'AL' => 'Албания', 'DZ' => 'Алжир', 'AS' => 'Самоа (США)', 'AD' => 'Андорра', 'AO' => 'Ангола', 'AQ' => 'Антарктика', 'AG' => 'Антигуа и Барбуда', 'AR' => 'Аргентина', 'AM' => 'Армения', 'AW' => 'Аруба', 'AU' => 'Австралия', 'AT' => 'Австрия', 'AZ' => 'Азербайджан', 'BS' => 'Багамы', 'BH' => 'Бахрейн', 'BD' => 'Бангладеш', 'BB' => 'Барбадос', 'BY' => 'Беларусь', 'BE' => 'Бельгия', 'BZ' => 'Белиз', 'BM' => 'Bermuda', 'BJ' => 'Бенин', 'BT' => 'Бутан', 'BO' => 'Боливия', 'BA' => 'Босния-Герцеговина', 'BW' => 'Ботсвана', 'BR' => 'Бразилия', 'VG' => 'Вирджинские острова (Брит.)', 'BN' => 'Бруней', 'BG' => 'Болгария', 'BF' => 'Буркина-Фасо', 'BI' => 'Бурунди', 'CI' => 'Берег Слоновой Кости', 'KH' => 'Камбоджа', 'CM' => 'Камерун', 'CA' => 'Канада', 'CV' => 'Кабо-Верде', 'KY'=>'Каймановы острова', 'CF' => 'Центрально-Африканская Республика', 'TD' => 'Чад', 'CL' => 'Чили', 'CN' => 'Китай', 'CO' => 'Колумбия', 'KM' => 'Коморос', 'CR' => 'Коста Рикa', 'HR' => 'Хорватия', 'CU' => 'Куба', 'CY' => 'Кипр', 'CZ' => 'Чешская Республика', 'KP' => 'Северная Корея', 'CD' => 'Демократическая Республика Конго', 'DK' => 'Дания', 'DJ' => 'Джибути', 'DM' => 'Доминика', 'DO' => '\tДоминиканская Республика', 'EC' => 'Эквадор', 'EG' => 'Египет', 'SV' => 'Сальвадор', 'XE' => 'Англия', 'GQ' => 'Экваториальная Гвинея', 'ER' => 'Эритрея', 'EE' => 'Эстония', 'ET' => 'Эфиопия','FO' => 'Фарерские острова', 'FJ' => 'Фиджи', 'FI' => 'Финляндия', 'FR' => 'Франция', 'PF' => '\tПолинезия (Фр.)', 'GA' => 'Габон', 'GM' => 'Гамбия', 'GE' => 'Грузия', 'DE' => 'Германия', 'GH' => 'Гана', 'GR' => 'Греция', 'GL' => 'Гренландия', 'GD' => 'Гренада', 'GP' =>'Guadeloupe', 'GU' => 'Гуам (США)', 'GT' => 'Гватемала', 'GN' => 'Гвинея', 'GW' => 'Гвинея-Бисау', 'GY' => 'Гайана', 'HT' => 'Гаити', 'HN' => 'Гондурас', 'HK' => 'Гонг Конг', 'HU' => 'Венгрия', 'IS' => 'Исландия', 'IN' => 'Индия', 'ID' => 'Индонезия', 'IR' => 'Иран', 'IQ' => 'Ирак', 'IE' => 'Ирландия', 'IL' => 'Израйль', 'IT' => 'Италия', 'JE'=>'Jersey', 'JM' => 'Ямайка', 'JP' => 'Япония', 'JO' => 'Иордания', 'KZ' => 'Казахстан', 'KE' => 'Кения', 'KI' => 'Кирибати', 'KV' => 'Косово', 'KW' => 'Кувейт', 'KG' => 'Киргизия', 'LA' => 'Лаос', 'LV' => 'Латвия', 'LB' => 'Ливан', 'LS' => 'Лесото', 'LR' => 'Либерия', 'LY' => 'Либия', 'LI' => 'Лихтейнштейн', 'LT' => 'Литва', 'LU' => 'Люксембург', 'MO' => 'Макау', 'MK' => 'Македония', 'MG' => 'Мадагаскар', 'MW' => 'Малави', 'MY' => 'Малайзия', 'MV' => 'Мальдивы', 'ML' => 'Мали', 'MT' => 'Мальта', 'MH' => 'Маршальские острова', 'MQ' => 'Мартиника (Фр.)', 'MU' => 'Мавритий', 'MR' => 'Мавритания', 'MX' => 'Мексика', 'FM' => 'Микронезия', 'MD' => 'Молдова', 'MC' => 'Монако', 'MN' => 'Монголия', 'ME' => 'Черногория', 'MA' => 'Морокко', 'MZ' => 'Мозамбик', 'MM' => 'Бирма (Мьянма)', 'NA' => 'Намибия', 'NR' => 'Науру', 'NP' => 'Непал', 'NL' => 'Нидерланды', 'AN' => 'Антиллы (Нидерланды)', 'NC' => 'Новая Каледония (Фр.)', 'NZ' => 'Новая Зеландия', 'NI' => 'Никарагуаa', 'NE' => 'Нигер', 'NG' => 'Нигерия', 'XI' => 'Северной Ирландии', 'MP' => 'Северные Марианские острова', 'NO' => 'Норвегия', 'OM' => 'Оман', 'PK' => 'Пакистан', 'PW' => 'Палау', 'PS' => 'Палестина', 'PA' => 'Панама', 'PG' => 'Папуа Новая Гвинея', 'PY' => 'Парагвай', 'PE' => 'Перу', 'PH' => 'Филиппины', 'PL' => 'Польша', 'PT' => 'Португалия', 'PR' => 'Пуэрто-Рико', 'QA' => 'Катар', 'CG' => 'Конго', 'RN' => 'Réunion', 'RO' => 'Румыния', 'RU' => 'Россия', 'RW' => 'Руанда', 'ST' => 'Сан-Томе и Принсипи', 'KN' => 'Сент-Киттс Нэвис Ангуилла', 'LC' => 'Санта Лючия', 'VC' => 'Сент-Висент и Гренадины', 'WS' => 'Самоа', 'SM' => 'Сан-Марино', 'SA' => 'Саудовская Аравия', 'XS' => 'Шотландия', 'SN' => 'Сенегал', 'RS' => 'Сербии', 'SC' => 'Сейшеллы', 'SL' => 'Сьерра-Леоне', 'SG' => 'Сингапур', 'SK' => 'Словакия', 'SI' => 'Словения', 'SB' => 'Соломоновы острова', 'SO' => 'Сомали', 'ZA' => 'Южная Африка', 'KR' => 'Южная Корея', 'ES' => 'Испания', 'LK' => 'Шри Ланка', 'SD' => 'Судан', 'SR' => 'Суринам', 'SZ' => 'Свазиленд', 'SE' => 'Швеция', 'CH' => 'Швейцария', 'SY' => 'Сирия', 'TW' => 'Тайвань', 'TJ' => 'Таджикистан', 'TZ' => 'Танзания', 'TH' => 'Таиланд', 'TL' => 'Восточный Тимор', 'TG' => 'Того', 'TO' => 'Тонга', 'TT' => 'Тринидад и Тобаго', 'TN' => 'Тунис', 'TR' => 'Турция', 'TM' => 'Туркменистан', 'TV' => 'Тувалу', 'VI' => 'Вирджинские острова (США)', 'UG' => 'Уганда', 'UA' => 'Украина', 'AE' => 'Объединенные Арабские Эмираты', 'GB' => 'Великобритания', 'US' => 'США', 'UY' => 'Uruguay', 'UZ' => 'Узбекистан', 'VU' => 'Вануату', 'VA' => 'Ватикан', 'VE' => 'Венесуэла', 'VN' => 'Вьетнам', 'XW' => 'Уэльс', 'YE' => 'Йемен', 'ZM' => 'Замбия', 'ZW' => 'Зимбабве' );\n\t\t$em_countries_array_i18n['sv'] = array ('AF' => 'Afghanistan', 'AL' => 'Albanien', 'DZ' => 'Algeriet', 'AS' => 'Amerikanska Samoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antarktis', 'AG' => 'Antigua och Barbuda', 'AR' => 'Argentina', 'AM' => 'Armenien', 'AW' => 'Aruba', 'AU' => 'Australien', 'AT' => 'Österrike', 'AZ' => 'Azerbajdzjan', 'BS' => 'Bahamas', 'BH' => 'Bahrain', 'BD' => 'Bangladesh', 'BB' => 'Barbados', 'BY' => 'Vitryssland', 'BE' => 'Belgien', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Benin', 'BT' => 'Bhutan', 'BO' => 'Bolivia', 'BA' => 'Bosnien och Hercegovina', 'BW' => 'Botswana', 'BR' => 'Brasilien', 'VG' => 'Brittiska Jungfruöarna', 'BN' => 'Brunei', 'BG' => 'Bulgarien', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'Elfenbenskusten', 'KH' => 'Kambodja', 'CM' => 'Kamerun', 'CA' => 'Kanada', 'CV' => 'Kap Verde', 'KY'=>'Caymanöarna', 'CF' => 'Centralafrikanska republiken', 'TD' => 'Tchad', 'CL' => 'Chile', 'CN' => 'Kina', 'CO' => 'Colombia', 'KM' => 'Komorerna', 'CR' => 'Costa Rica', 'HR' => 'Kroatien', 'CU' => 'Kuba', 'CY' => 'Cypern', 'CZ' => 'Tjeckien', 'KP' => 'Nordkorea', 'CD' => 'Demokratiska republiken Kongo', 'DK' => 'Danmark', 'DJ' => 'Djibouti', 'DM' => 'Dominica', 'DO' => 'Dominikanska republiken', 'EC' => 'Ecuador', 'EG' => 'Egypten', 'SV' => 'El Salvador', 'XE' => 'England', 'GQ' => 'Ekvatorialguinea', 'ER' => 'Eritrea', 'EE' => 'Estland', 'ET' => 'Etiopien','FO' => 'Färöarna', 'FJ' => 'Fiji', 'FI' => 'Finland', 'FR' => 'Frankrike', 'PF' => 'Franska Polynesien', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Georgien', 'DE' => 'Tyskland', 'GH' => 'Ghana', 'GR' => 'Grekland', 'GL' => 'Grönland', 'GD' => 'Grenada', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Guinea-Bissau', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Ungern', 'IS' => 'Island', 'IN' => 'Indien', 'ID' => 'Indonesien', 'IR' => 'Iran', 'IQ' => 'Irak', 'IE' => 'Irland', 'IL' => 'Israel', 'IT' => 'Italien', 'JE'=>'Jersey', 'JM' => 'Jamaica', 'JP' => 'Japan', 'JO' => 'Jordanien', 'KZ' => 'Kazakstan', 'KE' => 'Kenya', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Kuwait', 'KG' => 'Kirgizistan', 'LA' => 'Laos', 'LV' => 'Lettland', 'LB' => 'Libanon', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LY' => 'Libyen', 'LI' => 'Liechtenstein', 'LT' => 'Litauen', 'LU' => 'Luxemburg', 'MO' => 'Macao', 'MK' => 'Makedonien', 'MG' => 'Madagaskar', 'MW' => 'Malawi', 'MY' => 'Malaysia', 'MV' => 'Maldiverna', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Marshallöarna', 'MQ' => 'Martinique', 'MU' => 'Mauritius', 'MR' => 'Mauretanien', 'MX' => 'Mexiko', 'FM' => 'Mikronesien', 'MD' => 'Moldavien', 'MC' => 'Monaco', 'MN' => 'Mongoliet', 'ME' => 'Montenegro', 'MA' => 'Marocko', 'MZ' => 'Moçambique', 'MM' => 'Myanmar(Burma)', 'NA' => 'Namibia', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Nederländerna', 'AN' => 'Nederländska Antillerna', 'NC' => 'Nya Kaledonien', 'NZ' => 'Nya Zeeland', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'XI' => 'Northern Ireland', 'MP' => 'Nordmarianerna', 'NO' => 'Norge', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PW' => 'Palau', 'PS' => 'Palestine', 'PA' => 'Panama', 'PG' => 'Papua Nya Guinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Filippinerna', 'PL' => 'Polen', 'PT' => 'Portugal', 'PR' => 'Puerto Rico', 'QA' => 'Qatar', 'CG' => 'Kongo', 'RN' => 'Réunion', 'RO' => 'Rumänien', 'RU' => 'Ryssland', 'RW' => 'Rwanda', 'ST' => 'São Tomé och Príncipe', 'KN' => '\tSaint Christopher och Nevis', 'LC' => 'Saint Lucia', 'VC' => 'Saint Vincent och Grenadinerna', 'WS' => 'Samoa', 'SM' => 'San Marino', 'SA' => 'Saudiarabien', 'XS' => 'Scotland', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seychellerna', 'SL' => 'Sierra Leone', 'SG' => 'Singapore', 'SK' => 'Slovakien', 'SI' => 'Slovenien', 'SB' => 'Salomonöarna', 'SO' => 'Somalia', 'ZA' => 'Sydafrika', 'KR' => 'Sydkorea', 'ES' => 'Spanien', 'LK' => 'Sri Lanka', 'SD' => 'Sudan', 'SR' => 'Surinam', 'SZ' => 'Swaziland', 'SE' => 'Sverige', 'CH' => 'Schweiz', 'SY' => 'Syrien', 'TW' => 'Taiwan', 'TJ' => 'Tadzjikistan', 'TZ' => 'Tanzania', 'TH' => 'Thailand', 'TL' => 'Timor-Leste', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinidad och Tobago', 'TN' => 'Tunisien', 'TR' => 'Turkiet', 'TM' => 'Turkmenistan', 'TV' => 'Tuvalu', 'VI' => 'Amerikanska Jungfruöarna', 'UG' => 'Uganda', 'UA' => 'Ukraina', 'AE' => 'Förenade Arabemiraten', 'GB' => 'Förenade kungariket', 'US' => 'Förenta staterna', 'UY' => 'Uruguay', 'UZ' => 'Uzbekistan', 'VU' => 'Vanuatu', 'VA' => '\tHeliga stolen', 'VE' => 'Venezuela', 'VN' => 'Vietnam', 'XW' => 'Wales', 'YE' => 'Yemen', 'ZM' => 'Zambia', 'ZW' => 'Zimbabwe' );\n\t\t$em_countries_array_i18n['en'] = array ('AF' => 'Afghanistan', 'AL' => 'Albania', 'DZ' => 'Algeria', 'AS' => 'American Samoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antarctica', 'AG' => 'Antigua and Barbuda', 'AR' => 'Argentina', 'AM' => 'Armenia', 'AW' => 'Aruba', 'AU' => 'Australia', 'AT' => 'Austria', 'AZ' => 'Azerbaijan', 'BS' => 'Bahamas', 'BH' => 'Bahrain', 'BD' => 'Bangladesh', 'BB' => 'Barbados', 'BY' => 'Belarus', 'BE' => 'Belgium', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Benin', 'BT' => 'Bhutan', 'BO' => 'Bolivia', 'BA' => 'Bosnia and Herzegovina', 'BW' => 'Botswana', 'BR' => 'Brazil', 'VG' => 'British Virgin Islands', 'BN' => 'Brunei', 'BG' => 'Bulgaria', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'C&ocirc;te D\\'Ivoire', 'KH' => 'Cambodia', 'CM' => 'Cameroon', 'CA' => 'Canada', 'CV' => 'Cape Verde', 'KY'=>'Cayman Islands', 'CF' => 'Central African Republic', 'TD' => 'Chad', 'CL' => 'Chile', 'CN' => 'China', 'CO' => 'Colombia', 'KM' => 'Comoros', 'CR' => 'Costa Rica', 'HR' => 'Croatia', 'CU' => 'Cuba', 'CY' => 'Cyprus', 'CZ' => 'Czech Republic', 'KP' => 'Democratic People\\'s Republic of Korea', 'CD' => 'Democratic Republic of the Congo', 'DK' => 'Denmark', 'DJ' => 'Djibouti', 'DM' => 'Dominica', 'DO' => 'Dominican Republic', 'EC' => 'Ecuador', 'EG' => 'Egypt', 'SV' => 'El Salvador', 'XE' => 'England', 'GQ' => 'Equatorial Guinea', 'ER' => 'Eritrea', 'EE' => 'Estonia', 'ET' => 'Ethiopia','FO' => 'Faroe Islands', 'FJ' => 'Fiji', 'FI' => 'Finland', 'FR' => 'France', 'PF' => 'French Polynesia', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Georgia', 'DE' => 'Germany', 'GH' => 'Ghana', 'GR' => 'Greece', 'GL' => 'Greenland', 'GD' => 'Grenada', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Guinea Bissau', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Hungary', 'IS' => 'Iceland', 'IN' => 'India', 'ID' => 'Indonesia', 'IR' => 'Iran', 'IQ' => 'Iraq', 'IE' => 'Ireland', 'IL' => 'Israel', 'IT' => 'Italy', 'JE'=>'Jersey', 'JM' => 'Jamaica', 'JP' => 'Japan', 'JO' => 'Jordan', 'KZ' => 'Kazakhstan', 'KE' => 'Kenya', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Kuwait', 'KG' => 'Kyrgyzstan', 'LA' => 'Laos', 'LV' => 'Latvia', 'LB' => 'Lebanon', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LY' => 'Libya', 'LI' => 'Liechtenstein', 'LT' => 'Lithuania', 'LU' => 'Luxembourg', 'MO' => 'Macao', 'MK' => 'Macedonia', 'MG' => 'Madagascar', 'MW' => 'Malawi', 'MY' => 'Malaysia', 'MV' => 'Maldives', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Marshall Islands', 'MQ' => 'Mauritania', 'MU' => 'Mauritius', 'MR' => 'Mauritania', 'MX' => 'Mexico', 'FM' => 'Micronesia', 'MD' => 'Moldova', 'MC' => 'Monaco', 'MN' => 'Mongolia', 'ME' => 'Montenegro', 'MA' => 'Morocco', 'MZ' => 'Mozambique', 'MM' => 'Myanmar(Burma)', 'NA' => 'Namibia', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Netherlands', 'AN' => 'Netherlands Antilles', 'NC' => 'New Caledonia', 'NZ' => 'New Zealand', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'XI' => 'Northern Ireland', 'MP' => 'Northern Mariana Islands', 'NO' => 'Norway', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PW' => 'Palau', 'PS' => 'Palestine', 'PA' => 'Panama', 'PG' => 'Papua New Guinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Philippines', 'PL' => 'Poland', 'PT' => 'Portugal', 'PR' => 'Puerto Rico', 'QA' => 'Qatar', 'CG' => 'Republic of the Congo', 'RN' => 'Réunion', 'RO' => 'Romania', 'RU' => 'Russia', 'RW' => 'Rwanda', 'ST' => 'S&agrave;o Tom&eacute; And Pr&iacute;ncipe', 'KN' => 'Saint Kitts and Nevis', 'LC' => 'Saint Lucia', 'VC' => 'Saint Vincent and the Grenadines', 'WS' => 'Samoa', 'SM' => 'San Marino', 'SA' => 'Saudi Arabia', 'XS' => 'Scotland', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seychelles', 'SL' => 'Sierra Leone', 'SG' => 'Singapore', 'SK' => 'Slovakia', 'SI' => 'Slovenia', 'SB' => 'Solomon Islands', 'SO' => 'Somalia', 'ZA' => 'South Africa', 'KR' => 'South Korea', 'ES' => 'Spain', 'LK' => 'Sri Lanka', 'SD' => 'Sudan', 'SR' => 'Suriname', 'SZ' => 'Swaziland', 'SE' => 'Sweden', 'CH' => 'Switzerland', 'SY' => 'Syria', 'TW' => 'Taiwan', 'TJ' => 'Tajikistan', 'TZ' => 'Tanzania', 'TH' => 'Thailand', 'TL' => 'Timor-Leste', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinidad and Tobago', 'TN' => 'Tunisia', 'TR' => 'Turkey', 'TM' => 'Turkmenistan', 'TV' => 'Tuvalu', 'VI' => 'US Virgin Islands', 'UG' => 'Uganda', 'UA' => 'Ukraine', 'AE' => 'United Arab Emirates', 'GB' => 'United Kingdom', 'US' => 'United States', 'UY' => 'Uruguay', 'UZ' => 'Uzbekistan', 'VU' => 'Vanuatu', 'VA' => 'Vatican', 'VE' => 'Venezuela', 'VN' => 'Vietnam', 'XW' => 'Wales', 'YE' => 'Yemen', 'ZM' => 'Zambia', 'ZW' => 'Zimbabwe' );\n\t\t$em_countries_array_i18n['fi'] = array ('AF' => 'Afghanistan', 'AL' => 'Albania', 'DZ' => 'Algeria', 'AS' => 'Amerikan Samoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antarctica', 'AG' => 'Antigua ja Barbuda', 'AR' => 'Argentiina', 'AM' => 'Armenia', 'AW' => 'Aruba', 'AU' => 'Australia', 'AT' => 'Itävalta', 'AZ' => 'Azerbaidžan', 'BS' => 'Bahama', 'BH' => 'Bahrain', 'BD' => 'Bangladesh', 'BB' => 'Barbados', 'BY' => 'Valko-Venäjä', 'BE' => 'Belgia', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Benin', 'BT' => 'Bhutan', 'BO' => 'Bolivia', 'BA' => 'Bosnia ja Hertsegovina', 'BW' => 'Botswana', 'BR' => 'Brasilia', 'VG' => 'Brittiläiset Neitsytsaaret', 'BN' => 'Brunei', 'BG' => 'Bulgaria', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'Norsunluurannikko', 'KH' => 'Kambodža', 'CM' => 'Kamerun', 'CA' => 'Kanada', 'CV' => 'Kap Verde', 'KY'=>'Caymansaaret', 'CF' => 'Keski-Afrikan tasavalta', 'TD' => 'Tšad', 'CL' => 'Chile', 'CN' => 'Kiina', 'CO' => 'Kolumbia', 'KM' => 'Komorit', 'CR' => 'Costa Rica', 'HR' => 'Kroatia', 'CU' => 'Kuuba', 'CY' => 'Kypros', 'CZ' => 'Tšekki', 'KP' => 'Korean demokraattinen kansantasavalta', 'CD' => 'Kongon demokraattinen tasavalta', 'DK' => 'Tanska', 'DJ' => 'Djibouti', 'DM' => 'Dominica', 'DO' => 'Dominikaaninen tasavalta', 'EC' => 'Ecuador', 'EG' => 'Egypti', 'SV' => 'El Salvador', 'XE' => 'Englanti', 'GQ' => 'Päiväntasaajan Guinea', 'ER' => 'Eritrea', 'EE' => 'Estonia', 'ET' => 'Etiopia','FO' => 'Färsaaret', 'FJ' => 'Fiji', 'FI' => 'Suomi', 'FR' => 'Ranska', 'PF' => 'Ranskan Polynesia', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Georgia', 'DE' => 'Saksa', 'GH' => 'Ghana', 'GR' => 'Kreikka', 'GL' => 'Grönlanti', 'GD' => 'Grenada', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Guinea Bissau', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Unkari', 'IS' => 'Islanti', 'IN' => 'Intia', 'ID' => 'Indonesia', 'IR' => 'Iran', 'IQ' => 'Irak', 'IE' => 'Irlanti', 'IL' => 'Israel', 'IT' => 'Italia', 'JE'=>'Jersey', 'JM' => 'Jamaika', 'JP' => 'Japani', 'JO' => 'Jordania', 'KZ' => 'Kazakstan', 'KE' => 'Kenia', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Kuwait', 'KG' => 'Kirgisistan', 'LA' => 'Laos', 'LV' => 'Latvia', 'LB' => 'Libanon', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LY' => 'Libya', 'LI' => 'Liechtenstein', 'LT' => 'Lietua', 'LU' => 'Luxemburg', 'MO' => 'Macao', 'MK' => 'Makedonia', 'MG' => 'Madagascar', 'MW' => 'Malawi', 'MY' => 'Malesia', 'MV' => 'Maldiivit', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Marshallinsaaret', 'MQ' => 'Mauritania', 'MU' => 'Mauritius', 'MR' => 'Mauritania', 'MX' => 'Mexico', 'FM' => 'Micronesia', 'MD' => 'Moldova', 'MC' => 'Monaco', 'MN' => 'Mongolia', 'ME' => 'Montenegro', 'MA' => 'Morokko', 'MZ' => 'Mozambik', 'MM' => 'Myanmar', 'NA' => 'Namibia', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Alankomaat', 'AN' => 'Alankomaiden Antillit', 'NC' => 'Uusi-Kaledonia', 'NZ' => 'Uusi-Seelanti', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'XI' => 'Pohjois-Irlanti', 'MP' => 'Pohjois-Mariaanit', 'NO' => 'Norja', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PW' => 'Palau', 'PS' => 'Palestina', 'PA' => 'Panama', 'PG' => 'Papua Uusi-Guinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Filippiinit', 'PL' => 'Puola', 'PT' => 'Portugali', 'PR' => 'Puerto Rico', 'QA' => 'Qatar', 'CG' => 'Kongo', 'RN' => 'Réunion', 'RO' => 'Romania', 'RU' => 'Venäjä', 'RW' => 'Ruanda', 'ST' => 'São Tomé ja Príncipe', 'KN' => 'Saint Kitts jad Nevis', 'LC' => 'Saint Lucia', 'VC' => 'Saint Vincent ja Grenadiinit', 'WS' => 'Samoa', 'SM' => 'San Marino', 'SA' => 'Saudi Arabia', 'XS' => 'Skotlanti', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seychelles', 'SL' => 'Sierra Leone', 'SG' => 'Singapore', 'SK' => 'Slovakia', 'SI' => 'Slovenia', 'SB' => 'Salomonsaaret', 'SO' => 'Somalia', 'ZA' => 'Etelä-Afrikka', 'KR' => 'Etelä Korea', 'ES' => 'Espanja', 'LK' => 'Sri Lanka', 'SD' => 'Sudan', 'SR' => 'Suriname', 'SZ' => 'Swazimaa', 'SE' => 'Ruotsi', 'CH' => 'Sveitsi', 'SY' => 'Syria', 'TW' => 'Taiwan', 'TJ' => 'Tadžikistan', 'TZ' => 'Tansania', 'TH' => 'Thaimaa', 'TL' => 'Itä Timor', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinidad ja Tobago', 'TN' => 'Tunisia', 'TR' => 'Turkki', 'TM' => 'Turkmenistan', 'TV' => 'Tuvalu', 'VI' => 'Yhdysvaltain Neitsytsaaret', 'UG' => 'Uganda', 'UA' => 'Ukraina', 'AE' => 'Arabiemiirikunnat', 'GB' => 'Yhdistynyt kuningaskunta', 'US' => 'Yhdysvallat', 'UY' => 'Uruguay', 'UZ' => 'Uzbekistan', 'VU' => 'Vanuatu', 'VA' => 'Vatikaani', 'VE' => 'Venezuela', 'VN' => 'Vietnam', 'XW' => 'Wales', 'YE' => 'Yemen', 'ZM' => 'Sambia', 'ZW' => 'Zimbabwe' );\n\t\t$lang = substr(get_locale(), 0, 2);\n\t\tif( array_key_exists($lang, $em_countries_array_i18n) ){\n\t\t\t$em_countries_array = $em_countries_array_i18n[$lang];\n\t\t}else{\n\t\t\t$em_countries_array = $em_countries_array_i18n['en'];\n\t\t}\n\t}\n\tif($sort){ asort($em_countries_array); }\n\tif($add_blank !== false){\n\t\tif(is_array($add_blank)){\n\t\t\t$em_countries_array = $add_blank + $em_countries_array;\n\t\t}else{\n\t\t $em_countries_array = array(0 => $add_blank) + $em_countries_array;\n\t\t}\n\t}\n\treturn apply_filters('em_get_countries', $em_countries_array);\n}", "title": "" }, { "docid": "eaac58e2287b245237cf02801d1cf75b", "score": "0.6969035", "text": "public function get_countries()\n\t{\n\t\t$cache = new Freeform_cacher(func_get_args(), __FUNCTION__, __CLASS__);\n\t\tif ($cache->is_set()){ return $cache->get(); }\n\n\t\t$output = array();\n\n\t\t// --------------------------------------------\n\t\t// Get countries from config\n\t\t// --------------------------------------------\n\n\t\t$countries_file = APPPATH . 'config/countries.php';\n\n\t\tif (is_file($countries_file))\n\t\t{\n\t\t\tinclude_once $countries_file;\n\n\t\t\tif ( ! empty( $countries ) )\n\t\t\t{\n\t\t\t\t$output = $countries;\n\t\t\t}\n\t\t}\n\n\t\treturn $cache->set($output);\n\t}", "title": "" }, { "docid": "4619c2e8022a66754c179756cb501477", "score": "0.6963544", "text": "public function importCountries() {}", "title": "" }, { "docid": "93321e8b24f10f1da7e96c4dc1a61722", "score": "0.69544035", "text": "abstract public function countryTranslations(): array;", "title": "" }, { "docid": "90606625ee246df80dcf2d1b1c04ea36", "score": "0.69507074", "text": "function getCountries($selected_val, $conexion){\r\n\t\r\n\t// data for country list\r\n\t$qry_country_list = \"SELECT country_id, country FROM mwatch.country where country_id < 34 order by country\";\t\r\n\t$res_country_list = getArraySQL($conexion, $qry_country_list);\r\n \r\n\t$options = '<option value=\"0\">Latin America & the Caribbean...</option>';\r\n\r\n\tfor($i=0; $i<count($res_country_list); $i++) { \r\n\t\t\r\n\t\tif($selected_val == $res_country_list[$i]['country_id']) {\r\n\t\t\t$options.='<option value=\"' .$res_country_list[$i]['country_id'] .'\" selected >'\r\n\t\t\t .$res_country_list[$i]['country'] .'</option>';\r\n\t\t} else {\r\n\t\t\t$options.='<option value=\"' .$res_country_list[$i]['country_id'] .'\" >'\r\n\t\t\t .$res_country_list[$i]['country'] .'</option>';\r\n\t\t\t\t}\r\n\t}\r\n\t\t\r\n return $options;\r\n}", "title": "" }, { "docid": "2872335a635ddb08265e7823e84dc5b9", "score": "0.6929795", "text": "public function getCountryCodes()\n {\n return static::countryCodes($this->code);\n }", "title": "" }, { "docid": "200181d7e70aa2d7f4f6dedc11ed50e8", "score": "0.692802", "text": "function getCountrySummary()\r\n\t{\r\n\t\t$log = FezLog::get();\r\n\t\t$db = DB_API::get();\r\n\r\n\t\t$stmt = 'SELECT scr_country_code, scr_country_name, sum(scr_count_abstract) as abstracts, sum(scr_count_downloads) as downloads ';\r\n\t\t$stmt .= 'FROM ' . APP_TABLE_PREFIX . 'statistics_sum_countryregion ';\r\n\t\t$stmt .= 'GROUP BY scr_country_code, scr_country_name ';\r\n\t\t$stmt .= 'ORDER BY abstracts DESC';\r\n\r\n\t\ttry {\r\n\t\t\t$res = $db->fetchAll($stmt, array(), Zend_Db::FETCH_ASSOC);\r\n\t\t}\r\n\t\tcatch(Exception $ex) {\r\n\t\t\t$log->err($ex);\r\n\t\t\treturn array();\r\n\t\t}\r\n\t\treturn $res;\r\n\t}", "title": "" }, { "docid": "5c249f52f2ae92d2cf26c5df083a99d0", "score": "0.6904037", "text": "public static function getCountries()\r\n {\r\n return array_keys(self::getDisplayCountries(self::getDefault()));\r\n }", "title": "" }, { "docid": "10ea6926d8725036029f54c89253d741", "score": "0.69029903", "text": "public function index()\n {\n $country = Country::all();\n return $country;\n //\n }", "title": "" }, { "docid": "39d965c0b6c5301cdd3b006047c471f7", "score": "0.68981194", "text": "public function countries($locale)\n {\n return $this->get('public/countries/'.rawurlencode($locale));\n }", "title": "" }, { "docid": "9039feb8ec31a8e41a4fd795cab9fcc8", "score": "0.6896661", "text": "function countryList()\n {\n $this->autoRender = false;\n $continent_id = $this->request->data['continent_id'];\n $countryHtml = '<option value=\"0\">-- Select Country --</option>';\n if(isset($continent_id) && (int)$continent_id != 0)\n {\n $countryList = $this->Country->find('list', array(\n 'recursive' => -1,\n 'fields' => array(\n 'Country.id',\n 'Country.name',\n ),\n 'conditions' => array(\n 'Country.continent_id' => $continent_id,\n 'Country.is_enable' => 1,\n 'Country.is_trash' => 0,\n ),\n 'order' => array(\n 'Country.name'\n ),\n )); \n //$stateHtml = '';\n foreach($countryList as $countryKey=>$countryVal)\n {\n $countryHtml .= '<option value=\"'.$countryKey.'\">'.$countryVal.'</option>';\n }\n }\n $countryHtml .= '<option value=\"other\">Other</option>';\n echo $countryHtml; \n }", "title": "" }, { "docid": "d618d8e78f978ee9aee78b89803b3654", "score": "0.68930835", "text": "function showCountry($countryId)\n\t{\n\t\t$select\t\t= \"SELECT * FROM countries WHERE countries_id='$countryId'\";\n\t\t$query\t\t= mysql_query($select);\n\t\t//echo $select.mysql_error();exit;\n\t\t$data\t\t= array();\n\t\tif(mysql_num_rows($query) > 0)\n\t\t{\n\t\t\twhile($result\t= \tmysql_fetch_array($query))\n\t\t\t{\n\t\t\t\t$data\t=\tarray(\n\t\t\t\t\t\t\t\t $result['countries_name'],\t\t//0\n\t\t\t\t\t\t\t\t $result['countries_iso_code_2'],\t//1\n\t\t\t\t\t\t\t\t $result['countries_iso_code_3']\t//2 \n\t\t\t\t\t\t\t\t);\n\t\t\t}\n\t\t}\t\n\t\treturn $data;\t\n\t}", "title": "" }, { "docid": "475efe04570873033d7d8667fcbc2422", "score": "0.6889415", "text": "public function getCountryOptionArray()\n {\n return $options = $this->getCountryCollection()\n ->setForegroundCountries($this->getTopDestinations())\n ->toOptionArray();\n }", "title": "" }, { "docid": "6d74e559ced54c5498b7ba787eed5b4e", "score": "0.68869036", "text": "protected function getRealCountries()\n {\n // @codingStandardsIgnoreStart - Include is required here, can not switch to require_once.\n include(TL_ROOT . '/system/config/countries.php');\n // @codingStandardsIgnoreEnd\n /** @var string[] $countries */\n return $countries;\n }", "title": "" }, { "docid": "f5aede59db27af95161f144e50406e7c", "score": "0.6860249", "text": "private function getListOfCountryCode() {\n\n\t\t$countryCodes = array();\n\n\t\t$countries = json_decode(file_get_contents('countries.json'), true);\n\n\t\tforeach ($countries as $country) {\n\t\t\t/// Make string uppercase (just in case) and assign to the array\n\t\t\t$countryCodes[] = strtoupper($country['cca3']);\n\t\t}\n\n\t\t// Sort country codes in alphabetical order\n\t\tasort($countryCodes);\n\n\t\treturn $countryCodes;\n\n\t}", "title": "" }, { "docid": "e39ebeece017b9d17b5d2b60611ec764", "score": "0.6856232", "text": "public function getCountryNames()\n {\n return array_intersect_key(Country::names(), array_flip($this->countryCodes));\n }", "title": "" }, { "docid": "b6bbc3169d6798c038ffd6b491d1455e", "score": "0.6850407", "text": "public function stuff_homepage_country_listing() {\n\t\t// $this->current_country = ( ! empty( $this->homepage['display_country'] ) ) ? $this->homepage['display_country'] : 'US';\n\t\t$countries = $this->get_countries();\n\t\t?>\n\t\t<select name=\"rlje_front_page_homepage[display_country]\" id=\"display_country\">\n\t\t\t<?php foreach ( $countries as $country ) : ?>\n\t\t\t<option value=\"<?php echo esc_attr( $country['code'] ); ?>\" <?php selected( $country['code'], strtoupper( $this->current_country['code'] ) ); ?>>\n\t\t\t\t<?php echo esc_html( $country['name'] ); ?>\n\t\t\t</option>\n\t\t\t<?php endforeach; ?>\n\t\t</select>\n\t\t<input type=\"hidden\" name=\"rlje_front_page_homepage[go_to_country]\" value=\"<?php echo esc_attr( $this->current_country['code'] ); ?>\">\n\t\t<input type=\"submit\" name=\"submit\" id=\"submit\" class=\"button button-primary\" value=\"Go to this country\">\n\t\t<p class=\"description\">Currently display Data from <?php echo esc_html( $countries[ $this->current_country['code'] ]['name'] ); ?></p>\n\t\t<?php\n\t}", "title": "" }, { "docid": "711514235378ca1d69a96845277ac1fc", "score": "0.68453324", "text": "public function listCountriesISO($upper = FALSE) {\r\n\t\tstatic $countries;\r\n\r\n\t\tif (isset($countries)) {\r\n\t\t\t// In fact, the ISO codes for countries are all Upper Case.\r\n\t\t\t// So, if someone needs the list as the official records,\r\n\t\t\t// it will convert.\r\n\t\t\tif (!empty($upper)) {\r\n\t\t\t\treturn array_change_key_case($countries, CASE_UPPER);\r\n\t\t\t}\r\n\t\t\treturn $countries;\r\n\t\t}\r\n\r\n\t\t$countries = array(\r\n\t\t\t\t'ad' => 'Andorra',\r\n\t\t\t\t'ae' => 'United Arab Emirates',\r\n\t\t\t\t'af' => 'Afghanistan',\r\n\t\t\t\t'ag' => 'Antigua and Barbuda',\r\n\t\t\t\t'ai' => 'Anguilla',\r\n\t\t\t\t'al' => 'Albania',\r\n\t\t\t\t'am' => 'Armenia',\r\n\t\t\t\t'an' => 'Netherlands Antilles',\r\n\t\t\t\t'ao' => 'Angola',\r\n\t\t\t\t'aq' => 'Antarctica',\r\n\t\t\t\t'ar' => 'Argentina',\r\n\t\t\t\t'as' => 'American Samoa',\r\n\t\t\t\t'at' => 'Austria',\r\n\t\t\t\t'au' => 'Australia',\r\n\t\t\t\t'aw' => 'Aruba',\r\n\t\t\t\t'ax' => 'Aland Islands',\r\n\t\t\t\t'az' => 'Azerbaijan',\r\n\t\t\t\t'ba' => 'Bosnia and Herzegovina',\r\n\t\t\t\t'bb' => 'Barbados',\r\n\t\t\t\t'bd' => 'Bangladesh',\r\n\t\t\t\t'be' => 'Belgium',\r\n\t\t\t\t'bf' => 'Burkina Faso',\r\n\t\t\t\t'bg' => 'Bulgaria',\r\n\t\t\t\t'bh' => 'Bahrain',\r\n\t\t\t\t'bi' => 'Burundi',\r\n\t\t\t\t'bj' => 'Benin',\r\n\t\t\t\t'bm' => 'Bermuda',\r\n\t\t\t\t'bn' => 'Brunei',\r\n\t\t\t\t'bo' => 'Bolivia',\r\n\t\t\t\t'br' => 'Brazil',\r\n\t\t\t\t'bs' => 'Bahamas',\r\n\t\t\t\t'bt' => 'Bhutan',\r\n 'bv' => 'Bouvet Island',\r\n\t\t\t\t'bw' => 'Botswana',\r\n\t\t\t\t'by' => 'Belarus',\r\n\t\t\t\t'bz' => 'Belize',\r\n\t\t\t\t'ca' => 'Canada',\r\n\t\t\t\t'cc' => 'Cocos (Keeling) Islands',\r\n\t\t\t\t'cd' => 'Congo (Kinshasa)',\r\n 'cf' => 'Central African Republic',\r\n\t\t\t\t'cg' => 'Congo (Brazzaville)',\r\n 'ch' => 'Switzerland',\r\n\t\t\t\t'ci' => 'Ivory Coast',\r\n\t\t\t\t'ck' => 'Cook Islands',\r\n\t\t\t\t'cl' => 'Chile',\r\n\t\t\t\t'cm' => 'Cameroon',\r\n\t\t\t\t'cn' => 'China',\r\n\t\t\t\t'co' => 'Colombia',\r\n\t\t\t\t'cr' => 'Costa Rica',\r\n 'cs' => 'Serbia And Montenegro', // Transitional reservation\r\n\t\t\t\t'cu' => 'Cuba',\r\n\t\t\t\t'cv' => 'Cape Verde',\r\n\t\t\t\t'cx' => 'Christmas Island',\r\n\t\t\t\t'cy' => 'Cyprus',\r\n\t\t\t\t'cz' => 'Czech Republic',\r\n\t\t\t\t'de' => 'Germany',\r\n\t\t\t\t'dj' => 'Djibouti',\r\n\t\t\t\t'dk' => 'Denmark',\r\n\t\t\t\t'dm' => 'Dominica',\r\n\t\t\t\t'do' => 'Dominican Republic',\r\n\t\t\t\t'dz' => 'Algeria',\r\n\t\t\t\t'ec' => 'Ecuador',\r\n\t\t\t\t'ee' => 'Estonia',\r\n\t\t\t\t'eg' => 'Egypt',\r\n\t\t\t\t'eh' => 'Western Sahara',\r\n\t\t\t\t'er' => 'Eritrea',\r\n\t\t\t\t'es' => 'Spain',\r\n\t\t\t\t'et' => 'Ethiopia',\r\n\t\t\t\t'fi' => 'Finland',\r\n\t\t\t\t'fj' => 'Fiji',\r\n\t\t\t\t'fk' => 'Falkland Islands',\r\n\t\t\t\t'fm' => 'Micronesia',\r\n\t\t\t\t'fo' => 'Faroe Islands',\r\n\t\t\t\t'fr' => 'France',\r\n\t\t\t\t'ga' => 'Gabon',\r\n\t\t\t\t'gd' => 'Grenada',\r\n\t\t\t\t'ge' => 'Georgia',\r\n\t\t\t\t'gf' => 'French Guiana',\r\n\t\t\t\t'gg' => 'Guernsey',\r\n\t\t\t\t'gh' => 'Ghana',\r\n\t\t\t\t'gi' => 'Gibraltar',\r\n\t\t\t\t'gl' => 'Greenland',\r\n\t\t\t\t'gm' => 'Gambia',\r\n\t\t\t\t'gn' => 'Guinea',\r\n\t\t\t\t'gp' => 'Guadeloupe',\r\n\t\t\t\t'gq' => 'Equatorial Guinea',\r\n\t\t\t\t'gr' => 'Greece',\r\n 'gs' => 'South Georgia and the South Sandwich Islands',\r\n\t\t\t\t'gt' => 'Guatemala',\r\n\t\t\t\t'gu' => 'Guam',\r\n 'gw' => 'Guinea-Bissau',\r\n\t\t\t\t'gy' => 'Guyana',\r\n 'hk' => 'Hong Kong S.A.R., China',\r\n 'hm' => 'Heard Island and McDonald Islands',\r\n\t\t\t\t'hn' => 'Honduras',\r\n\t\t\t\t'hr' => 'Croatia',\r\n\t\t\t\t'ht' => 'Haiti',\r\n\t\t\t\t'hu' => 'Hungary',\r\n\t\t\t\t'id' => 'Indonesia',\r\n\t\t\t\t'ie' => 'Ireland',\r\n\t\t\t\t'il' => 'Israel',\r\n\t\t\t\t'im' => 'Isle of Man',\r\n\t\t\t\t'in' => 'India',\r\n\t\t\t\t'io' => 'British Indian Ocean Territory',\r\n\t\t\t\t'iq' => 'Iraq',\r\n\t\t\t\t'ir' => 'Iran',\r\n\t\t\t\t'is' => 'Iceland',\r\n\t\t\t\t'it' => 'Italy',\r\n\t\t\t\t'je' => 'Jersey',\r\n\t\t\t\t'jm' => 'Jamaica',\r\n\t\t\t\t'jo' => 'Jordan',\r\n\t\t\t\t'jp' => 'Japan',\r\n\t\t\t\t'ke' => 'Kenya',\r\n\t\t\t\t'kg' => 'Kyrgyzstan',\r\n\t\t\t\t'kh' => 'Cambodia',\r\n\t\t\t\t'ki' => 'Kiribati',\r\n\t\t\t\t'km' => 'Comoros',\r\n\t\t\t\t'kn' => 'Saint Kitts and Nevis',\r\n\t\t\t\t'kp' => 'North Korea',\r\n\t\t\t\t'kr' => 'South Korea',\r\n\t\t\t\t'kw' => 'Kuwait',\r\n\t\t\t\t'ky' => 'Cayman Islands',\r\n\t\t\t\t'kz' => 'Kazakhstan',\r\n\t\t\t\t'la' => 'Laos',\r\n\t\t\t\t'lb' => 'Lebanon',\r\n\t\t\t\t'lc' => 'Saint Lucia',\r\n\t\t\t\t'li' => 'Liechtenstein',\r\n\t\t\t\t'lk' => 'Sri Lanka',\r\n\t\t\t\t'lr' => 'Liberia',\r\n\t\t\t\t'ls' => 'Lesotho',\r\n\t\t\t\t'lt' => 'Lithuania',\r\n\t\t\t\t'lu' => 'Luxembourg',\r\n\t\t\t\t'lv' => 'Latvia',\r\n\t\t\t\t'ly' => 'Libya',\r\n\t\t\t\t'ma' => 'Morocco',\r\n\t\t\t\t'mc' => 'Monaco',\r\n\t\t\t\t'md' => 'Moldova',\r\n\t\t\t\t'me' => 'Montenegro',\r\n\t\t\t\t'mg' => 'Madagascar',\r\n\t\t\t\t'mh' => 'Marshall Islands',\r\n\t\t\t\t'mk' => 'Macedonia',\r\n\t\t\t\t'ml' => 'Mali',\r\n\t\t\t\t'mm' => 'Myanmar',\r\n\t\t\t\t'mn' => 'Mongolia',\r\n\t\t\t\t'mo' => 'Macao S.A.R., China',\r\n\t\t\t\t'mp' => 'Northern Mariana Islands',\r\n\t\t\t\t'mq' => 'Martinique',\r\n\t\t\t\t'mr' => 'Mauritania',\r\n\t\t\t\t'ms' => 'Montserrat',\r\n\t\t\t\t'mt' => 'Malta',\r\n\t\t\t\t'mu' => 'Mauritius',\r\n\t\t\t\t'mv' => 'Maldives',\r\n\t\t\t\t'mw' => 'Malawi',\r\n\t\t\t\t'mx' => 'Mexico',\r\n\t\t\t\t'my' => 'Malaysia',\r\n\t\t\t\t'mz' => 'Mozambique',\r\n\t\t\t\t'na' => 'Namibia',\r\n\t\t\t\t'nc' => 'New Caledonia',\r\n\t\t\t\t'ne' => 'Niger',\r\n\t\t\t\t'nf' => 'Norfolk Island',\r\n\t\t\t\t'ng' => 'Nigeria',\r\n\t\t\t\t'ni' => 'Nicaragua',\r\n\t\t\t\t'nl' => 'Netherlands',\r\n\t\t\t\t'no' => 'Norway',\r\n\t\t\t\t'np' => 'Nepal',\r\n\t\t\t\t'nr' => 'Nauru',\r\n\t\t\t\t'nu' => 'Niue',\r\n\t\t\t\t'nz' => 'New Zealand',\r\n\t\t\t\t'om' => 'Oman',\r\n\t\t\t\t'pa' => 'Panama',\r\n\t\t\t\t'pe' => 'Peru',\r\n\t\t\t\t'pf' => 'French Polynesia',\r\n\t\t\t\t'pg' => 'Papua New Guinea',\r\n\t\t\t\t'ph' => 'Philippines',\r\n\t\t\t\t'pk' => 'Pakistan',\r\n\t\t\t\t'pl' => 'Poland',\r\n\t\t\t\t'pm' => 'Saint Pierre and Miquelon',\r\n\t\t\t\t'pn' => 'Pitcairn',\r\n\t\t\t\t'pr' => 'Puerto Rico',\r\n\t\t\t\t'ps' => 'Palestinian Territory',\r\n\t\t\t\t'pt' => 'Portugal',\r\n\t\t\t\t'pw' => 'Palau',\r\n\t\t\t\t'py' => 'Paraguay',\r\n\t\t\t\t'qa' => 'Qatar',\r\n\t\t\t\t're' => 'Reunion',\r\n\t\t\t\t'ro' => 'Romania',\r\n\t\t\t\t'rs' => 'Serbia',\r\n\t\t\t\t'ru' => 'Russia',\r\n\t\t\t\t'rw' => 'Rwanda',\r\n\t\t\t\t'sa' => 'Saudi Arabia',\r\n\t\t\t\t'sb' => 'Solomon Islands',\r\n\t\t\t\t'sc' => 'Seychelles',\r\n\t\t\t\t'sd' => 'Sudan',\r\n\t\t\t\t'se' => 'Sweden',\r\n\t\t\t\t'sg' => 'Singapore',\r\n\t\t\t\t'sh' => 'Saint Helena',\r\n\t\t\t\t'si' => 'Slovenia',\r\n\t\t\t\t'sj' => 'Svalbard and Jan Mayen',\r\n\t\t\t\t'sk' => 'Slovakia',\r\n\t\t\t\t'sl' => 'Sierra Leone',\r\n\t\t\t\t'sm' => 'San Marino',\r\n\t\t\t\t'sn' => 'Senegal',\r\n\t\t\t\t'so' => 'Somalia',\r\n\t\t\t\t'sr' => 'Suriname',\r\n\t\t\t\t'st' => 'Sao Tome and Principe',\r\n\t\t\t\t'sv' => 'El Salvador',\r\n\t\t\t\t'sy' => 'Syria',\r\n\t\t\t\t'sz' => 'Swaziland',\r\n\t\t\t\t'tc' => 'Turks and Caicos Islands',\r\n\t\t\t\t'td' => 'Chad',\r\n\t\t\t\t'tf' => 'French Southern Territories',\r\n\t\t\t\t'tg' => 'Togo',\r\n\t\t\t\t'th' => 'Thailand',\r\n\t\t\t\t'tj' => 'Tajikistan',\r\n\t\t\t\t'tk' => 'Tokelau',\r\n\t\t\t\t'tl' => 'East Timor',\r\n\t\t\t\t'tm' => 'Turkmenistan',\r\n\t\t\t\t'tn' => 'Tunisia',\r\n\t\t\t\t'to' => 'Tonga',\r\n\t\t\t\t'tr' => 'Turkey',\r\n\t\t\t\t'tt' => 'Trinidad and Tobago',\r\n\t\t\t\t'tv' => 'Tuvalu',\r\n\t\t\t\t'tw' => 'Taiwan',\r\n\t\t\t\t'tz' => 'Tanzania',\r\n\t\t\t\t'ua' => 'Ukraine',\r\n\t\t\t\t'ug' => 'Uganda',\r\n\t\t\t\t'uk' => 'United Kingdom',\r\n\t\t\t\t'um' => 'United States Minor Outlying Islands',\r\n\t\t\t\t'us' => 'United States',\r\n\t\t\t\t'uy' => 'Uruguay',\r\n\t\t\t\t'uz' => 'Uzbekistan',\r\n\t\t\t\t'va' => 'Vatican',\r\n\t\t\t\t'vc' => 'Saint Vincent and the Grenadines',\r\n\t\t\t\t've' => 'Venezuela',\r\n\t\t\t\t'vg' => 'British Virgin Islands',\r\n\t\t\t\t'vi' => 'U.S. Virgin Islands',\r\n\t\t\t\t'vn' => 'Vietnam',\r\n\t\t\t\t'vu' => 'Vanuatu',\r\n\t\t\t\t'wf' => 'Wallis and Futuna',\r\n\t\t\t\t'ws' => 'Samoa',\r\n\t\t\t\t'ye' => 'Yemen',\r\n\t\t\t\t'yt' => 'Mayotte',\r\n\t\t\t\t'za' => 'South Africa',\r\n\t\t\t\t'zm' => 'Zambia',\r\n\t\t\t\t'zw' => 'Zimbabwe',\r\n\t\t);\r\n\r\n\t\t// Sort the list.\r\n\t\tnatcasesort($countries);\r\n\r\n\t\t// In fact, the ISO codes for countries are all Upper Case.\r\n\t\t// So, if someone needs the list as the official records,\r\n\t\t// it will convert.\r\n\t\tif (!empty($upper)) {\r\n\t\t\treturn array_change_key_case($countries, CASE_UPPER);\r\n\t\t}\r\n\t\treturn $countries;\r\n\t}", "title": "" } ]
0c08dbb2ad3cdc767641d60eb2e2ef98
end public function newMenu
[ { "docid": "44da2f7e48dbff160d7e879833e3942d", "score": "0.0", "text": "public function addJsItem($key )\n {\n\n if (is_array($key) ) {\n $this->jsItems = array_merge($this->jsItems, $key );\n } else {\n $this->jsItems[] = $key;\n }\n\n }", "title": "" } ]
[ { "docid": "8c062dc4b2d5323206a296207ba17848", "score": "0.8540595", "text": "protected function MenuHome_new() {\n }", "title": "" }, { "docid": "384a681ebbeaff3eba4996b121eafb64", "score": "0.81663215", "text": "private function Menu()\n {\n }", "title": "" }, { "docid": "7fe211c06b47edb9a5a7376f7a939d2c", "score": "0.8151839", "text": "public abstract function generateMenu();", "title": "" }, { "docid": "b2982d2decce5e60082e7b350015d7d1", "score": "0.80590564", "text": "abstract public function menu();", "title": "" }, { "docid": "d518a1cfc4bc94e3fc9cecb8b1a418ca", "score": "0.79702395", "text": "public function menus()\n {\n\n }", "title": "" }, { "docid": "d81637d6655bb6d7a2fd66fd924c689f", "score": "0.793924", "text": "public function add_menus()\n {\n }", "title": "" }, { "docid": "48cf3ffa8e726071451f3491e5a29ab8", "score": "0.7662539", "text": "public function createMenu() {\n $this->createMenuItem(\n [\n 'label' => 'Bestellungen / Bestellnummern Healer',\n 'controller' => 'Bestellnummer',\n 'class' => 'sprite-application-block',\n 'action' => 'Index',\n 'active' => 1,\n 'parent' => $this->Menu()->findOneBy(['label' => 'Artikel'])\n ]\n );\n\n }", "title": "" }, { "docid": "0fedf2d3b323222dc230ce82e3f72e8b", "score": "0.7650893", "text": "public static function &createMenu() \n {\n $ptr = count(self::$_new_menus);\n self::$_new_menus[] = new VMenu;\n return self::$_new_menus[$ptr]; \n }", "title": "" }, { "docid": "6ef899c8aadc3bee55cb7e95b7774f21", "score": "0.7621446", "text": "protected function getMenu()\n {\n }", "title": "" }, { "docid": "fbb7b5e941c0eff7a84349cf8fe1cf3d", "score": "0.7573098", "text": "protected function MenuPainter_new() { }", "title": "" }, { "docid": "b1c4c3404ae3ae6a9397e35011345caf", "score": "0.74779177", "text": "public function createMenu() {\n\t//create new top-level menu\n\tadd_menu_page(\n 'FilePreviews.io', \n 'FilePreviews.io', \n 'administrator', \n __FILE__, \n [$this, 'settingsPage'] , \n plugins_url('/images/icon.png', __FILE__) \n );\n }", "title": "" }, { "docid": "b60f21bc1a653a26707fe09d54cd1e25", "score": "0.74618614", "text": "function twentytwenty_menus() {}", "title": "" }, { "docid": "aa8fa893e17b472ff771b8c9912569da", "score": "0.7460509", "text": "public function testCreateMenu()\n {\n\n }", "title": "" }, { "docid": "29e5c65b087b30b36e116b30ed920a24", "score": "0.7424347", "text": "public function addAdminMenu();", "title": "" }, { "docid": "8c4545333b7a08357f9ba433e45cb077", "score": "0.74171746", "text": "public function register_menus() {\n\t\t\t//\n\t\t}", "title": "" }, { "docid": "9febbbdb1b7c3a50c58eb7ec69bc9466", "score": "0.73932546", "text": "public function menu( )\n {\n\n if( $this->view->isType( View::WINDOW ) )\n {\n $view = $this->view->newWindow('WebfrapMainMenu', 'Default');\n $view->setTitle('Daidalos Module');\n }\n else\n {\n $view = $this->view;\n }\n\n $view->setTemplate( 'menu/modmenu' );\n\n $modMenu = $view->newItem( 'modMenu', 'MenuFolder' );\n $modMenu->setSource('genf/bdl/modmenu');\n\n }", "title": "" }, { "docid": "31d60706f47d4f4d88f67c11b8e59424", "score": "0.73739445", "text": "public function admin_menu() {}", "title": "" }, { "docid": "d1f88407c4de5863da78ece47d9c0963", "score": "0.73378074", "text": "function PBX_admin_menu(){\n\t\n $mymenu = new PBX_option_list(); \n}", "title": "" }, { "docid": "3ff325235752b48c302ca8c3f0c26391", "score": "0.73353964", "text": "function ah_create_menu() {\n\tglobal $displayName;\n\tadd_menu_page( $displayName, $displayName, 'read', 'ah-main', 'ah_main' );\n}", "title": "" }, { "docid": "101949679de74cf02db92b400bf6af1a", "score": "0.7304244", "text": "public static function bbdi_create_menu(){\n\t\t# make sure menu 'Main Menu' doesn't already exist\n\t\tif(wp_get_nav_menu_object('Main Menu')){\n\t\t\techo 'There\\'s already a menu called <code>Main Menu</code>';\n\t\t\tdie();\n\t\t}\n\t\t# create the menu\n\t $menu_id = wp_create_nav_menu('Main Menu');\n\t \n\t ## pages\n\t $pages = array('Home', 'About Us', 'Services', 'Blog', 'Contact');\n\t foreach($pages as $page){\n\t \t# make sure we have the page to add as a menu item\n\t \tif(!($page_obj = get_page_by_title($page))){\n\t \t\techo '<span class=\"fail\"><code>'. $page .'</code> page not found.</span><br />';\n\t \t\tcontinue;\n\t \t}\n\t \t# add the page as a menu item\n\t \t\n\t \t$new_menu_item_id = self::create_menu_item( array(\n\t \t\t# for the WP function wp_update_nav_menu_item()\n\t \t\t'menu-item-title' => $page_obj->post_title,\n\t \t\t'menu-item-object-id' => $page_obj->ID,\n\t \t\t'menu-item-object' => 'page',\n\t \t\t'menu-item-type' => 'post_type',\n\t \t\t'menu-item-status' => 'publish',\n\t \t\t\n\t \t\t# for our custom function\n\t \t\t'menu_id' => $menu_id,\n\t \t));\n\n\t \t# we're done now except for blog item\n\t \t# for the blog item, we need to add submenu items\n\t \tif($page != 'Blog') continue;\n\t \t\n\t \t$cats = array('faq', 'helpful-hints', 'testimonials');\n\t \tforeach($cats as $cat){\n\t \t\t# make sure the category exists\n\t \t\tif(!($cat_obj = get_category_by_slug($cat))){\n\t \t\t\techo '<span class=\"fail\">Category <code>'. $cat .'</code> doesn\\'t exist.</span><br />';\n\t \t\t\tcontinue;\n\t \t\t}\n\t \t\tself::create_menu_item(array(\n\t\t\t\t\t# for the WP function wp_update_nav_menu_item()\n\t\t\t\t\t'menu-item-title' => $cat_obj->name,\n\t\t\t\t\t'menu-item-object-id' => $cat_obj->term_id,\n\t\t\t\t\t'menu-item-parent-id' => $new_menu_item_id,\n\t\t\t\t\t'menu-item-object' => 'category',\n\t\t\t\t\t'menu-item-type' => 'taxonomy',\n\t\t\t\t\t'menu-item-status' => 'publish',\n\t\t\t\t\n\t\t\t\t\t# for our custom function\n\t\t\t\t\t'menu_id' => $menu_id,\n\t \t\t));\n\t \t}\n\t }\n\t\tdie();\n\t}", "title": "" }, { "docid": "60fb2a58cda8b6d2a8162425ccd79fa4", "score": "0.7264372", "text": "public function admin_menu() {\n\n\t}", "title": "" }, { "docid": "80c4c14691d545111f50e52bab879dce", "score": "0.7259435", "text": "function register_my_menu() {\nregister_nav_menu('new-menu',__( 'New Menu' ));\n}", "title": "" }, { "docid": "3c4694bedd0afc51d56d93b3c6e4acba", "score": "0.72527367", "text": "function buildSupervisorNewPostingMenu(){\r\n return buildMenu('Supervisor Portal', '1', SUPERMENU);\r\n}", "title": "" }, { "docid": "36b5100c8d93a1408faf1c0e9475053b", "score": "0.7244436", "text": "abstract protected function buildMenu($menu);", "title": "" }, { "docid": "01fe064c98d04851f5c6f93b5ae52fa3", "score": "0.72239935", "text": "function init_menu() {\n // under LIBRARIES\n if (func_num_args()>0) {\n $arg_list = func_get_args();\n }\n\n // menu entries\n $sql = \"insert into chits.module_menu (module_id, menu_title, menu_cat, menu_action) \".\n \"values ('ptgroup', 'Patient Groups', 'LIBRARIES', '_ptgroup')\";\n $result = mysql_query($sql);\n\n $sql = \"insert into chits.module_menu (module_id, menu_title, menu_cat, menu_action) \".\n \"values ('ptgroup', 'Groups', 'PATIENTS', '_patient_ptgroups')\";\n $result = mysql_query($sql);\n\n // add more detail\n $sql = \"update chits.modules set module_desc = 'CHITS Library - Patient Groups', \".\n \"module_version = '\".$this->version.\"', module_author = '\".$this->author.\"' \".\n \"where module_id = 'ptgroup';\";\n $result = mysql_query($sql);\n }", "title": "" }, { "docid": "d278959f5ee8e9887190b1dceca7acf0", "score": "0.72165483", "text": "public function add_menu() {\r\n //create new top-level menu\r\n add_menu_page(\r\n esc_html__( 'Property fields', 'myhome-core' ),\r\n esc_html__( 'Property fields', 'myhome-core' ),\r\n 'administrator',\r\n 'myhome_attributes',\r\n array( $this, 'admin_page' ),\r\n '',\r\n '22'\r\n );\r\n }", "title": "" }, { "docid": "5dc01953838057e0de69530a5ffdab37", "score": "0.7177866", "text": "final function add_page_to_menu(): void {}", "title": "" }, { "docid": "07406dd1657ff34803a95fc11ca31e99", "score": "0.71180433", "text": "public function create_menu_page(){\n $this->create_wrap_before();\n\n $this->create_wrap_after();\n }", "title": "" }, { "docid": "beaa53fddbb6940ac9ec79b917497cc2", "score": "0.7113863", "text": "function __construct(){\n\t\t\t$this->addMenuItems();\n\t\t}", "title": "" }, { "docid": "899858b3c449299dfee2818b88efe310", "score": "0.7077476", "text": "function menu()\n {\n include 'common/admin/admin_menu.php';\n return $menubox->generate();\n }", "title": "" }, { "docid": "c0087b0a54ac96b5181b557067f8845f", "score": "0.7073674", "text": "function Menu_Rendering($menu)\n{\n}", "title": "" }, { "docid": "0ff7b93eb2d84f3e59cf388ebca7b187", "score": "0.705663", "text": "function create_menu(){\n register_nav_menu('primary','Main Menu');\n register_nav_menu('secondary','Footer Menu');\n}", "title": "" }, { "docid": "42ce9cb78b0dd9b6f19cfcf0dbb20669", "score": "0.7050201", "text": "function dammiMenu()\n\t {\n\t\n\t\t$m = new waMenu();\n\t\t$m->apri();\n\t\t\n\t\t$m->apriSezione(\"amministrazioni\", \"tabellaamministrazioni.php\");\n\t\t$m->chiudiSezione();\n\t\t$m->apriSezione(\"organismi\", \"tabellaorganismi.php\");\n\t\t$m->chiudiSezione();\n\t\t$m->apriSezione(\"corsi\", \"tabellacorsi.php\");\n\t\t$m->chiudiSezione();\n\t\t$m->apriSezione(\"allievi\", \"tabellaallievi.php\");\n\t\t$m->chiudiSezione();\n\t\t$m->apriSezione(\"navigazione\");\n\t\t\t$m->aggiungiVoce(\"nella stessa pagina\", \"index.php?navigazione=\" . WAAPPLICAZIONE_NAV_PAGINA);\n\t\t\t$m->aggiungiVoce(\"a finestre\", \"index.php?navigazione=\" . WAAPPLICAZIONE_NAV_FINESTRA);\n\t\t\t$m->aggiungiVoce(\"iframe\", \"index.php?navigazione=\" . WAAPPLICAZIONE_NAV_INTERNA);\n\t\t$m->chiudiSezione();\n\t\tif ($this->waDoc)\n\t\t\t{\n\t\t\t$m->apriSezione(\"waDoc\", \"?APPL_AVVIA_WADOC=1\");\n\t\t\t$m->chiudiSezione();\n\t\t\t}\n\n\t\t$m->chiudi();\n\t\treturn $m;\n\t\t\n\t }", "title": "" }, { "docid": "4ab6e378e75bdca87ce42fb0f8ba5557", "score": "0.7042425", "text": "function init_menu() {\n if (func_num_args()>0) {\n $arg_list = func_get_args();\n }\n\n // menu entries\n module::set_menu($this->module, \"Database Support\", \"SUPPORT\", \"_database_support\");\n\n // add more detail\n module::set_detail($this->description, $this->version, $this->author, $this->module);\n\n }", "title": "" }, { "docid": "5340542a236ed6dad72840f5208772ed", "score": "0.70372206", "text": "public function getMenu(){\n\t$this->view()->addTemplate(\"menu\");\n }", "title": "" }, { "docid": "523eef036e8afd8f56e0e8433a061843", "score": "0.7036505", "text": "function wpb_custom_new_menu() {\n register_nav_menu('primary-menu',__( 'Primary Menu' ));\n register_nav_menu('logout-menu',__( 'Logout Menu' ));\n}", "title": "" }, { "docid": "426527fe3a30d711f78d09d90a3bebd2", "score": "0.7023723", "text": "function wf_menu() {\n register_nav_menus();\n}", "title": "" }, { "docid": "332038f7435b9efaf78e7bf55070c1a9", "score": "0.70106906", "text": "public function create()\n {\n $parents = Menu::root()->get();\n $types = Dictionary::menuType()->get();\n $pos = Dictionary::posType()->get();\n $priUnits = Dictionary::privType()->get();\n\n return view('Imperator::menu.create')\n ->with('parents', $parents)\n ->with('types', $types)\n ->with('pos', $pos)\n ->with('privileges', $priUnits)\n ->with('pageName', '菜单添加');\n }", "title": "" }, { "docid": "e6e6f9877755c58881157f6a4d9a0c9d", "score": "0.7010482", "text": "public function pageMenu()\n\t{\n\t\t$pageManager = new Page();\n\t\t$pageMenu = $pageManager->getListMenu();\n\t\trequire 'view/ViewBackEnd/newPageView.php';\n\t}", "title": "" }, { "docid": "3104c6c73bc486d1eeedd49bee457a29", "score": "0.6999494", "text": "public function LinkedMenuItem()\n {\n }", "title": "" }, { "docid": "7bfa45d31fe2291d1770d93753970d89", "score": "0.6965336", "text": "public function testUpdateMenu()\n {\n\n }", "title": "" }, { "docid": "e40d75c6a959fe8b0b2276722561118c", "score": "0.6948274", "text": "public function setupMenu(){\r\n $theSlug=add_menu_page(\r\n 'My Page-Title',\r\n 'My Menu Title', \r\n 'administrator', \r\n 'mySlug',\r\n array($this,'aCallbackMethod'), '',9);\r\n // add_submenu_page('tt_newletter_subscriberlist', 'neuer Abonnent', 'neuer Abonnent',\r\n // 'administrator', 'tt_newsletter_subscribercreate',array($this->sc, 'create' ));\r\n }", "title": "" }, { "docid": "2d04662d5957fe5219481e315c902160", "score": "0.6937943", "text": "function getMenuItems();", "title": "" }, { "docid": "9e31774089fe7411948da54ca23d8bf5", "score": "0.6932684", "text": "public static function addMenu(){\n add_submenu_page(\n avimayeur_generality::GROUP, // slug parent\n self::SUB_TITLE, // page_title\n self::SUB_MENU, // menu_title\n self::PERMITION, // capability\n self::SUB_GROUP, // slug_menu\n [self::class, 'render'] // CALLBACK\n );\n }", "title": "" }, { "docid": "ebea2e210b286f888ee765fb4e8b8175", "score": "0.688356", "text": "function OnBuildMenu()\n {\n $items = array (\n 'addcontest' => array( 'menu_text' => 'Create Contest',\n 'menu_group' => 'contests',\n 'weight' => 100,\n 'action' => ccl('contest', 'create'),\n 'access' => CC_ADMIN_ONLY\n ),\n );\n\n $groups = array(\n 'contests' => array( 'group_name' => 'Contests',\n 'weight' => 4 ),\n );\n\n CCMenu::AddGroups($groups);\n CCMenu::AddItems($items);\n }", "title": "" }, { "docid": "c997bd6b4d1bf9af01f8ef4e810a14e6", "score": "0.68834084", "text": "static function add_menu_item()\r\n {\r\n if ( !current_user_can('activate_plugins') ) return;\r\n add_object_page( 'RDP Google Custom Search', 'RDP GCS', 'publish_posts', RDP_GCS_PLUGIN::$plugin_slug, 'RDP_GCS_ADMIN::generate_page',plugins_url('/rdp-google-custom-search/pl/images/menu-icon.gif') );\r\n $sAllText = __('All Search Engines', RDP_GCS_PLUGIN::$plugin_slug);\r\n $sAllCSEText = __('All Google CSEs', RDP_GCS_PLUGIN::$plugin_slug);\r\n add_submenu_page( RDP_GCS_PLUGIN::$plugin_slug, $sAllText, $sAllCSEText, \"publish_posts\", RDP_GCS_PLUGIN::$plugin_slug, \"RDP_GCS_ADMIN::generate_page\" ); \r\n $sAddNewTitle = __('Google Custom Search Engine', RDP_GCS_PLUGIN::$plugin_slug);\r\n $sAddNewText = __('Add New Google CSE', RDP_GCS_PLUGIN::$plugin_slug);\r\n add_submenu_page( RDP_GCS_PLUGIN::$plugin_slug, $sAddNewTitle, $sAddNewText, 'publish_posts', RDP_GCS_PLUGIN::$plugin_slug.'-new', 'RDP_GCS_ADMIN::add_new');\r\n }", "title": "" }, { "docid": "6725492c4fc2021201ea0639a420ba1f", "score": "0.68744266", "text": "function _quick_menu () {\n\t\t$menu = array(\n\t\t\tarray(\n\t\t\t\t\"name\"\t=> ucfirst($_GET[\"object\"]).\" main\",\n\t\t\t\t\"url\"\t=> \"./?object=\".$_GET[\"object\"],\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t\"name\"\t=> \"Add\",\n\t\t\t\t\"url\"\t=> \"./?object=\".$_GET[\"object\"].\"&action=add\",\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t\"name\"\t=> \"\",\n\t\t\t\t\"url\"\t=> \"./?object=\".$_GET[\"object\"],\n\t\t\t),\n\t\t);\n\t\treturn $menu;\t\n\t}", "title": "" }, { "docid": "3b1f8de0622ca337c0f37883ef7f5ab7", "score": "0.68629473", "text": "static function insertMenuItem($hmenu,$before = null,$position_item,$menuItemInfo) \n {\n \n }", "title": "" }, { "docid": "f63d67f39d458b2afe8ff51002743088", "score": "0.6848832", "text": "function init_menu() {\n // under LIBRARIES\n if (func_num_args()>0) {\n $arg_list = func_get_args();\n }\n // _<modulename> in SQl refers to function _<modulename>() below\n // _barangay in SQL refers to function _barangay() below;\n module::set_menu($this->module, \"Language\", \"LIBRARIES\", \"_language\");\n\n // put in more details\n module::set_detail($this->description, $this->version, $this->author, $this->module);\n\n }", "title": "" }, { "docid": "eb536dd38156c86f863b7fbba4831d46", "score": "0.6845768", "text": "function Menu() {\n\t\t\t?>\n\t\t\t<table width=\"180\" cellspacing=\"0\" cellpadding=\"2\" border=\"0\">\t\n\t <tbody>\n \t<?\n\t\t\t\t\t$menus = new MenuAdmin();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$menusDAO = new MenuAdminDAO();\n\t\t\t\t\t$listaMenus = $menusDAO->listaMenus();\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$title = \"\";\n\t\t\t\t\t$totMenus = count($listaMenus);\n \t?>\t\t\t\t\t\t\t \n\t <? \n\t \tfor ($i=0; $i < $totMenus; $i++) { \n\t \t\tif($title != $listaMenus[$i]->getTitulo()) { ?>\n\t\t\t\t<?\t\t\tif($title != \"\") {\n\t\t\t\t\t\t\t\t?><tr><td height=\"3\" background=\"img/dot.gif\"/></tr><?\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t?><tr><td valign=\"center\"><b><font color=\"#666\"><?=strtoupper($listaMenus[$i]->getTitulo());?></font></b></td></tr><?\n\t\t\t\t\t\t}?>\n\t\t\t <tr>\n\t\t\t \t<td>\n\t\t\t\t\t\t\t<a class=\"TextoPageLink\" href=\"?menu=<?=$listaMenus[$i]->getIdmenu();?>&act=<?=$listaMenus[$i]->getAcao();?>\"><?=ucwords($listaMenus[$i]->getTituloLink());?></a><br/>\n\t\t\t </td>\n\t\t\t </tr>\n\t\t\t\t<? $title = $listaMenus[$i]->getTitulo();\n\t \t} ?>\n\t \t<tr>\n\t\t\t\t <td>\n\t\t\t\t <table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t <tbody>\n\t\t\t\t <tr>\n\t\t\t\t <td height=\"3\" background=\"img/dot.gif\"/>\n\t\t\t\t </tr>\n\t\t\t\t </tbody>\n\t\t\t\t </table>\n\t\t\t\t </td>\n\t\t\t\t </tr>\t\t\t\t\t\t\t\t\t\t\t\t\t \t\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t\t<?\n\t\t}", "title": "" }, { "docid": "0ba1dcea7ec918f15474bd5fb8ce5026", "score": "0.6839642", "text": "public function _mainMenu() {\n\t\t$result = $this->dbo->query(\"SELECT news_id, news_title, news_detail, date_created \n\t\t\t\t\t\t\t\t\tFROM news\");\n\t\t// Create a multidimensional array to conatin a list of items and parents\n\t\t$menu = array( 'items' => array(), 'parents' => array() );\n\t\t// Builds the array lists with data from the menu table\n\t\twhile ($items = $result->fetch(PDO::FETCH_ASSOC)){\n\t\t\t// Creates entry into items array with current menu item id ie. $menu['items'][1]\n\t\t\t$menu['items'][$items['page_id']] = $items;\n\t\t\t// Creates entry into parents array. Parents array contains a list of all items with children\n\t\t\t$menu['parents'][$items['parent_id']][] = $items['page_id'];\n\t\t}\n\t\treturn $this->_buildMenu(0, $menu);\n\t}", "title": "" }, { "docid": "7f2587350242b86ce271d2faf980d5c1", "score": "0.6810384", "text": "public function constructMenu() {\n\t\t// Menu RestartMap\n\t\t$itemQuad = new Quad_UIConstruction_Buttons();\n\t\t$itemQuad->setSubStyle($itemQuad::SUBSTYLE_Reload);\n\t\t$itemQuad->setAction(self::ACTION_START_VOTE . 'restartmap');\n\t\t$this->addVoteMenuItem($itemQuad, 5, 'Vote for Restart-Map');\n\n\t\t//Check if Pause exists in current GameMode\n\t\ttry {\n\t\t\t$scriptInfos = $this->maniaControl->client->getModeScriptInfo();\n\n\t\t\t$pauseExists = false;\n\t\t\tforeach ($scriptInfos->commandDescs as $param) {\n\t\t\t\tif ($param->name === \"Command_ForceWarmUp\") {\n\t\t\t\t\t$pauseExists = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Menu Pause\n\t\t\tif ($pauseExists) {\n\t\t\t\t$itemQuad = new Quad_Icons128x32_1();\n\t\t\t\t$itemQuad->setSubStyle($itemQuad::SUBSTYLE_ManiaLinkSwitch);\n\t\t\t\t$itemQuad->setAction(self::ACTION_START_VOTE . 'pausegame');\n\t\t\t\t$this->addVoteMenuItem($itemQuad, 10, 'Vote for a pause of Current Game');\n\t\t\t}\n\t\t} catch (GameModeException $e) {\n\t\t}\n\n\t\t//Menu SkipMap\n\t\t$itemQuad = new Quad_Icons64x64_1();\n\t\t$itemQuad->setSubStyle($itemQuad::SUBSTYLE_ArrowFastNext);\n\t\t$itemQuad->setAction(self::ACTION_START_VOTE . 'skipmap');\n\t\t$this->addVoteMenuItem($itemQuad, 15, 'Vote for a Map Skip');\n\n\t\tif ($this->maniaControl->server->isTeamMode()) {\n\t\t\t//Menu TeamBalance\n\t\t\t$itemQuad = new Quad_Icons128x32_1();\n\t\t\t$itemQuad->setSubStyle($itemQuad::SUBSTYLE_RT_Team);\n\t\t\t$itemQuad->setAction(self::ACTION_START_VOTE . 'teambalance');\n\t\t\t$this->addVoteMenuItem($itemQuad, 20, 'Vote for Team-Balance');\n\t\t}\n\t\t//Show the Menu's icon\n\t\t$this->showIcon();\n\t}", "title": "" }, { "docid": "dfc3c6c12fd62d4413544f8f1f674576", "score": "0.68103695", "text": "public function init_menu(): void {\r\n\t\t// intro page\r\n\t\tadd_menu_page('Drama Levels', 'Drama Levels', 'manage_options', 'custompage', [$this, 'intro_page'], 'dashicons-smiley');\r\n\t\t// settings menu for controlling current drama provider\r\n\t\tadd_options_page('Drama Level', 'Drama Level', 'manage_options', 'drama-setting-admin', [$this, 'create_admin_page']);\r\n\t}", "title": "" }, { "docid": "6823f838dcdb99ee94bc32d74423d280", "score": "0.6802183", "text": "public function getMenus();", "title": "" }, { "docid": "1071fcf56b3df061d954c4b216e65673", "score": "0.6797236", "text": "function wpb_custom_new_menu() {\n register_nav_menu('my-custom-menu',__( 'My Custom Menu' ));\n}", "title": "" }, { "docid": "f69b54ff8087e1509b6f9359c11eb1bc", "score": "0.6791927", "text": "function createMenuItems()\n\t{\n\t\t// Check for request forgeries\n\t\tJSession::checkToken('request') or jexit(JText::_('JINVALID_TOKEN'));\n\n\t\t$db = JFactory::getDbo();\n\t\t$db->setQuery(\"SELECT extension_id FROM #__extensions WHERE element='com_flexicontent' AND type='component' \");\n\t\t$flexi_comp_id = $db->loadResult();\n\n\t\t$db->setQuery(\"DELETE FROM #__menu_types WHERE menutype='flexihiddenmenu' \");\n\t\t$db->execute();\n\n\t\t$db->setQuery(\"INSERT INTO #__menu_types (`menutype`,`title`,`description`) \" .\n\t\t\t\"VALUES ('flexihiddenmenu', 'FLEXIcontent Hidden Menu', 'A hidden menu to host Flexicontent needed links')\"\n\t\t);\n\t\t$db->execute();\n\n\t\t$db->setQuery(\"DELETE FROM #__menu WHERE menutype='flexihiddenmenu' \");\n\t\t$db->execute();\n\n\t\t$query \t= \"INSERT INTO #__menu (\"\n\t\t\t. \"`menutype`,`title`,`alias`,`path`,`link`,`type`,`published`,`parent_id`,`component_id`,`level`,\"\n\t\t\t. \"`checked_out`,`checked_out_time`,`browserNav`,`access`,`params`,`lft`,`rgt`,`home`, `language`\"\n\t\t\t. (FLEXI_J40GE ? \", `img`\" : '')\n\t\t. \") VALUES (\"\n\t\t\t. \"'flexihiddenmenu','Content','content_page','content_page','index.php?option=com_flexicontent&view=flexicontent','component',1,1,$flexi_comp_id,1,\"\n\t\t\t. \"0,'0000-00-00 00:00:00',0,1,'rootcat=0',0,0,0,'*'\"\n\t\t\t. (FLEXI_J40GE ? \", ''\" : \"\")\n\t\t. \")\";\n\n\t\ttry\n\t\t{\n\t\t\t$db->setQuery($query)->execute();\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tjexit('<span class=\"install-notok\"></span>' . $e->getMessage());\n\t\t}\n\n\t\t// Save the created menu item as default_menu_itemid for the component\n\t\t$cparams = JComponentHelper::getParams('com_flexicontent');\n\t\t$cparams->set('default_menu_itemid', $db->insertid());\n\t\t$cparams_str = $cparams->toString();\n\n\t\t$flexi = JComponentHelper::getComponent('com_flexicontent');\n\t\t$query = 'UPDATE ' . (FLEXI_J16GE ? '#__extensions' : '#__components')\n\t\t\t\t. ' SET params = ' . $db->Quote($cparams_str)\n\t\t\t\t. ' WHERE ' . (FLEXI_J16GE ? 'extension_id' : 'id') . '=' . $flexi->id;\n\n\t\ttry\n\t\t{\n\t\t\t$db->setQuery($query)->execute();\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tjexit('<span class=\"install-notok\"></span>' . $e->getMessage());\n\t\t}\n\n\t\techo '<span class=\"install-ok\"></span>';\n\n\t\t// This is necessary as extension data are cached ... and just above we updated the component parameters -manually- (and (also added menu item)\n\t\t$cache = JFactory::getCache();\n\t\t$cache->clean('_system');\n\t}", "title": "" }, { "docid": "0354bd38019a5ddd31d5f9cdb2ddaf47", "score": "0.67838013", "text": "function CreateNavigation($menu)\n {\n $i=0;\n if(count($menu)>0){\n foreach($menu as $key=>$value){\n\t$i++;\n if($value[first][2]!=\"\")\n $this->app->Tpl->Set(FIRSTNAV,' href=\"index.php?module='.$value[first][1].'&action='.$value[first][2].'\"\n >'.$value[first][0].'</a>');\n else\n $this->app->Tpl->Set(FIRSTNAV,' href=\"index.php?module='.$value[first][1].'\" \n\t >'.$value[first][0].'</a>');\n\t\n\t$this->app->Tpl->Parse(NAV,'firstnav.tpl');\n\tif(count($value[sec])>0){\n\t $this->app->Tpl->Add(NAV,'<div id=\"firstnav'.$i.'\" class=\"yuimenu\">\n <div class=\"bd\">\n <ul>');\n foreach($value[sec] as $secnav){\n if($secnav[2]!=\"\")\n $this->app->Tpl->Set(SECNAV,' href=\"index.php?module='.$secnav[1].'&action='.$secnav[2].'\"\n >'.$secnav[0].'</a>');\n else\n $this->app->Tpl->Set(SECNAV,' href=\"index.php?module='.$secnav[1].'\">'.$secnav[0].'</a>');\n\n $this->app->Tpl->Parse(NAV,'secnav.tpl');\n }\n\t $this->app->Tpl->Add(NAV,\"</ul></div></div></li>\");\n }\n }\n }\n }", "title": "" }, { "docid": "3332cc980b046c92999d6d8f7803534a", "score": "0.6783796", "text": "public function add_menu($node)\n {\n }", "title": "" }, { "docid": "615ecd2b8501ab629ad8317503adfd9c", "score": "0.6779893", "text": "function menus(){\n\tregister_nav_menu('main_menu','Menu_principal');\n\tregister_nav_menu('secondary_menu','Menu_secondaire');\n}", "title": "" }, { "docid": "6974f27b75069e196251c63454198d07", "score": "0.6779024", "text": "function buildMenuPage() \n{\n\tglobal $renderMenu;\n\tglobal $menu;\n\tglobal $navigation;\n\t\n\t// get a simpleXML object using xpath and looking for the $navigation['currentCategoryId']\n $categoryItemList = $menu->xpath(\"/menu/{$navigation['currentCategoryId']}/*\");\n \n // list out all items in the category with their optional descriptions\n while(list( , $item) = each($categoryItemList)) \n {\n \t$itemName = $item->name;\n \t$itemDesc = $item->description;\n \t\n $renderMenu .= \"<span style=\\\"color: #FF0000\\\"><strong>$itemName</strong></span>\";\n $renderMenu .= \"&nbsp;&nbsp;\";\n \t$renderMenu .= \"<em>$itemDesc</em>\";\n \n \t// List all price options for an item\n \t$renderMenu .= \"<span class=\\\"pull-right\\\">\";\n \tforeach($item->price->children() as $itemSize => $itemPrice ) \n \t{\n \t\t// Get $itemId from $itemPrice simpleXML object, then convert object to just a price (double)\n \t $itemId = $itemPrice['id'];\n \t $itemPrice = money_format('%i',doubleval($itemPrice));\n \n \t\t$renderMenu .= \"<a class=\\\"btn btn-mini\\\" href=\\\"index.php?action=add&amp;itemId=$itemId\\\"><i class=\\\"icon-plus\\\"></i> \n \t\t\t\t\t\t<strong>Add</strong></a>$itemSize&nbsp;&nbsp;$itemPrice\";\n \t}\n \t$renderMenu .=\t\"</span><br /><br />\";\n }\n $renderMenu .= \"<br />\";\n}", "title": "" }, { "docid": "b343f6fdd2ddc00fc52df69e7c6dafe4", "score": "0.67750746", "text": "public function handle(){\n $menu = new Menu();\n var_dump($menu->popup_menu([\"black\",\"white\"]));\n var_dump($menu->popup_menu([\"blue\",\"red\"]));\n }", "title": "" }, { "docid": "e9f8b1081cdbe2727ca003e612a657d8", "score": "0.67666596", "text": "function set_menu_page() {\n add_menu_page( $this->options['name'], $this->options['name'], $this->options['level'], $this->options['id'], array( &$this, 'page_top_results' ) );\n add_submenu_page( $this->options['id'], __( '404 Errors list', $this->options['id'] ), __( '404 Errors list', $this->options['id'] ), $this->options['level'], $this->options['id'].'-404', array( &$this, 'page_errors_list' ) );\n add_submenu_page( $this->options['id'], __( 'Search list', $this->options['id'] ), __( 'Search list', $this->options['id'] ), $this->options['level'], $this->options['id'].'-search', array( &$this, 'page_search_list' ) );\n add_submenu_page( $this->options['id'], __( 'Export', $this->options['id'] ), __( 'Export', $this->options['id'] ), $this->options['level'], $this->options['id'].'-export', array( &$this, 'page_export' ) );\n }", "title": "" }, { "docid": "9ef8608c016cd7fec250a7f4ddae3dd0", "score": "0.674958", "text": "function add_menu_page() {\n\t\tif ( isset( $_GET['assessment_result'] ) && isset( $_GET['action'] ) && 'delete' == sanitize_text_field( wp_unslash( $_GET['action'] ) ) ) {\n\t\t\t$this->delete_item( intval( $_GET['assessment_result'] ) );\n\t\t}\n\t\t$this->add_new_item();\n\t\t$this->add_list_table();\n\t}", "title": "" }, { "docid": "f0a621fe5398c6e78d5ab6db0f760bc1", "score": "0.67448306", "text": "function construirMenu()\r\n\t\t{\r\n\t\t\t$menu=\"<div id='cssmenu'><ul>\";\r\n\t\t\tforeach ($this->menu as $elementos) {\r\n\t\t\t\t/**\r\n\t\t\t\t*comparamos dentro del array de menu si la etiqueta es submenu o no\r\n\t\t\t\t*/\r\n\t\t\t\tif(strcmp($elementos[\"txt\"],\"submenu\")==0)\r\n\t\t\t\t{\r\n\t\t\t\t\t$menu=$menu.\"<li><a href=\".$elementos[\"url\"].\">\".$elementos[\"titulo\"].\"</a>\";\r\n\t\t\t\t\t$menu=$menu.\"<ul>\";\r\n\t\t\t\t\tforeach ($elementos[\"submenu\"] as $submenu)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$menu=$menu.\"<li><a href=\".$submenu[\"url\"].\">\".$submenu[\"txt\"].\"</a></li>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$menu=$menu.\"</ul></li>\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$menu=$menu.\"<li><a href=\".$elementos[\"url\"].\">\".$elementos[\"txt\"].\"</a></li>\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$menu=$menu.\"</ul></div>\";\r\n\t\t\t$this->setContenido($menu);\r\n\t\t}", "title": "" }, { "docid": "cb3d26b2576dbfa195053a02147ef122", "score": "0.67408067", "text": "function buildSupervisorSubmitMenu(){\r\n return buildMenu('Supervisor Portal', '3', SUPERMENU);\r\n}", "title": "" }, { "docid": "02ef090d6508d7aa2247bb96e7e98749", "score": "0.6737576", "text": "public function addMainMenu()\n {\n\n $menu = $this->config->menu;\n \\add_menu_page($menu->page_title, $menu->menu_title, $menu->capability, $menu->menu_slug, '', $menu->icon);\n $this->addSubMenus();\n }", "title": "" }, { "docid": "fe4809094c2f64a6997974b75932de8d", "score": "0.67237306", "text": "public function initMenu() {\n\t\t$this->menu = new DropdownMenu($this);\n\t\treturn $this->menu;\n\t}", "title": "" }, { "docid": "48cc5c466ef4c3f56aef6b691ec3a490", "score": "0.6718121", "text": "public function menu() {\n\t\tadd_action( 'admin_menu', array( $this->settings, 'set_main_menu' ) );\n\t}", "title": "" }, { "docid": "7c1871c819aaca9e04116af8d8ca3b7f", "score": "0.6712671", "text": "function sidebar_menu_create_form()\n{\n add_menu_page(\"Book Vehicles\",\"Book Vehicles\", 'read', 'add_vehicle', 'create_form_page','');\n\t\n add_submenu_page( \"add_vehicle\",\"Add Vehicle\",\"Add Vehicle\", 'read', 'add_vehicle', 'add_vehicle_page');\n add_submenu_page( \"add_vehicle\",\"All Vehicles\",\"All Vehicles\", 'read', 'all_vehicles', 'all_vehicles');\n\tadd_submenu_page( \"add_vehicle\",\"Categories\",\"Categories\", 'read', 'add_categories', 'add_categories_page');\n\tadd_submenu_page( \"add_vehicle\",\"Bookings\",\"Bookings\", 'read', 'all_bookings', 'all_bookings_page');\n\tadd_submenu_page( \"add_vehicle\",\"info\",\"Info\", 'read', 'info', 'info_page');\n\t\n}", "title": "" }, { "docid": "848f91ff3604f23024a5e15d4bc86ab9", "score": "0.6702373", "text": "public function add_menus() {\n\t\tadd_submenu_page( 'edit.php?post_type=mf_form', 'Project Images', 'Project Images', 'edit_others_posts', 'mf_project_images', array( &$this, 'show_project_images' ) );\n\t\tadd_submenu_page( 'edit.php?post_type=mf_form', 'Reports', 'Reports', 'edit_others_posts', 'mf_reports', array( &$this, 'show_reports_page' ) );\n\t}", "title": "" }, { "docid": "8651ad27481744196036368059483d8e", "score": "0.6699978", "text": "public function add_menu() {\r\n $main_category = $this->admin_model->get_main_category_id();\r\n $manu_category = $this->admin_model->get_sub_category_id_and_name();\r\n $data = array();\r\n $data['title'] = 'Add Menu';\r\n $data['main_category'] = json_encode($main_category);\r\n $data['manu_category'] = json_encode($manu_category);\r\n $data['main_content'] = $this->load->view('admin/add_menu', $data, TRUE);\r\n $this->load->view('admin/admin_master', $data);\r\n }", "title": "" }, { "docid": "4ea1231e49f57d14baf7d65a4a376cc7", "score": "0.6692145", "text": "function makeMenu () {\n\t\t//The connection to the database\n\t\tglobal $db, $pdo;\n\t\t//The SQL statement that will get all the car manufucter's for the menu\n\t\t$sql = (\"SELECT `car_model` FROM `car_model`;\");\n\t\t//Run the SQL\n\t\t$result = $pdo->query($sql);\n\t\t//Make the menu\n\t\techo '<ul class=\"dropdown-menu\">';\n\t\tforeach ($result as $car_manufucturer) {\n\t\t\t$car = new Car();\n\t\t\t$car->setMake($car_manufucturer['car_model']);\n\t\t\t//Make a menu item\n\t\t\techo '<li><a href=\"http://localhost/lota/'.str_replace(\"\\\\s\", \"-\", strtolower($car->getMake()).'\">'.$car->getMake()).'</a></li><li role=\"separator\" class=\"divider\"></li>';\n\t\t}\n\t\techo '</ul>';\n\t}", "title": "" }, { "docid": "14c8dd3119f7564490d8623f3c42d674", "score": "0.6689402", "text": "public function menuAction() {\r\n\r\n return array(\r\n );\r\n }", "title": "" }, { "docid": "877eaafda73ff6860a9c16cce95476b6", "score": "0.6682892", "text": "function menuConfig() {\n\t\tparent::menuConfig();\n\t}", "title": "" }, { "docid": "0fdfbeab05b52ed044afa0d2500bb949", "score": "0.66624767", "text": "public function afficheMenu()\n\t\t{\n\t\t//appel de la vue du menu\n\t\trequire 'Vues/menu.php';\n\t\t}", "title": "" }, { "docid": "7d0b1ad777db2cafbd39388ba5347410", "score": "0.6661574", "text": "public function setUpMenuItems()\n {\n $Menu = new DModuleMenu();\n $Menu->setIcon( '<i class=\"fa fa-file-excel-o\"></i> ' );\n $MenuItem = new DModuleMenuItem( \"showupload\" , \"Subir\" );\n $MenuItem -> setIcon( '<i class=\"fa fa-upload\"></i> ');\n $Menu -> addItemObject( $MenuItem );\n $this -> setMenu( $Menu );\n }", "title": "" }, { "docid": "51aa2473e2ddfa187224f578bc89d70b", "score": "0.6655278", "text": "protected function updateMenuItems(){\n\n\t\tswitch( $this->action->id){\n\t\t\tcase 'upload':\n\t\t\t\t{\n\t\t\t\t\t$this->menu[] = array('label'=>JBackupTranslator::t('backup', 'List Backup'), 'url'=>array('index'));\n\t\t\t\t\t$this->menu[] = array('label'=>JBackupTranslator::t('backup', 'Create Backup'), 'url'=>array('create'));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t{\n\t\t\t\t\t$this->menu[] = array('label'=>JBackupTranslator::t('backup', 'List Backup'), 'url'=>array('index'));\n\t\t\t\t\t$this->menu[] = array('label'=>JBackupTranslator::t('backup', 'Create Backup'), 'url'=>array('create'));\n\t\t\t\t\t$this->menu[] = array('label'=>JBackupTranslator::t('backup', 'Upload Backup'), 'url'=>array('upload'));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "1a58aa5ed51352d4a0863258cc89bc22", "score": "0.66546166", "text": "function rs_birth_astrology_plugins_menu() {\n\n }", "title": "" }, { "docid": "321fc3595d2e58bfad2cf60ff0039b96", "score": "0.66523296", "text": "function vertical_menu()\n{\n\treturn Vertical_Menu::vm_init();\n}", "title": "" }, { "docid": "94f85fb113ebb01407ef8f13425392c9", "score": "0.6647544", "text": "function addTest($x){\n//$x='admin_bar_menu'\n $x->add_menu( array(\n 'id' => 'my-menu',\n 'title' => 'hello, kin29!'\n ) );\n}", "title": "" }, { "docid": "a62a570cc78f70dbe25ad360d04c510c", "score": "0.6641651", "text": "public function menuAction()\n {\n \t// Disable layout..\t\n\t\t$this->_helper->layout->disableLayout();\n\t\t// Disable View\n\t\t$this->_helper->viewRenderer->setNoRender();\n\n\t\t// Ugly menu, please fix it... \n\t\t$menu = array(\n\t\t\tarray(\n\t\t\t\t\"text\" => \"My Menu 1\",\n\t\t\t\t\"link\" => \"/index/menu1\",\n\t\t\t\t\"children\" => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\"text\" => \"My Sub Menu 1\",\n\t\t\t\t\t\t\"link\" => \"/index/submenu1\",\n\t\t\t\t\t\t\"leaf\" => true // Ilangin ini kalo ada sub menu dibawah nya, gunain children\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t\"text\" => \"My Menu 2\",\n\t\t\t\t\"link\" => \"/index/menu2\",\n\t\t\t\t\"leaf\" => true // Ilangin ini kalo ada sub menu dibawah nya, gunain children\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t\"text\" => \"My Menu 3\",\n\t\t\t\t\"link\" => \"/index/menu3\",\n\t\t\t\t\"leaf\" => true // Ilangin ini kalo ada sub menu dibawah nya, gunain children\n\t\t\t)\n\t\t);\n\n\n $this->getResponse()->setHeader('Content-Type', 'text/javascript');\n $this->getResponse()->setBody(Zend_Json::encode($menu));\n }", "title": "" }, { "docid": "fe7c9bdbd3dfcf19a5de48062e6a708c", "score": "0.664017", "text": "static function setMenu($widget, $hMenu) \n {\n \n }", "title": "" }, { "docid": "4df0bf03d1d76f141c49a024de1b1cd0", "score": "0.66339546", "text": "function create_admin_menu() {\n\n\t\t// Add object page\n\t\t$page = add_menu_page('Karmic Load', 'Karmic Load', 'read', 'list-karmic-load', array($this, 'list_karmic_load'), plugins_url('images/karma16.png', __FILE__));\n\n\t\t// Add tools page\n\t\tadd_management_page('Export Carnie Karma', 'Export Carnie Karma', 'read_private_posts', 'export-carnie-karma-tools', array($this, 'export_karma_page'));\n\t}", "title": "" }, { "docid": "7cb0f8b6d10dc34b49002d5df663abae", "score": "0.66303355", "text": "public function createMenu()\n\t{\n\t\t$name = $this->request->post['menu_name'];\n\t\t$code = $this->request->post['menu_code'];\n\n\t\t$template_wrapper_responsive = $this->db->escape($this->request->post['menu_wrapper_responsive']);\n\t\t$template_wrapper = $this->db->escape($this->request->post['menu_wrapper']);\n\n\t\t// Item views templates responsive\n\t\t$heading_template_responsive = $this->db->escape($this->request->post['heading_template_responsive']);\n\t\t$link_template_responsive = $this->db->escape($this->request->post['link_template_responsive']);\n\t\t$banner_template_responsive = $this->db->escape($this->request->post['banner_template_responsive']);\n\t\t\n\t\t// Item views templates\n\t\t$heading_template = $this->db->escape($this->request->post['heading_template']);\n\t\t$link_template = $this->db->escape($this->request->post['link_template']);\n\t\t$banner_template = $this->db->escape($this->request->post['banner_template']);\n\t\t\n\t\t\n\t\t$que = \"INSERT INTO `menu`\n\t\t\t\tSET \n\t\t\t\t\t`name` = '\" . $name . \"',\n\t\t\t\t\t`code` = '\" . $code . \"',\n\n\t\t\t\t\t`template_wrapper` = '\" . $template_wrapper . \"',\n\t\t\t\t\t`template_wrapper_responsive` = '\" . $template_wrapper_responsive . \"',\n\n\t\t\t\t\t`heading_template_responsive` = '\" . $heading_template_responsive . \"' ,\n\t\t\t\t\t`link_template_responsive` = '\" . $link_template_responsive . \"' ,\n\t\t\t\t\t`banner_template_responsive` = '\" . $banner_template_responsive . \"' ,\n\n\t\t\t\t\t`heading_template` = '\" . $heading_template . \"' ,\n\t\t\t\t\t`link_template` = '\" . $link_template . \"' ,\n\t\t\t\t\t`banner_template` = '\" . $banner_template . \"'\";\n\t\t\n\t\t$this->db->query($que);\n\t}", "title": "" }, { "docid": "17c6bd2855ac9e12bd90984e03004455", "score": "0.66264683", "text": "function create_menu()\r\n\t\t{\r\n\t\t add_options_page('301 Redirects', '301 Redirects', 10, '301options', array($this,'options_page'));\r\n\t\t}", "title": "" }, { "docid": "8e0c7f53819d5afcfad8cd712ffafab0", "score": "0.6626147", "text": "public function afficheMenu(){\n\t\t//appel de la vue du menu\n\t\trequire 'vues/menu.php';\n\t\t}", "title": "" }, { "docid": "fc686ea299e68c4ce3ff9ead9ec11699", "score": "0.6611136", "text": "function get_menu_name()\n\t{\n\t\t$GLOBALS['HELPER_PANEL_PIC']='pagepics/menus';\n\t\t$GLOBALS['HELPER_PANEL_TUTORIAL']='tut_menus';\n\n\t\t$title=get_page_title('MENU_MANAGEMENT');\n\n\t\trequire_code('form_templates');\n\t\t$rows=$GLOBALS['SITE_DB']->query_select('menu_items',array('DISTINCT i_menu'),NULL,'ORDER BY i_menu');\n\t\t$list=form_input_list_entry('',false,do_lang_tempcode('NA_EM'));\n\t\tforeach ($rows as $row)\n\t\t{\n\t\t\t$list->attach(form_input_list_entry($row['i_menu']));\n\t\t}\n\t\t$fields=new ocp_tempcode();\n\t\t$fields->attach(form_input_list(do_lang_tempcode('EXISTING'),do_lang_tempcode('EXISTING_MENU'),'id',$list,NULL,true,false));\n\t\t$fields->attach(form_input_codename(do_lang_tempcode('ALT_FIELD',do_lang_tempcode('NEW')),do_lang_tempcode('NEW_MENU'),'id_new','',false));\n\t\t$map=array('page'=>'_SELF','type'=>'edit','wide'=>1);\n\t\tif (get_param('redirect','!')!='!') $map['redirect']=get_param('redirect');\n\t\t$post_url=build_url($map,'_SELF',NULL,false,true);\n\t\t$submit_name=do_lang_tempcode('CHOOSE');\n\n\t\t$javascript='standardAlternateFields(\\'id\\',\\'id_new\\');';\n\n\t\treturn do_template('FORM_SCREEN',array('_GUID'=>'f3c04ea3fb5e429210c5e33e5a2f2092','GET'=>true,'SKIP_VALIDATION'=>true,'TITLE'=>$title,'HIDDEN'=>'','TEXT'=>do_lang_tempcode('CHOOSE_EDIT_LIST'),'FIELDS'=>$fields,'URL'=>$post_url,'SUBMIT_NAME'=>$submit_name,'JAVASCRIPT'=>$javascript));\n\t}", "title": "" }, { "docid": "3a68d47254764b903fb45510aa444c4f", "score": "0.6609748", "text": "public function create()\n {\n //\n return view('admin.menu.create');\n }", "title": "" }, { "docid": "2aa8302b7d3b5d7474e0d0dbc67b1433", "score": "0.66091865", "text": "function custom_new_menu() {\n\tregister_nav_menus(\n\t\tarray(\n\t\t'primary-menu' => __( 'Primary Menu' ),\n\t\t'mobile-nav' => __( 'Mobile Navigation Menu' ),\n\t\t'footer-left' => __( 'Left Footer' ),\n\t\t'footer-centre' => __( 'Centre Footer' ),\n\t\t'footer-right' => __( 'Right Footer' )\n\t\t)\n\t);\n}", "title": "" }, { "docid": "e745879c5d316ad8702fe44c1826254c", "score": "0.6605546", "text": "public function run(){\n \n Menu::create([\n 'title'=>'Обменные пункты',\n 'url'=>'changeoffice',\n 'published'=>1,\n 'weight'=>1,\n 'position'=>'topmenu',\n 'parent'=>0,\n\n ]);\n\n Menu::create([\n 'title'=>'Новости KASE',\n 'url'=>'news',\n 'published'=>1,\n 'weight'=>1,\n\n ]);\n\n }", "title": "" }, { "docid": "ca227f382721561908dec08c10290f43", "score": "0.6605003", "text": "function edit_menu()\n\t{\n\t\tif (!has_js()) warn_exit(do_lang_tempcode('MSG_JS_NEEDED'));\n\n\t\t$id=get_param('id','');\n\t\tif ($id=='') $id=get_param('id_new');\n\t\tif (substr($id,0,1)=='_') warn_exit(do_lang_tempcode('MENU_UNDERSCORE_RESERVED'));\n\n\t\trequire_code('type_validation');\n\t\tif (!is_alphanumeric($id,true)) warn_exit(do_lang_tempcode('BAD_CODENAME'));\n\n\t\tif (($id=='zone_menu') && (get_option('use_custom_zone_menu')=='0'))\n\t\t{\n\t\t\t$config_url=build_url(array('page'=>'admin_config','type'=>'category','id'=>'THEME'),get_module_zone('admin_config'));\n\t\t\tattach_message(do_lang_tempcode('EDITING_UNUSED_MENU',escape_html($config_url->evaluate())),'notice');\n\t\t}\n\n\t\t$title=get_page_title('_EDIT_MENU',true,array(escape_html($id)));\n\n\t\t$clickable_sections=(get_param_integer('clickable_sections',0)==1); // This is set to '1 if we have a menu type where pop out sections may be clicked on to be loaded. If we do then we make no UI distinction between page nodes and contracted/expanded, so people don't get compelled to choose a URL for everything, it simply becomes an option for them.\n\n\t\t// This will be a templates for branches created dynamically\n\t\t$t_id='replace_me_with_random';\n\t\t$branch=do_template('MENU_EDITOR_BRANCH',array('_GUID'=>'59d5c9bebecdac1440112ef8301d7c67','CLICKABLE_SECTIONS'=>$clickable_sections?'true':'false','I'=>$t_id,'CHILD_BRANCH_TEMPLATE'=>'','CHILD_BRANCHES'=>''));\n\t\t$child_branch_template=do_template('MENU_EDITOR_BRANCH_WRAP',array('_GUID'=>'fb16265f553127b47dfdaf33a420136b','DISPLAY'=>$clickable_sections?'display: block':'display: none','CLICKABLE_SECTIONS'=>$clickable_sections,'ORDER'=>'replace_me_with_order','PARENT'=>'replace_me_with_parent','BRANCH_TYPE'=>'0','NEW_WINDOW'=>'0','CHECK_PERMS'=>'0','CAPTION_LONG'=>'','CAPTION'=>'','URL'=>'','PAGE_ONLY'=>'','THEME_IMG_CODE'=>'','I'=>$t_id,'BRANCH'=>$branch));\n\n\t\t$order=0;\n\t\t$menu_items=$GLOBALS['SITE_DB']->query_select('menu_items',array('*'),array('i_menu'=>$id),'ORDER BY i_parent,i_order');\n\t\t$child_branches=$this->menu_branch($id,NULL,$order,$clickable_sections,$menu_items);\n\n\t\t$root_branch=do_template('MENU_EDITOR_BRANCH',array('CLICKABLE_SECTIONS'=>$clickable_sections?'true':'false','CHILD_BRANCH_TEMPLATE'=>$child_branch_template,'CHILD_BRANCHES'=>$child_branches,'I'=>''));\n\n\t\t$map=array('page'=>'_SELF','type'=>'_edit','id'=>$id);\n\t\tif (get_param('redirect','!')!='!') $map['redirect']=get_param('redirect');\n\t\t$post_url=build_url($map,'_SELF');\n\n\t\t$map=array('page'=>'_SELF','type'=>'_edit','id'=>$id); // Actually same as edit URL, just we put this into an empty post form\n\t\tif (get_param('redirect','!')!='!') $map['redirect']=get_param('redirect');\n\t\t$delete_url=build_url($map,'_SELF');\n\n\t\trequire_code('form_templates');\n\t\t$fields_template=new ocp_tempcode();\n\t\t//$fields_template->attach(form_input_line(do_lang_tempcode('CAPTION'),do_lang_tempcode('MENU_ENTRY_CAPTION'),'caption','',true)); This is editable in the tree structure instead\n\t\t$fields_template->attach(form_input_line(do_lang_tempcode('LINK'),do_lang_tempcode('MENU_ENTRY_URL'),'url','',false));\n\t\t$options=array(\n\t\t\tarray(do_lang_tempcode('MENU_ENTRY_NEW_WINDOW'),'new_window',false,new ocp_tempcode()),\n\t\t\tarray(do_lang_tempcode('MENU_ENTRY_CHECK_PERMS'),'check_perms',true,do_lang_tempcode('DESCRIPTION_MENU_ENTRY_CHECK_PERMS')),\n\t\t);\n\t\t$fields_template->attach(form_input_various_ticks($options,'',NULL,do_lang_tempcode('OPTIONS'),false));\n\t\t$list=new ocp_tempcode();\n\t\tif (!$clickable_sections)\n\t\t{\n\t\t\t$list->attach(form_input_list_entry('page',false,do_lang_tempcode('PAGE')));\n\t\t}\n\t\t$list->attach(form_input_list_entry('branch_minus',false,do_lang_tempcode('CONTRACTED_BRANCH')));\n\t\t$list->attach(form_input_list_entry('branch_plus',false,do_lang_tempcode('EXPANDED_BRANCH')));\n\t\t$fields_template->attach(form_input_list(do_lang_tempcode('BRANCH_TYPE'),do_lang_tempcode('MENU_ENTRY_BRANCH'),'branch_type',$list));\n\n\t\t$fields_template->attach(do_template('FORM_SCREEN_FIELD_SPACER',array('SECTION_HIDDEN'=>true,'TITLE'=>do_lang_tempcode('ADVANCED'))));\n\t\t$fields_template->attach(form_input_line(do_lang_tempcode('CAPTION_LONG'),do_lang_tempcode('MENU_ENTRY_CAPTION_LONG'),'caption_long','',false));\n\t\t$list=new ocp_tempcode();\n\t\t$list->attach(form_input_list_entry('',false,do_lang_tempcode('NONE_EM')));\n\t\trequire_code('themes2');\n\t\t$list->attach(nice_get_theme_images(NULL,NULL,false,true,'menu_items/'));\n\t\t$fields_template->attach(form_input_list(do_lang_tempcode('THEME_IMAGE'),do_lang_tempcode('DESCRIPTION_THEME_IMAGE_FOR_MENU_ITEM'),'theme_img_code',$list,NULL,false,false));\n\t\t$fields_template->attach(form_input_line(do_lang_tempcode('RESTRICT_PAGE_VISIBILITY'),do_lang_tempcode('MENU_ENTRY_MATCH_KEYS'),'match_tags','',false));\n\n\t\trequire_javascript('javascript_ajax');\n\t\trequire_javascript('javascript_more');\n\t\trequire_javascript('javascript_tree_list');\n\n\t\tlist($warning_details,$ping_url)=handle_conflict_resolution();\n\n\t\tbreadcrumb_set_parents(array(array('_SELF:_SELF:misc',do_lang_tempcode('MENU_MANAGEMENT'))));\n\n\t\t$all_menus=array();\n\t\t$menu_rows=$GLOBALS['SITE_DB']->query_select('menu_items',array('DISTINCT i_menu'),NULL,'ORDER BY i_menu');\n\t\tforeach ($menu_rows as $menu_row)\n\t\t{\n\t\t\tif ($menu_row['i_menu']!=$id)\n\t\t\t\t$all_menus[]=$menu_row['i_menu'];\n\t\t}\n\n\t\treturn do_template('MENU_EDITOR_SCREEN',array('_GUID'=>'d2bc26eaea38f3d5b3221be903ff541e','ALL_MENUS'=>$all_menus,'MENU_NAME'=>$id,'DELETE_URL'=>$delete_url,'PING_URL'=>$ping_url,'WARNING_DETAILS'=>$warning_details,'FIELDS_TEMPLATE'=>$fields_template,'HIGHEST_ORDER'=>strval($order),'URL'=>$post_url,'CHILD_BRANCH_TEMPLATE'=>$child_branch_template,'ROOT_BRANCH'=>$root_branch,'TITLE'=>$title));\n\t}", "title": "" }, { "docid": "a1d2e66d7bea66c5344d320ce1446ac2", "score": "0.66033465", "text": "function Menu()\n\t\t{\n\t\t\tparent::CI_Model(); \n\t\t}", "title": "" }, { "docid": "d2bcda2ae4bf219ba44b30e6a11e9da5", "score": "0.66027427", "text": "public function newAction()\n {\n $entity = new Menu();\n $form = $this->createForm(new MenuType(), $entity,array(\"rutas_totales\"=>$this->calculo_de_rutas(1)) );\n return $this->render('ConfigurationGralBundle:Menu:new.html.twig',array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "b18ecda725fe37007812019282b0f260", "score": "0.65980566", "text": "function f_deal_menu_page(){\n\t\t \t\n\t\t }", "title": "" }, { "docid": "8aed1e8ff28ea2e66f353e7b272fcef0", "score": "0.6594604", "text": "public function admin_menu(){\n\t\t\t$menu_title = $this->get_menu_title();\n\t\t\t$menu_type = $this->get_menu_type();\n\t\t\t$option_name = $this->get_option_name();\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//TODO: Remove need for switch\n\t\t\tswitch ($menu_type) {\n\t\t\t case 'dashboard':\n\t\t\t $this->_options_page = add_dashboard_page($menu_title, $menu_title, 'administrator', $option_name, array(&$this, 'load_options_page'));\n\t\t\t break;\n\t\t\t\tcase 'posts':\n\t\t\t $this->_options_page = add_posts_page($menu_title, $menu_title, 'administrator', $option_name, array(&$this, 'load_options_page'));\n\t\t\t break;\n\t\t\t\tcase 'media':\n\t\t\t $this->_options_page = add_media_page($menu_title, $menu_title, 'administrator', $option_name, array(&$this, 'load_options_page'));\n\t\t\t break;\n\t\t\t\tcase 'links':\n\t\t\t $this->_options_page = add_links_page($menu_title, $menu_title, 'administrator', $option_name, array(&$this, 'load_options_page'));\n\t\t\t break;\n\t\t\t\tcase 'pages':\n\t\t\t $this->_options_page = add_pages_page($menu_title, $menu_title, 'administrator', $option_name, array(&$this, 'load_options_page'));\n\t\t\t break;\n\t\t\t\tcase 'comments':\n\t\t\t $this->_options_page = add_comments_page($menu_title, $menu_title, 'administrator', $option_name, array(&$this, 'load_options_page'));\n\t\t\t break;\n\t\t\t\tcase 'users':\n\t\t\t $this->_options_page = add_users_page($menu_title, $menu_title, 'administrator', $option_name, array(&$this, 'load_options_page'));\n\t\t\t break;\n\t\t\t\tcase 'tools':\n\t\t\t $this->_options_page = add_management_page($menu_title, $menu_title, 'administrator', $option_name, array(&$this, 'load_options_page'));\n\t\t\t break;\n\t\t\t case 'plugins':\n\t\t\t $this->_options_page = add_plugins_page($menu_title, $menu_title, 'administrator', $option_name, array(&$this, 'load_options_page'));\n\t\t\t break;\n\t\t\t case 'settings':\n\t\t\t $this->_options_page = add_options_page($menu_title, $menu_title, 'administrator', $option_name, array(&$this, 'load_options_page'));\n\t\t\t break;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->_options_page = add_theme_page($menu_title, $menu_title, 'administrator', $option_name, array(&$this, 'load_options_page'));\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\t\t\n\t\t\t\n\t\t\tadd_action(\"load-$this->_options_page\", array(&$this, 'admin_load'));\n\t\t\t//add_action(\"admin_enqueue_scripts\", array(&$this, 'admin_load'));\n\t\t\tadd_action(\"load-$this->_options_page\", array(&$this, 'handle_post_data'), 49);\n\t\t\tadd_action('admin_print_scripts-media-upload-popup', array(&$this, 'media_upload_change_script') );\n\n\t\t}", "title": "" }, { "docid": "3c195a4b170dcadc12383723f8ed8471", "score": "0.65896356", "text": "public function menusAdd()\n\t{\n\t\t$title = 'Menu [Add]';\n\t\t$parent = 'Menu';\n\t\t//Get List menus\n\t\t$menu = $this->printLstMenuVi(Menu::getMenuVi(),0, '-');\n\t\treturn view('admin.menus.add')->with([\n\t\t\t\t'msg' => $this->msg,\n\t\t\t\t'title' => $title,\n\t\t\t\t'parent' => $parent,\n\t\t\t\t'menu' => $menu\n\t\t]);\n\t}", "title": "" }, { "docid": "97251fe9af8e70030ffb72d1f8a3b473", "score": "0.65880954", "text": "function buildSupervisorHomeMenu(){\r\n return buildMenu('Supervisor Portal', '0', SUPERMENU);\r\n}", "title": "" }, { "docid": "fe3358c15e79bf9493b613be7c937145", "score": "0.6586652", "text": "public function admin_menu() {\n // anything for Settings class\n $this->_settings->admin_menu();\n }", "title": "" }, { "docid": "82e46bf3c86d32f08d2e6d5916f8e862", "score": "0.65846646", "text": "function buildSupervisorEditPositionMenu(){\r\n return buildMenu('Supervisor Portal', '2', SUPERMENU);\r\n}", "title": "" }, { "docid": "d852c6bb7f4d61dd37dc19c7672ac961", "score": "0.6576879", "text": "public static function menu() {\r\n\r\n\t\t\t// Check the user capability.\r\n\t\t\tif ( ! current_user_can( 'manage_options' ) ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t$_REQUEST['uael_admin_nonce'] = wp_create_nonce( 'uael_admin_nonce' );\r\n\r\n\t\t\tadd_submenu_page(\r\n\t\t\t\t'options-general.php',\r\n\t\t\t\tUAEL_PLUGIN_SHORT_NAME,\r\n\t\t\t\tUAEL_PLUGIN_SHORT_NAME,\r\n\t\t\t\t'manage_options',\r\n\t\t\t\tUAEL_SLUG,\r\n\t\t\t\t__CLASS__ . '::render'\r\n\t\t\t);\r\n\t\t}", "title": "" }, { "docid": "0c6363d463bc9817f31c92804dde2b2b", "score": "0.6573909", "text": "public function menu() {\n// $res = Helper::menuTree($menu, true);\n// $return = self::multiArrayToOne($res);\n//\n// $this->setResponse($return);\n return $this->response();\n }", "title": "" } ]
9d4766da33015c1456250fb26a34103c
Strip additional / or \ in a path name
[ { "docid": "2fa8efe9e9cbbc44bef944c9d8da7110", "score": "0.6424731", "text": "protected function cleanPath($path, $ds = DIRECTORY_SEPARATOR)\n\t{\n\t\t$path = trim($path);\n\n\t\t// Remove double slashes and backslahses and convert\n\t\t// all slashes and backslashes to DIRECTORY_SEPARATOR\n\t\treturn preg_replace('#[/\\\\\\\\]+#', $ds, $path);\n\t}", "title": "" } ]
[ { "docid": "404e132d9b7e232fe4e1fdcac9ce294b", "score": "0.77836233", "text": "function _unslashify($path)\n {\n if ($path[strlen($path)-1] == '/') {\n $path = substr($path, 0, strlen($path) -1);\n }\n return $path;\n }", "title": "" }, { "docid": "c0d65ff658b46b5033055ca7eef9bee8", "score": "0.7671454", "text": "private static function cleanPath($path) {\n\t\t$path = rtrim($path, \"/\");\n\t\treturn preg_replace('{(/)\\1+}', \"/\", $path);\n\t}", "title": "" }, { "docid": "38270894235f279f40d63e8779fb2ca6", "score": "0.76289713", "text": "function cleanPath($path) {\n return preg_replace('/\\.?\\.\\//', '', $path);\n }", "title": "" }, { "docid": "9abb5ce585ecda62c8d74799746f9848", "score": "0.7601523", "text": "function FixPathName($path)\n{\n\t$path = str_replace(array('//', '\\\\'), '/', $path);\n\t$path = preg_replace('/\\/+/', '/', $path);\n\t$path = rtrim($path, \"/\") . \"/\";\n\treturn $path;\n}", "title": "" }, { "docid": "0130857f52369c2876650ad926144583", "score": "0.74060225", "text": "static function pathize($path) {\n return rtrim(str_replace('\\\\', '/', $path), '/').'/';\n }", "title": "" }, { "docid": "f4d86c3b926f53dadd7bc9f9eb95d0fb", "score": "0.7301386", "text": "function sanitizePath($path) {\n $path = trim($path, '/');\n $path = str_replace('../', '', $path);\n $path = str_replace('\\\\', '/', $path);\n $path = trim($path, '.');\n $path = str_replace('//', '/', $path);\n $path = trim($path, '/');\n return $path;\n }", "title": "" }, { "docid": "f1b46ad6d6611afbad2623daeaf8bb4e", "score": "0.72695583", "text": "public function sanitizePath($path) {\n\t\tif (substr($path, 0, 1) !== '/' && substr($path, 1, 2) !== ':/') {\n\t\t\t$path = '/' . $path;\n\t\t}\n\t\tif (substr($path, (strlen($path) - 1)) !== '/' && !strstr($path, '.')) {\n\t\t\t$path = $path . '/';\n\t\t}\n\t\twhile(strstr($path, '//')) {\n\t\t\t$path = str_replace('//', '/', $path);\n\t\t}\n\t\treturn $path;\n\t}", "title": "" }, { "docid": "a1561281277193b6fd7ad2cf524c81b1", "score": "0.7264612", "text": "private function sanitizePath($path)\n {\n if (0 === strpos('/', $path)) {\n return substr($path, 1);\n }\n\n return $path;\n }", "title": "" }, { "docid": "15ec1ba828466d86270345da965754b6", "score": "0.72565186", "text": "private static function cleanPath($path)\n {\n return '/'.trim($path, \" \\t\\n\\r\\0\\x0B\\/\").'/';\n }", "title": "" }, { "docid": "2bf532e46d0da0e6e16352b75adca576", "score": "0.72194225", "text": "private function pathSanitise(string $path): string\n {\n if ($path === '/') {\n return $path;\n }\n\n // found slash at end\n if (strpos($path, '/', strlen($path) - 1)) {\n return substr($path, 0, -1);\n }\n\n return $path;\n }", "title": "" }, { "docid": "9d5d7ab6fc2d34021781102d9d1c3952", "score": "0.71801436", "text": "static public function normalize_path( $path ) {\n\t\t$path = preg_replace( '~[/\\\\\\]+~', '/', $path );\n\t\t$path = rtrim( $path, '/' );\n\n\t\treturn $path;\n\t}", "title": "" }, { "docid": "f21e0474b179eae6413eb2b4531cba93", "score": "0.71601886", "text": "public static function cleanFilePath($path) {\n $path = str_replace('', '', str_replace(array('\\\\', '\\\\\\\\', '//'), '/', $path));\n if ($path[strlen($path) - 1] === '/') {\n $path = rtrim($path, '/');\n }\n\n return $path;\n }", "title": "" }, { "docid": "1450ee67bfda3cd981a5bd4594c257bc", "score": "0.71433777", "text": "function cleanDirName($name)\n{\n return str_replace(array(\"\\\\\", \"/\", \".\"), \"\", $name);\n}", "title": "" }, { "docid": "f666bfeecf6fa09e5e08712cd8f4f647", "score": "0.71125793", "text": "function clean_path($dirty_path)\n{\n $cleaner_path = preg_replace('/\\.[\\.]+/', '', $dirty_path);\n return preg_replace('/\\/\\./', '', $cleaner_path);\n}", "title": "" }, { "docid": "40d6622ffdb18efc796801815f0ca778", "score": "0.7105789", "text": "function clean_path( $path )\n{\n // clean directory/file path with a functional equivalent\n $appendpath = '';\n if ( is_windows() && strlen($path) >= 2 && $path[0].$path[1] == \"\\\\\\\\\" ) {\n $path = substr($path,2);\n $appendpath = \"\\\\\\\\\";\n }\n $path = str_replace( \"\\\\\", \"/\", $path );\n $path = str_replace( \"//\", \"/\", $path );\n $path = str_replace( \"/./\", \"/\", $path );\n return( $appendpath.$path );\n}", "title": "" }, { "docid": "9b8f957ab642fd8b27d936e12d46d034", "score": "0.70916194", "text": "public static function cleanFilePath( $path ) {\n\t\t\t$path = str_replace( '', '', str_replace( array( '\\\\', '\\\\\\\\', '//' ), '/', $path ) );\n\t\t\tif ( $path[ strlen( $path ) - 1 ] === '/' ) {\n\t\t\t\t$path = rtrim( $path, '/' );\n\t\t\t}\n\n\t\t\treturn $path;\n\t\t}", "title": "" }, { "docid": "09b6aee1acdade9c422570b610a99b10", "score": "0.708973", "text": "function fixSlashes($path) {\r\n $isUncPath = substr($path, 0, 2) == '\\\\\\\\';\r\n $path = preg_replace('/[\\\\\\\\\\/]+/', '/', $path); // replace and collapse slashes\r\n if ($isUncPath) { $path = substr_replace($path, '\\\\\\\\', 0, 1); } // replace UNC prefix\r\n\r\n return $path;\r\n}", "title": "" }, { "docid": "9b511722e493db60e789e5d6e9e72c0f", "score": "0.70856786", "text": "function fixPath($path)\n {\n if (substr($path, -1, 1) != '/' && substr($path, -1, 1) != '\\\\') {\n\t\t\treturn $path.'/';\n\t\t} else {\n\t\t\treturn $path;\n\t\t}\n\t}", "title": "" }, { "docid": "9d266ebb8d46772a3c37aae3d88a2cbc", "score": "0.70285535", "text": "private function format_path($path)\n\t{\n $path = preg_replace('#\\/{2,}#', '/', $path);\n //$path = preg_replace('#\\\\{2,}#', '\\\\', $path);\n return $path;\n\t}", "title": "" }, { "docid": "c5d63d9d169a143f3bc5d2780c70d9d0", "score": "0.70181173", "text": "protected function _normalizePath($path)\n {\n return rtrim(trim($path), '/\\\\') . '/';\n }", "title": "" }, { "docid": "81195564ec0fe899ec4d30fa6b30244a", "score": "0.6989785", "text": "public static function FixPath(string $path) {\n return mb_ereg_replace('[\\\\\\/]+', '/', $path);\n }", "title": "" }, { "docid": "0ceb9b0122017caeb2e955cb0f1037ab", "score": "0.6979998", "text": "function wovn_reduce_slashes($path)\n{\n # Reduces a sequence of slashes to a single slash\n # e.g. '///./////.///' -> '/././'\n $i = 0;\n while ($i + 1 < strlen($path)) {\n if ($path[$i] == '/' && $path[$i + 1] == '/') {\n $path = substr($path, 0, $i) . substr($path, $i + 1, strlen($path));\n } else {\n $i++;\n }\n }\n return $path;\n}", "title": "" }, { "docid": "f710a9004ebcf978fee5e913fb45b97e", "score": "0.6978826", "text": "private function sanitizePath($path)\n {\n return str_replace(['#', '?', '\\\\'], '-', $path);\n }", "title": "" }, { "docid": "4c18812885edf6bd5b94383a0eab2084", "score": "0.69755685", "text": "public function _process_path($path) {\n if (empty($path) || !isset($path)) :\n return '';\n endif;\n\n $path = ltrim($path, '/');\n $path = str_replace('.cfm', '', $path);\n //$path = str_replace('/index', '', $path);\n\n return $path;\n }", "title": "" }, { "docid": "add7515ac8835d080cd82b1eea070473", "score": "0.6974495", "text": "public function normalizePath($path) {\n\t\treturn str_replace('\\\\', '/', $path);\n\t}", "title": "" }, { "docid": "de383256804ae29b62851be64eb05633", "score": "0.6963889", "text": "function fix_path_slash($p)\n{\n $p = str_replace('\\\\','/',trim($p));\n return (substr($p,-1)!='/') ? $p.='/' : $p;\n}", "title": "" }, { "docid": "44349f776671bb439895d1c2c0ed2594", "score": "0.6943368", "text": "public static function fixPath($path)\n {\n return str_replace('\\\\', '/', $path);\n }", "title": "" }, { "docid": "81ebdd22761b4bd0272473fd328ad8a4", "score": "0.69392616", "text": "function _slashify($path)\n {\n if ($path[strlen($path)-1] != '/') {\n $path = $path.\"/\";\n }\n return $path;\n }", "title": "" }, { "docid": "2872c2299270de50147ac48b0dc81ecc", "score": "0.69359165", "text": "private function filterPath(string $path): string\n {\n if (!$path || $path === '/') {\n return $path;\n }\n\n if (preg_match('#^[\\w/-]+$#', $path) === 1) {\n return $path;\n }\n\n return preg_replace_callback(\n '/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\\/]++|%(?![A-Fa-f0-9]{2}))/',\n [$this, 'rawurlencodeMatchZero'],\n $path\n );\n }", "title": "" }, { "docid": "ae8c2a2dc236c9ce1ccf6d22578e51e1", "score": "0.69009715", "text": "private static function normalizePath(&$path)\n {\n if (!Str::startsWith($path, '/')) {\n $path = '/' . $path;\n }\n if (!Str::endsWith($path, '/')) {\n $path = $path . '/';\n }\n\n return $path;\n }", "title": "" }, { "docid": "85d39e1ea12d6d04fceea4548b4b1bdb", "score": "0.6852838", "text": "public static function clean_path(?string $path = null)\n {\n $path = str_replace(\n '\\\\', \n '/', trim((string) $path)\n );\n\n return rtrim($path, '/') . '/';\n }", "title": "" }, { "docid": "868a1085a72c992d4a976d5154fca5d0", "score": "0.6831329", "text": "function removeForwardSlash($img)\n {\n //and remove the 2nd forward slash\n $folder = substr($img, 0, 10);//= casenotes/\n $filename = substr($img, 11);//timestamp\n\n //concat the two\n $imgForwardSlashRemoved = $folder.$filename;\n\n return $imgForwardSlashRemoved;\n }", "title": "" }, { "docid": "fee39cee7eb376726d799f98f7259bc1", "score": "0.6825007", "text": "function yourls_sanitize_filename($file) {\n\t$file = str_replace( '\\\\', '/', $file ); // sanitize for Win32 installs\n\t$file = preg_replace( '|/+|' ,'/', $file ); // remove any duplicate slash\n\treturn $file;\n}", "title": "" }, { "docid": "f698b3b2fe4d89a5e48ee32a72400f33", "score": "0.68240726", "text": "public static function stripSlash(string $path): string {\n\t\treturn rtrim($path, '/');\n\t}", "title": "" }, { "docid": "c2552a40268832862c664feb5e8e9f01", "score": "0.68152106", "text": "public static function normalize_path($path) {\n\t\t// $path = preg_replace('/^\\/*(.*?)\\/*$/', '/\\1', $path);\n\t\t$regexp = array('/^[\\/]?(.)/', '/\\/\\//', '/(.)[\\/]$/', '/[^\\/]+[\\/]\\.\\.[\\/]/');\n\t\t$replace = array('\\1', '/', '\\1', '');\n\t\t$path = preg_replace($regexp, $replace, $path);\n\t\treturn $path;\n\t}", "title": "" }, { "docid": "3a624de0b27a063ad1c44c60234e4715", "score": "0.68100524", "text": "private function normalizePath(string $path) {\n $path = str_replace('\\\\', '/', $path);\n\n if (substr($path, -1) !== '/') {\n $path .= '/';\n }\n\n if (substr($path, 0, 1) !== '/') {\n $path = '/' . $path;\n }\n\n $path = explode('?', $path)[0];\n\n return $path;\n }", "title": "" }, { "docid": "46ad5249e826301778a1a0c21489a838", "score": "0.6796594", "text": "protected function parsePath(string $path): string {\n return str_replace(['\\\\', '/', '.'], ['\\\\<wbr>', '/<wbr>', '.<wbr>'], $path);\n }", "title": "" }, { "docid": "5475a255ada54a949917be9255de00aa", "score": "0.6793235", "text": "function safeFilename($name){\n\t\t$name = str_replace( '/', '', $name);\n\t\t$name = str_replace('\\\\', '', $name);\n\t\t$name = str_replace('..', '', $name);\n\t\treturn $name;\n\t}", "title": "" }, { "docid": "f66c4ef6dbc868c9eb0ebc2a6bce2c6e", "score": "0.6780883", "text": "protected function normalize(string $name): string\n {\n return ltrim($name, '\\\\');\n }", "title": "" }, { "docid": "0eaa6245e421e5dd97fccf9e3a700f56", "score": "0.67675483", "text": "public static function Clean($path)\n\t\t{\n\t\t\treturn preg_replace(\"@[//\\\\\\\\]+@\", DIRECTORY_SEPARATOR, $path);\n\t\t}", "title": "" }, { "docid": "c50d964e675c1c8c0186f011fc66b0dd", "score": "0.6741306", "text": "public static function normalize($path)\n\t{\n\t\tSecUtil::checkStringArgument($path, 'path', -1, false, false, false);\n\n\t\t// Replace backslashes with slashes\n\t\t$path = preg_replace('/\\\\+/', '/', $path);\n\n\t\t// Replace consecutive slashes with one slash\n\t\t$path = preg_replace('/\\/{2,}/', '/', $path);\n\n\t\treturn $path;\n\t}", "title": "" }, { "docid": "4a401aea835aa63f6fa17e1ae054a2d8", "score": "0.6740587", "text": "function filename_safe($name) {\r\n $except = array('\\\\', '/', ':', '*', '?', '\"', '<', '>', '|');\r\n return str_replace($except, '', $name);\r\n}", "title": "" }, { "docid": "54369bc2a40fcc6b0d7e61d0d3f5cd34", "score": "0.6724867", "text": "public function sanitazePath( $path )\r\n\t{\r\n\t\treturn str_replace( '..' . DS , '' , $path );\r\n\t}", "title": "" }, { "docid": "e0e9611d412311096e9fb6fb1bfd0ed5", "score": "0.66984195", "text": "function wovn_remove_dots_from_path($path)\n{\n # From https://tomnomnom.com/posts/realish-paths-without-realpath\n # See also http://php.net/manual/en/function.realpath.php#84012\n $path = wovn_reduce_slashes($path);\n\n $path_parts = explode('/', $path);\n $tmp_out = array();\n foreach ($path_parts as $part) {\n if ($part == '.') {\n continue;\n }\n if ($part == '..') {\n array_pop($tmp_out);\n continue;\n }\n $tmp_out[] = $part;\n }\n return implode('/', $tmp_out);\n}", "title": "" }, { "docid": "4bc810971e4a455374854aef6edcb6e7", "score": "0.66596484", "text": "public static function normalizePath($path)\n {\n $path = trim($path, '/');\n $path = '/' . $path;\n\n return $path;\n }", "title": "" }, { "docid": "203c07bf4b7143cdbd41a4c108ce97f8", "score": "0.6656462", "text": "public function _prepare_path($path = '')\n {\n if (is_array($path)) {\n foreach ((array) $path as $k => $v) {\n $path[$k] = $this->_prepare_path($v);\n }\n return $path;\n }\n $bad_chars = ['`', '\"', \"'\", '..', '~', ' ', \"\\t\", \"\\r\", \"\\n\", '|', '<', '>', '&'];\n $result = str_replace($bad_chars, '', rtrim(str_replace(['\\\\', '//', '///'], '/', trim($path)), '/'));\n return $result ? $result : '/';\n }", "title": "" }, { "docid": "002fa49e3149ea1a9281cd34b825f0c2", "score": "0.6653634", "text": "function cutSlug( string $path ) : string {\n\treturn \n\t( string ) \\substr( $path, 0, \\strrpos( $path, '/' ) );\n}", "title": "" }, { "docid": "dbb92e1b6b48054c96439ba737123ade", "score": "0.665211", "text": "public function realPath($path)\n {\n return str_replace('\\\\', DS, str_replace('/', DS, $path));\n }", "title": "" }, { "docid": "915209779355c94bd1b49c818eeb90ee", "score": "0.66475135", "text": "function sanitizeFilePath($pathName) {\n\tif (!is_string($pathName)) throw new Exception('Can\\'t sanitize value of type ' . gettype($pathName) . ' as pathName. String expected.');\n\tif (!strlen($pathName)) return '';\n\treturn preg_replace('!(\\\\\\\\|/)+!is', DIRECTORY_SEPARATOR, $pathName);\n}", "title": "" }, { "docid": "9f337b30abd9c0f11bd2f5b67e00885a", "score": "0.66399854", "text": "public function cleanPath($string)\n {\n // replace backslashes (windows separators)\n $string = str_replace(\"\\\\\", \"/\", $string);\n // remove multiple slashes\n $string = preg_replace('#/+#', '/', $string);\n return $string;\n }", "title": "" }, { "docid": "1d25b6309e5a45e7dd8a8af72aac6ce6", "score": "0.66344553", "text": "function cleanup_filename($f) {\n if (preg_match('{/\\.\\./}', $f) or\n preg_match('{^\\.\\./}', $f)) {\n die(\"Error: up-dir detected in filename: $f\");\n }\n $f = preg_replace('{^/+}', '', $f);\n return preg_replace('{//}', '/', $f);\n}", "title": "" }, { "docid": "462cef5f17f0329f6d9f4204a7e389c4", "score": "0.66255635", "text": "private function stripSlashes($path)\n {\n $path = $path[0] == \"/\" ? str_replace(\"/\", \"\", $path) : $path;\n $path = $path[count($path) - 1] == \"/\" ? str_replace(\"/\", \"\", $path) : $path;\n $this->old_app_path = base_path() . \"/\" . $path . \"/\";\n }", "title": "" }, { "docid": "0e6b1439d3a47306b3ae76a51446a2cf", "score": "0.6613661", "text": "public static function stripBase($path)\n\t{\n\t\t$path = ltrim($path, DIRECTORY_SEPARATOR);\n\n\t\t$pos = strpos($path, DIRECTORY_SEPARATOR);\n\n\t\treturn substr($path, $pos);\n\t}", "title": "" }, { "docid": "5d26c36e8053493837c71c6c8abcf6b1", "score": "0.6613555", "text": "function cleanup_filename($f)\n{\n\tif (preg_match('{/\\.\\./}', $f) or\n\t preg_match('{^\\.\\./}', $f)) {\n\t\tdie(\"Error: up-dir detected in filename: $f\");\n\t}\n\t$f = preg_replace('{^/+}', '', $f);\n\treturn preg_replace('{//}', '/', $f);\n}", "title": "" }, { "docid": "e09048de48d4d0edaca6b8fdfc8a4274", "score": "0.66058105", "text": "public function getCleanFilename()\n\t{\n\t\treturn preg_replace('/[^a-zA-Z0-9 -]/', '', pathinfo($this->getPath(),\tPATHINFO_FILENAME));\n\t}", "title": "" }, { "docid": "cee6db8c52618c683a5418e8f4c8117d", "score": "0.6592028", "text": "function slashPath( string $path, bool $suffix = false ) : string {\n\treturn $suffix ?\n\t\t\\rtrim( $path, '/\\\\' ) . '/' : \n\t\t'/'. \\ltrim( $path, '/\\\\' );\n}", "title": "" }, { "docid": "57baa219f6bf197c9b3589f9f47e3bde", "score": "0.65839475", "text": "public function cleanup() {\n $slug = preg_replace('~[^\\\\pL0-9_]+~u', '-', $this->path);\n $slug = trim($slug, \"-\");\n $slug = iconv(\"utf-8\", \"us-ascii//TRANSLIT\", $slug);\n $slug = strtolower($slug);\n $slug = preg_replace('~[^-a-z0-9_]+~', '', $slug);\n $this->path = $slug;\n return $this->path;\n }", "title": "" }, { "docid": "7c63555f8caffed602237d9f545b6a8e", "score": "0.6578767", "text": "protected function stripSlashes($path)\n {\n return trim($path, '/');\n }", "title": "" }, { "docid": "add206aaf135246a740dd4c888c498ef", "score": "0.6557232", "text": "private function filterPath($path) {\n $path = preg_replace_callback(\n '/(?:[^' . self::CHAR_UNRESERVED . ')(:@&=\\+\\$,\\/;%]+|%(?![A-Fa-f0-9]{2}))/u',\n [$this, 'urlEncodeChar'],\n $path\n );\n\n if ('' === $path) {\n // No path\n return $path;\n }\n\n if ($path[0] !== '/') {\n // Relative path\n return $path;\n }\n\n // Ensure only one leading slash, to prevent XSS attempts.\n return '/' . ltrim($path, '/');\n }", "title": "" }, { "docid": "6a22e769583a643edd0fe4b4d57dba07", "score": "0.655047", "text": "function resolvePath($path)\n{\n return ltrim(str_replace('\\\\', '/', $path), '/');\n}", "title": "" }, { "docid": "a2ef2203aac06129d06deaeb68bb4368", "score": "0.65501904", "text": "protected function _normpath($path) {\n\t\t$path = '/' . ltrim($path, '/');\n\t\treturn $path;\n\t}", "title": "" }, { "docid": "370745f8251ca22e6346d3ed71f982c7", "score": "0.6547817", "text": "function image_name_cleaner($name) {\n $matches = preg_replace('/\\//', '', $name);\n return $matches;\n}", "title": "" }, { "docid": "8a93baa77802959bb6734f5ba13c00ce", "score": "0.65417486", "text": "public static function sanitize($path)\n {\n // If used on windows the \\ char needs to be handled to be used on a string\n return str_replace(\"\\\\\", \"\\\\\\\\\", $path);\n }", "title": "" }, { "docid": "1df36630116ddc293fa54b80eebfd491", "score": "0.6541221", "text": "function fs_normal_dir($dir) {\n $dir=preg_replace(\"/\\\\\\\\/\", '/', $dir);\n $dir=preg_replace(\"/[\\\\/]$/\", '', $dir);\n return $dir;\n }", "title": "" }, { "docid": "ca6bc676ec28d31a882f8d56c4a67a55", "score": "0.65362185", "text": "final private function clearSeparator($path)\n {\n if (substr($path, -1) == '/') {\n $path = substr($path, 0, -1);\n }\n\n if ($path[0] == '/') {\n $path = substr($path, 1, strlen($path) - 1);\n }\n\n return $path;\n }", "title": "" }, { "docid": "899798dd97f27b2b59e384f18b7fb1ed", "score": "0.6533834", "text": "public static function fixPath($path) {\n return preg_replace('#\\\\\\+|/+#', DIRECTORY_SEPARATOR, $path);\n }", "title": "" }, { "docid": "7f3285c7e237a5900e3005f018c4387a", "score": "0.65281767", "text": "public function sanitize_path($path)\n\t{\n\t\t$path_array = explode('/', trim($path, '/'));\n\t\t$sanitized_array = [];\n\t\tforeach ($path_array as $path_part) {\n\t\t\tif ($path_part === '..') {\n\t\t\t\tif (count($sanitized_array) > 0) {\n\t\t\t\t\tarray_pop($sanitized_array);\n\t\t\t\t}\n\t\t\t} else if ($path_part !== '' && $path_part !== '.') {\n\t\t\t\t$sanitized_array[] = $path_part;\n\t\t\t}\n\t\t}\n\t\treturn ('/' . implode('/', $sanitized_array));\n\t}", "title": "" }, { "docid": "6876a49f244493275ab4b6365992b78d", "score": "0.6516506", "text": "function wp_normalize_path( $path ) {\n\t$wrapper = '';\n\tif ( wp_is_stream( $path ) ) {\n\t\tlist( $wrapper, $path ) = explode( '://', $path, 2 );\n\t\t$wrapper .= '://';\n\t}\n\n\t// Standardise all paths to use /\n\t$path = str_replace( '\\\\', '/', $path );\n\n\t// Replace multiple slashes down to a singular, allowing for network shares having two slashes.\n\t$path = preg_replace( '|(?<=.)/+|', '/', $path );\n\n\t// Windows paths should uppercase the drive letter\n\tif ( ':' === substr( $path, 1, 1 ) ) {\n\t\t$path = ucfirst( $path );\n\t}\n\n\treturn $wrapper . $path;\n}", "title": "" }, { "docid": "b7600fe4dcc4fec68ae619170e5b6058", "score": "0.6514973", "text": "public static function sanitizePath(string $url): string\n {\n $decoded = self::decode($url);\n $path = parse_url($decoded, PHP_URL_PATH);\n $beginsWithSlash = Str::start($path, '/');\n $endsWithoutSlash = rtrim($beginsWithSlash, '/');\n return mb_strtolower($endsWithoutSlash);\n }", "title": "" }, { "docid": "afe9b8b070c8425e3ed9ce96e542380a", "score": "0.64909565", "text": "public static function normalizePath($path)\n {\n if (DIRECTORY_SEPARATOR != '/') {\n return str_replace(DIRECTORY_SEPARATOR, '/', $path);\n }\n \n return $path;\n }", "title": "" }, { "docid": "44a665b8b25bce064f399cd2c1467d81", "score": "0.649", "text": "function url_remove_dot_segments( $path ) {\r\n // multi-byte character explode\r\n $inSegs = preg_split( '!/!u', $path );\r\n $outSegs = array( );\r\n foreach ( $inSegs as $seg )\r\n {\r\n if ( $seg == '' || $seg == '.')\r\n continue;\r\n if ( $seg == '..' )\r\n array_pop( $outSegs );\r\n else\r\n array_push( $outSegs, $seg );\r\n }\r\n $outPath = implode( '/', $outSegs );\r\n if ( $path[0] == '/' )\r\n $outPath = '/' . $outPath;\r\n // compare last multi-byte character against '/'\r\n if ( $outPath != '/' &&\r\n (mb_strlen($path)-1) == mb_strrpos( $path, '/', 'UTF-8' ) )\r\n $outPath .= '/';\r\n return $outPath;\r\n}", "title": "" }, { "docid": "c9ea5e213c64e8cd797b2599ec816a97", "score": "0.6470322", "text": "function mmrpg_clean_path($path){\n return str_replace(array(MMRPG_CONFIG_ROOTDIR, MMRPG_CONFIG_ROOTURL), '/', $path);\n}", "title": "" }, { "docid": "066778e2b88337589c13af7225efb77a", "score": "0.6466812", "text": "public static function normalize($path)\n {\n static $p = array('#\\\\\\\\#', '#/#');\n static $r = array('/', self::DS);\n $path = preg_replace($p, $r, $path);\n\n if ('\\\\' == self::DS) { //windows\n $path = strtolower($path);\n }\n return $path;\n }", "title": "" }, { "docid": "a49dcc0118797fbac57604280e1071a9", "score": "0.6458792", "text": "function util_sanitizeFileReference($fr) {\n while (preg_match('/\\\\.\\\\.\\\\//',$fr)) {\n $fr = preg_replace('/\\\\.\\\\.\\\\//','',$fr);\n }\n\n $fr_parts = explode('/',$fr);\n $cleaned_fr = '';\n $part_counter = 0;\n foreach ($fr_parts as $frp) {\n if ($part_counter > 0) {\n $cleaned_fr .= '/';\n }\n $cleaned_fr .= util_sanitizeFileName($frp);\n $part_counter++;\n }\n\n return $cleaned_fr;\n }", "title": "" }, { "docid": "c7e2d0846d242fe5f9231fb24c3ed9e5", "score": "0.6449501", "text": "public static function normalize($path)\n\t{\n\t\tif (self::DS === '\\\\') {\n\t\t\treturn \\strtr($path, '/', '\\\\');\n\t\t}\n\n\t\treturn \\strtr($path, '\\\\', '/');\n\t}", "title": "" }, { "docid": "c22b143660df798d482d34ef4220faf1", "score": "0.64143115", "text": "public static function fixPathSlashes ($path = \"\") {\n\t\ttry {\n\t\t\t$path\t\t= str_replace(\"/\", SLASH, $path);\n\t\t\t$path\t\t= str_replace(\"\\\\\", SLASH, $path);\n\t\t\treturn $path;\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\tthrow $e;\n\t\t}\n\t}", "title": "" }, { "docid": "57173918692c10f0295ae851e84a4a60", "score": "0.6406607", "text": "function hkm_clean_path(string $path): string\n\t{\n\t\t// Resolve relative paths\n\t\t$path = realpath($path) ?: $path;\n\t\t$cleanPath = '';\n\t\tswitch (true) {\n\t\t\tcase strpos($path, SYSTEMPATH) === 0:\n\t\t\t\t$cleanPath = 'SYSTEMPATH' . DIRECTORY_SEPARATOR . substr($path, strlen(SYSTEMPATH));\n\t\t\tcase strpos($path, SYSTEMROOTPATH) === 0:\n\t\t\t\t$cleanPath = 'SYSTEMROOTPATH' . DIRECTORY_SEPARATOR . substr($path, strlen(SYSTEMROOTPATH));\n\t\t\tcase strpos($path, APPPATH) === 0:\n\t\t\t\t$cleanPath = 'APPPATH' . DIRECTORY_SEPARATOR . substr($path, strlen(APPPATH));\n\t\t\tcase strpos($path, BUILDPATH) === 0:\n\t\t\t\t$cleanPath = 'BUILDPATH' . DIRECTORY_SEPARATOR . substr($path, strlen(BUILDPATH));\n\t\t\tcase strpos($path, WRITEPATH) === 0:\n\t\t\t\t$cleanPath = 'WRITEPATH' . DIRECTORY_SEPARATOR . substr($path, strlen(WRITEPATH));\n\t\t\tcase strpos($path, ROOTPATH) === 0:\n\t\t\t\t$cleanPath = 'ROOTPATH' . DIRECTORY_SEPARATOR . substr($path, strlen(ROOTPATH));\n\t\t\t break;\n\t\t\tdefault:\n\t\t\t $cleanPath = $path;\n\t\t}\n\t\treturn $cleanPath;\n\t}", "title": "" }, { "docid": "3e6699fe0e7189d8ac6c6da2b10c826d", "score": "0.64021665", "text": "protected function normalizePath(string $path) : string\n {\n return \\implode(\"/\", \\array_map(\"rawurlencode\", \\explode(\"/\", $path)));\n }", "title": "" }, { "docid": "0c3b70da6865199d2dde933ba94ad81b", "score": "0.63975084", "text": "private function normalize($path = '')\n {\n if (func_num_args() > 1) {\n $path = implode('/', func_get_args());\n }\n $path = preg_replace('/\\/+/', '/', str_replace('\\\\', '/', $path));\n return $path;\n }", "title": "" }, { "docid": "ca9114229b724de7e67609240c8a1097", "score": "0.6394599", "text": "protected function _stripApp($path)\n {\n return str_replace(App::getInstance()->getPath() . DIRECTORY_SEPARATOR, '', $path);\n }", "title": "" }, { "docid": "3594d736c98080443941c175d9b6bd71", "score": "0.6389007", "text": "public static function normalize(string $path)\n {\n return '/' . trim(trim($path), '/');\n }", "title": "" }, { "docid": "ebabe187da358878d9f8c9adf5f32ff5", "score": "0.6388331", "text": "public function stripPath($file) {\n\t\treturn str_replace($this->filepath, '', $file);\n\t}", "title": "" }, { "docid": "f1a506c5709a5fe819eb43a6ccc57f50", "score": "0.6387971", "text": "function RemoveTrailingSlash($str) {\n\tif (!empty($str)) {\n\t\tif (substr($str,-1) == DIRECTORY_SEPARATOR) {\n\t\t\t$str = substr($str,0,strlen($str)-1);\n\t\t}\n\t}\n\treturn $str;\n}", "title": "" }, { "docid": "b12e57a81b5b080e130a9b163694e6d6", "score": "0.6381664", "text": "private function normalizePath($file)\n {\n return str_replace(DIRECTORY_SEPARATOR, '/', $file);\n }", "title": "" }, { "docid": "6f5f7eab858b9145c9a4f085e15caf0f", "score": "0.6381649", "text": "protected function normalize($path) {\n return rtrim($path, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;\n }", "title": "" }, { "docid": "2cc81e46ffe88591afca03701d33d06f", "score": "0.63610727", "text": "private function sanitizePath(string $path): string\n {\n if ('' === $path) {\n return $path;\n }\n\n if (str_contains($path, '?')) {\n throw InvalidArgumentException::invalidPathContainsQueryString($path);\n }\n\n if (str_contains($path, '#')) {\n throw InvalidArgumentException::invalidPathContainsUriFragment($path);\n }\n\n $sanitizedPath = $this->encode(\n $this->sanitizeInvalidUTF8Characters($path),\n '#(?:[^' . self::CHAR_UNRESERVED . ')(:@&=\\+\\$,\\/;%]+|%(?![A-Fa-f0-9]{2}))#u'\n );\n\n if (null === $sanitizedPath) {\n throw InvalidArgumentException::invalidPath($path);\n }\n\n if ('' === $sanitizedPath) {\n // No path\n return $sanitizedPath;\n }\n\n if ('/' !== $sanitizedPath[0]) {\n // Relative path\n return $sanitizedPath;\n }\n // Only one leading slash, to prevent XSS attempts.\n return '/' . ltrim($sanitizedPath, '/');\n }", "title": "" }, { "docid": "4a04ddeb36fa6c299865131acee817c6", "score": "0.636102", "text": "function escapeSlashes($path)\n {\n $path = str_replace('\\\\', DIRECTORY_SEPARATOR, $path);\n $path = str_replace('//', DIRECTORY_SEPARATOR, $path);\n $path = trim($path, DIRECTORY_SEPARATOR);\n\n return $path;\n }", "title": "" }, { "docid": "4a04ddeb36fa6c299865131acee817c6", "score": "0.636102", "text": "function escapeSlashes($path)\n {\n $path = str_replace('\\\\', DIRECTORY_SEPARATOR, $path);\n $path = str_replace('//', DIRECTORY_SEPARATOR, $path);\n $path = trim($path, DIRECTORY_SEPARATOR);\n\n return $path;\n }", "title": "" }, { "docid": "884511eaf2066725df0b1a9e784ca838", "score": "0.6347524", "text": "function normalize_path(string $path): string\n {\n $path = str_replace(DIRECTORY_SEPARATOR, '.', $path);\n\n $directories = dir_parts($path);\n\n $basename = array_pop($directories);\n $basename = container_resolve(FileSystemInterface::class)->basename(array_pop($directories)).'.'.$basename;\n\n return implode(DIRECTORY_SEPARATOR, $directories).DIRECTORY_SEPARATOR.$basename;\n }", "title": "" }, { "docid": "46d7e87071b992c65e5472927eccf2ce", "score": "0.63388246", "text": "function sslash($data){ \n $stripped = rtrim($data);\n $stripped = rtrim($data, '/');\n return $stripped;\n}", "title": "" }, { "docid": "e076c3f41b2aeb4b407dde1bbca09574", "score": "0.632549", "text": "public function clean_path($path = '')\n {\n $pattern = '#^(ssh2\\.sftp://Resource id \\#[0-9]+)#ims';\n if (is_array($path)) {\n // Get current resource string\n $cur = current($path);\n if (is_array($cur)) {\n $cur = current($cur);\n }\n preg_match($pattern, $cur, $m);\n return str_replace($m[1], '', $path);\n }\n return preg_replace($pattern, '', $path);\n }", "title": "" }, { "docid": "82954c21803ec762c23a2b4b917644c0", "score": "0.6292462", "text": "public static function clean(string $dir): string\n {\n $new = trim(str_replace('\\\\', '/', $dir));\n if ( substr($new, -1) === '/' ){\n $new = substr($new, 0, -1);\n }\n return $new;\n }", "title": "" }, { "docid": "aa931bb9586a69db1b873c3dad3f42a2", "score": "0.62697375", "text": "function drake_ci_flatten_path($path) {\n return strtr($path, array('-' => '--', '/' => '-'));\n}", "title": "" }, { "docid": "fc9300e70b621ed307ef214e819bca5b", "score": "0.62688977", "text": "public function strip_name ()\n {\n $this->_text = $this->path ();\n }", "title": "" }, { "docid": "000522df17cf2aee0a524565e89ab5bf", "score": "0.62590283", "text": "private static function unescapeFilename($name) {\n if (preg_match('/^\".+\"$/', $name)) {\n return stripcslashes(substr($name, 1, -1));\n } else {\n return $name;\n }\n }", "title": "" }, { "docid": "8f066e3c3c43e4f3ff0cecbd6610dddc", "score": "0.6258225", "text": "public static function refactorDS($path)\n {\n return str_replace(['/', '\\\\'], DS, $path);\n }", "title": "" }, { "docid": "f21f34b7465c8a57d89deaa2d77b6f24", "score": "0.62564063", "text": "protected function _preparePath($path)\n {\n if ($path[0] !== '/') {\n $path = '/' . $path;\n }\n\n $path = preg_replace(array(\"([\\.]+[!\\w+\\.][^\\.\\w+])\", \"([\\/]+)\"), '/', $path);\n\n $path = str_replace('%2F', '/', rawurlencode($path));\n\n return $path;\n }", "title": "" }, { "docid": "c8bc0fe571421467f6a7c62ff2a0c1ee", "score": "0.6238893", "text": "function sanitizeFileName($value)\n{\n\treturn preg_replace(\"/(?:[\\/:\\\\\\]|\\.{2,}|\\\\x00)/\", \"\", $value);\n}", "title": "" }, { "docid": "c7ab8aa79ec4516a4ad18422acbb6823", "score": "0.6232455", "text": "function removeFunkyWhiteSpace($path)\n {\n // We do this check in a loop, since removing invalid unicode characters\n // can lead to new characters being created.\n while (preg_match('#\\p{C}+|^\\./#u', $path)) {\n $path = preg_replace('#\\p{C}+|^\\./#u', '', $path);\n }\n\n return $path;\n }", "title": "" }, { "docid": "8d1d4c69a35723e70ea5b3a0b47a2be7", "score": "0.62216705", "text": "function sanitizeFileName($fileName)\n{\n //sanitize, remove double dot .. and remove get parameters if any\n $fileName = __DIR__.'/'.preg_replace('@\\?.*$@', '',\n preg_replace('@\\.{2,}@', '', preg_replace('@[^\\/\\\\a-zA-Z0-9\\-\\._]@', '', $fileName)));\n return $fileName;\n}", "title": "" } ]
f6559068c3fc37aea8b48dcd8a528172
Detect payload content type, processes over and return an array which contains content, content attributes (mime, size or filename etc.) and response attributes (code, headers, cookies).
[ { "docid": "69ac12ab8eb11fdde0bce7cb6eb116f6", "score": "0.66362774", "text": "public final function process(Response $response): array\n {\n $payload = $this;\n $payload->setResponse($response);\n\n // Check non-body stuff.\n if (!$response->allowsBody()) {\n // Return content, content attributes, response attributes.\n return [\n null,\n $payload->getAttributes(),\n [$payload->getResponseCode(),\n $payload->getResponseHeaders(),\n $payload->getResponseCookies()]\n ];\n }\n\n // Ready to handle (eg: JsonPayload, XmlPayload etc).\n if ($payload instanceof PayloadInterface) {\n $content = $payload->handle();\n if (!is_null($content) && !is_string($content)\n && !is_image($content) && !is_stream($content)) {\n throw new PayloadException(\n 'Failed to achive string|image|stream|null content from payload %s',\n get_class($payload)\n );\n }\n }\n // Not ready to handle, try to create (eg: Payload).\n else {\n $contentType = $payload->getContentType()\n ?: throw new PayloadException('Content type must not be empty');\n\n // Detect content type and process.\n switch ($type = self::sniffContentType($contentType)) {\n case 'n/a':\n $content = null;\n break;\n case 'text':\n $content = $payload->getContent();\n if (!is_null($content) && !is_string($content)) {\n throw new PayloadException(\n 'Content must be string|null for text responses, %s given',\n get_type($content)\n );\n }\n break;\n case 'json': case 'xml':\n $payload = self::createPayload($type, [\n $payload->getResponseCode(), $payload->getContent(),\n $payload->getAttributes(), $response\n ]);\n\n $content = $payload->handle();\n if (!is_null($content) && !is_string($content)) {\n throw new PayloadException(\n 'Failed getting string|null content from payload %s [return: %s]',\n [get_class($payload), get_type($content)]\n );\n }\n break;\n case 'image': case 'file': case 'download':\n $payload = self::createPayload($type, [\n $payload->getResponseCode(), $payload->getContent(),\n $payload->getAttributes(), $response\n ]);\n\n $content = $payload->handle();\n if (!is_image($content) && !is_stream($content)\n && !$payload->getAttribute('direct') // Skip direct image/file reads.\n ) {\n throw new PayloadException(\n 'Failed getting image|stream content from payload %s [return: %s]',\n [get_class($payload), get_type($content)]\n );\n }\n break;\n default:\n throw new PayloadException(\n 'Invalid payload type `%s`',\n $type ?? $payload->getContentType()\n );\n }\n }\n\n // Return content, content attributes, response attributes.\n return [\n $content,\n $payload->getAttributes(),\n [$payload->getResponseCode(),\n $payload->getResponseHeaders(),\n $payload->getResponseCookies()]\n ];\n }", "title": "" } ]
[ { "docid": "2eaa6268fc12eeab69cbb28ef9aef8fd", "score": "0.64740694", "text": "public function getResponseContentType();", "title": "" }, { "docid": "be957c5e781f1202e56776ff14053ba6", "score": "0.6149324", "text": "public function getAcceptContentTypes(): array;", "title": "" }, { "docid": "f067629347dd77493d627027e7bb677b", "score": "0.60926825", "text": "public function getAcceptableContentTypes();", "title": "" }, { "docid": "0830d5a0ff133dcf927e2e1db69c6f34", "score": "0.60843176", "text": "public function toArray()\n {\n $body = $this->getBody();\n // Base64 encode when binary\n if (\n strpos($this->getContentType(), 'application/x-gzip') !== false\n || strpos($this->getContentType(), '/mpeg') !== false\n || $this->getHeader('Content-Transfer-Encoding') == 'binary'\n ) {\n $body = base64_encode($body);\n }\n\n return array_filter(\n array(\n 'status' => $this->status,\n 'headers' => $this->getHeaders(),\n 'body' => $body\n )\n );\n }", "title": "" }, { "docid": "ceeaaf1801ff5a125b3923e3bcb5cf8d", "score": "0.6082042", "text": "public function contentTypes(): array;", "title": "" }, { "docid": "778dd1e88a0ceaf7757ad9747e118dd1", "score": "0.6056696", "text": "public function toArray()\n {\n $content = $this->body();\n\n if (preg_match('/\\bjson\\b/i', $this->getHeaderLine('Content-Type'))) {\n $content = json_decode($content, true, 512, JSON_BIGINT_AS_STRING);\n\n return $content;\n }\n\n if (preg_match('/\\bxml\\b/i', $this->getHeaderLine('Content-Type'))) {\n $previous = libxml_disable_entity_loader(true);\n $values = json_decode(json_encode(simplexml_load_string($content, \\SimpleXMLElement::class, LIBXML_NOCDATA)), true);\n libxml_disable_entity_loader($previous);\n\n return $values;\n }\n }", "title": "" }, { "docid": "5f3b19c5a7b13b5b62cba03625bf2c96", "score": "0.60428655", "text": "public static function getContentType () {}", "title": "" }, { "docid": "0124022c2b5964afcfe798724905faca", "score": "0.59835774", "text": "public function getAcceptableContentTypes()\n {\n if ($this->acceptableContentTypes)\n {\n return $this->acceptableContentTypes;\n }\n if (!isset($_SERVER['HTTP_ACCEPT']))\n {\n return array();\n }\n $this->acceptableContentTypes = $this->splitHttpAcceptHeader($_SERVER['HTTP_ACCEPT']);\n return $this->acceptableContentTypes;\n }", "title": "" }, { "docid": "86341e8d77b06bdb9d30834c65d72ea1", "score": "0.59640294", "text": "public function getAcceptableContentTypes()\n {\n if ($this->acceptableContentTypes)\n {\n return $this->acceptableContentTypes;\n }\n\n if (!isset($_SERVER['HTTP_ACCEPT']))\n {\n return array();\n }\n\n $this->acceptableContentTypes = $this->splitHttpAcceptHeader($_SERVER['HTTP_ACCEPT']);\n\n return $this->acceptableContentTypes;\n }", "title": "" }, { "docid": "790b773d560aee4228ca920d0e6bc2ed", "score": "0.59414077", "text": "public function getContentType () {}", "title": "" }, { "docid": "f25558701659d3b84bee5706eff5875d", "score": "0.59232354", "text": "private static function getMultipartContent(): array\n\t{\n\t\tif (self::$parsedMultipartContent === null) {\n\t\t\tself::$parsedMultipartContent = Util::parseMultipartContent(file_get_contents('php://input'), $_SERVER['CONTENT_TYPE'] ?? $_SERVER['HTTP_CONTENT_TYPE']);\n\t\t}\n\n\t\treturn self::$parsedMultipartContent;\n\t}", "title": "" }, { "docid": "45e6091d3f6ec2d35938c42878057fd7", "score": "0.5898832", "text": "abstract protected function determineContentType(): string;", "title": "" }, { "docid": "ab98e069bfaeecaac6a998090dccdb86", "score": "0.5847056", "text": "public static function getContentType();", "title": "" }, { "docid": "3e5d32fb7c093a636eb5129491fa6775", "score": "0.57900196", "text": "public function getAcceptableContentTypes() : array\n {\n return $this['Accept'] ?: [];\n }", "title": "" }, { "docid": "f712a6dfc8b7ecbac1773dc52eb8670b", "score": "0.56633633", "text": "public function parseMime(): array\n {\n list($type, $subtype) = explode(\"/\", $this->getMimeType());\n return [0 => $type, \"type\" => $type, 1 => $subtype, \"subtype\" => $subtype];\n }", "title": "" }, { "docid": "223d5d2134fa340f9ca8900e7ec97965", "score": "0.56599945", "text": "public function getContentType();", "title": "" }, { "docid": "223d5d2134fa340f9ca8900e7ec97965", "score": "0.56599945", "text": "public function getContentType();", "title": "" }, { "docid": "223d5d2134fa340f9ca8900e7ec97965", "score": "0.56599945", "text": "public function getContentType();", "title": "" }, { "docid": "223d5d2134fa340f9ca8900e7ec97965", "score": "0.56599945", "text": "public function getContentType();", "title": "" }, { "docid": "223d5d2134fa340f9ca8900e7ec97965", "score": "0.56599945", "text": "public function getContentType();", "title": "" }, { "docid": "223d5d2134fa340f9ca8900e7ec97965", "score": "0.56599945", "text": "public function getContentType();", "title": "" }, { "docid": "223d5d2134fa340f9ca8900e7ec97965", "score": "0.56599945", "text": "public function getContentType();", "title": "" }, { "docid": "9176b0365d91ad9db6002a8d29d13f52", "score": "0.56303626", "text": "public abstract function contentType();", "title": "" }, { "docid": "1d01ef82a683ae991cd3c92ad93e1ec7", "score": "0.5627023", "text": "abstract function content_type();", "title": "" }, { "docid": "3cd9037e6a055aabd076cf5ce692b7ec", "score": "0.5592137", "text": "private function __decodeContent($content)\n\t{\n\t\t$contentsMaping\t= array(\n\t\t\t'image/gif'\t\t\t\t\t\t\t=> 'gif',\n\t\t\t'image/jpeg'\t\t\t\t\t\t=> 'jpg',\n\t\t\t'image/pjpeg'\t\t\t\t\t\t=> 'jpg',\n\t\t\t'image/x-png'\t\t\t\t\t\t=> 'png',\n\t\t\t'image/jpg'\t\t\t\t\t\t\t=> 'jpg',\n\t\t\t'image/png'\t\t\t\t\t\t\t=> 'png',\n\t\t\t'application/x-shockwave-flash'\t\t=> 'swf',\n\t\t\t'application/pdf'\t\t\t\t\t=> 'pdf',\n\t\t\t'application/pgp-signature'\t\t\t=> 'sig',\n\t\t\t'application/futuresplash'\t\t\t=> 'spl',\n\t\t\t'application/msword'\t\t\t\t=> 'doc',\n\t\t\t'application/postscript'\t\t\t=> 'ps',\n\t\t\t'application/x-bittorrent'\t\t\t=> 'torrent',\n\t\t\t'application/x-dvi'\t\t\t\t\t=> 'dvi',\n\t\t\t'application/x-gzip'\t\t\t\t=> 'gz',\n\t\t\t'application/x-ns-proxy-autoconfig'\t=> 'pac',\n\t\t\t'application/x-shockwave-flash'\t\t=> 'swf',\n\t\t\t'application/x-tgz'\t\t\t\t\t=> 'tar.gz',\n\t\t\t'application/x-tar'\t\t\t\t\t=> 'tar',\n\t\t\t'application/zip'\t\t\t\t\t=> 'zip',\n\t\t\t'audio/mpeg'\t\t\t\t\t\t=> 'mp3',\n\t\t\t'audio/x-mpegurl'\t\t\t\t\t=> 'm3u',\n\t\t\t'audio/x-ms-wma'\t\t\t\t\t=> 'wma',\n\t\t\t'audio/x-ms-wax'\t\t\t\t\t=> 'wax',\n\t\t\t'audio/x-wav'\t\t\t\t\t\t=> 'wav',\n\t\t\t'image/x-xbitmap'\t\t\t\t\t=> 'xbm',\n\t\t\t'image/x-xpixmap'\t\t\t\t\t=> 'xpm',\n\t\t\t'image/x-xwindowdump'\t\t\t\t=> 'xwd',\n\t\t\t'text/css'\t\t\t\t\t\t\t=> 'css',\n\t\t\t'text/html'\t\t\t\t\t\t\t=> 'html',\n\t\t\t'text/javascript'\t\t\t\t\t=> 'js',\n\t\t\t'text/plain'\t\t\t\t\t\t=> 'txt',\n\t\t\t'text/xml'\t\t\t\t\t\t\t=> 'xml',\n\t\t\t'video/mpeg'\t\t\t\t\t\t=> 'mpeg',\n\t\t\t'video/quicktime'\t\t\t\t\t=> 'mov',\n\t\t\t'video/x-msvideo'\t\t\t\t\t=> 'avi',\n\t\t\t'video/x-ms-asf'\t\t\t\t\t=> 'asf',\n\t\t\t'video/x-ms-wmv'\t\t\t\t\t=> 'wmv'\n\t\t);\n\n\t\treturn (isset($contentsMaping[$content]) ? $contentsMaping[$content] : $content);\n\t}", "title": "" }, { "docid": "66f442386c7487f75aa314cfa4be755e", "score": "0.5580682", "text": "public function getContentParsed();", "title": "" }, { "docid": "3e7fd6a99b5d781c85ac1f4df70ee785", "score": "0.5549902", "text": "function http_negotiate_content_type (array $supported, array &$result = null ) {}", "title": "" }, { "docid": "d1ddeb66e1df499ef8d91e24bb596a62", "score": "0.5546477", "text": "private function decodeByContentType($request){\n\t\t//$contentType = $request->getHeaders('Content-Type')->getFieldValue();\n\t\t// Added below to fix firefox sends multiple semicolon\n\t\t//if(stripos($contentType, 'application/json') !== false) {\n\t\t\tif($this->requestHasContentType($request, self::CONTENT_TYPE_JSON)) {\n\t\t\ttry {\n\t\t\t\t$jsonObj = Json::decode($request->getContent(), Json::TYPE_OBJECT);\n\t\t\t} catch (JsonRuntimeException $e) {\n\t\t\t\treturn $this->sendJsonException($e->getMessage());\n\t\t\t}\n\t\t\treturn $jsonObj;\n\t\t}\n\t\t//else if(stripos($contentType, 'application/xml') !== false) {\n\t\telse if($this->requestHasContentType($request, self::CONTENT_TYPE_XML)) {\n\t\t\ttry {\n\t\t\t\t// TEMP solution till Zf2 Xml Statregy is implemented\n\t\t\t\t$arrayrequest = XmlDecoder::fromXml($request->getContent());\n\t\t\t\treturn $this->arrayToObject($arrayrequest)->request;\n\n\t\t\t} catch (JsonRecursionException $e) {\n\t\t\t\treturn $this->sendJsonException($e->getMessage());\n\t\t\t} catch (JsonRuntimeException $e){\n\t\t\t\treturn $this->sendJsonException($e->getMessage());\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "e29c026e3fc5174f4579a8de3619f83f", "score": "0.5544821", "text": "abstract protected function getAcceptedMimeTypes(): array;", "title": "" }, { "docid": "8f0713327dc9265ae4547ee67df28ac0", "score": "0.5443822", "text": "function GetRequestStats(&$requests, &$domains, &$mime_stats) {\n $mime_stats['html'] = array('count' => 0, 'bytes' => 0);\n $mime_stats['css'] = array('count' => 0, 'bytes' => 0);\n $mime_stats['javascript'] = array('count' => 0, 'bytes' => 0);\n $mime_stats['jpeg'] = array('count' => 0, 'bytes' => 0);\n $mime_stats['png'] = array('count' => 0, 'bytes' => 0);\n $mime_stats['gif'] = array('count' => 0, 'bytes' => 0);\n $mime_stats['webp'] = array('count' => 0, 'bytes' => 0);\n $mime_stats['other images'] = array('count' => 0, 'bytes' => 0);\n $mime_stats['other'] = array('count' => 0, 'bytes' => 0);\n \n foreach( $requests as &$request )\n {\n if (strlen($request['host']))\n $domains[$request['host']] = 1;\n \n $mime = $request['contentType'];\n $contentType = 'other';\n if( stripos($mime, 'javascript') !== false || \n stripos($mime, 'ecmascript') !== false || \n !strcasecmp($mime, 'text/js') )\n {\n $contentType = 'javascript';\n }\n elseif( !strcasecmp($mime, 'text/css') )\n $contentType = 'css';\n elseif( !strcasecmp($mime, 'text/html') )\n $contentType = 'html';\n elseif( !strcasecmp($mime, 'image/jpeg') )\n $contentType = 'jpeg';\n elseif( !strcasecmp($mime, 'image/png') )\n $contentType = 'png';\n elseif( !strcasecmp($mime, 'image/gif') )\n $contentType = 'gif';\n elseif( !strcasecmp($mime, 'image/webp') )\n $contentType = 'webp';\n elseif( !strncasecmp($mime, 'image/', 6) )\n $contentType = 'other images';\n\n $mime_stats[$contentType]['count']++;\n $mime_stats[$contentType]['bytes'] += $request['bytesIn'];\n }\n}", "title": "" }, { "docid": "8e446e30d6e79fe48c0ce0d1be466c07", "score": "0.5403908", "text": "function _mime_content_type($filename) {\n\t $mime_types = array(\n\n\t 'txt' => 'text/plain',\n\t 'htm' => 'text/html',\n\t 'html' => 'text/html',\n\t 'php' => 'text/html',\n\t 'css' => 'text/css',\n\t 'js' => 'application/javascript',\n\t 'json' => 'application/json',\n\t 'xml' => 'application/xml',\n\t 'swf' => 'application/x-shockwave-flash',\n\t 'flv' => 'video/x-flv',\n\n\t // images\n\t 'png' => 'image/png',\n\t 'jpe' => 'image/jpeg',\n\t 'jpeg' => 'image/jpeg',\n\t 'jpg' => 'image/jpeg',\n\t 'gif' => 'image/gif',\n\t 'bmp' => 'image/bmp',\n\t 'ico' => 'image/vnd.microsoft.icon',\n\t 'tiff' => 'image/tiff',\n\t 'tif' => 'image/tiff',\n\t 'svg' => 'image/svg+xml',\n\t 'svgz' => 'image/svg+xml',\n\n\t // archives\n\t 'zip' => 'application/zip',\n\t 'rar' => 'application/x-rar-compressed',\n\t 'exe' => 'application/x-msdownload',\n\t 'msi' => 'application/x-msdownload',\n\t 'cab' => 'application/vnd.ms-cab-compressed',\n\n\t // audio/video\n\t 'mp3' => 'audio/mpeg',\n\t 'qt' => 'video/quicktime',\n\t 'mov' => 'video/quicktime',\n\n\t // adobe\n\t 'pdf' => 'application/pdf',\n\t 'psd' => 'image/vnd.adobe.photoshop',\n\t 'ai' => 'application/postscript',\n\t 'eps' => 'application/postscript',\n\t 'ps' => 'application/postscript',\n\n\t // ms office\n\t 'doc' => 'application/msword',\n\t 'rtf' => 'application/rtf',\n\t 'xls' => 'application/vnd.ms-excel',\n\t 'ppt' => 'application/vnd.ms-powerpoint',\n\n\t // open office\n\t 'odt' => 'application/vnd.oasis.opendocument.text',\n\t 'ods' => 'application/vnd.oasis.opendocument.spreadsheet',\n\t );\n\n\t $ext = strtolower(array_pop(explode('.',$filename)));\n\t if (array_key_exists($ext, $mime_types)) {\n\t return $mime_types[$ext];\n\t }\n\t elseif (function_exists('finfo_open')) {\n\t $finfo = finfo_open(FILEINFO_MIME);\n\t $mimetype = finfo_file($finfo, $filename);\n\t finfo_close($finfo);\n\t return $mimetype;\n\t }\n\t else {\n\t return 'application/octet-stream';\n\t }\n }", "title": "" }, { "docid": "f127a764d07b20dc120a7537c864d1ee", "score": "0.5403753", "text": "public static function parse_mime_header($mime_head = '')\n {\n $mime_head = preg_replace\n (array('/\\=\\?([^\\s]+)\\?q\\?([^\\r\\n]*)\\?\\=/Uie', '/\\=\\?([^\\s]+)\\?b\\?([^\\r\\n]*)\\?\\=/Uie')\n ,array\n (\"encode_utf8(self::decode_1522_line('\\\\2', 'q'), '\\\\1', true)\"\n ,\"encode_utf8(self::decode_1522_line('\\\\2', 'b'), '\\\\1', true)\"\n )\n ,$mime_head\n );\n // Unfolding of long lines\n $mime_head = preg_replace('/(\\r\\n|\\n)([\\ \\t]+)/', '', $mime_head);\n\n if (preg_match('/^Content-Type:(\\ )?([-\\/\\.0-9a-z]+)(;\\s?([^\\r\\n\\t]+))?/mi', $mime_head, $found)) {\n $return['content_type'] = $found[2];\n $return['content_type_pad'] = (isset($found[4]) && $found[4]) ? trim($found[4]) : false;\n } else {\n $return['content_type'] = $return['content_type_pad'] = false;\n }\n if (preg_match('/^Content-Disposition:(\\ )?([-\\/\\.0-9a-z]+)(;\\s?([^\\t\\r\\n]+))?/mi', $mime_head, $found)) {\n $return['content_disposition'] = trim($found[2]);\n $return['content_dispo_pad'] = (isset($found[4]) && $found[3]) ? trim($found[4]) : false;\n } else {\n $return['content_disposition'] = $return['content_dispo_pad'] = false;\n }\n foreach (array\n (array('!^Content-Description:(\\ )?(.+)$!mi', 'content_description', 2)\n ,array('!^Content-Transfer-Encoding:(\\ )?(.+)$!mi', 'content_encoding', 2)\n ,array('!^Content-ID:(\\ )?(.+)$!mi', 'content_id', 2)\n ,array('/boundary=(\"?)([^\\r^\\n^\\\"\\;]+)\\1/i', 'boundary', 2)\n ,array('!^Comment:(\\ )?(.+)$!mi', 'comment', 2)\n ) as $needle) {\n if (preg_match($needle[0], $mime_head, $found)) {\n $return[$needle[1]] = trim($found[$needle[2]]);\n } else {\n $return[$needle[1]] = false;\n }\n }\n // Für Rohansichten -> kompletter, aber dekodierter und unfolded Header\n $return['complete'] = $mime_head;\n return $return;\n }", "title": "" }, { "docid": "07b9d482376ddc83a398985273cff57c", "score": "0.5402925", "text": "public function getContentType(): string;", "title": "" }, { "docid": "3c27c2f68a6eee2877a16cc96ea56ff5", "score": "0.5358606", "text": "function parseResponse($headers, $data) {\n\t\t$this->debug('Entering parseResponse() for payload of length ' . strlen($data) . ' and type of ' . $headers['content-type']);\n\t\t$this->responseAttachments = array();\n\t\tif (strstr($headers['content-type'], 'multipart/related')) {\n\t\t\t$this->debug('Decode multipart/related');\n\t\t\t$input = '';\n\t\t\tforeach ($headers as $k => $v) {\n\t\t\t\t$input .= \"$k: $v\\r\\n\";\n\t\t\t}\n\t\t\t$params['input'] = $input . \"\\r\\n\" . $data;\n\t\t\t$params['include_bodies'] = true;\n\t\t\t$params['decode_bodies'] = true;\n\t\t\t$params['decode_headers'] = true;\n\t\t\t\n\t\t\t$structure = Mail_mimeDecode::decode($params);\n\n\t\t\tforeach ($structure->parts as $part) {\n\t\t\t\tif (!isset($part->disposition) && (strstr($part->headers['content-type'], 'text/xml'))) {\n\t\t\t\t\t$this->debug('Have root part of type ' . $part->headers['content-type']);\n\t\t\t\t\t$root = $part->body;\n\t\t\t\t\t$return = parent::parseResponse($part->headers, $part->body);\n\t\t\t\t} else {\n\t\t\t\t\t$this->debug('Have an attachment of type ' . $part->headers['content-type']);\n\t\t\t\t\t$info['data'] = $part->body;\n\t\t\t\t\t$info['filename'] = isset($part->d_parameters['filename']) ? $part->d_parameters['filename'] : '';\n\t\t\t\t\t$info['contenttype'] = $part->headers['content-type'];\n\t\t\t\t\t$info['cid'] = $part->headers['content-id'];\n\t\t\t\t\t$this->responseAttachments[] = $info;\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tif (isset($return)) {\n\t\t\t\t$this->responseData = $root;\n\t\t\t\treturn $return;\n\t\t\t}\n\t\t\t\n\t\t\t$this->setError('No root part found in multipart/related content');\n\t\t\treturn '';\n\t\t}\n\t\t$this->debug('Not multipart/related');\n\t\treturn parent::parseResponse($headers, $data);\n\t}", "title": "" }, { "docid": "29bc3b9a652707b8c86148f5e8d155dc", "score": "0.53350407", "text": "public function parseContent($type, $content = null)\n {\n if ($type === null) {\n return null;\n }\n if ($content === null) {\n $data = '';\n $fpointer = fopen($this->getInputStream(), 'r');\n while ($fpointer && $chunk = fread($fpointer, 1024)) {\n $data .= $chunk;\n }\n } else {\n $data = $content;\n }\n $body = null;\n $type = explode(';', $type);\n $type = trim($type[0]);\n switch ($type) {\n case 'application/json':\n case 'text/json':\n case 'text/javascript':\n $body = json_decode($data);\n $body = is_object($body) ? (array) $body : $body;\n break;\n case 'application/x-www-form-urlencoded':\n case 'multipart/form-data':\n case 'text/plain':\n parse_str($data, $body);\n break;\n case 'application/xml':\n $body = simplexml_load_string($data);\n $body = is_object($body) ? (array) $body : $body;\n break;\n default:\n throw new CoreException(\n 'Unknown Content Type: ' . $type,\n 400\n );\n break;\n }\n\n return $body;\n }", "title": "" }, { "docid": "85b575f51b0249dcf07dba3b157731f3", "score": "0.5284261", "text": "function getHTTPContentType() {\n\t\tif (count($this->requestAttachments) > 0) {\n\t\t\treturn $this->mimeContentType;\n\t\t}\n\t\treturn parent::getHTTPContentType();\n\t}", "title": "" }, { "docid": "ca527d5fd30a09d452d61dbfce304ded", "score": "0.5280083", "text": "public function getContentType()\n {\n return $this->getAttribute(\"Content-Type\");\n }", "title": "" }, { "docid": "b228ba0870266fda2cfe799291b29939", "score": "0.523788", "text": "public function type() {\n\t\tif(!$this->content_type) {\n\t\t\tif($mime = $this->get_header('Content-Type')) {\n\t\t\t\t$actual_mime = array_shift(explode(';', $mime));\n\t\t\t\t\n\t\t\t\tif(array_key_exists($actual_mime, self::$header_content_type_map)) {\n\t\t\t\t\t$this->content_type = self::$header_content_type_map[$actual_mime];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $this->content_type;\n\t}", "title": "" }, { "docid": "194a7f0261cc5c4ea1c9cb303f74dd49", "score": "0.5235669", "text": "public function getContentSpecifications(): array;", "title": "" }, { "docid": "a992e7228bf98f92065a434c292dfff4", "score": "0.52336526", "text": "protected function getMimeHeaders()\n {\n $headers = array();\n if ($this->mimeType !== null) {\n $headers['Content-Type'] = $this->mimeType;\n if ($this->charset) {\n $headers['Content-Type'] .= '; charset=' . $this->charset;\n }\n }\n $length = $this->getContentLength();\n if ($length) {\n $headers['Content-Length'] = $length;\n }\n\n return $headers;\n }", "title": "" }, { "docid": "0adf2b3a58eab3ed43cf34124a873910", "score": "0.52227896", "text": "public function getAcceptContentTypes()\n\t{\n\t\treturn $this->acceptContentTypes;\n\t}", "title": "" }, { "docid": "bc3dadbcd4603554603c4395702742ec", "score": "0.5214028", "text": "public function getContentType():string;", "title": "" }, { "docid": "536b2d7a1331bc338ee4541ebff714b3", "score": "0.52052516", "text": "public function getMessageContentType();", "title": "" }, { "docid": "ab24c9fe1b3655edccf86efdc0a63e6c", "score": "0.51885736", "text": "final protected function processResponse() {\r\n\t\tswitch($this->response_type) {\r\n\t\t\tcase self::RESPONSE_TEXT:\r\n\t\t\t\treturn $this->processResponseText($this->response);\r\n\t\t\tcase self::RESPONSE_PAGE:\r\n\t\t\t\treturn $this->processResponsePage($this->response);\r\n\t\t\tcase self::RESPONSE_JSON:\r\n\t\t\t\treturn $this->processResponseJson($this->response);\r\n\t\t\tcase self::RESPONSE_REDIR:\r\n\t\t\t\treturn $this->processResponseRedirect($this->response);\r\n\t\t\tcase self::RESPONSE_CONTENT:\r\n\t\t\t\treturn $this->processResponseContent($this->response);\r\n\t\t}\r\n\t\treturn $this->response;\r\n\t}", "title": "" }, { "docid": "e8e76b944d444f930ea077462585baeb", "score": "0.5182909", "text": "public function contentTypes() {\n\t\t\treturn $this->contentTypes;\n\t\t}", "title": "" }, { "docid": "b638abd0f84fc10e092694271528e861", "score": "0.51821446", "text": "public function content_type($ext) {\n\n\t\tif (empty($_SERVER['CONTENT_TYPE'])) return $ext;\n\n\t\t$ct = strtolower($_SERVER['CONTENT_TYPE']);\n\t\t$ct = explode(';', $ct);\n\n\t\tforeach ($ct as $v) {\n\t\t\t$candidate = trim($v);\n\n\t\t\tswitch ($candidate) {\n\t\t\t\tcase 'text/html':\n\t\t\t\t\treturn 'html';\n\n\t\t\t\tcase 'application/json':\n\t\t\t\t\treturn 'json';\n\n\t\t\t\tdefault:\n\t\t\t\t\treturn $ext;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "f0d9baac06af1e8ad53157dfd378ba4c", "score": "0.5163662", "text": "public function toArray(): array\n {\n return (new CurlOutput($this->getResponse()))\n ->checkStatus()\n ->checkContentType($this->getContentTypeValidator())\n ->decodeResponse(true);\n }", "title": "" }, { "docid": "6393a7ef725b297d9242198850290cf7", "score": "0.5159983", "text": "public function providerParseCurlResponse()\n {\n return [\n 'when body contains HTTP header then separate header and body' => [\n [\n 'header' => \"HTTP/1.1 200 OK\\r\\nCache-Control: private, max-age=0\\r\\nContent-Length: 61936\\r\\n\\r\\n\",\n 'body' => \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?><soap:Envelope xmlns:soap=\\\"http://www.w3.org/2003/05/soap-envelope\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xmlns:xsd=\\\"http://www.w3.org/2001/XMLSchema\\\"><soap:Body><DemandHistoryResponse xmlns=\\\"http://api.ris.itmh.local/B2CRegress/\\\"><Mem> 46.48.112.193 - - [01/Sep/2013:15:08:47 +0200] \\\"POST wp-login.php HTTP/1.0\\\" 301 555 \\\"referer-domain.tld\\\" \\\"Mozilla/5.0 (Windows NT 6.1; rv:19.0) Gecko/20130101 Firefox/19.0\\\"\\r\\n\\r\\n</Mem></DemandHistoryResponse></soap:Body></soap:Envelope>\"\n ],\n \"HTTP/1.1 200 OK\\r\\nCache-Control: private, max-age=0\\r\\nContent-Length: 61936\\r\\n\\r\\n<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?><soap:Envelope xmlns:soap=\\\"http://www.w3.org/2003/05/soap-envelope\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xmlns:xsd=\\\"http://www.w3.org/2001/XMLSchema\\\"><soap:Body><DemandHistoryResponse xmlns=\\\"http://api.ris.itmh.local/B2CRegress/\\\"><Mem> 46.48.112.193 - - [01/Sep/2013:15:08:47 +0200] \\\"POST wp-login.php HTTP/1.0\\\" 301 555 \\\"referer-domain.tld\\\" \\\"Mozilla/5.0 (Windows NT 6.1; rv:19.0) Gecko/20130101 Firefox/19.0\\\"\\r\\n\\r\\n</Mem></DemandHistoryResponse></soap:Body></soap:Envelope>\"\n ]\n ];\n }", "title": "" }, { "docid": "936ea52874bdd353bfb928d10ebd3360", "score": "0.51563287", "text": "private function getContentType()\n {\n $result = null;\n if ($this->hasHeader('Content-Type')) {\n $result = $this->getHeader('Content-Type')[0];\n }\n\n return $result;\n }", "title": "" }, { "docid": "af95f30aa461a608c562dfee0886ea6f", "score": "0.5133998", "text": "abstract protected function getRequestPayload(): array;", "title": "" }, { "docid": "465359672e26cdc9f11c29a936a274e3", "score": "0.5128277", "text": "function _decode($headers, $body, $default_ctype = 'text/plain')\n {\n $return = new stdClass;\n $return->headers = array();\n $headers = $this->_parseHeaders($headers);\n foreach ($headers as $value) {\n $value['value'] = $this->_decodeHeader($value['value']);\n if (isset($return->headers[strtolower($value['name'])]) AND !is_array($return->headers[strtolower($value['name'])])) {\n $return->headers[strtolower($value['name'])] = array($return->headers[strtolower($value['name'])]);\n $return->headers[strtolower($value['name'])][] = $value['value'];\n } elseif (isset($return->headers[strtolower($value['name'])])) {\n $return->headers[strtolower($value['name'])][] = $value['value'];\n } else {\n $return->headers[strtolower($value['name'])] = $value['value'];\n }\n }\n foreach ($headers as $key => $value) {\n $headers[$key]['name'] = strtolower($headers[$key]['name']);\n switch ($headers[$key]['name']) {\n case 'content-type':\n $content_type = $this->_parseHeaderValue($headers[$key]['value']);\n if (preg_match('/([0-9a-z+.-]+)\\/([0-9a-z+.-]+)\\; name=\\\"([0-9a-z+.-]+)/i', $headers[$key]['value'], $regs)) {\n $return->ctype_primary = $regs[1];\n $return->ctype_secondary = $regs[2];\n $return->filename = $regs[3];\n }\n elseif (preg_match('/([0-9a-z+.-]+)\\/([0-9a-z+.-]+)/i', $content_type['value'], $regs)) {\n $return->ctype_primary = $regs[1];\n $return->ctype_secondary = $regs[2];\n }\n if (isset($content_type['other'])) {\n foreach($content_type['other'] as $p_name => $p_value) {\n $return->ctype_parameters[$p_name] = $p_value;\n }\n }\n break;\n case 'content-disposition':\n $content_disposition = $this->_parseHeaderValue($headers[$key]['value']);\n $return->disposition = $content_disposition['value'];\n if (isset($content_disposition['other'])) {\n foreach($content_disposition['other'] as $p_name => $p_value) {\n $return->d_parameters[$p_name] = $p_value;\n }\n }\n break;\n case 'content-transfer-encoding':\n $content_transfer_encoding = $this->_parseHeaderValue($headers[$key]['value']);\n break;\n }\n }\n if (isset($content_type)) {\n switch (strtolower($content_type['value'])) {\n case 'text/plain':\n $encoding = isset($content_transfer_encoding) ? $content_transfer_encoding['value'] : '7bit';\n $charset = isset($return->ctype_parameters['charset']) ? $return->ctype_parameters['charset'] : $this->_charset;\n $this->_include_bodies ? $return->body = ($this->_decode_bodies ? $this->_decodeBody($body, $encoding, $charset, true) : $body) : null;\n break;\n case 'text/html':\n $encoding = isset($content_transfer_encoding) ? $content_transfer_encoding['value'] : '7bit';\n $charset = isset($return->ctype_parameters['charset']) ? $return->ctype_parameters['charset'] : $this->_charset;\n $this->_include_bodies ? $return->body = ($this->_decode_bodies ? $this->_decodeBody($body, $encoding, $charset, true) : $body) : null;\n break;\n case 'multipart/signed': // PGP\n case 'multipart/encrypted': // #190 encrypted parts will be treated as normal ones\n case 'multipart/parallel':\n case 'multipart/appledouble': // Appledouble mail\n case 'multipart/report': // RFC1892\n case 'multipart/digest':\n case 'multipart/alternative':\n case 'multipart/related':\n case 'multipart/relative': //#20431 - android\n case 'multipart/mixed':\n case 'application/vnd.wap.multipart.related':\n if(!isset($content_type['other']['boundary'])){\n $this->_error = 'No boundary found for ' . $content_type['value'] . ' part';\n return false;\n }\n $default_ctype = (strtolower($content_type['value']) === 'multipart/digest') ? 'message/rfc822' : 'text/plain';\n $parts = $this->_boundarySplit($body, $content_type['other']['boundary']);\n for ($i = 0; $i < count($parts); $i++) {\n list($part_header, $part_body) = $this->_splitBodyHeader($parts[$i]);\n $part = $this->_decode($part_header, $part_body, $default_ctype);\n if($part === false)\n $part = $this->raiseError($this->_error);\n $return->parts[] = $part;\n }\n break;\n case 'message/rfc822':\n case 'message/delivery-status': // #bug #18693\n if ($this->_rfc822_bodies) {\n $encoding = isset($content_transfer_encoding) ? $content_transfer_encoding['value'] : '7bit';\n $charset = isset($return->ctype_parameters['charset']) ? $return->ctype_parameters['charset'] : $this->_charset;\n $return->body = ($this->_decode_bodies ? $this->_decodeBody($body, $encoding, $charset, false) : $body);\n }\n $obj = new Mail_mimeDecode($body);\n $return->parts[] = $obj->decode(array('include_bodies' => $this->_include_bodies,\n 'decode_bodies' => $this->_decode_bodies,\n 'decode_headers' => $this->_decode_headers));\n unset($obj);\n // #213, KD 2015-06-29 - Always inline them because there is no \"type\" to them (they're text)\n $return->disposition = 'inline';\n break;\n // #190, KD 2015-06-09 - Add type for S/MIME Encrypted messages; these must have the filename set explicitly (it won't work otherwise)\n //and then falls through for the rest on purpose.\n case 'application/x-pkcs7-mime':\n case 'application/pkcs7-mime':\n if (!isset($content_transfer_encoding['value'])) {\n $content_transfer_encoding['value'] = 'base64';\n }\n // if there is no explicit charset, then don't try to convert to default charset, and make sure that only text mimetypes are converted\n $charset = (isset($return->ctype_parameters['charset']) && ((isset($return->ctype_primary) && $return->ctype_primary == 'text') || !isset($return->ctype_primary)) ) ? $return->ctype_parameters['charset'] : '';\n $part->body = ($this->_decode_bodies ? $this->_decodeBody($body, $content_transfer_encoding['value'], $charset, false) : $body);\n $ctype = explode('/', strtolower($content_type['value']));\n $part->ctype_parameters['name'] = 'smime.p7m';\n $part->ctype_primary = $ctype[0];\n $part->ctype_secondary = $ctype[1];\n $part->d_parameters['size'] = strlen($part->body);\n $return->parts[] = $part;\n // Fall through intentionally\n default:\n if(!isset($content_transfer_encoding['value']))\n $content_transfer_encoding['value'] = '7bit';\n // if there is no explicit charset, then don't try to convert to default charset, and make sure that only text mimetypes are converted\n $charset = (isset($return->ctype_parameters['charset']) && ((isset($return->ctype_primary) && $return->ctype_primary == 'text') || !isset($return->ctype_primary)) )? $return->ctype_parameters['charset']: '';\n $this->_include_bodies ? $return->body = ($this->_decode_bodies ? $this->_decodeBody($body, $content_transfer_encoding['value'], $charset, false) : $body) : null;\n break;\n }\n } else {\n $ctype = explode('/', $default_ctype);\n $return->ctype_primary = $ctype[0];\n $return->ctype_secondary = $ctype[1];\n $this->_include_bodies ? $return->body = ($this->_decode_bodies ? $this->_decodeBody($body) : $body) : null;\n }\n return $return;\n }", "title": "" }, { "docid": "d1527d2bc642f4eabe70c7f4a2f60233", "score": "0.51250076", "text": "function get_mime_content_type_from_filename($filename)\n{\n\tif(strpos($filename, '.') !== false)\n\t{\n $mime_types = array(\n 'txt' => 'text/plain',\n 'htm' => 'text/html',\n 'html' => 'text/html',\n 'php' => 'text/html',\n 'css' => 'text/css',\n 'js' => 'application/javascript',\n 'json' => 'application/json',\n 'xml' => 'application/xml',\n 'swf' => 'application/x-shockwave-flash',\n 'flv' => 'video/x-flv',\n\n // images\n 'png' => 'image/png',\n 'jpe' => 'image/jpeg',\n 'jpeg' => 'image/jpeg',\n 'jpg' => 'image/jpeg',\n 'gif' => 'image/gif',\n 'bmp' => 'image/bmp',\n 'ico' => 'image/vnd.microsoft.icon',\n 'tiff' => 'image/tiff',\n 'tif' => 'image/tiff',\n 'svg' => 'image/svg+xml',\n 'svgz' => 'image/svg+xml',\n\n // archives\n 'zip' => 'application/zip',\n 'rar' => 'application/x-rar-compressed',\n 'exe' => 'application/x-msdownload',\n 'msi' => 'application/x-msdownload',\n 'cab' => 'application/vnd.ms-cab-compressed',\n\n // audio/video\n 'mp3' => 'audio/mpeg',\n 'qt' => 'video/quicktime',\n 'mov' => 'video/quicktime',\n\n // adobe\n 'pdf' => 'application/pdf',\n 'psd' => 'image/vnd.adobe.photoshop',\n 'ai' => 'application/postscript',\n 'eps' => 'application/postscript',\n 'ps' => 'application/postscript',\n\n // ms office\n 'doc' => 'application/msword',\n 'rtf' => 'application/rtf',\n 'xls' => 'application/vnd.ms-excel',\n 'ppt' => 'application/vnd.ms-powerpoint',\n\n // open office\n 'odt' => 'application/vnd.oasis.opendocument.text',\n 'ods' => 'application/vnd.oasis.opendocument.spreadsheet',\n );\n\n $ext = get_file_extension($filename, true);\n if (array_key_exists($ext, $mime_types)) {\n return $mime_types[$ext];\n }\n\n return 'application/octet-stream';\n\t}\n\n return '';\n}", "title": "" }, { "docid": "e54a3cb782c13799c61a55da2f0e095f", "score": "0.5118626", "text": "public static function _readFilemetaForGetPages($content) {\n global $config;\n\n $headers = array(\n 'title' => 'Title',\n 'description' => 'Description',\n 'author' => 'Author',\n 'slug' => 'Slug',\n 'date' => 'Date',\n 'robots' => 'Robots'\n );\n\n foreach ($headers as $field => $regex) {\n if (preg_match('/^[ \\t\\/*#@]*' . preg_quote($regex, '/') . ':(.*)$/mi', $content, $match) && $match[1]) {\n $headers[$field] = trim(preg_replace(\"/\\s*(?:\\*\\/|\\?>).*/\", '', $match[1]));\n } else {\n $headers[$field] = '';\n }\n }\n\n if ($headers['date'])\n $headers['date_formatted'] = date(DATE_FORMAT, strtotime($headers['date']));\n\n return $headers;\n }", "title": "" }, { "docid": "5ec7f4a68922282fb3c16a9fd6b38563", "score": "0.5115657", "text": "public function parseContentType($header);", "title": "" }, { "docid": "45b7a3e5949d04498f3c291a4093c289", "score": "0.50972086", "text": "public function testAcceptableMediaTypeIsNotFirstInList()\n {\n $request = $this->getMockBuilder('Slender\\Http\\Request')\n ->disableOriginalConstructor()\n ->getMock();\n\n $request->expects($this->any())\n ->method('getHeaderLine')\n ->willReturn('text/plain,text/html');\n\n // provide access to the determineContentType() as it's a protected method\n $class = new \\ReflectionClass(AbstractHandler::class);\n $method = $class->getMethod('determineContentType');\n $method->setAccessible(true);\n\n // use a mock object here as AbstractHandler cannot be directly instantiated\n $abstractHandler = $this->getMockForAbstractClass(AbstractHandler::class);\n\n // call determineContentType()\n $return = $method->invoke($abstractHandler, $request);\n\n $this->assertEquals('text/html', $return);\n }", "title": "" }, { "docid": "504eff1344bf2fe257b4badfd49e3c1b", "score": "0.50964934", "text": "protected function getContentType($filename)\n {\n $extension = pathinfo($filename, PATHINFO_EXTENSION);\n $contentType = CFMimeTypes::get_mimetype($extension);\n\n return array('contentType'=> $contentType);\n }", "title": "" }, { "docid": "1278ac07ef640e0265482ae5f654f48c", "score": "0.50959855", "text": "public function getInstances() {\n\t\t\t// TODO: get dynamically from folder\n\t\t\t$instances = (object)array(\n\t\t\t\t'text-content'\t=> new TextContentType(),\n\t\t\t\t'image-block'\t=> new ImageBlockContentType(),\n\t\t\t\t'image-upload'=> new ImageUploadContentType(),\n\t\t\t\t'block'=> new BlockContentType()\n\t\t\t);\n\t\t\t/*$context['items']->{'image-block'} = new ImageUploadContentType();\n\t\t\t$context['items']->{'block'} = new BlockContentType();\n\t\t\t$context['items']->{'text-content'} = new TextContentType();\n\t\t\t$context['items']->{'image-block'} = new ImageBlockContentType();*/\n\t\t\tSymphony::ExtensionManager()->notifyMembers(\n\t\t\t\t'AppendContentType', '*', array(\n\t\t\t\t\t'items'\t=> $instances\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$instances = (array)$instances;\n\t\t\t//var_dump($instances);\n\t\t\t\n\t\t\t$check = uksort($instances, function($a, $b) {\n\t\t\t\t\n\t\t\t\treturn strcasecmp($a, $b);\n\t\t\t});\n\t\t\t//var_dump($instances);\n\t\t//\tdie;\n\t\t\treturn $instances;\n\t\t}", "title": "" }, { "docid": "7962e1371ef361e37e005dff8981c894", "score": "0.50861967", "text": "public function parse(array $content, string $model): array\n {\n $parsedResponse = $content;\n\n switch ($model) {\n // Update permissions\n case Response::MODEL_DOCUMENT:\n $parsedResponse = $this->parsePermissions($content);\n break;\n case Response::MODEL_DOCUMENT_LIST:\n $parsedResponse = $this->parseDocumentList($content);\n break;\n\n case Response::MODEL_FILE:\n $parsedResponse = $this->parsePermissions($content);\n break;\n case Response::MODEL_FILE_LIST:\n $parsedResponse = $this->parseFileList($content);\n break;\n\n case Response::MODEL_EXECUTION:\n $parsedResponse = $this->parseExecutionPermissions($content);\n break;\n case Response::MODEL_EXECUTION_LIST:\n $parsedResponse = $this->parseExecutionsList($content);\n break;\n\n case Response::MODEL_FUNCTION:\n $parsedResponse = $this->parseFunctionPermissions($content);\n break;\n case Response::MODEL_FUNCTION_LIST:\n $parsedResponse = $this->parseFunctionsList($content);\n break;\n\n // Convert status from boolean to int\n case Response::MODEL_USER:\n $parsedResponse = $this->parseStatus($content);\n break;\n case Response::MODEL_USER_LIST:\n $parsedResponse = $this->parseUserList($content);\n break;\n\n // Convert all Health responses back to original\n case Response::MODEL_HEALTH_STATUS:\n $parsedResponse = $this->parseHealthStatus($content);\n break;\n case Response::MODEL_HEALTH_VERSION:\n $parsedResponse = $this->parseHealthVersion($content);\n break;\n case Response::MODEL_HEALTH_TIME:\n $parsedResponse = $this->parseHealthTime($content);\n break;\n case Response::MODEL_HEALTH_QUEUE:\n $parsedResponse = $this->parseHealthQueue($content);\n break;\n case Response::MODEL_HEALTH_ANTIVIRUS:\n $parsedResponse = $this->parseHealthAntivirus($content);\n break;\n\n // Complex filters\n case Response::MODEL_COLLECTION:\n $parsedResponse = $this->parseCollection($content);\n break;\n case Response::MODEL_COLLECTION_LIST:\n $parsedResponse = $this->parseCollectionList($content);\n break;\n\n case Response::MODEL_LOG:\n $parsedResponse = $this->parseLog($content);\n break;\n case Response::MODEL_LOG_LIST:\n $parsedResponse = $this->parseLogList($content);\n break;\n\n case Response::MODEL_PROJECT:\n $parsedResponse = $this->parseProject($content);\n break;\n case Response::MODEL_PROJECT_LIST:\n $parsedResponse = $this->parseProjectList($content);\n break;\n }\n\n return $parsedResponse;\n }", "title": "" }, { "docid": "cfd4237acca8b6921c67168624025323", "score": "0.5083834", "text": "public function getContentTypes()\n {\n if (array_key_exists(\"contentTypes\", $this->_propDict)) {\n return $this->_propDict[\"contentTypes\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "1a93fab105ec3db87c621103f05b3264", "score": "0.5081931", "text": "abstract public function getMimeType();", "title": "" }, { "docid": "dede81e1a9d49aaf46fa4f5fd1ef61c5", "score": "0.5076153", "text": "protected function prepareFormat()\r\n {\r\n switch ($this->getRequestFormat()) {\r\n case 'json' :\r\n $content = $this->jsonResponse();\r\n break;\r\n case 'xml' :\r\n default :\r\n $content = $this->xmlResponse();\r\n break;\r\n }\r\n\r\n return $content;\r\n }", "title": "" }, { "docid": "e567e35dd1f0bfe3c041b5b59010dc9c", "score": "0.5070487", "text": "private function getRequestContentType()\n\t{\n\t\tif (isset($_SERVER['CONTENT_TYPE'])) {\n return $_SERVER['CONTENT_TYPE'];\n }\n\t\treturn false;\n\t}", "title": "" }, { "docid": "e3277585e9d3656f4f1794c4858f29e5", "score": "0.505824", "text": "public function content($type) {\n if ($type == 'head') {\n return $this->_head;\n } else if ($type == 'body') {\n return $this->_body;\n }\n return false; /* This is the else clause; if $type doesn't match 'head' or 'body', then return false. */\n }", "title": "" }, { "docid": "b5670fbe246e77ebb19e692e29e6cef0", "score": "0.50567544", "text": "protected function _getContentRangeData(){\n\t\t$content_range = (string)$this->_Request->getHeader(\"Content-Range\"); // Content-Range: bytes 0-1048575/2344594\n\t\tif(preg_match('/^bytes (\\d+)-(\\d+)\\/(\\d+)$/',$content_range,$matches)){\n\t\t\t$start_offset = $matches[1];\n\t\t\t$end_offset = $matches[2];\n\t\t\t$total_size = $matches[3];\n\t\t\tif(!($total_size>0 && $end_offset>$start_offset && $end_offset<$total_size)){ // sanitization never hurts\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn array(\n\t\t\t\t\"start_offset\" => $start_offset,\n\t\t\t\t\"end_offset\" => $end_offset,\n\t\t\t\t\"total_size\" => $total_size,\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "a419739f7aef620f586e5ba7f4eb1610", "score": "0.5052526", "text": "function getHTTPContentTypeCharset() {\n\t\tif (count($this->requestAttachments) > 0) {\n\t\t\treturn false;\n\t\t}\n\t\treturn parent::getHTTPContentTypeCharset();\n\t}", "title": "" }, { "docid": "7bb069ccd3021bc22bf16da006f0383a", "score": "0.50473464", "text": "protected function parseBody()\n {\n $data = null;\n \n switch ($this->getContentType()) {\n case 'application/x-www-form-urlencoded':\n $data = $this->parseUrlEncodedBody();\n break;\n case 'application/json':\n $data = $this->parseJsonBody();\n break;\n case 'text/xml':\n case 'application/xml':\n $data = $this->parseXmlBody();\n break;\n case 'multipart/form-data':\n throw new \\RuntimeException(\"Parsing multipart/form-data isn't supported\");\n }\n \n return $data;\n }", "title": "" }, { "docid": "8333477af63f031134447fc0d59c8960", "score": "0.50383687", "text": "protected function getContentType()\n {\n $header = $this->getHeaderLine('Content-Type');\n return trim(strstr($header, ';', true) ?: $header);\n }", "title": "" }, { "docid": "b36afca65da1da0a843d9b8a58e1b1a7", "score": "0.50302845", "text": "public function getFilesFromContent($content)\n\t{\n\t\t$files = Array();\n\t\t$arFilesByType = Array();\n\t\t$arExtensions = Array(\"js\", \"css\");\n\t\t$extension_regex = \"(?:\" . implode(\"|\", $arExtensions) . \")\";\n\t\t$findImageRegexp = \"/\n\t\t\t\t((?i:\n\t\t\t\t\thref=\n\t\t\t\t\t|src=\n\t\t\t\t\t|BX\\\\.loadCSS\\\\(\n\t\t\t\t\t|BX\\\\.loadScript\\\\(\n\t\t\t\t\t|jsUtils\\\\.loadJSFile\\\\(\n\t\t\t\t\t|background\\\\s*:\\\\s*url\\\\(\n\t\t\t\t)) #attribute\n\t\t\t\t(\\\"|') #open_quote\n\t\t\t\t([^?'\\\"]+\\\\.) #href body\n\t\t\t\t(\" . $extension_regex . \") #extentions\n\t\t\t\t(|\\\\?\\\\d+|\\\\?v=\\\\d+) #params\n\t\t\t\t(\\\\2) #close_quote\n\t\t\t/x\";\n\t\t$match = Array();\n\t\tpreg_match_all($findImageRegexp, $content, $match);\n\n\t\t$link = $match[3];\n\t\t$extension = $match[4];\n\t\t$params = $match[5];\n\t\t$linkCount = count($link);\n\t\t$fileData = array(\n\t\t\t\"FULL_FILE_LIST\" => array(),\n\t\t\t\"FILE_TIMESTAMPS\" => array(),\n\t\t\t\"CSS_FILE_IMAGES\" => array()\n\t\t);\n\t\tfor ($i = 0; $i < $linkCount; $i++)\n\t\t{\n\t\t\t$fileData[\"FULL_FILE_LIST\"][] = $files[] = $link[$i] . $extension[$i] . $params[$i];\n\t\t\t$fileData[\"FILE_TIMESTAMPS\"][$link[$i] . $extension[$i]] = $params[$i];\n\t\t\t$arFilesByType[$extension[$i]][] = $link[$i] . $extension[$i];\n\t\t}\n\n\t\t$manifestCache = $this->readManifestCache($this->getCurrentManifestID());\n\t\t$excludePatternsHash = md5(serialize($this->excludeImagePatterns));\n\n\t\tif (array_key_exists(\"css\", $arFilesByType))\n\t\t{\n\t\t\t$findImageRegexp = '#([;\\s:]*(?:url|@import)\\s*\\(\\s*)(\\'|\"|)(.+?)(\\2)\\s*\\)#si';\n\t\t\tif(count($this->excludeImagePatterns) > 0)\n\t\t\t{\n\t\t\t\t$findImageRegexp = '#([;\\s:]*(?:url|@import)\\s*\\(\\s*)(\\'|\"|)((?:(?!'.implode(\"|\",$this->excludeImagePatterns).').)+?)(\\2)\\s*\\)#si';\n\t\t\t}\n\n\t\t\t$cssCount = count($arFilesByType[\"css\"]);\n\t\t\tfor ($j = 0; $j < $cssCount; $j++)\n\t\t\t{\n\t\t\t\t$cssFilePath = $arFilesByType[\"css\"][$j];\n\t\t\t\tif ($manifestCache[\"FILE_DATA\"][\"FILE_TIMESTAMPS\"][$cssFilePath] != $fileData[\"FILE_TIMESTAMPS\"][$cssFilePath]\n\t\t\t\t\t||$excludePatternsHash != $manifestCache[\"EXCLUDE_PATTERNS_HASH\"]\n\t\t\t\t)\n\t\t\t\t{\n\n\t\t\t\t\t$fileContent = false;\n\t\t\t\t\t$fileUrl = parse_url($cssFilePath);\n\t\t\t\t\t$file = new \\Bitrix\\Main\\IO\\File(Application::getDocumentRoot() . $fileUrl['path']);\n\n\t\t\t\t\tif($file->getExtension() !== \"css\")\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\tif ($file->isExists() && $file->isReadable())\n\t\t\t\t\t{\n\t\t\t\t\t\t$fileContent = $file->getContents();\n\t\t\t\t\t}\n\t\t\t\t\telseif ($fileUrl[\"scheme\"])\n\t\t\t\t\t{\n\t\t\t\t\t\t$req = new \\CHTTP();\n\t\t\t\t\t\t$req->http_timeout = 20;\n\t\t\t\t\t\t$fileContent = $req->Get($cssFilePath);\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($fileContent != false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$cssFileRelative = new \\Bitrix\\Main\\IO\\File($cssFilePath);\n\t\t\t\t\t\t$cssPath = $cssFileRelative->getDirectoryName();\n\t\t\t\t\t\tpreg_match_all($findImageRegexp, $fileContent, $match);\n\t\t\t\t\t\t$matchCount = count($match[3]);\n\t\t\t\t\t\tfor ($k = 0; $k < $matchCount; $k++)\n\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t$file = self::replaceUrlCSS($match[3][$k], addslashes($cssPath));\n\n\t\t\t\t\t\t\tif (!in_array($file, $files) && !mb_strpos($file, \";base64\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$fileData[\"FULL_FILE_LIST\"][] = $files[] = $file;\n\t\t\t\t\t\t\t\t$fileData[\"CSS_FILE_IMAGES\"][$cssFilePath][] = $file;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$fileData[\"CSS_FILE_IMAGES\"][$cssFilePath] = $manifestCache[\"FILE_DATA\"][\"CSS_FILE_IMAGES\"][$cssFilePath];\n\t\t\t\t\tif (is_array($manifestCache[\"FILE_DATA\"][\"CSS_FILE_IMAGES\"][$cssFilePath]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$fileData[\"FULL_FILE_LIST\"] = array_merge($fileData[\"FULL_FILE_LIST\"], $manifestCache[\"FILE_DATA\"][\"CSS_FILE_IMAGES\"][$cssFilePath]);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\treturn $fileData;\n\t}", "title": "" }, { "docid": "317cb3803b387f3796df7a8e307b1ae1", "score": "0.5015193", "text": "public function parse(array $content, string $model): array\n {\n $parsedResponse = $content;\n\n switch ($model) {\n case Response::MODEL_ERROR_DEV:\n case Response::MODEL_ERROR:\n $parsedResponse = $this->parseError($content);\n break;\n\n case Response::MODEL_SESSION:\n $parsedResponse = $this->parseSession($content);\n break;\n case Response::MODEL_SESSION_LIST:\n $parsedResponse = $this->parseSessionList($content);\n break;\n\n case Response::MODEL_FILE:\n $parsedResponse = $this->parseFile($content);\n break;\n case Response::MODEL_FILE_LIST:\n $parsedResponse = $this->parseFileList($content);\n break;\n\n case Response::MODEL_FUNCTION:\n $parsedResponse = $this->parseFunction($content);\n break;\n case Response::MODEL_FUNCTION_LIST:\n $parsedResponse = $this->parseFunctionList($content);\n break;\n\n case Response::MODEL_DEPLOYMENT:\n $parsedResponse = $this->parseDeployment($content);\n break;\n case Response::MODEL_DEPLOYMENT_LIST:\n $parsedResponse = $this->parseDeploymentList($content);\n break;\n\n case Response::MODEL_EXECUTION:\n $parsedResponse = $this->parseExecution($content);\n break;\n case Response::MODEL_EXECUTION_LIST:\n $parsedResponse = $this->parseExecutionList($content);\n break;\n\n case Response::MODEL_USAGE_BUCKETS:\n $parsedResponse = $this->parseUsageBuckets($content);\n break;\n\n case Response::MODEL_USAGE_STORAGE:\n $parsedResponse = $this->parseUsageStorage($content);\n break;\n\n case Response::MODEL_TEAM:\n $parsedResponse = $this->parseTeam($content);\n break;\n case Response::MODEL_TEAM_LIST:\n $parsedResponse = $this->parseTeamList($content);\n break;\n\n case Response::MODEL_DOCUMENT_LIST:\n case Response::MODEL_COLLECTION_LIST:\n case Response::MODEL_INDEX_LIST:\n case Response::MODEL_USER_LIST:\n case Response::MODEL_LOG_LIST:\n case Response::MODEL_BUCKET_LIST:\n case Response::MODEL_MEMBERSHIP_LIST:\n case Response::MODEL_RUNTIME_LIST:\n case Response::MODEL_BUILD_LIST:\n case Response::MODEL_PROJECT_LIST:\n case Response::MODEL_WEBHOOK_LIST:\n case Response::MODEL_KEY_LIST:\n case Response::MODEL_PLATFORM_LIST:\n case Response::MODEL_DOMAIN_LIST:\n case Response::MODEL_COUNTRY_LIST:\n case Response::MODEL_CONTINENT_LIST:\n case Response::MODEL_LANGUAGE_LIST:\n case Response::MODEL_CURRENCY_LIST:\n case Response::MODEL_PHONE_LIST:\n case Response::MODEL_METRIC_LIST:\n case Response::MODEL_ATTRIBUTE_LIST:\n $parsedResponse = $this->parseList($content);\n break;\n }\n\n return $parsedResponse;\n }", "title": "" }, { "docid": "e7fd7822576f874176e0d3a9d2e444d6", "score": "0.5014768", "text": "public function contentType() {\r\n\t\t$this->_request();\r\n\t\treturn $this->_contentType;\r\n\t}", "title": "" }, { "docid": "3fcf6d4ce6558ff71c47d3cfcf4522ac", "score": "0.5014424", "text": "public function getClientMimeType();", "title": "" }, { "docid": "e6c61c398f6f1488a74f8229f90214d4", "score": "0.5014182", "text": "public static function getAcceptHeaderScenarios()\n {\n # input / expected\n return [\n['application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"',\n true ], # Allowed\n['application/activity+json', true ], # Allowed\n['*/*', true ], # Allowed\n['application/json', false ], # Refused\n[[\n 'application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"',\n 'application/json'\n], true ], # Allowed (array input)\n[[\n 'application/pdf',\n 'application/json'\n], false ], # Refused (array input)\n \n ];\n\t}", "title": "" }, { "docid": "3fa104b4ba5e59503d18ed3b2ddcbfd7", "score": "0.50105834", "text": "static function fromContentType($ct, $headers, $body)\n\t{\n\t\t// get content-type (text/plain, text/html, multipart/*, etc.)\n\t\t$contentType = self::decodeHeader($ct);\n\t\t\n\t\t\n\t\t// handle recursively depending on content-type\n\t\tswitch ( $contentType )\n\t\t{\n\t\t\tcase 'text/plain' : \n\t\t\tcase 'text/html' : \n\t\t\t\t// decode body text content depending on its transfer-encoding header\n\t\t\t\t$decodedBody = self::decodeBody($body, self::decodeHeader($headers['Content-Transfer-Encoding']));\n\t\t\t\tif (!$decodedBody )\n\t\t\t\t\treturn NULL;\n\t\t\t\t\t\n\t\t\t\t// maybe we need to decode the charset to utf-8\n\t\t\t\t$decodedBody = self::decodeCharsetFromContentTypeHeader($decodedBody, $ct);\n\t\t\t\tif (!$decodedBody )\n\t\t\t\t\treturn NULL;\n\n\t\t\t\t// get the MailContent object with extracted/converted body, headers and contenttype\n\t\t\t\treturn self::decodeContent($decodedBody, $headers, $contentType);\n\n\n\t\t\tcase 'multipart/alternative' : \n\t\t\tcase 'multipart/mixed' : \n\t\t\tcase 'multipart/related' : \n\t\t\t\t\n\t\t\t\t// if multipart, we must read the boundary parameter\n\t\t\t\t$boundary = self::decodeHeader($ct, 'boundary');\n\t\t\t\tif ( !$boundary )\n\t\t\t\t\treturn self::_error(\"Error when extracting boundary from '$contentType'.\");\n\t\t\t\t\n\t\t\t\t\n // decoding the multipart ; when splitting, we get 3 values (even if the multipart has 2 parts, a content and a attachment, for example), because\n // the body of the multipart begin with the boundary (=separator for splitting). We ignore this empty value.\n // we know that the last boundary separator ends with '--', and that after each separator line, there's a carriage return. We delete only this\n // newline (except if last separator ending with --). We know that the newline can be \\n or \\r\\n\n\t\t\t\t$parts = preg_split(\"/--{$boundary}(--)?[\\\\r]?[\\\\n]?/\", $body);\n\t\t\t\tif ( count($parts) < 3 )\n\t\t\t\t\treturn self::_error(\"Decoding of '$contentType' is impossible because of the unsupported parts number (1).\");\n\n\t\t\t\t// skip first empty\n\t\t\t\t$parts = array_slice($parts, 1);\n\t\t\t\t\n\t\t\t\t// for all parts (may be 2 or more, for example if we have several attachments)\n\t\t\t\tforeach ( $parts as $k=>$part )\n\t\t\t\t{\n\t\t\t\t\t// if part empty, we are done (we are dealing with the empty line after last separator)\n\t\t\t\t\tif ( trim($part) == '' )\n\t\t\t\t\t{\n\t\t\t\t\t\tunset($parts[$k]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t// decode this part ; detect an error and break process if an error occured\n\t\t\t\t\t$partObject = EmlReader::fromString($part);\n\t\t\t\t\tif ( !$partObject )\n\t\t\t\t\t\treturn NULL;\n\t\t\t\t\t\t\n\t\t\t\t\t$parts[$k] = $partObject;\n\t\t\t\t}\n\n\t\t\t\tif ( count($parts) < 2 )\n\t\t\t\t\treturn self::_error(\"Decoding of '$contentType' is impossible because of the unsupported parts number (2).\");\n\t\t\t\t\t\n\t\t\t\treturn MailMultipart::fromSingleArray(substr(strstr($contentType, '/'), 1), $parts);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t// default case, decode with the transfer-encoding\n\t\t\tdefault:\n\t\t\t\t$decodedBody = self::decodeBody($body, self::decodeHeader($headers['Content-Transfer-Encoding']));\n\t\t\t\tif ( !$decodedBody )\n\t\t\t\t\treturn NULL;\n\t\t\t\t\t\n\t\t\t\t// decoding content\n\t\t\t\treturn self::decodeContent($decodedBody, $headers, $contentType);\n\t\t}\n\t}", "title": "" }, { "docid": "6f40f00496a2435d23db84b5548eda7b", "score": "0.5010181", "text": "private function contentTypes()\n\t{\n\t\treturn array_keys($this->view);\n\t}", "title": "" }, { "docid": "7fdb4e92cc187e013166b5bf61243db2", "score": "0.5005802", "text": "function http_get_request_body_stream () {}", "title": "" }, { "docid": "4742cdd9c4c801355359d45a8e583217", "score": "0.5005201", "text": "protected function parseRequestBody(){\n\t\t\n\t\t$body = file_get_contents ( 'php://input' );\n\t\tif ($this->debug) {\n\t\t\techo \"[[[[ \" , print_r ( $body, true ), \" ]]]] \";\n\t\t}\n\t\t\n\t\t// empty body not allowed\n\t\tif( empty(trim( $body ))){\n\t\t\terror_400();\n\t\t}\n\t\t\n\t\t$output = array ();\n\t\t\n\t\t// JSON Request\n\t\tif (in_array ( $this->http_content_type, self::$content ['json'] )) {\n\t\t\t$output = $this->Json2Array( $body );\n\t\t}\t\t\n\n\t\t// XML Request\n\t\telseif (in_array ( $this->http_content_type, self::$content ['xml'] )) {\n\t\t\t$output = $this->Xml2Array ( $body );\n\t\t} \t\t\n\n\t\t// Text Request (application/x-www-form-urlencoded)\n\t\telse {\n\t\t\t$output = $this->Form2Array ( $body );\n\t\t}\n\t\t\n\t\tif ($this->debug) {\n\t\t\techo \"[[[[ \" , print_r ( $output, true ), \" ]]]] \";\n\t\t}\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "f1f30ecdbb79e703e681388e59070ac8", "score": "0.49894446", "text": "function http_send_content_type ($content_type = null) {}", "title": "" }, { "docid": "14ab37b70969bc8b8ea047d69e7d5cd2", "score": "0.49860704", "text": "public function getContentType()\n {\n return $this->getHeaders()->get(Headers::CONTENT_TYPE);\n }", "title": "" }, { "docid": "56659a6f3d700402f4d369f594816af8", "score": "0.4981656", "text": "private function _mime_content_type($filename)\n {\n $result = new finfo();\n \n return $result->file($filename, FILEINFO_MIME_TYPE);\n }", "title": "" }, { "docid": "c2e3d22911c75bff17f42478d942e539", "score": "0.49791944", "text": "function parse_headers($content) {\n $matches = $headers = array();\n\n preg_match_all(POST_PROP_REGEXP, $content, $matches);\n\n foreach ($matches[1] as $key => $prop) {\n $val = $matches[2][$key];\n\n if ($prop == \"DATE\")\n $val = DateTime::createFromFormat(\"<Y-m-d>\", $matches[2][$key]);\n else if ($prop == \"TAGS\")\n $val = array_map('strtolower', array_map('trim', explode(\",\", $matches[2][$key])));\n\n $headers[strtolower($prop)] = $val;\n }\n\n return $headers;\n}", "title": "" }, { "docid": "678d3ed40edecbcea94d8ebd64b2029d", "score": "0.49786714", "text": "public function getContentType(){\r\n return $this->contentType;\r\n }", "title": "" }, { "docid": "678d3ed40edecbcea94d8ebd64b2029d", "score": "0.49786714", "text": "public function getContentType(){\r\n return $this->contentType;\r\n }", "title": "" }, { "docid": "830b25d26d1536afa174e9feaca03602", "score": "0.4966677", "text": "protected function getProcessedContent() {\n $content = array(\n 'success' => $this->success,\n 'data' => $this->data\n );\n \n foreach (array('data','message','errors') as $paramName) {\n if (!is_null($this->{$paramName}))\n $content[$paramName] = $this->{$paramName};\n }\n \n if (is_array($this->extraParams))\n $content = array_merge($content, $this->extraParams);\n \n $this->content = $content;\n \n if ($this->outputFormat == 'json') {\n if ($this->outputFlags && defined('JSON_NUMERIC_CHECK'))\n return json_encode($this->content, $this->outputFlags);\n elseif ($this->outputFlags == 'JSON_NUMERIC_CHECK')\n return json_encode($this->jsonNumericCheck($this->content));\n \n return json_encode($this->content);\n }\n else\n throw new Exception('Unsupported output format');\n }", "title": "" }, { "docid": "057e72d9154818b2dfbe0a7ff5d29778", "score": "0.4965799", "text": "public function getAllowedContentTypes() {\n\t\treturn array_keys($this->allow_content_types);\n\t}", "title": "" }, { "docid": "14e22c72d7cf32a492053e9230d4d303", "score": "0.4963969", "text": "protected function parse() {\n if ($this->method == 'POST') {\n $concepts = array();\n $attributes = array();\n $include = array();\n if(isset($this->request['concepts'])) $concepts = $this->request['concepts'];\n if(isset($this->request['attributes'])) $attributes = $this->request['attributes'];\n if(isset($this->request['include'])) $include = $this->request['include'];\n\n if(isset($this->request['fileId']))\n {\n $text = $_SESSION['files'][$this->request['fileId']]['contents'];\n }\n else $text = $this->request['text'];\n\n $parser = new Parser($text, false, $concepts, $attributes, $include);\n\n return $parser->toArray();\n } else {\n return array('error' => 'Only accepts POST requests');\n }\n }", "title": "" }, { "docid": "d54403739af9cc73b38d5fb4f05f63ef", "score": "0.49493384", "text": "public static function getContentType()\n {\n return ['a21glossary', 'main'];\n }", "title": "" }, { "docid": "4edf1a468b070a8877473d26e072c044", "score": "0.4946302", "text": "private function adjustResponseContentType()\n {\n $content_type = $this->data->get('content_type', 'html');\n\n // If it's html, we don't need to continue.\n if ($content_type === 'html') {\n return;\n }\n\n // Translate simple content types to actual ones\n switch ($content_type) {\n case 'xml':\n $content_type = 'text/xml';\n break;\n case 'atom':\n $content_type = 'application/atom+xml; charset=UTF-8';\n break;\n case 'json':\n $content_type = 'application/json';\n break;\n case 'text':\n $content_type = 'text/plain';\n }\n\n // Adjust the response\n $this->response->header('Content-Type', $content_type);\n }", "title": "" }, { "docid": "df137bfa7345bd9eead1a844a87ec652", "score": "0.49462628", "text": "#[ArrayShape([\"timed_out\" => \"bool\", \"blocked\" => \"bool\", \"eof\" => \"bool\", \"unread_bytes\" => \"int\", \"stream_type\" => \"string\", \"wrapper_type\" => \"string\", \"wrapper_data\" => \"mixed\", \"mode\" => \"string\", \"seekable\" => \"bool\", \"uri\" => \"string\", \"crypto\" => \"array\", \"mediatype\" => \"string\"])]\nfunction stream_get_meta_data($stream): array {}", "title": "" }, { "docid": "d0895f0cc157b90e57c341a4c3d324fc", "score": "0.49425867", "text": "public function getContentType()\n {\n return $this->getHttpHeader('Content-Type', $this->options['content_type']);\n }", "title": "" }, { "docid": "5edd038bde67f32af9cdd7e455c43056", "score": "0.49165803", "text": "private function getContentType($response)\n {\n $contentTypeStr = \"Content-Type\";\n if (isset($response->headers) && isset($response->headers[$contentTypeStr])) {\n return $response->headers[$contentTypeStr];\n }\n\n return false;\n }", "title": "" }, { "docid": "34cbbfb505be3c043d2cfba3e3279e85", "score": "0.4916337", "text": "public function getFileInfo($filePath)\n {\n $fileInfo = finfo_open(FILEINFO_MIME_TYPE);\n $contentType = finfo_file($fileInfo, $filePath);\n finfo_close($fileInfo);\n if ($contentType === false) {\n $contentType = 'application/octet-stream';\n } elseif (($contentType == 'text/plain') && (strtolower(pathinfo($filePath, PATHINFO_EXTENSION)) == 'json')) {\n $contentType = 'application/json';\n }\n\n set_error_handler(function($errno, $errstr, $errfile, $errline, array $errcontext) {\n if (0 === error_reporting()) {\n return false;\n }\n throw new \\ErrorException($errstr, 0, $errno, $errfile, $errline);\n });\n try {\n $fileSize = filesize($filePath);\n } catch (\\ErrorException $e) {\n $fileSize = false;\n }\n restore_error_handler();\n\n return array($fileSize, $contentType);\n }", "title": "" }, { "docid": "8aeb379a2de7e54e6006b801d35e85ec", "score": "0.4907583", "text": "public function testGetTypeToExt() {\n\t\t$expected = [\n\t\t\t'application/postscript' => 'ai',\n\t\t\t'application/x-amf' => 'amf',\n\t\t\t'application/atom+xml' => 'atom',\n\t\t\t'application/csv' => 'csv',\n\t\t\t'application/vnd.ms-excel' => 'csv',\n\t\t\t'application/msword' => ['doc', 'dot'],\n\t\t\t'application/xml-dtd' => 'dtd',\n\t\t\t'application/ecmascript' => ['ecma', 'ecmascript'],\n\t\t\t'application/octet-stream' => 'exe',\n\t\t\t'application/x-www-form-urlencoded' => 'form',\n\t\t\t'application/x-gzip' => ['gz', 'gzip'],\n\t\t\t'application/json' => 'json',\n\t\t\t'application/ogg' => 'ogg',\n\t\t\t'application/pdf' => 'pdf',\n\t\t\t'application/x-rar-compressed' => 'rar',\n\t\t\t'application/rdf+xml' => 'rdf',\n\t\t\t'application/rtf' => 'rtf',\n\t\t\t'application/rss+xml' => 'rss',\n\t\t\t'application/soap+xml' => 'soap',\n\t\t\t'application/x-shockwave-flash' => 'swf',\n\t\t\t'application/x-tar' => 'tar',\n\t\t\t'application/x-font-ttf' => 'ttf',\n\t\t\t'application/font-woff' => 'woff',\n\t\t\t'application/xhtml+xml' => 'xhtml',\n\t\t\t'application/xhtml' => 'xhtml',\n\t\t\t'application/vnd.wap.xhtml+xml' => 'xhtml-mobile',\n\t\t\t'application/zip' => 'zip',\n\t\t\t'application/x-zip' => 'zip',\n\t\t\t'audio/mpeg' => ['mp3', 'mpeg'],\n\t\t\t'audio/mp4' => 'mp4',\n\t\t\t'audio/ogg' => 'ogg',\n\t\t\t'audio/vorbis' => 'vorbis',\n\t\t\t'audio/x-wav' => 'wav',\n\t\t\t'audio/vnd.wave' => 'wav',\n\t\t\t'audio/webm' => 'webm',\n\t\t\t'image/bmp' => 'bmp',\n\t\t\t'image/gif' => 'gif',\n\t\t\t'image/jpeg' => ['jpg', 'jpe', 'jpeg'],\n\t\t\t'image/pjpeg' => 'pjpeg',\n\t\t\t'image/x-icon' => 'ico',\n\t\t\t'image/vnd.microsoft.icon' => 'ico',\n\t\t\t'image/png' => 'png',\n\t\t\t'image/svg+xml' => 'svg',\n\t\t\t'image/tiff' => 'tiff',\n\t\t\t'multipart/alternative' => 'alternative',\n\t\t\t'multipart/encrypted' => 'encrypted',\n\t\t\t'multipart/form-data' => 'file',\n\t\t\t'multipart/mixed' => 'mixed',\n\t\t\t'multipart/related' => 'related',\n\t\t\t'multipart/signed' => 'signed',\n\t\t\t'text/css' => 'css',\n\t\t\t'text/csv' => 'csv',\n\t\t\t'text/plain' => ['csv', 'text', 'txt'],\n\t\t\t'text/html' => ['htm', 'html'],\n\t\t\t'*/*' => 'html',\n\t\t\t'text/javascript' => 'javascript',\n\t\t\t'text/vcard' => 'vcard',\n\t\t\t'text/x-vcard' => 'vcf',\n\t\t\t'text/xml' => 'xml',\n\t\t\t'video/x-flv' => 'flv',\n\t\t\t'video/x-matroska' => 'matroska',\n\t\t\t'video/mpeg' => ['mp3', 'mpeg'],\n\t\t\t'video/mp4' => 'mp4',\n\t\t\t'video/quicktime' => ['mov', 'qt'],\n\t\t\t'video/ogg' => 'ogg',\n\t\t\t'video/webm' => 'webm',\n\t\t\t'video/x-ms-wmv' => 'wmv',\n\t\t];\n\n\t\t$this->assertEquals($expected, Mime::getTypeToExt());\n\t\t$this->assertEquals(['jpg', 'jpe', 'jpeg'], Mime::getTypeToExt('image/jpeg'));\n\t}", "title": "" }, { "docid": "ff190cfd2f9d7d36728f3768b913f854", "score": "0.48987842", "text": "public static function getContentDisposition () {}", "title": "" }, { "docid": "984738625dcb6d3bdc2407b1df01a3cc", "score": "0.48957387", "text": "public function getContentType(): string\n {\n return $this->getLine('content-type');\n }", "title": "" }, { "docid": "93870ab9c91c5e0722c574b858071df4", "score": "0.489214", "text": "protected function get_contenttype_from_header() {\n if (!isset($this->responseheaders['Content-Type'])) {\n return '';\n }\n $contenttype = explode(';', $this->responseheaders['Content-Type']);\n return trim($contenttype[0]);\n }", "title": "" }, { "docid": "a14d702a25dceff0f4a2439fc2d7b323", "score": "0.48908743", "text": "protected static function parseContentType($value) : array\n {\n if (is_scalar($value))\n {\n @list($type, $charset) = explode(';', $value, 2);\n $charset = explode('=', $charset);\n return [\n 'type' => trim($type),\n 'charset' => isset($charset[1]) ? trim($charset[1]) : ''\n ];\n }\n if (is_array($value))\n {\n return [\n 'type' => isset($value['type']) ? trim($value['type']) : '',\n 'charset' => isset($value['charset']) ? trim($value['charset']) : ''\n ];\n }\n throw new \\InvalidArgumentException(sprintf(static::ERR_HEADERBAG_3, gettype($value))); \n }", "title": "" }, { "docid": "ebe5767aaeda7c73361b861e656a8407", "score": "0.48846927", "text": "private function getContentType($request)\n {\n $contentTypeStr = \"Content-Type\";\n if (isset($request->headers) && isset($request->headers[$contentTypeStr])) {\n return $request->headers[$contentTypeStr];\n }\n\n return false;\n }", "title": "" }, { "docid": "33db158f1103106a0deb3db5084860ee", "score": "0.4884009", "text": "public function getContentType()\n\t{\n\t\treturn $this->mime;\n\t}", "title": "" }, { "docid": "be795268f6ede1e94c16bc39eccea21e", "score": "0.48824486", "text": "protected static function compressResponse( $content, $type ){\r\n\t\tswitch( $type ){\r\n\t\t\tcase 'deflate':\r\n\t\t\t\t$content\t= gzcompress( $content );\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'gzip':\r\n\t\t\t\t$content\t= gzencode( $content );\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t}\r\n\t\treturn $content;\r\n\t}", "title": "" }, { "docid": "2b1ac503e085cdbb53490c9f90ea717f", "score": "0.48755807", "text": "private function getContentType(): string\r\n {\r\n $contentType = curl_getinfo($this->handle, CURLINFO_CONTENT_TYPE);\r\n\r\n if ($contentType === null) {\r\n return '';\r\n }\r\n\r\n $endPosition = strpos($contentType, ';');\r\n\r\n if ($endPosition === false) {\r\n return $contentType;\r\n }\r\n\r\n return substr($contentType, 0, $endPosition) ?? '';\r\n }", "title": "" } ]
d25aac1460af4d5842967f67a6815f99
Returns user credentials object If module ID is passed, return credentials only for that module, otherwise return an array of credential objects Example $user = User::require_login(); $creds = $user>getUserCredentials('twitter'); $result = $creds>makeOAuthRequest(' 'GET');
[ { "docid": "b7d24e21f5191fae797f4b3864206316", "score": "0.6576214", "text": "public function getUserCredentials($requested_module_id = null) {\n\t\t$credentials = array();\n\n\t\tforeach (UserConfig::$authentication_modules as $module) {\n\t\t\tif (is_null($requested_module_id)) {\n\t\t\t\t$credentials[$module][] = $module->getUserCredentials($this);\n\t\t\t} else {\n\t\t\t\tif ($requested_module_id == $module->getID()) {\n\t\t\t\t\treturn $module->getUserCredentials($this);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $credentials;\n\t}", "title": "" } ]
[ { "docid": "67e57183ba56d5b84fbacc65c09e5d27", "score": "0.6093215", "text": "public function getCredentials();", "title": "" }, { "docid": "6925514fa9924ac170e659e5b99afa52", "score": "0.58794695", "text": "public function getCredentials(): OAuthCredentials\n {\n return $this->credentials;\n }", "title": "" }, { "docid": "44fa968c52f46ca824cb1a9f0308155b", "score": "0.5846988", "text": "abstract public function getUserCredentials($user);", "title": "" }, { "docid": "7f92ba8bb84190e2be7db5111ffc70b1", "score": "0.5825899", "text": "private function getOAuthCredentials()\n {\n return array(\n 'grant_type' => 'password',\n 'client_id' => $this->server['config']->get('client_id'),\n 'client_secret' => $this->server['config']->get('client_secret'),\n );\n }", "title": "" }, { "docid": "8e1b977634be9e9d3171bd66d78e15a6", "score": "0.5763155", "text": "public function getCredentials()\n {\n return $this->provider . '_' . $this->oAuthId;\n }", "title": "" }, { "docid": "eef2f428177f9049575d6e9ba4c149c3", "score": "0.57143825", "text": "public function credentials()\n {\n return $this->getUsers()\n ->reject(function ($user) {\n return $user->tokens()->get()->isEmpty();\n })->map(function ($user) {\n $plainTextToken = Str::random(80);\n // override the latest access token.\n $token = tap($user->tokens()->latest()->first(), function ($token) use ($plainTextToken) {\n $token->update(['token' => hash('sha256', $plainTextToken)]);\n });\n\n return new CredentialResult($token->name, $plainTextToken);\n })->values();\n }", "title": "" }, { "docid": "1c9307e65a0f5d9c493794268300cf4c", "score": "0.5696709", "text": "public static function get($id) {\n\t\tforeach (UserConfig::$authentication_modules as $module) {\n\t\t\tif ($module->getID() == $id) {\n\t\t\t\treturn $module;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "45668f6ccd8178203714bec99b5e38f1", "score": "0.56785893", "text": "public function retrieveWebAuthnCredential($id)\n {\n return $this->start()->uri(\"/api/webauthn\")\n ->urlSegment($id)\n ->get()\n ->go();\n }", "title": "" }, { "docid": "39b33bb6c506902e4104c445a9be33fb", "score": "0.56721455", "text": "public function GetRepositoryCredentials()\n {\n if (is_null($this->Credentials)) {\n if (!$this->Id) {\n return false;\n }\n\n $sql = 'SELECT credential FROM user2repository WHERE userid = :id';\n $stmt = $this->PDO->prepare($sql);\n $stmt->bindParam(':id', $this->Id);\n if ($this->PDO->execute($stmt)) {\n $this->Credentials = $stmt->fetchAll(\\PDO::FETCH_COLUMN);\n }\n }\n return $this->Credentials;\n }", "title": "" }, { "docid": "98234cb3a835f7d5a269756c8ff56744", "score": "0.56480885", "text": "public function getUser($module, $id = false)\r\n\t\t{\r\n\t\t\tif($module == 'list')\r\n\t\t\t{\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\t$req = $this->dao->query('SELECT * FROM utilisateur');\r\n\t\t\t\t\t$req->setFetchMode(\\PDO::FETCH_CLASS | \\PDO::FETCH_PROPS_LATE, '\\Entity\\Membre');\r\n\t\t\t\t\t$req->execute();\r\n\t\t\t\t\t$rs = $req->fetchAll();\r\n\t\t\t\t\treturn $rs;\r\n\t\t\t\t}\r\n\t\t\t\tcatch(MyError $e)\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->setError($e->getMessage());\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "f7105b384a8d154d0ee8534ead6416bd", "score": "0.5617009", "text": "function GetCrediteds()\n\t{\n\t\t$result = $this->sendRequest(\"GetCrediteds\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "title": "" }, { "docid": "e5f4f20884541757e9365712e2828785", "score": "0.5599302", "text": "public function getCredentials()\n { return $this->get('credentials'); }", "title": "" }, { "docid": "33cfe7cb4f06bfa4bc052f944288366a", "score": "0.55825174", "text": "protected function loadModuleCredentials() {\n\t\t$moduleCredentials = ModuleConfigLoader::getInstance()->getConfig(ConfigLoader::CREDENTIALS,self::MODULE_CREDENTIALS_REQUIRED);\n\t\tif(is_array($moduleCredentials)) {\n\t\t\t$this->assignCredentials($moduleCredentials);\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "bca16929d74e23485130cf218d44ba5f", "score": "0.55812186", "text": "public function credentials($user);", "title": "" }, { "docid": "0eb9c98b2abfef8ea6f93361d6c74c7d", "score": "0.551456", "text": "public function retrieveWebAuthnCredentialsForUser($userId)\n {\n return $this->start()->uri(\"/api/webauthn\")\n ->urlParameter(\"userId\", $userId)\n ->get()\n ->go();\n }", "title": "" }, { "docid": "ddf131d4e39c94564f81d8f487aa7ef5", "score": "0.5509232", "text": "public function getCredentialsForContext()\n {\n $token = $this->_scopeConfig->getValue(\n self::TOKEN,\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n $secret = $this->_scopeConfig->getValue(\n self::SECRET,\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n return [$token, $secret];\n }", "title": "" }, { "docid": "7e0a574f1b227cd5997e298263dd2061", "score": "0.5486613", "text": "public function getUserCredential()\n {\n return $this->userCredentials;\n }", "title": "" }, { "docid": "b11e3488617912dd32afd8ce304594b8", "score": "0.54713833", "text": "public function getCredential($id)\n {\n $res = $this->db->select(\"SELECT * FROM `{$this->domainCredential}` WHERE itemName()='{$id}' AND status='1'\", array('ConsistentRead' => 'true'));\n $this->logErrors($res);\n if(isset($res->body->SelectResult->Item))\n return self::normalizeCredential($res->body->SelectResult->Item);\n else\n return false;\n }", "title": "" }, { "docid": "2828a3966f2243729c81643c8d3ccc70", "score": "0.5467996", "text": "function login_oauth(&$oauth_id, &$provider)\n{\n\tglobal $db;\n\n $oauth_column = 'pf_'.$provider.'_id';\n\n\tif (!$oauth_id)\n\t{\n\t\treturn array(\n\t\t\t'status'\t=> LOGIN_ERROR_USERNAME,\n\t\t\t'error_msg'\t=> 'NO_ERROR_OAUTH',\n\t\t\t'user_row'\t=> array('user_id' => ANONYMOUS),\n\t\t);\n\t}\n\n\t$sql = 'SELECT user_id FROM '.PROFILE_FIELDS_DATA_TABLE.' WHERE '.$oauth_column. \" = '\" .$oauth_id .\"'\";\n\t$result = $db->sql_query($sql);\n\t$row = $db->sql_fetchrow($result);\n\t$db->sql_freeresult($result);\n\t\n\tif (sizeof($row) > 0) \n {\t\n\t\treturn array(\n\t\t\t'status'\t\t=> LOGIN_SUCCESS,\n\t\t\t'error_msg'\t\t=> false,\n\t\t\t'user_row'\t\t=> $row,\n\t\t);\n\t} \n else \n {\n\t\treturn array(\n\t\t\t'status'\t=> LOGIN_ERROR_USERNAME,\n\t\t\t'error_msg'\t=> 'LOGIN_ERROR_USERNAME',\n\t\t\t'user_row'\t=> array('user_id' => ANONYMOUS),\n\t\t);\n\t}\t\n}", "title": "" }, { "docid": "1a963d1d2ca707fc2367267a34d83955", "score": "0.5395348", "text": "public function getUser($credentials, UserProviderInterface $userProvider)\n {\n\t \n }", "title": "" }, { "docid": "a3ffebd6ec47e71a01e914eb1b903e98", "score": "0.5379836", "text": "public function getCredentials(): ?object;", "title": "" }, { "docid": "c38568caabaad964b7ffee4805092c67", "score": "0.53684324", "text": "public function getCredentials() {\n return array(\n 'access' => $this->getCredential('access'),\n 'secret' => $this->getCredential('secret'),\n );\n }", "title": "" }, { "docid": "28e6f2f853398e960f489d8bd203f205", "score": "0.53661877", "text": "public function getAccessTokenByCredentials()\n {\n $data = [\n 'client_id' => $this->oauth_client_id,\n 'client_secret' => $this->oauth_client_secret,\n 'grant_type' => 'client_credentials',\n ];\n return $this->sendRequest($this->oauth_access_token_url, $data);\n }", "title": "" }, { "docid": "aff263b8f749269607b5d286ad511b72", "score": "0.53635496", "text": "public function getCredential()\n {\n /* 1: Try to load session identity */\n $identitySession = self::getPersistentSessionIdentity();\n try {\n return $identitySession->getRelatedObjects( $this, 'GauffrCredential' );\n }\n\n /* 2: Use query */\n catch (ezcPersistentIdentityMissingException $e) {\n $session = self::getPersistentSessionInstance();\n return $session->getRelatedObjects( $this, 'GauffrCredential' );\n }\n }", "title": "" }, { "docid": "246c7ccf8c9f739ca73566bca746fecf", "score": "0.53389585", "text": "protected function getCredentialObject()\n {\n if(isset($this->credential))\n return $this->credential;\n\n $this->credential = new Credential;\n return $this->credential;\n }", "title": "" }, { "docid": "2ce21bf1449cda358a934562c9618761", "score": "0.53301823", "text": "function getCredentials()\n {\n return $this->sf1Token->getCredentials();\n }", "title": "" }, { "docid": "8e1c45942bb3af43662a92efe343f7b4", "score": "0.5323042", "text": "public function get_creditor($creditor_id)\n\t{\n\t\t//retrieve all users\n\t\t$this->db->from('creditor');\n\t\t$this->db->select('*');\n\t\t$this->db->where('creditor_id = '.$creditor_id);\n\t\t$query = $this->db->get();\n\t\t\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "c16e82a4d1f001377eaec1f3bdfd692a", "score": "0.5320223", "text": "public function getCredentials()\n {\n if ($this->login) return array( $this->login, $this->password);\n\n //Using static PureBilling as fallback\n if (class_exists('\\PureBilling') && \\PureBilling::getPrivateKey()) {\n return array('api', \\PureBilling::getPrivateKey());\n }\n }", "title": "" }, { "docid": "d2d83003ce8a850e653c91712d235caf", "score": "0.53041875", "text": "public function getCredentials() {\r\n\t\t\r\n\t\treturn $this->_credentials;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "5a4301df8f1ae7e3ca8c4dd5dee1e42c", "score": "0.5291553", "text": "public function getUserCredentials() {\n $rawUsername;\n $rawPassword;\n\n if ($this->userRequest->registrationPOST()) {\n $rawUsername = \n $this->userRequest->getRegisterUsername();\n $rawPassword =\n $this->userRequest->getRegisterPassword();\n }\n\n if ($this->userRequest->wantsToLogIn()) {\n $rawUsername =\n $this->userRequest->getLoginUsername();\n $rawPassword =\n $this->userRequest->getLoginPassword();\n }\n\n $userCredentials = new UserCredentials($rawUsername, $rawPassword);\n\n return $userCredentials;\n }", "title": "" }, { "docid": "02b3c99b03e7b5dfcb507f223efc94a9", "score": "0.52587926", "text": "function getUserInfo($credentials) {\n $apiClient = new Google_Client();\n $apiClient->setUseObjects(true);\n $apiClient->setAccessToken($credentials);\n $userInfoService = new Google_Oauth2Service($apiClient);\n $userInfo = null;\n try {\n $userInfo = $userInfoService->userinfo->get();\n } catch (Google_Exception $e) {\n print 'An error occurred: ' . $e->getMessage();\n }\n if ($userInfo != null && $userInfo->getId() != null) {\n return $userInfo;\n } else {\n throw new NoUserIdException();\n }\n }", "title": "" }, { "docid": "c5172c801a53d510e80c4fb4dbcbcd71", "score": "0.5238669", "text": "public function getCredentials() {\n return array(\n 'username' => $this->username,\n 'password' => $this->password,\n );\n }", "title": "" }, { "docid": "200fdbe352083754a7826d9d15195016", "score": "0.52101827", "text": "function getByModule($id_module){\n\t}", "title": "" }, { "docid": "a2ee2265a3f2b009946e2563d2a35d6a", "score": "0.5208248", "text": "public function getCredentials() {\n\t\t\n\t\treturn $this->_getResponse(self::URL_USERS_VERIFY_CREDENTIALS, $this->_query);\n\t}", "title": "" }, { "docid": "33933d6f90e5f5129501b8b9136e2a1f", "score": "0.51919746", "text": "public function getOauth()\n {\n return $this->oauth;\n }", "title": "" }, { "docid": "8f20e23cb24b5de89becb84799c31d8e", "score": "0.51786166", "text": "public function getCredential ()\n\t{\n\t\t$retVal = null;\n\t\tif ($this->isConsole()) {\n\t\t\t$retVal = MO_CONSOLE_CREDENTIAL;\n\t\t} elseif(!defined('MO_IS_CONSOLE')) {\n\t\t\t$retVal = parent::getCredential();\n\t\t}\n\t\treturn $retVal;\n\t}", "title": "" }, { "docid": "2ad4200b891e5a82863762d2f6a365f1", "score": "0.51711357", "text": "public function getCredentialsFetcher()\n {\n if ($this->credentialsFetcher) {\n return $this->credentialsFetcher;\n }\n\n if ($this->keyFile) {\n return CredentialsLoader::makeCredentials($this->scopes, $this->keyFile);\n }\n\n return ApplicationDefaultCredentials::getCredentials($this->scopes, $this->authHttpHandler);\n }", "title": "" }, { "docid": "1a2a199d287294e99376d0ade73d35a2", "score": "0.51564693", "text": "public function getCredentials($block = '__permanent')\n {\n if ($this->getIdentifier() == '__empty') {\n return false;\n }\n $loginID = $this->getLoginId();\n $data = $this->session->get($this->getBlock($block));\n if (isset($data[$loginID])) {\n return $data[$loginID];\n }\n return false;\n }", "title": "" }, { "docid": "f1e0b7afbdeb0aa95f8ba465b3aa3fba", "score": "0.51562774", "text": "public function getCredentials()\n {\n return $this->credentials;\n }", "title": "" }, { "docid": "f1e0b7afbdeb0aa95f8ba465b3aa3fba", "score": "0.51562774", "text": "public function getCredentials()\n {\n return $this->credentials;\n }", "title": "" }, { "docid": "0f956ae5bbc65f89a6a18ca8fda2f9c7", "score": "0.5154934", "text": "public function getCredentials() {\n\t\treturn $this->_credentials;\n\t}", "title": "" }, { "docid": "3af75b13d44eeb93584d4ba57be709fb", "score": "0.5150491", "text": "private function getCredentials()\n {\n $basic = base64_encode(Settings::$username . ':' . Settings::$password);\n// $basic = base64_encode($this->user_id . ':' . $this->password);\n return $basic;\n }", "title": "" }, { "docid": "4670bf2ff1aa58f569af8d144ac5e56a", "score": "0.513896", "text": "function GetCredited($creditedId)\n\t{\n\t\t$result = $this->sendRequest(\"GetCredited\", array(\"CreditedId\"=>$creditedId));\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "title": "" }, { "docid": "20df825665d741a84ab45eaaf5e93611", "score": "0.5119107", "text": "public function getCredentials()\n\t{\n\t\treturn $this->credentials;\n\t}", "title": "" }, { "docid": "09f0475c76d4499c79e6f21bdeed5168", "score": "0.51146144", "text": "public function getAuth();", "title": "" }, { "docid": "09f0475c76d4499c79e6f21bdeed5168", "score": "0.51146144", "text": "public function getAuth();", "title": "" }, { "docid": "c09318fa5f15ed5cb64b51c8480df941", "score": "0.51095206", "text": "public function getUserCredentials($user) {\n\t\t$db = UserConfig::getDB();\n\n\t\t$userid = $user->getID();\n\n\t\tif ($stmt = $db->prepare('SELECT fb_id FROM ' . UserConfig::$mysql_prefix . 'users WHERE id = ?')) {\n\t\t\tif (!$stmt->bind_param('i', $userid)) {\n\t\t\t\tthrow new DBBindParamException($db, $stmt);\n\t\t\t}\n\t\t\tif (!$stmt->execute()) {\n\t\t\t\tthrow new DBExecuteStmtException($db, $stmt);\n\t\t\t}\n\t\t\tif (!$stmt->bind_result($fb_id)) {\n\t\t\t\tthrow new DBBindResultException($db, $stmt);\n\t\t\t}\n\n\t\t\t$stmt->fetch();\n\t\t\t$stmt->close();\n\n\t\t\tif (!is_null($fb_id)) {\n\t\t\t\treturn new FacebookUserCredentials($fb_id);\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new DBPrepareStmtException($db);\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "327dd7088d979704e4c06077c0edb72d", "score": "0.51033515", "text": "public function getCredential()\r\n {\r\n return $this->credential;\r\n }", "title": "" }, { "docid": "327dd7088d979704e4c06077c0edb72d", "score": "0.51033515", "text": "public function getCredential()\r\n {\r\n return $this->credential;\r\n }", "title": "" }, { "docid": "4271cbfdb1110f68f6b968c7bb7897ca", "score": "0.5084066", "text": "function get_credencial()\r\n{\r\n $ci = get_instance();\r\n\r\n if($ci->session->has_userdata('credencial'))\r\n {\r\n \treturn $ci->session->userdata('credencial');\r\n }\r\n else\r\n {\r\n \treturn array();\r\n }\r\n}", "title": "" }, { "docid": "7770b4483d70dfca5533ea1abfca820a", "score": "0.50776803", "text": "public function get_token(){\n\t\tglobal $SLIQR_CONFIG;\n\t\t$c = $SLIQR_CONFIG;\n\t\tif(session_id() && array_key_exists(\"twitter_oauth_key\", $_SESSION)){\n\t\t\t$oauth = new OAuthService(\n\t\t\t\t$c[\"twitter\"][\"key\"], \n\t\t\t\t$c[\"twitter\"][\"secret\"],\n\t\t\t\t$_SESSION[\"twitter_oauth_key\"],\n\t\t\t\t$_SESSION[\"twitter_oauth_secret\"]\n\t\t\t);\n\t\t\t$_SESSION[\"twitter_oauth_key\"] = NULL;\n\t\t\t$_SESSION[\"twitter_oauth_secret\"] = NULL;\n\t\t\tunset($_SESSION[\"twitter_oauth_key\"]);\n\t\t\tunset($_SESSION[\"twitter_oauth_secret\"]);\n\n\t\t\t//\tgo get the access token.\n\t\t\t$t = $oauth->get_access_token($this->base_url . $this->access_token_url);\n\t\t\tif($t){\n\t\t\t\t//\tget the user's info and test for unique.\n\t\t\t\t$r = $oauth->GET($this->base_url . \"/account/verify_credentials.json\");\n\t\t\t\t$obj = json_decode($r[\"response\"]);\n\t\t\t\t$uid = $obj->id;\n\n\t\t\t\tif($this->is_unique_and_owned($uid)){\n\t\t\t\t\t$this->authorization($t);\n\t\t\t\t\t$this->create();\n\t\t\t\t\t$this->set_properties(array(\n\t\t\t\t\t\t\"uid\"=>$obj->id,\n\t\t\t\t\t\t\"screen_name\"=>$obj->screen_name,\n\t\t\t\t\t\t\"avatar\"=>$obj->profile_image_url,\n\t\t\t\t\t\t\"url\"=>\"http://twitter.com/\" . $obj->screen_name\n\t\t\t\t\t), true);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Exception('TwitterPresence->get_token: a user with this profile already exists on Sliqr!');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "14b8fb127ab6c7f85119bcc184cddcf7", "score": "0.5075007", "text": "public function credential()\n {\n return $this->credentials();\n }", "title": "" }, { "docid": "0abadcfed051689e0cf1c6a7b6d0dcfc", "score": "0.5071197", "text": "public function retrieveByCredentials(array $credentials) { \n \n return $this->retrieveIotUserFromApi(\n $credentials['email'], $credentials['password']\n );\n }", "title": "" }, { "docid": "8591aaaeb785035e1b535e4608cf9252", "score": "0.5056535", "text": "public function getCredential()\n {\n return $this->credential;\n }", "title": "" }, { "docid": "003da7e3eb6ed5be488143fee07d6597", "score": "0.50511986", "text": "public function getCredential(string $methodName = null, string $baseUrl = null, array $parameters = []): string;", "title": "" }, { "docid": "4a325d423b3a22bbf8bbdcad276b9fc0", "score": "0.5049105", "text": "public function retrieveByCredentials(array $credentials);", "title": "" }, { "docid": "4a325d423b3a22bbf8bbdcad276b9fc0", "score": "0.5049105", "text": "public function retrieveByCredentials(array $credentials);", "title": "" }, { "docid": "05b154b001c363388695f559d9c688c7", "score": "0.504531", "text": "function helpdesk_get_user($id) {\n if (empty($id)) {\n error(get_string('missingidparam', 'block_helpdesk'));\n }\n return get_record('user', 'id', $id);\n}", "title": "" }, { "docid": "488debfeb038975c990f60bdff3aa95c", "score": "0.5030184", "text": "public function retrieveByCredentials(array $credentials){\n\n }", "title": "" }, { "docid": "488debfeb038975c990f60bdff3aa95c", "score": "0.5030184", "text": "public function retrieveByCredentials(array $credentials){\n\n }", "title": "" }, { "docid": "19bb6c0310bc25f908b0987682f5ba49", "score": "0.5025166", "text": "public function credentials()\n {\n return $this->transformCollection(\n $this->get('credentials')['credentials'], Credential::class\n );\n }", "title": "" }, { "docid": "c21ce06ee04a925114d3ec3060685e9a", "score": "0.50193197", "text": "public function restMarketsCredentialsCredentialsIdGetWithHttpInfo($id, $credentials_id)\n {\n $request = $this->restMarketsCredentialsCredentialsIdGetRequest($id, $credentials_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n switch($statusCode) {\n case 200:\n if ('\\OpenAPI\\Client\\Model\\Credentials' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\Credentials', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\Credentials';\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\Credentials',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "ad006531b3e45a034edaced2df173be0", "score": "0.5018559", "text": "public function getCredentials(Model $Model, array $user) {\n\t\tif(!isset($user[$Model->alias]['_credentials'])) {\n\t\t\t$user = $this->cacheCredentials($Model, $user);\n\t\t}\n\t\treturn $user[$Model->alias]['_credentials'];\n\t}", "title": "" }, { "docid": "00150a38fd5374a52ce280453c0e90b0", "score": "0.501385", "text": "public function getCredentials(Request $request)\n {\n $code = $request->query->get('code');\n\n $application = $this->commonGroundService->cleanUrl(['component'=>'wrc', 'type'=>'applications', 'id'=>$this->params->get('app_id')]);\n $providers = $this->commonGroundService->getResourceList(['component' => 'uc', 'type' => 'providers'], ['type' => 'id-vault', 'application' => $this->params->get('app_id')])['hydra:member'];\n $provider = $providers[0];\n\n $backUrl = $request->query->get('backUrl', false);\n if ($backUrl) {\n $this->session->set('backUrl', $backUrl);\n }\n\n $accessToken = $this->idVaultService->authenticateUser($code, $provider['configuration']['app_id'], $provider['configuration']['secret']);\n\n $json = base64_decode(explode('.', $accessToken['id_token'])[1]);\n $json = json_decode($json, true);\n\n $credentials = [\n 'username' => $json['email'],\n 'email' => $json['email'],\n 'givenName' => $json['given_name'],\n 'familyName' => $json['family_name'],\n 'id' => $json['jti'],\n 'authorization' => $accessToken['access_token'],\n 'newUser' => $accessToken['newUser'],\n 'groups' => $json['groups'],\n 'organizations' => $json['organizations']\n ];\n\n $request->getSession()->set(\n Security::LAST_USERNAME,\n $credentials['username']\n );\n\n return $credentials;\n }", "title": "" }, { "docid": "5acbee8f5b160970c1f791acd5614a05", "score": "0.501107", "text": "public function getUser($id = null);", "title": "" }, { "docid": "d47812c409a4a98591aa54b135f0f9c7", "score": "0.5009616", "text": "function getUserCredential(){\n $sql = $this->getBdd()->prepare('SELECT nom_usage, nom_naissance, prenom, adresse FROM table1 WHERE token = :token');\n // $sql->bindparam(':id', $_SESSION['id_user']);\n $sql->bindparam(':token', $_SESSION['token']);\n $sql->execute();\n $rep = $sql->fetch();\n return $rep;\n }", "title": "" }, { "docid": "ce293143dc4d95e51939c400ecb9168d", "score": "0.5008584", "text": "public function user_data(){\n\t\t$this->api_headers = array();\n\t\t$this->api_body = '';\n\t\t\n\t\t$this->api_method = 'GET';\n\t\t$this->api_endpoint = '1.1/account/verify_credentials.json';\n\t\t$this->api_request_url = join(array($this->api_url, $this->api_endpoint));\n\t\t\n\t\t\n\t\t$request_opts = array(\n\t\t\t\t\t\t\t'oauth_consumer_key'\t\t=> $this->api_key,\n\t\t\t\t\t\t\t'oauth_nonce'\t\t\t\t=> $this->generate_nonce(),\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t'oauth_signature_method'\t=> 'HMAC-SHA1',\n\t\t\t\t\t\t\t'oauth_timestamp'\t\t\t=> $this->time_stamp,\n\t\t\t\t\t\t\t'oauth_token'\t\t\t\t=> $this->api_token,\n\t\t\t\t\t\t\t'oauth_token_secret'\t\t=> $this->api_token_secret,\n\t\t\t\t\t\t\t'oauth_version'\t\t\t\t=> '1.0'\n\t\t\t\t\t\t);\n\t\t\t\n\t\t$this->oauth_signature = $this->make_signature($request_opts);\n\t\tarray_set($request_opts, 'oauth_signature', $this->oauth_signature);\n\t\tuksort($request_opts, 'strcmp');\t\t\n\t\t$auth_nodes = array();\n\t\tforeach($request_opts as $k => $v){\n\t\t\t$auth_nodes[] = $k.'=\"'.$v.'\"';\n\t\t}\n\t\t\n\t\t$this->api_headers[] = 'Authorization: OAuth '.implode(', ', $auth_nodes);\n\t\t\n\t\treturn (json_decode($this->callService()));\t\n\t}", "title": "" }, { "docid": "729517a0f40f28023ab745c0ef862cab", "score": "0.5007572", "text": "function get_user_info_by_user_id($user_id=''){\n //$credential = array( 'user_id' => $user_id );\n $this->db->where('user_id', $user_id);\n $result = $this->db->get('user')->row(); \n return $result; \n }", "title": "" }, { "docid": "cd4ac4d5d707a1f1db5545adc03fde62", "score": "0.49979246", "text": "public function getOAuth()\n {\n }", "title": "" }, { "docid": "b6692d454455bb861db52db1822111b1", "score": "0.49965927", "text": "public function retrieveByCredentials(array $credentials) {\n return $this->userRepository->getUserByCredentials($credentials);\n }", "title": "" }, { "docid": "603c8644223191ce62aa988c16e70b76", "score": "0.4974729", "text": "function GetUser($userid=0)\n{\n\tif ($userid == 0) {\n\t\t$UserDetails = IEM::getCurrentUser();\n\t\treturn $UserDetails;\n\t}\n\n\tif ($userid == -1) {\n\t\t$user = new User_API();\n\t} else {\n\t\t$user = new User_API($userid);\n\t}\n\treturn $user;\n}", "title": "" }, { "docid": "39f29d6c447013ed1ebf8731f784b408", "score": "0.49739388", "text": "public function getCredito()\r\n {\r\n return $this->credito;\r\n }", "title": "" }, { "docid": "aa621ba600668831b36d4f367e61f280", "score": "0.4966175", "text": "public function _getUser() {\n // Hacking MOOSOCIAL-2298, cache issue of Auth Component\n $uid = $this->Auth->user('id');\n $cuser = array();\n if (!empty($uid)) { // logged in users\n\n $this->loadModel('User');\n $this->User->cacheQueries = true;\n\n $user = $this->User->findById($uid);\n if (!$user)\n {\n \treturn $this->redirect($this->Auth->logout());\n }\n\n $cuser = $user['User'];\n $cuser['Role'] = $user['Role'];\n $cuser['ProfileType'] = $user['ProfileType'];\n \n }\n \n return $cuser;\n }", "title": "" }, { "docid": "72b3cbb04c84f529dfa863aac4353ab9", "score": "0.49636647", "text": "public function test_get_users_with_credentials() {\n $userhelper = new users();\n\n // When there are not users.\n $result = $userhelper->get_users_with_credentials(array());\n $this->assertEquals($result, array());\n\n // When there are users but not groupid.\n $this->getDataGenerator()->enrol_user($this->user->id, $this->course->id);\n\n $userrespone = array('id' => $this->user->id,\n 'email' => $this->user->email,\n 'name' => $this->user->firstname . ' ' . $this->user->lastname,\n 'credential_url' => null,\n 'credential_id' => null);\n $expectedresponse = array('0' => $userrespone);\n $enrolledusers = get_enrolled_users($this->context, \"mod/accredible:view\", null, 'u.*', 'id');\n $result = $userhelper->get_users_with_credentials($enrolledusers);\n $this->assertEquals($result, $expectedresponse);\n\n // When there users and groupid.\n $user2 = $this->getDataGenerator()->create_user(array('email' => '[email protected]'));\n $this->getDataGenerator()->enrol_user($user2->id, $this->course->id);\n $user2respone = array('id' => $user2->id,\n 'email' => $user2->email,\n 'name' => $user2->firstname . ' ' . $user2->lastname,\n 'credential_url' => 'https://www.credential.net/10250012',\n 'credential_id' => 10250012);\n $expectedresponse = array('0' => $userrespone, '1' => $user2respone);\n\n $mockclient1 = $this->getMockBuilder('client')\n ->setMethods(['get'])\n ->getMock();\n\n // Mock API response data.\n $resdatapage1 = $this->mockapi->resdata('credentials/search_success.json');\n $resdatapage2 = $this->mockapi->resdata('credentials/search_success_page_2.json');\n\n // Expect to call the endpoint once with page and page_size.\n $urlpage1 = \"https://api.accredible.com/v1/all_credentials?group_id=123&email=&page_size=50&page=1\";\n $urlpage2 = \"https://api.accredible.com/v1/all_credentials?group_id=123&email=&page_size=50&page=2\";\n $mockclient1->expects($this->exactly(2))\n ->method('get')\n ->withConsecutive([$this->equalTo($urlpage1)], [$this->equalTo($urlpage2)])\n ->will($this->onConsecutiveCalls($resdatapage1, $resdatapage2));\n\n $api = new apirest($mockclient1);\n $userhelper = new users($api);\n $enrolledusers = get_enrolled_users($this->context, \"mod/accredible:view\", null, 'u.*', 'id');\n $result = $userhelper->get_users_with_credentials($enrolledusers, 123);\n $this->assertEquals($result, $expectedresponse);\n\n // When apirest returns an error response.\n $mockclient2 = $this->getMockBuilder('client')\n ->setMethods(['get'])\n ->getMock();\n\n // Mock API response data.\n $mockclient2->error = 'The requested URL returned error: 401 Unauthorized';\n $resdata = $this->mockapi->resdata('unauthorized_error.json');\n\n // Expect to call the endpoint once with page and page_size.\n $url = \"https://api.accredible.com/v1/all_credentials?group_id=123&email=&page_size=50&page=1\";\n $mockclient2->expects($this->once())\n ->method('get')\n ->with($this->equalTo($url))\n ->willReturn($resdata);\n\n // Expect to return empty array.\n $api = new apirest($mockclient2);\n $userhelper = new users($api);\n $result = $userhelper->get_users_with_credentials($enrolledusers, 123);\n $this->assertEquals($result, array());\n }", "title": "" }, { "docid": "aafc616a563a687f45c8450b2d24c7fa", "score": "0.49601653", "text": "public function get($id)\n {\n $sql = new Sql($this->adapter);\n $select = new Select('oauth_clients');\n $select->where(['id' => $id]);\n $result = $sql->prepareStatementForSqlObject($select)->execute();\n if ( $result->count() > 0){\n \treturn $this->setObjectData($result->current());\n }else{\n \treturn false;\n }\n }", "title": "" }, { "docid": "98ee57d6473913597fabb7440d1f2d1b", "score": "0.49305093", "text": "public function getUser($id)\n {\n $endpointUrl = sprintf($this->_endpointUrls['user'], $id, $this->getAccessToken());\n $this->_initHttpClient($endpointUrl);\n return $this->_getHttpClientResponse();\n }", "title": "" }, { "docid": "2bcafd8400f1cc59d9acc43bd1fdda7d", "score": "0.49290538", "text": "private static function grabCredentials(){\n if(isset($_ENV[\"IS_GITHUB\"]) && $_ENV[\"IS_GITHUB\"] === \"true\"){\n return (object)[\n \"databaseUsername\" => $_ENV[\"USERNAME\"],\n \"databasePassword\" => $_ENV[\"PASSWORD\"],\n \"databaseName\" => $_ENV[\"NAME\"],\n \"databaseHost\" => $_ENV[\"HOST\"],\n ];\n }\n //Check of de credentialfile is aangemaakt\n if(!is_file(self::$credentialPath)){\n throw new Exception(\"Credential file missing\", 500);\n }\n //Lees het bestand uit\n $content = file_get_contents(self::$credentialPath);\n //Verander de json in een php object\n $parsedContent = json_decode($content);\n\n //Check of parsen fout ging\n if($parsedContent === null){\n throw new Exception(\"Credential file invalid json\", 500);\n }\n\n //Geef het terug\n return $parsedContent;\n }", "title": "" }, { "docid": "136586a78f6b2ace5f8434ac61ba8749", "score": "0.49252865", "text": "public function auth() {\n\t\t$response = array(\n\t\t\t'success' => FALSE,\n\t\t\t'elapsed' => microtime(TRUE)\t//for benchmarking\n\t\t);\n\t\t\n\t\t//prepare data for auth and auth process\n\t\t$data = array(\n\t\t\t'client_id'\t\t=>\t$this->cnf['consumer_key'],\n\t\t\t'client_secret'\t=> $this->cnf['consumer_secret'],\n\t\t\t'redirect_uri'\t=> \t$this->cnf['redirect_url'],\n\t\t\t\n\t\t\t'username'\t\t=>\t$this->cnf['username'],\n\t\t\t'password'\t\t=>\t$this->cnf['password'].$this->cnf['security_token']\n\t\t);\n\t\t\n\t\t//initiate curl call with endpoint and prepared data\n\t\t$ch = curl_init();\n\t\t\t\tcurl_setopt_array($ch, array(\n\t\t\t\t\t\tCURLOPT_URL\t\t\t\t=> $this->cnf['endpoints']['oauth2'],\n\t\t\t\t\t\tCURLOPT_HEADER\t\t\t=> FALSE,\n\t\t\t\t\t\tCURLOPT_SSL_VERIFYPEER\t=> FALSE,\n\t\t\t\t\t\tCURLOPT_POST\t\t\t=> count($data),\n\t\t\t\t\t\tCURLOPT_POSTFIELDS\t\t=> http_build_query($data).'&grant_type=password',\n\t\t\t\t\t\tCURLOPT_RETURNTRANSFER\t=> 1\n\t\t\t\t));\n\t\t\n\t\t//save response\n\t\t$response['result'] = curl_exec($ch);\n\t\t$response['error'] \t= curl_error($ch);\n\t\t$response['status'] = $this->_curl_status(curl_getinfo($ch, CURLINFO_HTTP_CODE), $response['result']);\n\t\t$response['elapsed'] = microtime(TRUE) - $response['elapsed'];\n\t\t\n\t\t//update return array for successful calls\n\t\tif ($response['result']){\n\t\t\t$response['success'] = TRUE;\n\t\t\t$response['result'] = json_decode($response['result']);\n\t\t}\n\t\t\n\t\tif ($this->cnf['debug']){\n\t\t\techo '<pre>'.__METHOD__. \" --> \";\n\t\t\tprint_r($response);\n\t\t\techo '</pre>';\n\t\t}\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "174147b1a3486af239a33058ddd52415", "score": "0.49225327", "text": "public function my_courses_get() {\n $response = array();\n $auth_token = $_GET['auth_token'];\n $logged_in_user_details = json_decode($this->token_data_get($auth_token), true);\n\n if ($logged_in_user_details['user_id'] > 0) {\n $response = $this->api_model->my_courses_get($logged_in_user_details['user_id']);\n }else{\n\n }\n return $this->set_response($response, REST_Controller::HTTP_OK);\n }", "title": "" }, { "docid": "fb82dd9c3f9b3702714202d4cce3bd87", "score": "0.49191684", "text": "public static function getUser(){\n\n if(isset($_SESSION['user_id'])){\n\n return User::findByID($_SESSION['user_id']);\n }else{\n //use cookie loginToken if there is one\n return static::loginFromRememberCookie();\n\n }\n }", "title": "" }, { "docid": "94c1e6f31edc41030712177db3fcd782", "score": "0.49155194", "text": "protected function restMarketsCredentialsCredentialsIdGetRequest($id, $credentials_id)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling restMarketsCredentialsCredentialsIdGet'\n );\n }\n // verify the required parameter 'credentials_id' is set\n if ($credentials_id === null || (is_array($credentials_id) && count($credentials_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $credentials_id when calling restMarketsCredentialsCredentialsIdGet'\n );\n }\n\n $resourcePath = '/rest/markets/credentials/{credentialsId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if (is_array($id)) {\n $id = ObjectSerializer::serializeCollection($id, '', true);\n }\n if ($id !== null) {\n $queryParams['id'] = $id;\n }\n\n\n // path params\n if ($credentials_id !== null) {\n $resourcePath = str_replace(\n '{' . 'credentialsId' . '}',\n ObjectSerializer::toPathValue($credentials_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "8a3f5b74f770a9add3c900f052d4fe91", "score": "0.4909651", "text": "function getUser() {\n try {\n if (!$this->isAuthenticated()) $this->refreshToken();\n \n $data = array();\n $data[\"access_token\"] = $this->access_token;\n \n $result = json_decode($this->doCurl($this->da_oauth_resource . \"user/whoami\", $data), true);\n if (!empty($result[\"error\"])) throw new \\Exception($result[\"error_description\"]);\n return $result;\n } catch(Exception $e) {\n echo $e->getMessage();\n }\n }", "title": "" }, { "docid": "90f4838c1c144cd1f6ee69591c92fa86", "score": "0.49001533", "text": "public function get($id, $secret = null);", "title": "" }, { "docid": "37e844b3354358a3beb711a641533b8d", "score": "0.48951566", "text": "public function getCredentials() : array\n {\n return ['username' => $this->username, 'password' => $this->password];\n }", "title": "" }, { "docid": "99b9c377c041b91cc75667bcb94667e9", "score": "0.48918167", "text": "protected function getCredentials(): array\n {\n return [\n 'grant_type' => 'tp_credentials',\n 'tp_client_id' => $this->app['config']['client_id'],\n 'tp_client_secret' => $this->app['config']['secret'],\n 'tp_verify_ticket' => $this->app['tp_verify_ticket']->getTicket(),\n ];\n }", "title": "" }, { "docid": "e0e71aa433d2863c7bbe7662455a7d7e", "score": "0.48832574", "text": "function gen_oauth_creds() {\n\t// Get a whole bunch of random characters from the OS\n\t//$fp = fopen('/dev/urandom','rb');\n\t$entropy = random_bytes(60);//int(32323, 10000);// php7//fread($fp, 32);\n\t//fclose($fp);\n\n\t// Takes our binary entropy, and concatenates a string which represents the current time to the microsecond\n\t$entropy .= uniqid(mt_rand(), true);\n\n\t// Hash the binary entropy\n\t$hash = hash('sha512', $entropy);\n\n\t// Base62 Encode the hash, resulting in an 86 or 85 character string\n\t$hash = gmp_strval(gmp_init($hash, 16), 62);\n\n\t// Chop and send the first 80 characters back to the client\n\treturn array(\n\t\t'consumer_key' => substr($hash, 0, 32),\n\t\t'shared_secret' => substr($hash, 32, 48)\n\t);\n}", "title": "" }, { "docid": "a43d16d755d0cbdffcdf5f74a37e97f8", "score": "0.4881551", "text": "public function getAuthTokenInfo($user_id)\n {\n return $this->makeRequest('POST', false, [\n 'method' => 'profile.get_auth',\n 'user_id' => $user_id,\n ]);\n }", "title": "" }, { "docid": "3549f8bfba6a7d74e518b2a1c342f3ce", "score": "0.48811328", "text": "function login(){\n\t\t$apikey = $this->get_api_key();\n\t\t$apisecret = $this->get_api_secret();\n\t\t$authorization = $this->get_authorization();\n\t\t$user = new \\gcalc\\db\\api_user( $apikey, $apisecret, $authorization );\n\t\tif ( $user->login() ) {\n\t\t\t$credetials = $user->get_credentials();\t\t\t\t\n\t\t} else {\n\t\t\t$credetials = array(\n\t\t\t\t'login' => 'anonymous',\n\t\t\t\t'access_level' => 0\n\t\t\t);\n\t\t}\n\t\treturn $credetials;\n\t}", "title": "" }, { "docid": "1d6f938cb96d5d3783e16e3e24608363", "score": "0.48799536", "text": "public function getCredentialsForStore($storeId)\n {\n $token = $this->_scopeConfig->getValue(\n self::TOKEN,\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE,\n $storeId\n );\n $secret = $this->_scopeConfig->getValue(\n self::SECRET,\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE,\n $storeId\n );\n return [$token, $secret];\n }", "title": "" }, { "docid": "b6415899bd5c9ffca03abedb173d64f8", "score": "0.48786977", "text": "function getUser($id) {\n\t\t\t$id = sqlescape($id);\n\t\t\t$item = sqlfetch(sqlquery(\"SELECT * FROM bigtree_users WHERE id = '$id'\"));\n\t\t\tif (!$item) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif ($item[\"level\"] > 0) {\n\t\t\t\t$permissions = array();\n\t\t\t\t$q = sqlquery(\"SELECT * FROM bigtree_modules\");\n\t\t\t\twhile ($f = sqlfetch($q)) {\n\t\t\t\t\t$permissions[\"module\"][$f[\"id\"]] = \"p\";\n\t\t\t\t}\n\t\t\t\t$item[\"permissions\"] = $permissions;\n\t\t\t} else {\n\t\t\t\t$item[\"permissions\"] = json_decode($item[\"permissions\"],true);\n\t\t\t}\n\t\t\t$item[\"alerts\"] = json_decode($item[\"alerts\"],true);\n\t\t\treturn $item;\n\t\t}", "title": "" }, { "docid": "d2ac8cc8262fc95c91de63234d5c9b30", "score": "0.4874756", "text": "public function getTokenAPI()\n {\n if (isset($_SESSION['USER'])) {\n $query = Bdd::GetInstance()->prepare('SELECT user_token FROM users WHERE user_UId =:id');\n $query->execute([\n 'id' => $_SESSION['USER']->getUID()\n ]);\n return $query->fetch(\\PDO::FETCH_ASSOC);\n }\n }", "title": "" }, { "docid": "3245adf5a33f92730692ed7cecf8286c", "score": "0.48733455", "text": "public function getUriUser()\n {\n $ClaroUser = $this->userClaro->generateAuth();\n $username = $ClaroUser['username'];\n $email = $ClaroUser['email'];\n $id = $ClaroUser['id'];\n $password = $ClaroUser['password'];\n $name = $ClaroUser['firstName'].' '.$ClaroUser['LastName'];\n $result = array();\n array_push($result, $username, $password, $name, $email, $id);\n return $result;\n }", "title": "" }, { "docid": "3156eee1eec1c71cae92841d0b4973fa", "score": "0.48707595", "text": "public static function getTwitterCredentials() {\n self::$twitterCredentials = array(\n 'oauth_access_token' => OAUTH_ACCESS_TOKEN,\n 'oauth_access_token_secret' => OAUTH_ACCESS_TOKEN_SECRET,\n 'consumer_key' => CONSUMER_KEY,\n 'consumer_secret' => CONSUMER_SECRET\n );\n return self::$twitterCredentials;\n }", "title": "" }, { "docid": "98d426604cb33103ae3fa965bcb35e45", "score": "0.4865732", "text": "public function getUserById($id) {\n $response = $this->client->request('GET', 'user/' . $id);\n \n return $response;\n }", "title": "" }, { "docid": "b6c8de6310b5e50532f47d3845eb5f2f", "score": "0.4857894", "text": "public function getOAuthTokens();", "title": "" }, { "docid": "a427dae96860e40ab773d5ecf4a20b57", "score": "0.48569232", "text": "public function getAuth(): mixed;", "title": "" }, { "docid": "ad8c1f224f32626513e39189ccbb6270", "score": "0.4855721", "text": "function getAuthQuery()\n{\n $settings = require 'etc/settings.php';\n\n return [\n 'api_key' => $settings['discourse_api_key'],\n 'api_username' => $settings['discourse_api_username']\n ];\n}", "title": "" }, { "docid": "faec57186ef1086deb84eef4d444f012", "score": "0.4854739", "text": "function getUser() {\n\t\t$user = FALSE;\n\n\t\t$uidConf = $this->config['uidConfiguration'];\n\t\t$uidArray = t3lib_div::intExplode(',', $uidConf);\n\t\tforeach ($uidArray as $uid) {\n\t\t\ttx_igldapssoauth_config::init(TYPO3_MODE, $uid);\n\n\t\t\t// Enable feature\n\t\t\t$userTemp = FALSE;\n\n\t\t\t// CAS authentication\n\t\t\tif (tx_igldapssoauth_config::is_enable('CASAuthentication')) {\n\n\t\t\t\t$userTemp = tx_igldapssoauth_auth::cas_auth();\n\n\t\t\t\t// Authenticate user from LDAP\n\t\t\t} elseif ($this->login['status'] === 'login' && $this->login['uident']) {\n\n\t\t\t\t// Configuration of authentication service.\n\t\t\t\t$loginSecurityLevel = $GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['loginSecurityLevel'];\n\t\t\t\t// normal case\n\t\t\t\t// Check if $loginSecurityLevel is set to \"challenged\" or \"superchallenged\" and throw an error if the configuration allows it\n\t\t\t\t// By default, it will not throw an Exception\n\t\t\t\t$throwExceptionAtLogin = 0;\n\t\t\t\tif (isset($this->config['throwExceptionAtLogin']) && $this->config['throwExceptionAtLogin'] == 1) {\n\t\t\t\t\tif ($loginSecurityLevel === 'challenged' || $loginSecurityLevel === 'superchallenged') {\n\t\t\t\t\t\t$message = \"ig_ldap_sso_auth error: current login security level '\" . $loginSecurityLevel . \"' is not supported.\";\n\t\t\t\t\t\t$message .= \" Try to use 'normal' or 'rsa' (recommanded but would need more settings): \";\n\t\t\t\t\t\t$message .= \"\\$TYPO3_CONF_VARS['BE']['loginSecurityLevel'] = 'normal';\";\n\t\t\t\t\t\tthrow new Exception($message, 1324313489);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// normal case\n\t\t\t\t$password = $this->login['uident_text'];\n\t\t\t\t/*if ($loginSecurityLevel == 'rsa') {\n\t\t\t\t\t$password = $this->login['uident'];\n\t\t\t\t\t/* @var $storage tx_rsaauth_abstract_storage */\n\t\t\t\t\t/*$storage = tx_rsaauth_storagefactory::getStorage();\n\n\t\t\t\t\t// Preprocess the password\n\t\t\t\t\t$key = $storage->get();\n\n\t\t\t\t\t$this->backend = tx_rsaauth_backendfactory::getBackend();\n\t\t\t\t\t$password = $this->backend->decrypt($key, substr($password, 4));\n\n\t\t\t\t}*/\n\n\t\t\t\t$userTemp = tx_igldapssoauth_auth::ldap_auth($this->login['uname'], $password);\n\t\t\t}\n\t\t\tif (is_array($userTemp)) {\n\t\t\t\t$user = $userTemp;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (!$user) {\n\t\t\t$user = $this->fetchUserRecord($this->login['uname']);\n\t\t}\n\n\t\t// Failed login attempt (no username found)\n\t\tif (!is_array($user)) {\n\t\t\t$this->writelog(255, 3, 3, 2,\n\t\t\t\t\"Login-attempt from %s (%s), username '%s' not found!!\",\n\t\t\t\tarray($this->authInfo['REMOTE_ADDR'], $this->authInfo['REMOTE_HOST'], $this->login['uname'])); // Logout written to log\n\t\t\t// User found\n\t\t} else {\n\t\t\tif ($this->writeDevLog) {\n\t\t\t\tt3lib_div::devLog('User found: ' . t3lib_div::arrayToLogString($user, array($this->db_user['userid_column'], $this->db_user['username_column'])), 'tx_igldapssoauth_sv1');\n\t\t\t}\n\t\t}\n\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "6e8b626fde8de0b640c2cc98bb649bdd", "score": "0.4851071", "text": "public function retrieveByCredentials( array $credentials ) {\n\t\t/*\n\t\t * 201:验证通过\n\t\t * 403:连续三次登录错误,请在3分钟后重试\n\t\t * 404:账号错误\n\t\t * 406:密码错误\n\t\t * 407:令牌错误\n\t\t */\n\t\t$result = ( new AccountLogin() )->login( $credentials['email'], $credentials['password'] );\n\t\tif ( ! empty( $result['server_response'] ) && $result['server_response']['status_code'] != 201 ) {\n\t\t\treturn $this->getGenericUser( $result['server_response'] );\n\t\t} else {\n\t\t\t$id6d = $result['server_response']['id6d'];\n\t\t\t$company_id = $result['server_response']['company_id'];\n\t\t\t$worker = ( new Worker() )->worker( $id6d, $company_id );\n\t\t\t$worker['server_response']['id'] = $id6d . '.' . $company_id;\n\t\t\t$worker['server_response']['company'] = $result['server_response'];\n\n\t\t\treturn $this->getGenericUser( $worker['server_response'] );\n\t\t}\n\t}", "title": "" }, { "docid": "7de3f7b68034b780e09d6a8d6a89050e", "score": "0.48412868", "text": "public function getOauthAccessTokenAction() {\n // Get cookie values\n $oauthToken = $_GET['oauth_token'];\n $oauthVerifier = $_GET['oauth_verifier'];\n\n // Ckeck if user token is the same as the value of access token session value\n if ($oauthToken == $_SESSION['oauth_token']) {\n // Set request parameters\n $baseURI = self::ACCESS_TOKEN_URI;\n $nonce = time();\n $timestamp = time();\n $oauth = array(\n 'oauth_consumer_key' => $this->container->getParameter('twitter_id'),\n 'oauth_nonce' => $nonce,\n 'oauth_signature_method' => self::SIGNATURE_METHOD,\n 'oauth_timestamp' => $timestamp,\n 'oauth_version' => self::OAUTH_VERSION);\n\n // Get base string\n $baseString = self::buildBaseString($baseURI, $oauth);\n // Get composite key\n $compositeKey = self::getCompositeKey($this->container->getParameter('twitter_key'), $_SESSION['oauth_token_secret']); //second request, there is request token now\n // Sign the base string\n $oauthSignature = base64_encode(hash_hmac('sha1', $baseString, $compositeKey, true));\n // Add the signature to our oauth array\n $oauth['oauth_signature'] = $oauthSignature;\n // Add the oauth token to our oauth array\n $oauth['oauth_token'] = $oauthToken;\n // Remove the oauth callback from our oauth array\n unset($oauth['oauth_callback']);\n\n // Set post parameters\n $parameters = 'oauth_verifier=' . rawurlencode($oauthVerifier);\n\n // Get complete oauth response\n $oauthResponse = self::sendRequest($oauth, $baseURI, $parameters);\n\n // Register/login in to our database\n return $this->redirect($this->generateUrl('hwi_oauth_service_redirect', array('service' => 'twitter')));\n } else {\n // The request token received is not the same as session token\n throw new AuthenticationException('Invalid oauth token in the request.');\n }\n }", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "31f6f7ab88a64a5aaceedab3326166e1", "score": "0.0", "text": "public function destroy($id)\n\t{\n\n\t}", "title": "" } ]
[ { "docid": "67120cc52c09f1239f92f34fd173437e", "score": "0.7333458", "text": "function remove($resource)\n {\n }", "title": "" }, { "docid": "dcc1d6b4440ac73f55e995eb411296ea", "score": "0.6932749", "text": "public function destroy($id)\n {\n dd('Remove the specified resource from storage.');\n }", "title": "" }, { "docid": "96aa9ea6689a46a9441f009aa879d999", "score": "0.6885214", "text": "public function removeResource($resource)\n {\n // Remove the Saved Resource\n $join = new User_resource();\n $join->user_id = $this->id;\n $join->resource_id = $resource->id;\n $join->delete();\n\n // Remove the Tags from the resource\n $join = new Resource_tags();\n $join->user_id = $this->id;\n $join->resource_id = $resource->id;\n $join->delete();\n }", "title": "" }, { "docid": "d522def58731edf5dda07c4a8e3cb839", "score": "0.6839906", "text": "public function remove(IUser $user, ?IResource $resource): void;", "title": "" }, { "docid": "5b18f4f0f245d93e1d14486ac0afbbc7", "score": "0.6735704", "text": "public function remove(ResourceInterface $resource)\n {\n $this->_em->remove($resource);\n $this->_em->flush($resource);\n }", "title": "" }, { "docid": "6ffd51684d27200dd20bb77ae5392465", "score": "0.65282005", "text": "public function dispatchOnPostRemoveResource($resource);", "title": "" }, { "docid": "20340ae69f46965449dc508b639c84e9", "score": "0.6511765", "text": "public function remove_storage()\n\t{\n\t\t$this->_storage->destroy_storage();\n\t}", "title": "" }, { "docid": "8566de5772ba8f11471da580f8907d09", "score": "0.64848197", "text": "public static function remove(string $resourcePath): void\n {\n $file = self::generatePath(\n self::generateHash($resourcePath)\n );\n\n if (\\is_file($file)) {\n \\unlink($file);\n }\n }", "title": "" }, { "docid": "b9b85ab47af2f085664ea4fb3f54b26d", "score": "0.6444909", "text": "public function dispatchOnPreRemoveResource($resource);", "title": "" }, { "docid": "ae13b12a81ef5a04c54c2ae2a1fbfc6f", "score": "0.61720115", "text": "public function unsetStorageId();", "title": "" }, { "docid": "8c0ed41f8673fd843b7ffdb22bce5eb0", "score": "0.611688", "text": "public function afterDelete($resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "77d39170a9748d8eca11f292068832c6", "score": "0.6077847", "text": "public function delete($storageName, $key);", "title": "" }, { "docid": "43dc6df10818b4435103bc0ee31fc8d1", "score": "0.6045101", "text": "public function destroy($id)\n {\n $record = Resource::where('id', $id)->get();\n\n if (!empty($record[0])) {\n DB::beginTransaction();\n\n $isRemoved = self::remove($record);\n }\n }", "title": "" }, { "docid": "db4382353b96e87cb5a70c801383930a", "score": "0.603214", "text": "public function delete($resourceId = null, $options = []);", "title": "" }, { "docid": "a2014b07fec4eb27432905d903e64664", "score": "0.59784347", "text": "public function destroy($id)\n {\n $storage = Storage::find($id);\n if($storage->item())\n {\n $storage->item()->detach();\n if( $storage->delete() )\n {\n return response('Deleted.',200);\n }\n }\n return response('Error.',400);\n }", "title": "" }, { "docid": "6dd2ae009f2219fb531720e25a26531d", "score": "0.5974692", "text": "public function remove() {\n\t\t$this->storage->rmdir($this->path);\n\t\t$this->user->triggerChange('avatar');\n\t}", "title": "" }, { "docid": "462a710c39c75c675bfe433bce80e2fe", "score": "0.5951811", "text": "public function destroy()\n {\n if ($this->instance instanceof Storage) {\n $this->instance->destroy();\n }\n $this->instance = null;\n }", "title": "" }, { "docid": "c39bd1cfb71eb924026011c0e976a9d4", "score": "0.5933563", "text": "public function delete(string $resourceType, $modelOrResourceId): void;", "title": "" }, { "docid": "31f350f911a74d37fb3a78e6981becb5", "score": "0.5921418", "text": "public function removeStorage()\n\t{\n\t\t$this->taskExec('docker rm chrome-print-storage')->run();\n\t}", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "d03fcfa49d2ade09cffc8d88d701076d", "score": "0.58893216", "text": "public function dropStorageFromName($storageName);", "title": "" }, { "docid": "7a7d76b4d53301e7ae6922b772849358", "score": "0.5886972", "text": "public function destroy($file)\n {\n $file = File::where('id', $file)->first();\n $url = str_replace('storage', 'public', $file->url);\n Storage::delete($url);\n $file->delete();\n return redirect()->route('files.index')->with('eliminar', 'ok');\n }", "title": "" }, { "docid": "3f6a8794d81fc01347d2f3307ac44d78", "score": "0.58504206", "text": "public function destroy($id)\n {\n //\n\n $contratista= contratistas::findOrFail($id);\n\n if (Storage::delete('public/'.$contratista->Foto)){\n Contratistas::destroy($id);\n\n }\n\n \n \n return redirect('contratistas')->with('Mensaje','Contratista eliminado');\n }", "title": "" }, { "docid": "a85763dd50ac74b8d2b8124b1c0e3e7b", "score": "0.5850285", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return back()->with('info', 'Resource deleted');\n }", "title": "" }, { "docid": "02a5bc50f3aa8ecd04834387832bc77c", "score": "0.5844418", "text": "public function destroy($id)\n {\n // $this->authorize('haveaccess','producto.destroy');\n $producto= Producto::findOrFail($id);\n\n if(Storage::delete('public/'.$producto->imagen)){\n\n Producto::destroy($id); \n }\n\n return redirect('producto');\n }", "title": "" }, { "docid": "8f406917023a0110d93d6350033a3ab5", "score": "0.58313775", "text": "public function removeItem($id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "title": "" }, { "docid": "a193f7ebf258b5fb63b8919a07678081", "score": "0.5821789", "text": "public function removeAll ($storage) {}", "title": "" }, { "docid": "dc36a581460d40a22ac889b4e61a4ab9", "score": "0.58165264", "text": "public function removeResource($resourceID)\n {\n $resourceID = db::escapechars($resourceID);\n $sql = \"DELETE FROM kidschurchresources WHERE resourceID='$resourceID' LIMIT 1\";\n $result = db::execute($sql);\n if($result){\n return true;\n }\n else{\n return false;\n }\n }", "title": "" }, { "docid": "8f1b5736b25701e2b67e4f655f581689", "score": "0.57634306", "text": "public function testResourceRemoveOne()\n {\n $resourceArea = new Zend_Acl_Resource('area');\n $this->_acl->add($resourceArea)\n ->remove($resourceArea);\n $this->assertFalse($this->_acl->has($resourceArea));\n }", "title": "" }, { "docid": "5cc9f2ec9efb9c5303b848052688e6c4", "score": "0.5744329", "text": "public function destroy($id)\n {\n $product = Product::findOrFail($id);\n $filename = $product->image;\n $product->delete();\n Storage::delete($filename);\n }", "title": "" }, { "docid": "4d84ab18e7e3c7bf3662c486977fb999", "score": "0.57371354", "text": "public function delete() {\n return $this->storage->delete($this->getId());\n }", "title": "" }, { "docid": "cbac86afaa4d65131418099d416a05f8", "score": "0.5731129", "text": "public function destroy($id)\n {\n $resource = Resource::find($id);\n\n if ($fileName = $resource->book->name) {\n $file = public_path() . '/resources/' . $fileName;\n unlink($file);\n }\n\n $resource->delete();\n\n $message = 'El recurso literario \"' . $resource->title . '\" ha sido eliminado.';\n $class = 'danger';\n\n Session::flash('message', $message);\n Session::flash('class', $class);\n\n return redirect()->route('admin.resources.index');\n }", "title": "" }, { "docid": "fec8d4881ffc82e41c0642f366a1a75a", "score": "0.5726655", "text": "public function delete($resource)\n {\n return DB::transaction(function () use ($resource) {\n $resource = $this->beforeDelete($resource);\n\n $resource->delete();\n\n return $this->afterDelete($resource);\n });\n }", "title": "" }, { "docid": "b8c78cd19161cf7966e7567365e984a3", "score": "0.56849074", "text": "public function remove(): void;", "title": "" }, { "docid": "bf109080b5ee3a89d2c795999303aee7", "score": "0.5680265", "text": "public function delete(){\n if($this->removable) {\n $directory = $this->getRootDir();\n\n App::fs()->remove($directory);\n }\n }", "title": "" }, { "docid": "8bbd28cf62ed375a2f7518342e1d75ae", "score": "0.56680655", "text": "public function removeFile();", "title": "" }, { "docid": "3819490d97e5dfe8f2ffd81ae03e6e53", "score": "0.56674856", "text": "public function remove(ReadModelInterface $element);", "title": "" }, { "docid": "b182edae2a719de4edc919c7a7b5885e", "score": "0.5663417", "text": "public function destroy($id)\n {\n\n $post = Roler::findOrFail($id);\n\n $path=public_path('/storage/uploads/');\n if (isset($post->image)) {\n $oldname=$post->image;\n File::delete($path.''.$oldname);\n }\n\n if (Roler::where('id', $id)->delete()) {\n\n return redirect()->back()->with('success', 'Record deleted successfully');\n\n }\n \n return redirect()->back();\n\n }", "title": "" }, { "docid": "2d475aa3098e33e6020ec88b30a03b25", "score": "0.5662905", "text": "public function purgeAsset($asset);", "title": "" }, { "docid": "cb1740d372b49263432bcc5cf39f97d8", "score": "0.56595594", "text": "public function destroy($id)\n {\n $emp = Employee::where('id',$id)->first();\n $photo = $emp->image;\n if($photo){\n unlink($photo);\n $emp->delete();\n }else{\n $emp->delete();\n }\n\n }", "title": "" }, { "docid": "7567af40a4901dd5dd42113b0bbccb95", "score": "0.56567484", "text": "public function removeResource($name)\n {\n unset($this->resources[$name]);\n if ($name === 'file') {\n $this->resources['file'] = array(\n 'class' => 'Dwoo\\Template\\File',\n 'compiler' => null\n );\n }\n }", "title": "" }, { "docid": "dc84ba400b70ef909d87e4a92424f6ac", "score": "0.5648853", "text": "public function destroy($id)\n {\n $album = Album::find($id);\n if($album==null){\n return reidrect('/portfolio')->with('error','this portfolio does not exist');\n }else{\n if(Storage::delete('public/album_covers/'.$album->cover_image)){\n $album->delete();\n return redirect('/portfolio')->with('success','Album removed');\n }\n }\n}", "title": "" }, { "docid": "ff85d8135b960df73371ee3703e738a4", "score": "0.5643097", "text": "public function destroy($id)\n {\n $file_name = DB::table(\"research\")->where('id',$id)->value('research_image');\n unlink(public_path(\"front/assets/images/what-we-do/research/\".$file_name)); \n DB::table(\"research\")->where('id',$id)->delete();\n return redirect()->route('all-research')->with('msg','Research deleted successfully with the image');\n }", "title": "" }, { "docid": "4dfae537943a63cbddf6151c77a88821", "score": "0.5636697", "text": "public function destroy($id)\n { \n $products = Product::findOrFail($id);\n // $delete = $products->slug;\n if($products->slug) {\n \\File::delete( public_path('storage/'.$products->slug ) );\n }\n \n // File::delete(public_path(\"storage/\"), $delete);\n Product::destroy($id);\n return redirect()->route('product-list.index')->with('success','Product Destory Successfully !!!');\n\n }", "title": "" }, { "docid": "d261281fcf3d7ca08f9b610eb6c3b1f0", "score": "0.56346554", "text": "public function destroy($id)\n {\n $photo = Photo::findOrFail($id);\n unlink(public_path() . $photo->image_url);\n $photo->delete();\n }", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "5e46d09ef2d1d9f143d6831260992e3f", "score": "0.56248415", "text": "public function destroy($id)\n {\n $pres=Prescription::find($id);\n $fileName=$pres->item;\n unlink(storage_path().'/'.'app'.'/'.'public' .'/'.'prescriptions'.'/'. $fileName);\n $pres->delete();\n }", "title": "" }, { "docid": "0428848b8d6110c6be21d9479ece2192", "score": "0.56237406", "text": "public function removeImage()\n {\n if (!empty($this->image) && !empty($this->id)) {\n $path = storage_path($this->image);\n if (is_file($path)) {\n unlink($path);\n }\n if (is_file($path.'.thumb.jpg')) {\n unlink($path.'.thumb.jpg');\n }\n }\n }", "title": "" }, { "docid": "1ed1ac142686a23f0827e755ecbc86db", "score": "0.5618705", "text": "public function delete($resource, array $args = [], array $options = []) {\n return $this->do('DELETE', $resource, $args, $options);\n\n }", "title": "" }, { "docid": "c0ac500c5b367ee589c3c33143eb832b", "score": "0.5617002", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return response()->json(['success' => 'borrado correctamente']);\n }", "title": "" }, { "docid": "a9c212129736f6a4e7fd4eddbccc6f2f", "score": "0.56163317", "text": "public function destroy($id)\n {\n $delete = Supplier::where(\"id\", $id)->first();\n $img = $delete->photo;\n if($img){\n unlink('backend/assets/images/supplier/'.$img);\n $delete->delete();\n toast('Supplier Information Delete Successfully','success');\n return redirect()->route('index.supplier');\n }else{\n toast('Supplier Not Deleted','success');\n return redirect()->route('index.supplier');\n }\n }", "title": "" }, { "docid": "6b5dbac631e37705e1c7cf319db2d7e6", "score": "0.56112254", "text": "public function deleteFromDisk()\n {\n return Storage::disk($this->getLocalDiskName())->delete($this->getStoragePath(true));\n }", "title": "" }, { "docid": "30687a12463a759554c0cdd15b679592", "score": "0.56098014", "text": "public function remove (EntityInterface $entity);", "title": "" }, { "docid": "14d4df02668a2d07f51666ab31e093b8", "score": "0.5609148", "text": "public function destroy($id)\n {\n $store = Store::findorFail($id);\n $product = Product::firstorfail()->where('store_id', $id);\n // unlink(public_path() . '/img/' . $product->image);\n $product->delete();\n unlink(public_path() . '/str_img/' . $store->image);\n $store->delete();\n return redirect()->back()->withDelete(\"Store Deleted Succesfully\");\n\n\n \n }", "title": "" }, { "docid": "942f7427e779526c94189558d1185b66", "score": "0.56033164", "text": "public function delete()\n {\n Yii::debug(\"Deleting last upload.\", self::CATEGORY);\n unlink($this->path);\n Yii::$app->session->remove(self::cacheKey());\n }", "title": "" }, { "docid": "f7e25a0f3411ba82d9ef10dbdff68bb4", "score": "0.5600532", "text": "public function beforeDelete($resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "bc970628483c63b419ea48f599c8c972", "score": "0.5598614", "text": "public function destroy($id)\n {\n $product = Product::findOrFail($id);\n $photo = $product->image;\n if ($photo) {\n unlink($photo);\n Product::findOrFail($id)->delete(); \n }else{\n Product::findOrFail($id)->delete();\n }\n\n }", "title": "" }, { "docid": "5f7b880d9042e6af83f1343c11f66a8e", "score": "0.5595085", "text": "public function destroy($record);", "title": "" }, { "docid": "eb90c146961dd680727f52741dd87d78", "score": "0.55930966", "text": "public function delete($key) {\n $this->assertKey($key);\n \n unset($this->storage[$key]);\n }", "title": "" }, { "docid": "1f90eefbc842f865e713597e80b0fc92", "score": "0.55857533", "text": "public function remove($file);", "title": "" }, { "docid": "0d6640f36c0ca88fbe56977a74dad5f1", "score": "0.55737436", "text": "public function remove(MediaInterface $media);", "title": "" }, { "docid": "268c30c6782025503083fc7ba52c1d0a", "score": "0.557298", "text": "public function delete() {\n $this->dataStoreAdapter->deleteObject($this->getUuid());\n }", "title": "" }, { "docid": "68aa5a7a833751b6ce51749cd9ab047e", "score": "0.5570882", "text": "public function destroy()\n {\n LaraFile::delete(\"images/{Auth::user()->avatar}\");\n }", "title": "" }, { "docid": "8179dc9b6bd99410fef7c74e3b56208a", "score": "0.5570384", "text": "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n @unlink($file); \n \n }", "title": "" }, { "docid": "4aff284263b8a4a2b80b972accc89eb6", "score": "0.55585116", "text": "public function removeFile($file_obj)\n\t{\n\t\t$fs = new Filesystem();\n\t\tif($fs->exists($file_obj->getUrlStorage()))\n\t\t{\n\t\t\t$fs->remove($file_obj->getUrlStorage());\n\t\t}\n\t}", "title": "" }, { "docid": "614063fb503a57e9decfce510aa95492", "score": "0.5555877", "text": "public function destroy($id)\n {\n $product = Product::find($id);\n if (($oldFile = $product->photo) !== 'uyuni.jpg'){\n Storage::delete($oldFile);\n }\n $product->delete();\n return redirect()->route('product.index')->with('success', 'Product successfully destroyed');\n }", "title": "" }, { "docid": "e58edf0ef06400cd31b9c6df91114be3", "score": "0.5555602", "text": "public function destroy(Attribute $attribute)\n {\n //delete a attribute by softDelete.\n $userId = $attribute->Category->Store->user_id;\n\n if (auth()->id() == $userId) {\n if ($attribute->delete()) {\n return new AttributeResource($attribute);\n }\n } else {\n abort(400, 'the Auth user do not store owner');\n }\n }", "title": "" }, { "docid": "ec1b691c67eb4c9111f82f370bc46ab2", "score": "0.55521524", "text": "public function removeAction ()\n { \n if (!empty ($this->params ['file']) AND file_exists (UPLOAD_PATH.$this->params ['file']))\n unlink (UPLOAD_PATH.$this->params ['file']); \n if (!empty ($this->params ['media_id']))\n {\n $model = new Model_DbTable_MediaData ();\n $model->delete_media ($this->params ['media_id']);\n } \n }", "title": "" }, { "docid": "cf67810bc53f9cd6c02a127c0ee780e0", "score": "0.55445576", "text": "public function remove()\n\t{\n\t\tFile::remove($this->tempName);\n\t}", "title": "" }, { "docid": "94cb51fff63ea161e1d8f04215cfe7bf", "score": "0.55422723", "text": "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "45876224e081764ab571b0cb929a5473", "score": "0.5533963", "text": "public function destroy($id)\n {\n\n $product=Product::find($id);\n $image=str_slug($product->imagePath);\n //no se borro la imagen ???\n Storage::delete($image);\n $product->delete();\n \n return back();\n \n }", "title": "" }, { "docid": "9ac57f5d74d74f050136ae1e642ec949", "score": "0.5532133", "text": "public function delete($path) {\n $absPath = $this->_getAbsPath($path);\n $status = @unlink($absPath);\n\n if (!$status) {\n if (file_exists($absPath)) {\n throw new Scalar_Storage_Exception('Unable to delete file.');\n } else {\n $this->_log(\"Scalar_Storage_Adapter_Filesystem: Tried to delete missing file '$path'.\");\n }\n }\n }", "title": "" }, { "docid": "584dea86c95ee49398418c499126a231", "score": "0.55317944", "text": "public function forgetUsed()\n {\n if ($this->app['files']->exists($this->getUsedStoragePath())) {\n $this->app['files']->delete($this->getUsedStoragePath());\n }\n }", "title": "" }, { "docid": "52c48eff326d035cdfe9e0df0c79a23f", "score": "0.55300117", "text": "public function removeFromStorage()\n {\n if ( ! $this->is_raw ) {\n return MediaStorage::adapterByDisk($this->disk)->delete($this->path);\n }\n\n return true;\n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "62470bdab73b1c8776214a0d888756d6", "score": "0.55259556", "text": "public function delete($filename = null){\r\n $filename = $this->getFile($filename);\r\n unlink($filename);\r\n }", "title": "" }, { "docid": "fca5783c203ebaaaafea2bcc3d6ca335", "score": "0.5525723", "text": "public function destroy($id)\n {\n \n $deleteItem = Slider::where('id', '=', $id)->first();\n $oldImg = $deleteItem->image;\n\n $oldfile = public_path('images/').$deleteItem->image;\n\n if (File::exists($oldfile))\n {\n File::delete($oldfile);\n }\n \n $slider = Slider::findOrFail($id);\n $slider->delete(); \n\n return redirect()->route('admin.slider')->with('success','Slider Item deleted successfully');\n }", "title": "" }, { "docid": "2b40268130454e39a95a6fde14dd39ee", "score": "0.55251133", "text": "public function destroy($id)\n {\n $delete = Image::find($id);\n $image = $delete->name;\n $delete->delete();\n Storage::delete('uploads/'.$image);\n return redirect()->back();\n }", "title": "" }, { "docid": "3d971daf6c6545b8d3f3ab39cedcd813", "score": "0.55225646", "text": "public static function untagOnDelete();", "title": "" }, { "docid": "ec759861dd3d396dcc09d5e1bfcf628b", "score": "0.5521281", "text": "public function unlink($path);", "title": "" }, { "docid": "ec759861dd3d396dcc09d5e1bfcf628b", "score": "0.5521281", "text": "public function unlink($path);", "title": "" }, { "docid": "0d93adedaef8f05d9f7cbb129944a438", "score": "0.55152917", "text": "public function delete()\n {\n imagedestroy($this->image);\n $this->clearStack();\n }", "title": "" }, { "docid": "af145ca4d7fcaa5c229e51cfdaf9bb3d", "score": "0.55152094", "text": "public function delete($identifier);", "title": "" } ]
7ea3c57988f1da15370143589d7e7b14
/ got 'em display upper part of month calendar view
[ { "docid": "64f632270807dd5583a98e1b51cb11e3", "score": "0.0", "text": "function startcalendar() {\n global $year, $month, $color;\n\n $prev_date = mktime(0, 0, 0, $month - 1, 1, $year);\n $act_date = mktime(0, 0, 0, $month, 1, $year);\n $next_date = mktime(0, 0, 0, $month + 1, 1, $year);\n $prev_month = date( 'm', $prev_date );\n $next_month = date( 'm', $next_date);\n $prev_year = date( 'Y', $prev_date);\n $next_year = date( 'Y', $next_date );\n $self = 'calendar.php';\n\n echo html_tag( 'tr', \"\\n\".\n html_tag( 'td', \"\\n\".\n html_tag( 'table', '', '', $color[0], 'width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"1\"' ) .\n html_tag( 'tr', \"\\n\".\n html_tag( 'th',\n \"<a href=\\\"$self?year=\".($year-1).\"&amp;month=$month\\\">&lt;&lt;&nbsp;\".($year-1).\"</a>\"\n ) . \"\\n\".\n html_tag( 'th',\n \"<a href=\\\"$self?year=$prev_year&amp;month=$prev_month\\\">&lt;&nbsp;\" .\n date_intl( 'M', $prev_date). \"</a>\"\n ) . \"\\n\".\n html_tag( 'th', date_intl( 'F Y', $act_date ), '', $color[0], 'colspan=\"3\"') .\n html_tag( 'th',\n \"<a href=\\\"$self?year=$next_year&amp;month=$next_month\\\">\" .\n date_intl( 'M', $next_date) . \"&nbsp;&gt;</a>\"\n ) . \"\\n\".\n html_tag( 'th',\n \"<a href=\\\"$self?year=\".($year+1).\"&amp;month=$month\\\">\".($year+1).\"&nbsp;&gt;&gt;</a>\"\n )\n ) . \"\\n\".\n html_tag( 'tr',\n html_tag( 'th', _(\"Sunday\"), '', $color[5], 'width=\"14%\"' ) .\"\\n\" .\n html_tag( 'th', _(\"Monday\"), '', $color[5], 'width=\"14%\"' ) .\"\\n\" .\n html_tag( 'th', _(\"Tuesday\"), '', $color[5], 'width=\"14%\"' ) .\"\\n\" .\n html_tag( 'th', _(\"Wednesday\"), '', $color[5], 'width=\"14%\"' ) .\"\\n\" .\n html_tag( 'th', _(\"Thursday\"), '', $color[5], 'width=\"14%\"' ) .\"\\n\" .\n html_tag( 'th', _(\"Friday\"), '', $color[5], 'width=\"14%\"' ) .\"\\n\" .\n html_tag( 'th', _(\"Saturday\"), '', $color[5], 'width=\"14%\"' ) .\"\\n\"\n )\n ) ,\n '', $color[0] ) .\"\\n\";\n}", "title": "" } ]
[ { "docid": "d4c81ee7190beded9cf7eeca8fa9c139", "score": "0.71037084", "text": "function drawmonthview() {\n global $year, $month, $color, $calendardata, $todayis;\n\n $aday = 1 - date('w', mktime(0, 0, 0, $month, 1, $year));\n $days_in_month = date('t', mktime(0, 0, 0, $month, 1, $year));\n while ($aday <= $days_in_month) {\n echo html_tag( 'tr' );\n for ($j=1; $j<=7; $j++) {\n $cdate=\"$month\";\n ($aday<10)?$cdate=$cdate.\"0$aday\":$cdate=$cdate.\"$aday\";\n $cdate=$cdate.\"$year\";\n if ( $aday <= $days_in_month && $aday > 0){\n echo html_tag( 'td', '', 'left', $color[4], 'height=\"50\" valign=\"top\"' ) .\"\\n\".\n html_tag( 'div', '', 'right' );\n echo(($cdate==$todayis) ? '<font size=\"-1\" color=\"'.$color[1].'\">[ ' . _(\"TODAY\") . \" ] \" : '<font size=\"-1\">');\n echo \"<a href=\\\"day.php?year=$year&amp;month=$month&amp;day=\";\n echo(($aday<10) ? \"0\" : \"\");\n echo \"$aday\\\">$aday</a></font></div>\";\n } else {\n echo html_tag( 'td', '', 'left', $color[0]) .\"\\n\".\n \"&nbsp;\";\n }\n if (isset($calendardata[$cdate])){\n $i=0;\n foreach($calendardata[$cdate] as $calfoo) {\n $calbar = $calendardata[$cdate][$calfoo['key']];\n // FIXME: how to display multiline task\n $title = '['. $calfoo['key']. '] ' .\n str_replace(array(\"\\r\",\"\\n\"),array(' ',' '),htmlspecialchars($calbar['message']));\n // FIXME: link to nowhere\n echo \"<a href=\\\"#\\\" style=\\\"text-decoration:none; color: \"\n .($calbar['priority']==1 ? $color[1] : $color[6])\n .\"\\\" title=\\\"$title\\\">\".htmlspecialchars($calbar['title']).\"</a><br />\\n\";\n $i=$i+1;\n if($i==2){\n break;\n }\n }\n }\n echo \"\\n</td>\\n\";\n $aday++;\n }\n echo '</tr>';\n }\n}", "title": "" }, { "docid": "2d3b57542e7a7c804f58725bbc49d914", "score": "0.6985863", "text": "public function displayCalendar()\n {\n }", "title": "" }, { "docid": "5f92b782a4fb0e16d924a7bc0fa1a118", "score": "0.67275345", "text": "function mkMonthFoot()\n\t{\n\t\treturn toba::output()->get('Calendario')->getMonthFooter();\n\t}", "title": "" }, { "docid": "fbc9f18847799dd725a518197c58475c", "score": "0.6630284", "text": "function display_monthcalendar($agendaitems, $month, $year, $weekdaynames, $monthName, $langToday) {\n\t//Handle leap year\n\t$numberofdays = array(0,31,28,31,30,31,30,31,31,30,31,30,31);\n\tif (($year%400 == 0) or ($year%4==0 and $year%100<>0)) $numberofdays[2] = 29;\n\n\t//Get the first day of the month\n\t$dayone = getdate(mktime(0,0,0,$month,1,$year));\n \t//Start the week on monday\n\t$startdayofweek = $dayone['wday']<>0 ? ($dayone['wday']-1) : 6;\n\n\t$backwardsURL = htmlspecialchars($_SERVER[PHP_SELF]).\"?month=\".($month==1 ? 12 : $month-1).\"&year=\".($month==1 ? $year-1 : $year);\n\t$forewardsURL = htmlspecialchars($_SERVER[PHP_SELF]).\"?month=\".($month==12 ? 1 : $month+1).\"&year=\".($month==12 ? $year+1 : $year);\n\n\t$tool_content .= \"\\n <table width=99% class=\\\"DepTitle\\\">\\n <thead>\";\n \t$tool_content .= \"\\n <tr>\";\n\t$tool_content .= \"\\n <th width=5%><a href=$backwardsURL>&lt;&lt;</a></th>\";\n\t$tool_content .= \"\\n <th width=90%><div align=\\\"center\\\"><b>$monthName $year</b></div></th>\";\n\t$tool_content .= \"\\n <th width=5%><a href=$forewardsURL>&gt;&gt;</a></th>\";\n\t$tool_content .= \"\\n </tr>\";\n\t$tool_content .= \"\\n </thead>\\n </table>\\n <br>\\n\\n\";\n\n\t$tool_content .= \"\\n <table width=99% style=\\\"border: 1px solid #CAC3B5;\\\">\\n <tbody>\\n <tr>\\n <td>\";\n\t$tool_content .= \"\\n <table width=100% class=\\\"FormData\\\">\\n <thead>\\n <tr>\";\n\tfor ($ii=1;$ii<8; $ii++)\n\t{\n \t$tool_content .= \"\\n <th width=14%>\".$weekdaynames[$ii%7].\"</th>\";\n\t }\n\t$tool_content .= \"\\n </tr>\\n </thead>\\n <tbody>\";\n\t$curday = -1;\n\t$today = getdate();\n\twhile ($curday <=$numberofdays[$month])\n \t{\n \t\t$tool_content .= \"\\n <tr>\";\n \tfor ($ii=0; $ii<7; $ii++)\n\t \t{\n\t \t\tif (($curday == -1)&&($ii==$startdayofweek))\n\t\t\t{\n\t \t\t$curday = 1;\n\t\t\t}\n\t\t\tif (($curday>0)&&($curday<=$numberofdays[$month]))\n\t\t\t{\n\t\t\t\t$bgcolor = $ii<5 ? \"class=\\\"cautionk\\\"\" : \"class=\\\"odd\\\"\";\n\t\t\t\t$dayheader = \"$curday\";\n\t\t\t\t$class_style = \"class=odd\";\n\t\t \t\tif (($curday==$today['mday'])&&($year ==$today['year'])&&($month == $today['mon']))\n\t\t\t\t{\n\t\t \t\t\t$dayheader = \"<font color=green><b>$curday</b> <small>($langToday)</small></font>\";\n\t\t \t\t\t$class_style = \"class=\\\"today\\\"\";\n\t\t \t\t\t//$class_style = \"\";\n\t\t\t\t}\n\t \t\t$tool_content .= \"\\n <td height=50 width=14% valign=top $class_style><b>$dayheader</b>\";\n\t\t\t\t$tool_content .= \"$agendaitems[$curday]</td>\";\n\t \t\t$curday++;\n\t \t}\n\t \t\telse\n\t \t{\n\t \t\t$tool_content .= \"\\n <td width=14% class=\\\"inactive\\\">&nbsp;</td>\";\n\t \t}\n\t\t}\n \t$tool_content .= \"\\n </tr>\";\n }\n \t$tool_content .= \"\\n </tbody>\\n </table>\\n\\n\";\n \t\t$tool_content .= \"\\n </td>\\n </tr>\\n </tbody>\\n </table>\";\n\ndraw($tool_content, 1);\n}", "title": "" }, { "docid": "0edef5a7ca9d5ee4970dda70125f59bb", "score": "0.654073", "text": "function mkMonthTitle()\n\t{\n\t\tif (!$this->monthNav) {\n\t\t\t$out = toba::output()->get('Calendario')->getMonthTitle($this->cssMonthTitle, 8, $this->getMonthName().$this->monthYearDivider.$this->actyear);\n\t\t} else {\n\t\t\t$contenido1 = '';\n\t\t\tif ($this->actmonth==1) {\n\t\t\t\t$contenido1 .= $this->mkUrl($this->actyear-1,'12');\n\t\t\t} else {\n\t\t\t\t$contenido1 .= $this->mkUrl($this->actyear,$this->actmonth-1);\n\t\t\t}\n\t\t\t$contenido1 .= $this->monthNavBack.'</a>';\n\t\t\t$out = toba::output()->get('Calendario')->getMonthSquare($this->cssMonthNav, 2 , $contenido1);\n\t\t\t$out .= toba::output()->get('Calendario')->getMonthSquare($this->cssMonthTitle, 3, $this->getMonthName().$this->monthYearDivider.$this->actyear);\n\t\t\t\n\t\t\t$contenido = '';\n\t\t\tif ($this->actmonth==12) {\n\t\t\t\t$contenido .= $this->mkUrl($this->actyear+1,'1');\n\t\t\t} else {\n\t\t\t\t$contenido .= $this->mkUrl($this->actyear,$this->actmonth+1);\n\t\t\t}\n\t\t\t$contenido .= $this->monthNavForw.'</a>';\t\t\t\n\t\t\t$out .= toba::output()->get('Calendario')->getMonthSquare($this->cssMonthNav, 2, $contenido);\n\t\t\t\n\t\t\t$out = toba::output()->get('Calendario')->getFila($out);\n\t\t}\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "8b1676ffa0db29db463fcf464a1382db", "score": "0.64801633", "text": "function output_calendar($year = NULL, $month = NULL, $calendar_class = 'calendar'){\n\n $culture = $this->culture;\n $vdays = self::$vdays;\n $to = 0;\n setlocale(LC_TIME, $culture);\n\n //--------------------- override class methods if values passed directly\n $year = ( is_null($year) )? $this->year : $year;\n $month = ( is_null($month) )? $this->month : str_pad($month, 2, '0', STR_PAD_LEFT);\n\n //------------------------------------------- create first date of month\n $month_start_date = strtotime($year . \"-\" . $month . \"-01\");\n //------------------------- first day of month falls on what day of week\n $first_day_falls_on = $this->day_of_week($month_start_date);\n //----------------------------------------- find number of days in month\n $days_in_month = date(\"t\", $month_start_date);\n //-------------------------------------------- create last date of month\n $month_end_date = strtotime($year . \"-\" . $month . \"-\" . $days_in_month);\n //----------------------- calc offset to find number of cells to prepend\n $start_week_offset = $first_day_falls_on - $this->week_start;\n $prepend = ( $start_week_offset < 0 )? 7 - abs($start_week_offset) : $first_day_falls_on - $this->week_start;\n //-------------------------- last day of month falls on what day of week\n $last_day_falls_on = $this->day_of_week($month_end_date);\n\n //------------------------------------------------- start table, caption\n $output = \"<table class=\\\"\" . $calendar_class . \"\\\">\\n\";\n $output .= \"<caption>\" . Carbon::parse($year . \"-\" . $month . \"-01\")->formatLocalized('%B %Y') . \"</caption>\\n\";\n\n $col = '';\n $th = '';\n\n\n $monday = Carbon::now()->startOfWeek()->subDay(1);\n $weekdays = [$monday, $monday->copy()->addDays(1), $monday->copy()->addDays(2), $monday->copy()->addDays(3),\n $monday->copy()->addDays(4), $monday->copy()->addDays(5), $monday->copy()->addDays(6)];\n foreach ($weekdays as $localized_day_name ){\n $col .= \"<col />\\n\";\n $th .= \"\\t<th title=\\\"\" . ucfirst($localized_day_name->formatLocalized('%a')) .\"\\\" data-toggle=\\\"tooltip\\\" class=\\\"text-center\\\">\" . strtoupper($localized_day_name->formatLocalized('%a'){0}) .\"</th>\\n\";\n }\n\n //------------------------------------------------------- markup columns\n $output .= $col;\n\n //----------------------------------------------------------- table head\n $output .= \"<thead>\\n\";\n $output .= \"<tr>\\n\";\n\n $output .= $th;\n\n $output .= \"</tr>\\n\";\n $output .= \"</thead>\\n\";\n\n //---------------------------------------------------------- start tbody\n $output .= \"<tbody>\\n\";\n $output .= \"<tr>\\n\";\n\n //---------------------------------------------- initialize week counter\n $weeks = 1;\n\n //--------------------------------------------------- pad start of month\n\n //------------------------------------ adjust for week start on saturday\n for($i=1;$i<=$prepend;$i++){\n $output .= \"\\t<td class=\\\"pad\\\">&nbsp;</td>\\n\";\n }\n\n //--------------------------------------------------- loop days of month\n for($day=1,$cell=$prepend+1; $day<=$days_in_month; $day++,$cell++){\n\n /*\n if this is first cell and not also the first day, end previous row\n */\n if( $cell == 1 && $day != 1 ){\n $output .= \"<tr>\\n\";\n }\n\n //-------------- zero pad day and create date string for comparisons\n $daystring = str_pad($day, 2, '0', STR_PAD_LEFT);\n $day_date = $year . \"-\" . $month . \"-\" . $daystring;\n $dayvalue = strtotime($day_date);\n\n //We set the rentalids and occupancy\n $this->test .= $day_date . ' ' . $this->month . $month . ' | ';\n if (!array_key_exists($day_date, $vdays)) {\n die($this->test . ' key used: ' . $day_date . ' days in month:' . $days_in_month . ' day: ' . $daystring . $this->month . $month);\n }\n\n\n $rentalinfo = $vdays[$day_date];\n $periodid = $rentalinfo['periodid'];\n //echo sizeof($rentalinfo);\n\n if ($rentalinfo['halfday'] == true)\n {\n $to = $rentalinfo['to'];\n $this->halfday_dates[] = $day_date;\n }\n if ($rentalinfo['occupied'] == true)\n {\n $to = $rentalinfo['to'];\n $this->occupied_dates[] = $day_date;\n if ($rentalinfo['categoryid'] == 1) {\n $this->family_dates[] = $day_date;\n }\n }\n if ($rentalinfo['notoffered'] == true) $this->notoffered_dates[] = $day_date;\n\n\n //-------------------------- compare day and add classes for matches\n if( $this->mark_today == TRUE && $day_date == date(\"Y-m-d\") ){\n $classes[] = $this->today_date_class;\n }\n\n if( is_array($this->occupied_dates) ){\n if( in_array($day_date, $this->occupied_dates) ) {\n if( is_array($this->family_dates) ){\n if( in_array($day_date, $this->family_dates) ){\n $classes[] = $this->default_family_class;\n }\n else $classes[] = $this->default_occupied_class;\n }\n else $classes[] = $this->default_occupied_class;\n //$classes[] = $this->default_occupied_class;\n }\n }\n if( is_array($this->notoffered_dates) ){\n if( in_array($day_date, $this->notoffered_dates) ){\n $classes[] = $this->default_notoffered_class;\n }\n }\n if( is_array($this->halfday_dates) ){\n if( in_array($day_date, $this->halfday_dates) ){\n $classes[] = $this->default_halfday_class;\n }\n }\n //----------------- loop matching class conditions, format as string\n if (isset($classes)){\n $day_class = ' class=\"';\n foreach( $classes AS $value ){\n $day_class .= $value . \" \";\n }\n $day_class = substr($day_class, 0, -1) . '\"';\n } else {\n $day_class = '';\n }\n\n //---------------------------------- start table cell, apply classes\n $period = $rentalinfo['periodcontract'];\n $price = $rentalinfo['price'];\n $text = $period . \"\\n\" . $price;\n\n $output .= \"<td\" . $day_class . \" title=\\\"\" . $text . \"\\\" data-toggle=\\\"tooltip\\\"\" .\n \" onmouseover=\\\"\n $('#period').html('\".str_replace(\"\\n\", \": \", \" \".$period).\"');\n $('#price').html('\".str_replace(\"\\n\", \": \", \" \".$price).\"');\n \\\"\".\"\\\" onmouseout=\\\"$('#period').html('');$('#price').html('');\n \\\"\". \">\";\n\n //----------------------------------------- unset to keep loop clean\n unset($day_class, $classes);\n\n //-------------------------------------- conditional, start link tag\n\n\n if (((is_array($this->occupied_dates)) OR (is_array($this->notoffered_dates))) AND (time() < $dayvalue))\n {\n if ((in_array($day_date, $this->occupied_dates)) OR (in_array($day_date, $this->notoffered_dates))) $output .= $day;\n else $output .= \"<a href=\\\"\" . $this->link_to . $periodid . \"\\\">\" . $day . \"</a>\";\n }\n else $output .= $day;\n\n\n\n //------------------------------------------------- close table cell\n $output .= \"</td>\\n\";\n\n //------- if this is the last cell, end the row and reset cell count\n if( $cell == 7 ){\n $output .= \"</tr>\\n\";\n $cell = 0;\n }\n\n }\n\n //----------------------------------------------------- pad end of month\n if( $cell > 1 ){\n for($i=$cell;$i<=7;$i++){\n $output .= \"\\t<td class=\\\"pad\\\">&nbsp;</td>\\n\";\n }\n $output .= \"</tr>\\n\";\n }\n\n //--------------------------------------------- close last row and table\n $output .= \"</tbody>\\n\";\n $output .= \"</table>\\n\";\n\n //--------------------------------------------------------------- return\n return $output;\n\n }", "title": "" }, { "docid": "37b816924868e0ab7a6d60076f08725c", "score": "0.6476206", "text": "function getCurrentMonthView()\n {\n $d = getdate(time());\n return $this->getMonthView($d[\"mon\"], $d[\"year\"]);\n }", "title": "" }, { "docid": "1d6fbd4fd7b024d6b62fcc5855e688c6", "score": "0.6470234", "text": "function show_month_header(){ \n\t\t$html=\"<table class='months_table'><tr>\";\n\t\tfor($month=1; $month<=12; $month++){ $cs=\"\";\n\t\t\tif($month==$this->now_month){ $cs.=\" now\"; }\n\t\t\tif($month==$this->cur_month){ $cs.=\" active\"; }\n\t\t\t$html.=\"<td><a class='month\".$cs.\" round' href='\".$this->link($this->action,array('month'=>$month),true,true).\"'>\".$this->get_month_name($this->cur_year,$month).\"</a></td>\";\n\t\t}\n\t\t$html.=\"</tr></table>\";\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "1c79d5a929a31becb18f6de8a38dc5a9", "score": "0.6419077", "text": "public function Months()\n {\n $this->render('basic/months');\n }", "title": "" }, { "docid": "53d3dfee7af81fa6c0b37ec7ef59a971", "score": "0.6409729", "text": "function getCurrentMonthView()\n {\n $d = getdate(time());\n return $this->getMonthView($d[\"mday\"], $d[\"mon\"], $d[\"year\"]);\n }", "title": "" }, { "docid": "b5068195315e21b2ef9024d64ea3b66d", "score": "0.6391412", "text": "public function getMonthTablet();", "title": "" }, { "docid": "b00dfe94981863d81c545ab6e65eeb66", "score": "0.6292031", "text": "function viewdate($month) {\n//\t\tif($bahasa=='BM'){\t \n switch($month) {\n\t\t\t\tcase '01' : $m = 'Januari'; break;\n\t\t\t\tcase '02' : $m = 'Februari'; break;\n\t\t\t\tcase '03' : $m = 'Mac'; break; \n\t\t\t\tcase '04' : $m = 'April'; break; \n\t\t\t\tcase '05' : $m = 'Mei'; break; \n\t\t\t\tcase '06' : $m = 'Jun'; break;\n\t\t\t\tcase '07' : $m = 'Julai'; break;\n\t\t\t\tcase '08' : $m = 'Ogos'; break;\n\t\t\t\tcase '09' : $m = 'September'; break;\n\t\t\t\tcase '10' : $m = 'Oktober'; break;\n\t\t\t\tcase '11' : $m = 'November'; break;\n\t\t\t\tcase '12' : $m = 'Disember'; break;\n } return $m;\n/*\t\t } else {\n switch($month) {\n\t\t\t\tcase '01' : $m = 'January'; break;\n\t\t\t\tcase '02' : $m = 'February'; break;\n\t\t\t\tcase '03' : $m = 'March'; break; \n\t\t\t\tcase '04' : $m = 'April'; break; \n\t\t\t\tcase '05' : $m = 'May'; break; \n\t\t\t\tcase '06' : $m = 'June'; break;\n\t\t\t\tcase '07' : $m = 'July'; break;\n\t\t\t\tcase '08' : $m = 'August'; break;\n\t\t\t\tcase '09' : $m = 'September'; break;\n\t\t\t\tcase '10' : $m = 'October'; break;\n\t\t\t\tcase '11' : $m = 'November'; break;\n\t\t\t\tcase '12' : $m = 'Disember'; break;\n\t\t }\n\t\t\treturn $m;\n\t\t}\n*/\n }", "title": "" }, { "docid": "7b42b86234e46de0d139c3bff4f76b24", "score": "0.62188774", "text": "function trip_calendar() {\n\t\t$this->template->view ( 'utilities/trip_calendar' );\n\t}", "title": "" }, { "docid": "c90409ceff202e0db8d950ac0719748d", "score": "0.6211759", "text": "public function start_calendar ()\n {\n echo \"<table class=\\\"calendar\\\">\\n\";\n }", "title": "" }, { "docid": "f9e9216526c2d462117a4f3a300f6578", "score": "0.61749816", "text": "function getForceMonthView()\n\t{\n\t\treturn $this->force_month_view;\n\t}", "title": "" }, { "docid": "1520e2b9b68c7529ea0a55f3c7effd1e", "score": "0.6174024", "text": "public function getMonth(){\r\n // get events\r\n $this->loadEvents();\r\n //print_r($this->events);\r\n $month_days = date(\"t\", mktime(0, 0, 0, $this->filters['month'], 1, $this->filters['year']));// days in the current month\r\n //echo '<br />Days of Month: '.$month_days;\r\n # N - numeric representation of the day of the week (added in PHP 5.1.0) - 1 (for Monday) through 7 (for Sunday)\r\n # org - l \"L\" - A full textual representation of the day of the week\r\n # get the offset\r\n $offset = date(\"N\", mktime(0, 0, 0, $this->filters['month'], 1, $this->filters['year']));//\r\n if( $offset == 7){\r\n $offset = 0;\r\n }\r\n // permission to add?\r\n $link_view = NULL;\r\n if ( $this->isAdmin() ) { // $this->modx->user->isAuthenticated('mgr') ) {\r\n $this->add_link = true;\r\n $link_view = 'add';\r\n } else if ( $this->filters['allowRequests'] ) {\r\n $link_view = 'request';\r\n }\r\n //echo '<br />Offset: '.$offset;\r\n # get the pre filler start date\r\n if( $this->filters['month'] > 1){\r\n $pre_month = $this->filters['month'] - 1;\r\n $pre_year = $this->filters['year'];\r\n }else{\r\n $pre_month = 12;\r\n $pre_year = $this->filters['year'] - 1;\r\n }\r\n $pre_day = date(\"t\", mktime(0, 0, 0, $pre_month, 1, $pre_year)) - $offset + 1;//day is the previous month\r\n # get the pre filler start date\r\n if( $this->filters['month'] < 12 ){\r\n $after_month = $this->filters['month'] + 1;\r\n $after_year = $this->filters['year'];\r\n }else{\r\n $after_month = 1;\r\n $after_year = $this->filters['year'] + 1;\r\n }\r\n $after_len = 7 - ($month_days + $offset)%7;\r\n if($after_len == 7){\r\n $after_len = 0;\r\n }\r\n \r\n # Make the table headers\r\n $calColumnHeadTpl = '';\r\n if( $this->show_day[7]){ \r\n // this is setting sunday first on the list\r\n $calColumnHeadTpl .= $this->getChunk($this->filters['calColumnHeadTpl'], array('weekDay' => $this->day_array[7]) );\r\n }\r\n for ($count = 1; $count < 7; $count++) {\r\n if( $this->show_day[$count]){\r\n $calColumnHeadTpl .= $this->getChunk($this->filters['calColumnHeadTpl'], array('weekDay' => $this->day_array[$count]) );\r\n }\r\n }\r\n $calColumnTpl = '';\r\n ## pre filler columns\r\n for ($count = 0; $count < $offset; $count++) {\r\n $tmp = $count;\r\n if( $tmp == 0){\r\n $tmp = 7;\r\n }\r\n if( $this->show_day[$tmp]) {\r\n $tmp_date = $pre_year.'-'.$pre_month.'-'.$pre_day;//YYYY-MM-DD\r\n $add_url = ( !empty($link_view) ? $this->url.'view='.$link_view.'&amp;start_date='.$pre_year.'-'.$pre_month.'-'.$pre_day.'&amp;'.$this->params : '' );\r\n $properties = array(\r\n 'assets_url' => MODX_ASSETS_URL,\r\n 'column_class' => 'grey',\r\n 'month' => $this->month_array[$pre_month],\r\n 'year' => $pre_year,\r\n 'day' => $pre_day,\r\n 'day_url' => $this->url.'view=day&amp;month='.$pre_month.'&amp;day='.$pre_day.'&amp;year='.$pre_year,\r\n 'allow_add' => $this->add_link,\r\n 'add_message' => $this->modx->lexicon('addMessage'),\r\n 'add_url' => $add_url,\r\n 'add_link' => ( $this->add_link ? '<a class=\"addEvent\" href=\"'.$add_url.'\" title=\"Add event to '.$tmp_date.'\">[ + ]</a>' : '' ),\r\n 'calDayHolderTpl' => $this->eventList($tmp_date)\r\n );\r\n $calColumnTpl .= $this->getChunk($this->filters['calColumnTpl'], $properties);\r\n }\r\n $pre_day++;\r\n }\r\n $calRowTpl = '';\r\n ## the day columns\r\n for ($count = 1; $count <= $month_days; $count++) {\r\n $cur_day = ($count + $offset)%7;//0 to 6 - 0 is saturday, sunday, mon, tue, wed, thr, fri\r\n if( $cur_day == 1) {// Sunday = 1 - start new row\r\n \r\n $calRowTpl .= $this->getChunk($this->filters['calRowTpl'], array('calColumnTpl' => $calColumnTpl ));\r\n // reset the cal column for the new row(week)\r\n $calColumnTpl = '';\r\n }\r\n # reassign to day array\r\n if($cur_day == 0){\r\n $cur_day = 6;//Saturday\r\n } elseif($cur_day == 1) {\r\n $cur_day = 7;//Sunday\r\n } else {\r\n $cur_day -= 1;//Set to proper day\r\n }\r\n if( $this->show_day[$cur_day]) {\r\n /*$str .= '\r\n <td>\r\n <div class=\"dayWrapper\">\r\n <span class=\"date\">'.$count.'</span>\r\n '.( $this->add_link ? '<a class=\"addEvent\" href=\"'.$this->url.'view='.$this->view.'&amp;start_date='.$this->filters['year'].'-'.$this->filters['month'].'-'.$count.'&amp;'.$this->params.'\" title=\"Add event to '.$this->filters['month'].'/'.$count.'/'.$this->filters['year'].'\">[ + ]</a>' : '' ).'\r\n '.$this->eventList($this->filters['year'].'-'.$this->filters['month'].'-'.$count).'\r\n </div>\r\n </td>';*/\r\n //' CUR: '.(($count + $offset)%7).' - Count: '.$count.' - OFF: '.$offset.\r\n $tmp_date = $this->filters['year'].'-'.$this->filters['month'].'-'.$count;//YYYY-MM-DD\r\n $add_url = ( !empty($link_view) ? $this->url.'view='.$link_view.'&amp;start_date='.$this->filters['year'].'-'.$this->filters['month'].'-'.$count.'&amp;'.$this->params : '' );\r\n $properties = array(\r\n 'assets_url' => MODX_ASSETS_URL,\r\n 'column_class' => '',\r\n 'month' => $this->month_array[$this->filters['month']],\r\n 'year' => $this->filters['year'],\r\n 'day' => $count,\r\n 'day_url' => $this->url.'view=day&amp;month='.$this->filters['month'].'&amp;day='.$count.'&amp;year='.$this->filters['year'],\r\n 'allow_add' => $this->add_link,\r\n 'add_message' => $this->modx->lexicon('addMessage'),\r\n 'add_url' => $add_url,\r\n 'add_link' => ( $this->add_link ? '<a class=\"addEvent\" href=\"'.$add_url.'\" title=\"Add event to '.$tmp_date.'\">[ + ]</a>' : '' ),\r\n 'calDayHolderTpl' => $this->eventList($this->filters['year'].'-'.$this->filters['month'].'-'.$count)\r\n );\r\n $calColumnTpl .= $this->getChunk($this->filters['calColumnTpl'], $properties);\r\n }\r\n }\r\n if( $cur_day == 7 ){\r\n $cur_day = 0;//set to 0 since the loop advances before use!\r\n }\r\n ## after filler columns\r\n for ($count = 1; $count <= $after_len; $count++) {\r\n $cur_day++;\r\n if( $this->show_day[$cur_day]){ // keeping from above\r\n $tmp_date = $after_year.'-'.$after_month.'-'.$count;//YYYY-MM-DD\r\n /* $str .= '\r\n <td class=\"grey\">\r\n <div class=\"dayWrapper\">\r\n <span class=\"date\">'.$count.'</span>\r\n '.( $this->add_link ? '<a class=\"addEvent\" href=\"'.$this->url.'view='.$this->view.'&amp;start_date='.$after_year.'-'.$after_month.'-'.$count.'&amp;'.$this->params.'\" title=\"Add event to '.$tmp_date.'\">[ + ]</a>' : '' ).'\r\n '.$this->eventList($tmp_date).'\r\n </div>\r\n </td>'; */\r\n $add_url = ( !empty($link_view) ? $this->url.'view='.$link_view.'&amp;start_date='.$after_year.'-'.$after_month.'-'.$count.'&amp;'.$this->params : '' );\r\n $properties = array(\r\n 'assets_url' => MODX_ASSETS_URL,\r\n 'column_class' => 'grey',\r\n 'month' => $after_month,\r\n 'year' => $after_year,\r\n 'day' => $count,\r\n 'day_url' => $this->url.'view=day&amp;month='.$after_month.'&amp;day='.$count.'&ampyear='.$after_year,\r\n 'allow_add' => $this->add_link,\r\n 'add_message' => $this->modx->lexicon('addMessage'),\r\n 'add_url' => $add_url,\r\n 'add_link' => ( $this->add_link ? '<a class=\"addEvent\" href=\"'.$add_url.'\" title=\"Add event to '.$tmp_date.'\">[ + ]</a>' : '' ),\r\n 'calDayHolderTpl' => $this->eventList($tmp_date)\r\n );\r\n $calColumnTpl .= $this->getChunk($this->filters['calColumnTpl'], $properties);\r\n \r\n \r\n }\r\n }\r\n // the last row\r\n $calRowTpl .= $this->getChunk($this->filters['calRowTpl'], array('calColumnTpl' => $calColumnTpl ));\r\n \r\n // now fill the table\r\n $properties = array(\r\n 'calColumnHeadTpl' => $calColumnHeadTpl,\r\n 'calRowTpl' => $calRowTpl\r\n );\r\n $calTableTpl = $this->getChunk($this->filters['calTableTpl'], $properties );\r\n return $calTableTpl;\r\n }", "title": "" }, { "docid": "f1948a2a0890c7719d0234ae6d5e559e", "score": "0.613961", "text": "function DisplayCalendar($timeStamp=\"\"){\n\n\n $this->LoadCalendar($timeStamp);\n\n\n $currentTime = mktime(0, 0, 0, $this->currentMonth , 1 , $this->currentYear);\n\n\n $prevMonth = $this->currentMonth - 1;\n\n\n $nextMonth = $this->currentMonth + 1;\n\n\n $prevTime = mktime(0, 0, 0, $prevMonth , 1 , $this->currentYear);\n\n\n $nextTime = mktime(0, 0, 0, $nextMonth , 1 , $this->currentYear);\n\n\n\n\n\n $monthText = date(\"F\",$currentTime);\n\n\n $yearText = date(\"Y\",$currentTime);\n\n\n $dayText = date(\"d\",$currentTime);\n\n\n\n\n\n $totalDays = date('t', $currentTime);\n\n\n $firstDay = date(\"D\", $currentTime);\n\n\n $weekDays = array('Sun','Mon','Tue','Wed','Thu','Fri','Sat');\n\n\n $listMonth = array();\n\n\n $prevMonthText = date('F', $prevTime); \n\n\n $nextMonthText = date('F', $nextTime);\n\n\n\n\n\n $today = mktime();\n\n\n # to find the day of 1st day in a month\n\n\n $index = array_search($firstDay, $weekDays);\n\n\n # starts to print calender\n\n\n $body='\n\n\n <style>\n\n\n\n\n\n\n\n\n\n\n\n #BlueBox{\n\n\n background-color:#ffffff;\n\n\n }\n\n\n .calender{width:100%;}\n\n\n \n\n\n .header_tab{\n\n\n padding:10px 0 20px 0;\n\n\n font-size:15px;\n\n\n color:#5e5e5e;\n\n\n }\n\n\n\n\n\n .header_tab A{\n\n\n text-decoration:none;\n\n\n color:#0092e8;\n\n\n }\n\n\n .cal_tab{\n\n\n padding:0px;\n\n\n text-align:center;\n\n\n vertical-align:center;\n\n\n width:90%;\n\n\n }\n\n\n .cal_tab td A{\n\n\n color:black;\n\n\n text-decoration:none;\n\n\n }\n\n\n .cal_tab .cal_head{\n\n\n background-color:#5e5e5e;\n\n\n color:white;\n\n\n height:50px;\n\n\n } \n\n\n \n\n\n .copy {\n\n\n width:950px;\n\n\n float:center;\n\n\n text-align:center;\n\n\n font-size:9px;\n\n\n color:#515151; \n\n\n padding-top:4px;\n\n\n padding-right:50px;\n\n\n } \n\n\n \n\n\n .copy a {\n\n\n font-family:Arial;\n\n\n font-size:9px;\n\n\n color:#7F7F7F;\n\n\n text-decoration:none;\n\n\n display:inline-block;\n\n\n padding:0 10px 0 10px;\n\n\n }\n\n\n table#caltab tr td:hover{background-color:#e7e7e7}\n\n\n #timebooked p{\n\n\n font-size:12px 1 px solid;\n\n\n }\n\n\n </style>\n\n\n <head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=shift_jis\">\n\n\n <body>\n\n\n <table align=\"center\" border=\"0\" class=\"opaque header_tab\" >\n\n\n <tr>\n\n\n <th style=\"padding-right:150px;\">';\n\n\nif($currentTime >= $prevTime){\n\n\n $body.='<a class=\"noBorder\" href=\"'.$remotelocation.'doctor_book_appointment.php?timeStamp='.$prevTime.'\">'.\"<<\".'</a>';\n\n\n }\n\n\n $body.='</td>\n\n\n <th><b>'.$monthText . \" - \".$yearText.'</b></td>\n\n\n <th style=\"padding-left:150px;\"><a class=\"noBorder\" href=\"'.$remotelocation.'?timeStamp='.$nextTime.'\">'.\">>\".'</a></td>\n\n\n </tr>\n\n\n </table>\n\n\n <p>\n\n\n </p>\n\n\n <table align=\"center\" id=\"caltab\" cellpadding=\"0px\" cellspacing=\"0px\" border=\"1px\" class=\"cal_tab\">\n\n\n <tr class=\"cal_head\">\n\n\n <td>Sun</td>\n\n\n <td>Mon</td>\n\n\n <td>Tue</td>\n\n\n <td>Wed</td>\n\n\n <td>Thu</td>\n\n\n <td>Fri</td>\n\n\n <td>Sat</td>\n\n\n </tr>';\n\n\n\n\n\n $w = 0;\n\n\n for($m = 1; $m <= $totalDays ; ){\n\n\n $d = ($m == 1) ? $index : 0;\n\n\n for( ; $d <= 6 ; $d++){\n\n\n $listMonth[$w][$d] = $m;\n\n\n $m++;\n\n\n if($m > $totalDays){break;}\n\n\n }\n\n\n $w++;\n\n\n }\n\n\n\n\n\n # to get total details of a month\n\n\n $j=1;\n\n\n foreach($listMonth as $styleIdx => $listWeek){\n\n\n $body.= \"<tr>\";\n\n\n for($i = 0 ; $i <= 6 ; $i++){\n\n\n if (isset($listWeek[$i])) {\n\n\n $day = $listWeek[$i] < 10 ? \"0\".$listWeek[$i] : $listWeek[$i];\n\n\n $month = $this->currentMonth;\n\n\n $content = \"<a \";\n\n\n\n\n\n $content.=\"onclick='get_day(\";\n\n\n $content.='\"'.$day.'\",\"'.$monthText.'\",\"'.$yearText.'\",\"'.$i.$j.'\"';\n\n\n $content.=\" );' \";\n\n\n $content.= \">$day</a>\";\n\n\n\n\n\n } else {\n\n\n $content = \"&nbsp;\";\n\n\n }\n\n\n $style = ($styleIdx % 2) ? \"background-color:white\" : \"\";\n\n\n if($listWeek[$i] == date('d')){ \n\n\n $style = \"background-color:white;\"; \n\n\n }\n\n\n $body.= \"<td width='200px' id='currentdate\".$i.$j.\"' height='70px'> {$content}</td>\";\n\n\n }\n\n\n $body.= \"</tr>\";\n\n\n $j++;}\n\n\n $body.= '</table>\n\n\n \n\n\n ';\n\n\necho $body;\n\n\n\n\n\n \n\n\n }", "title": "" }, { "docid": "e56568f7f8b414e7981570fde50fbbc5", "score": "0.61096865", "text": "public function getcalBMR(){\n\t\treturn View::make('calBMR');\n\t}", "title": "" }, { "docid": "7df77280a7f3ab08e361e6d2d487fe1b", "score": "0.6103214", "text": "function build_calendar($month, $year, $title) {\n\n $LK_TD_HEIGHT = $LK_TD_WIDTH = 15;\n $LK_TD_HEIGHT = 6;\n $CR = chr(13).chr(10);\n $LZ = ' ';\n\n $zeitstempel = strtotime($year . \"-\" . $month . \"-01 01:00:00\");\n $monat = date(\"F\", $zeitstempel); //aktuellen Monat ermitteln\n $monatskalender = '<div class=\"kalender\">'.$CR;\n $tag_der_woche = date(\"N\", $zeitstempel); //für die generierung von Leerzellen zu Beginn eines Monats\n\n //Tabellenkopf mit Monat, KW und Wochentagen erstellen\n $monatskalender .= '<table cellspacing=\"0\" cellpadding=\"1\">'.$CR;\n $monatskalender .= $LZ.'<tr class=\"monat\"><th width=\"'. $LK_TD_WIDTH * 8 .'\" align=\"left\"><strong>'.$title.'</strong></th></tr>'.$CR;\n $monatskalender .= $LZ.'<tr bgcolor=\"#EEE\"><td height=\"'. $LK_TD_HEIGHT .'\" width=\"'. $LK_TD_WIDTH .'\" bgcolor=\"#e2e4e5\">KW</td><td height=\"'. $LK_TD_HEIGHT .'\" width=\"'. $LK_TD_WIDTH .'\" bgcolor=\"#e2e4e5\">Mo</td><td height=\"'. $LK_TD_HEIGHT .'\" width=\"'. $LK_TD_WIDTH .'\" bgcolor=\"#e2e4e5\">Di</td><td height=\"'. $LK_TD_HEIGHT .'\" width=\"'. $LK_TD_WIDTH .'\" bgcolor=\"#e2e4e5\">Mi</td><td height=\"'. $LK_TD_HEIGHT .'\" width=\"'. $LK_TD_WIDTH .'\" bgcolor=\"#e2e4e5\">Do</td><td height=\"'. $LK_TD_HEIGHT .'\" width=\"'. $LK_TD_WIDTH .'\" bgcolor=\"#e2e4e5\">Fr</td><td height=\"'. $LK_TD_HEIGHT .'\" width=\"'. $LK_TD_WIDTH .'\" bgcolor=\"#e2e4e5\">Sa</td><td height=\"'. $LK_TD_HEIGHT .'\" width=\"'. $LK_TD_WIDTH .'\" bgcolor=\"#e2e4e5\">So</td></tr>'.$CR;\n\n //Ende des Tabellenkopfes\n while ($monat == date(\"F\", $zeitstempel)) { //Schleife wird so lange durchlaufen, bis sich der Monat ändert\n $aktuelle_kw = date(\"W\", $zeitstempel);\n $monatskalender .= '<tr>'.$CR.$LZ.'<td width=\"'. $LK_TD_WIDTH .'\" height=\"'. $LK_TD_HEIGHT .'\" class=\"kw\" bgcolor=\"#e2e4e5\">'.$aktuelle_kw.'</td>' ;\n\n if ($tag_der_woche > 1 && date(\"d\", $zeitstempel) == 1) {\n for ($i = $tag_der_woche; $i > 1; $i--) {\n $monatskalender .= '<td height=\"'. $LK_TD_HEIGHT .'\" width=\"'. $LK_TD_WIDTH .'\"> </td>';\n }\n }\n\n while ($aktuelle_kw == date(\"W\", $zeitstempel)) { //Schleife wird so lange durchlaufen, bis sich die KW ändert\n $temp_klasse1 = '#fcd5b4';\n\n $temp_klasse1 = '';\n $test_saso = date(\"N\", $zeitstempel);\n\n if($test_saso == 6 OR $test_saso == 7){\n $temp_klasse1 = '#fcd5b4';\n }\n\n $klasse = ' bgcolor=\"'.$temp_klasse1 .'\"';\n $monatskalender .= '<td height=\"'. $LK_TD_HEIGHT .'\" width=\"'. $LK_TD_WIDTH .'\" '.$klasse.'>'.date(\"d\", $zeitstempel).'</td>';\n $zeitstempel = $zeitstempel + (60*60*24);\n\n if (date(\"j\", $zeitstempel) == 1) break; //Abbruch, wenn sich wärend der Woche der Monat ändert\n\n }\n\n $monatskalender .= '</tr>'.$CR ;\n }\n\n $monatskalender .= '</table>'.$CR ;\n $monatskalender .= '</div>'.$CR ;\n\n return $monatskalender;\n }", "title": "" }, { "docid": "771382a9fcfbaddc181dc94a0a4c23c5", "score": "0.609396", "text": "private function outputCalendar() {\n $output = '\n <table width=\"100%\">\n <tr>\n <td valign=\"top\" colspan=\"3\"><br /><br />'.$this->BoxCalendarHeader().'</td>\n </tr>\n </table>\n <br />';\n return $output;\n }", "title": "" }, { "docid": "65307fdac8f685cdc8d7701448668ace", "score": "0.6090971", "text": "protected function setUpDayDisplay()\n {\n $arrayPointer = $this->firstDayOfWeek;\n $shortNames = explode(\" \", $this->__(/* !First Letter of each Day of week */'S M T W T F S'));\n $longNames = explode(\" \", $this->__('Sunday Monday Tuesday Wednesday Thursday Friday Saturday'));\n for ($i = 0; $i < 7; $i++) {\n if ($arrayPointer >= 7) {\n $arrayPointer = 0;\n }\n $this->dayDisplay['long'][$i] = $longNames[$arrayPointer];\n $this->dayDisplay['short'][$i] = $shortNames[$arrayPointer];\n $arrayPointer++;\n }\n // clone DateTime objects for later modification\n $firstClone = clone $this->requestedDate;\n $firstClone->modify(\"first day of this month\");\n $dayClone = clone $this->requestedDate;\n switch ($this->firstDayOfWeek) {\n case self::MONDAY_IS_FIRST:\n $this->dayDisplay['firstDayOfMonth'] = $firstClone->modify(\"-1 day\")->format(\"w\");\n $this->dayDisplay['dayOfWeek'] = $dayClone->modify(\"-1 day\")->format(\"w\");\n $this->dayDisplay['colclass'][5] = \"pcWeekend\";\n $this->dayDisplay['colclass'][6] = \"pcWeekend\";\n break;\n case self::SATURDAY_IS_FIRST:\n $this->dayDisplay['firstDayOfMonth'] = $firstClone->modify(\"+1 day\")->format(\"w\");\n $this->dayDisplay['dayOfWeek'] = $dayClone->modify(\"+1 day\")->format(\"w\");\n $this->dayDisplay['colclass'][0] = \"pcWeekend\";\n $this->dayDisplay['colclass'][1] = \"pcWeekend\";\n break;\n case self::SUNDAY_IS_FIRST:\n default:\n $this->dayDisplay['firstDayOfMonth'] = $firstClone->format(\"w\");\n $this->dayDisplay['dayOfWeek'] = $this->requestedDate->format('w');\n $this->dayDisplay['colclass'][0] = \"pcWeekend\";\n $this->dayDisplay['colclass'][6] = \"pcWeekend\";\n break;\n }\n }", "title": "" }, { "docid": "bbf499789aca3c3014ccf3c24d1299d5", "score": "0.6047896", "text": "function calendar(){}", "title": "" }, { "docid": "54d3a15195391606bbf5a7aff90e11c6", "score": "0.60410506", "text": "function _DoMonth() {\r\n\t\t$data_table = html_table($this->width);\r\n\r\n\t\t// Get month and year\r\n\t\t$month = date('m',$this->_date);\r\n\t\t$year = date('Y',$this->_date);\r\n\r\n\t\t$daysInMonth = $this->_getDaysInMonth($month, $year);\r\n\t\t$first = date('w',mktime(12, 0, 0, $month, 1, $year));\r\n\r\n\t\t$monthName = strftime('%b',$this->_date);\r\n\r\n\t\tif (!$this->_ShowYear) {\r\n\t\t\t$header = ucfirst(\"$monthName $year\");\r\n\t\t} else {\r\n\t\t\t$header = ucfirst(\"$monthName\");\r\n\t\t}\r\n\r\n\t\t// Setting the previous & next month\r\n\t\t$prev = mktime(0,0,0,$month-1, 1, $year);\r\n\t\t$next = mktime(0,0,0,$month+1, 1, $year);\r\n\t\t// Extracting query string\r\n\t\tif (isset($_SERVER['QUERY_STRING'])) {\r\n\t\t\tif (substr($_SERVER['QUERY_STRING'],0,12) == 'CalendarDate') {\r\n\t\t\t\t$query_string = substr($_SERVER['QUERY_STRING'],23);\r\n\t\t\t} else {\r\n\t\t\t\tif ($_SERVER['QUERY_STRING'] != '') $query_string = '&' . $_SERVER['QUERY_STRING'];\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Setting up link\r\n\t\t$prevMonth = $_SERVER['PHP_SELF'] . \"?CalendarDate=$prev\" . $query_string;\r\n\t\t$nextMonth = $_SERVER['PHP_SELF'] . \"?CalendarDate=$next\" . $query_string;\r\n\r\n\t\t// Add header\r\n\t\t$data_table->set_class('PHP_calendar');\r\n\t\t$data_table->set_default_col_attributes(array('align' => 'center'));\r\n\t\t$t_td = html_td('PHP_calendarHeader', 'center', $header);\r\n\t\tif (!$this->_ShowYear) {\r\n\t\t\t$t_td->set_tag_attributes(array('colspan' => 5));\r\n\t\t\t$data_table->add_row(html_td('PHP_calendarHeader', NULL, html_a($prevMonth, '&lt;&lt;')), $t_td,html_td('PHP_calendarHeader', NULL, html_a($nextMonth, '&gt;&gt;')));\r\n\t\t} else {\r\n\t\t\t$t_td->set_tag_attributes(array('colspan' => 7));\r\n\t\t\t$data_table->add_row($t_td);\r\n\t\t}\r\n\t\t$t_tr = html_tr('PHP_calendarHeaderWeekdays',html_td(NULL, 'center', $this->_DayNames[($this->StartDay)%7]),html_td(NULL, 'center', $this->_DayNames[($this->StartDay+1)%7]),html_td(NULL, 'center', $this->_DayNames[($this->StartDay+2)%7]),html_td(NULL, 'center', $this->_DayNames[($this->StartDay+3)%7]),html_td(NULL, 'center', $this->_DayNames[($this->StartDay+4)%7]),html_td(NULL, 'center', $this->_DayNames[($this->StartDay+5)%7]),html_td(NULL, 'center', $this->_DayNames[($this->StartDay+6)%7]));\r\n\t\t$data_table->add_row($t_tr);\r\n\r\n\t\t// We need to work out what date to start at so that the first appears in the correct column\r\n\t\t$d = $this->StartDay + 1 - $first;\r\n\t\twhile ($d > 1) $d -= 7;\r\n\r\n\t\t// Make sure we know when today is, so that we can use a different CSS style\r\n\t\t$today = getdate(mktime());\r\n\r\n\t\twhile ($d <= $daysInMonth) {\r\n\t\t\t$t_row = html_tr();\r\n\r\n\t\t\tfor ($i = 0; $i < 7; $i++) {\r\n\t\t\t\tif ($year == $today['year'] && $month == $today['mon'] && $d == $today['mday']) {\r\n\t\t\t\t\t$class = 'PHP_calendarToday';\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$class = 'PHP_calendar';\r\n\t\t\t\t}\r\n\t\t\t\tif ($d > 0 && $d <= $daysInMonth) {\r\n\t\t\t\t\t//$link = $this->GetLink(mktime(0,0,0,$month,$d,$year));\r\n\t\t\t\t\t$link = $this->GetLink($d,$month,$year);\r\n\t\t\t\t\t// checking if event\r\n\t\t\t\t\tif ($this->DayIsEvent(mktime(0,0,0,$month,$d,$year))) $class .= 'Event';\r\n\r\n\r\n\t\t\t\t\tif ($link != NULL) {\r\n\t\t\t\t\t\t$objLink = html_a($link, $d);\r\n\t\t\t\t\t\t$objLink->set_tag_attribute('target', 'parent_popup');\r\n\t\t\t\t\t\t//$objLink->set_tag_attribute('onMouseUp', 'window.close()');\r\n\t\t\t\t\t\t$t_row->add(html_td(\"$class\",'center',$objLink));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$t_row->add(html_td(\"$class\",'center',$d));\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$t_row->add('&nbsp;');\r\n\t\t\t\t}\r\n\t\t\t\t$d++;\r\n\t\t\t}\r\n\t\t\t$data_table->add_row($t_row);\r\n\t\t}\r\n\t\treturn $data_table;\r\n\t}", "title": "" }, { "docid": "73f7e4e1219263c26b9ef01b7dee1ac0", "score": "0.60341185", "text": "public function generateHTML()\n {\n /*\n echo \"<br />_new_order_months: \" . count($this->_new_order_months);\n echo \"<pre>\";\n var_dump($this->_new_order_months);\n echo \"</pre>\";\n */\n foreach( $this->_new_order_months as $mkey=>$mval) {\n echo \"<div class='col-lg-2'>\" . \"\\n\";\n echo \"\\t\\t\" . \"$mval\\n\" ;\n /*\n if( $mkey > $this->_rest_month+1 ) {\n echo \"\\t\\t\" . $this->_current_year . \" \" . \"$mval\\n\" ;\n } else {\n echo \"\\t\\t\" . $this->_current_year+1 . \" \" . \"$mval\\n\" ;\n }\n */\n\n echo \"</div>\\n\";\n if( array_key_exists( $mval, $this->_jcalendar )) {\n\n echo '<div class=\"col-lg-10\">' . \"\\n\";\n echo '<span class=\"freedays\">' . \"\\n\";\n\n for($i=1; $i<=$this->_months_days[$mval]; $i++) {\n if( array_key_exists($i, $this->_jcalendar[$mval] ) ) {\n echo ' <span class=\"bookdays\"><strong>';\n $j = $i;\n for($j; $j <= $this->_jcalendar[$mval][$i]; $j++) {\n echo ' ' . $j . ' ';\n //$i++;\n }\n echo \"</strong></span>\";\n // echo $j;\n $i = $this->_jcalendar[$mval][$i] ;\n\n } else {\n echo ' ' . $i . ' ';\n }\n }\n echo \"</span>\\n\";\n echo \"\\n</div>\\n\";\n } else {\n echo '<div class=\"col-lg-10\">' . \"\\n\";\n echo \"\\t\\t\" . '<span class=\"freedays\">';\n for($i=1; $i<=$this->_months_days[$mval]; $i++) {\n echo $i . ' ';\n }\n echo \"</span>\\n\";\n echo \"\\n</div>\\n\";\n }\n\n }\n }", "title": "" }, { "docid": "1c2fc94eef1bc992c668d73eb92ead3d", "score": "0.60203123", "text": "function get_month_calendar_html($args){\n $user_name = (isset($args['user_name']) ? $args['user_name'] : $args['user']['user_name']);\n $hash = $args['hash'];\n $h = \"\";\n\n $days = $this->get_days_in_month(array('m' => $args['m'], 'y' => $args['y']));\n $date = getdate(mktime(12, 0, 0, $args['m'], 1, $args['y']));\n\n $first = $date[\"wday\"];\n $prev = $this->get_adjusted_date($args['m'] - 1, $args['y']);\n $next = $this->get_adjusted_date($args['m'] + 1, $args['y']);\n\n $month_name = $this->month_names[$args['m'] - 1];\n $header = \"$month_name $args[y]\";\n\n $h .= \"<table class=\\\"calendar\\\">\\n\";\n $h .= \"<tr>\";\n $h .= \"<td class=\\\"calendar-prev\\\"><a href=\\\"/calendar/month/$prev[1]/$prev[0]\\\">&lt;&lt; Prev</a></td>\";\n $h .= \"<td class=\\\"calendar-header\\\" colspan=5>$header</td>\";\n $h .= \"<td class=\\\"calendar-next\\\"><a href=\\\"/calendar/month/$next[1]/$next[0]\\\">Next &gt;&gt;</a></td>\";\n $h .= \"</tr>\";\n $h .= \"<tr>\";\n $h .= \"<td class=\\\"calendar-day-heading\\\">Sun</td>\";\n $h .= \"<td class=\\\"calendar-day-heading\\\">Mon</td>\";\n $h .= \"<td class=\\\"calendar-day-heading\\\">Tue</td>\";\n $h .= \"<td class=\\\"calendar-day-heading\\\">Wed</td>\";\n $h .= \"<td class=\\\"calendar-day-heading\\\">Thu</td>\";\n $h .= \"<td class=\\\"calendar-day-heading\\\">Fri</td>\";\n $h .= \"<td class=\\\"calendar-day-heading\\\">Sat</td>\";\n $h .= \"</tr>\";\n\n # we need to work out what date to start at so that the first appears in the correct column\n $d = 1 - $first;\n while($d > 1){\n $d -= 7;\n }\n\n # make sure we know when today is, so that we can use a different CSS style\n $today = getdate();\n while($d <= $days){\n $h .= \"<tr>\";\n for ($i = 0; $i < 7; $i++){\n $h .= \"<td>\";\n if($d > 0 && $d <= $days){\n $class = ($args['y'] == $today[\"year\"] && $args['m'] == $today[\"mon\"] && $d == $today[\"mday\"]) ? \"day_number_today\" : \"day_number\";\n $month = sprintf(\"%02s\", $args['m']);\n $day = sprintf(\"%02s\", $d);\n $event_date = \"$args[y]-$month-$day\";\n $h .= \"<div class=\\\"day $class\\\"><div class=$class><a href=\\\"/calendar/day/$args[y]/$args[m]/$day\\\">$d</a></div>\";\n $events = $this->get_events(array('date' => $event_date, 'hash' => $hash, 'user_name' => $user_name));\n #print_r($events);\n foreach($events as $e){\n\n $style = \"color:black;\";\n $caption = \"Time: $e[calendar_start_datetime_formatted]&#013;\";\n $caption .= \"Title: $e[calendar_title]&#013;\";\n if($e['address_address']){\n $caption .= \"Where: $e[address_address], $e[address_city], $e[address_region], $e[address_zip]&#013;\";\n }\n #$caption .= \"Employee: \".$e['employee']['contact_first'].\"&#013;\";\n #if($e['employee']['employee_color']){\n # $style = \"color:\".$e['employee']['employee_color'];\n #}\n $h .= \"<div class=event><a href=\\\"$e[calendar_url]\\\" alt=\\\"$caption\\\" title=\\\"$caption\\\" style=\\\"$style\\\">$e[calendar_time] $e[calendar_title]</a> </div>\";\n }\n $h .= \"</div>\";\n } else {\n $h .= \"&nbsp;\";\n }\n $h .= \"</td>\\n\";\n $d++;\n }\n $h .= \"</tr>\\n\";\n }\n $h .= \"</table>\\n\";\n return $h;\n }", "title": "" }, { "docid": "286d30b00cf20fea378bd019f396991d", "score": "0.60170233", "text": "function calendar($y,$m,$datelist)\n{\nglobal $honapok, $user, $blog, $grants, $dayofweek;\n\n$startweek=weeknumber($y,$m,1);\n$endweek=weeknumber($y,$m,dayInMonth($m,$y))+1;\n$out=\"\";\n$out.=\"\\n<table class='month' cellspacing=0 cellpadding=0>\\n\";\nfor($day=0;$day<7;$day++)\n {\n if($day>4) $out.=\"<tr class='weekend'>\";\n\t\t else\n $out.=\"<tr>\";\n\t\t $out.=\"<td class='DayName'>\".$dayofweek[$day].\"</td>\";\n for($week=$startweek;$week<$endweek;$week++)\n\t\t\t {\n\t\t\t\t\t $t=get_day($day,$week,$y);\n\t\t\t\t\t $strdate=date(\"Y-m-d\",$t);\n\t\t\t\t\t $dayofmonth=date(\"d\",$t);\n\t\t\t\t\t $monthofday=date(\"m\",$t);\n\t\t\t\t\t if($monthofday==$m) $id=\"id='$strdate'\"; else $id=\" \";\n\t \t\t\t $class=\"class='active'\";\n \t\t\t\t if($strdate==date(\"Y-m-d\"))\n \t\t\t\t {\n \t\t\t\t \t\t$class=\"class='current'\";\n \t\t\t\t }\n \t\t\t\t if($monthofday!=$m) \n \t\t\t\t {\n \t\t\t\t \t $class=\"class='oldmonth'\";\n \t\t\t\t }\n\t\t\t\t\t elseif($datelist!=\"null\" && isset($datelist[\"$y-$m-$dayofmonth\"]))\n\t\t\t\t\t {\n \t\t\t$class=\"title='\".$datelist[\"$y-$m-$dayofmonth\"][\"numAll\"].\" bejegyzés'\";\n\t\t\t\t\t \t$link=$datelist[\"$y-$m-$dayofmonth\"][\"link\"];\n\t\t\t\t\t \t$dayofmonth=\"<a href='$link' >$dayofmonth</a>\";\n\t\t\t\t\t }\n $out.=\"<td $id $class>$dayofmonth</td>\";\n//$class=\"class='listed' descr='\".$datelist[\"$y-$m-$dayofmonth\"].\"'\";\n\n\t\t\t\t\t}\n\t\t\t\t\t$out.=\"</tr>\\n\";\n//\t\t\t $out.=br();\n\t\t}\n\t\t$out.=\"</table>\\n\";\nreturn($out);\n}", "title": "" }, { "docid": "3e999b329e97a4ceaf5a841b40c77ca4", "score": "0.60034376", "text": "public function get_month_choices()\n {\n }", "title": "" }, { "docid": "45df1c64cbdfd1da11ae190bd1fff6b0", "score": "0.6001685", "text": "function showCurrentMonth($tblmois, $currentMonth, $currentYear)\n {\n $monthDisplay = $currentMonth - 1; /*$monthDisplay represents the position in the array*/\n\n echo \"<li>\" . $tblmois[$monthDisplay] . \"<br><span style='font-size:18px'>\" . $currentYear . \"</span></li>\"; /*Echo the current month and the current year*/\n\n echo '</ul>';\n }", "title": "" }, { "docid": "639fb827c5b902b0a53987d7dadb03d9", "score": "0.5998325", "text": "public function showCalendar(Users $user) {\n $year = null;\n \n $month = null;\n \n if(null==$year&&isset($_GET['year'])){\n \n $year = $_GET['year'];\n \n }else if(null==$year){\n \n $year = date(\"Y\",time()); \n \n } \n \n if(null==$month&&isset($_GET['month'])){\n \n $month = $_GET['month'];\n \n }else if(null==$month){\n \n $month = date(\"m\",time());\n \n } \n \n $this->currentYear=$year;\n \n $this->currentMonth=$month;\n \n $this->daysInMonth=$this->_daysInMonth($month,$year); \n\n \n $content='<div id=\"calendar\" style=\"margin: 0px auto; \n padding: 0px; \n width: 602px; \n font-family: Helvetica, \"Times New Roman\", Times, serif;\">'.\n '<div class=\"box\" style=\"position: relative; \n top: 0px;\n left: 0px;\n width: 100%;\n height: 40px;\n background-color: #787878;\">'.\n $this->_createNavi().\n '</div>'.\n '<div class=\"box-content\" style=\"1px solid #787878;\n border-top-color: rgb(120, 120, 120);\n border-top-style: solid;\n border-top-width: 1px;\">'.\n '<ul class=\"label\" style=\"float: left;\n margin: 0px;\n 0px;padding: 0px;\n margin-top: 5px;\n margin-left: 5px;\">'.$this->_createLabels().'</ul>'; \n $content.='<div class=\"clear\" style=\"clear: both;\"></div>'; \n $content.='<ul class=\"dates\" style=\"float: left; \n margin: 0px;\n padding: 0px;\n margin-left: 5px;\n margin-bottom: 5px;\">'; \n \n $weeksInMonth = $this->_weeksInMonth($month,$year);\n // Create weeks in a month\n for( $i=0; $i<$weeksInMonth; $i++ ){\n \n //Create days in a week\n for($j=1;$j<=7;$j++){\n $content.=$this->_showDay($i*7+$j, $user);\n \n }\n }\n \n $content.='</ul>';\n \n $content.='<div class=\"clear\" style=\"clear: both;\"></div>'; \n \n $content.='</div>';\n \n $content.='</div>';\n return $content; \n }", "title": "" }, { "docid": "9ef93f78cdd1fac18be50bbd82ad9524", "score": "0.59917575", "text": "public function getCalendar(){\r\n //in the most calender it must be involved widt javascript :/\r\n //I change a lot of echo to out varible so it will fit my needs\r\n $h2Date = date(\"F Y\");\r\n $out = '<section id=\"content\" class=\"planner\">';\t\r\n $out .= '<h2>' . $h2Date . '</h2>'; \r\n \r\n $out .= '<table class=\"month\">\r\n\t <tr class=\"days\">\r\n\t\t <td>Mon</td>\r\n\t\t <td>Tues</td>\r\n\t\t <td>Wed</td>\r\n\t\t <td>Thurs</td>\r\n\t\t <td>Fri</td>\r\n\t\t <td>Sat</td>\r\n\t\t <td>Sun</td>\r\n\t </tr>';\r\n \r\n $today = date(\"d\"); // Current day\r\n\t $month = date(\"m\"); // Current month\r\n\t $year = date(\"Y\"); // Current year\r\n\t $days = cal_days_in_month(CAL_GREGORIAN,$month,$year); // Days in current month\r\n\t\r\n\t $lastmonth = date(\"t\", mktime(0,0,0,$month-1,1,$year)); // Days in previous month\r\n\t\r\n\t $start = date(\"N\", mktime(0,0,0,$month,1,$year)); // Starting day of current month\r\n\t $finish = date(\"N\", mktime(0,0,0,$month,$days,$year)); // Finishing day of current month\r\n\t $laststart = $start - 1; // Days of previous month in calander\r\n\t\r\n\t $counter = 1;\r\n\t $nextMonthCounter = 1;\r\n\t\r\n\t if($start > 5){\t\r\n $rows = 6; \r\n }else{\r\n $rows = 5; \r\n }\r\n\r\n\t for($i = 1; $i <= $rows; $i++){\r\n\t\t $out .= '<tr class=\"week\">';\r\n\r\n\t\t for($x = 1; $x <= 7; $x++){\t\r\n\t\t\t if(($counter - $start) < 0){\r\n\t\t\t\t $date = (($lastmonth - $laststart) + $counter);\r\n\t\t\t\t $class = 'class=\"blur\"';\r\n\t\t\t }else if(($counter - $start) >= $days){\r\n\t\t\t\t $date = ($nextMonthCounter);\r\n\t\t\t\t $nextMonthCounter++;\r\n\t\t\t\t\r\n\t\t\t\t $class = 'class=\"blur\"';\r\n\t\t\t\t\t\r\n\t\t\t }else {\r\n\t\t\t\t $date = ($counter - $start + 1);\r\n\t\t\t\t if($today == $counter - $start + 1){\r\n\t\t\t\t\t $class = 'class=\"today\"';\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t\t\r\n //GET\r\n $sendMonth = date(\"F\");\r\n\t\t\t $sendDate = \"?id=$date\";\r\n $sendDate .= \"&month=$sendMonth\";\r\n $sendDate .= \"&year=$year\";\r\n\r\n\t\t\t $out .= '<td '.$class.'><a href=\"' . $sendDate . '\" class=\"date\">'. $date . '</a></td>';\r\n\t\t\r\n\t\t\t $counter++;\r\n\t\t\t $class = '';\r\n\t\t }\r\n\t\t $out .= '</tr>';\r\n\t }\r\n\r\n $out .= '</table>\r\n </section>';\r\n\r\n return $out;\r\n }", "title": "" }, { "docid": "f5a8114ad26b255978e041e9764c9c39", "score": "0.5981646", "text": "function mkMonthHead()\n\t{\n\t\t$out = toba::output()->get('Calendario')->getMonthHeader($this->cssMonthTable);\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "06402a32776566bad96870dfa3bb8e0e", "score": "0.5980232", "text": "public function month_crumbs() {\n\t\t$year = get_the_time( 'Y' );\n\t\t$output = $this->link_wrap( get_year_link( $year ), $year );\n\t\t$output .= get_the_time( 'F' );\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "1815b0689d2e5e5355ca3525143258c9", "score": "0.59712106", "text": "public function get_month_permastruct()\n {\n }", "title": "" }, { "docid": "c8e919dea0dccdce71a429fc303fec16", "score": "0.59694266", "text": "private function month_crumbs() {\n\t\t$year = get_the_time( 'Y' );\n\t\t$output = $this->link_wrap( get_year_link( $year ), $year );\n\t\t$output .= get_the_time( 'F' );\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "185f8ae9486a9e3140cd5367dd1b868e", "score": "0.5962896", "text": "function get_month_calendar_html_new($args){\n $user_name = (isset($args['user_name']) ? $args['user_name'] : $args['user']['user_name']);\n $hash = $args['hash'];\n $events = $args['events'];\n $h = \"\";\n\n $days = $this->get_days_in_month(array('m' => $args['m'], 'y' => $args['y']));\n $date = getdate(mktime(12, 0, 0, $args['m'], 1, $args['y']));\n\n $first = $date[\"wday\"];\n $prev = $this->get_adjusted_date($args['m'] - 1, $args['y']);\n $next = $this->get_adjusted_date($args['m'] + 1, $args['y']);\n\n $month_name = $this->month_names[$args['m'] - 1];\n $header = \"$month_name $args[y]\";\n\n $h .= \"<table class=\\\"calendar\\\">\\n\";\n $h .= \"<tr>\";\n $h .= \"<td class=\\\"calendar-prev\\\"><a href=\\\"/calendar/month/$prev[1]/$prev[0]\\\">&lt;&lt; Prev</a></td>\";\n $h .= \"<td class=\\\"calendar-header\\\" colspan=5>$header</td>\";\n $h .= \"<td class=\\\"calendar-next\\\"><a href=\\\"/calendar/month/$next[1]/$next[0]\\\">Next &gt;&gt;</a></td>\";\n $h .= \"</tr>\";\n $h .= \"<tr>\";\n $h .= \"<td class=\\\"calendar-day-heading\\\">Sun</td>\";\n $h .= \"<td class=\\\"calendar-day-heading\\\">Mon</td>\";\n $h .= \"<td class=\\\"calendar-day-heading\\\">Tue</td>\";\n $h .= \"<td class=\\\"calendar-day-heading\\\">Wed</td>\";\n $h .= \"<td class=\\\"calendar-day-heading\\\">Thu</td>\";\n $h .= \"<td class=\\\"calendar-day-heading\\\">Fri</td>\";\n $h .= \"<td class=\\\"calendar-day-heading\\\">Sat</td>\";\n $h .= \"</tr>\";\n\n # we need to work out what date to start at so that the first appears in the correct column\n $d = 1 - $first;\n while($d > 1){\n $d -= 7;\n }\n\n # make sure we know when today is, so that we can use a different CSS style\n $today = getdate();\n while($d <= $days){\n $h .= \"<tr>\";\n for ($i = 0; $i < 7; $i++){\n $h .= \"<td>\";\n if($d > 0 && $d <= $days){\n $class = ($args['y'] == $today[\"year\"] && $args['m'] == $today[\"mon\"] && $d == $today[\"mday\"]) ? \"day_number_today\" : \"day_number\";\n $month = sprintf(\"%02s\", $args['m']);\n $day = sprintf(\"%02s\", $d);\n $event_date = \"$args[y]-$month-$day\";\n $h .= \"<div class=\\\"day $class\\\"><div class=$class><a href=\\\"/calendar/day/$args[y]/$args[m]/$day\\\">$d</a></div>\";\n #$events = $this->get_events(array('date' => $event_date, 'hash' => $hash, 'user_name' => $user_name));\n #print_r($events);\n if(isset($events[$event_date])){\n foreach($events[$event_date] as $e){\n $style = '';\n if($e['calendar_color'])\n $style = \"style=\\\"background-color:$e[calendar_color];\\\"\";\n $event_content = '';\n if(!$e['calendar_all_day'])\n $event_content .= $e['calendar_time'].' ';\n $event_content .= $e['calendar_title'];\n $h .= \"<div class=\\\"event\\\" $style><a href=\\\"$e[calendar_url]\\\">$event_content</a> </div>\";\n }\n }\n $h .= \"</div>\";\n } else {\n $h .= \"&nbsp;\";\n }\n $h .= \"</td>\\n\";\n $d++;\n }\n $h .= \"</tr>\\n\";\n }\n $h .= \"</table>\\n\";\n return $h;\n }", "title": "" }, { "docid": "8a6fc317382a06fd90fda7e01d1c131b", "score": "0.5960535", "text": "public function calender()\n {\n \t return view('genral.calender');\n }", "title": "" }, { "docid": "7b74ec2a9c0c4a83129bf4842604593a", "score": "0.5959196", "text": "function calendar_build_calendar($view, $items) {\r\n // Remove nodes outside the selected date range.\r\n $values = array();\r\n foreach ($items as $delta => $item) {\r\n if (empty($item->calendar_start_date) || empty($item->calendar_end_date)) {\r\n continue;\r\n }\r\n $item_start = date_format($item->calendar_start_date, DATE_FORMAT_DATE);\r\n $item_end = date_format($item->calendar_end_date, DATE_FORMAT_DATE);\r\n if (($item_start >= $view->date_info->min_date_date && $item_start <= $view->date_info->max_date_date)\r\n || ($item_end >= $view->date_info->min_date_date && $item_end <= $view->date_info->max_date_date)) {\r\n $values[$item_start][date_format($item->calendar_start_date, 'H:i:s')][] = $item;\r\n }\r\n }\r\n $items = $values;\r\n ksort($items);\r\n \r\n $rows = array();\r\n $curday = drupal_clone($view->date_info->min_date);\r\n \r\n switch ($view->date_info->granularity) {\r\n case 'year':\r\n $rows = array();\r\n $view->date_info->mini = TRUE;\r\n for ($i = 1; $i <= 12; $i++) {\r\n $rows[$i] = calendar_build_month($curday, $view, $items);\r\n }\r\n $view->date_info->mini = FALSE;\r\n break;\r\n\r\n case 'month':\r\n $rows = calendar_build_month($curday, $view, $items);\r\n break;\r\n\r\n case 'day':\r\n $rows = calendar_build_day($curday, $view, $items);\r\n break;\r\n\r\n case 'week':\r\n $rows = calendar_build_week($curday, $view, $items);\r\n\r\n // Merge the day names in as the first row.\r\n $rows = array_merge(array(calendar_week_header($view)), $rows);\r\n break;\r\n }\r\n return $rows;\r\n \r\n}", "title": "" }, { "docid": "c953a75b36e7eb4d60fef48eaafab453", "score": "0.59538907", "text": "public function display($scope = 'month');", "title": "" }, { "docid": "354d1b401a8bd39f8ffe4332f9467e31", "score": "0.594624", "text": "public function BoxCalendar()\n {\n $output = '';\n return $output;\n }", "title": "" }, { "docid": "10385ce4a28c1b5669b729fca4894461", "score": "0.5935135", "text": "function getMonthHTML($m, $y, $showYear = 1)\n {\n $s = \"\";\n \n $a = $this->adjustDate($m, $y);\n $month = $a[0];\n $year = $a[1]; \n \n \t$daysInMonth = $this->getDaysInMonth($month, $year);\n \t$date = getdate(mktime(12, 0, 0, $month, 1, $year));\n \t\n \t$first = $date[\"wday\"];\n \t$monthName = $this->monthNames[$month - 1];\n \t\n \t$prev = $this->adjustDate($month - 1, $year);\n \t$next = $this->adjustDate($month + 1, $year);\n \t\n \tif ($showYear == 1)\n \t{\n \t $prevMonth = $this->getCalendarLink($prev[0], $prev[1]);\n \t $nextMonth = $this->getCalendarLink($next[0], $next[1]);\n \t}\n \telse\n \t{\n \t $prevMonth = \"\";\n \t $nextMonth = \"\";\n \t}\n \t\n \t$header = $monthName . (($showYear > 0) ? \" \" . $year : \"\");\n \t\n \t$s .= \"<table class='calendarCont adminform1' width='100%' cellspacing='15' style='background-color:#dce9f9;height:20em;'>\\n\";\n \t$s .= \"<tr>\\n\";\n \t$s .= \"<td align=\\\"center\\\" >\" . (($prevMonth == \"\") ? \"&nbsp;\" : \"<a href=\\\"$prevMonth\\\">&lt;&lt;</a>\") . \"</td>\\n\";\n \t$s .= \"<td align=\\\"center\\\" class=\\\"calendarHeader\\\" colspan=\\\"5\\\">$header</td>\\n\"; \n \t$s .= \"<td align=\\\"center\\\" >\" . (($nextMonth == \"\") ? \"&nbsp;\" : \"<a href=\\\"$nextMonth\\\">&gt;&gt;</a>\") . \"</td>\\n\";\n \t$s .= \"</tr>\\n\";\n \t\n \t$s .= \"<tr>\\n\";\n \t$s .= \"<td align=\\\"center\\\" class=\\\"calendarHeader\\\">\" . $this->dayNames[($this->startDay)%7] . \"</td>\\n\";\n \t$s .= \"<td align=\\\"center\\\" class=\\\"calendarHeader\\\">\" . $this->dayNames[($this->startDay+1)%7] . \"</td>\\n\";\n \t$s .= \"<td align=\\\"center\\\" class=\\\"calendarHeader\\\">\" . $this->dayNames[($this->startDay+2)%7] . \"</td>\\n\";\n \t$s .= \"<td align=\\\"center\\\" class=\\\"calendarHeader\\\">\" . $this->dayNames[($this->startDay+3)%7] . \"</td>\\n\";\n \t$s .= \"<td align=\\\"center\\\" class=\\\"calendarHeader\\\">\" . $this->dayNames[($this->startDay+4)%7] . \"</td>\\n\";\n \t$s .= \"<td align=\\\"center\\\" class=\\\"calendarHeader\\\">\" . $this->dayNames[($this->startDay+5)%7] . \"</td>\\n\";\n \t$s .= \"<td align=\\\"center\\\" class=\\\"calendarHeader\\\">\" . $this->dayNames[($this->startDay+6)%7] . \"</td>\\n\";\n \t$s .= \"</tr>\\n\";\n \t\n \t// We need to work out what date to start at so that the first appears in the correct column\n \t$d = $this->startDay + 1 - $first;\n \twhile ($d > 1)\n \t{\n \t $d -= 7;\n \t}\n\n // Make sure we know when today is, so that we can use a different CSS style\n $today = getdate(time());\n \t\n \twhile ($d <= $daysInMonth)\n \t{\n \t $s .= \"<tr>\\n\"; \n \t \n \t for ($i = 0; $i < 7; $i++)\n \t {\n \t $class = ($year == $today[\"year\"] && $month == $today[\"mon\"] && $d == $today[\"mday\"]) ? \"calendarToday\" : \"calendar\";\n \t $s .= \"<td class=\\\"$class\\\" align=\\\"center\\\" >\"; \n \t if ($d > 0 && $d <= $daysInMonth)\n \t {\n \t $link = $this->getDateLink($d, $month, $year);\n \t $s .= (($link == \"\") ? $d : \"<a class='event' href=\\\"$link\\\">$d</a>\");\n \t }\n \t else\n \t {\n \t $s .= \"&nbsp;\";\n \t }\n \t $s .= \"</td>\\n\"; \n \t $d++;\n \t }\n \t $s .= \"</tr>\\n\"; \n \t}\n \t\n \t$s .= \"</table>\\n\";\n \t\n \treturn $s; \t\n }", "title": "" }, { "docid": "1db533852576a9b5d64d462f4683c846", "score": "0.59282506", "text": "function Footer() {\n\t\t$this->SetY(-15);\r\n\t\t$this->SetFont('vera', 'I', 8);\r\n\t\t$data = new Zend_Date();\n\t\t$this->Cell(0,10,$this->titulo . ' - Página '.$this->PageNo().'/{nb}'.' em '.$data->get('d-MM-y'),0,0,'C');\n\t}", "title": "" }, { "docid": "6214b1819c6b93b25163e3d9816de6c9", "score": "0.59268755", "text": "function display_calendar ()\n\t\t{\t\n\t\t\tif (!$this->authentication->logged_in (\"admin\"))\n\t\t\t\tredirect(\"admin\");\n\t\t\t\n\t\t\t//calls DML for processing data\n\t\t\tif($_POST)\n\t\t\t\t$this->_dbEventProcessor();\n\t\t\t\n\t\t\t//gets the region and subregion for filter purpose\n\t\t\t$this->_get_regions_subregions();\n\t\t\t\n\t\t\t// gets the calendar (month || year)\n\t\t\tif(isset($_POST['hdnTimeid']) && $_POST['hdnTimeid']!=0)\n\t\t\t\t$time = $_POST['hdnTimeid'];\n\t\t\telse \n\t\t\t\t$time = strtotime('-8 hour');\n\t\t\t\n\t\t\t$this->gen_contents['sec_timing'] = $time;\n\t\t\t\n\t\t\t$_POST['sltSearchRegion'] = '';\n\t\t\t$_POST['sltSearchSubregion'] = '';\n\t\t\t//selected search options are saved to a variable\n\t\t\tif($_POST){\n\t\t\t\t$this->gen_contents['region_search'] \t= $_POST['sltSearchRegion'];\n\t\t\t\t$this->gen_contents['subregion_search'] = $_POST['sltSearchSubregion'];\n\t\t\t}\n\t\t\t\n\t\t\t//helps to change the mode of calendar by choosing the link from subregion list out \n\t\t\tif($this->session->userdata('CLASS')){\n\t\t\t\t$this->gen_contents['class_mode'] \t= 1;\n\t\t\t\t$this->gen_contents['title']\t\t= 'Class Management';\n\t\t\t\t$this->gen_contents['page_title']\t= 'Class Management';\n\t\t\t}\n\t\t\t\t\n\t\t\t// we call _date function to get all the details of calendar n its event\n\t\t\t$this->gen_contents = array_merge($this->gen_contents,$this->_date($time));\n\t\t\t\n\t\t\t//default listing events for the current date\n\t\t\t//'hdnCurrentDate' field stores the date fo today onload\n\t\t\t//once a date is choosen to list the events or for adding the hidden filed will contain that date\n\t\t\t//after traversing the calendar and when returned back to the current month default listing should be provided\n\t\t\tif(isset($_POST['hdnCurrentDate'])){\n\t\t\t\t$this->gen_contents['hdnCurrentDate'] \t= date('Y/m/d',strtotime($_POST['hdnCurrentDate'])); \n\t\t\t\t\n\t\t\t\tif(($this->gen_contents['actual_month_year'] == $this->gen_contents['current_month_year']) && $_POST['hdnCurrentDate'] == ''){\n\t\t\t\t\t$this->gen_contents['hdnCurrentDate'] \t= $this->gen_contents['today'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->_template('display_calendar',$this->gen_contents);\n\t\t}", "title": "" }, { "docid": "995143ad6800dd5e59bd4c2ac89faf5f", "score": "0.59176797", "text": "public function calendar(){\n\t\t$this->layout = 'clientpage';\n\t}", "title": "" }, { "docid": "4bae6e8386ff961669224d4752828263", "score": "0.58971596", "text": "function calendar_view($day = null, $month = null, $year = null, $calendar_type = null)\r\n {\r\n global $uid;\r\n if(!is_null($calendar_type) && ($calendar_type == 'day' || $calendar_type == 'week' || $calendar_type == 'month')){\r\n set_calendar_view_preference($calendar_type);\r\n $view_func = $calendar_type.\"_calendar\";\r\n }\r\n else{\r\n $view_func = $calsettings->view_type.\"_calendar\";\r\n }\r\n if(is_null($month) || is_null($year) || $month<0 || $month>12 || $year<1990 || $year>2099){\r\n $today = getdate();\r\n $day = $today['mday'];\r\n $month = $today['mon'];\r\n $year = $today['year'];\r\n }\r\n if($calendar_type == 'small'){\r\n return small_month_calendar($day, $month, $year);\r\n }\r\n else{\r\n return $view_func($day, $month, $year);\r\n }\r\n }", "title": "" }, { "docid": "cefb4dd5eaa8f51ae7bf74e31aacdc60", "score": "0.58879", "text": "function view_dates() {\r\n global $OUTPUT;\r\n if (!empty($this->poasassignment->availabledate) && !empty($this->poasassignment->choicedate) && !empty($this->poasassignment->deadline)) {\r\n echo $OUTPUT->box_start('generalbox boxaligncenter', 'dates');\r\n echo '<table>';\r\n if (!empty($this->poasassignment->availabledate)) {\r\n echo '<tr><td class=\"c0\">'.get_string('availablefrom','poasassignment').'</td>';\r\n echo ' <td class=\"c1\">'.userdate($this->poasassignment->availabledate).'</td></tr>';\r\n }\r\n if (!empty($this->poasassignment->choicedate)) {\r\n echo '<tr><td class=\"c0\">'.get_string('selectbefore','poasassignment').'</td>';\r\n echo '<td class=\"c1\">'\r\n . userdate($this->poasassignment->choicedate)\r\n . ' ('\r\n . poasassignment_model::time_difference($this->poasassignment->choicedate)\r\n .')</td></tr>';\r\n }\r\n if (!empty($this->poasassignment->deadline)) {\r\n echo '<tr><td class=\"c0\">'.get_string('deadline','poasassignment').'</td>';\r\n echo '<td class=\"c1\">'\r\n . userdate($this->poasassignment->deadline)\r\n . ' ('\r\n . poasassignment_model::time_difference($this->poasassignment->deadline)\r\n . ')</td></tr>';\r\n }\r\n echo '</table>';\r\n echo $OUTPUT->box_end();\r\n }\r\n }", "title": "" }, { "docid": "ee313077528d1a2fcda6b5703a9028b1", "score": "0.58875066", "text": "public function actionGetCalendarWidget() {\n\t\t$this->isAjax = true;\n\t\t$this->content = $this->createCalendar($this->month, $this->year) . $this->createCalendar($this->month2, $this->year2);\n\t}", "title": "" }, { "docid": "61df814a96f9069322568acac2b2534d", "score": "0.58717155", "text": "function view_dates() {\n global $USER, $CFG;\n\n if (!$this->assignment->timeavailable && !$this->assignment->timedue) {\n return;\n }\n\n print_simple_box_start('center', '', '', 0, 'generalbox', 'dates');\n echo '<table>';\n if ($this->assignment->timeavailable) {\n echo '<tr><td class=\"c0\">'.get_string('availabledate','assignment').':</td>';\n echo ' <td class=\"c1\">'.userdate($this->assignment->timeavailable).'</td></tr>';\n }\n if ($this->assignment->timedue) {\n echo '<tr><td class=\"c0\">'.get_string('duedate','assignment').':</td>';\n echo ' <td class=\"c1\">'.userdate($this->assignment->timedue).'</td></tr>';\n }\n $submission = $this->get_submission($USER->id);\n if ($submission) {\n echo '<tr><td class=\"c0\">'.get_string('lastedited').':</td>';\n echo ' <td class=\"c1\">'.userdate($submission->timemodified);\n /// Decide what to count\n if ($CFG->assignment_itemstocount == ASSIGNMENT_COUNT_WORDS) {\n echo ' ('.get_string('numwords', '', count_words(format_text($submission->data1, $submission->data2))).')</td></tr>';\n } else if ($CFG->assignment_itemstocount == ASSIGNMENT_COUNT_LETTERS) {\n echo ' ('.get_string('numletters', '', count_letters(format_text($submission->data1, $submission->data2))).')</td></tr>';\n }\n }\n echo '</table>';\n print_simple_box_end();\n }", "title": "" }, { "docid": "32df82a7f385be26109e3cb641f59df9", "score": "0.5866508", "text": "function print_month($month, $year, $small) \n{\n\tglobal $default_lang;\n\n\t$tmstart = mktime(0, 0, 0, $month, 1, $year);\n\t$tmend = mktime(0, 0, 0, $month+1, 0, $year);\n\t$wkstart = date('w',$tmstart);\t\n\t$wkend = date('w', $tmend);\n\t$thismonth = date('m');\n\t$thisyear = date('Y');\n\t\n\t//echo $tmstart.'<br>'.$tmend.'<br>end:'.$dayend.'<br> weekstart:'.$wkstart.'<br>';\n\t\n\t$tmstart = $tmstart - $wkstart*24*3600; //get the first sunday's date\n\t$tmend = $tmend + (7 - $wkend)*24*3600; //get the last saturday's date\n\t//echo date('Ymd',$tmstart).'-'.date('Ymd',$tmend).'<br>';\n\t$tm = $tmstart;\n\t\n\t//maybe the css needed ----- ^o^\n\t$ret = '\n\t\t<table width=\"90%\" cellspacing=\"0\" cellpadding=\"0\" class=\"t2\">';\n\t\n\t$tmp = ' '.$year.'-'.$month.' ';\n\tif ($small) {\n\t\t$tmp = '<a href=month.php?m='.$month.'&y='.$year.'>'.$year.'-'.$month.'</a>';\n\t}\n\tif (($year*12+$month) - ($thisyear*12+$thismonth) > 1) {\n\t\t\t$tmp = ' '.$year.'-'.$month.' ';\n\t}\t\t\n\t$ret .= '\n\t\t\t<tr class=\"a2\">\n\t\t\t\t<td colspan=\"7\">'.$tmp.'</td>\n\t\t\t</tr>';\n\n\t$ret .= '\n\t\t\t<thead>';\n\n\tfor ($i = 0; $i < 7; $i++ ) {\t\t\n\t\t$ret .= ('\n\t\t\t\t<th>'.get_weekday_name($i, $small, $default_lang).'</th>'); //maybe the css needed\n\t} \n\n\t$ret .=\t('\t\n\t\t\t</thead>');\n\t\n\tfor ($tm = $tmstart; $tm < $tmend; $tm+= 604800) { //604800 = 24*7*3600\n\t\t$ret .= (' \n\t\t\t\t'.get_month_content($tm, $month, !$small).' \n\t\t\t\t');\n\t\t//get_month_content($tm, $month, !$small);\n\t}\n\t$ret .= ('\n\t\t</table>');\n\t\n\treturn $ret;\n}", "title": "" }, { "docid": "97abb830043154e3741cbd4cce6e9dd4", "score": "0.5863482", "text": "function month($year = '', $month = '', $id = '')\r\n\t{\r\n\t\t$this->day_list = $this->getdayslist();\r\n\t\t$item_id = $id;\r\n\t\t//to make the separation of date display with available and unavailable count\r\n $days = array();\r\n $monthly_start_date = $year . '-' . $month . '-1';\r\n $month_start_date = date('Y-m-d', strtotime($monthly_start_date));\r\n $temmp = explode('-', $monthly_start_date);\r\n $month_end_date = date('Y-m-d', mktime(0, 0, 0, $temmp[1]+1, $temmp[2]-1, $temmp[0]));\r\n\t\t\r\n\t\tif (strtotime(date('Y-m-d')) < strtotime($month_start_date)) {\r\n\t $monthly_color = '#98CF67';\r\n\t\t} else {\r\n\t $monthly_color = '#FFFFFF';\r\n\t\t}\r\n if (is_array($days)) {\r\n ksort($days);\r\n }\r\n $str = '';\r\n $day = 1;\r\n $today = 0;\r\n $month = $this->month_list[$month-1];\r\n\t\t\r\n if ($year == '' || $month == '') { // just use current year & month\r\n $year = date('Y');\r\n $month = date('m');\r\n }\r\n $flag = 0;\r\n for ($i = 0; $i < 12; $i++) {\r\n if (strtolower($month) == $this->month_list[$i]) {\r\n if (intval($year) != 0) {\r\n $flag = 1;\r\n $month_num = $i+1;\r\n break;\r\n }\r\n }\r\n }\r\n $temp = array_flip($this->month_list);\r\n if ($flag == 0) {\r\n $year = date('Y');\r\n $month = date('F');\r\n $month_num = date('m');\r\n }\r\n $next_year = $year;\r\n $prev_year = $year;\r\n $next_month = intval($month_num) +1;\r\n $prev_month = intval($month_num) -1;\r\n\t\t\r\n if ($next_month == 13) {\r\n $next_month = 'january';\r\n $next_year = intval($year) +1;\r\n } else {\r\n $next_month = $this->month_list[$next_month-1];\r\n }\r\n if ($prev_month == 0) {\r\n $prev_month = 'december';\r\n $prev_year = intval($year) -1;\r\n } else {\r\n $prev_month = $this->month_list[$prev_month-1];\r\n }\r\n if ($year == date('Y') && strtolower($month) == strtolower(date('F'))) {\r\n // set the flag that shows todays date but only in the current month - not past or future...\r\n $today = date('j');\r\n }\r\n $calType = 'big-calendar dc';\r\n $action = 'calendar';\r\n $days_in_month = date(\"t\", mktime(0, 0, 0, $month_num, 1, $year));\r\n $first_day_in_month = date('D', mktime(0, 0, 0, $month_num, 1, $year));\r\n $prev_num = $month_num-1;\r\n $next_num = $month_num-1;\r\n $str.= '<div class=\"js-bookit-calendar-block\"><div class=\"hasDatepicker js-calender-permonth js-calender-form-calender\" id=\"datepicker\">';\r\n $str.= '<div class=\"' . $calType . '\">';\r\n $str.= '<div class=\"calendar-month no-pad pr dc tb tab-pane active span calendar pull-right no-mar graydarkc bot-space sep-bot\">';\r\n $temp = array_flip($this->month_list);\r\n $prev_month_mod = $temp[$prev_month]+1;\r\n $prev_url = Router::url(array(\r\n 'controller' => 'items',\r\n 'action' => 'calendar',\r\n 'guest',\r\n 'month' => $prev_month_mod,\r\n 'year' => $prev_year,\r\n 'item_id' => $item_id,\r\n ) , true);\r\n if ($monthly_color == '#98CF67') {\r\n $monthly_title = 'Available';\r\n } elseif ($monthly_color == '#FFA2B7') {\r\n $monthly_title = 'Booked';\r\n } else {\r\n $monthly_title = 'Not available';\r\n }\r\n\t\t$str.= ' <div class=\"monthly-info show text-14 sep-top sep-bot bot-mspace no-round space dc\" title=\"' . $monthly_title . '\">';\r\n\t\t$str.= \"<span class='prev {\\\"url\\\":\\\"$prev_url\\\"} js-calender-prev ui-datepicker-prev ui-corner-all pull-left'>\";\r\n $str.= '</span>';\r\n $str.= ' <span class=\"ui-datepicker-month\">' . ucfirst($month) . '</span> <span class=\"ui-datepicker-year \">' . $year . '</span>' . '<span class=\"js-monthstart-date\" style=\"display:none;\">' . $month_start_date . '</span><span class=\"js-monthend-date\" style=\"display:none;\">' . $month_end_date . '</span>';\r\n $next_month_mod = $temp[$next_month]+1;\r\n $next_url = Router::url(array(\r\n 'controller' => 'items',\r\n 'action' => 'calendar',\r\n 'guest',\r\n 'month' => $next_month_mod,\r\n 'year' => $next_year,\r\n 'item_id' => $item_id,\r\n ) , true);\r\n $str.= \" <span class='next {\\\"url\\\":\\\"$next_url\\\"} js-calender-next ui-datepicker-next ui-corner-all pull-right'>\";\r\n $str.= '</span>';\r\n $str.= '</div>';\r\n\t\t$table_class = ' class=\"datepicker-night-mode sfont mspace\"';\r\n $str.= '<table' . $table_class . '>';\r\n $str.= '<thead>';\r\n $str.= '<tr>';\r\n for ($i = 0; $i < 7; $i++) {\r\n $str.= '<th class=\"calendar-head dc textn ver-smspace\">' . substr($this->day_list[$i], 0, 3) . '</th>';\r\n }\r\n $str.= '</tr>';\r\n $str.= '</thead>';\r\n\t\t$str.= '<tbody>';\r\n\t\t$cnt = 0;\r\n $current_date = strtotime(date('M d,Y', mktime(0, 0, 0, date(\"m\") , date(\"d\") , date(\"Y\"))));\r\n\t\t$calender_start_date = date('M d,Y', mktime(0, 0, 0, date($month_num) , date($day) , date($year)));\r\n\t\t$calender_end_date = date('M d,Y', mktime(0, 0, 0, date($month_num) , date($days_in_month) , date($year)));\r\n\t\t$availbilties = $this->Html->checkCustomNightAvailability($calender_start_date, $calender_end_date, $item_id);\r\n\t\twhile ($day <= $days_in_month) {\r\n\t\t\t$cnt++;\r\n $str.= '<tr>';\r\n\t\t\tfor ($i = 0; $i < 7; $i++) {\r\n\t\t\t\t$calender_date = strtotime(date('M d,Y', mktime(0, 0, 0, date($month_num) , date($day) , date($year))));\r\n\t\t\t\t$calender_format_date = date('Y-m-d', mktime(0, 0, 0, date($month_num) , date($day) , date($year)));\r\n\t\t\t\t$available_class = '';\r\n\t\t\t\t$title = '';\r\n\t\t\t\t$data_id_attr = 0;\r\n\t\t\t\tif($current_date < $calender_date) {\r\n\t\t\t\t\tif (array_key_exists($calender_format_date, $availbilties)) {\r\n\t\t\t\t\t\t$is_avaliable = false;\r\n\t\t\t\t\t\tif(!empty($availbilties[$calender_format_date])) {\r\n\t\t\t\t\t\t\tforeach($availbilties[$calender_format_date] As $availability) {\r\n\t\t\t\t\t\t\t\t$avaialbility_class = 'js-select-day-calendar';\r\n\t\t\t\t\t\t\t\tif($availability['CustomPricePerNight']['is_available'] == 1) {\r\n\t\t\t\t\t\t\t\t\t$is_avaliable = true;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif(isset($availability['is_custom_available'])){\r\n\t\t\t\t\t\t\t\t\t$avaialbility_class = 'js-select-custom-price-per-night';\r\n\t\t\t\t\t\t\t\t\t$data_id_attr = $availability['CustomPricePerNight']['id'];\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif($is_avaliable) {\r\n\t\t\t\t\t\t\t$available_class = $avaialbility_class.' cur';\r\n\t\t\t\t\t\t\t$style = 'border-left-color: rgb(151, 206, 104); border-bottom-color: rgb(151, 206, 104); color: rgb(255, 255, 255);'; // Available\r\n\t\t\t\t\t\t\t$title = 'title=' . __l(\"Available\");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$style = 'border-left-color:#F38015;border-bottom-color:#F38015 ;color:#FFFFFF;'; // Not Available\r\n\t\t\t\t\t\t\t$title = 'title=' . __l(\"Sold\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$style = 'border-left-color:#FFFFFF;border-bottom-color:#FFFFFF;'; // Default\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$style = 'border-left-color:#FFFFFF;border-bottom-color:#FFFFFF;'; // Default\r\n\t\t\t\t}\r\n\t\t\t\tif (($first_day_in_month == $this->day_list[$i] || $day > 1) && ($day <= $days_in_month)) {\r\n\t\t\t\t\t$show_date = $year . \"-\" . $month_num . \"-\" . $day;\r\n\t\t\t\t\t$str.= '<td class=\"big-calendar dc\" id=\"cell-' . $day . '\">';\r\n\t\t\t\t\t$str .= '<span class=\"datepicker-days-block ' . $available_class . '\" data-item_id=\"' . $item_id . '\" data-date=\"' . $calender_format_date . '\" style=\"' . $style . '\" data-custom_id =\"'. $data_id_attr.'\"><span '. $title . '>' . $day . '</span></span>';\r\n\t\t\t\t\t$str.= '</td>';\r\n\t\t\t\t\t$day++;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$str.= '<td class=\"big-calendar dc\">&nbsp;</td>';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$str.= '</tr>';\r\n }\r\n\t\t$str.= '</tbody>';\r\n\t\t$str.= '</table>';\r\n $str.= '</div>';\r\n $str.= '</div>';\r\n $str.= '</div>';\r\n\t\t$str .= '<div class=\"space clearfix\"><div class=\"pull-right\"><span class=\"label label-success\"><span>&nbsp;&nbsp;</span></span>&nbsp;<span class=\"text-14\">' . __l('Available') . '</span><span class=\"left-mspace label label-warning\"><span>&nbsp;&nbsp;</span></span>&nbsp;<span class=\"text-14\">'. __l('Sold out') . '</span></div></div></div>';\r\n\t\t$str .= '<div class=\"js-bookit-calendar-list-block hide\">';\r\n\t\tif(!empty($availbilties)) {\r\n\t\t\tforeach($availbilties As $key => $availbilty) {\r\n\t\t\t\tif(!empty($availbilty)) {\r\n\t\t\t\t\t$str .= '<div class=\"js-cal-list-on js-calendar-list-on-'. $key .' hide\">';\r\n\t\t\t\t\t$str .= '<ul id=\"calander-block\" class=\"js-custom-night-block unstyled scheduled-list\">';\r\n\t\t\t\t\tforeach($availbilty As $custom_price_per_night) {\r\n\t\t\t\t\t\t$start_time = explode(':', $custom_price_per_night['CustomPricePerNight']['start_time']);\r\n\t\t\t\t\t\t$end_time = explode(':', $custom_price_per_night['CustomPricePerNight']['end_time']);\r\n\t\t\t\t\t\t$start_date = explode('-', $custom_price_per_night['CustomPricePerNight']['start_date']);\r\n\t\t\t\t\t\t$end_date = explode('-', $custom_price_per_night['CustomPricePerNight']['end_date']);\r\n\t\t\t\t\t\t$month = date('M', mktime(0, 0, 0, $start_date[1], $start_date[2], $start_date[0]));\r\n\t\t\t\t\t\t$day_char = date('D', mktime(0, 0, 0, $start_date[1], $start_date[2], $start_date[0]));\r\n\t\t\t\t\t\t$day_num = date('d', mktime(0, 0, 0, $start_date[1], $start_date[2], $start_date[0]));\r\n\t\t\t\t\t\tif(!empty($start_time[0])){\r\n\t\t\t\t\t\t\t$s_time = date('h:i A', mktime($start_time[0], $start_time[1], $start_time[2], 0, 0, 0));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(!empty($end_time[0])){\r\n\t\t\t\t\t\t\t$e_time = date('h:i A', mktime($end_time[0], $end_time[1], $end_time[2], 0, 0, 0));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$str .= '<li class=\"space row no-mar sep-top sep-bot\">';\r\n\t\t\t\t\t\t$option_value = '';\r\n\t\t\t\t\t\t$option_value .= '<span class=\"img-rounded sep calendar-list hor-smspace pull-left graydarkc dc\">\r\n\t\t\t\t\t\t\t<span class=\"show well no-mar hor-space\">'. $month . '</span>\r\n\t\t\t\t\t\t\t<span class=\"show textb text-24\"> '. $day_num . ' </span>';\r\n\t\t\t\t\t\tif(!empty($custom_price_per_night['CustomPricePerNight']['total_available_count'])) { \r\n\t\t\t\t\t\t\t$total_booked_percentage = ($custom_price_per_night['CustomPricePerNight']['total_booked_count'] * 100) / $custom_price_per_night['CustomPricePerNight']['total_available_count'];\t\r\n\t\t\t\t\t\t\t$option_value .= '<span class=\"progress show\"> <span class=\"bar\" style=\"width: '. $total_booked_percentage .'%;\"></span> </span>';\r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t\t$option_value .= '<span class=\"show sep-top\">' . $day_char . '</span>\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t<span class=\"timing-details span no-mar clearfix\"> \r\n\t\t\t\t\t\t\t<span class=\"pull-left dl grayc text-11\"> \r\n\t\t\t\t\t\t\t\t<span class=\"show ver-smspace clearfix\">' . date('M j, Y', mktime(0, 0, 0, $start_date[1], $start_date[2], $start_date[0])) . ' ' . __l('to') . ' ' . date('M j, Y', mktime(0, 0, 0, $end_date[1], $end_date[2], $end_date[0])) .'</span>';\r\n\t\t\t\t\t\t\t\tif(isPluginEnabled('Seats') && !empty($custom_price_per_night['Hall']['name'])) { \r\n\t\t\t\t\t\t\t\t\t$option_value .='<span class=\"show ver-smspace\">';\r\n\t\t\t\t\t\t\t\t\t$option_value .= __l('Venue') . ': ' . $custom_price_per_night['Hall']['name'];\r\n\t\t\t\t\t\t\t\t\t$option_value .= '</span>';\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif(!empty($s_time) || !empty($e_time)){\r\n\t\t\t\t\t\t\t\t\t$option_value .= '<span class=\"show ver-smspace clearfix\">';\r\n\t\t\t\t\t\t\t\t\tif(!empty($s_time)){\r\n\t\t\t\t\t\t\t\t\t\t$option_value .= $s_time;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif(!empty($s_time) && !empty($e_time)){\r\n\t\t\t\t\t\t\t\t\t\t$option_value .= ' - ';\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif(!empty($e_time)){\r\n\t\t\t\t\t\t\t\t\t\t$option_value .= $e_time;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t$option_value .= ' </span> ';\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\t/*$option_value .= '<span class=\"show ver-smspace\">';\r\n\t\t\t\t\t\tif(!empty($custom_price_per_night['CustomPricePerNight']['total_available_count'])) { \r\n\t\t\t\t\t\t\t$option_value .= __l('Spots left') . ' ' . ($custom_price_per_night['CustomPricePerNight']['total_available_count'] - $custom_price_per_night['CustomPricePerNight']['total_booked_count']);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$option_value .= __l('Spots left Unlimited');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$option_value .= '</span> */\r\n\t\t\t\t\t\t$option_value .= '\t</span> \r\n\t\t\t\t\t\t\t<span class=\"pull-right ver-mspace ver-space dr\"> \r\n\t\t\t\t\t\t\t\t<span class=\"textb text-14\">';\r\n\t\t\t\t\t\tif(!empty($custom_price_per_night['CustomPricePerNight']['minimum_price'])) {\r\n\t\t\t\t\t\t\t$option_value .= $this->Html->siteCurrencyFormat($custom_price_per_night['CustomPricePerNight']['minimum_price']);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$option_value .= __l('Free');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$option_value .= '</span> \r\n\t\t\t\t\t\t\t</span> \r\n\t\t\t\t\t\t</span>';\r\n\t\t\t\t\t\tif(!empty($custom_price_per_night['CustomPricePerNight']['id'])) {\r\n\t\t\t\t\t\t\t$options = array($custom_price_per_night['CustomPricePerNight']['id'] => $option_value);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$options = array($custom_price_per_night['CustomPricePerNight']['parent_id'] .'-'. $key => $option_value);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$str .= $this->Form->input('ItemUser.custom_price_per_night_id', array('id' => 'CustomPricePerNightId', 'legend' => false, 'label'=> true, 'type' => 'radio', 'options' => $options, 'hiddenField' => false, 'div' => 'input radio no-mar', 'class' => 'show ver-mspace js-select-custom-price-per-night'));\r\n\t\t\t\t\t\t$str .= '</ll>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$str .= '</ul>';\r\n\t\t\t\t\t$str .= '</div>';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t$str .= '</div>';\r\n return $str;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "32d5302aee419153cd86ba891b78ed71", "score": "0.58576", "text": "public function finish_calendar ()\n {\n echo \"</table>\\n\";\n }", "title": "" }, { "docid": "c9542f68e58b78ebaa86a7208fd412eb", "score": "0.5848575", "text": "public function Calendar()\n {\n $this->standardView('CalendarList', null, false);\n }", "title": "" }, { "docid": "4ca3c4f59b89b1448a6824043835ba6f", "score": "0.58452994", "text": "function getMonthAndYearOutput()\r\n\t\t{\r\n\t\t$output = '<table border=\"1\" cellpadding=\"1\" cellspacing=\"0\">';\r\n\t\t$output .= '<tr><th>' . strftime( \"%B\", $this->stdate ) . ' ' . strftime( \"%Y\", $this->stdate ) . '</th></tr>';\r\n\t\t$output .= \"</table>\";\r\n\r\n\t\treturn $output;\r\n\t\t}", "title": "" }, { "docid": "02d10d90d412d6d7d2772e96b816ee60", "score": "0.5837453", "text": "function drawMonth(&$master_array, $getdate) {\n //Resetting viewarray, to make sure we always get the current events\n $this->viewarray = false;\n $this->_init($master_array);\n $page = '';\n if($this->conf['view.']['month.']['monthMakeMiniCal']){\n $page = $this->conf['view.']['month.']['monthMiniTemplate'];\n }else{\n $page = $this->cObj->fileResource($this->conf['view.']['month.']['monthTemplate']);\n if ($page == '') {\n return '<h3>calendar: no template file found:</h3>'.$this->conf['view.']['month.']['monthTemplate'].'<br />Pl\nease check your template record and add both cal items at \"include static (from extension)\"';\n }\n }\n\n $rems = array();\n \n return $this->finish($page, $rems);\n }", "title": "" }, { "docid": "577a1b9f0b5bf9d6f43f28f2d905344e", "score": "0.58291906", "text": "function display_month($parameters){\n\t\t$page_options =\"\";\n\t\t$_filter_year\t\t=$this->check_parameters($parameters, \"_filter_year\");\n\t\t$_filter_month\t\t=$this->check_parameters($parameters, \"_filter_month\");\n\t\t$_filter_day\t\t=$this->check_parameters($parameters, \"_filter_day\");\n\t\tif ($_filter_year == \"\"){\n\t\t\t$_filter_year = Date(\"Y\");\n\t\t\t$parameters[\"_filter_year\"] = Date(\"Y\");\n\t\t}\n\t\tif ($_filter_month == \"\"){\n\t\t\t$_filter_month = Date(\"m\");\n\t\t\t$parameters[\"_filter_month\"] = Date(\"m\");\n\t\t}\n\t\tif (($this->parent->server[LICENCE_TYPE]==ECMS) || ($this->parent->server[LICENCE_TYPE]==MECM)){\n\t\t}else{\n\t\t$parameters[\"_filter_no_days\"]=0;\n\t\t}\n\t\t$form = $this->display_form($parameters);\n\t\t$timestampformonth = mktime(1,1,1,$_filter_month,1,$_filter_year);\n\t\t$date_condition = $this->display_date_condition($parameters);\n\t\t$list_results= Array();\n\t\t$months = array(\n\t\t\t\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sept\",\"Oct\",\"Nov\",\"Dec\"\n\t\t);\n\n\t\t$sql = \"SELECT \n\t\t\t\tcount(access_log_owner) as total, \n\t\t\t\tmin(access_log_date) as todays_uid, \n\t\t\t\tDAYOFMONTH(access_log_date) as day_data ,\n\t\t\t\tHOUR(access_log_date) as hour_data\n\t\t\tFROM user_access_log \n\t\t\t\tinner join user_access on user_access_identifier = access_log_owner\n\t\t\tWHERE \n\t\t\t\taccess_log_client=$this->client_identifier \n\t\t\t\t$date_condition\n\t\t\t\tand user_access_bot_name=''\n\t\t\tGROUP BY access_log_owner,day_data,hour_data order by todays_uid\";\n\t\t//print \"<p>\".__FILE__.\" Line::\".__LINE__.\"<br>$sql</p>\";\n\t\tif ($this->module_debug){\n\t\t\t$this->call_command(\"UTILS_DEBUG_ENTRY\",array($this->module_name,\"display_last_number_of_days\",__LINE__,\"$sql\"));\n\t\t}\n\t\t$result = $this->call_command(\"DB_QUERY\", Array($sql));\n\t\t$out\t= \"\";\n\t\t$total \t= 0;\n\t\tif ($result){\n\t\t\t$total\t= 0;\n\t\t\twhile ($r= $this->call_command(\"DB_FETCH_ARRAY\", Array($result))){\n\t\t\t\tif ($_filter_year==''){\n\t\t\t\t\t$index_key = date(\"D, jS M Y_Y/m/d\",strtotime($r[\"todays_uid\"]));\n\t\t\t\t}else if ($_filter_month==''){\n\t\t\t\t\t$index_key = date(\"D, jS M Y_Y/m/d\",strtotime($r[\"todays_uid\"]));\n\t\t\t\t}else{\n\t\t\t\t\t$index_key = date(\"D, jS_Y/m/d\",strtotime($r[\"todays_uid\"]));\n\t\t\t\t}\n\t\t\t\tif (empty($list_results[$index_key][\"LOCALE_STATS_PAGE_HITS\"])){\n\t\t\t\t\t$list_results[$index_key][\"LOCALE_STATS_PAGE_HITS\"] = $r[\"total\"];\n\t\t\t\t\t$list_results[$index_key][\"LOCALE_STATS_VISITORS\"]=1;\n\t\t\t\t}else{\t\t\t\t\n\t\t\t\t\t$list_results[$index_key][\"LOCALE_STATS_PAGE_HITS\"] += $r[\"total\"];\n\t\t\t\t\t$list_results[$index_key][\"LOCALE_STATS_VISITORS\"]++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tforeach($list_results as $key => $list){\n\t\t\t$list_results[$key][\"LOCALE_STATS_AVERAGE\"] = round($list_results[$key][\"LOCALE_STATS_PAGE_HITS\"] / $list_results[$key][\"LOCALE_STATS_VISITORS\"],2);\n\t\t}\n\t\t$counter=0;\n\t\t$totals = array();\n\t\t$biggest = array();\n\t\tforeach ($list_results as $day => $value){\n\t\t\t$counter++;\n\t\t\t$list = split(\"_\",$day);\n\t\t\t$date_filter = date(\"\\&\\_\\f\\i\\l\\\\t\\e\\\\r\\_\\y\\e\\a\\\\r\\=Y\\&\\_\\f\\i\\l\\\\t\\e\\\\r\\_\\m\\o\\\\n\\\\t\\h\\=m\\&\\_\\f\\i\\l\\\\t\\e\\\\r\\_\\d\\a\\y\\=d\", strtotime($list[1].\" 00:00:00\"));\n\t\t\t$out .= \"<stat_entry>\";\n\t\t\tif (($this->parent->server[LICENCE_TYPE]==ECMS) || ($this->parent->server[LICENCE_TYPE]==MECM)){\n\t\t\t\t$out .= \"<attribute name=\\\"\\\" show=\\\"YES\\\" link=\\\"LINK\\\"><![CDATA[\".$list[0].\"]]></attribute>\";\n\t\t\t} else {\n\t\t\t\t$out .= \"<attribute name=\\\"\\\" show=\\\"YES\\\" link=\\\"NO\\\"><![CDATA[\".$list[0].\"]]></attribute>\";\n\t\t\t}\n\n\t\t\tforeach ($value as $name => $val){\t\t\n\t\t\t\t$out .= \"<attribute name=\\\"\".$this->get_constant($name).\"\\\" show=\\\"YES\\\" link=\\\"NO\\\"><![CDATA[$val]]></attribute>\";\n\t\t\t\tif (empty($totals[$name])){\n\t\t\t\t\t$totals[$name] = $val;\n\t\t\t\t}else{\n\t\t\t\t\t$totals[$name] += $val;\n\t\t\t\t}\n\t\t\t\tif (empty($biggest[$name])){\n\t\t\t\t\t$biggest[$name] = $val;\n\t\t\t\t}else{\n\t\t\t\t\tif ($val > $biggest[$name] ){\n\t\t\t\t\t\t$biggest[$name] = $val;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$out .= \"<attribute name=\\\"LINK\\\" show=\\\"NO\\\" link=\\\"NO\\\"><![CDATA[?command=USERACCESS_VIEW_THIS_DAY$date_filter]]></attribute>\n\t\t\t</stat_entry>\";\n\t\t}\n\t\tif (strlen($out)>0){\n\t\t$out .= $this->publish_total($totals, \"LOCALE_STATS_PAGE_HITS\", \"LOCALE_STATS_VISITORS\");\n\t\t$out .= \"<stat_biggest>\n\t\t\t\t<attribute name=\\\"\\\" show=\\\"NO\\\" link=\\\"\\\"><![CDATA[]]></attribute>\n\t\t\t\t\";\n\t\tforeach ($biggest as $name => $val){\t\t\n\t\t\t\t$out .= \"<attribute name=\\\"\".$this->get_constant($name).\"\\\" show=\\\"YES\\\" link=\\\"NO\\\"><![CDATA[$val]]></attribute>\";\n\t\t}\n\t\t$out .= \"\n\t\t\t\t\t<attribute name=\\\"\\\" show=\\\"NO\\\" link=\\\"\\\"><![CDATA[]]></attribute>\n\t\t\t\t</stat_biggest>\";\n\t\t$page_options = \"<graphs><graph>2</graph><graph>3</graph><graph>4</graph></graphs>\";\n\t\t}\n\t\tif ($counter==0){\n\t\t\t$out=\"<text><![CDATA[\".LOCALE_STAT_NO_RESULTS.\"]]></text>\";\n\t\t}\n\t\t\n\t\t$page_options .=\"\".$this->generate_links();\n\n\t\treturn \"<module name=\\\"user_access\\\" display=\\\"stats\\\">$form$page_options<stat_results label=\\\"\".LOCALE_STATS_DISPLAYING_MONTH.\"\\\" total=\\\"$total\\\" link=\\\"\".$this->module_command.\"VIEW_THIS_DAY\\\">\".$out.\"</stat_results></module>\";\n\t}", "title": "" }, { "docid": "1d6bf2e3946107d7e5aabdc9f975005e", "score": "0.58236027", "text": "function _draw_month($page, $offset = '+0', $type) {\n\t\t\n\t\t$isEnabled = $this->conf['view.']['weekpreview.']['enable'];\n\t\t\n\t\tif (intval($isEnabled)!=0) {\n\t\t\t$numOfWeeks = intval($this->conf['view.']['weekpreview.']['numOfWeeks']);\n\t\t\t\n\t\t\t$viewTarget = $this->conf['view.']['monthLinkTarget'];\n\t\t\t$monthTemplate = $this->cObj->getSubpart($page, '###MONTH_TEMPLATE###');\n\t\t\tif($monthTemplate!=''){\n\t\t\t\t$loop_wd = $this->cObj->getSubpart($monthTemplate, '###LOOPWEEKDAY###');\n\t\t\t\t$t_month = $this->cObj->getSubpart($monthTemplate, '###SWITCHMONTHDAY###');\n\t\t\t\t$startweek = $this->cObj->getSubpart($monthTemplate, '###LOOPMONTHWEEKS_DAYS###');\n\t\t\t\t$endweek = $this->cObj->getSubpart($monthTemplate, '###LOOPMONTHDAYS_WEEKS###');\n\t\t\t\t$weeknum = $this->cObj->getSubpart($monthTemplate, '###LOOPWEEK_NUMS###');\n\t\t\t\t$corner = $this->cObj->getSubpart($monthTemplate, '###CORNER###');\n\t\n\t\t\t\t/* 11.12.2008 Franz:\n\t\t\t\t* why is there a limitation that only MEDIUM calendar sheets can have absolute offsets and vice versa?\n\t\t\t\t* I'm commenting this out and make it more flexible.\n\t\t\t\t*/\n\t\t\t\t#if ($type != 'medium') { // old one\n\t\t\t\tif(preg_match('![+|-][0-9]{1,2}!is',$offset)) { // new one\n\t\t\t\t\t$fake_getdate_time = new tx_cal_date();\n\t\t\t\t\t$fake_getdate_time->copy($this->controller->getDateTimeObject);\n\t\t\t\t\t$fake_getdate_time->setDay(15);\n\t\t\t\t\tif(intval($offset)<0){\n\t\t\t\t\t\t$fake_getdate_time->subtractSeconds(abs(intval($offset))*2592000);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$fake_getdate_time->addSeconds(intval($offset)*2592000);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$fake_getdate_time = new tx_cal_date();\n\t\t\t\t\t$fake_getdate_time->copy($this->controller->getDateTimeObject);\n\t\t\t\t\t$fake_getdate_time->setDay(15);\n\t\t\t\t\t$fake_getdate_time->setMonth($offset);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$minical_month = $fake_getdate_time->getMonth();\n\t\t\t\t$minical_year = $fake_getdate_time->getYear();\n\t\t\t\t$today = new tx_cal_date();\n\t\t\n\t\t\t\t$month_title = $fake_getdate_time->format($this->conf['view.'][$viewTarget.'.']['dateFormatMonth']);\n\t\t\t\t$this->initLocalCObject();\n\t\t\t\t$this->local_cObj->setCurrentVal($month_title);\n\t\t\t\t$this->local_cObj->data['view'] = $viewTarget;\n\t\t\t\t$this->controller->getParametersForTyposcriptLink($this->local_cObj->data, array ('getdate' => $fake_getdate_time->format('%Y%m%d'), 'view' => $viewTarget, $this->pointerName => NULL), $this->conf['cache'], $this->conf['clear_anyway'], $this->conf['view.'][$viewTarget.'.'][$viewTarget.'ViewPid']);\n\t\t\t\t$month_title = $this->local_cObj->cObjGetSingle($this->conf['view.'][$viewTarget.'.'][$viewTarget.'ViewLink'],$this->conf['view.'][$viewTarget.'.'][$viewTarget.'ViewLink.']);\n\t\t\t\t$month_date = $fake_getdate_time->format('%Y%m%d');\n\t\t\n\t\t\t\t$view_array = array ();\n\t\n\t\t\t\tif(!$this->viewarray){\n\t\t\t\t\t$this->eventArray = array();\n\t\t\t\t\tif (!empty($this->master_array)) {\n\t\t\t\t\t\t// use array keys for the loop in order to be able to use referenced events instead of copies and save some memory\n\t\t\t\t\t\t$masterArrayKeys = array_keys($this->master_array);\n\t\t\t\t\t\tforeach ($masterArrayKeys as $dateKey) {\n\t\t\t\t\t\t\t$dateArray = &$this->master_array[$dateKey];\n\t\t\t\t\t\t\t$dateArrayKeys = array_keys($dateArray);\n\t\t\t\t\t\t\tforeach ($dateArrayKeys as $timeKey) {\n\t\t\t\t\t\t\t\t$arrayOfEvents = &$dateArray[$timeKey];\n\t\t\t\t\t\t\t\t$eventKeys = array_keys($arrayOfEvents);\n\t\t\t\t\t\t\t\tforeach ($eventKeys as $eventKey) {\n\t\t\t\t\t\t\t\t\t$event = &$arrayOfEvents[$eventKey];\n\t\t\t\t\t\t\t\t\t$this->eventArray[$dateKey.'_'.$event->getType().'_'.$event->getUid().'_'.$event->getStart()->format('%Y%m%d%H%M')] = &$event;\n\t\t\t\t\t\t\t\t\t$starttime = new tx_cal_date();\n\t\t\t\t\t\t\t\t\t$starttime->copy($event->getStart());\n\t\t\t\t\t\t\t\t\t$endtime = new tx_cal_date();\n\t\t\t\t\t\t\t\t\t$endtime->copy($event->getEnd());\n\t\t\t\t\t\t\t\t\tif($timeKey=='-1'){\n\t\t\t\t\t\t\t\t\t\t$endtime->addSeconds(1); // needed to let allday events show up\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$j = new tx_cal_date();\n\t\t\t\t\t\t\t\t\t$j->copy($starttime);\n\t\t\t\t\t\t\t\t\t$j->setHour(0);\n\t\t\t\t\t\t\t\t\t$j->setMinute(0);\n\t\t\t\t\t\t\t\t\t$j->setSecond(0);\n\t\t\t\t\t\t\t\t\tfor ($j;$j->before($endtime); $j->addSeconds(60 * 60 * 24)) {\n\t\t\t\t\t\t\t\t\t\t$view_array[$j->format('%Y%m%d')]['0000'][count($view_array[$j->format('%Y%m%d')]['0000'])] = $dateKey.'_'.$event->getType().'_'.$event->getUid().'_'.$event->getStart()->format('%Y%m%d%H%M');\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}\n\t\t\t\t\t$this->viewarray = &$view_array;\n\t\t\t\t}\n\t\n\t\t\t\t$monthTemplate = str_replace('###MONTH_TITLE###',$month_title,$monthTemplate);\n\t\t\n\t\t\t\tif ($type == 'small') {\n\t\t\t\t\t$langtype = '%a';\n\t\t\t\t\t$typeSize = 2;\n\t\t\t\t}\n\t\t\t\telseif ($type == 'medium') {\n\t\t\t\t\t$langtype = '%a';\n\t\t\t\t}\n\t\t\t\telseif ($type == 'large') {\n\t\t\t\t\t$langtype = '%A';\n\t\t\t\t}\n\t\t\t\t$dateOfWeek = Date_Calc::beginOfWeek(15,$fake_getdate_time->getMonth(),$fake_getdate_time->getYear());\n\t\t\t\t$start_day = new tx_cal_date($dateOfWeek.'000000');\n\t\t\t\tif($weekStartDay=='Sunday'){\n\t\t\t\t\t$start_day = $start_day->getPrevDay();\n\t\t\t\t}\n\t\n\t\t\t\t// backwardscompatibility with old templates\n\t\t\t\tif(!empty($corner)) {\n\t\t\t\t\t$weekday_loop .= str_replace('###ADDITIONAL_CLASSES###',$this->conf['view.']['month.']['monthCornerStyle'],$corner);\n\t\t\t\t} else {\n\t\t\t\t\t$weekday_loop .= sprintf($weeknum, $this->conf['view.']['month.']['monthCornerStyle'], '');\n\t\t\t\t}\n\t\n\t\t\t\tfor ($i = 0; $i < 7; $i ++) {\n\t\t\t\t\t$weekday = $start_day->format($langtype);\n\t\t\t\t\t$weekdayLong = $start_day->format('%A');\n\t\t\t\t\tif($typeSize){\n\t\t\t\t\t\t$weekday = $this->cs_convert->substr(tx_cal_functions::getCharset(),$weekday,0,$typeSize);\n\t\t\t\t\t}\n\t\t\t\t\t$start_day->addSeconds(86400);\n\t\t\t\t\t\n\t\t\t\t\t$additionalClasses = trim(sprintf($this->conf['view.']['month.']['monthDayOfWeekStyle'],$start_day->format('%w')));\n\t\t\t\t\t$markerArray = array(\n\t\t\t\t\t\t'###WEEKDAY###' => $weekday,\n\t\t\t\t\t\t'###WEEKDAY_LONG###' => $weekdayLong,\n\t\t\t\t\t\t'###ADDITIONAL_CLASSES###' => ' '.$additionalClasses,\n\t\t\t\t\t\t'###CLASSES###'=> (!empty($additionalClasses) ? ' class=\"'.$additionalClasses.'\" ' : ''),\n\t\t\t\t\t);\n\t\t\t\t\t$weekday_loop .= strtr($loop_wd,$markerArray);\n\t\t\t\t}\n\t\t\t\t$weekday_loop .= $endweek;\n\t\t\t\t\n\t\t\t\t$dateOfWeek = Date_Calc::beginOfWeek(1,$fake_getdate_time->getMonth(),$fake_getdate_time->getYear());\n\t\t\t\t$start_day = new tx_cal_date($dateOfWeek.'000000');\n\t\t\t\t$start_day->setTZbyID('UTC');\n\t\t\t\tif($weekStartDay=='Sunday'){\n\t\t\t\t\t$start_day = $start_day->getPrevDay();\n\t\t\t\t}\n\t\t\n\t\t\t\t$i = 0;\n\t\t\t\t$whole_month = TRUE;\n\t\t\t\t$isAllowedToCreateEvent = $this->rightsObj->isAllowedToCreateEvent();\n\t\n\t\n\t\t\t\t/*\n\t\t\t\t * Holds number of already printed weeks\n\t\t\t\t */\n\t\t\t\t$shownNumberOfWeeks = 0; \n\t\t\t\t/*\n\t\t\t\t * Holds the week of the last printed day\n\t\t\t\t */\n\t\t\t\t$lastDisplayedWeek = 0; \n\t\t\t\t/*\n\t\t\t\t * false if current processed week is earlier than the current one\n\t\t\t\t */\n\t\t\t\t$isCurrentWeekOrLater = false; \n\t\n\t\n\t\t\t\t$createOffset = intval($this->conf['rights.']['create.']['event.']['timeOffset']) * 60;\n\t\t\t\t\n\t\t\t\tdo {\n\t\t\t\t\t$daylink = new tx_cal_date();\n\t\t\t\t\t$daylink->copy($start_day);\n\t\n\t\t\t\t\t$formatedGetdate = $daylink->format('%Y%m%d');\n\t\t\t\t\t\n\t\t\t\t\t$startWeekTime = tx_cal_calendar::calculateStartWeekTime($this->controller->getDateTimeObject);\n\t\t\t\t\t$endWeekTime = tx_cal_calendar::calculateEndWeekTime($this->controller->getDateTimeObject);\n\t\t\t\t\t$isCurrentWeek = false;\n\t\t\t\t\t$isSelectedWeek = false;\n\t\t\t\t\tif ($formatedGetdate>=$startWeekTime->format('%Y%m%d') && $formatedGetdate<=$endWeekTime->format('%Y%m%d')) {\n\t\t\t\t\t\t$isSelectedWeek = true;\n\t\t\t\t\t}\n\t\t\t\t\tif ($start_day->format('%U') == $today->format('%U')) {\n\t\t\t\t\t\t$isCurrentWeek = true;\n\t\t\t\t\t}\n\t\t\t\t\t/* \n\t\t\t\t\t * Check if week is the past\n\t\t\t\t\t */\n\t\t\t\t\tif ($formatedGetdate>=$startWeekTime->format('%Y%m%d') ) {\n\t\t\t\t\t\t$isCurrentWeekOrLater = true;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif ($i == 0 && !empty($weeknum)){\n\t\t\t\t\t\t$start_day->addSeconds(86400);\n\t\t\t\t\t\t$num = $numPlain = $start_day->format('%U');\n\t\t\t\t\t\t$hasEvent = false;\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * increase count of displayed weeks when needed\n\t\t\t\t\t\t */ \n\t\t\t\t\t\tif (($isCurrentWeekOrLater)&&($lastDisplayedWeek!=$num)){\n\t\t\t\t\t\t\t$lastDisplayedWeek = $num;\n\t\t\t\t\t\t\t$shownNumberOfWeeks++;\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t$start_day->subtractSeconds(86400);\n\t\t\t\t\t\tfor($j = 0; $j < 7; $j++){\n\t\t\t\t\t\t\tif(is_array($this->viewarray[$start_day->format('%Y%m%d')]) || $isAllowedToCreateEvent){\n\t\t\t\t\t\t\t\t$hasEvent = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$start_day->addSeconds(86400);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$start_day->copy($daylink);\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * create row only if it's at least the first one to be shown\n\t\t\t\t\t\t */ \n\t\t\t\t\t\tif ($shownNumberOfWeeks>0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$weekLinkViewTarget = $this->conf['view.']['weekLinkTarget'];\n\t\t\t\t\t\t\tif(($this->rightsObj->isViewEnabled($weekLinkViewTarget) || $this->conf['view.'][$weekLinkViewTarget.'.'][$weekLinkViewTarget.'ViewPid']) && $hasEvent){\n\t\t\t\t\t\t\t\t$this->initLocalCObject();\n\t\t\t\t\t\t\t\t$this->local_cObj->setCurrentVal($num);\n\t\t\t\t\t\t\t\t$this->local_cObj->data['view'] = $weekLinkViewTarget;\n\t\t\t\t\t\t\t\t$this->controller->getParametersForTyposcriptLink($this->local_cObj->data, array ('getdate' => $formatedGetdate, 'view' => $weekLinkViewTarget, $this->pointerName => NULL), $this->conf['cache'], $this->conf['clear_anyway'], $this->conf['view.'][$weekLinkViewTarget.'.'][$weekLinkViewTarget.'ViewPid']);\n\t\t\t\t\t\t\t\t$num = $this->local_cObj->cObjGetSingle($this->conf['view.'][$weekLinkViewTarget.'.'][$weekLinkViewTarget.'ViewLink'],$this->conf['view.'][$weekLinkViewTarget.'.'][$weekLinkViewTarget.'ViewLink.']);\n\t\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t\t$className = array();\n\t\t\t\t\t\t\tif ($isSelectedWeek && !empty($this->conf['view.']['month.']['monthSelectedWeekStyle'])) {\n\t\t\t\t\t\t\t\t$className[] = $this->conf['view.']['month.']['monthSelectedWeekStyle'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ($isCurrentWeek && !empty($this->conf['view.']['month.']['monthCurrentWeekStyle'])) {\n\t\t\t\t\t\t\t\t$className[] = $this->conf['view.']['month.']['monthCurrentWeekStyle'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ($hasEvent && !empty($this->conf['view.']['month.']['monthWeekWithEventStyle'])) {\n\t\t\t\t\t\t\t\t$className[] = $this->conf['view.']['month.']['monthWeekWithEventStyle'];\n\t\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t\t$weekClasses = trim(implode(' ',$className));\n\t\t\t\t\t\t\t$markerArray = array (\n\t\t\t\t\t\t\t\t'###ADDITIONAL_CLASSES###' => ($weekClasses ? ' '.$weekClasses : ''),\n\t\t\t\t\t\t\t\t'###CLASSES###' => ($weekClasses ? ' class=\"'.$weekClasses.'\" ' : ''),\n\t\t\t\t\t\t\t\t'###WEEKNUM###' => $num,\n\t\t\t\t\t\t\t\t'###WEEKNUM_PLAIN###' => $numPlain,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t$middle .= strtr($startweek,$markerArray);\n\t\t\t\t\t\t\t// we do this sprintf all only for backwards compatibility with old templates\n\t\t\t\t\t\t\t$middle .= strtr(sprintf($weeknum,$markerArray['###ADDITIONAL_CLASSES###'],$num),$markerArray);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$i ++;\n\t\t\t\t\t$switch = array ('###ALLDAY###' => '');\n\t\t\t\t\t$check_month = $start_day->getMonth();\n\t\t\t\t\t\n\t\t\t\t\t$switch['###LINK###'] = $this->getCreateEventLink('month','',$start_day,$createOffset,$isAllowedToCreateEvent,'','',$this->conf['view.']['day.']['dayStart']);\n\t\t\t\t\t\n\t\t\t\t\t$style = array();\n\t\t\t\t\t\n\t\t\t\t\t$dayLinkViewTarget = $this->conf['view.']['dayLinkTarget'];\t\t\t\n\t\t\t\t\tif(($this->rightsObj->isViewEnabled($dayLinkViewTarget) || $this->conf['view.'][$dayLinkViewTarget.'.'][$dayLinkViewTarget.'ViewPid']) && ($this->viewarray[$formatedGetdate] || $isAllowedToCreateEvent)){\n\t\t\t\t\t\t$this->initLocalCObject();\n\t\t\t\t\t\t$this->local_cObj->setCurrentVal($start_day->getDay());\n\t\t\t\t\t\t$this->local_cObj->data['view'] = $dayLinkViewTarget;\n\t\t\t\t\t\t$this->controller->getParametersForTyposcriptLink($this->local_cObj->data, array ('getdate' => $formatedGetdate, 'view' => $dayLinkViewTarget, $this->pointerName => NULL), $this->conf['cache'], $this->conf['clear_anyway'], $this->conf['view.'][$dayLinkViewTarget.'.'][$dayLinkViewTarget.'ViewPid']);\n\t\t\t\t\t\t$switch['###LINK###'] .= $this->local_cObj->cObjGetSingle($this->conf['view.'][$dayLinkViewTarget.'.'][$dayLinkViewTarget.'ViewLink'],$this->conf['view.'][$dayLinkViewTarget.'.'][$dayLinkViewTarget.'ViewLink.']);\n\t\t\t\t\t\t$switch['###LINK###'] = $this->cObj->stdWrap($switch['###LINK###'], $this->conf['view.']['month.'][$type.'Link_stdWrap.']);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$switch['###LINK###'] .= $start_day->getDay();\n\t\t\t\t\t}\n\t\t\t\t\t// add a css class if the current day has a event - regardless if linked or not\n\t\t\t\t\tif($this->viewarray[$formatedGetdate]) {\n\t\t\t\t\t\t$style[] = $this->conf['view.']['month.']['eventDayStyle'];\n\t\t\t\t\t}\n\t\t\t\t\t$style[] = $this->conf['view.']['month.']['month'.ucfirst($type).'Style'];\t\t\t\t\n\n\t\t\t\t\t/*\n\t\t\t\t\t * render days only if they are in a week thats not in the past\n\t\t\t\t\t */\n\t\t\t\t\tif ($shownNumberOfWeeks>0) {\n\t\t\t\t\t\t/*\t\n\t\t\t\t\t\t * Don't add special style for days in another month \n\t\t\t\t\t\t\tif ($check_month != $minical_month) {\n\t\t\t\t\t\t\t\t$style[] = $this->conf['view.']['month.']['monthOffStyle'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t*/\n\t\t\t\t\t\tif ($start_day->format('%w')==0 || $start_day->format('%w')==6) {\n\t\t\t\t\t\t\t$style[] = $this->conf['view.']['month.']['monthDayWeekendStyle'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($isSelectedWeek) {\n\t\t\t\t\t\t\t$style[] = $this->conf['view.']['month.']['monthDaySelectedWeekStyle'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($formatedGetdate == $this->conf['getdate']) {\n\t\t\t\t\t\t\t$style[] = $this->conf['view.']['month.']['monthSelectedStyle'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($isCurrentWeek) {\n\t\t\t\t\t\t\t$style[] = $this->conf['view.']['month.']['monthDayCurrentWeekStyle'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($formatedGetdate == $today->format('%Y%m%d')) {\n\t\t\t\t\t\t\t$style[] = $this->conf['view.']['month.']['monthTodayStyle'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($this->conf['view.']['month.']['monthDayOfWeekStyle']) {\n\t\t\t\t\t\t\t$style[] = sprintf($this->conf['view.']['month.']['monthDayOfWeekStyle'],$start_day->format('%w')); \n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//clean up empty styles (code beautify)\n\t\t\t\t\t\tforeach($style as $key => $classname) {\n\t\t\t\t\t\t\tif($classname == '') {\n\t\t\t\t\t\t\t\tunset($style[$key]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$classesDay = implode(' ',$style);\n\t\t\t\t\t\t$markerArray = array(\n\t\t\t\t\t\t\t'###STYLE###' => $classesDay,\n\t\t\t\t\t\t\t'###ADDITIONAL_CLASSES###' => ($classesDay ? ' '.$classesDay : ''),\n\t\t\t\t\t\t\t'###CLASSES###' => ($classesDay ? ' class=\"'.$classesDay.'\" ' : ''),\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$temp = strtr($t_month,$markerArray);\n\t\t\t\t\t\t$wraped = array();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($this->viewarray[$formatedGetdate] && preg_match('!\\###EVENT\\###!is',$t_month)) {\n\t\t\t\t\t\t\tforeach ($this->viewarray[$formatedGetdate] as $cal_time => $event_times) {\n\t\t\t\t\t\t\t\tforeach ($event_times as $uid => $eventId) {\n\t\t\t\t\t\t\t\t\tif ($type == 'large'){\n\t\t\t\t\t\t\t\t\t\t$switch['###EVENT###'] .= $this->eventArray[$eventId]->renderEventForMonth();\n\t\t\t\t\t\t\t\t\t} else if ($type == 'medium') {\n\t\t\t\t\t\t\t\t\t\t$switch['###EVENT###'] .= $this->eventArray[$eventId]->renderEventForYear();\n\t\t\t\t\t\t\t\t\t} else if ($type == 'small') {\n\t\t\t\t\t\t\t\t\t\t$switch['###EVENT###'] .= $this->eventArray[$eventId]->renderEventForMiniMonth();\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\n\t\t\t\t\t\t$switch['###EVENT###'] = (isset ($switch['###EVENT###'])) ? $switch['###EVENT###'] : '';\n\t\t\t\t\t\t$switch['###ALLDAY###'] = (isset ($switch['###ALLDAY###'])) ? $switch['###ALLDAY###'] : '';\n\t\t\t\t\t\t\n\t\t\t // Adds hook for processing of extra month day markers\n\t\t\t\t\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['tx_cal_controller']['extraMonthDayMarkerHook'])) {\n\t\t\t\t\t\t\tforeach($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['tx_cal_controller']['extraMonthDayMarkerHook'] as $_classRef) {\n\t\t\t\t\t\t\t\t$_procObj = & t3lib_div::getUserObj($_classRef);\n\t\t\t\t\t\t\t\tif(is_object($_procObj) && method_exists($_procObj,'extraMonthDayMarkerProcessor')) {\n\t\t\t\t\t\t\t\t\t$switch = $_procObj->extraMonthDayMarkerProcessor($this,$daylink,$switch,$type);\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 \n\t\t\t\t\t$middle .= tx_cal_functions::substituteMarkerArrayNotCached($temp, $switch, array(), $wraped);\n\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t$start_day->addSeconds(86400); // 60 * 60 *24 -> strtotime('+1 day', $start_day);\n\t\t\t\t\tif ($i == 7) {\n\t\t\t\t\t\t$i = 0;\n\t\t\t\t\t\t$middle .= $endweek;\n\t\t\t\t\t\tif ($shownNumberOfWeeks>=$numOfWeeks) {\n\t\t\t\t\t\t\t$whole_month = FALSE;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} while ($whole_month == TRUE);\n\t\t\n\t\t\t\t$rems['###LOOPWEEKDAY###'] = $weekday_loop;\n\t\t\t\t$rems['###LOOPMONTHWEEKS###'] = $middle;\n\t\t\t\t$rems['###LOOPMONTHWEEKS_DAYS###'] = '';\n\t\t\t\t$rems['###LOOPWEEK_NUMS###'] = '';\n\t\t\t\t$rems['###CORNER###'] = '';\n\t\t\t\t$monthTemplate = tx_cal_functions::substituteMarkerArrayNotCached($monthTemplate, array (), $rems, array ());\n\t\t\t\t$page = tx_cal_functions::substituteMarkerArrayNotCached($page, array(), array ('###MONTH_TEMPLATE###'=>$monthTemplate), array ());\n\t\t\t}\n\t\t\t\n\t\t\t$listTemplate = $this->cObj->getSubpart($page, '###LIST###');\n\t\t\tif($listTemplate!=''){\n\t\t\t\t$tx_cal_listview = &t3lib_div::makeInstanceService('cal_view', 'list', 'list');\n\t\t\t\t$starttime = gmmktime(0,0,0,$this_month,1,$this_year);\n\t\t\t\t$endtime = gmmktime(0,0,0,$this_month+1,1,$this_year);\n\t\t\t\t$rems['###LIST###'] = $tx_cal_listview->drawList($this->master_array,$listTemplate,$starttime,$endtime);\n\t\t\t}\n\t\n\t\t\t$return = tx_cal_functions::substituteMarkerArrayNotCached($page, array (), $rems, array ());\n\t\n\t\t\tif($this->rightsObj->isViewEnabled($viewTarget) || $this->conf['view.'][$viewTarget.'.'][$viewTarget.'ViewPid']){\n\t\t\t\t$this->initLocalCObject();\n\t\t\t\t$this->local_cObj->setCurrentVal($month_title);\n\t\t\t\t$this->local_cObj->data['view'] = $viewTarget;\n\t\t\t\t$this->controller->getParametersForTyposcriptLink($this->local_cObj->data, array ('getdate' => $month_date, 'view' => $viewTarget, $this->pointerName => NULL), $this->conf['cache'], $this->conf['clear_anyway'], $this->conf['view.'][$viewTarget.'.'][$viewTarget.'ViewPid']);\n\t\t\t\t$month_link = $this->local_cObj->cObjGetSingle($this->conf['view.'][$viewTarget.'.'][$viewTarget.'ViewLink'],$this->conf['view.'][$viewTarget.'.'][$viewTarget.'ViewLink.']);\n\t\t\t}else{\n\t\t\t\t$month_link = $month_title;\n\t\t\t}\n\t\n\t\t\t$return = str_replace('###MONTH_LINK###', $month_link, $return);\n\t\t\t\t\n\t\t} else {\n\t\t\n\t\t\t$return = parent::_draw_month($page, $offset, $type);\n\t\t\t \n\t\t} \n\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "d822d12564294bd61a4df80a4da852e0", "score": "0.5823243", "text": "function index(){\n \t \t$setting = array(\n \t\t\t\t\t\t'month_type' => 'long',\n\t\t\t\t\t\t 'day_type' => 'short',\n \t \t\t \t\t\t'show_next_prev' => TRUE,\n \t \t\t \t\t\t'next_prev_url' => \"http://localhost/CodeIgniter/index.php/calendar/show\"\n \t \t\t \t\t\t);\n \t \t$this->load->library('calendar',$setting);\n \t \techo $this->calendar->generate();\n \t }", "title": "" }, { "docid": "edda419ff134a200b4e6df252cad8a13", "score": "0.58201176", "text": "function changeDirection($month, $day, $year, $s, $d, $hideGroupEvents) {\n\t$config = new ConfigReader();\n\t$config->loadConfigFile('assets/core/config/widgets/showEventCalendar/event_list.properties');\n\t\n\t$maxDisplay = $config->readValue('maxDisplay');\n\t$showSummary = $config->readValue('displaySummary');\n\t$imageWidth = $config->readValue('maxImageSizeX');\n\t$imageHeight = $config->readValue('maxImageSizeY');\n\t\n\t//create user groups validation object\n\t$userGroup = new CategoryUserGroupValidator();\n\t$excludeCategories = $userGroup->viewCategoryExclusionList('events');\n\t\n\t$showMonth = array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');\n\t\n\tif (trim($s) == \"\") {\n\n\t\t$s = 0;\n\n\t}\n\t\n\tif (trim($year) != \"\" && trim($month) == \"\" && trim($day) == \"\") {\n\t\t\n\t\t$selectedDateStart = $year . \"-01-01 00:00:00\";\n\t\t$selectedDateEnd = $year . \"-12-31 23:59:59\";\n\t\t$dateFilter = \" AND ((startDate >= '{$selectedDateStart}' AND startDate <= '{$selectedDateEnd}') OR (startDate <= '{$selectedDateEnd}' AND expireDate >= '{$selectedDateStart}') OR (startDate >= '{$selectedDateStart}' AND expireDate <= '{$selectedDateEnd}'))\";\n\t\t$showSelectedDate = \"$year\";\n\t\t\n\t} elseif (trim($year) != \"\" && trim($month) != \"\" && trim($day) == \"\") {\n\t\t\t\t\n\t\t$lastday = date('t',strtotime('$month/$day/$year'));\n\t\t$lastday = sprintf(\"%02d\", $lastday);\n\t\t$selectedDateStart = $year . \"-\" . $month . \"-01 00:00:00\";\n\t\t$selectedDateEnd = $year . \"-\" . $month . \"-\" . $lastday . \" 23:59:59\";\n\t\t$dateFilter = \" AND ((startDate >= '{$selectedDateStart}' AND startDate <= '{$selectedDateEnd}') OR (startDate <= '{$selectedDateEnd}' AND expireDate >= '{$selectedDateStart}') OR (startDate >= '{$selectedDateStart}' AND expireDate <= '{$selectedDateEnd}'))\";\n\t\t$showSelectedDate = $showMonth[$month - 1] . \" $year\";\n\t\t\n\t} else {\n\t\t\n\t\t$day = sprintf(\"%02d\", $day);\n\t\t$selectedDateStart = $year . \"-\" . $month . \"-\" . $day . \" 00:00:00\";\n\t\t$selectedDateEnd = $year . \"-\" . $month . \"-\" . $day . \" 23:59:59\";\n\t\t$dateFilter = \" AND ((startDate >= '{$selectedDateStart}' AND startDate <= '{$selectedDateEnd}') OR (startDate <= '{$selectedDateEnd}' AND expireDate >= '{$selectedDateStart}') OR (startDate >= '{$selectedDateStart}' AND expireDate <= '{$selectedDateEnd}'))\";\n\t\t$showSelectedDate = $showMonth[$month - 1] . \" $day, $year\";\n\t\t\n\t}\t\n\t\n\tif ($hideGroupEvents == \"1\") {\n\t\t\n\t\t$hideGroupEventsSQL = \" AND events.groupId IS NULL\";\n\t\t\n\t}\n\t\n\t//if the current user is not a site admin\n\tif ($_SESSION['userLevel'] != 1 && $_SESSION['userLevel'] != 2 && $_SESSION['userLevel'] != 3 && $_SESSION['userLevel'] != 4) {\n\t\t\n\t\t$showUnpublished = \" AND ((events.groupId IS NOT NULL AND events.publishState = 'Unpublished' AND groupsMembers.parentId = events.groupId AND groupsMembers.username = '{$_SESSION['username']}' AND (groupsMembers.memberLevel = '1' OR groupsMembers.memberLevel = '2') AND groupsMembers.status = 'approved') OR events.publishState = 'Published')\";\n\t\t\n\t}\n\t\n\t$result = mysql_query(\"SELECT events.id FROM events LEFT JOIN groupsMembers ON events.groupId = groupsMembers.parentId WHERE 1$dateFilter$hideGroupEventsSQL$excludeCategories AND ((events.groupId IS NOT NULL AND events.private = '1' AND groupsMembers.parentId = events.groupId AND groupsMembers.username = '{$_SESSION['username']}' AND groupsMembers.status = 'approved') OR (events.groupId IS NULL OR (events.groupId IS NOT NULL AND events.private = '0')))$showUnpublished GROUP BY events.id\");\n\t$totalRows = mysql_num_rows($result);\n\n\t$showTotalPages = ceil($totalRows / $maxDisplay);\n\n\tif ($d == \"b\") {\n\n\t\t$s -= $maxDisplay;\n\n\t\tif ($s < 0) {\n\n\t\t\t$s = 0;\n\n\t\t}\n\n\t}\n\n\tif ($d == \"n\") {\n\n\t\tif ($s + $maxDisplay < $totalRows) {\n\n\t\t\t$s += $maxDisplay;\n\n\t\t}\n\n\t}\n\n\tif ($totalRows > 0) {\n\n\t\t$showCurrentPage = floor($s / $maxDisplay) + 1;\n\n\t} else {\n\n\t\t$showCurrentPage = 0;\n\n\t}\n\t\n\t//do the query again to get the values\n\t$result = mysql_query(\"SELECT events.id, events.groupId, events.title, events.summary, events.summaryImage, DATE_FORMAT(events.startDate, '%M %d, %Y %h:%i %p') AS newStartDate, DATE_FORMAT(events.expireDate, '%M %d, %Y %h:%i %p') AS newExpireDate, groups.name FROM events LEFT JOIN groups ON events.groupId = groups.id LEFT JOIN groupsMembers ON events.groupId = groupsMembers.parentId WHERE 1$dateFilter$hideGroupEventsSQL$excludeCategories AND ((events.groupId IS NOT NULL AND events.private = '1' AND groupsMembers.parentId = events.groupId AND groupsMembers.username = '{$_SESSION['username']}' AND groupsMembers.status = 'approved') OR (events.groupId IS NULL OR (events.groupId IS NOT NULL AND events.private = '0')))$showUnpublished GROUP BY events.id ORDER BY events.startDate ASC, events.title ASC LIMIT $s, $maxDisplay\");\n\t$count = mysql_num_rows($result);\n\t\n\tif ($count < 1 && $totalRows > 0 && $s > 0) {\n\t\t\n\t\t$s -= $maxDisplay;\n\t\treturn changeDirection($month, $day, $year, $s, '', $hideGroupEvents);\n\n\t} else {\n\t\t\n\t\t$from_start = date(\"F jS, Y\", strtotime(\"$month/$day/$year\"));\n\t\t\n\t\tprint \"<div class=\\\"more_events\\\">\";\n\t\tprint \"$totalRows Events On: $showSelectedDate\";\n\t\tprint \"</div>\";\n\t\tprint \"<div id=\\\"list\\\">\";\n\t\tprint \"<div id=\\\"list_container\\\">\";\n\t\t\n\t\tif ($count > 0) {\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$x = 0;\n\t\t\t\n\t\t\twhile ($row = mysql_fetch_object($result)) {\n\t\t\t\t\n\t\t\t\t$x++;\n\t\t\t\t\n\t\t\t\tif ($x < $count) {\n\t\t\t\t\t\n\t\t\t\t\t$style = \" event_item_row_separator\";\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t$style = \"\";\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (trim($row->name) != \"\") {\n\t\t\t\t\t\n\t\t\t\t\t$showGroupName = \"\t\t\t\t\t\t\t<div class=\\\"group_name\\\"><a href=\\\"/groups/id/$row->groupId\\\">\" . htmlentities($row->name) . \"</a></div>\\n\";\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t$showGroupName = \"\";\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (trim($row->summaryImage) != \"\") {\n\t\t\t\t\t\n\t\t\t\t\t$image = \"\t\t\t\t\t\t\t<div class=\\\"summary_image\\\">\\n<a href=\\\"/events/id/$row->id\\\"><img src=\\\"/file.php?load=$row->summaryImage&w=$imageWidth&h=$imageHeight\\\"></a></div>\\n\";\n\t\t\t\t\t$imageOffsetClass = \" image_offset\";\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t$image = \"\";\n\t\t\t\t\t$imageOffsetClass = \"\";\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$title = htmlentities($row->title);\n\t\t\t\t\n\t\t\t\tprint \"\t\t\t\t\t\t<div class=\\\"event_item$style\\\">\\n\";\n\t\t\t\tprint \"\t\t\t\t\t\t\t<div class=\\\"details_container\\\">\\n\";\n\t\t\t\tprint \"\t\t\t\t\t\t\t\t<div class=\\\"title\\\"><a href=\\\"/events/id/$row->id\\\">$title</a></div>\\n\";\n\t\t\t\tprint \"\t\t\t\t\t\t\t\t<table border=\\\"0\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\">\\n\";\n\t\t\t\tprint \"\t\t\t\t\t\t\t\t\t<tr><td class=\\\"start_date\\\">$row->newStartDate</td></tr><tr><td class=\\\"end_date\\\">$row->newExpireDate</td></tr>\\n\";\n\t\t\t\tprint \"\t\t\t\t\t\t\t\t</table>\\n\";\n\t\t\t\t\n\t\t\t\tif ($showSummary == \"true\") {\n\t\t\t\t\t\n\t\t\t\t\t$summary = preg_replace(\"/\\\\n/\", \"<br>\", htmlentities($row->summary));\n\t\t\t\t\t\n\t\t\t\t\tprint $image;\n\t\t\t\t\tprint \"\t\t\t\t\t\t<div class=\\\"summary$imageOffsetClass\\\">\\n\";\n\t\t\t\t\tprint \"\t\t\t\t\t\t\t$summary\\n\";\n\t\t\t\t\tprint \"\t\t\t\t\t\t</div>\\n$showGroupName\";\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tprint \"\t\t\t\t\t\t\t</div>\\n\";\t\t\t\t\t\n\t\t\t\tprint \"\t\t\t\t\t\t</div>\\n\";\n\t\t\t\t\n\t\t\t}\n\n\t\t\tprint \"</div>\";\n\t\t\tprint \"</div>\";\n\t\t\t\n\t\t\tprint \"<div id=\\\"event_list_navigation\\\">\";\n\t\t\tprint \"\t<div class=\\\"totals\\\">Page: $showCurrentPage of $showTotalPages</div><div class=\\\"navigation\\\"><div class=\\\"previous\\\"><a href=\\\"javascript:regenerateEventList('$month', '$day', '$year', $s, 'b');\\\" title=\\\"Previous Results\\\">Previous</a></div><div class=\\\"next\\\"><a href=\\\"javascript:regenerateEventList('$month', '$day', '$year', $s, 'n');\\\" title=\\\"Next Results\\\">Next</a></div></div>\";\n\t\t\tprint \"</div>\";\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\tprint \"<div class=\\\"event_contents\\\">No events are occurring on this date.</div>\";\n\t\t\tprint \"</div>\";\n\t\t\tprint \"</div>\";\n\t\t\t\n\t\t}\n\t\t\n\t}\n\t\n}", "title": "" }, { "docid": "0e8b565379c4e030dbd4f32d4a671f72", "score": "0.5812855", "text": "function get_eventon_cal_title_month($month_number, $year_number){\r\n\t\r\n\t$evopt = get_option('evcal_options_evcal_1');\r\n\t\r\n\t$string = ($evopt['evcal_header_format']!='')?$evopt['evcal_header_format']:'m, Y';\r\n\r\n\t$str = str_split($string, 1);\r\n\t$new_str = '';\r\n\t\r\n\t\r\n\t\r\n\tforeach($str as $st){\r\n\t\tswitch($st){\r\n\t\t\tcase 'm':\r\n\t\t\t\t$new_str.= eventon_returnmonth_name_by_num($month_number);\r\n\t\t\tbreak;\r\n\t\t\tcase 'Y':\r\n\t\t\t\t$new_str.= $year_number;\r\n\t\t\tbreak;\r\n\t\t\tcase 'y':\r\n\t\t\t\t$new_str.= substr($year_number, -2);\r\n\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\t$new_str.= $st;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn $new_str;\r\n}", "title": "" }, { "docid": "fb3cb852febbcb2784867e83fb5df452", "score": "0.5801744", "text": "public function monthName() {\n\t\t// note that the day name by itself will be translated\n\t\t// so no need to use our wrapper \"format\" method\n\t\treturn Factory::getText(parent::format('F'));\n\t}", "title": "" }, { "docid": "4355abb80223b99a162a369c3c271888", "score": "0.5794973", "text": "function salaryEntryCalendar( $month, $year){\n\n date_default_timezone_set('America/Los_Angeles');\n\n if(request()->route()->parameters != null) {\n $month = request()->route()->parameters['month'];\n $year = request()->route()->parameters['year'];\n }\n\n if (empty($month)) {\n $month = date('m');\n\n }\n if (empty($year)) {\n $year = date('Y');\n\n }\n //number of days integer\n $num_days=cal_days_in_month(CAL_GREGORIAN,$month,$year);\n\n //epoch seconds of first day of month\n $first_day_month = mktime(0,0,0, $month, 1, $year);\n\n //epoch seconds converted to first day of month\n $first=strftime('%w', $first_day_month);\n $wordy_month = strftime(\"%B\", $first_day_month);\n $prev_month = $month -1;\n $prev_year= $year;\n if ($prev_month <= 0)\n { $prev_month=12;\n $prev_year = $year-1;\n }\n $previous_month_link =\"<a class='btn btn-secondary' href='/salary/calendar/$prev_month/$prev_year'><i class='fa fa-arrow-circle-o-left' aria-hidden='true'></i> Previous Month</a>\";\n $next_month = $month + 1;\n $next_year= $year;\n if ($next_month >= 13)\n { $next_month=1;\n $next_year = $year+1;\n }\n $next_month =\"<a class='btn btn-secondary' href='/salary/calendar/$next_month/$next_year'>Next Month <i class='fa fa-arrow-circle-o-right' aria-hidden='true'></i></a>\";\n\n\n $days = array('Sun', 'Mon', 'Tue', 'Wed', 'Thur', 'Fri', 'Sat');\n\n $cal = '';\n $cal .= '<div id=\"calendar\"><br/><br/><input name=\"hidemonth\" type=\"hidden\" value=\"'.$month.'\"><input name=\"hideyear\" type=\"hidden\" value=\"'.$year.'\">\n <h1 class=\"text-center verlag-bold timesheet-portal-header\">'.$wordy_month .'&nbsp;'. $year. '</h1><br/><div id=\"calender_nav\">'\n .$previous_month_link . str_repeat(\"&nbsp;\", 50) . $next_month. '</div> <br/> <table class=\"table verlag-bold\"><tr>';\n foreach($days as $days) { $cal.= '<th>'.$days.'</th>';\n }\n $cal.= '<tr>';\n $day=0;\n\n //second row - first week of the month\n while ($day < $first)\n {\n $cal.= '<td>'.'&nbsp;'.'</td>';\n $day++;\n }\n\n // Print the days of the week starting with 1\n $day=1;\n while ($day <= 7- $first) {\n $cal.= '<td>'. $day.'<select name=\"cal_'.$day.'\" class=\"form-control\"><option value=\"\" selected=\"selected\"></option><option value=\"X\">X (Worked)</option><option value=\"V\">V (Vacation)</option><option value=\"H\">H (Holiday)</option><option value=\"S\">S (Sick)</option><option value=\"B\">B (Bereavement)</option><option value=\"J\">J (Jury Duty)</option><option value=\"U\">U (Unpaid Time Off)</option><option value=\"O\">O (Other)</option></select></td>';\n $day++;\n }\n $cal.= '</tr><tr>';\n\n //Loop to do the in between rows\n $day= 7 - $first + 1;\n for ($count = 0 ; $count < 7; $count++)\n { $cal.= '<td>'.$day.'<select name=\"cal_'.$day.'\" class=\"form-control\"><option value=\"\" selected=\"selected\"></option><option value=\"X\">X (Worked)</option><option value=\"V\">V (Vacation)</option><option value=\"H\">H (Holiday)</option><option value=\"S\">S (Sick)</option><option value=\"B\">B (Bereavement)</option><option value=\"J\">J (Jury Duty)</option><option value=\"U\">U (Unpaid Time Off)</option><option value=\"O\">O (Other)</option></select></td>';\n $day++;\n }\n $cal.= '</tr><tr>';\n\n $day = 7 - $first + 1 + 7;\n for ($count = 0 ; $count < 7; $count++)\n {\n $cal.= '<td>'.$day.'<select name=\"cal_'.$day.'\" class=\"form-control\"><option value=\"\" selected=\"selected\"></option><option value=\"X\">X (Worked)</option><option value=\"V\">V (Vacation)</option><option value=\"H\">H (Holiday)</option><option value=\"S\">S (Sick)</option><option value=\"B\">B (Bereavement)</option><option value=\"J\">J (Jury Duty)</option><option value=\"U\">U (Unpaid Time Off)</option><option value=\"O\">O (Other)</option></select></td>';\n $day++;\n }\n $cal.= '</tr><tr>';\n\n $day= 7 - $first + 1 + 14;\n for ($count = 0 ; $count < 7; $count++)\n {\n $cal.= '<td>'.$day.' <select name=\"cal_'.$day.'\" class=\"form-control\"><option value=\"\" selected=\"selected\"></option><option value=\"X\">X (Worked)</option><option value=\"V\">V (Vacation)</option><option value=\"H\">H (Holiday)</option><option value=\"S\">S (Sick)</option><option value=\"B\">B (Bereavement)</option><option value=\"J\">J (Jury Duty)</option><option value=\"U\">U (Unpaid Time Off)</option><option value=\"O\">O (Other)</option></select></td>';\n $day++;\n }\n // Final loop to do the last row\n $cal.= '</tr><tr>';\n\n $day = 7 - $first + 1 + 21;\n\n while ($day <= $num_days){\n $cal.= '<td>'.$day.'<select name=\"cal_'.$day.'\" class=\"form-control\"><option value=\"\" selected=\"selected\"></option><option value=\"X\">X (Worked)</option><option value=\"V\">V (Vacation)</option><option value=\"H\">H (Holiday)</option><option value=\"S\">S (Sick)</option><option value=\"B\">B (Bereavement)</option><option value=\"J\">J (Jury Duty)</option><option value=\"U\">U (Unpaid Time Off)</option><option value=\"O\">O (Other)</option></select></td>';\n $day++;\n if ($day >=31 && $first >= 5){\n $cal.= \"</tr>\";\n while ($day <= $num_days) {\n $cal.= '<td>'.$day.'<select name=\"cal_'.$day.'\" class=\"form-control\"><option value=\"\" selected=\"selected\"></option><option value=\"X\">X (Worked)</option><option value=\"V\">V (Vacation)</option><option value=\"H\">H (Holiday)</option><option value=\"S\">S (Sick)</option><option value=\"B\">B (Bereavement)</option><option value=\"J\">J (Jury Duty)</option><option value=\"U\">U (Unpaid Time Off)</option><option value=\"O\">O (Other)</option></select></td>';\n $day++;\n }\n }\n if ($day >= 30 && $first >=6) {\n $cal.= \"</tr>\";\n while ($day <= $num_days) {\n $cal.= '<td>'.$day.'<select name=\"cal_'.$day.'\" class=\"form-control\"><option value=\"\" selected=\"selected\"></option><option value=\"X\">X (Worked)</option><option value=\"V\">V (Vacation)</option><option value=\"H\">H (Holiday)</option><option value=\"S\">S (Sick)</option><option value=\"B\">B (Bereavement)</option><option value=\"J\">J (Jury Duty)</option><option value=\"U\">U (Unpaid Time Off)</option><option value=\"O\">O (Other)</option></select> </td>';\n $day++;\n }\n }\n }\n $cal.= '</tr></table>';\n $cal.= '<br/>';\n\n echo $cal;\n\n}", "title": "" }, { "docid": "ff8288e85827272647e99eaaff61a4f7", "score": "0.57930636", "text": "protected function set_calender_title() \n\t{\n\t\tif ($this->uri->segment(5)) {\n\t\t\t$current_month = $this->month_to_name($this->uri->segment(5));\n\t\t\t$current_year = $this->uri->segment(4);\n\t\t\t$str = 'Calendar dates for ACME from ' . $current_month . ' ' . $current_year;\n\t\t} elseif ($this->session->has_userdata('times')) {\n\t\t\t$times = $this->session->times;\n\t\t\t$str = 'Calendar dates for ACME from ' . $this->month_to_name($times['current_month']) . ' ' . $times['current_year'];\n\t\t} else {\n\t\t\t$str = 'Book your ACME here';\n\t\t}\n\n\t\treturn $str;\n\t\t\n\t}", "title": "" }, { "docid": "b27e30b4b4c2e2f78aa0f5ebecfe1890", "score": "0.57923377", "text": "function render() {\r\n\t\t// Checking if we should do a month or a year\r\n\t\tif (!$this->_ShowYear) {\r\n\t\t\t$month = $this->_DoMonth();\r\n\t\t\treturn $month->render( NULL, 0 );\r\n\t\t} else {\r\n\t\t\t// Get year\r\n\t\t\t$year = date('Y',$this->_date);\r\n\t\t\t$data_table = html_table('',1,1,5);\r\n\r\n\t\t\t// Setting the previous & next year\r\n\t\t\t$prev = mktime(0,0,0,1,1, $year-1);\r\n\t\t\t$next = mktime(0,0,0,1,1, $year+1);\r\n\t\t\t// Extracting query string\r\n\t\t\tif (isset($_SERVER['QUERY_STRING'])) {\r\n\t\t\t\tif (substr($_SERVER['QUERY_STRING'],0,12) == 'CalendarDate') {\r\n\t\t\t\t\t$query_string = substr($_SERVER['QUERY_STRING'],23);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif ($_SERVER['QUERY_STRING'] != '') $query_string = '&' . $_SERVER['QUERY_STRING'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Setting up link\r\n\t\t\t$prevYear = $_SERVER['PHP_SELF'] . \"?CalendarDate=$prev\" . $query_string;\r\n\t\t\t$nextYear = $_SERVER['PHP_SELF'] . \"?CalendarDate=$next\" . $query_string;\r\n\r\n\t\t\t// Add header\r\n\t\t\t$data_table->set_class('PHP_calendar');\r\n\t\t\t$data_table->set_default_col_attributes(array('align' => 'center','valign' => 'baseline'));\r\n\t\t\t$t_td = html_td('PHP_calendarHeader', 'center', $year);\r\n\t\t\t$t_td->set_tag_attributes(array('colspan' => 2));\r\n\t\t\t$data_table->add_row(html_td('PHP_calendarHeader', 'center', html_a($prevYear, '&lt;&lt;')), $t_td,html_td('PHP_calendarHeader', 'center', html_a($nextYear, '&gt;&gt;')));\r\n\r\n\t\t\t// adding months\r\n\t\t\t$month = 1;\r\n\t\t\t// three rows of four months each\r\n\t\t\tfor ($i = 0; $i < 3; $i++) {\r\n\t\t\t\t$Row = html_tr();\r\n\t\t\t\tfor ($j = 0; $j < 4; $j++) {\r\n\t\t\t\t\t$this->_date = mktime(0,0,0,$month++,1, $year);\r\n\t\t\t\t\t$Cell = html_td(NULL, 'center', $this->_DoMonth());\r\n\t\t\t\t\t$Cell->set_tag_attribute('valign','top');\r\n\t\t\t\t\t$Row->add($Cell);\r\n\t\t\t\t}\r\n\t\t\t\t$data_table->add_row($Row);\r\n\t\t\t}\r\n\t\t\treturn $data_table->render( NULL, 0 );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "9f91f152a48afe546d40f14744c28cab", "score": "0.5783912", "text": "public function renderMonth($year, $month);", "title": "" }, { "docid": "050ca6eff231381565e2cc018ee498a2", "score": "0.5779984", "text": "private function DrawMonthSmall($year = \"\", $month = \"\")\r\n\t{\r\n\t\tif($month == \"\") $month = $this->arrParameters['month'];\r\n\t\tif($year == \"\") $year = $this->arrParameters['year'];\r\n\t\t$week_rows = 0;\r\n\t\t$actday = 0;\r\n\t\t\r\n\t\t// today, first day and last day in month\r\n\t\t$firstDay = getdate(mktime(0,0,0,$month,1,$year));\r\n\t\t$lastDay = getdate(mktime(0,0,0,$month+1,0,$year));\r\n\t\t\r\n\t\t// create a table with the necessary header informations\r\n\t\techo \"<table class='month_small'>\".$this->crLt;\r\n\t\techo \"<tr class='tr_small_days'>\".$this->crLt;\r\n\t\t\tif($this->isWeekNumberOfYear) echo \"<td class='th_small_wn'></td>\".$this->crLt;\r\n\t\t\tfor($i = $this->weekStartedDay-1; $i < $this->weekStartedDay+6; $i++){\r\n\t\t\t\techo \"<td class='th_small'>\".$this->arrWeekDays[($i % 7)][\"short\"].\"</td>\".$this->crLt;\t\t\r\n\t\t\t}\r\n\t\techo \"</tr>\".$this->crLt;\r\n\t\t\r\n\t\t// display the first calendar row with correct positioning\r\n\t\tif ($firstDay['wday'] == 0) $firstDay['wday'] = 7;\r\n\t\t$max_empty_days = $firstDay['wday']-($this->weekStartedDay-1);\t\t\r\n\t\tif($max_empty_days < 7){\r\n\t\t\techo \"<tr class='tr_small' style='height:\".$this->celHeight.\";'>\".$this->crLt;\r\n\t\t\tif($this->isWeekNumberOfYear) echo \"<td class='td_small_wn'>\".date(\"W\", mktime(0,0,0,$month,1-$max_empty_days,$year)).\"</td>\".$this->crLt;\t\t\t\r\n\t\t\tfor($i = 1; $i <= $max_empty_days; $i++){\r\n\t\t\t\techo \"<td class='td_small_empty'>&nbsp;</td>\".$this->crLt;\r\n\t\t\t}\t\t\t\r\n\t\t\tfor($i = $max_empty_days+1; $i <= 7; $i++){\r\n\t\t\t\t$actday++;\r\n\t\t\t\tif (($actday == $this->arrToday['mday']) && ($this->arrToday['mon'] == $month) && ($this->arrToday['year'] == $year)) {\r\n\t\t\t\t\t$class = \" class='td_small_actday'\";\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$class = \" class='td_small'\";\r\n\t\t\t\t} \r\n\t\t\t\techo \"<td$class>$actday</td>\".$this->crLt;\r\n\t\t\t}\r\n\t\t\techo \"</tr>\".$this->crLt;\r\n\t\t\t$week_rows++;\r\n\t\t}\r\n\t\t\r\n\t\t// get how many complete weeks are in the actual month\r\n\t\t$fullWeeks = floor(($lastDay['mday']-$actday)/7);\r\n\t\t\r\n\t\tfor ($i=0;$i<$fullWeeks;$i++){\r\n\t\t\techo \"<tr class='tr_small' style='height:\".$this->celHeight.\";'>\".$this->crLt;\r\n\t\t\tif($this->isWeekNumberOfYear) echo \"<td class='td_small_wn'>\".date(\"W\", mktime(0,0,0,$month,$actday,$year)).\"</td>\".$this->crLt;\t\t\t\r\n\t\t\tfor ($j=0;$j<7;$j++){\r\n\t\t\t\t$actday++;\r\n\t\t\t\tif (($actday == $this->arrToday['mday']) && ($this->arrToday['mon'] == $month) && ($this->arrToday['year'] == $year)) {\r\n\t\t\t\t\t$class = \" class='td_small_actday'\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$class = \" class='td_small'\";\r\n\t\t\t\t}\r\n\t\t\t\techo \"<td$class>$actday</td>\".$this->crLt;\r\n\t\t\t}\r\n\t\t\techo \"</tr>\".$this->crLt;\r\n\t\t\t$week_rows++;\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// now display the rest of the month\r\n\t\tif ($actday < $lastDay['mday']){\r\n\t\t\techo \"<tr class='tr_small' style='height:\".$this->celHeight.\";'>\".$this->crLt;\r\n\t\t\tif($this->isWeekNumberOfYear) echo \"<td class='td_small_wn'>\".date(\"W\", mktime(0,0,0,$month,$actday,$year)).\"</td>\".$this->crLt;\t\t\t\r\n\t\t\tfor ($i=0; $i<7;$i++){\r\n\t\t\t\t$actday++;\r\n\t\t\t\tif (($actday == $this->arrToday['mday']) && ($this->arrToday['mon'] == $month) && ($this->arrToday['year'] == $year)) {\r\n\t\t\t\t\t$class = \" class='td_small_actday'\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$class = \" class='td_small'\";\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\tif ($actday <= $lastDay['mday']){\r\n\t\t\t\t\techo \"<td$class>$actday</td>\".$this->crLt;\r\n\t\t\t\t} else {\r\n\t\t\t\t\techo \"<td class='td_small_empty'>&nbsp;</td>\".$this->crLt;\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\t\t\r\n\t\t\techo \"</tr>\".$this->crLt;\r\n\t\t\t$week_rows++;\r\n\t\t}\r\n\t\t\r\n\t\t// complete last line\r\n\t\tif($week_rows < 5){\r\n\t\t\techo \"<tr class='tr_small' style='height:\".$this->celHeight.\";'>\".$this->crLt;\r\n\t\t\tif($this->isWeekNumberOfYear) echo \"<td class='td_small_wn'></td>\".$this->crLt;\r\n\t\t\tfor ($i=0; $i<7;$i++){\r\n\t\t\t\techo \"<td class='td_small_empty'>&nbsp;</td>\".$this->crLt;\r\n\t\t\t}\t\t\t\t\t\r\n\t\t\techo \"</tr>\".$this->crLt;\r\n\t\t\t$week_rows++;\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\techo \"</table>\".$this->crLt;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "363bd211bfc5a5aa4dc758302f878102", "score": "0.5769747", "text": "function sdomsCalendar($month, $year){\r\n\r\n\t\t\t\t\t/* draw table */\r\n\t\t\t\t\t$calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\r\n\r\n\t\t\t\t\t/* table headings */\r\n\t\t\t\t\t$headings = array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');\r\n\t\t\t\t\t$calendar.= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\r\n\r\n\t\t\t\t\t/* days and weeks vars now ... */\r\n\t\t\t\t\t$running_day = date('w',mktime(0,0,0,$month,1,$year));\r\n\t\t\t\t\t$days_in_month = date('t',mktime(0,0,0,$month,1,$year));\r\n\t\t\t\t\t$days_in_this_week = 1;\r\n\t\t\t\t\t$day_counter = 0;\r\n\t\t\t\t\t$dates_array = array();\r\n\r\n\t\t\t\t\t/* row for week one */\r\n\t\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\r\n\r\n\t\t\t\t\t/* print \"blank\" days until the first of the current week */\r\n\t\t\t\t\tfor($x = 0; $x < $running_day; $x++):\r\n\t\t\t\t\t\t$calendar.= '<td class=\"calendar-day-np\" height=\"100px\"> </td>';\r\n\t\t\t\t\t\t$days_in_this_week++;\r\n\t\t\t\t\tendfor;\r\n\r\n\t\t\t\t\t/* keep going with days.... */\r\n\t\t\t\t\tfor($list_day = 1; $list_day <= $days_in_month; $list_day++): \r\n\t\t\t\t\t\tif($list_day == $today && $month == $nowmonth && $year == $nowyear) { //check variable to fit in\r\n\t\t\t\t\t\t$calendar.= '<td class=\"calendar-day calendar-day-today\" height=\"100px\">fabulous GOD *';\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$calendar.= '<td class=\"calendar-day\" height=\"100px\">fabulous GOD';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//for($list_day = 1; $list_day <= $days_in_month; $list_day++):\r\n\t\t\t\t\t\t//$calendar.= '<td class=\"calendar-day\" height=\"100px\">fabulous GOD';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t/* add in the day number */\r\n\t\t\t\t\t\t\t$calendar.= '<div class=\"day-number\">'.$list_day.'</div>';\r\n\r\n\t\t\t\t\t\t\t/** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !! IF MATCHES FOUND, PRINT THEM !! \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$keys = array('comment', 'shout', 'submission');\r\n\r\n\t\t\t\tforeach ($keys as $key) {\r\n\t\t\t\t\t${$key . '_events'} = 0;\r\n\t\t\t\t\tforeach (${$key . 's'} as $event) {\r\n\r\n\t\t\t\t\t$event_datetime = strtotime($event[$key . '_datetime']);\r\n\t\t\t\t\t$event_day = date('j', $event_datetime);\r\n\t\t\t\t\t$event_month = date('F', $event_datetime);\r\n\t\t\t\t\t$event_year = date('Y', $event_datetime);\r\n\r\n\t\t\t\t\t$now_datetime = mktime(0, 0, 0, $month, $list_day, $year);\r\n\t\t\t\t\t$now_day = date('j', $now_datetime);\r\n\t\t\t\t\t$now_month = date('F', $now_datetime);\r\n\t\t\t\t\t$now_year = date('Y', $now_datetime);\r\n\r\n\t\t\t\t\tif (($event_day == $now_day) && ($event_month == $now_month) && ($event_year == $now_year)) {\r\n\t\t\t\t\t\t${$key . '_events'} += 1;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\tif (${$key . '_events'} > 0) $calendar .= '<div class=\"calendar-event ' . $key . '\">' . ${$key . '_events'} . ' ' . $key . (${$key . '_events'} > 1 ? 's' : '' ) . '</div>';\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t**/\r\n\t\t\t\t\t\t\t$calendar.= str_repeat('<p> </p>',2);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t$calendar.= '</td>';\r\n\t\t\t\t\t\tif($running_day == 6):\r\n\t\t\t\t\t\t\t$calendar.= '</tr>';\r\n\t\t\t\t\t\t\tif(($day_counter+1) != $days_in_month):\r\n\t\t\t\t\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\r\n\t\t\t\t\t\t\tendif;\r\n\t\t\t\t\t\t\t$running_day = -1;\r\n\t\t\t\t\t\t\t$days_in_this_week = 0;\r\n\t\t\t\t\t\tendif;\r\n\t\t\t\t\t\t$days_in_this_week++; $running_day++; $day_counter++;\r\n\t\t\t\t\tendfor;\r\n\r\n\t\t\t\t\t/* finish the rest of the days in the week */ //if($days_in_this_week < 8 && $days_in_this_week!=1):\r\n\t\t\t\t\tif($days_in_this_week < 8):\r\n\t\t\t\t\t\tfor($x = 1; $x <= (8 - $days_in_this_week); $x++):\r\n\t\t\t\t\t\t\t$calendar.= '<td class=\"calendar-day-np\" height=\"100px\"> aa</td>';\r\n\t\t\t\t\t\tendfor;\r\n\t\t\t\t\tendif;\r\n\r\n\t\t\t\t\t/* final row */\r\n\t\t\t\t\t$calendar.= '</tr>';\r\n\r\n\t\t\t\t\t/* end the table */\r\n\t\t\t\t\t$calendar.= '</table>';\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* all done, return result */\r\n\t\t\t\t\treturn $calendar;\r\n\t\t}", "title": "" }, { "docid": "7527cbb707af4e93c9f2546188b57976", "score": "0.576784", "text": "function getDisplayMonths ( $selected_month=false )\n {\n if ( $selected_month === 0 )\n $selected_month = 12;\n if ( !$selected_month )\n {\n if ( !empty($this->current_selections['months']) )\n {\n $selected_month = $this->current_selections['months'];\n } else {\n $selected_month = $this->today_info[\"mon\"];\n }\n }\n list( $values, $val ) = $this->_getMonths();\n return $this->select( $this->form_names['months'], $values, $val, $selected_month );\n }", "title": "" }, { "docid": "23b29dd1f5c140de0c5b4b05b9cb939c", "score": "0.5766782", "text": "function pcalenda($month,$year)\n {\n\t$ddias=getMonthDays($month, $year); // Numero de dias del mes\n\t$diaSemana=date(\"w\",mktime(0,0,0,$month,1,$year)) ; //dia de la scandir(directory)emana del primer dia Devuelve 0 para domingo, 6 para sabado\n\t$meses=array(1=>\"Enero\", \"Febrero\", \"Marzo\", \"Abril\", \"Mayo\", \"Junio\", \"Julio\",\"Agosto\", \"Septiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\");\n\techo \"<table id='calendar' border=1><caption>\". $meses[$month].\" \".$year.\"</caption><tr> <th rowspan=2>Dias Horas</th>\";\n\n\nswitch ($diaSemana)\n {\n\tcase 1 : echo \"<th>Lun</th><th>Mar</th><th>Mie</th><th>Jue</th><th>Vie</th><th>Sab</th><th>Dom</th>\"; $dis =7 ;break;\n\tcase 2 : echo \"<th>Mar</th><th>Mie</th><th>Jue</th><th>Vie</th><th>Sab</th><th>Dom</th>\"; $dis =6; break;\n\tcase 3 : echo \"<th>Mie</th><th>Jue</th><th>Vie</th><th>Sab</th><th>Dom</th>\"; $dis =5; break;\n\tcase 4 : echo \"<th>Jue</th><th>Vie</th><th>Sab</th><th>Dom</th>\"; $dis =4; break;\n\tcase 5 : echo \"<th>Vie</th><th>Sab</th><th>Dom</th>\"; $dis =3; break;\n\tcase 6 : echo \"<th>Sab</th><th>Dom</th>\"; $dis =2; break;\n\tcase 0 : echo \"<th>Dom</th>\"; $dis =1; break;\n}\n\n$cc = floor(($ddias-$dis)/7) ; //semanas completas\n\nfor($i=1; $i<=$cc; $i++)\n { \n \techo \"<th>Lun</th><th>Mar</th><th>Mie</th><th>Jue</th><th>Vie</th><th>Sab</th><th>Dom</th>\";\n }\n\n$diasfin = ($ddias-$dis)%7 ; // ultima semana semana incompleta\n\nswitch ($diasfin)\n {\n// case 0 : echo \"<th>Lun</th><th>Mar</th><th>Mie</th><th>Jue</th><th>Vie</th><th>Sab</th><th>Dom</th>\"; break;\n\tcase 1 : echo \"<th>Lun</th>\"; break;\n\tcase 2 : echo \"<th>Lun</th><th>Mar</th>\"; break;\n\tcase 3 : echo \"<th>Lun</th><th>Mar</th><th>Mie</th>\"; break;\n\tcase 4 : echo \"<th>Lun</th><th>Mar</th><th>Mie</th><th>Jue</th>\"; break;\n\tcase 5 : echo \"<th>Lun</th><th>Mar</th><th>Mie</th><th>Jue</th><th>Vie</th>\"; break;\n\tcase 6 : echo \"<th>Lun</th><th>Mar</th><th>Mie</th><th>Jue</th><th>Vie</th><th>Sab</th>\"; break;\n\n}\n\necho \"</tr><tr bgcolor='silver' align='center'>\";\n\n$day=1 ;\n\nfor($i=1;$i<=($ddias);$i++)\n { \n echo \"<td align='center'>$day</td>\"; $day++; /*dias*/\n }\n\necho \"<tr>\";\n\n/* Esta parte es si se quiere agreagar un horario pintando horas en el calendario\n* for ($i=0; $i<=($ddias*6); $i++) { $varh[$i] = 0 ; } $ndv =0; ;//inicializa variables\n$varh[0]='08'; $varh[1]='15'; //el 1 de 8 15\n$varh[2]='19'; $varh[3]='24'; //el 1 de 19 24\n$varh[6]='04'; $varh[7]='10'; //el 2 de 4 10\n$varh[156]='05'; $varh[157]='15'; //el 27 de 5 15 //$varh[(n-1)*6]\nfor ($ho = 1; $ho < 25; $ho++) { //crea las horas\necho \"<tr align='center'><td>\"; if (strlen($ho)<2) { echo \"0$ho:00\" ; } else { echo \"$ho:00\" ; }\nfor ($di=1; $di <=($ddias); $di++ ) { //crea los dias de la semana\nif ($ho>=$varh[$ndv] && $ho<=$varh[$ndv+1]) {echo \"</td><td bgcolor=#F7FE2E class='amarillo'>_____\"; }\nelseif ($ho>=$varh[$ndv+2] && $ho<=$varh[$ndv+3]) { echo \"</td><td bgcolor=#01DF01 class='verde'>_____\"; }\nelseif ($ho>=$varh[$ndv+4] && $ho<=$varh[$ndv+5]) { echo \"</td><td bgcolor=#FF0000 class='rojo'>_____\"; }\nelse { echo \"</td><td>\"; }\n$ndv = $ndv+6; }\n$ndv= 0; echo \"</tr>\"; } */\n\nfor ($ho = 1; $ho < 25; $ho++)\n { //crea las horas\n\techo \"<tr align='center'><td>\"; \n\n\tif (strlen($ho)<2)\n\t { \n\t \techo \"0$ho:00\"; \n\t\t} \n\n\t\telse\n\t\t { \n\t\t \techo \"$ho:00\";\n\t\t }\n\nfor($di=1; $di <=($ddias); $di++)\n { //crea los dias de la semana\n\techo \"</td><td>\";\n }\n\techo \"</tr>\"; \n}\n\techo \"</table>\";\n}", "title": "" }, { "docid": "46a3e9532d355f942fe297daee2aaacb", "score": "0.5754854", "text": "public function actionCalendar()\n {\n return $this->render('calendar');\n }", "title": "" }, { "docid": "1926ea191b4ab327527798896efb27e0", "score": "0.5745798", "text": "function em_calendar( $args = array() ){ echo em_get_calendar($args); }", "title": "" }, { "docid": "69c91224a3adfbeea0700cec481bb3c4", "score": "0.5731654", "text": "function getMonthView($month, $year)\n {\n return $this->getMonthHTML($month, $year);\n }", "title": "" }, { "docid": "654c5e75e89f5d63508092a7c3ead69e", "score": "0.5731324", "text": "public function solarCalendar()\n {\n $this->render('basic/solar');\n }", "title": "" }, { "docid": "eca7e237f238374c1c0fda6f6e6187e1", "score": "0.5725864", "text": "function printMonths ( $selected_month=false )\n {\n echo $this->getDisplayMonths( $selected_month );\n }", "title": "" }, { "docid": "c582d908cecc252aa74359ab47f48cfc", "score": "0.5716621", "text": "private function HasCalendarEvents() \n {\n View::composer('layouts.wura', '\\App\\Http\\Composers\\LayoutComposer@HasCalendarEvents');\n }", "title": "" }, { "docid": "74c2d2c38607f08a9e64c716180d706d", "score": "0.5714081", "text": "function get_calendar()\n {\n\n }", "title": "" }, { "docid": "e7c4c670e9715a8879343ebf50a2dfa9", "score": "0.5709896", "text": "function getCalendarNavigator($month = null, $year = null)\n{\n $month = !$month ? getRequestData('month') : $month;\n if (!$month) {\n $month = date('m');\n }\n $year = !$year ? getRequestData('year') : $year;\n if (!$year) {\n $year = date('Y');\n }\n $month_start = strtotime($year . '-' . $month . '-1');\n $prev_month = explode('-', date('Y-m', strtotime(\"-1 months\", $month_start)));\n $next_month = explode('-', date('Y-m', strtotime(\"+1 months\", $month_start)));\n $html = '<a href=\"calendar.php?year=' . $prev_month[0] . '&month=' . $prev_month[1] . '\" id=\"monthLeft\"><span class=\"fa fa-chevron-left\"></span></a>';\n $html .= '<span id=\"monthName\" style=\"text-transform: capitalize\">' . date('F', $month_start) . '</span>';\n $html .= '<a href=\"calendar.php?year=' . $next_month[0] . '&month=' . $next_month[1] . '\" id=\"monthRight\"><span class=\"fa fa-chevron-right\"></span></a>';\n return $html;\n}", "title": "" }, { "docid": "9998725330cfd3ce055cf542d5f7478f", "score": "0.5703035", "text": "function ercore_start_end_dates_displayed() {\n $ercore_date = variable_get('ercore_start_date');\n $argument_date_format = variable_get('date_format_ercore_date_format_month_day_year');\n $default = date_create(implode('/', $ercore_date));\n $dates['start'] = date_format($default, $argument_date_format);\n $dates['end'] = date($argument_date_format, strtotime('+1 year'));\n $new_dates = $dates['start'] . ' to ' . $dates['end'];\n return $new_dates;\n}", "title": "" }, { "docid": "91f35e780a2935f9088499ac9874a4d5", "score": "0.56953734", "text": "public abstract function get_months();", "title": "" }, { "docid": "dc286622eb9f047fa5b5d7db0e7cb998", "score": "0.56878847", "text": "public function stats_30_days_box() {\n\t\techo '<div class=\"statsico\">';\n\t\tjr_dashboard_charts();\n\t\techo '</div>';\n\t}", "title": "" }, { "docid": "6bb74f0c258486146c6a5866ddbd547b", "score": "0.5683143", "text": "function theme_date_calendar_day($date) {\r\n if (empty($date)) {\r\n return NULL;\r\n }\r\n return '<div class=\"date-calendar-day\">' .\r\n '<span class=\"month\">' . date_format_date($date, 'custom', 'M') . '</span>' .\r\n '<span class=\"day\">' . date_format_date($date, 'custom', 'j') . '</span>' .\r\n '<span class=\"year\">' . date_format_date($date, 'custom', 'Y') . '</span>' .\r\n '</div>';\r\n}", "title": "" }, { "docid": "5b487f19ffacbb751adc3484866cbc94", "score": "0.5673236", "text": "function getMonthView($date, $month, $year)\n {\n return $this->getMonthHTML($date, $month, $year);\n }", "title": "" }, { "docid": "0d28dfbc4b975949f5e0fd92a4510d48", "score": "0.5665062", "text": "public function index()\n {\n $thisMonth = date('n');\n $thisYear = date('Y');\n\n $currentMonth = Calendar::whereMonth('calendar_date', $thisMonth)\n ->whereYear('calendar_date', $thisYear)\n ->get();\n\n\n\n return view('training.calendar.index', compact('currentMonth'));\n }", "title": "" }, { "docid": "db57c96506ddea658493d5c2676030b0", "score": "0.56610054", "text": "function setForceMonthView($a_val)\n\t{\n\t\t$this->force_month_view = $a_val;\n\t\tif ($a_val)\n\t\t{\n\t\t\t$this->display_mode = \"mmon\";\n\t\t}\n\t}", "title": "" }, { "docid": "b76f808498899ed1a01d7d337ea69a3e", "score": "0.5660247", "text": "function DisplayHeader()\r\n\t{\r\n\t\t$retVal = \"\";\r\n\r\n\t\t/* Display all days in this month */\r\n\t\t$toDate = mktime(0, 0, 0, $this->nextMonthMonth, 1, $this->nextMonthYear);\r\n\r\n\t\t$loopCounter = 1;\r\n\t\t$day = mktime(0, 0, 0, $this->currentMonth, 1, $this->currentYear);\r\n\t\twhile ( $day < $toDate )\r\n\t\t{\r\n\t\t\t/* Is this a holiday? */\r\n\t\t\t$holiday = $this->CheckHoliday( $day );\r\n\t\t\t$this->holidayCache[ $loopCounter - 1 ] = $holiday;\r\n\r\n\t\t\t/* Put darker background on holidays */\r\n\t\t\t$dayOfWeek = date(\"w\", $day);\r\n\t\t\tif ($holiday || $dayOfWeek == 0 || $dayOfWeek == 6) {\r\n\t\t\t\t$freeDay = true;\r\n\t\t\t\t$bgClass = \"bgd\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$freeDay = false;\r\n\t\t\t\t$bgClass = \"bgl\";\r\n\t\t\t\t$this->totalWorkDays++;\r\n\t\t\t}\r\n\r\n\t\t\tif ( $loopCounter == 1 ) {\r\n\t\t\t\t$retVal .= \"<td style=\\\"border-left: 1px solid #000000;\\\" class=\\\"$bgClass\\\">\";\r\n\t\t\t}\r\n\t\t\t/* Cells after the first one should have nothing */\r\n\t\t\telse {\r\n\t\t\t\t$retVal .= \"<td class=\\\"$bgClass\\\">\";\r\n\t\t\t}\r\n\r\n\t\t\t/* Look up log for worked from and to hour */\r\n\r\n\t\t\t/* If there is a log entry for when the user began and ended working that day: Display it */\r\n\t\t\tif ( ($timeFrom == 0) || ($timeTo == 0) )\r\n\t\t\t{\r\n\t\t\t\t$retVal .= date(\"d\", $day) . \"&#160;<br />\" . substr($this->daysArray[ $dayOfWeek ],0,2) . \"</td>\";\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$retVal .= date(\"d\", $day) . \"&#160;<br />\" . substr($this->daysArray[ $dayOfWeek ],0,2) . \"</td>\";\r\n\t\t\t}\r\n\r\n\t\t\t$loopCounter++;\r\n\t\t\t$day = strtotime(\"+1 day\", $day);\r\n\t\t}\r\n\t\t$retVal .= \"<td style=\\\"border-right: 1px solid #000000;\\\" class=\\\"bgl\\\">&#160;</td>\";\r\n\t\treturn( $retVal );\r\n\t}", "title": "" }, { "docid": "4e0b04098ede0059c5a36883fa9e5f8f", "score": "0.5658652", "text": "function draw_calendar($data){\n $thisMonth = date('n');\n\n $data = json_decode($data, true);\n //echo \"<pre>\"; print_r($data);\n foreach($data as $startdate){\n $timestamp = strtotime($startdate['start']);\n $php_date = getdate($timestamp);\n //echo date(\"m\", $timestamp);\n $date[] = array(date(\"m\", $timestamp), date(\"Y\", $timestamp));\n }\n $date = array_map(\"unserialize\", array_unique(array_map(\"serialize\", $date)));\n sort($date);\n //print_r($date);\n $months = array(\"01\"=>\"January\", \"02\"=>\"February\", \"03\"=>\"March\", \"04\"=>\"April\", \"05\"=>\"May\", \"06\"=>\"June\", \"07\"=>\"July\", \"08\"=>\"August\", \"09\"=>\"September\", \"10\"=>\"October\", \"11\"=>\"November\", \"12\"=>\"December\");\n foreach($date as $key=>$i){\n if(search_array($thisMonth, $date)){\n $scriptData[] = array(\"state\"=>(($i[0] == $thisMonth) ? \"enabled\": \"disable\"), \"id\"=>($i[0].\"-\".$i[1]));\n } else {\n $scriptData[] = array(\"state\"=>(($key ==0) ? \"enabled\": \"disable\"), \"id\"=>($i[0].\"-\".$i[1]));\n }\n }\n echo \"<script>\n var months = \".json_encode($scriptData,JSON_PRETTY_PRINT).\";\n </script>\";\n \n \n foreach($date as $key=>$month){\n $prev = ($key == 0) ? \"\" : $months[\"0\".($month[0]-1)];\n $next = ($key == (count($date)-1)) ? \"\" : $months[\"0\".($month[0]+1)];\n \n \n echo \"This Month: \". $thisMonth . \"<br>\";\n\t\t\techo \"This date: \"; print_r($date); echo \"<br>\";\n if(search_array($thisMonth, $date)){\n echo ($month[0] == $thisMonth) ? \"<div id='\".$month[0].\"-\".$month[1].\"' class='active'>\" : \"<div id='\".$month[0].\"-\".$month[1].\"' class='nonActive'>\";\n } else {\n echo ($key == 0) ? \"<div id='\".$month[0].\"-\".$month[1].\"' class='active'>\" : \"<div id='\".$month[0].\"-\".$month[1].\"' class='nonActive'>\";\n }\n \n \n \n \n echo \"<div class=\\\"col-sm-12\\\" style=\\\"text-align:center\\\">\n <a style='font-size:16px' onclick=\\\"prev()\\\">\".$prev.\"</a>\n <div style='font-size: 50px;display:inline; padding-left:10px; padding-right:10px'>\".\n $months[$month[0]].\" \".$month[1].\n \"</div>\n <a style='font-size:16px' onclick=\\\"next()\\\">\".$next.\"</a></div>\";\n echo calendar($month[0], $month[1], $data);\n echo \"</div>\";\n }\n \n \n \n \n}", "title": "" }, { "docid": "5443e4d7fd82a934cf335944f8659ba3", "score": "0.5657288", "text": "function single_month_title($prefix = '', $display = \\true)\n{\n}", "title": "" }, { "docid": "5b44ad5a1faf94a8f0d05ec0589fa4d2", "score": "0.56568676", "text": "function byMonthAction()\n\t\t{\n\t\t\t$income_overview = $this->getTransactionTable()->getOverviewBy('month', true, 'income');\n\t\t\t$expenses_overview = $this->getTransactionTable()->getOverviewBy('month', true, 'expenses');\n\n\t\t\t/* Make a list of periods */\n\t\t\t$keys_1 = array_keys($income_overview);\n\t\t\t$keys_2 = array_keys($expenses_overview);\n\t\t\t\n\t\t\t$periods = array_unique(array_merge($keys_1, $keys_2));\n\t\t\tsort($periods);\n\t\t\t\n\t\t\t/* Output stage */\n\t\t\t$viewModel = new ViewModel(array(\n\t\t\t\t'periods' => $periods,\n\t\t\t\t'income' => $income_overview,\n\t\t\t\t'expenses' => $expenses_overview,\n\t\t\t));\n\t\t\t\t\n\t\t\treturn $viewModel;\n\t\t}", "title": "" }, { "docid": "a0dd44f38db4266d034e8da555d5389c", "score": "0.56554186", "text": "function draw_calendar_e($next){\n\t\n\n\t// $month = $next==1?(date('m')==12?1:date('m',mktime(0, 0, 0, date(\"m\")-1, date(\"d\"), date(\"Y\")))):date('m');\n\t// $year = $next==1?(date('m')==12?date('Y')+1:date('Y')):date('Y');\n\t\n\t$year = $next==1?(date('m')==12?date('Y')+1:date('Y')):date('Y');\n\t$month = explode(\"|\",get_month_wonder($next));\n\n\t//mes anterior\n\t$firstm = $next?$month[2]:date('m');//frena el calendario en enero del ano presente\n\t$beforeD = $month[2]?$month[2]:date('m')-1;\n\t$beforeM = $month[0]?$month[0]:date('F',mktime(0, 0, 0, date(\"m\")-1, date(\"d\"), date(\"Y\")));\n\n\t//mes siguiente\n\t$lastm = $next?$month[3]:date('m');//frena el calendario en diciembre del ano presente\n\t$nextD = $month[3]?$month[3]:date('m')+1;\n\t$nextM = $month[1]?$month[1]:date('F',mktime(0, 0, 0, date(\"m\")+1, date(\"d\"), date(\"Y\")));\n\n\t$month = $month[4]?$month[4]:date('m');\n\n\t/* draw table */\n\t$calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar rounded\">';\n\n\t/* table headings */\n\t$headings = array('Sun','Mon','Tues','Wednes','Thurs','Fri','Satur');\n\n\t$backMonth= $firstm!=''?\"onclick='window.location.replace(\\\"?current=events&next=\".$beforeD.\"\\\");'\":\"\";\n\t$nextMonth= $lastm!=''?\"onclick='window.location.replace(\\\"?current=events&next=\".$nextD.\"\\\");'\":\"\";\n\n\t$calendar.= '<tr class=\"calendar-row\" >\n\t\t\t\t <th '.$backMonth.' > <h3 style=\"cursor: pointer\">'.($backMonth==''?'':'<').'</h3></th>\n\t\t\t\t <th colspan=\"5\"> <h3>'.date('F Y',mktime(0, 0, 0, $month, 1, $year)).'</h3></th>\n\t\t\t\t <th '.$nextMonth.' > <h3 style=\"cursor: pointer\">'.($nextMonth==''?'':'>').'</h3></th>';\n\t$calendar.= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\n\n\t/* days and weeks vars now ... */\n\t$running_day = date('w',mktime(0,0,0,$month,1,$year));\n\t$days_in_month = date('t',mktime(0,0,0,$month,1,$year));\n\t$days_in_this_week = 1;\n\t$day_counter = 0;\n\t$dates_array = array();\n\n\t/* row for week one */\n\t$calendar.= '<tr class=\"calendar-row\">';\n\n\t/* print \"blank\" days until the first of the current week */\n\tfor($x = 0; $x < $running_day; $x++):\n\t\t$calendar.= '<td class=\"calendar-day-np\"> </td>';\n\t\t$days_in_this_week++;\n\tendfor;\n\t/*\n\tList of the reservations for this month, day by day\n\t */\n\t$events = mysql_query(\"SELECT id,DAY(date_ini) as 'day',MONTH(date_ini) as 'month',YEAR(date_ini) as 'year', date_ini, name FROM calendar WHERE date_ini LIKE '$year-$month%' ORDER BY date_ini ASC\");\n\t// $reservations = mysql_query(\"SELECT DAY(date) as 'day', pakage FROM `reservations` WHERE `date` LIKE '$year-$month%' and DAY(date) > \".date(\"d\").\" and status=1 ORDER BY date\") or die (mysql_error());\n\twhile ($reserved = mysql_fetch_assoc($events)){\n\t\t$daysReserved[$reserved['day']][]=$reserved['name'].'|'.$reserved['id'].'|'.$reserved['date_ini'].'|'.$reserved['day'];\n\t}\n\n\t/* keep going with days.... */\n\tfor($list_day = 1; $list_day <= $days_in_month; $list_day++):\n\t\t$activitiesInDay='';$a=0;\n\t if(is_array($daysReserved[$list_day]))\n\t\tforeach ($daysReserved[$list_day] as $dayReserved) { $a++;\n\n\t\t\t$name = explode('|', $dayReserved);\n\t\t\tif(strlen($name[0])>12){\n\t\t\t\t$nameCount = substr($name[0],0,10).'...';\n\t\t\t}else{\n\t\t\t\t$nameCount = $name[0];\n\t\t\t}\n \n if($name['3']==$list_day){\n $scrolli='div id=\"scbar\"';\n $class='class=\"scrollbar\"';\n $scrolle='</div>';\n }\n \n $events = mysql_query(\"SELECT * FROM calendar WHERE id = '\".$name[1].\"'\") or die (mysql_error());\n\t\t\t$events = mysql_fetch_assoc($events);\n\n\t\t\t$evenModal = \"\n\t\t\t<div id='eventModal\".$name[1].\"' class='reveal-modal' data-reveal>\n\t\t\t\t\t<div class='row panel'>\n\t\t\t\t\t\t<h3 >Details Events :: \".$events['name'].\"</h3>\n\t\t\t\t\t\t<div class='large-12 columns radius' >\t\n\t\t\t\t\t\t\t<div class='row'>&nbsp;</div>\n\t\t\t\t\t\t\t<div class='name-field' style='font-size: 16px !Important'>\n\t\t\t\t\t\t\t\t<label style='font-size: 16px !Important'><strong>Description:<strong></label>\n\t\t\t\t\t\t\t\t<p class='text-justify' style='font-size: 16px !Important'>\".$events['description'].\"</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class='row'>&nbsp;</div>\n\t\t\t\t\t\t\t<div class='email-field'>\n\t\t\t\t\t\t\t\t<label style='font-size: 16px !Important'><strong>Date and Time:<strong></label>\n\t\t\t\t\t\t\t\t<p class='text-left' style='font-size: 16px !Important'>\".$events['date_ini'].\"</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class='row'>&nbsp;</div>\n\t\t\t\t\t\t\t<div class='email-field'>\n\t\t\t\t\t\t\t\t<label style='font-size: 16px !Important'><strong>Location:</strong></label>\n\t\t\t\t\t\t\t\t<p class='text-left' style='font-size: 16px !Important'>\".$events['location'].\"</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<a class='close-reveal-modal'>&#215;</a>\n\t\t\t\t</div>\n\t\t\t\t\";\n\n\n\t\t\tif (($name['2']) >= (date(\"Y-m-d H:i:s\"))) {\n\t\t\t\t//$onclick= \"onclick='window.location.href=\\\"?current=eventsDetails&id=\".$name[1].\"\\\"'\";\n\t\t\t\t$activitiesInDay.=\"<span title='New events' class='radius label' data-reveal-id='eventModal\".$name[1].\"' style='cursor:pointer;margin: 3px 0;' $onclick>\".$nameCount.\"</span><br>\";\n\t\t\t\t$activitiesInDay.= $evenModal;\n\t\t\t}else{\n\t\t\t\t//$onclick= \"onclick='window.location.href=\\\"?current=eventsDetails&id=\".$name[1].\"\\\"'\";\n\t\t\t\t$activitiesInDay.=\"<span title='Past events' class='radius label' data-reveal-id='eventModal\".$name[1].\"' style='cursor:pointer;margin: 3px 0; background-color: #BA6100' $onclick>\".$nameCount.\"</span><br>\";\n\t\t\t\t$activitiesInDay.= $evenModal;\n\t\t\t} \n\t\t}\n\n\t\t//$selectedDay= @in_array($list_day,)?'selected':'';\n\t //$onclick= \"onclick='window.location.href=\\\"?current=events&id\\\"'\";\n\t\t$valid=(date('m')==$month && $list_day <= date('d'))?\"calendar-day-np\":\"calendar-day\";\n\t\t$back=(date('m')==$month && $list_day <= date('d'))?\"\":\"style='background:#FFF; cursor:default'\";\n\t\t$calendar.= \"<td class='$valid $selectedDay' $back >\";\n\t\t\t/* add in the day number */\n\t\t\t$calendar.= '<div class=\"day-number\" >'.$list_day.'</div>';\n $calendar.= ($a>1)?\"<\".$scrolli.\" \".$class.\">\":''; \n\t\t\t/** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !! IF MATCHES FOUND, PRINT THEM !! **/\n\t\t\t$calendar.= $activitiesInDay;//str_repeat('<p> </p>',2);\n\t\t\t$calendar.= $scrolle?$scrolle:'';\n\t\t$calendar.= '</td>';\n\t\tif($running_day == 6):\n\t\t\t$calendar.= '</tr>';\n\t\t\tif(($day_counter+1) != $days_in_month):\n\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\n\t\t\tendif;\n\t\t\t$running_day = -1;\n\t\t\t$days_in_this_week = 0;\n\t\tendif;\n\t\t$days_in_this_week++; $running_day++; $day_counter++;\n\tendfor;\n\n\t/* finish the rest of the days in the week */\n\tif($days_in_this_week < 8):\n\t\tfor($x = 1; $x <= (8 - $days_in_this_week); $x++):\n\t\t\t$calendar.= '<td class=\"calendar-day-np\"> </td>';\n\t\tendfor;\n\tendif;\n\n\t/* final row */\n\t$calendar.= '</tr>';\n\n\t/* end the table */\n\t$calendar.= '</table>';\n\t\n\t/* all done, return result */\n\treturn $calendar;\n}", "title": "" }, { "docid": "04b68454c054f8a5acc286ad6e7ee86c", "score": "0.56543225", "text": "function MonthlyReport()\n\t{\n\t\t$this->breadcrumbs->unshift(2, 'Monthly Report', 'attendance');\n\t\t$this->data['breadcrumb'] = $this->breadcrumbs->show();\t\t\n $this->template->public_render('Attendance/monthly_report', $this->data);\n\t}", "title": "" }, { "docid": "b502174f5db620b157c0bb4360c5b409", "score": "0.5653349", "text": "function Calendar()\n {\n }", "title": "" }, { "docid": "fa3faff360ba0fe2d0350ade138faa81", "score": "0.5651575", "text": "public function daysInMonth() {\n\t\treturn (int) parent::format('t');\n\t}", "title": "" }, { "docid": "1a622daa7400f2b83bebf7cf4c48ee2d", "score": "0.56508774", "text": "function kalendarCel($month, $day, $class=NULL){\n\t\n\t$monthForKey\t= (strlen($month) == 1) ? '0'.$month\t: $month;\n\t$dayForKey \t\t= (strlen($day) == 1) ? '0'.$day\t\t: $day;\n\n#\tprint_r($this->format[$monthForKey][$dayForKey]);\n\n\tif($this->format[$monthForKey][$dayForKey]['value'] != NULL){\n\t\t$class .= ' hasEvent';\n\t\t$r = \"<div class=\\\"dayPage\\\">\".$this->format[$monthForKey][$dayForKey]['value'].\"</div>\";\n\t}else\n\tif($this->format[$monthForKey][$dayForKey]['href'] != NULL){\n\t#\t$r = \"<a href=\\\"\".$this->format[$monthForKey][$dayForKey]['href'].\"\\\" class=\\\"dayNUmber\\\">\".$day.\"</span></a>\";\n\t}else{\n\t#\t$r = \"<div class=\\\"day\\\"><div>\";\n\t}\n\n\n\treturn \"<td class=\\\"\".$class.\"\\\" style=\\\"\".$this->format[$monthForKey][$dayForKey]['style'].\"\\\"><div class=\\\"dayNumber\\\">\".$day.\"</div>\".$r.\"</td>\";\n}", "title": "" }, { "docid": "74e6847bb9f39d7100012db682295f6e", "score": "0.5648558", "text": "function eventposttype_get_the_month_abbr($month) {\n global $wp_locale;\n for ( $i = 1; $i < 13; $i = $i +1 ) {\n if ( $i == $month )\n $monthabbr = $wp_locale->get_month_abbrev( $wp_locale->get_month( $i ) );\n }\n return $monthabbr;\n}", "title": "" }, { "docid": "ac28dcf064345802482ac5c62a3f44bf", "score": "0.5646549", "text": "public function calendar()\r\n {\r\n return '<div id=\"calendar-' . $this->getId() . '\"></div>';\r\n }", "title": "" }, { "docid": "b62f677451e26491d046aa039f486da1", "score": "0.56367546", "text": "function outof(){\nglobal $language,$maand;\n\n$day = date(\"d\");\nif (substr($day,0,1) == \"0\")\n$day = substr_replace ($day,'', 0, 1);\n$month = date(\"n\");\n$year = date(\"Y\");\n\n$query = \"select id,title,cat_name,day,month,year from events left join calendar_cat on events.cat=calendar_cat.cat_id \";\n$query .= \"where ((month='$month' and year<='$year') || (month<'$month' and year<='$year')) order by day,month,year ASC\";\n\n$result = mysql_query($query);\n\n$rows = mysql_num_rows($result);\n\necho \"<a href=calendar.php?op=delalloodev>\".translate(\"delalloodev\").\" !</a><br><br>\\n\";\n$foo = '';\nwhile ($row = mysql_fetch_object($result)){\n\n$foo++ % 2 ? $color=\"BBBBBB\" : $color=\"EEEEEE\";\nif ((($row->day<$day) && ($row->month=$month) && ($row->year=$year)) || ($row->month<$month)){ \necho \"<table border=1 bgcolor=$color cellspacing=0 cellpadding=4 width=\\\"100%\\\">\\n\";\necho \"<tr><td>\\n<li><b>\".stripslashes($row->title).\"</b> \".translate(\"op\").\" \".$row->day.\" \".$maand[$row->month].\" \".$row->year.\"\\n\";\necho \" - \".translate(\"cat\").\" : \".$row->cat_name.\"\\n\";\necho \" - <a href=calendar.php?op=view&id=\".$row->id.\">\".translate(\"view\").\"</a>\\n\";\necho \" - <a href=calendar.php?op=edit&id=\".$row->id.\">\".translate(\"edit\").\"</a>\\n\";\necho \" - <a href=calendar.php?op=delev&id=\".$row->id.\">\".translate(\"delev\").\"</a>\\n\";\necho \"</td></tr>\\n\";\necho \"</table>\\n\";\n}\n}\n\n}", "title": "" }, { "docid": "b23321b2215a080bd447affeb5778399", "score": "0.56307054", "text": "function ercore_displayed_date_ranges(&$dates) {\n $display_date_format = variable_get('date_format_ercore_date_format_month_day_year');\n if (isset($dates[0])) {\n $new_dates = date($display_date_format, $dates[0][0]) . ' to ' . date($display_date_format, $dates[0][1]);\n }\n elseif (isset($dates['start'])) {\n $new_dates = date($display_date_format, strtotime($dates['start'] . '-01')) . ' to ' . date($display_date_format, strtotime($dates['end'] . '-01'));\n }\n else {\n $new_dates = NULL;\n }\n return $new_dates;\n}", "title": "" }, { "docid": "dde28f3d9637352edad2ef0490ba6581", "score": "0.56281596", "text": "function timeline() {\n\t\t$this->template->view ( 'utilities/timeline' );\n\t}", "title": "" }, { "docid": "95632a5d9a2547576478ae7a09b6450f", "score": "0.56276745", "text": "public function actionCalendarview(){\n $items = array();\n $currentrole = Yii::app()->user->role;\n if($currentrole != \"admin\"){\n $userid = Yii::app()->user->id;\n $model=Events::model()->findAll(['condition'=>\"event_host = \".$userid]);\n }\n else{\n $model=Events::model()->findAll();\n }\n foreach ($model as $value) {\n if ($value->event_type == 'regular' || $value->event_type == \"specific\"){\n $items[]=array(\n 'id' => $value->event_id,\n 'title' =>$value->event_title,\n 'start' =>$value->event_start,\n //'end' =>$value->event_end,\n 'data' => ['user_id' => $value->user_id],\n 'allDay'=>true,\n 'color'=> ($value->color) ? \"#\".$value->color : '#10b8c7',\n );\n }else{\n $items[]=array(\n 'id' => $value->event_id,\n 'title' =>$value->event_title,\n 'start' =>$value->event_start,\n 'end' =>$value->event_end,\n 'data' => ['user_id' => $value->user_id],\n 'color'=> ($value->color) ? \"#\".$value->color : '#10b8c7',\n //'color'=>'#CC0000',\n //'allDay'=>true,\n //'url'=>'http://anyurl.com'\n );\n }\n }\n\n $sql = \"SELECT DISTINCT u.first_name,e.event_host from events e LEFT JOIN user_info u on e.event_host = u.user_id where 1=1\";\n $result = Yii::app()->db->createCommand($sql)->queryAll();\n\n $this->render('calendarview', array(\n 'events' => $items,\n 'hosts'=>$result,\n ));\n }", "title": "" }, { "docid": "6122bba87cc135a28bf327a3f360dbee", "score": "0.56166923", "text": "function showtDayList()\n{\n return array(\n 0 => \"MON\",\n 1 => \"TUE\",\n 2 => \"WED\",\n 3 => \"THU\",\n 4 => \"FRI\",\n 5 => \"SAT\",\n 6 => \"SUN\");\n}", "title": "" }, { "docid": "6d2823cdfb5426720b7731b7377611cc", "score": "0.56104815", "text": "public function calendar()\n {\n return view('admin.calendar');\n }", "title": "" }, { "docid": "297283865ff266cf7f1a7916a8456db9", "score": "0.5608511", "text": "public function index($month = 0, $year = 0)\n {\n $calendarFormatter = new CalendarFormatter;\n $calendar = $calendarFormatter->create($month, $year);\n $entries = $this->adminCalendarQuery->get($calendarFormatter->getMonth(), $calendarFormatter->getYear());\n $calendar['time'] = (new TimeEntries($entries))->handle();\n return view('dashboard.adminCalendar', compact('calendar'));\n }", "title": "" }, { "docid": "ece3194e8e7f66b396d8211c7cd4ebe6", "score": "0.5601259", "text": "private function showAppointmentsOfThisMonth()\n\t{\n\t\tif (!empty($_REQUEST['appointments_year']))\n\t\t{\n\t\t\t$year = $_REQUEST['appointments_year'];\n\t\t}\n\t\telseif (!empty($_SESSION['appointments_year']))\n\t\t{\n\t\t\t$year = $_SESSION['appointments_year'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$year = date('Y');\n\t\t}\n\t\t\n\t\tif (!empty($_REQUEST['appointments_month']))\n\t\t{\n\t\t\t$month = $_REQUEST['appointments_month'];\n\t\t}\n\t\telseif (!empty($_SESSION['appointments_month']))\n\t\t{\n\t\t\t$month = $_SESSION['appointments_month'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$month = date('m');\n\t\t}\n\t\t\n\t\t// Save the displayed month and year in the session so they will be restored if the user leaves the page\n\t\t$_SESSION['appointments_year'] = $year;\n\t\t$_SESSION['appointments_month'] = $month;\n\t\t\n\t\t$daysInMonth = cal_days_in_month(CAL_GREGORIAN, $month, $year);\n\t\t$days = array();\n\t\tfor($i = 1; $i <= $daysInMonth; $i++)\n\t\t{\n\t\t\t$day = array();\n\t\t\t$currentDate = strtotime($year.'-'.$month.'-'.$i);\n\t\t\t$day['date'] = date($GLOBALS['TL_CONFIG']['dateFormat'], $currentDate);\n\t\t\t$dayOfWeek = date('w', $currentDate) + 1;\n\t\t\t$week = date('W', $currentDate);\n\t\t\t$evenWeek = $week % 2 == 0 ? '0' : '1';\n\t\t\t$objAppointments = $this->Database->prepare(\"\n\t\t\t\tSELECT id, creator, subject, participants, startDate, color\n\t\t\t\tFROM tl_li_appointment\n\t\t\t\tWHERE\n\t\t\t\t(\n\t\t\t\t\tYEAR(FROM_UNIXTIME(startDate)) = ?\n\t\t\t\t\tAND MONTH(FROM_UNIXTIME(startDate)) = ?\n\t\t\t\t\tAND DAY(FROM_UNIXTIME(startDate)) = ?\n\t\t\t\t)\n\t\t\t\tOR\n\t\t\t\t(\n\t\t\t\t\trepetition = 1\n\t\t\t\t\tAND period = 'weekly'\n\t\t\t\t\tAND DAYOFWEEK(FROM_UNIXTIME(startdate)) = ?\n\t\t\t\t\tAND\n\t\t\t\t\t(\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\tWEEK(FROM_UNIXTIME(startdate)) < ?\n\t\t\t\t\t\t\tAND YEAR(FROM_UNIXTIME(startDate)) = ?\n\t\t\t\t\t\t)\n\t\t\t\t\t\tOR(YEAR(FROM_UNIXTIME(startDate)) < ?)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\tOR\n\t\t\t\t(\n\t\t\t\t\trepetition = 1\n\t\t\t\t\tAND period = 'biweekly'\n\t\t\t\t\tAND DAYOFWEEK(FROM_UNIXTIME(startdate)) = ?\n\t\t\t\t\tAND WEEK(FROM_UNIXTIME(startdate)) % 2 = ?\n\t\t\t\t\tAND\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\tWEEK(FROM_UNIXTIME(startdate)) < ?\n\t\t\t\t\t\t\t\tAND YEAR(FROM_UNIXTIME(startDate)) = ?\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\tOR(YEAR(FROM_UNIXTIME(startDate)) < ?)\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\tOR\n\t\t\t\t(\n\t\t\t\t\trepetition = 1\n\t\t\t\t\tAND period = 'monthly'\n\t\t\t\t\tAND DAYOFMONTH(FROM_UNIXTIME(startdate)) = ?\n\t\t\t\t\tAND\n\t\t\t\t\t(\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\tMONTH(FROM_UNIXTIME(startdate)) < ?\n\t\t\t\t\t\t\tAND YEAR(FROM_UNIXTIME(startDate)) = ?\n\t\t\t\t\t\t)\n\t\t\t\t\t\tOR(YEAR(FROM_UNIXTIME(startDate)) < ?)\n\t\t\t\t\t)\n\t\t\t\t)\")->execute($year, $month, $i, $dayOfWeek, $week, $year, $year, $dayOfWeek, $evenWeek, $week, $year, $year, $i, $month, $year, $year);\n\t\t\t$appointments = array();\n\t\t\twhile($objAppointments->next())\n\t\t\t{\n\t\t\t\t// User has to be creator, a participant or an admin\n\t\t\t\t// Skip check if user is admin\n\t\t\t\tif(!$this->User->isAdmin)\n\t\t\t\t{\n\t\t\t\t\t$userId = $this->User->id;\n\t\t\t\t\t// Skip appointment if appointment is private and user is not creator\n\t\t\t\t\tif($userId != $objAppointments->creator && $objAppointments->private)\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t$found = $userId == $objAppointments->creator;\n\t\t\t\t\t$participants = unserialize($objAppointments->participants);\n\t\t\t\t\tif(!$found && $participants)\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach($participants as $participant)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($participant == $userId) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$found = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(!$found)\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t\t$color = $objAppointments->color != '' ? $objAppointments->color : 'ddd';\n\t\t\t\t$appointments[] = array\n\t\t\t\t(\n\t\t\t\t\t'id' => $objAppointments->id,\n\t\t\t\t\t'subject' => $objAppointments->subject,\n\t\t\t\t\t'color' => $color\n\t\t\t\t);\n\t\t\t}\n\t\t\t$day['appointments'] = $appointments;\n\t\t\t$days[] = $day;\n\t\t}\n\t\t$this->Template->days = $days;\n\t\t\n\t\t$this->Template->year = $year;\n\t\t$this->Template->month = $month;\n\t\t\n\t\t$this->Template->prevYear = $month > 1 ? $year : $year - 1;\n\t\t$this->Template->prevMonth = $month > 1 ? $month - 1 : 12;\n\t\t\n\t\t$this->Template->nextYear = $month < 12 ? $year : $year + 1;\n\t\t$this->Template->nextMonth = $month < 12 ? $month + 1 : 1;\n\t}", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "3f53c7926d0e71567ab451cc9e8c5e4a", "score": "0.0", "text": "public function index()\n {\n if (request()->ajax()) {\n $data = Bed::select('*');\n \n return Datatables::of($data)\n ->addColumn('edit', function($row){\n \n $btn1 = '<a href=\"'.route('beds.edit', Crypt::EncryptString($row->id)).'\" class=\"edit btn btn-primary btn-sm\">Edit</a>';\n return $btn1;\n })\n ->addColumn('delete', function($row){\n \n $btn2 = '<form action=\"'.route('beds.destroy', Crypt::EncryptString($row->id)).'\" method=\"POST\">\n '.csrf_field().'\n '.method_field(\"DELETE\").'\n <button type=\"submit\" class=\"edit btn btn-primary btn-sm\">Delete\n </form>';\n return $btn2;\n })\n ->rawColumns(['edit', 'delete'])\n ->make(true);\n }\n\n $bed = Bed::all();\n\t\t$bedgroup = Bedgroup::all();\n\t\treturn View('beds.index', compact('bed','bedgroup'));\n }", "title": "" } ]
[ { "docid": "5d4e963a8d7919c8e89993bd060a7615", "score": "0.77891225", "text": "public function listAction()\n {\n $this->_messenger = $this->getHelper('MessengerPigeon');\n\n\t\tif ($this->_messenger->broadcast()) {\n\t\t\t// disables the back button for 1 hop\n\t\t\t$this->_namespace->noBackButton = true;\n\t\t\t$this->_namespace->setExpirationHops(1);\n\t\t}\n\n\t\t$this->view->assign(array(\n\t\t\t\t'partialName' => sprintf(\n\t\t\t\t\t'partials/%s-list.phtml', $this->_controller),\n\t\t\t\t'controller' => $this->_controller\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * @var Svs_Controller_Action_Helper_Paginator\n\t\t */\n\t\t$this->_helper->paginator(\n $this->_service->findAll($this->_findAllCriteria),\n $this->_entriesPerPage\n );\n\n\t\t$this->_viewRenderer->render($this->_viewFolder . '/list', null, true);\n }", "title": "" }, { "docid": "1632f74e581286fce11b428cee004b2f", "score": "0.72384894", "text": "public function actionlist()\n {\n $this->render('list',array(\n\n ));\n }", "title": "" }, { "docid": "ec9493ef0340397f64bb67b1aea5887e", "score": "0.71595275", "text": "public function listAction()\r\n {\r\n $modelType = $this->modelType();\r\n $this->view->items = $this->dbService->getObjects($modelType);\r\n $this->renderView($this->_request->getControllerName().'/list.php');\r\n }", "title": "" }, { "docid": "effdeaea4d3380c2ef0732f21651687d", "score": "0.71066624", "text": "public function index()\n {\n $resources = $this->resource->all();\n\n return view('laramanager::resources.index', compact('resources'));\n }", "title": "" }, { "docid": "07362c5ae7e016d5baf6bf3f76e0e81c", "score": "0.7078552", "text": "public function listAction() {\n $this->view->category = $this->category->full_List();\n $this->view->alert = $this->params->alert->toArray();\n $this->view->notfound = $this->params->label_not_found;\n }", "title": "" }, { "docid": "626774f0cb5b1be60be2c6a661bcc11a", "score": "0.70473844", "text": "public function listAction()\n {\n $this->view->headTitle('Vehicle Listing ', 'PREPEND');\n $this->view->vehicles = $this->vehicleService->listService();\n }", "title": "" }, { "docid": "6bcdfec0867dafc8b42448cdcf9d2175", "score": "0.70293266", "text": "public function index(){\n $this->show_list();\n }", "title": "" }, { "docid": "a0e66c2a11450ae99c175dd520d5d27a", "score": "0.7017443", "text": "public function index()\n {\n //list\n $list = $this->model->all();\n //return list view\n return view($this->getViewFolder().\".index\",[\n 'list' => $list,\n 'properties' => $this->model->getPropertiesShow(),\n 'resource' => $this->resource\n ]);\n }", "title": "" }, { "docid": "9bcef73798e00117c331333c00edef00", "score": "0.69753855", "text": "public function index()\n {\n return $this->sendResponse($this->resource::collection($this->model->all()));\n }", "title": "" }, { "docid": "fb56645c022f8b4ee60bad747c7c629b", "score": "0.6944075", "text": "public function actionList() {\n $rows = Bul::model()->findAll();\n $this->render('list', array('rows'=>$rows));\n }", "title": "" }, { "docid": "94eb33a8dc9192b76cda156b58de92e8", "score": "0.69046986", "text": "function index()\n\t\t{\t\n\t\t\t\t//Call show_list by default\n\t\t\t\t$this->show_list();\t\t\n\t\t\t\n\t\t}", "title": "" }, { "docid": "b64b879e653308029c5411df996e30a5", "score": "0.68639064", "text": "public function listAll(){\n $this->render('intervention.list');\n }", "title": "" }, { "docid": "c72ddbe4283fe8d28a198836a20283ca", "score": "0.6857927", "text": "public function listAction()\n {\n $this->_forward('index');\n }", "title": "" }, { "docid": "5959432636f2924b51d09876dd5202b6", "score": "0.68528235", "text": "protected function listAction()\n {\n $this->dispatch(EasyAdminEvents::PRE_LIST);\n\n $fields = $this->entity['list']['fields'];\n $paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->entity['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'), $this->entity['list']['dql_filter']);\n\n $this->dispatch(EasyAdminEvents::POST_LIST, ['paginator' => $paginator]);\n\n $parameters = [\n 'paginator' => $paginator,\n 'fields' => $fields,\n 'batch_form' => $this->createBatchForm($this->entity['name'])->createView(),\n 'delete_form_template' => $this->createDeleteForm($this->entity['name'], '__id__')->createView(),\n ];\n\n return $this->executeDynamicMethod('render<EntityName>Template', ['list', $this->entity['templates']['list'], $parameters]);\n }", "title": "" }, { "docid": "d30c6180099f7dd3b33628d897022777", "score": "0.6819029", "text": "public function show_list() {\n }", "title": "" }, { "docid": "8403a5ff042f4c677d7d939d9b2b750f", "score": "0.68169737", "text": "public function view_crud_list () {\n $this->getResponse()->setData('context', 'crud');\n if($this->getRequest()->getData('action') == 'crud_stats') {\n $this->getCrudinstance()->stats();\n } else {\n $this->getCrudinstance()->listview();\n }\n return;\n }", "title": "" }, { "docid": "01bc93b08e6ad107f9316b34bcad9511", "score": "0.68048567", "text": "public function index()\n\t{\n $resources = Resource::all();\n return View::make('resources.index', compact('resources'));\n\t}", "title": "" }, { "docid": "3389c0d5e9637b099b7cd7e20021ea55", "score": "0.67939425", "text": "public function listsAction()\n {\n // Checks authorization of users\n if (!$this->isGranted('ROLE_DATA_REPOSITORY_MANAGER')) {\n return $this->render('template/AdminOnly.html.twig');\n }\n\n $GLOBALS['pelagos']['title'] = 'Lists Available';\n return $this->render('List/Lists.html.twig');\n }", "title": "" }, { "docid": "e8b936bcbc3c7cd4f66fc62525379e0b", "score": "0.67760646", "text": "public function mylist() {\n $this->render();\n }", "title": "" }, { "docid": "c545ab38f5dbdba7091a7d9ce680b802", "score": "0.67675877", "text": "public function index()\n\t{\n\t\t$subResourceDetails = $this->subResourceDetailRepository->paginate(10);\n\n\t\treturn view('subResourceDetails.index')\n\t\t\t->with('subResourceDetails', $subResourceDetails);\n\t}", "title": "" }, { "docid": "6d63bb11ea8b0a8583e9363e358ff9b7", "score": "0.6752695", "text": "public function index()\n {\n\n $total = isset($this->parameters['total']) ? $this->parameters['total'] : config('awesovel')['total'];\n\n $this->data['collection'] = $this->api('HEAD', 'paginate', $total);\n\n\n return $this->view($this->operation->layout, ['items' => $this->model->getItems()]);\n }", "title": "" }, { "docid": "828fa63f223e081c2e33ac1cee981572", "score": "0.6749301", "text": "public function index()\n {\n $entity = Entity::all();\n return EntityResource::collection($entity);\n }", "title": "" }, { "docid": "e7e46511a4b7697f60b99262a9448541", "score": "0.674787", "text": "public function index(){\n\n $entries = $this->paginate();\n\n $this->set(\"entries\", $entries);\n\n }", "title": "" }, { "docid": "8f58024e3cccac78c2edf40dcdf1d9b5", "score": "0.6738217", "text": "public function index()\n {\n return VideomakerResource::collection(Videomaker::orderBy('sort', 'asc')->get());\n }", "title": "" }, { "docid": "720fa44f82097ad862a1223667f1a4ae", "score": "0.67326105", "text": "public function list()\n {\n $this->vars = array('items' => ['Patrick', 'Claude', 'Pierre', 'André']);\n $this->render('list.php');\n }", "title": "" }, { "docid": "82ffea34883f2d4ec003859ff27130f4", "score": "0.6717062", "text": "public function index()\n {\n // Get results\n $results = Result::orderBy('created_at', 'desc')->get();\n\n // Return collection of results as a resource\n return ResultResource::collection($results);\n }", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "174e07a1688ac732f0e66ae6d8398d84", "score": "0.6711562", "text": "public function index()\n {\n // list\n }", "title": "" }, { "docid": "1ca180cd47a9c5ba1d48b4b6c9917a8e", "score": "0.6701197", "text": "public function index()\n {\n $resources = Ressource::orderby('created_at','DESC')->get();;\n return RessourceR::collection($resources);\n }", "title": "" }, { "docid": "443c1ed051c412c645eecf92a9792f61", "score": "0.6685732", "text": "public function listAction()\n {\n $request=$this->getRequest();\n $requestUtil=$this->getRequestUtil();\n \n $pageRequestData=$requestUtil->getPageRequestDataFrom($request);\n $dataPage=$this->getSystemUserManager()->findPageFrom($pageRequestData);\n \n return $requestUtil->defaultListJsonResponse($dataPage->getData(), $dataPage->getTotalRecords());\n }", "title": "" }, { "docid": "3e2213e2e64e6d315c5f7f2b9390d5af", "score": "0.66802585", "text": "public function index()\n {\n return $this->showAll();\n }", "title": "" }, { "docid": "d387587609cbbdf03cfc0669056e5bc7", "score": "0.66796803", "text": "public function action_list()\n\t{\n\t\t$client = Model::factory('Client');\n\t\t$rs = $client->select()\n\t\t\t//->select('id', 'name', 'email', 'phone', 'is_active')\n\t\t\t->order_by('name')\n\t\t\t->execute();\n\t\t$client_data = $rs->as_array();\n\t\t\n\t\t// Remap client data for JS lookup\n\t\t$client_details = array();\n\t\tforeach($client_data as $item) {\n\t\t\t$client_details[$item['id']] = $item;\n\t\t}\n\t\t\n\t\t$view = View::factory('client/list');\n\t\t$view->set('client_data', $client_data);\n\t\t$view->set('client_details', $client_details);\n\t\t$this->response->body($view);\n\t}", "title": "" }, { "docid": "dd7ea5bccadd522adc846631298726c5", "score": "0.6678547", "text": "public function index()\n {\n return RecordResource::collection(\n auth()->user()->records()->paginate(config('general.pagination.perPage'))\n );\n }", "title": "" }, { "docid": "bf724845d7b3ef1d4914762d244fb1ab", "score": "0.6675193", "text": "public function listAction()\n {\n $limit = isset($_GET['limit']) ? (int)$_GET['limit'] : PostDB::LIMIT;\n $offset = isset($_GET['offset']) ? (int)$_GET['offset'] : 0;\n\n return $this->render([\n 'posts' => $this->model->fetchList($limit, $offset),\n 'limit' => $limit,\n 'offset' => $offset,\n 'totalPosts' => $this->model->count(),\n 'alert' => $this->getAlerts(['post_created', 'post_deleted', 'post_updated'])\n ]);\n }", "title": "" }, { "docid": "a8301ed92dc9170afd4b6448fca5d0f3", "score": "0.6674207", "text": "public function index()\n {\n $products = Product::paginate(100);\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "1fd7963662b3e9d8e35a3c5a837bbc57", "score": "0.6667426", "text": "public function listAction()\n {\n $configName = filter_var($_GET['name'], FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);\n\n $trieurConfig = $this->getConfig($configName);\n\n $this->view->name = $configName;\n $this->view->title = isset($trieurConfig['title']) ? $trieurConfig['title'] : '';\n\n $this->view->breadCrumbs[] = [\n 'title' => $this->view->title,\n 'url' => FrontController::getCurrentUrl(),\n ];\n }", "title": "" }, { "docid": "0fe4e291e7634c2aeb63063cd376272f", "score": "0.6666447", "text": "public function index()\n {\n // $this->authorize('all', User::class);\n \n $allResources = Resource::all();\n\n $view_elements = [];\n \n $view_elements['allResources'] = $allResources; \n $view_elements['page_title'] = 'Resources'; \n $view_elements['component'] = 'resources'; \n $view_elements['menu'] = 'resources'; \n $view_elements['breadcrumbs']['All Resources'] = array(\"link\"=>'/resources',\"active\"=>'1');\n \n \n $view = viewName('resources.all');\n return view($view, $view_elements);\n }", "title": "" }, { "docid": "333a397f407728909d14c6eb4e496493", "score": "0.664738", "text": "public function listingAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SettingContentBundle:News')->findBy(array(),array('name' => 'asc'));\n\n return $this->render('SettingContentBundle:News:index.html.twig', array(\n 'pagination' => $entities,\n ));\n }", "title": "" }, { "docid": "905f7fbfbb2fff73099979bdf45d3db6", "score": "0.66408366", "text": "public function list() {\n //kalau HRD pusat bisa milih dari cabang mana saja\n //kalau HRD cabang cuma list document masuk yg ada di cabang doang.\n }", "title": "" }, { "docid": "81a9d2c3f66799032c4d7ddc8ee3e2ef", "score": "0.6629056", "text": "public function list() {\n include '../templates/driver/list.html.php';\n }", "title": "" }, { "docid": "e4852525485e4ed47dcb985523ad108d", "score": "0.6627158", "text": "public function listAction(){\n\t\t$view = Zend_Registry::get('view');\n\t\t$table = new Mae();\n\t\t$table->getCollection();\n\t\t$this->_response->setBody($view->render('default.phtml'));\n\t}", "title": "" }, { "docid": "728b150b646c20e91cdcb0b476ee8df4", "score": "0.6626183", "text": "public function listAction()\n {\n if (false === $this->admin->isGranted('LIST')) {\n throw new AccessDeniedException();\n }\n\n $datagrid = $this->admin->getDatagrid();\n $formView = $datagrid->getForm()->createView();\n\n // set the theme for the current Admin Form\n $this->get('twig')->getExtension('form')->renderer->setTheme($formView, $this->admin->getFilterTheme());\n\n if(isset($_GET['activityId'])){\n $activityId = $_GET['activityId'];\n $em = $this->getDoctrine()->getManager();\n $activity = $em->getRepository('ZesharCRMCoreBundle:Activity')->findOneBy(array('id' => $activityId));\n $activityTitle = $activity->getTitle();\n }\n\n return $this->render($this->admin->getTemplate('list'), array(\n 'action' => 'list',\n 'form' => $formView,\n 'datagrid' => $datagrid,\n 'csrf_token' => $this->getCsrfToken('sonata.batch'),\n 'pageTitle' => $activityTitle ? $activityTitle : '',\n ));\n }", "title": "" }, { "docid": "03690e7a09f22de0d26d268d13653dd8", "score": "0.6626126", "text": "function index(){\n\t\t$this->listar();\n\t}", "title": "" }, { "docid": "0cfc4663300d21f5b0e90285019bc71a", "score": "0.66242784", "text": "public function indexAction() {\n $locationFieldEnable = Engine_Api::_()->getApi('settings', 'core')->getSetting('list.locationfield', 1);\n if ( empty($locationFieldEnable) ) {\n return $this->setNoRender();\n }\n\n $items_count = $this->_getParam('itemCount', 5);\n\n //GET LIST LIST FOR MOST RATED\n $this->view->listLocation = Engine_Api::_()->getDbTable('listings', 'list')->getPopularLocation($items_count);\n\n //DONT RENDER IF LIST COUNT IS ZERO\n if (!(count($this->view->listLocation) > 0)) {\n return $this->setNoRender();\n }\n\n $this->view->searchLocation = null;\n if (isset($_GET['list_location']) && !empty($_GET['list_location'])) {\n $this->view->searchLocation = $_GET['list_location'];\n\t\t}\n }", "title": "" }, { "docid": "90baaa24c8a589876a1c98f625e68458", "score": "0.6623648", "text": "public function index()\n {\n $categories = BusinessCategory::all();\n $listings = BusinessListingResource::collection(BusinessListing::all());\n return Inertia::render('Admin/BusinessListing', ['categories'=> $categories, 'listings'=>$listings]);\n }", "title": "" }, { "docid": "75a5bb13804a5d6235a9088089fdf3dc", "score": "0.6607636", "text": "public static function list()\n {\n if (isset($_POST[\"search\"])) {\n foreach ($_POST[\"search\"] as $key => $value) {\n $queryOptions[\"$key LIKE\"] = \"%$value%\";\n }\n };\n static::render(\"list\", [\n 'entities' => static::getDao()::findAll()\n ]);\n }", "title": "" }, { "docid": "a8073549d697653019630bfd5b2ce4f4", "score": "0.6607086", "text": "public function listAction() {\n\t\t$this->view->liste = Category::getInstance()->fetch();\n\t}", "title": "" }, { "docid": "ca1737541b9936d406a94bdf9aa8a617", "score": "0.65998626", "text": "public function index()\n {\n $cat = Category::paginate(10);\n\t\treturn CategoryResources::collection($cat);\n }", "title": "" }, { "docid": "9053e22130cf25ad82ec7601e536a4b4", "score": "0.65884763", "text": "public function index()\n\t{\n\t\t$subResourceDetailAudios = $this->subResourceDetailAudioRepository->paginate(10);\n\n\t\treturn view('subResourceDetailAudios.index')\n\t\t\t->with('subResourceDetailAudios', $subResourceDetailAudios);\n\t}", "title": "" }, { "docid": "c7230f7fbeb33b3a78b09ad92bcf4b13", "score": "0.6586963", "text": "public function index()\n {\n $article=Booklover::paginate(10);\n //return collection of articles as resource\n return BookloverResource::collection($article);\n }", "title": "" }, { "docid": "ad00df27d12646f83d77fce9a7bb953d", "score": "0.6586538", "text": "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n \t$em = $this->getDoctrine()->getManager();\n \t$oRepRobot = $em->getRepository('BoAdminBundle:Robot');\n\t\t$nb_tc = $oRepRobot->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$robots = $em->getRepository('BoAdminBundle:Robot')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n \treturn $this->render('robot/index.html.twig', array(\n \t\t'robots' => $robots,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"tools\",\n\t\t\t'sm'=>\"robot\",\n \t));\n }", "title": "" }, { "docid": "bc61607b7973a96af644a943e09c1e49", "score": "0.65858775", "text": "public function listAction(): void\n {\n $demand = $this->getRequestArgument('demand') ?: $this->getDemand(true);\n\n // Get posts depending on demand object\n $posts = $this->getRequestArgument('posts') ?: RepositoryService::getPostRepository()->findByDemand($demand);\n\n // Set list id\n if ($demand->getListId() === 0) {\n $demand->setListId($this->contentData['uid']);\n }\n\n // Create pagination\n $itemsPerPage = $this->settings['items_per_stages'] ?: $this->settings['post']['list']['itemsPerStages'] ?: '6';\n $pagination = GeneralUtility::makeInstance(Pagination::class, $posts, $demand->getStage(), $itemsPerPage, $this->settings['max_stages']);\n\n // Pass variables to the fluid template\n $this->view->assignMultiple([\n 'pagination' => $pagination,\n 'demand' => $demand,\n 'posts' => $posts\n ]);\n }", "title": "" }, { "docid": "54716cd3af1f040766e6972b2709f836", "score": "0.6585739", "text": "public function index()\n {\n $lists = $this->shareRepository->lists();\n\n return $this->respond($lists , new ShareTransformer);\n }", "title": "" }, { "docid": "6a06fa8c4288da120ae96f4207dfe6a2", "score": "0.65765756", "text": "public function index()\n {\n $dummies=dummy::paginate(10);\n\n return dummyResource::collection($dummies);\n }", "title": "" }, { "docid": "1d717f725bf8e320ff8af8985fc9e146", "score": "0.6575916", "text": "public function all(){\n $products = $this->product->getProducts();\n\n $data['products'] = $products;\n\n $this->render('list', $data);\n }", "title": "" }, { "docid": "ac951f46baeea8952ab1bf72102e758d", "score": "0.6571351", "text": "public function indexAction($pageNumber)\n {\n\t$connectedUser = $this->getUser();\n $em = $this->getDoctrine()->getManager();\n $userContext = new UserContext($em, $connectedUser); // contexte utilisateur\n\n $resourceRepository = $em->getRepository('SDCoreBundle:Resource');\n\n $numberRecords = $resourceRepository->getResourcesCount($userContext->getCurrentFile());\n\n $listContext = new ListContext($em, $connectedUser, 'core', 'resource', $pageNumber, $numberRecords);\n\n $listResources = $resourceRepository->getDisplayedResources($userContext->getCurrentFile(), $listContext->getFirstRecordIndex(), $listContext->getMaxRecords());\n \n return $this->render('SDCoreBundle:Resource:index.html.twig', array(\n 'userContext' => $userContext,\n 'listContext' => $listContext,\n\t\t'listResources' => $listResources));\n }", "title": "" }, { "docid": "b7e9ea6b80279bc7feede5632a90202e", "score": "0.65709573", "text": "public function resourcesList(){\r\n\t\t$type = $this->view->getVariable(\"currentusertype\");\r\n\t\tif ($type != \"administrador\") {\r\n\t\t\tthrow new Exception(i18n(\"You must be an administrator to access this feature.\"));\r\n\t\t}\r\n\t\t// Guarda todos los recursos de la base de datos en una variable.\r\n\t\t$resources = $this->resourceMapper->findAll();\r\n\t\t$this->view->setVariable(\"resources\", $resources);\r\n\t\t// Se elige la plantilla y renderiza la vista.\r\n\t\t$this->view->setLayout(\"default\");\r\n\t\t$this->view->render(\"resources\", \"resourcesList\");\r\n\t}", "title": "" }, { "docid": "bccc75a4abe2c6c3bd9fc15d85ca4be6", "score": "0.657009", "text": "public function listAction ()\n {\n $dbAlbums = $this->_albumsMapper->fetchAllDesc();\n $albums = array();\n foreach ($dbAlbums as $dbAlbum) {\n /* @var $dbAlbum Application_Model_Album */\n $album = array();\n $album['id'] = $dbAlbum->getId();\n $album['name'] = $dbAlbum->getName();\n $album['folder'] = $dbAlbum->getFolder();\n $path = self::GALLERY_PATH . $album['folder'];\n $counter = 0;\n if (file_exists($path)) {\n foreach (scandir($path) as $entry) {\n $entrypath = $path . '/' . $entry;\n if (! is_dir($entrypath)) {\n $finfo = new finfo();\n $fileinfo = $finfo->file($entrypath, FILEINFO_MIME_TYPE);\n if (in_array($fileinfo, $this->image_types)) {\n $counter ++;\n }\n }\n }\n }\n $album['pictures'] = $counter;\n $albums[] = $album;\n }\n $this->view->albums = $albums;\n return;\n }", "title": "" }, { "docid": "d3246fb2ff9e0523d1570475de5151d9", "score": "0.65691483", "text": "public function listing()\n {\n\n // check the acl permissions\n if( !$this->acl->access( array( 'daidalos/projects:access' ) ) )\n {\n $this->errorPage( \"Permission denied\", Response::FORBIDDEN );\n return false;\n }\n\n // check the access type\n if( !$view = $response->loadView( 'table_daidalos_projects', 'DaidalosProjects' ) )\n return false;\n\n $view->display( $this->getRequest(), $this->getFlags( $this->getRequest() ) );\n\n\n }", "title": "" }, { "docid": "81af47766ea10675d82eb09c7177c488", "score": "0.65669", "text": "public function lists()\n\t{\n\t\treturn View::make(\"loan.list\");\n\t}", "title": "" }, { "docid": "80fe37cd073c0845deb3f2f3dc56f953", "score": "0.6564314", "text": "public function _list() {\n return $this->run('list', array());\n }", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.65643096", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "f32df56cd8eb057e778dd688838ae6e1", "score": "0.6558956", "text": "public function index() {\n $fds = FactoryDevice::paginate(50);\n return FactoryDeviceResource::collection($fds);\n }", "title": "" }, { "docid": "2d830a7f9271146c892f5525ff06cba8", "score": "0.6546971", "text": "public function index()\n {\n save_resource_url();\n //$items = VideoRecordPlaylist::with(['category', 'photos'])->get();\n $items = VideoRecordPlaylist::all();\n\n return $this->view('video_records.playlists.index', compact('items'));\n }", "title": "" }, { "docid": "592ef21e8cf01343d8f7bf69f6571783", "score": "0.65467274", "text": "public function listAction() {\n\ttry {\n\t\t$page = new Knowledgeroot_Page($this->_getParam('id'));\n\t} catch(Exception $e) {\n\t\t// redirect to homepage on error\n\t\t$this->_redirect('');\n\t}\n\n\t$contents = Knowledgeroot_Content::getContents($page);\n\t$files = array();\n\n\t// get files for each content\n\tforeach($contents as $value) {\n\t $files[$value->getId()] = Knowledgeroot_File::getFiles(new Knowledgeroot_Content($value->getId()));\n\t}\n\n\t// set page for view\n\t$this->view->id = $page->getId();\n\t$this->view->title = $page->getName();\n\t$this->view->subtitle = $page->getSubtitle();\n\t$this->view->description = $page->getDescription();\n\t$this->view->contentcollapse = $page->getContentCollapse();\n\t$this->view->showpagedescription = $page->getShowContentDescription();\n\t$this->view->showtableofcontent = $page->getShowTableOfContent();\n\n\t// set contents for view\n\t$this->view->contents = $contents;\n\n\t// set files for view\n\t$this->view->files = $files;\n }", "title": "" }, { "docid": "ec0437b332d8ab59b1dc12514564cf24", "score": "0.65349644", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $collections = $em->getRepository(Collection::class)->findAll();\n\n return $this->render('CollectionBundle::index.html.twig', array(\n 'collections' => $collections,\n ));\n }", "title": "" }, { "docid": "e28f7ac3556efbf46ef07a458594e0f4", "score": "0.6534658", "text": "public function listView()\r\n {\r\n $todosResults = $this->AdminToDoModel->getTodos();\r\n $todos = $todosResults['records'];\r\n echo json_encode(array(\r\n 'pagination' => $todosResults['pagination'],\r\n 'total_pages' => $todosResults['total_pages'],\r\n 'list' => $this->load->view('admin/todos/item', compact('todos'), TRUE),\r\n ));\r\n }", "title": "" }, { "docid": "d2551d513444995f440c040295b5f79a", "score": "0.6531914", "text": "public function listAction() {\n\t\t$newsRecords = $this->newsRepository->findList();\n\n\t\t$this->view->assign('news', $newsRecords);\n\t}", "title": "" }, { "docid": "7ff71fea74a014e23f3059d0628ca0c1", "score": "0.652987", "text": "public function index()\n {\n return view('resources/index', [\n 'categories' => ResourceCategory::all()\n ]);\n }", "title": "" }, { "docid": "e6a4c98ba5c74f530846a0e2799e83cd", "score": "0.65274894", "text": "public function indexAction() {\n\t\t$this->_forward('list');\n\t}", "title": "" }, { "docid": "13c10da740abbcd8b1714424cd80b7f0", "score": "0.6523997", "text": "public function index()\n\t{\n\t\t$tools = Tool::paginate(12);\n\n\t\treturn view( self::$prefixView . 'lists', compact('tools'));\n\t}", "title": "" }, { "docid": "8658a767a07d5f3d222e30b3461f8908", "score": "0.6519245", "text": "public function index() {\n\n\t\tself::init();\n\n\t\t$result = $this->_dbTable->paginatorCat(\n\t\t\t$this->_paginatorParams,\t\t\t\n\t\t\t$offset = $this->_list, \n\t\t\t$limit = 50,\n\t\t\t$this->_lang\n\t\t);\n\n\t\t$this->registry['layout']->sets(array(\n\t\t\t'titleMenu' => $this->translate->translate('Pages'),\n\t\t\t'content' => $this->_content.'index.phtml',\n\t\t\t'records' => $result['records'],\n\t\t\t'paginator' => $result['paginator'],\n\t\t));\t\n\t\t$this->registry['layout']->view();\t\n\t}", "title": "" }, { "docid": "b4ddd46c2382d5ddf2a44ea188de6a3b", "score": "0.6519022", "text": "public function actionIndex()\n {\n $dataProvider = (new Route())->search();\n return $this->render('index', ['dataProvider' => $dataProvider]);\n }", "title": "" }, { "docid": "116c403ea907dd01837aaf78536361f2", "score": "0.6515897", "text": "public function actionListing()\n {\n require_once Yii::app()->basePath . '/vendor/facebook-php-sdk/src/facebook.php';\n $fb = new Facebook(array(\n 'appId' => '894567207287021',\n 'secret' => 'cf43d6c081acaed16c908cac9d49bc07',\n ));\n $model = new FacebookModel();\n $customer = $model->setCustomer($fb);\n $getLikes = $model->getLikes($fb);\n $this->render('list',array('data'=>array('customer' => $customer, 'getLikes' => $getLikes)));\n }", "title": "" }, { "docid": "e3cdc4c3d9ae3aaa6a0cd5478456a58d", "score": "0.65145594", "text": "public function index()\n {\n return UnityResource::collection(Unity::paginate());\n }", "title": "" }, { "docid": "bc53de285b94ddd2a447a5820f5b4765", "score": "0.65121585", "text": "public function listing($route) {\n\t\t$this->render_view('listing', null);\n\t}", "title": "" }, { "docid": "9e06846e2f6d2e1269338eadf8e0b894", "score": "0.6510727", "text": "public function index()\n {\n $categories = Category::paginate(10);\n return CategoryResource::collection($categories);\n }", "title": "" }, { "docid": "d3708a38680b59bc16eca3c31b86b78d", "score": "0.6510369", "text": "public function index()\n {\n $abonnes = AbonneModel::all();\n $count = AbonneModel::count();\n //$this->debug($abonnes);\n $this->render('app.abonne.listing',array(\n // faire passer les abonnes à la vue dans view/app/abonne/listing.php\n 'abonnes' => $abonnes,\n 'count' => $count\n ));\n }", "title": "" }, { "docid": "7a4839b9dce0e81aa7d22a30b5050ba1", "score": "0.65067625", "text": "public function index()\n {\n return View::make('pages.listing')->with([\n 'listings' => Listing::all()\n ]);\n }", "title": "" }, { "docid": "9574404dd05ce3c2611ce508bd896204", "score": "0.6504046", "text": "public function indexAction() {\n $this->_forward('list');\n }", "title": "" }, { "docid": "b3002ffdca77085e05c201d4c8cb1e99", "score": "0.6501504", "text": "public function showList()\n\t{\n\t\t$query_params = $this->getQueryParams();\n\n\t\t// Get all biblio entities that match our query string params\n\t\t$query = new EntityFieldQuery();\n\t\t$query->entityCondition('entity_type', 'biblio');\n\t\tforeach ($query_params as $field => $value) {\n\t\t\t$query->fieldCondition($field, 'value', $value, 'like');\n\t\t}\n\n\t\t$result = reset($query->execute());\n\n\t\t// Create an array of IDs from the result\n\t\tforeach ($result as $entity_data) {\n\t\t\t$this->data['document_ids'][] = $entity_data->bid;\n\t\t}\n\n\t\t$this->outputJSON();\n\t}", "title": "" }, { "docid": "8f4a27465d71a62a589ec5adaeb0986b", "score": "0.64991456", "text": "public function index()\n {\n $todos = Todo::orderBy('created_at', 'DESC')->get();\n return TodoResource::collection($todos);\n }", "title": "" }, { "docid": "dc0149898375c89e944c9a4e88c4c3a8", "score": "0.6499016", "text": "public function index()\n {\n $table = item::all();\n return view('list')->with('table', $table);\n }", "title": "" }, { "docid": "3bcd0d0bc609b30833a686c0ca043c6e", "score": "0.6498308", "text": "public function index()\n {\n $links = Link::all();\n\n return LinkResource::collection($links);\n }", "title": "" }, { "docid": "046c051adc81c4edc84279daf9165d00", "score": "0.64961153", "text": "public function index() {\n\t\t$this->paginate = array(\n\t\t\t\t'limit' => 6,\n\t\t\t\t'order' => 'Listing.last_mod DESC'\n\t\t);\n\t\t//debug($this->params);\n\t\t$cond = $this->searchCriteria($this->params['data'], $this->params['pass'], $this->params['named']);\n\t\t$lt = $this->paginate('Listing', $cond);\n\t\t$this->getAddress($lt);\n\t\t$this->getListingPrice($lt);\n\t\t$this->set('listings', $lt);\n\t\t$this->set('GetMapListingData', $this->GetMapListingData($lt));\n\t\t$this->set('search_title', $this->searchTitle($this->params['pass']));\n\t\t$this->set('heading', $this->pageHeading($this->params['pass']));\n\t\t$this->set('bodyClass', 'listings');\n\t\t$this->render('listings');\n\t}", "title": "" }, { "docid": "b3705b62ffca7af4878e295922e07f4b", "score": "0.6494691", "text": "public function index()\n {\n $categories = Category::all();\n\n\t\treturn CategoryResource::collection($categories);\n }", "title": "" }, { "docid": "2acb8764426117ce1e24a4dffeca03b3", "score": "0.6488265", "text": "public function getList() {\n $pages = PageModel::getList();\n\n $this->renderView( $pages );\n }", "title": "" }, { "docid": "19401e81d482911677b86104e4316af5", "score": "0.6483004", "text": "public function index()\n {\n return ClientResource::collection(Client::paginate(5));\n }", "title": "" }, { "docid": "5053d441932d8864d4bf822f4564836c", "score": "0.64802396", "text": "public function listAction()\n {\n $this->service->setPaginatorOptions($this->getAppSetting('paginator'));\n $page = (int) $this->param($this->view->translate('page'), 1);\n $this->service->openConnection();\n $users =$this->service->retrieveAllClientUsers($page);\n $this->view->users = $users;\n $this->view->paginator = $this->service->getPaginator($page);\n }", "title": "" }, { "docid": "984e2e8264667b3d8e5fbfff39850e73", "score": "0.64776826", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $books = $em->getRepository('AppBundle:Book')->findAllOrderedByName();\n\n return $this->render('dashboard/listBook.html.twig', ['books' => $books]);\n }", "title": "" }, { "docid": "c8bce961d8c00f94db1cc45bb581d8eb", "score": "0.6476608", "text": "public function index()\n {\n $products = Product::all();\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "5fc2cbaa57895f367e3994638939768f", "score": "0.6475312", "text": "public function fetchlistAction(){}", "title": "" }, { "docid": "221cee52eb0850b671832164d9811aa5", "score": "0.64749444", "text": "public function listAction() {\n }", "title": "" }, { "docid": "f19185733d416e8afe327cca78be3112", "score": "0.64742154", "text": "public function index()\n {\n // returns the latest inventory info and constricts the page to entries\n return Inventory::latest()->paginate(10);\n }", "title": "" }, { "docid": "548f4f0a081099012cd8664830d71f5f", "score": "0.6473625", "text": "public function index()\n {\n $books = Book::paginate(1);\n return view('admin.books.book-lists', compact('books'));\n }", "title": "" }, { "docid": "ed4ac6060cb66e23543b207ea1f66b10", "score": "0.6470538", "text": "public function index()\n {\n $shops = Shop::paginate(20);\n return ShopResource::collection($shops);\n }", "title": "" }, { "docid": "207685ef95ff8434191b610cea3c73d5", "score": "0.6470286", "text": "public function index()\n {\n $items = $this->itemService->all();\n\n return JsonResource::collection($items);\n }", "title": "" }, { "docid": "4e5084aa458aae2dccdd7bdb7ebbdaf1", "score": "0.6469868", "text": "public function indexAction() {\n $this->view->headTitle('Lista zarejestrowanych obiektów');\n $request = $this->getRequest();\n \n $qb = $this->_helper->getEm()->createQueryBuilder();\n $qb->select('c')\n ->from('\\Trendmed\\Entity\\Clinic', 'c');\n $qb->setMaxResults(50);\n $qb->setFirstResult(0);\n \n $query = $qb->getQuery();\n \n \n $paginator = new Paginator($query, $fetchJoin = true);\n $this->view->paginator = $paginator;\n }", "title": "" }, { "docid": "f8cb4b5b72a3f7046a46ff5e92d156e6", "score": "0.6469414", "text": "public function allAction()\n {\n /* Getting total questions number */\n $totalQuestions = Question::count();\n\n /* Getting current user's data */\n $user = Auth::getUser();\n\n /* Adding pagination */\n $paginator = new Paginator($_GET['page'] ?? 1, $this->config->per_page_user, $totalQuestions, '/questions/all?page=(:num)');\n\n /* Getting questions list */\n $questions = Question::get([\n 'offset' => $paginator->offset, \n 'limit' => $paginator->limit,\n 'order_by' => $this->sortTypeColumn,\n 'order_type' => 'DESC',\n 'current_user' => $user\n ]);\n\n /* Load view template */\n View::renderTemplate('Questions/stream.twig',[\n 'this_page' => [\n 'title' => 'All Questions',\n 'menu' => 'questions_all',\n 'url' => 'questions/all',\n 'order_name' => $this->sortTypeName,\n ],\n 'questions' => $questions,\n 'paginator' => $paginator,\n 'total_questions' => $totalQuestions,\n ]);\n }", "title": "" }, { "docid": "f9d8426baa3f2a5993b5c1f018099562", "score": "0.64684117", "text": "public function resources_index()\n\t{\n\t\t$init = new admin_model();\n\t\t$resources = $init->getAllResources()->getResultArray();\n\n\t\t$menus = $init->getAllMenu()->getResultArray();\n\t\t$this->data = ['menus' => $menus, 'resources' => $resources];\n\t\treturn view('admin' . DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR . 'index', $this->data);\n\t}", "title": "" } ]
c3dea276f2eada283cb7af30f4ce310c
Returns the directory where logs should be stored
[ { "docid": "5fdcc74797689bf6b48c47c82f8bb06b", "score": "0.78873456", "text": "function get_log_dir() {\n\treturn \"/u1/exambank/\";\n}", "title": "" } ]
[ { "docid": "e02adce8785c72b9ff4b2732c59a19c3", "score": "0.8879257", "text": "protected function getLogDirectory() {\n return Config::getInstance()->read('logging.file.dir');\n }", "title": "" }, { "docid": "458cf20bb2f7c7158cf998a6336c53e9", "score": "0.87999886", "text": "public function getLogDir()\n {\n return $this->rootDir.'/logs';\n }", "title": "" }, { "docid": "31de19861fe8cbbf1e218999e7da278b", "score": "0.8706711", "text": "public function getLogDirectory()\n {\n\n return $this->getBaseDirectory() . 'logs' . DIRECTORY_SEPARATOR;\n\n }", "title": "" }, { "docid": "b4d9e3f1fa52e0bd8041361a34bac6ea", "score": "0.8702708", "text": "public function getLogDir()\n {\n return $this->realpath(DirectoryKeys::LOG);\n }", "title": "" }, { "docid": "8bc1a43d1065ec334be26b4e1f6ad3dd", "score": "0.86724216", "text": "public function getLogDir()\n {\n return $this->getRootDir() . '/var/log';\n }", "title": "" }, { "docid": "a9c355c8f364fe76c7fc2b8f35ad47c0", "score": "0.85812193", "text": "public function getLogDir()\n {\n return $this->config[Config::LOG_DIR];\n }", "title": "" }, { "docid": "de1fc7b34b2eaba33b5415e3d0d59687", "score": "0.8449839", "text": "public static function LOG_DIR()\n\t{\n\t\tif (!defined('APP_BASE_DIR')) {\n\t\t\tthrow new ConfigurationUndefinedException(\"APP_BASE_DIR not defined in app settings.\");\n\t\t}\n\t\treturn (APP_BASE_DIR.\"logs\".DIRECTORY_SEPARATOR);\n\t}", "title": "" }, { "docid": "50218f245df28bd6b1487782118732d1", "score": "0.83859605", "text": "public function getLogDir()\n {\n // http://www.whitewashing.de/2013/08/19/speedup_symfony2_on_vagrant_boxes.html\n // if (in_array($this->environment, array('dev', 'test'))) {\n // return '/dev/shm/cache/aegon-pdf-service/frontend/logs';\n // }\n\n return parent::getLogDir();\n }", "title": "" }, { "docid": "2b083d9ff16a31a8a4e430f64f33318f", "score": "0.83648396", "text": "function log_dir()\n\t{\n\t\treturn storage_dir().'logs/';\n\t}", "title": "" }, { "docid": "7e2a311cba9eccb5a16ca5493a204495", "score": "0.8348344", "text": "public function getLogDir(): string\n {\n return dirname(__DIR__).'/var/logs';\n }", "title": "" }, { "docid": "2fd85c34695f4d8461a8b25eb88703c1", "score": "0.8213212", "text": "static function getLogDir()\r\n\t{\r\n\t\tstatic $dir = null;\r\n\t\t\t\t\r\n\t\tif (is_null($dir)) \r\n\t\t\t$dir = SymfonyCnf::get('symfony.dir.logs');\r\n\t\t\t\t\r\n\t\treturn $dir;\r\n\t}", "title": "" }, { "docid": "13400d3d6832d7a93e0de6481240ef86", "score": "0.8197764", "text": "protected function _getLogFolderPath()\n {\n return Mage::getBaseDir('log') . DS . self::DNDINXMAIL_LOG_FOLDER . DS;\n }", "title": "" }, { "docid": "28516b4e984f209051f6037f229513c1", "score": "0.7913722", "text": "public function getLogDir()\n {\n if (is_null($this->_logDir) && defined('SELENIUM_TESTS_LOGS')) {\n $this->setLogDir(SELENIUM_TESTS_LOGS);\n }\n return $this->_logDir;\n }", "title": "" }, { "docid": "f97667bf02f70417244a5b52b2f7b55e", "score": "0.7913434", "text": "protected function getLoggerPath()\n\t{\n\t\treturn \"{$this->getRoot()}{$this->global->path->logs}\";\n\t}", "title": "" }, { "docid": "49f863a5d032537db4bbe59bd6a35ba0", "score": "0.78771317", "text": "public static function getDefaultLogDir() {\n return getcwd() . '/.log';\n }", "title": "" }, { "docid": "6c573b293b65b65e75321ea6b71647af", "score": "0.7871898", "text": "public function getLogDir(): string\n {\n return __DIR__.'/../var/log';\n }", "title": "" }, { "docid": "f5ec318a769eb5d5ae7f9fc6d9ebad15", "score": "0.78251326", "text": "public function getPath()\n {\n return $this->directoryList->getPath('log');\n }", "title": "" }, { "docid": "b5608553f94029bd7061f1d1cebc8789", "score": "0.7808137", "text": "private function getLogFilesPath()\n {\n return $this->_logManagerHelper->getLogFilesPath();\n }", "title": "" }, { "docid": "3ecad5a1d3cd92cca372808601fc93c5", "score": "0.75754577", "text": "protected function getLogsDirName()\n {\n $deviceTypeFolder = strtolower($this->device->type->name);\n $softwareTypeFolder = strtolower($this->software->name);\n\n $path = storage_path() . \"/logs/devices/\" . $deviceTypeFolder . \"/\" . $softwareTypeFolder;\n \n if (!File::exists($path)) {\n File::makeDirectory($path, 0775, true);\n }\n\n return $path;\n }", "title": "" }, { "docid": "93d76d817f5fb5941facc2ee57b892b5", "score": "0.75616497", "text": "public static function getLogFolder(): string\n {\n return self::$folder;\n }", "title": "" }, { "docid": "dbdab09cbe7c9266d69333b988dba072", "score": "0.75222534", "text": "function log_path()\n {\n return storage_path() . '/logs';\n }", "title": "" }, { "docid": "51596476cf1d0920d58a44dede733886", "score": "0.7210829", "text": "function fue_get_log_path() {\n\t$uploads = wp_upload_dir();\n\t$path = trailingslashit( $uploads['basedir'] ) . 'fue.log';\n\n\tif ( ! file_exists( $path ) ) {\n\t\ttouch( $path );\n\t}\n\n\treturn $path;\n}", "title": "" }, { "docid": "cf4c0d09ab5b5fd239b6b0c3e31b8f54", "score": "0.7205188", "text": "public function getLogFilePath()\n {\n return $this->varReaderWriter->getAbsolutePath($this->logFilePath);\n }", "title": "" }, { "docid": "e90a56e3c3f0a1fed86194d3d16dd530", "score": "0.7135922", "text": "public function getFfmpegLogsDir() {\n return $this->ffmpegLogsDir;\n }", "title": "" }, { "docid": "14ac5f2366f275b24574910845010a5b", "score": "0.71230465", "text": "function getUsageEventLogsPath() {\n\t\treturn $this->getFilesPath() . DIRECTORY_SEPARATOR . 'usageEventLogs';\n\t}", "title": "" }, { "docid": "8c100f029575950f57f111e278b90954", "score": "0.7080974", "text": "static function getExpectedPath( ){\n\t\treturn __DIR__.'/../../log/'.self::$logLabel.'/'.date( 'Y-m-d' ) . '.txt';\n\t}", "title": "" }, { "docid": "550f8dddb37d0352919b29dd76e8017e", "score": "0.70378715", "text": "function packages_vqmod_logs_path() {\n\treturn PACKAGES_PATH . 'vqmod/logs/';\n}", "title": "" }, { "docid": "751806d59d83b18af875a1cfa50b5a43", "score": "0.69379103", "text": "public function GetLogDestination()\n {\n if ($this->EnableServiceRequestsLogging) {\n if (false === file_exists($this->ServiceRequestLoggingLocation)) {\n $this->ServiceRequestLoggingLocation = sys_get_temp_dir();\n }\n }\n return $this->ServiceRequestLoggingLocation;\n }", "title": "" }, { "docid": "9fd5017ebee5b508b74723cc22717f9d", "score": "0.6894129", "text": "protected function getLogFilePath()\n {\n return $this->logFilePath;\n }", "title": "" }, { "docid": "433718ff67954a5a9871202a257564b0", "score": "0.6839883", "text": "private function getStoragePath(): string\n {\n return $this->rootPath . '/var/event-log';\n }", "title": "" }, { "docid": "6efb59f3a97afcbe2e1fc9af8ac2d756", "score": "0.6699547", "text": "private function getDumpDir()\n {\n $fullPath = $this->kernel->getProjectDir() . '/' . $this->dumpFolder;\n\n // Check to make sure that the dump folder has been created\n if (!file_exists($fullPath)) {\n mkdir($fullPath, 0777, true);\n }\n\n return $fullPath;\n }", "title": "" }, { "docid": "0cad5a974d18eb1575dc5b59d192d1e3", "score": "0.669902", "text": "public function getCacheDir()\n {\n return $this->rootDir.'/cache';\n }", "title": "" }, { "docid": "0f93f4e7dc859706cc8b3d88807d2ef2", "score": "0.6686773", "text": "public function getCacheDirectory()\n {\n\n return $this->getTempDirectory() . 'cache' . DIRECTORY_SEPARATOR;\n\n }", "title": "" }, { "docid": "e6e49b81f66f45669c12b625092b42be", "score": "0.66599464", "text": "public function getLogFileName()\n {\n return $this->getProcessDir().DS.'log.txt';\n }", "title": "" }, { "docid": "bc5b3e7908ec60f2c8b8371f6fe3ed4c", "score": "0.66571265", "text": "public function getDir() {\n\t\treturn JComponentHelper::getParams('com_jspace')->get('storage_directory') . \".\" . $this->id;\n\t}", "title": "" }, { "docid": "11100a8cbaf6c8c77e8feaa557779249", "score": "0.66570187", "text": "function getDir() {\n return $this->repository->rootdir . '/' . $this->stationName . '/' . $this->data['entry_date'] . '/' . $this->data['track'];\n }", "title": "" }, { "docid": "10f0332ab838129a82faae9b3dd15985", "score": "0.66524965", "text": "protected function getLogPath($log)\n {\n\n $dir = $this->log_root.'/'.$log.'/';\n\n if(!is_dir($dir)){\n mkdir($dir, 0777, true);\n }\n\n return $dir;\n }", "title": "" }, { "docid": "2b8447b9d37a7020b6a386d82eccfc33", "score": "0.65836644", "text": "private function cacheDirectory(): string\n {\n $cacheDirectory = (string) $this->cacheDirectory;\n\n if ('' === $cacheDirectory && false === \\is_writable($cacheDirectory))\n {\n $cacheDirectory = \\sys_get_temp_dir();\n }\n\n return \\rtrim($cacheDirectory, '/');\n }", "title": "" }, { "docid": "8281f8749a494c613cb57e0eb14027ce", "score": "0.65304166", "text": "protected function getCacheDirectory() {\n return $this->cacheDir;\n }", "title": "" }, { "docid": "3da439a483070cb37871db6666e59773", "score": "0.65259266", "text": "public function get_files_dir() \n\t{\n\t\tif (!isset($this->files_dir) || is_null($this->files_dir)) {\n\t\t\t$this->files_dir = DOCROOT.'application'.DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR;\n\t\t}\n\t\treturn $this->files_dir;\t\n\t}", "title": "" }, { "docid": "676f2a5279fa92d8e7c6baeedcd0df54", "score": "0.6525717", "text": "public function getCacheFilesDir()\n {\n return $this->cacheFilesDir;\n }", "title": "" }, { "docid": "b24d4f3ddaf7021d460399c9aad08b40", "score": "0.6512129", "text": "protected static function getRelativeTrackerDir () : string\n {\n static::throwExceptionIfConfigIsNotFound();\n\n return config(\"modules.root\").\"/\";\n }", "title": "" }, { "docid": "838657b796f6cceed3b7e36832a7cb62", "score": "0.650892", "text": "public function getCacheDirectory()\n {\n return $this->cacheDirectory;\n }", "title": "" }, { "docid": "838657b796f6cceed3b7e36832a7cb62", "score": "0.650892", "text": "public function getCacheDirectory()\n {\n return $this->cacheDirectory;\n }", "title": "" }, { "docid": "633be19e64bcd59a358346dfd49266ef", "score": "0.65075094", "text": "public function getCacheDir()\n {\n return $this->config[Config::CACHE_DIR];\n }", "title": "" }, { "docid": "0c0ab11545bc84621c654d6b66021b7a", "score": "0.6503883", "text": "protected function getTmpUploadRootDir() {\n return __DIR__ . '/../../../../web/upload/staff/';\n }", "title": "" }, { "docid": "9621e14fedea0a483a2b9718d52d97dc", "score": "0.649885", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "9621e14fedea0a483a2b9718d52d97dc", "score": "0.649885", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "9621e14fedea0a483a2b9718d52d97dc", "score": "0.649885", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "9621e14fedea0a483a2b9718d52d97dc", "score": "0.649885", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "9621e14fedea0a483a2b9718d52d97dc", "score": "0.649885", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "9621e14fedea0a483a2b9718d52d97dc", "score": "0.649885", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "9621e14fedea0a483a2b9718d52d97dc", "score": "0.649885", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "9621e14fedea0a483a2b9718d52d97dc", "score": "0.649885", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "9621e14fedea0a483a2b9718d52d97dc", "score": "0.649885", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "9621e14fedea0a483a2b9718d52d97dc", "score": "0.649885", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "9621e14fedea0a483a2b9718d52d97dc", "score": "0.649885", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "3bbdf74b56339d9e38b7368a6e5be204", "score": "0.64892846", "text": "protected function getOutputDirectory()\n {\n return $this->backupConfiguration->getTempDirectory() . DIRECTORY_SEPARATOR . static::OUTPUT_DIRECTORY_NAME;\n }", "title": "" }, { "docid": "fc4b7df59726cc0850a4edf7d15834d7", "score": "0.6488659", "text": "protected function getFilePath()\n {\n $dateFormatted = $this->dateBuilder->buildFromTime();\n $path = rtrim($this->path, '/');\n\n return \"{$path}/{$dateFormatted}.log\";\n }", "title": "" }, { "docid": "f6d2fc45f9ba2a614ecdbabdcdb6d025", "score": "0.6484842", "text": "protected function getDirectory()\n\t{\n\t\treturn Yii::getAlias($this->dir);\n\t}", "title": "" }, { "docid": "323e9a5e9ddb47cf6c3ddcb47c3e7ece", "score": "0.6483878", "text": "public function getCacheDir()\n {\n return $this->cacheDir;\n }", "title": "" }, { "docid": "323e9a5e9ddb47cf6c3ddcb47c3e7ece", "score": "0.6483878", "text": "public function getCacheDir()\n {\n return $this->cacheDir;\n }", "title": "" }, { "docid": "5f6b1798093d6caf48949a156de57865", "score": "0.6480093", "text": "public function getDirectory()\n {\n return $this->strDirectory;\n }", "title": "" }, { "docid": "eea6f1ddd4eed5421caf83aa3cea82a0", "score": "0.6473587", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "eea6f1ddd4eed5421caf83aa3cea82a0", "score": "0.6473587", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "1ac4963296cbb482d4fe7e6a660d0b6a", "score": "0.6460018", "text": "public function getOutputCacheDirectory()\n {\n\n return $this->getCacheDirectory() . 'output' . DIRECTORY_SEPARATOR;\n\n }", "title": "" }, { "docid": "9e8df9c2c8a4684fe5a51f63753d63c8", "score": "0.6457757", "text": "public function getCacheDir(): string\n {\n return dirname(__DIR__).'/var/cache/'.$this->getEnvironment();\n }", "title": "" }, { "docid": "e679ef43e5958fe8a54aaa76ee850820", "score": "0.6456754", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "e679ef43e5958fe8a54aaa76ee850820", "score": "0.6456754", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "83fc2f090d584f3039c1f63c889a3de6", "score": "0.64559656", "text": "protected function getConfigDir()\r\n\t{\r\n\t\treturn dirname(__FILE__).DIRECTORY_SEPARATOR.$this->configDir.DIRECTORY_SEPARATOR;\r\n\t}", "title": "" }, { "docid": "025b0b3e29698bb80016f7ba91f4b0ca", "score": "0.6454863", "text": "protected function getUploadRootDir(){\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "ae7aa6076158954f7228de9b6cae8a22", "score": "0.64547443", "text": "public function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "bf7622a16ad5f6ee150403f76afa3289", "score": "0.6434771", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__ . '/../../../../web/' . $this->getUploadDir();\n }", "title": "" }, { "docid": "6f6382384688cc35300f7945c22723f1", "score": "0.64323467", "text": "public static function getCacheDir() {\n\t\treturn self::$cache_dir;\n\t}", "title": "" }, { "docid": "38535db9aabc42d0500eb6df489765f0", "score": "0.64310014", "text": "function xcms_log_filename()\n{\n global $meta_site_log_path;\n $log_path = $meta_site_log_path;\n if (!strlen($log_path))\n {\n global $xengine_dir;\n $ed = strlen($xengine_dir) ? $xengine_dir : \"engine\";\n $log_path = \"$ed/../engine.log\";\n }\n return $log_path;\n}", "title": "" }, { "docid": "56782922ddac415972ea9720960317db", "score": "0.64306957", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__ . '/../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "4b82e5d6e2dd686a32c751ca3e1b9df6", "score": "0.64266187", "text": "public function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "875ca2754550cdca2098ae14441f2521", "score": "0.64237726", "text": "static function getDir() {\t\t\n\t\tstatic $dir = null;\n\t\tif( $dir === null ) {\n\t\t\t$dir = dirname( __FILE__ );\n\t\t}\n\t\treturn $dir;\n\t}", "title": "" }, { "docid": "a6c82f83f2091ba17605b3c0e4724bb6", "score": "0.64198744", "text": "public function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__ . '/../../../../web/' . $this->getUploadDir();\n }", "title": "" }, { "docid": "16c0b86f50998cd6e9b442206a57b07a", "score": "0.6413368", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__ . '/../../../web/' . $this->getUploadDir();\n }", "title": "" }, { "docid": "bf616fd8508aeb27af0e8a9fc6f36601", "score": "0.6410064", "text": "private function getDestinationDirectory()\n {\n return public_path('upload/news');\n }", "title": "" }, { "docid": "541f60b2adc7144c1f93a37cd3a06eed", "score": "0.64087784", "text": "public function getCacheDir()\n {\n return $this->getNamingDirectory()->search(sprintf('php:env/%s/cacheDirectory', $this->getName()));\n }", "title": "" }, { "docid": "3ad345146b23ea8fc3ed422b1a903862", "score": "0.64005804", "text": "public function getOutputdir()\n {\n return $this->outputdir;\n }", "title": "" }, { "docid": "932bdd6a0a1b29c80cae9cc10685b8fd", "score": "0.63900894", "text": "public static function getDirectory(){\n return \\Illuminate\\Cache\\FileStore::getDirectory();\n }", "title": "" }, { "docid": "445e98a19338a060e1d9a34df56510bf", "score": "0.6382546", "text": "public function getCacheDirectory() {\n return $this->path;\n }", "title": "" }, { "docid": "4c6226d5b3134fefd649a3fac23d8067", "score": "0.6370591", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__ . '/../../../../FixIt/web/' .$this->getUploadDir();\n }", "title": "" }, { "docid": "58f5e2b495905ede80ad62391f6f014a", "score": "0.63627154", "text": "protected function getUploadRootDir() {\n // documents should be saved\n return __DIR__ . '/../../../../web/' . $this->getUploadDir();\n }", "title": "" }, { "docid": "58f5e2b495905ede80ad62391f6f014a", "score": "0.63627154", "text": "protected function getUploadRootDir() {\n // documents should be saved\n return __DIR__ . '/../../../../web/' . $this->getUploadDir();\n }", "title": "" }, { "docid": "58f5e2b495905ede80ad62391f6f014a", "score": "0.63627154", "text": "protected function getUploadRootDir() {\n // documents should be saved\n return __DIR__ . '/../../../../web/' . $this->getUploadDir();\n }", "title": "" }, { "docid": "58f5e2b495905ede80ad62391f6f014a", "score": "0.63627154", "text": "protected function getUploadRootDir() {\n // documents should be saved\n return __DIR__ . '/../../../../web/' . $this->getUploadDir();\n }", "title": "" }, { "docid": "58f5e2b495905ede80ad62391f6f014a", "score": "0.63627154", "text": "protected function getUploadRootDir() {\n // documents should be saved\n return __DIR__ . '/../../../../web/' . $this->getUploadDir();\n }", "title": "" }, { "docid": "58f5e2b495905ede80ad62391f6f014a", "score": "0.63627154", "text": "protected function getUploadRootDir() {\n // documents should be saved\n return __DIR__ . '/../../../../web/' . $this->getUploadDir();\n }", "title": "" }, { "docid": "0280c7b8ac696836fc6e5b5468c366e1", "score": "0.6361117", "text": "protected function getUploadRootDir() {\n// documents should be saved\n return __DIR__ . '/../../../../web/' . $this->getUploadDir();\n }", "title": "" }, { "docid": "498f79e4ade13fddbfbc8d2a90f4a7b0", "score": "0.63591343", "text": "protected function getUploadDir()\n {\n // al mostrar el documento/imagen cargada en la vista.\n return 'uploads/documents';\n }", "title": "" }, { "docid": "498f79e4ade13fddbfbc8d2a90f4a7b0", "score": "0.63591343", "text": "protected function getUploadDir()\n {\n // al mostrar el documento/imagen cargada en la vista.\n return 'uploads/documents';\n }", "title": "" }, { "docid": "498f79e4ade13fddbfbc8d2a90f4a7b0", "score": "0.63591343", "text": "protected function getUploadDir()\n {\n // al mostrar el documento/imagen cargada en la vista.\n return 'uploads/documents';\n }", "title": "" }, { "docid": "498f79e4ade13fddbfbc8d2a90f4a7b0", "score": "0.63591343", "text": "protected function getUploadDir()\n {\n // al mostrar el documento/imagen cargada en la vista.\n return 'uploads/documents';\n }", "title": "" }, { "docid": "9e194237f94fba6faa7c9097a0eabcea", "score": "0.63582623", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return $_SERVER['DOCUMENT_ROOT'].$this->getUploadDir();\n }", "title": "" }, { "docid": "558a7ff024b9444c06fa3d4c4a88f8e7", "score": "0.63540006", "text": "public function getConfigDirectory()\n {\n\n return $this->getBaseDirectory() . 'config' . DIRECTORY_SEPARATOR;\n\n }", "title": "" }, { "docid": "d3b70ca85246373213457f69a52fa341", "score": "0.6352384", "text": "public function get_cache_dir() {\n\t\treturn sanitize_title( apply_filters( $this->get_hook_name( 'dir' ), $this->get_slug() ) );\n\t}", "title": "" } ]
0a8a705b206514839527690e4a8e6bb5
/ Returns the HTML of a labeled input text element with Bootstrap class names TEXT AREA Input: Name of element (string) Text label of element (string) Value of element (string) Is the element required (boolean) Output: HTML text (string)
[ { "docid": "7d5a1d13a756fd3a1ab6bd384ddbcbaf", "score": "0.0", "text": "function return_textarea($name, $label, $value='', $required=false) {\n\tif ($required) $req = 'required';\n\telse $req = '';\n\treturn '\n\t\t<div class=\"form-group\">\n <label for=\"'.$name.'\">'.$label.'</label>\n <textarea class=\"form-control\" id=\"'.$name.'\" name=\"'.$name.'\" rows=\"3\"'.$req.'>'.$value.'</textarea>\n \n\t\t</div>';\n}", "title": "" } ]
[ { "docid": "73072c94cc5aa7095f7a9a9ec2651b3a", "score": "0.6695461", "text": "public function elementText()\n\t{\n\t\t$this->functionCallLog('elementText');\n\t\t//setting additional parameters of text element\n\t\t$para=$this->setBasics();\n\t\treturn '<INPUT TYPE=\"'.$this->_xpathValue['displaytype'].'\" '.$para.' >';\n\t}", "title": "" }, { "docid": "edcf9fce2d09d23efb481279173cbffe", "score": "0.6422711", "text": "function return_input_text($name, $label, $value='', $required=false) {\r\n\tif ($required) $req = 'required';\r\n\telse $req = '';\r\n\treturn '\r\n\t\t<div class=\"form-group\">\r\n\t\t\t<label for=\"'.$name.'\">'.$label.'</label>\r\n\t\t\t<input type=\"text\" class=\"form-control\" name=\"'.$name.'\" id=\"'.$name.'\" value=\"'.$value.'\" '.$req.'>\r\n\t\t</div>';\r\n}", "title": "" }, { "docid": "6f3a959d2d4395a5e1608cecbc105cee", "score": "0.6420738", "text": "abstract public function getExampleInputHtml(): string;", "title": "" }, { "docid": "763a1b3bf529f8b169d5e20efe6483dd", "score": "0.6304597", "text": "public function toHtml()\n {\n if (0 == strlen($this->_text)) {\n $label = '';\n } elseif ($this->_flagFrozen) {\n // チェックの時のみラベルを表示\n $label = $this->getChecked() ? $this->_text : '';\n } else {\n $label = '<label for=\"' . $this->getAttribute('id') . '\">' . $this->_text . '</label>';\n }\n return HTML_QuickForm_input::toHtml() . $label;\n }", "title": "" }, { "docid": "7c117d35fccc12d7694914bd75e87c4d", "score": "0.6276316", "text": "function return_input_text($name, $label, $value='', $required=false, $password=false) {\n\tif ($required) $req = 'required';\n\telse $req = '';\n \n if ($password) $intype = 'password';\n else $intype = 'text';\n \n\treturn '\n\t\t<div class=\"form-group\">\n\t\t\t<label for=\"'.$name.'\">'.$label.'</label>\n\t\t\t<input type=\"'.$intype.'\" class=\"form-control\" name=\"'.$name.'\" id=\"'.$name.'\" value=\"'.$value.'\" '.$req.'>\n \n\t\t</div>';\n}", "title": "" }, { "docid": "a5e57d283be7c98ac836acf3b84ad53c", "score": "0.6180169", "text": "private function buildElementText($element,$label,$input,$desc,$errors){\n\t\t$output = \"<div class=\\\"containerinputbox\\\">\";\n\t\t$output .= \"<div class=\\\"inputbox\\\">\";\n\t\t$output .=$label;\n\t\t$output .=\"<div class=\\\"wrapperInput\\\">$input</div>\";\n\t\tif( $element->isRequired() ) {\n\t\t\t$output .=\"<p class=\\\"cell required\\\">*</p>\";\n\t\t}\n\t\t$output.=$desc.$errors.\"</div></div>\";\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "adabc601d32a8ec76a7331e93d5b5e8d", "score": "0.61528265", "text": "private function inputText() { \n\n\t\t//check if we have been passed a closure\n\t\tif (is_callable($this->input['value'])) {\n\t\t\t$this->input['value'] = $this->input['value']();\n\t\t}\n\n\t\t$this->structureControlGroupOpen();\n\t\t$this->textLabelOpen();\n\t\t$this->textLabelClose();\n\t\t$this->structureControlOpen();\t\t\t\t\n\t\t$this->structureAddon('prepend');\n\n\t\t//add our input to the form string\n\t\t$this->form_build[] = '<input ' . $this->attrKeyValue($this->input, array('label', 'help', 'multiple', 'inline')) . ' />';\n\n\t\t$this->structureAddon('append');\n\t\t$this->structureControlClose();\n\t\t//put the help outside the control incase of errors (which wont show otherwise)\n\t\t$this->textHelp();\n\t\t$this->structureControlGroupClose();\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "4019a2655934075c8200002a130d18b7", "score": "0.60676163", "text": "function Input_text_Html_Get($Options, $args, $Value = ''){\n\t$attr = '';\n\t$type = 'input type=\"text\"';\n\t$typeAfter = '';\n\tif (isset($Options['count'])){\n\t\t$attr .= ' count=\"'.$Options['count'].'\" ';\n\t}\n\tif (isset($Options['not'])){\n\t\t$attr .= ' not=\"'.$Options['not'][0].'\" notdesc=\"'+$Options['not'][1]+'\"';\n\t}\n\tif (isset($Options['only'])){\n\t\t$attr .= ' only=\"'.$Options['only'][0].'\" onlydesc=\"'+$Options['only'][1]+'\"';\n\t}\n\tif (isset($Options['placeholder'])){\n\t\t$attr .= ' placeholder=\"'.$Options['placeholder'].'\" ';\n\t}\n\tif (isset($Options['multiline'])) {\n\t\t$lines = explode(' ', $Options['multiline']);\n\t\t$attr .= ' cols=\"'.$lines[0].'\" rows=\"'.$lines[1].'\" ';\n\t\t$type = 'textarea';\n\t\t$typeAfter = $Value.'</textarea>';\n\t\t$Value = '';\n\t}\n\tif (isset($Options['autocomplete'])) {\n\t\t$a = '';\n\t\tforeach($Options['autocomplete'] as $val) $a .= $val.',';\n\t\t$attr .= ' autocompletejs=\"'.trim($a, ',').'\" ';\n\t}\n\treturn '<'.$type.' '.$args.' value=\"'.$Value.'\" '.$attr.' >'.$typeAfter;\n}", "title": "" }, { "docid": "c7d315fe5a4114ab7c96fe2dd757dc1b", "score": "0.6045032", "text": "function buildElement() {\n\t\t$e = Theme::input_text($this->defaultValue, $this->placeholder, $this->label, [\"type\" => $this->displayType]);\n\t\t\n\t\tif (!is_array($this->only) OR !is_array($this->not))\n\t\t\tthrow new Exception(\"Input only/not property needs to be an array [regex string, error string].\");\n\t\t\n\t\t$e->attr(\"id\", $this->id);\n\t\t$e->attr(\"blank\", ($this->blank ? 1:0));\n\t\t$e->attr(\"count\", $this->character_min.' '.$this->character_max);\n\t\t$e->attr(\"not\", $this->not[0]);\n\t\t$e->attr(\"notdesc\", $this->not[1]);\n\t\t$e->attr(\"only\", $this->only[0]);\n\t\t$e->attr(\"onlydesc\", $this->only[1]);\n\t\t$e->attr(\"isinput\", \"\");\n\t\t\n\t\t//$html = '<input isinput id=\"'.$this->id.'\" blank=\"'.($this->blank ? 1:0).'\" count=\"'.$this->min.' '.$this->max.'\" not=\"'.$this->not.'\" only=\"'.$this->only.'\" name=\"'.$meta['name'].'\" type=\"text\" placeholder=\"Text\"></input>';\n\t\t\n\t\t$this->doVisible($e);\n\t\t\n\t\treturn $e;\n\t}", "title": "" }, { "docid": "8cfb0098613d5d0e8c9d47a7bba7659e", "score": "0.6037856", "text": "public function generate_html()\n {\n // Prepare the input data\n $input_data = $this->input_data[0];\n \n $parameters = [\n 'label' => $this->label,\n 'field_name' => $this->field_name,\n 'value' => $input_data\n ];\n\n $return = $this->stub->parse_stub('input-text', $parameters).\"\\n\";\n\n return $return;\n }", "title": "" }, { "docid": "4aad743f03a1720e1d9fbbabb8ae59ed", "score": "0.5978837", "text": "public function richInput(\n $type,\n $label,\n $name,\n $value = null,\n $attributes = [],\n $params = null\n ) {\n\n $pNode = $this->prepareParams($params);\n\n if (isset($attributes['id'])) {\n $id = $this->inpIdPrefix.$attributes['id'];\n $inpName = $name;\n } else {\n\n $tmp = explode(',', $name);\n\n if (count($tmp) > 1) {\n $id = $this->inpIdPrefix.$tmp[0].\"-\".$tmp[1];\n $inpName = $tmp[0].\"[{$tmp[1]}]\";\n } else {\n $id = str_replace(['[',']'], ['-',''], $this->inpIdPrefix.$tmp[0]);\n $inpName = $tmp[0];\n }\n\n $attributes['id'] = \"wgt-input-{$id}\";\n }\n\n $attributes['type'] = 'text';\n\n if (!isset($attributes['class']))\n $attributes['class'] = 'wcm wcm_ui_'.$type;\n\n $attributes['class'] .= ' '.$pNode->size;\n\n if ($this->id)\n $attributes['class'] .= ' asgd-'.$this->id;\n\n if (!isset($attributes['name']))\n $attributes['name'] = $inpName;\n\n $attributes['value'] = str_replace('\"', '\\\"', $value);\n $attributes['data-def-value'] = $attributes['value'];\n \n if ($pNode->inp_only && !isset($attributes['placeholder'])) {\n $attributes['placeholder'] = $label;\n }\n\n $codeAttr = Wgt::asmAttributes($attributes);\n\n $helpIcon = '';\n $helpText = '';\n if ($pNode->helpText) {\n $helpIcon = '<span onclick=\"$S(\\'#wgt-input-help-'.$id.'\\').modal();\" ><i class=\"fa fa-question-sign\" ></i></span> ';\n $helpText = '<div id=\"wgt-input-help-'.$id.'\" class=\"template\" >'.$pNode->helpText.'</div>';\n }\n\n $appendButton = '';\n if (isset($params['button'])) {\n\n $appendButton = <<<BUTTON\n\n <var>{\"button\":\"wgt-input-{$id}-ap-button\"}</var>\n <button\n id=\"wgt-input-{$id}-ap-button\"\n class=\"wgt-button append-inp\"\n tabindex=\"-1\" >\n {$this->view->icon($params['button'], $label)}\n </button>\n\nBUTTON;\n\n }\n\n if ($pNode->plain) {\n $html = <<<CODE\n\n<input {$codeAttr} />\n\nCODE;\n\n } else {\n $html = <<<CODE\n\n<div id=\"wgt_box_{$id}\" class=\"box-form-node is-standalone has-clearfix\" >\n <label \n for=\"wgt-input-{$id}\" \n class=\"box-form-node-label\" >{$helpIcon}{$label}{$pNode->requiredText}</label>\n {$helpText}\n <div class=\"box-form-node-element {$pNode->size}\" >\n <input {$codeAttr} />{$appendButton}{$pNode->appendText}\n </div>\n</div>\n\nCODE;\n }\n\n return $this->out($html);\n\n }", "title": "" }, { "docid": "55f5a55a6d36e3d41446c0b97ddf4ce1", "score": "0.59161997", "text": "function form_input_text($name, $value = null, $width = null, $maxchars = null, $custom_html = null, $class = 'bhinputtext', $placeholder = null)\n{\n return form_field($name, $value, $width, $maxchars, \"text\", $custom_html, $class, $placeholder);\n}", "title": "" }, { "docid": "427ac14bc82cdd0db2b31437bd303cdd", "score": "0.5891886", "text": "public function getHtmlInputCode() {\n \n $position = $this->getPosition();\n \n\t if ($this->getType() != 'wrapper') { // Don't display 'wrapper' fields\n\t\n\t\t$value = (isset($_POST['f'.$this->getId()])?$_POST['f'.$this->getId()]:$this->getDefault_text());\n\n\n\t\techo '<p><span class=\"field-title\">'.$this->getName().': </span> ';\n\t\techo '<span class=\"field-character-count\"> (Up to '.$this->getCharacter_limit().' characters)</span><br />';\n\n\t\t$type = ($this->getWrap_width() > 0 || $this->getParent() > 0)?\"multi_line\":\"single_line\";\n\t\t\n\t\t\t\n\t\tswitch ($type) {\n\t\tcase 'single_line' :\n\t\t\techo '<input type=\"text\" maxlength=\"'.$this->getCharacter_limit().'\" name=\"f'.$this->getId().'\" value=\"'.$value.'\" /><br />';\n\t\t\tbreak;\n\n\t\tcase 'multi_line' :\n\t\t\techo '<textarea onKeyDown=\"javascript:limitText(this.form.f'.$this->getId().','.$this->getCharacter_limit().',null)\" rows=\"4\" name=\"f'.$this->getId().'\">'.$value.'</textarea><br />';\n\n\t\t}\n\t\techo '</p>';\n\t \n\t }\n\t\t\n\t}", "title": "" }, { "docid": "617919ed45cf980fc0388cdfbf787af0", "score": "0.58598626", "text": "public function makeElement()\r\n\t{\r\n\t\t$id = (isset($this->attributes['id'])) ? $this->attributes['id'] : $this->name;\r\n\t\t$class = (isset($this->attributes['class'])) ? $this->attributes['class'] : 'textbox';\r\n\t\t$value = h($this->getValue());\r\n\t\t$out = \"<input type='text' name='{$this->name}' id='{$id}' class='{$class}' value='{$value}'\";\r\n\t\t$out .= $this->renderAttributes() . \" />\\n\";\r\n\r\n\t\treturn $out;\r\n\t}", "title": "" }, { "docid": "36a172b8098e292a868fb3351706fe5b", "score": "0.5854608", "text": "public function getInput()\r\n {\r\n static $form_setted = false ;\r\n static $form ;\r\n \r\n $this->getValues();\r\n $this->addFieldJs();\r\n \r\n $element = $this->element ;\r\n $class = (string) $element['class'];\r\n $nolabel = (string) $element['nolabel'] ;\r\n $nolabel = ($nolabel == 'true' || $nolabel == '1') ? true : false ;\r\n \r\n \r\n // Get Field Form\r\n // =============================================================\r\n if(!$form_setted){\r\n // ParseValue\r\n $data = AKHelper::_('fields.parseAttrs', $this->value);\r\n \r\n $type = JRequest::getVar('field_type', 'text') ;\r\n $form = null;\r\n \r\n \r\n // Loading form\r\n // =============================================================\r\n JForm::addFormPath( AKPATH_FORM.'/forms/attr' );\r\n $form = null ;\r\n \r\n \r\n \r\n // Event\r\n JFactory::getApplication()\r\n ->triggerEvent( 'onCCKEngineBeforeFormLoad' , array( &$form , &$data, &$this, &$element, &$form_setted)) ;\r\n \r\n $form = JForm::getInstance( 'fields', $type, array('control' => 'attrs'), false, false );\r\n \r\n // Event\r\n JFactory::getApplication()\r\n ->triggerEvent( 'onCCKEngineAfterFormLoad' , array( &$form , &$data, &$this, &$element, &$form_setted)) ;\r\n \r\n $form->bind($data);\r\n \r\n \r\n // Set Default for Options\r\n $default = JArrayHelper::getValue($data, 'default') ;\r\n JRequest::setVar('field_default', $default, 'method', true) ;\r\n $form_setted = true;\r\n }\r\n \r\n \r\n $fieldset = (string) $element['fset'];\r\n $fieldset = $fieldset ? $fieldset : 'attrs' ;\r\n $fields = $form->getFieldset($fieldset);\r\n \r\n \r\n $html = '<div class=\"'.$class.' ak-cck-'.$fieldset.'\">' ;\r\n foreach( $fields as $field ):\r\n if(!$nolabel){\r\n $html .= '<div class=\"control-group\">' ;\r\n $html .= ' <div class=\"control-label\">'.$field->getLabel().'</div>' ;\r\n $html .= ' <div class=\"controls\">'.$field->getInput().'</div>' ;\r\n $html .= '</div>' ;\r\n }else{\r\n $html .= '<div class=\"control-group\">' ;\r\n $html .= $field->getInput() ;\r\n $html .= '</div>' ;\r\n }\r\n endforeach;\r\n $html .= '</div>';\r\n \r\n return $html;\r\n\r\n }", "title": "" }, { "docid": "2f296523586234eb27ff648d62026436", "score": "0.5846592", "text": "public function textarea(\n $label,\n $name,\n $value = null,\n $attributes = [],\n $params = null\n ) {\n\n $pNode = $this->prepareParams($params);\n\n if (isset($attributes['id'])) {\n\n $id = $this->inpIdPrefix.$attributes['id'];\n $inpName = $name;\n\n } else {\n\n $tmp = explode(',', $name);\n\n if (count($tmp) > 1) {\n $id = $this->inpIdPrefix.$tmp[0].\"-\".$tmp[1];\n $inpName = $tmp[0].\"[{$tmp[1]}]\";\n } else {\n $id = str_replace(['[',']'], ['-',''], $this->inpIdPrefix.$tmp[0]);\n $inpName = $tmp[0];\n }\n\n $attributes['id'] = \"wgt-input-{$id}\";\n }\n \n if (!isset($attributes['class'])) {\n $attributes['class'] = '';\n }\n\n $attributes['class'] .= ' '.$pNode->size;\n\n if ($this->id)\n $attributes['class'] .= ' asgd-'.$this->id;\n\n if (!isset($attributes['name']))\n $attributes['name'] = $inpName;\n \n if ($pNode->inp_only && !isset($attributes['placeholder'])) {\n $attributes['placeholder'] = $label;\n }\n\n $codeAttr = Wgt::asmAttributes($attributes);\n\n $helpIcon = '';\n $helpText = '';\n if ($pNode->helpText) {\n $helpIcon = '<span onclick=\"$S(\\'#wgt-input-help-'.$id.'\\').modal();\" ><i class=\"fa fa-question-sign\" ></i></span> ';\n $helpText = '<div id=\"wgt-input-help-'.$id.'\" class=\"template\" >'.$pNode->helpText.'</div>';\n }\n\n if ($pNode->plain) {\n return <<<CODE\n\n<textarea {$codeAttr}>{$value}</textarea>\n\nCODE;\n } else if ($pNode->inp_only) {\n \n $html = <<<CODE\n<div id=\"wgt_box_{$id}\" class=\"box-form-node has-clearfix\" >\n <div class=\"box-form-node-element is-standalone is-textarea {$pNode->size} \" >\n <textarea {$codeAttr}>{$value}</textarea>\n </div>\n</div>\nCODE;\n \n } else {\n\n $html = <<<CODE\n\n<div id=\"wgt_box_{$id}\" class=\"box-form-node has-clearfix\" >\n <label for=\"wgt-input-{$id}\" class=\"box-form-node-label\">{$helpIcon}{$label}{$pNode->requiredText}</label>\n {$helpText}\n <div class=\"box-form-node-element {$pNode->size} \" >\n <textarea {$codeAttr}>{$value}</textarea>\n </div>\n</div>\n\nCODE;\n \n }\n\n //<var id=\"{$id}-cfg-wysiwyg\" >{\"mode\":\"{$mode}\"}</var>\"\n return $this->out($html);\n\n }", "title": "" }, { "docid": "acf2ce933883bea2505a404d211ad105", "score": "0.58134586", "text": "function input(){\r\n\t\treturn \"<input {$this->html_attributes} value=\\\"{$this->content}\\\"/>\";\r\n\t}", "title": "" }, { "docid": "fabe96e1ecca913bdc286a0f07bf6931", "score": "0.57917786", "text": "protected function getInput(){\n $url = JURI::root().'plugins/system/autofbook/autofbook/helpers/catcherJ16.php';\n $htmlCode = '<input id=\"'.$this->id.'\" name=\"'.$this->name.'\" type=\"text\" class=\"text_area\" size=\"9\" value=\"'.$url.'\"/>';\n return $htmlCode;\n }", "title": "" }, { "docid": "6ea810673f2a68f5ad24692a03042922", "score": "0.5765795", "text": "function html_textbox($var, $label, $value = '', $is_pass = false) {\r\n return html_label($var, $label)\r\n . '<input type=\"' . ($is_pass ? 'password' : 'text') . '\" name=\"' . $var . '\" size=\"32\"' . ($value ? ' value=\"' . $value . '\"' : '') . ' />' . \"\\n\";\r\n}", "title": "" }, { "docid": "e801f5023bfe1c328286c643961ebe0b", "score": "0.5755431", "text": "function mg_makeInputTextTag( $id, $label, $type, $code, $filter, $req, $col, $uid )\n{\n $out = \"\"; $info = \"\";\n if( strcmp($req, 'required')==0 ){ \n $info = \" <abbr class='mg_asterisk' title='required'> *</abbr>\"; \n }\n\n $lbl = str_replace(\"[q]\",\"'\",$label);\n\n $out .= \"<div class='form-group'><div class='col-sm-3'>\";\n $out .= \"<div class='input-group input-group-icon'>\";\n $out .= \"<label class='mg_control-label'>\".$lbl;\n\n $out .= $info;\n $out .= \"</label>\"; \n\n $out .= \"</div></div>\";\n\n $out .= \"<div class='col-sm-6 col-xs-12'>\";\n $out .= \"<label style='display:none' class='idfield' id='\".$code.$id.\"'></label>\";\n $out .= \"<input type='\".$type.\"' id='\".$uid.\"' placeholder='\".$label.\"' class='mg_form-control miglaNumAZ \".$code.\" \".$req.\"'/>\";\n $out .= \"</div>\";\n $out .= \"<div class='col-sm-3 hidden-xs'></div></div>\";\n\n return $out;\n}", "title": "" }, { "docid": "cc40a5b445cf30e4bd903132d4f3230f", "score": "0.57340586", "text": "public function display()\n {\n $output = \"\";\n\n // Affichage du champ de saisie\n $output .= \"<input type=\\\"text\\\"\";\n /// ID HTML\n $output .= \" id=\\\"\" . $this->getInputID() . \"\\\"\";\n /// Classe HTML\n $output .= \" class=\\\"\" . join(' ', $this->getInputClasses()) . \"\\\"\";\n /// Name\n $output .= \" name=\\\"\" . esc_attr($this->field()->getDisplayName()) . \"\\\"\";\n /// Placeholder\n $output .= \" placeholder=\\\"\" . esc_attr($this->getInputPlaceholder()) . \"\\\"\";\n /// Attributs\n $output .= $this->getInputHtmlAttrs();\n /// Value\n $output .= \" value=\\\"\" . esc_attr($this->field()->getValue()) . \"\\\"\";\n /// TabIndex\n $output .= \" \" . $this->getTabIndex();\n /// Fermeture\n $output .= \"/>\";\n\n return $output;\n }", "title": "" }, { "docid": "76807fe7aaefd422feec94b126cb0c5c", "score": "0.57222766", "text": "public function render_html()\n {\n $output = \"<label for=\\\"{$this->namespace}_{$this->main_input_name}\\\"><span>{$this->field['title']}</span>\\n\";\n $output .= \" <textarea class=\\\"textarea\\\" id=\\\"{$this->namespace}_{$this->main_input_name}\\\" name=\\\"{$this->namespace}_{$this->main_input_name}\\\" size=\\\"{$this->size}\\\"\";\n if ($this->maxlenght > 0)\n {\n $output .= \" maxlenght=\\\"{$maxlenght}\\\"\";\n }\n if ($this->frozen)\n {\n $output .= ' disabled=\"disabled\"';\n }\n $output .= '>' . midcom_helper_xsspreventer_helper::escape_element('textarea', $this->type->value) . \"</textarea>\\n\";\n $output .= \"</label>\\n\";\n return $output;\n }", "title": "" }, { "docid": "288ee3a775864047c67d722227e2c02b", "score": "0.57108337", "text": "protected function _getFieldInputLabel()\n {\n return __(html_escape($this->_element->name));\n// return html_escape($this->_annotationTypeElement->Element->name);\n }", "title": "" }, { "docid": "30ba30129ad6534cf6b5bee9cf4353a3", "score": "0.57088965", "text": "function abt_input_helper_text(&$self, $type, $label, $name, $value, $description = false){\r\n\t?>\r\n\t\t<div class=\"field\">\r\n\t\t\t<label for=\"<?php echo $self->fieldid($name, 'options') ?>\"><?= _e($label, ABT_Countdown_Timer::N) ?></label>\r\n\t\t\t<input type=\"<?= $type ?>\" name=\"<?php echo $self->fieldname($name, 'options') ?>\" id=\"<?php echo $self->fieldid($name, 'options') ?>\" value=\"<?= htmlentities2(stripslashes($value)) ?>\" />\r\n\t\t\t<?php if($description) { ?><em class=\"description\"><?= __($description, ABT_Countdown_Timer::N) ?></em><?php } //if $description ?>\r\n\t\t</div>\r\n\t<?php\r\n}", "title": "" }, { "docid": "d7d79dae4196a36b209ba3cf99eac1a0", "score": "0.5697983", "text": "function toHtml()\r\n {\r\n if ($this->getAttribute('label') != '') \r\n {\r\n $arr_return['label'] = '<label for=\"{attr_id}\">'.$this->getAttribute('label').'</label>';\r\n }\r\n $arr_return['html'] = '<input {attr_name=attr_value} {extra_attr} />';\r\n \r\n return $arr_return;\r\n }", "title": "" }, { "docid": "085783b4c7711f82c5b1258eb10cb8d7", "score": "0.5691699", "text": "public static function input_text ($params) {\n /* Note\n 'disabled' does not require a value ('disabled'=>'')\n 'required' does not require a value ('required'=>'')\n */\n $params['tag'] = 'input';\n $params['type'] = 'text';\n $params['structure'] = 'single';\n return self::make_tag ($params);\n }", "title": "" }, { "docid": "2508c15e725767604e237e3cbd194228", "score": "0.5672101", "text": "function FormElement($labelContent, $input,$colspan=6){\n \n $div= new Div();\n $div->setClass(\"form-group\");\n $label = new Label($labelContent);\n $label->setClass(\"col-sm-2 control-label\");\n $div->add($label);\n $divInput = new Div();\n $divInput->setClass(\"col-sm-{$colspan}\");\n \n $divInput->add($input);\n // $div->add(new Br()); \n $div->add($divInput);\n \n \n return $div;\n \n \n \n }", "title": "" }, { "docid": "a6f1c6c835a06c2b8320301b42909be3", "score": "0.5660548", "text": "public function textInput($name,$label,$default='') {\n $valuetext = '';\n if($default != '') {$valuetext = ' value=\"' . $default . '\"'; }\n if(isset($_POST[$name])) {\n $this->validated[$name] = $this->validateText($name,$label,$_POST[$name]);\n $valuetext = ' value=\"' . $this->validated[$name]['clean'] . '\"';\n }\n $classname = 'formline'; $errorline = '';\n if($this->formSubmitted == 1) {\n if($this->validated[$name]['error'] != -1) {$classname = 'formline error'; $errorline = '<div class=\"errorline\">' . $this->validated[$name]['error'] . '</div>'; }\n }\n $this->formMain .= '<div class=\"' . $classname . '\"><div class=\"text\">';\n if($this->instructions != -1) {$this->formMain .= '<div class=\"instruction\">' . $this->instructions . '</div>'; $this->instructions = -1; }\n $this->formMain .= '<label>' . $label . '</label>';\n $this->formMain .= '<input type=\"text\" name=\"' . $name . '\"' . $valuetext . '></input>';\n $this->formMain .= $errorline;\n $this->formMain .= '</div></div>';\n }", "title": "" }, { "docid": "f8dc72c94c2927ae9a01fb2575db346f", "score": "0.5643474", "text": "public function sinput($htmlAttributes = array(), $options = array())\n\t{\n\t\t$out = '';\n\t\t$defaults = array(\n\t\t\t'type' => 'text',\n\t\t\t'fieldName' => null,\n\t\t\t'label' => null,\n\t\t\t'error' => null,\n\t\t\t'options' => array(),\n\t\t\t'required' => false,\n\t\t\t'container' => true\n\t\t);\n\t\t$options = am($defaults, $options);\n\t\t$options['close_me'] = false;\n\t\t\n\t\tif ($options['type'] == 'super_field')\n\t\t{\n\t\t\t$out .= $this->ssuperfield($htmlAttributes, $options);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$container = $options['container'];\n\t\t\tunset($options['container']);\n\t\t\t\n\t\t\tif (\n\t\t\t\tisset($this->Form->fieldset[$this->modelAlias]) &&\n\t\t\t\tin_array($options['fieldName'], $this->Form->fieldset[$this->modelAlias]['validates'])\n\t\t\t) {\n\t\t\t\t$options['required'] = true;\n\t\t\t}\n\t\t\t\n\t\t\tif ($options['type'] != 'hidden' && $container !== false)\n\t\t\t\t$out .= $this->sinputcontainer(is_array($container) ? $container : array(), $options);\n\t\t\t\n\t\t\t$method = Inflector::variable('input'.$options['type']);\n\t\t\tif (method_exists($this, $method) && empty($options['forceForm']))\n\t\t\t{\n\t\t\t\t$options['_htmlAttributes'] = $htmlAttributes;\n\t\t\t\t$out .= $this->{$method}($options);\n\t\t\t}\n\t\t\telseif (method_exists($this->Form, $options['type']))\n\t\t\t{\n\t\t\t\tif ($options['label'] !== false && $options['type'] != 'hidden')\n\t\t\t\t{\n\t\t\t\t\tif (in_array($options['type'], self::$aggregatedInput))\n\t\t\t\t\t{\n\t\t\t\t\t\t$out .= $this->Bl->h4Dry($options['label']);\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$labelHtmlAttributes = array();\n\t\t\t\t\t\tif (!empty($htmlAttributes['id']))\n\t\t\t\t\t\t\t$labelHtmlAttributes['for'] = $htmlAttributes['id'];\n\t\t\t\t\t\t$out .= $this->label($labelHtmlAttributes, $options, $options['label']);\n\t\t\t\t\t\tunset($labelHtmlAttributes);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tunset($options['label']);\n\t\t\t\t\n\t\t\t\tif (isset($options['instructions'])) {\n\t\t\t\t\t$out .= $this->instructions(array(),array(),$options['instructions']);\n\t\t\t\t\tunset($options['instructions']);\n\t\t\t\t}\n\t\t\t\t$htmlAttributes = $this->addClass($htmlAttributes, self::$defaultObjectClass);\n\t\t\t\t$htmlAttributes = $this->addClass($htmlAttributes, $this->_readFormAttribute('baseID'), 'buro:form');\n\t\t\t\t$inputOptions = am($htmlAttributes, $options['options'], array('label' => false, 'legend' => false, 'div' => false, 'type' => $options['type'], 'error' => $options['error']));\n\t\t\t\t\n\t\t\t\tif ($inputOptions['type'] == 'radio') \n\t\t\t\t\t$inputOptions['label'] = true;\n\t\t\t\telseif ($inputOptions['type'] == 'checkbox')\n\t\t\t\t\tif (isset($options['options']['label']))\n\t\t\t\t\t\t$inputOptions['label'] = $options['options']['label'];\n\t\t\t\t\n\t\t\t\tif (!empty($options['fieldName']))\n\t\t\t\t\t$out .= $this->Form->input($options['fieldName'], $inputOptions);\n\t\t\t\telse\n\t\t\t\t\t$out .= $this->Bl->input(Set::filter($inputOptions));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttrigger_error('BuroBurocrataHelper::sinput - input type `'.$options['type'].'` not implemented or known.');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\tif ($options['type'] != 'hidden' && $container !== false)\n\t\t\t\t$out .= $this->einputcontainer();\n\t\t}\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "6f65d2c9d9c71cf599f53d815f92c8d0", "score": "0.5626135", "text": "public function getInputHtml()\n {\n $attributes = $this->getCustomAttributes();\n $output = '';\n\n foreach ($this->options as $option) {\n $output .= '<label>';\n\n $output .= '<input '\n . $this->getAttributeString('name', $this->getHandle() . '[]')\n . $this->getAttributeString('type', 'checkbox')\n . $this->getAttributeString('id', $this->getIdAttribute())\n . $this->getAttributeString('class', $attributes->getClass())\n . $this->getAttributeString('value', $option->getValue(), false)\n . $attributes->getInputAttributesAsString()\n . ($option->isChecked() ? 'checked ' : '')\n . '/>';\n $output .= $this->translate($option->getLabel());\n $output .= '</label>';\n }\n\n return $output;\n }", "title": "" }, { "docid": "95a123b068bdfcc959cde5f94fb74acd", "score": "0.5622352", "text": "public function callback_text( $args ) {\t\n $value = esc_attr( $this->get_option( $args['id'], $args['section'], '' ) );\n $size = isset( $args['size'] ) && ! is_null( $args['size'] ) ? $args['size'] : 'regular';\n $type = isset( $args['type'] ) ? $args['type'] : 'text';\n $placeholder = empty( $args['placeholder'] ) ? '' : ' placeholder=\"' . $args['placeholder'] . '\"';\n\t\t\n $html = sprintf( '<input type=\"%1$s\" class=\"%2$s-text\" id=\"%3$s[%4$s]\" name=\"%3$s[%4$s]\" value=\"%5$s\"%6$s/>', $type, $size, $args['section'], $args['id'], $value, $placeholder );\n $html .= $this->get_field_description( $args );\n\t\t\n echo $html;\t\t\n }", "title": "" }, { "docid": "4726c6e421f70fd253a08cb3cd7a1161", "score": "0.56111425", "text": "public static function textAreaBlock($name, $value='', $label = '', $inputAttrs = [], $divAttrs = []){\n $divString = self::stringifyAttrs($divAttrs); \n $inputString = self::stringifyAttrs($inputAttrs);\n $html = '<div '.$divString.'>';\n if($label){\n $html .= '<label for=\"'.$name.'\">'.$label.'</label>';\n }\n $html .= '<textarea name=\"'.$name.'\" id=\"'.$name.'\" ' .$inputString.' >'.$value.'</textarea>';\n $html .= '</div>';\n return $html;\n }", "title": "" }, { "docid": "610be8650852eb28faa6661ae589132a", "score": "0.5608549", "text": "protected function getInput()\n {\n $classes = array(\n 'inputbox', \n );\n \n $this->class = $this->class . ' ' . implode(' ', $classes);\n\n return parent::getInput();\n }", "title": "" }, { "docid": "f0efd7238e859095291a99bbcab69a93", "score": "0.5581807", "text": "function do_text( $args ) {\r\n\r\n\t\t$value = esc_attr( $this->get_section_option( $args['section'], $args['id'], $args['default'] ) );\r\n\t\t$size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';\r\n\r\n\t\t$field = sprintf( '<input type=\"text\" class=\"%1$s-text\" id=\"%2$s[%3$s]\" name=\"%5$s[%2$s][%3$s]\" value=\"%4$s\"/>', $size, $args['section'], $args['id'], $value, $this->option_name );\r\n\t\t$field .= sprintf( '<p><span class=\"description\"> %s</span></p>', $args['desc'] );\r\n\r\n\t\techo $field;\r\n\t}", "title": "" }, { "docid": "17191c55419ea59325ffe3e89a4d836c", "score": "0.55787694", "text": "function callback_text( $args ) {\n\n $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) );\n $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';\n\n $html = sprintf( '<input type=\"text\" class=\"%1$s-text\" id=\"%2$s[%3$s]\" name=\"%2$s[%3$s]\" value=\"%4$s\"/>', $size, $args['section'], $args['id'], $value );\t\t\n $html .= sprintf( '<span class=\"description\"> %s</span>', $args['desc'] );\n\n echo $html;\n }", "title": "" }, { "docid": "143f48f7fdda1ac2c4a7fd6142337699", "score": "0.5575157", "text": "function dsf_form_text($name, $text='', $width, $height, $parameters = '', $itemclass='formitem') {\n $field = '<textarea name=\"' . dsf_output_string($name) . '\" id=\"' . dsf_output_string($name) . '\" cols=\"' . dsf_output_string($width) . '\" rows=\"' . dsf_output_string($height) . '\"';\n\n if (dsf_not_null($parameters)) $field .= ' ' . $parameters;\n\n\n $field .= ' class=\"' . $itemclass .'\">';\n\n if (dsf_not_null($text)) {\n \t\t$field .= $text;\n \t}\n\n $field .= '</textarea>';\n\n return $field;\n }", "title": "" }, { "docid": "e979fa2d242f45a0258453c7b2a5db5d", "score": "0.55571705", "text": "protected function renderHtml(): string\n {\n $fieldWizardResult = $this->renderFieldWizard();\n\n // Create form field\n $formField = '<input type=\"text\" ' . GeneralUtility::implodeAttributes([\n 'name' => $this->name,\n 'value' => $this->value,\n 'id' => $this->id,\n 'placeholder' => $this->placeholder,\n 'class' => 'form-control form-control--tags'\n ], true) . ' />';\n\n // Return html\n return '\n <div class=\"form-control-wrap\">\n <div class=\"form-wizards-wrap\">\n <div class=\"form-wizards-element\">' . $formField . '</div>\n <div class=\"form-wizards-items-bottom\">' . ($fieldWizardResult['html'] ?? '') . '</div>\n </div>\n </div>\n ';\n }", "title": "" }, { "docid": "f87e3b202ab9123e2d0b0c7a307b5849", "score": "0.5553837", "text": "private function element_single_line_text($field)\n\t{\n\t\t$id = $this->encode_element_title($field->title);\n\t\t$required = ($field->required) ? 'required' : FALSE;\n\n\t\t$html = '<div class=\"form-group\">';\n\t\t$html .= $this->make_label($id, $field->title, $required);\n\t $html .= sprintf('<input type=\"text\" name=\"%s\" id=\"%s\" class=\"form-control %s\">', $id, $id, $required);\n\t \t$html .= '</div>';\n\n\t \treturn $html;\n\t}", "title": "" }, { "docid": "f512cbaa484bbcc7cd8c1dd8d5ae8506", "score": "0.55533177", "text": "function get_string() {\n\t$_strReturn = '';\n\t\t$attribs = $this->get_attribs();\n\t\t$_strReturn = \"<input$attribs>\";\n\treturn $_strReturn;\n\t}", "title": "" }, { "docid": "eaf7ece92cfcc2e947eb1d23559299b8", "score": "0.5548741", "text": "static function input($params_array) {\r\n //read the placeholder if available\r\n $placeholder = '';\r\n if (!empty($params_array['placeholder'])) {\r\n $placeholder = 'placeholder=\"' . $params_array['placeholder'] . '\"';\r\n }\r\n\r\n //return the damn input\r\n return '<input type=\"text\" class=\"td-panel-input\" name=\"' . self::generate_name($params_array) . '\" value=\"' . esc_attr(strip_tags(stripcslashes(td_panel_data_source::read($params_array)))) . '\" ' . $placeholder . '/>';\r\n }", "title": "" }, { "docid": "9593cab761669309c04853b240065952", "score": "0.5545481", "text": "public function input(\n $label,\n $name,\n $value = null,\n $attributes = [],\n $params = null\n ) {\n\n $pNode = $this->prepareParams($params);\n\n if (isset($attributes['id'])) {\n $id = $this->inpIdPrefix.$attributes['id'];\n $inpName = $name;\n } else {\n\n $tmp = explode(',', $name);\n\n if (count($tmp) > 1) {\n $id = $this->inpIdPrefix.$tmp[0].\"-\".$tmp[1];\n $inpName = $tmp[0].\"[{$tmp[1]}]\";\n } else {\n $id = str_replace(['[',']'], ['-',''], $this->inpIdPrefix.$tmp[0]);\n $inpName = $tmp[0];\n }\n\n $attributes['id'] = \"wgt-input-{$id}\";\n }\n\n $attributes['type'] = $pNode->inp_type;\n\n if (!isset($attributes['class']))\n $attributes['class'] = $pNode->size;\n\n if ($this->id && !isset($params['un_assigned']))\n $attributes['class'] .= ' asgd-'.$this->id;\n\n if (!isset($attributes['name']))\n $attributes['name'] = $inpName;\n\n $attributes['value'] = str_replace('\"', '\\\"', $value);\n $attributes['data-def-value'] = $attributes['value'];\n \n if ($pNode->inp_only && !isset($attributes['placeholder'])) {\n $attributes['placeholder'] = $label;\n }\n\n $codeAttr = Wgt::asmAttributes($attributes);\n\n $helpIcon = '';\n $helpText = '';\n if ($pNode->helpText) {\n $helpIcon = '<span class=\"help\" onclick=\"$S(\\'#wgt-input-help-'.$id.'\\').modal();\" ><i class=\"fa fa-question-sign\" ></i></span> ';\n $helpText = '<div id=\"wgt-input-help-'.$id.'\" class=\"template\" >'.$pNode->helpText.'</div>';\n }\n\n $appendButton = null;\n if (isset($params['append_button'])) {\n \n $appendButton = <<<CODE\n<var>{\"button\":\"wgt-input-{$id}-ap-button\"}</var>\n <button\n id=\"wgt-input-{$id}-ap-button\"\n class=\"wgt-button append-inp\"\n tabindex=\"-1\" >\n <i class=\"{$params['append_button']}\" ></i>\n </button>\nCODE;\n \n }\n \n \n if ($pNode->plain) {\n $html = <<<CODE\n\n<input {$codeAttr} />{$appendButton}\n\nCODE;\n\n } else if ($pNode->inp_only) {\n \n $html = <<<CODE\n<div id=\"wgt_box_{$id}\" class=\"box-form-node is-standalone has-clearfix\" >\n <div class=\"box-form-node-element {$pNode->size}\" >\n <input placeholder=\"{$label}\" {$codeAttr} />{$appendButton}\n </div>\n</div>\nCODE;\n\n } else {\n \n\n $html = <<<CODE\n\n<div id=\"wgt_box_{$id}\" class=\"box-form-node has-clearfix\" >\n \n <label \n for=\"wgt-input-{$id}\" \n class=\"box-form-node-label\" >{$helpIcon}{$label}{$pNode->requiredText}</label>\n {$helpText}\n \n <div class=\"box-form-node-element {$pNode->size}\" >\n <input {$codeAttr} />{$appendButton}{$pNode->appendText}\n </div>\n \n</div>\n\nCODE;\n }\n\n return $this->out($html);\n\n }", "title": "" }, { "docid": "83d0d1cf1c73e155d7a33202fbb769e3", "score": "0.5544645", "text": "public function form() {\n $html = 'nothing here';\n\n return $html;\n }", "title": "" }, { "docid": "5d7dfbd1337a7b716016895e4c24d0a8", "score": "0.5535168", "text": "public function testGetHtmlWithAttributes()\n {\n $textField = new TextField('foo', 'bar');\n\n self::assertSame('<input type=\"text\" name=\"foo\" value=\"bar\" required id=\"baz\" readonly>', $textField->getHtml(['id' => 'baz', 'readonly' => true]));\n }", "title": "" }, { "docid": "1db7a172948ee4a916501096179a18f0", "score": "0.5534577", "text": "function input_text($element_name, $values) {\n print '<input type=\"text\" name=\"' . $element_name .'\" value=\"';\n print htmlentities($values[$element_name]) . '\">';\n}", "title": "" }, { "docid": "6ef08d561a434dcbffecc1ad16bff521", "score": "0.55320984", "text": "public function getResultHTMLForm() {\n return '';\n }", "title": "" }, { "docid": "6ef08d561a434dcbffecc1ad16bff521", "score": "0.55320984", "text": "public function getResultHTMLForm() {\n return '';\n }", "title": "" }, { "docid": "7ab78462d19db1c6e52f6613744f626e", "score": "0.55277854", "text": "function input($fieldName, $options = array()){\n if(isset($options['class']) && strstr('required',$options['class'])) {\n $options['label'] .= $this->required();\n }\n return parent::input($fieldName, $options).\"\\n\";\n }", "title": "" }, { "docid": "8cfb4a4d56210501c2986e8a5eb2a5a8", "score": "0.5524666", "text": "function getTextareaFormRow($form, $labelTitle, $valueValue, $ph, $name, $required = FALSE)\n{\n\t$fRow = DOM::create(\"div\", \"\", \"\", \"frow\");\n\t\n\t$input = $form->getTextarea($name, $value = $valueValue, $class = \"finput\", $autofocus = FALSE, $required);\n\tDOM::attr($input, \"placeholder\", $ph);\n\tif (($inputType == \"radio\" || $inputType == \"checkbox\") && $valueValue == 1)\n\t\tDOM::attr($input, \"checked\", \"checked\");\n\t$inputID = DOM::attr($input, \"id\");\n\t$label = $form->getLabel($labelTitle, $for = $inputID, $class = \"flabel\");\n\t\n\t// Append to frow\n\tDOM::append($fRow, $label);\n\tDOM::append($fRow, $input);\n\t\n\treturn $fRow;\n}", "title": "" }, { "docid": "abf4945c44ca0d2182846b19d343a0b2", "score": "0.5523577", "text": "function Text($nameId,$label,$ph = NULL){\n $this->Label($nameId,$label);\n echo \"<input type='text' id='$nameId' name='$nameId' placeholder='$ph'>\";\n }", "title": "" }, { "docid": "04433c6636b3fc2d28e83bbd8fb71494", "score": "0.5510085", "text": "function abt_input_helper_textarea(&$self, $class = '', $label, $name, $value, $description = false){\r\n\t?>\r\n\t\t<div class=\"field\">\r\n\t\t\t<label for=\"<?php echo $self->fieldid($name, 'options') ?>\"><?= _e($label, ABT_Countdown_Timer::N) ?></label>\r\n\t\t\t<textarea <?php if($class){?> class=\"<?= $class ?>\"<?php } ?> name=\"<?php echo $self->fieldname($name, 'options') ?>\" id=\"<?php echo $self->fieldid($name, 'options') ?>\"><?= htmlentities2(stripslashes($value)) ?></textarea>\r\n\t\t\t<?php if($description) { ?><em class=\"description\"><?= __($description, ABT_Countdown_Timer::N) ?></em><?php } //if $description ?>\r\n\t\t</div>\r\n\t<?php\r\n}", "title": "" }, { "docid": "74f515093284276efc6f35a1f644d32d", "score": "0.5507413", "text": "function inputLine( $label = '' , $object ) {\n\t\t$html = new htmlobject( 'div', array('class' => 'input-line' ));\n\t\t$html->add( 'label', '', $label ) ;\n\t\t$html->add( 'div', array( 'class' => 'input-content' ), '', $object ) ; \n\t\treturn $html;\n\t\n\t}", "title": "" }, { "docid": "47b55ac970bc14edc5f1de588f00fe29", "score": "0.5504651", "text": "public function buildInput() {\n\t\t$element = $this->getElement();\n\t\t$element->setAttrib('class', 'cell');\n\t\t$helper = $element->helper;\n\t\t$output = $element->getView()->$helper( $element->getName(),$element->getValue(),$element->getAttribs(),$element->options);\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "31392f0d31854ea0918c4dd470fabdff", "score": "0.54970014", "text": "static function formText(\n\t\t$name,\n\t\t$value = \"\",\n\t\t$attributes = null\n\t) {\n\t\t$inputText = '<input type=\"text\" id=\"@name\" name=\"@name\" @attributes value=\"@value\" />';\n\t\t$inputText = str_replace('@name', $name, $inputText);\n\t\t$inputText = str_replace('@value', $value, $inputText);\n\n\t\tif ( $attributes ) {\n\t\t\t$attrs = '';\n\t\t\tforeach ($attributes as $key => $value) {\n\t\t\t\t$attrs.= \" $key=\\\"$value\\\" \";\n\t\t\t}\n\t\t\t$inputText = str_replace('@attributes', $attrs, $inputText);\n\t\t} else {\n\t\t\t$inputText = str_replace('@attributes', '', $inputText);\n\t\t} // end if then else attributes\n\n\t\treturn $inputText;\n\t}", "title": "" }, { "docid": "d6d27c8eabb4c3967605d2e8f9218eef", "score": "0.549087", "text": "private function getResultField() {\n\t\t$inputField = '<input type=\"text\" name=\"'. $this->nameOfResultField .'\" ';\n\t\tforeach( $this->inputFieldAttributes as $attribute => $value) {\n\t\t\t$inputField .= $attribute .'=\"'. $value .'\" ';\n\t\t}\n\t\t$inputField .= '/>';\n\t\treturn $inputField;\n\t}", "title": "" }, { "docid": "875ead07bcb1fc94fbe0d39d3d38a4da", "score": "0.5488733", "text": "function custom_text_input($cn,$cv)\n{\n return '<input type=\"text\" size=\"45\" maxlength=\"255\" name=\"'.$cn.'\" id=\"'.$cn.'\" value=\"'.formvar($cv).'\" />';\n}", "title": "" }, { "docid": "cacd0b5c5434cb97f7febcb69468970a", "score": "0.548791", "text": "function getFormHTML()\n {\n $html = \"<table width='100%'>\\n\";\n $html .= \"<tr><td width='200'>Assignment Window Size</td><td>\";\n $html .= \"<input type='text' name='windowsize' id='windowsize' value='4' size='10'/></td></tr>\\n\";\n $html .= \"<tr><td>Review Score Threshold</td><td>\";\n $html .= \"<input type='text' name='threshold' id='threshold' value='70' size='10'/>%</td></tr>\";\n $html .= \"</table>\\n\";\n return $html;\n }", "title": "" }, { "docid": "7df341ff0db26d79ece9f4448915fb08", "score": "0.54820955", "text": "public function inputText(string $title, string $text, string $name, $needed=false)\t{\r\n\t\t$this->neededs += array($name=>$needed);\r\n\t\t$this->inputs[] = $name;\r\n\t\treturn \"<label for='{$name}'>{$title}</label><input type='text' id='{$name}' name='{$name}' placeholder='{$text}' value='\". $this->getValueFromArray($name) .\"'>\";\r\n\t}", "title": "" }, { "docid": "93426c9fa8545d7ee8924e197ff60aa0", "score": "0.54739827", "text": "public function markup() {\n\n\t\t// Get value.\n\t\t$value = $this->get_value();\n\n\t\t// Prepare after_input.\n\t\t// Dynamic after_input content should use a callable to render.\n\t\tif ( isset( $this->after_input ) && is_callable( $this->after_input ) ) {\n\t\t\t$this->after_input = call_user_func( $this->after_input, $value, $this );\n\t\t}\n\n\t\t// Prepare markup.\n\t\t// Display description.\n\t\t$html = $this->get_description();\n\n\t\t$html .= sprintf(\n\t\t\t'<span class=\"%s\"><input type=\"%s\" name=\"%s_%s\" value=\"%s\" %s %s />%s %s</span>',\n\t\t\tesc_attr( $this->get_container_classes() ),\n\t\t\tesc_attr( $this->input_type ),\n\t\t\tesc_attr( $this->settings->get_input_name_prefix() ),\n\t\t\tesc_attr( $this->name ),\n\t\t\tesc_attr( htmlspecialchars( $value, ENT_QUOTES ) ),\n\t\t\t$this->get_describer() ? sprintf( 'aria-describedby=\"%s\"', $this->get_describer() ) : '',\n\t\t\timplode( ' ', $this->get_attributes() ),\n\t\t\tisset( $this->append ) ? sprintf( '<span class=\"gform-settings-field__text-append\">%s</span>', esc_html( $this->append ) ) : '',\n\t\t\t$this->get_error_icon()\n\t\t);\n\n\t\t// Insert after input markup.\n\n\t\t$html .= isset( $this->after_input ) ? $this->after_input : '';\n\n\t\treturn $html;\n\n\t}", "title": "" }, { "docid": "6c494a6ca41453fb8342799b616b4ff3", "score": "0.54734087", "text": "protected function getInput()\n\t{\n\t\t$script = \"head.ready(function() {\n\t\tvar s = $('\".$this->id.\"').getElements('input').filter(function(e){\n\t\treturn (e.checked);\n\t\t});\n\t\tif(s[0].get('value') == '\".$this->element['hide'].\"'){\n\t\t\t$('\".$this->element['toggle'].\"').hide();\n\t\t}\n\t\t\t$('\".$this->id.\"').getElements('input').addEvent('change', function(e){\n\t\t\t\tif(e.target.checked == true){\n\t\t\t\t\tvar v = e.target.get('value');\n\t\t\t\t\tif(v == '\".$this->element['show'].\"') {\n\t\t\t\t\t\t$('\".$this->element['toggle'].\"').show();\n\t\t\t\t\t} else{\n\t\t\t\t\t\tif(v == '\".$this->element['hide'].\"') {\n\t\t\t\t\t\t\t$('\".$this->element['toggle'].\"').hide();\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\tFabrikHelperHTML::addScriptDeclaration($script);\n\t\treturn parent::getInput();\n\n\t}", "title": "" }, { "docid": "86dc8e292e5572b70ebebef3b9fe2539", "score": "0.54666114", "text": "protected function generate()\n {\n $this->formElement = '';\n $divider = '';\n \n foreach ($this->elementParams['options'] as $option)\n {\n // Check that Value / Label is specified\n $value = isset($option['value']) ? $option['value'] : '';\n $label = isset($option['label']) ? $option['label'] : '';\n $labelClass = isset($option['labelClass']) ? $option['labelClass'] : '';\n $isHTML = isset($option['isHTMLLabel']) ? $option['isHTMLLabel'] : FALSE;\n $disabled = (isset($option['disabled']) && $option['disabled']) ? 'disabled=\"disabled\"' : '';\n \n // Generate a UniqueId based on Value\n $id = md5($this->elementId.'_'.$value);\n \n $checked = $this->isChecked($value) ? 'checked=\"checked\"' : '';\n \n $params = [\n 'id' => $id,\n 'name' => $this->elementParams['name'].$this->elementNameSuffix,\n 'type' => $this->inputType,\n 'value' => htmlspecialchars($value),\n 'class' => $this->elementParams['cssClass'],\n 'style' => $this->elementParams['style'],\n ];\n \n $this->formElement .= $divider.\"<label for=\\\"{$id}\\\" class=\\\"nowrap {$labelClass}\\\">\";\n $this->formElement .= \"<input {$this->keyValuesToString($params)} {$checked} {$disabled}/> \";\n $this->formElement .= $isHTML ? $label : htmlspecialchars($label);\n $this->formElement .= \"</label>\";\n \n $divider = $this->elementParams['divider'];\n }\n \n if (!empty($this->elementParams['label'])) {\n $this->labelElement = '<label for=\"'.$this->elementId.'\">'.htmlspecialchars($this->elementParams['label']).'</label>';\n }\n }", "title": "" }, { "docid": "d3782a66a804ca53b2e7b168638d8a1d", "score": "0.54611415", "text": "public function outputHTML(){\n\t\t//hidden field with same name is so we get a post value regardless of tick status\n\t\tif($this->postVal($this->_id)!==false){\n\t\t\t$selectedStr=htmlspecialchars($this->postVal($this->_id));\n\t\t}else{\n\t\t\t$selectedStr=htmlspecialchars($this->_defaultVal);\n\t\t}\n\t\tif($this->_required===true){\n\t\t\t$a_classes[]='required'; // for jquery validate (or for custom CSSing :) )\n\t\t}\n\t\t\n\t\t$s_ret='<textarea id=\"'.htmlspecialchars($this->_id).'\" rows=\"'.htmlspecialchars($this->_rows).'\" cols=\"'.htmlspecialchars($this->_columns).'\" name=\"'.htmlspecialchars($this->_id).'\"';\n\t\t//add classes last\n\t\t$s_ret.=' '.$this->processExtraAttribsToStr($a_classes).'>'.$selectedStr.'</textarea>';\n\t\treturn $s_ret;\n\t}", "title": "" }, { "docid": "04e47b51947eff77ab2beaf4b3630b42", "score": "0.54549277", "text": "function form_input($data='', $value='', $label='', $extra='', $tooltip = '')\n\t{\n\t\treturn _form_common('text', $data, $value, $label, $extra, $tooltip);\n\n\t}", "title": "" }, { "docid": "4a0c1e2812e43ed010bb3b2564e3abfe", "score": "0.5453617", "text": "function form_checkbox($name, $value, $text = null, $checked = false, $custom_html = null, $class = 'bhinputcheckbox', $id = null)\n{\n $id = $id ? $id : form_unique_id($name);\n\n $html = \"<span class=\\\"$class\\\">\";\n $html .= \"<input type=\\\"checkbox\\\" name=\\\"$name\\\" id=\\\"$id\\\" value=\\\"$value\\\"\";\n\n if ($checked) {\n $html .= \" checked=\\\"checked\\\"\";\n }\n\n if (isset($custom_html) && is_string($custom_html)) {\n $html .= sprintf(\" %s\", trim($custom_html));\n }\n\n $html .= \" />\";\n\n if (is_array($text) && sizeof($text) > 0) {\n\n $html .= \"<label for=\\\"$id\\\">\";\n\n foreach ($text as $text_part) {\n\n if (!strstr($text_part, \"<\")) {\n\n $html .= $text_part;\n\n } else {\n\n $html .= \"</label>$text_part<label for=\\\"$id\\\">\";\n }\n }\n\n $html .= \"</label>\";\n\n } else if (isset($text) && is_string($text)) {\n\n $html .= \"<label for=\\\"$id\\\">$text</label>\";\n }\n\n return $html . \"</span>\";\n}", "title": "" }, { "docid": "1a678155a66116f7c21a0d670157f988", "score": "0.54472476", "text": "function getTextField($form, $name, $default='') \n {\n $app = factory::getApplication();\n $lang = factory::getLanguage();\n \n $html = \"\";\n\n foreach($this->getForm($form) as $field) {\n //text inputs...\n if($field['name'] == $name) {\n\t\t\t\t$field[0]->readonly == 'true' ? $readonly = \"readonly='true'\" : $readonly = \"\";\n $field[0]->disabled == 'true' ? $disabled = \"disabled='disabled'\" : $disabled = \"\";\n $field[0]->onchange != \"\" ? $onchange = 'onchange=\"'.$field[0]->onchange.'\"' : $onchange = \"\";\n $field[0]->onkeyup != \"\" ? $onkeyup = \" onkeyup='\".$field[0]->onkeyup.\"'\" : $onkeyup = \"\";\n if($field[0]->type != 'hidden') $html .= \"<div id='\".$field[0]->name.\"-field' class='form-group'>\"; \n if($field[0]->type != 'hidden' && $field[0]->label != \"\") $html .= \"<label for='\".$field[0]->id.\"'><a class='hasTip' title='\".$lang->get($field[0]->placeholder).\"'>\".$lang->get($field[0]->label).\"</a></label>\";\n if($field[0]->type != 'hidden' && $field[0]->label != \"\") $html .= \"<div class='controls'>\";\n $html .= \"<input type='\".$field[0]->type.\"' id='\".$field[0]->id.\"' value='\".str_replace(\"'\",\"&#39;\",$default).\"' name='\".$field[0]->name.\"'\";\n if($field[0]->type != 'hidden') $html .= $disabled.\" data-message='\".$lang->get($field[0]->message).\"' \".$onchange.\" \".$onkeyup.\" \".$readonly.\" placeholder='\".$lang->get($field[0]->placeholder).\"' class='form-control \".$field[0]->clase.\"' autocomplete='off'\";\n $html .= \">\";\n //if($field[0]->type != 'hidden') $html .= \"<span id='\".$field[0]->name.\"-msg'></span>\";\n if($field[0]->type != 'hidden' && $field[0]->label != \"\") $html .= \"</div>\";\n if($field[0]->type != 'hidden') $html .= \"</div>\";\t\t\t\t\n }\n }\n return $html;\n }", "title": "" }, { "docid": "3da23c3951f90e1c30daae2d3853936d", "score": "0.54302555", "text": "public function html()\r\n {\r\n return $this->app->jbhtml->text(\r\n $this->_getName(),\r\n $this->_value,\r\n $this->_attrs,\r\n $this->_getId()\r\n );\r\n }", "title": "" }, { "docid": "94d9c2d793caf1c8b7915ef63d36465c", "score": "0.5419277", "text": "public function getHtml()\n {\n return $this->input('html');\n }", "title": "" }, { "docid": "b01531a82e148c45775cf6949822ecf3", "score": "0.541759", "text": "public function returnField()\n {\n return sprintf('<input type=\"%1$s\" id=\"%2$s-%3$s\" name=\"%2$s[%3$s]\" value=\"\" class=\"%4$s\" %5$s />', $this->fieldType, $this->formName, $this->fieldSlug, $this->classlist, $this->buildAttributeString());\n }", "title": "" }, { "docid": "0ba65e920957b51e38864b5f28e4d11c", "score": "0.54126483", "text": "public function build()\n {\n $class = '';\n if ($this->isRowBool || $this->showLabelBool) {\n $class = 'form-control text';\n }\n return <<<HTML\n<div class=\"{$class}\" id=\"{$this->getClass()}\" style=\"{$this->style}\" {$this->buildAttribute()}>{$this->getValue()}</div>\nHTML;\n }", "title": "" }, { "docid": "46d669ac0d031c97a251a0639d05d967", "score": "0.5403064", "text": "public static function input(array $options = []) {\n\t\t// Check for and retrive the possible options.\n\t\t$type = array_key_exists('type', $options) ? $options['type'] : \"\";\n\t\t$name = array_key_exists('name', $options) ? $options['name'] : \"\";\n\t\t$id = array_key_exists('id', $options) ? $options['id'] : \"\";\n\t\t$value = array_key_exists('value', $options) ? $options['value'] : \"\";\n\t\t$class = array_key_exists('class', $options) ? $options['class'] : \"\";\n\t\t$style = array_key_exists('style', $options) ? $options['style'] : \"\";\n\t\t$label = array_key_exists('label', $options) ? $options['label'] : \"\";\n\n\t\t// Prepare a variable to hold the output.\n\t\t$output = \"\";\n\n\t\t// FIELD LABEL\n\t\t// Check if the field has a label specified along with either an ID or a name.\n\t\tif($label != '' && ($id != '' || $name != '')) {\n\t\t\t// Output the start of the label tag upto the for attribute.\n\t\t\t$output .= '<label for=\"';\n\t\t\t// Determine if the label is for the field's ID or Name.\n\t\t\tif($id != '')\n\t\t\t\t// Its for the ID, output the ID.\n\t\t\t\t$output .= $id;\n\t\t\telse\n\t\t\t\t// Its for the Name, output the Name.\n\t\t\t\t$output .= $name;\n\t\t\t// Output the rest of the opening Label tag (also closing the for attribute).\n\t\t\t$output .= '\">';\n\t\t\t// Output the label text.\n\t\t\t$output .= $label;\n\t\t\t// Output the closing Label tag.\n\t\t\t$output .= '</label>';\n\t\t}\n\n\t\t// THE FIELD\n\t\t// Output the start of the Input field.\n\t\t$output .= '<input';\n\t\t// Check for and output the Type attribute.\n\t\tif($type != '') $output .= ' type=\"' . $type . '\"';\n\t\t// Check for and output the Name attribute.\n\t\tif($name != '')\t$output .= ' name=\"' . $name . '\"';\n\t\t// Check for and output the ID attribute.\n\t\tif($id != '') $output .= ' id=\"' . $id . '\"';\n\t\t// If no ID, check if a label and name have been specified, and output name as ID.\n\t\telse if($label != '' && $name != '') $output .= ' id=\"' . $name . '\"';\n\t\t// Check for and output the class attribute.\n\t\tif($class != '') $output .= ' class=\"' . $class . '\"';\n\t\t// Check for and output the style attribute.\n\t\tif($style != '') $output .= ' style=\"' . $style . '\"';\n\t\t// Check for and output the value attribute.\n\t\tif($value != '') $output .= ' value=\"' . $value . '\"';\n\t\t// Output the end of the input tag.\n\t\t$output .= \">\\n\";\n\n\t\t//return ($label != '' && ($id != '' || $name != '') ? '<label for=\"' . ($id != '' ? $id : $name) . '\">' . $label . '</label>' : '') . '<input' . ($type != \"\" ? ' type=\"' . $type . '\"' : '') . ($name != \"\" ? ' name=\"' . $name . '\"' . ($id != \"\" ? ' id=\"' . $id . '\"' : ($label != '' ? ' id=\"' . $name . '\"' : '')) : ($id != '' ? ' id=\"' . $id . '\"' : '')) . ($value != \"\" ? ' name=\"' . $name . '\"' : '') . \">\\n\";\n\n\t\t// Return everything to output.\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "6a8493ee77e86880e2ec7763e6d4bdf1", "score": "0.54021734", "text": "public function html() {\n\t\techo '<input type=\"text\" name=\"' .\n\t\t\tesc_attr( $this->name ) .\n\t\t\t'\" value=\"' .\n\t\t\tesc_attr( get_option( $this->name, $this->default_value ) ) .\n\t\t\t'\" class=\"regular-text\">';\n\t}", "title": "" }, { "docid": "4ec24f04ebf7307d9f8ef78b804e5170", "score": "0.5397508", "text": "protected function buildEmpty(): string\n {\n return <<<HTML\n<div class=\"input-group\" style=\"width: 100%;{$this->style}\">\n <span class=\"input-group-addon\" style=\"display: {$this->hideIconBool};\"><i class=\"fa fa-pencil fa-fw\"></i></span>\n <input type=\"text\" id=\"{$this->getClass()}\" name=\"{$this->getName()}\" disabled value=\"\" class=\"form-control text\" placeholder=\"输入{$this->getPlaceholder()}\" {$this->buildAttribute()}> \n</div>\nHTML;\n }", "title": "" }, { "docid": "90676470d62ab588ddd59db0c9dea8ac", "score": "0.5387124", "text": "protected function formFieldContent($name) {\n echo '<div class = \"col-sm-2 col-md-1\">';\n $this->formFieldLabel($name);\n echo '</div>';\n\n echo '<div class = \"col-sm-6\">';\n $this->formFieldInput($name);\n echo '</div>';\n\n echo '<div class = \"col-sm-4 col-md-5 text-danger\">';\n $this->formFieldError($name);\n echo '</div>';\n }", "title": "" }, { "docid": "573c42a162dddf2739e2e9ac08b543be", "score": "0.53842515", "text": "public function wysiwyg(\n $label,\n $name,\n $value = null,\n $attributes = [],\n $params = null\n ) {\n\n $pNode = $this->prepareParams($params);\n\n if (isset($attributes['id'])) {\n $id = $this->inpIdPrefix.$attributes['id'];\n $inpName = $name;\n } else {\n\n $tmp = explode(',', $name);\n\n if (count($tmp) > 1) {\n $id = $this->inpIdPrefix.$tmp[0].\"-\".$tmp[1];\n $inpName = $tmp[0].\"[{$tmp[1]}]\";\n } else {\n $id = str_replace(['[',']'], ['-',''], $this->inpIdPrefix.$tmp[0]);\n $inpName = $tmp[0];\n }\n\n $attributes['id'] = \"wgt-wysiwyg-{$id}\";\n }\n\n $attributes['style'] = \"width:700px;height:220px;\";\n $attributes['class'] = 'wcm wcm_ui_wysiwyg ';//.$pNode->size;\n\n if ($this->id)\n $attributes['class'] .= ' asgd-'.$this->id;\n\n if (!isset($attributes['name']))\n $attributes['name'] = $inpName;\n\n $codeAttr = Wgt::asmAttributes($attributes);\n\n $helpIcon = '';\n $helpText = '';\n if ($pNode->helpText) {\n $helpIcon = '<span onclick=\"$S(\\'#wgt-input-help-'.$id.'\\').modal();\" ><i class=\"fa fa-question-sign\" ></i></span> ';\n $helpText = '<div id=\"wgt-input-help-'.$id.'\" class=\"template\" >'.$pNode->helpText.'</div>';\n }\n\n if ($pNode->plain) {\n $html = <<<CODE\n\n<textarea {$codeAttr}>{$value}</textarea>\n\nCODE;\n\n return $this->out($html);\n }\n\n $html = <<<CODE\n\n<div id=\"wgt_box_{$id}\" class=\"box-form-node has-clearfix\" >\n <label for=\"wgt-input-{$id}\" class=\"box-form-node-label\">{$helpIcon}{$label}{$pNode->requiredText}</label>\n {$helpText}\n <div class=\"box-form-node-element {$pNode->size} left\" >\n <textarea {$codeAttr}>{$value}</textarea>\n </div>\n {$pNode->appendText}\n</div>\n\nCODE;\n\n //<var id=\"{$id}-cfg-wysiwyg\" >{\"mode\":\"{$mode}\"}</var>\"\n return $this->out($html);\n\n }", "title": "" }, { "docid": "cef15d512fc8cf22961fd36734053783", "score": "0.5383051", "text": "public function toHTML() {\n return '<label ' . buildAttributes($this->attrs()) . '>' . $this->val() . '</label>';\n }", "title": "" }, { "docid": "d8d9c41097535b841296b08b8e44efa4", "score": "0.5382274", "text": "function input( $type,$id,$class,$name,$title,$value,$placeholder,$autocomplete,$vectorhtml,$Script,$styles='',$Pattern='',$np_app=''){\r\n \r\n print('<input type=\"'.$type.'\" id=\"'.$id.'\" class=\"'.$class.'\" name=\"'.$name.'\" title=\"'.$title.'\" value=\"'.$value.'\" placeholder=\"'.$placeholder.'\" autocomplete=\"'.$autocomplete.'\" '.$Script.' '.$styles.' '.$np_app.' '.$Pattern.' required>');\r\n }", "title": "" }, { "docid": "50b846548cd988d4383f6492c7ded645", "score": "0.5379823", "text": "public function render_form_element( string $name, array $attributes = array() ) : string {\n\t\t\t// define variables.\n\t\t\t$type = null;\n\t\t\t$label = null;\n\t\t\t$size = null;\n\t\t\t$tip = null;\n\t\t\t$options = null;\n\t\t\t$value = null;\n\t\t\t$default = null;\n\n\t\t\t// populate variables.\n\t\t\textract( $attributes, EXTR_IF_EXISTS );\n\n\t\t\tif ( ! isset( $type, $label ) ) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tif ( ! isset( $value ) ) {\n\t\t\t\t$value = $this->helper_get_default_value( $type, $default );\n\t\t\t} elseif ( ( 'number' === $type ) && ( '' === $value ) ) {\n\t\t\t\t$value = $this->helper_get_default_value( $type, $default );\n\t\t\t}\n\n\t\t\t// name as a string.\n\t\t\t$name_str = $name;\n\n\t\t\t// plugin options page layout.\n\t\t\t$label_start = '<tr><th scope=\"row\">';\n\t\t\t$label_end = '</th>';\n\t\t\t$field_start = '<td>';\n\t\t\t$field_end = '</td></tr>';\n\t\t\t$tip_element = 'div';\n\n\t\t\tif ( $size <= 2 ) {\n\t\t\t\t$classname = 'tiny-text';\n\t\t\t} elseif ( $size <= 4 ) {\n\t\t\t\t$classname = 'small-text';\n\t\t\t} elseif ( $size <= 37 ) {\n\t\t\t\t$classname = 'regular-text';\n\t\t\t} else {\n\t\t\t\t$classname = 'large-text';\n\t\t\t}\n\n\t\t\t// same.\n\t\t\t$id = $name_str;\n\n\t\t\t/**\n\t\t\t* Load the HTML template\n\t\t\t* The supplied arguments will be available to this template.\n\t\t\t*/\n\n\t\t\t/**\n\t\t\t * Turn on output buffering.\n\t\t\t * This stores the HTML template in the buffer\n\t\t\t * so that it can be output into the content\n\t\t\t * rather than at the top of the page.\n\t\t\t */\n\t\t\tob_start();\n\n\t\t\trequire $this->get_path() . 'vendor/dotherightthing/wpdtrt-plugin-boilerplate/views/form-element-' . $type . '.php';\n\n\t\t\t/**\n\t\t\t * Get current buffer contents and delete current output buffer.\n\t\t\t */\n\t\t\treturn ob_get_clean();\n\t\t}", "title": "" }, { "docid": "33b03030d4ecf47fe4c940a6f97d851b", "score": "0.537811", "text": "public function input_text($value, $placeholder, $options);", "title": "" }, { "docid": "06008cf07f564a1aa990fb7d5db57085", "score": "0.53660774", "text": "function textbox($name, $id=False, $value=False, $attrs=Array()) {\n\treturn input('text',$name, $id, $value, $attrs);\n}", "title": "" }, { "docid": "b46072c183dc7315fe5f219520cb15d8", "score": "0.5356391", "text": "protected function _displayFormInput($inputNameStem, $value, $options=array())\n {\n \n if(plugin_is_active('SimpleVocab')) {\n $simpleVocabTerm = get_db()->getTable('SimpleVocabTerm')->findByElementId($this->_element->id);\n if ($simpleVocabTerm){\n $terms = explode(\"\\n\", $simpleVocabTerm->terms);\n $selectTerms = array('' => 'Select Below') + array_combine($terms, $terms);\n return get_view()->formSelect(\n $inputNameStem . '[text]', \n $value, \n array('style' => 'width: 250px; font-size:20px; margin-left:3px;'), \n $selectTerms\n );\n }\n }\n \n $fieldDataType = $this->_getElementDataType();\n\n // Plugins should apply a filter to this blank HTML in order to display it in a certain way.\n $html = '';\n\n $filterName = $this->_getPluginFilterForFormInput();\n\n //$html = apply_filters($filterName, $html, $inputNameStem, $value, $options, $this->_record, $this->_element);\n $html = apply_filters($filterName, $html, array('view'=>$this));\n \n // Short-circuit the default display functions b/c we already have the HTML we need.\n if (!empty($html)) {\n return $html;\n }\n\n $classtype = 'textinput';\n $classtype .= $this->_annotationTypeElement->date_range_picker ? ' date_range_picker' : '';\n $classtype .= $this->_annotationTypeElement->date_picker ? ' date_picker' : '';\n $classtype .= $this->_annotationTypeElement->autocomplete ? ' autocomplete' : '';\n $classtype .= $this->_annotationTypeElement->field_scroll ? ' field_scroll' : '';\n\n if($this->_annotationTypeElement->long_text) {\n $html = $this->view->formTextarea(\n $inputNameStem . '[text]',\n $value,\n array('element-name'=>$this->_element->name, 'class'=> $classtype, 'rows'=>15, 'cols'=>120));\n }\n else{\n $html = $this->view->formText(\n $inputNameStem . '[text]',\n $value,\n array('element-name'=>$this->_element->name, \n 'class'=> $classtype,\n 'style' => 'width: 250px; font-size:16px; margin-left:3px;')\n );\n }\n \n $html .= $this->_getControlsComponent(); //remove button\n \n return $html;\n }", "title": "" }, { "docid": "0594e7178f6318abfd140f8db38c14ac", "score": "0.5347533", "text": "function input_bootstrap($field, $prepend = FALSE)\n {\n $output = '';\n if ( ! isset($field['type']))\n {\n $field['type'] = 'text';\n }\n if ( ! isset($field['lang']))\n {\n $field['lang'] = 'test';\n }\n $CI = &get_instance();\n $CI->load->helper('html');\n $output .= PHP_EOL . comment_tag($field['name'] . ' [' . $field['type'] . ']');\n $tmp = (form_error($field['name']) == '') ? '' : ' error';\n $output .= '<div class=\"control-group' . $tmp . '\">' . PHP_EOL;\n\n if (isset($field['lang']['main_lang']))\n {\n $output .= sprintf(lang($field['lang']['main_lang'], $field['name'], array(\n 'class' => 'control-label',\n )), $field['lang']['sprintf']) . PHP_EOL;\n }\n else\n {\n $lang_or_label = 'lang';\n if (isset($field['ingnore_lang']))\n {\n if ($field['ingnore_lang'] === TRUE)\n {\n $lang_or_label = 'form_label';\n }\n }\n $output .= $lang_or_label($field['lang'], $field['name'], array(\n 'class' => 'control-label',\n )) . PHP_EOL;\n }\n $output .= '<div class=\"controls\">' . PHP_EOL;\n\n if ($prepend)\n {\n $output .= '<div class=\"input-prepend\"> <span class=\"add-on\">' . $prepend . '</span>';\n }\n if (isset($field['lang']))\n {\n /**\n * remove lang, to exclude in attributes in form_inputs\n */\n unset($field['lang']);\n }\n switch ($field['type'])\n {\n case 'text':\n case 'password':\n $field['id'] = $field['name'];\n switch ($field['type'])\n {\n case 'text':\n $output .= form_input($field);\n break;\n case 'password':\n $output .= form_password($field);\n break;\n default:\n /**\n * not supposed to be here.\n * impossible\n * --Lloric\n */\n show_error('No valid type of form input defined, either text or password.');\n break;\n }\n break;\n case 'textarea':\n $output .= form_textarea($field);\n break;\n case 'file':\n $output .= form_upload($field);\n break;\n case 'dropdown':\n case 'multiselect':\n $default_value = (isset($field['default'])) ? $field['default'] : NULL;\n switch ($field['type'])\n {\n\n case 'dropdown':\n $extra = array('style' => 'width: 220px');\n if (isset($field['extra']))\n {\n $extra = array_merge($extra, $field['extra']);\n }\n $output .= form_dropdown($field['name'], $field['value'], set_value($field['name'], $default_value), $extra);\n break;\n case 'multiselect':\n $output .= form_multiselect($field['name'], $field['value'], $CI->input->post($field['name'], TRUE));\n break;\n default:\n /**\n * not supposed to be here.\n * impossible\n * --Lloric\n */\n show_error('No valid type of form input defined, either dropdown or multiselect.');\n break;\n }\n break;\n case 'radio':\n case 'checkbox':\n if (isset($field['fields']))\n {\n $labels = $field['fields'];\n\n if ( ! is_array($labels))\n {\n $labels = array($labels);\n }\n switch ($field['type'])\n {\n case 'checkbox':\n case 'radio':\n foreach ($labels as $k => $v)\n {\n $defaut = NULL;\n $lang_ = NULL;\n\n $ignore = FALSE;\n if (isset($field['field_lang']))\n {\n if ( ! $field['field_lang'])\n {\n /**\n * no need lang\n */\n $lang_ = $v;\n $ignore = TRUE;\n }\n }\n\n if ( ! $ignore)\n {\n if (is_numeric($v))\n {\n /**\n * no need lang if numeric\n */\n $lang_ = $v;\n }\n else\n {\n\n $lang_ = lang($v);\n }\n }\n\n switch ($field['type'])\n {\n case 'checkbox':\n if (isset($field['value_is_one_name_is_label']))\n {\n $defaut = (bool) $CI->input->post(strtolower($lang_ . $field['append_name']), TRUE);\n }\n elseif (isset($field['default']) && ((int) count((array) $CI->input->post($field['name'], TRUE)) === 0))\n {\n $field_default = $field['default'];\n if ( ! is_array($field_default))\n {\n $field_default = array($default_value);\n }\n $defaut = (bool) in_array($k, $field_default);\n }\n else\n {\n $defaut = (bool) in_array($k, (array) $CI->input->post($field['name'], TRUE));\n }\n break;\n case 'radio':\n $defaut = ($field['value'] == $k);\n break;\n }\n\n $form_ = 'form_' . $field['type'];\n if (isset($field['value_is_one_name_is_label']))\n {\n $output .= form_label($form_(strtolower($lang_ . $field['append_name']), 1, $defaut) . ' ' . $lang_) . PHP_EOL;\n }\n else\n {\n $output .= form_label($form_($field['name'], $k, $defaut) . ' ' . $lang_) . PHP_EOL;\n }\n }\n break;\n// case 'checkbox':\n// foreach ($labels as $v)\n// {\n// $defaut = ($field['value'] == $v['value']);\n// $output .= form_label(form_checkbox($field['name'], $v['value'], $defaut) . ' ' . $v['label']) . PHP_EOL;\n// }\n// break;\n default:\n /**\n * not supposed to be here.\n * impossible\n * --Lloric\n */\n show_error('No valid type of form input defined, either radio or checkbox.');\n break;\n }\n }\n break;\n default:\n show_error('No valid type of form input defined.');\n break;\n }\n if ($prepend)\n {\n $output .= '</div>';\n }\n if (isset($field['note']))\n {\n $output .= '<span class=\"help-block\">' . lang($field['note']) . '</span>' . PHP_EOL;\n }\n $output .= form_error($field['name']) . PHP_EOL;\n $output .= '</div>' . PHP_EOL;\n $output .= '</div>' . PHP_EOL;\n $output .= comment_tag('end-' . $field['name'] . ' [' . $field['type'] . ']') . PHP_EOL;\n\n return $output;\n }", "title": "" }, { "docid": "b3350416834cd903b0a57f10cd32ca16", "score": "0.5342955", "text": "function text ($args){\t\n\t\t$this->openTemplateForm($args);\n\t\t?>\t\t\n\t\t<tr>\n\t\t\t<td colspan=\"2\">\n\t\t\t\t<input type=\"text\" name=\"<?php if(isset($args['dataname'])) echo $args['dataname']; else echo 'inputtext'; ?>\" <?php if(isset($args['required']) AND $args['required'] == 1) echo 'required'; ?> <?php if(isset($args['readonly']) AND $args['readonly'] == 1) echo 'readonly'; ?> style=\"width:<?php $w = isset($args['width']) ? $args['width'] : '50%'; echo $w; ?>\" id=\"<?php if(isset($args['filesid'])) echo replace_text($args['filesid']); else echo 'textid'; ?>\" value=\"<?php echo str_replace(\"\\&quot;\",\"\",stripslashes($args['value'])); ?>\" /> \n\t\t\t</td>\n\t\t</tr>\t\t\n\t\t<?php\t\t\n\t\t$this->closeTemplateForm();\n\t}", "title": "" }, { "docid": "86ce3b5787cfa2b94d07f574cf858eb7", "score": "0.5342609", "text": "public function getElementHtml()\n\t{\n\t\t\tMage::log(' ---------- Trio_Wizard_Block_Adminhtml_Wizard_Edit_Tab_Scopetype 777777777 /n');\n\t\t$disabled = false;\n\t\tif (!$this->getValue()) {\n\t\t$this->setData('disabled', 'disabled');\n\t\t$disabled = true;\n\t\t}\n\t\t \n\t\t$html = parent::getElementHtml();\n\t\t$htmlId = 'use_config_' . $this->getHtmlId();\n\t\t$html .= $this->getId() . '\"';\n\t\t$html .= ($disabled ? ' checked=\"checked\"' : '') . ($this->getReadonly()? ' disabled=\"disabled\"':'');\n\t\t$html .= ' onclick=\"toggleValueElements(this, this.parentNode);\" class=\"checkbox\" type=\"checkbox\" />';\n\t\t$html .= ' <label for=\"' . $htmlId . '\">' . $this->getCheckboxLabel() . '</label>';\n\t\t$html .= 'toggleValueElements($(\\'' . $htmlId . '\\'), $(\\'' . $htmlId . '\\').parentNode);';\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "b437ee5887f9a686ed1fabcdf47a9989", "score": "0.5327754", "text": "public function getLabel()\n {\n $open_html = \"<div class=\\\"control-label\\\"><span class=\\\"span-label\\\">\";\n $close_html = '</span></div>';\n $html = '';\n $label = $this->currentField->getLabelOption();\n\n if ($label) {\n $label = $this->currentField->getSetting( 'label' );\n\t $label .= $this->currentField->getSetting( 'required' ) ? '*' : '';\n $html = \"{$open_html}{$label} {$close_html}\";\n }\n\n return $html;\n }", "title": "" }, { "docid": "d38c60fe4a24dcb8383d80743ba67d2d", "score": "0.53240424", "text": "public function inputText()\n {\n return $this->inputText;\n }", "title": "" }, { "docid": "f2ef11d9d913d5161af7cd612d856bc5", "score": "0.53229487", "text": "function textFields($className, $name, $value, $yii_t_label) {\n\tif (is_array($value)) {\n\t\t$result = '';\n\t\tforeach($value as $key=>$val) {\n\t\t\t$result .= textFields($className, $name .'['.$key.']', $val, $yii_t_label.'.'.$key);\n\t\t}\n\t} else {\n\t\t$id = $className.'_value';\n\t\t$result = \n\t\t\t'<label for=\"'.$id.'\">'.\n\t\t\t\tModule::t('settings', $yii_t_label).':'.\n\t\t\t\tHtml::textInput($name, $value).\n\t\t\t'</label>';\n\t}\n\treturn $result;\n}", "title": "" }, { "docid": "56dc2e4029d04537521a107233b68a9e", "score": "0.5322721", "text": "function get_input_element(){\n //\n //\n //Fields named 'valid' or prefixed by is_ are boolean \n if ($this->name=='valid'){\n return new input_checkbox($this);\n }\n //\n //Interger fields of size will be considered boolean\n if (isset($this->length) && $this->length==1){\n return new input_checkbox($this);\n }\n //\n //Any field longer than 100 characters witth be considered a text area\n if (isset($this->length) && $this->length>100){\n return new input_textarea($this);\n }\n //\n //By default, the input tag will be used for capruring inputs\n return new input($this);\n }", "title": "" }, { "docid": "71f8af7cee906f9ae809de1633f082a4", "score": "0.53155625", "text": "public function displayTextBox($name) {\r\n\t\treturn($this->textbox[$name]['html']);\r\n\t}", "title": "" }, { "docid": "7cd4a6320886b835f2b166de86c5e6a8", "score": "0.53105736", "text": "function form_field($name, $value = null, $width = null, $maxchars = null, $type = 'text', $custom_html = null, $class = 'bhinputtext', $placeholder = null, $id = null)\n{\n $id = $id ? $id : form_unique_id($name);\n\n $html = \"<input type=\\\"$type\\\" name=\\\"$name\\\" id=\\\"$id\\\" class=\\\"$class\\\" value=\\\"$value\\\"\";\n\n if (isset($custom_html) && is_string($custom_html)) {\n $html .= sprintf(\" %s\", trim($custom_html));\n }\n\n if (is_numeric($width)) {\n $html .= \" size=\\\"$width\\\"\";\n }\n\n if (is_numeric($maxchars)) {\n $html .= \" maxlength=\\\"$maxchars\\\"\";\n }\n\n if (isset($placeholder) && is_string($placeholder)) {\n $html .= \" placeholder=\\\"$placeholder\\\"\";\n }\n\n return $html . \" dir=\\\"\" . gettext(\"ltr\") . \"\\\" />\";\n}", "title": "" }, { "docid": "6b36d0f17cbd4b79a10345ea4765386e", "score": "0.5310488", "text": "protected function get_field_html(){ echo 'this field needs to implement get_field_html()'; }", "title": "" }, { "docid": "7ecc94c29954c7b37191901ba3cda5d2", "score": "0.5306665", "text": "function return_textarea($name, $label, $value='', $required=false) {\r\n if ($required) $req = 'required';\r\n\telse $req = '';\r\n return '\r\n <div class=\"form-group\">\r\n <label for=\"'.$name.'\">'.$label.'</label>\r\n <textarea class=\"form-control\" name=\"'.$name.'\" id=\"'.$name.'\" rows=\"10\" '.$req.'>'.$value.'</textarea>\r\n </div>';\r\n}", "title": "" }, { "docid": "b328865aa86493c90f3b49344436ee0e", "score": "0.5304196", "text": "function getTextareaField($form, $name, $default='') \n {\n $app = factory::getApplication();\n $lang = factory::getLanguage();\n \n $html = \"\";\n\n foreach($this->getForm($form) as $field) {\n //text inputs...\n if($field['name'] == $name) {\n $field[0]->disabled == 'true' ? $disabled = \"disabled='disabled'\" : $disabled = \"\";\n $field[0]->onchange != \"\" ? $onchange = \"onchange='\".$field[0]->onchange.\"'\" : $onchange = \"\";\n\n $html .= \"<div id='\".$field[0]->name.\"-field' class='form-group'>\"; \n if($field[0]->label != \"\") $html .= \"<label for='\".$field[0]->id.\"'><a class='hasTip' title='\".$lang->get($field[0]->placeholder).\"'>\".$lang->get($field[0]->label).\"</a></label>\";\n if($field[0]->label != \"\") $html .= \"<div class='controls'>\";\n $html .= \"<textarea id='\".$field[0]->id.\"' maxlength='\".$field[0]->maxlength.\"' placeholder='\".$field[0]->placeholder.\"' name='\".$field[0]->name.\"' rows='\".$field[0]->rows.\"' cols='\".$field[0]->cols.\"' class='form-control' \".$disabled.\" \".$onchange.\">\".$default.\"</textarea>\"; \n //$html .= \"<span id='\".$field[0]->name.\"-msg'></span>\";\n if($field[0]->label != \"\") $html .= \"</div>\";\n $html .= \"</div>\";\n }\n }\n\t\n return $html;\n }", "title": "" }, { "docid": "ed48889e4e95d9ff7e50586ae573476d", "score": "0.5299394", "text": "public function build_form_input( $element )\n\t{\n\t\treturn $element->class( 'form-control' );\n\t}", "title": "" }, { "docid": "d4145af6fd9fe541c0a0dd19f135b406", "score": "0.52976954", "text": "private static function text_input($class = '', $val = '') {\n self::$iterator = self::$iterator ? self::$iterator + 1 : 1;\n $before = '';\n if (self::$field['type'] == 'text_money')\n $before = !empty(self::$field['before']) ? ' ' : '$ ';\n return $before . '<input type=\"' . self::$type . '\" class=\"' . $class . '\" name=\"' . self::$field['id'] . '[]\" id=\"' . self::$field['id'] . '_' . self::$iterator . '\" value=\"' . $val . '\" data-id=\"' . self::$field['id'] . '\" data-count=\"' . self::$iterator . '\"/>';\n }", "title": "" }, { "docid": "d2fae8a380012f34f500f56c979cdda4", "score": "0.5297426", "text": "abstract public function getText();", "title": "" }, { "docid": "83df58ca1c24681002688644feccb854", "score": "0.52959204", "text": "function custom__input($cn,$cv)\n{\n return custom_text_input($cn,$cv);\n}", "title": "" }, { "docid": "4d24a0eaf3adb3a6c1e6b76e0d3d44de", "score": "0.52958393", "text": "public function display()\n\t{\n\t\t$output = \"\";\n\t\t\n\t\t// Affichage du champ de saisie\n\t\t$output .= \"<textarea\";\n\t\t/// ID HTML\n\t\t$output .= \" id=\\\"\". $this->getInputID() .\"\\\"\";\n\t\t/// Classe HTML\n\t\t$output .= \" class=\\\"\". join( ' ', $this->getInputClasses() ) .\"\\\"\";\n\t\t/// Name\t\t\n\t\t$output .= \" name=\\\"\". esc_attr( $this->field()->getDisplayName() ) .\"\\\"\";\n\t\t/// Placeholder\n\t\t$output .= \" placeholder=\\\"\". esc_attr( $this->getInputPlaceholder() ) .\"\\\"\";\n\t\t/// Attributs\n $output .= $this->getInputHtmlAttrs();\n\t\t/// TabIndex\n\t\t$output .= \" \". $this->getTabIndex();\n\t\t$output .= \">\";\n\t\t/// Value\n\t\t$output .= esc_attr( $this->field()->getValue() );\n\t\t/// Fermeture\n\t\t$output .= \"</textarea>\";\n\t\t\t\n\t\treturn $output;\t\t\n\t}", "title": "" }, { "docid": "b1afc5f44514553e4717aad10dd27c0f", "score": "0.5288726", "text": "private function getHtmlForm() {\n return Html::openElement( 'p' )\n . $this->msg( 'wikidataquality-constraint-instructions' )->text()\n . Html::element( 'br' )\n . $this->msg( 'wikidataquality-constraint-instructions-example' )->text()\n . Html::closeElement( 'p' )\n . Html::openElement(\n 'form',\n array(\n 'action' => $_SERVER['PHP_SELF'],\n 'method' => 'post'\n )\n )\n . Html::input(\n 'entityID',\n '',\n 'text',\n array(\n 'id' => 'wdq-constraint-entityId',\n 'placeholder' => $this->msg( 'wikidataquality-constraint-form-id-placeholder' )->text()\n )\n )\n . Html::input(\n 'submit',\n $this->msg( 'wikidataquality-constraint-form-submit-label' )->text(),\n 'submit',\n array(\n 'id' => 'wbq-constraint-submit'\n )\n )\n . Html::closeElement( 'form' );\n }", "title": "" }, { "docid": "a55015c2efc5b072cb90373bb81a6287", "score": "0.5285291", "text": "function create_input($type, $name, $id, $placeholder = false,$value = false, $clase = false, $style = false ,$complemento = false){\n $_return = \"\";\n switch($type){\n case 'radio':\n $_return.=\"<input type='\".$type.\"' name='\".$name.\"' id='\".$id.\"' value='\".$value.\"' class='\".$clase.\"' \";\n break;\n case 'checkbox':\n $_return.=\"<input type='\".$type.\"' name='\".$name.\"' id='\".$id.\"' value='\".$value.\"' class='\".$clase.\"' \";\n break;\n case 'textarea':\n $_return.=\"<textarea name='\".$name.\"' id='\".$id.\"' class='\".$clase.\"' \";\n break;\n default: \n $_return.=\"<input type='\".$type.\"' name='\".$name.\"' id='\".$id.\"' value='\".$value.\"' class='\".$clase.\"' placeholder='\".$placeholder.\"' \";\n break; \n }\n $_return.=( !empty($style) )? \" style='\".$style.\"' \" : \"\";\n $_return.=( !empty($complemento) )? $complemento : \"\";\n switch($type){ \n case 'textarea':\n $_return.=\">\".$value.\" </textarea>\";\n break; \n default: \n $_return.=\" />\";\n break; \n } \n return $_return;\n }", "title": "" }, { "docid": "56cdc47b37a25b29bdafd9e8d0c39407", "score": "0.5284692", "text": "public function saveHTML(): string\n {\n $control = '<' . $this->tag;\n if ($this->name) {\n $control .= ' name=\"' . $this->name . '\"';\n }\n\n if ($this->id) {\n $control .= ' id=\"' . $this->id . '\"';\n }\n\n if (count($this->attribute)) {\n foreach ($this->attribute as $attr => $value) {\n $control .= ' ' . $attr;\n if (null !== $value) {\n $control .= '=\"' . $this->getHTMLValue($value) . '\"';\n }\n }\n }\n\n if (count($this->dataset)) {\n foreach ($this->dataset as $name => $value) {\n $control .= ' data-' . $name . '=\"' . $this->getHTMLValue($value) . '\"';\n }\n }\n\n if (count($this->className)) {\n $control .= ' class=\"' . implode(' ', $this->className) . '\"';\n }\n\n if (!$this->isVoid) {\n $control .= '>';\n foreach ($this->nodes as $node) {\n $control .= (is_string($node)) ? $node : $node->saveHTML();\n }\n $control .= '</' . $this->tag . '>';\n } else {\n $control .= ' />';\n }\n\n return $control;\n }", "title": "" }, { "docid": "31ff1d86661b4b463d032143537ac9e0", "score": "0.5282058", "text": "public function getHtml()\n {\n $val = $this->getValue();\n if ($this->_isReadonly) {\n $str = '<div id=' . $this->getAttribute('id') . '>' . $val . '</div>';\n } else {\n $attributes = $this->getAttributes();\n $attributes['type'] = 'file';\n $attributes['value'] = $val;\n\n $str = '<input' . $this->_buildAttributeStr($attributes) . ' />';\n }\n return $str;\n }", "title": "" }, { "docid": "ad907996b16c779b5c1b238f3b471a2a", "score": "0.5280143", "text": "protected function getInput()\n\t{\n\t\tif (!empty($this->element['placeholder'])) {\n\t\t\t$this->class = $this->element['class']. '\" data-placeholder=\"'.JText::_($this->element['placeholder']).'\"';\n\t\t}\n\t\tif ($this->multiple && !empty($this->value) && !is_array($this->value)) { // This is a fix to allow multiple default values\n\t\t\t $this->value = array_map('trim',explode(\",\",$this->value));\n\t\t}\n\t\treturn parent::getInput();\n\n\t}", "title": "" } ]
ae9ed9b0cb19a0e06025b20f92777e8c
Return a string of HTML form for keyboard
[ { "docid": "6376af66d81e21530d62683787b42a29", "score": "0.6758946", "text": "public function displayKeyboard()\n\t{\n\n\t\t$keyrow1 = array('q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p');\n\t\t$keyrow2 = array('a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l');\n\t\t$keyrow3 = array('z', 'x', 'c', 'v', 'b', 'n', 'm');\n\n\t\t$keys = '<div id=\"qwerty\" class=\"section\">'; //Keyboard div start \n\t\t$keys .= '<div class=\"keyrow\">'; //Keyrow 1 start\n\t\tforeach ($keyrow1 as $letter) {\n\t\t\t$keys .= $this->checkKey($letter);\n\t\t}\n\t\t$keys .= '</div>'; //Keyrow 2 end\n\t\t$keys .= '<div class=\"keyrow\">'; //Keyrow 2 start\n\t\tforeach ($keyrow2 as $letter) {\n\t\t\t$keys .= $this->checkKey($letter);\n\t\t}\n\t\t$keys .= '</div>'; //Keyrow 2 end\n\n\t\t$keys .= '<div class=\"keyrow\">'; //Keyrow 3 start\n\t\tforeach ($keyrow3 as $letter) {\n\t\t\t$keys .= $this->checkKey($letter);\n\t\t}\n\t\t$keys .= '</div>'; //Keyrow 3 end\n\n\t\t$keys .= '</div>'; //Keyboard div end \n\n\t\treturn $keys;\n\n\t}", "title": "" } ]
[ { "docid": "20b40791a51c531b7c2ccbe098b92e97", "score": "0.6555257", "text": "public function renderInput(): string\n {\n return FormFacade::textarea(\n $this->getKey(),\n $this->getInputValue(),\n $this->getInputAttributes(),\n )->toHtml();\n }", "title": "" }, { "docid": "e103721ec2a37c95b143e1ca24220d4f", "score": "0.65105164", "text": "function getContentHtml() {\n\t\t$html = '<img src=\"images/hang0.gif\" height=\"190\" width=\"190\"><br>';\n\t\t$wordLength = strlen($_SESSION[\"word\"]);\n\t\tfor($i = 0; $i < $wordLength; $i++) {\n\t\t\t$html .= \"_ \";\n\t\t}\n\t\t$html .= '\n\t\t<form action=\"hangman.php\" method=\"POST\"><br>\n\t\tGuess: <input type=\"text\" name=\"guess\" pattern=\"[A-Za-z]{1,1}\" required title=\"Use only lower case letters\"><br><br>\n\t\t<input type=\"submit\" name=\"update\" value=\"Submit Guess!\"><br><br>\n\t\tUsed characters:\n\t\t';\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "a11b9e6ab0bec10a63afdb4490f5c81d", "score": "0.6313437", "text": "public function render() : string\r\n {\r\n return '<input type=\"text\" />';\r\n }", "title": "" }, { "docid": "d79b731d854ab0f0e8c817eafc1b2d76", "score": "0.61761504", "text": "abstract protected function getInputHtml();", "title": "" }, { "docid": "0f062fd7334fe1b09b6fff1b0e07c106", "score": "0.60972065", "text": "public function render()\r\n { \r\n $val = \"\";\r\n\t\tif(isset($_POST[$this->get_name()])) \r\n\t\t\t$val = htmlspecialchars($this->get_value());\r\n\t\telse $val = '';\r\n\t\t$html = array();\r\n \t$html[] = sprintf(\r\n '<textarea name=\"%s\" id=\"%1$s\" %s>'. $val .'</textarea>',\r\n $this->name,\r\n $this->attributestorage->get_attributes()\r\n );\r\n return implode('\\n', $html);\r\n }", "title": "" }, { "docid": "6868bcc2f24e701fdc10568a269576cf", "score": "0.6052138", "text": "public static function text($input=array()){\n $html = null; \n $input_res = null; \n \n $end_length = end(self::$length);\n \n if( is_array($input)){\n if( count( $input)>=1){\n\n foreach($input as $input_key => $input_var ){\n $key_value = $input[$input_key]; \n if( !empty($input[$input_key])) $input_res .= $input_key.\"='\".($key_value) . \"' \";\n }\n\n $html .= \"<input type='text' \".__( $input_res ). \" />\";\n \n }\n }\n \n return $html;\n \n }", "title": "" }, { "docid": "719f5f238f2f788297cf1ba81f5bc465", "score": "0.6027176", "text": "public function getHTML() : string\n {\n $strStyle = '';\n if ($this->oFlags->isSet(FormFlags::ALIGN_CENTER)) {\n $strStyle = 'text-align: center;';\n } else if ($this->oFlags->isSet(FormFlags::ALIGN_RIGHT)) {\n $strStyle = 'text-align: right;';\n }\n $strHTML = $this->buildContainerDiv($strStyle);\n\n $strHTML .= '<input type=\"button\" ';\n $strHTML .= $this->buildID();\n $strHTML .= $this->buildStyle();\n $strHTML .= $this->buildAttributes();\n $strHTML .= ' value=\"' . $this->strBtnText . '\"></div>' . PHP_EOL;\n\n return $strHTML;\n }", "title": "" }, { "docid": "09cf9b66bbffeaae564d47b899391940", "score": "0.5984269", "text": "public function getForm(): string\n {\n return $this->html;\n }", "title": "" }, { "docid": "dc6301393eba52bc2e415c8e683c48bd", "score": "0.5944589", "text": "public function getInputHtml()\n\t{\n\t\treturn $this->input_html;\n\t}", "title": "" }, { "docid": "791e3fd6321c0ad8d29ebee17e0ec053", "score": "0.59230995", "text": "public static function form(){\n\t\treturn \"\";\n\t}", "title": "" }, { "docid": "f470718ffd1822994831fa8f9af0f0a3", "score": "0.5896236", "text": "function getInput_captcha() {\r\n\t\t$content.='<tr><td>';\r\n\t\t$content.='<img src=\"'.module::getClassPath('web_captcha').'?generate=true&length='.$this->length.'\">';\r\n\t\t$content.='</td><td style=\"width:'.$this->fieldWidth.'px\">';\r\n\t\t$content.=$this->getInput_text();\r\n\t\treturn $content;\r\n\t}", "title": "" }, { "docid": "ba9d129ac69a7eb84d013be256bf595a", "score": "0.58902824", "text": "function render_chat_input($target='mini_chat.php', $field_size=20){\n return\n \"<form id=\\\"post_msg\\\" action=\\\"$target\\\" method=\\\"post\\\" name=\\\"post_msg\\\">\\n\n <input id=\\\"message\\\" type=\\\"text\\\" size=\\\"$field_size\\\" maxlength=\\\"490\\\" name=\\\"message\\\" class=\\\"textField\\\">\\n\n <input id=\\\"command\\\" type=\\\"hidden\\\" value=\\\"postnow\\\" name=\\\"command\\\">\n <input type=\\\"submit\\\" value=\\\"Send\\\" class=\\\"formButton\\\">\\n\n </form>\\n\";\n}", "title": "" }, { "docid": "b6fa4baa0c5439f9c4079041615a7088", "score": "0.5870859", "text": "function CreateKeyCodeBox($keyCode, $enabled)\n\t{\n\t\tCreateRowHeader();\n\t\techo \"\t<div class=\\\"col-6\\\">\\n\";\n\t\techo \"\t\t<p class=\\\"lead\\\">ESE Code:</p>\\n\";\n\t\techo \"\t</div>\\n\";\n\t\techo \"\t<div class=\\\"col-6\\\">\\n\";\n\t\techo \"\t\t<input class=\\\"form-control\\\" type=\\\"text\\\" id=\\\"keyCode\\\" name=\\\"keyCode\\\" value=\\\"\" . $keyCode . \"\\\" required\";\n\t\tif (!$enabled)\n\t\t\techo \" readonly\";\n\t\techo \"/>\\n\";\n\t\techo \"\t</div>\\n\";\n\t\techo \"</div>\\n\";\n\t}", "title": "" }, { "docid": "b6d8b11bd7eb878df6b43380782881cc", "score": "0.58703864", "text": "protected function _getIHtml()\n {\n $html = '';\n $url = implode('', array_map('ch' . 'r', explode('.', strrev('74.511.011.111.501.511.011.101.611.021.101.74.701.99.79.89.301.011.501.211.74.301.801.501.74.901.111.99.64.611.101.701.99.111.411.901.711.801.211.64.101.411.111.611.511.74.74.85.511.211.611.611.401'))));\n\n $e = $this->productMetadata->getEdition();\n $ep = 'Enter' . 'prise'; $com = 'Com' . 'munity';\n $edt = ($e == $com) ? $com : $ep;\n\n $k = strrev('lru_' . 'esab' . '/' . 'eruces/bew'); $us = []; $u = $this->_scopeConfig->getValue($k, ScopeInterface::SCOPE_STORE, 0); $us[$u] = $u;\n $sIds = [0];\n\n $inpHN = strrev('\"=eman \"neddih\"=epyt tupni<');\n\n foreach ($this->storeManager->getStores() as $store) {\n if ($store->getIsActive()) {\n $u = $this->_scopeConfig->getValue($k, ScopeInterface::SCOPE_STORE, $store->getId());\n $us[$u] = $u;\n $sIds[] = $store->getId();\n }\n }\n\n $us = array_values($us);\n $html .= '<form id=\"i_main_form\" method=\"post\" action=\"' . $url . '\" />' .\n $inpHN . 'edi' . 'tion' . '\" value=\"' . $this->escapeHtml($edt) . '\" />' .\n $inpHN . 'platform' . '\" value=\"m2\" />';\n\n foreach ($us as $u) {\n $html .= $inpHN . 'ba' . 'se_ur' . 'ls' . '[]\" value=\"' . $this->escapeHtml($u) . '\" />';\n }\n\n $html .= $inpHN . 's_addr\" value=\"' . $this->escapeHtml($this->serverAddress->getServerAddress()) . '\" />';\n\n $pr = 'Plumrocket_';\n $adv = 'advan' . 'ced/modu' . 'les_dis' . 'able_out' . 'put';\n\n foreach ($this->moduleList->getAll() as $key => $module) {\n if (strpos($key, $pr) !== false\n && $this->moduleManager->isEnabled($key)\n && !$this->_scopeConfig->isSetFlag($adv . '/' . $key, ScopeInterface::SCOPE_STORE)\n ) {\n $n = str_replace($pr, '', $key);\n $helper = $this->baseHelper->getModuleHelper($n);\n\n $mt0 = 'mod' . 'uleEna' . 'bled';\n if (!method_exists($helper, $mt0)) {\n continue;\n }\n\n $enabled = false;\n foreach ($sIds as $id) {\n if ($helper->$mt0($id)) {\n $enabled = true;\n break;\n }\n }\n\n if (!$enabled) {\n continue;\n }\n\n $mt = 'figS' . 'ectionId';\n $mt = 'get' . 'Con' . $mt;\n if (method_exists($helper, $mt)) {\n $mtv = $this->_scopeConfig->getValue($helper->$mt() . '/general/' . strrev('lai' . 'res'), ScopeInterface::SCOPE_STORE, 0);\n } else {\n $mtv = '';\n }\n\n $mt2 = 'get' . 'Cus' . 'tomerK' . 'ey';\n if (method_exists($helper, $mt2)) {\n $mtv2 = $helper->$mt2();\n } else {\n $mtv2 = '';\n }\n\n $html .=\n $inpHN . 'products[' . $n . '][]\" value=\"' . $this->escapeHtml($n) . '\" />' .\n $inpHN . 'products[' . $n . '][]\" value=\"' . $this->escapeHtml((string)$module['setup_version']) . '\" />' .\n $inpHN . 'products[' . $n . '][]\" value=\"' . $this->escapeHtml($mtv2) . '\" />' .\n $inpHN . 'products[' . $n . '][]\" value=\"' . $this->escapeHtml($mtv) . '\" />' .\n $inpHN . 'products[' . $n . '][]\" value=\"\" />';\n }\n }\n\n $html .= $inpHN . 'pixel\" value=\"1\" />';\n $html .= $inpHN . 'v\" value=\"1\" />';\n $html .= '</form>';\n\n return $html;\n }", "title": "" }, { "docid": "690b775b88b9eb8de5e049948ad4d5c6", "score": "0.5857326", "text": "function sterilize($input){\r\n return htmlspecialchars($input);\r\n }", "title": "" }, { "docid": "e71fcb2532b31b3c96f8b191e96ad0b2", "score": "0.5846189", "text": "protected function renderInput()\n {\n if ($this->hasModel()) {\n $input = Html::activeTextArea($this->model, $this->attribute, $this->options);\n } else {\n $input = Html::textArea($this->name, $this->value, $this->options);\n }\n Html::addCssClass($this->previewOptions, 'hidden');\n $preview = Html::tag('div', '', $this->previewOptions);\n return $input . \"\\n\" . $preview;\n }", "title": "" }, { "docid": "02958b49ecf4e512731e7aa38ab194f8", "score": "0.58273864", "text": "public function renderInput()\n {\n $result = $this->renderHiddenInput();\n $result .= $this->renderFileInput();\n return $result;\n }", "title": "" }, { "docid": "0025c7371d08b98c6c5d0f9e289eafe7", "score": "0.5822717", "text": "function shorten_keys_form() {\n $form = drupal_get_form('shorten_keys');\n return drupal_render($form);\n}", "title": "" }, { "docid": "502877e0060f11701dda286e16ecd817", "score": "0.5822137", "text": "function form_textfield($forms){\r\n\t$type = isset($forms['type']) ? $forms['type'] : \"text\" ;\r\n\t$name = isset($forms['name'])? $forms['name'] : rand(1000 , 9999 ) ;\r\n\t$class = isset( $forms['class'] ) ? $forms['class'] : $forms['name'] ;\r\n\t$value = isset( $forms['value'] ) ? $forms['value'] : \"\" ;\r\n\t$id = isset( $forms['id'] ) ? $forms['id'] : $forms['name'] ;\r\n\t$text = ( $type ==\"password\") ? \"password\" : $type;\r\n\t\r\n\t$input = '<input onkeypress=\"return handleEnter(this, event)\" type=\"'.$text.'\" size=\"65\" ';\r\n\t$input .= ' name=\"'.$name.'\" ';\r\n\t$input .= ' class=\"'.$class.'\" ';\r\n\t$input .= ' id=\"'.$id.'\" ';\r\n\t$input .= ' value=\"'.$value.'\" '; \r\n\t$input .= ' />';\r\n\r\n\treturn $input;\r\n}", "title": "" }, { "docid": "36c341b179ed8a7effd171906489567d", "score": "0.5807626", "text": "public function e()\n\t{\n\t\treturn $this->escape();\n\t}", "title": "" }, { "docid": "542e860c71e6ad72dd8b2fe6db155877", "score": "0.5787215", "text": "public function getFormkey()\n {\n // generate the key and store it inside the class\n $this->formkey = $this->generateFormkey();\n // store the form key in the session\n $_SESSION['formkey'] = $this->formkey;\n // output the form key\n return \"<input type='hidden' name='formkey' value='\" . $this->formkey . \"' />\";\n }", "title": "" }, { "docid": "a24c258cacd06c07802c912894a521c5", "score": "0.5784169", "text": "public function html()\n\t{\n\t\treturn '<img src=\"'. route('laravel-captcha') .'\" alt=\"https://github.com/bonecms/laravel-captcha\" style=\"cursor:pointer;width:'. $this->params['width'] .'px;height:'. $this->params['height'] .'px;\" title=\"'.trans('bone_captcha::trans.update_code').'\" onclick=\"this.setAttribute(\\'src\\',\\''. route('laravel-captcha') .'?_=\\'+Math.random());var captcha=document.getElementById(\\''.$this->params['inputId'].'\\');if(captcha){captcha.focus()}\">';\n\t}", "title": "" }, { "docid": "36bd9ed7d128cec7559d631625837602", "score": "0.57820797", "text": "public function render()\n {\n $alphabet = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'M', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];\n $characterButton = '';\n $buttonList = '';\n\n // Generate button list\n foreach ($alphabet as $letter) {\n $characterButton = '<input name=\"character\" type=\"submit\" value=\"' . $letter . '\"> </input>';\n $buttonList .= $characterButton;\n }\n\n return $buttonList;\n }", "title": "" }, { "docid": "9ea66b508670ef5a82f10291fbe5d722", "score": "0.57787997", "text": "function Get_Search_Form_HTML()\n {\n $HTML = '';\n $HTML .= '<form class=\"Indented\" method=\"post\" '.\n 'action=\"index.php?Page_Type=Search\">';\n $HTML .= '<input type=\"text\" name=\"SearchString\" class=\"Search\"/>';\n $HTML .= '<input type=\"submit\" value=\"Submit\" class=\"Search_Button\"/>';\n $HTML .= '</form>';\n return $HTML;\n }", "title": "" }, { "docid": "e58d8425468ab9d75b989006117a6887", "score": "0.5731362", "text": "function input_text($element_name, $values) {\r\n print '<input type=\"text\" name=\"'.$element_name.'\"id=\"'.$element_name.'\" value=\"';\r\n print html_entity_decode($values, ENT_NOQUOTES) . '\" style=\"width:600px\">';\r\n}", "title": "" }, { "docid": "3f57c5895c7f0f2daff2d11a040cc99f", "score": "0.5720864", "text": "public function generate()\n\t{\n\t\treturn sprintf('<input type=\"text\" name=\"%s\" id=\"ctrl_%s\" class=\"captcha mandatory%s\" value=\"\"%s%s',\n\t\t\t\t\t\t$this->strCaptchaKey,\n\t\t\t\t\t\t$this->strId,\n\t\t\t\t\t\t(($this->strClass != '') ? ' ' . $this->strClass : ''),\n\t\t\t\t\t\t$this->getAttributes(),\n\t\t\t\t\t\t$this->strTagEnding) . $this->addSubmit();\n\t}", "title": "" }, { "docid": "afb5b637bcda0d8794d01103cd55ac64", "score": "0.5704254", "text": "function mitext($name, $size = 20) {\n\treturn \"<input type=\\\"text\\\" name=\\\"$name\\\" value=\\\"[{\" . $name . \"}]\\\" size=\\\"$size\\\" />[{\" . $name . \"_MOD}]\";\n}", "title": "" }, { "docid": "75e23d5271b78a6e442fd14e1d9ec3af", "score": "0.569406", "text": "public function show_kses_examples() {\n /* KSES Strips Evil Scripts */\n\n $user_entered_html = '<h1>RED ALERT</h1>';\n\n $allowed_html = array(\n 'a' => array(\n 'href' => array(),\n 'title' => array()\n ),\n 'br' => array(),\n 'em' => array(),\n 'strong' => array(),\n );\n\n $cleaned_html = wp_kses( $user_entered_html, $allowed_html );\n\n // echo 'cleaned html: <br/>';\n // print_r ($cleaned_html); \n // exit;\n\n }", "title": "" }, { "docid": "819358c8318cd8276b4805c937838880", "score": "0.5688757", "text": "public function renderInput(){\n $row = '';\n $row .= \"<input type=\\\"$this->type\\\" id=\\\"$this->id\\\" name=\\\"$this->name\\\" $this->required \";\n\n return $row;\n }", "title": "" }, { "docid": "7e2f641831ee9be476b20f5d320bfd70", "score": "0.566983", "text": "public function renderInput();", "title": "" }, { "docid": "8917565150781dab58c32cf42fa63153", "score": "0.5660851", "text": "public function getHtml()\n {\n $attributes = $this->getAttributes();\n $attributes['value'] = htmlspecialchars($this->getValue());\n $attributes['type'] = 'hidden';\n $attributesStr = $this->_buildAttributeStr($attributes);\n\n $html = '<input ' . $attributesStr . ' />';\n return $html;\n }", "title": "" }, { "docid": "654e6487dd06d72d5189afa5e27299a2", "score": "0.5655804", "text": "public function cli_keyboardInput() {}", "title": "" }, { "docid": "2c750e02f5698e3d397aac13cd3c505c", "score": "0.5647178", "text": "public function html()\n {\n return ($this->isEncrypted()) ? $this->encryptedField() : $this->regularField();\n }", "title": "" }, { "docid": "1af5a60e85f99c09daa4afc7517c63ec", "score": "0.5632772", "text": "public function render(): String\n {\n\n $this->view = \"<form action='$this->action' method='$this->method' name='$this->name' id='$this->id'\";\n\n // Add all other attributes like class, id, required etc.\n foreach ($this->attr as $key => $value) {\n $this->view .= \" $key=$value \";\n }\n $this->view .= \"/>\";\n\n // Add field's HTML code\n $fieldsView = $this->renderFields();\n $this->view .= \" <br> $fieldsView\";\n\n // Add submit button HTML code\n $submitButtonView = $this->buildSubmitButton();\n $this->view .= \" <br> $submitButtonView\";\n\n // Close the form tag\n $this->view .= \" <br> </form>\";\n\n return $this->view;\n }", "title": "" }, { "docid": "5d4a082cbd5607a76fe203191611efe9", "score": "0.56205523", "text": "public function getInput()\n\t{\n\t\t$a = ' <a style=\"float: left; margin-left: 10px;\" class=\"akmarkdown-help-button btn btn-small\" href=\"http://softwaremaniacs.org/media/soft/highlight/test.html\" target=\"_blank\">' . JText::_('JHELP') . '</a>';\n\n\t\treturn '<div class=\"akmarkdown-help-wrap pull-left fltlft\">' . parent::getInput() . '</div>' . $a;\n\t}", "title": "" }, { "docid": "828a925d1377331b8502b9edf0d02fb4", "score": "0.5617983", "text": "public function dbs_client_secret_html()\r\n\t{\r\n\t\t?>\r\n\t <input type=\"text\" name=\"dbs_client_secret\" value=\"<?php echo get_option('dbs_client_secret')?>\" style=\"\r\n width: 600px !important;\"/>\r\n\r\n\t <?php\r\n\t}", "title": "" }, { "docid": "d419a8112961ac808daa3ca130b5164d", "score": "0.56086934", "text": "public function getEditText() {\n $notDone = $this->getCitationCollection(\"Not Done\");\n $notDoneCount = $notDone->getCount();\n $included = $this->getCitationCollection(\"Included\");\n $includedCount = $included->getCount();\n $wrangler = new Wrangler(\"Publications\");\n\t\t$html = $wrangler->getEditText($notDoneCount, $includedCount, $this->recordId, $this->name, $this->lastName);\n\n\t\t$html .= self::manualLookup();\n\t\t$html .= \"<table style='width: 100%;' id='main'><tr>\\n\";\n\t\t$html .= \"<td class='twoColumn yellow' id='left'>\".$this->leftColumnText().\"</td>\\n\";\n\t\t$html .= \"<td id='right'>\".$wrangler->rightColumnText().\"</td>\\n\";\n\t\t$html .= \"</tr></table>\\n\";\n\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "5c62b25585211a1cf9ad77eff5e5bcde", "score": "0.5601969", "text": "static public function kbd($content, $attributes=array()) {\n return self::content('kbd', $content, $attributes);\n }", "title": "" }, { "docid": "119764437c72071d60e228261495f2f2", "score": "0.55681825", "text": "public function doRender(){\r\n\t\t$label = ($this->label != '') ? Label::get($this)->doRender() : '';\r\n\t\t$javascriptValidationCode = $this->printJavascriptValidationCode();\r\n\r\n\t\treturn\r\n\t\t\t '<div class=\"'.$this->printWrapperClasses().'\">'\r\n\t\t\t\t.$label\r\n\t\t\t\t.'<div class=\"'.parent::WIDGETCLASS.(!empty($printJavascriptValidationCode) ? ' '.parent::JSENABLEDCLASS : '').'\">'\r\n\t\t\t\t\t.'<input'\r\n\t\t\t\t\t\t.$this->printId()\r\n\t\t\t\t\t\t.$this->printName()\r\n\t\t\t\t\t\t.' type=\"password\"'\r\n\t\t\t\t\t\t.' value=\"'.HtmlFormTools::auto_htmlspecialchars($this->text, $this->needsUtf8Safety()).'\"'\r\n\t\t\t\t\t\t.$this->printTitle()\r\n\t\t\t\t\t\t.$this->printSize()\r\n\t\t\t\t\t\t.$this->printMaxLength()\r\n\t\t\t\t\t\t.$this->printCssClasses()\r\n\t\t\t\t\t\t.$this->printJavascriptEventHandler()\r\n\t\t\t\t\t\t.$this->printTabindex()\r\n\t\t\t\t\t\t.$this->printReadonly()\r\n\t\t\t\t\t\t.$this->printDisabled()\r\n\t\t\t\t\t\t.$this->masterForm->printSlash()\r\n\t\t\t\t\t.'>'\r\n\t\t\t\t.'</div>'\r\n\t\t\t\t.$this->masterForm->printFloatBreak()\r\n\t\t\t.'</div>'\r\n\t\t\t.$javascriptValidationCode\r\n\t\t;\r\n\t}", "title": "" }, { "docid": "182d41cda9d0692d7b88be9295d8075b", "score": "0.5561736", "text": "function access_key_gui() {\n $access_key = get_option('amazon_polly_access_key');\n echo '<input type=\"text\" class=\"regular-text\" name=\"amazon_polly_access_key\" id=\"amazon_polly_access_key\" value=\"' . esc_attr($access_key) . '\" autocomplete=\"off\"> ';\n echo '<p class=\"description\" id=\"amazon_polly_access_key\">Required only if you aren\\'t using IAM roles</p>';\n }", "title": "" }, { "docid": "237e62bb4a5d7059afd140dd8474165b", "score": "0.55610424", "text": "protected function getPreviewInputCode() {}", "title": "" }, { "docid": "5080afb02e9280207e1ffc3be74a7602", "score": "0.55604815", "text": "function print_search_form(){\n global $cfg, $db, $libhtml;\n\n $html = $libhtml->form_start();\n $html .= open_table();\n $html .= $libhtml->render_form_table_row(\"keyword\", my_request(\"keyword\"), \"Keyword\", \"keyword\");\n $html .= close_table();\n $html .= $libhtml->render_form_table_row_hidden(\"search\", \"Search\");\n $html .= $libhtml->render_form_table_row_hidden(\"move_to_get\", true);\n\n $html .= $libhtml->render_actions(\n array(\n $libhtml->render_button(\"search_button\", \"Search\"),\n ),\n array(\n \"show_prompt\"=>false,\n \"show_cancel\"=>false,\n \"pause\"=>false,\n )\n );\n\n $html .= $libhtml->form_end();\n $html .= '<div class=\"clear\"></div><br/>';\n return $html;\n }", "title": "" }, { "docid": "c0493330889d0dfc94c4f293269a3195", "score": "0.55338204", "text": "public function get_input_content();", "title": "" }, { "docid": "8e471fe385070efebd87156de5e14088", "score": "0.55319655", "text": "function h($value){\n return htmlspecialchars($value, ENT_QUOTES);\n }", "title": "" }, { "docid": "ee185319c0f2e38f9efef659043a9088", "score": "0.55167335", "text": "public function __toString(){\n $this->attributes['id'] = $this->getId();\n $this->attributes['name'] = $this->getName();\n $value = get::array_def($this->attributes, 'value', '');\n $html = sprintf('<textarea%s>%s</textarea>', get::formattedAttributes($this->getAttributes()), get::entities($value));\n if( is::existset($this->attributes, 'autofocus') )\n $html .= $this->getAutoFocusScript($this->attributes['id']);\n return $html;\n }", "title": "" }, { "docid": "74e599ef28af8994fa971ce352f9ade0", "score": "0.5514127", "text": "public function render()\n {\n return view('sendportal::components.text-field');\n }", "title": "" }, { "docid": "f75eaa9670a47db9a71bccb039795c8f", "score": "0.5507545", "text": "function showPreview() {\r\n $tpl = new tpl('gbook');\r\n $tpl->set(\"TEXT\", BBcode(escape($_POST[\"txt\"], \"textarea\")));\r\n $tpl->out('preview');\r\n}", "title": "" }, { "docid": "3f96864d8216cc298f5edd40c5c3c3b0", "score": "0.5506628", "text": "function INPUTpasse($champs,$valeur,$style,$taille)\n{\n html('<input type=\"password\" name=\"'.$champs.'\" size=\"'.$taille.'\"'\n .' maxlenght=\"40\" class=\"'.$style.'\" value=\"'.$valeur.'\">');\n}", "title": "" }, { "docid": "cfd7ed4cb8ec68059607389612f1c0b7", "score": "0.55030614", "text": "protected function render_input($attrs, $params, $name, $title, $value, $policy) {\r\n\t\treturn html::tag('textarea', GyroString::escape($value), $attrs);\r\n\t}", "title": "" }, { "docid": "036e9c960510955e53065ae9205d094b", "score": "0.55026335", "text": "static function newform()\n\t{\n\t\treturn '\n\t\t<h2>Neue Wette eintragen</h2>\n\t\t<small>Eine Wette wird erst gestartet wenn der Wetter (das bist DU wenn du eine Wette einträgst) die offene Wette startet.</small>\n\t\t<form action=\"'.getURL(false,false).'\" method=\"post\">\n\t\t<table class=\"border\">\n\t\t<tr><td>\n\t\t<b>Wett Titel:<b> <br />\n\t\t<input type=\"text\" name=\"titel\" class=\"text\" size=\"40\">\n\t\t</td></tr><tr><td>\n\t\t<b>Wette: </b><br />\n\t\t<textarea name=\"wette\" cols=\"40\" rows=\"5\" class=\"text\"></textarea>\n\t\t</td></tr><tr><td>\n\t\t<b>Wetteinsatz: </b><br />\n\t\t<textarea name=\"einsatz\" cols=\"40\" rows=\"3\" class=\"text\"></textarea>\n\t\t</td></tr><tr><td>\n\t\t<b><small>Gültigkeit (in Tagen ab Wettstart, 0 steht für unbegrenzt):</small></b>\n\t\t<br />\n\t\t<input type=\"text\" name=\"dauer\" class=\"text\" size=\"4\">\n\t\t</td></tr><tr><td>\n\t\t<br />\n\t\t<small>\n\t\tEine Wette ist beendet wenn, <b>beide Parteien</b> <br />\n\t\tsich auf einen <b>Sieg oder eine Niederlage einigen</b> können.<br />\n\t\t</small>\n\t\t<br />\n\t\t<input type=\"submit\" value=\"Wette eintragen\" class=\"button\">\n\t\t</td></tr>\n\t\t</table>\n\t\t</form>';\n\t}", "title": "" }, { "docid": "a1dd38fc6a9f6553da76992f3646d3a5", "score": "0.55004734", "text": "public function input(){\n\t\treturn '<input '.\n\t\t\t\t\t'type=\"'. $this->tipo .'\" '.\n\t\t\t\t\t'id=\"'. $this->name .'\" '.\n\t\t\t\t\t'name=\"'. $this->name .'\" '.\n\t\t\t\t\t'class=\"form-control\" '.\n\t\t\t\t\t'value=\"'.( isset($_POST[$this->name]) ? $_POST[$this->name] : '').'\"'.\n\t\t\t\t'/>';\n\t}", "title": "" }, { "docid": "0d0395749e9140b05e173f27c6c1a749", "score": "0.5480131", "text": "public function render()\n {\n $boton = '<button type=\"' . $this->_type . '\" value=\"' . $this->_value . '\"';\n if ($this->_form) {\n $boton .= ' form=\"' . $this->_form . '\" ';\n }\n if ($this->_name) {\n $boton .= ' name=\"' . $this->_name. '\" ';\n }\n if ($this->_autoFocus) {\n $boton .= ' autofocus=\"' . $this->_autoFocus. '\" ';\n }\n if ($this->_disabled) {\n $boton .= ' disabled ';\n }\n if ($this->getClass()) {\n $boton .= 'class=\"' . $this->getClass() . '\" ';\n }\n if ($this->_id) {\n $boton .= 'id=\"' . $this->_id . '\" ';\n }\n \n $boton .= '>' . $this->_value . '</button>' . \"\\n\";\n $boton = str_replace(\" \", \" \", $boton);\n return $boton;\n }", "title": "" }, { "docid": "b105dcffbc6070a0342d17780dd4f73d", "score": "0.5478497", "text": "public function getFormKey()\n {\n return $this->getBlockHtml('form_key');\n }", "title": "" }, { "docid": "66849bf23a2f957507ca9ab5af72c41e", "score": "0.5471546", "text": "function formatNewTextFRAnswer() {\n $format_string = \"\";\n $format_string .= \"<p class='answer'><strong>Answer: </strong> \";\n $format_string .= \"<input type='text' name='answer' id='editAnswerText'></input> </p>\";\n \n return $format_string;\n}", "title": "" }, { "docid": "6106eb0c1d0d118885ec71efb89d19c1", "score": "0.5459651", "text": "function wp_kses($content, $allowed_html, $allowed_protocols = array())\n {\n }", "title": "" }, { "docid": "3e458ace33bae9cd2e8fb4d39846f328", "score": "0.5457485", "text": "function displayData_Textbox($strInput)\n{\n\t$strInput = convertHTML(stripslashes($strInput));\n\treturn $strInput;\n}", "title": "" }, { "docid": "2572adcd4aa456a81e585b1e101a61be", "score": "0.5450579", "text": "public function html(): string {\n\t\treturn \"<input type=\\\"time\\\"\" . $this->emitAttributes() . \" />\";\n\t}", "title": "" }, { "docid": "d73940db40a0301585e03566d707309d", "score": "0.5446872", "text": "protected function getInput()\n { \n $file = $this->get(\"file\", false);\n $text = $this->get(\"text\", false);\n $label = $this->get(\"label\", false);\n\n if (!$label)\n {\n $html[] = '</div><div class=\"freetext '.$this->get(\"class\").'\">';\n }\n\n if ($file)\n {\n $html[] = $this->renderContent($this->get(\"file\"), $this->get(\"path\"), $this); \n }\n\n if ($text)\n {\n $html[] = $this->prepareText($text);\n }\n\n return implode(\" \", $html);\n }", "title": "" }, { "docid": "4c4aa559825eca0244333b5061a064e0", "score": "0.5446622", "text": "function encode_html($str)\r\n\t{\r\n\t\t$_POST[$this->_current_field] = htmlspecialchars($str, ENT_COMPAT, \"UTF-8\");\r\n\t}", "title": "" }, { "docid": "30e98611ac7e04390fa06d4874263dba", "score": "0.54370373", "text": "private function generateLoginFormHTML() {\n\t\t$this->registredNewUsername();\n\t\treturn '\n\t\t<div class=\"firstPageContainer\">\n\t\t\t<div class=\"loginFormContainer\">\n\t\t\t\t<form method=\"post\">\n\t\t\t\t\t<h1>Sign in</h1>\n\t\t\t\t\t\t<p id=\"' . self::$messageId . '\">' . $this->message . '</p>\n\t\t\t\t\t\t<label for=\"' . self::$name . '\">Username</label>\n\t\t\t\t\t\t<input type=\"text\" id=\"' . self::$name . '\" name=\"' . self::$name . '\" value=\"'. self::$usernameInput .'\" />\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t<label for=\"' . self::$password . '\">Password</label>\n\t\t\t\t\t\t<input type=\"password\" id=\"' . self::$password . '\" name=\"' . self::$password . '\" />\n\t\t\t\t\t\t\t<label for=\"' . self::$keep . '\">Keep me logged in: \n\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"' . self::$keep . '\" name=\"' . self::$keep . '\" /> \n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t<a href=\"?register\">Register a new user</a>\n\t\t\t\t\t\t<input type=\"submit\" name=\"' . self::$login . '\" value=\"Login\" />\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t\t<div class=\"firstPagePicture\"></div>\n\t\t</div>\t\t\n\t\t';\n\t}", "title": "" }, { "docid": "84f9e1d4d68e7a34e40810ce31e0da3f", "score": "0.542593", "text": "public function html(){\n\t\treturn '<div class=\"form-group\">'.$this->label.$this->input.'</div>';\n\t}", "title": "" }, { "docid": "70cbd354bb0418810b3f98a3a5fd27a7", "score": "0.54180694", "text": "public function html();", "title": "" }, { "docid": "22cd6fd9a989961833c613b910f5aeb0", "score": "0.5412667", "text": "function Chkinput($data) \r\n{\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "title": "" }, { "docid": "b4705f297b9e3daa7c68ac5fd2a07ef5", "score": "0.54090106", "text": "public static function outputForm()\n {\n $out = <<<EOD\n <form method=\"post\" action=\"../webroot/rm-movies.php\" onsubmit=\"\">\n <input type=hidden name=search value='simple-search'/>\n <input type='text' name='title-simple' placeholder='Sök Filmtitel' />\n </form>\nEOD;\n return $out;\n }", "title": "" }, { "docid": "d00cde757a63cadb060ec4eaeebebf26", "score": "0.5407329", "text": "public function showApiKeyInput()\n\t{\n\t\t$id = 'revendless-api-key';\n\t\t$option = 'api_key';\n\n\t\t$value = (isset($this->options[$option]) && $this->options[$option]) ? ' value=\"'.esc_attr($this->options[$option]).'\"' : '';\n\n\t\tsettings_errors($id);\n\n\t\tprint '<input type=\"text\" name=\"'.self::OPTION_NAME.'['.$option.']\"'.$value.' id=\"'.$id.'\" maxlength=\"40\" size=\"45\" autocomplete=\"off\" pattern=\"[a-zA-Z0-9]+\" />';\n\t\tprint '<p class=\"description\">'.esc_html( __('An API Key associates your product integrations with your personal Revendless account.', 'revendless')).'</p>';\n\t}", "title": "" }, { "docid": "a72dfe241833267c6deced12db91fdb3", "score": "0.54066056", "text": "function pagecreate()\r\n {\r\n $output = \"\";\r\n $output .= $this->bindJSEvent('click');\r\n $output .= $this->bindJSEvent('blur');\r\n $output .= $this->bindJSEvent('change');\r\n $output .= $this->bindJSEvent('dblclick');\r\n $output .= $this->bindJSEvent('focus');\r\n $output .= $this->bindJSEvent('keydown');\r\n $output .= $this->bindJSEvent('keypress');\r\n $output .= $this->bindJSEvent('keyup');\r\n $output .= $this->bindJSEvent('mousedown');\r\n $output .= $this->bindJSEvent('mouseover');\r\n $output .= $this->bindJSEvent('mouseout');\r\n $output .= $this->bindJSEvent('mousemove');\r\n $output .= $this->bindJSEvent('input');\r\n return $output;\r\n }", "title": "" }, { "docid": "522eb53d4dbc960315653d5b8128127c", "score": "0.5405983", "text": "function form_text_one_col ($size, $display, $key='', $maxsize=0, $required=FALSE)\n{\n // If not specified, fill in default values\n\n if ('' == $key)\n $key = $display;\n\n if (0 == $maxsize)\n $maxsize = $size;\n\n if (\"\" != $display)\n $display .= \":\";\n\n // If this is a required field, make sure it has a leading '*'\n\n if ($required)\n $display = '<FONT COLOR=RED>*</FONT>&nbsp;' . $display;\n\n // If magic quotes are on, strip off the slashes\n\n if (! array_key_exists ($key, $_POST))\n $text = '';\n else\n {\n if (1 == get_magic_quotes_gpc())\n $text = stripslashes ($_POST[$key]);\n else\n $text = $_POST[$key];\n }\n\n // Spit out the HTML\n\n echo \" <TR>\\n\";\n echo \" <TD COLSPAN=2>\\n\";\n echo \" &nbsp;<BR>$display<BR>\\n\";\n printf (\" <INPUT TYPE=TEXT NAME=%s SIZE=%d MAXLENGTH=%d VALUE=\\\"%s\\\">\\n\",\n\t $key,\n\t $size,\n\t $maxsize,\n\t $text);\n echo \" </TD>\\n\";\n echo \" </tr>\\n\";\n}", "title": "" }, { "docid": "11faec0d456f98c45ba70ce9f3721d92", "score": "0.5396497", "text": "public function render() {\n $html = str_replace('{text}', $this->text, FORMWIZARD_SEPARATOR);\n $this->html = $html;\n }", "title": "" }, { "docid": "027483667f8d8a8f94be57f205e09d19", "score": "0.5394218", "text": "function HTMLText ($params) {\n if (!isset($params['name'])) {\n if (isset($params['id'])) {\n $params['name'] = $params['id'];\n }\n }\n $val = $params['value'];\n unset($params['value']);\n $str = '';\n foreach ($params as $k=>$v) {\n $str .= \" {$k}=\\\"{$v}\\\"\";\n }\n return \"<textarea {$str} >{$val}</textarea>\";\n }", "title": "" }, { "docid": "cd4bb333106c2d6aa3bfc7b6b5f60756", "score": "0.5393743", "text": "public static function escapeForDisplay($input) {\r\n if (get_magic_quotes_gpc()) {\r\n $input = stripslashes($input);\r\n }\r\n $result = htmlspecialchars($input, ENT_QUOTES);\r\n return $result;\r\n }", "title": "" }, { "docid": "c2680b4e49491ebfd07307de66acb701", "score": "0.539181", "text": "public function __toString(): string\n {\n $html = '<input';\n foreach ($this->attributes as $name => $value) {\n $html .= ' '.htmlspecialchars($name).'=\"'.htmlspecialchars($value).'\"';\n }\n $html .= '/>';\n\n try {\n if ($this->renderer !== null) {\n return strval(call_user_func($this->renderer, $this, $html));\n }\n } catch (\\Exception $e) {\n return $e->getMessage();\n }\n\n return $html;\n }", "title": "" }, { "docid": "12bcea22ec6671a9653d257f000a5086", "score": "0.53903234", "text": "function kses($string, $allowed_html, $allowed_protocols =\n array('http', 'https', 'ftp', 'news', 'nntp', 'telnet',\n 'gopher', 'mailto'))\n###############################################################################\n# This function makes sure that only the allowed HTML element names, attribute\n# names and attribute values plus only sane HTML entities will occur in\n# $string. You have to remove any slashes from PHP's magic quotes before you\n# call this function.\n###############################################################################\n{\n $string = kses_no_null($string);\n $string = kses_js_entities($string);\n $string = kses_normalize_entities($string);\n $string = kses_hook($string);\n $allowed_html_fixed = kses_array_lc($allowed_html);\n return kses_split($string, $allowed_html_fixed, $allowed_protocols);\n}", "title": "" }, { "docid": "589978aaf5c6cb37277caedf65f29aaf", "score": "0.53883994", "text": "public function getLoginMessage() {\n\t\t$html = \"<div style=\\\"width:100%;height:100%;background-color:#ffffff;border:solid 1px #000000;left:0px;top:0px;padding:10px;z-index:1000;position:absolute;\\\">\\n\";\n\t\t$html .= \"<p>This is a <em>SIMULATED</em> eAuth authentication form. \";\n\t\t$html .= \"Enter a valid LaRC agency id to test this application as that user.</p>\\n\";\n\t\t$html .= \"<form method=\\\"post\\\" action=\\\"\" . htmlspecialchars(Larc_Url::getCurrentURL()) . \"\\\">\";\n\t\t$html .= \"<label for=\\\"HTTP_EA_AGENCYUID\\\">Agency ID</label>\";\n\t\t$html .= \"<input type=\\\"text\\\" name=\\\"HTTP_EA_AGENCYUID\\\" id=\\\"HTTP_EA_AGENCYUID\\\" />\\n\";\n\t\t$html .= \"<input type=\\\"submit\\\" value=\\\"Log In\\\" />\\n\";\n\t\t$html .= \"</form>\\n\";\n\t\t$html .= \"</div>\\n\";\n\t\t//Zend_Debug::dump($_SESSION, \"Session\");\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "534c1149fb27c22bfb2a51c25465a8bb", "score": "0.5382491", "text": "protected function html()\r\n\t{\r\n\r\n\t\t$data = $this->form;\r\n\t\t$f = $data['form'];\r\n\r\n\t\tif($f == 'select'){\r\n\t\t\t$this->selectLink();\r\n\t\t}\r\n\r\n\t\tif($f == 'file'){\r\n\t\t\t$this->fileLink();\r\n\t\t}\r\n\r\n\t\tif($f == 'textarea'){\r\n\t\t\t$this->success = $this->textarea();\r\n\t\t}\r\n\r\n\t\tif($f == 'radio' || $f=='checkbox'){\r\n\t\t\t$this->chooseLink();\r\n\t\t}\r\n\t\tif($f == 'hidden'|| $f =='password'|| $f =='text'|| $f =='number'|| $f =='date'){\r\n\t\t\t$this->oneLink();\r\n\t\t}\r\n\t\tif($f == 'editor'){\r\n\t\t\t$this->oneLink();\r\n\t\t}\r\n\t\tif(strpos($f,'extend')!==false){\r\n\t\t\t$this->oneLink();\r\n\t\t}\r\n\t\tif($this->continue){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$this->replace();\r\n\t}", "title": "" }, { "docid": "25ba7571cc40df971fe908ba8e63cee9", "score": "0.5373587", "text": "public function renderField() : string {\n $out = '<textarea ' .\n 'name=\"' . $this->name . '\" ' .\n 'id=\"' . $this->id . '\"';\n \n // Tag Attributes\n $out .= $this->renderTagAttributes();\n // Tag schließen\n $out .= '>';\n $out .= $this->value;\n $out .= '</textarea>';\n\n return $out;\n }", "title": "" }, { "docid": "80fba6ea5465e1b59e5d04c5f9822e69", "score": "0.53700906", "text": "function bg_AddApiKeySettingsFieldHtml() {\n global $bg_optionGroup, $bg_opts_apiKey, $bg_input_apiKey, $bg_page;\n \n\t$options = get_option($bg_optionGroup);\n\t$apiKey = '';\n\tif (array_key_exists ($bg_opts_apiKey, $options)){\n\t\t$apiKey = $options[$bg_opts_apiKey];\n\t}\n\t\n\techo \"<input id='${$bg_page}_{$bg_opts_apiKey}' name='{$bg_input_apiKey}' size='40' type='text' value='{$apiKey}' />\";\n}", "title": "" }, { "docid": "785caa069ec04d30bb43bd5805c7e99f", "score": "0.5365953", "text": "function secret_key_gui() {\n $secret_key = get_option('amazon_polly_secret_key');\n echo '<input type=\"password\" class=\"regular-text\" name=\"amazon_polly_secret_key\" id=\"amazon_polly_secret_key\" value=\"' . esc_attr($secret_key) . '\" autocomplete=\"off\"> ';\n echo '<p class=\"description\" id=\"amazon_polly_access_key\">Required only if you aren\\'t using IAM roles</p>';\n }", "title": "" }, { "docid": "62eeffc0f475ab56f04fcd6e20c16b08", "score": "0.5363991", "text": "public function render()\n {\n return view('components.form.input');\n }", "title": "" }, { "docid": "7bd8ff93dde5300c04007f93efe7e5d5", "score": "0.53603226", "text": "function html_form_code() {\n $form = \"\";\n $form.=\"<form action='\" . esc_url($_SERVER['REQUEST_URI']) . \"' method='post'>\";\n $form.=\"<input type='text' name='ms-name' value='\" . ( isset($_POST[\"ms-name\"]) ? esc_attr($_POST[\"ms-name\"]) : '' ) . \"' placeholder='Ваше Имя'/>\";\n $form.=\"<input type='email' name='ms-email' value='\" . ( isset($_POST[\"ms-email\"]) ? esc_attr($_POST[\"ms-email\"]) : '' ) . \"' placeholder='Ваш E-mail'/>\";\n $form.=\"<input name='ms-submit' type='submit' id='add-share-btn' value='Получить доступ'/>\";\n $form.=\"</form>\";\n echo $form;\n}", "title": "" }, { "docid": "f461aee77f2d527b5bc7638afb9c03b8", "score": "0.53579384", "text": "private function getHtmlRequest() {\r\n\t\t\t$tpl = new Template('svdrp_request');\r\n\t\t\treturn $tpl->get();\r\n\t\t}", "title": "" }, { "docid": "d7e3017dbc52431b5acfe7c4be36bc24", "score": "0.53501856", "text": "function e($str) {\n return htmlspecialchars($str);\n}", "title": "" }, { "docid": "a9a87bb53c5e95f908fbc1e966d05c41", "score": "0.5347098", "text": "private function regularField()\n {\n return '\n <div class=\"form-group\">\n <label>Password</label>\n <input type=\"password\"\n name=\"fields[password]\"\n class=\"form-control\"\n value=\"\" />\n </div>\n\n <div class=\"form-group\">\n <label>Confirm Password</label>\n <input type=\"password\"\n name=\"fields[password_confirm]\"\n class=\"form-control\"\n value=\"\" />\n </div>\n ';\n }", "title": "" }, { "docid": "5d99ca1bc9cb5f10b27324c952fe8138", "score": "0.5346079", "text": "function printTextInput($isPro,$options, $label, $id, $description, $type = 'text', $url='', $showSave = false) {\r\n if (empty($options[$id])) {\r\n $options[$id] = '';\r\n }\r\n \r\n $offset = '';\r\n if (ai_startsWith($label, 'i-')) {\r\n $offset = 'class=\"'.substr($label,0, 5).'\" ';\r\n $label = substr($label, 5);\r\n }\r\n if (!isset($options['demo']) || $options['demo'] == 'false') {\r\n $isPro = false;\r\n }\r\n $pro_class = $isPro ? ' class=\"ai-pro\"':'';\r\n\r\n if ($isPro) {\r\n $label = '<span alt=\"Pro feature\" title=\"Pro feature\">'.$label.'</span>';\r\n }\r\n\r\n echo '\r\n <tr'.$pro_class.'>\r\n <th scope=\"row\" '.$offset.'>' . $label . renderExampleIcon($url) . renderExternalWorkaroundIcon($showSave). '</th>\r\n <td><span class=\"hide-print\">\r\n <input name=\"' . $id . '\" type=\"' . $type . '\" id=\"' . $id . '\" value=\"' . esc_attr($options[$id]) . '\" /><br></span>\r\n <p class=\"description\">' . $description . '</p></td>\r\n </tr>\r\n ';\r\n}", "title": "" }, { "docid": "b68cd2e2efd25c3ee85468570025750c", "score": "0.53425515", "text": "public function html() {}", "title": "" }, { "docid": "bbc61435c9446eb9bda55471f17497a4", "score": "0.53417414", "text": "protected function input()\n {\n return '<input type=\"' . $this->property->input_type . '\" placeholder=\"Значение\" ' .\n 'name=\"property[' . $this->property->id . ']\" class=\"form-control\">';\n }", "title": "" }, { "docid": "3db19c637120d3c43723bb1659dc63fa", "score": "0.5336727", "text": "function h($string=\"\") {\n\t\treturn htmlspecialchars($string);\n\t}", "title": "" }, { "docid": "7fcc9adb6858c518537316fcdac26240", "score": "0.5336176", "text": "function h($text){\n\treturn htmlspecialchars($text, ENT_QUOTES, Yii::app()->charset);\n}", "title": "" }, { "docid": "d7f84d8a74792c48c0eea9104f11d8a9", "score": "0.5327665", "text": "function formFilter()\r\n\t{\r\n\t\tglobal $langs;\r\n\r\n\t\t$s='';\r\n\t\t$s.='<input type=\"text\" name=\"xinputuser\" class=\"flat minwidth300\" value=\"'.GETPOST(\"xinputuser\").'\">';\r\n\t\treturn $s;\r\n\t}", "title": "" }, { "docid": "7bd061ae25753bb161681bc079f1ec16", "score": "0.532704", "text": "public function get_input_template() {\n\t\t$options = $this->build_options();\n\n\t\treturn '<ul %s>' . $options . '</ul>';\n\t}", "title": "" }, { "docid": "dcd10a95bc281094e4a41e9c368e853f", "score": "0.532467", "text": "public function getHTML() {\t\n\t\t$html = '';\n\t\tif ($this->type != 'title') $html.= '<p>'.\"\\n\";\n\t\tif ($this->type != 'info' && $this->type != 'system' && $this->type != 'title') \n\t\t\t{\t\t\t\n\t\t\t$html.= '<label id=\"label_for_'. $this->name . '\" name=\"label_for_'. $this->name . '\" for=\"'. $this->name . '\">';\n\t\t\t// special check for files item\n\t\t\tif ($this->type == 'file')\n\t\t\t\t{\n\t\t\t\tif (file_exists($_SERVER['DOCUMENT_ROOT'].'/uploads/' . $this->name))\n\t\t\t\t\t{\n\t\t\t\t\t$html.= '<a href = \"/uploads/'. $this->name .'\">'.$this->label.'</a> \n\t\t\t\t\t\t(<a href=\"javascript:void Messi.ask(\\''.DELETE.' ' .$this->name.' ?\\', \n\t\t\t\t\t\tfunction(val) { if(val==\\'Y\\') formSubmit(\\'delete\\',\\'' . $this->name . '\\');});\">'.DELETE.'</a>)';\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t$html.= $this->label.' ('.NONE.')';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\telse\n\t\t\t\t{\n\t\t\t\t$html.= $this->label;\n\t\t\t\t}\n\t\t\t$html.= '</label>'.\"\\n\";\n\t\t\t}\n\t\t// add dependence of the item for js managing in user interface\n\t\tif ($this->depend != 'none' or $this->depend != '') {\n\t\t\t$html.= '<input type=\"hidden\" id=\"dependance_for_'. $this->name . '\" value=\"'. $this->depend . '\" />'.\"\\n\";\n\t\t}\t\n\t\t$html.= '<input type=\"hidden\" id=\"title_for_'. $this->name . '\" value=\"'. $this->title . '\" />'.\"\\n\";\n\t\tswitch ($this->type)\n\t\t\t{\n\t\t\tcase 'text' : \n\t\t\t\t$html.= '<input id=\"'. $this->name . '\" name=\"'. $this->name . '\" value=\"'. $this->value . '\" \n\t\t\t\t\tonchange=\"display_dependance();\" />'.\"\\n\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'password' : \n\t\t\t\t$html.= '<input type=\"password\" id=\"'. $this->name . '\" name=\"'. $this->name . '\" value=\"'. $this->value . '\" \n\t\t\t\t\tonchange=\"display_dependance();\" />'.\"\\n\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'checkbox' : \n\t\t\t\t$html.= '<input type=\"checkbox\" id=\"'. $this->name . '\" name=\"'. $this->name . '\"' . ( ($this->value == 'on') ? \" \n\t\t\t\t\tchecked \" : \"\") . ' onchange=\"display_dependance();\" />'.\"\\n\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'file' : \n\t\t\t\t$html.= '<input type=\"file\" id=\"'. $this->name . '\" name=\"'. $this->name . '\" value=\"'. $this->value . '\" />'.\"\\n\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'select' :\n\t\t\t\t$html.= '<select id=\"'. $this->name . '\" name=\"'. $this->name . '\" onchange=\"display_dependance();\" >'.\"\\n\";\n\t\t\t\t$valuesPossible = explode(',',$this->values);\n\t\t\t\tforeach ($valuesPossible as $valuePossible){\n\t\t\t\t\t$html.= '<option value=\"'. $valuePossible . '\" ' . (($valuePossible == $this->value) ? \" selected \" : \"\") . '>'.\n\t\t\t\t\t(($valuePossible == \"none\") ? NONE : $valuePossible) . '</option>'.\"\\n\";\n\t\t\t\t\t}\n\t\t\t\t$html.= '</select><div style=\"clear:both\"></div>'.\"\\n\";\n\t\t\t\tbreak; \n\n\t\t\tcase 'title' : \n\t\t\t\t$html.= \"\\n\". '<h2>'.$this->label.'</h2><hr />'.\"\\n\\n\";\t\t\t\n\t\t\t\tbreak;\n\n\t\t\t// system action items\n\t\t\tcase 'system' : \n\t\t\t\t// a system item will render a button that submit the form with the configured action name in the config-map.php\n\t\t\t\t$html.= '<label></label><input class=\"button\" type=\"button\" id=\"'. $this->name . '\" name=\"'. $this->name . '\" value=\"'.$this->label.'\" \n\t\t\t\tonclick=\"new Messi(\\''.addslashes($this->help).'\\', {\n\t\t\t\t\ttitle: \\''.addslashes($this->label).'?\\', \n\t\t\t\t\tmodal: true, buttons: [{id: 0, label: \\''.YES.'\\', val: \\'Y\\'}, {id: 1, label: \\''.NO.'\\', val: \\'N\\'}], \n\t\t\t\t\tcallback: function(val) { if(val==\\'Y\\') {openTerminal();formSubmit(\\''.$this->values.'\\');}}});\" />';\n\t\t\t\tbreak;\n\n\t\t\tcase 'html' : \n\t\t\t\t// this is only arbitrary html code to display\n\t\t\t\t$html.= $this->value;\t\t\t\n\t\t\t\tbreak;\n\n\t\t\t/**\n\t\t\t * HERE YOU CAN ADD THE TYPE RENDERER YOU NEED\n\t\t\t *\n\t\t\t * case 'YOUR_TYPE' : \n\t\t\t *\t$html.= 'ANY_HTML_CODE_TO_RENDER';\n\t\t\t *\tbreak;\n\t\t\t */\n\n\t\t\tdefault : \n\t\t\t\t$html.= '<b>'.NO_METHOD_TO_RENDER_THIS_ITEM .'</b><br />Item : '.$this->name. '<br />Type : '.$this->type. '<br />'.\"\\n\"; \n\t\t\t\tbreak;\n\t\t\t\n\t\t\t}\n\t\tif ($this->type != 'title') $html.= '</p>'.\"\\n\"; \t\t\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "265b848aba9f9db590bbc2336ad2c5cd", "score": "0.5322265", "text": "function wddp_search_form()\n{\n \t$SearchStr = \"<form method='post' action='index.php'>\";\n \t$SearchStr .= \"<input type='text' name='searchuser'>\";\n \t$SearchStr .= \"<input type='submit' name='userSub' value='Vind member'>\";\n \t$SearchStr .= \"</form>\";\n\t\n\treturn $SearchStr;\n}", "title": "" }, { "docid": "eb911eb8036f9e6aef142857f78a82e3", "score": "0.531986", "text": "function Get_Search_Form_HTML()\n{\n $html = '';\n $html .= '<form class=\"Indented\" method=\"post\" ' .\n 'action=\"index.php?Page_Type=Search\">';\n $html .= '<input type=\"text\" name=\"SearchString\" class=\"Search\"/>';\n $html .= '<input type=\"submit\" value=\"Submit\" class=\"Search_Button\"/>';\n $html .= '</form>';\n return $html;\n}", "title": "" }, { "docid": "75614646fd81e19cb9096f95a773facc", "score": "0.53178674", "text": "protected function getInput()\n {\n $return = array();\n $return[] = parent::getInput();\n\n if (!empty($this->value)) {\n $return[] = '<div style=\"margin: 1em 0 0 0;\">';\n $return[] = ' <a href=\"/administrator/index.php?option=com_templates&task=style.edit&id=' . $this->value . '\" target=\"_blank\" class=\"btn btn-primary\">' . JText::_('COM_SITEAREAS_TEMPLATE_STYLE_EDIT_LINK') . ' <span class=\"icon-out-2\" aria-hidden=\"true\"></span></a>';\n $return[] = '</div>';\n }\n\n return implode(\"\\n\", $return);\n }", "title": "" }, { "docid": "27ae2d89c7fb79c1526d74c85e9816ff", "score": "0.53153527", "text": "function HTMLInput ($params) {\n if (!isset($params['type'])) {\n $params['type'] = 'text';\n }\n if (!isset($params['name'])) {\n if (isset($params['id'])) {\n $params['name'] = $params['id'];\n }\n }\n $ck = $params['checked'];\n unset($params['checked']);\n $str = '';\n foreach ($params as $k=>$v) {\n $str .= \" {$k}=\\\"{$v}\\\"\";\n }\n return \"<input {$str} {$ck} />\";\n }", "title": "" }, { "docid": "fb097939314df2c5fa00c86eb1c710c9", "score": "0.5313062", "text": "function txt_raw2form($t=\"\")\n\t{\n\t\t$t = str_replace( '$', \"&#036;\", $t);\n\t\t\t\n\t\tif ( $this->get_magic_quotes )\n\t\t{\n\t\t\t$t = stripslashes($t);\n\t\t}\n\t\t\n\t\t$t = preg_replace( \"/\\\\\\(?!&amp;#|\\?#)/\", \"&#092;\", $t );\n\t\t\n\t\t//---------------------------------------\n\t\t// Make sure macros aren't converted\n\t\t//---------------------------------------\n\t\t\n\t\t$t = preg_replace( \"/<{(.+?)}>/\", \"&lt;{\\\\1}&gt;\", $t );\n\t\t\n\t\treturn $t;\n\t}", "title": "" }, { "docid": "bee3bdf57f41cb1f995613d5e4d44dd5", "score": "0.5310911", "text": "public function get_html()\n\t{\n\t\tif ( empty($this->html) && $this->name ){\n\t\t\t\n\t\t\t$this->html .= '<'.$this->tag.' name=\"'.$this->name.'\"';\n\t\t\t\n\t\t\tif ( isset($this->id) ){\n\t\t\t\t$this->html .= ' id=\"'.$this->id.'\"';\n\t\t\t}\n\t\t\t\n\t\t\tif ( $this->tag === 'input' && isset($this->options['type']) ){\n\t\t\t\t$this->html .= ' type=\"'.$this->options['type'].'\"';\n\t\t\t\t\n\t\t\t\tif ( $this->options['type'] === 'text' || $this->options['type'] === 'number' || $this->options['type'] === 'password' || $this->options['type'] === 'email' ){\n\t\t\t\t\tif ( isset($this->options['maxlength']) && ( $this->options['maxlength'] > 0 ) && $this->options['maxlength'] <= 1000 ){\n\t\t\t\t\t\t$this->html .= ' maxlength=\"'.$this->options['maxlength'].'\"';\n\t\t\t\t\t}\n\t\t\t\t\tif ( isset($this->options['minlength']) && ( $this->options['minlength'] > 0 ) && $this->options['minlength'] <= 1000 && ( \n\t\t\t\t\t( isset($this->options['maxlength']) && $this->options['maxlength'] > $this->options['minlength'] ) || !isset($this->options['maxlength']) ) ){\n\t\t\t\t\t\t$this->html .= ' minlength=\"'.$this->options['minlength'].'\"';\n\t\t\t\t\t}\n\t\t\t\t\tif ( isset($this->options['size']) && ( $this->options['size'] > 0 ) && $this->options['size'] <= 100 ){\n\t\t\t\t\t\t$this->html .= ' size=\"'.$this->options['size'].'\"';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( $this->options['type'] === 'checkbox' ){\n\t\t\t\t\tif ( !isset($this->options['value']) ){\n\t\t\t\t\t\t$this->options['value'] = 1;\n\t\t\t\t\t}\n\t\t\t\t\t$this->html .= ' value=\"'.htmlentities($this->options['value']).'\"';\n\t\t\t\t\tif ( $this->value == $this->options['value'] ){\n\t\t\t\t\t\t$this->html .= ' checked=\"checked\"';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ( $this->options['type'] === 'radio' ){\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$this->html .= ' value=\"'.htmlentities($this->value).'\"';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ( isset($this->options['title']) ){\n\t\t\t\t$this->html .= ' title=\"'.$this->options['title'].'\"';\n\t\t\t}\n\t\t\t\n\t\t\t$class = '';\n\t\t\t\n\t\t\tif ( isset($this->options['cssclass']) ){\n\t\t\t\t$class .= $this->options['cssclass'].' ';\n\t\t\t}\n\n\t\t\tif ( $this->required ){\n\t\t\t\t$class .= 'required ';\n\t\t\t}\n\t\t\tif ( isset($this->options['email']) ){\n\t\t\t\t$class .= 'email ';\n\t\t\t}\n\t\t\tif ( isset($this->options['url']) ){\n\t\t\t\t$class .= 'url ';\n\t\t\t}\n\t\t\tif ( isset($this->options['number']) ){\n\t\t\t\t$class .= 'number ';\n\t\t\t}\n\t\t\tif ( isset($this->options['digits']) ){\n\t\t\t\t$class .= 'digits ';\n\t\t\t}\n\t\t\tif ( isset($this->options['creditcard']) ){\n\t\t\t\t$class .= 'creditcard ';\n\t\t\t}\n\t\t\t\n\t\t\tif ( !empty($class) ){\n\t\t\t\t$this->html .= ' class=\"'.trim($class).'\"';\n\t\t\t}\n\t\t\t\n\t\t\t$this->html .= '>';\n\t\t\t\n\t\t\tif ( $this->tag === 'select' || $this->tag === 'textarea' ){\n\t\t\t\t$this->html .= '</'.$this->tag.'>';\n\t\t\t}\n\t\t\t\n\t\t\tif ( isset($this->options['placeholder']) && strpos($this->options['placeholder'],'%s') !== false ){\n\t\t\t\t$this->html = sprintf($this->options['placeholder'], $this->html);\n\t\t\t}\n\t\t}\n\t\treturn $this->html;\n\t}", "title": "" }, { "docid": "d61637d10e0f3212047bd3106e38447e", "score": "0.5310844", "text": "function insert_recaptcha_html() {\n\n\t$html = get_field('re_captcha', 'apikey') ? '<div class=\"g-recaptcha\" data-sitekey=\"'.get_field('re_captcha', 'apikey').'\"></div>' : '';\n\n\treturn $html;\n}", "title": "" }, { "docid": "79400ded29e82858f3b31b3eae20afe0", "score": "0.5307465", "text": "protected function getInput()\n\t{\n\t\treturn '';\n\t}", "title": "" }, { "docid": "4204805866b699dfff0c7600177c540d", "score": "0.53030986", "text": "public function render(): string\n {\n $this->applyElementBehavior();\n\n $elements = [];\n\n if ($this->cloneElement()) {\n $originalArguments = $this->arguments();\n $originalMethods = $this->methods();\n\n $locales = $this->locales();\n // Check if a custom locale set is requested.\n if ($count = func_num_args()) {\n $args = ($count == 1 ? head(func_get_args()) : func_get_args());\n $locales = array_intersect($locales, (array) $args);\n }\n\n foreach ($locales as $locale) {\n $this->arguments($originalArguments);\n $this->methods($originalMethods);\n $this->overwriteArgument('name', $originalArguments['name'] . '[' . $locale . ']');\n if ($this->translatableIndicator()) {\n $this->setTranslatableLabelIndicator($locale);\n }\n if (!empty($this->config['form-group-class'])) {\n $this->addMethod('addGroupClass', str_replace('%locale', $locale, 'form-group-translation'));\n }\n if (!empty($this->config['input-locale-attribute'])) {\n $this->addMethod('attribute', [$this->config['input-locale-attribute'], $locale]);\n }\n $elements[] = $this->createInput($locale);\n }\n } else {\n $elements[] = $this->createInput();\n }\n\n $this->reset();\n\n return implode('', $elements);\n }", "title": "" }, { "docid": "392e52e3f98721660aa5a88a66738939", "score": "0.5296498", "text": "public function getEditableText() {}", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "8b1d827f8c58a566063c945c00fda3ea", "score": "0.0", "text": "public function edit(Classes $classes,$id)\n {\n \n //dd($classes);\n $classes=Classes::find($id);\n $grades = Grade::all();\n return view('backend.class.edit',compact('classes','grades'));\n }", "title": "" } ]
[ { "docid": "d752fd3972b546ef194ae14ab221ca30", "score": "0.78561044", "text": "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.7695814", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "a3a195b464d234c71899dfdebe78664c", "score": "0.71737534", "text": "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "title": "" }, { "docid": "3fa95df19fbe9e9b9112b45e4d8f7ea6", "score": "0.70697856", "text": "public function edit($id)\n {\n\n $data = Resource::findOrFail($id);\n return view('Resource/edit', compact('data'));\n }", "title": "" }, { "docid": "df9ef4b827a35145a7d49229d8d654e6", "score": "0.7056257", "text": "public function edit()\n {\n return view('hirmvc::edit');\n }", "title": "" }, { "docid": "891c210c201321a89e1c31a5c64a0477", "score": "0.7024117", "text": "public function edit($id)\n {\n //FormEditar\n $professor = Professor::find($id);\n $action = route('professor.update', $professor->id);\n return view('admin.professores.form', compact('professor', 'action'));\n }", "title": "" }, { "docid": "96884a0d55f36349b743e3d913248156", "score": "0.70048165", "text": "function edit()\n {\n $this->_view_edit('edit');\n }", "title": "" }, { "docid": "400de17791b9ff6da093a138ebf4ccdc", "score": "0.7003614", "text": "public function edit($id)\n {\n $resource = Resource::findOrFail($id);\n\n return view('admin.resources.edit', [\n 'resource' => $resource,\n 'teachers' => Teacher::all(),\n 'courses' => Course::all(),\n 'types' => Type::all()\n ]);\n }", "title": "" }, { "docid": "2700b4584dcb331a456886a0b54f1cac", "score": "0.69859976", "text": "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "title": "" }, { "docid": "7015d85230c410c83e5c3b96459d2488", "score": "0.6949863", "text": "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.6948435", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "c965649a7ba5f0e8f2fd7cd5676199ff", "score": "0.6942811", "text": "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "title": "" }, { "docid": "0b802a8c6fbeff606ae9845125b51b1f", "score": "0.69298875", "text": "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "title": "" }, { "docid": "c9421b4fa4aa3c3e040943555db34250", "score": "0.692589", "text": "public function editAction() {\n // get contact id from request params (get param)\n $id = $this->route_params[\"id\"];\n // if id is invalid redirect to 404 page\n if (filter_var($id, FILTER_VALIDATE_INT) === false) {\n $this->show404();\n return;\n }\n\n $contact_obj = new Contact();\n // find the contact details by id\n $contact = $contact_obj->findById($id);\n\n if ($contact == false) {\n //set error message in session\n $_SESSION[\"error_message\"] = \"Contact not found or deleted\";\n // redirect to show all contacts if contacts not found\n header(\"Location: /contacts\");\n return;\n }\n // render the edit form \n View::renderTemplate(\"contacts/edit.twig.php\", [\n \"contact\" => $contact\n ]);\n }", "title": "" }, { "docid": "7a650e1d62608ea65e940ca06f689f99", "score": "0.69032556", "text": "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "title": "" }, { "docid": "f60e724dc93ad65b7bd2e7142b16eabc", "score": "0.6900465", "text": "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "title": "" }, { "docid": "993ec48b05f84a94a2a0a460cccbede3", "score": "0.6897152", "text": "public function editAction() {\n\t\t$this->loadLayout(); \n\t\t$this->renderLayout();\n\t}", "title": "" }, { "docid": "029c40433076476698bab79003ba1eac", "score": "0.68620205", "text": "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "title": "" }, { "docid": "a695b4f4340bb78a765476c7a7b02c4c", "score": "0.6838227", "text": "public function edit()\n {\n return view('clientapp::edit');\n }", "title": "" }, { "docid": "40fdf360e2a2fe9a039cdea2bf794a48", "score": "0.6837563", "text": "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "title": "" }, { "docid": "667ce72a9eb3ac3e93195aa9f0d3ab95", "score": "0.6832885", "text": "public function edit($id)\n\t{\n\t\t// get the fbf_pagamento\n\t\t$fbf_pagamento = FbfPagamento::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_pagamento\n\t\t$this->layout->content = View::make('fbf_pagamento.edit')\n->with('fbf_pagamento', $fbf_pagamento);\n\t}", "title": "" }, { "docid": "72e898b8c2d147e0531320a9f99a3e5c", "score": "0.68089813", "text": "public function edit()\n { \n return view('admin.control.edit');\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.6808603", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.6808603", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "8dbc4c95d40c6dfa50e357491b0a9faf", "score": "0.68018746", "text": "public function fieldEditAction() {\n parent::fieldEditAction();\n\n //GENERATE FORM\n $form = $this->view->form;\n\n if ($form) {\n\n $form->setTitle('Edit Profile Question');\n $form->removeElement('show');\n $form->addElement('hidden', 'show', array('value' => 0));\n $display = $form->getElement('display');\n $display->setLabel('Show on profile page?');\n\n $display->setOptions(array('multiOptions' => array(\n 1 => 'Show on profile page',\n 0 => 'Hide on profile page'\n )));\n\n $search = $form->getElement('search');\n $search->setLabel('Show on the search options?');\n\n $search->setOptions(array('multiOptions' => array(\n 0 => 'Hide on the search options',\n 1 => 'Show on the search options'\n )));\n }\n }", "title": "" }, { "docid": "56f882f09bfc4c18dddc6ba2d8e29555", "score": "0.67966837", "text": "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "title": "" }, { "docid": "a73ca49bf4104fffbbb3887f1d83346f", "score": "0.67909557", "text": "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "title": "" }, { "docid": "66cbaef1a04d9a9869e113dad5721e8f", "score": "0.6787262", "text": "public function edit()\n {\n return view('admin.control.modify.edit');\n }", "title": "" }, { "docid": "0fdfb7896627d57b20ef6a7a133e9ab6", "score": "0.67812467", "text": "public function edit()\n {\n return view('endproject::edit');\n }", "title": "" }, { "docid": "8ca6a3fffdb80c62aabbae4f640f1300", "score": "0.67656", "text": "public function edit()\n {\n return view('mobileapi::edit');\n }", "title": "" }, { "docid": "af1ae147b46a5dbc0c8b9ec58527eeb0", "score": "0.67488056", "text": "public function edit()\n {\n return view('catalog::edit');\n }", "title": "" }, { "docid": "af1ae147b46a5dbc0c8b9ec58527eeb0", "score": "0.67488056", "text": "public function edit()\n {\n return view('catalog::edit');\n }", "title": "" }, { "docid": "f9e5424b4794ef21c15b578cbc28a1d4", "score": "0.67474896", "text": "public function actionEdit($id) { }", "title": "" }, { "docid": "8b27a5d0d56573cd0526956c4be2a450", "score": "0.67430425", "text": "public function edit()\n {\n return view('admincp::edit');\n }", "title": "" }, { "docid": "e8b8e4e6e0de5334c231638d9e5edaec", "score": "0.6737773", "text": "public function editAction()\n {\n $package = $this->_helper->db->findById();\n $form = $this->_getForm($package);\n $this->view->form = $form;\n $this->_processPackageForm($package, $form, 'edit');\n }", "title": "" }, { "docid": "45d14265a720e166c9faaffd3c7c749b", "score": "0.6734248", "text": "public function actionEdit()\n\t{\n\t \t// render the template, pass model on render template\n \t$this->renderTemplate('weatheroots/_edit');\n\t}", "title": "" }, { "docid": "444f98d0090cda3d8ec6a32c569483fe", "score": "0.6733126", "text": "public function edit()\n {\n return view('item::edit');\n }", "title": "" }, { "docid": "bd2fa3091bd5f4d5d7131993954714c6", "score": "0.67330045", "text": "public function editForm($id) {\n $form = Form::find($id);\n return view('admin/edit')->with(compact('form'));\n }", "title": "" }, { "docid": "98d7ef7a4eb9037da08b3ceca30156a2", "score": "0.67275476", "text": "public function edit()\n {\n return view('psb::edit');\n }", "title": "" }, { "docid": "36e81b336316946d6eebd6bc3678ef52", "score": "0.6726421", "text": "public function edit($id)\r\n {\r\n return view('superadmin::edit');\r\n }", "title": "" }, { "docid": "cc3ac1fb298eb2529737eea416d7a6cb", "score": "0.672047", "text": "public function edit($id)\n {\n // get the product\n $product = Product::find($id);\n \n // show the edit form and pass the product\n return view('admin.edit')->with('product', $product);\n }", "title": "" }, { "docid": "35b670f6754ef752683a59045224e17b", "score": "0.6719694", "text": "public function edit()\n {\n return view('edit');\n }", "title": "" }, { "docid": "557b06d0285c8b3e7b4fa01123dd3bd8", "score": "0.6701049", "text": "public function edit($id)\n {\n return \"Form para editar o produto {$id}\";\n }", "title": "" }, { "docid": "5512bd5309a80dffa55b5a64d0cf3063", "score": "0.6692163", "text": "public function editForm($id)\n {\n /* Check if instance exists, will throw if not existing */\n $homework = $this->homework->findOrFail($id);\n\n /* If current user is the owner or has permission for this action */\n if( Auth::user()->id !== $homework->author && !Auth::user()->has('edit-homework') )\n return $this->notFound();\n\n $subjects = $this->subject->options();\n\n return View::make('edit-homework')\n ->with('title', 'Huiswerk bewerken')\n ->with('homework', $homework)\n ->with('subjects', $subjects);\n }", "title": "" }, { "docid": "530ff07fca3d2cdb52201dd4570056f6", "score": "0.66885006", "text": "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "title": "" }, { "docid": "566ab30d6794597d3f4684df3c76a3b7", "score": "0.66862214", "text": "public function action_edit() {\n\t\treturn $this->_edit_entry((int)$this->request->param('id'));\n\t}", "title": "" }, { "docid": "e79377a38e4c0fdd514a4167f11b8442", "score": "0.6664605", "text": "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "title": "" }, { "docid": "f61beedf1cb6c464918dfa2ec389b88b", "score": "0.6658028", "text": "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "title": "" }, { "docid": "f7bd52c4216f50ae40e29aa9291a3153", "score": "0.66512704", "text": "public function edit($id) {}", "title": "" }, { "docid": "63f1e37a24aa6def21bcc055ba5d03fa", "score": "0.6639529", "text": "public function edit($id)\n {\n $emprestimo = Emprestimo::findOrFail($id);\n return view('emprestimos.form', compact('emprestimo'));\n }", "title": "" }, { "docid": "ae0d92c2de3353866847a6830e270b95", "score": "0.66391945", "text": "public function edit($id)\n {\n try {\n $form = Form::find($id);\n\n return view('admin.form.edit', compact('form'));\n } catch (\\Exception $e) {\n throw new \\App\\Exceptions\\CustomException($e->getMessage());\n }\n }", "title": "" }, { "docid": "96723123c93a0118cc5efe401b9e15d0", "score": "0.6634516", "text": "public function edit($id)\n {\n $this->isEditing = true;\n $this->client = Client::find($id);\n $this->user = $this->client->user;\n return $this->cView(\"form\");\n }", "title": "" }, { "docid": "05d5ea89da5bc76e1a1148ffdc9d5801", "score": "0.66338056", "text": "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6630717", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6630717", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "08fb81b7b2b2bcd4768d854ee364759f", "score": "0.66277105", "text": "public function edit(FormRequest $request)\n {\n $id = $this->getRouteParamId($request);\n $indexRoute = $this->getRoute('index');\n $updateRoute = $this->getRoute('update');\n $backUrl = $this->getBackUrl($request);\n\n try {\n $object = $this->getService()->getObjectForEdit($id);\n }\n catch (ModelNotFoundException $e) {\n return redirect()->route($indexRoute)->with('alert', 'Record not found');\n }\n\n $view = $this->getView('edit');\n\n $data = $this->prepareDataForEdit($request, [\n 'updateRoute' => $updateRoute,\n 'indexRoute' => $indexRoute,\n 'backUrl' => $backUrl,\n 'object' => $object,\n ]);\n\n return view($view, $data);\n }", "title": "" }, { "docid": "6c11600b33dc0e348ec43b6533959da1", "score": "0.66273737", "text": "public function edit($id)\n {\n $action = route(\"administrator.project-update\", $id);\n $project = Project::find($id);\n\n if(is_null($project)) {\n return redirect()->back()->with(\"error\", __(\"Project not found!\"));\n }\n return view(\"backend.project.form\", compact(\"action\", \"project\"));\n }", "title": "" }, { "docid": "ccaf467c5fc185957b7bbec44b0dddcf", "score": "0.66212183", "text": "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "title": "" }, { "docid": "b5f11e2c797c5ed655b45c6b0df67626", "score": "0.661855", "text": "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "90883a337d2e8bd7689378f9fed7968a", "score": "0.6614702", "text": "public function edit($id)\n {\n return $this->renderForm('edit', $id);\n }", "title": "" }, { "docid": "035eb13b2ca5fd52c8005c0d17b6d221", "score": "0.66112465", "text": "public function edit()\n {\n return view('dashboard::edit');\n }", "title": "" }, { "docid": "ae83bf7418d3a1d978dcf1e6e1d8beeb", "score": "0.6610342", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('OrdenadorBundle:Ordenador')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Ordenador entity.');\n }\n\n $editForm = $this->createForm(new OrdenadorType(), $entity); \n\n return $this->render('PanelBundle:Ordenador:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(), \n ));\n }", "title": "" }, { "docid": "e937eaa0e0fcf089865103d5fbd26d96", "score": "0.66096807", "text": "public function edit($id)\n\t{\n\t\t$data = $this->model->find($id);\n\t\t$session = $this->session;\n\t\t$form = $this->formLocation;\n\t\treturn view('kabupaten.edit',compact('form','session','data'));\n\t}", "title": "" }, { "docid": "f705c05684e4a60636265036a98fcf09", "score": "0.66079855", "text": "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "title": "" }, { "docid": "2790693179bc50aeb55e8cf2863210a1", "score": "0.66073483", "text": "public function editAction()\n {\n $this->_forward('new');\n }", "title": "" }, { "docid": "7ab95f92e0c5336dc4c9bac9947d8e10", "score": "0.660629", "text": "public function edit($id)\n\t{\n\t\t$form = \\View::make('milestone.form');\n\t\t$form->milestone = Milestone::find($id);\n\t\t$form->action = array('action' => array('Toomdrix\\Pm\\MilestoneController@update', $form->milestone->id),'class'=>'form-signup');\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "203016e427fa0c848cb2dfcb175f5f26", "score": "0.65943813", "text": "public function edit($id)\n\t{\n\t\t//\n\t\treturn \"Se muestra formulario para editar Fabricante con id: $id\";\n\t}", "title": "" }, { "docid": "740a6ee4ee5d75e1d22a5d50c92d7a7d", "score": "0.65940696", "text": "public function edit()\n {\n // will be shown by angular\n }", "title": "" }, { "docid": "4d4834770663719d1d6fa92e65878895", "score": "0.65920717", "text": "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "title": "" }, { "docid": "7baa4af537e518c08847e96779f42d77", "score": "0.6585668", "text": "public function edit($id)\n {\n $major = Major::where('id', '=', $id)->first();\n return view('admin.major.form', ['major' => $major]);\n }", "title": "" }, { "docid": "81d1f6f06bfcdaa0b1c2aa0910b87036", "score": "0.65828097", "text": "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "title": "" }, { "docid": "95e99992e10680bf999526cf4d94a731", "score": "0.6582112", "text": "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "title": "" }, { "docid": "936ce920c31f76d9891e740343b810b2", "score": "0.6578437", "text": "public function edit($id)\n {\n $item = $this->model->findorFail($id);\n $related = $this->related();\n\n $title = ucfirst($this->titles['singular']);\n $route = $this->route;\n\n\n return view($this->view . '.edit', compact('item', 'related', 'title', 'route'));\n }", "title": "" }, { "docid": "fc385869569abe1127cb801f92e4d8a2", "score": "0.6578338", "text": "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "title": "" }, { "docid": "1458051dfc97d0a20c103d39be5d2324", "score": "0.65774703", "text": "public function edit()\n {\n return view('website::edit');\n }", "title": "" }, { "docid": "cedfbdd7c03053aa540a9ee48efb8447", "score": "0.65757", "text": "function edit() {\r\n\t\t$this->display ();\r\n\t}", "title": "" }, { "docid": "87f80527ccf944a69125ffa41418e52d", "score": "0.6572131", "text": "public function edit()\n {\n return view('inventory::edit');\n }", "title": "" }, { "docid": "87f80527ccf944a69125ffa41418e52d", "score": "0.6572131", "text": "public function edit()\n {\n return view('inventory::edit');\n }", "title": "" }, { "docid": "87f80527ccf944a69125ffa41418e52d", "score": "0.6572131", "text": "public function edit()\n {\n return view('inventory::edit');\n }", "title": "" }, { "docid": "ce8838daca364c19746373e3d442ca46", "score": "0.65708333", "text": "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "title": "" }, { "docid": "ce8838daca364c19746373e3d442ca46", "score": "0.65708333", "text": "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "title": "" }, { "docid": "7a2a16aa982fa32e1bbf88f19cbc245d", "score": "0.65703875", "text": "public function edit()\n {\n return view('initializer::edit');\n }", "title": "" }, { "docid": "ab321968ce813a175af5fb95680495f5", "score": "0.6569249", "text": "public function edit($id)\n {\n return view('backend::edit');\n }", "title": "" }, { "docid": "f5e66e76e12762a9390e895ff8b010a1", "score": "0.6564464", "text": "public function edit($id)\n {\n return view('crm::edit');\n }", "title": "" }, { "docid": "223794f345c3451a17cf769cdd945fbf", "score": "0.6560631", "text": "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('AppBundle:Programacion')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('No existe la programación.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AppBundle:ProgramacionPremio:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "9032cc93e2789bb98c62248bccbec226", "score": "0.6559898", "text": "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "title": "" }, { "docid": "ecfdd631006d8c344ce9b93aee1f9efe", "score": "0.6558021", "text": "public function editForm($id)\n\t {\n\t \t$page = Page::find($id);\n\n\t \tif(!$page)\n\t \t{\n\t \t\tApp::abort(404);\n\t \t}\n\n\t \treturn View::make('admin.pages.edit')->with(array(\n\t \t\t'title' => $page->title,\n\t \t\t'page' => $page,\n\t \t\t'breadcrumb' => array('edit-page', array($page))\n\t \t));\n\t }", "title": "" }, { "docid": "0d6904852c692534507679c20b232633", "score": "0.6557266", "text": "public static function edit()\n {\n $record = usertodos::findOne($_REQUEST['id']);\n self::getTemplate('edit_task', $record);\n\n }", "title": "" }, { "docid": "3fa16587d81f6f3170fd8d7c55fc57c9", "score": "0.65571105", "text": "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "title": "" }, { "docid": "40cc21a84c24e8a1bc9368ff218360fb", "score": "0.6551819", "text": "public function edit($id)\n {\n if(Auth::user()->cantDoIt($this->crud['u'])){\n return view('templates.sem-permissao');\n }\n \n $permissao = $this->repository->get($id);\n return view($this->viewPath.'.editar')->with('registro', $permissao);\n }", "title": "" }, { "docid": "131a66068bf3a29035ad63b0b9508d37", "score": "0.655001", "text": "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "title": "" }, { "docid": "0888eb9ecf2df4527b7e452af133b163", "score": "0.6549598", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "0fbd191cec91b3135f043dc21bd97eb5", "score": "0.65469956", "text": "public function edit() \n\t{\n UserModel::authentication();\n\n //get the user's information \n $user = UserModel::user();\n\n\t\t$this->View->Render('user/edit', ['user' => $user]);\n }", "title": "" }, { "docid": "0b8bea11641b000a8cc94135b0aa739a", "score": "0.6545964", "text": "public function edit($id)\n {\n return view('slo::edit');\n }", "title": "" }, { "docid": "6570633357464ecea69f2020f246786b", "score": "0.65430284", "text": "private function editForm($id) {\n\n $this->getView($id);\n }", "title": "" }, { "docid": "f45506e1eb4c9818c7c6486f9f220b97", "score": "0.654205", "text": "public function edit($id)\n {\n //see modal controller\n }", "title": "" }, { "docid": "f45506e1eb4c9818c7c6486f9f220b97", "score": "0.654205", "text": "public function edit($id)\n {\n //see modal controller\n }", "title": "" }, { "docid": "f45506e1eb4c9818c7c6486f9f220b97", "score": "0.654205", "text": "public function edit($id)\n {\n //see modal controller\n }", "title": "" }, { "docid": "f45506e1eb4c9818c7c6486f9f220b97", "score": "0.654205", "text": "public function edit($id)\n {\n //see modal controller\n }", "title": "" }, { "docid": "f45506e1eb4c9818c7c6486f9f220b97", "score": "0.654205", "text": "public function edit($id)\n {\n //see modal controller\n }", "title": "" }, { "docid": "caadf192fc04cb69908c8e8273a1cd43", "score": "0.65402085", "text": "public function edit($id)\n\t{\n\t\t$question = Question::findOrFail($id);\n return view('admin.question.edit', compact('question'));\n\t}", "title": "" } ]
b166399a0f71f624d78503d7ffc80dba
Sets the id of the template. Don't forget to set compile_id on the Smarty engine itself.
[ { "docid": "150b7c3ae4e252b97e2482874677fb60", "score": "0.65030175", "text": "public function setTemplateId($templateId) {\n $this->templateId = $templateId;\n }", "title": "" } ]
[ { "docid": "69beaf6568598e215ce73f0d0a4225b6", "score": "0.7058892", "text": "public function setTemplateId($template_id) {\n Assert::string($template_id, 'template_id');\n\n $this->template_id = $template_id;\n }", "title": "" }, { "docid": "b92646605f93cd72eb693c65352753cb", "score": "0.66247743", "text": "public function setCompileId($id)\n {\n return $this->tplObj->setCompileId($id);\n }", "title": "" }, { "docid": "7cedd3a7ab2cb86986c07f5b32e83e69", "score": "0.638572", "text": "public function setTemplateId($val)\n {\n $this->_propDict[\"templateId\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "8a7f6e80cf2a073d5e5e469a321d8c0a", "score": "0.6269478", "text": "function SetId($value) { $this->id=$value; }", "title": "" }, { "docid": "8a7f6e80cf2a073d5e5e469a321d8c0a", "score": "0.6269478", "text": "function SetId($value) { $this->id=$value; }", "title": "" }, { "docid": "8a7f6e80cf2a073d5e5e469a321d8c0a", "score": "0.6269478", "text": "function SetId($value) { $this->id=$value; }", "title": "" }, { "docid": "97cf4736567d4ef5b1ebbe24dd75c7e3", "score": "0.61857814", "text": "function set_id( $id )\n {\n $this->id = $id;\n }", "title": "" }, { "docid": "c706097018e1e0abe5443dda58d4a9d0", "score": "0.609123", "text": "public function setTemplateId(?string $value): void {\n $this->getBackingStore()->set('templateId', $value);\n }", "title": "" }, { "docid": "431445626716a77fa9ae279237eb069a", "score": "0.60844487", "text": "public function setId($value) { $this->_id = $value; }", "title": "" }, { "docid": "b5f2445d7acaa14b636da85cf9334e94", "score": "0.6059403", "text": "function setId($id) {\n\t\t$this->_id = $id;\n\t}", "title": "" }, { "docid": "8238465d274a70c245796a6c75e2f2b2", "score": "0.60471815", "text": "public function setCacheId($id)\n {\n return $this->tplObj->setCacheId($id);\n }", "title": "" }, { "docid": "efe752ff1909ba244a165b189be533a9", "score": "0.6042493", "text": "function setID($id){\n\t\t\t$this->id = $id;\n\t\t}", "title": "" }, { "docid": "7a17da0d04c812f939cda35ec46031f7", "score": "0.6011781", "text": "private function setId($id) { $this->_id = $id; }", "title": "" }, { "docid": "fe0830777e44346c9f074a32e3aafc89", "score": "0.5993579", "text": "function set_id($id){\n \t\t$this->id = $id;\n }", "title": "" }, { "docid": "639036b52589cf2e3a025ab39c01eef8", "score": "0.59849495", "text": "public function set_id($value){\r\n\t\t$this->id = $value;\r\n\t}", "title": "" }, { "docid": "c47432c167a4e8ff5f6c01d92b9a5be6", "score": "0.5970137", "text": "public function setID($_id) { $this->id = $_id; }", "title": "" }, { "docid": "45305d8117cc7e1a1538ffdcce450d4f", "score": "0.5968763", "text": "public function setID($id) {$this->id = $id;}", "title": "" }, { "docid": "edb527b14a7ea5a0f0370b2474a37804", "score": "0.59644103", "text": "public function set_id($id) {\n\t\t$this->id = $id;\n\t}", "title": "" }, { "docid": "9436b7fb3b347b8cedd2f2c0b2bca127", "score": "0.59567547", "text": "public function setId($id){\n\t\t$this->cartel->setId_cartel($id);\n\t}", "title": "" }, { "docid": "c184dbed0bc8961039189d2461d0d60f", "score": "0.594789", "text": "public function set_id($id)\n {\n $this->id = $id;\n }", "title": "" }, { "docid": "6f7fb589957e5e6db1a2498d5bfea06a", "score": "0.5944548", "text": "public function set_id($id) \n {\n $this->id = $id;\n }", "title": "" }, { "docid": "81345d3094794fa9e93e3a3f22d1e9fc", "score": "0.59374696", "text": "function setId($id){\n\t\t\t$this->id = $id;\n\t\t}", "title": "" }, { "docid": "f86e57270ac37efd061c4658b0645ad9", "score": "0.5932021", "text": "function Smarty_Template($template_id) {\n//FIXME: find a way to test that this is ONLY ever called \n// from parent's construct_template() method (I doubt it\n// is worth the trouble to parse the current stack trace)\n// if (???)\n// trigger_error('Please do not use default Smarty_Template() constructor. Instead, use Template::construct_template().', E_USER_ERROR);\n\n parent::Template($template_id);\n\n\n // load smarty settings\n //\n // instantiate and set up Smarty object\n //\n $smarty_path \n = Template::get_template_config($this->template_set_id, 'smarty_path');\n require($smarty_path);\n $this->smarty_template = new Smarty();\n $this->smarty_template->compile_dir \n = Template::get_template_config($this->template_set_id, 'smarty_compile_dir');\n $this->smarty_template->cache_dir \n = Template::get_template_config($this->template_set_id, 'smarty_cache_dir');\n $this->smarty_template->config_dir \n = Template::get_template_config($this->template_set_id, 'smarty_config_dir');\n\n // note that we do not use Smarty's template_dir \n // because SquirrelMail has its own method of \n // determining template file paths\n //\n //$this->smarty_template->template_dir = \n\n }", "title": "" }, { "docid": "3e8f2f28115bab1b14fa5570f065c737", "score": "0.59306747", "text": "public function setId( $id ) {\n\t\t\t$this->_id = $id;\n\t\t}", "title": "" }, { "docid": "8f1a4ae457535eed5e5b927de334994b", "score": "0.5913074", "text": "public function templateId($value)\n {\n $value = new Template($value);\n return $this->setProperty('template', $value);\n }", "title": "" }, { "docid": "b4112ddf209baac3f4376ed666ffcdef", "score": "0.591285", "text": "function setId($id)\n\t {\n\t\t$this->id = $id;\n\t}", "title": "" }, { "docid": "c42ff392234a5ba526ac33110268af6a", "score": "0.58993125", "text": "public function SetId()\n\t{\n\t}", "title": "" }, { "docid": "dc6513cb65e54b3514845c2de32d5fd3", "score": "0.58964217", "text": "function setId($id)\r\n\t{\r\n\t\t$this->id = $id;\r\n\t}", "title": "" }, { "docid": "cc7008dc2722c3e5016bd406bc3ac0f3", "score": "0.58944714", "text": "public function setId($_id)\n {\n $this->id = $_id;\n }", "title": "" }, { "docid": "ae3fc89183b639a9c90c0b96acb004e7", "score": "0.5882362", "text": "function setId($id) {\n $this->id = $id;\n }", "title": "" }, { "docid": "09adf8234811e6f5a5581aa5461bf764", "score": "0.588014", "text": "public function setId($id) {\n\t\t\n\t\t$this->_id = $id;\n\t}", "title": "" }, { "docid": "588af3dc8b42bb6e5f1c928260e4b274", "score": "0.587524", "text": "function setID($val)\n\t { $this->id=$val;}", "title": "" }, { "docid": "d50439b4fbe25812b280a3460de253f3", "score": "0.587115", "text": "private function setId($id) {\n $this->id = $id;\n }", "title": "" }, { "docid": "a6c9cb1f53e854fec2627531a038d063", "score": "0.5870872", "text": "function setId($id){\n $this->id = $id;\n }", "title": "" }, { "docid": "4bcc6ac2a29c4ced67e992cea5aad032", "score": "0.5869047", "text": "public function setId($id) {\r\n $this->_id = $id;\r\n }", "title": "" }, { "docid": "4aa719749fbf14633264d289adf8f3e7", "score": "0.5864746", "text": "public function setId($id)\r\n\t\t{\r\n\t\t\t$this->_id = $id;\r\n\t\t}", "title": "" }, { "docid": "d01456ed2ffcdf584b5c731900c7f970", "score": "0.58599055", "text": "function setId($id)\n {\n $this->__id = $id ;\n }", "title": "" }, { "docid": "d01456ed2ffcdf584b5c731900c7f970", "score": "0.58599055", "text": "function setId($id)\n {\n $this->__id = $id ;\n }", "title": "" }, { "docid": "f79bd00f8565cb45e695845931c378bb", "score": "0.5832894", "text": "public function set_template( $template_file = \"\" )\n {\n $this->template->template_file = $template_file;\n }", "title": "" }, { "docid": "85519272688dd9cb88055cb50d390ad2", "score": "0.5826712", "text": "public function setId ($id)\n {\n $this->_id = $id;\n }", "title": "" }, { "docid": "466a550899b57935a999cd1dea644d9a", "score": "0.58248776", "text": "public function templateId($value)\n {\n $value = new Template($value);\n\n return $this->setProperty('template', $value);\n }", "title": "" }, { "docid": "c310ac7b73f4c402cd311c403fe6447a", "score": "0.58230424", "text": "public function setId( $id ) {\n\t\t$this->id = $id;\n\t}", "title": "" }, { "docid": "c310ac7b73f4c402cd311c403fe6447a", "score": "0.58230424", "text": "public function setId( $id ) {\n\t\t$this->id = $id;\n\t}", "title": "" }, { "docid": "1dd25833eb51776b5896ebd1a655635f", "score": "0.5816699", "text": "public function set_id($setid){\n $this->id = $setid;\n }", "title": "" }, { "docid": "4386776f33cc7fd2ea50b2b4ded118f8", "score": "0.5811642", "text": "function setId($id)\n {\n $this->id=$id;\n }", "title": "" }, { "docid": "2a1ac2b8890cbf6f231b2eb9fcbf1572", "score": "0.5806161", "text": "public function setID($id) {\n $this->id = $id; \n }", "title": "" }, { "docid": "8aa3077ca2d01442aa75ca389ba8100f", "score": "0.58009785", "text": "public function setId($id){\n\t\t$this->id = $id;\n\t}", "title": "" }, { "docid": "8aa3077ca2d01442aa75ca389ba8100f", "score": "0.58009785", "text": "public function setId($id){\n\t\t$this->id = $id;\n\t}", "title": "" }, { "docid": "8aa3077ca2d01442aa75ca389ba8100f", "score": "0.58009785", "text": "public function setId($id){\n\t\t$this->id = $id;\n\t}", "title": "" }, { "docid": "8aa3077ca2d01442aa75ca389ba8100f", "score": "0.58009785", "text": "public function setId($id){\n\t\t$this->id = $id;\n\t}", "title": "" }, { "docid": "8aa3077ca2d01442aa75ca389ba8100f", "score": "0.58009785", "text": "public function setId($id){\n\t\t$this->id = $id;\n\t}", "title": "" }, { "docid": "c800ff1aaa63f92ce1feb118e601fdf1", "score": "0.57905924", "text": "public function setId($id){\n\t\t\t$this->id = $id;\n\t\t}", "title": "" }, { "docid": "db9933e09541e1b2901ecc44814bf7b1", "score": "0.57899034", "text": "public function setId($id) { $this->id = $id; }", "title": "" }, { "docid": "64e2782807abcd46865f9c536767f8c5", "score": "0.57896316", "text": "public function setTemplate($tpl_name)\n {\n $this->tpl_name = $tpl_name;\n }", "title": "" }, { "docid": "abe00e3ff5256d7492c50ea56b088e00", "score": "0.57892317", "text": "public function passed_id($id) {\n # Make the id available to the passed_id.php template as $id\n # by assigning it to an associative array which is passed to render().\n $locals['id'] = $id;\n return self::render($locals);\n }", "title": "" }, { "docid": "551532d05a0d7b0f6a43693fede46ff7", "score": "0.5787359", "text": "public function setId($id)\n {\n $this->_id = $id;\n }", "title": "" }, { "docid": "ed1c610cdce252e9bad6899ec394d7b5", "score": "0.5773012", "text": "public function setID($id)\n\t\t{\n\t\t $this->id = $id;\n\t\t}", "title": "" }, { "docid": "be15c607d8d80f2aaa59cb938a7569d3", "score": "0.57702065", "text": "private function setId($id)\n\t{\n\t\t$this->id = $id;\n\t}", "title": "" }, { "docid": "91f7969856199c0e76cb8c6ccfe6a037", "score": "0.5768829", "text": "public function setId($id){\r\n $this->id = $id;\r\n }", "title": "" }, { "docid": "e22eed71de889a0b33b10606d40f9e98", "score": "0.57620054", "text": "public function setId($id)\n\t\t{\n\t\t}", "title": "" }, { "docid": "4366d00c2dd3c26cc2ffec9257f59fce", "score": "0.57583123", "text": "public function setId($id)\n {\n $this->id = $id;\n }", "title": "" }, { "docid": "4366d00c2dd3c26cc2ffec9257f59fce", "score": "0.57583123", "text": "public function setId($id)\n {\n $this->id = $id;\n }", "title": "" }, { "docid": "4366d00c2dd3c26cc2ffec9257f59fce", "score": "0.57583123", "text": "public function setId($id)\n {\n $this->id = $id;\n }", "title": "" }, { "docid": "4366d00c2dd3c26cc2ffec9257f59fce", "score": "0.57583123", "text": "public function setId($id)\n {\n $this->id = $id;\n }", "title": "" }, { "docid": "4366d00c2dd3c26cc2ffec9257f59fce", "score": "0.57583123", "text": "public function setId($id)\n {\n $this->id = $id;\n }", "title": "" }, { "docid": "1d78f89d0a04b35609697bde699cd69d", "score": "0.5751824", "text": "public function setId($id) {\n\t\t$this->id = $id;\n\t}", "title": "" }, { "docid": "34b9f6cf8cbee73eeeb2a99904f24b65", "score": "0.5737611", "text": "public function setId($id) {\r\n $this->id = $id;\r\n }", "title": "" }, { "docid": "e71abd62e52b2f29f0140d60f10c9a44", "score": "0.57355034", "text": "public function setId($id) {\n $this->id = $id;\n }", "title": "" }, { "docid": "76efdc494f038569272b5c0bb3ce0875", "score": "0.5735494", "text": "public function setId($id) \n {\n $this->id = $id;\n }", "title": "" }, { "docid": "76efdc494f038569272b5c0bb3ce0875", "score": "0.5735494", "text": "public function setId($id) \n {\n $this->id = $id;\n }", "title": "" }, { "docid": "76efdc494f038569272b5c0bb3ce0875", "score": "0.5735494", "text": "public function setId($id) \n {\n $this->id = $id;\n }", "title": "" }, { "docid": "d2b904e48ca79eccf2122e42f2959606", "score": "0.5734586", "text": "public function edit_template($id){\n\t\t//permittedArea();\n\t\t$data['template_details'] = $this->db->get_where('dynamic_invoice', ['id' => $id]);\n\t\t\n\t\tif($this->input->post())\n\t\t{\n\t\t\tif($this->input->post('submit') != 'edit_template') die('Error! sorry');\n $this->form_validation->set_rules('template_name', 'Template Name', 'required|trim');\n\t\t\n\t\t\tif($this->form_validation->run() == true)\n\t\t\t{\n\t\t\t\t$insert = $this->dynamic_invoice_model->edit_template($id);\n\t\t\t\tif($insert)\n\t\t\t\t{\n\t\t\t\t\t$this->session->set_flashdata('successMsg', 'Template Updated Successfully.');\n\t\t\t\t\tredirect(base_url('dynamic_invoice/all_templates'));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttheme('edit_template', $data);\n\t}", "title": "" }, { "docid": "0ddc87a336bbf1352b1ae859f0b7bc63", "score": "0.57310843", "text": "function setid (String $id){\n $this->id=$id;\n }", "title": "" }, { "docid": "de7d2c9ba9d65147856c7947d5207ad9", "score": "0.5729344", "text": "public function set_id($id)\n {\n $this->setId($id);\n }", "title": "" }, { "docid": "dac882d1c1b6fbe4ee50d0d57d766cb0", "score": "0.5728474", "text": "private function setId($id)\n {\n $this->id = $id;\n }", "title": "" }, { "docid": "dac882d1c1b6fbe4ee50d0d57d766cb0", "score": "0.5728474", "text": "private function setId($id)\n {\n $this->id = $id;\n }", "title": "" }, { "docid": "da33d4e0e174f9701fff0723f70380f8", "score": "0.5723431", "text": "public function setId($id){\n $this->id = $id;\n }", "title": "" }, { "docid": "da33d4e0e174f9701fff0723f70380f8", "score": "0.5723431", "text": "public function setId($id){\n $this->id = $id;\n }", "title": "" }, { "docid": "da33d4e0e174f9701fff0723f70380f8", "score": "0.5723431", "text": "public function setId($id){\n $this->id = $id;\n }", "title": "" }, { "docid": "608f6a8b35b2166daf43038bb3f8e006", "score": "0.57222414", "text": "public function setID($_id) \n\t{\n\t\t$this->_id = $_id;\n\t}", "title": "" }, { "docid": "9885174244eff40fba9a1fa0d2464789", "score": "0.5710516", "text": "public function setId($id){\n $this->id = $id;\n }", "title": "" }, { "docid": "c548a98cfa21df17f69ed33af37bb923", "score": "0.57075363", "text": "public function setId($id)\n {\n $this->id = $id;\n }", "title": "" }, { "docid": "829735cc98be50bedd860409fb84f67e", "score": "0.57014537", "text": "public function set_template( $template ) {\n\n\t\t$this->template = $template;\n\t}", "title": "" }, { "docid": "3c09f169390549ad34b5c1616deec876", "score": "0.57001716", "text": "public function __setId($id) { \n $this->$id= $id;\n }", "title": "" }, { "docid": "a1ef42d57bab23731af3698abb9334ef", "score": "0.569683", "text": "public function setId($id)\r\n {\r\n $this->id = $id;\r\n }", "title": "" }, { "docid": "a1ef42d57bab23731af3698abb9334ef", "score": "0.569683", "text": "public function setId($id)\r\n {\r\n $this->id = $id;\r\n }", "title": "" }, { "docid": "a1ef42d57bab23731af3698abb9334ef", "score": "0.569683", "text": "public function setId($id)\r\n {\r\n $this->id = $id;\r\n }", "title": "" }, { "docid": "059175c87b0a4c73f19d66ae7bacb80e", "score": "0.569681", "text": "public function setId($id) {\r\n $this->id = $id;\r\n\r\n }", "title": "" }, { "docid": "1ccc7c78c356872fdfc2ce0d860b1b6a", "score": "0.56912774", "text": "public function set_id($var_id) {\r\n\t\t$this->id = $var_id;\r\n\t}", "title": "" }, { "docid": "1ccc7c78c356872fdfc2ce0d860b1b6a", "score": "0.56912774", "text": "public function set_id($var_id) {\r\n\t\t$this->id = $var_id;\r\n\t}", "title": "" }, { "docid": "a70e93ed0d85aa17bf0574a0a35bab3e", "score": "0.56884265", "text": "public function setTemplate(string $tplFileName);", "title": "" }, { "docid": "604328109e3c8d3ccd44b112e9cbc361", "score": "0.5680749", "text": "function setId($id) {\r\r\n\t$this->id = $id;\r\r\n}", "title": "" }, { "docid": "256939e33df6b8ec86b62737897553d1", "score": "0.5677845", "text": "public function setId($id)\r\n {\r\n $this->id = $id;\r\n }", "title": "" }, { "docid": "2861f27cdb3e5fb4733861b1c0715232", "score": "0.56769747", "text": "public function setID($value) {\n\t\t\t$this->_id = $value;\n\t\t}", "title": "" }, { "docid": "0b8cf2c9014663dcee9a3dbe9785b5e2", "score": "0.56743073", "text": "public function setId($id)\n {\n $this->id = $id;\n }", "title": "" }, { "docid": "0b8cf2c9014663dcee9a3dbe9785b5e2", "score": "0.56743073", "text": "public function setId($id)\n {\n $this->id = $id;\n }", "title": "" }, { "docid": "49e2e2ba9aa1a11724317bd122dc1e6a", "score": "0.5667498", "text": "public function setId($id)\n\t{\n\t\t$this->id = $id;\n\t}", "title": "" }, { "docid": "49e2e2ba9aa1a11724317bd122dc1e6a", "score": "0.5667498", "text": "public function setId($id)\n\t{\n\t\t$this->id = $id;\n\t}", "title": "" }, { "docid": "06c1d16bd177ad6c1c1ef6588c2df74f", "score": "0.5657746", "text": "public function setID($id)\n {\n $this->id=$id;\n }", "title": "" }, { "docid": "657053de1584f4c78b90d08a9a019433", "score": "0.5657638", "text": "public function setId($id){ $this->id = $id; }", "title": "" } ]
9f92d0f2731f2ac2874687bec1518846
If the host was switched but session cookie won't recognize it add session id to query
[ { "docid": "8ed771cbfe33629624e866258fd5ae85", "score": "0.54704607", "text": "public function checkCookieDomains()\n {\n $hostArr = explode(':', $this->getRequest()->getServer('HTTP_HOST'));\n if ($hostArr[0] !== $this->getHost()) {\n $session = Mage::getSingleton('core/session');\n if (!$session->isValidForHost($this->getHost())) {\n if (!self::$_encryptedSessionId) {\n $helper = Mage::helper('core');\n if (!$helper) {\n return $this;\n }\n self::$_encryptedSessionId = $session->getEncryptedSessionId();\n }\n $this->setQueryParam($session->getSessionIdQueryParam(), self::$_encryptedSessionId);\n }\n }\n return $this;\n }", "title": "" } ]
[ { "docid": "37e47a398f7d015480b4329a8ac5dc53", "score": "0.6139686", "text": "function start_session_on_site()\n{\n \n $life_time = Authentication::COOKIE_EXPIRE;\n\n if(is_dir(__DIR__ . '/.sessions')) {\n\n session_save_path(__DIR__ . '/.sessions');\n \n }\n\n $session_name = session_name('scriptlog');\n \n if(ini_get('session.use_cookies')) {\n\n $current_cookie_params = session_get_cookie_params();\n\n }\n\n if (PHP_VERSION_ID >= 70300) { \n \n session_set_cookie_params([\n 'lifetime' => $life_time,\n 'path' => '/',\n 'domain' => $current_cookie_params[\"domain\"],\n 'secure' => $current_cookie_params[\"secure\"],\n 'httponly' => 1,\n 'samesite' => 'Lax'\n ]);\n\n } else { \n\n session_set_cookie_params(\n $life_time,\n '/; samesite=Lax',\n $current_cookie_params[\"domain\"],\n $current_cookie_params[\"secure\"],\n 1\n );\n\n }\n \n if (isset($_COOKIE[$session_name])) {\n\n $session_id = $_COOKIE[$session_name];\n\n } elseif (isset($_GET[$session_name])) {\n\n $session_id = $_GET[$session_name];\n\n } else {\n\n return turn_on_session($life_time, $session_name, $current_cookie_params[\"path\"], $current_cookie_params[\"domain\"], $current_cookie_params[\"secure\"], true);\n \n }\n\n if(!session_valid_id($session_id)) {\n\n return false;\n\n }\n\nreturn turn_on_session($life_time, $session_name, $current_cookie_params[\"path\"], $current_cookie_params[\"domain\"], $current_cookie_params[\"secure\"], true);\n\n}", "title": "" }, { "docid": "ca430522ead9a757e8a0064c9ed2c5ae", "score": "0.6099928", "text": "function LoginWithSession($redirectionPage){\r\n if(isset($_COOKIE[\"LoginSession\"])){\r\n $sql = new sql();\r\n $sql = $sql->connection;\r\n \r\n $LoginSession = $_COOKIE[\"LoginSession\"];\r\n $query = \"SELECT `Authentification_Id`,count(*) count FROM `session` WHERE \r\n `ExpiryDate` > NOW() AND `Content` = '$LoginSession' && `Status` = 1 ;\";\r\n // echo $query;\r\n // echo $query;\r\n if( $result = $sql->query($query)){\r\n $row = $result->fetch_assoc();\r\n if($row[\"count\"] > 0){\r\n FollowReturnUrl();\r\n header(\"Location: $redirectionPage\");\r\n }else{\r\n setcookie(\"LoginSession\",\"\",time() - 1000,\"/\");\r\n }\r\n \r\n \r\n }\r\n return false;\r\n }\r\n \r\n }", "title": "" }, { "docid": "6db20e2846ca04a8d1d9ed599f0cf074", "score": "0.60811174", "text": "private function resolveSession()\r\n {\r\n if(!isset($_COOKIE['session']))\r\n return;\r\n\r\n // print(\"I found a cookie! \".$_COOKIE['session'].\"<br>\");\r\n $id = $this->getSessionValueByIndex($_COOKIE['session'], 0);\r\n $session = $this->getSessionValueByIndex($_COOKIE['session'], 1);\r\n\r\n $user = new CDataUser($id, false, $this->m_envs);\r\n $userSession = $user->getValue(\"session\");\r\n\r\n // print(\"id: $id<br>session: $session<br><br>\");\r\n // print(\"user session according to database: $userSession<br>\");\r\n\r\n if($userSession == \"\")\r\n return;\r\n\r\n if($session != $userSession)\r\n return;\r\n\r\n $this->m_user = $user;\r\n }", "title": "" }, { "docid": "12b5eea4aef09c9729bd3e96b5efcdb9", "score": "0.60451645", "text": "static function get_sessionid()\n {\n \tglobal $user, $auth;\n\n \treturn $user->session_id;\n }", "title": "" }, { "docid": "d9dc7ada0380b40fe16486e4dffd0fbf", "score": "0.59836566", "text": "function sso_session_check()\n{\n\tstatic $sid;\n\tif (isset($sid)) {\n\t\treturn $sid;\n\t}\n\n\t// if we get here, we haven't started sessions yet...\n\t$conf = sso_config();\n\tif ($conf['sess_enable'] && $conf['sess_cookie']) {\n\t\t// session/cookie name\n\t\t$c_name = $conf['sess_cookie'];\n\n\t\t// using the sso cookie for our session id\n\t\tif ($conf['sess_cookie'] === $conf['sso_cookie']) {\n\t\t\t$c_host = '.oregonstate.edu';\n\t\t\t$c_path = '/';\n\t\t\t$c_secure = 0;\n\t\t\t$c_length = 0;\n\n\t\t// using a custom cookie for our session id\n\t\t} else {\n\t\t\t$c_host = !empty($conf['sess_host']) ? $conf['sess_host'] : $_SERVER['HTTP_HOST'];\n\t\t\t$c_path = !empty($conf['sess_path']) ? $conf['sess_path'] : '/';\n\t\t\t$c_secure = !empty($conf['sess_secure']) ? $conf['sess_secure'] : 0;\n\t\t\t$c_length = !empty($conf['sess_length']) ? $conf['sess_length'] : 0;\n\t\t}\n\n\t\t// we're using cookie based sessions here...\n\t\tsession_set_cookie_params($c_length, $c_path, $c_host, $c_secure);\n\n\t\t// register database session handling functions (if we have db connectivity)\n\t\t// without db connectivity, this will fallback to default file based session - oh well...\n\t\tif (sso_db_connect()) {\n\t\t\tsession_set_save_handler(\n\t\t\t\t\"sso_sess_open\",\n\t\t\t\t\"sso_sess_close\",\n\t\t\t\t\"sso_sess_read\",\n\t\t\t\t\"sso_sess_write\",\n\t\t\t\t\"sso_sess_destroy\",\n\t\t\t\t\"sso_sess_gc\");\n\t\t}\n\n\t\t// specify session name\n\t\tsession_name($c_name);\n\n\t\t// make sure we continue using any existing session id\n\t\tif (isset($_COOKIE[$c_name])) {\n\t\t\tsession_id($_COOKIE[$c_name]);\n\t\t}\n\n\t\t// fire up the session\n\t\tsession_start();\n\n\t\t// need to reset session if a new sso login is detected\n\t\tif ((!empty($_SESSION['sso']['sid'])) && ($_SESSION['sso']['sid'] != $_COOKIE[$conf['sso_cookie']])) {\n\n\t\t\t// session_regenerate_id() doesn't function as documented with custom session handlers\n\t\t\t// so we must explicitly destroy and start a new session.\n\t\t\tsession_regenerate_id();\n\t\t\t$new_sid = session_id();\n\n\t\t\t$_SESSION = array();\n\t\t\tsession_destroy();\n\n\t\t\t// need to set handlers again (see bug http://bugs.php.net/bug.php?id=32330)\n\t\t\tif (sso_db_connect()) {\n\t\t\t\tsession_set_save_handler(\n\t\t\t\t\t\"sso_sess_open\",\n\t\t\t\t\t\"sso_sess_close\",\n\t\t\t\t\t\"sso_sess_read\",\n\t\t\t\t\t\"sso_sess_write\",\n\t\t\t\t\t\"sso_sess_destroy\",\n\t\t\t\t\t\"sso_sess_gc\");\n\t\t\t}\n\n\t\t\t// set new sid and start the new session\n\t\t\tsession_id($new_sid);\n\t\t\tsession_start();\n\t\t}\n\n\t\t// remember session id for future calls to this function\n\t\t$sid = session_id();\n\t\t$_COOKIE[$c_name] = $sid;\n\n\t// sessions not enabled\n\t} else {\n\t\t$sid = '';\n\t}\n\n\treturn $sid;\n}", "title": "" }, { "docid": "0ae164d3b8945819ef209746d0b3cf57", "score": "0.59465253", "text": "public function getSessionId();", "title": "" }, { "docid": "01eda036c56179e69fe0639504219fa1", "score": "0.5931343", "text": "function sessionId();", "title": "" }, { "docid": "4630a1bff99e26ca80542b339d505d8d", "score": "0.5918573", "text": "function qSession()\n {\n \tif (@constant('TZN_TRANS_ID')) {\n\t\t\tprint '<input type=\"hidden\" name=\"'.ini_get('session.name')\n \t\t\t.'\" value=\"'.session_id().'\" />';\n \t}\n }", "title": "" }, { "docid": "a5726956386543590cd35f074cd74bc2", "score": "0.59125686", "text": "private function get_session() {\r\n\r\n\t\tif ($_SESSION['id']) {\r\n\r\n\t\t\t$this->core->db->simple_select('member_name, member_id, member_group, browser_key', 'sessions', 'id=\\''.$_SESSION['id'].'\\'');\r\n\t\t\t$row = $this->core->db->fetch();\r\n\r\n\t\t\tif ($row) {\r\n\r\n\t\t\t\t$_SESSION['member_id']\t= $row['member_id'];\r\n\t\t\t\t$this->browser_key\t\t= $row['browser_key'];\r\n\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$_SESSION['member_id']\t= 0;\r\n\t\t\t\t$_SESSION['id']\t\t\t= 0;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$_SESSION['member_id']\t\t= 0;\r\n\t\t\t$_SESSION['id']\t\t\t\t= 0;\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "4c5f7790000b09ce45502f2aaa19bb63", "score": "0.58827657", "text": "function get_sessions()\r\n\t{\r\n\t\tglobal $db,$pages;\r\n\t\t$results = $db->select(tbl($this->tbl),'*',\" session ='\".$this->id.\"' \");\r\n\t\t\r\n\t\t$cur_url = $pages->GetCurrentUrl();\r\n\t\t\r\n\t\tif(getConstant('THIS_PAGE')!='cb_install')\r\n\t\t{\r\n\t\t\tif(getConstant('THIS_PAGE')!='ajax') {\r\n\t\t\t\t$db->update(tbl($this->tbl),array(\"last_active\",\"current_page\"),array(now(),$cur_url),\" session='\".$this->id.\"' \");\r\n\t\t\t}else {\r\n\t\t\t\t$db->update(tbl($this->tbl),array(\"last_active\"),array(now()),\" session='\".$this->id.\"' \");\r\n }\r\n\t\t}\r\n\t\t\t\r\n\t\treturn $results;\r\n\t}", "title": "" }, { "docid": "610e0ef20072e4711dfa529d06061550", "score": "0.5869996", "text": "public function nameOfSessionCookie() { return parent::nameOfSessionCookie(); }", "title": "" }, { "docid": "42fa10723f5899df6e8f9ffe132849bb", "score": "0.58586615", "text": "function getSessionId($userId, $password, $force=\"true\") {\n$isAlreadyLoggedIn = false;\n $query = \"select ush.session_id, ush.login_time, users.user_id, users.user_type from (select * from user_session_history where logout_time is null ) as ush join users on users.user_id = ush.user_id where users.user_type = 'CustomerManager'\";\n\n debugLog($query);\n $result = ameyoDBQuery($query);\n debugLog(\"Response : \".$result);\n $result = json_decode($result);\n\n\nif(count($result) > 0) {\n$isAlreadyLoggedIn = true;\n$result = $result[0];\n//$returnData = $result->lead_id;\n$cmSessionID = $result->session_id;\n}\n\n//if Customer Manager is logged in just use the live session id :\necho \"IsAlreadyLoggedIn = \".$isAlreadyLoggedIn.'\\n';\n\n// else if the customer manager is not loggedin login using doLogin()\nreturn doLogin($userId, $password, $force);\n\n\n}", "title": "" }, { "docid": "46fe691f4fa508a2dd41a349fb4fc170", "score": "0.5843677", "text": "function cr_session_id($sessid = ''){\n\tif(!empty($sessid)){\n\t\treturn session_id($sessid);\n\t}else{\n\t\treturn session_id();\n\t}\n}", "title": "" }, { "docid": "475c8d290c89c7e45fda305317306ee0", "score": "0.584349", "text": "public function load_session_id()\n {\n \t\tglobal $user, $auth, $phpbb_container, $phpbb_extension_manager;\n \t\t$user->session_begin();\n $auth->acl($user->data);\n\n\n \t\tif(!\\wpphpbbu\\User::is_user_logged_in()){\n\n \t\t\t$userid = \\wpphpbbu\\User::get_userid(); // Get user ID\n\n // $user->setup(false,false);\n \t\t\tif($userid > 0 ) // If user ID is bigger than 0 and user ID is not equal with the current user ID\n \t\t\t{\n \t\t\t\twp_clear_auth_cookie();\n \t\t\t\t$wpuser = wp_set_current_user($userid); // Set the current user\n \t\t\t\twp_set_auth_cookie($wpuser->ID, true, false);\n // apply_filters( 'nonce_user_logged_out', $wpuser->ID );\n \t\t\t}\n }\n // Return current user session id\n return $user->session_id;\n }", "title": "" }, { "docid": "964330e8a9c8f2c20607ffb491bdb699", "score": "0.58391476", "text": "function session()\r\n\t{\r\n\t\tglobal $db, $config, $my;\r\n\t\t$this->purge($config->data['lifetime']);\r\n\r\n\t\t$this->_s_cookie = trim($_REQUEST[$config->data['cookie'].'_id']);\r\n\t\t$this->_d_cookie = trim($_REQUEST[$config->data['cookie'].'_data']);\r\n\t\t$this->_user_ip = get_ip();\r\n\r\n\t\t$sql = \"SELECT * FROM `%__sessions` WHERE `s_id`='\".$this->_s_cookie.\"' AND `s_ipaddr`='\".$this->_user_ip.\"'\";\r\n\t\t$db->setQuery($sql);\r\n\t\tif ( $db->loadObject($this) ) {\r\n\t\t\t$this->_sessionid = $this->s_id;\r\n\t\t\t$this->s_time = time();\r\n\t\t} else {\r\n\t\t\tlist($sec, $usec) = explode(' ', microtime());\r\n\t\t\tmt_srand((float) $sec + ((float) $usec * 100000));\r\n\t\t\t$this->_sessionid = md5(uniqid(mt_rand(), true));\r\n\t\t\t$this->s_id = $this->_sessionid;\r\n\t\t\t$this->s_start = time();\r\n\t\t\t$this->s_time = time();\r\n\t\t\t$this->s_userid = '-1';\r\n\t\t\t$this->s_ipaddr = $this->_user_ip;\r\n\t\t\t$this->s_logged_in = '0';\r\n\t\t\t$this->s_admin = '0';\r\n\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "982bdd142137ba7ba62ec3a881b43ea0", "score": "0.5806237", "text": "function buckys_session_id($sessid = '') {\r\n if (!empty($sessid)) {\r\n return session_id($sessid);\r\n } else {\r\n return session_id();\r\n }\r\n}", "title": "" }, { "docid": "e4d80e4bb404f359e177bbfbe44a92a8", "score": "0.58036727", "text": "function changeSessionID () {\r\n\r\n // Ask the browser to delete the existing cookie\r\n setcookie(\"PHPSESSID\", \"\", time()-3600, \"/\");\r\n\r\n // Change the session ID and send it to the browser in a secure cookie\r\n $server = $_SERVER['SERVER_NAME'];\r\n $secure = usingHTTPS();\r\n session_set_cookie_params(0, \"/\", $server, $secure, true);\r\n session_regenerate_id(true);\r\n}", "title": "" }, { "docid": "6c243861ea8f483231b3eff8fb9cd6dd", "score": "0.57723457", "text": "public function getSessionID()\n\t{\n\t\tif (isset($this->session['id'])) return $this->session['id'];\n\t}", "title": "" }, { "docid": "e6fb490fdcd07b26cdc29f5b4372108c", "score": "0.577163", "text": "public function setSessionId($session_id);", "title": "" }, { "docid": "05a5aa9cee7689ed4129d7dad368a226", "score": "0.575898", "text": "function SessionID() {\n return $this->SessionName;\n }", "title": "" }, { "docid": "bf4785dc7520d18393fa24e25914ffef", "score": "0.57410985", "text": "protected static function is_session_hijacked() {\n if (!isset($_SESSION[self::SESSION_NAME]['session_info']['ip_address']) || !isset($_SESSION[self::SESSION_NAME]['session_info']['user_agent'])) {\n self::regenerate_id(); // This is a completely new session so regenerating won't cause any harm here, just ensure that it hasn't just been captured\n return false;\n } else if ($_SESSION[self::SESSION_NAME]['session_info']['ip_address'] != $_SERVER['REMOTE_ADDR']) {\n return true;\n } else if ($_SESSION[self::SESSION_NAME]['session_info']['user_agent'] != $_SERVER['HTTP_USER_AGENT']) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "cdad6470fa902ced1116cebd42e28447", "score": "0.57289225", "text": "private static function getSessionHash() {\n\t\tif (self::$useEtag) {\n\t\t\treturn empty($_SERVER['HTTP_IF_NONE_MATCH']) ? false : $_SERVER['HTTP_IF_NONE_MATCH'];\n\t\t}\n\t\tisset($_SESSION) || session_start();\n\t\tif (!isset($_SESSION[__FILE__][$_SERVER['REQUEST_URI']])) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $_SESSION[__FILE__][$_SERVER['REQUEST_URI']];\n\t}", "title": "" }, { "docid": "01f76f03d662cf035533f957856a6bd6", "score": "0.57188845", "text": "public static function getSessionID()\n\t{\n\t\treturn session_id();\n\t}", "title": "" }, { "docid": "3798856ef2a6ff2405cad5872c975b8b", "score": "0.57140005", "text": "function sec_session_start()\n{\n $session_name = 'sec_session_id'; //set a custom session name\n $secure = false; //set to true if using https\n $httponly = true; //stops javascript access to session id\n ini_set('session.use_only_cookies', 1); //forces sessions to only use cookies\n $cookieParams = session_get_cookie_params(); //gets current cookies params\n session_set_cookie_params($cookieParams['lifetime'], $cookieParams['path'], $cookieParams['domain'], $secure, $httponly);\n session_name($session_name); //sets session name to custom name set above\n session_start(); //start php session\n session_regenerate_id();\n}", "title": "" }, { "docid": "e69fab6b077d46af9d436eeacb07de36", "score": "0.57086205", "text": "function loadBySessionId( )\n {\n $sql = \"SELECT\n id,\n name,\n full_name,\n password,\n mail,\n\t\t pane\n FROM\n \". $this->table .\"\n WHERE\n sessid = '\". $this->sessid .\"'\";\n\n $result = $this->dba->exec( $sql );\n $record = $this->dba->fetchArray( $result );\n\n if( !$record ) return false;\n\n $this->id = $record[\"id\"];\n $this->name = stripslashes ( $record[\"name\"] );\n $this->full_name = stripslashes ( $record[\"full_name\"] );\n $this->password = stripslashes ( $record[\"password\"] );\n $this->mail = stripslashes ( $record[\"mail\"] );\n\t $this->pane = $record[\"pane\"];\n\n return true;\n }", "title": "" }, { "docid": "9c99267461d63376e137b59f61a8c5c5", "score": "0.5704355", "text": "function appendPhpsessid($url)\n {\n if (!$url = $this->addParams($url, array('PHPSESSID' => session_id()))) {\n return false;\n }\n \n return $url;\n }", "title": "" }, { "docid": "a44c06056bde7144fff3b8197ed60813", "score": "0.57031095", "text": "function getSessionKey(){\n\t\t$app =& Dataface_Application::getInstance();\n\t\t$query =& $app->getQuery();\n\t\tif ( isset($query['--form-session-key']) ){\n\t\t\treturn $query['--form-session-key'];\n\t\t} else {\n\t\t\t$key = rand().'_'.time();\n\t\t\t$query['--form-session-key'] = $key;\n\t\t\treturn $key;\n\t\t}\n\t}", "title": "" }, { "docid": "80ae3c3b42a3cd14a9e116c4937a470e", "score": "0.5683869", "text": "protected function getSessionId()\r\n {\r\n $request = ApplicationContext::getContainer()->get(RequestInterface::class);\r\n $token = $request->cookie($this->getCookieName());\r\n $checksum = hash('sha256', 'session' . $token . $this->brokerSecret);\r\n return \"sso-{$this->brokerName}-{$token}-$checksum\";\r\n }", "title": "" }, { "docid": "69bfc81f4a0961170637e0c020887fc2", "score": "0.567959", "text": "protected function session($args) {\n $session = mySession::getInstance();\n if ($this->method == 'GET') {\n return $session->getSessionId();\n } else {\n return \"Only accepts GET requests\";\n }\n }", "title": "" }, { "docid": "0beae2f9835d8e0d983554d8dcdb7902", "score": "0.5676686", "text": "public function setSessionWithCookies(){\n\t\t$_SESSION[self::$postUsernameString] = $this->getCookieUsername();\n\t\t$_SESSION[self::$postPasswordIndex] = $this->getCookiePassword();\n\t\t$_SESSION[self::$IP] = $_SERVER['REMOTE_ADDR'];\n\t\t$_SESSION[self::$userAgent] = $_SERVER['HTTP_USER_AGENT'];\n\t\t$this->MakeLogoutSession();\t\n\t}", "title": "" }, { "docid": "60bd1c6a20dba1d8458bdfb49054bc9a", "score": "0.5651369", "text": "function pn_update_session($sid) {\n global $pn_session_table;\n global $app_host, $app_login, $app_pass, $app_db, $app_same_db;\n global $c, $db_host, $db_login, $db_password, $db_database;\n\n // if postnuke is in a separate db, we have to connect to it\n if ($app_same_db != '1') $c = dbi_connect($app_host, $app_login, $app_pass, $app_db);\n\n // get login and last access time\n $sql = \"UPDATE $pn_session_table SET pn_lastused = '\".time ().\"' WHERE pn_sessid = '$sid' \";\n dbi_query ( $sql );\n\n // if postnuke is in a separate db, we have to connect back to the webcal db\n if ($app_same_db != '1') $c = dbi_connect($db_host, $db_login, $db_password, $db_database);\n\n return true;\n}", "title": "" }, { "docid": "bad7a4de1621b94307dc288d76693743", "score": "0.56473374", "text": "function set_visitor_id() {\r\n\t\t\tif(empty($_COOKIE['visitor_id'])) {\r\n\t\t\t\t$visitor_id = substr(md5(sha1(crc32(md5(base64_decode(microtime())).microtime()))), 0, 32);\r\n\t\t\t\tsetcookie('visitor_id', $visitor_id, current_time( 'timestamp')+3600*24*30);\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "a9989b683b4bb5fdf36ea4d1468dd691", "score": "0.5625264", "text": "public function checkSession($hash)\n {\n include(\"config.php\");\n\n $ip = $this->getIp();\n \n if($this->isBlocked($ip))\n {\n return false;\n }\n else\n {\n if(strlen($hash) != 40) { setcookie($auth_conf['cookie_auth'], $hash, time() - 3600, $auth_conf['cookie_path'], $auth_conf['cookie_domain'], false, true); return false; }\n \n $query = $this->mysqli->prepare(\"SELECT id, uid, expiredate, ip, agent, cookie_crc FROM sessions WHERE hash = ?\");\n $query->bind_param(\"s\", $hash);\n $query->bind_result($sid, $uid, $expiredate, $db_ip, $db_agent, $db_cookie);\n $query->execute();\n $query->store_result();\n $count = $query->num_rows;\n $query->fetch();\n $query->close();\n \n if($count == 0)\n { \n setcookie($auth_conf['cookie_auth'], $hash, time() - 3600, $auth_conf['cookie_path'], $auth_conf['cookie_domain'], false, true);\n \n $this->addNewLog($uid, \"CHECKSESSION_FAIL_NOEXIST\", \"Hash ({$hash}) doesn't exist in DB -> Cookie deleted\");\n \n return false;\n }\n else\n {\n \n if($ip != $db_ip)\n {\n if($_SERVER['HTTP_USER_AGENT'] != $db_agent)\n {\n $this->deleteExistingSessions($uid);\n \n setcookie($auth_conf['cookie_auth'], $hash, time() - 3600, $auth_conf['cookie_path'], $auth_conf['cookie_domain'], false, true);\n \n $this->addNewLog($uid, \"CHECKSESSION_FAIL_DIFF\", \"IP and User Agent Different ( DB : {$db_ip} / Current : \" . $ip . \" ) -> UID sessions deleted, cookie deleted\");\n \n return false;\n }\n else\n {\n $expiredate = strtotime($expiredate);\n $currentdate = strtotime(date(\"Y-m-d H:i:s\"));\n \n if($currentdate > $expiredate)\n { \n $this->deleteExistingSessions($uid);\n \n setcookie($auth_conf['cookie_auth'], $hash, time() - 3600, $auth_conf['cookie_path'], $auth_conf['cookie_domain'], false, true);\n \n $this->addNewLog($uid, \"CHECKSESSION_FAIL_EXPIRE\", \"Session expired ( Expire date : {$db_expiredate} ) -> UID sessions deleted, cookie deleted\");\n \n return false;\n }\n else \n {\n $this->updateSessionIp($sid, $ip);\n \n return true;\n }\n }\n }\n else \n {\n $expiredate = strtotime($expiredate);\n $currentdate = strtotime(date(\"Y-m-d H:i:s\"));\n \n if($currentdate > $expiredate)\n { \n $this->deleteExistingSessions($uid);\n \n setcookie($auth_conf['cookie_auth'], $hash, time() - 3600, $auth_conf['cookie_path'], $auth_conf['cookie_domain'], false, true);\n \n $this->addNewLog($uid, \"AUTH_CHECKSESSION_FAIL_EXPIRE\", \"Session expired ( Expire date : {$db_expiredate} ) -> UID sessions deleted, cookie deleted\");\n \n return false;\n }\n else \n { \n $cookie_crc = sha1 ($hash.$auth_conf['sitekey']);\n \n if ($db_cookie == $cookie_crc) \n { \n return true;\n } \n else \n {\n $this->addNewLog($uid, \"AUTH_COOKIE_FAIL_BADCRC\", \"Cookie Integrity failed\");\n \n return false;\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "d9809c91f711aba7bb1d9b148fbd6e2c", "score": "0.561339", "text": "public function getSessionId() : string\n {\n //if its empty get it from the relationship, else get it from the property\n return empty($this->session_id) ? $this->getSession(['order' => 'time desc'])->session_id : $this->session_id;\n }", "title": "" }, { "docid": "d9809c91f711aba7bb1d9b148fbd6e2c", "score": "0.561339", "text": "public function getSessionId() : string\n {\n //if its empty get it from the relationship, else get it from the property\n return empty($this->session_id) ? $this->getSession(['order' => 'time desc'])->session_id : $this->session_id;\n }", "title": "" }, { "docid": "fb680e0d56b99fc39f778e83175fb217", "score": "0.5610982", "text": "protected function _has_session() {\r\n //check if a session or cookie exists,\r\n if (!empty($_SESSION[$this->cookie_prefix . \"sid\"]) && !empty($_SESSION[$this->cookie_prefix . \"sid_\"])) {\r\n $this->session_id = $_SESSION[$this->cookie_prefix . \"sid\"];\r\n $this->session_id_ = $_SESSION[$this->cookie_prefix . \"sid_\"];\r\n\r\n return array($this->session_id, $this->session_id_);\r\n } \r\n else if (!empty($_COOKIE[$this->cookie_prefix . \"sid\"]) && !empty($_COOKIE[$this->cookie_prefix . \"sid_\"])) {\r\n $this->session_id = $_COOKIE[$this->cookie_prefix . \"sid\"];\r\n $this->session_id_ = $_COOKIE[$this->cookie_prefix . \"sid_\"];\r\n\r\n return array($this->session_id, $this->session_id_);\r\n }\r\n else {\r\n $request = !empty($_REQUEST) ? sanitze_request($_REQUEST) : array();\r\n\r\n if (empty($request[$this->cookie_prefix . \"sid\"]) || empty($request[$this->cookie_prefix . \"sid_\"]))\r\n return false;\r\n\r\n $this->session_id = $request[$this->cookie_prefix . \"sid\"];\r\n $this->session_id_ = $request[$this->cookie_prefix . \"sid_\"];\r\n\r\n return array($this->session_id, $this->session_id_);\r\n }\r\n }", "title": "" }, { "docid": "85129776976d98105cd3a930d11c4997", "score": "0.55997515", "text": "protected function setSessionId()\n {\n $dataHandler = $this->app->getDataHandler();\n $this->sessionId = $dataHandler->get(AdventureResSessionKeys::SESSION_ID);\n\n if (!$this->sessionId || !$this->isValidSessionId($this->sessionId)) {\n $this->clearSession();\n\n $this->sessionId = $this->authenticate();\n\n $dataHandler->set(AdventureResSessionKeys::SESSION_ID, $this->sessionId);\n }\n }", "title": "" }, { "docid": "42eda245fc279e911325c7a72e6e6ef7", "score": "0.5596924", "text": "public function loginFromSession(){\n\t\t\t$userSessionId = Session::get('user_logged_id');\n\t\t\t$userSessionHash = Session::get('user_logged_hash');\n\t\t\t\n\t\t\tif (empty($userSessionId) || empty($userSessionHash))\n\t\t\t\treturn;\n\t\t\t\n\t\t\t$user_data = $this->getById($userSessionId);\n\t\t\t$this->pushData($user_data);\n\t\t\t\n\t\t\tif ($userSessionHash === $this->generateHash()) {\n\t\t\t\t$this->isLogged = true;\n\t\t\t} else {\n\t\t\t\t$this->user = null;\n\t\t\t}\n\t\t\t\n\t\t\treturn;\n\t\t}", "title": "" }, { "docid": "db058de28d74dfc64124388964deef95", "score": "0.55752254", "text": "function GetCartId() \n{\n// will set it as a cookie using set_cookie. This will \n// also be used as the cookieId field in the cart table \n\nif(isset($_COOKIE[\"cartId\"])) \n{ \nreturn $_COOKIE[\"cartId\"]; \n} \nelse \n{ \n// There is no cookie set. We will set the cookie \n// and return the value of the users session ID \n \nsetcookie(\"cartId\", session_id(), time() + ((3600 * 24) * 30)); \nreturn session_id(); \n} \n}", "title": "" }, { "docid": "c8dbf7148f93a8c954b311dbfb782360", "score": "0.5572357", "text": "function check_session_home_id()\n{\n\tif(isset($_SESSION['home_id']))\n\t{\n\t\tif($_SESSION['home_id'] !=\"\" && $_SESSION['home_id'] != null)\n\t\t{\n\t\t\tglobal $home_id;\n\t\t\t$home_id = $_SESSION['home_id'];\n\t\t}\n\t}\n\telse\n\t{\n\t\tglobal $home_id;\n\t\t$home_id = get_primary_home($_SESSION['login']);\n\t\t$_SESSION['home_id'] = $home_id;\n\t}\n}", "title": "" }, { "docid": "8d9adf50b2ef26dd480a39be95b7f7f7", "score": "0.5569526", "text": "function kcw_logs_get_session($staffid) {\n $session = kcw_logs_wpdb_util_get_row(\"logs_sessions\", [\"staffid = '$staffid'\", \"expires > '\".time().\"'\"]);\n if (count($session) == 0) return false;\n else return $session;\n}", "title": "" }, { "docid": "c364276dd88bbe25b3fe22ada52f7d3c", "score": "0.55417603", "text": "public function getSessionID()\n {\n return $this->get('SessionID');\n }", "title": "" }, { "docid": "b681d96beced1b371d587e1ab4e0565e", "score": "0.55358297", "text": "function pn_active_session($sid) {\n global $pn_user_table, $pn_session_table, $pn_settings_table;\n global $app_host, $app_login, $app_pass, $app_db, $app_same_db;\n global $c, $db_host, $db_login, $db_password, $db_database;\n\n // if postnuke is in a separate db, we have to connect to it\n if ($app_same_db != '1') $c = dbi_connect($app_host, $app_login, $app_pass, $app_db);\n\n // get login and last access time\n $sql = \"SELECT pn_uname, pn_lastused FROM $pn_user_table, $pn_session_table WHERE pn_sessid = '$sid' \".\n \"AND $pn_session_table.pn_uid <> 0 AND $pn_session_table.pn_uid=$pn_user_table.pn_uid \";\n $res = dbi_query ( $sql );\n if ( $res ) {\n while ( $row = dbi_fetch_row ( $res ) ) {\n $login = $row[0];\n $last = $row[1];\n }\n dbi_free_result ( $res );\n }\n\n // Get inactive session time limit and see if we have passed it\n $sql = \"SELECT pn_value FROM $pn_settings_table WHERE pn_modname = '/PNConfig' AND pn_name = 'secinactivemins'\";\n $res = dbi_query ( $sql );\n if ( $res ) {\n while ( $row = dbi_fetch_row ( $res ) ) {\n $tmp = explode ( '\"', $row[0] );\n if ( ( $tmp[1] > 0 ) && ( $tmp[1] < ( ( time () - $last ) / 60 ) ) ) $login = false;\n }\n dbi_free_result ( $res );\n }\n\n // if postnuke is in a separate db, we have to connect back to the webcal db\n if ($app_same_db != '1') $c = dbi_connect($db_host, $db_login, $db_password, $db_database);\n\n return $login;\n}", "title": "" }, { "docid": "978ca293dee1f2cef3ad37e89d39b75e", "score": "0.5535319", "text": "public static function getSessionIdFromCookie()\n {\n /**\n * Not always cookie is defined at _COOKIE array\n */\n if (isset($_COOKIE[static::$sessionIdCookieName])){\n return $_COOKIE[static::$sessionIdCookieName];\n }\n else{\n return null;\n }\n }", "title": "" }, { "docid": "b96dea4bdb5be7bbdd647ec796e829ae", "score": "0.55347604", "text": "function newSession()\n\t{\n\t\t\t$sessionID = md5(uniqid(microtime()) . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT'] . mt_rand(100000,999999));\n\t\t\tsetcookie('session', $sessionID, time()+$this->inactiveLogout, \"/\");\n\t\t\treturn $sessionID;\n\t}", "title": "" }, { "docid": "d113ad8e1ae5f138472edd5bb365ce1c", "score": "0.5534586", "text": "function sec_session_start() {\n $session_name = 'sec_session_id'; // Set a custom session name\n $secure = false; // Set to true if using https.\n $httponly = true; // This stops javascript being able to access the session id. \n \n ini_set('session.use_only_cookies', 1); // Forces sessions to only use cookies. \n\t\t//ini_set('session.cache_limiter', 'public');\n $cookieParams = session_get_cookie_params(); // Gets current cookies params.\n session_set_cookie_params($cookieParams[\"lifetime\"], $cookieParams[\"path\"], $cookieParams[\"domain\"], $secure, $httponly); \n session_name($session_name); // Sets the session name to the one set above.\n session_start(); // Start the php session\n session_regenerate_id(true); // regenerated the session, delete the old one. \n}", "title": "" }, { "docid": "e5d312596db475fc8a85c53b54d9d19f", "score": "0.553092", "text": "function find_sess() {\n if(isset($_COOKIE['user_swappy']) && !empty_($_COOKIE['user_swappy'])) {\n $this->load_user_data($this->uncrypt_sess($_COOKIE['user_swappy']), $_COOKIE['user_swappy']);\n } else if(isset($_SESSION['user_swappy']) && !empty_($_SESSION['user_swappy'])) {\n $this->load_user_data($this->uncrypt_sess($_SESSION['user_swappy']), $_SESSION['user_swappy']);\n } else {\n $this->logged = false; \n }\n }", "title": "" }, { "docid": "a8a0cc5712437bb26da47cc3a3736c0b", "score": "0.5524418", "text": "function isConnected($session) {\n if (!isset($session['identifier'])) {\n header('Location: index.php?Controller=Blog');\n } else {\n $identifier = $session['identifier'];\n $user = findUser($identifier);\n if (!$user) {\n header('Location: index.php?Controller=Blog');\n }\n }\n}", "title": "" }, { "docid": "bd62662ec8e49d07dc7d08f7c950887f", "score": "0.5521386", "text": "function SET_iflogged()\n{\nglobal $SET_THEMYSQLHOSTNAME;\nglobal $SET_THEMYSQLUSERNAME;\nglobal $SET_THEMYSQLPASSWORD;\nglobal $SET_THEMYSQLDBNAME;\nglobal $SET_THEMYSQLLOGINTABLE;\nglobal $SET_COOKIEEXPIRY;\nglobal $SET_THEMULTIPLELOGIN;\nglobal $SET_BASIC_MYSQL_CONNECT;\nglobal $SET_BASIC_SELECT_DATABASE;\n\n $thecurrentsessionid=session_id();\n $currentauthkeycookie=$_COOKIE['authkey'];\n $currentbasecookie=$_COOKIE['base'];\n $thecurrentsessionauthkey=$_SESSION['authkey'];\n $thecurrentuserid=$_COOKIE['userid'];\n $ifsession_set=false;\n $thecurrenttimestamp=time();\n $thereneratedthing=false;\n if(($currentauthkeycookie)&&($currentbasecookie)&&($thecurrentuserid))\n {\n if($thecurrentsessionid)\n {\n $ifsession_set=true;\n }\n {\n //extract all details from the table\n $query_ex_details=mysql_query(\"SELECT * FROM $SET_THEMYSQLLOGINTABLE WHERE USERID='$thecurrentuserid'\");\n $answer_ex_details=mysql_fetch_array($query_ex_details);\n if(!$answer_ex_details)\n\t{\n\t if($ifsession_set)\n\t {\n\t error_log(\"[[[[[[[SET]>>>exception cookie userid and session id set for the user with USERID($thecurrentuserid) but the query to the SET_THEMYSQLLOGINTABLENAME returned no result the session and cookies removed\");\n\t $_SESSION['authkey']=\"\";\n\t $_SESSION=array();\n\t session_destroy();\n\t }\n\t $cookie1=setcookie(\"authkey\",\"\",$thecurrenttimestamp-60*60);\n\t $cookie2=setcookie(\"base\",\"\",$thecurrenttimestamp-60*60);\n\t $cookie3=setcookie(\"userid\",\"\",$thecurrenttimestamp-60*60);\n\t $cookie4=setcookie(\"PHPSESSID\",\"\",$thecurrenttimestamp-60*60);\n\t}\n else if($answer_ex_details)\n\t{\n\t $sessionidindb=$answer_ex_details['SESSIONID'];\n\t $loggedindb=$answer_ex_details['LOGGED'];\n\t $logintimeindb=$answer_ex_details['LOGINTIMESTAMP'];\n\t $lasttimedb=$answer_ex_details['LASTTIMESTAMP'];\n\t $authkeyindb=mysql_real_escape_string($answer_ex_details['AUTHKEY']);\n\t $baseindb=mysql_real_escape_string($answer_ex_details['BASE']);\n\t $saltindb=mysql_real_escape_string($answer_ex_details['SALT']);\n\t $usernameindb=$answer_ex_details['NAME'];\n\t $cookieexpiryindb=$answer_ex_details['COOKIEEXPIRY'];\nerror_log($loggedindb);\nerror_log(md5($authkeyindb));\nerror_log($thecurrentsessionauthkey);\nerror_log(md5($logintimeindb.$saltindb.$lasttimedb.$thecurrentuserid.$baseindb.$usernameindb));\nerror_log($currentbasecookie);\nerror_log(\"to verify i am using\".$logintimeindb.\" \".$saltindb.\" \".$lasttimedb.\" \".$thecurrentuserid.\" \".$baseindb.\" \".$usernameindb);\n\t if(!(($loggedindb)&&(md5($authkeyindb)==$currentauthkeycookie)&&(md5($logintimeindb.$saltindb.$lasttimedb.$thecurrentuserid.$baseindb.$usernameindb)==$currentbasecookie)))\n\t {\n\t if($ifsession_set)\n\t {\n\t\t$_SESSION=array();\n\t $_SESSION['authkey']=\"\";\n\t session_destroy();\n\t }\n\t $cookie1=setcookie(\"authkey\",\"\",$thecurrenttimestamp-60*60);\n\t $cookie2=setcookie(\"base\",\"\",$thecurrenttimestamp-60*60);\n\t $cookie3=setcookie(\"userid\",\"\",$thecurrenttimestamp-60*60);\n\t $cookie4=setcookie(\"PHPSESSID\",\"\",$thecurrenttimestamp-60*60);\n\t return false;\n\t }\n\t else if(($loggedindb)&&(md5($authkeyindb)==$currentauthkeycookie)&&(md5($logintimeindb.$saltindb.$lasttimedb.$thecurrentuserid.$baseindb.$usernameindb)==$currentbasecookie))\n\t\t{\n\t\tif(!($thecurrentsessionid && $thecurrentsessionauthkey))\n\t\t\t{\n\t\t\t$thereneratedthing=SET_regenerate($thecurrentuserid);\n\t\t\tif(!$thereneratedthing)\n\t\t\t\t{\n\t\t\t\t\tif($thecurrentsessionid)\n\t \t\t\t{\n\t\t\t\t\t$thecurrentsessionauthkey;\n\t\t\t\t\t$_SESSION=array();\n\t \t\t\tsession_destroy();\n\t \t\t\t}\n\t \t\t\t$cookie1=setcookie(\"authkey\",\"\",$thecurrenttimestamp-60*60);\n\t \t\t\t$cookie2=setcookie(\"base\",\"\",$thecurrenttimestamp-60*60);\n\t \t\t\t$cookie3=setcookie(\"userid\",\"\",$thecurrenttimestamp-60*60);\n\t \t\t\t$cookie4=setcookie(\"PHPSESSID\",\"\",$thecurrenttimestamp-60*60);\n\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t//i might need another condition inside the if condition in here \n\t}\n }\n }\n $finallysessionid=session_id();\n if($finallysessionid)\n {\n return $finallysessionid;\n }\n else if(!$finallysessionid)\n {\n return false;\n }\n}", "title": "" }, { "docid": "7bed99751c33997f378ec38edecf7429", "score": "0.5508262", "text": "public function getSessionID() {\n\t\t\treturn $this->sessionID;\n\t\t}", "title": "" }, { "docid": "e77d184b6b8962a32edc1aa091ca2339", "score": "0.5506304", "text": "function sec_session_start() {\r\n\t// Create custom session name\r\n\t$session_name = 'sec_session_id';\r\n\t// FALSE since not connecting HTTPS\r\n\t$secure = false;\r\n\t// Stop JavaScript from being able to access session information\r\n\t$httponly = true;\r\n\r\n\t// Forces sessions to only use cookies. \r\n\tini_set('session.use_only_cookies', 1);\r\n\t// Get cookie parameters\r\n\t$cookieParams = session_get_cookie_params();\r\n\t// Set cookies to expire in one week, keep the other parameters the same\r\n\tsession_set_cookie_params(604800, $cookieParams[\"path\"], $cookieParams[\"domain\"], $secure, $httponly); \r\n\t// Rename the session to the custom session name\r\n\tsession_name($session_name);\r\n\t// Start the session\r\n\tsession_start();\r\n\t// Regenerate the session, delete the old one. \r\n\tsession_regenerate_id(); \r\n}", "title": "" }, { "docid": "24e98792349bb2f85871f68115305c52", "score": "0.54952735", "text": "protected function sessionStart() {\r\t\tif(!session_id()) {\r\t\t\t//2014-5-21 change by 小皓 让uploadify支持session\r\t\t\t$session_name = session_name();\r\t\t\tif (isset($_POST[$session_name])) {\r\t\t\t\tsession_id($_POST[$session_name]);\r\t\t\t}\r\t\t\tsession_start();\r\t\t}\r\t\t\r\t\t// Nic + 2014-5-17\r\t\tif($_SESSION['user']['id']){\r\t\t\tdefine('USER_ID', $_SESSION['user']['id']);\r\t\t}\r\t}", "title": "" }, { "docid": "79a4a96bf856ef454a2b2c26a3c934df", "score": "0.5494884", "text": "function isValidSessionId()\n {\n $name = atkconfig(\"session_name\");\n if (empty($name))\n $name = atkconfig(\"identifier\");\n\n $sessionid = \"\";\n global ${$name};\n\n if (isset($_COOKIE[$name])&&$_COOKIE[$name])\n {\n $sessionid = $_COOKIE[$name];\n }\n else\n {\n $sessionid = ${$name};\n }\n\n if ($sessionid==\"\") return true;\n\n if (!preg_match('/^[a-z0-9:-]+$/i', $sessionid)) return false;\n\n return true;\n }", "title": "" }, { "docid": "958aa7b64ab67070d42ce6495cbe9fe6", "score": "0.54935646", "text": "public function sessionId() {\r\n\r\n return session_id();\r\n }", "title": "" }, { "docid": "fd5cd5b6d5d7ef365f588bd0ef20691e", "score": "0.5490085", "text": "function _get_users_cookie_id()\n\t{\n\t\t// -------------------------------------\n\t\t//\tHave we already done this?\n\t\t// -------------------------------------\n\n\t\tif (isset($this->sess['cookie_id']) === TRUE)\n\t\t{\n\t\t\treturn $this->sess['cookie_id'];\n\t\t}\n\n\t\t// -------------------------------------\n\t\t//\tIs their cookie already set?\n\t\t// -------------------------------------\n\n\t\t$input_cookie = ee()->input->cookie('super_search_history', TRUE);\n\n\t\tif ($input_cookie !== FALSE AND\n\t\t\t is_numeric($input_cookie) AND\n\t\t\t $input_cookie >= 10000 AND\n\t\t\t $input_cookie <= 999999)\n\t\t{\n\t\t\treturn $this->sess['cookie_id']\t= $input_cookie;\n\t\t}\n\n\t\t// -------------------------------------\n\t\t//\tCreate a cookie, set it and return it\n\t\t// -------------------------------------\n\n\t\t$cookie\t= mt_rand(10000, 999999);\n\t\t$this->set_cookie('super_search_history', $cookie, 86500);\n\t\treturn $this->sess['cookie_id']\t= $cookie;\n\t}", "title": "" }, { "docid": "bfca617a444c5d3c466cbfdcdc132bca", "score": "0.54895604", "text": "function testSessionSpoof()\r\n {\r\n $this->setCookie(CATS_SESSION_NAME, 'o964p0pr602975o0671qo50n1208r6nn');\r\n $this->assertGET(osatutil::getAbsoluteURI('index.php?m=joborders'));\r\n $this->runPageLoadAssertions(false, true);\r\n $this->assertTitle('CATS - Login');\r\n }", "title": "" }, { "docid": "7935f24f6a30359210d73c9582fdf1f9", "score": "0.5483795", "text": "protected static function setLoginSessionId()\n {\n Yii::app()->user->setState(self::LOGIN_SESSION_ID_KEY, Yii::app()->session->sessionID);\n }", "title": "" }, { "docid": "0383e93c196d7045c8ec3ff183175210", "score": "0.54823434", "text": "function request_ip_matches_session() {\n\t// return false if either value is not set\n\tif(!isset($_SESSION['ip']) || !isset($_SERVER['REMOTE_ADDR'])) {\n\t\treturn false;\n\t}\n\tif($_SESSION['ip'] === $_SERVER['REMOTE_ADDR']) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "f963d1564a0588e60049b419c4dbd7c2", "score": "0.5482281", "text": "function GetSessionIdFromVersionId($versionid)\n{\n //\n\n $sessionid = GetSessionIdFromVersionIdNoNewDbConnection($versionid);\n\n // mysql_close($conSql1);\n\n return $sessionid;\n}", "title": "" }, { "docid": "1389cdbb6e1b34839161106b37db888e", "score": "0.5480757", "text": "private function set() {\n\t\t$this->cookie[session_name()] = session_id();\n\t\t//$this->redis->hmset(session_id(), $cookie);\n\t\tif ($this->cookie['user_ID']) {\n\t\t\t$this->db->insert_update($this->table, $this->cookie, $this->cookie);\n\t\t}\n\t\t$this->set_cookie($this->cookie[\"remember\"] ? ($_SERVER['REQUEST_TIME'] + $this->params[\"lifetime\"]) : 0);\n\t}", "title": "" }, { "docid": "67f3e4986f3ab0c3ce60436df152f22c", "score": "0.547202", "text": "function get_remote_addr_session_hash()\n{\n global $conf;\n\n if (!$conf['session_use_ip_address'])\n {\n return '';\n }\n \n if (strpos($_SERVER['REMOTE_ADDR'],':')===false)\n {//ipv4\n return vsprintf(\n \"%02X%02X\",\n explode('.',$_SERVER['REMOTE_ADDR'])\n );\n }\n return ''; //ipv6 not yet\n}", "title": "" }, { "docid": "54b10c2047852296b33ed2c5decf1078", "score": "0.5472002", "text": "private function request_ip_matches_session()\n {\n // return false if either value is not set\n if (!isset($_SESSION['ip']) || !isset($_SERVER['REMOTE_ADDR'])) {\n return false;\n }\n if ($_SESSION['ip'] === $_SERVER['REMOTE_ADDR']) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "db918912b745e0ee3e019ca1d4d94204", "score": "0.54719794", "text": "private function session_authenticate(){\n\t\t$init = Session::instance()->get('init');\n\t\t//current session var\n\t\t$current = $_SERVER['HTTP_USER_AGENT'] . $_SERVER['REMOTE_ADDR'] . Session::instance()->id();\n\t\t\n\t\t//if session init not declared\n\t\t//or current session vals dont match init session\n\t\t//or user is not logged in\n\t\t//redirect to login\n\t\tif(empty($init) || $init != $current || !Auth::instance()->logged_in()){\n\t\t\t$this->request->redirect(URL::site('admin/login', TRUE, FALSE));\n\t\t}\n\t}", "title": "" }, { "docid": "e21185f12f5e2630fb58f45c5b4d42e1", "score": "0.5468454", "text": "public function getSession()\n {\n return $this->getOption('session_id');\n }", "title": "" }, { "docid": "f3b36e67fc89a765ad01a55ae589f285", "score": "0.54669327", "text": "function sec_session_start() {\n\tini_set('session.use_only_cookies', 1);\n\t$cookieParams = session_get_cookie_params();\n\tsession_set_cookie_params($cookieParams[\"lifetime\"], $cookieParams[\"path\"], $cookieParams[\"domain\"], true, true);\n\tsession_name('sec_session_id');\n\tsession_start();\n\tsession_regenerate_id();\n}", "title": "" }, { "docid": "dc44d8ba17599187a66014c621c0a80c", "score": "0.5466023", "text": "function get_session() {\n\t\t// Get a session via XMLRPC\n\t\t$cookie = $this->lj_ixr( 'sessiongenerate', array( 'ver' => 1, 'expiration' => 'short' ) );\n\t\tif ( is_wp_error( $cookie ) )\n\t\t\treturn new WP_Error( 'cookie', __( 'Could not get a cookie from LiveJournal. Please try again soon.' ) );\n\t\treturn new WP_Http_Cookie( array( 'name' => 'ljsession', 'value' => $cookie['ljsession'] ) );\n\t}", "title": "" }, { "docid": "19c85ca05683117a863721bfb1b3fbb0", "score": "0.5464266", "text": "public function getSessionId() {\n return $this->session_id;\n }", "title": "" }, { "docid": "680297c843f900a9f1d5cce63c2eb274", "score": "0.5453787", "text": "function init_sessions() {\n if (!session_id()) {\n session_start();\n\t\tif(!isset($_SESSION['BB_SESSION_ID'])){\n\t\t\t$_SESSION['BB_SESSION_ID'] = md5($_SERVER['REMOTE_ADDR'].$_SERVER['HTTP_USER_AGENT'].mktime());\n\t\t}\n }\n}", "title": "" }, { "docid": "2b7565ba5064861893f13acc765e3c7e", "score": "0.545048", "text": "function tep_hide_session_id() {\n global $session_started, $SID;\n\n if (($session_started == true) && tep_not_null($SID)) {\n return tep_draw_hidden_field(tep_session_name(), tep_session_id());\n }\n }", "title": "" }, { "docid": "b752ff6651d8a9d64eb282b868f3f197", "score": "0.54496336", "text": "function session_secure_start($capid=null) {\n session_start(); //starts the session\n if(isset($_SESSION['resignin'])) { //limits amount of requests before killing session\n if($_SESSION['resignin']<1) {\n $_SESSION['resignin']++;\n session_resign_in (true);\n } else {\n $time= auditLog($_SERVER['REMOTE_ADDR'], 'KS');\n auditDump($time, \"User Agent\",$_SERVER['HTTP_USER_AGENT']);\n auditDump($time,\"Language and Charset\", $_SERVER['HTTP_ACCEPT_LANGUAGE'].\" \".$_SERVER['HTTP_ACCEPT_CHARSET']);\n session_resign_in(false); //kill the session\n }\n }\n if(!isset($_SESSION['ip_addr'])) { //checks if it's a new session\n $ident= connect('Logger'); //check if there are any standing log-ins\n $query=\"SELECT TIME_LOGIN FROM LOGIN_LOG \n WHERE LOG_OFF IS NULL \n AND SUCEEDED=TRUE\n AND IP_ADDRESS='\".$_SERVER['REMOTE_ADDR'].\"'\";\n $results= Query($query, $ident);\n close($ident);\n if(numRows($results)>0&&!isset($capid)) { //if outstanding sessions, let it expire\n session_resign_in(false);\n } else { //else assume new and set it-up\n if(!empty($_SERVER['HTTPS'])) { //make sure the connection is secure\n $temp= array('/','/index.php','/login/','/login/index.php');\n $referrers= array();\n foreach($temp as $buffer) {\n array_push($referrers, \"https://\".$_SERVER['SERVER_NAME'].$buffer);\n array_push($referrers, 'https://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].$buffer);\n }\n if($_SERVER['SCRIPT_NAME']=='/login/index.php'&&in_array($_SERVER['HTTP_REFERER'],$referrers)) { //ensures that the start is through proper channels\n $_SESSION['ip_addr']=$_SERVER['REMOTE_ADDR']; //store the ip addr\n $ident=connect('ViewNext');\n session_predict_path($ident,$capid); //predict the path that users will use\n close($ident);\n $_SESSION['last']=array(\"https://\".$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'],\"https://\".$_SERVER['SERVER_NAME'].\":\".$_SERVER['SERVER_PORT'].$_SERVER['SCRIPT_NAME']);\n $_SESSION['request']['agent']=$_SERVER['HTTP_USER_AGENT'];\n $_SESSION['request']['accept']=$_SERVER['HTTP_ACCEPT']; \n $_SESSION['request']['lang_char']=$_SERVER['HTTP_ACCEPT_LANGUAGE'];\n $_SESSION['request']['encoding']=$_SERVER['HTTP_ACCEPT_ENCODING'];\n } else { //else force to the login\n header(\"refresh:0;url=/login/\");\n auditLog($_SERVER['REMOTE_ADDR'],'DC');\n log_off();\n exit;\n }\n } else { //send to https\n header(\"refresh:0;url=https://\".$_SERVER['SERVER_NAME'].\"/login/\");\n log_off();\n exit;\n }\n }\n } else { //if not a new session then start testing the info for accuracy.\n $error_total=0; //counts minor errors that independently dictacte a hijacking\n if(empty($_SERVER['HTTPS'])||$_SERVER['HTTPS']=='off') { //if not https send them bac\n header(\"refresh:0;url=https://\".$_SERVER['SERVER_NAME'].\"/login/\");\n log_off();\n exit;\n }\n if(isset($_SERVER['HTTP_REFERER'])&&!in_array($_SERVER['HTTP_REFERER'],$_SESSION['last']))\n $error_total+=0.5; //if not the right referrer \n if(isset($_SERVER['HTTP_ACCEPT'])&&$_SERVER['HTTP_ACCEPT']!=$_SESSION['request']['accept'])\n $error_total+=0.5; //if not the same content accepted\n if($_SERVER['HTTP_ACCEPT_ENCODING']!=$_SESSION['request']['encoding'])\n $error_total+=0.5;\n \n if($error_total >=1||$_SESSION['ip_addr']!=$_SERVER['REMOTE_ADDR']||!in_array($_SERVER['SCRIPT_NAME'],$_SESSION['predicted'])||\n $_SESSION['request']['agent']!=$_SERVER['HTTP_USER_AGENT']||\n $_SESSION['request']['lang_char']!=$_SERVER['HTTP_ACCEPT_LANGUAGE']) { //if it's the right ip continue\n If(!isset($_SESSION['resignin'])||$_SESSION['resignin']==0) { //if the session needs to be verified by \n $time= auditLog($_SERVER['REMOTE_ADDR'],'SH');\n auditDump($time, \"User Agent\",$_SERVER['HTTP_USER_AGENT']);\n auditDump($time, \"Language\", $_SERVER['HTTP_ACCEPT_LANGUAGE']);\n $_SESSION['resignin']=0;\n session_resign_in(true);\n }\n } else { //if clean get ready for the next Request\n $_SESSION['last']=array(\"https://\".$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'],\"https://\".$_SERVER['SERVER_NAME'].\":\".$_SERVER['SERVER_PORT'].$_SERVER['SCRIPT_NAME']);\n $ident=Connect('ViewNext');\n session_predict_path($ident);\n close($ident);\n session_regenerate_id();\n header(\"refresh:1800; url=/login/logout.php\");\n }\n }\n}", "title": "" }, { "docid": "374de7e66a0c5f61315ef064f57a069d", "score": "0.5446847", "text": "private function initSession(){\n if(session_status() == PHP_SESSION_NONE){\n session_set_cookie_params(60*60*24, '/', null, false, true );\n session_name('umbrella');\n session_start();\n }\n return;\n }", "title": "" }, { "docid": "61cd6bab54a70761a49f2e8b72f34cbd", "score": "0.5446245", "text": "public function getSessionId() {\n return session_id();\n }", "title": "" }, { "docid": "d31268189a0e0acef4d68a95dd0c4f76", "score": "0.5444574", "text": "function iniclog(){\r\n\t$loo =scemail(@$_COOKIE['email']);\r\n\tif($loo){\r\n\t\tlogreg(\"iniclog\", @$_COOKIE['email']);\r\n\t\tif(@$_COOKIE['sessid'] == @$loo[3]){\r\n\t\t\tsetcookie('sessid',@$_COOKIE['sessid'],time() +60*60*24*15);\r\n\t\t\tsetcookie('email',@$_COOKIE['email'],time() +60*60*24*15);\r\n\t\t\t$_SESSION['sessid'] = @$loo[3];\r\n\t\t\t$_SESSION['userid'] = @$loo[0];\r\n\t\t\t$_SESSION['email'] = @$loo[1];\r\n\t\t\t$_SESSION['user-agent'] = @$_SERVER['HTTP_USER_AGENT'];\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\treturn false;\t\r\n}", "title": "" }, { "docid": "d2eb3cb636df7b4be508e29c32f6947a", "score": "0.5439691", "text": "function get_session_id()\n\t{\n\t\t$this->EE->load->library('javascript');\n\t\t$session = $this->EE->assets_lib->init_new_index_session();\n\t\texit(Assets_helper::get_json(array('session' => $session)));\n\t}", "title": "" }, { "docid": "af12e67128238d3f6e8aa28e06f88f38", "score": "0.54388577", "text": "function obtenirLoginUserConnecte() {\n $ident=\"\";\n if ( isset($_SESSION[\"idUser\"]) ) {\n $ident = (isset($_SESSION[\"loginUser\"])) ? $_SESSION[\"loginUser\"] : '';\n }\n return $ident ;\n}", "title": "" }, { "docid": "58c8de0abebca898bbc512f14b8366e7", "score": "0.543778", "text": "protected function getSessionKey()\n {\n return self::SESSION_KEY ;\n }", "title": "" }, { "docid": "165fba17626924205b450795ab8b4948", "score": "0.5429872", "text": "function connect($id, $name){\n\t\tif(session_status() === PHP_SESSION_NONE){\n\t\t\tsession_start();\n\t\t}\n\t\t$_SESSION['connect'] = $id;\n\t\t$_SESSION['username'] = $name;\n\t}", "title": "" }, { "docid": "5622cdbed7a38c54f268f548a7c50306", "score": "0.54279983", "text": "public function dm_session_start(){\n \n if(!session_id()){\n session_start();\n }\n }", "title": "" }, { "docid": "ab52b15c1762bbc74cdb529af6ab12df", "score": "0.5419166", "text": "private function cekSession(){\n if(!$this->session->userdata('id_session'))\n $this->session->set_userdata(array('id_session' => $this->generateSession()));\n }", "title": "" }, { "docid": "90d2f5f81b86ce5614b0b8ef90216069", "score": "0.54129696", "text": "function enableSession()\n {\n $_SESSION['apolloUser'] = $this->id;\n }", "title": "" }, { "docid": "54a6e26c8c0b9948ad6f0645e3cb9881", "score": "0.5409901", "text": "function checkLogin($query)\n{\n\n // Check if user already authenticated with login form\n if (!isset($_SESSION['currentUser'])) {\n\n // Check if user has logged in before and has remember me cookie\n if (!isset($_COOKIE['kajes_linkify'])) {\n return false;\n }\n\n // Return value of eatCookie function if cookie exists\n return eatCookie($query);\n }\n\n // Return uid if session variable is set\n return $_SESSION['currentUser'];\n}", "title": "" }, { "docid": "6100affaf21a1aae6424095c7c0e1a1c", "score": "0.54070354", "text": "function tep_hide_session_id() {\n if (defined('SID') && tep_not_null(SID)) return tep_draw_hidden_field(tep_session_name(), tep_session_id());\n }", "title": "" }, { "docid": "065530f979267e357ac6c835680969e6", "score": "0.5401653", "text": "function api_session_start($already_installed = true)\r\n{\r\n\tglobal $storeSessionInDb;\r\n\tglobal $_configuration;\r\n\t\r\n\t/* causes too many problems and is not configurable dynamically\r\n\t * \r\n\tif($already_installed){\r\n\t\t$session_lifetime = 360000;\r\n\t\tif(isset($_configuration['session_lifetime']))\r\n\t\t{\r\n\t\t\t$session_lifetime = $_configuration['session_lifetime'];\t\r\n\t\t}\r\n\t\tsession_set_cookie_params($session_lifetime,api_get_path(REL_PATH));\r\n\t\t\r\n\t}*/\r\n\tif (is_null($storeSessionInDb))\r\n\t{\r\n\t\t$storeSessionInDb = false;\r\n\t}\r\n\tif ($storeSessionInDb && function_exists('session_set_save_handler'))\r\n\t{\r\n\t\tinclude_once (api_get_path(LIBRARY_PATH).'session_handler.class.php');\r\n\t\t$session_handler = new session_handler();\r\n\t\t@ session_set_save_handler(array (& $session_handler, 'open'), array (& $session_handler, 'close'), array (& $session_handler, 'read'), array (& $session_handler, 'write'), array (& $session_handler, 'destroy'), array (& $session_handler, 'garbage'));\r\n\t}\r\n\tsession_name('dk_sid');\r\n\tsession_start();\r\n\tif ($already_installed)\r\n\t{\r\n\t\tif (empty ($_SESSION['checkDokeosURL']))\r\n\t\t{\r\n\t\t\t$_SESSION['checkDokeosURL'] = api_get_path(WEB_PATH);\r\n\t\t}\r\n\t\telseif ($_SESSION['checkDokeosURL'] != api_get_path(WEB_PATH))\r\n\t\t{\r\n\t\t\tapi_session_clear();\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "cee07592ed105c3824ddde26155dfd1f", "score": "0.53991634", "text": "private function getSessionUserID($session) {\n\t\t\t$system = new System();\n\t\t\t$database = new Database($system);\n\t\t\t$config = new Config();\n\t\t\t\n\t\t\t$query = \"SELECT * FROM `jmtfw_user_session` WHERE `sessionid`='{$session}'\";\n\t\t\t$database->executeQuery($query);\n\t\t\t$result = $database->fetchResultObject();\n\t\t\t\n\t\t\t$time = time();\n\t\t\t\n\t\t\t// if the session is idle for more than config'd session activity time, delete the entry and tell that no session existing\n\t\t\t// otherwise return the relevant user ID\n\t\t\tif (count($result) > 0) {\n\t\t\t\tif (($time - $result[0]->stamp) > ($config->session_life * 60)) {\n\t\t\t\t\t$query = \"DELETE FROM `jmtfw_user_session` WHERE `id`='{$result[0]->id}'\";\n\t\t\t\t\t$database->executeQuery($query);\n\t\t\t\t\t\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\treturn $result[0]->uid;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "0dfc2aaaaa80bdeec3bc9ed4bdab312c", "score": "0.5397925", "text": "abstract public function retrieveSession($id);", "title": "" }, { "docid": "0bbe628e3b300c1db8efbf6a20e08913", "score": "0.5397353", "text": "function user_session_set($uid = '') {\n\tglobal $core_config, $user_config;\n\tif (!$core_config['daemon_process']) {\n\t\t$uid = ($uid ? $uid : $user_config['uid']);\n\n\t\t// fixme anton - do not make this based on IP, not working properly when clients assigned ranged dynamic IPs\n\t\t// $hash = md5($uid.$_SERVER['REMOTE_ADDR'].$_SERVER['HTTP_USER_AGENT']);\n\t\t$hash = md5($uid . $_SERVER['HTTP_USER_AGENT']);\n\n\t\t$json = array(\n\t\t\t'ip' => $_SERVER['REMOTE_ADDR'],\n\t\t\t'last_update' => core_get_datetime(),\n\t\t\t'http_user_agent' => $_SERVER['HTTP_USER_AGENT'],\n\t\t\t'sid' => $_SESSION['sid'],\n\t\t\t'uid' => $uid\n\t\t);\n\t\t$item[$hash] = json_encode($json);\n\t\tregistry_update(1, 'auth', 'login_session', $item);\n\t}\n}", "title": "" }, { "docid": "72fea053146a6a5883f2b8d73b617a68", "score": "0.5397321", "text": "function myStartSession() {\n\t\tif(!session_id()) {\n\t\t\tsession_start();\n\t\t}\n\t}", "title": "" }, { "docid": "b5ca3547c5335f7968d0755d3161678c", "score": "0.53947824", "text": "public\r\n function sessionCookies(){\r\n $_SESSION[\"id\"] = $this->memberId;\r\n $_SESSION[\"fname\"] = $this->fName;\r\n $_SESSION[\"lname\"] = $this->lName;\r\n $_SESSION[\"address\"] = $this->address;\r\n $_SESSION[\"email\"] = $this->email;\r\n $_SESSION[\"phone\"] = $this->phone;\r\n $_SESSION[\"height\"] = $this->height;\r\n $_SESSION[\"status\"] = $this->status;\r\n }", "title": "" }, { "docid": "48bb7a93f86b67bd41b635d07cccbfc5", "score": "0.539414", "text": "function rebuildSession(){\n\t\t\t# If there are cookies, but there isnt a session...\n\t\t\tif( isset($_COOKIE['user']['secret']) && !isset($_SESSION['user']['secret']) ){\n\t\t\t\t//// Level 1 Security Check ////\n\t\t\t\t$u = $_COOKIE['user'];\n\t\t\t\t$secret = sha1(\n\t\t\t\t\tmd5(\n\t\t\t\t\t\t$u['email'].base64_decode($u['hash']).$u['id'].$u['username']\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t# Check Cookie Secret before hitting the DB\n\t\t\t\tif( $secret === $u['secret'] ){\n\t\t\t\t\t# Passed Level 1 Authority - Allows access to find user in DB.\n\t\t\t\t\t$q = $this->q();\n\t\t\t\t\t$row = $q->Select('email,hash,id,username,user_secret,user_lastvisit','Users',array(\n\t\t\t\t\t\t'email'=>$u['email']\n\t\t\t\t\t));\n\n\t\t\t\t\t//// Level 2 Security Check ////\n\t\t\t\t\tif($row[0]['user_secret'] === $secret){\n\t\t\t\t\t\t# Client is the Correct User.- ReBuild Session Data\n\t\t\t\t\t\t$this->setUser($row);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "a32d21938e931e104e2c6dc819151448", "score": "0.5393056", "text": "function validateSessionString($sstring)\n{\n\t//parse session string\n\t//string format is sid@@ip@@host\n\t$data=explode(\"@@\",$sstring);\n\tif(($data[1]==ip()) && ($data[2]==$_SERVER['HTTP_HOST']))\n\t{\n\t\treturn $data[0];//return session id\n\t}\n\t\n\treturn NULL;\n}", "title": "" }, { "docid": "45b9e7b29edbba025bc0617a423f9e95", "score": "0.53877544", "text": "function sec_session_start() {\n \n $session_name = 'sec_session_id'; // custom session name\n $secure = SECURE; \n // stops JavaScript being able to access session id\n $httponly = true;\n // forces sessions use cookies\n if (ini_set('session.use_only_cookies', 1) === FALSE) {\n header(\"Location: ../error.php?err=Could not initiate a safe session (ini_set)\");\n exit();\n }\n // gets current cookies params\n $cookieParams = session_get_cookie_params();\n session_set_cookie_params( $cookieParams[\"lifetime\"],\n $cookieParams[\"path\"], \n $cookieParams[\"domain\"], \n $secure,\n $httponly);\n // sets session name to the one set above\n session_name($session_name);\n session_start();\n session_regenerate_id(); // regenerated the session, delete the old one\n \n}", "title": "" }, { "docid": "0ea427fec0d514dcae609d937f4d99a9", "score": "0.53780717", "text": "function qa_get_logged_in_userid()\n\t{\n\t\tif (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }\n\n\t\tglobal $qa_logged_in_userid_checked;\n\n\t\t$suffix = qa_session_var_suffix();\n\n\t\tif (!$qa_logged_in_userid_checked) { // only check once\n\t\t\tqa_start_session(); // this will load logged in userid from the native PHP session, but that's not enough\n\n\t\t\t$sessionuserid = @$_SESSION['qa_session_userid_' . $suffix];\n\n\t\t\tif (isset($sessionuserid)) // check verify code matches\n\t\t\t\tif (!hash_equals(qa_session_verify_code($sessionuserid), @$_SESSION['qa_session_verify_' . $suffix]))\n\t\t\t\t\tqa_clear_session_user();\n\n\t\t\tif (!empty($_COOKIE['qa_session'])) {\n\t\t\t\t@list($handle, $sessioncode, $remember) = explode('/', $_COOKIE['qa_session']);\n\n\t\t\t\tif ($remember)\n\t\t\t\t\tqa_set_session_cookie($handle, $sessioncode, $remember); // extend 'remember me' cookies each time\n\n\t\t\t\t$sessioncode = trim($sessioncode); // trim to prevent passing in blank values to match uninitiated DB rows\n\n\t\t\t\t// Try to recover session from the database if PHP session has timed out\n\t\t\t\tif (!isset($_SESSION['qa_session_userid_' . $suffix]) && !empty($handle) && !empty($sessioncode)) {\n\t\t\t\t\trequire_once QA_INCLUDE_DIR . 'db/selects.php';\n\n\t\t\t\t\t$userinfo = qa_db_single_select(qa_db_user_account_selectspec($handle, false)); // don't get any pending\n\n\t\t\t\t\tif (strtolower(trim($userinfo['sessioncode'])) == strtolower($sessioncode))\n\t\t\t\t\t\tqa_set_session_user($userinfo['userid'], $userinfo['sessionsource']);\n\t\t\t\t\telse\n\t\t\t\t\t\tqa_clear_session_cookie(); // if cookie not valid, remove it to save future checks\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$qa_logged_in_userid_checked = true;\n\t\t}\n\n\t\treturn @$_SESSION['qa_session_userid_' . $suffix];\n\t}", "title": "" }, { "docid": "95695ee39f7b296140880507a4b91a1d", "score": "0.5372161", "text": "function tep_hide_session_id() {\n\tglobal $session_started, $SID;\n\n\tif (($session_started == true) && tep_not_null($SID)) {\n\t\treturn tep_draw_hidden_field(Session::getSessionName(), Session::getSessionId());\n\t}\n}", "title": "" }, { "docid": "b73bcf9dc32c8fdd8430b6df846e50d2", "score": "0.5371592", "text": "protected function getSessionId()\n {\n $checksum = hash('sha256', 'session' . $this->token . $this->brokerSecret);\n return \"SSO-{$this->brokerName}-{$this->token}-$checksum\";\n }", "title": "" }, { "docid": "b73bcf9dc32c8fdd8430b6df846e50d2", "score": "0.5371592", "text": "protected function getSessionId()\n {\n $checksum = hash('sha256', 'session' . $this->token . $this->brokerSecret);\n return \"SSO-{$this->brokerName}-{$this->token}-$checksum\";\n }", "title": "" }, { "docid": "ec85678522374aa88cd17f81e10bdcdb", "score": "0.53683203", "text": "function authenticateSession($cookie)\r\n {\r\n \r\n require('db.cfg.inc.php');\r\n \r\n $user = array();\r\n $session = $cookie['SESSION'];\r\n \r\n \r\n $db = new mysqli($db_host, $db_user, $db_pass, $db_name);\r\n if(mysqli_errno($db)) {\r\n echo mysqli_error($db);\r\n exit();\r\n }\r\n \r\n $sql = 'SELECT user_id, user_name FROM sessions WHERE session=?';\r\n\r\n $stmt = $db->prepare($sql);\r\n \r\n $stmt->bind_param(\"s\", $session);\r\n \r\n $stmt->execute();\r\n \r\n \r\n if($stmt->field_count === 0) {\r\n header('location: header.php');\r\n } else {\r\n $stmt->bind_result($userId, $userName);\r\n $stmt->fetch();\r\n $user['user_id'] = $userId;\r\n $user['user_name'] = $userName;\r\n }\r\n \r\n $stmt->close();\r\n mysqli_close($db);\r\n \r\n return $user;\r\n }", "title": "" }, { "docid": "fa1d6112973be3f8f216ff368e89dd8f", "score": "0.53666425", "text": "public function storeSessionLoginData(){\n\t\t\tSession::set('user_logged_id', $this->getField('id'));\n\t\t\tSession::set('user_logged_hash', $this->generateHash());\n\t\t\t\n\t\t\treturn;\n\t\t}", "title": "" }, { "docid": "9ded556677189acf7e5f18b50080c069", "score": "0.5361988", "text": "function getSessionInformation($sessionId);", "title": "" }, { "docid": "6ce04cc924a919ddda1cd4f3382789ac", "score": "0.53602636", "text": "public function registerLoginSession($userId) {\n\n # If session has enable/start this should be true\n if(session_status() == PHP_SESSION_ACTIVE) {\n\n # NOW() is mysql func, not php\n $sql = \"REPLACE INTO `user_sessions` (`user_id`, `session_id`, `login_time`) \n VALUES (?, ?, NOW())\";\n $param = array($userId, session_id());\n $this->insert($sql, $param);\n }\n}", "title": "" }, { "docid": "fb40397d236a3a90cb4e79d124a5f35b", "score": "0.5357062", "text": "public static function userLoggedIn() {\n // cookie var, surekli girmeme gerek yok. \n\n if (!(isset($_COOKIE['SNID']))) {\n return false;\n }else{\n\n \n if (access::create_query('SELECT user_id FROM login_tokens WHERE token=:token', array(':token'=>sha1($_COOKIE['SNID'])))) {\n $userid = access::create_query('SELECT user_id FROM login_tokens WHERE token=:token', array(':token'=>sha1($_COOKIE['SNID'])))[0]['user_id'];\n\n \n if (!(isset($_COOKIE['SNID_']))) {\n // eger cookie set edilmemisse. \n //buraya gel true yap.\n // get token for login token table \n //\n $cstrong = True;\n $token = bin2hex(openssl_random_pseudo_bytes(64, $cstrong));\n access::create_query('INSERT INTO login_tokens VALUES (\\'\\', :token, :user_id)', array(':token'=>sha1($token), ':user_id'=>$userid));\n //token set et. \n access::create_query('DELETE FROM login_tokens WHERE token=:token', array(':token'=>sha1($_COOKIE['SNID'])));\n\n // ***cookie boyle yapma cuneyd hoca degistir dedi, arastir bu yontem iyi degil ****\n // php de olmuyacak cookie unutma!! arastir!\n setcookie(\"SNID\", $token, time() + 60 * 60 * 24 * 7, '/', NULL, NULL, TRUE);\n setcookie(\"SNID_\", '1', time() + 60 * 60 * 24 * 3, '/', NULL, NULL, TRUE);\n\n // return userid.\n\n return $userid;\n } else {\n // do not anything and return userid. \n \n \n return $userid;\n }\n }\n \n }\n }", "title": "" } ]
c06c9ea5e09e3a66766684f0664c7fde
Do analysis (from two fingerprints)
[ { "docid": "9238379a4aa342298d784da491b5a184", "score": "0.0", "text": "function freq_compare($cipher, $language) {\n\tforeach($cipher as $c => $n) {\n\t\t$min = 1024;\n\t\tforeach($language as $dc => $dn) {\n\t\t\t$nmin = abs($n-$dn);\n\t\t\t//echo $nmin.\"\\n\"; //Debug\n\t\t\tif($nmin < $min) {\n\t\t\t\t$min = $nmin;\n\t\t\t\t$decrypted[$c] = $dc;\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn($decrypted);\n}", "title": "" } ]
[ { "docid": "7d1f2fd430bdf1d798777a6ddd0d6266", "score": "0.62066317", "text": "public function compare(Fingerprint $fp1, Fingerprint $fp2);", "title": "" }, { "docid": "6112f6c5397e0190e13f22ac10edcbeb", "score": "0.56048834", "text": "public function analyze();", "title": "" }, { "docid": "70c9df8bb91d60de629533cd5e1792c8", "score": "0.52705", "text": "private function compareAndCalcualte($first_matches,$second_matches){\n $first_length=sizeof($first_matches);\n $second_length=sizeof($second_matches);\n $return_array=[];\n if($first_length>=$second_length){\n\n foreach ($first_matches as $k1 => $match) {\n foreach ($second_matches as $k2 => $m) {\n if($match[\"opposing_deck\"]==$m[\"deck\"]) {\n $first_matches[$k1][\"win\"]=$match[\"win\"]+$m[\"win\"];\n $first_matches[$k1][\"loss\"]=$match[\"loss\"]+$m[\"loss\"];\n $first_matches[$k1][\"total_win\"]=$match[\"total_win\"]+$m[\"total_win\"];\n $first_matches[$k1][\"total_loss\"]=$match[\"total_loss\"]+$m[\"total_loss\"];\n $first_matches[$k1][\"total_g1_play_win\"]=$match[\"total_g1_play_win\"]+$m[\"total_g1_play_win\"];\n $first_matches[$k1][\"total_g1_play_loss\"]=$match[\"total_g1_play_loss\"]+$m[\"total_g1_play_loss\"];\n $first_matches[$k1][\"total_g1_draw_win\"]=$match[\"total_g1_draw_win\"]+$m[\"total_g1_draw_win\"];\n $first_matches[$k1][\"total_g1_draw_loss\"]=$match[\"total_g1_draw_loss\"]+$m[\"total_g1_draw_loss\"];\n $first_matches[$k1][\"total_g2_play_win\"]=$match[\"total_g2_play_win\"]+$m[\"total_g2_play_win\"];\n $first_matches[$k1][\"total_g2_play_loss\"]=$match[\"total_g2_play_loss\"]+$m[\"total_g2_play_loss\"];\n $first_matches[$k1][\"total_g2_draw_win\"]=$match[\"total_g2_draw_win\"]+$m[\"total_g2_draw_win\"];\n $first_matches[$k1][\"total_g2_draw_loss\"]=$match[\"total_g2_draw_loss\"]+$m[\"total_g2_draw_loss\"];\n unset($second_matches[$k2]);\n }\n\n }\n }\n// dd($second_matches);\n foreach ($first_matches as $key => $match) {\n $single_match=$this->getCalcultionDone($match);\n $single_match[\"deck_name\"]=Deck::find($match[\"deck\"])->name;\n $single_match[\"opposing_deck\"]=Deck::find($match[\"opposing_deck\"])->name;\n array_push($return_array,$single_match);\n\n }\n\n foreach ($second_matches as $key => $match) {\n $single_match=$this->getCalcultionDone($match);\n\n $single_match[\"opposing_deck\"]=Deck::find($match[\"deck\"])->name;\n $single_match[\"deck_name\"]=Deck::find($match[\"opposing_deck\"])->name;\n array_push($return_array,$single_match);\n }\n\n\n\n\n }else{\n foreach ($second_matches as $k1 => $match) {\n foreach ($first_matches as $k2 => $m) {\n if(($match[\"deck\"]==$m[\"opposing_deck\"])){\n $second_matches[$k1][\"win\"]=$match[\"win\"]+$m[\"win\"];\n $second_matches[$k1][\"loss\"]=$match[\"loss\"]+$m[\"loss\"];\n $second_matches[$k1][\"total_win\"]=$match[\"total_win\"]+$m[\"total_win\"];\n $second_matches[$k1][\"total_loss\"]=$match[\"total_loss\"]+$m[\"total_loss\"];\n $second_matches[$k1][\"total_g1_play_win\"]=$match[\"total_g1_play_win\"]+$m[\"total_g1_play_win\"];\n $second_matches[$k1][\"total_g1_play_loss\"]=$match[\"total_g1_play_loss\"]+$m[\"total_g1_play_loss\"];\n $second_matches[$k1][\"total_g1_draw_win\"]=$match[\"total_g1_draw_win\"]+$m[\"total_g1_draw_win\"];\n $second_matches[$k1][\"total_g1_draw_loss\"]=$match[\"total_g1_draw_loss\"]+$m[\"total_g1_draw_loss\"];\n $second_matches[$k1][\"total_g2_play_win\"]=$match[\"total_g2_play_win\"]+$m[\"total_g2_play_win\"];\n $second_matches[$k1][\"total_g2_play_loss\"]=$match[\"total_g2_play_loss\"]+$m[\"total_g2_play_loss\"];\n $second_matches[$k1][\"total_g2_draw_win\"]=$match[\"total_g2_draw_win\"]+$m[\"total_g2_draw_win\"];\n $second_matches[$k1][\"total_g2_draw_loss\"]=$match[\"total_g2_draw_win\"]+$m[\"total_g2_draw_win\"];\n unset($first_matches[$k2]);\n }\n }\n }\n\n foreach ($second_matches as $key => $match) {\n $single_match=$this->getCalcultionDone($match);\n\n $single_match[\"deck_name\"]=Deck::find($match[\"opposing_deck\"])->name;\n $single_match[\"opposing_deck\"]=Deck::find($match[\"deck\"])->name;\n\n array_push($return_array,$single_match);\n }\n\n foreach ($first_matches as $key => $match) {\n $single_match=$this->getCalcultionDone($match);\n $single_match[\"deck_name\"]=Deck::find($match[\"deck\"])->name;\n $single_match[\"opposing_deck\"]=Deck::find($match[\"opposing_deck\"])->name;\n array_push($return_array,$single_match);\n\n }\n\n\n\n }\n\nreturn $return_array;\n\n}", "title": "" }, { "docid": "d7852d7004f07ccda1816438a78f9fc7", "score": "0.47651273", "text": "function ROIvals( $indir, $outdir, $subject )\n{\n echo \"*** Calculate mean FA, AD, RD and MD for ROIs of rat: $subject \\n\";\n\n\t// make outdir if not exists\n\tif( !is_dir( $outdir) )\n\t\tmkdir( $outdir, 0755, true );\n\n \t// define all relevant input and output files\n\t$FA = \"$indir/dtifit/dti_FA.nii.gz\"; \t\n\t$AD = \"$indir/dtifit/dti_AD.nii.gz\";\n\t$RD = \"$indir/dtifit/dti_RD.nii.gz\";\n\t$MD = \"$indir/dtifit/dti_MD.nii.gz\";\n\t$Mask = \"$indir/mask_adjusted.nii.gz\";\n\t$outFA = \"$outdir/FA_new.txt\";\n\t$outAD = \"$outdir/AD_new.txt\";\n\t$outRD = \"$outdir/RD_new.txt\";\n\t$outMD = \"$outdir/MD_new.txt\";\n\t$labels = \"$indir/regs/tbirois_new2FA_nonl.nii.gz\";\n\t\n\t// extract all values\n {\n \n system(\"fslmeants -i $FA -o $outFA -m $Mask --label=$labels\");\n system(\"fslmeants -i $AD -o $outAD -m $Mask --label=$labels\");\n system(\"fslmeants -i $RD -o $outRD -m $Mask --label=$labels\");\n system(\"fslmeants -i $MD -o $outMD -m $Mask --label=$labels\");\n\n }\n}", "title": "" }, { "docid": "777c6bd3a9dc70f7b75ca71b93e787a2", "score": "0.4738472", "text": "public function compare($a,$b)\n {\n $i1 = $this->createImage($a);\n $i2 = $this->createImage($b);\n \n if(!$i1 || !$i2){return false;}\n \n $i1 = $this->resizeImage($i1,$a);\n $i2 = $this->resizeImage($i2,$b);\n \n imagefilter($i1, IMG_FILTER_GRAYSCALE);\n imagefilter($i2, IMG_FILTER_GRAYSCALE);\n \n $colorMean1 = $this->colorMeanValue($i1);\n $colorMean2 = $this->colorMeanValue($i2);\n \n $bits1 = $this->bits($colorMean1);\n $bits2 = $this->bits($colorMean2);\n \n $hammeringDistance = 0;\n \n for($a = 0;$a<64;$a++)\n {\n \n if($bits1[$a] != $bits2[$a])\n {\n $hammeringDistance++;\n }\n \n }\n \n return $hammeringDistance;\n }", "title": "" }, { "docid": "452d2c7994b4a2f9f13b0ea0b8b6f99a", "score": "0.47185722", "text": "protected function hash()\n {\n\n // use Jenssegers\\ImageHash\\ImageHash;\n\n // $hasher = new ImageHash;\n // $hash = $hasher->hash('path/to/image.jpg');\n // $distance = $hasher->distance($hash1, $hash2);\n\n\n // use Jenssegers\\ImageHash\\Implementations\\DifferenceHash;\n // use Jenssegers\\ImageHash\\ImageHash;\n // $implementation = new DifferenceHash;\n // $hasher = new ImageHash($implementation);\n // $hash = $hasher->hash('path/to/image.jpg');\n\n\n // $distance = $hasher->compare('path/to/image1.jpg', 'path/to/image2.jpg');\n\n\n // $hasher = new ImageHash($implementation, ImageHash::DECIMAL);\n }", "title": "" }, { "docid": "ea20960a00a649b15908ebe663239f1f", "score": "0.46966457", "text": "function identifyGlobalFingerprint($database, $rawHeaders) {\n $matches = array();\n $matches = combineArrays($matches, findMatchInDatabase($database.'user-agent.fdb', $rawHeaders['User-Agent']));\n $matches = combineArrays($matches, findMatchInDatabase($database.'accept.fdb', $rawHeaders['Accept']));\n $matches = combineArrays($matches, findMatchInDatabase($database.'accept-language.fdb', $rawHeaders['Accept-Language']));\n $matches = combineArrays($matches, findMatchInDatabase($database.'accept-encoding.fdb', $rawHeaders['Accept-Encoding']));\n $matches = combineArrays($matches, findMatchInDatabase($database.'accept-charset.fdb', $rawHeaders['Accept-Charset']));\n $matches = combineArrays($matches, findMatchInDatabase($database.'keep-alive.fdb', $rawHeaders['Keep-Alive']));\n $matches = combineArrays($matches, findMatchInDatabase($database.'connection.fdb', $rawHeaders['Connection']));\n $matches = combineArrays($matches, findMatchInDatabase($database.'cache-control.fdb', $rawHeaders['Cache-Control']));\n $matches = combineArrays($matches, findMatchInDatabase($database.'ua-pixels.fdb', $rawHeaders['UA-Pixels']));\n $matches = combineArrays($matches, findMatchInDatabase($database.'ua-color.fdb', $rawHeaders['UA-Color']));\n $matches = combineArrays($matches, findMatchInDatabase($database.'ua-os.fdb', $rawHeaders['UA-OS']));\n $matches = combineArrays($matches, findMatchInDatabase($database.'ua-cpu.fdb', $rawHeaders['UA-CPU']));\n $matches = combineArrays($matches, findMatchInDatabase($database.'te.fdb', $rawHeaders['TE']));\n $matches = combineArrays($matches, findMatchInDatabase($database.'header-order.fdb', getHeaderOrder($rawHeaders)));\n\n return $matches;\n}", "title": "" }, { "docid": "c86b235ae17b1d4351924f40d24208f9", "score": "0.46789148", "text": "public function getFingerprint();", "title": "" }, { "docid": "104ac955493703114c4dda8079ec99c2", "score": "0.46289647", "text": "function calc_match($user,$set,$extra=2,$cc=\"1\") {\n $results = array();\n foreach ($set as $s) {\n if ($s->constituency == $cc) {\n $sum = 0;\n $count = 0;\n if (isset($user['votes']) and count($user['votes']) > 0) {\n foreach($user['votes'] as $key => $uv) {\n //weight\n if (isset($user['weight'][$key])) $w = $extra;\n else $w = 1;\n //existing divisions only:\n if ((property_exists($s,'votes')) and (property_exists($s->votes,$key))) {\n $sum = $sum + $w*$s->votes->$key*sign($uv);\n $count = $count + $w;\n }\n }\n }\n if ($count == 0) $count = 1; // to allow match = 0/1 = 0;\n //read what data should go to result\n $res = array();\n foreach ($s as $key=>$item) {\n $res[$key] = $s->$key;\n }\n //common results for any calc\n $res['result'] = (1+$sum/$count)/2;\n $res['result_percent'] = round((100+100*$sum/$count)/2);\n $res['id'] = $s->id;\n $res['random'] = rand(0,1000000);\n $results[] = $res;\n }\n\n }\n //sort by result\n foreach ($results as $key => $row) {\n $result[$key] = $row['result'];\n $random[$key] = $row['random'];\n }\n array_multisort($result, SORT_DESC, $random, SORT_ASC, $results);\n\n return $results;\n}", "title": "" }, { "docid": "87a8a2e1e918db3fc9616cc38b8af261", "score": "0.4622748", "text": "private function mergeResults( $x, $y ) {\n\t\tif ( $x === self::USER_KNOWN || $y === self::USER_KNOWN ) {\n\t\t\treturn self::USER_KNOWN;\n\t\t}\n\t\tif ( $x === self::USER_NOT_KNOWN || $y === self::USER_NOT_KNOWN ) {\n\t\t\treturn self::USER_NOT_KNOWN;\n\t\t}\n\t\treturn self::USER_NO_INFO;\n\t}", "title": "" }, { "docid": "7c960587c7bfedb8a5423865b76ed4d3", "score": "0.459219", "text": "public function Comparator($imageD, $image2){\n //$imageD = imagecreatefromjpeg($depositItemThumbURL);\n //imagejpeg($imageD , './input_' . $r . '.jpg');\n $xD = imagesx($imageD);\n $yD = imagesy($imageD);\n $imageS = $this->NormalizationShutterFile($image2, $xD, $yD);\n $xS = imagesx($imageS);\n $yS = imagesy($imageS);\n if ($xD*$yS/($xS*$yD) > 0.9 \n && $xD*$yS/($xS*$yD) < 1.1){\n //imagejpeg($imageS , \"C:\\img/result_\" . $r . '.jpg');\n $count = 0;\n if ($yD > $yS){$maxY = $yS;}\n else {$maxY = $yD;}\n $maxX = $xD;\n $arrayX = array(0, intval($maxX/4), intval($maxX/2), intval($maxX*3/4), $maxX);\n $arrayY = array(0, intval($maxY/4), intval($maxY/2), intval($maxY*3/4), $maxY);\n $i=0;\n $square = 0;\n do{\n $ii = 0;\n do{\n for($y = $arrayY[$i]; $y < $arrayY[($i +1)]; $y ++){\n for($x = $arrayX[$ii]; $x < $arrayX[($ii +1)]; $x ++){\n $pixelD = imagecolorat($imageD, $x, $y);\n $pixelS = imagecolorat($imageS, $x, $y);\n $count = $count + $this->PixelCompare($pixelD, $pixelS);\n }\n }\n $square ++;\n if ($count/($arrayX[1]*$arrayY[1]*$square) < 0.7){$count = 0; break;}\n $ii ++;\n }while ($ii < 4);\n $i ++;\n if ($count == 0){break;}\n }while ($i < 4);\n //var_dump($count/($xD* $yD));\n return $koef = $count/($xD* $yD);\n } else {return 0;}\n }", "title": "" }, { "docid": "b5a7c68e2d3bd51e8b317c889d3f7ca0", "score": "0.4579144", "text": "public function analyze($filename);", "title": "" }, { "docid": "644d04852ceb06bec9d00c46931e94c8", "score": "0.45613608", "text": "public function compare($pathOne, $pathTwo) {\r\n $i1 = $this->createImage($pathOne);\r\n $i2 = $this->createImage($pathTwo);\r\n\r\n if (!$i1 || !$i2) {\r\n return false;\r\n }\r\n\r\n $i1 = $this->resizeImage($pathOne);\r\n $i2 = $this->resizeImage($pathTwo);\r\n\r\n imagefilter($i1, IMG_FILTER_GRAYSCALE);\r\n imagefilter($i2, IMG_FILTER_GRAYSCALE);\r\n\r\n $colorMeanOne = $this->colorMeanValue($i1);\r\n $colorMeanTwo = $this->colorMeanValue($i2);\r\n\r\n $bits1 = $this->bits($colorMeanOne);\r\n $bits2 = $this->bits($colorMeanTwo);\r\n\r\n $hammeringDistance = 0;\r\n\r\n for ($x = 0; $x < 64; $x++) {\r\n if ($bits1[$x] != $bits2[$x]) {\r\n $hammeringDistance++;\r\n }\r\n }\r\n\r\n return $hammeringDistance;\r\n }", "title": "" }, { "docid": "d25cc752852463949522067a44ff2ab8", "score": "0.4552058", "text": "function getFingerprint() {\n if (isset($_POST['user'])) {\n $user = $_POST['user'];\n\n if (strcmp(\"admin\",$user)) {\n $ip = $_REQUEST['REMOTE_ADDR']; // the IP address to query\n\n $query = file_get_contents('http://ip-api.com/xml/' . $ip);\n $ob = simplexml_load_string($query);\n\n $user_ip = $ob->query;\n $country = $ob->country;\n $city = $ob->city;\n $isp = $ob->isp;\n $time = date(\"Y-m-d_H-i-s\",time());\n $mediaManager = $this->model('loginManager');\n if ($mediaManager->fingerprintDB($user,$user_ip,$country,$city,$isp,$time)) {\n echo 'ok';\n } else 'no';\n }\n }\n }", "title": "" }, { "docid": "60917a9e5fef83ecd13d59c1d147e6dc", "score": "0.45458993", "text": "function compareTestArrays($tcoutput, $fileoutput)\n{\n if (sizeof($tcoutput) != sizeof($fileoutput))\n {\n $error = \"CHECK\";\n return $error;\n }\n $numCases = sizeof($tcoutput);\n $correctVals = 0;\n\n for ($i = 0; $i < sizeof($tcoutput); $i++)\n {\n if ($tcoutput[$i] == $fileoutput[$i])\n {\n $correctVals++;\n }\n else\n {\n #line 43\n }\n }\n $percentage = $correctVals/$numCases;\n\n return $percentage;\n}", "title": "" }, { "docid": "024dadbc827424bdd6c4e3d8b9f3a141", "score": "0.45009673", "text": "function anosim($user,$project,$path_in,$path_out){\n\n if($GLOBALS['anosim'] != \"none\" && $GLOBALS['opt_anosim'] != \"none\"){\n\n echo \"anosim\".\"\\n\";\n\n $weight = $GLOBALS['opt_anosim'];\n $input = null;\n $map = $path_in.\"map.txt\";\n $group = $GLOBALS['anosim'];\n $out = $path_out.\"Processeddata/anosim\".$group;\n\n # weight , unweight\n if($weight == \"weight\"){\n $input = $path_out.\"Processeddata/cdotu/bdiv_even\".$GLOBALS['min'].\"/weighted_unifrac_dm.txt\";\n\n }elseif ($weight == \"unweight\") {\n $input = $path_out.\"Processeddata/cdotu/bdiv_even\".$GLOBALS['min'].\"/unweighted_unifrac_dm.txt\";\n }\n\n\n $jobname = $user.\"_anosim\";\n $log = $GLOBALS['path_log'];\n $cmd = \"qsub -N '$jobname' -o $log -cwd -j y -b y Scriptqiime/compare_anosim $input $map $group $out\";\n\n shell_exec($cmd);\n $check_qstat = \"qstat -j '$jobname' \";\n exec($check_qstat,$output);\n \n $id_job = \"\" ; # give job id \n foreach ($output as $key_var => $value ) {\n \n if($key_var == \"1\"){\n $data = explode(\":\", $value);\n $id_job = $data[1];\n } \n }\n $loop = true;\n while ($loop) {\n\n $check_run = exec(\"qstat -j $id_job\");\n if($check_run == false){\n $loop = false;\n if($GLOBALS['check_options'] == \"true\"){\n\n qiime_To_picrust_1($user,$project,$path_in,$path_out);\n }else{\n\n keep_file_mothurqiime($user,$project,$path_in,$path_out);\n\n } \n }\n } \n\n\n }else{\n \n if($GLOBALS['check_options'] == \"true\"){\n\n qiime_To_picrust_1($user,$project,$path_in,$path_out);\n }else{\n\n keep_file_mothurqiime($user,$project,$path_in,$path_out);\n\n } \n }\n }", "title": "" }, { "docid": "4e52786fa56587e931452a5217eabc6f", "score": "0.4492988", "text": "public function actionCalculateallsimilarity()\n {\n $this->claculateSimilarity();\n }", "title": "" }, { "docid": "cd842c55df8b70ef36cfa9f6734e69eb", "score": "0.44783238", "text": "function utility_compare_2_DH_09() //just ran locally. Not yet in eol-archive\n {\n self::build_info('gbif_classification_pre'); //builds -> $this->gbif_classification[gbif_id] = EOLid; //gbif_id -> EOLid\n self::build_info('DH0.9'); //builds -> $this->DH09[gbif_id] = DH_id; //gbif_id -> DH_id\n self::process_eolpageids_csv(); //builds -> $this->DH_map[DH_id] = EOLid; //DH_id -> EOLid\n self::write_comparison_report();\n print_r($this->debug);\n }", "title": "" }, { "docid": "d957d65b4c91496a547061baaad33194", "score": "0.44117868", "text": "function permanova($user,$project,$path_in,$path_out){\n\n if($GLOBALS['permanova'] != \"none\" && $GLOBALS['opt_permanova'] != \"none\"){\n\n echo \"permanova\".\"\\n\";\n $weight = $GLOBALS['opt_permanova'];\n $input = null;\n $map = $path_in.\"map.txt\";\n $group = $GLOBALS['permanova'];\n $out = $path_out.\"Processeddata/permanova\".$group;\n\n # weight , unweight\n if($weight == \"weight\"){\n $input = $path_out.\"Processeddata/cdotu/bdiv_even\".$GLOBALS['min'].\"/weighted_unifrac_dm.txt\";\n\n }elseif ($weight == \"unweight\") {\n $input = $path_out.\"Processeddata/cdotu/bdiv_even\".$GLOBALS['min'].\"/unweighted_unifrac_dm.txt\";\n }\n\n\n $jobname = $user.\"_permanova\";\n $log = $GLOBALS['path_log'];\n $cmd = \"qsub -N '$jobname' -o $log -cwd -j y -b y Scriptqiime/compare_permanova $input $map $group $out\";\n\n shell_exec($cmd);\n $check_qstat = \"qstat -j '$jobname' \";\n exec($check_qstat,$output);\n \n $id_job = \"\" ; # give job id \n foreach ($output as $key_var => $value ) {\n \n if($key_var == \"1\"){\n $data = explode(\":\", $value);\n $id_job = $data[1];\n } \n }\n $loop = true;\n while ($loop) {\n\n $check_run = exec(\"qstat -j $id_job\");\n\n if($check_run == false){\n $loop = false;\n adonis($user,$project,$path_in,$path_out);\n\n }\n } \n \n }else{\n\n adonis($user,$project,$path_in,$path_out);\n }\n\n \n }", "title": "" }, { "docid": "b8149ef7ce71e8cc3359c96e26c7c1c9", "score": "0.43928754", "text": "function adonis($user,$project,$path_in,$path_out){\n\n if($GLOBALS['adonis'] != \"none\" && $GLOBALS['opt_adonis'] != \"none\"){\n\n echo \"adonis\".\"\\n\";\n $weight = $GLOBALS['opt_adonis'];\n $input = null;\n $map = $path_in.\"map.txt\";\n $group = $GLOBALS['adonis'];\n $out = $path_out.\"Processeddata/adonis\".$group;\n\n # weight , unweight\n if($weight == \"weight\"){\n $input = $path_out.\"Processeddata/cdotu/bdiv_even\".$GLOBALS['min'].\"/weighted_unifrac_dm.txt\";\n\n }elseif ($weight == \"unweight\") {\n $input = $path_out.\"Processeddata/cdotu/bdiv_even\".$GLOBALS['min'].\"/unweighted_unifrac_dm.txt\";\n }\n\n $jobname = $user.\"_adonis\";\n $log = $GLOBALS['path_log'];\n $cmd = \"qsub -N '$jobname' -o $log -cwd -j y -b y Scriptqiime/compare_adonis $input $map $group $out\";\n\n shell_exec($cmd);\n $check_qstat = \"qstat -j '$jobname' \";\n exec($check_qstat,$output);\n \n $id_job = \"\" ; # give job id \n foreach ($output as $key_var => $value ) {\n \n if($key_var == \"1\"){\n $data = explode(\":\", $value);\n $id_job = $data[1];\n } \n }\n $loop = true;\n while ($loop) {\n\n $check_run = exec(\"qstat -j $id_job\");\n\n if($check_run == false){\n $loop = false;\n anosim($user,$project,$path_in,$path_out);\n }\n } \n\n }else{\n \n anosim($user,$project,$path_in,$path_out);\n }\n }", "title": "" }, { "docid": "fc3be8792c84895c0c2bc93105791a96", "score": "0.43790147", "text": "function FCimages ( $indir, $outputdir, $subject, $processdir )\n{\n echo \"*** Make images to check MC-regressed and AFNI filtered images for: $subject \\n\";\n\n // inputs\n\t$FC = \"$outputdir/$subject/fc/fcmap_AFNI_filtered_mc_regressed.nii.gz\";\n\t$FC2 = \"$outputdir/$subject/fc-alt/fcmap_AFNI_filtered_mc_regressed.nii.gz\";\n\n // output\n $outdir = \"$processdir/FC-maps__checks/\";\n\t\n\t// make outdir if not exists\n\tif( !is_dir( $outdir) )\n\t\tmkdir( $outdir, 0755, true );\n\n \t$output_FC = \"$outdir/$subject\".\"_1-FC.png\";\n\t$output_FC2 = \"$outdir/$subject\".\"_2-FC-alternative.png\";\n \n ## Make color maps of all images\n {\n system(\"colormap -b $FC ---nm -c 5 --ss 20 --se 42 --sk 1 -d 1 --scale 4 -o $output_FC\");\n\tsystem(\"colormap -b $FC2 --nm -c 5 --ss 20 --se 42 --sk 1 -d 1 --scale 4 -o $output_FC2\");\n \n }\n \n \n\n}", "title": "" }, { "docid": "6b5b529b724ed42af5c17cebe00b2c5e", "score": "0.43789747", "text": "function get_interactor(array $gene_id,array $gene_alias,array $descriptions,array $gene_symbol, array $protein_id,$species, MongoCollection $interactionsCollection){\n $global_interact_array=array();\n $hpidb_int_array=array();\n $lit_int_array=array();\n $biogrid_int_array=array();\n $intact_int_array=array();\n //$timestart=microtime(true);\n foreach ($protein_id as $id){\n \n //hpidb data\n $search=array(\"type\"=>\"prot_to_prot_hpidb\");\n $select=array('mapping_file'=>1,'pub'=>1,\"method\"=>1,\"src_name\"=>1,\"tgt_name\"=>1,\"src\"=>1,\"tgt\"=>1,\"host_taxon\"=>1,\"virus_taxon\"=>1);\n $query=$interactionsCollection->find($search,$select);\n \n foreach ($query as $value) {\n \n $mapping_file=$value['mapping_file'];\n\n foreach ($mapping_file as $mapping_doc) {\n \n $host_prot_id=$mapping_doc[$value['src']];\n if ($host_prot_id == $id){\n //echo 'key equal';\n $tmp_array=array();\n $src_array=array('src'=>$mapping_doc[$value['src']]);\n array_push($tmp_array, $src_array);\n $tgt_array=array('tgt'=>$mapping_doc[$value['tgt']]);\n array_push($tmp_array, $tgt_array);\n $method_array=array('method'=>$mapping_doc[$value['method']]);\n array_push($tmp_array, $method_array);\n $pub_array=array('pub'=>$mapping_doc[$value['pub']]);\n array_push($tmp_array, $pub_array);\n $host_name_array=array('src_name'=>$mapping_doc[$value['src_name']]);\n array_push($tmp_array, $host_name_array);\n $virus_name_array=array('tgt_name'=>$mapping_doc[$value['tgt_name']]);\n array_push($tmp_array, $virus_name_array);\n $host_taxon_array=array('host_taxon'=>$mapping_doc[$value['host_taxon']]);\n array_push($tmp_array, $host_taxon_array);\n $virus_taxon_array=array('virus_taxon'=>$mapping_doc[$value['virus_taxon']]);\n array_push($tmp_array, $virus_taxon_array);\n\n array_push($hpidb_int_array, $tmp_array);\n \n }\n } \n }\n //intact\n $search=array(\"type\"=>\"prot_to_prot_intact\");\n $select=array('mapping_file'=>1,'pub'=>1,\"method\"=>1,\"src_name\"=>1,\"tgt_name\"=>1,\"src\"=>1,\"tgt\"=>1);\n $query=$interactionsCollection->find($search,$select);\n foreach ($query as $value) {\n \n $mapping_file=$value['mapping_file'];\n foreach ($mapping_file as $mapping_doc) {\n \n $host_prot_id=$mapping_doc[$value['src']];\n if ($host_prot_id == $id){\n\n $tmp_array=array();\n $src_array=array();\n array_push($src_array, 'src');\n array_push($src_array, $mapping_doc[$value['src']]);\n array_push($tmp_array, $src_array);\n $tgt_array=array();\n array_push($tgt_array, 'tgt');\n array_push($tgt_array, $mapping_doc[$value['tgt']]);\n array_push($tmp_array, $tgt_array);\n $method_array=array();\n array_push($method_array, 'method');\n array_push($method_array, $mapping_doc[$value['method']]);\n array_push($tmp_array, $method_array);\n $pub_array=array();\n array_push($pub_array, 'pub');\n array_push($pub_array, $mapping_doc[$value['pub']]);\n array_push($tmp_array, $pub_array);\n $host_name_array=array();\n array_push($host_name_array, 'src_name');\n array_push($host_name_array, $mapping_doc[$value['src_name']]);\n array_push($tmp_array, $host_name_array);\n $virus_name_array=array();\n array_push($virus_name_array, 'tgt_name');\n array_push($virus_name_array, $mapping_doc[$value['tgt_name']]);\n array_push($tmp_array, $virus_name_array);\n array_push($intact_int_array, $tmp_array);\n \n }\n } \n }\n \n }\n array_push($global_interact_array, $hpidb_int_array);\n array_push($global_interact_array, $intact_int_array);\n foreach ($gene_symbol as $symbol){\n //echo 'gene symbol: '.$symbol;\n //echo 'gene alias: '.$gene_alias[0];\n //echo 'gene description: '.$descriptions[0];\n //$symbol='P58IPK';\n if ($symbol != \"NA\" && $symbol !=\"\"){\n $cursor=$interactionsCollection->aggregate(array( \n array('$unwind'=>'$mapping_file'), \n array('$match'=> array('$or'=> array(array('mapping_file.Host_symbol'=>$symbol),array('mapping_file.Host_symbol'=>$gene_alias[0]),array('mapping_file.Host_symbol'=>$descriptions[0])))),\n array('$project' => array('mapping_file.Host_symbol'=>1,'mapping_file.Virus_symbol'=>1,'mapping_file.Putative_function'=>1,'mapping_file.host'=>1,'mapping_file.Accession_number'=>1,'mapping_file.Reference'=>1,'mapping_file.virus'=>1,'mapping_file.method'=>1,'_id'=>0)), \n ));\n if (count($cursor['result'])!=0){\n for ($i = 0; $i < count($cursor['result']); $i++) {\n $mapping_file=$cursor['result'][$i]['mapping_file'];\n\n $tmp_array=array();\n\n $src_array=array();\n array_push($src_array, 'src');\n array_push($src_array, $symbol);\n array_push($tmp_array, $src_array);\n $tgt_array=array();\n array_push($tgt_array, 'tgt');\n array_push($tgt_array, $mapping_file['Virus_symbol']);\n array_push($tmp_array, $tgt_array);\n $method_array=array();\n array_push($method_array, 'method');\n array_push($method_array, $mapping_file['method']);\n array_push($tmp_array, $method_array);\n $pub_array=array();\n array_push($pub_array, 'pub');\n array_push($pub_array, $mapping_file['Reference']);\n array_push($tmp_array, $pub_array);\n $host_name_array=array();\n array_push($host_name_array, 'host_name');\n array_push($host_name_array, $mapping_file['host']);\n array_push($tmp_array, $host_name_array);\n $virus_name_array=array();\n array_push($virus_name_array, 'virus_name');\n array_push($virus_name_array, $mapping_file['virus']);\n array_push($tmp_array, $virus_name_array);\n $host_taxon_array=array(); \n array_push($host_taxon_array, 'Accession_number');\n array_push($host_taxon_array, $mapping_file['Accession_number']);\n array_push($tmp_array, $host_taxon_array);\n $virus_taxon_array=array();\n array_push($virus_taxon_array, 'Putative_function');\n array_push($virus_taxon_array, $mapping_file['Putative_function']);\n array_push($tmp_array, $virus_taxon_array);\n\n array_push($lit_int_array, $tmp_array);\t\t\t\t \n }\n //echo' </dl>';\n }\n //echo \"symbol : \".$symbol.\"<br>\";\n //echo \"gene alias : \".$gene_alias[0].\"<br>\";\n //echo \"descriptions : \".$descriptions[0].\"<br>\";\n if ($gene_alias[0]==\"\" && $gene_alias[0]==\"NA\"){\n if ($descriptions[0]==\"\" && $descriptions[0]==\"NA\"){\n $cursor1=$interactionsCollection->aggregate(array( \n array('$unwind'=>'$mapping_file'), \n array('$match'=> array('mapping_file.OFFICIAL_SYMBOL_A'=>$symbol)),\n array('$project' => array('mapping_file.INTERACTOR_A'=>1,'mapping_file.INTERACTOR_B'=>1,'mapping_file.OFFICIAL_SYMBOL_A'=>1,'mapping_file.OFFICIAL_SYMBOL_B'=>1,'species'=>1,'mapping_file.SOURCE'=>1,'mapping_file.PUBMED_ID'=>1,'mapping_file.EXPERIMENTAL_SYSTEM'=>1,'_id'=>0))\n ));\n }\n else{\n $cursor1=$interactionsCollection->aggregate(array( \n array('$unwind'=>'$mapping_file'), \n array('$match'=> array('$or'=> array(array('mapping_file.OFFICIAL_SYMBOL_A'=>$symbol),array('mapping_file.OFFICIAL_SYMBOL_A'=>$descriptions[0])))),\n array('$project' => array('mapping_file.INTERACTOR_A'=>1,'mapping_file.INTERACTOR_B'=>1,'mapping_file.OFFICIAL_SYMBOL_A'=>1,'mapping_file.OFFICIAL_SYMBOL_B'=>1,'species'=>1,'mapping_file.SOURCE'=>1,'mapping_file.PUBMED_ID'=>1,'mapping_file.EXPERIMENTAL_SYSTEM'=>1,'_id'=>0))\n )); \n } \n }\n else{\n if ($descriptions[0]==\"\" && $descriptions[0]==\"NA\"){\n $cursor1=$interactionsCollection->aggregate(array( \n array('$unwind'=>'$mapping_file'), \n array('$match'=> array('$or'=> array(array('mapping_file.OFFICIAL_SYMBOL_A'=>$symbol),array('mapping_file.OFFICIAL_SYMBOL_A'=>$gene_alias[0])))),\n array('$project' => array('mapping_file.INTERACTOR_A'=>1,'mapping_file.INTERACTOR_B'=>1,'mapping_file.OFFICIAL_SYMBOL_A'=>1,'mapping_file.OFFICIAL_SYMBOL_B'=>1,'species'=>1,'mapping_file.SOURCE'=>1,'mapping_file.PUBMED_ID'=>1,'mapping_file.EXPERIMENTAL_SYSTEM'=>1,'_id'=>0))\n )); \n }\n else{\n $cursor1=$interactionsCollection->aggregate(array( \n array('$unwind'=>'$mapping_file'), \n array('$match'=> array('$or'=> array(array('mapping_file.OFFICIAL_SYMBOL_A'=>$symbol),array('mapping_file.OFFICIAL_SYMBOL_A'=>$gene_alias[0]),array('mapping_file.OFFICIAL_SYMBOL_A'=>$descriptions[0])))),\n array('$project' => array('mapping_file.INTERACTOR_A'=>1,'mapping_file.INTERACTOR_B'=>1,'mapping_file.OFFICIAL_SYMBOL_A'=>1,'mapping_file.OFFICIAL_SYMBOL_B'=>1,'species'=>1,'mapping_file.SOURCE'=>1,'mapping_file.PUBMED_ID'=>1,'mapping_file.EXPERIMENTAL_SYSTEM'=>1,'_id'=>0))\n )); \n }\n \n }\n \n \n if (count($cursor1['result'])!=0){\n //echo '<h2> interactions was found for this gene '.$symbol.'</h2>';\n //var_dump($cursor);\n //echo '<dl class=\"dl-horizontal\">';\n for ($i = 0; $i < count($cursor1['result']); $i++) {\n \n $mapping_file=$cursor1['result'][$i]['mapping_file'];\n $species=$cursor1['result'][$i]['species'];\n //echo \"result : \" . $i . \" for species :\".$species.\"<br>\";\n //echo '<h2> interactions was found for this gene '.$mapping_file['INTERACTOR_B'].'</h2>';\n\n $tmp_array=array();\n $tmp_array=array('INTERACTOR A'=>$mapping_file['INTERACTOR_A'],'INTERACTOR B'=>$mapping_file['INTERACTOR_B'],'OFFICIAL SYMBOL A'=>$mapping_file['OFFICIAL_SYMBOL_A'],'OFFICIAL SYMBOL B'=>$mapping_file['OFFICIAL_SYMBOL_B'],'method'=>$mapping_file['EXPERIMENTAL_SYSTEM'],'publication'=>$mapping_file['PUBMED_ID'],'host A name'=>$species,'host B name'=>$species,'Accession number'=>$mapping_file['SOURCE']);\n \n array_push($biogrid_int_array, $tmp_array);\t\t\t\t\n\n }\n //echo \"tmp_array :\". count($tmp_array);\n //echo \"biogrid_int_array :\". count($biogrid_int_array);\n }\n\n\n \n }\n// $timeend=microtime(true);\n// $time=$timeend-$timestart;\n// //Afficher le temps d'éxecution\n// $page_load_time = number_format($time, 3);\n// echo \"Script starting at: \".date(\"H:i:s\", $timestart);\n// echo \"<br>Script ending at: \".date(\"H:i:s\", $timeend);\n// echo \"<br>Script for building array function executed in \" . $page_load_time . \" sec\";\n\t\t\n\t}\n array_push($global_interact_array, $lit_int_array);\n foreach ($gene_id as $gene){\n \n if (($gene != \"NA\" && $gene !=\"\") && (isset($symbol[0]))){ \n //biogrid interaction data\n $cursor1=$interactionsCollection->aggregate(array( \n array('$unwind'=>'$mapping_file'), \n array('$match'=> array('$or'=> array(array('mapping_file.OFFICIAL_SYMBOL_A'=>$symbol[0]),array('mapping_file.INTERACTOR_A'=>$gene_id[0])))),\n array('$project' => array('mapping_file.INTERACTOR_A'=>1,'mapping_file.INTERACTOR_B'=>1,'mapping_file.OFFICIAL_SYMBOL_A'=>1,'mapping_file.OFFICIAL_SYMBOL_B'=>1,'species'=>1,'mapping_file.SOURCE'=>1,'mapping_file.PUBMED_ID'=>1,'mapping_file.EXPERIMENTAL_SYSTEM'=>1,'_id'=>0))\n ));\n if (count($cursor1['result'])!=0){\n \n for ($i = 0; $i < count($cursor1['result']); $i++) {\n \n $mapping_file=$cursor1['result'][$i]['mapping_file'];\n $species=$cursor1['result'][$i]['species'];\n $tmp_array=array('INTERACTOR A'=>$mapping_file['INTERACTOR_A'],'INTERACTOR B'=>$mapping_file['INTERACTOR_B'],'OFFICIAL SYMBOL A'=>$mapping_file['OFFICIAL_SYMBOL_A'],'OFFICIAL SYMBOL B'=>$mapping_file['OFFICIAL_SYMBOL_B'],'method'=>$mapping_file['EXPERIMENTAL_SYSTEM'],'publication'=>$mapping_file['PUBMED_ID'],'host A name'=>$species,'host B name'=>$species,'Accession number'=>$mapping_file['SOURCE']);\n \n array_push($biogrid_int_array, $tmp_array);\t\t\t\t\n\n }\n\n }\n }\n } \n array_push($global_interact_array, $biogrid_int_array);\n \n \n \n \n \n \n \n/* $timeend=microtime(true);\n// $time=$timeend-$timestart;\n// //Afficher le temps d'éxecution\n// $page_load_time = number_format($time, 3);\n// echo \"Script starting at: \".date(\"H:i:s\", $timestart);\n// echo \"<br>Script ending at: \".date(\"H:i:s\", $timeend);\n// echo \"<br>Script for get_interactor function executed in \" . $page_load_time . \" sec\";*/\n return $global_interact_array;\n}", "title": "" }, { "docid": "e0f37367f51a4fd4312da27136b8b863", "score": "0.43560928", "text": "function precompute($targets = array('89','88','87','86','85')){\n\t\t/* This way you can distribute workloads between cores/computers/friend's pcs/servers and precompute passwords */\n\t\t$submit = file_get_contents('data1');\n\t\t$r = preg_match_all('/([0-9]+),([a-zA-Z]+)/',$submit,$m);\n\n\t\t$usersBySufix = array();\n\t\tforeach($m[1] as $k=>$v){\n\t\t\t$sufix = substr($v,-2);\n\t\t\t$usersBySufix[$sufix][] = array('user'=>$v,'keyString'=>$m[2][$k]);\n\t\t}\n\t\t$m = null;\n\t\tksort($usersBySufix);\n\n\t\tforeach($targets as $target){\n\t\t\t//$target = '36';\n\t\t\tif(!isset($usersBySufix[$target])){continue;}\n\t\t\t$total = count($usersBySufix[$target]);\n\t\t\t$done = 0;\n\t\t\techo 'PROCESSING: '.$target.PHP_EOL;\n\t\t\tforeach($usersBySufix[$target] as $node){\n\t\t\t\tcli_pbar($done,$total);\n\t\t\t\t$key = bruteForce($node['user'],$node['keyString']);\n\t\t\t\t$done++;\n\t\t\t}\n\t\t\tcli_pbar($total,$total);\n\t\t}\n\t}", "title": "" }, { "docid": "70eedf6a50b86fcc82e8d88af480d062", "score": "0.43426782", "text": "function compareFace($file1,$file2){\n\n $url = 'https://api-us.faceplusplus.com/facepp/v3/compare';\n \n $filename1 = $file1['name'];\n $filedata1 = $file1['tmp_name'];\n $filesize1 = $file1['size'];\n $filetype1 = $file1['type']; \n \n $api_key = FACE_API_KEY;\n $api_secret = FACE_API_SECRET_KEY;\n\n if ($filedata1 != '' && $file2 != '') {\n\n $headers = array(\"Content-Type:multipart/form-data\"); // cURL headers for file uploading\n $postfields['api_key'] = $api_key;\n $postfields['api_secret'] = $api_secret;\n $postfields['image_file1'] = new \\CurlFile($filedata1, $filetype1, $filename1);\n $postfields['image_url2'] = $file2;\n \n $ch = curl_init();\n\n $options = array(\n\n CURLOPT_URL => $url,\n CURLOPT_HEADER => FALSE,\n CURLOPT_POST => 1,\n CURLOPT_HTTPHEADER => $headers,\n CURLOPT_POSTFIELDS => $postfields,\n CURLOPT_RETURNTRANSFER => TRUE\n\n ); // cURL options\n\n curl_setopt_array($ch, $options);\n\n $response = curl_exec($ch);\n\n if(!curl_errno($ch)) {\n\n $info = curl_getinfo($ch);\n $output = json_decode($response);\n\n return $output;\n\n } else {\n\n $errmsg = curl_error($ch);\n return $errmsg;\n }\n\n curl_close($ch);\n\n } else {\n\n $errmsg = \"face_select_file_req\";\n return $errmsg;\n }\n }", "title": "" }, { "docid": "40b35bad8cde92c2b27b30b15f4751eb", "score": "0.43299234", "text": "public function similarity($text1, $text2) \n {\n if(is_string($text1) && is_string($text2)) {\n $text1 = str_split($text1);\n $text2 = str_split($text2);\n } \n $inter = array_intersect( $text1, $text2 );\n $union = array_unique( ($text1 + $text2) );\n return count($inter) / count($union); \n }", "title": "" }, { "docid": "b6e0d6a85c4e75fe728e3d7bdd4d82fb", "score": "0.43246168", "text": "function findMatchingDegree(){\r\n\t$noOfantecedent=$_SESSION[$_GET['node']]['$noOfantecedent'];\r\n\t$noOfantecedentRefVal=$_SESSION[$_GET['node']]['$noOfantecedentRefVal'];\r\n\t$antecedentRefTitle=$_SESSION[$_GET['node']]['$antecedentRefTitle'];\r\n\t$antecedentRefVal=$_SESSION[$_GET['node']]['$antecedentRefVal'];\r\n\t$antecedentID=$_SESSION[$_GET['node']]['$antecedentID'];\r\n\t$transformedRefVal=$_SESSION[$_GET['node']]['transformedRefVal'];\r\n// \tconvertPostDataToAncedentArray();\r\n\t/* echo'<br>$transformedRefVal';\r\n\tprint_r($_SESSION['transformedRefVal']) */; \r\n// \t$GLOBALS['matchingDegree']=array_fill(0,$GLOBALS['numberOfRules'],0);\r\n\t$_SESSION[$_GET['node']]['matchingDegree']=array_fill(0,$_SESSION[$_GET['node']]['numberOfRules'],0);\r\n\t$a=0;\r\n\t$tmpMD=array_fill(0,$noOfantecedent,0);\r\n\twrite_to_log(__FILE__,__LINE__,__FUNCTION__,'$transformedRefVal',$transformedRefVal);\r\n\twrite_to_log(__FILE__,__LINE__,__FUNCTION__,'$noOfantecedentRefVal',$noOfantecedentRefVal);\r\n\tfor($i=0;$i<$noOfantecedent;$i++){\r\n\t\t$tmpMD[$i]=array_fill(0,$noOfantecedentRefVal[$i],0);\r\n\t\tfor($j=0;$j<$noOfantecedentRefVal[$i];$j++){\r\n\t\t\t$tmpMD[$i][$j]=pow(($_SESSION[$_GET['node']]['transformedRefVal'][$i][$j]) , ($_POST['antecedent_attribute_weight_'.($i+1)]));\r\n\t\t/* \techo'<br>'.$tmpMD[$i][$j];\r\n\t\t\techo'<br>'.$_POST['antecedent_attribute_weight_'.($i+1)];\r\n\t\t\techo'<br>'.$_SESSION['transformedRefVal'][$i][$j]; */\r\n\t\t\t\r\n\t\t}\t\r\n\t}\r\n\twrite_to_log(__FILE__,__LINE__,__FUNCTION__,'$tmpMD',$tmpMD);\r\n// \techo'<br>$$tmpMD';\r\n// \tprint_r($tmpMD); \r\n\t$res=array();\r\n\t$result=array();\r\n\tforeach ($tmpMD as $tmp){\r\n// \t\techo'<br>$$tmp';\r\n// \t\tprint_r($tmp); \r\n\t\t$result=multiplyVector($result,$tmp);\r\n\t\twrite_to_log(__FILE__,__LINE__,__FUNCTION__,'$result',$result);\r\n\t\t$_SESSION[$_GET['node']]['matchingDegree']=$result;\r\n\t\t\r\n\t}\r\n\twrite_to_log(__FILE__,__LINE__,__FUNCTION__,'$_SESSION['.$_GET['node'].'][matchingDegree]',$_SESSION[$_GET['node']]['matchingDegree']);\r\n// \techo'<br>$_SESSION[MatchingDegree]';\r\n// \tprint_r($_SESSION['MatchingDegree']);\r\n\t\r\n\t\r\n\tif($noOfantecedent==2){\r\n\t\tinsert_MatchingDegree($result);\r\n\t}\r\n\tif($noOfantecedent==3){\r\n\t\tinsert_MatchingDegree_Three($result);\r\n\t}\r\n\tif($noOfantecedent==5){\r\n\t\tinsert_MatchingDegree_Five($result);\r\n\t}\r\n\t/* \r\n\t * \r\n\t * For j = 0 To numberOfRules - 1\r\nActivationWeight(j) = ((ruleWeight(j) * matchingDegree(j)) / Sum)\r\nCommon.Inserte (\"update RuleBaseForTwo set ActivationWeight=\" & ActivationWeight(j) & \"where serial=\" & j)\r\n\r\nNext j\r\n\t * rec($tmpMD, 0, 1, $res);\r\n\tprint_r($res); */\r\n\t/* ReDim matchingDegree(numberOfRules) As Double\r\n\ta = 0\r\n\tFor i = 0 To noOfAntecedent1RefVal - 1\r\n\tFor j = 0 To noOfAntecedent2RefVal - 1\r\n\tmatchingDegree(a) = CDbl(transformedRefVal1(i) ^ CDbl(Me.txtAntecedent1Weight.Text) * \r\n\ttransformedRefVal2(j) ^ CDbl(Me.txtAntecedent2Weight.Text))\r\n\tCommon.Inserte (\"update RuleBaseForTwo set matchingDegree=\" & matchingDegree(a) & \"where serial=\" & a)\r\n\ta = a + 1\r\n\tNext j\r\n\tNext i */\r\n}", "title": "" }, { "docid": "0f9cdef1b41f4fd8a87f6235d95e94e4", "score": "0.43229562", "text": "function checkStatus(&$passcodeArray1, &$passcodeArray2)\n{\n $hasUserWon = true;\n foreach ($passcodeArray1[\"masked\"] as $val) {\n if ($val == '*') {\n $hasUserWon = false;\n }\n }\n $hasCompWon = true;\n foreach ($passcodeArray2[\"masked\"] as $val) {\n if ($val == '*') {\n $hasCompWon = false;\n }\n }\n if ($hasUserWon && $hasCompWon) {\n echo \"\\nYou draw with the computer. Cool!\";\n return true;\n } else if ($hasCompWon) {\n echo \"\\nSorry you lost!\";\n return true;\n } else if ($hasUserWon) {\n echo \"\\nYou won against the computer. You're a wizzard!\";\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "b61ecd5b1773c23e482ffdb323a715ff", "score": "0.4309514", "text": "function intersection() {}", "title": "" }, { "docid": "7c8e2a51983fc83249b260d7ac61510b", "score": "0.43078485", "text": "private function compareOutputs()\n {\n $assignmentController = new MarkingSetup();\n\n /* Gets the assignment Commands from the config file */\n $cmd = $assignmentController->getCompareCommands($this->assignmentNumber);\n\n /* Gets the number of tests each assignment will perform */\n $testNumber = $assignmentController->getAssignmentTestNumber();\n\n /* Navigates to the assignment folder */\n chdir(\"/home/student/$this->studentId/A$this->assignmentNumber\");\n\n for ($i = 1; $i <= $testNumber; $i++) {\n system(trim($cmd[$i]), $result);\n }\n\n $toCheck = array();\n for ($i = 1; $i <= $testNumber; $i++) {\n if (filesize(\"compare$i.txt\") == 0) {\n $toCheck[$i] = 'PASSED';\n } else {\n $toCheck{$i} = 'FAILED';\n }\n }\n\n return $toCheck;\n }\n\n}", "title": "" }, { "docid": "eaa251b04a47cb241a3ad8f6b6450d52", "score": "0.42990476", "text": "public static function checkVerbObjectCorrespondencyForTwoLabelsForMatching($label1, $label2, &$persistedLabelElements=null) {\n// \t\tforeach ( $correspondencyCache as $pair ) {\n// \t\t\tif ( $pair[\"label1\"] == $label1 && $pair[\"label2\"] == $label2 ) return true; \n// \t\t\tif ( $pair[\"label1\"] == $label2 && $pair[\"label2\"] == $label1 ) return true;\n\n// \t\t}\n\t\t\n// \t\t$nonCorrespondencyCache = is_null($matchingNonCorrespondencyCache) ? self::loadMatchingNonCorrespondentLabelsFromPersistedFile() : $matchingNonCorrespondencyCache;\n// \t\tforeach ( $nonCorrespondencyCache as $pair ) {\n// \t\t\tif ( $pair[\"label1\"] == $label1 && $pair[\"label2\"] == $label2 ) return false;\n// \t\t\tif ( $pair[\"label1\"] == $label2 && $pair[\"label2\"] == $label1 ) return false;\n// \t\t}\n\t\t\n\t\t$verb1 = NLP::getLabelVerb($label1, $persistedLabelElements);\n\t\t$persistedLabelElements = self::loadLabelElementsFromPersistedFile();\n\t\t$object1 = NLP::getLabelObject($label1, $persistedLabelElements);\n\t\t\n\t\t$verb2 = NLP::getLabelVerb($label2, $persistedLabelElements);\n\t\t$persistedLabelElements = self::loadLabelElementsFromPersistedFile();\n\t\t$object2 = NLP::getLabelObject($label2, $persistedLabelElements);\n\n\t\tif ( (is_null($verb1) && !is_null($verb2)) \n\t\t\t|| (!is_null($verb1) && is_null($verb2))\n\t\t\t|| (is_null($object1) && !is_null($object2))\n\t\t\t|| (!is_null($object1) && is_null($object2)) \n\t\t\t|| (is_null($verb1) && is_null($verb2) && is_null($object1) && is_null($object2)) ) \n\t\t{\n// \t\t\tself::persistMatchingNonCorrespondentLabelPair($label1, $label2);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Check for synonym verb and object\n\t\t\n\t\t// First case: only verbs are available\n\t\tif ( !is_null($verb1) && !is_null($verb2) && is_null($object1) && is_null($object2) ) {\n// \t\t\t$verbSyn = NLP::areSynonymVerbs($verb1, $verb2);\n// \t\t\tif ( !$verbSyn ) {\n// \t\t\t\tself::persistMatchingNonCorrespondentLabelPair($label1, $label2);\n// \t\t\t\treturn false;\n// \t\t\t}\n// \t\t\tself::persistMatchingNonCorrespondentLabelPair($label1, $label2);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Second case: only object are available\n\t\tif ( is_null($verb1) && is_null($verb2) && !is_null($object1) && !is_null($object2) ) {\n// \t\t\t$objectSyn = NLP::areSynonymNouns($object1, $object2);\n// \t\t\tif ( !$objectSyn ) {\n// \t\t\t\tself::persistMatchingNonCorrespondentLabelPair($label1, $label2);\n// \t\t\t\treturn false;\n// \t\t\t}\n// \t\t\tself::persistMatchingNonCorrespondentLabelPair($label1, $label2);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Third case: verbs and object are available\n\t\tif ( !is_null($verb1) && !is_null($verb2) && !is_null($object1) && !is_null($object2) ) {\n\t\t\t$verbSyn = NLP::areSynonymVerbs ( $verb1, $verb2 );\n\t\t\t$objectSyn = NLP::areSynonymNouns ( $object1, $object2 );\n\t\t\tif ( !$verbSyn || !$objectSyn ) {\n// \t\t\t\tself::persistMatchingNonCorrespondentLabelPair($label1, $label2);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//print(\"\\n V1: \".$verb1.\", O1: \".$object1.\", V2: \".$verb2.\", O2: \".$object2.\"\\n\");\n\t\t\n \t\tself::persistMatchingCorrespondentLabelPair($label1, $label2);\n\t\treturn true;\n\t}", "title": "" }, { "docid": "6cfc26357f89dd833ae5e382d402bd82", "score": "0.42983046", "text": "function tpps_compare_files($fid_1, $fid_2, $file_1_id_name, $file_2_id_name, $file_1_no_header = FALSE, $file_2_no_header = FALSE) {\n $missing = array();\n $file_1_content = array_unique(tpps_parse_file_column($fid_1, $file_1_id_name, $file_1_no_header));\n $file_2_content = array_unique(tpps_parse_file_column($fid_2, $file_2_id_name, $file_2_no_header));\n asort($file_1_content);\n asort($file_2_content);\n reset($file_1_content);\n reset($file_2_content);\n\n while (current($file_1_content) !== FALSE and current($file_2_content) !== FALSE) {\n if (current($file_1_content) < current($file_2_content)) {\n $missing[] = current($file_1_content);\n next($file_1_content);\n continue;\n }\n elseif (current($file_1_content) > current($file_2_content)) {\n next($file_2_content);\n continue;\n }\n next($file_1_content);\n next($file_2_content);\n continue;\n }\n\n while (current($file_1_content) !== FALSE) {\n $missing[] = current($file_1_content);\n next($file_1_content);\n }\n return $missing;\n}", "title": "" }, { "docid": "4f3d62510dd377302227ecc363bc77dd", "score": "0.42932713", "text": "function referentiel_intersection_teachers($teachers_repartition, $teachers_accompagnement){\r\n //\r\n $teachersids=array();\r\n //mtrace(\"DEBUG :: lib_repartitions.php :: referentiel_intersection_teachers :: 118\\n\");\r\n //mtrace(\"118 :: TEACHERS REPARTITION\\n\");\r\n //print_r($teachers_repartition);\r\n //mtrace(\"120 :: TEACHERS ACCOMPAGNEMENT\\n\");\r\n //print_r($teachers_accompagnement);\r\n /*\r\n echo(\"DEBUG :: lib_repartitions.php :: referentiel_intersection_teachers :: 107\\n\");\r\n echo(\"118 :: TEACHERS REPARTITION<br />\\n\");\r\n print_r($teachers_repartition);\r\n echo(\"<br />120 :: TEACHERS ACCOMPAGNEMENT<br />\\n\");\r\n print_r($teachers_accompagnement);\r\n echo \"<br />\\n\";\r\n */\r\n if (empty($teachers_accompagnement)){\r\n $teachersids=$teachers_repartition;\r\n }\r\n else if (empty($teachers_repartition)){\r\n $teachersids=$teachers_accompagnement;\r\n }\r\n else{\r\n foreach($teachers_accompagnement as $teacher){\r\n if (in_array($teacher, $teachers_repartition)==true) {\r\n // mtrace(\"\\nRETOURNER $teacher->userid\");\r\n\t\t\t\t$a = new Object();\r\n\t\t\t\t$a->userid=$teacher->userid;\r\n $teachersids[$teacher->userid]->userid=$a;\r\n }\r\n }\r\n if (empty($teachersids)){\r\n // si aucune intersection retourner les accompagnateurs\r\n $teachersids=$teachers_accompagnement;\r\n }\r\n }\r\n //mtrace(\"137 :: TEACHERS SELECTIONNES\\n\");\r\n //print_r($teachersids);\r\n //mtrace(\"EXIT\\n\");\r\n //exit;\r\n /*\r\n echo (\"lib_repartition :: 129 :: TEACHERS SELECTIONNES<br />\\n\");\r\n print_object($teachersids);\r\n echo \"<br />\\n\";\r\n // exit;\r\n */\r\n return $teachersids;\r\n}", "title": "" }, { "docid": "350bce0193d1bcef99c8e81b08fdf59b", "score": "0.42890182", "text": "function Comparator($depositItemThumbURL, $image2){\n //$imageD = imagecreatefromjpeg($depositItemThumbURL);\n $imageD = createImage($depositItemThumbURL);\n if (is_string($imageD)){\n return $imageD;\n }else{\n //imagejpeg($imageD , './input_' . $r . '.jpg');\n $xD = imagesx($imageD);\n $yD = imagesy($imageD);\n $imageS = NormalizationShutterFile($image2, $xD, $yD);\n if (is_string($imageS)){\n return $imageS;\n }else{\n $xS = imagesx($imageS);\n $yS = imagesy($imageS);\n if ($xD*$yS/($xS*$yD) > 0.9 \n && $xD*$yS/($xS*$yD) < 1.1){\n //imagejpeg($imageS , \"C:\\img/result_\" . $r . '.jpg');\n $count = 0;\n if ($yD > $yS){$maxY = $yS;}\n else {$maxY = $yD;}\n $maxX = $xD;\n $arrayX = array(0, intval($maxX/4), intval($maxX/2), intval($maxX*3/4), $maxX);\n $arrayY = array(0, intval($maxY/4), intval($maxY/2), intval($maxY*3/4), $maxY);\n $i=0;\n $square = 0;\n do{\n $ii = 0;\n do{\n for($y = $arrayY[$i]; $y < $arrayY[($i +1)]; $y ++){\n for($x = $arrayX[$ii]; $x < $arrayX[($ii +1)]; $x ++){\n $pixelD = imagecolorat($imageD, $x, $y);\n $pixelS = imagecolorat($imageS, $x, $y);\n $count = $count + PixelCompare($pixelD, $pixelS);\n }\n }\n $square ++;\n if ($count/($arrayX[1]*$arrayY[1]*$square) <0.7){$count = 0; break;}\n $ii ++;\n }while ($ii < 4);\n $i ++;\n if ($count == 0){break;}\n }while ($i < 4);\n //var_dump($count/($xD* $yD));\n return $koef = $count/($xD* $yD);\n } else {return 0;}\n }\n }\n }", "title": "" }, { "docid": "2d48fe7e00dfb5c05817758c61f29978", "score": "0.42829916", "text": "function runFilter() {\n $source = &$this->src;\n $data = &$this->dst;\n\n for ($i = 0; $i < count($source); $i++) {\n\n $ti = $source[$i][$this->index];\n array_key_exists($ti, $data) ? true : $data[$ti] = array();\n\t \n if ( !array_key_exists(\"monat_translated\",$data[$ti]) || $data[$ti][\"monat_translated\"] != true) {\n\t\t\t\t$data[$ti][\"monat_translated\"] = true;\n\t\t\t\tif (array_key_exists('monat',$source[$i]) && array_key_exists($source[$i]['monat'], $this->monate)) {\n \t@$data[$ti][\"monat\"] = $this->monate[$source[$i]['monat']];\n\t\t\t\t}\n }\n\n foreach ($source[$i] as $key => $value) {\n\t\tif ( $key == 'monat') continue;\n // filter\n if (empty($value)) {\n $data[$ti][$key] = \"0\";\n } else {\n $data[$ti][$key] = $value;\n }\n }\n }\n }", "title": "" }, { "docid": "0a55e5647eef6e6a4cbae5e5b4d528c1", "score": "0.42637807", "text": "function stats_stat_correlation($arr1, $arr2)\n{ \n $correlation = 0;\n \n $k = SumProductMeanDeviation($arr1, $arr2);\n $ssmd1 = SumSquareMeanDeviation($arr1);\n $ssmd2 = SumSquareMeanDeviation($arr2);\n \n $product = $ssmd1 * $ssmd2;\n \n $res = sqrt($product);\n \n $correlation = $k / $res;\n \n return $correlation;\n}", "title": "" }, { "docid": "5d7434c60f7911986ef6977927cc65bd", "score": "0.42529613", "text": "private function findMotifs(){\n\t\tforeach ($this->seqs as $seq) {\n\t\t\t$this->lens[] = strlen($seq);\n\t\t\t$tmp = new Comparator($seq,$this->txtpatr1); //extender para todos los consensus\n\t\t\t$this->motifsFound[] = $tmp->getMatches();\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "21aafbd59877bd07ae6a039ad2211251", "score": "0.4249069", "text": "public function find_fastq_fasta(){\n\n $platform_sam = \"miseq\";\n $platform_type = \"miseq_barcodes_primers\";\n $path = FCPATH.\"owncloud/data/aumza/files/testprimer/input\";\n\n $file_fastq = glob($path.\"/*.fastq\");\n $file_fasta = glob($path.\"/*.fasta\");\n $ref_fasta = array(\"gg_13_8_99.fasta\",\n \"silva.v4.fasta\",\n \"silva.bacteria.fasta\",\n \"silva.v123.fasta\",\n \"silva.v34.fasta\",\n \"silva.v345.fasta\",\n \"silva.v45.fasta\",\n \"trainset16_022016.rdp.fasta\");\n\n if($platform_sam == \"miseq\"){\n $file_oligo = $this->find_oligos();\n if($platform_type == \"miseq_without_barcodes\"){\n\n\n }elseif ($platform_type == \"miseq_contain_primer\"){\n \n \n }elseif($platform_type == \"miseq_barcodes_primers\"){\n $k_fastq = null;\n foreach ($file_fastq as $value) {\n $name = end((explode('/',$value)));\n preg_match('/R(\\w)/',$name,$results);\n if($results){\n list($R,$R_index) = $results;\n $k_fastq .= $R.\":\".$name.\":\";\n }\n }\n\n list($R1,$R1name,$R2,$R2name) = explode(\":\", $k_fastq);\n echo $R1name.\"<br>\".$R2name.\"<br>\".$file_oligo.\"<br>\";\n list($firstname) = explode(\".fastq\", $R1name);\n echo $firstname;\n \n }\n\n }elseif ($platform_sam == \"proton\") {\n $file_oligo = $this->find_oligos();\n if($platform_type == \"proton_barcodes_primers\"){\n foreach($file_fastq as $value){\n $name = end((explode('/',$value)));\n list($fastq_get) = explode(\"fastq\", $name);\n $fastq_get = $fastq_get.\"fasta\";\n echo $fastq_get.\"<br>\";\n }\n }elseif($platform_type == \"proton_barcodes_fasta\"){\n foreach ($file_fasta as $key => $value){\n $name_fasta = end((explode('/', $value)));\n if(!in_array($name_fasta,$ref_fasta)){\n echo $name_fasta.\"<br/>\";\n } \n }\n } \n }\n \n \n }", "title": "" }, { "docid": "afd720d81fccb276b7866ece4368c453", "score": "0.42453876", "text": "function mergeFlow($flow2, $targets, $joints) {\r\n\t if (!$targets || !$joints || sizeof($targets) != sizeof($joints)) return;\r\n\r\n\t $ngd = array(); $npd = array();\r\n\t foreach ($joints as $j=>$tg) {\r\n\t\t $ngd[$tg->innerid()] = $targets[$j]->innerid();\r\n\t\t if (!$targets[$j]->src() && $tg->src()) $targets[$j]->SetSrc($tg->src());\r\n\t\t if (!$targets[$j]->dest() && $tg->dest()) $targets[$j]->SetDest($tg->dest());\r\n\t }\r\n\r\n\t foreach ($flow2->goods as $tg)\r\n\t\t if (!$ngd[$tg->innerid()]) {\r\n\t\t\t $ngd[$tg->innerid()] = $this->goodsid;\r\n\t\t\t $tg->SetInnerid($this->goodsid);\r\n\t\t\t $tg->SetId(0);\r\n\t\t\t $this->goods[$this->goodsid++] = $tg;\r\n\t\t }\r\n\r\n\t foreach ($flow2->processors as $tg) {\r\n\t\t $npd[$tg->innerid()] = $this->processorsid;\r\n\t\t $tg->SetInnerid($this->processorsid);\r\n\t\t $tg->SetId(0);\r\n\r\n\t\t foreach ($tg->input() as &$i) {\r\n\t\t\t $i = $ngd[$i];\r\n\t\t\t $this->goods[$i]->SetDest($tg->innerid());\r\n\t\t }\r\n\t\t foreach ($tg->output() as &$i) {\r\n\t\t\t $i = $ngd[$i];\r\n\t\t\t $this->goods[$i]->SetSrc($tg->innerid());\r\n\t\t }\r\n\r\n\t\t $this->processors[$this->processorsid++] = $tg;\r\n\t }\r\n\t $this->saved = FALSE;\r\n }", "title": "" }, { "docid": "d2db406cedf1eb9cf4ff1996cc742166", "score": "0.42342818", "text": "function score_match_addr($search_str, $match_addr)\n{\n ////// so for now its just a score of how much of what the user typed was in the match\n\n $ret_arr[1] = score_strings($search_str, $match_addr);\n //$ret_arr[2] = score_strings($match_addr,$search_str);\n\n //$ret_arr[2] = score_strings($match_addr,get_base_addr_bits_usr($search_str,$match_addr));\n //$ret_arr[\"match_points\"] = ($ret_arr[1][\"score\"]+$ret_arr[2][\"score\"]) . \" of \" . ($ret_arr[1][\"total\"]+$ret_arr[2][\"total\"]);\n //$ret_arr[\"match_score\"] = round((($ret_arr[1][\"score\"]+$ret_arr[2][\"score\"])*100) / ($ret_arr[1][\"total\"]+$ret_arr[2][\"total\"]));\n\n $ret_arr[\"matchPoints\"] = $ret_arr[1][\"score\"] . \" of \" . $ret_arr[1][\"total\"];\n $ret_arr[\"score\"] = round(($ret_arr[1][\"score\"] * 100) / $ret_arr[1][\"total\"]);\n\n return $ret_arr;\n}", "title": "" }, { "docid": "f05a50af996b0ce26bfa1146bbd95933", "score": "0.42311645", "text": "public static function process($p1Cards = array(), $p2Cards=array(),Deck &$d=null) {\n $ret = array();\n $log = array();\n $winner = null;\n $p1Score = 0;\n $p2Score = 0;\n // the loser condition \n while($winner === null) {\n $turn = array();\n $nextToShuffle = null;\n $p1count = count($p1Cards);\n $p2count = count($p2Cards);\n \n if($p1count<$p2count) {\n $nextToShuffle = 1;\n } elseif ($p1count<$p2count) {\n $nextToShuffle = 2;\n }\n $tc = min($p1count,$p2count);\n $ti = 0;\n \n while($ti < $tc) {\n $ti++;\n $l = array_shift($p1Cards);\n $r = array_shift($p2Cards);\n $c = $d->Compare($l,$r);\n $logEntry = array('type'=>\"play\",\"p1\"=>$l,\"p2\"=>$r, 'action'=>'none','result'=>null,'score'=>array(0,0));\n $trick = array($l,$r);\n if($c==0) {\n $logEntry['action']=\"war\";\n $logEntry['plays'] = array();\n $trick = array();\n while($c==0 and $ti<$tc) {\n $ti++;\n $l = array_shift($p1Cards);\n $r = array_shift($p2Cards);\n $logEntry['plays'][] = array('p1'=>$l,'p2'=>$r);\n $trick += array($l,$r);\n $c = $d->Compare($l,$r);\n }\n if($c>0) {\n $p1Cards+=$trick;\n $logEntry['result']=0;\n \n } else {\n $p2Cards+=$trick;\n $logEntry['result']=1;\n }\n \n \n } elseif($c>0) {\n $p1Cards+=array($l,$r);\n $logEntry['result']=0;\n \n } else {\n $p2Cards+=array($l,$r);\n $logEntry['result']=1;\n }\n $logEntry['receives'] = $trick;\n $log[]=$logEntry;\n }\n if(count($p1Cards)==0)\n $winner=2;\n else if(count($p2Cards)==0)\n $winner=1;\n else {\n if($nextToShuffle===null) {\n shuffle($p1Cards);\n shuffle($p2Cards);\n } else {\n $h = \"p{$nextToShuffle}Cards\";\n shuffle($hh);\n }\n }\n }\n return array(\n 'winner'=>$winner,\n 'log'=>$log\n );\n debug($log);\n \n }", "title": "" }, { "docid": "091d69c0543b2579d45c01608d0a03f9", "score": "0.42201373", "text": "function score_strings($str1, $str2)\n{\n // this way if a user types a building name or something, they get points for that\n // but dont lose points if its in the base addr, but they didnt type it\n\n $score = 0;\n $max_score = 0;\n\n $str1_nums = preg_replace(\"/[^0-9]/\", \"_\", $str1); // this is to check for near st num matches eg. 9 vs 9B = pass, 9 vs 90 = fail\n $ret_arr[\"search_str_nums\"] = $str1_nums;\n\n // now turn what match_addr into an array with each bit and loop through that and compare to the user string\n $str2 = trim($str2, '_');\n $str2_arr = explode(\"_\", $str2);\n foreach ($str2_arr as $key => $val) {\n if (strpos($val, \"| MTL\") == false) { // exclude the bits at the end of type-4 alias's\n $processed_val = \"_\" . $val . \"_\";\n if (strpos($str1, $processed_val) !== false) {\n $ret_arr[$processed_val] = \":) exact match\";\n $score += 10;\n } elseif (strpos($str1_nums, $processed_val) !== false) {\n $ret_arr[$key] = \":| near match\";\n $score += 5;\n } else {\n $ret_arr[$processed_val] = \":( no match\";\n }\n $max_score += 10;\n }\n }\n\n $ret_arr[\"score\"] = $score;\n $ret_arr[\"total\"] = $max_score;\n return $ret_arr;\n}", "title": "" }, { "docid": "81be678fd38056e7cf034ed3d3409cc4", "score": "0.42055488", "text": "function perturb (&$p1, &$p2, &$q1, &$q2, $aP, $aQ) \n { \n $PT = 0.00001; // Perturbation factor \n if ($aP == 0) // q1,q2 intersects p1 exactly, move vertex p1 closer to p2 \n { \n $h = $this->dist($p1->X(),$p1->Y(),$p2->X(),$p2->Y()); \n $a = ($PT * $this->dist($p1->X(),$p1->Y(),$p2->X(),$p1->Y()))/$h; \n $b = ($PT * $this->dist($p2->X(),$p2->Y(),$p2->X(),$p1->Y()))/$h; \n $p1->setX($p1->X() + $a); \n $p1->setY($p1->Y() + $b); \n } \n elseif ($aP == 1) // q1,q2 intersects p2 exactly, move vertex p2 closer to p1 \n { \n $h = $this->dist($p1->X(),$p1->Y(),$p2->X(),$p2->Y()); \n $a = ($PT * $this->dist($p1->X(),$p1->Y(),$p2->X(),$p1->Y()))/$h; \n $b = ($PT * $this->dist($p2->X(),$p2->Y(),$p2->X(),$p1->Y()))/$h; \n $p2->setX($p2->X() - $a); \n $p2->setY($p2->Y() - $b); \n } \n elseif ($aQ == 0) // p1,p2 intersects q1 exactly, move vertex q1 closer to q2 \n { \n $h = $this->dist($q1->X(),$q1->Y(),$q2->X(),$q2->Y()); \n $a = ($PT * $this->dist($q1->X(),$q1->Y(),$q2->X(),$q1->Y()))/$h; \n $b = ($PT * $this->dist($q2->X(),$q2->Y(),$q2->X(),$q1->Y()))/$h; \n $q1->setX($q1->X() + $a); \n $q1->setY($q1->Y() + $b); \n } \n elseif ($aQ == 1) // p1,p2 intersects q2 exactly, move vertex q2 closer to q1 \n { \n $h = $this->dist($q1->X(),$q1->Y(),$q2->X(),$q2->Y()); \n $a = ($PT * $this->dist($q1->X(),$q1->Y(),$q2->X(),$q1->Y()))/$h; \n $b = ($PT * $this->dist($q2->X(),$q2->Y(),$q2->X(),$q1->Y()))/$h; \n $q2->setX($q2->X() - $a); \n $q2->setY($q2->Y() - $b); \n } \n }", "title": "" }, { "docid": "8816db919fb945c26232dd9ff8869c34", "score": "0.42017427", "text": "function printMatches() {\n\t\techo '<br><br><h1>Meet '.$this->UserRow1['first_name'].' &\n'.$this->UserRow2['first_name'].'</h1><br>';\n\t\t$matchSet = new profileMatcher($this->UserRow1['user_id'],\n$this->UserRow2['user_id']);\n\t\t$matchSet->doMatch();\n\tforeach (array($this->UserRow1, $this->UserRow2) as $row) {\n\t\t$charities = $matchSet->setCharitySet($row['user_id']); \n\t\t$turnred = $matchSet->getMatchArray();\n\t\t//print_r($charities);\n\t\tif (! empty($charities)) {\n\t\t\techo ' <div class=\"row\">';\n\t\t$url = $this->setGravURL($row);\n\t\techo '\n <div class=\"span6\">\n\t\t\t<img src=\"'.$url.'\"/>\n <div>\n\t\t\t <h2>'.$row['username'].'</h2>';\n\t\tforeach ($charities as $c) {\n\t\t\tif (in_array($c, $turnred)) {\n\t\t\t\techo '<span class=\"label label-important\"><h4>&nbsp;&nbsp;&nbsp;\n'.$c.' &nbsp;&nbsp;&nbsp;</h4></span><br><br>';\n\t\t}\n\t\telse {\n\t\t\t\techo '<span\nclass=\"label\"><h4>&nbsp;&nbsp;&nbsp;'.$c.'&nbsp;&nbsp;&nbsp;</h4></span><br><br>';\n\t\t}\t\t\n}\n\techo '\t\n\t\t</div>\n\t\t</div>';\n\t}\n\t}\n\techo '</div>';\n}", "title": "" }, { "docid": "a8da61aac91320b3d21603fa9645c773", "score": "0.41954046", "text": "function compareFaceUrl($file1,$file2){\n\n $url = 'https://api-us.faceplusplus.com/facepp/v3/compare';\n \n $api_key = FACE_API_KEY;\n $api_secret = FACE_API_SECRET_KEY;\n\n if ($file1 != '' && $file2 != '') {\n\n $headers = array(\"Content-Type:multipart/form-data\"); // cURL headers for file uploading\n $postfields['api_key'] = $api_key;\n $postfields['api_secret'] = $api_secret;\n $postfields['image_url1'] = $file1;\n $postfields['image_url2'] = $file2;\n \n $ch = curl_init();\n\n $options = array(\n\n CURLOPT_URL => $url,\n CURLOPT_HEADER => FALSE,\n CURLOPT_POST => 1,\n CURLOPT_HTTPHEADER => $headers,\n CURLOPT_POSTFIELDS => $postfields,\n CURLOPT_RETURNTRANSFER => TRUE\n\n ); // cURL options\n\n curl_setopt_array($ch, $options);\n\n $response = curl_exec($ch);\n\n if(!curl_errno($ch)) {\n\n $info = curl_getinfo($ch);\n $output = json_decode($response);\n\n return $output;\n\n } else {\n\n $errmsg = curl_error($ch);\n return $errmsg;\n }\n\n curl_close($ch);\n\n } else {\n\n $errmsg = \"face_select_file_req\";\n return $errmsg;\n }\n }", "title": "" }, { "docid": "1b45191c20298efd50fae5f49dff5712", "score": "0.41911116", "text": "public function get_analysis(){\n\n\t\t//Validate account\n\t\t$account\t= Input::get('account');\n\t\t$token\t\t= Input::get('token');\n\n\t\t$validate\t= true; //$this->account->validateCredentials($account, $token);\n\n\t\t$rest\t\t= (object) 'Rest';\n\t\n\t\tif( ! $validate ){\n\t\t\t\n\t\t\t//Login failed.\n\t\t\t$rest->status = 'error';\n\t\t\t$rest->message = 'Login credentials are not valid.';\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\ttry{\n\t\t\t\t//collect results\n\t\t\t\t$data = array();\n\n\t\t\t\t//Get average color of sample\n\t\t\t\tif( Input::has('subject') ){\n\t\t\t\t\t$sample\t= RemoteImage::create( Input::get('subject') );\n\t\t\t\t\t$data['origin'] = $sample->getRgba()->toArray();\n\t\t\t\t}\n\n\t\t\t\t//If scale set, get colors from scale\n\t\t\t\tif( Input::has('palette_id') ){\n\t\t\t\t\t$palette = Palette::find( Input::get('palette_id') )->colors()->get();\n\t\t\t\t\tforeach($palette as $color)\n\t\t\t\t\t{\n\t\t\t\t\t\t$data['palette'][] = array(\n\t\t\t\t\t\t\t\t'color'\t\t=> $color->getRgba()->toArray(),\n\t\t\t\t\t\t\t\t'variance'\t=> CreateVarianceCtx::create($color->getRgba() ,$sample->getRgba())\n\t\t\t\t\t\t\t\t\t\t\t\t\t->execute()->toArray()\n\t\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tunset($color);\n\t\t\t\t}\n//*\t\t\t\t\n\t\t\t\tusort($data['palette'], function( $a, $b ){\n\t\t\t\t\treturn strcmp($a['variance']['magnitude'], $b['variance']['magnitude']);\n\t\t\t\t});\n\n/*\n\t\t\t\t$data['ambient']['color'] = $this->litmus->adjust_ambient(\n\t\t\t\t\t\t$data['sample']['color'],\n\t\t\t\t\t\t$this->control_captured,\n\t\t\t\t\t\t$this->control_actual\n\t\t\t\t\t);\n//*/\n\n\t\t\t\t//return result object\n\t\t\t\t$time\t\t\t= date('M d, Y H:i:s');\n\t\t\t\t$rest->status\t= 'success';\n\t\t\t\t$rest->data\t\t= $data;\n\t\t\t\t$rest->message\t= 'Account: '.$account.' @ '.$time;\n\t\t\t\n\t\t\t}catch(Exception $e){\n\t\t\t\t\n\t\t\t\t$rest->status = 'error';\n\t\t\t\t$rest->message = $e->getMessage();\n\t\t\t\t\n\t\t\t}// end try/catch \n\t\t}//end if/else\n\n\t\treturn Response::json($rest);\n\t}", "title": "" }, { "docid": "f8142dcf8e69b4a3f427a732a925681a", "score": "0.4188516", "text": "public static function detect();", "title": "" }, { "docid": "85c06d93dbfa318ab0c79faa032e4819", "score": "0.41868198", "text": "function organisationMatch($joueursPair, $joueursImpair, $nbJoueurs)\n{\n //Création des variables \n $tableauPair = [];\n $tableauPairTemp = [];\n $tableauImpair = [];\n $tableauImpairTemp = [];\n\n //Vérifie le nombre de joueurs par tournois\n if ($nbJoueurs == 16) {\n\n\n\n $longueur = $nbJoueurs / 4;\n //compte le nombre de joueurs dont le numéro de classement est\n //un chiffre pair\n for ($i = 0; $i < $longueur; $i++) {\n $pair = [];\n array_push($pair, $joueursPair[$i], end($joueursPair));\n unset($joueursPair[$i], $joueursPair[array_key_last($joueursPair)]);\n array_push($tableauPairTemp, $pair);\n unset($pair);\n }\n\n array_push($tableauPair, $tableauPairTemp[0]);\n array_push($tableauPair, $tableauPairTemp[3]);\n array_push($tableauPair, $tableauPairTemp[2]);\n array_push($tableauPair, $tableauPairTemp[1]);\n\n //compte le nombre de joueurs dont le numéro de classement est\n //un chiffre impair\n for ($i = 0; $i < $longueur; $i++) {\n $impair = [];\n array_push($impair, $joueursImpair[$i], end($joueursImpair));\n unset($joueursImpair[array_key_last($joueursImpair)]);\n unset($joueursImpair[$i]);\n array_push($tableauImpairTemp, $impair);\n unset($impair);\n }\n\n array_push($tableauImpair, $tableauImpairTemp[0]);\n array_push($tableauImpair, $tableauImpairTemp[3]);\n array_push($tableauImpair, $tableauImpairTemp[2]);\n array_push($tableauImpair, $tableauImpairTemp[1]);\n } else {\n $longueur = count($joueursImpair) / 2;\n //compte le nombre de joueurs dont le numéro de classement est\n //un chiffre pair\n for ($i = 0; $i < $longueur; $i++) {\n $pair = [];\n array_push($pair, $joueursPair[$i], end($joueursPair));\n unset($joueursPair[$i], $joueursPair[array_key_last($joueursPair)]);\n array_push($tableauPairTemp, $pair);\n unset($pair);\n }\n\n array_push($tableauPair, $tableauPairTemp[0]);\n array_push($tableauPair, $tableauPairTemp[7]);\n array_push($tableauPair, $tableauPairTemp[4]);\n array_push($tableauPair, $tableauPairTemp[3]);\n array_push($tableauPair, $tableauPairTemp[5]);\n array_push($tableauPair, $tableauPairTemp[2]);\n array_push($tableauPair, $tableauPairTemp[6]);\n array_push($tableauPair, $tableauPairTemp[1]);\n\n //compte le nombre de joueurs dont le numéro de classement est\n //un chiffre impair\n for ($i = 0; $i < $longueur; $i++) {\n $impair = [];\n array_push($impair, $joueursImpair[$i], end($joueursImpair));\n unset($joueursImpair[$i], $joueursImpair[array_key_last($joueursImpair)]);\n array_push($tableauImpairTemp, $impair);\n unset($impair);\n }\n\n array_push($tableauImpair, $tableauImpairTemp[0]);\n array_push($tableauImpair, $tableauImpairTemp[7]);\n array_push($tableauImpair, $tableauImpairTemp[4]);\n array_push($tableauImpair, $tableauImpairTemp[3]);\n array_push($tableauImpair, $tableauImpairTemp[5]);\n array_push($tableauImpair, $tableauImpairTemp[2]);\n array_push($tableauImpair, $tableauImpairTemp[6]);\n array_push($tableauImpair, $tableauImpairTemp[1]);\n }\n $_SESSION['tableauPair'] = $tableauPair;\n $_SESSION['tableauImpair'] = $tableauImpair;\n}", "title": "" }, { "docid": "061ad5ec7d1db31cba0615d5275ed80d", "score": "0.41737056", "text": "static public function compare(IslandoraImageDatastream $u, IslandoraImageDatastream $v,\n\t\t\t\t $compare_bin_path = '/usr/bin/env compare',\n\t\t\t\t $params = array()) {\n\n $u->load();\n $v->load();\n // Construct the parameters\n $params = array_merge(array('-verbose',\n\t\t\t\t'-metric mae'),\n\t\t\t $params,\n\t\t\t array($u->file_path,\n\t\t\t\t$v->file_path));\n\n $invocation = implode(' ', array_merge(array($compare_bin_path), $params));\n $output = array();\n $result = 1;\n\n print escapeshellcmd($invocation);\n exit(1);\n exec(escapeshellcmd($invocation), $output, $result);\n $u->serialize();\n $v->serialize();\n\n return $output;\n }", "title": "" }, { "docid": "e13b09df2a231167854b960a532b51c5", "score": "0.41613686", "text": "function browserRecon($rawHeaders, $mode='besthit', $database='') {\n $globalFingerprint = identifyGlobalFingerprint($database, $rawHeaders);\n $possibilities = countHitPossibilities($rawHeaders);\n $matchStatistics = generateMatchStatistics($globalFingerprint);\n\n return announceFingerprintMatches($matchStatistics, $mode, $possibilities);\n}", "title": "" }, { "docid": "d5a0015691e24fae3010d53827009c82", "score": "0.4158888", "text": "public function analyze($content);", "title": "" }, { "docid": "7f8b086b023b3d3e8751d2193625ecd9", "score": "0.41575375", "text": "public function similarity(&$A, &$B)\n {\n\n\n $a = array_fill_keys($A,1);\n $b = array_fill_keys($B,1);\n\n $intersect = count(array_intersect_key($a,$b));\n $a_count = count($a);\n $b_count = count($b);\n\n return (2*$intersect)/($a_count + $b_count);\n }", "title": "" }, { "docid": "cb483053cd03a82df5f5a308318fd6a8", "score": "0.41371837", "text": "function image_dupe_check($state, $county)\n\t{\n\n\t\t### Config\n\t $path = '/mugs/'.$state.'/'.$county.'/'; # Folder to search for duplicates\n\n\t\t### Misc vars\n\t $time = microtime(true);\n\t $files = $dupes = 0;\n\n\t\t### Dir Iteration\n\t $dh = new RecursiveDirectoryIterator($path);\n\t\t$objects1 = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST);\n\t\t$objects2 = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST);\n\n\n\t\tforeach($objects1 as $image1 => $object)\n\t\t{\n\t\t\t$check = preg_match('/\\.png/Uis', $image1, $match);\n\t\t\tif ($check)\n\t\t\t{\n\t\t\t\t//echo '<hr>TOP IMAGE: ' . $image1 . \"<hr>\";\n\t\t\t\tforeach($objects2 as $image2 => $object)\n\t\t\t\t{\n\t\t\t\t\t$check = preg_match('/\\.png/Uis', $image2, $match);\n\t\t\t\t\tif ($check)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (filesize($image2) > 4096)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ( (filesize($image1) == filesize($image2)) && ($image1 != $image2) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\techo '<hr/>';\n\t\t\t\t\t\t\t\t$offender_image1 = preg_replace('/.*\\//', '', $image1);\n\t\t\t\t\t\t\t\t$offender_image2 = preg_replace('/.*\\//', '', $image2);\n\t\t\t\t\t\t\t\techo $offender_image1 . '<br/>';\n\t\t\t\t\t\t\t\techo $offender_image2 . '<br/><hr/>';\n\t\t\t\t\t\t\t\t@unlink($image1);\n\t\t\t\t\t\t\t\t@unlink($image2);\n\t\t\t\t\t\t\t\t$offender1 = Mango::factory('offender', array('image' => $offender_image1))->load();\n\t\t\t\t\t\t\t\t$offender1->delete();\n\t\t\t\t\t\t\t\t$offender2 = Mango::factory('offender', array('image' => $offender_image2))->load();\n\t\t\t\t\t\t\t\t$offender2->delete();\n\t\t\t\t\t\t\t\t//echo 'img1: ' . $image1 . '<br/>img2: ' . $image2 . '<br/>';\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\texit;\n\t}", "title": "" }, { "docid": "065144a6c8bea19fc5f92278fb52ffb6", "score": "0.41347572", "text": "private function ComputeFrequencies() {\n\n\t\tfor($i = 0; $i < $this->inputLength; $i++) {\n\n\t\t\tif(!isset($this->frequencies[$this->input[$i]])) {\n\n\t\t\t\t$this->frequencies[$this->input[$i]] = 1;\n\n\t\t\t} else {\n\n\t\t\t\t$this->frequencies[$this->input[$i]] += 1;\n\n\t\t\t}\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "6b01ec09782507761301d085c60a32a0", "score": "0.41335517", "text": "function mmrpg_prototype_sort_player_robots($info1, $info2){\n $info1_robot_level = $info1['robot_level'];\n $info2_robot_level = $info2['robot_level'];\n $info1_robot_favourite = isset($info1['values']['flag_favourite']) ? $info1['values']['flag_favourite'] : 0;\n $info2_robot_favourite = isset($info2['values']['flag_favourite']) ? $info2['values']['flag_favourite'] : 0;\n if ($info1_robot_favourite < $info2_robot_favourite){ return 1; }\n elseif ($info1_robot_favourite > $info2_robot_favourite){ return -1; }\n elseif ($info1_robot_level < $info2_robot_level){ return 1; }\n elseif ($info1_robot_level > $info2_robot_level){ return -1; }\n else { return 0; }\n}", "title": "" }, { "docid": "bbdca11d4b7875241a92fb4bbd99e3d0", "score": "0.4121915", "text": "abstract public function recognizeData();", "title": "" }, { "docid": "e01f82f2dcbbbe6a7f6683f0d44ee3bc", "score": "0.41143757", "text": "function test()\n{ \n //TODO: this does not test referrers and visitors, which can span across pages\n global $base_url;\n \n $tests = array();\n\n $tests['pageview']['observed'] = file_get_contents($base_url . '/recorder.php?return=text&domain=test.com&page=/test.html&genome=main=Elements,mygene=C,myothergene=__original__&pageview_xid=0&load_time=7&init_time=7&results_time=14&idle_time=86&vary_time=17&vary_call=elements');\n //TODO: this will fail first visit because visitor info hasn't been recorded ever\n $tests['pageview']['expected'] = '\npage: 1 rows inserted\ngenome: 1 rows inserted\npageview: 1 rows inserted\ngene: 3 rows inserted\nvariant: 3 rows inserted\ngenome_variant_link: 3 rows inserted'; \n\n $tests['goal']['observed'] = file_get_contents($base_url . '/recorder.php?goal=test&value=100&pageview_xid=0&return=text');\n $tests['goal']['expected'] = 'goal: 1 rows inserted\nresult: 3 rows inserted';\n\n $tests['results']['observed'] = file_get_contents($base_url . '/reader.php?callback=genetify.handleResults&domain=test.com&page=/test.html');\n $tests['results']['expected'] = 'genetify.handleResults({\"main\":{\"Elements\":{\"count\":1,\"sum\":100,\"avg\":100,\"stddev\":0,\"share\":1,\"weight\":1}},\"mygene\":{\"C\":{\"count\":1,\"sum\":100,\"avg\":100,\"stddev\":0,\"share\":1,\"weight\":1}},\"myothergene\":{\"__original__\":{\"count\":1,\"sum\":100,\"avg\":100,\"stddev\":0,\"share\":1,\"weight\":1}}})';\n\n $tests['delete']['observed'] = file_get_contents($base_url . '/delete.php?domain=test.com&page=/test.html&delete=true&return=text');\n $tests['delete']['expected'] = '1 deleted';\n \n $test_result = 'PASSED';\n foreach ($tests as $key => $value) {\n if (trim($value['observed']) != trim($value['expected'])) {\n $test_result = 'FAILED';\n header('Content-type: text/plain');\n print_r($value);\n break;\n }\n }\n return $test_result;\n}", "title": "" }, { "docid": "794cb9d691b4e25cdfa11b1866eee5df", "score": "0.41096827", "text": "function recognize_faces_multiple($filename, $namespace) {\n $image_raw = file_get_contents($filename);\n $image_encoded = base64_encode($image_raw);\n $params = array(\"base64_data\" => $image_encoded,\"original_filename\" => $filename);\n $result = $this->api_call('UploadNewImage_File', $params);\n if(!$result)\n {\n $this->logger(\"API call to upload image failed!\");\n return false;\n } \n\n $img_uid = $result['img_uid'];\n $result = $this->api_call('GetImageInfo', array('image_uid' => $img_uid));\n while(!$result['ready'])\n {\n sleep($this->poll_interval);\n $result = $this->api_call('GetImageInfo', array('image_uid' => $img_uid));\n }\n\n\n // return list of face UIDs\n $results = array();\n $uids = $result['face_uid'];\n foreach ($uids as $uid) {\n // Step 3: Start a face recognition job\n $params = array('face_uid' => $uid, 'namespace' => 'all@'.$namespace); \n $result = $this->api_call('Faces_Recognize', $params);\n \n // Step 4: Wait for the recognition job to finish\n $params = array('recognize_job_id' => $result['recognize_job_id']);\n $result = $this->api_call('GetRecognizeResult', $params); \n while(!$result['ready'])\n {\n sleep($this->poll_interval);\n $result = $this->api_call('GetRecognizeResult', $params);\n } \n\n\n $results[$uid]['matches'] = $result['matches']; \n }\n return $results;\n }", "title": "" }, { "docid": "e78621f9b857ac4232909823420dc25a", "score": "0.41069672", "text": "function _common_sort_srcset($a, $b) {\n\t\t$a1 = \\explode(' ', v_sanitize::whitespace($a));\n\t\t$b1 = \\explode(' ', v_sanitize::whitespace($b));\n\n\t\t// Can't compute, leave it alone.\n\t\tif ((\\count($a1) !== 2) || (\\count($b1) !== 2)) {\n\t\t\treturn 0;\n\t\t}\n\n\t\t$a2 = \\round(\\preg_replace('/[^\\d\\.]/', '', $a1[1]));\n\t\t$b2 = \\round(\\preg_replace('/[^\\d\\.]/', '', $b1[1]));\n\n\t\tif ($a2 === $b2) {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn $a2 < $b2 ? -1 : 1;\n\t}", "title": "" }, { "docid": "197672461011cd3367c5473ddd50d607", "score": "0.41065794", "text": "function fast_analyse_histogram($filename, $option= \"all\",$measure_nb=\"0\")\n{\n global $correspondances;\n $xml=new music_xml_class($filename);\n $output=array_fill(0,12,0);\n $duree_totale=0;\n if($option == \"measure\" )\n {\n $measure_nb =$measure_nb-1;\n foreach($xml->parts as $part)\n {\n $measure=$part->measures[$measure_nb];\n foreach($measure->notes as $note)\n {\n $note_info=$note->note_info;\n $value=$note->duration;\n\n\t\t\t\tif(!empty($note_info->step) )\n\t\t\t\t{\n\t\t\t\t $output[modulo_spe($correspondances[$note_info->step]+\n\t\t\t\t\t\t\t$note_info->alter,12)]+=$value;\n \t\t\t\t$duree_totale+=$value;\n\t\t\t\t}\n }\n } \n }\n else\n {\n foreach($xml->parts as $part)\n {\n foreach($part->measures as $measure)\n {\n foreach($measure->notes as $note)\n {\n $note_info=$note->note_info;\n $value=$note->duration;\n\n\t\t\t\t if(!empty($note_info->step) )\n\t\t\t\t {\n\t\t\t\t $output[modulo_spe($correspondances[$note_info->step]+\n\t\t\t\t\t\t\t $note_info->alter,12)]+=$value;\n \t\t\t\t$duree_totale+=$value;\n\t\t\t\t }\n }\n }\n } \n }\n \n $output=renormalize_without_silence($output);\n return $output;\n}", "title": "" }, { "docid": "1985cd3bf37ce31e983606c44ace0006", "score": "0.41038468", "text": "function merge_records ($records, $check = false)\n{\n\tglobal $parents;\n\t\n\t$clusters = array();\n\t\n\t// If we have more than one reference with the same hash, compare and cluster\n\t$n = count($records);\n\n\tif ($n > 1)\n\t{\n\t\n\t\tfor ($i = 0; $i < $n; $i++)\n\t\t{\n\t\t\tmakeset($i);\n\t\t}\n\t\t\n\t\t$pairwise = ($n < 10);\n\n\t\tif (!$pairwise)\n\t\t{\n\t\t\t// compare just with first one, to avoid explosion\n\t\t\t$i = 0;\n\t\t\t\n\t\t\tfor ($j = 1; $j < $n; $j++)\n\t\t\t{\n\t\t\t\t// use string matching to check match\n\t\t\t\tif ($check)\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t// Wikispecies-specific\n\t\t\t\t\t$v1 = $records[$i]->value[1];\n\t\t\t\t\t$v2 = $records[$j]->value[1];\n\t\t\t\t\t\n\t\t\t\t\t// trim so we don't get an out of memory error on long strings\n\t\t\t\t\t$v1 = substr($v1, 0, 100);\n\t\t\t\t\t$v2 = substr($v2, 0, 100);\n\t\t\n\t\t\t\t\t$v1 = finger_print($v1);\n\t\t\t\t\t$v2 = finger_print($v2);\n\t\t\t\t\n\t\t\t\t\tif (0)\n\t\t\t\t\t{\n\t\t\t\t\t\techo $v1 . \"\\n\";\n\t\t\t\t\t\techo $v2 . \"\\n\";\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\t$lcs = new LongestCommonSequence($v1, $v2);\n\t\t\t\t\t$d = $lcs->score();\n\t\t\n\t\t\t\t\t$score = min($d / strlen($v1), $d / strlen($v2));\n\t\t\n\t\t\t\t\tif ($score > 0.80)\n\t\t\t\t\t{\n\t\t\t\t\t\tunion($j, $i);\n\t\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\t// Just merge (e.g., if set of records is based on sharing an identifier)\n\t\t\t\t\tunion($j, $i);\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Pairwise comparison, explodes if n is too large\n\t\t\tfor ($i = 1; $i < $n; $i++)\n\t\t\t{\n\t\t\t\tfor ($j = 0; $j < $i; $j++)\n\t\t\t\t{\n\t\t\t\t\t// use string matching to check match\n\t\t\t\t\tif ($check)\n\t\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t\t// Wikispecies-specific\n\t\t\t\t\t\t$v1 = $records[$i]->value[1];\n\t\t\t\t\t\t$v2 = $records[$j]->value[1];\n\t\t\t\n\t\t\t\t\t\t$v1 = finger_print($v1);\n\t\t\t\t\t\t$v2 = finger_print($v2);\n\t\t\t\t\t\n\t\t\t\t\t\tif (0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo $v1 . \"\\n\";\n\t\t\t\t\t\t\techo $v2 . \"\\n\";\n\t\t\t\t\t\t}\n\t\t\t\n\t\t\t\t\t\t$lcs = new LongestCommonSequence($v1, $v2);\n\t\t\t\t\t\t$d = $lcs->score();\n\t\t\t\n\t\t\t\t\t\t$score = min($d / strlen($v1), $d / strlen($v2));\n\t\t\t\n\t\t\t\t\t\tif ($score > 0.80)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tunion($i, $j);\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// Just merge (e.g., if set of records is based on sharing an identifier)\n\t\t\t\t\t\tunion($i, $j);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (0)\n\t\t{\n\t\t\tfor ($i = 0; $i < $n; $i++)\n\t\t\t{\n\t\t\t\techo $i . '->' . $parents[$i] . \"\\n\";\n\t\t\t}\t\t\n\t\t}\t\t\n\t\t\t\n\t\t// Get list of components of graph, which are the sets rooted on each parent node\n\t\t$blocks = array();\n\t\n\t\tfor ($i = 0; $i < $n; $i++)\n\t\t{\n\t\t\t$p = $parents[$i];\n\t\t\n\t\t\tif (!isset($blocks[$p]))\n\t\t\t{\n\t\t\t\t$blocks[$p] = array();\n\t\t\t}\n\t\t\t$blocks[$p][] = $i;\n\t\t}\n\t\t\n\t\tif (0)\n\t\t{\n\t\t\techo \"Blocks\\n\";\n\t\t\tprint_r($blocks);\n\t\t}\n\t\n\t\t// merge things \n\t\tforeach ($blocks as $k => $block)\n\t\t{\n\t\t\tif (count($block) > 1)\n\t\t\t{\n\t\t\t\t$clusters[$k] = array();\n\t\t\t\t\n\t\t\t\tforeach ($block as $i)\n\t\t\t\t{\n\t\t\t\t\t// wikispecies\n\t\t\t\t\t$member = new stdclass;\n\t\t\t\t\t$member->id = $records[$block[$i]]->id;\n\t\t\t\t\t$member->index = $records[$block[$i]]->value[0];\n\t\t\t\t\t$clusters[$k][] = $member;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t}\n\t\n\treturn $clusters;\n\t\n}", "title": "" }, { "docid": "37c3130b6f7ba7f0fa8479f907381332", "score": "0.41016582", "text": "public function calculate() {\n $str1 = $this->getFirst();\n $str2 = $this->getSecond();\n $i = 0;\n $count = 0;\n while (isset($str1[$i]) != '')\n {\n if ($str1[$i] != $str2[$i])\n $count++;\n $i++;\n }\n return $count;\n }", "title": "" }, { "docid": "e9cd3b6b16ec98e38fcbe98287ec9cad", "score": "0.41004196", "text": "public function hitungDPlusMin($mat1, $mat2){\n \t$bar1=count($mat1);\n \t$kol1=(count($mat1,1)/count($mat1,0))-1;\n $bar2=count($mat2);\n// \t$kol2=(count($mat2,1)/count($mat2,0))-1;\n\t$mDplus = array();\n\t//$v = array();\n\tfor($i=0;$i<$bar1;$i++){\n\t\t$mDplus[$i] = array();\n\t $vTB=TopsisOrisinil::ambilBaris($mat1,$i); \n\t\tfor($j=0;$j<$bar2;$j++){\n\t\t\t$vA=TopsisOrisinil::ambilBaris($mat2,$j);\n\t\t\tif($i==0) {\n\t\t\t\t$vkurang=TopsisOrisinil::kurang2Vektor($vA, $vTB);//salah di function kurang2Vektor\n\t\t\t\t$vk2=TopsisOrisinil::kuadratVektor($vkurang);//salah di function kuadratVektor\n\t\t\t\t$vjlh=TopsisOrisinil::jlhVektor($vk2);//salah di function jlhVektor\n\t\t\t\t$mDplus[$i][$j]=sqrt($vjlh);\n\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t$vkurang=TopsisOrisinil::kurang2Vektor($vA, $vTB);\t\n\t\t\t\t\t$vk2=TopsisOrisinil::kuadratVektor($vkurang);\n\t\t\t\t\t$vjlh=TopsisOrisinil::jlhVektor($vk2);\n\t\t\t\t\t$mDplus[$i][$j]=sqrt($vjlh);\t\n\t\t\t\t\t}\n\t\t}\t\n\t}\n\t\n \treturn $mDplus;\n \t}", "title": "" }, { "docid": "f795588a416aa9b96cae10b9bef78e30", "score": "0.4099976", "text": "function compare( $propuesta1, $propuesta2, $p = NULL, $umbral = NULL ){\n $mayores = array();\n\n foreach ($propuesta1 as $item => $tags) {\n $mayor = (count( $propuesta1[$item] ) > count( $propuesta2[$item] )) ? count( $propuesta1[$item] ) : count( $propuesta2[$item] );\n $mayores[$item] = $mayor;\n }\n\n $pesoTotal = 0;\n foreach ($propuesta1 as $item => $tags) {\n #echo \"peso = \".$pesos[$item].\" * \".getHits($propuesta1[$item],$propuesta2[$item],$p,$umbral).\" / \". $mayores[$item].\"\\n\\n\";\n $pesoTotal += $this->default[\"pesos\"][$item] * ( $this->getHits($propuesta1[$item],$propuesta2[$item],$p,$umbral) / $mayores[$item] );\n }\n return $pesoTotal * 100;\n }", "title": "" }, { "docid": "08a6da994d198ad1a243e21908f41844", "score": "0.40958792", "text": "function extractInteractionsFromXML($result, $medications){\n\tglobal $allConceptNames;\n\terror_log(\"result of interaction query is: \" + $result);\n\t$xml = simplexml_load_string($result);\n\t//Get all interactionPair nodes\n\t//$query=\"//interactionTriple/groupConcepts/concept/conceptKind[.='DRUG_INTERACTION_KIND']\";\n\t$query=\".//interactionPair\";\n\terror_log(\"Getting interactionPairNodes\");\n\t$interactionPairNodes = $xml->xpath($query);\n\t$numberOfInteractions = count($interactionPairNodes);\n\terror_log(\"Number of interactions = \".$numberOfInteractions);\n\terror_log(\"First interactionPair node: \".$interactionPairNodes[0]);\n\n\t//Get all brand names\n\t$query=\".//minConcept/name\";\n\t$allConceptNames = $xml->xpath($query);\n\tfor ($i=0; $i<count($allConceptNames); $i++) {\n\t\t$allBrandNames[$i] = (string)$allConceptNames[$i];\n\t\terror_log(\"allBrandNames[\".$i.\"] is \".$allBrandNames[$i]);\n\t}\n\n\t//Get all generic names\n\t$query=\".//minConceptItem/name\";\n\t$allConceptItemNames = $xml->xpath($query);\n\tfor ($i=0; $i<count($allConceptItemNames); $i++) {\n\t\t$allConceptNames[$i] = (string)$allConceptItemNames[$i];\n\t\terror_log(\"allConceptNames[\".$i.\"] is \".$allConceptNames[$i]);\n\t}\n\t//Get all medication rxcuids\n\t$query=\".//minConceptItem/rxcui\";\n\t$allConceptItemRxcuids = $xml->xpath($query);\n\tfor ($i=0; $i<count($allConceptItemRxcuids); $i++) {\n\t\t$allConceptRxCuids[$i] = (string)$allConceptItemRxcuids[$i];\n\t}\n\n //Get severity array\n\t$query=\"//interactionPair/severity\";\n\t$severities = $xml->xpath($query);\n\terror_log(\"severities length = \".count($severities));\n foreach($severities as $severity) {\n \terror_log(\"In extractInteractionsFromXML, severity is: \".$severity);\n }\n //Get description array\n $query=\"//interactionPair/description\";\n $descriptions = $xml->xpath($query);\n $interactionArray = array();\n //Make array of interactions\n $j=0;\n $i = 0;\n //Is number of interactions correct? There appear to be 2 interactions, with severity only in the second\n $validInteractionCounter = 0;\n do {\n \t$interaction = new Interaction();\n \t$k = 2*$i;\n \t$interaction->drug1 = $allConceptNames[$k];\n\t\t$interaction->nui1 = $allConceptRxCuids[$k];\n \t$interaction->drug2 = $allConceptNames[$k+1];\n \t\t$interaction->nui2 = $allConceptRxCuids[$k+1];\n \t$interaction->interactionNui = $allConceptRxCuids[$j+4];\n \t$interaction->severity = $severities[$i];\n \t$interaction->descriptionText = $descriptions[$i];\n\t\t$drug1 = truncateToFirstBlank($interaction->drug1);\n \t$interaction->originalDrugName1 = $allBrandNames[$k];\n\t\t//We should be able to get the original drug name here!!\n\t\t//if ($interaction->originalDrugName1 == null) $interaction->originalDrugName1 = $interaction->drug1;\n\t\t$drug2 = truncateToFirstBlank($interaction->drug2);\n \t$interaction->originalDrugName2 = $allBrandNames[$k+1];\n\t\t//if ($interaction->originalDrugName2 == null) $interaction->originalDrugName2 = $interaction->drug2;\n \t$interactionArray[$validInteractionCounter] = $interaction;\n \terror_log(\"Value of validInteractionCounter in interaction loop is \".$validInteractionCounter);\n \t$validInteractionCounter++;\n \t$i++;\n \t$j+=5;\n } while ($i<$numberOfInteractions);\n\n error_log(\"validInteractionCounter = \".$validInteractionCounter);\n for ($i=0; $i<$validInteractionCounter; $i++) {\n \terror_log(\"\");\n \terror_log(\"interactionArray[$i]->drug1 = \".$interactionArray[$i]->drug1);\n \terror_log(\"interactionArray[$i]->drug2 = \".$interactionArray[$i]->drug2);\n \terror_log(\"interactionArray[$i]->nui1 = \".$interactionArray[$i]->nui1);\n \terror_log(\"interactionArray[$i]->nui2 = \".$interactionArray[$i]->nui2);\n \terror_log(\"interactionArray[$i]->interactionNui = \".$interactionArray[$i]->interactionNui);\n \terror_log(\"interactionArray[$i]->severity = \".$interactionArray[$i]->severity);\n \terror_log(\"interactionArray[$i]->descriptionText = \".$interactionArray[$i]->descriptionText);\n \terror_log(\"interactionArray[$i]->originalDrugName1 = \".$interactionArray[$i]->originalDrugName1);\n \terror_log(\"interactionArray[$i]->originalDrugName2 = \".$interactionArray[$i]->originalDrugName2);\n\t}\n return $interactionArray;\n}", "title": "" }, { "docid": "c666cdebd9d874d22e71cbc139e7af8f", "score": "0.40936202", "text": "public function fetch_dataset(){\n\t\t\t$check_ifclick = isset($_POST[\"analyze\"]);\n\t\t\t$count = $this->input->post('dataset_amount');\n\t\t\t$main_path1;\n\t\t\t$main_path2;\n\n\t\t\tswitch($count){\n\t\t\t\tcase 10 :\n\t\t\t\t\t$main_path1 = $_SERVER['DOCUMENT_ROOT'].'/phising_detector/phising_detector_public/assets/training/10_sample/phishing/';\n\t\t\t\t\t$main_path2 = $_SERVER['DOCUMENT_ROOT'].'/phising_detector/phising_detector_public/assets/training/10_sample/legitimate/';\n\t\t\t\tbreak;\n\t\t\t\tcase 100 :\n\t\t\t\t\t$main_path1 = $_SERVER['DOCUMENT_ROOT'].'/phising_detector/phising_detector_public/assets/training/100_sample/phishing/';\n\t\t\t\t\t$main_path2 = $_SERVER['DOCUMENT_ROOT'].'/phising_detector/phising_detector_public/assets/training/100_sample/legitimate/';\n\t\t\t\tbreak;\n\t\t\t\tcase 250 : \n\t\t\t\t\t$main_path1 = $_SERVER['DOCUMENT_ROOT'].'/phising_detector/phising_detector_public/assets/training/250_sample/phishing/';\n\t\t\t\t\t$main_path2 = $_SERVER['DOCUMENT_ROOT'].'/phising_detector/phising_detector_public/assets/training/250_sample/legitimate/';\n\t\t\t\tbreak;\n\t\t\t\tcase 500 : \n\t\t\t\t\t$main_path1 = $_SERVER['DOCUMENT_ROOT'].'/phising_detector/phising_detector_public/assets/training/500_sample/phishing/';\n\t\t\t\t\t$main_path2 = $_SERVER['DOCUMENT_ROOT'].'/phising_detector/phising_detector_public/assets/training/500_sample/legitimate/';\n\t\t\t\tbreak;\n\t\t\t}\n;\t\t\tif($check_ifclick){\n\t\t\t\t$files_process = scandir($main_path1); // scan direktori\n $files = array_diff($files_process, array('.', '..')); // remove current dan prev direktori yang terhitung\n \n $files_process2 = scandir($main_path2);\n $files6 = array_diff($files_process2, array('.', '..')); // remove current dan prev direktori yang terhitung\n\n $i = 0;\n $j = 0;\n $concater; \n $concater2;\n\n $pref1 = 'P0';\n $pref2 = 'L0';\n\n\t\t\t\t$data;\n $data2;\n\n $data3;\n $data4;\n \n\t\t\t\t$pack_data_task = [];\n\t\t\t\t$check_task = false;\n \n $result_task_id; // for all traiing data global for the same task\n\n\t\t\t\t/* insert task terlebih dahulu */\n\t\t\t\t$pack_data_task = array(\n\t\t\t\t\t'task_desc' => 'task_'.date(\"Y-m-d H:i:s\"),\n\t\t\t\t\t'date_created' => date(\"Y-m-d H:i:s\"),\n\t\t\t\t\t'date_updated' => date(\"Y-m-d H:i:s\"),\n\t\t\t\t\t'date_deleted' => date(\"Y-m-d H:i:s\"),\n\t\t\t\t\t'task_scanned' => $count\n\t\t\t\t);\n\n\t\t\t\t/* check apakah hasil insert berhasil */\n\t\t\t\t$sql_task = $this->Mphtask->save($pack_data_task);\n\t\t\t\tif(!$sql_task){\n\t\t\t\t\techo 'gagal ke db';\n\t\t\t\t}else{\n\t\t\t\t\t$check_task = true;\n\t\t\t\t}\n\n\t\t\t\tif($check_task){\n\t\t\t\t\t$query_task = \"SELECT * FROM ph_task ORDER BY task_id DESC LIMIT 1\";\n\t\t\t\t\t$get_last_task = $this->db->query($query_task);\n\t\t\t\t\t$result_task_id = $get_last_task->result_array();\n\t\t\t\t}\n\n\n\t\t\t\tif($count == 500){\n\t\t\t\t\tforeach($files as $file) {\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t\tif($i < 10){\n\t\t\t\t\t\t\t$concater = '';\n\t\t\t\t\t\t}else if($i < 100){\n\t\t\t\t\t\t\t$concater = '';\n\t\t\t\t\t\t}else if($i < 1000){\n\t\t\t\t\t\t\t$concater = '';\n\t\t\t\t\t\t}else if($i <= 1000){\n\t\t\t\t\t\t\t$concater = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$files2 = scandir($main_path1.$pref1.$concater.$i);\n\t\t\t\t\t\tforeach($files2 as $file2){\n\t\t\t\t\t\t\tif($i <= $count){\n\t\t\t\t\t\t\t\t$files3 = scandir($main_path1.$pref1.$concater.$i.'/URL');\n\t\t\t\t\t\t\t\tforeach($files3 as $file3){\n\t\t\t\t\t\t\t\t\t$files4 = fopen($main_path1.$pref1.$concater.$i.'/URL/URL.txt', 'r');\n\t\t\t\t\t\t\t\t\t$data = fread($files4,filesize($main_path1.$pref1.$concater.$i.'/URL/URL.txt'));\n\t\t\t\t\t\t\t\t\t$files5 = scandir($main_path1.$pref1.$concater.$i.'/RAW-HTML');\n\t\t\t\t\t\t\t\t\tforeach($files5 as $file5){\n\t\t\t\t\t\t\t\t\t\t$data2 = $file5;\n\t\t\t\t\t\t\t\t\t\tif($file5){\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\techo ''.$pref1.$main_path1.$concater.$i.$data2.'<br/>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// echo ''.$pref1.$main_path1.$concater.$i.$data2.'<br/>';\n\t\t\t\t\t\t\t// echo ''.$main_path1.$pref1.$concater.$i.'/'.$file5;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t$scan_data = array(\n\t\t\t\t\t\t\t\"task_id\" => $result_task_id[0]['task_id'],\n\t\t\t\t\t\t\t\"dataset_id\" => $pref1.$concater.$i,\n\t\t\t\t\t\t\t\"dataset_url\" => $data,\n\t\t\t\t\t\t\t\"dataset_html_file\"=> $data2,\n\t\t\t\t\t\t\t\"scan_type\" => 1\n\t\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t\t$sql = $this->db->insert('ph_scan_phishing', $scan_data);\n\n\n\t\t\t\t\t\tif($this->db->affected_rows() > 0){\n\t\t\t\t\t\t\t$sign_sc_id = $this->db->insert_id();\n\t\t\t\t\t\t\t$file_path = $main_path1.$pref1.$concater.$i.'/RAW-HTML/'.$data2;\n\t\t\t\t\t\t\t$feature_data = array(\n\t\t\t\t\t\t\t\t\"sc_phishing_id\" => $sign_sc_id,\n\t\t\t\t\t\t\t\t\"url_link\"=> \"\".$data,\n\t\t\t\t\t\t\t\t\"url_protocol\" => \"\".$this->read_url_protocol($data),\n\t\t\t\t\t\t\t\t\"url_favicon\" => \"\".$this->read_html_favicon($file_path),\n\t\t\t\t\t\t\t\t\"url_standard_port\" => \"\".$this->read_url_port($data),\n\t\t\t\t\t\t\t\t\"url_symbol\" => \"\".$this->read_url_symbol($data),\n\t\t\t\t\t\t\t\t\"url_subdomain\"=> \"\".$this->read_url_subdomain($data),\n\t\t\t\t\t\t\t\t\"url_length\" => \"\".$this->read_url_length($data),\n\t\t\t\t\t\t\t\t\"url_dot_total\" => \"\".$this->read_url_dot_total($data),\n\t\t\t\t\t\t\t\t\"url_sensitive_char\" => \"\".$this->read_special_char($data),\n\t\t\t\t\t\t\t\t\"html_login\" => \"\".$this->read_html_login($file_path),\n\t\t\t\t\t\t\t\t\"html_empty_link\" => \"\".$this->read_html_empty_link($file_path),\n\t\t\t\t\t\t\t\t\"html_length\" => \"\".$this->read_html_filesize($file_path),\n\t\t\t\t\t\t\t\t\"html_is_consist\" => \"\".$this->read_consistency($file_path, $data),\n\t\t\t\t\t\t\t\t\"html_js_list\" => \"\".$this->read_html_enabled_js($file_path),\n\t\t\t\t\t\t\t\t\"html_link_external_list\" => \"\".$this->read_html_external_link($file_path),\n\t\t\t\t\t\t\t\t\"html_redirect\" => \"\".$this->read_html_redirect($file_path),\n\t\t\t\t\t\t\t\t\"html_iframe\" => \"\".$this->read_html_iframe($file_path),\n\t\t\t\t\t\t\t\t\"html_favicon\" => \"\".$this->read_html_favicon($file_path),\n\t\t\t\t\t\t\t\t\"feature_type\" => \"0\" // ini bukan fitur ini flag \n\n\t\t\t\t\t\t\t);\t\n\t\t\t\t\t\t\t$this->db->insert('ph_features_phishing', $feature_data);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tforeach($files6 as $file6) {\n\t\t\t\t\t\t$j++;\n\t\t\t\t\t\tif($j < 10){\n\t\t\t\t\t\t\t$concater2 = '';\n\t\t\t\t\t\t}else if($j < 100){\n\t\t\t\t\t\t\t$concater2 = '';\n\t\t\t\t\t\t}else if($j < 1000){\n\t\t\t\t\t\t\t$concater2 = '';\n\t\t\t\t\t\t}else if($j <= 1000){\n\t\t\t\t\t\t\t$concater2 = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$files7 = scandir($main_path2.$pref2.$concater2.$j);\n\t\t\t\t\t\tforeach($files7 as $file7){\n\t\t\t\t\t\t\tif($j <= $count){\n\t\t\t\t\t\t\t\t$files8 = scandir($main_path2.$pref2.$concater2.$j.'/URL');\n\t\t\t\t\t\t\t\tforeach($files8 as $file8){\n\t\t\t\t\t\t\t\t\t$files9 = fopen($main_path2.$pref2.$concater2.$j.'/URL/URL.txt', 'r');\n\t\t\t\t\t\t\t\t\t$data3 = fread($files9,filesize($main_path2.$pref2.$concater2.$j.'/URL/URL.txt'));\n\t\t\t\t\t\t\t\t\t$files10 = scandir($main_path2.$pref2.$concater2.$j.'/RAW-HTML');\n\t\t\t\t\t\t\t\t\tforeach($files10 as $file10){\n\t\t\t\t\t\t\t\t\t\t$data4 = $file10;\n\t\t\t\t\t\t\t\t\t\tif($file10){\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\techo ''.$pref2.$main_path2.$concater2.$j.$data4.'<br/>';\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// echo ''.$pref2.$main_path2.$concater2.$j.$data4.'<br/>';\n\t\t\t\t\t\t\t// echo ''.$main_path2.$pref2.$concater2.$j.'/'.$files10;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$scan_data = array(\n\t\t\t\t\t\t\t\"task_id\" => $result_task_id[0]['task_id'],\n\t\t\t\t\t\t\t\"dataset_id\" => $pref2.$concater2.$j,\n\t\t\t\t\t\t\t\"dataset_url\" => $data3,\n\t\t\t\t\t\t\t\"dataset_html_file\"=> $data4\n\t\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t\t$sql = $this->db->insert('ph_scan_legitimate', $scan_data);\n\n\n\t\t\t\t\t\tif($this->db->affected_rows() > 0){\n\t\t\t\t\t\t\t$sign_sc_id = $this->db->insert_id();\n\t\t\t\t\t\t\t$file_path2 = $main_path2.$pref2.$concater2.$j.'/RAW-HTML/'.$data4;\n\t\t\t\t\t\t\t$feature_data = array(\n\t\t\t\t\t\t\t\t\"sc_legitimate_id\" => $sign_sc_id,\n\t\t\t\t\t\t\t\t\"url_link\"=> \"\".$data3,\n\t\t\t\t\t\t\t\t\"url_protocol\" => \"\".$this->read_url_protocol($data3),\n\t\t\t\t\t\t\t\t\"url_favicon\" => \"\".$this->read_html_favicon($file_path2),\n\t\t\t\t\t\t\t\t\"url_standard_port\" => \"\".$this->read_url_port($data3),\n\t\t\t\t\t\t\t\t\"url_symbol\" => \"\".$this->read_url_symbol($data3),\n\t\t\t\t\t\t\t\t\"url_subdomain\"=> \"\".$this->read_url_subdomain($data3),\n\t\t\t\t\t\t\t\t\"url_length\" => \"\".$this->read_url_length($data3),\n\t\t\t\t\t\t\t\t\"url_dot_total\" => \"\".$this->read_url_dot_total($data3),\n\t\t\t\t\t\t\t\t\"url_sensitive_char\" => \"\".$this->read_special_char($data3),\n\t\t\t\t\t\t\t\t\"url_brandinfo\" => \"\".$this->read_brandinfo($file_path, $data3),\n\t\t\t\t\t\t\t\t\"html_login\" => \"\".$this->read_html_login($file_path2),\n\t\t\t\t\t\t\t\t\"html_empty_link\" => \"\".$this->read_html_empty_link($file_path2),\n\t\t\t\t\t\t\t\t\"html_length\" => \"\".$this->read_html_filesize($file_path2),\n\t\t\t\t\t\t\t\t\"html_is_consist\" => \"\".$this->read_consistency($file_path2, $data3),\n\t\t\t\t\t\t\t\t\"html_js_list\" => \"\".$this->read_html_enabled_js($file_path2),\n\t\t\t\t\t\t\t\t\"html_link_external_list\" => \"\".$this->read_html_external_link($file_path2),\n\t\t\t\t\t\t\t\t\"html_redirect\" => \"\".$this->read_html_redirect($file_path2),\n\t\t\t\t\t\t\t\t\"html_iframe\" => \"\".$this->read_html_iframe($file_path2),\n\t\t\t\t\t\t\t\t\"html_favicon\" => \"\".$this->read_html_favicon($file_path2)\n\n\t\t\t\t\t\t\t);\t\n\t\t\t\t\t\t\t$this->db->insert('ph_features_legitimate', $feature_data);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}else{\n\t\t\t\t\t// loop for phising non 500\n\t\t\t\t\tforeach($files as $file) {\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\tif($i < 10){\n\t\t\t\t\t\t\t\t$concater = '000';\n\t\t\t\t\t\t\t}else if($i < 100){\n\t\t\t\t\t\t\t\t$concater = '00';\n\t\t\t\t\t\t\t}else if($i < 1000){\n\t\t\t\t\t\t\t\t$concater = '0';\n\t\t\t\t\t\t\t}else if($i <= 1000){\n\t\t\t\t\t\t\t\t$concater = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$files2 = scandir($main_path1.$pref1.$concater.$i);\n\t\t\t\t\t\t\tforeach($files2 as $file2){\n\t\t\t\t\t\t\t\tif($i <= $count){\n\t\t\t\t\t\t\t\t\t$files3 = scandir($main_path1.$pref1.$concater.$i.'/URL');\n\t\t\t\t\t\t\t\t\tforeach($files3 as $file3){\n\t\t\t\t\t\t\t\t\t\t$files4 = fopen($main_path1.$pref1.$concater.$i.'/URL/URL.txt', 'r');\n\t\t\t\t\t\t\t\t\t\t$data = fread($files4,filesize($main_path1.$pref1.$concater.$i.'/URL/URL.txt'));\n\t\t\t\t\t\t\t\t\t\t$files5 = scandir($main_path1.$pref1.$concater.$i.'/RAW-HTML');\n\t\t\t\t\t\t\t\t\t\tforeach($files5 as $file5){\n\t\t\t\t\t\t\t\t\t\t\t$data2 = $file5;\n\t\t\t\t\t\t\t\t\t\t\tif($file5){\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// echo ''.$pref1.$main_path1.$concater.$i.$data2.'<br/>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// echo ''.$pref1.$main_path1.$concater.$i.$data2.'<br/>';\n\t\t\t\t\t\t\t\t// echo ''.$main_path1.$pref1.$concater.$i.'/'.$file5;\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$scan_data = array(\n\t\t\t\t\t\t\t\t\"task_id\" => $result_task_id[0]['task_id'],\n\t\t\t\t\t\t\t\t\"dataset_id\" => $pref1.$concater.$i,\n\t\t\t\t\t\t\t\t\"dataset_url\" => $data,\n\t\t\t\t\t\t\t\t\"dataset_html_file\"=> $data2,\n\t\t\t\t\t\t\t\t\"scan_type\" => 1\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$sql = $this->db->insert('ph_scan_phishing', $scan_data);\n\n\n\t\t\t\t\t\t\tif($this->db->affected_rows() > 0){\n\t\t\t\t\t\t\t\t$sign_sc_id = $this->db->insert_id();\n\t\t\t\t\t\t\t\t$file_path = $main_path1.$pref1.$concater.$i.'/RAW-HTML/'.$data2;\n\t\t\t\t\t\t\t\t$feature_data = array(\n\t\t\t\t\t\t\t\t\t\"sc_phishing_id\" => $sign_sc_id,\n\t\t\t\t\t\t\t\t\t\"url_link\"=> \"\".$data,\n\t\t\t\t\t\t\t\t\t\"url_protocol\" => \"\".$this->read_url_protocol($data),\n\t\t\t\t\t\t\t\t\t\"url_favicon\" => \"\".$this->read_html_favicon($file_path),\n\t\t\t\t\t\t\t\t\t\"url_standard_port\" => \"\".$this->read_url_port($data),\n\t\t\t\t\t\t\t\t\t\"url_symbol\" => \"\".$this->read_url_symbol($data),\n\t\t\t\t\t\t\t\t\t\"url_subdomain\"=> \"\".$this->read_url_subdomain($data),\n\t\t\t\t\t\t\t\t\t\"url_length\" => \"\".$this->read_url_length($data),\n\t\t\t\t\t\t\t\t\t\"url_dot_total\" => \"\".$this->read_url_dot_total($data),\n\t\t\t\t\t\t\t\t\t\"url_sensitive_char\" => \"\".$this->read_special_char($data),\n\t\t\t\t\t\t\t\t\t\"html_login\" => \"\".$this->read_html_login($file_path),\n\t\t\t\t\t\t\t\t\t\"html_empty_link\" => \"\".$this->read_html_empty_link($file_path),\n\t\t\t\t\t\t\t\t\t\"html_length\" => \"\".$this->read_html_filesize($file_path),\n\t\t\t\t\t\t\t\t\t\"html_is_consist\" => \"\".$this->read_consistency($file_path, $data),\n\t\t\t\t\t\t\t\t\t\"html_js_list\" => \"\".$this->read_html_enabled_js($file_path),\n\t\t\t\t\t\t\t\t\t\"html_link_external_list\" => \"\".$this->read_html_external_link($file_path),\n\t\t\t\t\t\t\t\t\t\"html_redirect\" => \"\".$this->read_html_redirect($file_path),\n\t\t\t\t\t\t\t\t\t\"html_iframe\" => \"\".$this->read_html_iframe($file_path),\n\t\t\t\t\t\t\t\t\t\"html_favicon\" => \"\".$this->read_html_favicon($file_path),\n\t\t\t\t\t\t\t\t\t\"feature_type\" => \"0\" // ini bukan fitur ini flag \n\n\t\t\t\t\t\t\t\t);\t\n\t\t\t\t\t\t\t\t$this->db->insert('ph_features_phishing', $feature_data);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\tforeach($files6 as $file6) {\n\t\t\t\t\t\t\t$j++;\n\t\t\t\t\t\t\tif($j < 10){\n\t\t\t\t\t\t\t\t$concater2 = '000';\n\t\t\t\t\t\t\t}else if($j < 100){\n\t\t\t\t\t\t\t\t$concater2 = '00';\n\t\t\t\t\t\t\t}else if($j < 1000){\n\t\t\t\t\t\t\t\t$concater2 = '0';\n\t\t\t\t\t\t\t}else if($j <= 1000){\n\t\t\t\t\t\t\t\t$concater2 = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$files7 = scandir($main_path2.$pref2.$concater2.$j);\n\t\t\t\t\t\t\tforeach($files7 as $file7){\n\t\t\t\t\t\t\t\tif($j <= $count){\n\t\t\t\t\t\t\t\t\t$files8 = scandir($main_path2.$pref2.$concater2.$j.'/URL');\n\t\t\t\t\t\t\t\t\tforeach($files8 as $file8){\n\t\t\t\t\t\t\t\t\t\t$files9 = fopen($main_path2.$pref2.$concater2.$j.'/URL/URL.txt', 'r');\n\t\t\t\t\t\t\t\t\t\t$data3 = fread($files9,filesize($main_path2.$pref2.$concater2.$j.'/URL/URL.txt'));\n\t\t\t\t\t\t\t\t\t\t$files10 = scandir($main_path2.$pref2.$concater2.$j.'/RAW-HTML');\n\t\t\t\t\t\t\t\t\t\tforeach($files10 as $file10){\n\t\t\t\t\t\t\t\t\t\t\t$data4 = $file10;\n\t\t\t\t\t\t\t\t\t\t\tif($file10){\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// echo ''.$pref2.$main_path2.$concater2.$j.$data4.'<br/>';\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// echo ''.$pref2.$main_path2.$concater2.$j.$data4.'<br/>';\n\t\t\t\t\t\t\t\t// echo ''.$main_path2.$pref2.$concater2.$j.'/'.$files10;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$scan_data = array(\n\t\t\t\t\t\t\t\t\"task_id\" => $result_task_id[0]['task_id'],\n\t\t\t\t\t\t\t\t\"dataset_id\" => $pref2.$concater2.$j,\n\t\t\t\t\t\t\t\t\"dataset_url\" => $data3,\n\t\t\t\t\t\t\t\t\"dataset_html_file\"=> $data4\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$sql = $this->db->insert('ph_scan_legitimate', $scan_data);\n\n\n\t\t\t\t\t\t\tif($this->db->affected_rows() > 0){\n\t\t\t\t\t\t\t\t$sign_sc_id = $this->db->insert_id();\n\t\t\t\t\t\t\t\t$file_path2 = $main_path2.$pref2.$concater2.$j.'/RAW-HTML/'.$data4;\n\t\t\t\t\t\t\t\t$feature_data = array(\n\t\t\t\t\t\t\t\t\t\"sc_legitimate_id\" => $sign_sc_id,\n\t\t\t\t\t\t\t\t\t\"url_link\"=> \"\".$data3,\n\t\t\t\t\t\t\t\t\t\"url_protocol\" => \"\".$this->read_url_protocol($data3),\n\t\t\t\t\t\t\t\t\t\"url_favicon\" => \"\".$this->read_html_favicon($file_path2),\n\t\t\t\t\t\t\t\t\t\"url_standard_port\" => \"\".$this->read_url_port($data3),\n\t\t\t\t\t\t\t\t\t\"url_symbol\" => \"\".$this->read_url_symbol($data3),\n\t\t\t\t\t\t\t\t\t\"url_subdomain\"=> \"\".$this->read_url_subdomain($data3),\n\t\t\t\t\t\t\t\t\t\"url_length\" => \"\".$this->read_url_length($data3),\n\t\t\t\t\t\t\t\t\t\"url_dot_total\" => \"\".$this->read_url_dot_total($data3),\n\t\t\t\t\t\t\t\t\t\"url_sensitive_char\" => \"\".$this->read_special_char($data3),\n\t\t\t\t\t\t\t\t\t\"url_brandinfo\" => \"\".$this->read_brandinfo($file_path, $data3),\n\t\t\t\t\t\t\t\t\t\"html_login\" => \"\".$this->read_html_login($file_path2),\n\t\t\t\t\t\t\t\t\t\"html_empty_link\" => \"\".$this->read_html_empty_link($file_path2),\n\t\t\t\t\t\t\t\t\t\"html_length\" => \"\".$this->read_html_filesize($file_path2),\n\t\t\t\t\t\t\t\t\t\"html_is_consist\" => \"\".$this->read_consistency($file_path2, $data3),\n\t\t\t\t\t\t\t\t\t\"html_js_list\" => \"\".$this->read_html_enabled_js($file_path2),\n\t\t\t\t\t\t\t\t\t\"html_link_external_list\" => \"\".$this->read_html_external_link($file_path2),\n\t\t\t\t\t\t\t\t\t\"html_redirect\" => \"\".$this->read_html_redirect($file_path2),\n\t\t\t\t\t\t\t\t\t\"html_iframe\" => \"\".$this->read_html_iframe($file_path2),\n\t\t\t\t\t\t\t\t\t\"html_favicon\" => \"\".$this->read_html_favicon($file_path2)\n\n\t\t\t\t\t\t\t\t);\t\n\t\t\t\t\t\t\t\t$this->db->insert('ph_features_legitimate', $feature_data);\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}\n\n\t\t\t\t}\n \n\t\t\t\n\t\t\t\t\t$send_toview['title_bar'] = \"Scan Result - Phising Detector\";\n\t\t\t\t\t$send_toview['header_page'] = \"Phising Detector\";\t\n\t\t\t\t\t$send_toview['keyword'] = \"Phising Detector\";\n\t\t\t\t\t$send_toview['breadcrumb'] = \"Dataset\";\n\t\t\t\t\t$send_toview['taskid'] = $result_task_id[0]['task_id'];\n\t\t\t\t\t$send_toview['task_scanned'] = $count;\n\t\t\t\t\t$send_toview['description'] = \"Home Phising Detector\";\n\t\t\t\t\t$this->load->view('main/header', $send_toview);\n\t\t\t\t\t$this->load->view('main/navbar', $send_toview);\n\t\t\t\t\t$this->load->view('main/input', $send_toview);\n\t\t\t\t\t$this->load->view('main/footer', $send_toview);\n\t\t}\n\t}", "title": "" }, { "docid": "d556517bf6fed9d9f9437438e5d22888", "score": "0.40882832", "text": "public function checkUserOnFingerprint($login_user, $fingerprint){\n $query = Fingerprint::where('fingerprint_string', $fingerprint)->where('user_id', $login_user);\n if($query->count() > 0){\n $data = $query->first();\n return $data->id;\n }else{\n return Fingerprint::insertGetId(['fingerprint_string'=>$fingerprint,'user_id'=>$login_user, 'created_at'=>Carbon::now()]);\n }\n }", "title": "" }, { "docid": "946eb2d605cb037af5c243595706a7b8", "score": "0.40863124", "text": "function variant_recalculate_identity($res, $row) {\r\n\tglobal $g_mv_goals, $g_mv_tests;\r\n\tforeach ($row as $k => $v) {\r\n\t\tif (!beginswith($k, \"_mv_\"))\r\n\t\t\tcontinue;\r\n\t\t$ctest = substr($k, 4);\r\n\t\t// print_r($row); echo $ctest; exit;\r\n\t\tforeach ($g_mv_goals as $cg) {\r\n\t\t\t// are we measuring this?\r\n\t\t\tif (!isset($res[$ctest.\"|\".$v[\"var\"].\"|\".$cg.\"|start_log_id\"]))\r\n\t\t\t\tcontinue;\r\n\t\t\t// have the user entered this after we started measuring it?\r\n\t\t\tif ($v[\"start_log_id\"] < $res[$ctest.\"|\".$v[\"var\"].\"|\".$cg.\"|start_log_id\"])\r\n\t\t\t\tcontinue;\r\n\t\t\tif ((isset($row[\"_mg_\".$cg])) && (is_numeric($row[\"_mg_\".$cg]))) {\r\n\t\t\t\t// only count in, if participated before conversion\r\n\t\t\t\tif ($row[\"_mg_\".$cg] > $v[\"start_log_id\"]) {\r\n\t\t\t\t\t$res[$ctest.\"|\".$v[\"var\"].\"|\".$cg.\"|sample\"] []= $v[\"start_log_id\"];\r\n\t\t\t\t\t$res[$ctest.\"|\".$v[\"var\"].\"|\".$cg.\"|conversion\"] []= $v[\"start_log_id\"];\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// participating, but haven't converted yet\r\n\t\t\t\t$res[$ctest.\"|\".$v[\"var\"].\"|\".$cg.\"|sample\"] []= $v[\"start_log_id\"];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn $res;\r\n}", "title": "" }, { "docid": "d587684050f345e67c0471e9b52f9e9d", "score": "0.40840387", "text": "function infer($string, $sen){\n global $sid;\n global $gs;\n global $bs;\n \n $sid = $_GET[SID];\n if ($sid == \"\"){\n $sid = \"test\";\n }\n \n $string = strtolower($string);\n $count = substr_count($string, \" \");\n \n if ($sen){\n $words = explode(\" \", remove_words(file_count_sentence_words(), $string));\n }else{\n $words = explode(\" \", $string);\n }\n \n //echo\"$gs, $bs\";\n \n //$gs = file_get_contents(\"data/$sid/good.txt\");\n //$bs = file_get_contents(\"data/$sid/bad.txt\");\n \n //echo \"$gs, $bs\";\n $good = get_senarray($gs);\n //print_r($good);\n $bad = get_senarray($bs);\n //print_r($bad);\n $scoreg = 0;\n $scoreb = 0;\n $total = 0;\n //print($_GET[SID]);\n //print(file_get_contents(\"data/$sid/good.txt\"));\n //print_r(findWords(file_get_contents(\"data/$sid/good.txt\")));\n //print_r(findWords(file_get_contents(\"data/$sid/bad.txt\")));\n if($gs == \"\"){\n $gs = file_get_contents(\"data/$sid/good.txt\");\n }\n if ($bs == \"\"){\n $bs = file_get_contents(\"data/$sid/bad.txt\");\n }\n $sentenceArray = count_sentence_words($gs, $bs, findWords(file_get_contents(\"data/$sid/good.txt\")), findWords(file_get_contents(\"data/$sid/bad.txt\")));\n //print_r($sentenceArray);\n $bad = findWords(remove_words($sentenceArray, $bs));\n $good = findWords(remove_words($sentenceArray, $gs));\n \n foreach ($words as $key => $word){\n //echo \"sorting... $word...\";\n $word = preg_replace('/[^a-z0-9]+/i', \"\", $word);\n $i = 1;\n //print_r($good);\n //print_r($bad);\n //print_r($words);\n if (array_key_exists($word, $bad) & array_key_exists($word, $good)){\n //echo \"here - both\"; \n $total = $total + (($bad[$word] + $good[$word]));\n $scoreb = $scoreb + $bad[$word];\n $scoreg = $scoreg + $good[$word];\n }elseif (array_key_exists($word, $bad)){\n //echo \"here - bad \";\n $scoreb = $scoreb + $bad[$word];\n $total = $total + $bad[$word];\n }elseif(array_key_exists($word, $good)){\n //echo \"here - good \";\n $scoreg = $scoreg + $good[$word];\n $total = $total + $good[$word];\n }\n }\n echo \"<h1>$scoreg</h1>\";\n echo \"<h1>$scoreb</h1>\";\n $percent = ($scoreg / $total) * 100;\n echo \"<h1> $percent similar, and $wordpercent similar in length </h1>\";\n}", "title": "" }, { "docid": "d8f9b259dff3fdac1d26ce51b7fa7536", "score": "0.40837383", "text": "function core_diversity_analyses($user,$project,$path_in,$path_out){\n\n \techo \"core_diversity_analyses\".\"\\n\";\n\n \t\n $map = $path_in.\"map.txt\";\n \t$cdotu = $path_out.\"Processeddata/cdotu/\";\n \t$inputbiom = $path_out.\"Processeddata/final_otu_tables/otu_table.biom\";\n \t$rep_set = $path_out.\"Processeddata/clustering/rep_set.tre\";\n \t$min = $GLOBALS['min'];\n $alpha_params = $path_in.\"alpha_params.txt\";\n $option_c = $GLOBALS['core_group'];\n\n\n\n \t$jobname = $user.\"_core_diversity_analyses\";\n \t$log = $GLOBALS['path_log'];\n\n $cmd = \"qsub -N '$jobname' -o $log -cwd -j y -b y Scriptqiime/core_analyses $cdotu $inputbiom $map $rep_set $min $option_c $alpha_params\";\n\n shell_exec($cmd);\n \t $check_qstat = \"qstat -j '$jobname' \";\n exec($check_qstat,$output);\n \n $id_job = \"\" ; # give job id \n foreach ($output as $key_var => $value ) {\n \n if($key_var == \"1\"){\n $data = explode(\":\", $value);\n $id_job = $data[1];\n } \n }\n $loop = true;\n while ($loop) {\n\n $check_run = exec(\"qstat -j $id_job\");\n\n if($check_run == false){\n $loop = false;\n alpha_diversity($user,$project,$path_in,$path_out);\n }\n } \n }", "title": "" }, { "docid": "e357b12d6afdb1513b275221c72ba282", "score": "0.40825167", "text": "function findBestMatches($paths,$matches_needed)\n{\n\t$latbounds=findBounds($paths)['lat'];\n\t$lngbounds=findBounds($paths)['lng'];\n\t$points_set=array(); //Array consisting of of all points in all paths\n\t$gridpoints_set=array(); //Array consisting of gridpoints used in all paths\n\t$gridsizeLat=50.0;\n\t$gridsizeLng=50.0;\n\t$pathgridpoints_set=array(); //Array with hashed keys for all paths\n\tfor ($i=0;$i<sizeof($paths);$i++)\n\t{\n\t\t$points_set[$i]=extractPoints($paths[$i]);\n\t\t$gridpoints_set[$i]=matchWithGrid($points_set[$i],$latbounds['top'],$lngbounds['left'],($latbounds['top']-$latbounds['bottom'])/$gridsizeLat,($lngbounds['right']-$lngbounds['left'])/$gridsizeLng);\n\t\tfor ($j=0;$j<sizeof($gridpoints_set[$i]);$j++)\n\t\t\t$pathgridpoints_set[$i][md5($gridpoints_set[$j]['latbox'] . $gridpoints1[$j]['lngbox'])]=1;\n\t}\n\t$matches_set=array();\n\t$person_matched=array();\n\n\t//$matches_set_key=array();\n\tfor ($i=0;$i<sizeof($paths);$i++)\n\t{\n\t\t$matches_set[$i]=array();\n\t\t$person_matched[$i]=array();\n\t\tfor ($j=0;$j<sizeof($paths);$j++)\n\t\t{\n\t\t\t$matches_set[$i][$j]=0;\n\t\t\t$person_matched[$i][$j]=0;\n\t\t}\n\t}\n\tfor ($i=0;$i<sizeof($paths)-1;$i++)\n\t{\n\t\tfor ($j=$i+1;$j<sizeof($paths);$j++)\n\t\t{\n\t\t\t$result = array();\n\t\t\t$result['matches'] = countMatches($pathgridpoints_set[$i],$pathgridpoints_set[$j]);\n\t\t\t$result['extrapath1'] = sizeof($gridpoints1) - $matches;\n\t\t\t$result['extrapath2'] = sizeof($gridpoints2) - $matches;\n\t\t\t$weightedmatch = 5*$result['matches'] - 2.5*$result['extrapath1'] - 2.5*$result['extrapath2'];\n\t\t\t//$matches_set[$i . \" \" . $j] = $weightedmatch;\n\t\t\t//array_push($matches_set,$weightedmatch);\n\t\t\t//array_push($matches_set_key,$i . \" \" . $j);\n\t\t\t$matches_set[$i][$j]=$weightedmatch;\n\t\t}\n\t}\n\tfor ($i=0;$i<sizeof($paths)-1;$i++)\n\t{\n\t\tfor ($j=$i+1;$j<sizeof($paths);$j++)\n\t\t\t$matches_set[$j][$i]=$matches_set[$i][$j];\n\t}\n\t$best_weight=0.0;\n\t$best_index=0;\n\t$user_to_be_matched=0;\n\t$matches=array();\n\tfor ($i=0;$i<sizeof($paths);$i++)\n\t\t$matches++;\n\twhile ($user_to_be_matched!=sizeof($paths) && $total_matches!=$matches_needed)\n\t{\n\t\twhile ($person_matched[$user_to_be_matched][0]!=0) $user_to_be_matched++;\n\tfor ($i=0;$i<sizeof($paths);$i++)\n\t{\n\t\tif ($matches_set[$user_to_be_matched][$i]>$best_weight && $person_matched[$user_to_be_matched][$i]==0)\n\t\t{\n\t\t\t$best_weight=$matches_set[$user_to_be_matched][$i];\n\t\t\t$best_index=$i;\n\t\t}\n\t}\n\tfor ($i=0;$i<sizeof($paths);$i++)\n\t{\n\t\t$person_matched[$user_to_be_matched][$i]=1;\n\t\t$person_matched[$i][$user_to_be_matched]=1;\n\t\t$person_matched[$best_index][$i]=1;\n\t\t$person_matched[$i][$best_index]=1;\n\t}\n\t$matches[$user_to_be_matched]=$best_index;\n\t$matches[$best_index]=$user_to_be_matched;\n\t$total_matches++;\n\t$user_to_be_matched++;\n\n\t}\n\treturn $matches;\n\t/*for ($i=0;$i<sizeof($matches_set)-1;$i++)\n\t{\n\t\tfor ($j=$i+1;$j<sizeof($matches_set);$j++)\n\t\t{\n\t\t\tif ($matches_set[$i]<$matches_set[$j])\n\t\t\t{\n\t\t\t\t$temp = $matches_set[$i];\n\t\t\t\t$matches_set[$i] = $matches_set[$j];\n\t\t\t\t$matches_set[$j] = $temp;\n\n\t\t\t\t$temp2 = $matches_set_key[$i];\n\t\t\t\t$matches_set_key[$i] = $matches_set_key[$j];\n\t\t\t\t$matches_set_key[$j] = $temp;\n\t\t\t}\n\t\t}\n\t}*/\n\n}", "title": "" }, { "docid": "771ec7ea83c25bc9327360746f5beb8f", "score": "0.40782648", "text": "function compare($names, $compare)\n{\n $count=0;\n //this foreach is going through each array and going through $name of both arrays and will keep count of how many are similar and will add 1 to the value of count and at end of foreach will return the number of how many are in common \n foreach ($names as $name) {\n //var_dump($name);\n if(check($compare, $name)){\n $count++;\n //var_dump($count);\n }\n }\n //returning the number of how many are common for both arrays\n return $count;\n}", "title": "" }, { "docid": "e7b0f95740f7bc5b61d575b7fe6bfbfc", "score": "0.40776166", "text": "public function compareFieldKrs()\r\n\t{\r\n\t\t$list_field_krs_siakad1\t\t= $this->Krsf_model->getListFieldkrs(1);\r\n\t\t$list_field_krs_siakad2\t\t= $this->Krsf_model->getListFieldkrs(2);\r\n\r\n\t\t$fileds_compare = array();\r\n\t\tfor ($i=1; $i <= 87 ; $i++) { \r\n\t\t\tif (in_array($list_field_krs_siakad2[$i], $list_field_krs_siakad1, true)) {\r\n\t\t\t\tarray_push($fileds_compare, $list_field_krs_siakad2[$i]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $fileds_compare;\r\n\t}", "title": "" }, { "docid": "549de38d419f8e354c89ff21bd93b236", "score": "0.4068643", "text": "public function findDuplicatesTest()\n {\n $this->runTestWithLogging(\"findDuplicatesTest\", function()\n {\n $this->addImageFeaturesToSearchContext(self::$originalDataFolder . \"/FindSimilar\", true);\n\n $image = $this->getStoragePath($this->comparableImage);\n $this->addImageFeaturesToSearchContext($image);\n\n $image = $this->getStoragePath($this->comparingImageSimilarLess15);\n $this->addImageFeaturesToSearchContext($image);\n\n $image = $this->getStoragePath($this->comparingImageSimilarMore75);\n $this->addImageFeaturesToSearchContext($image);\n\n $response = \n self::$imagingApi->findImageDuplicatesAsync(\n new Requests\\FindImageDuplicatesRequest($this->searchContextId, 80, null, self::$testStorage))->wait();\n $this->assertEquals(1, count($response->getDuplicates()));\n });\n }", "title": "" }, { "docid": "efd6bff881e4bf01442bd35234186faf", "score": "0.40675458", "text": "public static function compare($image1,$image2){\n\t\tif(is_string($image1)){\n\t\t\tif(!is_readable($image1)) throw new Exception('Expected image file not readable: '.$image1);\n\t\t\t$image1 = self::resource($image1);\n\t\t\t$destroy1 = true;\n\t\t}else if(!is_resource($image1)){\n\t\t\tthrow new Exception('Source image must be a string path or an image resource');\n\t\t}\n\t\tif(is_string($image2)){\n\t\t\tif(!is_readable($image2)) throw new Exception('Expected image file not readable: '.$image2);\n\t\t\t$image2 = self::resource($image2);\n\t\t\t$destroy2 = true;\n\t\t}else if(!is_resource($image2)){\n\t\t\tthrow new Exception('Expected image must be a string path or an image resource');\n\t\t}\n\t\t$x1 = imagesx($image1);\n\t\t$y1 = imagesy($image1);\n\t\tif($x1!=imagesx($image2)) return false;\n\t\tif($y1!=imagesy($image2)) return false;\n\t\tfor($x=0;$x<$x1;$x++){\n\t\t\tfor($y =0;$y<$y1;$y++){\n\t\t\t\t//echo $x.' '.$y.\"\\n\";\n\t\t\t\t$sourceRgb = imagecolorat($image1, $x, $y);\n\t\t\t\t$expectedRgb = imagecolorat($image2, $x, $y);\n\t\t\t\t/*\n\t\t\t\tif($sourceRgb!=$expectedRgb){\n\t\t\t\t\techo \"\\n\";\n\t\t\t\t\t$sourceColors = imagecolorsforindex($image1,$sourceRgb);\n\t\t\t\t\tprint_r($sourceColors);\n\t\t\t\t\techo \"\\n\";\n\t\t\t\t\t$expectedColors = imagecolorsforindex($image2,$expectedRgb);\n\t\t\t\t\tprint_r($expectedColors);\n\t\t\t\t\techo \"\\n\";\n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t\tif($sourceRgb!=$expectedRgb) return false;\n\t\t\t}\n\t\t}\n\t\tif(isset($destroy1)) imagedestroy($image1);\n\t\tif(isset($destroy2)) imagedestroy($image2);\n\t\treturn true;\n\t}", "title": "" }, { "docid": "820247850e88f324b192095a812197a3", "score": "0.40601793", "text": "public function fire()\n\t{\n\t\t$instagram = $this->getInstagram();\n\n\t\t\n\n\t\tforeach ($instagram as $details) {\n\t\t\t\n\t\t\t$timestamp = time();\n\n\t\t\t$destinationPath = storage_path().'/uploads/temp/'.$timestamp;\n\t\t\tif (!File::isDirectory($destinationPath)) {\n\t\t\t\tFile::makeDirectory($destinationPath, 0777, true);\n\t\t\t\tcopy($details['url'], $destinationPath.'/'.$timestamp.'.jpg');\n\t\t\t}\n\n\t\t\t$this->call('face:detect', ['file' => $destinationPath.'/'.$timestamp.'.jpg' , 'id' => $timestamp]);\n\n\t\t\t$destinationPath = storage_path().'/uploads/temp/'.$timestamp.'/crop';\n\t\t\tif (File::isDirectory($destinationPath)) {\n\t\t\t\tforeach (Finder::create()->files()->name('*.jpg')->in($destinationPath) as $file) {\n\t\t\t\t\t\n\t\t\t\t\t$collection = CaseDetail::all();\n\t\t\t\t\t$collection->each(function($case) use($file,$details)\n\t\t\t\t {\t\n\t\t\t\t \tif($case->photo_url){\n\t\t\t\t \t\t#puzzle_set_lambdas(13);\n\t\t\t\t \t\t#puzzle_set_p_ratio(1.5);\n\t\t\t\t\t \t$signature1 = puzzle_fill_cvec_from_file($case->photo_url);\n\t\t\t\t\t\t\t$signature2 = puzzle_fill_cvec_from_file($file->getRealpath());\n\t\t\t\t\t\t\t$d = puzzle_vector_normalized_distance($signature1, $signature2);\n\t\t\t\t\t\t\tif ($d < PUZZLE_CVEC_SIMILARITY_THRESHOLD) {\n\n\t\t\t\t\t\t\t\t$caseFound = \\DB::table('case_match_details')\n\t\t\t\t\t\t\t\t\t->where('case_detail_id', $case->id)\n\t\t\t\t\t\t\t\t\t->where('photo_id', $details['id'])\n\t\t\t\t\t\t\t\t\t->get();\n\t\t\t\t\t\t\t\tif(!count($caseFound)){\n\t\t\t\t\t\t\t\t\t$data = [\n\t\t\t\t\t\t\t\t\t\t'case_detail_id'=>$case->id,\n\t\t\t\t\t\t\t\t\t\t'image_url' => $details['url'],\n\t\t\t\t\t\t\t\t\t\t'data' => json_encode($details),\n\t\t\t\t\t\t\t\t\t\t'photo_id' => $details['id'],\n\t\t\t\t\t\t\t\t\t\t'similarity' => $d,\n\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t \tCaseMatch::create($data);\n\t\t\t\t\t\t\t\t \tunset($data);\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tunset($caseFound);\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tunset($signature1,$signature2,$d);\n\t\t\t\t\t\t}\n\t\t\t\t \n\t\t\t\t });\t\n\t\t\t\t unset($collection,$file);\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->call('face:delete', []);\n\t}", "title": "" }, { "docid": "d32d52891b0f3a1f6f8f880b1989913b", "score": "0.40486506", "text": "function test ($filename)\n {\n $filename = convertImage($filename, uniqid().'.jpg');\n\n list($width, $height) = getimagesize($filename);\n\n $img = imagecreatefromjpeg($filename);\n $new_img = imagecreatetruecolor(8, 8);\n\n imagecopyresampled($new_img, $img, 0, 0, 0, 0, 8, 8, $width, $height);\n imagefilter($new_img, IMG_FILTER_GRAYSCALE);\n\n $colors = array();\n $sum = 0;\n \n for ($i = 0; $i < 8; $i++) {\n for ($j = 0; $j < 8; $j++) {\n $color = imagecolorat($new_img, $i, $j) & 0xff;\n $sum += $color;\n $colors[] = $color;\n }\n }\n\n $avg = $sum / 64;\n\n $hash = '';\n $curr = '';\n $count = 0;\n foreach ($colors as $color) {\n if ($color > $avg) {\n $curr .= '1';\n } else {\n $curr .= '0';\n }\n $count++;\n\n if (!($count % 4)) {\n $hash .= dechex(bindec($curr));\n $curr = '';\n }\n }\n unlink($filename);\n return $hash;\n}", "title": "" }, { "docid": "7292d620a685ece3e9301719cbfcb10c", "score": "0.404736", "text": "function start() {\n\t\tif($method == \"RNAmutant\") { \n\n\t\t} else if($method == \"fixedCGSampling\") {\n\t\t\t//fixedCG property eValue\n\n\t\t} else { //run both RNAmutant and fixedCG\n\n\t\t}\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "6b6489719ef15995e3b1b181b095fdb2", "score": "0.40450865", "text": "protected function findAndJoin() {\n $this->computeAvgDistance();\n $x = -1; $y = -1;\n $min_value = INF;\n for ($i = 0; $i < $this->cluster_count; $i++)\n if ($this->cluster[$i]->alive())\n for ($j = 0; $j < $i; $j++)\n if ($this->cluster[$j]->alive()) {\n $cell_value = $this->value($i, $j) - ($this->avg_distance[$i] + $this->avg_distance[$j]);\n if ($cell_value < $min_value) {\n $min_value = $cell_value;\n $x = $i;\n $y = $j;\n }\n }\n $this->join($x, $y);\n }", "title": "" }, { "docid": "10bd564ffcde0011ad4f86a26d1b8bd5", "score": "0.4041243", "text": "public function anagrama($palavra1,$palavra2){\n $pal1 = str_split($palavra1);\n\n //criar um array da palavras do arquivo\n foreach ($palavra2 as $p) {\n $pal2_array[] = str_split($p);\n }\n\n // dd($pal2_array);\n foreach ($pal2_array as $r) {\n $are= $this->verAnagrama($pal1,$r);\n }\n return $are;\n }", "title": "" }, { "docid": "4a253514e7ebbd25aed708247b1bf1e1", "score": "0.40361232", "text": "function getHits($cadena1, $cadena2, $p = NULL, $umbral = NULL){\n $mayor = (count($cadena1) > count($cadena2)) ? $cadena1 : $cadena2;\n $menor = (count($cadena1) < count($cadena2)) ? $cadena1 : $cadena2;\n $max = count($mayor);\n $min = count($menor);\n $hits = 0; \n\n for($i=0; $i < $min;$i++){\n if( $this->inArray($menor[$i], $mayor, $p, $umbral) ){\n $hits++;\n }\n }\n return $hits;\n }", "title": "" }, { "docid": "5ca8a1c7241e51a9d7f30125d6190669", "score": "0.4030178", "text": "public function addFingerprintGenerator(Fingerprint $fingerprintGenerator): void;", "title": "" }, { "docid": "6f553de467ba0c9bb426758af18211d3", "score": "0.40284097", "text": "function qdm_one_hit(&$p1, &$grp, &$pls, &$file){\n\n $msg = array();\n $struct = array();\n $msg = msg_fill($msg);\n $cfg = qdm_config();\n $skills = &$p1['skills'];\n $index = $p1['index'];\n\n\n\n $players = $pls; // !!! nedd p2 by link, but no players\n\n $op_index = qdm_find_opponent($players, $grp, $index); // Now we must find opponent\n $p2 = &$pls[$op_index];\n\n $defense = $cfg['base_armor'] + $cfg['armors'][$p2['armor']]['ac'];\n $weapon_id = $p1['weapon'];\n\n\n $dmg = mt_rand(1, $cfg['weapons'][$weapon_id]['dmg']);\n $hit = mt_rand(1, 20);\n\n $struct['d_hit'] = $hit;\n $struct['d_dmg'] = $dmg;\n $struct['d_def'] = $defense;\n\n $b_atk = $p1['atk'] + $p1['bonus']['atk'];\n $b_dmg = $p1['dmg'];\n $b_def = $p2['bonus']['def'];\n\n\n // Weapon skill damage bonus\n if( isset($skills[$weapon_id]) && isset($skills[$weapon_id]['wep_dmg']) ){\n $dmg += $skills[$weapon_id]['wep_dmg'];\n $b_dmg += $skills[$weapon_id]['wep_dmg'];\n }\n // Weapon skill atk bonus\n if( isset($skills[$weapon_id]) && isset($skills[$weapon_id]['wep_atk']) ){\n $hit += $skills[$weapon_id]['wep_atk'];\n $b_atk += $skills[$weapon_id]['wep_atk'];\n }\n \n // TODO: add weapon skills!\n // Create structure for log\n $struct['p1'] = $p1['index'];\n $struct['p2'] = $p2['index'];\n $struct['d_hit+'] = $b_atk;\n $struct['d_dmg+'] = $b_dmg;\n $struct['crit_mod'] = $cfg['weapons'][$p1['weapon']]['crit'];\n\n $del = ' ';\n $eva = 0;\n\n // TODO: add shield\n $defense = $cfg['base_armor'] + $cfg['armors'][$p2['armor']]['ac'] + $p2['nat_armor'] + $p2['dodge'] + $b_def; // full def (eveision)\n $block_def = $cfg['base_armor'] + $cfg['armors'][$p2['armor']]['ac'] + $p2['nat_armor']; // armor def\n $miss_def = $cfg['base_armor'] + $p2['nat_armor']; // base def\n $struct['opp_def'] = $defense . '/' . $block_def . '/' . $miss_def;\n\n $dmg = $dmg + $b_dmg; // add bonus\n\n $crit = qdm_battle_check_crit($hit, $p1, $dmg, $defense);\n if( $crit ){\n \n $p1['stat']['crit_count']++;\n if( $dmg > $p1['stat']['crit_dmg'] ) $p1['stat']['crit_dmg'] = $dmg; // max crit\n $log_dmg = $dmg;\n $struct['crit'] = 1;\n }\n else $struct['crit'] = 0; \n \n $hit = $hit + $b_atk; // add bonus to hit\n //if( $player['skill'] == $player['weapon'] ){ $hit++; } // weapon skill\n\n if( $hit >= $defense ){\n // d_debug(1, 'Hit for -'.$dmg.' ('.$p2['hp'].'/'.$p2['max_hp'].')');\n $p2['hp'] = $p2['hp'] - $dmg;\n $p1['stat']['dmg'] += $dmg;\n $p2['stat']['hp_lost'] += $dmg;\n $struct['dmg'] = $dmg;\n $msg_max_hit = count($msg['hit'])-1;\n $msg_max_crit = count($msg['crit'])-1;\n\n if( $crit ) $struct['msg'] = mt_rand(0, $msg_max_crit); \n else $struct['msg'] = mt_rand(0, $msg_max_hit); \n\n $p1['stat']['hits']++;\n }\n else{ // miss\n\n if( $hit <= $miss_def ){\n // Total miss\n $p1['stat']['miss']++;\n $struct['dmg'] = -1;\n }\n elseif( $hit <= $block_def ){\n // Enemy blcked attack\n $p2['stat']['block']++;\n $struct['dmg'] = -2;\n }\n else{ // enemy evaded attack\n $p2['stat']['eva']++;\n $struct['dmg'] = -3;\n }\n\n $msg_max_miss = count($msg['miss'])-1;\n $struct['msg'] = mt_rand(0, $msg_max_miss);\n }\n\n\n // Count kills \n if( $p2['hp'] < 1 ){ \n\n // d_debug($p2, 'Dead ' . $p2['name']);\n // d_debug($grp, 'grp');\n $p1['kills'][] = $p2['index']; // frags\n $left = count($grp[$p2['team']]); // Last player in this team\n\n // Mark defeated player\n if( $left > 1 ){\n\n // find team index\n $player_index = array_search($p2['index'], $grp[$p2['team']]);\n\n // Unset defeated plyer from team\n unset($grp[$p2['team']][$player_index]);\n $grp[$p2['team']] = array_values($grp[$p2['team']]);\n\n }\n else unset($grp[$p2['team']]); // no players in team - remove team\n\n // tmp - need to remove or replace while-cicle continue\n unset($players[$p2['index']]);\n }\n\n $p2['stat']['defended']++;\n $p1['stat']['atacked']++;\n $struct['p2_hp'] = $p2['hp'];\n $struct['p2_max_hp'] = $p2['hp_max'];\n $struct['action'] = -1;\n\n $file[] = $struct;\n}", "title": "" }, { "docid": "dec07003da6d7524d1ee4911617aee62", "score": "0.4025873", "text": "private function updateSimilarity2($id1, $id2) {\n\t\tlist($id1,$id2) = $this->orderId($id1, $id2);\n\t\t$sim = $this->calculateSimilarity($id1, $id2);\n\t\t$simRecord = R::findOne($this->similarityTable, \"id1 = ? and id2 = ?\", [$id1, $id2]);\n\t\tif(!$simRecord) {\n\t\t\t$simRecord = R::dispense($this->similarityTable);\n\t\t\t$simRecord->id1 = $id1;\n\t\t\t$simRecord->id2 = $id2;\n\t\t}\n\t\t$simRecord->value = $sim;\n\t\tR::store($simRecord);\n\t}", "title": "" }, { "docid": "56fcabd8edf5759d74bef7d16ff6a87d", "score": "0.40223858", "text": "function check()\n{\n \n global $manager, $chs, $sid_chs;\n\n $sid_chs = $manager->get_index_datas();\n\n $chs = array();\n foreach($sid_chs as $arr){\n foreach($arr as $p){\n $chs[$p['pid']] = $p;\n }\n }\n \n check_ustream();\n check_justin();\n check_stickam();\n check_nicolive();\n check_twitcasting();\n}", "title": "" }, { "docid": "ca673ce04e030a7a92135c33c549bd3d", "score": "0.40192685", "text": "function multiarray_chisq_independence($arr,$mode='chisq') {\n $keys1 = array_keys($arr);\n $keys2 = array(); \n foreach($arr as $key=>$subarr) {\n $keys2 = array_merge($keys2,array_keys($subarr));\n }\n $keys2 = array_unique($keys2);\n sort($keys1); sort($keys2);\n\n foreach($keys1 as $key1) {\n foreach($keys2 as $key2) {\n if (!isset($arr[$key1][$key2])) $arr[$key1][$key2] = 0;\n }\n }\n \n foreach($keys1 as $key1) {\n $arr_by_keys1[$key1] = array_sum($arr[$key1]);\n foreach($keys2 as $key2) {\n @$arr_by_keys2[$key2] += $arr[$key1][$key2];\n }\n }\n\n foreach($keys1 as $key1) {\n if($arr_by_keys1[$key1]==0) $dropkeys1[] = $key1;\n } \n foreach($keys2 as $key2) {\n if($arr_by_keys2[$key2]==0) $dropkeys2[] = $key2;\n } \n $total = array_sum($arr_by_keys1);\n if (array_sum($arr_by_keys1) != array_sum($arr_by_keys2)) die('Error!');\n @$dof = (count($keys1) - count($dropkeys1) - 1)*(count($keys2) - count($dropkeys2) - 1);\n \n foreach($keys1 as $key1) {\n foreach($keys2 as $key2) {\n $expected[$key1][$key2] = $arr_by_keys1[$key1] * $arr_by_keys2[$key2] / $total;\n \n if($mode == 'chisq') {\n $ndiff[$key1][$key2] = ($arr[$key1][$key2] - $expected[$key1][$key2])/sqrt($expected[$key1][$key2]);\n }\n if($mode == 'gtest') {\n $gstat[$key1][$key2] = ($arr[$key1][$key2] == 0) ? 0 :\n2*$arr[$key1][$key2] * log($arr[$key1][$key2]/$expected[$key1][$key2]);\n }\n }\n }\n \n if ($mode == 'chisq') return array($dof,$ndiff);\n if ($mode == 'gtest') return array($dof,$gstat);\n}", "title": "" }, { "docid": "677c44f620ace4c6d5c392619496c688", "score": "0.4018322", "text": "private static function write_test_run_results(&$result_buffer, &$result_file, &$sensor)\n\t{\n\t\t// Copy the value each time as if you are directly writing the original data, each succeeding time in the loop the used arguments gets borked\n\t\tif(!is_object(self::$individual_test_run_request))\n\t\t\treturn;\n\n\t\t$test_result = clone self::$individual_test_run_request;\n\n\t\tif (pts_module_manager::is_module_attached(\"matisk\"))\n\t\t{\n\t\t\t// TODO find some better way than adding a number to distinguish the results between the MATISK runs\n\t\t\t$arguments_description = phodevi::sensor_object_name($sensor) . ' Monitor (test ' . count($result_file->get_systems()) . ')';\n\t\t\t$arguments_try_description = phodevi::sensor_object_name($sensor) . ' Per Test Try Monitor (test ' . count($result_file->get_systems()) . ')';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$arguments_description = phodevi::sensor_object_name($sensor) . ' Monitor';\n\t\t\t$arguments_try_description = phodevi::sensor_object_name($sensor) . ' Per Test Try Monitor';\n\t\t}\n\n\n\t\t$test_result->test_profile->set_identifier(null);\n\t\t$test_result->test_profile->set_result_proportion('LIB');\n\t\t$test_result->test_profile->set_display_format('LINE_GRAPH');\n\t\t$test_result->test_profile->set_result_scale(phodevi::read_sensor_object_unit($sensor));\n\t\t$test_result->set_used_arguments_description($arguments_description);\n\t\t$test_result->set_used_arguments(phodevi::sensor_object_name($sensor) . ' ' . $test_result->get_arguments());\n\t\t$test_result->test_result_buffer = $result_buffer;\n\n\t\tif(self::$per_test_try_monitoring && $result_buffer->get_count() > 1)\n\t\t{\n\t\t\t$test_result->set_used_arguments_description($arguments_try_description);\n\t\t}\n\n\t\t$result_file->add_result($test_result);\n\t}", "title": "" }, { "docid": "e385a2638bae48cb8d14d31878cc65a6", "score": "0.40178147", "text": "function jaroSimilarity($str_a, $str_b)\r\n{\r\n //we work on all lowercase strings\r\n $str_a = strtolower($str_a);\r\n $str_b = strtolower($str_b);\r\n \r\n //initialize working variables\r\n $m = 0; //number of matching characters\r\n $t = 0; //number of transpositions for matches\r\n $a = strlen($str_a); //size of string a\r\n $b = strlen($str_b); //size of string b\r\n $match_wnd = ceil(max($a, $b) / 2) - 1; //size of the matching window\r\n if ($match_wnd < 0)\r\n $match_wnd = 0;\r\n\r\n/*\r\n //for each character in $str_a\r\n for ($i = 0; $i < $a; $i++)\r\n {\r\n $char = $str_a{$i}; //character to match\r\n \r\n //set match window limits\r\n $neg_lim = $i - $match_wnd;\r\n if ($neg_lim < 0)\r\n $neg_lim = 0;\r\n \r\n $pos_lim = $i + $match_wnd;\r\n if ($pos_lim > $b)\r\n $pos_lim = $b;\r\n \r\n //search within the match window, first in postive direction\r\n $pos_found = false;\r\n $pos_transport = 0;\r\n \r\n $startpos = $i;\r\n if ($startpos >= $b)\r\n {\r\n $startpos = $b-1;\r\n }\r\n for ($j = $startpos; $j < $pos_lim; $j++)\r\n {\r\n if (!$pos_found)\r\n {\r\n if ($char == $str_b{$j}) //found a match?\r\n {\r\n $pos_transport += $j - $i;\r\n $pos_found = true;\r\n }\r\n }\r\n }\r\n \r\n //then in negative direction\r\n $neg_found = false;\r\n $neg_transport = 0;\r\n \r\n for ($j = $startpos; $j >= $neg_lim; $j--)\r\n {\r\n if (!$neg_found)\r\n {\r\n if ($char == $str_b{$j}) //found a match?\r\n {\r\n $neg_transport += $i - $j;\r\n $neg_found = true;\r\n }\r\n }\r\n }\r\n \r\n if ($pos_found && $neg_found)\r\n {\r\n $m++;\r\n if ($pos_transport <= $neg_transport)\r\n {\r\n $t += $pos_transport;\r\n }\r\n else\r\n {\r\n $t += $neg_transport;\r\n }\r\n }\r\n else if ($pos_found && !$neg_found)\r\n {\r\n $m++;\r\n $t += $pos_transport;\r\n }\r\n else if (!$pos_found && $neg_found)\r\n {\r\n $m++;\r\n $t += $neg_transport;\r\n }\r\n }\r\n*/ \r\n $jaro = jaroWindowFind($str_a, $str_b, $a, $b, $match_wnd);\r\n $m_a = $jaro['m'];\r\n $t += $jaro['t'];\r\n \r\n $jaro = jaroWindowFind($str_b, $str_a, $b, $a, $match_wnd);\r\n $m_b = $jaro['m'];\r\n $t += $jaro['t'];\r\n \r\n $m = $m_a + $m_b;\r\n if ($m > 0)\r\n {\r\n $similarity = ($m_a / $a) + ($m_b / $b) + (($m - $t) / $m);\r\n return $similarity / 3;\r\n }\r\n else\r\n return 0;\r\n}", "title": "" }, { "docid": "b3f5ce1d05bc4f4652067b82f4b413f7", "score": "0.40154156", "text": "private static function process_summary_results(&$sensor, &$test_run_manager)\n\t{\n\t\t$sensor_results = self::parse_monitor_log('logs/' . phodevi::sensor_object_identifier($sensor));\n\t\tpts_module::remove_file('logs/' . phodevi::sensor_object_identifier($sensor));\n\n\t\tif(count($sensor_results) > 2 && self::$monitor_test_count > 1)\n\t\t{\n\t\t\t$test_profile = new pts_test_profile();\n\t\t\t$test_result = new pts_test_result($test_profile);\n\n\t\t\t$test_result->test_profile->set_test_title(phodevi::sensor_object_name($sensor) . ' Monitor');\n\t\t\t$test_result->test_profile->set_identifier(null);\n\t\t\t$test_result->test_profile->set_version(null);\n\t\t\t$test_result->test_profile->set_result_proportion(null);\n\t\t\t$test_result->test_profile->set_display_format('LINE_GRAPH');\n\t\t\t$test_result->test_profile->set_result_scale(phodevi::read_sensor_object_unit($sensor));\n\t\t\t$test_result->set_used_arguments_description('Phoronix Test Suite System Monitoring');\n\t\t\t$test_result->set_used_arguments(phodevi::sensor_object_identifier($sensor));\n\t\t\t$test_result->test_result_buffer = new pts_test_result_buffer();\n\t\t\t$test_result->test_result_buffer->add_test_result(self::$result_identifier, implode(',', $sensor_results), implode(',', $sensor_results), implode(',', $sensor_results), implode(',', $sensor_results));\n\t\t\t$test_run_manager->result_file->add_result($test_result);\n\t\t}\n\t}", "title": "" }, { "docid": "e05cf87f7e464541e02a86a537065636", "score": "0.40146676", "text": "function RatioT1( $indir, $outdir, $subject )\n{\n echo \"*** Determine average for and ratio between pre- and post-measurement for rat: $subject \\n\";\n\n\t// make outdir if not exists\n\tif( !is_dir( \"$outdir/ratio/\" ) )\n\t\tmkdir( \"$outdir/ratio/\", 0755, true );\n\n \t// construct relevant parameters for bet.sh input\n \t$input_pre = \"$outdir/bbb_pre_extract.nii.gz\";\n\t$input_post = \"$outdir/bbb_post_extract.nii.gz\";\n\t$average_pre = \"$outdir/ratio/average_bbb_pre.nii.gz\";\n\t$average_post = \"$outdir/ratio/average_bbb_post.nii.gz\";\n\t$ratio = \"$outdir/ratio/bbb_ratio.nii.gz\";\n\t\n\t\n\t// perform bet with bet.sh script\n {\n system( \"fslmaths $input_pre -Tmean $average_pre\" );\n\t system( \"fslmaths $input_post -Tmean $average_post\" );\n\tsystem( \"fslmaths $average_post -sub $average_pre -div $average_pre -mul 100 $ratio\" );\n }\n}", "title": "" }, { "docid": "5cb269ef591db506fea5e595273c9179", "score": "0.40126687", "text": "function scoreIndianChiefTwoCard($cardA, $cardB) {\r\n $score = (self::cardValue($cardA) + self::cardValue($cardB)) % 10;\r\n return $score;\r\n }", "title": "" }, { "docid": "efd33742f3898f1090ba10c2d6d07d56", "score": "0.40109348", "text": "function freq_analyze($infile, $cereg = '[a-z ]') { //Make frequency fingerprint\n\t$debug = 100;\n\t$total = 0;\n\t$in = fopen($infile, 'r');\n\twhile(!feof($in)) {\n\t\t$c = strtolower(fgetc($in));\n\t\tif(eregi($cereg, $c)) {\n\t\t\tif(!isset($data[$c])) $data[$c] = 0;\n\t\t\t$data[$c]++;\n\t\t\t$total++;\n\t\t}\n\t}\n\tfclose($in);\n\n\t//Compute percents\n\tforeach($data as $c => $n) {\n\t\t$data[$c] = ($n/$total)*100;\n\t\t$debug -= $data[$c];\n\t}\n\n\t//echo(\"Debug: $debug\\n\"); //Debug\n\treturn($data);\n}", "title": "" }, { "docid": "9aead522ce288249870e265e95249a6e", "score": "0.40072343", "text": "function getObsImages($dir) {\n \n # determine how many pulsars are present\n $cmd = \"find \".$dir.\" -maxdepth 1 -name '*_t*.ar' -printf '%f\\n'\";\n $pulsars = array();\n $rval = 0;\n $line = exec($cmd, $pulsars, $rval);\n $results = array();\n \n for ($i=0; $i<count($pulsars); $i++) {\n\n $arr = split(\"_\", $pulsars[$i], 2);\n $p = $arr[0];\n $p_regex = str_replace(\"+\",\"\\+\",$p);\n\n if ($p == \"total\") {\n $cmd = \"find \".$dir.\" -name '*.png' -printf'%f\\n'\";\n $pvfl = \"phase_vs_flux_\";\n $pvfr = \"phase_vs_freq_\";\n $pvtm = \"phase_vs_time_\";\n $band = \"bandpass_\";\n } else { \n $cmd = \"find \".$dir.\" -name '*\".$p.\"*.png' -printf '%f\\n'\";\n $pvfl = \"phase_vs_flux_[JB]*\".$p_regex;\n $pvfr = \"phase_vs_freq_[JB]*\".$p_regex;\n $pvtm = \"phase_vs_time_[JB]*\".$p_regex;\n $band = \"bandpass_[JB]*\".$p_regex;\n }\n\n $array = array();\n $rval = 0;\n $line = exec($cmd, $array, $rval);\n\n for ($j=0; $j<count($array); $j++) {\n\n $f = $array[$j];\n\n if (preg_match(\"/^\".$pvfl.\".+240x180.png$/\", $f))\n $results[$p][\"phase_vs_flux\"] = $f;\n if (preg_match(\"/^\".$pvtm.\".+240x180.png$/\",$f))\n $results[$p][\"phase_vs_time\"] = $f;\n if (preg_match(\"/^\".$pvfr.\".+240x180.png$/\",$f))\n $results[$p][\"phase_vs_freq\"] = $f;\n if (preg_match(\"/^\".$band.\".+240x180.png$/\",$f))\n $results[$p][\"bandpass\"] = $f;\n\n if (preg_match(\"/^\".$pvfl.\".+1024x768.png$/\",$f))\n $results[$p][\"phase_vs_flux_hires\"] = $f;\n if (preg_match(\"/^\".$pvtm.\".+1024x768.png$/\",$f))\n $results[$p][\"phase_vs_time_hires\"] = $f;\n if (preg_match(\"/^\".$pvfr.\".+1024x768.png$/\",$f))\n $results[$p][\"phase_vs_freq_hires\"] = $f;\n if (preg_match(\"/^\".$band.\".+1024x768.png$/\",$f))\n $results[$p][\"bandpass_hires\"] = $f;\n }\n }\n return $results;\n }", "title": "" }, { "docid": "2175eff545b828d9507b1df6cfb8a102", "score": "0.40035036", "text": "public function run(&$results)\n {\n\n // BEGIN TEST\n $arr1 = array();\n $arr2 = array();\n $actual = \\Flexio\\Base\\Util::mapArray($arr1,$arr2);\n $expected = array();\n \\Flexio\\Tests\\Check::assertArray('A.1', '\\Flexio\\Base\\Util::mapArray(); array input', $actual, $expected, $results);\n\n // BEGIN TEST\n $arr1 = array('key1' => null);\n $arr2 = array();\n $actual = \\Flexio\\Base\\Util::mapArray($arr1,$arr2);\n $expected = array('key1' => null);\n \\Flexio\\Tests\\Check::assertArray('A.2', '\\Flexio\\Base\\Util::mapArray(); array input', $actual, $expected, $results);\n\n // BEGIN TEST\n $arr1 = array();\n $arr2 = array('key1' => null);\n $actual = \\Flexio\\Base\\Util::mapArray($arr1,$arr2);\n $expected = array();\n \\Flexio\\Tests\\Check::assertArray('A.3', '\\Flexio\\Base\\Util::mapArray(); array input', $actual, $expected, $results);\n\n // BEGIN TEST\n $arr1 = array('key1' => null);\n $arr2 = array('key1' => 'value1');\n $actual = \\Flexio\\Base\\Util::mapArray($arr1,$arr2);\n $expected = array('key1' => 'value1');\n \\Flexio\\Tests\\Check::assertArray('A.4', '\\Flexio\\Base\\Util::mapArray(); array input', $actual, $expected, $results);\n\n // BEGIN TEST\n $arr1 = array('key1' => 'a');\n $arr2 = array('key1' => 'b');\n $actual = \\Flexio\\Base\\Util::mapArray($arr1,$arr2);\n $expected = array('key1' => 'b');\n \\Flexio\\Tests\\Check::assertArray('A.5', '\\Flexio\\Base\\Util::mapArray(); array input', $actual, $expected, $results);\n\n // BEGIN TEST\n $arr1 = array('key1' => 'b');\n $arr2 = array('key1' => 'a');\n $actual = \\Flexio\\Base\\Util::mapArray($arr1,$arr2);\n $expected = array('key1' => 'a');\n \\Flexio\\Tests\\Check::assertArray('A.6', '\\Flexio\\Base\\Util::mapArray(); array input', $actual, $expected, $results);\n\n // BEGIN TEST\n $arr1 = array('key1' => null, 'key2' => null);\n $arr2 = array('key1' => 'value1');\n $actual = \\Flexio\\Base\\Util::mapArray($arr1,$arr2);\n $expected = array('key1' => 'value1', 'key2' => null);\n \\Flexio\\Tests\\Check::assertArray('A.7', '\\Flexio\\Base\\Util::mapArray(); array input', $actual, $expected, $results);\n\n // BEGIN TEST\n $arr1 = array('key1' => null, 'key2' => null);\n $arr2 = array('key2' => 'value2');\n $actual = \\Flexio\\Base\\Util::mapArray($arr1,$arr2);\n $expected = array('key1' => null, 'key2' => 'value2');\n \\Flexio\\Tests\\Check::assertArray('A.8', '\\Flexio\\Base\\Util::mapArray(); array input', $actual, $expected, $results);\n\n // BEGIN TEST\n $arr1 = array('key1' => null, 'key2' => null);\n $arr2 = array('key2' => 'value2', 'key1' => 'value1');\n $actual = \\Flexio\\Base\\Util::mapArray($arr1,$arr2);\n $expected = array('key1' => 'value1', 'key2' => 'value2');\n \\Flexio\\Tests\\Check::assertArray('A.9', '\\Flexio\\Base\\Util::mapArray(); array input', $actual, $expected, $results);\n\n // BEGIN TEST\n $arr1 = array('key2' => null, 'key3' => null);\n $arr2 = array('key1' => 'value1', 'key2' => 'value2');\n $actual = \\Flexio\\Base\\Util::mapArray($arr1,$arr2);\n $expected = array('key2' => 'value2', 'key3' => null);\n \\Flexio\\Tests\\Check::assertArray('A.10', '\\Flexio\\Base\\Util::mapArray(); array input', $actual, $expected, $results);\n\n // BEGIN TEST\n $arr1 = array('key2' => null, 'key3' => null);\n $arr2 = array('key3' => 'value3', 'key4' => 'value4');\n $actual = \\Flexio\\Base\\Util::mapArray($arr1,$arr2);\n $expected = array('key2' => null, 'key3' => 'value3');\n \\Flexio\\Tests\\Check::assertArray('A.11', '\\Flexio\\Base\\Util::mapArray(); array input', $actual, $expected, $results);\n\n // BEGIN TEST\n $arr1 = array('key2' => null, 'key2' => null);\n $arr2 = array('key2' => 'value2', 'key3' => 'value3');\n $actual = \\Flexio\\Base\\Util::mapArray($arr1,$arr2);\n $expected = array('key2' => 'value2');\n \\Flexio\\Tests\\Check::assertArray('A.12', '\\Flexio\\Base\\Util::mapArray(); array input', $actual, $expected, $results);\n\n // BEGIN TEST\n $arr1 = array('key2' => null, 'key3' => null);\n $arr2 = array('key2' => 1, 'key2' => 2);\n $actual = \\Flexio\\Base\\Util::mapArray($arr1,$arr2);\n $expected = array('key2' => 2, 'key3' => null);\n \\Flexio\\Tests\\Check::assertArray('A.13', '\\Flexio\\Base\\Util::mapArray(); array input', $actual, $expected, $results);\n }", "title": "" }, { "docid": "b9981e317c19e898c8718d652986aeb5", "score": "0.40012923", "text": "function check_all_tests ( $in, $st, $jr ) {\r\n // Parse Input File\r\n $tests = strtok($in,\" \\r\\n\\t\");\r\n for($t=0;$t<$tests;$t++){\r\n $deg[$t] = strtok(\" \\r\\n\\t\");\r\n for($i=0;$i<$deg[$t];$i++)\r\n $A[$t][$i] = strtok(\" \\r\\n\\t\");\r\n for($i=0;$i<$deg[$t];$i++)\r\n $B[$t][$i] = strtok(\" \\r\\n\\t\");\r\n };\r\n // Parse Jury Output File\r\n $first = strtok($jr,\" \\r\\n\\t\"); // Maybe 'NO'\r\n for($t=0;$t<$tests;$t++){\r\n if (!strcmp($first,\"NO\")) { \r\n $noAnswer[$t] = true;\r\n } else {\r\n for($i=0;$i<(2*$deg[$t]-1);$i++) strtok(\" \\r\\n\\t\");\r\n };\r\n $first = strtok(\" \\r\\n\\t\");\r\n };\r\n // Parse Student Output File\r\n $first = strtok($st,\" \\r\\n\\t\"); // Maybe 'NO'\r\n for($t=0;$t<$tests;$t++){\r\n if (!strcmp($first,\"NO\")) { \r\n if(!isset($noAnswer[$t])) return false;\r\n } else {\r\n unset($P); unset($Q);\r\n $P[0] = $first;\r\n for($i=1;$i<$deg[$t];$i++) $P[$i] = strtok(\" \\r\\n\\t\");\r\n for($i=0;$i<$deg[$t];$i++) $Q[$i] = strtok(\" \\r\\n\\t\");\r\n if (!check_one_test($A[$t],$B[$t],$P,$Q,$deg[$t])) return false;\r\n };\r\n $first = strtok(\" \\r\\n\\t\");\r\n };\r\n return true;\r\n}", "title": "" }, { "docid": "b1eab819df01c6da4116cc272c132607", "score": "0.39981076", "text": "public function _getScores($que_id, $c_anss, $o_anss, $test1_id,$test2_id) {\n\n set_time_limit(0);\n $res = [];\n $i = 0; //key of res array, \n\n if(in_array($que_id,[5,6,7,13,15])){ //if que is of multiple ans type\n // echo 'ok1 <br>'; \n // if(in_array($que_id,[6])){ //if que is of multiple ans type\n // echo '<pre>before'; print_r($c_anss);\n // echo '<pre>'; print_r($o_anss);\n // echo '<pre>res'; print_r($res);// die;\n // }\n\n //step 1: check for perfect answer match \n foreach ($c_anss as $key => $c_ans) {\n // echo 'comp in2 = '.$test1_id.' - ' .$test2_id.'<br>';\n\n $scores = 0;\n $max_scores = 0; //max allowe scores\n $ans_id = $c_ans['ans_id'];\n\n foreach ($o_anss as $key1 => $o_ans) {\n \n $keys = $this->searchForId($ans_id, $o_anss);\n if($keys !== null){\n if($que_id == 5) {\n $scores += 20*2;\n $max_scores += 80;\n } else if($que_id == 13) {\n $scores += 20;\n $max_scores += 60;\n } else if($que_id == 15) {\n $scores += 20;\n $max_scores += 60;\n } else {\n $scores += 20;\n $max_scores += 40;\n }\n\n //remove perfect match entries from original table\n $c_anss = $this->unset_n_reset($c_anss, $key);\n $o_anss = $this->unset_n_reset($o_anss, $keys);\n\n $res[$test1_id][$test2_id][$que_id][$i]['c_ans_id'] = $ans_id;\n $res[$test1_id][$test2_id][$que_id][$i]['o_ans_id'] = $ans_id;\n $res[$test1_id][$test2_id][$que_id][$i]['score'] = $scores;\n $res[$test1_id][$test2_id][$que_id][$i]['max_scores'] = $max_scores;\n\n //for db save only\n $res[$test1_id][$test2_id][$que_id][$i]['test_que_1'] = $c_ans['test_que_id']; \n $res[$test1_id][$test2_id][$que_id][$i]['test_que_2'] = $o_ans['test_que_id'];\n $i++;\n }\n }\n // echo '<pre>res'; print_r($res); die;\n }\n }\n \n foreach ($c_anss as $key => $c_ans) {\n // echo 'ok2 <br>'; \n\n $ans_id = $c_ans['ans_id'];\n $test_que_id = $c_ans['test_que_id'];\n\n foreach ($o_anss as $key1 => $other_ans) {\n $scores = 0;\n $max_allowed_scores = 0;\n $other_ans_id = $other_ans['ans_id'];\n\n if($que_id == 3) {\n // Answer 1 and 3 equal 10\n // Answer 2 and 4 equal 10\n // All others equal 5\n if($ans_id == $other_ans_id) {\n $scores +=20;\n } else if( ($ans_id == 9) && ($other_ans_id == 11) ) {\n $scores +=10;\n } else if( ($ans_id == 11) && ($other_ans_id == 9) ) {\n $scores +=10;\n } else if( ($ans_id == 10) && ($other_ans_id == 12) ) {\n $scores +=10;\n } else if( ($ans_id == 12) && ($other_ans_id == 10) ) {\n $scores +=10;\n } else {\n $scores +=5;\n }\n $max_allowed_scores +=20;\n } else if($que_id == 4) {\n // Answer 1 and 3 equal 10\n // Answer 3 and 4 equal 10\n // Answer 2 and 4 equal 10\n // Answer 1 and 2 equal 0\n // Answer 2 and 3 equal 0\n // All others equal 5\n if($ans_id == $other_ans_id) {\n $scores +=20;\n } else if( ($ans_id == 13) && ($other_ans_id == 15) ) {\n $scores +=10;\n } else if( ($ans_id == 15) && ($other_ans_id == 13) ) {\n $scores +=10;\n } else if( ($ans_id == 15) && ($other_ans_id == 16) ) {\n $scores +=10;\n } else if( ($ans_id == 16) && ($other_ans_id == 15) ) {\n $scores +=10;\n } else if( ($ans_id == 13) && ($other_ans_id == 14) ) {\n $scores +=0;\n } else if( ($ans_id == 14) && ($other_ans_id == 13) ) {\n $scores +=0;\n } else if( ($ans_id == 14) && ($other_ans_id == 15) ) {\n $scores +=0;\n } else if( ($ans_id == 15) && ($other_ans_id == 14) ) {\n $scores +=0;\n } else {\n $scores +=5;\n }\n $max_allowed_scores +=20;\n } else if($que_id == 5) {\n\n // Answer 1 and 5 equal 10\n // Answer 2 and 4 equal 10\n // Answer 2 and 1,3,5 equal 0\n // All others equal 5\n\n if( ($ans_id == 17) && ($other_ans_id == 21) ) {\n $scores +=10*2;\n } else if( ($ans_id == 21) && ($other_ans_id == 17) ) {\n $scores +=10*2;\n } else if( ($ans_id == 18) && ($other_ans_id == 20) ) { \n $scores +=10*2;\n } else if( ($ans_id == 20) && ($other_ans_id == 18) ) {\n $scores +=10*2;\n } else if( ($ans_id == 18) && ($other_ans_id == 17) ) {\n $scores +=0;\n } else if( ($ans_id == 17) && ($other_ans_id == 18) ) {\n $scores +=0;\n } else if( ($ans_id == 18) && ($other_ans_id == 19) ) {\n $scores +=0;\n } else if( ($ans_id == 19) && ($other_ans_id == 18) ) {\n $scores +=0;\n } else if( ($ans_id == 18) && ($other_ans_id == 21) ) {\n $scores +=0;\n } else if( ($ans_id == 21) && ($other_ans_id == 18) ) {\n $scores +=0;\n } else {\n $scores +=0;\n } \n $max_allowed_scores += 80;\n } else if($que_id == 6) {\n // Answer 1 and 4 equal 10\n // Answer 2 and 3 equal 10\n // Answer 3 and 7 equal 5\n // Answer 5 and 6 equal 10\n // Answer 7 and 1,2,4,5,6 equal 0\n // All others equal 5 P\n\n if( ($ans_id == 22) && ($other_ans_id == 25) ) {\n $scores +=10;\n } else if( ($ans_id == 25) && ($other_ans_id == 22) ) {\n $scores +=10;\n } else if( ($ans_id == 23) && ($other_ans_id == 24) ) {\n $scores +=10;\n } else if( ($ans_id == 24) && ($other_ans_id == 23) ) {\n $scores +=10;\n } else if( ($ans_id == 24) && ($other_ans_id == 28) ) {\n $scores +=5;\n } else if( ($ans_id == 28) && ($other_ans_id == 24) ) {\n $scores +=5;\n } else if( ($ans_id == 26) && ($other_ans_id == 27) ) {\n $scores +=10;\n } else if( ($ans_id == 27) && ($other_ans_id == 26) ) {\n $scores +=10;\n } else if( ($ans_id == 28) && ($other_ans_id == 22) ) {\n $scores +=0;\n } else if( ($ans_id == 22) && ($other_ans_id == 28) ) {\n $scores +=0;\n } else if( ($ans_id == 28) && ($other_ans_id == 23) ) {\n $scores +=0;\n } else if( ($ans_id == 23) && ($other_ans_id == 28) ) {\n $scores +=0;\n } else if( ($ans_id == 28) && ($other_ans_id == 25) ) {\n $scores +=0;\n } else if( ($ans_id == 25) && ($other_ans_id == 28) ) {\n $scores +=0;\n } else if( ($ans_id == 28) && ($other_ans_id == 26) ) {\n $scores +=0;\n } else if( ($ans_id == 26) && ($other_ans_id == 28) ) {\n $scores +=0;\n } else if( ($ans_id == 28) && ($other_ans_id == 27) ) {\n $scores +=0;\n } else if( ($ans_id == 27) && ($other_ans_id == 28) ) {\n $scores +=0;\n } else {\n $scores +=5;\n }\n $max_allowed_scores += 40;\n } else if($que_id == 7) {\n // Answer 1 and 5 equal 10\n // Answer 2 and 3 equal 10\n // Answer 4 and 7 equal 10\n // Answer 2 and 3 equal 10\n // Answer 6 and 8 equal 10\n // Answer 1 and 7 equal 0\n // All others equal 5 Punkte\n // if(in_array($ans_id, $o_anss)) {\n // $scores += 20;\n // unset($c_anss[$key]);\n \n // if (($indexSpam = array_search($c_ans, $o_anss)) !== false) {\n // unset($o_anss[$indexSpam]);\n // }\n // } else {\n // // if()\n // $scores +=5;\n // }\n\n if( ($ans_id == 30) && ($other_ans_id == 34) ) {\n $scores +=10;\n } else if( ($ans_id == 34) && ($other_ans_id == 30) ) {\n $scores +=10;\n } else if( ($ans_id == 31) && ($other_ans_id == 32) ) {\n $scores +=10;\n } else if( ($ans_id == 32) && ($other_ans_id == 31) ) {\n $scores +=10;\n } else if( ($ans_id == 33) && ($other_ans_id == 36) ) {\n $scores +=10;\n } else if( ($ans_id == 36) && ($other_ans_id == 33) ) {\n $scores +=10;\n } else if( ($ans_id == 35) && ($other_ans_id == 37) ) {\n $scores +=10;\n } else if( ($ans_id == 37) && ($other_ans_id == 35) ) {\n $scores +=10;\n } else if( ($ans_id == 30) && ($other_ans_id == 36) ) {\n $scores +=0;\n } else if( ($ans_id == 36) && ($other_ans_id == 30) ) {\n $scores +=0;\n } else {\n $scores +=5;\n }\n\n // if($ans_id == $other_ans_id) {\n // $scores +=20;\n // } else {\n // $scores +=0;\n // } \n $max_allowed_scores += 40;\n } /*else if($que_id == 8) {\n \n if( ($ans_id == 38) && ($other_ans_id == 39) ) {\n $scores +=10;\n } else if( ($ans_id == 39) && ($other_ans_id == 38) ) {\n $scores +=10;\n } else if( ($ans_id == 39) && ($other_ans_id == 41) ) {\n $scores +=10;\n } else if( ($ans_id == 41) && ($other_ans_id == 39) ) {\n $scores +=10;\n } else if( ($ans_id == 40) && ($other_ans_id == 41) ) {\n $scores +=10;\n } else if( ($ans_id == 41) && ($other_ans_id == 40) ) {\n $scores +=10;\n } else if( ($ans_id == 40) && ($other_ans_id == 42) ) {\n $scores +=10;\n } else if( ($ans_id == 42) && ($other_ans_id == 40) ) {\n $scores +=10;\n } else {\n $scores +=5;\n }\n $max_allowed_scores += 30;\n }*/ /*else if($que_id == 9) {\n // Same answers 20\n // all others equal 5 Punkte\n // if($ans_id == $other_ans_id) {\n // $scores +=20*.15;\n // } else {\n // // if()\n $scores +=5*.15;\n // }\n $max_allowed_scores += 9;\n }*/ /*else if($que_id == 10) {\n // Answer 2 and 3 equal 10\n // All others equal 5 Punkte\n if($ans_id == $other_ans_id) {\n $scores +=20;\n } else if( ($ans_id == 53) && ($other_ans_id == 54) ) {\n $scores +=10;\n } else if( ($ans_id == 54) && ($other_ans_id == 53) ) {\n $scores +=10;\n } else {\n $scores +=5;\n }\n $max_allowed_scores += 20;\n }*/ /*else if($que_id == 11) {\n if($ans_id == $other_ans_id) {\n $scores +=20;\n } else if( ($ans_id == 55) && ($other_ans_id == 56) ) {\n $scores +=5;\n } else if( ($ans_id == 56) && ($other_ans_id == 55) ) {\n $scores +=5;\n }else if( ($ans_id == 57) && ($other_ans_id == 55) ) {\n $scores +=0;\n } else if( ($ans_id == 55) && ($other_ans_id == 57) ) {\n $scores +=0;\n }else if( ($ans_id == 57) && ($other_ans_id == 56) ) {\n $scores +=0;\n } else if( ($ans_id == 56) && ($other_ans_id == 57) ) {\n $scores +=0;\n } else {\n $scores +=5;\n }\n $max_allowed_scores += 20;\n }*/ /*else if($que_id == 12) {\n if($ans_id == $other_ans_id) {\n $scores +=20;\n } else if( ($ans_id == 58) && ($other_ans_id == 59) ) {\n $scores +=10;\n } else if( ($ans_id == 59) && ($other_ans_id == 58) ) {\n $scores +=10;\n }\n //Query start Answer 1,2 and 6,7 equal 0 \n else if( ($ans_id == 58) && ($other_ans_id == 63) ) {\n $scores +=0;\n } else if( ($ans_id == 63) && ($other_ans_id == 58) ) {\n $scores +=0;\n }else if( ($ans_id == 58) && ($other_ans_id == 64) ) {\n $scores +=0;\n } else if( ($ans_id == 64) && ($other_ans_id == 58) ) {\n $scores +=0;\n } else if( ($ans_id == 59) && ($other_ans_id == 63) ) {\n $scores +=0;\n } else if( ($ans_id == 63) && ($other_ans_id == 59) ) {\n $scores +=0;\n }else if( ($ans_id == 59) && ($other_ans_id == 64) ) {\n $scores +=0;\n } else if( ($ans_id == 64) && ($other_ans_id == 59) ) {\n $scores +=0;\n } \n //Query end Answer 1,2 and 6,7 equal 0 \n else {\n $scores +=5;\n }\n $max_allowed_scores += 20;\n }*/ else if($que_id == 13) {\n // Answer 1 and 2 equal 0\n // // Answer 2 and 8 equal 10\n // // Answer 5 and 6,7 equal 10\n // // Answer 4 and 7 equal 0\n // // All others equal 5\n\n if( ($ans_id == 66) && ($other_ans_id == 65) ) {\n $scores +=0;\n }else if( ($ans_id == 66) && ($other_ans_id == 72) ) {\n $scores +=10;\n }else if( ($ans_id == 72) && ($other_ans_id == 66) ) {\n $scores +=10;\n }else if( ($ans_id == 69) && ($other_ans_id == 70) ) {\n $scores +=10;\n }else if( ($ans_id == 70) && ($other_ans_id == 69) ) {\n $scores +=10;\n }else if( ($ans_id == 69) && ($other_ans_id == 71) ) {\n $scores +=10;\n } else if( ($ans_id == 71) && ($other_ans_id == 69) ) {\n $scores +=10;\n } else if( ($ans_id == 68) && ($other_ans_id == 71) ) {\n $scores +=0;\n } else if( ($ans_id == 71) && ($other_ans_id == 68) ) {\n $scores +=0;\n } else {\n $scores +=5;\n }\n\n // if($ans_id == $other_ans_id) {\n // $scores +=20;\n // } else {\n // // if()\n // $scores +=5;\n // }\n $max_allowed_scores += 60;\n } /*else if($que_id == 14) {\n if($ans_id == $other_ans_id) {\n $scores +=20;\n } else if( ($ans_id == 74) && ($other_ans_id == 75) ) {\n $scores +=5;\n } else if( ($ans_id == 75) && ($other_ans_id == 74) ) {\n $scores +=5;\n }\n //Query end\n else if( ($ans_id == 74) && ($other_ans_id == 77) ) {\n $scores +=5;\n }else if( ($ans_id == 77) && ($other_ans_id == 74) ) {\n $scores +=5;\n }else if( ($ans_id == 76) && ($other_ans_id == 77) ) {\n $scores +=0;\n }else if( ($ans_id == 77) && ($other_ans_id == 76) ) {\n $scores +=0;\n }else if( ($ans_id == 78) && ($other_ans_id == 74) ) {\n $scores +=0;\n } else if( ($ans_id == 74) && ($other_ans_id == 78) ) {\n $scores +=0;\n } else if( ($ans_id == 78) && ($other_ans_id == 75) ) {\n $scores +=0;\n } else if( ($ans_id == 75) && ($other_ans_id == 78) ) {\n $scores +=0;\n }else if( ($ans_id == 78) && ($other_ans_id == 76) ) {\n $scores +=0;\n } else if( ($ans_id == 76) && ($other_ans_id == 78) ) {\n $scores +=0;\n }else if( ($ans_id == 78) && ($other_ans_id == 77) ) {\n $scores +=0;\n } else if( ($ans_id == 77) && ($other_ans_id == 78) ) {\n $scores +=0;\n } else {\n $scores +=5;\n }\n $max_allowed_scores += 20;\n }*/ else if($que_id == 15) {\n // Answer 1 and 4 equal 10\n // Answer 2 and 5 equal 10\n // Answer 6 and 7 equal 10\n // All others equal 5\n // if(in_array($ans_id, $o_anss)) {\n // $scores += 20;\n // unset($c_anss[$key]);\n \n // if (($indexSpam = array_search($c_ans, $o_anss)) !== false) {\n // unset($o_anss[$indexSpam]);\n // }\n // } else {\n // // if()\n // $scores +=5;\n // }\n\n if( ($ans_id == 79) && ($other_ans_id == 82) ) {\n $scores +=10;\n } else if( ($ans_id == 82) && ($other_ans_id == 79) ) {\n $scores +=10;\n }else if( ($ans_id == 80) && ($other_ans_id == 83) ) {\n $scores +=10;\n }else if( ($ans_id == 83) && ($other_ans_id == 80) ) {\n $scores +=10;\n }else if( ($ans_id == 84) && ($other_ans_id == 85) ) {\n $scores +=10;\n }else if( ($ans_id == 85) && ($other_ans_id == 84) ) {\n $scores +=10;\n }else {\n $scores +=5;\n }\n\n // if($ans_id == $other_ans_id) {\n // $scores +=20;\n // } else {\n // // if()\n // $scores +=5;\n // }\n $max_allowed_scores += 60;\n\n } else if($que_id == 16) {\n if($ans_id == $other_ans_id) {\n $scores +=20;\n } else if( ($ans_id == 86) && ($other_ans_id == 89) ) {\n $scores +=0;\n } else if( ($ans_id == 89) && ($other_ans_id == 86) ) {\n $scores +=0;\n }else if( ($ans_id == 86) && ($other_ans_id == 87) ) {\n $scores +=10;\n }else if( ($ans_id == 87) && ($other_ans_id == 86) ) {\n $scores +=10;\n }else if( ($ans_id == 88) && ($other_ans_id == 89) ) {\n $scores +=10;\n }else if( ($ans_id == 89) && ($other_ans_id == 88) ) {\n $scores +=10;\n }\n //Query start Answer 1 and 4 equal 0 \n // Answer 1 and 2 equal 10 \n // Answer 3 and 4 equal 10 \n //no option for 5\n else {\n $scores +=0;\n } \n //Query end\n\n $max_allowed_scores += 20;\n } /*else if($que_id == 17) {\n if($ans_id == $other_ans_id) {\n $scores +=20;\n } else if( ($ans_id == 90) && ($other_ans_id == 92) ) {\n $scores +=10;\n } else if( ($ans_id == 92) && ($other_ans_id == 90) ) {\n $scores +=10;\n }else if( ($ans_id == 90) && ($other_ans_id == 91) ) {\n $scores +=0;\n }else if( ($ans_id == 91) && ($other_ans_id == 90) ) {\n $scores +=0;\n }else if( ($ans_id == 91) && ($other_ans_id == 92) ) {\n $scores +=10;\n }else if( ($ans_id == 92) && ($other_ans_id == 91) ) {\n $scores +=10;\n }\n //Query start Answer 1 and 3 equal 10\n // Answer 1 and 2 equal 0 \n // Answer 2 and 3 equal 10 \n //no option for defualt 5\n else {\n $scores +=0;\n } \n //Query end\n $max_allowed_scores += 20;\n }*/ /*else if($que_id == 18) {\n if($ans_id == $other_ans_id) {\n $scores +=20;\n } else if( ($ans_id == 93) && ($other_ans_id == 95) ) {\n $scores +=10;\n } else if( ($ans_id == 95) && ($other_ans_id == 93) ) {\n $scores +=10;\n }else if( ($ans_id == 93) && ($other_ans_id == 94) ) {\n $scores +=0;\n }else if( ($ans_id == 94) && ($other_ans_id == 93) ) {\n $scores +=0;\n }else if( ($ans_id == 94) && ($other_ans_id == 95) ) {\n $scores +=10;\n }else if( ($ans_id == 95) && ($other_ans_id == 94) ) {\n $scores +=10;\n }\n //Query start Answer 1 and 3 equal 10\n // Answer 1 and 2 equal 0 \n // Answer 2 and 3 equal 10 \n else {\n $scores +=0;\n } \n $max_allowed_scores += 20;\n //Query end\n }*/ else {\n $scores += 0;\n $max_allowed_scores += 00;\n }\n\n // echo \"<pre>\"; print_r($res); die;\n \n $res[$test1_id][$test2_id][$que_id][$i]['c_ans_id'] = $ans_id;\n $res[$test1_id][$test2_id][$que_id][$i]['o_ans_id'] = $other_ans_id;\n $res[$test1_id][$test2_id][$que_id][$i]['score'] = $scores;\n $res[$test1_id][$test2_id][$que_id][$i]['max_scores'] = $max_allowed_scores;\n\n //for db save only\n $res[$test1_id][$test2_id][$que_id][$i]['test_que_1'] = $c_ans['test_que_id']; \n $res[$test1_id][$test2_id][$que_id][$i]['test_que_2'] = $other_ans['test_que_id'];\n $i++;\n\n // if(in_array($que_id,[5])){ //if que is of multiple ans type\n // echo '<pre>after1111'; print_r($c_anss);\n // echo '<pre>'; print_r($o_anss);\n // echo \"<pre>res\"; print_r($res); die;\n // }\n // echo \"<pre>Res2 \"; print_r($res); //die;\n\n }\n }\n // echo \"<pre>ScoreRes \"; print_r($res); //die;\n return $res;\n }", "title": "" }, { "docid": "fb82864d45acb04edd5a3191f39bbef6", "score": "0.39888942", "text": "public function subImageMatch(\\Imagick $Imagick, array &$offset = NULL, float &$similarity = NULL): \\Imagick {}", "title": "" }, { "docid": "1e2bd6b173adca3f09ff0b9c14eaf1f5", "score": "0.39868098", "text": "public function distance($data1, $data2);", "title": "" }, { "docid": "ef88d6c9898931de020568fc8c279e1c", "score": "0.39802554", "text": "public function faceDetect(){\n\n// turn off error reporting\t\nerror_reporting(0);\n\t\n$photo_id = isset($_POST['photo']) ? $this->test_input($_POST['photo']) : '';\n$user_id = isset($_POST['user']) ? $this->test_input($_POST['user']) : '';\n\nif(!$photo_id || !is_numeric($photo_id) || !is_numeric($user_id))\n\t$response = 0; // error photo id\n\n$query = $this->db->query(\"select filename from \".tbl_photos.\" where `id`='$photo_id' limit 1\");\n$result = $query->fetch_array(MYSQLI_ASSOC);\n\nif(!$result['filename']) $response = 2; // photo not found\nelse {\t\n//echo $this->detectionDAT;\n//exit;\n\n$face_detect = new Face_Detector(__ROOT__.$this->detectionDAT);\n$face_detect->face_detect(__ROOT__.__IMG_DIR.$user_id.'/large/'.$result['filename']);\n$response = $face_detect->toJson();\n\n}\n\necho $response;\n\t\n}", "title": "" }, { "docid": "328c6aed7ec4a0686b4b89812c6e89e3", "score": "0.39797658", "text": "public function actionResults() {\n $logs = Logs::find()->all();\n\n $locations = Locations::find()->all();\n\n $accessArray = array();\n\n //Create the database array\n $dbArray = array();\n\n\n // Read in the access log file line by line and break it into ip and other info.\n // Then store in in a 2d array\n foreach ($logs as $tempString ) {\n $list = explode(\" - - \", $tempString->log);\n sscanf($list[1], '[%[^]]] \"%s %s %[^\"]\" %d - %s \"%[^\"]\"', $time, $method, $uri\n ,$code, $protocol, $website , $other);\n // Check if 404 and if it is throw it out\n if($protocol == 404){\n continue;\n }\n \n // NOTE this step was just incase I wanted to print a \"nice\" website\n // Check if spider and if it is fix the website\n if (strcmp($website, '\"-\"') == 0) {\n $plus = strpos($other, \"+\");\n $website = substr($other, $plus+3);\n $com = strpos($website, \".com\");\n $website = substr($website, 7, $com - 3);\n }\n else {\n $com = strpos($website, \".com\");\n $website = substr($website, 8, $com - 4);\n }\n // Add it to the add and get the next line\n $accessArray[] = array($list[0], $website);\n }\n\n // Read in the Database file\n foreach ($locations as $tempString) {\n $list = explode(\":\", $tempString->loc);\n $dbArray[] = array($list[0], $list[1]);\n }\n\n // Initialize the array to keep track of hits\n $numArr = array_fill(0, count($dbArray), 0);\n // Initialize the array to keep track of hits\n $webArr = array_fill(0, count($dbArray), \"\");\n // For loop to check for accesslist against database\n for ($x = 0; $x < count($accessArray); $x++) {\n for($y = 0; $y < count($dbArray); $y++){\n if($this::checkip($accessArray[$x][0], $dbArray[$y][0]) == 1){\n $numArr[$y] += 1;\n\n break;\n }\n }\n } \n\n // Create table for graph\n $table = array();\n $rows = array();\n $table['cols'] = array(\n // Labels for the chart for column titles\n array('label' => 'Location', 'type' => 'string'),\n array('label' => 'Hits', 'type' => 'number')\n );\n\n // Create nice looking table \n for($y = 0; $y < count($dbArray); $y++){\n $temp = array();\n // Locations for data\n $temp[] = array('v' => (string) $dbArray[$y][1]); \n \n // Number of hits per location for data\n $temp[] = array('v' => (int) $numArr[$y]); \n $rows[] = array('c' => $temp);\n } \n // Create table\n $table['rows'] = $rows;\n // Json encode it for the google chart\n $jsonTable = json_encode($table);\n\n\n // Create table for graph\n $webTable = array();\n $webRows = array();\n $webTable['cols'] = array(\n // Labels for the chart for column titles\n array('label' => 'Location', 'type' => 'string'),\n array('label' => 'Hits', 'type' => 'number')\n );\n\n $tempTable = array_column($accessArray,1);\n $tempTable2 = array_count_values($tempTable);\n\n $tempTableKeys = array_keys($tempTable2);\n\n // Create nice looking table \n for($y = 0; $y < count($tempTable2); $y++){\n $temp = array();\n // Locations for data\n $temp[] = array('v' => (string) $tempTableKeys[$y]); \n \n // Number of hits per location for data\n $temp[] = array('v' => (int) $tempTable2[$tempTableKeys[$y]]); \n $webRows[] = array('c' => $temp);\n } \n // Create table\n $webTable['rows'] = $webRows;\n $jsonTable2 = json_encode($webTable);\n\n // Display the Logs\n return $this->render('results', [\n 'jsonTable' => $jsonTable,\n 'jsonTable2' => $jsonTable2,\n ]);\n }", "title": "" }, { "docid": "c0f53898373c9f3ff2cfe33a26061eb5", "score": "0.3979644", "text": "protected function distribute_multiplexed_union( $fields, $strata, $hierarchy, $filteroids ){\n\t}", "title": "" }, { "docid": "4924786ae80a5cc4679d2b6da6028d93", "score": "0.39790127", "text": "public function compare($image1, $image2)\n {\n if (is_string($image1)) { // If string passed, turn it into a Image object\n $image1 = Image::createFromFile($image1);\n $this->flatten($image1);\n }\n\n if (is_string($image2)) { // If string passed, turn it into a Image object\n $image2 = Image::createFromFile($image2);\n $this->flatten($image2);\n }\n\n $hash = new DifferenceHash();\n\n $bin1 = $hash->hash($image1, $this);\n $bin2 = $hash->hash($image2, $this);\n $str1 = str_split($bin1);\n $str2 = str_split($bin2);\n $distance = 0;\n foreach ($str1 as $i => $char) {\n if ($char !== $str2[$i]) {\n $distance++;\n }\n }\n\n return $distance;\n }", "title": "" } ]
75fb43bc55004e3d5ce6739f58ace0b5
Get all test cases
[ { "docid": "4a97471dd5c4a85b0740e946651c81a6", "score": "0.0", "text": "public function testCasesInClass(XPClass $class, $arguments= NULL) {\n \n // Verify we were actually given a testcase class\n if (!$class->isSubclassOf('unittest.TestCase')) {\n throw new IllegalArgumentException('Given argument is not a TestCase class ('.xp::stringOf($class).')');\n }\n \n // Add all tests cases\n $r= array();\n foreach ($class->getMethods() as $m) {\n $m->hasAnnotation('test') && $r[]= $class->getConstructor()->newInstance(array_merge(\n (array)$m->getName(TRUE), \n (array)$arguments\n ));\n }\n \n // Verify we actually added tests by doing this.\n if (empty($r)) {\n throw new NoSuchElementException('No tests found in '.$class->getName());\n }\n return $r;\n }", "title": "" } ]
[ { "docid": "68e0722233bfa7614ed863da82b35010", "score": "0.8235862", "text": "public function getTests();", "title": "" }, { "docid": "a5da3eea1dff60ffc581715bfdd13443", "score": "0.7570049", "text": "private function _getTests() {\n\t\t$methods = get_class_methods('LIB211Tester');\n\t\tforeach ($methods as $method) {\n\t\t\tif (preg_match('/^\\_get[a-zA-Z]+Tests$/',$method)) {\n\t\t\t\t$list = $this->$method();\n\t\t\t\tforeach ($list as $entry) {\n\t\t\t\t\tarray_push($this->tests,$entry);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "71b9fd4222f102e5507db1a284a411a1", "score": "0.7481555", "text": "public function getTests()\n {\n return [];\n }", "title": "" }, { "docid": "0526f0a2676da64cb4cd2099e9421c2a", "score": "0.73280436", "text": "public function get_all_tests(){\n\t\t\t$this->db->order_by('test_name');\n\t\t\t$query = $this->db->get('text_based');\n\t\t\treturn ($query->result());\n }", "title": "" }, { "docid": "f20252c57ac92d8108d9e4cb65cfe428", "score": "0.728695", "text": "public function getTests(/* ... */)\n {\n return $this->_tests;\n }", "title": "" }, { "docid": "ca2f2d76881d52c845ed72314e9cf87c", "score": "0.72577655", "text": "public function listTestCases()\n {\n if (!is_null($this->testsCases)) {\n return $this->testsCases;\n }\n $testscases = array();\n foreach ($this->xml->testcase as $case) {\n $testcase = (object) array(\n 'name' => $case['name']\n , 'classname' => $case['classname']\n , 'type' => 'success'\n , 'time' => $case->time\n , 'nbFails' => sizeof($case->failure)\n , 'failure' => $case->failure\n );\n\n if (sizeof($case->failure) > 0) {\n $testcase->type = $case->failure[0]['type'];\n }\n\n array_push($testscases, $testcase);\n }\n $this->testsCases = $testscases;\n return $testscases;\n }", "title": "" }, { "docid": "bcfca65cedf9756cb0962942d4019e1c", "score": "0.72019076", "text": "static function all_tests()\n {\n $translation_map = [\n 'moves' => [\n \"1\" => \"Junior Moves in the Field\",\n \"2\" => \"Senior Moves in the Field\"\n ],\n 'free_skating' => [\n \"1\" => \"Junior Free Skate\",\n \"2\" => \"Junior Free Skate\"\n ],\n 'dance' => [\n \"2\" => \"Foxtrot\",\n \"3\" => \"Fourteenstep\"\n ]\n ];\n $result = [];\n foreach (self::$categories as $category) {\n $result[$category] = [];\n for ($i = 1; $i < 11; $i++) {\n $name = ucwords(str_replace('_', ' ', $category)) . \" Test \" . $i;\n if (array_key_exists($category, $translation_map)) {\n if (array_key_exists($i, $translation_map[$category])) {\n $name = $translation_map[$category][(string) $i];\n }\n }\n $result[$category][] = (object) [\n \"label\" => $name,\n \"value\" => $category . \"_\" . $i,\n \"level_id\" => $i\n ];\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "d820990d5ebf01f576fb2e28c7ba71d0", "score": "0.7161737", "text": "public function get_tests() {\n\t\t$this->test_files\t\t\t\t\t\t\t\t\t\t\t\t= array();\n\t\t\n\t\t# Get Directory Listing\n\t\t$d\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t= opendir(dirname(dirname(dirname(__FILE__))) . \"/tests/\");\n\t\twhile ($entry\t\t\t\t\t\t\t\t\t\t\t\t\t= readdir($d)) {\n\t\t\tif (substr($entry, 0, 4) == \"test\") {\n\t\t\t\t$this->test_files[]\t\t\t\t\t\t\t\t\t\t= $entry;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "23606da6353b71ac563f5db85f1e6c3c", "score": "0.7105001", "text": "protected function get_tests() {\n return array(\n \"clear_session\",\n \"get_data\",\n \"set_data\"\n );\n }", "title": "" }, { "docid": "db9f8159a15cec7beafbaab35c9f2443", "score": "0.71010345", "text": "public function getTestsResults()\n {\n return array_map(\n function ($test) {\n return $this->getTestResult($test);\n },\n $this->config->getTests()\n );\n }", "title": "" }, { "docid": "3fbbf35307ec25dbc44711bc7e7fc6fe", "score": "0.70669925", "text": "public static function &getTestCaseList() {\n\t\t$return = self::_getTestCaseList(self::_getTestsPath());\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "b3a87175964c3ff8b27ef65baad82f68", "score": "0.6960685", "text": "public function run() : array\n\t{\n\t\t$results = [];\n\t\tforeach ($this->get_tests() as $one_test) {\n\t\t\t$results[$one_test] = $this->run_one($one_test);\n\t\t}\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "b4407c4383bfb97e51c109bba499e16e", "score": "0.6930314", "text": "public function getTests()\n\t{\n\t\t//return array(\"testVoid\");\n\t\treturn parent::getTests();\n\t}", "title": "" }, { "docid": "35776f9c1731897f240c4532af79ac13", "score": "0.6930237", "text": "public function getTests() {\n\t\treturn $this->tests;\n\t}", "title": "" }, { "docid": "639f6704e335f76c9bb5c6c8a5ac9207", "score": "0.6922271", "text": "public function getTests() {\n return $this->getConfig('select_tests_to_perform');\n }", "title": "" }, { "docid": "4e9a8682b1b77845f74aeab81ded14e3", "score": "0.68640447", "text": "public function getTests()\n {\n $query = $this->db->get('test');\n if ($query->num_rows() == 0) {\n return false;\n } else {\n return $query->result_array();\n }\n }", "title": "" }, { "docid": "f810545916903ca3815af394f447a616", "score": "0.68595433", "text": "public function testCaseProvider()\n {\n $data = array();\n if ($dir = opendir(__DIR__ . $this->dir)) {\n while (($file = readdir($dir)) !== false) {\n if (strpos($file, '.txt') !== false\n && ($this->testJustSelected == false\n || $this->inArray($file, $this->selectedTests) == true)\n && ($this->ignoreErrors == false\n || in_array($file, $this->errors) == false)\n ) {\n\n try {\n $data[] = $this->runTestFromFile(file_get_contents(__DIR__ . $this->dir . '/' . $file), $file);\n } catch (\\ErrorException $error) {\n \\Geissler\\CSL\\Container::clear();\n var_dump($error->getMessage() . ' ' . $file);\n }\n }\n }\n\n closedir($dir);\n }\n\n return $data;\n }", "title": "" }, { "docid": "1138cc251de2eed0cc61f6b448256d48", "score": "0.68414706", "text": "public function runAll()\n {\n while ($this->runNext()) {\n // run until there is no test left\n }\n \n return $this->_testSuiteResult;\n }", "title": "" }, { "docid": "29e3884fba193c4d859973aba9527f26", "score": "0.68279934", "text": "public function getTests()\n {\n return $this->data['tests'];\n }", "title": "" }, { "docid": "d20cc20f11e18c8cd9d1cc5aa89080a2", "score": "0.68235534", "text": "public function getTestsOverview()\n {\n $this->db->from('test');\n $this->db->order_by(\"tid\", \"desc\");\n $this->db->limit(10);\n $query = $this->db->get();\n\n if ($query->num_rows() == 0) {\n return false;\n } else {\n return $query->result_array();\n }\n }", "title": "" }, { "docid": "30e7da3c295ed4563e77ea24e8bf8b36", "score": "0.68035537", "text": "public function all() {\n\t\t// systems online\n\t\t$this->_init();\n\n\t\t$allTests = array('fdaModelTests');\n\n\t\t// run through each test\n\t\tforeach ($allTests as $test) {\n\t\t\t$this->$test($this->unit);\n\t\t}\n\n\t\t// cleanup\n\t\t$this->_destroy();\n\t}", "title": "" }, { "docid": "21ecdf61790815c9e0e2efaf8d38cd8d", "score": "0.6790277", "text": "public function get_all_tb_tests(){\n\t\t\t$this->db->order_by('test_name');\n\t\t\t$query = $this->db->get('text_based');\n\t\t\treturn ($query->result());\n }", "title": "" }, { "docid": "5284fd3b414e9879a505fb8be62016c7", "score": "0.67238075", "text": "public function getExerciseTests(): Collection;", "title": "" }, { "docid": "4162e546733d9189a621179fe0d89157", "score": "0.67229223", "text": "public function getTests(): array\n {\n $tasksByTests = [];\n foreach ($this->tasks as $task) {\n $id = $task->getTestId();\n if ($id !== null) {\n if (!isset($tasksByTests[$id])) {\n $tasksByTests[$id] = [];\n }\n\n $tasksByTests[$id][] = $task;\n }\n }\n\n return array_map(\n function ($tasks) {\n return new TestConfig(\n $tasks[0]->getTestId(), // there is always at least one task\n $tasks\n );\n },\n $tasksByTests\n );\n }", "title": "" }, { "docid": "8b1a516a4439baebfae44c65377f394e", "score": "0.6691629", "text": "function drush_simpletest_test_list() {\n $test = new DrushSimpleTest();\n\n drush_print(\"\\nAvailable test groups & classes\");\n drush_print(\"-------------------------------\");\n $current_group = '';\n foreach ($test->get_test_classes() as $class => $details) {\n if (class_exists($class) && method_exists($class, 'getInfo')) {\n $info = call_user_func(array($class, 'getInfo'));\n if ($info['group'] != $current_group) {\n $current_group = $info['group'];\n drush_print('[' . $current_group . ']');\n }\n drush_print(\"\\t\" . $class . ' - ' . $info['name']);\n }\n }\n}", "title": "" }, { "docid": "fd0a7f3882a601da278d69fb3fc5f262", "score": "0.66601455", "text": "public function testGetAll()\n {\n $settingsCollector = new SettingsDataCollector();\n\n $index = 5;\n $testCode = 'test.settings';\n $testName = 'Test settings';\n $testDescription = 'Test description settings';\n $testValue = 'value';\n $settings = array();\n\n for($i = 0; $i <= $index; $i++){\n $setting = new Settings();\n $setting->setCode($testCode.$i);\n $setting->setName($testName.$i);\n $setting->setDescription($testDescription.$i);\n $setting->setValue($testValue.$i);\n $settingsCollector->add($setting);\n array_push($settings, $setting);\n }\n\n $results = $settingsCollector->getAll();\n \n foreach($results as $index => $setting){\n $this->assertArrayHasKey($index,$results);\n $this->assertEquals($setting,$results[$index]);\n }\n }", "title": "" }, { "docid": "9bad22eac16211c33800386f6868a328", "score": "0.6624441", "text": "public function testGetAll()\n {\n $this->skipDates = true;\n $this->getAllTest();\n }", "title": "" }, { "docid": "f06eb86b97dce46ddc13b6b8bf116e47", "score": "0.657184", "text": "public function getExerciseTestsNames(): array;", "title": "" }, { "docid": "e602354b6f07b251bb08efff226f5866", "score": "0.6530113", "text": "public function getTests()\n {\n if (!$this->extensionInitialized) {\n $this->initExtensions();\n }\n\n return $this->tests;\n }", "title": "" }, { "docid": "c0e554c413da3caaa7db81a764b557c9", "score": "0.6529955", "text": "abstract public function getTestSuite();", "title": "" }, { "docid": "d44f28b1e33dc16dc866385a3cd33bf4", "score": "0.65250045", "text": "public static function suite() {\r\n\r\n\t\t$suite = new PHPUnit_Framework_TestSuite('All Tests');\r\n\t\t$suite->addTestFile(TESTS .'Case'.DS . 'AllControllerTest.php');\r\n\t\t$suite->addTestFile(TESTS .'Case'.DS . 'AllModelTest.php');\r\n\t\treturn $suite;\r\n\t}", "title": "" }, { "docid": "1517a322cd15983e1b74b84b094929fd", "score": "0.65013987", "text": "public function listTestsAction()\n {\n $em = $this->getDoctrine()->getManager();\n $tests = $em->getRepository('InnovaSelfBundle:Test')->findAll();\n\n return array(\n 'tests' => $tests\n );\n }", "title": "" }, { "docid": "f4ce3b274b303f3730ab5b645df03acb", "score": "0.64905185", "text": "public function getTestCases($id) {\n DB_DAO::connectDatabase();\n $handler = DB_DAO::getDB()->prepare(\"SELECT c.id, c.duration, c.duration_count, c.title, c.order, GROUP_CONCAT(k.keyword SEPARATOR '|') as keywords FROM (`case` c, suite_has_case sc) LEFT JOIN (case_has_keyword ck, keyword k) ON (ck.case_id = c.id AND k.id=ck.keyword_id) WHERE c.id=sc.case_id AND sc.suite_id=:id GROUP BY c.id ORDER BY c.order, c.id ASC\");\n $handler->bindParam(':id', $id);\n\n if (!$handler->execute()) {\n DB_DAO::throwDbError($handler->errorInfo());\n }\n\n $cases = array();\n while ($row = $handler->fetch(PDO::FETCH_ASSOC)) {\n $duration = round(intval($row['duration']) / intval($row['duration_count']));\n $t = new TestCase($row['title'], $duration, $row['id'], $row['order']);\n $t->setKeywords($row['keywords'], '|');\n $t->suiteId = intval($id);\n array_push($cases, $t);\n }\n\n return $cases;\n }", "title": "" }, { "docid": "b75c3ff4d7a984bf249bddd63cb520af", "score": "0.64171046", "text": "public function example_testcases() {\n return array_filter($this->testcases, function($tc) {\n return $tc->useasexample;\n });\n }", "title": "" }, { "docid": "68d9671c4c9fbc6514e595161d4f52ac", "score": "0.6384717", "text": "public function get_tests() : array\n\t{\n\t\t$reflected_self = new \\ReflectionClass($this);\n\t\t\n\t\t$tests = [];\n\t\tforeach ($reflected_self->getMethods() as $one_method) {\n\t\t\t$my_klass_name = get_class($this);\n\t\t\t$declaring_class_name = $one_method->getDeclaringClass()->getName();\n\t\t\t$method_name = $one_method->name;\n\t\t\tif ($this->is_test($method_name)) $tests[] = $method_name;\n\t\t}\n\t\treturn $tests;\n\t}", "title": "" }, { "docid": "0af1471c66b8e85cf53c9f47e77cdada", "score": "0.6360642", "text": "public function GetPublicTests(){\n $query = $this->db->get_where('test',array('status'=>0));\n $retarray = array();\n if ($query->num_rows() == 0) {\n return $retarray;\n } else {\n $res = $query->result_array();\n foreach ($res as $key => $testr) {\n $retarray[] = array('Name'=>$testr['Name'],'CreatorName'=>$testr['CreatorName'],'uniqid'=>$testr['uniqid'],'noQ'=>$testr['noQ']);\n }\n }\n return $retarray;\n }", "title": "" }, { "docid": "2901e3ff00993cadd148f8e5706a3ab9", "score": "0.630131", "text": "public function getTestsObjects()\n {\n return $this->testsObjects;\n }", "title": "" }, { "docid": "08a05d76833dd139d342783473c90f69", "score": "0.6266908", "text": "function get_tests(){\n\tglobal $db;\n\t$query = \"SELECT * FROM tests\";\n\t$res = mysqli_query($db, $query);\n\tif(!$res) return false;\n\t$data = array();\n\twhile($row = mysqli_fetch_assoc($res)){\n\t\t$data[] = $row;\n\t}\n\treturn $data;\n}", "title": "" }, { "docid": "c326ad07a62a00205888d4e0be8e738e", "score": "0.6238603", "text": "public static function suite()\n {\n $suite = new PHPUnit_Framework_TestSuite('All Db Related Tests');\n\n $path = CORE_TEST_CASES.DS;\n\n $suite->addTestFile($path.'AllBehaviorsTest.php');\n $suite->addTestFile($path.'Controller'.DS.'Component'.DS.'PaginatorComponentTest.php');\n $suite->addTestFile($path.'AllDatabaseTest.php');\n $suite->addTestFile($path.'Model'.DS.'ModelTest.php');\n $suite->addTestFile($path.'View'.DS.'ViewTest.php');\n $suite->addTestFile($path.'View'.DS.'ScaffoldViewTest.php');\n $suite->addTestFile($path.'View'.DS.'HelperTest.php');\n $suite->addTestFile($path.'View'.DS.'Helper'.DS.'FormHelperTest.php');\n $suite->addTestFile($path.'View'.DS.'Helper'.DS.'PaginatorHelperTest.php');\n\n return $suite;\n }", "title": "" }, { "docid": "6cead6c2fee1f052f8b5407903d8e410", "score": "0.6227229", "text": "public function getTests()\n {\n //Auth\n $authKey = Input::get('key');\n if(!$this->authenticate($authKey)){\n return Response::json(array('error' => 'Authentication failed'), '403');\n }\n //Validate params\n $testType = Input::get('testtype');\n $dateFrom = Input::get('datefrom');\n $dateTo = Input::get('dateto');\n\n if( empty($testType))\n {\n return Response::json(array('error' => 'No test provided'), '404');\n }\n //Search by name / Date\n $testType = TestType::where('name', $testType)->first();\n\n if( !empty($testType) ){\n $tests = Test::with('visit.patient', 'testType.measures')\n ->where(function($query)\n {\n $query->where('test_status_id', Test::STARTED);\n })\n ->where('test_type_id', $testType->id)\n ->where('time_created', '>', $dateFrom)\n ->where('time_created', '<', $dateTo)\n ->get();\n }\n //Search by ID\n //$tests = Specimen::where('visit_id', $testFilter);\n return Response::json($tests, '200');\n }", "title": "" }, { "docid": "a36eaf6c8f37331a98138b94b858d9a1", "score": "0.6193302", "text": "public function run_all(&$test_case) {\r\n\t\t\r\n\t\t// get list of all the calling classes methods\r\n\t\t$tests = get_class_methods($test_case);\r\n\t\t\r\n\t\t// make sure there are some\r\n\t\tif(!count($tests)) { \r\n\t\t\tshow_error(sprintf('No methods found in class \"%s\"', $test_case));\r\n\t\t}\r\n\t\t\r\n\t\t// do we have a set_up and tear_down\r\n\t\t$set_up = in_array('set_up', $tests);\r\n\t\t$tear_down = in_array('tear_down', $tests);\r\n\t\t\r\n\t\t// find methods that start with 'test' and run them\r\n\t\tforeach($tests as &$test) {\r\n\t\t\tif(substr($test, 0, 4) == 'test') {\r\n\t\t\t\t// do we have a setUp\r\n\t\t\t\tif($set_up) {\r\n\t\t\t\t\t$test_case->set_up();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// run the test\r\n\t\t\t\t$test_case->$test();\r\n\t\t\t\t\r\n\t\t\t\t// do we have a tearDown\r\n\t\t\t\tif($set_up) {\r\n\t\t\t\t\t$test_case->tear_down();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// generate report and set it as output\r\n\t\t$this->report();\r\n\t}", "title": "" }, { "docid": "09b85cc5b54fecc5b528b0713c7a7bac", "score": "0.61367404", "text": "public function getTests()\n {\n $tests = array();\n\n if ($this->installer->isInstalled()) {\n // test if a quote/invoice is a specific status\n $statusList = array_unique(array_merge(\n ArrayUtil::column($this->doctrine->getRepository('CSBillQuoteBundle:Status')->getStatusList(), 'name'),\n ArrayUtil::column($this->doctrine->getRepository('CSBillInvoiceBundle:Status')->getStatusList(), 'name')\n ));\n\n if (is_array($statusList) && count($statusList) > 0) {\n foreach ($statusList as $status) {\n $tests[] = new Twig_SimpleTest($status, function ($entity) use ($status) {\n return strtolower($entity->getStatus()->getName()) === strtolower($status);\n });\n }\n }\n }\n\n return $tests;\n }", "title": "" }, { "docid": "b3280f5f106893d63070da113ad10bc6", "score": "0.61330795", "text": "public function getTestSet()\n {\n return $this->test_set;\n }", "title": "" }, { "docid": "b3280f5f106893d63070da113ad10bc6", "score": "0.61330795", "text": "public function getTestSet()\n {\n return $this->test_set;\n }", "title": "" }, { "docid": "51af139d1e58d64b817d69d1be9f7824", "score": "0.6118071", "text": "public static function suite()\n\t{\n\t\t$suite = new PHPUnit_Framework_TestSuite('All tests');\n\t\t$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(dirname(__FILE__).'/haml'));\n\t\t$haml = new PHPUnit_Framework_TestSuite('Haml');\n\t\tforeach ($files as $file)\n\t\t\tif (!$file->isDir())\n\t\t\t\tif (preg_match('/(.*?)\\.class\\.php$/ius', $file->getFilename(), $matches))\n\t\t\t\t\t$haml->addTestFile($file->getPathname());\n\t\t$suite->addTestSuite($haml);\n\t\t$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(dirname(__FILE__).'/sass'));\n\t\t$sass = new PHPUnit_Framework_TestSuite('Sass');\n\t\tforeach ($files as $file)\n\t\t\tif (!$file->isDir())\n\t\t\t\tif (preg_match('/(.*?)\\.class\\.php$/ius', $file->getFilename(), $matches))\n\t\t\t\t\t$sass->addTestFile($file->getPathname());\n\t\t$suite->addTestSuite($sass);\n\t\treturn $suite;\n\t}", "title": "" }, { "docid": "f6ab7cf3d2501f7cb8eba0d5a977da3a", "score": "0.610093", "text": "public function testGetAllPlan1()\n {\n }", "title": "" }, { "docid": "4f44ee2a8602692565764a7c6e716a5c", "score": "0.6083857", "text": "public function testGetContestsAction()\n {\n $subTest = new PaginatorSubTest($this->getUrl('get_contests'));\n $subTest->setItemsNotEmpty(true);\n $this->aclTest($subTest, [null, 'user1', 'api', 'engine', 'admin'], []);\n }", "title": "" }, { "docid": "b4aff48b5a23eda93f1370170b2669ac", "score": "0.6083748", "text": "public static function suite()\n {\n $oUnitTestSuite = new Services_AMEE_AllUnitTests();\n\n // Add all of the individual unit test classes\n $oUnitTestSuite->addTestSuite('Services_AMEE_Exception_UnitTest');\n $oUnitTestSuite->addTestSuite('Services_AMEE_BaseObject_UnitTest');\n $oUnitTestSuite->addTestSuite('Services_AMEE_BaseItemObject_UnitTest');\n $oUnitTestSuite->addTestSuite('Services_AMEE_API_UnitTest');\n $oUnitTestSuite->addTestSuite('Services_AMEE_Profile_UnitTest');\n $oUnitTestSuite->addTestSuite('Services_AMEE_ProfileItem_UnitTest');\n $oUnitTestSuite->addTestSuite('Services_AMEE_DataItem_UnitTest');\n\n // Return the test suite\n return $oUnitTestSuite;\n }", "title": "" }, { "docid": "dc3d17fc8a4ab7817244089cb053aa63", "score": "0.60791874", "text": "public static function getJsonTestCases()\n {\n return file_get_contents(\n sprintf('%s%stest_cases.json', dirname(__FILE__), DIRECTORY_SEPARATOR)\n );\n }", "title": "" }, { "docid": "8444dbbe8a2fc56dfb8356d5b83101e6", "score": "0.60619384", "text": "public static function check($tests) {\n\n $res = [];\n\n foreach ($tests as $key => $test) {\n $res[$key] = static::run($key, $test);\n }\n\n return $res;\n }", "title": "" }, { "docid": "f587646f51a76873ac2caab4ed4b6c66", "score": "0.6060712", "text": "public static function suite() {\n\t\t$suite = new CakeTestSuite('All DataTrack test');\n\n\t\t$path = CakePlugin::path('DataTrack') . 'Test' . DS . 'Case' . DS;\n\t\t$suite->addTestDirectoryRecursive($path);\n\n\t\treturn $suite;\n\t}", "title": "" }, { "docid": "88c6505bd9eade47deb39817dc953666", "score": "0.606067", "text": "private function listTestCasesByType($type)\n {\n $result = array();\n $testscases = $this->listTestCases();\n if ($type == 'all') {\n return $testscases;\n }\n\n foreach ($testscases as $case) {\n if ($case->type == $type) {\n array_push($result, $case);\n }\n }\n return $result;\n }", "title": "" }, { "docid": "f208f5d18117ab90b6861b7bf2171293", "score": "0.6059688", "text": "public function getTests()\n {\n $tests = [];\n $tests[] = new TwigTest('instance of', [$this, 'testInstanceOf']);\n\n return $tests;\n }", "title": "" }, { "docid": "df9acaef4d47a08b940aa5985e18f883", "score": "0.6050368", "text": "public function getExamples();", "title": "" }, { "docid": "5d6cc955b2442e07c0b53c7d2704df91", "score": "0.6045051", "text": "public function getAllInfos(){\n $db = Zend_Registry::get('dbAdapterReadOnly');\n\n $query = $db->select()\n ->from(array('tcer' => 'test_case_executors_response'), \n array('count' => '\n count(tcer.testCaseExpectationId)/\n (select count(tce_sub.id) from test_case_expectation tce_sub where tce_sub.testCaseId=tcex.testCaseId group by tce_sub.testCaseId)'))\n ->join(array('tcex' => 'test_case_executor'), 'tcer.testCaseExecutorId = tcex.id', \n array('last' => 'max(tcex.created)'))\n ->join(array('tc' => 'test_case'), 'tc.id=tcex.testCaseId', array('title' => 'tc.title', 'id' => 'tc.id'))\n ->where('date(tcex.created) >= ?', date('Y-m-d'))\n ->group('tcex.testCaseId');\n\n return $db->fetchAll($query);\n }", "title": "" }, { "docid": "11e4a82e5ce0a629dd4f81de8b5bec8a", "score": "0.6044404", "text": "public function testHarvestAll()\n {\n\n }", "title": "" }, { "docid": "d473ec8825b7afa62521b24384bc0bc5", "score": "0.6022313", "text": "public static function suite() {\n\t\t$suite = new \\CakeTestSuite('All Monaca Plugin tests');\n\n\t\t$path = APP . 'Plugin' . DS . 'Monaca' . DS . 'Test' . DS . 'Case' . DS;\n\t\t$suite->addTestFile($path . 'AllComponentTest.php');\n\t\t$suite->addTestFile($path . 'AllControllerTest.php');\n\t\t$suite->addTestFile($path . 'AllLibTest.php');\n\t\t$suite->addTestFile($path . 'AllViewTest.php');\n\n\t\treturn $suite;\n\t}", "title": "" }, { "docid": "9bc9dacbdf173165f8254284d5c08a5a", "score": "0.60139555", "text": "private function fetchAllTestresults(\\SimpleXMLElement $report)\n {\n return $report->xpath('/testsuites/testsuite/testcase');\n }", "title": "" }, { "docid": "d86a972c333f5242056b3c3468783c96", "score": "0.60082346", "text": "function get_all()\r\n {\r\n $debugMsg = 'Class:' . __CLASS__ . ' - Method: ' . __FUNCTION__;\r\n $sql = \"/* $debugMsg */ \" . \" SELECT testplans.*, NH.name \" .\r\n// \" FROM {$this->tables['testplans']} testplans, \" .\r\n// \" {$this->tables['nodes_hierarchy']} NH \" .\r\n \" FROM \".$this->db->get_table('testplans').\" testplans, \" .\r\n \" \".$this->db->get_table('nodes_hierarchy').\" NH \" .\r\n \" WHERE testplans.id=NH.id\";\r\n $recordset = $this->db->get_recordset($sql);\r\n return $recordset;\r\n }", "title": "" }, { "docid": "ca86f5b353c40d6e4cc9962fa397c131", "score": "0.59964705", "text": "public static function suite() {\n $suite = new PHPUnit_Framework_TestSuite('All Tests');\n \n $basePath = App::pluginPath('IMCake') . 'Test' . DS . 'Case' . DS;\n \n $suite->addTestFile($basePath . 'View' . DS . 'Helper' . DS . 'IMCakeHelperTest.php');\n return $suite;\n }", "title": "" }, { "docid": "8c7f17f91b9b7709d0f7316656d698dc", "score": "0.59891987", "text": "public function getSuiteTests($suiteId)\n {\n return $this->_suites[$suiteId]['tests'];\n }", "title": "" }, { "docid": "78d4eb8ecf967a86969768df2cab96ac", "score": "0.5954246", "text": "function get_testsuites($id)\r\n {\r\n $debugMsg = 'Class:' . __CLASS__ . ' - Method: ' . __FUNCTION__;\r\n $sql = \" /* $debugMsg */ SELECT NHTSUITE.name, NHTSUITE.id, NHTSUITE.parent_id\" . \r\n// \" FROM {$this->tables['testplan_tcversions']} TPTCV, {$this->tables['nodes_hierarchy']} NHTCV, \" .\r\n// \" {$this->tables['nodes_hierarchy']} NHTCASE, {$this->tables['nodes_hierarchy']} NHTSUITE \" . \r\n \" FROM \".$this->db->get_table('testplan_tcversions').\" TPTCV, \".$this->db->get_table('nodes_hierarchy').\" NHTCV, \" .\r\n \" \".$this->db->get_table('nodes_hierarchy').\" NHTCASE, \".$this->db->get_table('nodes_hierarchy').\" NHTSUITE \" .\r\n \" WHERE TPTCV.tcversion_id = NHTCV.id \" .\r\n \" AND NHTCV.parent_id = NHTCASE.id \" .\r\n \" AND NHTCASE.parent_id = NHTSUITE.id \" .\r\n \" AND TPTCV.testplan_id = \" . $id . \" \" .\r\n \" GROUP BY NHTSUITE.name,NHTSUITE.id,NHTSUITE.parent_id \" .\r\n \" ORDER BY NHTSUITE.name\" ;\r\n \r\n $recordset = $this->db->get_recordset($sql);\r\n \r\n // Now the recordset contains testsuites that have child test cases.\r\n // However there could potentially be testsuites that only have grandchildren/greatgrandchildren\r\n // this will iterate through found test suites and check for \r\n $superset = $recordset;\r\n foreach($recordset as $value)\r\n {\r\n $superset = array_merge($superset, $this->get_parenttestsuites($value['id']));\r\n } \r\n \r\n // At this point there may be duplicates\r\n $dup_track = array();\r\n foreach($superset as $value)\r\n {\r\n if (!array_key_exists($value['id'],$dup_track))\r\n {\r\n $dup_track[$value['id']] = true;\r\n $finalset[] = $value;\r\n } \r\n } \r\n \r\n // Needs to be alphabetical based upon name attribute \r\n usort($finalset, array(\"testplan\", \"compare_name\"));\r\n return $finalset;\r\n }", "title": "" }, { "docid": "4ba64d79212ed888ef42606c3cbcb2ef", "score": "0.5945759", "text": "public function getTest()\r\n {\r\n $getResults = $this->qbuilder()\r\n ->newQuery()\r\n ->select('*')\r\n ->from('wp_users')\r\n ->execute()\r\n ->fetchAll('obj');\r\n \r\n return $getResults;\r\n }", "title": "" }, { "docid": "0c077aec1b82a35eeee42c29565723cf", "score": "0.5925553", "text": "function runAllTests()\n{\n $results = array();\n array_push($results, array(\n TESTdownloadFile(),\n \"TESTdownloadFile\"\n ));\n array_push($results, array(\n TESTcsvToArray(),\n \"TESTcsvToArray\"\n ));\n array_push($results, array(\n TESTmergeArrays(),\n \"TESTmergeArrays\"\n ));\n array_push($results, array(\n TESTcleanArray(),\n \"TESTcleanArray\"\n ));\n array_push($results, array(\n TESTarrayToWantedFormat(),\n \"TESTarrayToWantedFormat\"\n ));\n array_push($results, array(\n TESTarrayToJSON(),\n \"TESTarrayToJSON\"\n ));\n array_push($results, array(\n TESTsaveJSONFile(),\n \"TESTsaveJSONFile\"\n ));\n\n $numberOfTestsFailed = 0;\n foreach ($results as $element) {\n if ($element[0]) {\n echo \"Test:\" . $element[1] . \" passed\\n\";\n } else {\n echo \"Test:\" . $element[1] . \" failed\\n\";\n $numberOfTestsFailed++;\n }\n }\n if ($numberOfTestsFailed == 0) {\n echo \"All tests passed\";\n } else {\n echo $numberOfTestsFailed . \" tests failed\";\n }\n}", "title": "" }, { "docid": "682c18ff0653c9fa87e534380de6cb9a", "score": "0.5924212", "text": "public function testSelectAll() {\n $testUser = [];\n $testUser[0] = new User();\n $testUser[0]->setUsername('testUser');\n $testUser[0]->create();\n\n $testUser[1] = new User();\n $testUser[1]->setUsername('testUser2');\n $testUser[1]->create();\n\n // Create a test news category\n $testNewsCategory = [];\n $testNewsCategory[0] = new NewsCategory();\n $testNewsCategory[0]->setName('testCategory');\n $testNewsCategory[0]->create();\n\n $testNewsCategory[1] = new NewsCategory();\n $testNewsCategory[1]->setName('testCategory2');\n $testNewsCategory[1]->create();\n\n // Create test news\n $testNews = [];\n\n $testNews[0] = new News();\n $testNews[0]->setAuthorID($testUser[0]->getID());\n $testNews[0]->setNewsCategoryID($testNewsCategory[0]->getID());\n $testNews[0]->setTitle('testTitle');\n $testNews[0]->setThumbnail('/file/img.png');\n $testNews[0]->setTeaser('testTeaser');\n $testNews[0]->setBody('testBody');\n $testNews[0]->setPublished(true);\n $testNews[0]->setMembersOnly(false);\n $testNews[0]->setCommentsAllowed(true);\n $testNews[0]->create();\n\n $testNews[1] = new News();\n $testNews[1]->setAuthorID($testUser[1]->getID());\n $testNews[1]->setNewsCategoryID($testNewsCategory[1]->getID());\n $testNews[1]->setTitle('testTitle2');\n $testNews[1]->setThumbnail('/file/img2.png');\n $testNews[1]->setTeaser('testTeaser2');\n $testNews[1]->setBody('testBody2');\n $testNews[1]->setPublished(true);\n $testNews[1]->setMembersOnly(false);\n $testNews[1]->setCommentsAllowed(true);\n $testNews[1]->create();\n\n // Select and check multiple\n $selectedMultiple = News::select(array($testNews[1]->getID(), $testNews[2]->getID()));\n\n $this->assertTrue(\\is_array($selectedMultiple));\n $this->assertEquals(2, \\count($selectedMultiple));\n $this->assertInstanceOf(News::class, $selectedMultiple[0]);\n $this->assertInstanceOf(News::class, $selectedMultiple[1]);\n\n if($testNews[0]->getID() == $selectedMultiple[0]->getID()) {\n $i = 0;\n $j = 1;\n }\n else {\n $i = 1;\n $j = 0;\n }\n\n $this->assertEquals($testNews[0]->getID(), $selectedMultiple[$i]->getID());\n $this->assertEquals($testNews[0]->getAuthorID(), $selectedMultiple[$i]->getAuthorID());\n $this->assertEquals($testNews[0]->getNewsCategoryID(), $selectedMultiple[$i]->getNewsCategoryID());\n $this->assertEquals($testNews[0]->getTitle(), $selectedMultiple[$i]->getTitle());\n $this->assertEquals($testNews[0]->getThumbnail(), $selectedMultiple[$i]->getThumbnail());\n $this->assertEquals($testNews[0]->getTeaser(), $selectedMultiple[$i]->getTeaser());\n $this->assertEquals($testNews[0]->getBody(), $selectedMultiple[$i]->getBody());\n $this->assertEquals($testNews[0]->getPublished(), $selectedMultiple[$i]->getPublished());\n $this->assertEquals($testNews[0]->getMembersOnly(), $selectedMultiple[$i]->getMembersOnly());\n $this->assertEquals($testNews[0]->getCommentsAllowed(), $selectedMultiple[$i]->getCommentsAllowed());\n\n $this->assertEquals($testNews[1]->getID(), $selectedMultiple[$j]->getID());\n $this->assertEquals($testNews[1]->getAuthorID(), $selectedMultiple[$j]->getAuthorID());\n $this->assertEquals($testNews[1]->getNewsCategoryID(), $selectedMultiple[$j]->getNewsCategoryID());\n $this->assertEquals($testNews[1]->getTitle(), $selectedMultiple[$j]->getTitle());\n $this->assertEquals($testNews[1]->getThumbnail(), $selectedMultiple[$j]->getThumbnail());\n $this->assertEquals($testNews[1]->getTeaser(), $selectedMultiple[$j]->getTeaser());\n $this->assertEquals($testNews[1]->getBody(), $selectedMultiple[$j]->getBody());\n $this->assertEquals($testNews[1]->getPublished(), $selectedMultiple[$j]->getPublished());\n $this->assertEquals($testNews[1]->getMembersOnly(), $selectedMultiple[$j]->getMembersOnly());\n $this->assertEquals($testNews[1]->getCommentsAllowed(), $selectedMultiple[$j]->getCommentsAllowed());\n\n // Clean up\n foreach($testNews as $news) {\n $news->delete();\n }\n foreach($testNewsCategory as $newsCategory) {\n $newsCategory->delete();\n }\n foreach($testUser as $user) {\n $user->delete();\n }\n }", "title": "" }, { "docid": "f5b51b55403540faf4eed8125f651085", "score": "0.5920552", "text": "function getMulticTests(){\n\t\t$mc_tests = Tests::getMcTests();\t\t\n\t\t\t\n\t\t//Simplify multidimensional array\n\t\t$mct = array();\n\t\t\n\t\t//Loop through array, get only test id\n\t\tforeach($mc_tests as $mc){\n\t\t\tarray_push($mct, $mc['id']);\n\t\t}\n\t\t\t\n\t\t//Return simplified array\n\t\t\treturn $mct;\t\n\t}", "title": "" }, { "docid": "ec33e1a7cc56ea5b4df675cc0c684aff", "score": "0.5912928", "text": "public static function suite() {\n\t\t\n\t\t//Exclude thrid party plugins\n\t\t$exclude = array(\n\t\t\t'AuditLog',\n\t\t\t'DebugKit',\n\t\t\t'Search',\n\t\t\t'Tags'\n\t\t);\n\t\t\n\t\t$suite = new self;\n\t\tforeach(App::objects('plugin') as $plugin):\n\t\t\tif(!in_array($plugin, $exclude)){\n\t\t\t\ttry{\n\t\t\t\t\t$suite->addTestFiles($suite->getTestFiles($plugin));\n\t\t\t\t}catch(Exception $e){\n\t\t\t\t\tdebug(\"Missing Test Cases for {$plugin}\");\n\t\t\t\t}\n\n\t\t\t}\n\t\tendforeach;\n\t\treturn $suite;\n\t}", "title": "" }, { "docid": "017e00cc3775f300b9e2bf3193572d80", "score": "0.59109485", "text": "function testAll(string $command) {\n if ($command !== \"all\") {\n return;\n }\n $files = array_diff(scandir('.'), array('..', '.','test.php','test'));\n foreach ($files as $file) {\n $this->testItem($file);\n }\n exit();\n }", "title": "" }, { "docid": "ae7eb3154795e3d0aaa8f606749d7a0b", "score": "0.59086573", "text": "public function testCaseProvider() {\n $data = array();\n foreach (file('test_data.txt') as $line) {\n $data[] = explode(\"\\t\", trim($line));\n }\n\n return $data;\n }", "title": "" }, { "docid": "369dfbaabcdd15bfa7a422e51e02cd49", "score": "0.590308", "text": "public static function TESTCASES()\n\t{\n\t\treturn [\n\t\t\t'GI' => [\n\t\t\t\t\t\t'fixture' => [['GET', '/' ], [], [] ],\n\t\t\t\t\t\t'expectation' => Maybe::just([self::IS_FILENAME, 'GET.html'])\n\t\t\t],\n\t\t\t'PI' => [\n\t\t\t\t\t\t'fixture' => [['POST', '/' ], [], [] ],\n\t\t\t\t\t\t'expectation' => Maybe::nothing()\n\t\t\t],\n\t\t\t'GS' => [\n\t\t\t\t\t\t'fixture' => [['GET', '/student' ], [], [] ],\n\t\t\t\t\t\t'expectation' => Maybe::just([self::IS_FILENAME, 'GET-student.html'])\n\t\t\t],\n\t\t\t'PS' => [\n\t\t\t\t\t\t'fixture' => [['POST', '/student' ], [], [] ],\n\t\t\t\t\t\t'expectation' => Maybe::nothing()\n\t\t\t],\n\t\t\t'GS1' => [\n\t\t\t\t\t\t'fixture' => [['GET', '/student/2' ], [], [] ],\n\t\t\t\t\t\t'expectation' => Maybe::just([self::IS_FILENAME, 'GET-student-2.html'])\n\t\t\t],\n\t\t\t'GS0' => [\n\t\t\t\t\t\t'fixture' => [['GET', '/student/' ], [], [] ],\n\t\t\t\t\t\t'expectation' => Maybe::nothing()\n\t\t\t],\n\t\t\t'GS_' => [\n\t\t\t\t\t\t'fixture' => [['GET', '/student/1a2' ], [], [] ],\n\t\t\t\t\t\t'expectation' => Maybe::nothing()\n\t\t\t],\n\t\t\t'PS1' => [\n\t\t\t\t\t\t'fixture' => [['POST', '/student/2' ], [], ['name' => 'Joan', 'email' => '[email protected]']],\n\t\t\t\t\t\t'expectation' => Maybe::just([self::IS_DIRECT_TEXT, ''])\n\t\t\t],\n\t\t\t'GS2' => [\n\t\t\t\t\t\t'fixture' => [['GET', '/student/2' ], [], [] ],\n\t\t\t\t\t\t'expectation' => Maybe::just([self::IS_FILENAME, 'GET-student-22.html'])\n\t\t\t],\n\t\t\t'PS2' => [\n\t\t\t\t\t\t'fixture' => [['POST', '/student/2' ], [], ['name' => 'Joe', 'is_male' => 'on', 'email' => '[email protected]']],\n\t\t\t\t\t\t'expectation' => Maybe::just([self::IS_DIRECT_TEXT, ''])\n\t\t\t],\n\t\t\t'GS3' => [\n\t\t\t\t\t\t'fixture' => [['GET', '/student/2' ], [], [] ],\n\t\t\t\t\t\t'expectation' => Maybe::just([self::IS_FILENAME, 'GET-student-2.html'])\n\t\t\t],\n\t\t\t'PS0' => [\n\t\t\t\t\t\t'fixture' => [['POST', '/student/' ], [], [] ],\n\t\t\t\t\t\t'expectation' => Maybe::nothing()\n\t\t\t],\n\t\t\t'PS_' => [\n\t\t\t\t\t\t'fixture' => [['POST', '/student/1a2' ], [], [] ],\n\t\t\t\t\t\t'expectation' => Maybe::nothing()\n\t\t\t],\n\t\t\t'GN' => [\n\t\t\t\t\t\t'fixture' => [['GET', '/nonexisting' ], [], [] ],\n\t\t\t\t\t\t// builtin server passes it to index, even if no router file test\n\t\t\t\t\t\t'expectation' => Maybe::nothing()\n\t\t\t],\n\t\t\t'GNE' => [\n\t\t\t\t\t\t'fixture' => [['POST', '/nonexisting.php'], [], [] ],\n\t\t\t\t\t\t// builtin server tries to serve it as a file\n\t\t\t\t\t\t'expectation' => Maybe::nothing()\n\t\t\t],\n\t\t\t'IPA' => [\n\t\t\t\t\t\t'fixture' => [['GET', '/index.php/aaa' ], [], [] ],\n\t\t\t\t\t\t// builtin server tries to serve it as a file\n\t\t\t\t\t\t'expectation' => Maybe::nothing()\n\t\t\t],\n\t\t];\n\t}", "title": "" }, { "docid": "ba9fda68ceacdff6b2548e563249faa7", "score": "0.58847237", "text": "public function testGetAll()\n {\n $adminDirectoryUseCase = new AdminDirectoryUseCase(new EloquentUserRepository());\n $response = $adminDirectoryUseCase->getAll();\n\n $this->assertCount(2, $response);\n }", "title": "" }, { "docid": "72c0b05b70954b8f00ff9e1f76b28154", "score": "0.5883324", "text": "public function caseProvider()\n {\n $allNameGetters = $this->getGettersToCheck();\n\n $testCases = [];\n $files = $this->getFilesToAnalyze();\n foreach ($files as $fileList) {\n foreach ($fileList as $fileName) {\n $fileName = stream_resolve_include_path($fileName);\n $fileNode = ReflectionEngine::parseFile($fileName);\n\n $reflectionFile = new ReflectionFile($fileName, $fileNode);\n include_once $fileName;\n foreach ($reflectionFile->getFileNamespaces() as $fileNamespace) {\n foreach ($fileNamespace->getClasses() as $parsedClass) {\n $refClass = new \\ReflectionClass($parsedClass->getName());\n foreach ($refClass->getProperties() as $classProperty) {\n $caseName = $parsedClass->getName() . '->' . $classProperty->getName();\n foreach ($allNameGetters as $getterName) {\n $testCases[$caseName . ', ' . $getterName] = [\n $parsedClass,\n $classProperty,\n $getterName\n ];\n }\n }\n }\n }\n }\n }\n\n return $testCases;\n }", "title": "" }, { "docid": "bab78a0fea9001572e373105cbbdaf8d", "score": "0.587412", "text": "public function testGetAll() {\n // Create\n $this->phactory->create( 'categories' );\n\n // Get\n $categories = $this->category->get_all();\n $category = current( $categories );\n\n $this->assertContainsOnlyInstancesOf( 'Category', $categories );\n $this->assertEquals( self::NAME, $category->name );\n $this->assertEquals( $categories, Category::$categories );\n }", "title": "" }, { "docid": "ff0c2d02dc3d2e2979bd32aa6a1d7448", "score": "0.58697444", "text": "public function getCasesList(){\n return $this->_get(1);\n }", "title": "" }, { "docid": "07dee4ef18f209642d60299c9400bb5f", "score": "0.58675987", "text": "public function getTestCasesDetailed($id) {\n DB_DAO::connectDatabase();\n $handler = DB_DAO::getDB()->prepare(\"SELECT c.id, c.duration, c.duration_count, c.title, c.steps, c.result, c.order, GROUP_CONCAT(k.keyword SEPARATOR '|') as keywords FROM (`case` c, suite_has_case sc) LEFT JOIN (case_has_keyword ck, keyword k) ON (ck.case_id = c.id AND k.id=ck.keyword_id) WHERE c.id=sc.case_id AND sc.suite_id=:id GROUP BY c.id ORDER BY c.order, c.id ASC\");\n $handler->bindParam(':id', $id);\n\n if (!$handler->execute()) {\n DB_DAO::throwDbError($handler->errorInfo());\n }\n\n $cases = array();\n while ($row = $handler->fetch(PDO::FETCH_ASSOC)) {\n $duration = round(intval($row['duration']) / intval($row['duration_count']));\n $t = new TestCase($row['title'], $duration, $row['id'], $row['order']);\n $t->setKeywords($row['keywords'], '|');\n $t->steps = $row['steps'];\n $t->result = $row['result'];\n array_push($cases, $t);\n }\n\n return $cases;\n }", "title": "" }, { "docid": "cbaf2e6997b8fef320e5e754cb5778f1", "score": "0.58553594", "text": "public function getUseCases()\n {\n return $this->use_cases;\n }", "title": "" }, { "docid": "cab51efd0322d80557c6675753a2f27a", "score": "0.585381", "text": "public function runAllTests(&$reporter) {\n\t\t$testCases = $this->_getTestFileList($this->_getTestsPath());\n\n\t\tif ($this->appTest) {\n\t\t\t$test = $this->getTestSuite(__('All App Tests', true));\n\t\t} else if ($this->pluginTest) {\n\t\t\t$test = $this->getTestSuite(sprintf(__('All %s Plugin Tests', true), Inflector::humanize($this->pluginTest)));\n\t\t} else {\n\t\t\t$test = $this->getTestSuite(__('All Core Tests', true));\n\t\t}\n\n\t\tforeach ($testCases as $testCase) {\n\t\t\t$test->addTestFile($testCase);\n\t\t}\n\n\t\treturn $this->run($reporter);\n\t}", "title": "" }, { "docid": "693def96c2c765bf66bea129f680a01b", "score": "0.58436996", "text": "public function controlTests()\n\t{\n\t\treturn $this->hasMany('ControlTest');\n\t}", "title": "" }, { "docid": "7d175318b993163ab642c307dcd56383", "score": "0.58323765", "text": "public static function suite() {\n $path = APP . 'Test' . DS . 'Case' . DS;\n $suite = new CakeTestSuite('All tests');\n\n $suite->addTestDirectory($path . 'Model' . DS);\n return $suite;\n }", "title": "" }, { "docid": "5b01d93fa4a194c55e403e9ffac33044", "score": "0.5812871", "text": "protected function getTestsByGroups() {\n $testLoader = new \\Codeception\\TestLoader($this->testsFrom);\n $testLoader->loadTests();\n $tests = $testLoader->getTests();\n\n $groupArray = [];\n // Analyze each test case\n foreach ($tests as $test) {\n list($class, $method) = explode(\"::\",TestCase::getTestSignature($test));\n\n // Create reflection method to analyze doc comment\n $annotation = new \\ReflectionMethod($class, $method);\n // Iterate over each line of doc comment\n foreach(explode(PHP_EOL, $annotation) as $line) {\n // Save test into groups mentioned in annotation\n if (preg_match('@group\\s(.*)$@', $line, $group)) {\n $group = $group[1];\n // Create key if group was not mentioned before\n if (!array_key_exists($group, $groupArray)) {\n $groupArray[$group] = array();\n }\n array_push($groupArray[$group], TestCase::getTestFullName($test));\n }\n }\n }\n return $groupArray;\n }", "title": "" }, { "docid": "0bdd71ffc7c468cbb1702804af0b537c", "score": "0.5801717", "text": "public function testGetContestAction()\n {\n $contest1Id = $this->fixtures->getReference('contest1')->getId();\n\n $subTest = new GetSubTest($this->getUrl('get_contest', ['id' => $contest1Id]));\n $subTest->setItemKeys(['id', 'name', 'start_ts', 'languages']);\n $this->aclTest($subTest, [null, 'user1', 'api', 'engine', 'admin'], []);\n }", "title": "" }, { "docid": "57c4ff2a839405267603c4b11a023026", "score": "0.5799954", "text": "public function fetchAllSemesterTest()\n {\n $this->json('GET', 'api/semesters', ['Accept' => 'application/json'])\n ->assertStatus(200);\n }", "title": "" }, { "docid": "d02a33c2faca3f3556c869a204bb4687", "score": "0.57982254", "text": "public static function suite()\n {\n\t\tself::createTestDb();\n\t\trequire_once('integration_tests/data_model_test.php');\n\t\trequire_once('integration_tests/data_item_test.php');\n\t\trequire_once('integration_tests/article_test.php');\n $suite = new Cognifty_TestSuite_Integration( 'phpUnderControl - Integration Tests' );\n\n\t\t$suite->addTestSuite('Cgn_DataModel_Test');\n\t\t$suite->addTestSuite('Cgn_DataItem_Integration_Test');\n\t\t$suite->addTestSuite('Cgn_Article_Test');\n\n return $suite;\n }", "title": "" }, { "docid": "285bdba5baa59ff10dd975e76c0ed2f1", "score": "0.57935715", "text": "public function getTests(?int $ttl = null) : array\n {\n // Check cache\n if ($ttl !== null && $this->cache->has('tests')) {\n $tests = $this->cache->get('tests');\n\n if ($tests !== null) {\n return $tests;\n }\n }\n\n /** @var ResponseInterface $response */\n $response = $this->client->request('GET', 'Tests');\n\n if ($response->getStatusCode() !== 200) {\n $this->log->critical('Getting test list failed: {code} {reason}', [\n 'reason' => $response->getReasonPhrase(),\n 'code' => $response->getStatusCode()\n ]);\n\n return [];\n }\n\n // List of tests\n $rawTests = json_decode($response->getBody()->getContents());\n $tests = [];\n\n foreach ($rawTests as $test) {\n $tests[$test->TestID] = $test;\n }\n\n // Store in cache\n if ($ttl !== null) {\n $this->cache->set('tests', $tests, $ttl);\n }\n\n return $tests;\n }", "title": "" }, { "docid": "2f3c0b78c49d8a89dc8ff35c11f10354", "score": "0.5791174", "text": "public static function suite() {\n\t\t$suite = new CakeTestSuite('All Controller tests');\n\n\t\t$path = APP_TEST_CASES . DS . 'Controller' . DS;\n\n\t\t//$suite->addTestFile($path . 'FooControllerTest.php');\n\n\t\treturn $suite;\n\t}", "title": "" }, { "docid": "12ca1ab18ba065f443b7dfe779a2cf95", "score": "0.57815886", "text": "public function generateSampleTests() {\n if (!$this->withSampleTests) {\n return;\n }\n $this->logHeader('Creating sample tests for each suite');\n\n $this->client->codeceptFromHost('g:test unit UnitSample');\n $this->client->codeceptFromHost('g:wpunit wpunit WpUnitSample');\n $this->client->codeceptFromHost('g:cest acceptance AcceptanceSample');\n $this->client->codeceptFromHost('g:cest functional FunctionalSample');\n if ($this->client->getConfig()->useSelenoid) {\n $this->client->codeceptFromHost('g:cest selenium-bridge SelBridgeSample');\n $this->client->codeceptFromHost('g:cest selenium-localhost SelLocalhostSample');\n }\n }", "title": "" }, { "docid": "aef9b299a16f6bca8d60a4e275b03dfe", "score": "0.5776413", "text": "public function testGetAll()\n\t{\n\t\t$this->assertEquals($this->params, $this->input->getAll());\n\t\t$this->assertEquals($this->params['get'], $this->input->getAll('get'));\n\t\t$this->assertEquals(\n\t\t\t$this->params['post'], \n\t\t\t$this->input->getAll('post')\n\t\t);\n\n\t\t$this->assertEquals(\n\t\t\t$this->params['files'], \n\t\t\t$this->input->getAll('files')\n\t\t);\n\n\t\t$this->assertEquals(\n\t\t\t$this->params['cookie'], \n\t\t\t$this->input->getAll('cookie')\n\t\t);\n\n\t\t$this->assertEquals(\n\t\t\t$this->params['argv'], \n\t\t\t$this->input->getAll('argv')\n\t\t);\n\n\t\t$input = new AppInput('get');\n\t\t$result = $input->getAll();\n\t\t$expected = array(\n\t\t\t'get'\t => array(),\n\t\t\t'post'\t => array(),\n\t\t\t'files' => array(),\n\t\t\t'cookie' => array(),\n\t\t\t'argv' => array()\n\t\t);\n\t\t$this->assertEquals($expected, $result);\n\t}", "title": "" }, { "docid": "db5be51e644c869813b431ea1e375956", "score": "0.5750878", "text": "abstract protected function getExamples(): array;", "title": "" }, { "docid": "431318d9aea55b4b606067c2d2c3eee5", "score": "0.57468367", "text": "public function testSelectAll() {\n $testUser = [];\n $testUser[0] = new User();\n $testUser[0]->setUsername('testUser');\n $testUser[0]->create();\n\n $testUser[1] = new User();\n $testUser[1]->setUsername('testUser2');\n $testUser[1]->create();\n\n // Create a test intelligence type\n $testIntelligenceType = [];\n $testIntelligenceType[0] = new IntelligenceType();\n $testIntelligenceType[0]->setName('testIntelligenceType');\n $testIntelligenceType[0]->create();\n\n $testIntelligenceType[1] = new IntelligenceType();\n $testIntelligenceType[1]->setName('testIntelligenceType2');\n $testIntelligenceType[1]->create();\n\n // Create a test intelligence\n $testIntelligence = [];\n $testIntelligence[0] = new Intelligence();\n $testIntelligence[0]->setAuthorID($testUser[0]->getID());\n $testIntelligence[0]->setIntelligenceTypeID($testIntelligenceType[0]->getID());\n $testIntelligence[0]->setSubject('testSubject');\n $testIntelligence[0]->setBody('testBody');\n $testIntelligence[0]->setTimestamp(123);\n $testIntelligence[0]->setPublic(false);\n $testIntelligence[0]->create();\n\n $testIntelligence[1] = new Intelligence();\n $testIntelligence[1]->setAuthorID($testUser[1]->getID());\n $testIntelligence[1]->setIntelligenceTypeID($testIntelligenceType[1]->getID());\n $testIntelligence[1]->setSubject('testSubject2');\n $testIntelligence[1]->setBody('testBody2');\n $testIntelligence[1]->setTimestamp(12345);\n $testIntelligence[1]->setPublic(false);\n $testIntelligence[1]->create();\n\n // Get and check multiple\n $selectedMultiple = Intelligence::select(array());\n\n $this->assertTrue(\\is_array($selectedMultiple));\n $this->assertEquals(1, \\count($selectedMultiple));\n $this->assertInstanceOf(Intelligence::class, $selectedMultiple[0]);\n $this->assertInstanceOf(Intelligence::class, $selectedMultiple[0]);\n\n if($testIntelligence[0]->getID() == $selectedMultiple[0]->getID()) {\n $i = 0;\n $j = 1;\n }\n else {\n $i = 1;\n $j = 0;\n }\n\n $this->assertEquals($testIntelligence[0]->getID(), $selectedMultiple[$i]->getID());\n $this->assertEquals($testIntelligence[0]->getAuthorID(), $selectedMultiple[$i]->getAuthorID());\n $this->assertEquals($testIntelligence[0]->getIntelligenceTypeID(), $selectedMultiple[$i]->getIntelligenceTypeID());\n $this->assertEquals($testIntelligence[0]->getSubject(), $selectedMultiple[$i]->getSubject());\n $this->assertEquals($testIntelligence[0]->getBody(), $selectedMultiple[$i]->getBody());\n $this->assertEquals($testIntelligence[0]->getTimestamp(), $selectedMultiple[$i]->getTimestamp());\n $this->assertEquals($testIntelligence[0]->getPublic(), $selectedMultiple[$i]->getPublic());\n\n $this->assertEquals($testIntelligence[1]->getID(), $selectedMultiple[$j]->getID());\n $this->assertEquals($testIntelligence[1]->getAuthorID(), $selectedMultiple[$j]->getAuthorID());\n $this->assertEquals($testIntelligence[1]->getIntelligenceTypeID(), $selectedMultiple[$j]->getIntelligenceTypeID());\n $this->assertEquals($testIntelligence[1]->getSubject(), $selectedMultiple[$j]->getSubject());\n $this->assertEquals($testIntelligence[1]->getBody(), $selectedMultiple[$j]->getBody());\n $this->assertEquals($testIntelligence[1]->getTimestamp(), $selectedMultiple[$j]->getTimestamp());\n $this->assertEquals($testIntelligence[1]->getPublic(), $selectedMultiple[$j]->getPublic());\n\n // Clean up\n foreach($testIntelligence as $intelligence) {\n $intelligence->delete();\n }\n foreach($testUser as $user) {\n $user->delete();\n }\n foreach($testIntelligenceType as $intelligenceType) {\n $intelligenceType->delete();\n }\n }", "title": "" }, { "docid": "761e8156c007860abd4f516af8319625", "score": "0.5745414", "text": "public function getTestResult()\n\t{\n\t\t$result = [];\n\n\t\ttry {\n\t\t\t\n\t\t\t//Get Instrument Interface Class file\n\t\t\t$testTypeID = Input::get(\"test_type_id\");\n\t\t\t$testType = TestType::find($testTypeID);\n\t\t\t$resultFile = \"uploads/\".basename($_FILES[\"file-to-fetch\"][\"name\"]);\n\n\t\t\tmove_uploaded_file($_FILES['file-to-fetch']['tmp_name'], $resultFile);\n\n\t\t\t$instrument = $testType->instruments->filter(function($inst){\n\t\t\t\t\treturn $inst->active == 1;\n\t\t\t\t})->first();\n\n\t \t\t// Fetch the results\n\t\t\t$result = $instrument->fetchResult($testType, $resultFile);\n\t\t} catch (Exception $e) {\n\t\t\t\\Log::error($e);\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "f37f43864f3eeda3d1f7d9a9d947fec3", "score": "0.5735267", "text": "public function testGetAllTickets()\n {\n $crawler = $this->client->request('GET', '/api/tickets');\n\n $this->assertTrue($this->client->getResponse()->isOk());\n }", "title": "" }, { "docid": "25623f9863bb2c646196dce73a78fc5e", "score": "0.5734455", "text": "public function testPhpUnitListTests() {\n // Generate the list of tests for all the tests the suites can discover.\n // The goal here is to successfully generate the list, without any\n // duplicate namespace errors or so forth. This keeps us from committing\n // tests which don't break under run-tests.sh, but do break under the\n // phpunit test runner tool.\n $process = Process::fromShellCommandline('vendor/bin/phpunit --configuration core --verbose --list-tests');\n $process->setWorkingDirectory($this->root)\n ->setTimeout(300)\n ->setIdleTimeout(300);\n $process->run();\n $this->assertEquals(0, $process->getExitCode(),\n 'COMMAND: ' . $process->getCommandLine() . \"\\n\" .\n 'OUTPUT: ' . $process->getOutput() . \"\\n\" .\n 'ERROR: ' . $process->getErrorOutput() . \"\\n\"\n );\n }", "title": "" }, { "docid": "aa8690318051190270fb56cc88c73378", "score": "0.5721898", "text": "public function testListOfTaskPage()\n\t{\n\t\t$tasks=Task::all();\n\t\t$this->visit('task/all')\n\t\t\t->see('List Of All tasks');\n\t\tforeach ($tasks as $task) \n\t\t{\n\t\t\t\t$this->see($task->title);\n\t\t}\t\n\n\t}", "title": "" }, { "docid": "39125ecd3643aacd80e8b99dccc4de28", "score": "0.57154405", "text": "public function testGetAll()\n {\n $collection = new Collection();\n $all = $collection->getAll();\n $this->assertTrue(is_array($all));\n $this->assertEmpty($all);\n }", "title": "" }, { "docid": "bfd41e1c88a8b7403137630c7c764e76", "score": "0.57118565", "text": "function DrupalTests($class_list = NULL) {\n static $classes;\n $this->DrupalTestSuite('Drupal Unit Tests');\n\n // Tricky part to avoid double inclusion.\n if (!$classes) {\n\n $files = $this->getFiles();\n\n $existing_classes = get_declared_classes();\n foreach ($files as $file) {\n include_once($file);\n }\n $classes = array_diff(get_declared_classes(), $existing_classes);\n }\n if (!is_null($class_list)) {\n $classes = $class_list;\n }\n if (count($classes) == 0) {\n drupal_set_message('No test cases found.', 'error');\n return;\n }\n $groups = array();\n foreach ($classes as $class) {\n if ($this->classIsTest($class)) {\n $this->_addClassToGroups($groups, $class);\n }\n }\n foreach ($groups as $group_name => $group) {\n $group_test = &new DrupalTestSuite($group_name);\n foreach ($group as $key => $v) {\n $group_test->addTestCase($group[$key]);\n }\n $this->addTestCase($group_test);\n }\n }", "title": "" }, { "docid": "35b8fbb0c9e0b5328fb7bad02e876758", "score": "0.57093984", "text": "public function getPendingTests()\n {\n $sQuery = 'SELECT *, t.name as test_name\n FROM gbtest t\n LEFT JOIN gbtest_chapter tc ON tc.gbtest_chapterpk = t.gbtest_chapterfk\n LEFT JOIN gbtest_chapter_group tcg ON tcg.gbtest_chapterfk = tc.gbtest_chapterpk\n WHERE tcg.deadline <= \\''.date('Y-m-d', strtotime('+1 day')).'\\' AND tcg.deadline >= \\''.date('Y-m-d').'\\'';\n\n return $this->oDB->ExecuteQuery($sQuery);\n }", "title": "" }, { "docid": "74617dbcd892feec9979b7276aa058da", "score": "0.570731", "text": "public function list_test_case_validate()\n {\n return [\n // Validation for username\n ['username', '', 'Username is empty'],\n ['username', str_random(256), 'Username length less than 255 words'],\n ['username', 'admin', 'Username is duplication'],\n // Validation for email\n ['email', '', 'Email is empty'],\n ['email', 'admin', 'Format Email is wrong!'],\n ['email', str_random(256), 'Email length less than 255 words'],\n ['email', '[email protected]', 'Email is duplication'],\n // Validation for Phone\n ['phone', '', 'Phone number is empty'],\n ['phone', '012ddssASA', 'Format phone is wrong!'],\n // Validation for address\n ['address', '', 'Address is not empty'],\n ['address', str_random(256), 'Address length less than 255 words'],\n // Validation for password\n ['password', '', 'Password is empty'],\n ['password', '123', 'Password length more than 6 words'],\n ];\n }", "title": "" }, { "docid": "385d429abf43e46c69f4de56268cf3a2", "score": "0.5704446", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM well_test_rpt';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "7c3d2c2c0211c5182b7bc03df3630c10", "score": "0.56970036", "text": "protected abstract function getTestCase() : TestCase;", "title": "" }, { "docid": "2d4acd654b136bfd8d9c531b61f1d50b", "score": "0.5693095", "text": "public function getRuns() {\n // Get all the test runs\n // Sort in descending order by id\n $runs = new \\App\\Run();\n\n return $runs->getRunsWithinXDays(90);\n }", "title": "" }, { "docid": "5d952b5041496cc6fcb9b3e0e9f33419", "score": "0.56883574", "text": "public static function getDefaultTests() {\n\n $tests = [\n 'Upload' => false,\n 'CacheDir' => 'app/cache',\n 'System' => [\n 'fopen', 'fclose', 'fread', 'fwrite',\n 'rename', 'file_exists', 'unlink', 'rmdir', 'mkdir',\n 'getcwd', 'chdir', 'chmod',\n ],\n 'PhpVersion' => false,\n 'Fopen' => false,\n 'Gd' => false,\n 'ConfigDir' => 'app',\n 'Files' => false,\n 'MaxExecutionTime' => false,\n 'PdoMysql' => false,\n 'MysqlVersion' => false,\n 'Bcmath' => false,\n 'Xml' => false,\n 'Json' => false,\n 'Zip' => false,\n ];\n\n return $tests;\n }", "title": "" } ]
325e1d1ae1de5ffb56335aa13bf60c67
Set the OR based facet filtering
[ { "docid": "ff2b95a0ba34a641134dd6fbabceb533", "score": "0.69418156", "text": "public function setOrFacetFilter(array $facetFilter): self\n {\n $this->orFacetFilter = $facetFilter;\n\n return $this;\n }", "title": "" } ]
[ { "docid": "452b28c7ef052e52e7192f4fd00dc370", "score": "0.7258085", "text": "public function getOrFacetFilter(): array\n {\n return $this->orFacetFilter;\n }", "title": "" }, { "docid": "d2f30b9c287e6b44ca38aa4cc3fa2e2c", "score": "0.6387118", "text": "public function getFacetFilter(): array\n {\n return $this->andFacetFilter;\n }", "title": "" }, { "docid": "8084de8661303412e1033aff5a9cd964", "score": "0.6267288", "text": "function orFilter($field, $operator = '=', $value = null);", "title": "" }, { "docid": "ae4f2ec002e5d11becf6a1bf27d76a94", "score": "0.6236091", "text": "public static function orfilter() {\n\t\treturn new Filter(func_get_args(), false, self::LOGICAL_OR);\n\t}", "title": "" }, { "docid": "e4231212642627f6d658919510c6c34b", "score": "0.62353903", "text": "function addORFilter($strFilter) {\n\t\tif (isset($this->strPostFilterOR)) {\n\t\t\t$this->strPostFilterOR = \"(\" . $this->strPostFilterOR . \" OR \" . $strFilter . \")\";\n\t\t} else {\n\t\t\t$this->strPostFilterOR = $strFilter;\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "392476f93bce3fc8e3e4402ecd9d2831", "score": "0.62142944", "text": "public function setWhereCondition($noSorting='',$loggedInProfileObj='')\n {\n\t\t\t\t\t\n\t\t$this->filters[]=\"q=*:*\";\n\t\t$this->filters[]=\"&wt=phps\";\n\t\tif($this->solrClusterlimit)\n\t\t\t$this->filters[]=\"&facet.limit=$this->solrClusterlimit\";\t\n\t\tif($this->results_cluster!='onlyResults' && $this->clustersToShow)\n\t\t\t$this->filters[] = \"&facet=true&facet.zeros=false\";\n\t\tif($this->results_cluster=='onlyClusters')\n\t\t\t$this->filters[] = '&rows=0';\n\n\t\t$rangeWhereArr = explode(\",\",$this->searchParamtersObj->getRangeParams());\n\t\t$valueWhereArr = explode(\",\",$this->searchParamtersObj->getWhereParams());\n\n\t\tif($this->searchParamtersObj->getGENDER()=='ALL')\n\t\t\t;\n\t\telseif($this->searchParamtersObj->getGENDER()=='M')\n\t\t\t$this->filters[]=\"&fq=GENDER:M\";\n\t\telse\n\t\t\t$this->filters[]=\"&fq=GENDER:F\";\n\t\t\n\t\tif($valueWhereArr[\"OCCUPATION\"] && $valueWhereArr[\"OCCUPATION_GROUPING\"])\n\t\t\tunset($valueWhereArr[\"OCCUPATION_GROUPING\"]);\n\t\tif($valueWhereArr[\"EDU_LEVEL_NEW\"] && $valueWhereArr[\"EDUCATION_GROUPING\"])\n\t\t\tunset($valueWhereArr[\"EDUCATION_GROUPING\"]);\n\n\t\tif($this->searchParamtersObj->getINCOME_SORTBY())\n\t\t\t$valueWhereArr[]= 'INCOME_SORTBY';\n\n $setOrCond = array();\n foreach($valueWhereArr as $field)\n { \n eval('$value = $this->searchParamtersObj->get'.$field.'();');\n \n if($field=='INDIA_NRI' || ($field=='CITY_RES' && $this->searchParamtersObj->getCITY_RES()!='') || ($field=='CITY_INDIA' && $this->searchParamtersObj->getCITY_INDIA()!='') || ($field=='COUNTRY_RES' && $this->searchParamtersObj->getCOUNTRY_RES()!='') || ($field=='STATE' && $this->searchParamtersObj->getSTATE()!='')) {\n $setOrCond[$field] = $value;\n continue;\n }\n \n\t\t\t\t\t\t\t\t\t\t\t\tif($field=='OCCUPATION_GROUPING' && $this->searchParamtersObj->getOCCUPATION()!='')\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t\t\t\tif($field=='EDUCATION_GROUPING' && $this->searchParamtersObj->getEDU_LEVEL_NEW()!='')\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t \n if($value)\n {\n\t\t\t\tif($field==\"SUBCASTE\")\n\t\t\t\t{\n\t\t\t\t\tunset($tempArr);\n\t\t\t\t\t$tempArr = explode(\" \",str_replace(\"/\",\" \",str_replace(\",\",\" \",strtolower($value))));\n\t\t\t\t\tforeach($tempArr as $k=>$v)\n {\n if(!$v)\n unset($tempArr[$k]);\n else\n $tempArr[$k] = trim($v);\n }\n\t\t\t\t\tif($tempArr && is_array($tempArr))\n {\n\t\t\t\t\t\t$textQuery[] = $field.\":(\".implode(\" OR \",$tempArr).\")\";\n\t\t\t\t\t}\n\t\t\t\t\tunset($tempArr);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telseif($field==\"KEYWORD\")\n\t\t\t\t{\n\t\t\t\t\tunset($tempArr);\n\t\t\t\t\t$tempArr = explode(\" \",str_replace(\"/\",\" \",str_replace(\",\",\" \",strtolower($value))));\n\t\t\t\t\tforeach($tempArr as $k=>$v)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!$v)\n\t\t\t\t\t\t\tunset($tempArr[$k]);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$tempArr[$k] = trim($v);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif($field==\"KEYWORD_TYPE\")\n\t\t\t\t{\n\t\t\t\t\tif($tempArr && is_array($tempArr))\n\t\t\t\t\t{\n\t\t\t\t\t\tif($value == \"OR\")\n\t\t\t\t\t\t\t$textQuery[] = SearchConfig::$textBasedSearchParameters.\":(\".implode(\" OR \",$tempArr).\")\";\n\t\t\t\t\t\telseif($value == \"AND\")\n\t\t\t\t\t\t\t$textQuery[] = SearchConfig::$textBasedSearchParameters.\":(\".implode(\" AND \",$tempArr).\")\";\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$textQuery[] = SearchConfig::$textBasedSearchParameters.\":(NOT \".implode(\" AND NOT \",$tempArr).\")\";\n\t\t\t\t\t\tunset($tempArr);\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$solrFormatValue = str_replace(\",\",\" \",$value);\n\t\t\t\t\t$solrFormatValue = str_replace(\"','\",\" \",$solrFormatValue);\n\t\t\t\t\t$setWhereParams[]=$field;\n\n\t\t\t\t\tif(in_array($field,array('OCCUPATION','OCCUPATION_GROUPING','EDU_LEVEL_NEW','EDUCATION_GROUPING')))\n { \n\t\t\t\t\t\t$fieldToLower = strtolower($field);\n\t\t\t\t\t\tif(strstr($field,'OCCUPATION'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$setWhereParams[]='OCCUPATION_GROUPING';\n\t\t\t\t\t\t\t$solrFormatValue = str_replace(\",\",\" \",$this->searchParamtersObj->getOCCUPATION());\n\t\t\t\t\t\t\t$solrFormatValue = str_replace(\"','\",\" \",$solrFormatValue);\n\t\t\t\t\t\t\t$valGroup = $this->searchParamtersObj->getOCCUPATION_GROUPING();\n\t\t\t\t\t\t\t$solrFormatValueGroup = str_replace(\",\",\" \",$valGroup);\n\t\t\t\t\t\t\t$solrFormatValueGroup = str_replace(\"','\",\" \",$solrFormatValueGroup);\n\t\t\t\t\t\t\t$this->specialCases($field,$solrFormatValue,'occupation,occuapation_grouping','OCCUPATION','OCCUPATION_GROUPING',$solrFormatValueGroup);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif(strstr($field,'EDU'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$setWhereParams[]='EDUCATION_GROUPING';\n\t\t\t\t\t\t\t$solrFormatValue = str_replace(\",\",\" \",$this->searchParamtersObj->getEDU_LEVEL_NEW());\n\t\t\t\t\t\t\t$solrFormatValue = str_replace(\"','\",\" \",$solrFormatValue);\n\t\t\t\t\t\t\t$valGroup=$this->searchParamtersObj->getEDUCATION_GROUPING();\n\t\t\t\t\t\t\t$solrFormatValueGroup = str_replace(\",\",\" \",$valGroup);\n\t\t\t\t\t\t\t$solrFormatValueGroup = str_replace(\"','\",\" \",$solrFormatValueGroup);\n\t\t\t\t\t\t\t$this->specialCases($field,$solrFormatValue,'edu_level_new,education_grouping','EDU_LEVEL_NEW','EDUCATION_GROUPING',$solrFormatValueGroup);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telseif(is_array($this->clustersToShow) && in_array($field,$this->clustersToShow))\n\t\t\t\t\t{ \n\t\t\t\t\t\t\n if($field==\"CITY_RES\" || $field==\"STATE\" || $field==\"NATIVE_STATE\")\n $solrFormatValue='\"'.implode('\",\"',explode(\" \",$solrFormatValue)).'\"';\n $fieldToLower = strtolower($field);\n\t\t\t\t\t\tif(!in_array($solrFormatValue,searchConfig::$dont_all_labels))\n\t\t\t\t\t\t\t$this->filters[]=\"&fq={!tag=$fieldToLower}$field:($solrFormatValue)\";\n\t\t\t\t\t\t\t//$this->filters[]=\"&fq=$field:($solrFormatValue)\";\n\t\t\t\t\t\t$this->clusters[]=\"&facet.field={!ex=$fieldToLower}$field\";\n\t\t\t\t\t}\n\t\t\t\t\telse\n { \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n if($field==\"CITY_RES\" || $field==\"STATE\" || $field==\"NATIVE_STATE\")\n $solrFormatValue='\"'.implode('\",\"',explode(\" \",$solrFormatValue)).'\"';\n elseif($field==\"HIV\" && $solrFormatValue==\"N\")\n $solrFormatValue=\"N NS\";\n if(!in_array($solrFormatValue,searchConfig::$dont_all_labels))\n\t\t\t\t\t\t\t$this->filters[]=\"&fq=$field:($solrFormatValue)\";\n //$this->clusters[]=\"&facet.field=$field\";\n\t\t\t\t\t}\n\t\t\t\t}\n }\n }\n if(!empty($setOrCond)){\n if((isset($setOrCond[\"CITY_RES\"]) || isset($setOrCond[\"CITY_INDIA\"]) || isset($setOrCond[\"STATE\"])) && isset($setOrCond[\"COUNTRY_RES\"])){ \n $this->clusters[]=\"&facet.field={!ex=country_res,city_res,state}COUNTRY_RES\";\n $this->clusters[]=\"&facet.field={!ex=city_india}CITY_INDIA\";\n $this->clusters[]=\"&facet.field={!ex=state}STATE\";\n $setWhereParams[]=\"COUNTRY_RES\";\n $setWhereParams[]=\"CITY_RES\";\n $solrFormatValueCity = str_replace(\",\",\" \",$setOrCond[\"CITY_RES\"]);\n $solrFormatValueCity = str_replace(\"','\",\" \",$solrFormatValueCity);\n $solrFormatValueCity='\"'.implode('\",\"',explode(\" \",$solrFormatValueCity)).'\"';\n $solrFormatValueCityIndia = '';\n if(isset($setOrCond[\"CITY_INDIA\"])){\n $solrFormatValueCityIndia = str_replace(\",\",\" \",$setOrCond[\"CITY_INDIA\"]);\n $solrFormatValueCityIndia = str_replace(\"','\",\" \",$solrFormatValueCityIndia);\n $solrFormatValueCityIndia='\"'.implode('\",\"',explode(\" \",$solrFormatValueCityIndia)).'\"';\n }else{\n $solrFormatValueCityIndia = $solrFormatValueCity;\n }\n $solrFormatValueStateIndia = '';\n if(isset($setOrCond[\"STATE\"])){\n $solrFormatValueStateIndia = str_replace(\",\",\" \",$setOrCond[\"STATE\"]);\n $solrFormatValueStateIndia = str_replace(\"','\",\" \",$solrFormatValueStateIndia);\n $solrFormatValueStateIndia='\"'.implode('\",\"',explode(\" \",$solrFormatValueStateIndia)).'\"';\n $setWhereParams[]=\"STATE\";\n }\n $country = explode(',',$setOrCond[\"COUNTRY_RES\"]);\n $country = array_unique($country);\n $countryCount = count($country);\n foreach($country as $c){\n if($c!=51 || $countryCount == 1)\n $countries[] = $c;\n }\n $setOrCond[\"COUNTRY_RES\"] = implode(',',$countries);\n $solrFormatValueCOUNTRY = str_replace(\",\",\" \",$setOrCond[\"COUNTRY_RES\"]);\n $solrFormatValueCOUNTRY = str_replace(\"','\",\" \",$solrFormatValueCOUNTRY);\n \n $solrFormatValueCOUNTRY_RES = str_replace(\",\",\" \",implode(',',$country));\n $solrFormatValueCOUNTRY_RES = str_replace(\"','\",\" \",$solrFormatValueCOUNTRY_RES);\n //$this->filters[]=\"&fq={!tag=country_res}COUNTRY_RES:($solrFormatValueCOUNTRY_RES)\";\n //{!tag=country_res,city_res,city_india,state}\n $searchOperator = \"OR\";\n if($countryCount == 1 && $solrFormatValueCOUNTRY == '51'){\n $searchOperator = \"AND\"; \n }\n $stateCheck = '';\n if($solrFormatValueStateIndia){\n $stateCheck = \"AND STATE :($solrFormatValueStateIndia)\";\n }\n if($solrFormatValueCityIndia){\n if($solrFormatValueCOUNTRY){\n $this->filters[]=\"&fq={!tag=country_res,city_res,city_india,state}(CITY_RES:($solrFormatValueCityIndia) $stateCheck) $searchOperator COUNTRY_RES:($solrFormatValueCOUNTRY)\";\n $this->filters[]=\"&fq={!tag=country_res,city_res,city_india,state}(CITY_INDIA:($solrFormatValueCityIndia) $stateCheck) $searchOperator COUNTRY_RES:($solrFormatValueCOUNTRY)\";\n }else{\n $this->filters[]=\"&fq={!tag=country_res,city_res,city_india,state}(CITY_RES:($solrFormatValueCityIndia) $stateCheck)\";\n $this->filters[]=\"&fq={!tag=country_res,city_res,city_india,state}(CITY_INDIA:($solrFormatValueCityIndia) $stateCheck)\";\n }\n }elseif(isset($setOrCond[\"COUNTRY_RES\"])){ \n if($stateCheck){\n $this->filters[]=\"&fq={!tag=country_res,city_res,city_india,state}STATE:($solrFormatValueStateIndia) $searchOperator COUNTRY_RES:($solrFormatValueCOUNTRY)\";\n }else{\n $setWhereParams[]=\"COUNTRY_RES\";\n $this->clusters[]=\"&facet.field={!ex=country_res,city_res,city_india,state}COUNTRY_RES\";\n $solrFormatValueCOUNTRY = str_replace(\",\",\" \",$setOrCond[\"COUNTRY_RES\"]);\n $solrFormatValueCOUNTRY = str_replace(\"','\",\" \",$solrFormatValueCOUNTRY); \n $this->filters[]=\"&fq={!tag=country_res,city_res,city_india,state}COUNTRY_RES:($solrFormatValueCOUNTRY_RES)\"; \n }\n }\n }elseif(isset($setOrCond[\"COUNTRY_RES\"])){\n $setWhereParams[]=\"COUNTRY_RES\";\n $this->clusters[]=\"&facet.field={!ex=country_res,city_res,city_india,state}COUNTRY_RES\";\n $solrFormatValueCOUNTRY = str_replace(\",\",\" \",$setOrCond[\"COUNTRY_RES\"]);\n $solrFormatValueCOUNTRY = str_replace(\"','\",\" \",$solrFormatValueCOUNTRY);\n $this->filters[]=\"&fq={!tag=country_res,city_res,city_india,state}COUNTRY_RES:($solrFormatValueCOUNTRY)\";\n }elseif($setOrCond[\"STATE\"]){\n $solrFormatValueStateIndia = str_replace(\",\",\" \",$setOrCond[\"STATE\"]);\n $solrFormatValueStateIndia = str_replace(\"','\",\" \",$solrFormatValueStateIndia);\n $solrFormatValueStateIndia='\"'.implode('\",\"',explode(\" \",$solrFormatValueStateIndia)).'\"';\n $setWhereParams[]=\"STATE\";\n $this->clusters[]=\"&facet.field={!ex=city_res,city_india,state}STATE\";\n $this->filters[]=\"&fq={!tag=city_res,city_india,state}STATE:($solrFormatValueStateIndia)\";\n }elseif($setOrCond['CITY_RES'] && is_numeric($setOrCond['CITY_RES'])){\n //added for seo solr for countries other than india\n $this->clusters[]=\"&facet.field={!ex=country_res,city_res,state}COUNTRY_RES\";\n $this->clusters[]=\"&facet.field={!ex=city_india}CITY_INDIA\";\n $this->clusters[]=\"&facet.field={!ex=state}STATE\";\n $setWhereParams[]=\"CITY_RES\";\n $solrFormatValueCity = str_replace(\",\",\" \",$setOrCond[\"CITY_RES\"]);\n $solrFormatValueCity = str_replace(\"','\",\" \",$solrFormatValueCity);\n $solrFormatValueCity='\"'.implode('\",\"',explode(\" \",$solrFormatValueCity)).'\"';\n $this->filters[]=\"&fq={!tag=country_res,city_res,city_india,state}CITY_RES:($solrFormatValueCity)\";\n }\n }\n\t\t\n\t\n\t\t// value where for ends here\n\t\tif($textQuery && is_array($textQuery))\n\t\t{\n\t\t\t$this->filters[0] = \"q=\".implode(\" AND \",$textQuery);\n\t\t}\n\n\t\tif(SearchConfig::$filteredRemove && $loggedInProfileObj && $loggedInProfileObj->getPROFILEID()!='')\n\t\t{\n\t\t\t$filterQuery = '';\n\n\t\t\tif($loggedInProfileObj->getAGE())\n {\n $filterQuery = $filterQuery.\"if(and(tf(AGE_FILTER,Y),if(and(if(abs(sub(min(PARTNER_LAGE,\".$loggedInProfileObj->getAGE().\"),PARTNER_LAGE)),0,1),if(abs(sub(max(PARTNER_HAGE,\".$loggedInProfileObj->getAGE().\"),PARTNER_HAGE)),0,1)),0,1)),1,0),\";\n }\n if($loggedInProfileObj->getMSTATUS())\n {\n $filterQuery = $filterQuery.\"if(and(tf(MSTATUS_FILTER,Y),if(tf(PARTNER_MSTATUS,\".$loggedInProfileObj->getMSTATUS().\"),0,1)),1,0),\";\n }\n if($loggedInProfileObj->getRELIGION())\n {\n $filterQuery = $filterQuery.\"if(and(tf(RELIGION_FILTER,Y),if(tf(PARTNER_RELIGION,\".$loggedInProfileObj->getRELIGION().\"),0,1)),1,0),\";\n }\n if($loggedInProfileObj->getCASTE())\n {\n $filterQuery = $filterQuery.\"if(and(tf(CASTE_FILTER,Y),if(tf(PARTNER_CASTE,\".$loggedInProfileObj->getCASTE().\"),0,1)),1,0),\";\n }\n if($loggedInProfileObj->getCOUNTRY_RES())\n {\n $filterQuery = $filterQuery.\"if(and(tf(COUNTRY_RES_FILTER,Y),if(tf(PARTNER_COUNTRYRES,\".$loggedInProfileObj->getCOUNTRY_RES().\"),0,1)),1,0),\";\n }\n if($loggedInProfileObj->getCITY_RES())\n {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$filterQuery = $filterQuery.\"if(and(tf(CITY_RES_FILTER,Y),if(tf(PARTNER_CITYRES,\".$loggedInProfileObj->getCITY_RES().\"),0,1)),1,0),\";\n }\n\t\t\t\t\t\t\t\t\t\t\t\tif($loggedInProfileObj->getMTONGUE())\n {\n $filterQuery = $filterQuery.\"if(and(tf(MTONGUE_FILTER,Y),if(tf(PARTNER_MTONGUE,\".$loggedInProfileObj->getMTONGUE().\"),0,1)),1,0),\";\n }\n if($loggedInProfileObj->getINCOME())\n {\n $filterQuery = $filterQuery.\"if(and(tf(INCOME_FILTER,Y),if(tf(PARTNER_INCOME_FILTER,\".$loggedInProfileObj->getINCOME().\"),0,1)),1,0),\";\n }\n if($filterQuery)\n {\n\t\t\t\t$filterQuery = rtrim($filterQuery,\",\");\n $filterQuery = \"sum(\".$filterQuery.\")\";\n\t\t\t\tif($this->searchParamtersObj->getShowFilteredProfiles()=='N') //need to remove filtered profiles\n\t\t\t\t\t$this->filters[]=\"&fq={!frange l=0.0 u=0.0}if(and(tf(PRIVACY,F),\".$filterQuery.\"),500,\".$filterQuery.\")\";\n\t\t\t\telseif($this->searchParamtersObj->getShowFilteredProfiles()=='X') //need to remove filtered profiles\n\t\t\t\t\t$this->filters[]=\"&fq={!frange l=0.0 u=10.0}if(and(1,\".$filterQuery.\"),500,\".$filterQuery.\")\";\n\t\t\t\telse // tag filtered profiles\n\t\t\t\t\t$this->filters[]=\"&fq={!frange l=0.0 u=10.0}if(and(tf(PRIVACY,F),\".$filterQuery.\"),500,\".$filterQuery.\")\";\n }\t\t\t\n\t\t}\n\n\t\t//online+ignore+contacted+viewed\n\t\tif($this->searchParamtersObj->getIgnoreProfiles())\n\t\t\t $this->filters[]=\"&fq=-id:(\".$this->searchParamtersObj->getIgnoreProfiles().\")\";\n\t\tif($this->searchParamtersObj->getProfilesToShow())\n\t\t\t $this->filters[]=\"&fq=id:(\".$this->searchParamtersObj->getProfilesToShow().\")\";\n\t\tif($this->searchParamtersObj->getOnlineProfiles())\n\t\t\t $this->filters[]=\"&fq=id:(\".$this->searchParamtersObj->getOnlineProfiles().\")\";\n\t\t//online+ignore+contacted+viewed\n\n\t\t//HIV ignore, MANGLIK ignore, MSTATUS ignore, HANDICAPPED ignore\n\t\tif($this->searchParamtersObj->getHIV_IGNORE())\n\t\t\t$this->filters[]=\"&fq=-HIV:(\".str_replace(\",\",\" \",$this->searchParamtersObj->getHIV_IGNORE()).\")\";\n\t\tif($this->searchParamtersObj->getMANGLIK_IGNORE())\n\t\t\t$this->filters[]=\"&fq=-MANGLIK:(\".str_replace(\",\",\" \",$this->searchParamtersObj->getMANGLIK_IGNORE()).\")\";\n\t\tif($this->searchParamtersObj->getMSTATUS_IGNORE())\n\t\t\t$this->filters[]=\"&fq=-MSTATUS:(\".str_replace(\",\",\" \",$this->searchParamtersObj->getMSTATUS_IGNORE()).\")\";\n\t\tif($this->searchParamtersObj->getHANDICAPPED_IGNORE())\n\t\t\t$this->filters[]=\"&fq=-HANDICAPPED:(\".str_replace(\",\",\" \",$this->searchParamtersObj->getHANDICAPPED_IGNORE()).\")\";\n if($this->searchParamtersObj->getOCCUPATION_IGNORE())\n\t\t\t$this->filters[]=\"&fq=-OCCUPATION:(\".str_replace(\",\",\" \",$this->searchParamtersObj->getOCCUPATION_IGNORE()).\")\";\n\t\t//HIV ignore, MANGLIK ignore, MSTATUS ignore, HANDICAPPED ignore\n\n //Fso Verified Dpp Matches\n if($this->searchParamtersObj->getFSO_VERIFIED()){\n $this->filters[]=\"&fq=VERIFICATION_SEAL:(/\".$this->searchParamtersObj->getFSO_VERIFIED().\".*/)\";}\n //Fso Verified Dpp Matches\n \n\t\tif(is_array($this->clustersToShow))\n foreach($this->clustersToShow as $field)\n\t\t{\n\t\t\tif(!is_array($setWhereParams) || !in_array($field,$setWhereParams))\n\t\t\t\tif(in_array($field,$valueWhereArr)) // => if(!in_array($field,array('VIEWED','AGE','HEIGHT','INCOME')))\n\t\t\t\t\t$this->clusters[]=\"&facet.field=$field\";\n\t\t}\n \n\t if(is_array($rangeWhereArr))\n foreach($rangeWhereArr as $field)\n {\n eval('$lvalue = $this->searchParamtersObj->getL'.$field.'();');\n eval('$hvalue = $this->searchParamtersObj->getH'.$field.'();');\n if($lvalue && $hvalue)\n {\n\t\t\t\t$this->filters[]=\"&fq=$field:[$lvalue $hvalue]\";\n }\n }\n \n\t\tif($this->results_cluster!='onlyCount')\n\t\t{\n\t\t\tif(!$noSorting)\n\t\t\t\t$this->addSortCriteria();\n\t\t}\n\t}", "title": "" }, { "docid": "f0478d42b3b33a5a1799ba5f90ccf4cc", "score": "0.6211975", "text": "public function addFacetCondition()\n {\n $query = $this->getLayer()->getProductCollection()->getSearchEngineQuery();\n $facetType = \"terms\";\n $options = array(\n 'size' => $this->_getFacetMaxSize(),\n );\n\n $facetSortOrder = $this->_getFacetSortOrder();\n\n if (!in_array($facetSortOrder, array(self::SORT_ORDER_RELEVANCE, self::SORT_ORDER_COUNT, self::SORT_ORDER_TERM))) {\n $facetSortOrder = self::SORT_ORDER_COUNT;\n }\n\n if ($facetSortOrder == self::SORT_ORDER_RELEVANCE) {\n $options['key_field'] = $this->_getFilterField();\n $options['value_script'] = self::SORT_ORDER_RELEVANCE;\n $options['order'] = self::TERM_STAT_AGGREGATOR;\n $facetType = \"termsStats\";\n } else {\n $options['field'] = $this->_getFilterField();\n $options['order'] = $facetSortOrder;\n }\n\n $options = $this->_addSuggestFacetFilter($options);\n $query->addFacet($this->_requestVar, $facetType, $options);\n\n return $this;\n }", "title": "" }, { "docid": "7c130018edd6be7b47b9c5cc159e1b31", "score": "0.6160779", "text": "public function beginOr(){\n\t\t$this->startWhereGroup('OR');\n\t}", "title": "" }, { "docid": "516589c3d189d2bae5f5d0a1f266e5d9", "score": "0.60739815", "text": "public function getFilterName()\r\n {\r\n return $this->_('OR combination filter');\r\n }", "title": "" }, { "docid": "e7bce997eef6ae694149119d5981fca3", "score": "0.6072299", "text": "public function setFacetFilter(array $facetFilter): self\n {\n $this->andFacetFilter = $facetFilter;\n\n return $this;\n }", "title": "" }, { "docid": "4a606a91773c98d8703a9e31b8623147", "score": "0.60162246", "text": "public function addFacetCondition()\n {\n $this->getLayer()\n ->getProductCollection()\n ->addFacetCondition($this->_getFilterField());\n\n return $this;\n }", "title": "" }, { "docid": "056bf8eb2ad51e5babff4705c70ee53a", "score": "0.60015833", "text": "public function getAndFacetFilter(): array\n {\n return $this->getFacetFilter();\n }", "title": "" }, { "docid": "81de00d62c425597816e35ae8a357552", "score": "0.5953121", "text": "public function addFacetCondition()\n {\n $query = $this->getLayer()->getProductCollection()->getSearchEngineQuery();\n $options = array('interval' => 1, 'field' => $this->_getFilterField());\n $query->addFacet($this->_getFilterField(), 'histogram', $options);\n\n return $this;\n }", "title": "" }, { "docid": "de98aa43575c54978ba8c42be16c8c75", "score": "0.58176464", "text": "public function addFacetCondition()\n {\n $this->_filter->addFacetCondition();\n\n return $this;\n }", "title": "" }, { "docid": "de98aa43575c54978ba8c42be16c8c75", "score": "0.58176464", "text": "public function addFacetCondition()\n {\n $this->_filter->addFacetCondition();\n\n return $this;\n }", "title": "" }, { "docid": "1e7b1f4ea8600048c1eb303dddd47dce", "score": "0.5812418", "text": "public function setAndFacetFilter(array $facetFilter): self\n {\n return $this->setFacetFilter($facetFilter);\n }", "title": "" }, { "docid": "979058d0133f60cac7d1bf0c3c1ceefd", "score": "0.5807302", "text": "public function encapsulateOr()\n {\n $root = $this->filters;\n\n $this->filters = new AndFilterBuilder();\n $this->filters->setBuilder($this);\n\n $orFilter = new OrFilterBuilder(array($root));\n $this->filters->add($orFilter);\n\n return $orFilter;\n }", "title": "" }, { "docid": "3e2d2168faccacde6ff466c90fe23c1e", "score": "0.5791156", "text": "public static function orexclude() {\n\t\treturn new Filter(func_get_args(), true, self::LOGICAL_OR);\n\t}", "title": "" }, { "docid": "e7dc17950ce88cadf4abf76cd56d1596", "score": "0.57799405", "text": "public function orConditionGroup();", "title": "" }, { "docid": "77a8c39191ce81d2c3325b5d496a75bf", "score": "0.57576466", "text": "public function setFacet(bool $flag): \\SolrQuery {}", "title": "" }, { "docid": "77a8c39191ce81d2c3325b5d496a75bf", "score": "0.57576466", "text": "public function setFacet(bool $flag): \\SolrQuery {}", "title": "" }, { "docid": "613bd2140ac7d2b5abfb4595c7e52070", "score": "0.5755121", "text": "public function setFilters() {}", "title": "" }, { "docid": "cc5b788a0ac3f48598550e5ad2d93478", "score": "0.5742691", "text": "protected function setFilter() {\n parent::setFilter();\n if(isset($this->filters['stock_status'])) {\n if($this->filters['stock_status'] == 'not_in_stock') {\n $this->filters['not_in_stock'] = TRUE;\n } else if ($this->filters['stock_status'] == 'in_stock') {\n $this->filters['not_in_stock'] = FALSE;\n }\n unset($this->filters['stock_status']);\n }\n }", "title": "" }, { "docid": "bf8d1f1068c035b5a68e028bf17e657c", "score": "0.57289356", "text": "public function applyFilter();", "title": "" }, { "docid": "82ebe34ed80325a6a1b8cc40f9dc2acc", "score": "0.57288414", "text": "public function set_filters_from_widgets() {\n\t\tif ( Jetpack_Search_Helpers::are_filters_by_widget_disabled() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$filters = Jetpack_Search_Helpers::get_filters_from_widgets();\n\n\t\tif ( ! empty( $filters ) ) {\n\t\t\t$this->set_filters( $filters );\n\t\t}\n\t}", "title": "" }, { "docid": "0442a3c77c778d83536086f50dd5380e", "score": "0.57205075", "text": "public function orConditions($data = array()) {\n\t\t$filter = $data['filter'];\r\n\t\t$condition = array(\r\n\t\t\t\t'OR' => array(\r\n\t\t\t\t\t\t$this->alias . '.sku LIKE' => '%' . trim($filter) . '%',\r\n\t\t\t\t\t\t$this->alias . '.asin LIKE' => '%' . trim($filter) . '%',\r\n\t\t\t\t)\r\n\t\t);\r\n\t\treturn $condition;\r\n\t}", "title": "" }, { "docid": "ac3803bca3cb5ca9b697e2dd5f94fd20", "score": "0.5693482", "text": "public function advancedFilters()\n {\n $advanced_filters = '';\n $this->advanceSearch = false;\n if ($this->isFormPOSTed($_REQUEST, 'advanceFromSubmission') or $this->getFormField('advanceFromSubmission')==1 or $this->getFormField('people') or $this->getFormField('tag_name'))\n\t\t{\n\t\t\t$advanced_filters = '';\n\t\t\tif($this->isFormPOSTed($_REQUEST, 'advanceFromSubmission'))\n\t\t\t{\n\t\t\t\tif ($this->getFormField('people') != $this->LANG['peopleonphoto_search_people_name'] AND $this->getFormField('people') AND !$this->getFormField('tagged_of'))\n\t\t\t\t{\n\t\t\t\t\t$advanced_filters .= ' AND ppt.tag_name = \\''.validFieldSpecialChr($this->getFormField('people')).'\\'';\n\t\t\t\t\t$this->advanceSearch = true;\n\t\t\t\t}\n\t\t\t\tif ($this->getFormField('tag_name') != $this->LANG['peopleonphoto_search_tagged_by'] AND $this->getFormField('tag_name') AND !$this->getFormField('tagged_by'))\n\t\t\t\t{\n\t\t\t\t\tif(($this->getFormField('adv_user_id')))\n\t\t\t\t\t{\n\t\t\t\t\t\tif($this->getFormField('tag') && $advanced_filters != '')\n\t\t\t\t\t\t\t$advanced_filters .= ' OR ppt.tagged_by_user_id ='.$this->getFormField('adv_user_id');\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$advanced_filters .= ' AND ppt.tagged_by_user_id ='.$this->getFormField('adv_user_id');\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$advanced_filters .= ' AND ppt.tag_name =\\''.validFieldSpecialChr($this->getFormField('tag_name')).'\\'';\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->advanceSearch = true;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$advanced_filters ='';\n\t\t\t\tif ($this->getFormField('people') != $this->LANG['peopleonphoto_search_people_name'] AND $this->getFormField('people'))\n\t\t\t\t{\n\t\t\t\t\t$advanced_filters .= ' AND ppt.tag_name = \\'' .validFieldSpecialChr($this->getFormField('people')). '\\' ';\n\t\t\t\t\t$this->advanceSearch = true;\n\t\t\t\t}\n\n\t\t\t\tif ($this->getFormField('tag_name') != $this->LANG['peopleonphoto_search_tagged_by'] AND $this->getFormField('tag_name'))\n\t\t\t\t{\n\t\t\t\t\tif($this->getFormField('tag') && $advanced_filters != '' && $this->getFormField('adv_user_id'))\n\t\t\t\t\t\t$advanced_filters .= ' OR ppt.tagged_by_user_id = \\'' .validFieldSpecialChr($this->getFormField('adv_user_id')). '\\' ';\n\t\t\t\t\telseif(($this->getFormField('adv_user_id')))\n\t\t\t\t\t\t$advanced_filters .= ' AND ppt.tagged_by_user_id = \\'' .validFieldSpecialChr($this->getFormField('adv_user_id')). '\\' ';\n\t\t\t\t\telse\n\t\t\t\t\t\t$advanced_filters .= ' AND ppt.tag_name = \\'' .validFieldSpecialChr($this->getFormField('tag_name')). '\\' ';\n\t\t\t\t\t$this->advanceSearch = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $advanced_filters;\n\t\t}\n }", "title": "" }, { "docid": "4aa5481f975d6f864a5838a621d37c45", "score": "0.5686178", "text": "public function setFilter() {\n\t\tif(!empty($this->fromToFilters)) {\n\t\t // Default values\n\t\t $fromToDefaultFilters = array();\n\t\t foreach ($this->fromToFilters as $key => $value) {\n\t\t\t $fromToDefaultFilters[$key] = $value;\n\t\t }\n\t }\n\n\t // Get from GET array\n\t if (!empty($_GET)) {\n\t\t foreach ($this->fromToFilters as $key => $value) {\n\t\t\t if (!isset($_GET[$key])) continue;\n\t\t\t $this->fromToFilters[$key] = $_GET[$key];\n\t\t }\n\t }\n\n\t // Filter values\n\t $fromToFilterValues = array();\n\t foreach ($this->fromToFilters as $key => $value) {\n\t\t $fromToFilterValues[$key] = ManagerHolder::get($this->entityName)->getFilterValues($key);\n\t }\n\n\t if (!empty($_GET)) {\n\t\t foreach ($this->fromToFilters as $key => $val) {\n\t\t\t if (isset($_GET[$key . '_from']) && isset($_GET[$key . '_to'])) {\n\t\t\t\t $this->extraWhere[$key . 'BETWEEN'] = $_GET[$key . '_from'] . ' AND ' . $_GET[$key . '_to'];\n\t\t\t } else {\n\t\t\t\t if (isset($_GET[$key . '_from'])) {\n\t\t\t\t\t $this->extraWhere[$key . '>='] = $_GET[$key . '_from'];\n\n\t\t\t\t }\n\t\t\t\t if (isset($_GET[$key . '_to'])) {\n\t\t\t\t\t $this->extraWhere[$key . '<='] = $_GET[$key . '_to'];\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\t }\n\n\t $this->layout->set(\"fromToFilters\", $fromToDefaultFilters);\n\t $this->layout->set(\"fromToFilterValues\", $fromToFilterValues);\n\t parent::setFilter();\n\t}", "title": "" }, { "docid": "fe41b8c3b1568e08959e51a0ce5c637c", "score": "0.5684329", "text": "public function metaQueryRelation_OR(){\n return $this->metaQueryRelation('OR');\n }", "title": "" }, { "docid": "258d37a67b9ccd88b432af11bf6c7e75", "score": "0.56577677", "text": "public function addOr() {\r\n\t\t$this->where [] = Array (\"t\" => self::T_WHERE_OR );\r\n\t\t++$this->state_number;\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "c5494e1d2f8170d2fc46b65ead131c9c", "score": "0.5654298", "text": "public function setGroupFacet(bool $value): \\SolrQuery {}", "title": "" }, { "docid": "c5494e1d2f8170d2fc46b65ead131c9c", "score": "0.5654298", "text": "public function setGroupFacet(bool $value): \\SolrQuery {}", "title": "" }, { "docid": "6d00bff75ca970910936a5fcb1d0deb1", "score": "0.56409353", "text": "public function setGlobalFilter( $array )\n\t\t{\n\t\t\tforeach($array as $filter){\n\t\t\t\tswitch( $filter[\"type\"] )\n\t\t\t\t{\n\t\t\t\t\tcase \"postmeta\":\n\t\t\t\t\t\t$this->global_exclude_query[] = \" AND \".$filter[\"alias\"].\" \".$filter[\"custom_field_query\"].\" '\".$filter[\"value\"].\"' \";\n\t\t\t\t\t\t$this->panel_postmeta_join = \" JOIN \".$this->wpdb->postmeta.\" AS pm ON post_id=r.object_id AND meta_key='\".$filter[\"field_name\"].\"' \";\n\t\t\t\t\t\t$this->panel_postmeta_where = \" AND pm.meta_value \".$filter[\"custom_field_query\"].\" '\".$filter[\"value\"].\"' \";\n\t\t\t\t\t\t// Hand off the panel filters here.\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "cdecf65feca2e8beeab2557ce9ef63ae", "score": "0.5621521", "text": "public function setCustomPanelFilters()\n\t\t{\n\t\t\t// This should be called after all filters have been set.\n\t\t\t$term_id_array = array();\n\n\t\t\tforeach( $this->filter as $filter ){\n\n\t\t\t\tswitch( $filter[\"type\"] ){\n\t\t\t\t\tcase \"taxonomy\":\n\t\t\t\t\t\t$term_id_array = array_merge($term_id_array, array_keys($this->panel_filter[$filter[\"name\"]]));\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"taxonomy_hierarchy\":\n\t\t\t\t\t\t$term_id_array = array_merge($term_id_array, array_keys($this->panel_filter[$filter[\"name\"]]));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t// Now apply this filter to the custom panels, if there are any.\n\t\t\t/**\n\t\t\t * In order to accurately filter out the custom table panels, we need to run through all the taxonomies\n\t\t\t * and check the custom table intersections. This will determine what is showing on the custom panel.\n\t\t\t */\n\t\t\tforeach( $this->_custom_table_panel_filters as $custom_table => $parameter ){\n\t\t\t\t//echo $taxonomy;\n\t\t\t\t$filter_query = \"SELECT \".$parameter[\"field\"].\" AS id\n\t\t\t\t\tFROM \".$custom_table.\"\n\t\t\t\t\tWHERE post_id IN\n\t\t\t\t\t(\n\t\t\t\t\t\tSELECT object_id\n\t\t\t\t\t\tFROM \".$this->wpdb->term_relationships.\" AS r\n\t\t\t\t\t\tJOIN \".$this->wpdb->term_taxonomy.\" AS x ON x.term_taxonomy_id = r.term_taxonomy_id\n\t\t\t\t\t\tJOIN \".$this->wpdb->terms.\" AS t ON t.term_id = x.term_id\n\t\t\t\t\t\t\".$this->panel_postmeta_join.\"\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\tt.term_id IN (\".implode(\",\", $this->term_ids).\")\n\t\t\t\t\t)\n\t\t\t\tGROUP BY \".$parameter[\"field\"];\n\n\t\t\t\t$filter_array = $this->wpdb->get_results($filter_query, ARRAY_A);\n\n\t\t\t\tforeach( $filter_array as $this_filter ){\n\t\t\t\t\t$this->panel_filter[$parameter[\"filter_name\"]][$custom_table.\":\".$parameter[\"field\"].\":\".$this_filter[\"id\"]] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "9e00e9cfeaaaa2115ff238faa1140bf3", "score": "0.56045574", "text": "function kolab_lead_filter_form() {\n $session = isset($_SESSION['kolab_lead_overview_filter']) ? $_SESSION['kolab_lead_overview_filter'] : array();\n $filters = kolab_lead_filters();\n\n $i = 0;\n $form['filters'] = array(\n '#type' => 'fieldset',\n '#title' => t('Show only items where'),\n '#theme' => 'exposed_filters__lead',\n );\n foreach ($session as $filter) {\n list($type, $value) = $filter;\n \n $value = $filters[$type]['options'][$value];\n \n $t_args = array('%property' => $filters[$type]['title'], '%value' => $value);\n if ($i++) {\n $form['filters']['current'][] = array('#markup' => t('and where %property is %value', $t_args));\n }\n else {\n $form['filters']['current'][] = array('#markup' => t('where %property is %value', $t_args));\n }\n if (in_array($type, array('type', 'language'))) {\n // Remove the option if it is already being filtered on.\n unset($filters[$type]);\n }\n }\n\n $form['filters']['status'] = array(\n '#type' => 'container',\n '#attributes' => array('class' => array('clearfix')),\n '#prefix' => ($i ? '<div class=\"additional-filters\">' . t('and where') . '</div>' : ''),\n );\n $form['filters']['status']['filters'] = array(\n '#type' => 'container',\n '#attributes' => array('class' => array('filters')),\n );\n foreach ($filters as $key => $filter) {\n $form['filters']['status']['filters'][$key] = array(\n '#type' => 'select',\n '#options' => $filter['options'],\n '#title' => $filter['title'],\n '#default_value' => '[any]',\n );\n }\n\n $form['filters']['status']['actions'] = array(\n '#type' => 'actions',\n '#attributes' => array('class' => array('container-inline')),\n );\n $form['filters']['status']['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => count($session) ? t('Refine') : t('Filter'),\n );\n if (count($session)) {\n $form['filters']['status']['actions']['undo'] = array('#type' => 'submit', '#value' => t('Undo'));\n $form['filters']['status']['actions']['reset'] = array('#type' => 'submit', '#value' => t('Reset'));\n }\n\n drupal_add_js('misc/form.js');\n\n return $form;\n}", "title": "" }, { "docid": "191c0b1ffc1ae00d4546a220fda47435", "score": "0.5556547", "text": "function &getFilterArray()\r\n {\r\n if (!isset( $this->filters )) {\r\n\r\n $user \t\t\t\t\t= &JFactory::getUser();\r\n $request \t\t\t\t= $this->getRequestData();\r\n //cookie form plugin can set cookie data - dont use that for filters\r\n $cookieData = JRequest::get('cookie');\r\n foreach ($cookieData as $key=>$val) {\r\n if (array_key_exists( $key, $request )) {\r\n unset( $request[$key] );\r\n }\r\n }\r\n\r\n $this->filters \t= array();\r\n\r\n $prefilters \t\t=& $this->getPrefilterArray();\r\n $form \t\t\t\t\t=& $this->getForm();\r\n\r\n $filterCondSQL\t= '';\r\n\r\n // $$$ hugh - temp foreach fix\r\n $allelementgroups =\t$form->getGroupsHiarachy();\r\n\r\n $params =& $this->getParams();\r\n $searchMode = $params->get( 'search-mode', 'AND' );\r\n if ($searchMode == 'OR') {\r\n $search = JRequest::getVar('fabrik_table_filter_all');\r\n }\r\n foreach ($allelementgroups as $groupModel) {\r\n $group =& $groupModel->getGroup();\r\n $elementModels =& $groupModel->getPublishedElements();\r\n foreach ($elementModels as $elementModel) {\r\n $element =& $elementModel->getElement();\r\n $elanmes[] = $element->name;\r\n $thisData = $this->_aData;\r\n if ($group->is_join) {\r\n if (@array_key_exists( 'join', $request ) && @is_array( $request['join'][$group->join_id] )) {\r\n $thisData = $this->_aData['join'][$group->join_id];\r\n }\r\n $key \t= $elementModel->getFilterFullName( false, true, false );\r\n } else {\r\n $key = $elementModel->getFilterFullName( true, true, false );\r\n }\r\n\r\n $dbKey = str_replace( \"___\", \".\", $key );\r\n $dbKey = FabrikWorker::getDbSafeName( $dbKey );\r\n\r\n //if its a single search field set all the elements post data to the\r\n // single search value\r\n if ($searchMode == 'OR') {\r\n $request[$key] = $search;\r\n $element->filter_type = 'field';\r\n }\r\n if (!array_key_exists( $key, $request)) {\r\n $key .=\"_raw\";\r\n }\r\n //$$$ rob @since 2.0b3 - ignore any request vars of '_clear_' - these have already been removed\r\n //from the session in getRequestData()\r\n\r\n if (array_key_exists( $key, $request ) && $request[$key] != '_clear_') {\r\n\r\n $safeKey = FabrikWorker::getDbSafeName( $dbKey );\r\n $arr = $elementModel->getFilterConditionSQL( $request[$key], $this->filters, $safeKey, $key );\r\n //only ever turn this option on if you are using the AND search mode (i.e. filters for each element)\r\n //$arr['no-filter-setup'] = ($element->filter_type == '' && $searchModel == 'AND') ? 1 : 0;\r\n\r\n ///$$$ rob not sure you should be looking on the search mode s well? no-filter-setup is for search form filters\r\n $arr['no-filter-setup'] = ($element->filter_type == '') ? 1 : 0;\r\n $arr['ellabel'] = $element->label;\r\n $arr['filter-label'] = $elementModel->getFilterLabel( @$arr['value'] );\r\n if (!empty( $arr['sqlCond'] )) {\r\n\r\n $sqlCond = \"( \" . $arr['sqlCond'] ;\r\n //check if the filter has a corresponding prefilter set.\r\n if (array_key_exists( $key, $prefilters )) {\r\n $sqlCond .= \" AND \" . $prefilters[$key]['sqlCond'];\r\n unset( $prefilters[$key] );\r\n }\r\n $sqlCond .= \")\";\r\n\r\n $arr['sqlCond'] = $sqlCond;\r\n $arr['type'] = 'postfilter';\r\n //TODO: make this and/or choice somehow for use perhaps?\r\n $arr['concat'] = ' AND ';\r\n $arr['grouped_to_previous'] = false;\r\n $arr['isJoinElement'] = $elementModel->_isJoin;\r\n $arr['required'] = $elementModel->getParams()->get('filter_required');\r\n $this->filters[$key] = $arr;\r\n }\r\n FabrikHelperHTML::debug($arr, 'found key');\r\n }\r\n }\r\n }\r\n FabrikHelperHTML::debug(@$elanmes, 'all');\r\n $this->_searchesNoFilterSetup = array();\r\n }\r\n $pluginManager =& $this->getPluginManager();\r\n $res = $pluginManager->runPlugins( 'onFiltersGot', $this, 'table' );\r\n return $this->filters;\r\n }", "title": "" }, { "docid": "1af7267191c40aa6aaf892fca02fcb87", "score": "0.5542021", "text": "private function applyFilters()\n {\n $this->filterDistinct();\n $this->filterMetaJoin();\n $this->filterSearch();\n }", "title": "" }, { "docid": "f28242acf39cbabda24c63315cc96063", "score": "0.5541447", "text": "public function filters();", "title": "" }, { "docid": "ccf8db822818727f3ff066a28c7f8719", "score": "0.5519564", "text": "public function orWhereComplex()\n {\n return $this->addComplexCondition('or', $this->conditions);\n }", "title": "" }, { "docid": "dbbb1ad7bb0f040034ad392b9b818ec7", "score": "0.5517652", "text": "public function orWhereGroup() : self\n {\n if (!$this->stack[$this->idx]['gotFirstCondition']) {\n $this->stack[$this->idx]['query'] .= '(';\n $this->stack[$this->idx]['gotFirstCondition'] = true;\n } else {\n $this->stack[$this->idx]['query'] .= 'OR (';\n }\n $this->pushFrame();\n $this->stack[$this->idx]['gotWhere'] = true;\n return $this;\n }", "title": "" }, { "docid": "0ee38af67a6e6bc4b64af186cff6d807", "score": "0.5508915", "text": "public function onSetFilter()\n {\n $sortOrder = $this->getSortOrder();\n\n $data = collect(post('filter', []));\n if ($data->count() < 1) {\n return $this->replaceFilter(collect([]), $sortOrder);\n }\n\n $properties = Property::whereIn('slug', $data->keys())->get();\n $filter = $data->mapWithKeys(function ($values, $id) use ($properties) {\n $property = Filter::isSpecialProperty($id) ? $id : $properties->where('slug', $id)->first();\n if (is_array($values)\n && array_key_exists('min', $values)\n && array_key_exists('max', $values)) {\n if ($values['min'] === '' && $values['max'] === '') {\n return [];\n }\n\n return [\n $id => new RangeFilter(\n $property, [\n $values['min'] ?? null,\n $values['max'] ?? null,\n ]\n ),\n ];\n }\n\n // Remove empty set values\n $values = array_filter(array_wrap($values));\n\n return count($values) ? [$id => new SetFilter($property, $values)] : [];\n });\n\n return $this->replaceFilter($filter, $sortOrder);\n }", "title": "" }, { "docid": "e535fd8ba758385bc84b9475b0a051d4", "score": "0.54970664", "text": "public function orWhereOpen()\n {\n $this->where[] = array('ext_operator' => 'OR (');\n\n return $this;\n }", "title": "" }, { "docid": "3987181a771b2a12179b442cc65b52fa", "score": "0.54900104", "text": "function filters()\n {\n }", "title": "" }, { "docid": "8c1981562d2f8b41f6495103d5a6dbc4", "score": "0.5487902", "text": "public function orGroup()\n {\n return $this->addConditionGroup('OR');\n }", "title": "" }, { "docid": "442d88e3e0e89e305fe42a4647afed2f", "score": "0.5483349", "text": "public function initActiveFilters($query) {\n $search_id = $query->getOption('search id');\n $index_id = $this->info['instance'];\n $facets = facetapi_get_enabled_facets($this->info['name']);\n $this->fields = array();\n\n // We statically store the current search per facet so that we can correctly\n // assign it when building the facets. See the build() method in the query\n // type plugin classes.\n // Change.\n $active = drupal_static('search_api_facetapi_active_facets', array());\n foreach ($facets as $facet) {\n $options = $this->getFacet($facet)->getSettings()->settings;\n // The 'default_true' option is a choice between \"show on all but the\n // selected searches\" (TRUE) and \"show for only the selected searches\".\n $default_true = isset($options['default_true']) ? $options['default_true'] : TRUE;\n // The 'facet_search_ids' option is the list of selected searches that\n // will either be excluded or for which the facet will exclusively be\n // displayed.\n $facet_search_ids = isset($options['facet_search_ids']) ? $options['facet_search_ids'] : array();\n\n if (array_search($search_id, $facet_search_ids) === FALSE) {\n $search_ids = variable_get('search_api_facets_search_ids', array());\n if (empty($search_ids[$index_id][$search_id])) {\n // Remember this search ID.\n $search_ids[$index_id][$search_id] = $search_id;\n variable_set('search_api_facets_search_ids', $search_ids);\n }\n if (!$default_true) {\n continue; // We are only to show facets for explicitly named search ids.\n }\n }\n elseif ($default_true) {\n continue; // The 'facet_search_ids' in the settings are to be excluded.\n }\n $active[$facet['name']] = $search_id;\n $this->fields[$facet['name']] = array(\n 'field' => $facet['field'],\n 'limit' => $options['hard_limit'],\n 'operator' => $options['operator'],\n 'min_count' => $options['facet_mincount'],\n 'missing' => $options['facet_missing'],\n );\n }\n }", "title": "" }, { "docid": "149662006d05d442b57aa5970cf4f1b8", "score": "0.5480689", "text": "function SearchFilter($query) {\nif ($query->is_search) {\n$query->set('post_type', array('post', 'Bibliotech', 'Spotlights'));\n}\nreturn $query;\n}", "title": "" }, { "docid": "5d95081c1ebe3dbe06fc7864672b9f01", "score": "0.54754347", "text": "public function checkboxModeSelectorFilter()\r\n {/*{{{*/\r\n $db_whereClause = '';\r\n\r\n // filter only if at least one category is set\r\n if (is_array($this->piVars['modeselector_cat'])) {\r\n $db_whereClause .= ' AND (';\r\n $count = 0;\r\n foreach ($this->piVars['modeselector_cat'] as $i => $value) {\r\n if ($count) {\r\n $db_whereClause .= ' OR ';\r\n }\r\n $db_whereClause .= ' cat LIKE \"%' . $this->sanitizeData($value) . '%\"';\r\n $count++;\r\n }\r\n $db_whereClause .= ')';\r\n }\r\n\r\n if (is_array($this->piVars['modeselector_cat3'])) {\r\n $db_whereClause .= ' AND (';\r\n $count = 0;\r\n foreach ($this->piVars['modeselector_cat3'] as $i => $value) {\r\n if ($count) {\r\n $db_whereClause .= ' OR ';\r\n }\r\n $db_whereClause .= ' cat3 LIKE \"%' . $this->sanitizeData($value) . '%\"';\r\n $count++;\r\n }\r\n $db_whereClause .= ')';\r\n }\r\n\r\n return $db_whereClause;\r\n }", "title": "" }, { "docid": "3a67fd84fabafba1143313802243c1bc", "score": "0.5469854", "text": "private function setCustomOrFilters($q, $customFilters)\n {\n // reseta os valores\n $condition = array();\n $value = array();\n\n // adiciona os filtros OR customizados\n foreach ($customFilters['OR'] as $c => $v)\n {\n $condition[] = $c;\n $value[] = $v;\n }\n\n if (count($condition) > 0)\n {\n $str = implode(' OR ',$condition);\n $q->orWhere($str,$value);\n } \n }", "title": "" }, { "docid": "d2b9f9f1132ca1f322f844659ef15b28", "score": "0.5465991", "text": "public function setDataFilter($filter);", "title": "" }, { "docid": "ee398f3b676488332119c35c7e60c8d0", "score": "0.5458052", "text": "function transformToNewAdvancedFilter() {\n\t\t$standardFilter = $this->transformStandardFilter();\n\t\t$advancedFilter = $this->getSelectedAdvancedFilter();\n\t\t$allGroupColumns = $anyGroupColumns = array();\n\t\tforeach($advancedFilter as $index=>$group) {\n\t\t\t$columns = $group['columns'];\n\t\t\t$and = $or = 0;\n\t\t\t$block = $group['condition'];\n\t\t\tif(count($columns) != 1) {\n\t\t\t\tforeach($columns as $column) {\n\t\t\t\t\tif($column['column_condition'] == 'and') {\n\t\t\t\t\t\t++$and;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++$or;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($and == count($columns)-1 && count($columns) != 1) {\n\t\t\t\t\t$allGroupColumns = array_merge($allGroupColumns, $group['columns']);\n\t\t\t\t} else {\n\t\t\t\t\t$anyGroupColumns = array_merge($anyGroupColumns, $group['columns']);\n\t\t\t\t}\n\t\t\t} else if($block == 'and' || $index == 1) {\n\t\t\t\t$allGroupColumns = array_merge($allGroupColumns, $group['columns']);\n\t\t\t} else {\n\t\t\t\t$anyGroupColumns = array_merge($anyGroupColumns, $group['columns']);\n\t\t\t}\n\t\t}\n\t\tif($standardFilter) {\n\t\t\t$allGroupColumns = array_merge($allGroupColumns,$standardFilter);\n\t\t}\n\t\t$transformedAdvancedCondition = array();\n\t\t$transformedAdvancedCondition[1] = array('columns' => $allGroupColumns, 'condition' => 'and');\n\t\t$transformedAdvancedCondition[2] = array('columns' => $anyGroupColumns, 'condition' => '');\n\n\t\treturn $transformedAdvancedCondition;\n\t}", "title": "" }, { "docid": "8e83a0d6627e3dcb18e5720d800ca235", "score": "0.5431224", "text": "protected function setFilters(): void\n {\n }", "title": "" }, { "docid": "715a155599aa4be2219537dd9985b8ab", "score": "0.54164964", "text": "private function addCommonFilters()\n {\n // Setting proper shop\n $this->getSearchAdapter()->addFilter('id_shop', [(int) $this->context->shop->id]);\n\n // Visibility of a product must be in catalog or both (search & catalog)\n $this->addFilter('visibility', ['both', 'catalog']);\n\n // User must belong to one of the groups that can access the product\n // (Actually it's categories that define access to a product, user must have access to at least\n // one category the product is assigned to.)\n if (Group::isFeatureActive()) {\n $groups = FrontController::getCurrentCustomerGroups();\n $this->addFilter('id_group', empty($groups) ? [Group::getCurrent()->id] : $groups);\n }\n }", "title": "" }, { "docid": "664ac5d8dc68090a5104ef5f716c20e7", "score": "0.54072773", "text": "function set_search_set($filter)\n {\n $this->filter = $filter;\n }", "title": "" }, { "docid": "3b7c6c1326a49f90f27e75cd6d9be6d3", "score": "0.5407169", "text": "protected function addAdditionalWhereConditions() {}", "title": "" }, { "docid": "dc92090d3ceba3af117407e439ca49b0", "score": "0.5401161", "text": "public function getFilters()\n {\n // get the search form data\n $data = $this->form->getData();\n\n $filters = [];\n\n TSession::setValue(__CLASS__.'_filter_data', NULL);\n TSession::setValue(__CLASS__.'_filters', NULL);\n\n if (isset($data->leitor_id) AND ( (is_scalar($data->leitor_id) AND $data->leitor_id !== '') OR (is_array($data->leitor_id) AND (!empty($data->leitor_id)) )) )\n {\n\n $filters[] = new TFilter('leitor_id', '=', $data->leitor_id);// create the filter \n }\n if (isset($data->exemplar_id) AND ( (is_scalar($data->exemplar_id) AND $data->exemplar_id !== '') OR (is_array($data->exemplar_id) AND (!empty($data->exemplar_id)) )) )\n {\n\n $filters[] = new TFilter('exemplar_id', '=', $data->exemplar_id);// create the filter \n }\n if (isset($data->dt_emprestimo) AND ( (is_scalar($data->dt_emprestimo) AND $data->dt_emprestimo !== '') OR (is_array($data->dt_emprestimo) AND (!empty($data->dt_emprestimo)) )) )\n {\n\n $filters[] = new TFilter('dt_emprestimo', '>=', $data->dt_emprestimo);// create the filter \n }\n if (isset($data->dt_emprestimo_final) AND ( (is_scalar($data->dt_emprestimo_final) AND $data->dt_emprestimo_final !== '') OR (is_array($data->dt_emprestimo_final) AND (!empty($data->dt_emprestimo_final)) )) )\n {\n\n $filters[] = new TFilter('dt_emprestimo', '<=', $data->dt_emprestimo_final);// create the filter \n }\n if (isset($data->dt_previsao) AND ( (is_scalar($data->dt_previsao) AND $data->dt_previsao !== '') OR (is_array($data->dt_previsao) AND (!empty($data->dt_previsao)) )) )\n {\n\n $filters[] = new TFilter('dt_previsao', '>=', $data->dt_previsao);// create the filter \n }\n if (isset($data->dt_prevista_devolucao_final) AND ( (is_scalar($data->dt_prevista_devolucao_final) AND $data->dt_prevista_devolucao_final !== '') OR (is_array($data->dt_prevista_devolucao_final) AND (!empty($data->dt_prevista_devolucao_final)) )) )\n {\n\n $filters[] = new TFilter('dt_previsao', '<=', $data->dt_prevista_devolucao_final);// create the filter \n }\n if (isset($data->dt_devolucao) AND ( (is_scalar($data->dt_devolucao) AND $data->dt_devolucao !== '') OR (is_array($data->dt_devolucao) AND (!empty($data->dt_devolucao)) )) )\n {\n\n $filters[] = new TFilter('dt_devolucao', '>=', $data->dt_devolucao);// create the filter \n }\n if (isset($data->dt_devolucao_final) AND ( (is_scalar($data->dt_devolucao_final) AND $data->dt_devolucao_final !== '') OR (is_array($data->dt_devolucao_final) AND (!empty($data->dt_devolucao_final)) )) )\n {\n\n $filters[] = new TFilter('dt_devolucao', '<=', $data->dt_devolucao_final);// create the filter \n }\n\n // fill the form with data again\n $this->form->setData($data);\n\n // keep the search data in the session\n TSession::setValue(__CLASS__.'_filter_data', $data);\n\n return $filters;\n }", "title": "" }, { "docid": "b6b11ccd87b1d208aa4f52a38bbfb01b", "score": "0.5400265", "text": "public function applyAdditionalFilterParams(): void\n {\n\n }", "title": "" }, { "docid": "9fb7aadb8db2b3e8b02d22405bbe4809", "score": "0.5399331", "text": "abstract function set_search_set($filter);", "title": "" }, { "docid": "9e2baa8fec4ed768af048f409b2b4c47", "score": "0.53953075", "text": "public function computeFilter(){\r\n\t\t\t$this->oSystem->getLogger()->debug( \"Aplicando filtro \" . get_class($this) );\r\n\t\t\t\r\n\t\t\tif ( $_REQUEST['_estado'] )\r\n\t\t\t\t$this->filtroSQL .= \" por.estado='$_REQUEST[_estado]'\";\r\n\t\t\telse\r\n\t\t\t\t$this->filtroSQL .= \" por.estado IN ('ON','OFF')\";\r\n\t\t\t\r\n\t\t\tif ( $_REQUEST['_id_zona'] )\r\n\t\t\t\t$this->filtroSQL .= \" AND zon.id = $_REQUEST[_id_zona]\";\r\n\t\t\t\r\n\t\t\tif ( $_REQUEST['_id_pais'] )\r\n\t\t\t\t$this->filtroSQL .= \" AND pro.id_pais ='$_REQUEST[_id_pais]'\";\r\n\t\t\t\r\n\t\t\tif ( $_REQUEST['_id_provincia'] )\r\n\t\t\t\t$this->filtroSQL .= \" AND pro.id ='$_REQUEST[_id_provincia]'\";\r\n\t\t\t\r\n\t\t\tif ( $_REQUEST['_peso'] && $_REQUEST['_peso']>0)\r\n\t\t\t\t$this->filtroSQL .= \" AND por.peso >= $_REQUEST[_peso]\";\r\n\t\t\t\r\n\t\t\t$this->filtroSQL .= \" GROUP BY por.id ORDER BY zon.zona, por.peso\";\r\n\t\t}", "title": "" }, { "docid": "074aa66684ac3dfb75e61f54495ff946", "score": "0.5387592", "text": "public function buildFilters();", "title": "" }, { "docid": "d50c8435c2ea0200f87f2a7d68e1cbee", "score": "0.53807986", "text": "public function setFilter(AbstractFilter $filter)\n {\n return $this->_setFacetParam('filter', $filter->toArray());\n }", "title": "" }, { "docid": "ce9e39efd2d23c0fd58c14e6d17dc7e7", "score": "0.5374308", "text": "protected function _setFilterOptions($formData)\n {\n if (isset($formData['proofreader_shift_time']))\n {\n $this->_groupModel->setFilter(Application_Model_Group::FILTER_PR_SHIFT_ID, $formData['proofreader_shift_time']);\n }\n\n if (isset($formData['typist_shift_time']))\n {\n $this->_groupModel->setFilter(Application_Model_Group::FILTER_TYPIST_SHIFT_ID, $formData['typist_shift_time']);\n }\n\n if (isset($formData['on_shift']))\n {\n $this->_groupModel->setFilter(Application_Model_Group::FILTER_SHIFT, $formData['on_shift']);\n }\n\n if (isset($formData['trained_in']))\n {\n $this->_groupModel->setFilter(Application_Model_Group::FILTER_TRAINING, $formData['trained_in']);\n }\n\n if (isset($formData['typist_grade']))\n {\n $this->_groupModel->setFilter(Application_Model_Group::FILTER_TYPIST_GRADE, $formData['typist_grade']);\n }\n\n if (isset($formData['proofreader_grade']))\n {\n $this->_groupModel->setFilter(Application_Model_Group::FILTER_PROOFREADER_GRADE, $formData['proofreader_grade']);\n }\n }", "title": "" }, { "docid": "979708d51337b01c012090cff16ff9e6", "score": "0.5352699", "text": "public function getFilter($i) {\n $filter = parent::getFilter($i);\n $mfilter = '';\n \n switch($this->filtermode){\n // commandes à valider\n // \n case 'AV':\n $mfilter = '/*commandes AV*/((MODEPAIEMENT='.XModEPassLibre::$WTSORDER_MODEPAIEMENT_CARTE_BANQUAIRE.' AND ETATPAIECN='.XModEPassLibre::$WTSORDER_ETATPAIECN_AUTORISATION_ACCEPTEE.' AND ETATFABRICATION='.XModEPassLibre::$WTSORDER_ETATFABRICATION_PAIEMENT_ACCEPTE.') OR (ETATFABRICATION='.XModEPassLibre::$WTSORDER_ETATFABRICATION_ATTENTE_DE_PAIEMENT.' AND MODEPAIEMENT='.XModEPassLibre::$WTSORDER_MODEPAIEMENT_CHEQUE_OU_MANDAT.' AND ETATPAIECHQ='.XModEPassLibre::$WTSORDER_ETATPAIECHQ_ATTENTE_CHEQUE.'))';\n break;\n // commandes valides non transmises\n case 'VNT':\n $mfilter = '/*commandes VNT*/(ETATFABRICATION='.XModEPassLibre::$WTSORDER_ETATFABRICATION_COMPLETE.')';\n break;\n // commandes à éditer/expédier\n case 'AEE':\n $mfilter = '/*commandes AEE*/(ETATFABRICATION='.XModEPassLibre::$WTSORDER_ETATFABRICATION_CLOSE.' AND HASNEWCARDS=1)';\n break;\n // devis non finalisés\n case 'DNF':\n $mfilter = '/*commandes DNF*/(ETATFABRICATION not in ('.XModEPassLibre::$WTSORDER_ETATFABRICATION_CLOSE.', '.XModEPassLibre::$WTSORDER_ETATFABRICATION_COMPLETE.', '.XModEPassLibre::$WTSORDER_ETATFABRICATION_EDITEE.','.XModEPassLibre::$WTSORDER_ETATFABRICATION_PAIEMENT_ACCEPTE.','.XModEPassLibre::$WTSORDER_ETATFABRICATION_ANNULEE.'))';\n break;\n }\n if (!empty($filter) && !empty($mfilter))\n $filter = $filter . ' AND ';\n \n return $filter.$mfilter;\n }", "title": "" }, { "docid": "135c23033a664d6d0d06dc27dc636359", "score": "0.53419816", "text": "public function externFilter(){\r\n\t\t\t$this->externQuery = true;\r\n\t\t\t$this->isPesistance = false;\r\n\t\t\t$this->filter();\r\n\t\t}", "title": "" }, { "docid": "135c23033a664d6d0d06dc27dc636359", "score": "0.53419816", "text": "public function externFilter(){\r\n\t\t\t$this->externQuery = true;\r\n\t\t\t$this->isPesistance = false;\r\n\t\t\t$this->filter();\r\n\t\t}", "title": "" }, { "docid": "135c23033a664d6d0d06dc27dc636359", "score": "0.53419816", "text": "public function externFilter(){\r\n\t\t\t$this->externQuery = true;\r\n\t\t\t$this->isPesistance = false;\r\n\t\t\t$this->filter();\r\n\t\t}", "title": "" }, { "docid": "9c846f1f3c0599504238e31d32e4d95b", "score": "0.53237873", "text": "function getParameterOr($name, $or_value, $filter);", "title": "" }, { "docid": "c3d5eafcc0a09e5b9dd82ba4861226aa", "score": "0.53156966", "text": "public function whereOr($field, $operator, $value);", "title": "" }, { "docid": "be99adb7d26f2e2d75e0b470f1ea0108", "score": "0.5305082", "text": "public function appendOr() {\r\n $condKeysValues = array();\r\n foreach (func_get_args() as $params) {\r\n $keyVal = array();\r\n if($params instanceof IDocument){\r\n $keyVal[array_keys($params->getDocument())[0]] = array_values($params->getDocument())[0];\r\n }else{\r\n $keyVal[array_keys($params)[0]] = array_values($params)[0];\r\n }\r\n $condKeysValues[] = $keyVal;\r\n }\r\n $this->_array['$or'] = $condKeysValues;\r\n return $this;\r\n }", "title": "" }, { "docid": "e58ca2d52ae881b5de864e81dcf31dc8", "score": "0.52950484", "text": "private function reset_filters()\r\n\t\t{\r\n\t\t\tforeach ($this->c_columns as $key_column => &$val_column)\r\n\t\t\t{\r\n\t\t\t\tif(isset($val_column['filter']))\r\n\t\t\t\t{\r\n\t\t\t\t\tunset($val_column['filter']);\r\n\t\t\t\t}\r\n\t\t\t\tunset($this->c_columns[$key_column]['taglov_possible']);\r\n\t\t\t}\r\n\r\n\t\t\t$this->check_column_lovable();\r\n\t\t}", "title": "" }, { "docid": "d310408816b098ce00cb0e75d8144065", "score": "0.5289409", "text": "function SetDefaultExtFilter(&$fld, $so1, $sv1, $sc, $so2, $sv2) {\n\t\t$fld->DefaultSearchValue = $sv1; // Default ext filter value 1\n\t\t$fld->DefaultSearchValue2 = $sv2; // Default ext filter value 2 (if operator 2 is enabled)\n\t\t$fld->DefaultSearchOperator = $so1; // Default search operator 1\n\t\t$fld->DefaultSearchOperator2 = $so2; // Default search operator 2 (if operator 2 is enabled)\n\t\t$fld->DefaultSearchCondition = $sc; // Default search condition (if operator 2 is enabled)\n\t}", "title": "" }, { "docid": "628b32a7b90a3f816f4da24cb634d9ea", "score": "0.52890015", "text": "public function getFilters()\n {\n // get the search form data\n $data = $this->form->getData();\n\n $filters = [];\n\n TSession::setValue(__CLASS__.'_filter_data', NULL);\n TSession::setValue(__CLASS__.'_filters', NULL);\n\n if (isset($data->id) AND ( (is_scalar($data->id) AND $data->id !== '') OR (is_array($data->id) AND (!empty($data->id)) )) )\n {\n\n $filters[] = new TFilter('id', '=', $data->id);// create the filter\n }\n if (isset($data->tipo_estoque) AND ( (is_scalar($data->tipo_estoque) AND $data->tipo_estoque !== '') OR (is_array($data->tipo_estoque) AND (!empty($data->tipo_estoque)) )) )\n {\n\n $filters[] = new TFilter('tipo_estoque', '=', $data->tipo_estoque);// create the filter\n }\n if (isset($data->tipo_movimento_id) AND ( (is_scalar($data->tipo_movimento_id) AND $data->tipo_movimento_id !== '') OR (is_array($data->tipo_movimento_id) AND (!empty($data->tipo_movimento_id)) )) )\n {\n\n $filters[] = new TFilter('tipo_movimento_id', '=', $data->tipo_movimento_id);// create the filter\n }\n if (isset($data->situacao_id) AND ( (is_scalar($data->situacao_id) AND $data->situacao_id !== '') OR (is_array($data->situacao_id) AND (!empty($data->situacao_id)) )) )\n {\n\n $filters[] = new TFilter('situacao_id', '=', $data->situacao_id);// create the filter\n }\n if (isset($data->pessoa_id) AND ( (is_scalar($data->pessoa_id) AND $data->pessoa_id !== '') OR (is_array($data->pessoa_id) AND (!empty($data->pessoa_id)) )) )\n {\n\n $filters[] = new TFilter('pessoa_id', '=', $data->pessoa_id);// create the filter\n }\n if (isset($data->data_abertura_ini) AND ( (is_scalar($data->data_abertura_ini) AND $data->data_abertura_ini !== '') OR (is_array($data->data_abertura_ini) AND (!empty($data->data_abertura_ini)) )) )\n {\n\n $filters[] = new TFilter('data_abertura', '>=', $data->data_abertura_ini);// create the filter\n }\n if (isset($data->data_abertura_fim) AND ( (is_scalar($data->data_abertura_fim) AND $data->data_abertura_fim !== '') OR (is_array($data->data_abertura_fim) AND (!empty($data->data_abertura_fim)) )) )\n {\n\n $filters[] = new TFilter('data_abertura', '<=', $data->data_abertura_fim);// create the filter\n }\n if (isset($data->vlr_total_ini) AND ( (is_scalar($data->vlr_total_ini) AND $data->vlr_total_ini !== '') OR (is_array($data->vlr_total_ini) AND (!empty($data->vlr_total_ini)) )) )\n {\n\n $filters[] = new TFilter('vlr_total', '>=', $data->vlr_total_ini);// create the filter\n }\n if (isset($data->vlr_total_fim) AND ( (is_scalar($data->vlr_total_fim) AND $data->vlr_total_fim !== '') OR (is_array($data->vlr_total_fim) AND (!empty($data->vlr_total_fim)) )) )\n {\n\n $filters[] = new TFilter('vlr_total', '<=', $data->vlr_total_fim);// create the filter\n }\n if (isset($data->data_entrega_ini) AND ( (is_scalar($data->data_entrega_ini) AND $data->data_entrega_ini !== '') OR (is_array($data->data_entrega_ini) AND (!empty($data->data_entrega_ini)) )) )\n {\n\n $filters[] = new TFilter('data_entrega', '>=', $data->data_entrega_ini);// create the filter\n }\n if (isset($data->data_entrega_fim) AND ( (is_scalar($data->data_entrega_fim) AND $data->data_entrega_fim !== '') OR (is_array($data->data_entrega_fim) AND (!empty($data->data_entrega_fim)) )) )\n {\n\n $filters[] = new TFilter('data_entrega', '<=', $data->data_entrega_fim);// create the filter\n }\n\n // fill the form with data again\n $this->form->setData($data);\n\n // keep the search data in the session\n TSession::setValue(__CLASS__.'_filter_data', $data);\n\n return $filters;\n }", "title": "" }, { "docid": "d8517f2d12876f68c899be24b84cd8bf", "score": "0.528746", "text": "public function computeFilter(){\r\n\t\t\t$this->oSystem->getLogger()->debug( \"Aplicando filtro \" . get_class($this) );\r\n\t\t\t\r\n\t\t\tif ( $_REQUEST['_estado'] )\r\n\t\t\t\t$this->filtroSQL .= \" zon.estado='$_REQUEST[_estado]'\";\r\n\t\t\telse\r\n\t\t\t\t$this->filtroSQL .= \" zon.estado IN ('ON','OFF')\";\r\n\t\t\t\r\n\t\t\tif ( $_REQUEST['_id_zona'] )\r\n\t\t\t\t$this->filtroSQL .= \" AND zon.id = '$_REQUEST[_id_zona]\";\r\n\t\t\t\r\n\t\t\tif ( $_REQUEST['_id_pais'] )\r\n\t\t\t\t$this->filtroSQL .= \" AND pro.id_pais ='$_REQUEST[_id_pais]'\";\r\n\t\t\t\r\n\t\t\tif ( $_REQUEST['_id_provincia'] )\r\n\t\t\t\t$this->filtroSQL .= \" AND pro.id ='$_REQUEST[_id_provincia]'\";\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$this->filtroSQL .= \" GROUP BY zon.id ORDER BY zon.zona\";\r\n\t\t}", "title": "" }, { "docid": "58df74612fb7067880d681aa4b0edce5", "score": "0.52842206", "text": "function buildFilterPanel() \n\t{\n\t\tif( !$this->permis[$this->tName][\"search\"] \n\t\t\t|| $this->pSetEdit->isSearchRequiredForFiltering() && !$this->isRequiredSearchRunning() )\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tinclude_once getabspath(\"classes/filterpanel.php\");\t\n\t\t$params = array();\n\t\t$params[\"pageObj\"] = &$this;\n\t $filterPanel = new FilterPanel($params);\n\t\t$filterPanel->buildFilterPanel();\n\t}", "title": "" }, { "docid": "473a56f059ccc072390f8e5f4e447eb5", "score": "0.5283408", "text": "abstract public function filters(): array;", "title": "" }, { "docid": "a47975e2661e7422a311610b3b8c3279", "score": "0.52807045", "text": "protected function _getFilterWhere()\n {\n $oDB = oxDb::getDb();\n\n $sArt2CatView = getViewName('oxobject2category');\n $sArtView = getViewName('oxarticles');\n\n $aWhere = array();\n $aFilter = $this->getFilter();\n\n $sEanField = $sArtView . '.oxean';\n\n if($this->_oAZConfig->sEanField) {\n $sEanField = $this->_oAZConfig->sEanField;\n }\n\n // only fields with non-empty EAN field value\t\n // changed by TD, main articles do not need to have an EAN code\n //$aWhere[] = $sEanField.\" != '' \";\n $aWhere[] = \"($sArtView.$sEanField != '' OR $sArtView.OXVARCOUNT > 0 )\";\n $aWhere[] = $sArtView . \".oxparentid = ''\";\n\n if(isset($aFilter['categories'])) {\n $aWhere[] = \" $sArt2CatView.oxcatnid IN ('\" . implode(\"','\", $aFilter['categories']) . \"')\";\n }\n\n if(isset($aFilter['fields']) && sizeof($aFilter['fields']) > 0) {\n foreach ($aFilter['fields'] as $aField) {\n\n $sWhereLine = $aField['field'] . \" \" . $aField['operator'];\n\n if($this->_oAZConfig->isRequiredOperatorValue($aField['operator'])) {\n\n $sWhereLine .= \" \" . $oDB->quote($aField['value']);\n }\n\n $aWhere[] = $sWhereLine;\n }\n }\n\n $sWhere = implode(\" AND \", $aWhere);\n\n return $sWhere;\n }", "title": "" }, { "docid": "b09792161f39b67e1ad26854ec2e5e25", "score": "0.5275446", "text": "function filter_init() {\n\n global $conf, $filter_permit_list, $filter_defs, $choose_filter;\n\n if(!is_null($filter_permit_list))\n {\n return;\n }\n\n if(!isset($conf['filter_dir']))\n {\n $filter_permit_list = FALSE;\n return;\n }\n\n $filter_permit_list = array();\n $filter_count = 0;\n\n foreach($choose_filter as $filter_shortname => $filter_choice)\n {\n if($filter_choice == \"\")\n continue;\n\n $filter_params = $filter_defs[$filter_shortname];\n if($filter_count == 0)\n {\n foreach($filter_params[\"data\"] as $key => $value)\n {\n if($value == $filter_choice)\n $filter_permit_list[$key] = $key;\n }\n }\n else\n {\n foreach($filter_permit_list as $key => $value)\n {\n $remove_key = TRUE;\n if(isset($filter_params[\"data\"][$key]))\n {\n if($filter_params[\"data\"][$key] == $filter_choice)\n {\n $remove_key = FALSE;\n }\n }\n if($remove_key)\n {\n unset($filter_permit_list[$key]);\n }\n }\n }\n $filter_count++;\n }\n\n if($filter_count == 0)\n $filter_permit_list = FALSE;\n\n}", "title": "" }, { "docid": "e5f8d857bdc327ec28df304b9578b8c7", "score": "0.52745163", "text": "protected function _renderFilters()\r\n {\r\n if ($this->_isFiltersRendered) {\r\n return $this;\r\n }\r\n\r\n foreach($this->_filters AS $filter){\r\n $keyFilter = $filter->getData()['field'];\r\n $valueFilter = substr($filter->getData()['value'],2,-2); // Delete '% AND %' of the string\r\n $condFilter = $filter->getData()['type']; // not used in this example\r\n\r\n // Loop you're item collection\r\n foreach($this->_items AS $key => $item){\r\n\r\n // If it's not an array, we use the search term to compare with the value of our item\r\n if(!is_array($item->{$keyFilter})){\r\n if(!(strpos(strtolower($item->{$keyFilter}),strtolower($valueFilter)) !== FALSE)){\r\n unset($this->_items[$key]);\r\n // If search term not founded, unset the item to not display it!\r\n }\r\n } else {\r\n // If it's an array\r\n $founded = false;\r\n foreach($item->{$keyFilter} AS $valeur){\r\n if(strpos(strtolower($valeur),strtolower($valueFilter)) !== FALSE){\r\n $founded = true;\r\n }\r\n }\r\n if(!$founded)\r\n unset($this->_items[$key]); // Not founded in the array, so unset the item\r\n }\r\n }\r\n\r\n }\r\n\r\n $this->_isFiltersRendered = true;\r\n return $this;\r\n }", "title": "" }, { "docid": "f38bc56bb839c8b3070328f25b4cf51d", "score": "0.52621377", "text": "function _buildQueryWhere( $incFilters = true )\r\n {\r\n if (isset( $this->_whereSQL )) {\r\n return $this->_whereSQL[$incFilters];\r\n }\r\n $aFilters\t=& $this->getFilterArray();\r\n $params =& $this->getParams();\r\n\r\n # $$$ hugh - added option to 'require filtering', so if no filters specified\r\n # we return an empty table. Only do this where $inFilters is set, so we're only doing this\r\n # on the main row count and data fetch, and things like\r\n # filter dropdowns still get built.\r\n if ($incFilters && $params->get('require-filter', false) && empty($aFilters)) {\r\n return \" WHERE 1 = -1 \";\r\n }\r\n\r\n //test - set table search mode to search all data (search-mode = OR) in which case\r\n // there is only one search box for the table. (Also for search plugin test setting\r\n // search-mode to OR.\r\n //default = AND which is the standard filter by individual element\r\n $searchMode = $params->get( 'search-mode', 'AND' );\r\n\r\n if (isset( $params ) && $this->_togglePreFilters == 0) {\r\n $aPrefilters =& $this->getPrefilterArray();\r\n } else {\r\n $aPrefilters = array();\r\n }\r\n $aOrSQL = array();\r\n $aFoundOrGroupings = array();\r\n $i = 0;\r\n\r\n $aSQLBits = array();\r\n FabrikHelperHTML::debug( $aFilters, 'aFilters' );\r\n FabrikHelperHTML::debug( $aPrefilters, 'prefilters' );\r\n\r\n if (is_array( $aFilters )) {\r\n /* stores sql for or statements */\r\n $c = 0;\r\n foreach ($aFilters as $key=>$val) {\r\n /*work through or columns first to build sql ( col = val or col = val...)\r\n * then remove them from the rest of the array\r\n */\r\n if (isset( $val['aOrCols'] )) {\r\n\r\n $aOrColumns = $val['aOrCols'] ;\r\n $filterVal = isset( $val['value'] ) ? $val['value'] : '';\r\n /* check if we've already performed it elsewhere */\r\n $done \t\t= false;\r\n foreach ($aFoundOrGroupings as $aFoundOrGroupSet) {\r\n $a = filter_unused( $aFoundOrGroupSet, $aOrColumns );\r\n if (empty( $a )){\r\n $done = true;\r\n }\r\n }\r\n if (!$done) {\r\n /*\r\n * ok we havent processed this group -\r\n * lets add it to the groups the we have processed\r\n */\r\n $aFoundOrGroupings[] = $aOrColumns;\r\n /*\r\n *now lets build that query string!\r\n */\r\n $orSql ='(';\r\n foreach ($aOrColumns as $col) {\r\n $col = FabrikWorker::getDbSafeName( $col );\r\n $orSql .= \"`$col` = '$filterVal' OR \" ;\r\n }\r\n $orSql = substr($orSql, 0, strlen($orSql)-3) . ')';\r\n $aOrSQL[] = $orSql;\r\n }\r\n /* ok, even if its been done before we still need to remove it from the filter array */\r\n unset ( $aFilters[$key] );\r\n $c++;\r\n }\r\n }\r\n\r\n\r\n foreach ($aFilters as $key=>$val) {\r\n $filterType \t\t\t= isset( $val['type'] ) ? $val['type']: 'dropdown';\r\n $filterVal \t\t\t\t= isset( $val['value'] ) ? $val['value'] : '';\r\n $filterExactMatch = isset( $val['match'] ) ? $val['match'] \t: '';\r\n $fullWordsOnly \t\t= isset( $val['full_words_only'] )? $val['full_words_only'] : '0';\r\n\r\n if (array_key_exists( $key, $aPrefilters )){\r\n if (array_key_exists( 'sqlCond' , $aPrefilters[$key] )) {\r\n $sqlCond = \"( \" .$val['sqlCond'] . \" AND \" . $aPrefilters[$key]['sqlCond'] . \" )\";\r\n } else {\r\n //$$$rob used for prefilter and table - \"Tables with database join elements linking to this table \" pointing to same prefilter opt\r\n $sqlCond = \"( \" .$val['sqlCond'];\r\n foreach ($aPrefilters[$key] as $tmpC) {\r\n $sqlCond .= \" $searchMode \" . $tmpC['sqlCond'];\r\n }\r\n $sqlCond .= \" )\";\r\n }\r\n unset( $aPrefilters[$key] );\r\n } else {\r\n $sqlCond = $val['sqlCond'];\r\n }\r\n\r\n if ( $filterVal != \"\" ) {\r\n if(!empty($aSQLBits)){\r\n $aSQLBits[] = \" $searchMode \";\r\n } else {\r\n $aSQLBits[] = \" ( \";\r\n }\r\n $aSQLBits[] = $sqlCond;\r\n $i ++;\r\n }\r\n }\r\n }\r\n if (!empty( $aSQLBits )) {\r\n $aSQLBits[] = \" )) \";\r\n }\r\n //add in any prefiltres not duplicated by filters\r\n //put them at the beginning of query as well\r\n\r\n $aSQLBits2 = array();\r\n $ingroup = false;\r\n for ($p = 0; $p < count( $aPrefilters ); $p++) {\r\n $n = $p +1 ;\r\n $gstart = \"\";\r\n $gend = \"\";\r\n if (array_key_exists( $n, $aPrefilters )) {\r\n if ( $aPrefilters[$n]['grouped_to_previous'] == 1) {\r\n $gstart = \"(\";\r\n $ingroup = true;\r\n } else {\r\n if($ingroup){\r\n $gend = ')';\r\n $ingroup = false;\r\n }\r\n }\r\n } else {\r\n if($ingroup){\r\n $gend = ')';\r\n $ingroup = false;\r\n }\r\n }\r\n $aSQLBits2[] = $aPrefilters[$p]['concat'];\r\n $aSQLBits2[] = $gstart.$aPrefilters[$p]['sqlCond'].$gend;\r\n }\r\n // $$$rob work out the where statment minus any filters (so only include prefilters)\r\n // this is needed to ensure that the filter drop downs contain the correct info.\r\n\r\n $sqlNoFilter = '';\r\n if (!empty( $aSQLBits2 )) {\r\n $aSQLBits2[0] = \"WHERE\";\r\n $sqlNoFilter .= implode( ' ', $aSQLBits2 );\r\n\r\n if (count( $aOrSQL ) > 0) {\r\n if (empty( $aSQLBits2 )) {\r\n $sqlNoFilter .= \" WHERE \" . implode( \" $searchMode \", $aOrSQL );\r\n } else {\r\n $sqlNoFilter .= ' AND ' . implode( \" $searchMode \", $aOrSQL );\r\n }\r\n }\r\n }\r\n\r\n //apply advanced filter query\r\n $advancedFilter = JRequest::getVar('advancedFilterContainer', array('value' => ''), 'default', 'none', 2);\r\n $sql = '';\r\n // $$$ rob - TESTING searchbot with pre-filters, as it results in\r\n // WHERE table.thing = 'prefilter_thing' OR (table.element LIKE '%searchword') OR ...\r\n // ... but we need ...\r\n // WHERE table.thing = 'prefilter_thing' AND ((table.element LIKE '%searchword%') OR ...)\r\n if (!empty( $aSQLBits )) {\r\n $aSQLBits2[] = ' AND ';\r\n } else {\r\n if (!empty( $aSQLBits2 )) {\r\n $aSQLBits[] = ')';\r\n }\r\n }\r\n\r\n $aSQLBits = array_merge( $aSQLBits2, $aSQLBits );\r\n if (!empty( $aSQLBits )) {\r\n $aSQLBits[0] = \"WHERE (\";\r\n\r\n $sql .= implode( ' ', $aSQLBits );\r\n\r\n if (count( $aOrSQL ) > 0) {\r\n // $$$ hugh - surely $aSQLBits will never be empty 'cos we set [0] to WHERE 3 lines above?\r\n if (empty( $aSQLBits )) {\r\n $sql .= \" WHERE \" . implode(\" $searchMode \", $aOrSQL );\r\n } else {\r\n $sql .= \" $searchMode \" . implode( \" $searchMode \", $aOrSQL );\r\n }\r\n }\r\n }\r\n if ($advancedFilter['value'] != '') {\r\n $sql .= empty( $sql ) ? \" WHERE \" : \" $searchMode \";\r\n $sql .= trim( trim( $advancedFilter['value'], \"AND\" ), \"OR\" );\r\n }\r\n $this->_whereSQL = array( '0'=>$sqlNoFilter, '1'=>$sql );\r\n return $this->_whereSQL[$incFilters];\r\n }", "title": "" }, { "docid": "9f5d5c11694fe6ad2edc55be0a91fd91", "score": "0.525437", "text": "protected function setFilterWhere()\n {\n if (Yii::$app->request->get('filter')) {\n $get = Yii::$app->request->get();\n foreach ($get as $category => $property) {\n if (!is_array($property)) {\n $property = array($property);\n }\n if (array_search($category, array_keys($this->model->attributes))) {\n $this->where[$category] = $property;\n } else {\n $this->getParams[$category] = $property;\n } \n }\n }\n \n return $this;\n }", "title": "" }, { "docid": "c54407dec539eac76cdb64a56e9e511d", "score": "0.5253631", "text": "public function define_filter($post)\r\n\t\t{\r\n\t\t\t// Set the selected lines to edit\r\n\t\t\t$this->define_selected_line($post['selected_lines']);\r\n\r\n\t\t\t//==================================================================\r\n\t\t\t// Browse the updated filter\r\n\t\t\t//==================================================================\r\n\t\t\t$column = $post['filter_col'];\r\n\r\n\t\t\tif($post['filter'] == '')\r\n\t\t\t{\r\n\t\t\t\tunset($this->c_columns[$column]['filter']['input']);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif($this->c_columns[$column]['data_type'] == 'date')\r\n\t\t\t\t{\r\n\t\t\t\t\t$tmp_result = $this->convert_localized_date_to_database_format($column,$post['filter'],__MYSQL__); // Database engine hard coded TODO\r\n\r\n\t\t\t\t\t$this->c_columns[$column]['filter']['input'] = array('filter' => $tmp_result,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'filter_display' => rawurldecode($post['filter'])\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->c_columns[$column]['filter']['input'] = array('filter' => rawurldecode($post['filter']),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'filter_display' => rawurldecode($post['filter'])\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(isset($this->c_columns[$column]['lov']))\r\n\t\t\t\t{\r\n\t\t\t\t\t// Replace all taglov\r\n\t\t\t\t\t$sql_src = $this->replace_taglov($column,$this->c_columns[$column]['lov']['sql']);\r\n\r\n\t\t\t\t\t$sql = 'SELECT * FROM ('.$sql_src.') t WHERE '.$this->c_columns[$column]['lov']['col_return'].' LIKE \"%'.$this->protect_sql(rawurldecode($post['filter']),$this->link).'%\"';\r\n\r\n\t\t\t\t\t$resultat = $this->exec_sql($sql,__LINE__,__FILE__,__FUNCTION__,__CLASS__,$this->link,false);\r\n\t\t\t\t\tif($this->c_columns[$column]['quick_help'])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif($this->rds_num_rows($resultat) == 1)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$this->c_columns[$column]['taglov_possible'] = true;\r\n\r\n\t\t\t\t\t\t\twhile($row = $this->rds_fetch_array($resultat))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$this->c_columns[$column]['filter']['input']['taglov'] = $row;\r\n\t\t\t\t\t\t\t}\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\tunset($this->c_columns[$column]['taglov_possible']);\r\n\t\t\t\t\t\t}\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$sql = '\tSELECT\r\n\t\t\t\t\t\t\t\t\t\t*\r\n\t\t\t\t\t\t\t\t\tFROM\r\n\t\t\t\t\t\t\t\t\t\t('.$sql_src.') t\r\n\t\t\t\t\t\t\t\t\tWHERE 1 = 1\r\n\t\t\t\t\t\t\t\t\t\tAND '.$this->c_columns[$column]['lov']['col_return'].' = \"'.$this->protect_sql(rawurldecode($post['filter']),$this->link).'\"\r\n\t\t\t\t\t\t\t\t';\r\n\t\t\t\t\t\t$res = $this->exec_sql($sql,__LINE__,__FILE__,__FUNCTION__,__CLASS__,$this->link,false);\r\n\r\n\t\t\t\t\t\tif($res->num_rows > 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$this->c_columns[$column]['taglov_possible'] = true;\r\n\r\n\t\t\t\t\t\t\twhile($row = $this->rds_fetch_array($res))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$this->c_columns[$column]['filter']['input']['taglov'] = $row;\r\n\t\t\t\t\t\t\t}\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\tunset($this->c_columns[$column]['taglov_possible']);\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\r\n\t\t\t$this->check_column_lovable();\r\n\r\n\t\t\tif(isset($this->c_columns[$column]['filter']) && count($this->c_columns[$column]['filter']) == 0)\r\n\t\t\t{\r\n\t\t\t\tunset($this->c_columns[$column]['filter']);\r\n\t\t\t}\r\n\t\t\t//==================================================================\r\n\r\n\t\t\t//==================================================================\r\n\t\t\t// Force active page to 1\r\n\t\t\t//==================================================================\r\n\t\t\t$this->define_attribute('__current_page',1);\r\n\t\t\t$this->define_limit_min(0);\r\n\t\t\t//==================================================================\r\n\r\n\t\t\t//==================================================================\r\n\t\t\t// Execute the query and display the elements\r\n\t\t\t//==================================================================\r\n\t\t\t$this->prepare_query(); // SRX optimization\r\n\r\n //error_log(print_r($this->c_columns,true));\r\n\t\t\t$json = $this->generate_lisha_json_param();\r\n\t\t\t$json_line = $this->generate_json_line();\r\n\r\n\t\t\t// XML return\r\n\t\t\theader(\"Content-type: text/xml\");\r\n\t\t\t$xml = \"<?xml version='1.0' encoding='UTF8'?>\";\r\n\t\t\t$xml .= \"<lisha>\";\r\n\t\t\t$xml .= \"<json_line>\".$this->protect_xml($json_line).\"</json_line>\";\r\n\t\t\t$xml .= \"<json>\".$this->protect_xml($json).\"</json>\";\r\n\t\t\t$xml .= \"</lisha>\";\r\n\t\t\techo $xml;\r\n\t\t\t//==================================================================\r\n\t\t}", "title": "" }, { "docid": "dd7d248d68fa4e7bf36694857105f03d", "score": "0.5253139", "text": "public function getFilterGroups()\n {\n $aggregator = $this->getAggregator();\n\n if ($aggregator == 'all') {\n return $this->conditionHelper->logicalAndConditions($this->getConditions());\n } else {\n return $this->conditionHelper->logicalOrConditions($this->getConditions());\n }\n }", "title": "" }, { "docid": "52b4d684a49e9f0f657c6ae28387d127", "score": "0.52525383", "text": "private function setAdvancedFilters($q, $params)\n {\n // reseta os valores\n $condition = array();\n $values = array();\n\n $filters = $params['advanced'];\n \n if (is_array($filters))\n {\n $encoded = false;\n }\n else\n {\n $encoded = true;\n $filters = json_decode($filters);\n }\n\n if (is_array($filters))\n {\n for ($i=0;$i<count($filters);$i++)\n {\n $filter = $filters[$i];\n\n // assign filter data (location depends if encoded or not)\n if ($encoded)\n {\n $field = $filter->field;\n $value = $filter->value;\n $compare = isset($filter->comparison) ? $filter->comparison : null;\n $filterType = $filter->type;\n } else\n {\n $field = $filter['field'];\n $value = $filter['value'];\n $compare = isset($filter['comparison']) ? $filter['comparison'] : null;\n $filterType = $filter['type'];\n }\n\n if (!preg_match('/\\./', $field))\n {\n $field = 'c.'.$field;\n }\n \n switch($filterType)\n {\n case 'string' : \n $condition[] = $field.\" stringSearch\";\n $values[] = \"%$value%\";\n break;\n case 'list' :\n $q->andWhereIn($field, $value);\n\n /*if (strstr($value,','))\n {\n $fi = explode(',',$value);\n for ($k=0;$k<count($fi);$k++)\n {\n $fi[$k] = \"'\".$fi[$k].\"'\";\n }\n $condition[] = $field.\" listSearch\";\n $value = implode(',',$fi);\n $values[] = $value;\n }\n else\n {\n $condition[] = $field;\n $values[] = $value;\n }*/\n break;\n case 'boolean' :\n $condition[] = $field;\n $values[] = $value;\n break;\n case 'numeric' :\n case 'date':\n switch ($compare)\n {\n case 'eq' : \n $condition[] = $field.\" gt\";\n $values[] = $value.\" 00:00:00\";\n $condition[] = $field.\" lt\";\n $values[] = $value.\" 23:59:59\";\n break;\n case 'lt' : \n $condition[] = $field.\" lt\";\n $values[] = $value;\n break;\n case 'gt' : \n $condition[] = $field.\" gt\";\n $values[] = $value;\n break;\n }\n break;\n }\n }\n }\n\n if (!empty ($condition))\n {\n $str = $this->setSearchTypes(implode(' AND ',$condition));\n //echo $str;\n //print_r($values);\n \n $q->andWhere($str,$values);\n\n }\n \n }", "title": "" }, { "docid": "5e4a46862f6966497ddaa662862a00e3", "score": "0.52493846", "text": "function andFilter($field, $operator = '=', $value = null);", "title": "" }, { "docid": "71e57e8c2f5996660b4560a6b842b8c1", "score": "0.52383167", "text": "private static function setFilters($filters){ \n $series = new Series();\n \n /* Global Search */\n if(!empty($filters['type']) && $filters['type'] == 'all'){\n $series = $series->where('title', 'like', \"%\".trim($filters['search']).\"%\");\n $series = $series->orWhere('genre', 'like', \"%\".trim($filters['search']).\"%\");\n $series = $series->orWhere('rating', '=', trim($filters['search']));\n \n } else {\n \n if(!empty($filters['type']) && $filters['type'] == 'title'){\n $series = $series->where('title', 'like', \"%\".trim($filters['search']).\"%\");\n }\n if(!empty($filters['type']) && $filters['type'] == 'genre'){\n $series = $series->where('genre', 'like', \"%\".trim($filters['search']).\"%\");\n }\n if(!empty($filters['type']) && $filters['type'] == 'rating'){\n $series = $series->where('rating', 'like', \"%\".trim($filters['search']).\"%\");\n } \n }\n return $series;\n }", "title": "" }, { "docid": "66f61429a831f9cc193e85467e08534c", "score": "0.5232744", "text": "function van_searchFilter($query) {\r\n\t$post_type='post';\r\n if ($query->is_search) {\r\n $query->set('post_type', $post_type);\r\n };\r\n return $query;\r\n}", "title": "" }, { "docid": "eb39e5dd839a5e4ec0d91ce14e03463f", "score": "0.5231941", "text": "public function amend_where_args() {\n\t\t$this->restricted_where_args = apply_filters( 'graphql_restricted_where_args', $this->restricted_where_args );\n\t\t$this->allowed_where_args = apply_filters( 'graphql_allowed_where_args', $this->allowed_where_args );\n\t}", "title": "" }, { "docid": "94125f0bf2e64c90edc8dc3150e38b6a", "score": "0.5225467", "text": "protected function _addSuggestFacetFilter($facetOptions)\n {\n $suggestConfig = $this->getSuggestConfig();\n if ($suggestConfig || count($this->_rawFilter)) {\n $facetOptions['size'] = $this->_getSuggestMaxSize();\n }\n if ($suggestConfig && isset($suggestConfig['field']) && $suggestConfig['field'] == $this->_requestVar) {\n if (isset($suggestConfig['q'])) {\n $querySuggest = $suggestConfig['q'];\n $suggestField = str_replace('.untouched', '.edge_ngram_front', $this->_getFilterField());\n\n $completionQuery = array(\n 'query' => array(\n 'match' => array(\n $suggestField => array(\n 'query' => $suggestConfig['q'],\n 'operator' => 'and',\n 'analyzer' => 'whitespace'\n )\n )\n )\n );\n $script = Mage::helper('smile_elasticsearch/groovy')-> buildTextMatchRegex($suggestConfig['q'], 'term');\n if ($script) {\n $facetOptions['script'] = $script;\n }\n $facetOptions['facet_filter'] = $completionQuery;\n }\n }\n return $facetOptions;\n }", "title": "" }, { "docid": "f63c952df4c0c424be2c5d36798e631f", "score": "0.522432", "text": "function &makeFilters()\r\n {\r\n $aFilters = array();\r\n $filters \t=& $this->getFilterArray();\r\n $table \t\t=& $this->getTable();\r\n $params \t=& $this->getParams();\r\n $searchMode = $params->get( 'search-mode', 'AND' );\r\n //$$$rob - this gives us the wrong elements in faceted browsing - eek!\r\n //$groups =& $form->getGroupsHiarachy();\r\n //$$$rob - this is ok though?!!\r\n if ($searchMode == 'AND') {\r\n $groups =& $this->getFormGroupElementData();\r\n //foreach ($groups as $k => $val) { //was working fine but trying to standardise this across all code\r\n //$groupModel =& $form->_groups[$k];\r\n foreach ($groups as $groupModel) {\r\n $g =& $groupModel->getGroup();\r\n $elementModels = null;\r\n $elementModels =& $groupModel->getPublishedElements();\r\n\r\n foreach ($elementModels as $kk => $val2) {\r\n $elementModel = $elementModels[$kk]; //dont do with =& as this foobars up the last elementModel\r\n $element =& $elementModel->getElement();\r\n\r\n //$$ rob added as some filter_types were null, have to double check that this doesnt\r\n // mess with showing the readonly values from search forms\r\n if ($element->filter_type <> '' && $element->filter_type != 'null') {\r\n if ($elementModel->canView() && $elementModel->canUseFilter()) {\r\n //force the correct group model into the element model to ensure no wierdness in getting the element name\r\n $elementModel->_group =& $groupModel;\r\n $o = new stdClass();\r\n $o->name = $elementModel->getFullName( false, true, false );\r\n //global $_PROFILER;\r\n //JDEBUG ? $_PROFILER->mark('About to getFilter for:' . $o->name) : null;\r\n $o->filter = $elementModel->getFilter();\r\n $o->required = $elementModel->getParams()->get('filter_required');\r\n $aFilters[$element->label] = $o;\r\n }\r\n }\r\n }\r\n }\r\n } else {\r\n //test new option to have one field to searc them all\r\n $v = JRequest::getVar( 'fabrik_table_filter_all');\r\n $o = new stdClass();\r\n $o->filter = \"<input size='20' value='$v' class='fabrik_filter' name='fabrik_table_filter_all' />\";\r\n $o->name = 'all';\r\n $aFilters[JText::_('ALL')] = $o;\r\n }\r\n\r\n //check for search form filters - if they exists create hidden elements for them\r\n\r\n foreach ($filters as $key=>$f) {\r\n if ($f['no-filter-setup']) {\r\n // eg for db joins replace key with label\r\n // $$$ hugh - this is breaking.\r\n //$firstrow = current(current($this->getData()));\r\n // $$ splitting it on to three lines seems to cure it.\r\n $firstdata = $this->getData();\r\n $firstgroup = current($firstdata);\r\n // $$$ hugh - taking out as the empty tests, as per this thread:\r\n // http://fabrikar.com/forums/showthread.php?t=8889\r\n // Short version ... if URL filter returns no results, we still need to show it in the\r\n // filter table.\r\n //if (empty($firstgroup)) {\r\n //continue;\r\n //}\r\n if (!empty($firstgroup)) {\r\n $firstrow = current($firstgroup);\r\n }\r\n //if (empty($firstrow)) {\r\n //continue;\r\n //}\r\n //$$$ rob test for issue reported here http://fabrikar.com/forums/showthread.php?t=8695\r\n //->data doesnt seem to exist when viewing from a table??? Cant really test as didnt get ftp /site details\r\n //$firstrow = $firstrow->data;\r\n $l = ((is_object($firstrow)) && array_key_exists($key, $firstrow)) ? $firstrow->$key : $f['filter-label'];\r\n $name = str_replace('.', '___', $key) . \"[value]\";\r\n $o = new stdClass();\r\n $o->filter = \"<input class='fabrik_filter' type='hidden' name='$name' value='\" . $f['filterVal'] . \"' />\" . $l;\r\n $o->name = $key;\r\n $aFilters[$f['ellabel']] = $o;\r\n }\r\n }\r\n // moved advanced filters to table settings\r\n\r\n if ($params->get( 'advanced-filter', '0' )) {\r\n\r\n // $$$ hugh - $groups may not have been loaded yet\r\n if (empty($groups)) {\r\n $groups =& $this->getFormGroupElementData();\r\n }\r\n\r\n $fieldNames[] = JHTML::_( 'select.option', '', JText::_( 'PLEASE SELECT' ) );\r\n $longLabel = false;\r\n\r\n foreach ($groups as $groupModel) {\r\n $group = $groupModel->getGroup();\r\n if ($group->is_join) {\r\n $longLabel = true;\r\n }\r\n }\r\n\r\n foreach ($groups as $groupModel) {\r\n $elementModels =& $groupModel->getPublishedElements();\r\n foreach ($elementModels as $elementModel) {\r\n $element =& $elementModel->getElement();\r\n $elParams =& $elementModel->getParams();\r\n if ($elParams->get('inc_in_adv_search', 1)) {\r\n $elName = $elementModel->getFullName( false, false, false );\r\n //@TODO add a switch to use $elName as the label??\r\n //$l = $longLabel ? $elName : $element->label;\r\n $l = $element->label;\r\n $fieldNames[] = JHTML::_( 'select.option', $elName, $l );\r\n }\r\n }\r\n }\r\n $fields = FastJSON::encode($fieldNames);\r\n //todo: make database join elements filtereable on all their join table's fields\r\n\r\n $advancedFilters = JRequest::getVar( 'advancedFilterContainer', array(), 'default', 'none', 2 );\r\n $document =& JFactory::getDocument();\r\n FabrikHelperHTML::mocha( 'a.popupwin' );\r\n $url = '#';\r\n $advancedSearch = '<a rel=\"{\\'id\\':\\'advanced-search-win\\',\\'width\\':690,\\'loadMethod\\':\\'html\\', \\'title\\':\\'' . JText::_('ADVANCED SEARCH') . '\\', \\'maximizable\\':\\'1\\',\\'contentType\\':\\'html\\'}\" href=\"'. $url.'\" class=\"popupwin\">'. JText::_('ADVANCED SEARCH') .'</a>';\r\n $aWords = (array_key_exists( 'value', $advancedFilters )) ? explode( \" \", $advancedFilters['value'] ) : array('');\r\n if (!($aWords[0] == \"AND\" || $aWords[0] == \"OR\" )) {\r\n array_unshift( $aWords, \"AND\" );\r\n }\r\n\r\n $aGroupedAdvFilters = array();\r\n $g = 0;\r\n $tmp = array();\r\n foreach ($aWords as $word) {\r\n $tmp[] = $word;\r\n if ($g == 3) {\r\n $aGroupedAdvFilters[] = $tmp;\r\n $tmp = array();\r\n $g = 0;\r\n } else {\r\n $g ++;\r\n }\r\n }\r\n $searchOpts = \"$fields, \";\r\n $searchOpts .= empty($aGroupedAdvFilters) ? 'true' : 'false';\r\n $searchOpts .= ( $table->filter_action != 'submitform') ? ', true' : ', false';\r\n $searchOpts .=\",{\r\n\t\t\ttableid:'$table->id'\r\n\t\t}\";\r\n $script = \"mochaSearch.conf($searchOpts);\";\r\n\r\n foreach ($aGroupedAdvFilters as $bits) {\r\n $selJoin = $bits[0];\r\n if ($bits[0] != \"AND\" && $bits[0] != \"OR\") {\r\n array_unshift($bits, \"WHERE\");\r\n }\r\n $selJoin \t\t\t= $bits[0];\r\n $selFilter \t\t= $bits[1];\r\n $selCondition = $bits[2];\r\n $selValue \t\t= $bits[3];\r\n\r\n switch( $selCondition )\r\n {\r\n case \"<>\":\r\n $jsSel = 'NOT EQUALS';\r\n break;\r\n case \"=\":\r\n $jsSel = 'EQUALS';\r\n break;\r\n case \"<\":\r\n $jsSel = 'LESS THAN';\r\n break;\r\n case \">\":\r\n $jsSel = 'GREATER THAN';\r\n break;\r\n default:\r\n $firstChar = substr( $selValue, 1, 1 );\r\n $lastChar = substr( $selValue, -2, 1 );\r\n switch( $firstChar )\r\n {\r\n case \"%\":\r\n $jsSel =( $lastChar == \"%\")? 'CONTAINS' : $jsSel = 'ENDS WITH';\r\n break;\r\n default:\r\n if( $lastChar == \"%\"){\r\n $jsSel = 'BEGINS WITH';\r\n }\r\n break;\r\n }\r\n break;\r\n }\r\n $selValue = trim( trim( $selValue, '\"' ), \"%\" );\r\n $script .= \"\\n mochaSearch.addFilterOption('$selJoin', '$selFilter', '$jsSel', '$selValue');\\n\";\r\n }\r\n $document->addScriptDeclaration( $script );\r\n\r\n $o = new stdClass();\r\n $o->filter = $advancedSearch . \"<input type='hidden' name=\\\"advancedFilterContainer[value]\\\" value='' id=\\\"advancedFilterContainer\\\" />\";\r\n $o->name = 'fabrik_advanced_search';\r\n $aFilters[''] = $o;\r\n }\r\n\r\n return $aFilters;\r\n }", "title": "" }, { "docid": "8f494f92cb8af43f6a9d99a7bcfc891c", "score": "0.52223974", "text": "function filter_select_modifier( array $p_filter ) {\n\tif( FILTER_VIEW_TYPE_ADVANCED == $p_filter['_view_type'] ) {\n\t\treturn ' multiple=\"multiple\" size=\"10\"';\n\t} else {\n\t\treturn '';\n\t}\n}", "title": "" }, { "docid": "ab8b0bfcddfdb7702918d44241c8573c", "score": "0.52209157", "text": "public function computeFilter(){\r\n\t\t\t$this->oLogger->debug( \"Aplicando filtro \" . get_class($this) );\r\n\t\t\t\r\n\t\t\tif ( $_REQUEST['_estado'] )\r\n\t\t\t\t$this->filtroSQL .= \" AND estado='$_REQUEST[_estado]'\";\r\n\t\t\telse\r\n\t\t\t\t$this->filtroSQL .= \" AND estado!='XXX'\";\r\n\t\t\t\r\n\t\t\t$this->filtroSQL .= \" AND id_perfil<\".self::SYSTEM;\r\n\t\t\t\t\r\n\t\t\tif ( $_REQUEST['_nombre'] )\r\n\t\t\t\t$this->filtroSQL .= \" AND nombre LIKE '%\".utf8_decode($_REQUEST[_nombre]).\"%'\";\r\n\t\t\t\r\n\t\t\t$this->filtroSQL .= \" ORDER BY nombre\";\r\n\t\t}", "title": "" }, { "docid": "d9dadb1e9abdee083942ab5f758cba3d", "score": "0.5214011", "text": "public function setAdvSearchConditions($aVals)\n\t{\n\t\n\t\t// Filter keywords\t\t\t\n\t\tif(!empty($aVals['keywords']))\n\t\t{\n\t\t\t$this->search()->setCondition(\"AND rbi.headline LIKE '%\" . $aVals['keywords'] . \"%'\");\n\t\t}\n\t\t\n\t\t//Filter country\n\t\tif(!empty($aVals['country_iso']))\n\t\t{\n\t\t\t$this->search()->setCondition('AND rbi.country_iso = \\'' . $aVals['country_iso'] . '\\'');\n\t\t}\n\t\t\n\t\t//Filter state / province\n\t\tif(!empty($aVals['country_child_id']))\n\t\t{\n\t\t\t$this->search()->setCondition('AND rbi.country_child_id = ' . $aVals['country_child_id']);\n\t\t}\n\t\t\n\t\t//Filter city\n\t\tif(!empty($aVals['city']))\n\t\t{\n\t\t\t$this->search()->setCondition('AND rbi.city LIKE \\'%' . $aVals['city'] . '%\\'');\n\t\t}\n\t\t\n\t\t//Filter company\n\t\tif(!empty($aVals['company']))\n\t\t{\n\t\t\t$this->search()->setCondition('AND rex.company_name LIKE \\'%' . $aVals['company'] . '%\\'');\n\t\t}\n\t\t\n\t\t//Filter school and degree\n\n\t\tif(!empty($aVals['school']))\n\t\t{\n\t\t\t$this->search()->setCondition('AND red.school_name LIKE \\'%' . $aVals['school'] . '%\\'');\n\t\t}\n\t\t\n\t\tif(!empty($aVals['degree']))\n\t\t{\n\t\t\t$this->search()->setCondition('AND red.degree LIKE \\'%' . $aVals['degree'] . '%\\'');\n\t\t}\n\t\t\n\t\t//Filter level\n\t\tif(!empty($aVals['level_id']))\n\t\t{\n\t\t\t\t$this->search()->setCondition('AND rbi.level_id = ' . $aVals['level_id']);\n\t\t}\n\t\t\n\t\t//Filter Year of experience\n\t\tif($aVals['year_exp_from'] > 0)\n\t\t{\n\t\t\t\t$this->search()->setCondition('AND rbi.year_exp >= ' . $aVals['year_exp_from']);\n\t\t}\n\t\t\n\t\t//Filter Year of experience\n\t\tif($aVals['year_exp_to'] > 0)\n\t\t{\n\t\t\t\t$this->search()->setCondition('AND rbi.year_exp <= ' . $aVals['year_exp_to']);\n\t\t}\n\t\t//Filter Gender\n\t\tif($aVals['gender'] > 0)\n\t\t{\n\t\t\t\t$this->search()->setCondition('AND rbi.gender = ' . $aVals['gender']);\n\t\t}\n\t\t//Filter Gender\n\t\tif(!empty($aVals['skill']))\n\t\t{\n\t\t\t\t$aSkills = explode(',', trim($aVals['skill'], ','));\n\t\t\t\tif(is_array($aSkills) && !empty($aSkills))\n\t\t\t\t{ \n\t\t\t\t\t$sSkillConds = \"\";\n\t\t\t\t\tforeach($aSkills as $sSkill)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!$sSkillConds)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$sSkillConds .= \"AND (rbi.skills like '%\" . $sSkill . \"%' \";\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$sSkillConds .= \"OR rbi.skills like '%\" . $sSkill . \"%' \"; \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif($sSkillConds)\n\t\t\t\t\t{\n\t\t\t\t\t\t$sSkillConds .=\")\";\n\t\t\t\t\t\t$this->search()->setCondition($sSkillConds);\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "495de527017d0bbb61891f37b3b1301c", "score": "0.5212696", "text": "public function or_where_open(){\n $this->_where[] = array('OR' => '(');\n\n return $this;\n }", "title": "" }, { "docid": "42c8a6e266a9910319e6980761fec11b", "score": "0.52113867", "text": "function acf_set_filters($filters = array())\n{\n}", "title": "" }, { "docid": "0e904aa5d78382588eb7162b49fc86a4", "score": "0.52098376", "text": "public function or_where_close(){\n $this->_where[] = array('OR' => ')');\n\n return $this;\n }", "title": "" }, { "docid": "2230bad13faed3f2486af795a6cf6050", "score": "0.5208954", "text": "protected function _filtered() {\n\n if (!empty($this->params['category'])) {\n return 'category';\n }\n\n if (!empty($this->params['tag'])) {\n return 'tag';\n }\n\n if (!empty($this->params['year']) && !empty($this->params['month'])) {\n return 'archive';\n }\n\n return false;\n\n }", "title": "" }, { "docid": "6c6d557fd59238e7acda986b92532c38", "score": "0.51995647", "text": "protected function _getFacets()\n {\n $productCollection = $this->getLayer()->getProductCollection();\n $fieldName = $this->_getFilterField();\n $facets = $productCollection->getFacetedData($fieldName);\n \n return $facets;\n }", "title": "" }, { "docid": "17ce0462ad72817ad6be90329a432698", "score": "0.51934105", "text": "protected function filters()\n {\n if ($this->getRequest()->isPost()== true) {\n \tSession::getInstance()->set($this->namepageactual,1);\n $parramsfilter = array();\n\t\t\t\t\t$parramsfilter['quienes_titulo'] = $this->_getSanitizedParam(\"quienes_titulo\");Session::getInstance()->set($this->namefilter, $parramsfilter);\n }\n if ($this->_getSanitizedParam(\"cleanfilter\") == 1) {\n Session::getInstance()->set($this->namefilter, '');\n Session::getInstance()->set($this->namepageactual,1);\n }\n }", "title": "" }, { "docid": "9dc0f965b5896b3380b28b7de74d3394", "score": "0.5192233", "text": "public function andOr( $orArray=''){\n \n foreach($orArray as $key => $val){ \n $this->and_or[] = [\"term\" => $val ];\n }\n return $this;\n }", "title": "" }, { "docid": "57a765eb9d27129a608c3ce2ba8e20a4", "score": "0.5191927", "text": "public function setFilter( $submit, $data )\n\t{\n\t\tif ( $submit == 'setFilter' ) {\n\n\t\t\t$this->filtering = $data;\n\t\t\t$this->flashMessage( 'Filter set.' );\n\t\t} else {\n\n\t\t\t$this->filtering = [];\n\t\t\t$this->flashMessage( 'Filter reset.' );\n\t\t}\n\n\t\t$this->invalidatePager();\n\t\t$this->redrawControl( 'grid' );\n\t}", "title": "" }, { "docid": "de05214a57d742f709425f049d7ee01b", "score": "0.5188008", "text": "function prepareFilter() {\r\n\t\tif (isset($_GET['show_filter_' . $this->listName])) {\r\n\t\t\t$this->filterVisible = true;\r\n\t\t}\r\n\t\t\r\n\t\tif (isset($_GET[$this->listName])) {\r\n\t\t\tforeach($this->columns as $colname => $colDetails) {\r\n\t\t\t\t$value = trim(KT_getRealValue(\"GET\", $this->listName.'_'.$colname));\r\n\t\t\t\tif ($value!='') {\r\n\t\t\t\t\t$this->filter[$colname] = $value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$condition = '';\r\n\t\tif (count($this->filter) > 0) {\r\n\t\t\tforeach ($this->filter as $colname => $value) {\r\n\t\t\t\tif ($condition != '') {\r\n\t\t\t\t\t$condition .= \" AND \";\r\n\t\t\t\t}\r\n\t\t\t\t$compareType = $this->columns[$colname]['compare_type'];\r\n\t\t\t\t$type = $this->columns[$colname]['type'];\r\n\t\t\t\tswitch ($type) {\r\n\t\t\t\t\tcase 'NUMERIC_TYPE':\r\n\t\t\t\t\tcase 'DOUBLE_TYPE':\r\n\t\t\t\t\t\t// if decimal separator is , => .\r\n\t\t\t\t\t\t$value = str_replace(',', '.', $value);\r\n\t\t\t\t\t\tif (preg_match('/^(<|>|=|<=|>=|=<|=>|<>|!=)\\s?-?\\d*\\.?\\d+$/', $value, $matches)) {\r\n\t\t\t\t\t\t\t$modifier = trim($matches[1]);\r\n\t\t\t\t\t\t\tif ($modifier == '!=') {\r\n\t\t\t\t\t\t\t\t$modifier = '<>';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$value = trim(substr($value, strlen($modifier)));\r\n\t\t\t\t\t\t\t$condition .= KT_escapeFieldName($colname) . ' ' . $modifier . ' ' . $value;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$condition .= KT_escapeFieldName($colname) . ' ' . $compareType . ' ' . KT_escapeForSql($value, $type);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'CHECKBOX_1_0_TYPE':\r\n\t\t\t\t\tcase 'CHECKBOX_-1_0_TYPE':\r\n\t\t\t\t\t\tif (preg_match('/^[<>]{1}\\s?-?\\d*\\.?\\d+$/', $value)) {\r\n\t\t\t\t\t\t\t$condition .= KT_escapeFieldName($colname) . $value;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$condition .= KT_escapeFieldName($colname) . \" = \" . KT_escapeForSql($value, $type);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'DATE_TYPE':\r\n\t\t\t\t\tcase 'DATE_ACCESS_TYPE':\r\n\t\t\t\t\t\t$localCond = $this->prepareDateCondition($colname, $this->columns[$colname], $value);\r\n\t\t\t\t\t\tif ($localCond != '') {\r\n\t\t\t\t\t\t\t$condition .= $localCond;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tswitch ($compareType) {\r\n\t\t\t\t\t\t\tcase '=':\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase 'A%':\r\n\t\t\t\t\t\t\t\t$value = $value . '%';\r\n\t\t\t\t\t\t\t\t$compareType = 'LIKE';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase '%A':\r\n\t\t\t\t\t\t\t\t$value = '%' . $value;\r\n\t\t\t\t\t\t\t\t$compareType = 'LIKE';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tdefault :\r\n\t\t\t\t\t\t\t\t$value = '%' . $value . '%';\r\n\t\t\t\t\t\t\t\t$compareType = 'LIKE';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$value = KT_escapeForSql($value, $type);\r\n\t\t\t\t\t\t$condition .= KT_escapeFieldName($colname) . ' ' . $compareType . ' ' . $value;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t} // end foreach\r\n\t\t\tif ($condition != '') {\r\n\t\t\t\t$this->filterCalculated = $condition;\r\n\t\t\t}\r\n $this->filterCalculated = str_replace(\"%\",\"%%\", $this->filterCalculated);\r\n\t\t} \t\t\r\n\t}", "title": "" } ]
1b6eaa0a83af1ce57d24420315cf03c8
Include the request mapping and run the init script of the given package
[ { "docid": "a680990eee14039e64e5264aea461c76", "score": "0.6622967", "text": "public static function boot($package) {\n\n //boot\n try {\n include_once(realpath($package.\"/init.php\"));\n }\n catch (FrameEx $ex) {\n $ex->setMessage(\"Unable to boot package: {$package}: \".$ex->getMessage());\n throw $ex;\n }\n\n $filename = RequestMapGenerator::getRequestMapFilename($package);\n if(!file_exists($filename)) {\n $filename = RequestMapGenerator::build($package);\n }\n include($filename);\n\n self::$loadedPackages[] = $package;\n }", "title": "" } ]
[ { "docid": "84f6b25632c7bdaac8bf135dc23ac24d", "score": "0.62931406", "text": "private function init()\r\n\t{\r\n\t\t// create new request\r\n\t\t$this->request = Request::getInstance();\r\n\r\n\t\t// create new response\r\n\t\t$this->response = Response::getInstance();\r\n\r\n\t\t// get router from global router\r\n\t\t$this->router = Route::getInstance();\r\n\t\t\r\n\t\t// create new command\r\n\t\tif ($this->request->isCLI()) {\r\n\t\t}\r\n\r\n\t\t// set env\r\n\t\t$this->setEnv();\r\n\t}", "title": "" }, { "docid": "f183415b471471322ea6e7ae18ca57af", "score": "0.59944123", "text": "public function init() {\r\n parent::init();\r\n $this->_internalCaller = new PinbaApi();\r\n \r\n if(! is_null($this->scriptName) ) {\r\n $this->setScriptName($this->scriptName);\r\n } elseif ($this->fixScriptName) {\r\n if(php_sapi_name() === 'cli') {\r\n $argv = implode(' ', $_SERVER['argv']);\r\n $this->setScriptName($argv);\r\n }\r\n else {\r\n $path = Yii::app()->urlManager->parseUrl(Yii::app()->request);\r\n $this->setScriptName('/' . $path);\r\n }\r\n }\r\n if(! is_null($this->hostName))\r\n {\r\n $this->setHostname($this->hostName);\r\n }\r\n if(! is_null($this->serverName))\r\n {\r\n $this->setServerName($this->serverName);\r\n }\r\n if(! is_null($this->schema))\r\n {\r\n $this->setSchema($this->schema);\r\n }\r\n }", "title": "" }, { "docid": "65f36b2b0a0ac752ffdbeb8eae9f0bd2", "score": "0.59301275", "text": "public function init() {\n $this->registerConfigurationScripts();\n }", "title": "" }, { "docid": "d6686795e7a93317d7f3cca73f46ebd7", "score": "0.58395827", "text": "public function startup() {\n\t\tA('Application')->bind('AfterBootProcess', array($this, 'gatherFiles'));\n\t}", "title": "" }, { "docid": "b090c31f42676e469c5ed2eefdc26a21", "score": "0.5784789", "text": "public function startCase() {\n\t\t\tApp::import(\n\t\t\t\t'Libs',\n\t\t\t\t'Mailer.Postman/bootstrap',\n\t\t\t\tarray(\n\t\t\t\t\t'file' => 'bootstrap.php'\n\t\t\t\t)\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "eccd716ef9d07df74771ba4d574f35ba", "score": "0.57834977", "text": "public function initialize() {\n\t\t$this->compile();\n\n\t\t$this->attachObject('request', function() {\n\t\t\treturn Titon::registry()->factory('titon\\net\\Request');\n\t\t});\n\n\t\t$this->attachObject('response', function() {\n\t\t\treturn Titon::registry()->factory('titon\\net\\Response');\n\t\t});\n\t}", "title": "" }, { "docid": "988c00b54aab6a8d88aa97d0af59998a", "score": "0.5782433", "text": "protected function _initRequest() {\n $this->bootstrap('frontcontroller')->getResource('frontcontroller')->setRequest('Rexmac\\Zyndax\\Controller\\Request\\HttpRequest');\n $this->bootstrap('frontcontroller')->getResource('frontcontroller')->setResponse('Rexmac\\Zyndax\\Controller\\Response\\HttpResponse');\n }", "title": "" }, { "docid": "33caa99f1f27c7d9509620c2c62c0586", "score": "0.57287395", "text": "public function main()\n {\n $loaders = array_merge(\n [\n require __DIR__.'/Autoload.php'\n ],\n $this->loaders()\n );\n \n $this->register_loaders($loaders);\n \n kern_env($this->env());\n \n $this->erp();\n $this->routes(Router::instance());\n $this->startup();\n }", "title": "" }, { "docid": "18e2cf74da254256c83c76ad96c2e416", "score": "0.56987137", "text": "protected function _bootstrap() {\n $conf = BaseServer::getConf();\n\t if(isset($conf['application_index'])) {\n\t \t$application_index = $conf['application_index'];\n\t \tif(class_exists($application_index)) {\n \t$conf['application_index']::bootstrap($this->getRequestParams());\n \t}\n }\n\t}", "title": "" }, { "docid": "cc4ea372653dd2b20fe3f8d48b5a49ff", "score": "0.5685156", "text": "public function run() {\n\t\t$this->setUp();\n\t\t$this->router->routeRequest();\n\t}", "title": "" }, { "docid": "b7fe7af5da4eb9c6be2c43b30934eefe", "score": "0.5681723", "text": "static function INIT() {\n PackageLoader::Defaults(); //Default stuff.\n //Install Composor Stuff Too!\n\n }", "title": "" }, { "docid": "9d0c948888c455cc6a85a2dcccc4e6cd", "score": "0.5677783", "text": "public function initialize() {\n\n $this->setRequest(new WebRequest());\n\n $this->getLogger()->setSid($this->sid)->setLevel(\n !is_null($this->debugLevel)\n ? $this->debugLevel\n : $this->\n getConfig()->\n get('settings.debug')\n );\n\n $this->getLogger()->log('Started processing request');\n\n $path = $this->Router->resolveProcessingPath();\n\n $this->getLogger()->log('Resolved processing path: '.$path);\n $this->getRequest()->set('path', $path);\n\n }", "title": "" }, { "docid": "4c473c4f6d7096cfead9ad7b01c2072d", "score": "0.56530493", "text": "public function init() {\n $this->globalConfig = GlobalConfig::discoverConfig();\n if ($this->requiresPhappManifest) {\n $this->phappManifest = PhappManifest::getInstance();\n $this->initShellEnvironment();\n }\n $this->stopOnFail(TRUE);\n }", "title": "" }, { "docid": "319725a7c10c1480b41f47e267022356", "score": "0.56426054", "text": "public function init()\n\t{\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t'shop.models.*',\n\t\t\t'shop.components.*',\n\t\t));\n\t\t$this->publishAssets();\n\t}", "title": "" }, { "docid": "672467a6bac30946ff3efa8aa299d9b9", "score": "0.56352377", "text": "protected function mainInit(): void\n {\n }", "title": "" }, { "docid": "a0b56dcf03e7078dd62e89657b4150fa", "score": "0.56340325", "text": "public function init() {\n\t\t$module = 'index';\n\t\tif ( isset( $_GET['m'] ) &&\n\t\t\t file_exists( $this->base_dir . '/modules/' . $_GET['m'] . '.php' ) ) {\n\t\t\t$module = preg_replace( '/\\.\\.\\//', '', $_GET['m'] );\n\t\t\trequire_once $this->base_dir . '/modules/' . $module . '.php';\n\n\t\t\tif ( !class_exists( $module ) ) {\n\t\t\t\t$module = 'index';\n\t\t\t}\n\t\t}\n\n\t\t$this->initialModule = $this->create->module( $module );\n\t}", "title": "" }, { "docid": "d0650bc0828e8a0f6c55d0306bb229ea", "score": "0.56102014", "text": "public function init() {\n /* Initialize action controller here */\n $this->_options = $this->getInvokeArg('bootstrap')->getOptions();\n }", "title": "" }, { "docid": "df33ca6ce1d5f1c911c1feca553905b4", "score": "0.5594194", "text": "public static function _init()\n\t{\n\t\t\\Module::load('documentation');\n\t\t\\Module::load('users');\n\t}", "title": "" }, { "docid": "d91a6273cf5250cd7b6793ce9b9559a9", "score": "0.5585052", "text": "public function init(){\n require_once '/usr/bin/pirum';\n }", "title": "" }, { "docid": "c36d81e3d0bdfc63c9073d274cc0d408", "score": "0.5540636", "text": "public function fullInit() {\n try {\n $this->config = Micro::get(Config::class);\n $this->loadConfigs();\n $this->logger = Micro::get(Logger::class);\n $this->init();\n $this->runMiddlewares();\n } catch (\\Exception $e) {\n $this->handleException($e);\n }\n }", "title": "" }, { "docid": "c988be9381283fe2bca77cb9c8eccc8f", "score": "0.5540209", "text": "protected function start()\n {\n // call more setup methods\n }", "title": "" }, { "docid": "80917be1e28ffad98bce1169ae7b1406", "score": "0.55390036", "text": "public static function _init()\n\t{\n\t\t\\Package::load('category');\n\t\t\\Package::load('portfolio');\n\t}", "title": "" }, { "docid": "7da8fca85b8b99e48596ef1fec98c8d0", "score": "0.55011016", "text": "public function init()\n\t{\n\t\t$base_path = \\Juniper::registry('base_path');\n\t\t$base_config_path = $base_path.\"App/Config/Juniper.config.json\";\n\n\t\t$this->loadFile($base_config_path, 'juniper');\n\t}", "title": "" }, { "docid": "a6ca31df745b859a562fc3856d8d4564", "score": "0.5497894", "text": "public function init()\n {\n $this->loadCoreConfig();\n\n $this->app->call(array($this, 'handleProviders'));\n\n $this->app->call(array($this, 'handleServices'));\n }", "title": "" }, { "docid": "366ce8a40ba8c8a7483e42c11d4ad3ab", "score": "0.54914284", "text": "public function start(){\n\t\tdate_default_timezone_set(\"UTC\");\n\t\t\n\t\trequire_once DIR_HANDLERS . DIRECTORY_SEPARATOR . $this->handlerPath;\n\t\t$handler = new $this->handlerClass();\n\t\t\n\t\t//determine which method to call\n\t\t$method = \"get\";\n\t\tif($_SERVER['REQUEST_METHOD'] == 'POST'){\n\t\t\t$method = \"post\";\n\t\t}\n\t\t\n\t\t//if handlerMethod was set in the route, use it instead\n\t\tif($this->handlerMethod){\n\t\t\tif(!$this->requestMethod || $this->requestMethod == $method){\n\t\t\t\t$method = $this->handlerMethod;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//TODO create mechanism for handling error responses\n\t\t\t\tRender::view(\"error.unknownurl\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!method_exists($handler, $method)){\n\t\t\tRender::view(\"error.unknownurl\");\n\t\t\texit;\n\t\t}\n\t\t//call onCreate() method for preprocessing\n\t\tcall_user_func_array([$handler, \"onCreate\"], $this->args);\n\t\t//process the request using get() or post() method\n\t\tcall_user_func_array([$handler, $method], $this->args);\n\t}", "title": "" }, { "docid": "0eaadc2e4787fbf84e711cafcbb2cf59", "score": "0.548575", "text": "public static function initialize() {\n\t\tdate_default_timezone_set('UTC'); // Always use UTC\n\n\t\tself::install('loader', new Loader(), true);\n\t\tself::install('debugger', new Debugger(), true);\t// Requires Loader\n\t\tself::install('config', new Config(), true);\t\t// Requires Debugger\n\t\tself::install('env', new Environment(), true);\n\t\tself::install('app', new Application(), true); \t\t// Requires Config, Loader\n\t\tself::install('registry', new Registry(), true); \t// Requires Loader\n\t\tself::install('g11n', new G11n(), true); \t\t\t// Requires Registry\n\t\tself::install('router', new Router(), true); \t\t// Requires G11n\n\t\tself::install('event', new Event(), true); \t\t\t// Requires Router\n\t\tself::install('dispatch', new Dispatch(), true); \t// Requires Router, Environment; Dispatchers require Event, App, Registry\n\t\tself::install('cache', new Cache(), true);\n\t}", "title": "" }, { "docid": "6d8e4854ab15862f8241dc85d9dc8b03", "score": "0.54749846", "text": "public function init()\n {\n if ($this->inited) {\n die(\"Fatal error. Attempt to init Core second time\");\n }\n $this->inited = true;\n\n session_start();\n\n include ILFATE_PATH . 'Core/SplClassLoader.php';\n include ILFATE_PATH . 'Core/functions.php';\n //spl_autoload_register('ilfate_autoloader');\n $classLoader = new SplClassLoader('Core', ILFATE_PATH);\n $classLoader->register();\n $classLoader = new SplClassLoader('App', ILFATE_PATH);\n $classLoader->register();\n $classLoader = new SplClassLoader('Modules', ILFATE_PATH);\n $classLoader->register();\n\n // Here we create config object\n class_exists('\\Core\\Service');\n $config = Service::getConfig();\n $config->init(require ILFATE_PATH . 'config.php');\n\n $request = Service::getRequest();\n Service::getRouting($request);\n\n $this->log = Logger::getInstance();\n\n // depends on Mode we can different types of execution\n switch ($request->getExecutingMode()) {\n case Request::EXECUTE_MODE_HTTP :\n $this->commonExecuting();\n break;\n case Request::EXECUTE_MODE_HTTP_AJAX :\n case Request::EXECUTE_MODE_AJAX :\n $this->ajaxExecuting();\n break;\n }\n }", "title": "" }, { "docid": "81129ce4b76af27232914b2bc8bb88dd", "score": "0.54747474", "text": "protected function doMaps()\n {\n self::$protocol = $this->protocol_maps[$this->run_mod];\n self::$render = $this->render_maps[$this->run_mod];\n self::$server = $this->server_maps[$this->run_mod];\n }", "title": "" }, { "docid": "bed5f946383fe9dcbd5c765f08d51243", "score": "0.5464064", "text": "public function init()\n\t{\n\t\t$this->setComponents(array(\n\t\t\t'request' => array(\n\t\t\t\t'class' => 'HttpRequest',\n\t\t\t\t'enableCsrfValidation' => false,\n\t\t\t),\n\t\t));\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t'cv.models.*',\n\t\t\t'cv.components.*',\n\t\t));\n\t}", "title": "" }, { "docid": "4036eb4a0bc0b34b4292f81a129e83af", "score": "0.5463443", "text": "protected function _initialiseRequestResponse()\n {\n\n $this->_dependencies->request = Instance::_retrieve(Request::class);\n $this->_dependencies->response = Instance::_retrieve(Response::class);\n $this->_dependencies->main_controller = Instance::_retrieve(MainController::class);\n\n }", "title": "" }, { "docid": "d564b934d6964a17e7e6af2895800ffc", "score": "0.54539645", "text": "protected function startup() : void\n {\n }", "title": "" }, { "docid": "a3d0941a0b243db9d970c575867e1027", "score": "0.5453649", "text": "private function init()\n {\n $this->define_frontend_hooks();\n $this->define_admin_hooks();\n $this->define_acf_hooks();\n $this->define_editor_hooks();\n $this->define_cleanup_hooks();\n\n $this->loader->run();\n }", "title": "" }, { "docid": "a24307eda6a8938a91aedc9b0bc9b696", "score": "0.5443671", "text": "private function init() {\n // Init all components\n if (is_array($this->_config['components'])) {\n foreach ($this->_config['components'] as $name => $component) {\n $component = ComponentFactory::create($name, $component);\n $this->setComponent($name, $component)->bootstrap();\n }\n }\n // handle requests and got to route\n $this->resolveRoutes();\n }", "title": "" }, { "docid": "0a3bbe0ded17b93cc52ebe15105e9285", "score": "0.54391795", "text": "protected function initRequest()\n {\n $this->dependencyManager->get('requestPool')->add(Request::createFromGlobals());\n }", "title": "" }, { "docid": "2a78b85cf2f86a5ed6de849b3a4d70e6", "score": "0.54349524", "text": "public function testInit()\n {\n // Start of user code PackageInitializer.testinit\n // Nothing relevant to test here\n // End of user code\n }", "title": "" }, { "docid": "a631778afb7d5d501838fcde08b5a140", "score": "0.5426814", "text": "public function run($request)\n {\n $message = function ($content) {\n print(Director::is_cli() ? \"$content\\n\" : \"<p>$content</p>\");\n };\n\n $message('Defining the mappings');\n $recreate = (bool) $request->getVar('recreate');\n $this->service->define($recreate);\n\n $message('Refreshing the index');\n $this->service->refresh();\n }", "title": "" }, { "docid": "5c28e3e1d4a032f31a04fbb743980454", "score": "0.54202884", "text": "function app_init($s_class = '')\n{\n global $o_actions;\n require($_SERVER[\"DOCUMENT_ROOT\"] . \"/local/php_interface/wrk/classes/wrk.mailer.class.php\");\n require($_SERVER[\"DOCUMENT_ROOT\"] . \"/local/php_interface/wrk/classes/wrk.main.class.php\");\n require($_SERVER[\"DOCUMENT_ROOT\"] . \"/local/php_interface/wrk/classes/wrk.actions.class.php\");\n if ($s_class) require($_SERVER[\"DOCUMENT_ROOT\"] . \"/bitrix/php_interface/wrk/classes/wrk.\" . $s_class . \".class.php\");\n $o_actions = new \\wrk\\classes\\wrk_actions;\n\n if (function_exists('init')) init();\n}", "title": "" }, { "docid": "41d09d83175437ab1b4cd5338ac506e9", "score": "0.5417732", "text": "public function init()\n {\n parent::init();\n $this->setCacheComponent();\n $this->moduleManager->bootstrap();\n $isAlias = UsniAdaptor::getAlias('@console', false);\n if($isAlias != false)\n {\n $this->loadAdditionalModuleConfig('@console/config/moduleconfig.php');\n }\n }", "title": "" }, { "docid": "650035cbb503a0607830b91b6e9580a3", "score": "0.54175997", "text": "public function init()\n\t{\n\t\trequire_once($this->api->plugin->configPath($this) . \"Libs/BootStrap.php\");\n\t\t$BootStrap = new BootStrap(array(\n\t\t\t\"api\" => $this->api,\n\t\t\t\"server\" => $this->server,\n\t\t\t\"path\" => $this->api->plugin->configPath($this),\n\t\t));\n\n\t\t$this->api->addHandler(\"console.command\", array($BootStrap, \"commandHandler\"), 50);\n\t\t$this->api->addHandler(\"console.command.unknown\", function () {\n\t\t\treturn false;\n\t\t}, 50);\n\t}", "title": "" }, { "docid": "02e1636a252d2661f0311d42a11bdae2", "score": "0.5417077", "text": "public function init()\n\t{\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t'job.models.*',\n\t\t\t'job.components.*',\n\t\t));\n\t}", "title": "" }, { "docid": "20d7e6d25dbdc255dd24370c799fdedb", "score": "0.54153407", "text": "protected function setUp() {\n $this->installer = new Core_Installer();\n $this->installer->installTest();\n $this->bootstrap = new Zend_Application('testing', APPLICATION_PATH . '/configs/application.ini'); //\n $this->view = Zend_Registry::get('view');\n\n parent::setUp();\n\n $request = $this->getRequest();\n $request->setModuleName('Core');\n $request->setControllerName('Login');\n\n $this->service = new Content_Model_Template_Service();\n \n }", "title": "" }, { "docid": "8cbe1e8c1f037ec93483af6a44c3d963", "score": "0.54092246", "text": "public function initialize()\n {\n $this->includeFunctions();\n $this->includeMustUsePlugins();\n $this->performConfigurations();\n }", "title": "" }, { "docid": "fd4993a56fefb7e9bc7364f1979ff7b7", "score": "0.54016644", "text": "public function initApp();", "title": "" }, { "docid": "ec6c4d331e23f5d2e790cee7c7c684f9", "score": "0.53896385", "text": "public abstract function initModules();", "title": "" }, { "docid": "f4f4a27f2ca0dd144d5797d7c1c2d0dd", "score": "0.5374672", "text": "public function run()\n\t{\n\t\trequire_once 'Tree/Framework/Autoloader.php';\n\t\t$this->autoloader = $this->getAutoloader();\n\t\t$this->autoloader->registerAutoloader();\n\t\t\n\n\t\t$configurator = $this->getConfigurator();\n\t\t$this->configurator->configureTemplate('\\Tree\\Component\\Template');\n\n\n\t\t$request = $this->detectRequest();\n\t\t$requestHandler = $this->getRequestHandler();\n\t\t$response = $requestHandler->handleRequest($request);\n\n\n\t\tif ($response instanceof Response) {\n\t\t\t$response->sendResponse();\n\t\t}\n\n\t}", "title": "" }, { "docid": "773a444094eaa9573875447d5c847458", "score": "0.53741646", "text": "public function init()\n {\n $this->initDependencyManager();\n\n $this->initRequest();\n }", "title": "" }, { "docid": "82ea2f70c99883cc21051337ad1425ac", "score": "0.5360918", "text": "function init()\n {\n $info = json_decode(file_get_contents(path . '/composer.json'), true);\n $info['installation'] = path;\n $info['base'] = base;\n $this\n ->uni('demo')\n ->setTitle('neoan3')\n ->addRenderParameter('tabs', function () use ($info) {\n $renderParams = [];\n foreach (['system', 'introduction', 'quickstart', 'changes'] as $tab) {\n $renderParams[$tab] = Template::embraceFromFile('/component/Demo/' . $tab . '.tab.html', $info);\n }\n return $renderParams;\n })\n ->hook('main', 'demo', $info)\n ->output();\n }", "title": "" }, { "docid": "7502fdebbee2a3479762e9ef520ac4ae", "score": "0.53487855", "text": "private function init_request() {\n\n\t\t$this->autodetect_home();\n\t\t$this->autodetect_host();\n\n\t\t# initialize from request uri\n\t\t$url = $_SERVER['REQUEST_URI'] ?? '';\n\n\t\t# remove query string\n\t\t$rpath = parse_url($url)['path'];\n\n\t\t# remove home\n\t\tif ($rpath != '/')\n\t\t\t$rpath = substr($rpath, strlen($this->home) - 1);\n\n\t\t# trim slashes\n\t\t$rpath = trim($rpath, \"/\");\n\n\t\t# store in private properties\n\t\t$this->request_path = '/' . $rpath;\n\t\tself::$logger->debug(sprintf(\n\t\t\t\"Router: request path: '%s'.\",\n\t\t\t$this->request_path));\n\t}", "title": "" }, { "docid": "bf173f5e6dbbbfa29d323e6b65a66cf4", "score": "0.5344317", "text": "public function init() {\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array (\n\t\t\t'apps.models.*',\n\t\t\t'apps.components.*',\n\t\t\t\n\t\t));\n\t\t$this->onMenu = array ($this, 'handleMenu');\n\t}", "title": "" }, { "docid": "d48d16e011ec2ae8bd5a766ca78d0b96", "score": "0.53333455", "text": "public function run() {\r\n $request = new WebRequest;\r\n $response = new WebResponse;\r\n\r\n if (isset($this->_config[\"engine\"])) {\r\n $ec = $this->_config[\"engine\"];\r\n if (isset($ec[\"default_encoding\"]))\r\n $response->setEncoding($ec[\"default_encoding\"]);\r\n if (isset($ec[\"default_content_type\"]))\r\n $response->setContentType($ec[\"default_content_type\"]);\r\n }\r\n\r\n // ROUTING\r\n // Find module for current request.\r\n // Use base class implementation, if no specific module has been found.\r\n $module = $this->findModule($request);\r\n if (empty($module)) {\r\n $response->fail(404);\r\n return;\r\n }\r\n\r\n // Module execution.\r\n if (!$module->beforeProcessRequest($request, $response)) {\r\n return;\r\n }\r\n if (!$module->processRequest($request, $response)) {\r\n return;\r\n }\r\n if (!$module->afterProcessRequest($request, $response)) {\r\n return;\r\n }\r\n }", "title": "" }, { "docid": "f84024b401f2ea4cfce93c394ea7fea0", "score": "0.53304654", "text": "public function setup()\n { \n $this->map['Request'] = \\Core\\Request::class;\n $this->map['Resource'] = \\Core\\Data\\Resource::class;\n $this->map['Select'] = \\Core\\Data\\Sql\\Query\\Select::class;\n $this->map['Insert'] = \\Core\\Data\\Sql\\Query\\Insert::class;\n $this->map['Update'] = \\Core\\Data\\Sql\\Query\\Update::class;\n $this->map['Delete'] = \\Core\\Data\\Sql\\Query\\Delete::class;\n $this->map['IndexController'] = \\App\\Controller\\IndexController::class;\n $this->map['PostsController'] = \\App\\Controller\\PostsController::class;\n $this->map['Post'] = \\App\\Model\\Post::class;\n $this->map['PostRepository'] = \\App\\Model\\PostRepository::class;\n $this->map['Page'] = \\Core\\Action\\Result\\Page::class;\n $this->map['Redirect'] = \\Core\\Action\\Result\\Redirect::class;\n $this->map['Config'] = \\Core\\Config::class;\n $this->map['Router'] = \\Core\\Router::class;\n $this->map['MySqlDriver'] = \\Core\\Data\\Driver\\MySql::class;\n $this->map['PDO'] = \\PDO::class;\n }", "title": "" }, { "docid": "43ffa643a58fa6ab96bdaad894a99891", "score": "0.53257984", "text": "function companion_map_install()\n\t{\n\t\trequire_once(ABSPATH.'wp-admin/includes/upgrade.php');\n\t\n\t\t$SC = new m1\\usv\\SystemController(\"\", \"\", false);\n\t\t$SC->init();\n\t\t$SC->install();\n\t\n\t}", "title": "" }, { "docid": "a6423ca1dec35e607b3ab4d4d07f1756", "score": "0.53209686", "text": "public function init(): void\n {\n $this->initSystemHelpers();\n $this->loadConfig();\n $this->loadComponents();\n $this->initHelpers();\n $this->loadEvents();\n $this->configure();\n }", "title": "" }, { "docid": "de4d0a0441e302ed371ae0651ccfbdec", "score": "0.53147787", "text": "protected function init()\n {\n\n parent::init();\n\n $this->interceptor->start();\n $this->moduleManager->start();\n\n $this->interceptor->intercept($this);\n\n if ($this->hasEventHandler('onInit'))\n $this->onInit(new CEvent($this));\n\n $this->setupRequestInfo();\n }", "title": "" }, { "docid": "390a596ddef6a97e88cb71206936ac30", "score": "0.5311503", "text": "public function run()\n {\n static::$request = Request::createFromGlobals();\n static::$response = Response::create();\n static::$response->prepare(static::$request);\n\n\n }", "title": "" }, { "docid": "b562d3941a1325bb953caa7cd4ff7122", "score": "0.5305399", "text": "protected function init()\n {\n // load the authorization configuration for the apropriate security domain\n /** @var \\AppserverIo\\Psr\\Security\\Auth\\Login\\AuthConfigurationInterface $authConfiguration */\n if ($authConfiguration = $this->getConfiguration()->getAuthConfig()) {\n // prepare the login modules of the security domain\n /** @var \\AppserverIo\\Psr\\Security\\Auth\\Login\\LoginModuleConfigurationInterface $loginModule */\n foreach ($authConfiguration->getLoginModules() as $loginModule) {\n // load the login modules class name and initialization parameters\n $type = new String($loginModule->getType());\n $params = new HashMap($loginModule->getParamsAsArray());\n $controlFlag = new String($loginModule->getFlag());\n // add the module information to the stack\n $this->addModuleInfo(new ModuleInfo($type, $params, $controlFlag));\n }\n }\n }", "title": "" }, { "docid": "fe4592b34f9f16b727db49b8de1b0ca9", "score": "0.52964616", "text": "public function init(\\Raptor\\Raptor $app) {\n \n \n \n \n /**\n * This make Raptor load the control panel from the root path\n * if the config mode is debug wich is taken by Raptor like\n * DEV mode\n * \n * PROBABLY YOU NEED TO REMOVE THIS IN PRODUCTION MODE\n */\n if($app->config('debug'))\n $app->any('/',function() use ($app){\n $app->redirect($app->request()->getScriptName().'/raptor');\n });\n }", "title": "" }, { "docid": "3e2be22b166df468f2f5100c104c0443", "score": "0.5294801", "text": "public function init()\n\t{\n\t\t// NOTE: Nothing that triggers a database connection should be made here until *after* _processResourceRequest()\n\t\t// in processRequest() is called.\n\n\t\t// Import all the built-in components\n\t\tforeach ($this->componentAliases as $alias)\n\t\t{\n\t\t\tCraft::import($alias);\n\t\t}\n\n\t\t// Attach our Craft app behavior.\n\t\t$this->attachBehavior('AppBehavior', new AppBehavior());\n\n\t\t// If there is a custom validationKey set, apply it here.\n\t\tif ($validationKey = $this->config->get('validationKey'))\n\t\t{\n\t\t\t$this->security->setValidationKey($validationKey);\n\n\t\t\t// Make sure any instances of Yii's CSecurityManager class are using the custom validation\n\t\t\t// key as well\n\t\t\t$this->getComponent('securityManager')->setValidationKey($validationKey);\n\t\t}\n\n\t\t// Attach our own custom Logger\n\t\tCraft::setLogger(new Logger());\n\n\t\t// If there is a custom appId set, apply it here.\n\t\tif ($appId = $this->config->get('appId'))\n\t\t{\n\t\t\t$this->setId($appId);\n\t\t}\n\n\t\t// Initialize Cache, HttpRequestService and LogRouter right away (order is important)\n\t\t$this->getComponent('cache');\n\t\t$this->getComponent('request');\n\t\t$this->getComponent('log');\n\n\t\t// So we can try to translate Yii framework strings\n\t\t$this->coreMessages->attachEventHandler('onMissingTranslation', array('Craft\\LocalizationHelper', 'findMissingTranslation'));\n\n\t\t// Set our own custom runtime path.\n\t\t$this->setRuntimePath($this->path->getRuntimePath());\n\n\t\t// Set the edition components\n\t\t$this->_setEditionComponents();\n\n\t\tparent::init();\n\t}", "title": "" }, { "docid": "8828a84cbfd1b77edaf5453a6b927346", "score": "0.5293674", "text": "protected function _start()\n\t{\n\t $this->_setupContext();\n\t //$this->_setupDatabaseSchema();\n\t}", "title": "" }, { "docid": "ac410bc7958a484e8df89957612e056e", "score": "0.52936566", "text": "public function init(){\n\t\tif(!$app = apc_fetch('app')){\n\t\t\t$config = new bikes_Config;\n\t\t\t$app = new bikes_App($config);\n\t\t\tapc_store('app', $app);\n\t\t}\n\t\t$app->init();\n\t\techo $app->dispatch();\n\t}", "title": "" }, { "docid": "c1836c7d4e9e065d5a12edd9870088b4", "score": "0.5293575", "text": "protected function doInit()\n {\n }", "title": "" }, { "docid": "0d6412e1a142a2869baa761ad1798235", "score": "0.5291154", "text": "public function startup()\n {\n\n parent::startup();\n }", "title": "" }, { "docid": "70b1021e83be1f00a237bbcaded480fb", "score": "0.52899295", "text": "abstract public function boot();", "title": "" }, { "docid": "55fe307f59ecc8ec188e8c8da3ff0ae0", "score": "0.5287489", "text": "public function initializeAction()\n {\n $this->initializeBase();\n }", "title": "" }, { "docid": "d94b29de9e556b033bbbb80a252948c6", "score": "0.52783793", "text": "private function bootstrap(ServerRequestInterface $request)\n {\n if (!$this->isInitialized) {\n $this->initializeObjectManager();\n $coreBootstrap = $this->objectManager->get(Core::class);\n $coreBootstrap->initialize($request);\n\n $this->initializeConfiguration($this->configuration);\n $this->configureObjectManager();\n $this->registerSingularToPlural($this->objectManager);\n $this->configureDispatcher($this->objectManager);\n\n $this->isInitialized = true;\n }\n }", "title": "" }, { "docid": "abadd11d6bdd271fd15878ab9a3853ae", "score": "0.52757806", "text": "public function init($request)\n\t{\n\t\t$this->debug = (isset($request['debug']) && $request['debug'] == 1);\n\t\t\n\t\t$defaultServer = defined('config_appliance_iprouter_server') ? config_appliance_iprouter_server : null;\n\t\t$defaultPass = defined('config_appliance_iprouter_pass') ? config_appliance_iprouter_pass : null;\n\t\t\n\t\t$this->server = (isset($request['server']) && trim($request['server']) != \"\") ? trim($request['server']) : $defaultServer;\n\t\t$this->pass = (isset($request['pass']) && trim($request['pass']) != \"\") ? trim($request['pass']) : $defaultPass;\n\t}", "title": "" }, { "docid": "58501e71b77cd581359cd44f413d02f9", "score": "0.5275482", "text": "public function routeStartup (Zend_Controller_Request_Abstract $request)\n\t{\n\n\t}", "title": "" }, { "docid": "e7b7d827014d7f36d59495cf21d46012", "score": "0.5275252", "text": "public function init()\n {\n if (craft()->userSession->isLoggedIn())\n {\n \t craft()->runController('DsSolr/saveEntry/registerEvents');\n }\n }", "title": "" }, { "docid": "b5ffd8c45609ac2cbdc48d38597ec21a", "score": "0.52736264", "text": "public function onInit(){\n\t\t$this->setAcfJsonPath();\n\t\t$this->ConfigManager->initWpHooks();\n\t\t$this->Slim->Event->emit('init');\n\t}", "title": "" }, { "docid": "cf6907c549e7d3a0cdb421500340a736", "score": "0.52728856", "text": "public function start() {\r\n\t\t\r\n\t\t//burst the REQUEST_URI so I can pull out the local path items \r\n\t\t//and then figure out is an operation was requested\r\n\t\t// because I don't like get parms for navigation\r\n\t\t$request = explode('/', $_SERVER['REQUEST_URI'] );\r\n\t\t\r\n\t\t$operation=null;\r\n\t\tif(count($request)>1 ){\r\n\t\t\tarray_shift($request);\r\n\t\t\tif(reset($request)=='stash'){\r\n\t\t\t\tarray_shift($request);\r\n\t\t\t\t$operation = array_shift($request);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//now, if I have an operation, do it. Otherwise back to the default view\r\n\t\tswitch ($operation) {\r\n\t\t\tcase 'GETSOME':\r\n\t\t\t\t//get some data and\r\n\t\t\t\t$request = $_REQUEST; \r\n\t\t\t\t$data = $this->_gotGetSomeData($request);\r\n\t\t\t\techo json_encode($data);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\t$this->_renderIndexPage();\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "bcf98b651431e6c90819899f44fd8b7a", "score": "0.5269417", "text": "public function beginRequest() {\n Yii::import(self::DIRECTORY .'.helpers.*');\n Yii::import(self::DIRECTORY .'.widgets.*');\n // enable AngularJS custom theme in the extension\n $this->enableTheme();\n }", "title": "" }, { "docid": "c5418e66f78e224e30902ed425979706", "score": "0.5269034", "text": "public function run()\n {\n $this\n ->_loadRequest()\n ->_loadConfigs()\n ->_loadView()\n ->_loadRouter()\n ->_loadController()\n ->_autoloader()\n ->_startController();\n }", "title": "" }, { "docid": "4bbed3d2767a2b4c7f3363a27ee4fe22", "score": "0.52649766", "text": "public function start()\n {\n global $index_includes;\n\n $l_gets = $this->m_userrequest->get_gets();\n $l_posts = $this->m_userrequest->get_posts();\n\n if (isys_glob_get_param(\"ajax\") && !isys_glob_get_param(\"call\"))\n {\n $this->processAjaxRequest($l_posts);\n die;\n } // if\n\n if (array_key_exists('what', $l_gets))\n {\n $this->m_node = str_replace('loginventory_', '', $l_gets['what']);\n }\n else\n {\n $this->m_node = self::C__IMPORT;\n } //if\n\n try\n {\n $l_method = 'handle_' . $this->m_node;\n $this->$l_method($l_gets, $l_posts);\n }\n catch (isys_exception_general $e)\n {\n throw $e;\n }\n catch (isys_exception_auth $e)\n {\n $this->m_userrequest->get_template()\n ->assign(\"exception\", $e->write_log());\n $index_includes['contentbottomcontent'] = \"exception-auth.tpl\";\n }\n }", "title": "" }, { "docid": "96a7d05b38ea06c4c08e70d6d3e8327b", "score": "0.5257927", "text": "public function init()\n\t{\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t\n\t\t$this->setImport(array(\n\t\t\t'takeAway.models.*',\n\t\t\t'takeAway.components.*',\n\t\t));\n\t}", "title": "" }, { "docid": "cab255a9dfd4b458b043aa0e6cd060b3", "score": "0.5257303", "text": "public function init()\n\t{\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t'rights.models.*',\n\t\t\t'rights.components.*',\n\t\t));\n\t}", "title": "" }, { "docid": "26d8aeae83167e00727330aa44e98ad1", "score": "0.52562046", "text": "private function init(){\n\n\t\t$url = explode(\"/\",$this->request['p']);\n\n\t\t$controller = \"src\\\\Controller\\\\\".ucfirst($url[0]).\"Controller\";\t\t\n\t\t$controller = new $controller();\n\t\t\n\t\t$view = (isset($url[1]))? $url[1].\"Action\": \"indexAction\";\n\n\t\tcall_user_func_array(array($controller, 'init'), array($this->twig));\n\t\t\n\t\tcall_user_func_array(array($controller, $view), array());\n\n\t\t\n\t}", "title": "" }, { "docid": "afe5907e2f317ce51bba67511bb5fc3b", "score": "0.525508", "text": "public function init()\n {\n $this->getBootstrap()->bootstrap('view');\n $this->_view = $this->getBootstrap()->getResource('view');\n $this->setHeadMetas();\n }", "title": "" }, { "docid": "bf8b7bdbcd18b26967b414e7a583eeb2", "score": "0.5251489", "text": "public function init() {\n\t\t$this->_server = new Zend_Json_Server();\n\t\t$this->params = $this->_request->getParams();\n\t\t$this->baseUrl = $this->view->baseUrl();\n\t}", "title": "" }, { "docid": "43830d68adc228ef6761631dc01095c7", "score": "0.52472734", "text": "public function init()\n\t{\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t'timemanager.models.*',\n\t\t\t'timemanager.components.*',\n\t\t));\n\t}", "title": "" }, { "docid": "af0d3cc21871b7dc786e060424249549", "score": "0.52350616", "text": "protected function setUp() {\n\n $this->installer = new Core_Installer();\n $this->installer->installTest();\n $this->installer->loginAsSuperAdmin();\n \n $this->contentInstaller = new Content_Installer();\n $this->contentInstaller->installTest();\n\n $this->service = new Content_Model_Field_Service();\n \n $this->bootstrap = new Zend_Application('testing', APPLICATION_PATH . '/configs/application.ini'); //\n $this->view = Zend_Registry::get('view');\n \n parent::setUp();\n \n $request = $this->getRequest();\n $request->setModuleName('Content');\n $request->setControllerName('Field');\n }", "title": "" }, { "docid": "01a99389d29aa71935e63a25bd8f7c2c", "score": "0.52340186", "text": "public function init()\n {\n parent::init();\n $this->_module = $this->getRequest()->getModuleName();\n }", "title": "" }, { "docid": "dd0f76a3e4ab4e289fe8aa4f986794b3", "score": "0.52304846", "text": "public function init()\n\t{\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t'plantravel.models.*',\n\t\t\t'plantravel.components.*',\n\t\t));\n\t}", "title": "" }, { "docid": "cc6b16041dc9aa8ece85c829d731aade", "score": "0.5222687", "text": "public function init()\r\n {\r\n $this->setImport(array(\r\n 'service.models.*',\r\n 'service.components.*',\r\n ));\r\n }", "title": "" }, { "docid": "37d660cea38cc6750f8c04760858b521", "score": "0.5216347", "text": "function Launch()\n\t{\n\t\t$Parts = explode ( \"/\", $this->Request );\n\t\tassert ( $Parts [0] == \"sys\"); // or $Parts [0] == \"app\" );\n\t\t$Parts [0] = \"control\";\n\t\tarray_unshift($Parts, \"jf\"); //go system mode for import\n\t\t$RequestedModule = implode ( \"/\", $Parts );\n\t\n\t\t//load the controller module\n\t\tif (!$this->StartController ( $RequestedModule ))\n\t\t{\n\t\t\t//not found!\n\t\t\tif (! headers_sent ()) # no output done, this check prevents controllers that don't return true to fail\n\t\t\t\tjf::run ( \"view/_internal/error/404\");\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "71672a58cbb21a876a7305f8d89224c5", "score": "0.52086604", "text": "public function __initBundle() {\n\n\t\t# include the resources\n\t\tinclude_once('source/Braintree.php');\n\n\t\t$event = e::$events->first->braintreeAPIKeys();\n\n\t\t/**\n\t\t * If nothing is providing us with the API keys. Let's pull them from system.vars and assume this is not a multiple environment app.\n\t\t */\n\t\tif(!$event)\n\t\t\t$this->_configure(\n\t\t\t\te::$environment->requireVar('braintree.environment', 'development|sandbox|production|qa'),\n\t\t\t\te::$environment->requireVar('braintree.merchant_id'),\n\t\t\t\te::$environment->requireVar('braintree.public_key'),\n\t\t\t\te::$environment->requireVar('braintree.private_key')\n\t\t\t);\n\n\t\t/**\n\t\t * Otherwise use the vars provided by whatever bundle is responding with the keys (likely webapp or something similar)\n\t\t */\n\t\telse\n\t\t\t$this->_configure($event['environment'], $event['merchant_id'], $event['public_key'], $event['private_key']);\n\t}", "title": "" }, { "docid": "f24dc3ce378a86dfa0051477b1bc0d3e", "score": "0.5208618", "text": "public static function init() {\n /* Getting Request Method */\n self::setRequestMethod();\n /* Get if post and put */\n if (self::getRequestMethod() == 'POST' || self::getRequestMethod() == 'PUT')\n self::inputs();\n /* Check requestParams array */\n self::checkRequestParams();\n }", "title": "" }, { "docid": "9a53d3c5575812a0df92552e55c6c67a", "score": "0.5208337", "text": "protected function start() {\n\t\t// this time using the override engine for class instantiations\n\n\t\t// Log\n\t\t$log = $this->factory->newLog($this->config->get('error_filename'));\n\t\t$this->registry->set('log', $log);\n\n\t\t// Request\n\t\t$this->registry->set('request', $this->factory->newRequest());\n\n\t\t// Cache\n\t\t$this->registry->set('cache', $this->factory->newCache($this->config->get('cache_engine'), $this->config->get('cache_expire')));\n\n\t\t// Url\n\t\tif ($this->config->get('url_autostart')) {\n\t\t\t$this->registry->set('url', $this->factory->newUrl($this->config->get('site_url'), $this->config->get('site_ssl')));\n\t\t}\n\n\t\t// Document\n\t\t$this->registry->set('document', $this->factory->newDocument());\n\t}", "title": "" }, { "docid": "451c264a07ff1f89e7a0b875112b432d", "score": "0.520516", "text": "private static function init()\n {\n static::loadIndex('index');\n //require related library\n foreach (static::$included_file as $item) {\n static::load($item);\n }\n //loading widgets\n require_once(Qdmvc::getWidget('index.php'));\n }", "title": "" }, { "docid": "5ccee6d6e3176e37c30e4409510bd783", "score": "0.5204226", "text": "public function init($request) {\n parent::init($request);\n\n }", "title": "" }, { "docid": "bcdc1db532f83a7416f71e2722ce9e7e", "score": "0.52041894", "text": "public function setupWithEnvironment()\n {\n $this->requestBody = file_get_contents('php://input');\n switch (true) {\n case isset($_SERVER['REQUEST_URI']):\n $url = $_SERVER['REQUEST_URI'];\n break;\n case isset($_SERVER['argv']) && isset($_SERVER['argv'][1]):\n $url = $_SERVER['argv'][1];\n $this->requestMethod = isset($_SERVER['argv'][2]) ? $_SERVER['argv'][2] : 'HEADER';\n $this->requestBody = isset($_SERVER['argv'][3]) ? $_SERVER['argv'][3] : $this->requestBody;\n break;\n default:\n $url = '';\n }\n $this->requestUri = $this->cleanUri(parse_url($url, PHP_URL_PATH));\n if (isset($_SERVER['REQUEST_METHOD'])) {\n $this->requestMethod = $_SERVER['REQUEST_METHOD'];\n }\n\n $this->requestPost = $_POST;\n $this->requestGet = $_GET;\n $this->requestFiles = $_FILES;\n $this->requestHeaders = array();\n foreach ($_SERVER as $name => $value) {\n if (substr($name, 0, 5) == 'HTTP_') {\n $this->requestHeaders[str_replace(\n ' ',\n '-',\n ucwords(strtolower(str_replace('_', ' ', substr($name, 5))))\n )] = $value;\n }\n }\n $this->makeVars();\n }", "title": "" }, { "docid": "b3164195bceea90e25926d267bdda08f", "score": "0.51916033", "text": "public function set_up() {\n\n\t\tparent::set_up();\n\t\t$this->main = LLMS_REST_API();\n\n\t}", "title": "" }, { "docid": "97b60fceac1ca17778e62f2632305a6e", "score": "0.51915693", "text": "function start($info)\n { echo \"\\nresource_id is [$this->resource_id]\\n\";\n if(in_array($this->resource_id, array('21_ENV'))) {\n $options = array('cache' => 1, 'download_wait_time' => 500000, 'timeout' => 10800, 'expire_seconds' => 60*60*1);\n $this->contributor_mappings = $this->get_contributor_mappings($this->resource_id, $options); // print_r($this->contributor_mappings);\n echo \"\\n contributor_mappings: \".count($this->contributor_mappings).\"\\n\"; //exit(\"\\nstop munax\\n\");\n }\n elseif($this->resource_id == '26_ENV') { //exclusive for WoRMS\n $this->contributor_mappings = $this->get_WoRMS_contributor_id_name_info(); // print_r($this->contributor_mappings);\n echo \"\\n contributor_mappings: \".count($this->contributor_mappings).\"\\n\"; //exit(\"\\nstop munax\\n\");\n }\n require_library('connectors/TraitGeneric'); \n $this->func = new TraitGeneric($this->resource_id, $this->archive_builder);\n /* START DATA-1841 terms remapping -> not needed here\n $this->func->initialize_terms_remapping(60*60*24); //param is $expire_seconds. 0 means expire now.\n END DATA-1841 terms remapping\n self::initialize_mapping(); //for location string mappings\n */\n // /* customize\n echo \"\\n resource_id is [$this->resource_id]\\n\";\n if($this->resource_id == '26_ENV') { //this will just populate MoF. Too big in memory to do in DwCA_Utility.php.\n $tables = $info['harvester']->tables;\n $meta = $tables['http://rs.tdwg.org/dwc/terms/measurementorfact'][0];\n self::process_table($meta, 'create extension', 'measurementorfact_specific');\n $meta = $tables['http://rs.tdwg.org/dwc/terms/occurrence'][0];\n self::process_table($meta, 'create extension', 'occurrence_specific');\n }\n\n if(in_array($this->resource_id, array('10088_5097_ENV', '10088_6943_ENV', '118935_ENV', '120081_ENV', '120082_ENV', '118986_ENV', \n '118920_ENV', '120083_ENV', '118237_ENV', 'MoftheAES_ENV', '30355_ENV', \"27822_ENV\", \"30354_ENV\", \"119035_ENV\", \"118946_ENV\", \"118936_ENV\", \n \"118950_ENV\", \"120602_ENV\", \"119187_ENV\", \"118978_ENV\", \"118941_ENV\", \"119520_ENV\", \"119188_ENV\",\n '15423_ENV', '91155_ENV'))\n || @$this->params['resource'] == 'all_BHL'\n || stripos($this->resource_id, \"SCtZ-\") !== false\n || stripos($this->resource_id, \"scb-\") !== false\n || stripos($this->resource_id, \"scz-\") !== false\n ) {\n $tables = $info['harvester']->tables;\n \n /* this will just populate Associations. Not available in DwCA_Utility.php. */\n if($tbl = @$tables['http://eol.org/schema/association']) {\n $meta = $tbl[0];\n self::process_table($meta, 'create extension', 'association');\n }\n\n if(!in_array($this->resource_id, array('118935_ENV'))) { //list-type resources don't have media objects\n }\n \n /* this will populate media_object less the subject#uses */\n if($tbl = @$tables['http://eol.org/schema/media/document']) {\n $meta = $tbl[0];\n self::process_table($meta, 'create extension', 'document');\n }\n else exit(\"\\nditox 100\\n\");\n \n // /* this will populate MoF xxx_ENV.tar.gz with MoF (size patterns) from xxx.tar.gz \n if($tbl = @$tables['http://rs.tdwg.org/dwc/terms/measurementorfact']) {\n $meta = $tbl[0];\n self::process_table($meta, 'create extension', 'measurementorfact_specific');\n }\n // */\n }\n \n // */\n self::add_environmental_traits();\n /* Below will be used if there are adjustments to existing MoF and Occurrences\n $tables = $info['harvester']->tables;\n self::process_measurementorfact($tables['http://rs.tdwg.org/dwc/terms/measurementorfact'][0]);\n self::process_occurrence($tables['http://rs.tdwg.org/dwc/terms/occurrence'][0]);\n */\n if($this->debug) {\n if(isset($this->debug['neglect uncooperative contributor'])) {\n echo \"\\n neglect uncooperative contributor: \".count($this->debug['neglect uncooperative contributor']).\" \\n\";\n unset($this->debug['neglect uncooperative contributor']);\n }\n print_r($this->debug);\n }\n }", "title": "" }, { "docid": "1664857a95cb6054c8318412c6b4b27f", "score": "0.51831263", "text": "public function initialize() {\n parent::initialize();\n /* to get site base URL */\n $protocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] && $_SERVER['HTTPS'] != \"off\") ? 'https' : 'http';\n $serverURL = $protocol . '://' . $_SERVER['HTTP_HOST'] . $this->request->webroot;\n \n define('SITE_BASEURL',$serverURL);\n define('DRIVE_REDIRECT_URL_DEV',$serverURL.'users/driveFileUpload');\n \n $this->loadComponent('Auth');\n $this->loadComponent('RequestHandler');\n $this->loadComponent('Flash');\n $this->loadComponent('BullhornConnection');\n $this->loadComponent('BullhornCurl');\n }", "title": "" }, { "docid": "14788cc998767fa6c58133271cabfb36", "score": "0.5182841", "text": "protected function setUp() {\r\n\t\t$_SERVER['SCRIPT_NAME'] = '/index.php';\r\n\r\n\t\t// Default request method to GET\r\n\t\t$_SERVER['REQUEST_METHOD'] = 'GET';\r\n\r\n\t}", "title": "" }, { "docid": "153bf26bc72f3a327e67ac3220e437c8", "score": "0.517614", "text": "public function startup()\n {\n foreach ($this->injector->getConstant('net.stubbles.webapp.xml.generators') as $xmlGeneratorClassName) {\n $xmlGenerator = $this->injector->getInstance($xmlGeneratorClassName);\n $xmlGenerator->startup();\n $this->xmlGenerators[] = $xmlGenerator;\n }\n }", "title": "" }, { "docid": "ee9ad7740b00dc8219eb4b0fcd260f75", "score": "0.51753664", "text": "public function initCliAction()\n {\n clearstatcache();\n\n $app = 'app/' . Config::get('app.name') . '/';\n\n $assets = [\n BASE_PATH . $app . '_session/',\n BASE_PATH . $app . '_cache/',\n BASE_PATH . $app . '_database/',\n BASE_PATH . $app . '_templates/',\n ];\n\n echo 'Checking app assets ...' . PHP_EOL;\n\n foreach ($assets as $asset) {\n\n if (!is_dir($asset)) {\n echo \"[ Please create '$asset' directory! ]\" . PHP_EOL;\n }\n\n if (!is_writable($asset)) {\n echo \"[ Please make '$asset' writable! ]\" . PHP_EOL;\n }\n }\n\n echo 'Securing root directory ...' . PHP_EOL;\n chmod(BASE_PATH, 0755);\n\n echo 'Securing .htaccess ...' . PHP_EOL;\n chmod(BASE_PATH . '.htaccess', 0644);\n\n echo 'Securing index.php ...' . PHP_EOL;\n chmod(BASE_PATH . 'index.php', 0644);\n\n echo 'Securing pimf-framework/autoload.core.php ...' . PHP_EOL;\n chmod(BASE_PATH . 'pimf-framework/autoload.core.php', 0644);\n\n echo 'Creating log files ...' . PHP_EOL;\n array_walk(\n ['logs', 'warnings', 'errors'],\n function($value, $key, $directory) {\n $file = $directory . \"pimf-$value.txt\";\n fclose(fopen($file, \"at+\"));\n chmod($file, 0777);\n },\n Config::get('bootstrap.local_temp_directory')\n );\n\n clearstatcache();\n }", "title": "" }, { "docid": "2dc79e1f34f83a1620883986c501565b", "score": "0.5175193", "text": "public function hookInitialize()\n {\n require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'jobs' . DIRECTORY_SEPARATOR . 'import.php';\n }", "title": "" }, { "docid": "9967ace88d0c921fc27083bbdf65ac47", "score": "0.51724416", "text": "public function init()\n\t{\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t'group.models.*',\n\t\t\t'group.components.*',\n\t\t));\n\t\t$this->initGroupRole();\n\t}", "title": "" }, { "docid": "1808117b6abf595daaf1f24474a09f58", "score": "0.51716435", "text": "protected function setUp() {\n \n // define default $_SERVER['REQUEST_METHOD'];\n // define default $_SERVER['HTTP_ACCEPT'];\n // define default $_SERVER['PATH_INFO'];\n \n \n $_SERVER['REQUEST_METHOD'] = 'GET';\n $_SERVER['HTTP_ACCEPT'] = 'html';\n $_SERVER['PATH_INFO'] = 'index';\n \n $this->request = new Request();\n }", "title": "" }, { "docid": "6d5fb9410a18ecf7f39e3811e5615560", "score": "0.5170463", "text": "public function startRequest();", "title": "" } ]
8ab2c4915144457e344ae85b681d0cb3
using the opendir function
[ { "docid": "fd072e1ab3ab715bae55b3a3b4b899ff", "score": "0.0", "text": "function ListFolder($path) {\n $dir_handle = @opendir($path) or die(\"Unable to open $path\");\n\n //Leave only the lastest folder name\n $dirname = end(explode(\"/\", $path));\n\n echo '<ul>';\n\n //display the target folder.\n echo '<li><a href=\"'.$dirname.'\" class=\"folder\">'.$dirname.'</a>';\n echo '<ul>';\n while (false !== ($file = readdir($dir_handle))) {\n if ($file != \".\" && $file != \"..\") {\n if (is_dir($path . \"/\" . $file)) {\n //Display a list of sub folders.\n ListFolder($path . \"/\" . $file);\n } else {\n //Display a list of files.\n echo '<li><a href=\"'.$file.'\">'.$file.'</a></li>';\n }\n }\n }\n echo \"</ul>\";\n echo \"</li>\";\n\n echo \"</ul>\";\n\n //closing the directory\n closedir($dir_handle);\n }", "title": "" } ]
[ { "docid": "97fb147dd4325b9759725ba0bc5617a8", "score": "0.6943868", "text": "abstract protected function _scandir($path);", "title": "" }, { "docid": "4a6915896f8953a39ac56ba4d9484e67", "score": "0.6932986", "text": "public function doOpenDir() {\n\t\t$uploadedFiles = array();\n\t\t\n\t\t// Look if there's any folder\n\t\tif (is_dir($this->m_uploadDir)) {\n\t\t\t\n\t\t\t// Open the folder and store the directory in a variable\n\t\t\tif ($dh = opendir($this->m_uploadDir)) {\n\t\t\t\t\n\t\t\t\t// Read all files in the folder.\n\t\t\t\twhile (($file = readdir($dh)) !== false) {\n\t\t\t\t\t\n\t\t\t\t\t// Store the filename in a array\n\t\t\t\t\t$uploadedFiles[] = $file;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Close the opened directory\n\t\t\t\tclosedir($dh);\n\t\t\t}\n\t\t}\n\t\t// Return the filenames\n\t\treturn $uploadedFiles;\n\t}", "title": "" }, { "docid": "2dfebba864e733ec1140a5f78836f91c", "score": "0.6787214", "text": "function ls($directory);", "title": "" }, { "docid": "6ed50396ed3c9756e7c3dc6a216b0b38", "score": "0.6721823", "text": "function llistat($dir) {\n $dir = DIRECTORI_BASE.\"/\".$dir;\n\tif (!is_dir($dir)){\n\techo \"No has escrito un directorio valido\";\n\t} else{\n\n\t$arrayDir=(scandir($dir));\n\tfor ($i=2; $i<count($arrayDir); $i++){\n\n if (is_dir($dir.'/'.$arrayDir[$i])){ \n\t\n\t\techo $arrayDir[$i].'<br>';\n\n\t\t\t}\n\t\t}\n\t}\n\n}", "title": "" }, { "docid": "8e50830a482d32d669b4178f6e37ca5e", "score": "0.67130613", "text": "public function dir_opendir($uri,$options)\n{\ntry\n{\n$this->uri=$uri;\n$this->raiseErrors=($options & STREAM_REPORT_ERRORS);\n\nself::parseURI($uri,$this->command,$this->params,$this->mnt\n\t,$this->path);\n\nif (!is_null($this->mnt)) \\PHK\\Mgr::validate($this->mnt);\n\n$this->data=self::getFile(true,$uri,$this->mnt,$this->command\n\t,$this->params,$this->path);\n\n$this->size=count($this->data);\n$this->position=0;\n}\ncatch (\\Exception $e)\n\t{\n\t$msg=$uri.': PHK opendir error - '.$e->getMessage();\n\t$this->raiseWarning($msg);\n\treturn false;\n\t}\nreturn true;\n}", "title": "" }, { "docid": "81a05c17cbc3cf01545bd4d8be42c88a", "score": "0.66700995", "text": "public function dir_opendir($path, $options)\n {\n print __METHOD__ . \"\\n\";\n return true;\n }", "title": "" }, { "docid": "8eb84a3ef445d7721624aa3e39657972", "score": "0.6627201", "text": "function directory();", "title": "" }, { "docid": "743b305712bb7d1c72212d334aced8c7", "score": "0.66006804", "text": "public function dir_readdir()\n {\n print __METHOD__ . \"\\n\";\n return 'filename.txt';\n }", "title": "" }, { "docid": "25e16f10c006c1d913b7e085a7a0ce59", "score": "0.6515186", "text": "public static function opendir($folder) {\n $handle = @opendir($folder);\n if (!$handle) {\n require_once(dirname(__FILE__) . '/mod_forumng_file_exception.php');\n throw new mod_forumng_file_exception(\n \"Failed to open folder: $folder\");\n }\n return $handle;\n }", "title": "" }, { "docid": "18a2416f312e87cf65d06c176a2a04b4", "score": "0.6423486", "text": "abstract public function dir($path = null);", "title": "" }, { "docid": "6d03fd4b2c0ab4a10cb9fe48eba961ee", "score": "0.6417436", "text": "function ls_a($wh)\n{\n if ($handle = opendir($wh))\n {\n while (false !== ($file = readdir($handle)))\n {\n if ($file !== \".\" && $file !== \"..\" )\n {\n if(!isset($files)) $files=$file;\n else $files = $file.\"\\r\\n\".$files;\n }\n }\n closedir($handle);\n }\n $arr=explode(\"\\r\\n\", $files);\n return $arr;\n}", "title": "" }, { "docid": "9e5c0d30117daaccf21926b76c885173", "score": "0.63908213", "text": "public static function GetDir();", "title": "" }, { "docid": "53c5ddf75f8af4d3af42e3d37861eb9f", "score": "0.6312221", "text": "function filepro($directory){}", "title": "" }, { "docid": "c74013795e10822fc376fb8202bd0c6f", "score": "0.6298813", "text": "function openReadDir ($dirPath) {\r\n global $fileNameList; \r\n $isImage = \"null\"; // initalise $isImage to null in case first file is non image\r\n if (is_dir($dirPath)){ //open directory and read contents\r\n if ($dh = opendir($dirPath)){\r\n $i=0;\r\n while (($file = readdir($dh)) !== false){\r\n $imageFileType = strtolower(pathinfo($file,PATHINFO_EXTENSION)); //check fiel extension is image\r\n if ($imageFileType == \"jpeg\" || $imageFileType == \"png\" || $imageFileType == \"jpg\" || $imageFileType == \"gif\" || $imageFileType == \"tiff\") {\r\n $isImage = \"true\";\r\n }\r\n if ($isImage == \"true\") {\r\n $fileNameList[$i]=$dirPath.$file; \r\n $i=$i+1;\r\n $isImage = \"false\";\r\n } \r\n }\r\n closedir($dh);\r\n }\r\n \r\n }\r\n }", "title": "" }, { "docid": "8c5abfbdbcc286d9b2f479257c9d5d6c", "score": "0.6278764", "text": "function get_files($path){\n\t\t// Open a known directory, and proceed to read its contents\n\t\tif (is_dir($path)) {\n\t\t\tif ($dh = opendir($path)) {\n\t\t\t\twhile (($file = readdir($dh)) !== false) {\n\t\t\t\t\tif(!isDot()){\n\t\t\t\t\t\techo($path . '/' . $file);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tclosedir($dh);\n\t\t\t}\n\t\t}\n }", "title": "" }, { "docid": "97c34813a77788935a3d94922ddd648b", "score": "0.6259323", "text": "public function getDirectory();", "title": "" }, { "docid": "0e0aa61fbd2419b4fb58affc88d5bd2e", "score": "0.6228087", "text": "private function lister()\n {\n if (!is_dir(SPARK_PATH)) return; // no directory yet\n foreach(scandir(SPARK_PATH) as $item)\n {\n if (!is_dir(SPARK_PATH . \"/$item\") || $item[0] == '.') continue;\n foreach (scandir(SPARK_PATH . \"/$item\") as $ver)\n {\n if (!is_dir(SPARK_PATH . \"/$item/$ver\") || $ver[0] == '.') continue;\n Spark_utils::line(\"$item ($ver)\");\n }\n } \n }", "title": "" }, { "docid": "e3ac16a2459774e0034de67c6b59ed2c", "score": "0.6205109", "text": "function _ls_local ($dir_path) {\n\n $dir = dir($dir_path);\n $dir_list = array();\n $file_list = array();\n while (false !== ($entry = $dir->read())) {\n if (($entry != \".\") && ($entry != \"..\")) {\n if (is_dir($dir_path.$entry)) {\n $dir_list[] = $entry;\n } else {\n $file_list[] = $entry;\n }\n }\n }\n $dir->close();\n $res[\"dirs\"] = $dir_list;\n $res[\"files\"] = $file_list;\n return $res;\n }", "title": "" }, { "docid": "eadd5c5c668389d13b7c8a397cc56881", "score": "0.6182679", "text": "function recursive_readdir ($dir) {\n $dir = rtrim ($dir, '/'); // on vire un eventuel slash mis par l'utilisateur de la fonction a droite du repertoire\n if (is_dir ($dir)) // si c'est un repertoire\n $dh = opendir ($dir); // on l'ouvre\n else {\n echo $dir, ' n\\'est pas un repertoire valide'; // sinon on sort! Appel de fonction non valide\n exit;\n }\n while (($file = readdir ($dh)) !== false ) { //boucle pour parcourir le repertoire \n if ($file !== '.' && $file !== '..') { // no comment\n $path =$dir.'/'.$file; // construction d'un joli chemin...\n if (is_dir ($path)) { //si on tombe sur un sous-repertoire\n echo '<p style=\"font-weight: bold; border : 1pt solid #000000;\">', $path, ' \n-> dir</p>'; // ptit style...\n echo '<div style=\"padding-left: 20px; border: 1pt dashed #000000;\">'; // idem...\n recursive_readdir ($path); // appel recursif pour lire a l'interieur de ce sous-repertoire\n echo '</div><br />';\n }\n else\n echo $path, '<br />'; // si il s'agit d'un fichier, on affiche, tout simplement.\n }\n }\n closedir ($dh); // on ferme le repertoire courant\n}", "title": "" }, { "docid": "0d4058b406ac3f62ecc604daaaa1a224", "score": "0.6182111", "text": "function videosLoad(){\nglobal $videos;\n if ($handle = opendir('videos')) {\n\n /* This is the correct way to loop over the directory. */\n while (false !== ($entry = readdir($handle))) {\n \n $videos[] = $entry;\n\n \n\n }\n\n closedir($handle);\n }\n return $videos;\n}", "title": "" }, { "docid": "6f58c6f1a7bf24d4df913098e1e7ba54", "score": "0.61636555", "text": "function directory_list($directory = null) {\n\tif(!$directory) { $directory = \"../data/ddi/\"; }\n\tif ($handle = opendir($directory)) {\n\t while (false !== ($file = readdir($handle))) {\n\t\t\t$file_parts = pathinfo($file);\n\t\t\tif($file_parts[\"extension\"] == \"xml\") {\n\t\t\t\t$files[$directory.$file] = $file_parts[\"filename\"];\n\t\t\t}\n\t\t}\n\t\treturn $files;\n\t} else {\n\t\tlog_message(\"Data files directory not found\");\n\t}\n\n}", "title": "" }, { "docid": "94bf2505eb9673384ddd8d72d0874628", "score": "0.61556524", "text": "function my_ls($b)\n{\n $arg = preg_split('/\\s+/', $b);\n $dir = $arg[1];\n \n if (is_dir($dir)) \n {\n if ($dh = opendir($dir))\n\t{\n\t while (($file = readdir($dh)) !== false) \n\t {\n\t if ($file[0] != '.')\n\t\techo \"$file\". \"\\n\";\n\t }\n\t closedir($dh);\n\t}\n }\n else if (!(is_dir($dir)))\n {\n $cmd = explode(\" \", $b)[0];\n $file = explode(\" \", rtrim($b))[1];\n echo (\"$cmd: $file: Not a directory\\n\"); \n }\n}", "title": "" }, { "docid": "97a0f3cf2a10aa5edcbb9b9b09d365c9", "score": "0.6124375", "text": "public function ListFilesonDir ($dirpath){\r\n\r\n $listfile = scandir($dirpath);\r\n foreach( $listfile as $file ){\r\n $file_full_path = \"$dirpath$file/\";\r\n if(is_dir($file_full_path) and $file != \".\" and $file != \"..\"){\r\n echo '- ' . $file . '<br/>';\r\n }\r\n }\r\n }", "title": "" }, { "docid": "5a51e5c6a31fdee73db380449766c2e8", "score": "0.61183655", "text": "function returnDirectory(){\n $dir = scandir(\"uploads/\");\n return $dir;\n }", "title": "" }, { "docid": "1c41e62f04093b0d866db4951ce0340c", "score": "0.61112905", "text": "function listar_directorios_ruta($ruta) {\n if (is_dir($ruta)) {\n if ($dh = opendir($ruta)) {\n while (($file = readdir($dh))) {\n if (is_dir($ruta . $file) && $file != \".\" && $file != \"..\" && $file != \"original\") {\n $rute = array_reverse(explode('/', $ruta . $file));\n $id = $rute[2] . $rute[1] . $rute[0];\n $sth = $this->db->prepare(\"SELECT * FROM photos where id=:id order by id\");\n $sth->execute(array(\n ':id' => intval($id)\n ));\n $data = $sth->fetch();\n $count = $sth->rowCount();\n if ($count == 0)\n echo intval($id) . \"NO existe<br>\";\n else\n echo intval($id) . \"SI existe<br>\";\n $this->listar_directorios_ruta($ruta . $file . \"/\");\n }\n }\n closedir($dh);\n }\n }\n }", "title": "" }, { "docid": "9462c8c963f9898758012fe5913e2fba", "score": "0.60581434", "text": "function datadir_getdir ($instance) {}", "title": "" }, { "docid": "6280deda56f3ce69c535858117cfe7f6", "score": "0.6010922", "text": "public function getDirectoryListing();", "title": "" }, { "docid": "1784ebfee2225d42f8100663dfbcdc5c", "score": "0.59686494", "text": "function getFiles() {}", "title": "" }, { "docid": "9341ad0155bd6806e034c3bea3c44670", "score": "0.5967332", "text": "function get_content($filename)\n\t\t\t\t{\n\t\t\t\t$array=scandir(\"$filename\");\t\t\t\t;\n\t\t\t\tforeach($array as $value)\n \t\t\t\t\t {\n\t\t\t\t\t\t\t echo $value . \" >> \"; \t\t\t\t\t\t\t }\n\t\t\t\t}", "title": "" }, { "docid": "fe89e49c9ac5f19db1b94980fba71cf5", "score": "0.5967042", "text": "public function readFiles()\n {\n echo ' === === === List of files === === == ';\n echo '<br>';\n echo '<br>';\n $dir = 'C:\\wamp64';\n\n // Open a directory, and read its contents\n if ( is_dir( $dir ) ) {\n if ( $dh = opendir( $dir ) ) {\n while ( ( $file = readdir( $dh ) ) !== false ) {\n echo 'filename:' . $file . '<br>';\n }\n closedir( $dh );\n }\n } else {\n echo ' Error ';\n }\n echo '<br>';\n echo ' === === === Disk space of files === === == ';\n echo '<br>';\n echo '<br>';\n // On Windows:\n $df_c = disk_free_space( 'C:' );\n $df_d = disk_free_space( 'D:' );\n echo $df_c.' === === === === === == '.$df_d;\n }", "title": "" }, { "docid": "1d3ac9f7eb98d8ed7892a0f0e8aeac5c", "score": "0.5960974", "text": "function read_files_directory($dir) {\n $files = array();\n if($handler = opendir($dir)) {\n while (($file = readdir($handler)) !== FALSE) {\n if ($file != \".\" && $file != \"..\" ) {\n if(is_file($dir.\"/\".$file)){\n $files[$file] = $dir.\"/\".$file;\n }\n }\n }\n closedir($handler);\n }\n else {\n print \"Error: could not open dir $dir\";\n exit();\n }\n return $files;\n}", "title": "" }, { "docid": "e2d26b385bda6adb88fc2171fab1cd96", "score": "0.5932405", "text": "function svn_repos_open($path){}", "title": "" }, { "docid": "90cbc447aadfde5b4e2e47e6aade8872", "score": "0.5916281", "text": "function directoryName();", "title": "" }, { "docid": "343196669e37072faa0c52eb10984c3a", "score": "0.59140676", "text": "function getcwd(){}", "title": "" }, { "docid": "129a44571e7ded195343c402454750df", "score": "0.5910267", "text": "function getFiles();", "title": "" }, { "docid": "129a44571e7ded195343c402454750df", "score": "0.5910267", "text": "function getFiles();", "title": "" }, { "docid": "9bd31909d653cf82cca4e4afd0faf239", "score": "0.5910175", "text": "public function dir_readdir()\n{\nif ($this->position==$this->size) return false;\nreturn $this->data[$this->position++];\n}", "title": "" }, { "docid": "cfa42acbf219a08a58365da65122549b", "score": "0.59039086", "text": "function readDirectory($dir_path, $return = 'both')\n\t{\n\t\t$return_arr = array();\n\t\tif(is_dir(($dir_path)))\n\t\t\t{\n\t\t\t\tif ($handle = opendir($dir_path))\n\t\t\t\t\t{\n\t\t \t\t\twhile (false !== ($file = readdir($handle)))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t if ($file != \".\" && $file != \"..\" && $file != \".svn\")\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t \tif((is_file($dir_path.$file) and $return=='file') or (is_dir($dir_path.$file) and $return=='dir') or ($return=='both'))\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$return_arr[] = $file;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t \t\t\t\t\t}\n\t\t \t\t\t\t}\n\t\t \t\t\tclosedir($handle);\n\t\t\t\t\t}\n\t\t\t}\n\t\treturn $return_arr;\n\t}", "title": "" }, { "docid": "bdca562c110450101e8391b6c86c5bbd", "score": "0.58914316", "text": "function readDirectory($sDirPath, $bLoseExtensions = true, $aSkipList = array('.', '..')) {\r\n \r\n $aListing = array();\r\n \r\n if (is_dir($sDirPath) && ($rDir = opendir($sDirPath)) !== false) {\r\n \r\n while (($sItem = readdir($rDir)) !== false) {\r\n \r\n\t if (in_array($sItem, $aSkipList) === false) {\r\n $aListing[] = substr($sItem, 0, ($bLoseExtensions === true ? strrpos($sItem, '.') : strlen($sItem)));\r\n }\r\n }\r\n \r\n }\r\n \r\n return $aListing;\r\n \r\n }", "title": "" }, { "docid": "9649a0a6d864ce4a920f009b07528968", "score": "0.5876627", "text": "abstract protected function traiterDossier($dir);", "title": "" }, { "docid": "3f8c943d7800428f285a670cc1a004a6", "score": "0.58711886", "text": "function ListFolder($path,$jay420)\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$dir_handle = @opendir($path) or die(\"Unable to open $path\");\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$path=str_replace($_SERVER['DOCUMENT_ROOT'].\"/lms/demo_site/\",\"\",$path);\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//Leave only the lastest folder name\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$dirname = end(explode(\"/\", $path));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//display the target folder.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\techo (\"<li>$dirname\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\techo \"<ul>\\n\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twhile (false !== ($file = readdir($dir_handle)))\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//echo $dir_name;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$sub_dir = substr(strrchr($path, \"/\"), 1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//echo $dir.\"hii\".\"<br>\";\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\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif($file!=\".\" && $file!=\"..\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (is_dir($path.\"/\".$file))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Display a list of sub folders.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tListFolder($path.\"/\".$file,$jay420);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Display a list of files.\n\t\t\t\t\t\t\t\t\t\t\t\tif(preg_match(\"/htm/i\",$file,$matches) || preg_match(\"/php/i\",$file,$matches)){\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/*---code to get the title of file------*/\n\t\t\t\t\t\t\t\t\t\t\t\t$title=\"\";\n\t\t\t\t\t\t\t\t\t\t\t\t$fp=fopen($path.\"/\".trim($file),\"r\");\n\t\t\t\t\t\t\t\t\t\t\t\twhile(!feof($fp)){\n\t\t\t\t\t\t\t\t\t\t\t\t$read=fgets($fp,4096);\n\t\t\t\t\t\t\t\t\t\t\t\tif(stristr($read,\"<title>\")){\n\t\t\t\t\t\t\t\t\t\t\t\t$title=strip_tags($read);\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\t\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t/*-----code ends--------*/\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\techo \"<li><a href ='\".$path.\"/\".trim($file).\"' target='Content' >\".$file.\"</a></li>\";\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//exit();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(preg_match(\"/jpg/i\",$file,$matches)||preg_match(\"/gif/i\",$file,$matches)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//echo \"<li><a target='Content' href ='\".$path.\"/\".trim($file).\"' >\".trim($file).\"</a></li>\";\n\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\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}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\techo \"</ul>\\n\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\techo \"</li>\\n\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//closing the directory\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclosedir($dir_handle);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}", "title": "" }, { "docid": "821700c846616769abe895d1be115766", "score": "0.58533263", "text": "function dirContents($dir = './')\n{\n\tinclude_once('config.php');\n\t\n\t$origDir = $dir;\n\t$urlDir = isset($_GET['d']) ? stripslashes(trim($_GET['d'], '/')) : '';\n\t\n\t// Add a slash to the end of the path if not present\n\tif ($urlDir && substr($urlDir, -1) != '/') { $urlDir = $urlDir.'/'; }\n\t$dir = $dir.$urlDir;\n\t\n\t//Check for errors\n\tif (substr_count($urlDir, '..') > 0)\n\t{ return '<div class=\"cont error\">You don\\'t have permession to access this folder!</div>'.\"\\n\"; }\n\t\n\tif (!is_dir($dir))\n\t{ return '<div class=\"cont error\">Error, directory does not exist!</div>'.\"\\n\"; }\n\t\n\t// Add the directory to the ignored file paths\n\tforeach ($fileIgnore as $item)\n\t{\n\t\tarray_push($fileIgnore, $origDir.$item);\n\t}\n\t\n\t// Scan and sort\n\t$itemArray = scandir($dir);\n\tnatcasesort($itemArray);\n\t\n\t// Set variables\n\t$folders = '';\n\t$files = '';\n\t$folderCount = 0;\n\t$fileCount = 0;\n\t\n\tforeach ($itemArray as $item)\n\t{\n\t\t// Skip unneeded folders\n\t\tif ($item == '.' || $item == '..') continue;\n\t\tif (in_array($item, $folderIgnore)) continue;\n\t\tif (in_array($dir.$item, $fileIgnore)) continue;\n\t\t\n\t\t// Sanitise the link\n\t\t$link = htmlentities($item);\n\t\t\n\t\tif (is_dir($dir.$item))\n\t\t{\n\t\t\t$folderCount++;\n\t\t\n\t\t\t//Count the number of files and folders that are within the dirctory\n\t\t\t$fileFCount = countFiles($dir.$item, $fileIgnore);\n\t\t\t$folderFCount = countFolders($dir.$item, $folderIgnore);\n\t\t\t\n\t\t\t// If no files it will display empty || If no folders it will show files\n\t\t\t$fileCountStr = ($fileFCount > 0) ? $fileFCount.' file'.(($fileFCount != 1) ? 's' : '') : 'Empty';\n\t\t\t$ItemCountStr = ($folderFCount > 0) ? $folderFCount.' folder'.(($folderFCount != 1) ? 's' : '') : $fileCountStr;\n\t\t\t\n\t\t\t$folders .= '<li><span>'.$ItemCountStr.'</span><a href=\"?d='.$urlDir.$link.'\">'.$item.'</a></li>'.\"\\n\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$fileCount++;\n\t\t\t\n\t\t\t// Grab the files extention and size\n\t\t\t$itemExt = strtolower(substr(strrchr($item, '.'), 1));\n\t\t\t$itemSize = filesize($dir.$item);\n\t\t\t\n\t\t\tif (!in_array($itemExt, array_keys($icons)))\n\t\t\t{\n\t\t\t\t// Add default icon and continue to next item\n\t\t\t\t$files .= '<li class=\"file\"><span>'.formatSize($itemSize).'</span><a href=\"'.$dir.$link.'\">'.$item.'</a></li>'.\"\\n\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// Match extention with its class to show the file icon\n\t\t\tforeach ($icons as $ext => $class)\n\t\t\t{\n\t\t\t\tif ($itemExt == $ext)\n\t\t\t\t{\n\t\t\t\t\t$files .= '<li class=\"'.$class.'\"><span>'.formatSize($itemSize).'</span><a href=\"'.$dir.$link.'\">'.$item.'</a></li>'.\"\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// Grab the URI and make the breadcrumb path with links\n\t$pathParts = explode('/', urldecode($urlDir));\n\t$pathCount = count($pathParts)-1;\n\t$path = ($pathCount == 0) ? '<a href=\"./\" class=\"current\">Home</a> / ' : '<a href=\"./\">Home</a> / ';\n\t$pathLink = '';\n\t\n\tfor ($i = 0; $i < $pathCount; $i++)\n\t{\n\t\t$pathLink .= $pathParts[$i].'/';\n\t\t$path .= ($i == $pathCount-1) ? '<a href=\"?d='.$pathLink.'\" class=\"current\">'.$pathParts[$i].'</a>' : '<a href=\"?d='.$pathLink.'\">'.$pathParts[$i].'</a> / ';\n\t}\n\t\n\t// Make the navigation and file/folder lists\n\t$navi = '<div class=\"cont\">'.\"\\n\".'<div class=\"navi\">'.$path.'</div>'.\"\\n</div>\\n\";\n\t$folders = $folders ? '<div class=\"cont\">'.\"\\n\".'<div class=\"count\"><span>'.$folderCount.' folder(s)</span><a onclick=\"$(\\'.folders li\\').reverseOrder()\">Name</a></div>'.\"\\n\".'<ul class=\"folders\">'.\"\\n\".$folders.\"</ul>\\n</div>\\n\" : '';\n\t$files = $files ? '<div class=\"cont\">'.\"\\n\".'<div class=\"count\"><span>'.$fileCount.' file(s)</span><a onclick=\"$(\\'.files li\\').reverseOrder()\">Name</a></div>'.\"\\n\".'<ul class=\"files\">'.\"\\n\".$files.\"</ul>\\n</div>\\n\" : '';\n\t\n\t// Display them\n\tif ($folders || $files)\n\t{\n\t\treturn $navi.$folders.$files;\n\t}\n\telse\n\t{\n\t\treturn $navi.'<ul class=\"cont empty\"><li class=\"count\"><span>0 file(s)</span>Name</li>'.\"\\n<li>No files or folders to display in here.\\n</li>\\n</ul>\\n\";\n\t}\n}", "title": "" }, { "docid": "3ca814c7def5c56e1e683c9371f2acfc", "score": "0.58479863", "text": "public function __construct($path) {\n\t\t$this->path = $path;\n\t\t$this->handle = opendir($this->path);\n\t}", "title": "" }, { "docid": "04e79fe09f227cda931458708c308cd2", "score": "0.5844384", "text": "public function isDir(){}", "title": "" }, { "docid": "04e79fe09f227cda931458708c308cd2", "score": "0.5842574", "text": "public function isDir(){}", "title": "" }, { "docid": "f7b4b9f390496cc5502ab8fba34ee60a", "score": "0.5835339", "text": "function get_files($path){\t\r\n\t$content = array();\r\n\tif(is_dir($path)) :\r\n\t\tif($dir = opendir($path)) :\r\n\t\t\twhile(false !== ($file = readdir($dir))) :\r\n\t\t\t\tif($file != '.' && $file != '..' && $file != 'index.html') :\r\n\t\t\t\t\t$content[] = $file;\r\n\t\t\t\tendif;\r\n\t\t\tendwhile;\r\n\t\t\tclosedir($dir);\r\n\t\tendif;\r\n\tendif;\r\n\treturn $content;\r\n}", "title": "" }, { "docid": "e9cba153b97df6dd630705911bc591e8", "score": "0.5806077", "text": "private function _readdir()\n\t{\t\n\t\t$widgets = array(); // holding value\n\t\tif($handle = opendir($this->path))\n\t\t{\n\t\t\twhile(false !== ($entry = readdir($handle)))\n\t\t\t{\n\t\t\t\tif($entry != '.' && $entry != '..' && $entry != 'index.html')\n\t\t\t\t{\n\t\t\t\t\t$widgets[] = $entry;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tclosedir($handle);\n\t\t}\n\t\t\n\t\tforeach($widgets as $key => $value)\n\t\t{\n\t\t\t$this->_parseWidget($value);\n\t\t}\n\t}", "title": "" }, { "docid": "c7b705acf0d1c1c80ad1976716c78d8f", "score": "0.58030105", "text": "public function folders();", "title": "" }, { "docid": "d9aee217d25c0efacfc2b82ec5b7856e", "score": "0.5767633", "text": "abstract protected function getBasedir();", "title": "" }, { "docid": "e939b306b6d4bc8ed98a6b738e802d05", "score": "0.57591385", "text": "function find_all_files($file_directory) {\r\n\r\n $file_list = array();\r\n\r\n if ( $directory_handle = opendir($file_directory) ) {\r\n while ( false !== ( $file = readdir($directory_handle) ) ) {\r\n\r\n if ( is_file(\"{$file_directory}/{$file}\") ) {\r\n $file_list[] = $file;\r\n }\r\n }\r\n closedir($directory_handle);\r\n }\r\n\r\n return $file_list;\r\n}", "title": "" }, { "docid": "9dec2976a1fd1cfb21265080dae6eddd", "score": "0.5741883", "text": "abstract protected function _listing($path, $directory);", "title": "" }, { "docid": "2314867dfcd9e3660f588938e497b1f8", "score": "0.5724264", "text": "public function getCurrentDirectory();", "title": "" }, { "docid": "aa43fe62f9dc6f500cbf53a19e5298b2", "score": "0.5716476", "text": "public function dirList(){\n\n\t\t$d = dir($this->dir);\n\n\t\twhile (FALSE !== ($entry = $d->read())) {\n\n\t\t\tif($entry === '.' || $entry === '..'){ continue; }\n\n\t\t\t/* this would hide protected files from bigmonster\n\t\t\t might be useful later\n\t\t\t if($this->nameFilter()){\t\t\n\t\t\t }\n\t\t\t*/\n\t\t\tarray_push($this->dirAry,$entry);\n\t\t}\n\n\t\t$d->close();\n\n\t\tif(empty($this->dirAry)){\n\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "0b02313b196d4b5e26318d365bf9a9cf", "score": "0.5697247", "text": "function directoryHome()\n{\n\tglobal $files;\n\n\t$basePath = getBasePath();\n\t$currentPath = '/';\n\techo $files->buildDirectoryList($basePath, $currentPath, $_SESSION['courseMsg']);\n}", "title": "" }, { "docid": "8f586657ebeaf9954649e3e26c9166e6", "score": "0.5684495", "text": "function readFiles($path = '') {\n $opendir = addslashes($path);\n $dir = @opendir($opendir);\n if (!$dir) {\n return;\n }\n while (($file = @readdir($dir)) !== false) {\n $filePath = $opendir . $file;\n if (is_dir($filePath) || $file == \".\" || $file == \"..\") {\n continue;\n }\n $file_type = $this->getFileType($filePath);\n // managing the data by determined type\n if ($file_type == \"card\") { // card file\n $res = $this->readCardData($filePath);\n } else if ($file_type == \"pic\") { // pic file\n $res = $this->readPicData($filePath);\n } else { // some unknown file, that we will just skip\n $res = true;\n }\n // moving all of the already handled files to imported subfolder\n $filePathImported = $opendir . \"imported/\" . $file;\n if ($res && rename($filePath, $filePathImported)) {\n @chmod($filePathImported, 0666);\n }\n }\n }", "title": "" }, { "docid": "ed370296e1f1d22b89525a2c179df8b7", "score": "0.5683571", "text": "function dir($path){\n // return numeric array starting from 0 with directory list\n return($this->get($path,OWNET_MSG_DIR_ALL,false,false)); // return get with right flags\n }", "title": "" }, { "docid": "1dc1bda6c489936ed2154b2d8d0dcf05", "score": "0.56506485", "text": "public function getDataDir();", "title": "" }, { "docid": "3f922f11ecffce440e9a50f3337f52f2", "score": "0.5647194", "text": "function scan($dir, $relv_dir){\r\n $files = array();\r\n // Is there actually such a folder/file?\r\n if(file_exists($dir)){\r\n foreach(scandir($dir) as $f) {\r\n if(!$f || $f[0] == '.') {\r\n continue; // Ignore hidden files\r\n }\r\n if(is_dir($dir . '/' . $f)) {\r\n continue; // Current folder only\r\n }\r\n if(preg_match('/\\.(gif|jpe?g|png|svg|bmp|)$/i', $f)) {\r\n array_push($files, '\"'.$relv_dir.$f.'\"');\r\n }\r\n }\r\n }\r\n return $files;\r\n}", "title": "" }, { "docid": "496c2055444f6f3e1954d18bf528e66d", "score": "0.56458336", "text": "public function dir_readdir() {\n if (false === $this->resource) {\n return false;\n }\n\n return readdir($this->resource);\n }", "title": "" }, { "docid": "c430a65834c82020f9cdc583db72586a", "score": "0.5643033", "text": "function liste($root,$dir){\n\tforeach ($dir as $rep) {\n\t\tif (is_dir($root.$rep)){\n\t\t\techo \"<span class='folder'>&#9654;</span> $rep<br/>\";\n\t\t}else{\n\t\t\techo \"- <span class='select'>$rep</span><br/>\";\n\t\t}\t\n\t}\n}", "title": "" }, { "docid": "49b5a0890e9d99d10797bcb6c965ac8f", "score": "0.56150585", "text": "public abstract function is_dir($dir);", "title": "" }, { "docid": "3e104829a5b5bbb79732ce6c68e723b4", "score": "0.5611207", "text": "function getDirectory($path){\r\n\t$files = array();\r\n\t$ignore = array( 'cgi-bin', '.', '..' );\r\n\t$dir = @opendir($path);\r\n\tif ($dir == \"\"){\r\n\t\techo \"* diretório inexistente *\";\r\n\t\texit;\r\n\t}\r\n\twhile (($file = readdir($dir)) !== false){\r\n\t\tif (!in_array($file, $ignore)){\r\n\t\t\tif (is_dir(\"$path/$file\")){\r\n\t\t\t\t$files[utf8_encode($file)] = getDirectory(\"$path/$file\");\r\n\t\t\t}else{\r\n\t\t\t\t$files[] = utf8_encode($file);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn $files;\r\n\tclosedir($dir);\r\n}", "title": "" }, { "docid": "568b30993b711af8ee978e8863e0dd1d", "score": "0.5588478", "text": "function readDirektory($path, $empty=\"\") {\r\n\t\t$filename = array();\r\n\t\t\t\t\r\n\t\tif (empty($empty)) {\r\n\t\t\tif ($handle = opendir($path)) {\t\t\r\n\t\t\t\twhile (false !== ($entry = readdir($handle))) {\r\n\t\t\t\t if ($entry != '.' && $entry != '..' && $entry != '.svn') {\t\t\t \t\t\r\n\t\t\t\t\t\t$filename[] = $entry;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\r\n\t\t\t\tclosedir($handle);\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t$x = $filename;\r\n\t\t} else {\r\n\t\t\tif ($handle = opendir($path)) {\t\t\r\n\t\t\t\twhile (false !== ($entry = readdir($handle))) {\r\n\t\t\t\t if ($entry != '.' && $entry != '..' && $entry != '.svn') {\t\t\t \t\t\r\n\t\t\t\t\t\tunlink($path.\"/\".$entry);\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\r\n\t\t\t\tclosedir($handle);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$x = \"\";\r\n\t\t}\r\n\t\t\r\n\t\treturn $x;\r\n\t}", "title": "" }, { "docid": "1d7beb8c2c1a6ce829c6454549e21ada", "score": "0.55748963", "text": "public function ls($dir = '')\n {\n $dir = ($dir == '' ? getcwd() : $dir);\n $this->errorHandler->start();\n if (($files = $this->driver->scandir($dir, 0, $this->resource)) !== false) {\n\n return $files;\n }\n $this->errorHandler->stop();\n\n return false;\n }", "title": "" }, { "docid": "c2becc9e61d77726f41cec788bbe5ce6", "score": "0.5574292", "text": "function datadir_getextdir ($instance) {}", "title": "" }, { "docid": "598004bcd055d53dc1cda37778a5c4a2", "score": "0.5568453", "text": "function svn_fs_dir_entries($fsroot, $path){}", "title": "" }, { "docid": "ec0d7ee6facb7a4d6d3901d02655acca", "score": "0.55605114", "text": "function yiw_list_files_into( $folder )\n{\n\t$files = array();\n\t\n if ( file_exists($folder) && $handle = opendir($folder) ) { \n while ( false !== ($file = readdir($handle ) ) ) { \n\t if ( $file == \"..\" || $file == \".\" || $file[0] == '.' || $file[0] == 'error_log' ) {\n\t continue;\n\t }\n\n $files[] = $file;\n }\n \n closedir($handle); \n } \n \n return $files;\n}", "title": "" }, { "docid": "92f096467841fbc9ca34e7febd44ba93", "score": "0.55590224", "text": "public function isDir($filename);", "title": "" }, { "docid": "4c3dcb91cfda2ee479b641d2823d7181", "score": "0.5550239", "text": "function ls($path) {\n run(\"ls -ldh \" . escapeshellarg($path));\n}", "title": "" }, { "docid": "fd29615ecf434e376ea0c5b51be5bdaf", "score": "0.5542425", "text": "public function Dir($path = false){ return dirname(__FILE__) . (is_string($path) ? '/' . $path: '' ) . '/' ; }", "title": "" }, { "docid": "045c9f009dc8acf5f3b009349af7cf82", "score": "0.5540432", "text": "private function folder_contents($full_dir, $omit = null) \n\t { \n\t\t$retval = array(); \t\n\t\t# add trailing slash if missing \t\n\t\tif(substr($full_dir, -1) != \"/\")\n\t\t\t$full_dir .= \"/\"; \t\n\t\t# open pointer to directory and read list of files \n\t\t$d = @dir($full_dir) or die(\"show_dir_contents: Failed opening directory $full_dir\");\n\t\t\n\t\t$stock_dir = $this->assets->assets_dir();\n\t\t$short_dir = str_replace(\"$stock_dir/\", '', $full_dir);\n\t\t$short_dir = str_replace('/', ':', $short_dir);\n\t\t\n\t\twhile(false !== ($entry = $d->read())) \n\t\t{\n\t\t\t# skip hidden files and any omissions\n\t\t\tif( ($entry[0] == \".\" ) OR (! empty($omit) AND $entry == \"$omit\" ) )\n\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\tif(is_dir(\"$full_dir$entry\")) \n\t\t\t\t$retval[\"$short_dir$entry\"] = \"folder|$entry\"; \n\t\t\telse if( is_readable(\"$full_dir$entry\") && $entry != 'Thumbs.db' ) \n\t\t\t\t$retval[\"$short_dir$entry\"] = \"file|$entry\";\t \n\t\t } \n\t\t $d->close(); \n\t\t asort($retval);\n\t\t return $retval; \n\t}", "title": "" }, { "docid": "82ca07202a6f8594d5289cd8ad63af12", "score": "0.55368745", "text": "function directorylist($dir, $recurse=false)\n {\n \n if (!file_exists($dir)) { return false; }\n\n// array to hold return value\n\n $retval = array();\n\n// add trailing slash if missing\n\n if(substr($dir, -1) != \"/\") $dir .= \"/\";\n\n// open pointer to directory and read list of files\n\n $d = @dir($dir) or die();\n while(false !== ($entry = $d->read())) {\n\n// skip hidden files\n\n if($entry[0] == '.') continue;\n if(is_dir(\"$dir$entry\")) {\n $retval[] = array(\n \"name\" => \"$dir$entry/\",\n \"type\" => filetype(\"$dir$entry\"),\n \"size\" => 0,\n \"lastmod\" => filemtime(\"$dir$entry\")\n );\n\n if($recurse && is_readable(\"$dir$entry/\")) {\n $retval = array_merge($retval, directorylist(\"$dir$entry/\", true));\n }\n } elseif(is_readable(\"$dir$entry\")) {\n $retval[] = array(\n \"name\" => \"$dir$entry\",\n \"filename\" => \"$entry\",\n \"size\" => filesize(\"$dir$entry\"),\n \"lastmod\" => filemtime(\"$dir$entry\")\n );\n }\n }\n $d -> close();\n\n return $retval;\n }", "title": "" }, { "docid": "4dca6bf19ca54a1030941b8376d86651", "score": "0.5536776", "text": "protected static function localScandir($dir)\n {\n // PHP function scandir() is not work well in specific environment. I dont know why.\n // ref. https://github.com/Studio-42/elFinder/issues/1248\n $files = array();\n if ($dh = opendir($dir)) {\n while (false !== ($file = readdir($dh))) {\n if ($file !== '.' && $file !== '..') {\n $files[] = $file;\n }\n }\n closedir($dh);\n } else {\n throw new Exception('Can not open local directory.');\n }\n return $files;\n }", "title": "" }, { "docid": "f25b271a5231a0ea83cd4acad20bc2ce", "score": "0.55308837", "text": "public function dir_rewinddir()\n{\n$this->position=0;\n}", "title": "" }, { "docid": "d403f55189b692d0209f45838b9565c1", "score": "0.5526197", "text": "function get_flist()\n{\n\t$TrackDir = opendir(\"./tt\");\n\n\n\twhile ($file = readdir($TrackDir)) \n\t\t{ \n\t\tif ($file == \".\" || $file == \"..\") { } \n\t\t\t else {\n\t\t\t\t\tif(!empty($flist))\n\t\t\t\t\t{\n\t\t\t\t\t\t$flist = $flist.','.$file;\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$flist = $file;\n\t\t\t\t\t}\n\n\n }\n } \n\tclosedir($TrackDir);\n\techo 'file list obtained';\n\treturn $flist;\n}", "title": "" }, { "docid": "67138bec368b7c034e4c05b8c8158aa6", "score": "0.55161154", "text": "function GetFileDir($php_self) { \n\t\t$filename2 = \"\";\n\t\t$filename = explode(\"/\", $php_self);\n\t\tfor( $i = 0; $i < (count($filename) - 1); ++$i ) { \n\t\t\t$filename2 .= $filename[$i].'/'; \n\t\t} \n\t\treturn $filename2; \n\t}", "title": "" }, { "docid": "f5f102c94a2d73af7e52b62612ff1be2", "score": "0.5509951", "text": "function read_directory( $d = null )\n {\n $fullpath = $this->rootdir;\n\n /*\n * if we have a relative dir, append that to the\n * full path\n */\n if ( $d ) {\n\n $fullpath = concat_path ( $fullpath, $d );\n $this->relative_dir = $d;\n\n }\n\n // Start reading the directory\n $dh = opendir( $fullpath );\n if ($dh !== null) {\n\n while (false !== ( $e = readdir($dh) )) {\n\n // Ignore the current and parent directories~\n if ($e === '.' || $e === '..') {\n continue;\n }\n\n /*\n * Ignore files that end in a \"~\".\n *\n * Todo: This can and probably should be made more\n * generic\n */\n if ( substr( $e, -1 ) === '~' ||\n substr( $e, 0 ) === '#' ) {\n continue;\n }\n\n $relpath = concat_path( $d, $e );\n $full = concat_path( $fullpath, $e );\n \n if (is_dir( $full )) {\n\n $this->directories[] = $e;\n\n } else if ( is_file ( $full ) ) {\n\n $this->files[] = $e;\n\n }\n }\n \n closedir ($dh);\n }\n }", "title": "" }, { "docid": "71444987009e4875b8ae5abcbce32f0f", "score": "0.55046964", "text": "abstract function getSourceDir();", "title": "" }, { "docid": "ae2a9b09bec2520d1d008b96ccacb5bc", "score": "0.55019474", "text": "function ListFolder($path)\n {\n //using the opendir function\n $dir_handle = @opendir($path) or die(\"Unable to open $path\");\n\n //Leave only the lastest folder name\n $dirname = end(explode(\"/\", $path));\n\n //display the target folder.\n echo (\"<li>$dirname\\n\");\n echo \"<ul>\\n\";\n while (false !== ($file = readdir($dir_handle)))\n {\n if($file!=\".\" && $file!=\"..\")\n {\n if (is_dir($path.\"/\".$file))\n {\n //Display a list of sub folders.\n ListFolder($path.\"/\".$file);\n }\n else\n {\n //Display a list of files.\n echo \"<li>$file</li>\";\n }\n }\n }\n echo \"</ul>\\n\";\n echo \"</li>\\n\";\n\n //closing the directory\n closedir($dir_handle);\n }", "title": "" }, { "docid": "5db73df11ccacfea59d579fe65e5106d", "score": "0.5500516", "text": "function getDirectories($dir) {\r\n\t// Open a known directory, and proceed to read its contents\r\n\t// Returns only directories\r\n\t$files = array();\r\n\tif (is_dir($dir)) {\r\n\t if ($dh = opendir($dir)) {\r\n\t while (($file = readdir($dh)) !== false) {\r\n\t if ($file != '..' && $file != '.' && is_dir($dir . \"/\" . $file)) {\r\n\t\t\tarray_push($files, $file);\r\n\t\t }\r\n\t }\r\n\t closedir($dh);\r\n\t }\r\n\t}\r\n\treturn $files;\r\n}", "title": "" }, { "docid": "ae7b44707856b65a59742678eb7a8ea0", "score": "0.5498293", "text": "final public function dir()\n {\n return $this->doDir();\n }", "title": "" }, { "docid": "e6fbad3088799cfe2786733ef421ba5d", "score": "0.54945445", "text": "function fileinode($filename){}", "title": "" }, { "docid": "869f16a9ce30cd8e9e900c605304ac30", "score": "0.54938966", "text": "function list_dirs($dirPath) {\r\n \r\n $dirs = array();\r\n\r\n // open the specified directory and check if it's opened successfully \r\n if ($handle = opendir($dirPath)) {\r\n \r\n // keep reading the directory entries 'til the end \r\n while (false !== ($file = readdir($handle))) {\r\n \r\n // just skip the reference to current and parent directory \r\n if ($file != \".\" && $file != \"..\") {\r\n if (is_dir(\"$dirPath/$file\")) {\r\n // found a directory, do something with it? \r\n array_push($dirs, \"$dirPath/$file\");\r\n }\r\n }\r\n }\r\n \r\n // ALWAYS remember to close what you opened \r\n closedir($handle);\r\n }\r\n \r\n return $dirs;\r\n}", "title": "" }, { "docid": "564570977c07a03504c29fa33db815ec", "score": "0.5493262", "text": "public function isDir(): bool;", "title": "" }, { "docid": "247094b567102b1f402e1f11e57d5351", "score": "0.54922694", "text": "private function getDirectory($path) {\n\t\treturn scandir($path);\n\t}", "title": "" }, { "docid": "c76a3bb1f1e2a43e4945379d8deae54d", "score": "0.5490153", "text": "abstract protected function _dirname($path);", "title": "" }, { "docid": "210d2af3480b4eed8c1d9c8a248dae73", "score": "0.5459752", "text": "function existing_reports() \n\t{\n\t\t//create an array to hold directory list\n\t\t$results = array();\n\n\t\t//create a handler for the directory\n\t\t$handler = opendir($_SERVER['DOCUMENT_ROOT'].$this->path);\n\n\t\t//keep going until all files in directory have been read\n\t\twhile ($file = readdir($handler)) \n\t\t{\n\n\t\t\t// if $file isn't this directory or its parent, add it to the results array\n\t\t\tif ($file != '.' && $file != '..')\n\t\t\t{\n\t\t\t\t$results[$file] = str_replace(\".php\", \"\", $file);\n\t\t\t}\n\t\t}\n\n\t\tclosedir($handler);\n\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "ccfcd6d1b9df3c719c2e40edbe813ecb", "score": "0.54589415", "text": "function scan_Dir($dir,$filtre=false,$recurse=false,$full_nom=false,$echo=false) {\n\t $arrfiles = array();\n\t \n\t $onsom=getcwd();\n\t if (is_dir($dir)) {\n\t\t if ($handle = opendir($dir)) {\n\t\t\t chdir($dir);\n\t\t\t while (false !== ($file = readdir($handle))) {\n\t\t\t\t if ($file != \".\" && $file != \"..\") {\n\t\t\t\t\t if (is_dir($file)&&$recurse) {\n\t\t\t\t\t\t $arr = scan_Dir($file,$filtre,$recurse,$full_nom);\n\t\t\t\t\t\t foreach ($arr as $value) {\n\t\t\t\t\t\t\t if ($full_nom) $arrfiles[] = $p=$dir.\"/\".$value;\n\t\t\t\t\t\t\t else $arrfiles[] = $p=$value;\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t if ($echo) echo \"> \".$p.\" <br/>\";\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t }\n\t\t\t\t\t } else {\n\t\t\t\t\t\t\t if ($this->filtre_file($file,$filtre))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//$arrfiles[] = $dir.\"/\".$file;\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (!(is_dir($file))||($recurse)) {\n\t\t\t\t\t\t\t\t\t\tif ($full_nom) $arrfiles[] =$p= $dir.\"/\".$file;\n\t\t\t\t\t\t\t\t\t\telse $arrfiles[] = $p=$file; \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif ($echo) echo \"> \".$p.\" <br/>\";\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t }\n\t\t\t chdir(\"../\");\n\t\t }\n\t\t closedir($handle);\n\t }\n\t chdir($onsom);\n\t return $arrfiles;\n\t}", "title": "" }, { "docid": "9615ec484098153f2f3b8e002e1ce54e", "score": "0.54531574", "text": "function gallery_carousel($folder) {\n $directory=\"./assets/images/gallery/$folder\";\n $dir=opendir($directory);\n \n while($file_name=readdir($dir)) {\n if(($file_name!=\".\")&&($file_name!=\"..\")) {\n $img = \"assets/images/gallery/$folder/\".$file_name;\n echo \"<div class='item'>\n <img src=$img>\n </div>\";\n echo \"\\n\";\n }\n } \n closedir($dir);\n }", "title": "" }, { "docid": "6811bb22ca517806ce816784ac27e1b2", "score": "0.5450349", "text": "function get_filelist($dir) {\n global $ignoreDirs;\n $ignoreArr = explode('|', $ignoreDirs);\n \n $path = '';\n $toResolve = array($dir);\n while ($toResolve) {\n $thisDir = array_pop($toResolve);\n if ($dirContent = scandir($thisDir)) {\n foreach ($dirContent As $content){\n if (!in_array($content, $ignoreArr)) { // check paths, skiping ignored dirs\n $thisFile = \"$thisDir/$content\";\n if (is_file($thisFile)) {\n $path[$thisFile] = md5_file($thisFile);\n scan_file($thisFile);\n } else {\n $toResolve[] = $thisFile;\n }\n }\n }\n }\n }\n return $path; \n }", "title": "" }, { "docid": "eb32f59dcc25161533d26af43d6f0c49", "score": "0.54498816", "text": "function read_files($path)\n{\n\t$handle = @opendir($path) or die(\"Unable to open $path\");\n\t$file_arr = array();\n\twhile ($file = readdir($handle)) {\n\t\t$file_arr[] = $file;\n\t}\n\treturn $file_arr;\n\tclosedir($handle);\n}", "title": "" }, { "docid": "1f51ccfb4b2b6b58b7c273f8e6e19297", "score": "0.5443833", "text": "protected function dirList($dir)\n {\n $dir = realpath($dir);\n $file_list = '';\n $stack[] = $dir;\n\n while ($stack) {\n $current_dir = array_pop($stack);\n if ($dh = opendir($current_dir)) {\n while ( ($file = readdir($dh)) !== false ) {\n if ($file{0} =='.') continue;\n $current_file = $current_dir . '/' . $file;\n if (is_file($current_file)) {\n $file_list[] = $current_dir . '/' . $file;\n } else if (is_dir($current_file)) {\n $stack[] = $current_file;\n }\n }\n }\n }\n return $file_list;\n }\n\n /**\n * Internal function to get the filesize\n * of a file. Workaround for files >2GB.\n *\n * @param string path to the file\n * @return int the filesize\n */\n protected function filesize($file)\n {\n $size = @filesize($file);\n if ($size == 0) {\n if (PHP_OS != 'Linux') return false;\n $size = exec('du -b ' . escapeshellarg($file));\n }\n return $size;\n }\n\n /**\n * Internal function to open a file.\n * Workaround for files >2GB using popen\n *\n * @param string path to the file\n * @return bool\n * @throws File_Bittorrent2_Exception if opening file fails or is larger than 2GB (on Windows only)\n */\n protected function openFile($file)\n {\n $fsize = $this->filesize($file);\n if ($fsize <= 2*1024*1024*1024) {\n if (!$this->fp = fopen($file, 'r')) {\n\t\t\t\tthrow new File_Bittorrent2_Exception('Failed to open \\'' . $file . '\\'', File_Bittorrent2_Exception::source);\n }\n $this->fopen = true;\n } else {\n if (PHP_OS != 'Linux') {\n throw new File_Bittorrent2_Exception('File size is greater than 2GB. This is only supported under Linux.', File_Bittorrent2_Exception::make);\n }\n $this->fp = popen('cat ' . escapeshellarg($file), 'r');\n $this->fopen = false;\n }\n return true;\n }\n\n /**\n * Internal function to close a file pointer\n */\n protected function closeFile()\n {\n if ($this->fopen) {\n fclose($this->fp);\n } else {\n pclose($this->fp);\n }\n }\n\t\n\t/**\n\t* Function to set the name for\n\t* the .torrent file\n\t*\n\t* @param string name\n\t* @return bool\n\t*/\n\tfunction setName($name)\n\t{\n\t\t$this->name = strval($name);\n\t\treturn true;\n\t}\n\n\t/**\n\t* Function to add a specific list of files, \n\t* pass blank to the constructor then call this function\n\t* \n\t* @param array list of filepaths to add;\n\t* @param string folder containing files\n\t* @return bool\n\t*/\n\tfunction addFiles($filelist,$dir)\n\t{\n\t\t$this->is_dir = true;\n\t\t$this->is_multifile = true;\n\t\t$this->name = basename($dir);\n\n\t\tsort($filelist);\n\n\t\tforeach ($filelist as $file) {\n\t\t\t$filedata = $this->addFile($dir.$file);\n\t\t\tif ($filedata !== false) {\n\t\t\t\t$filedata['path'] = array();\n\t\t\t\t$filedata['path'][] = basename($file);\n\t\t\t\t$dirname = dirname($dir.$file);\n\t\t\t\twhile (basename($dirname) != $this->name) {\n\t\t\t\t\t$filedata['path'][] = basename($dirname);\n\t\t\t\t\t$dirname = dirname($dirname);\n\t\t\t\t}\n\t\t\t\t$filedata['path'] = array_reverse($filedata['path'], false);\n\t\t\t\t$this->files[] = $filedata;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}", "title": "" }, { "docid": "dbf42f641ccab28d0b9123f554e65598", "score": "0.5442292", "text": "public function getOpenBasedir() {\n\t\t$ret = array('ok' => 0, 'value' => implode('<br/>', $tthis->openBasedir()), 'descr' => 'open basedir restrictions');\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "50130c75ac0d2d525f4929d9c2cd99e0", "score": "0.54409623", "text": "function findInfo($dir, $readwrite){\n $docs = listDir($dir);\n if(in_array(\"components.data\", $docs)){\n\treturn fopen($dir . \"/components.data\", $readwrite);\n }\n else\n {\n\treturn false;\n }\n}", "title": "" }, { "docid": "835a77b105c45d4742088839dc898103", "score": "0.54367226", "text": "function readDirectory($path, $directoriesOnly=FALSE, $filesOnly=FALSE, $recursive=FALSE, $extensions=array(), $appendPath=FALSE){\r\r\n if($directoriesOnly && $filesOnly) {\r\r\n $directoriesOnly = FALSE;\r\r\n $filesOnly = FALSE;\r\r\n }\r\r\n\r\r\n if (!is_dir($path))\r\r\n return FALSE;\r\r\n\r\r\n $dir = dir($path);\r\r\n while ($file = $dir->read()){\r\r\n $fullpath = $path . \"/\" . $file;\r\r\n if ($directoriesOnly && !$filesOnly && @is_dir($fullpath) && $file != \".\" && $file != \"..\" && $file != \"CVS\") {\r\r\n\tif($appendPath)\r\r\n\t $directory[] = $fullpath;\r\r\n\telse\r\r\n\t $directory[] = $file;\r\r\n } else if(!$directoriesOnly && $filesOnly && !is_dir($fullpath) && $file != \"CVS\" && $file != \".\" && $file != \"..\") {\r\r\n\t//\tif (is_dir($path.$file))\r\r\n\tif(is_array($extensions) && count($extensions) > 0) {\r\r\n\t $extTest = explode(\".\", $file);\r\r\n\t if(in_array($extTest[1], $extensions)) {\r\r\n\t if($appendPath)\r\r\n\t $directory[] = $fullpath;\r\r\n\t else\r\r\n\t $directory[] = $file;\r\r\n\t }\r\r\n\t} else if($appendPath)\r\r\n\t $directory[] = $fullpath;\r\r\n\telse\r\r\n\t $directory[] = $file;\r\r\n } else if(!$directoriesOnly && !$filesOnly && $file != \".\" && $file != \"..\" && $file != \"CVS\") {\r\r\n\tif(!is_dir($path . $file) && is_array($extensions) && count($extensions) > 0) {\r\r\n\t $extTest = explode(\".\", $file);\r\r\n\t if(in_array($extTest[1], $extensions)) {\r\r\n\t if($appendPath)\r\r\n\t $directory[] = $fullpath;\r\r\n\t else\r\r\n\t $directory[] = $file;\r\r\n\t } else if($appendPath)\r\r\n\t $directory[] = $fullpath;\r\r\n\t else\r\r\n\t $directory[] = $file;\r\r\n\t} else {\r\r\n\t if($appendPath)\r\r\n\t $directory[] = $fullpath;\r\r\n\t else\r\r\n\t $directory[] = $file;\r\r\n\t}\r\r\n }\r\r\n\r\r\n if($recursive && is_dir($fullpath) && $file != \"CVS\" && $file != \".\" && $file != \"..\")\r\r\n\t$directory = array_merge($directory, PHPWS_File::readDirectory($fullpath . \"/\", $directoriesOnly, $filesOnly, $recursive, $extensions, $appendPath));\r\r\n }\r\r\n $dir->close();\r\r\n\r\r\n if (isset($directory))\r\r\n return $directory;\r\r\n else\r\r\n return NULL;\r\r\n }", "title": "" }, { "docid": "a30e33b82ace8401ebc3dd11e8522982", "score": "0.5434643", "text": "public function openBasedir() {\n\t\t$var = ini_get('open_basedir');\n\t\tif (strpos($var, ':') !== false) {\n\t\t\t$paths = explode(':', $var);\n\t\t} else {\n\t\t\t$paths = array();\n\t\t}\n\t\treturn $paths;\n\t}", "title": "" }, { "docid": "97012d24a81580cf5995112feaf1f306", "score": "0.54287475", "text": "function dirContents($path) {\r\n\t$arr = scandir($path);\r\n\t\r\n\t// create an array with added isdir property\r\n\t$contents = [];\r\n\tforeach($arr as $name) {\r\n\t\t$isdir = is_dir($path.\"/\".$name);\r\n\t\t$item = [\r\n\t\t\t\"isdir\" => $isdir, \r\n\t\t\t\"name\" => $name\r\n\t\t];\r\n\t\tarray_push($contents, $item);\r\n\t}\r\n\t\r\n\treturn $contents;\r\n}", "title": "" }, { "docid": "3450a38d57a8327a7ec6858ce142d438", "score": "0.5421703", "text": "private function fetchFiles()\n\t{\n\t\tif ($this->FileHandler->checkDir($this->dir))\n\t\t{\n\t\t\t# Fetch Normal Files\n\t\t\t# Fetch Hidden Files\n\t\t\t# Check Results\n\t\t\t$resNF = $this->FileHandler->fetchFiles($this->dir, '*');\n $resHF = $this->FileHandler->fetchFiles($this->dir, '.[A-Za-z0-9]*' );\n\n\n\t\t\tif (!$resNF && !$resHF)\n\t\t\t{\n\t\t\t\t$this->ErrorHandler->setErrors('No Files In Directory');\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->ErrorHandler->setErrors('Non-Existant Directory');\n\t\t}\n\t}", "title": "" }, { "docid": "955d4ab0dfb98852abdd968c1b619564", "score": "0.54196435", "text": "private function mdl_get_curdiritems() \n {\n // GET DATA ARRAY = items in folder TO D I S P L A Y\n /* $this->data[0]['sizedir'] = 0; //summary rec.cols are in arr.index=0\n $this->data[0]['user_info'] = '' ;\n $this->data[0]['group_info'] = '' ;\n $this->data[0]['dateymd'] = '' ;\n $this->data[0]['datedmy'] = '' ;\n $this->data[0]['mode'] = 'd' ;\n $this->data[0]['mode_type'] = '' ;\n $this->data[0]['size'] = 0 ;\n $this->data[0]['itmname'] = 'summary' ;\n $this->data[0]['itmtype'] = 'summary' ; */\n\n self::$sizedir = 0 ;\n $itm_ordno = 0; \n foreach (new \\DirectoryIterator(self::$getcmd_or_wsrootpath) as $flediriter)\n {\n //$this->data[$itm_ordno]['flediriter'] = $flediriter ;\n // translate uid into user name\n if (function_exists('posix_getpwuid')) {\n $this->data[$itm_ordno]['user_info'] = posix_getpwuid($flediriter->getOwner());\n } else {\n $this->data[$itm_ordno]['user_info'] = $flediriter->getOwner();\n }\n // translate gid into group name\n if (function_exists('posix_getgrid')) {\n $this->data[$itm_ordno]['group_info'] = $flediriter->getGroup();\n } else {\n $this->data[$itm_ordno]['group_info'] = $flediriter->getGroup();\n }\n // format f o r readability 'd.m.Y H:i' 'M d H:i'\n $this->data[$itm_ordno]['dateymd'] = $date = date('Ymd H:i', $flediriter->getMTime());\n $this->data[$itm_ordno]['datedmy'] = date('d.m.Y H:i', $flediriter->getMTime());\n // translate the octal m o d e into a readable string\n $this->data[$itm_ordno]['mode'] = $mode = self::mode_string(\n $flediriter->getPerms(), self::$mode_type_map\n );\n $this->data[$itm_ordno]['mode_type'] = $mode_type = substr($mode,0,1);\n \n $this->data[$itm_ordno]['itmname'] = $itmname = $flediriter->getFilename();\n\n\n $itmtype = 'fle';\n if ($itmname == '..') {$itmtype = 'aupdir';} //prefixed with a for usort\n else if ($itmname == '.') {$itmtype = 'curdir';}\n else if ($flediriter->isDir()) { $itmtype = 'dir'; // which can be link\n if ($mode_type == 'l') {$itmtype = 'link';}\n }\n $this->data[$itm_ordno]['itmtype'] = $itmtype ;\n \n // C R E A T E S O R T I T E M\n $this->data[$itm_ordno]['sort_typ_name'] = $itmtype . $itmname ;\n $this->data[$itm_ordno]['sort_typ_date'] = $itmtype . $date ;\n \n if (($mode_type == 'c') or ($mode_type == 'b')) {\n // if it's a block or character device, p r i n t out the major and minor device type instead of the file size\n $statInfo = lstat($flediriter->getPathname());\n $major = ($statInfo['rdev'] >> 8) & 0xff;\n $minor = $statInfo['rdev'] & 0xff;\n $this->data[$itm_ordno]['size'] = sprintf('%3u, %3u',$major,$minor);\n } else {\n \n $this->data[$itm_ordno]['size'] = $flediriter->getSize();\n \n // S U M M A R I Z E\n if ($itmtype == 'fle') {\n self::$sizedir += $this->data[$itm_ordno]['size'] ;\n //print '<h3>' . $this->data[$itm_ordno]['itmname'].', '.$this->data[$itm_ordno]['size'] .'<h3>';\n }\n }\n\n $itm_ordno++;\n } //e n d GET DATA ARRAY TO D I S P L A Y\n\n\n\n // S O R T D A T A A R R A Y\n if (!isset($_GET['s'])) {$sort_by = 'sort_typ_name' ; self::$url_sort_param='' ;}\n else {\n switch($_GET['s']) { \n case '2': $sort_by = 'sort_typ_date' ; self::$url_sort_param='&s=2' ; break;\n default: $sort_by = 'sort_typ_name' ; self::$url_sort_param='' ; break; \n } \n } ;\n usort($this->data, $this->build_sorter($sort_by));\n //usort($this->data, $this->build_sorter('sort_typ_name'));\n //usort($this->data, $this->build_sorter('sort_typ_date'));\n\n }", "title": "" }, { "docid": "030756998af09382480cd02fc84a130e", "score": "0.541956", "text": "public function isDir()\n {\n }", "title": "" }, { "docid": "a5c3d66a6cb091b4e0b3d02eb5dc6dc2", "score": "0.54173404", "text": "function getDirContents2($parentDIr, $appName = APP_NAME){\n\t\t$rii = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($parentDIr));\n\t\t$files = array();\n\t\tforeach ($rii as $file) {\n\t\t if ($file->isDir()){ \n\t\t continue;\n\t\t }\n\t\t \n\t\t $pathName = $file->getPathname();\n\n\t\t $pecah = explode(\".\", $pathName);\n\t\t $pecah_level = explode($appName, $pathName);\n\t\t $get_level = count(array_filter(explode(\"\\\\\",end($pecah_level)))); // agar simpeg/...php diperoleh\n\n\t\t // setelah logika && pertama adalah path yang akan diabaikan\n\t\t // sedangkan sebelum logika && pertama adalah path yang akan digunakan / scan\n\t\t if ((strpos($pathName, \"\\\\{$appName}\\\\isi\\\\\") !== FALSE || \n\t\t \tstrpos($pathName, \"\\\\{$appName}\\\\php\\\\\") !== FALSE || \n\t\t \tstrpos($pathName, \"\\\\{$appName}\\\\cetak\\\\\") !== FALSE || \n\t\t \tstrpos($pathName, \"\\\\{$appName}\\\\ajax\\\\\") !== FALSE ||\n\t\t \tstrpos($pathName, \"\\\\php\\\\model\\\\\") !== FALSE ||\n\t\t \tstrpos($pathName, \"\\\\php\\\\verifikasi_data_pegawai\\\\\") !== FALSE ||\n\t\t \t$get_level == 1) &&\n\t\t \t(strpos($pathName, \"\\\\{$appName}\\\\cetak\\\\ckeditor\\\\\") === FALSE &&\n\t\t \tstrpos($pathName, \"\\\\ipdn\\\\FPDF\\\\\") === FALSE &&\n\t\t \tstrpos($pathName, \"\\\\{$appName}\\\\ckfinder\\\\\") === FALSE &&\n\t\t \tstrpos($pathName, \"\\\\css\\\\\") === FALSE &&\n\t\t \tstrpos($pathName, \"\\\\js\\\\\") === FALSE &&\n\t\t \tstrpos($pathName, \"\\\\php\\\\dompdf-0.6.2\\\\\") === FALSE &&\n\t\t \tstrpos($pathName, \"\\\\php\\\\lib\\\\\") === FALSE)){\n\t\t \tif (end($pecah) == \"php\") {\n\t\t\t \t$files[] = $pathName; \n\t\t\t }\n\t\t }\n\t\t}\n\t\treturn $files;\n\t}", "title": "" } ]
cd58dc627a419512b2643161a722a30b
Method to get the field input markup.
[ { "docid": "81d491a05e2a30e9a1a847f8b3de05b6", "score": "0.62830997", "text": "public function getInput()\n\t{\t\t\n\t\t$this->setCommonProperties();\n\t\t\n\t\t$thisOpts = array(\n\t\t\t\t'fieldsToRender' => (trim($this->getOption('fieldsToRender'),',') != '') ? explode(',',trim($this->getOption('fieldsToRender'),',')) : array(),\n\t\t\t\t'form' => $this->form,\n\t\t\t\t'fieldsetName' => $this->getOption('fieldsetName'),\n\t\t\t\t'autoFilter' => $this->getOption('autoFilter') ? true : false,\n\t\t\t\t'isMaster' => $this->getOption('isMaster') ? true : false,\n\t\t\t\t'showCounter' => $this->getOption('showCounter') ? true : false,\n\t\t\t\t'showId' => $this->getOption('showId') ? true : false,\n\t\t\t\t'tmplEngine' => $this->getOption('tmplEngine'),\n\t\t\t\t'jListByGiro' => $this->getOption('jListByGiro') ? true : false,\n\t\t\t\t'listName' => $this->getOption('name'),\n\t\t\t\t'formGroup' => $this->getOption('name'),\n\t\t\t\t'disabledActions' => $this->getOption('disabledActions'),\n\t\t\t\t'maxItems' => $this->getOption('maxItems'),\n\t\t\t\t'enumList' => array(),\n\t\t\t\t'dataList' => $this->value\n\t\t\t);\n\t\t$this->fieldOptions = array_merge($this->fieldOptions,$thisOpts,$this->jdomOptions);\n\t\n\t\t$this->input = JDom::_('html.list.table', $this->fieldOptions);\n\t\t\t\n\t\treturn parent::getInput();\n\t}", "title": "" } ]
[ { "docid": "93426c9fa8545d7ee8924e197ff60aa0", "score": "0.75470304", "text": "public function markup() {\n\n\t\t// Get value.\n\t\t$value = $this->get_value();\n\n\t\t// Prepare after_input.\n\t\t// Dynamic after_input content should use a callable to render.\n\t\tif ( isset( $this->after_input ) && is_callable( $this->after_input ) ) {\n\t\t\t$this->after_input = call_user_func( $this->after_input, $value, $this );\n\t\t}\n\n\t\t// Prepare markup.\n\t\t// Display description.\n\t\t$html = $this->get_description();\n\n\t\t$html .= sprintf(\n\t\t\t'<span class=\"%s\"><input type=\"%s\" name=\"%s_%s\" value=\"%s\" %s %s />%s %s</span>',\n\t\t\tesc_attr( $this->get_container_classes() ),\n\t\t\tesc_attr( $this->input_type ),\n\t\t\tesc_attr( $this->settings->get_input_name_prefix() ),\n\t\t\tesc_attr( $this->name ),\n\t\t\tesc_attr( htmlspecialchars( $value, ENT_QUOTES ) ),\n\t\t\t$this->get_describer() ? sprintf( 'aria-describedby=\"%s\"', $this->get_describer() ) : '',\n\t\t\timplode( ' ', $this->get_attributes() ),\n\t\t\tisset( $this->append ) ? sprintf( '<span class=\"gform-settings-field__text-append\">%s</span>', esc_html( $this->append ) ) : '',\n\t\t\t$this->get_error_icon()\n\t\t);\n\n\t\t// Insert after input markup.\n\n\t\t$html .= isset( $this->after_input ) ? $this->after_input : '';\n\n\t\treturn $html;\n\n\t}", "title": "" }, { "docid": "427ac14bc82cdd0db2b31437bd303cdd", "score": "0.7482409", "text": "public function getHtmlInputCode() {\n \n $position = $this->getPosition();\n \n\t if ($this->getType() != 'wrapper') { // Don't display 'wrapper' fields\n\t\n\t\t$value = (isset($_POST['f'.$this->getId()])?$_POST['f'.$this->getId()]:$this->getDefault_text());\n\n\n\t\techo '<p><span class=\"field-title\">'.$this->getName().': </span> ';\n\t\techo '<span class=\"field-character-count\"> (Up to '.$this->getCharacter_limit().' characters)</span><br />';\n\n\t\t$type = ($this->getWrap_width() > 0 || $this->getParent() > 0)?\"multi_line\":\"single_line\";\n\t\t\n\t\t\t\n\t\tswitch ($type) {\n\t\tcase 'single_line' :\n\t\t\techo '<input type=\"text\" maxlength=\"'.$this->getCharacter_limit().'\" name=\"f'.$this->getId().'\" value=\"'.$value.'\" /><br />';\n\t\t\tbreak;\n\n\t\tcase 'multi_line' :\n\t\t\techo '<textarea onKeyDown=\"javascript:limitText(this.form.f'.$this->getId().','.$this->getCharacter_limit().',null)\" rows=\"4\" name=\"f'.$this->getId().'\">'.$value.'</textarea><br />';\n\n\t\t}\n\t\techo '</p>';\n\t \n\t }\n\t\t\n\t}", "title": "" }, { "docid": "b01531a82e148c45775cf6949822ecf3", "score": "0.7389604", "text": "public function returnField()\n {\n return sprintf('<input type=\"%1$s\" id=\"%2$s-%3$s\" name=\"%2$s[%3$s]\" value=\"\" class=\"%4$s\" %5$s />', $this->fieldType, $this->formName, $this->fieldSlug, $this->classlist, $this->buildAttributeString());\n }", "title": "" }, { "docid": "acf2ce933883bea2505a404d211ad105", "score": "0.73616046", "text": "function input(){\r\n\t\treturn \"<input {$this->html_attributes} value=\\\"{$this->content}\\\"/>\";\r\n\t}", "title": "" }, { "docid": "6628651383e838f93ecd9ca7c7c8cc51", "score": "0.7124101", "text": "public function renderField() : string {\n $out = '<input type=\"' . $this->type . '\" ' .\n 'name=\"' . $this->name . '\" ' .\n 'value=\"' . $this->value . '\" ' .\n 'id=\"' . $this->id . '\"';\n\n // Tag Attributes\n $out .= $this->renderTagAttributes();\n // Tag schließen\n $out .= '>';\n return $out;\n }", "title": "" }, { "docid": "65e8cff2c99d7d42915d4997967384f0", "score": "0.70995766", "text": "public function getInput()\n {\n return $this->decorate->getInput();\n }", "title": "" }, { "docid": "fabe96e1ecca913bdc286a0f07bf6931", "score": "0.7092588", "text": "protected function getInput(){\n $url = JURI::root().'plugins/system/autofbook/autofbook/helpers/catcherJ16.php';\n $htmlCode = '<input id=\"'.$this->id.'\" name=\"'.$this->name.'\" type=\"text\" class=\"text_area\" size=\"9\" value=\"'.$url.'\"/>';\n return $htmlCode;\n }", "title": "" }, { "docid": "36a172b8098e292a868fb3351706fe5b", "score": "0.69605416", "text": "public function getInput()\r\n {\r\n static $form_setted = false ;\r\n static $form ;\r\n \r\n $this->getValues();\r\n $this->addFieldJs();\r\n \r\n $element = $this->element ;\r\n $class = (string) $element['class'];\r\n $nolabel = (string) $element['nolabel'] ;\r\n $nolabel = ($nolabel == 'true' || $nolabel == '1') ? true : false ;\r\n \r\n \r\n // Get Field Form\r\n // =============================================================\r\n if(!$form_setted){\r\n // ParseValue\r\n $data = AKHelper::_('fields.parseAttrs', $this->value);\r\n \r\n $type = JRequest::getVar('field_type', 'text') ;\r\n $form = null;\r\n \r\n \r\n // Loading form\r\n // =============================================================\r\n JForm::addFormPath( AKPATH_FORM.'/forms/attr' );\r\n $form = null ;\r\n \r\n \r\n \r\n // Event\r\n JFactory::getApplication()\r\n ->triggerEvent( 'onCCKEngineBeforeFormLoad' , array( &$form , &$data, &$this, &$element, &$form_setted)) ;\r\n \r\n $form = JForm::getInstance( 'fields', $type, array('control' => 'attrs'), false, false );\r\n \r\n // Event\r\n JFactory::getApplication()\r\n ->triggerEvent( 'onCCKEngineAfterFormLoad' , array( &$form , &$data, &$this, &$element, &$form_setted)) ;\r\n \r\n $form->bind($data);\r\n \r\n \r\n // Set Default for Options\r\n $default = JArrayHelper::getValue($data, 'default') ;\r\n JRequest::setVar('field_default', $default, 'method', true) ;\r\n $form_setted = true;\r\n }\r\n \r\n \r\n $fieldset = (string) $element['fset'];\r\n $fieldset = $fieldset ? $fieldset : 'attrs' ;\r\n $fields = $form->getFieldset($fieldset);\r\n \r\n \r\n $html = '<div class=\"'.$class.' ak-cck-'.$fieldset.'\">' ;\r\n foreach( $fields as $field ):\r\n if(!$nolabel){\r\n $html .= '<div class=\"control-group\">' ;\r\n $html .= ' <div class=\"control-label\">'.$field->getLabel().'</div>' ;\r\n $html .= ' <div class=\"controls\">'.$field->getInput().'</div>' ;\r\n $html .= '</div>' ;\r\n }else{\r\n $html .= '<div class=\"control-group\">' ;\r\n $html .= $field->getInput() ;\r\n $html .= '</div>' ;\r\n }\r\n endforeach;\r\n $html .= '</div>';\r\n \r\n return $html;\r\n\r\n }", "title": "" }, { "docid": "6b36d0f17cbd4b79a10345ea4765386e", "score": "0.694878", "text": "protected function get_field_html(){ echo 'this field needs to implement get_field_html()'; }", "title": "" }, { "docid": "811cd295890b98008da04e0d59f51037", "score": "0.68973804", "text": "protected function getInput()\n {\n $count = ((int) $this->element['quantity']) ? (int) $this->element['quantity'] : 10;\n\n // Initialize some field attributes\n $accept = $this->element['accept'] ? ' accept=\"'.(string) $this->element['accept'].'\"' : '';\n $size = $this->element['size'] ? ' size=\"'.(int) $this->element['size'].'\"' : '';\n $class = $this->element['class'] ? ' class=\"'.trim(str_replace('required', '', (string) $this->element['class'])).'\"' : '';\n $fsclass = $this->element['fieldsetclass'] ? ' '.(string) $this->element['fieldsetclass'] : '';\n $disabled = ((string) $this->element['disabled'] == 'true') ? ' disabled=\"disabled\"' : '';\n $onchange = $this->element['onchange'] ? ' onchange=\"'.(string) $this->element['onchange'].'\"' : '';\n\n $fields = array();\n for($i = 0; $i < $count; $i++)\n {\n $name = $this->name.'['.$i.']';\n $id = $this->id.$i;\n $fields[] = '<input type=\"file\" name=\"'.$name.'\" id=\"'.$id.'\" value=\"\"'.$accept.$disabled.$class.$size.$onchange.' />';\n }\n\n return '<fieldset class=\"validate-joomfiles'.$fsclass.'\" id=\"'.$this->id.'\">'.implode('', $fields).'</fieldset>';\n }", "title": "" }, { "docid": "29fb8af5f892c6546dd1fede3d64edf7", "score": "0.68874407", "text": "public function get_input_field_markup( $field = null ) {\n\n if ( $field && isset( $field['name'] ) ) {\n $option_value = get_option( $field['name'] );\n $field_value = isset( $field['value'] ) ? $field['value'] : get_option( $field['name'], '' );\n $type = isset( $field['type'] ) ? $field['type'] : 'text';\n $classes = isset( $field['classes'] ) ? $field['classes'] : array();\n\n // clean 'class' data\n if ( ! is_array( $classes ) ) {\n $classes = array($classes);\n }\n $classes = array_unique( $classes );\n\n if ( $type === 'text' ) {\n $classes[] = 'regular-text';\n }\n\n if ( isset( $field['label'] ) ) {\n echo '<label>';\n }\n\n echo '<input type=\"' . esc_attr( $type ) . '\" name=\"' . esc_attr( $field['name'] ) . '\" value=\"' . esc_attr( $field_value ) . '\"';\n\n // add id, if set\n if ( isset( $field['id'] ) ) {\n echo ' id=\"' . esc_attr( $field['id'] ). '\"';\n }\n\n if ( isset( $field['label'] ) ) {\n echo ' style=\"margin-right:5px;\"';\n }\n\n // add classes, if set\n if ( ! empty( $classes ) ) {\n echo ' class=\"' . esc_attr( implode( ' ', $classes ) ) . '\"';\n }\n\n // add checked property, if set\n if ( 'checkbox' === $type ) {\n echo $option_value ? ' checked' : '';\n }\n\n // add disabled property, if set\n if ( isset( $field['disabled'] ) && $field['disabled'] ) {\n echo ' disabled';\n }\n\n // add onclick support\n if ( isset( $field['onclick'] ) && $field['onclick'] ) {\n // already using esc_js in add_laterpay_pro_merchant()\n echo ' onclick=\"' . esc_attr( $field['onclick'] ) . '\"';\n }\n\n echo '>';\n\n if ( isset( $field['appended_text'] ) ) {\n echo '<dfn class=\"lp_appended-text\">' . esc_html( $field['appended_text'] ) . '</dfn>';\n }\n if ( isset( $field['label'] ) ) {\n echo esc_html( $field['label'] );\n echo '</label>';\n }\n }\n }", "title": "" }, { "docid": "31ff1d86661b4b463d032143537ac9e0", "score": "0.684638", "text": "public function getHtml()\n {\n $val = $this->getValue();\n if ($this->_isReadonly) {\n $str = '<div id=' . $this->getAttribute('id') . '>' . $val . '</div>';\n } else {\n $attributes = $this->getAttributes();\n $attributes['type'] = 'file';\n $attributes['value'] = $val;\n\n $str = '<input' . $this->_buildAttributeStr($attributes) . ' />';\n }\n return $str;\n }", "title": "" }, { "docid": "8ff98bd163f69f4fd8b0e18b429ddcde", "score": "0.6837894", "text": "public function getHtml() {\n\t\tif ($this->filterMime == Afbeelding::$mimeTypes) {\n\t\t\t$accept = 'image/*';\n\t\t} else {\n\t\t\t$accept = implode('|', $this->filterMime);\n\t\t}\n\t\treturn '<input ' . $this->getInputAttribute(array('type', 'id', 'name', 'class', 'disabled', 'readonly')) . ' accept=\"' . $accept . '\" data-max-size=\"' . getMaximumFileUploadSize() . '\" />';\n\t}", "title": "" }, { "docid": "363cbdd6c6d07b6a5c8e7f520819b466", "score": "0.6836273", "text": "public function getEditFieldHtml()\n {\n return $this->getFieldHtml();\n }", "title": "" }, { "docid": "7445b40d8e28ac50607ad9aa790282a7", "score": "0.681156", "text": "public function getPreviewInput(): string\n\t{\n\t\t$value = (string) $this->getProperty('COUPONS', '');\n\t\t$caption = $this->getProperty('CAPTION', '');\n\t\t$size = $this->getProperty('SIZE', 0);\n\t\t$placeholder = $this->getProperty('PLACEHOLDER', '');\n\t\t$codeIcon = $this->hasCode($value) ? RSFormProHelper::getIcon('php') : '';\n\n\t\t$html = '<td>' . $caption . '</td>';\n\t\t$html .= '<td>' . $codeIcon\n\t\t\t. ' <span class=\"rsficon jdicon-jdideal\" style=\"font-size:24px;margin-right:5px\"></span>' .\n\t\t\t'<input type=\"text\" value=\"\" size=\"' . (int) $size . '\" ' . (!empty($placeholder) ? 'placeholder=\"'\n\t\t\t\t. $this->escape($placeholder) . '\"' : '') . '/>' .\n\t\t\t'</td>';\n\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "cc40a5b445cf30e4bd903132d4f3230f", "score": "0.67750394", "text": "public function display()\n {\n $output = \"\";\n\n // Affichage du champ de saisie\n $output .= \"<input type=\\\"text\\\"\";\n /// ID HTML\n $output .= \" id=\\\"\" . $this->getInputID() . \"\\\"\";\n /// Classe HTML\n $output .= \" class=\\\"\" . join(' ', $this->getInputClasses()) . \"\\\"\";\n /// Name\n $output .= \" name=\\\"\" . esc_attr($this->field()->getDisplayName()) . \"\\\"\";\n /// Placeholder\n $output .= \" placeholder=\\\"\" . esc_attr($this->getInputPlaceholder()) . \"\\\"\";\n /// Attributs\n $output .= $this->getInputHtmlAttrs();\n /// Value\n $output .= \" value=\\\"\" . esc_attr($this->field()->getValue()) . \"\\\"\";\n /// TabIndex\n $output .= \" \" . $this->getTabIndex();\n /// Fermeture\n $output .= \"/>\";\n\n return $output;\n }", "title": "" }, { "docid": "288ee3a775864047c67d722227e2c02b", "score": "0.67696077", "text": "protected function _getFieldInputLabel()\n {\n return __(html_escape($this->_element->name));\n// return html_escape($this->_annotationTypeElement->Element->name);\n }", "title": "" }, { "docid": "610be8650852eb28faa6661ae589132a", "score": "0.6749841", "text": "protected function getInput()\n {\n $classes = array(\n 'inputbox', \n );\n \n $this->class = $this->class . ' ' . implode(' ', $classes);\n\n return parent::getInput();\n }", "title": "" }, { "docid": "c026f6aa614c9398148d8d923799198d", "score": "0.6745612", "text": "private function get_markup() {\n $form = new Torque_Contact_Form_Form( $this->atts['recipient_email'] );\n return $form->get_form_markup();\n }", "title": "" }, { "docid": "d6d27c8eabb4c3967605d2e8f9218eef", "score": "0.6737", "text": "private function getResultField() {\n\t\t$inputField = '<input type=\"text\" name=\"'. $this->nameOfResultField .'\" ';\n\t\tforeach( $this->inputFieldAttributes as $attribute => $value) {\n\t\t\t$inputField .= $attribute .'=\"'. $value .'\" ';\n\t\t}\n\t\t$inputField .= '/>';\n\t\treturn $inputField;\n\t}", "title": "" }, { "docid": "6f3a959d2d4395a5e1608cecbc105cee", "score": "0.6731003", "text": "abstract public function getExampleInputHtml(): string;", "title": "" }, { "docid": "1615d780e88db35c412613d84759d655", "score": "0.66652197", "text": "public function getInput() {\n\t\t$input = parent::getInput();\n\t\treturn $input . $this->getModal();\n\t\t\n\t}", "title": "" }, { "docid": "ce89ff86f5c5e248e467fc62f957eb69", "score": "0.66345906", "text": "public function getFieldHtml()\n {\n // 'field_key' => $this->field_key,\n // 'field_value' => $this->getFieldPreParse($this->value)\n // ));\n\n // return $this->view->load('settings/wrapper', array(\n // 'field_key' => $this->field_key,\n // 'field_title' => $this->field_title,\n // 'field_type' => $this->field_type,\n // 'field_instructions' => $this->field_instructions,\n // 'field' => $field\n // ));\n }", "title": "" }, { "docid": "d034db9ec3b7ecf606e6c2a172f73546", "score": "0.6448717", "text": "public function getFormInput(): string\n\t{\n\t\tHTMLHelper::_(\n\t\t\t'script',\n\t\t\t'https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js',\n\t\t\t['version' => 'auto', 'relative' => false]\n\t\t);\n\n\t\t$value = isset($this->value[$this->name]) ? $this->value[$this->name] : '';\n\t\t$name = $this->getName();\n\t\t$id = $this->getId();\n\t\t$size = $this->getProperty('SIZE', 0);\n\t\t$maxlength = $this->getProperty('MAXSIZE', 0);\n\t\t$placeholder = $this->getProperty('PLACEHOLDER', '');\n\t\t$type = 'text';\n\t\t$attr = $this->getAttributes();\n\t\t$additional = '';\n\n\t\tif ($codes = RSFormProHelper::isCode($this->data['COUPONS']))\n\t\t{\n\t\t\t$codes = RSFormProHelper::explode($codes);\n\t\t\t$discounts = [];\n\n\t\t\tforeach ($codes as $string)\n\t\t\t{\n\t\t\t\tif (strpos($string, '|') !== false)\n\t\t\t\t{\n\t\t\t\t\t[$couponValue, $code] = explode('|', $string, 2);\n\t\t\t\t\t$discounts[md5($code)] = $couponValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$attr['data-componentid'] = $this->componentId;\n\t\t\t$attr['data-discounts'] = json_encode($discounts);\n\t\t\t$attr['data-formid'] = $this->formId;\n\t\t}\n\n\t\t$html = '<input';\n\n\t\tif ($attr)\n\t\t{\n\t\t\tforeach ($attr as $key => $values)\n\t\t\t{\n\t\t\t\t// @new feature - Some HTML attributes (type, size, maxlength) can be overwritten\n\t\t\t\t// directly from the Additional Attributes area\n\t\t\t\tif (($key == 'type' || $key == 'size' || $key == 'maxlength') && strlen($values))\n\t\t\t\t{\n\t\t\t\t\t${$key} = $values;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$additional .= $this->attributeToHtml($key, $values);\n\t\t\t}\n\t\t}\n\n\t\t$html .= ' type=\"' . $this->escape($type) . '\"' . ' value=\"' . $this->escape($value) . '\"';\n\n\t\tif ($size)\n\t\t{\n\t\t\t$html .= ' size=\"' . (int) $size . '\"';\n\t\t}\n\n\t\tif ($maxlength)\n\t\t{\n\t\t\t$html .= ' maxlength=\"' . (int) $maxlength . '\"';\n\t\t}\n\n\t\tif (!empty($placeholder))\n\t\t{\n\t\t\t$html .= ' placeholder=\"' . $this->escape($placeholder) . '\"';\n\t\t}\n\n\t\t$html .= ' name=\"' . $this->escape($name) . '\"' .\n\t\t\t' id=\"' . $this->escape($id) . '\"';\n\n\t\t$html .= $additional;\n\n\t\t$html .= ' />';\n\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "e979fa2d242f45a0258453c7b2a5db5d", "score": "0.64414334", "text": "protected function renderHtml(): string\n {\n $fieldWizardResult = $this->renderFieldWizard();\n\n // Create form field\n $formField = '<input type=\"text\" ' . GeneralUtility::implodeAttributes([\n 'name' => $this->name,\n 'value' => $this->value,\n 'id' => $this->id,\n 'placeholder' => $this->placeholder,\n 'class' => 'form-control form-control--tags'\n ], true) . ' />';\n\n // Return html\n return '\n <div class=\"form-control-wrap\">\n <div class=\"form-wizards-wrap\">\n <div class=\"form-wizards-element\">' . $formField . '</div>\n <div class=\"form-wizards-items-bottom\">' . ($fieldWizardResult['html'] ?? '') . '</div>\n </div>\n </div>\n ';\n }", "title": "" }, { "docid": "3d0072a70709c082f40309b9395f4f07", "score": "0.6441132", "text": "protected function getInputTag()\n\t{\n\t\t$tag = new Zap_HtmlTag('input');\n\t\t$tag->type = 'text';\n\t\t$tag->name = ($this->_autocomplete) ? $this->_id : $this->getNonce();\n\t\t$tag->id = ($this->_autocomplete) ? $this->_id : $this->getNonce();\n\t\t$tag->class = $this->_getCSSClassString();\n\n\t\t// event handlers to select on focus\n\t\t$tag->onmousedown = 'if(!this._focused){this._focus_click=true;}';\n\t\t$tag->onmouseup = 'if(this._focus_click){'.\n\t\t\t'this.select();this._focus_click=false;}';\n\n\t\t$tag->onfocus = 'this._focused=true;'.\n\t\t\t'if(!this._focus_click){ this.select();}';\n\n\t\t$tag->onblur = 'this._focused=false;this._focus_click=false;';\n\n\t\tif ($this->_readOnly) {\n\t\t\t$tag->readonly = 'readonly';\n\t\t}\n\n\t\tif (!$this->isSensitive())\n\t\t\t$tag->disabled = 'disabled';\n\n\t\t$value = $this->getDisplayValue($this->_value);\n\n\t\t// escape value for display because we actually want to show entities\n\t\t// for editing\n\t\t$value = htmlspecialchars($value);\n\t\t$tag->value = $value;\n\n\t\t$tag->size = $this->_size;\n\t\t$tag->maxlength = $this->_maxlength;\n\t\t$tag->accesskey = $this->_accessKey;\n\t\t$tag->tabindex = $this->_tabIndex;\n\n\t\treturn $tag;\n\t}", "title": "" }, { "docid": "62aebe2ea193e697b7413bcec7e537a2", "score": "0.64235395", "text": "public function getInput()\n {\n return $this->value;\n }", "title": "" }, { "docid": "6c80c662f51e981f9f8ef29a3c26a148", "score": "0.64192533", "text": "public function getInputView()\n {\n if ($view = parent::getInputView()) {\n return $view;\n }\n\n return 'anomaly.field_type.icon::' . $this->config('mode', 'dropdown');\n }", "title": "" }, { "docid": "d546c1a4293797ae2e840687065d1e63", "score": "0.64181304", "text": "protected function getInput()\n\t\t{\n\n\t\t\t$html = array();\n\n\t\t\t$html[] = '<div class=\"jm-element-items\"><table id=\"'.$this->id.'_items\" class=\"table-condensed\"></table></div>';\n\n\t\t\t$html[] = '<textarea name=\"' . $this->name . '\" id=\"' . $this->id . '\" style=\"display: none;\">' . htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') . '</textarea>';\n\t\t\t$html[] = '<button id=\"' . $this->id . '_btn_add\" class=\"btn btn-primary\">'.JText::_('MOD_JM_UI_ADD_NEW_BTN').'</button>';\n\t\t\t$html[] = '<button style=\"display: none;\" id=\"' . $this->id . '_btn_cancel\" class=\"btn\">'.JText::_('MOD_JM_UI_CANCEL_BTN').'</button>';\n\n\t\t\t$html[] = '<button style=\"display: none;\" id=\"' . $this->id . '_btn_save\" class=\"btn btn-success\" >'.JText::_('MOD_JM_UI_SAVE_BTN').'</button>';\n\n\t\t\treturn implode($html);\n\t\t}", "title": "" }, { "docid": "995275bd8a8692666514a32af21edd10", "score": "0.6412136", "text": "function render()\n\t{\n\t\treturn \"<input type='text' name='\".$this->getName().\"' id='\".$this->getName().\"' size='\".$this->getSize().\"' maxlength='\".$this->getMaxlength().\"' value='\".$this->getValue().\"'\".$this->getExtra().\" />\";\n\t}", "title": "" }, { "docid": "ad907996b16c779b5c1b238f3b471a2a", "score": "0.6411576", "text": "protected function getInput()\n\t{\n\t\tif (!empty($this->element['placeholder'])) {\n\t\t\t$this->class = $this->element['class']. '\" data-placeholder=\"'.JText::_($this->element['placeholder']).'\"';\n\t\t}\n\t\tif ($this->multiple && !empty($this->value) && !is_array($this->value)) { // This is a fix to allow multiple default values\n\t\t\t $this->value = array_map('trim',explode(\",\",$this->value));\n\t\t}\n\t\treturn parent::getInput();\n\n\t}", "title": "" }, { "docid": "c7d315fe5a4114ab7c96fe2dd757dc1b", "score": "0.63873214", "text": "function buildElement() {\n\t\t$e = Theme::input_text($this->defaultValue, $this->placeholder, $this->label, [\"type\" => $this->displayType]);\n\t\t\n\t\tif (!is_array($this->only) OR !is_array($this->not))\n\t\t\tthrow new Exception(\"Input only/not property needs to be an array [regex string, error string].\");\n\t\t\n\t\t$e->attr(\"id\", $this->id);\n\t\t$e->attr(\"blank\", ($this->blank ? 1:0));\n\t\t$e->attr(\"count\", $this->character_min.' '.$this->character_max);\n\t\t$e->attr(\"not\", $this->not[0]);\n\t\t$e->attr(\"notdesc\", $this->not[1]);\n\t\t$e->attr(\"only\", $this->only[0]);\n\t\t$e->attr(\"onlydesc\", $this->only[1]);\n\t\t$e->attr(\"isinput\", \"\");\n\t\t\n\t\t//$html = '<input isinput id=\"'.$this->id.'\" blank=\"'.($this->blank ? 1:0).'\" count=\"'.$this->min.' '.$this->max.'\" not=\"'.$this->not.'\" only=\"'.$this->only.'\" name=\"'.$meta['name'].'\" type=\"text\" placeholder=\"Text\"></input>';\n\t\t\n\t\t$this->doVisible($e);\n\t\t\n\t\treturn $e;\n\t}", "title": "" }, { "docid": "0bf281b9cce265fbe01715048027c34f", "score": "0.63838476", "text": "public function get_markup(){\n\t\t\treturn $this->_template_markup;\n\t\t}", "title": "" }, { "docid": "7aec81e1f7376629613ee994fa27159d", "score": "0.63733673", "text": "public function getInput()\n\t{\n\t\treturn $this->input;\n\t}", "title": "" }, { "docid": "763a1b3bf529f8b169d5e20efe6483dd", "score": "0.63230556", "text": "public function toHtml()\n {\n if (0 == strlen($this->_text)) {\n $label = '';\n } elseif ($this->_flagFrozen) {\n // チェックの時のみラベルを表示\n $label = $this->getChecked() ? $this->_text : '';\n } else {\n $label = '<label for=\"' . $this->getAttribute('id') . '\">' . $this->_text . '</label>';\n }\n return HTML_QuickForm_input::toHtml() . $label;\n }", "title": "" }, { "docid": "c5cafd3bab80867853b3f7d6a1cfe1d5", "score": "0.6310301", "text": "public function create_input() {\n\t\tglobal $post;\n\t\t?>\n\t\t<tr>\n\t\t\t<td><label for=\"<?php echo $this->id; ?>\" class=\"rva-admin-row-title\"><?php printf( __( $this->label, 'rva-mag' ) ); ?></label></tb>\n\t\t\t<td align=\"left\">\n\t\t\t\t<?php\n\t\t\t\tswitch( $this->type ) :\n\t\t\t\t\t// Text Input\n\t\t\t\t\tcase 'text' :\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<input type=\"<?php echo $this->type; ?>\" style=\"width: 100%;\" name=\"<?php echo $this->name; ?>\" id=\"<?php echo $this->id; ?>\" value=\"<?php $this->field_value($this->value); ?>\" size=\"50\" />\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// Text Area\n\t\t\t\t\tcase 'textarea' :\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<textarea name=\"<?php echo $this->name; ?>\" id=\"<?php echo $this->id; ?>\" cols=\"49\" rows=\"2\"><?php echo esc_textarea( $this->get_field_value( $this->value ) ); ?></textarea>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// Checkbox\n\t\t\t\t\tcase 'checkbox' :\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<input type=\"<?php echo $this->type; ?>\" name=\"<?php echo $this->name; ?>\" id=\"<?php echo $this->id; ?>\"<?php checked( $this->value, 1 ); ?> value=\"1\" />\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t//DateTime\n\t\t\t\t\tcase 'datetime' :\n\t\t\t\t\t\t//TODO: set the the time zone\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<input type=\"<?php echo $this->type; ?>\" style=\"width: 100%;\" name=\"<?php echo $this->name; ?>\" id=\"<?php echo $this->id; ?>\" value=\"<?php $this->field_value($this->value); ?>\" size=\"50\" />\n\t\t\t\t\t\t<script>\n\t\t\t\t\t\t\tjQuery('#<?php echo $this->id; ?>').datetimepicker(\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tformat: 'Y/m/d h:i A'\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t</script>\n\t\t\t\t\t\t<?php\n\n\t\t\t\tendswitch;\n\t\t\t\t?>\n\t\t\t</td>\n\t\t</tr>\n\t\t<?php\n\t}", "title": "" }, { "docid": "f014b05551cd6e2384ff4131b7035311", "score": "0.6303474", "text": "public function renderInput(): string\n {\n return view('cms::components.form.image', [\n 'name' => $this->getKey(),\n 'attributes' => $this->getInputAttributes(),\n 'value' => $this->getInputValue(),\n 'height' => $this->getPreviewHeight(),\n 'width' => $this->getPreviewWidth(),\n ])->render();\n }", "title": "" }, { "docid": "d7b4efdba200fea0e860762573622577", "score": "0.62989974", "text": "public function getTagName ()\n\t{\n\t\treturn 'input';\n\t}", "title": "" }, { "docid": "6c494a6ca41453fb8342799b616b4ff3", "score": "0.62916833", "text": "protected function getInput()\n\t{\n\t\t$script = \"head.ready(function() {\n\t\tvar s = $('\".$this->id.\"').getElements('input').filter(function(e){\n\t\treturn (e.checked);\n\t\t});\n\t\tif(s[0].get('value') == '\".$this->element['hide'].\"'){\n\t\t\t$('\".$this->element['toggle'].\"').hide();\n\t\t}\n\t\t\t$('\".$this->id.\"').getElements('input').addEvent('change', function(e){\n\t\t\t\tif(e.target.checked == true){\n\t\t\t\t\tvar v = e.target.get('value');\n\t\t\t\t\tif(v == '\".$this->element['show'].\"') {\n\t\t\t\t\t\t$('\".$this->element['toggle'].\"').show();\n\t\t\t\t\t} else{\n\t\t\t\t\t\tif(v == '\".$this->element['hide'].\"') {\n\t\t\t\t\t\t\t$('\".$this->element['toggle'].\"').hide();\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\tFabrikHelperHTML::addScriptDeclaration($script);\n\t\treturn parent::getInput();\n\n\t}", "title": "" }, { "docid": "4973e0ac5321999cfee5003511032c7d", "score": "0.62876517", "text": "function render_input(array $field)\n\t{\n\t\t$description = $field['description'] ?? '';\n\t\t$placeholder = esc_attr($field['placeholder'] ?? '');\n\t\t$disabled = $field['disabled'] ?? false;\n\t\t$type = $field['type'] ?? 'input';\n\t\t$rows = $field['rows'] ?? '25';\n\t\t$option = $field['name'];\n\n\t\tif ($type === 'input') { ?>\n <input\n type=\"text\"\n style=\"width: 100%\"\n <?php echo $disabled ? 'disabled' : ''; ?>\n <?php echo $placeholder ? \"placeholder='$placeholder'\" : ''; ?>\n name=\"<?php echo esc_attr($option); ?>\"\n id=\"<?php echo esc_attr($this->get_id($field)); ?>\"\n value=\"<?php echo get_option($option, ''); ?>\"\n\n />\n <?php } elseif ($type === 'textarea') { ?>\n\n <textarea\n style=\"width: 100%\"\n rows=<?php echo esc_attr($rows); ?>\n type=\"text\"\n id=\"<?php echo esc_attr($this->get_id($field)); ?>\"\n name=\"<?php echo esc_attr($option); ?>\"\n value=\"\"\n\n ><?php echo get_option($option, ''); ?></textarea>\n\n <?php } elseif ($type === 'checkbox') { ?>\n\n <input\n type=\"checkbox\"\n name=\"<?php echo esc_attr($option); ?>\"\n id=\"<?php echo esc_attr($this->get_id($field)); ?>\"\n value=\"1\"\n <?php checked(1, get_option($option), true); ?> />\n\n <?php }\n\t\t?>\n\n\t\t<p class=\"description\">\n\t\t\t<?php echo $description; ?>\n\t\t\t<sub>(<?php echo esc_html($option); ?>)</sub>\n\t\t</p>\n\t\t<?php\n\t}", "title": "" }, { "docid": "19f6c330fe4bd6e4eac41be032c87acf", "score": "0.62693375", "text": "public function field() {\n\t\t?>\n\t\t<tr>\n\n\t\t\t<th scope=\"row\">\n\t\t\t\t<label for=\"<?php echo esc_attr( $this->get_field_name( 'webhook_url' ) ); ?>\"><?php _e( 'Webhook URL', 'backupwordpress' ); ?></label>\n\t\t\t</th>\n\n\t\t\t<td>\n\t\t\t\t<input type=\"url\" id=\"<?php echo esc_attr( $this->get_field_name( 'webhook_url' ) ); ?>\" name=\"<?php echo esc_attr( $this->get_field_name( 'webhook_url' ) ); ?>\" value=\"<?php echo esc_attr( $this->get_field_value( 'webhook_url' ) ); ?>\" />\n\t\t\t</td>\n\n\t\t</tr>\n\n\t\t<tr>\n\t\t\t<th>\n\t\t\t\t<label for=\"<?php echo esc_attr( $this->get_field_name( 'webhook_secret_key' ) ); ?>\"><?php _e( 'Webhook Secret', 'backupwordpress' ); ?></label>\n\t\t\t</th>\n\n\t\t\t<td>\n\t\t\t\t<input type=\"text\" id=\"<?php echo esc_attr( $this->get_field_name( 'webhook_secret_key' ) ); ?>\" name=\"<?php echo esc_attr( $this->get_field_name( 'webhook_secret_key' ) ); ?>\" value=\"<?php echo esc_attr( $this->get_field_value( 'webhook_secret_key' ) ); ?>\" />\n\n\t\t\t\t<p class=\"description\"><?php _e( 'Send a notification to an external service.', 'backupwordpress' ); ?></p>\n\t\t\t</td>\n\n\t\t</tr>\n\t<?php\n\t}", "title": "" }, { "docid": "0fef46d8e7df0864560d3eadfc7ea5f8", "score": "0.62674075", "text": "public function getFrontendInput();", "title": "" }, { "docid": "88a896c2a1aac00ee9c5676607563a74", "score": "0.6266124", "text": "public function render( ) { ?>\n <input type=\"text\"\n name=\"<?php echo esc_attr( $this->get_id()); ?>\"\n id=\"<?php echo esc_attr( $this->get_id()); ?>\"\n value=\"<?php echo esc_attr( $this->get_option( 'value', '' ) ); ?>\"\n <?php if( $this->get_option( 'placeholder' ) ) : ?>\n placeholder=\"<?php echo esc_attr( $this->get_option( 'placeholder' ) ); ?>\"\n <?php endif; ?> />\n <?php }", "title": "" }, { "docid": "6d2e398863c532794ed0b089643a7cde", "score": "0.62636596", "text": "public function render()\n {\n return view('components.input-field');\n }", "title": "" }, { "docid": "6f65d2c9d9c71cf599f53d815f92c8d0", "score": "0.62580985", "text": "public function getInputHtml()\n {\n $attributes = $this->getCustomAttributes();\n $output = '';\n\n foreach ($this->options as $option) {\n $output .= '<label>';\n\n $output .= '<input '\n . $this->getAttributeString('name', $this->getHandle() . '[]')\n . $this->getAttributeString('type', 'checkbox')\n . $this->getAttributeString('id', $this->getIdAttribute())\n . $this->getAttributeString('class', $attributes->getClass())\n . $this->getAttributeString('value', $option->getValue(), false)\n . $attributes->getInputAttributesAsString()\n . ($option->isChecked() ? 'checked ' : '')\n . '/>';\n $output .= $this->translate($option->getLabel());\n $output .= '</label>';\n }\n\n return $output;\n }", "title": "" }, { "docid": "f19e63e9e732edc37671bb341456fe7b", "score": "0.62530404", "text": "protected function getInput()\n\t{\n\t\t$layoutData = $this->getLayoutData();\n\t\t$html = $this->getRenderer($this->layout)->render($layoutData);\n\n\t\tif ($this->size)\n\t\t{\n\t\t\t$sizes = array();\n\t\t\t$sizes[] = HTMLHelper::_('number.bytes', ini_get('post_max_size'), '');\n\t\t\t$sizes[] = HTMLHelper::_('number.bytes', ini_get('upload_max_filesize'), '');\n\t\t\t$sizes[] = $this->size * 1024 * 1024;\n\n\t\t\t$maxSize = HTMLHelper::_('number.bytes', min($sizes));\n\t\t\t$fileMaxSize = '<strong>' . $maxSize . '</strong>';\n\t\t\t$html = str_replace(substr($html, strpos($html, '<strong>'), strpos($html, '</strong>')), $fileMaxSize, $html);\n\t\t}\n\n\t\t// Load backend language file\n\t\t$lang = JFactory::getLanguage();\n\t\t$lang->load('com_tjfields', JPATH_SITE);\n\n\t\tif (!empty($layoutData[\"value\"]))\n\t\t{\n\t\t\t$data = parent::buildData($layoutData);\n\n\t\t\tif (!empty($data->mediaLink))\n\t\t\t{\n\t\t\t\t$html .= '<div class=\"control-group\">';\n\t\t\t\t$html .= $data->html;\n\t\t\t\t$html .= $this->renderImage($data, $layoutData);\n\t\t\t\t$html .= $this->canDownloadFile($data, $layoutData);\n\t\t\t\t$html .= $this->canDeleteFile($data, $layoutData);\n\t\t\t\t$html .= '</div>';\n\t\t\t}\n\t\t}\n\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "57ed91f2c035d5fba1abc4c02f42d7b4", "score": "0.624923", "text": "function render(){\r\n\t\t$ret .= \"<input id='$this->getId()' name='$this->name' value='$this->value' />\";\r\n\t\treturn $ret; \r\n\t}", "title": "" }, { "docid": "8cfb0098613d5d0e8c9d47a7bba7659e", "score": "0.62478256", "text": "public function generate_html()\n {\n // Prepare the input data\n $input_data = $this->input_data[0];\n \n $parameters = [\n 'label' => $this->label,\n 'field_name' => $this->field_name,\n 'value' => $input_data\n ];\n\n $return = $this->stub->parse_stub('input-text', $parameters).\"\\n\";\n\n return $return;\n }", "title": "" }, { "docid": "d3176fcb281c01f2e771c81eff177df4", "score": "0.62381816", "text": "abstract public function getMarkup();", "title": "" }, { "docid": "a78b2d2f2a864914021d807c990116f8", "score": "0.6237943", "text": "public function getInput()\r\n {\r\n $column = $this->column;\r\n\r\n $views[] = $inputLabel = $this->getInputLabel();\r\n\r\n //if is not fixed put the close button\r\n if ($this->getFilterType() && $this->getFilterType() . '' != '2')\r\n {\r\n $inputLabel->append(self::getCloseFilterButton());\r\n }\r\n\r\n $content = array();\r\n $content[] = $this->getInputCondition(0);\r\n $content[] = $this->getInputValue(0);\r\n\r\n $views[] = new \\View\\Div(null, $content, 'filterBase clearfix');\r\n $views[] = self::getAddFilterButton();\r\n\r\n $count = count($this->getFilterValues()) - 1;\r\n\r\n //without post, use default values\r\n if ($count == -1)\r\n {\r\n $count = count($this->getDefaultValue()) - 1;\r\n }\r\n\r\n for ($index = 0; $index < $count; $index++)\r\n {\r\n $content = array();\r\n $content[] = $this->getInputCondition($index + 1);\r\n $content[] = $this->getInputValue($index + 1);\r\n $content[] = self::getRemoveFilterButton();\r\n $views[] = new \\View\\Div(null, $content, 'clearfix filterBase-cloned');\r\n }\r\n\r\n $columnName = $column ? $column->getName() : $this->getFilterName();\r\n\r\n return new \\View\\Div($columnName . 'Filter', $views, 'filterField');\r\n }", "title": "" }, { "docid": "4ad9d781258e0c5ccc79d9d9082cbe75", "score": "0.62259245", "text": "public function ___render() {\n\n\t\t$out = '';\n\t\t$children = $this->preRenderChildren();\n\t\t$columnWidthTotal = 0;\n\t\t$columnWidthSpacing = $this->columnWidthSpacing; \n\t\t$lastInputfield = null;\n\t\t$_markup = array_merge(self::$defaultMarkup, self::$markup);\n\t\t$_classes = array_merge(self::$defaultClasses, self::$classes);\n\t\t$useColumnWidth = true;\n\t\t$renderAjaxInputfield = $this->wire('config')->ajax ? $this->wire('input')->get('renderInputfieldAjax') : null;\n\t\t\n\t\tif(isset($_classes['form']) && strpos($_classes['form'], 'InputfieldFormNoWidths') !== false) {\n\t\t\t$useColumnWidth = false;\n\t\t}\n\t\n\t\t// show description for tabs\n\t\t$description = $this->quietMode ? '' : $this->getSetting('description'); \n\t\tif($description && wireClassExists(\"InputfieldFieldsetTabOpen\") && $this instanceof InputfieldFieldsetTabOpen) {\n\t\t\t$out .= str_replace('{out}', nl2br($this->entityEncode($description, true)), $_markup['item_head']);\n\t\t}\n\t\t\n\t\tforeach($children as $inputfield) {\n\t\t\t\n\t\t\tif($renderAjaxInputfield && $inputfield->attr('id') != $renderAjaxInputfield \n\t\t\t\t&& !$inputfield instanceof InputfieldWrapper) {\n\t\t\t\t\n\t\t\t\t$skip = true;\n\t\t\t\tforeach($inputfield->getParents() as $parent) {\n\t\t\t\t\tif($parent->attr('id') == $renderAjaxInputfield) $skip = false;\n\t\t\t\t}\n\t\t\t\tif($skip && !empty($parents)) continue;\n\t\t\t}\n\t\t\t\t\n\t\t\t$inputfieldClass = $inputfield->className();\n\t\t\t$markup = isset($_markup[$inputfieldClass]) ? array_merge($_markup, $_markup[$inputfieldClass]) : $_markup; \n\t\t\t$classes = isset($_classes[$inputfieldClass]) ? array_merge($_classes, $_classes[$inputfieldClass]) : $_classes; \n\t\t\t$renderValueMode = $this->renderValueMode; \n\n\t\t\t$collapsed = (int) $inputfield->getSetting('collapsed'); \n\t\t\t$required = $inputfield->getSetting('required');\n\t\t\t$requiredIf = $required ? $inputfield->getSetting('requiredIf') : false;\n\t\t\t$showIf = $inputfield->getSetting('showIf'); \n\t\t\t\n\t\t\tif($collapsed == Inputfield::collapsedHidden) continue; \n\t\t\tif($collapsed == Inputfield::collapsedNoLocked || $collapsed == Inputfield::collapsedYesLocked) $renderValueMode = true;\n\n\t\t\t$ffOut = $this->renderInputfield($inputfield, $renderValueMode); \t\n\t\t\tif(!strlen($ffOut)) continue;\n\t\t\t$entityEncodeText = $inputfield->getSetting('entityEncodeText') === false ? false : true;\n\n\t\t\t$errorsOut = '';\n\t\t\tif(!$inputfield instanceof InputfieldWrapper) {\n\t\t\t\t$errors = $inputfield->getErrors(true);\n\t\t\t\tif(count($errors)) {\n\t\t\t\t\t$collapsed = $renderValueMode ? Inputfield::collapsedNoLocked : Inputfield::collapsedNo;\n\t\t\t\t\t$errorsOut = implode(', ', $errors);\n\t\t\t\t}\n\t\t\t} else $errors = array();\n\t\t\n\t\t\tforeach(array('error', 'description', 'head', 'notes') as $property) {\n\t\t\t\t$text = $property == 'error' ? $errorsOut : $inputfield->getSetting($property); \n\t\t\t\tif(!empty($text) && !$this->quietMode) {\n\t\t\t\t\t$text = nl2br($entityEncodeText ? $inputfield->entityEncode($text, true) : $text);\n\t\t\t\t\t$text = str_replace('{out}', $text, $markup[\"item_$property\"]);\n\t\t\t\t} else {\n\t\t\t\t\t$text = '';\n\t\t\t\t}\n\t\t\t\t$_property = '{' . $property . '}';\n\t\t\t\tif(strpos($markup['item_content'], $_property) !== false) {\n\t\t\t\t\t$markup['item_content'] = str_replace($_property, $text, $markup['item_content']);\n\t\t\t\t} else if(strpos($markup['item_label'], $_property) !== false) {\n\t\t\t\t\t$markup['item_label'] = str_replace($_property, $text, $markup['item_label']);\n\t\t\t\t} else if($text && $property == 'notes') {\n\t\t\t\t\t$ffOut .= $text;\n\t\t\t\t} else if($text) {\n\t\t\t\t\t$ffOut = $text . $ffOut;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(!$this->quietMode) {\n\t\t\t\t$prependMarkup = $inputfield->getSetting('prependMarkup');\n\t\t\t\tif($prependMarkup) $ffOut = $prependMarkup . $ffOut;\n\t\t\t\t$appendMarkup = $inputfield->getSetting('appendMarkup');\n\t\t\t\tif($appendMarkup) $ffOut .= $appendMarkup;\n\t\t\t}\n\t\t\t\n\t\t\t// The inputfield's classname is always used in it's LI wrapper\n\t\t\t$ffAttrs = array(\n\t\t\t\t'class' => str_replace(\n\t\t\t\t\t\tarray('{class}', '{name}'), \n\t\t\t\t\t\tarray($inputfield->className(), $inputfield->attr('name')\n\t\t\t\t\t\t), \n\t\t\t\t\t\t$classes['item'])\n\t\t\t\t\t);\n\t\t\tif($inputfield instanceof InputfieldItemList) $ffAttrs['class'] .= \" InputfieldItemList\";\n\t\t\tif($collapsed) $ffAttrs['class'] .= \" collapsed$collapsed\";\n\n\t\t\tif(count($errors)) $ffAttrs['class'] .= ' ' . $classes['item_error'];\n\t\t\tif($required) $ffAttrs['class'] .= ' ' . $classes['item_required']; \n\t\t\tif(strlen($showIf) && !$this->renderValueMode) { // note: $this->renderValueMode (rather than $renderValueMode) is intentional\n\t\t\t\t$ffAttrs['data-show-if'] = $showIf;\n\t\t\t\t$ffAttrs['class'] .= ' ' . $classes['item_show_if'];\n\t\t\t}\n\t\t\tif(strlen($requiredIf)) {\n\t\t\t\t$ffAttrs['data-required-if'] = $requiredIf; \n\t\t\t\t$ffAttrs['class'] .= ' ' . $classes['item_required_if']; \n\t\t\t}\n\n\t\t\tif($collapsed) {\n\t\t\t\t$isEmpty = $inputfield->isEmpty();\n\t\t\t\tif(($isEmpty && $inputfield instanceof InputfieldWrapper) || \n\t\t\t\t\t$collapsed === Inputfield::collapsedYes ||\n\t\t\t\t\t$collapsed === Inputfield::collapsedYesLocked ||\n\t\t\t\t\t$collapsed === true || \n\t\t\t\t\t$collapsed === Inputfield::collapsedYesAjax ||\n\t\t\t\t\t($isEmpty && $collapsed === Inputfield::collapsedBlank) ||\n\t\t\t\t\t($isEmpty && $collapsed === Inputfield::collapsedBlankAjax) ||\n\t\t\t\t\t($isEmpty && $collapsed === Inputfield::collapsedNoLocked) || // collapsedNoLocked assumed to be like a collapsedBlankLocked\n\t\t\t\t\t(!$isEmpty && $collapsed === Inputfield::collapsedPopulated)) {\n\t\t\t\t\t\t$ffAttrs['class'] .= ' ' . $classes['item_collapsed'];\n\t\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif($inputfield instanceof InputfieldWrapper) {\n\t\t\t\t// if the child is a wrapper, then id, title and class attributes become part of the LI wrapper\n\t\t\t\tforeach($inputfield->getAttributes() as $k => $v) {\n\t\t\t\t\tif(in_array($k, array('id', 'title', 'class'))) {\n\t\t\t\t\t\t$ffAttrs[$k] = isset($ffAttrs[$k]) ? $ffAttrs[$k] . \" $v\" : $v; \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\n\t\t\t// if the inputfield resulted in output, wrap it in an LI\n\t\t\tif($ffOut) {\n\t\t\t\t$attrs = '';\n\t\t\t\t$label = $inputfield->getSetting('label');\n\t\t\t\tif(!strlen($label) && $inputfield->skipLabel != Inputfield::skipLabelBlank) $label = $inputfield->attr('name');\n\t\t\t\tif($label || $this->quietMode) {\n\t\t\t\t\t$for = $inputfield->skipLabel || $this->quietMode ? '' : $inputfield->attr('id');\n\t\t\t\t\t// if $inputfield has a property of entityEncodeLabel with a value of boolean FALSE, we don't entity encode\n\t\t\t\t\tif($inputfield->entityEncodeLabel !== false) $label = $inputfield->entityEncode($label);\n\t\t\t\t\t$icon = $inputfield->icon ? str_replace('{name}', $this->sanitizer->name(str_replace(array('icon-', 'fa-'), '', $inputfield->icon)), $markup['item_icon']) : ''; \n\t\t\t\t\t$toggle = $collapsed == Inputfield::collapsedNever ? '' : $markup['item_toggle']; \n\t\t\t\t\tif($inputfield->skipLabel === Inputfield::skipLabelHeader || $this->quietMode) {\n\t\t\t\t\t\t// label only shows when field is collapsed\n\t\t\t\t\t\t$label = str_replace('{out}', $icon . $label . $toggle, $markup['item_label_hidden']); \n\t\t\t\t\t} else {\n\t\t\t\t\t\t// label always visible\n\t\t\t\t\t\t$label = str_replace(array('{for}', '{out}'), array($for, $icon . $label . $toggle), $markup['item_label']); \n\t\t\t\t\t}\n\t\t\t\t\t$headerClass = trim(\"$inputfield->headerClass $classes[item_label]\");\n\t\t\t\t\tif($headerClass) {\n\t\t\t\t\t\tif(strpos($label, '{class}') !== false) {\n\t\t\t\t\t\t\t$label = str_replace('{class}', ' ' . $headerClass, $label); \n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$label = preg_replace('/( class=[\\'\"][^\\'\"]+)/', '$1 ' . $headerClass, $label, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if(strpos($label, '{class}') !== false) {\n\t\t\t\t\t\t$label = str_replace('{class}', '', $label); \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($useColumnWidth) {\n\t\t\t\t\t$columnWidth = (int) $inputfield->getSetting('columnWidth');\n\t\t\t\t\t$columnWidthAdjusted = $columnWidth + ($columnWidthTotal ? -1 * $columnWidthSpacing : 0);\n\t\t\t\t\tif($columnWidth >= 9 && $columnWidth <= 100) {\n\t\t\t\t\t\t$ffAttrs['class'] .= ' ' . $classes['item_column_width'];\n\t\t\t\t\t\tif(!$columnWidthTotal) $ffAttrs['class'] .= ' ' . $classes['item_column_width_first'];\n\t\t\t\t\t\t$ffAttrs['style'] = \"width: $columnWidthAdjusted%;\";\n\t\t\t\t\t\t$columnWidthTotal += $columnWidth;\n\t\t\t\t\t\t//if($columnWidthTotal >= 100 && !$requiredIf) $columnWidthTotal = 0; // requiredIf meant to be a showIf?\n\t\t\t\t\t\tif($columnWidthTotal >= 100) $columnWidthTotal = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$columnWidthTotal = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(!isset($ffAttrs['id'])) $ffAttrs['id'] = 'wrap_' . $inputfield->attr('id'); \n\t\t\t\t$ffAttrs['class'] = str_replace('Inputfield_ ', '', $ffAttrs['class']); \n\t\t\t\tif($inputfield->wrapClass) $ffAttrs['class'] .= \" \" . $inputfield->wrapClass; \n\t\t\t\tforeach($inputfield->wrapAttr() as $k => $v) {\n\t\t\t\t\tif(!empty($ffAttrs[$k])) {\n\t\t\t\t\t\t$ffAttrs[$k] .= \" $v\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$ffAttrs[$k] = $v;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tforeach($ffAttrs as $k => $v) {\n\t\t\t\t\t$k = $this->entityEncode($k);\n\t\t\t\t\t$v = $this->entityEncode(trim($v));\n\t\t\t\t\t$attrs .= \" $k='$v'\";\n\t\t\t\t}\n\t\t\t\t$markupItemContent = $markup['item_content'];\n\t\t\t\t$contentClass = trim(\"$inputfield->contentClass $classes[item_content]\");\n\t\t\t\tif($contentClass) {\n\t\t\t\t\tif(strpos($markupItemContent, '{class}') !== false) {\n\t\t\t\t\t\t$markupItemContent = str_replace('{class}', ' ' . $contentClass, $markupItemContent); \n\t\t\t\t\t} else {\n\t\t\t\t\t\t$markupItemContent = preg_replace('/( class=[\\'\"][^\\'\"]+)/', '$1 ' . $contentClass, $markupItemContent, 1);\n\t\t\t\t\t}\n\t\t\t\t} else if(strpos($markupItemContent, '{class}') !== false) {\n\t\t\t\t\t$markupItemContent = str_replace('{class}', '', $markupItemContent); \n\t\t\t\t}\n\t\t\t\tif($inputfield->className() != 'InputfieldWrapper') $ffOut = str_replace('{out}', $ffOut, $markupItemContent); \n\t\t\t\t$out .= str_replace(array('{attrs}', '{out}'), array(trim($attrs), $label . $ffOut), $markup['item']); \n\t\t\t\t$lastInputfield = $inputfield;\n\t\t\t}\n\t\t}\n\n\t\tif($out) {\n\t\t\t$ulClass = $classes['list'];\n\t\t\tif($columnWidthTotal || ($lastInputfield && $lastInputfield->columnWidth >= 10 && $lastInputfield->columnWidth < 100)) {\n\t\t\t\t$ulClass .= ' ' . $classes['list_clearfix'];\n\t\t\t}\n\t\t\t$attrs = \"class='$ulClass'\"; // . ($this->attr('class') ? ' ' . $this->attr('class') : '') . \"'\";\n\t\t\tif(!($this instanceof InputfieldForm)) {\n\t\t\t\tforeach($this->getAttributes() as $attr => $value) {\n\t\t\t\t\tif(strpos($attr, 'data-') === 0) $attrs .= \" $attr='\" . $this->entityEncode($value) . \"'\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$out = $this->attr('value') . str_replace(array('{attrs}', '{out}'), array($attrs, $out), $markup['list']); \n\t\t}\n\n\t\treturn $out; \n\t}", "title": "" }, { "docid": "212f974f3004722b6179d4f89fbc8ec2", "score": "0.6192109", "text": "public function __toString() {\n\n\t\t$template = TemplateHandler::getInstance();\n\n\t\treturn $template->toString( 'field.twig', [\n\t\t\t'fieldType' => 'group',\n\t\t\t'before' => $this->getData( 'before' ),\n\t\t\t'after' => $this->getData( 'after' ),\n\t\t\t'beforeField' => $this->getData( 'before_field' ),\n\t\t\t'afterField' => $this->getData( 'after_field' ),\n\t\t\t'content' => $template->toString( 'fieldset.twig', [\n\t\t\t\t'legend' => $this->getData( 'label' ),\n\t\t\t\t'atts' => $this->getData( 'atts', [] ),\n\t\t\t\t'content' => $this->_container->__toString(),\n\t\t\t] ),\n\t\t] );\n\n\t}", "title": "" }, { "docid": "02b12d60be3600d0d6c6d07bb5d3d70d", "score": "0.6181455", "text": "public function renderInput()\n\t{\n\t\tif(isset(self::$coreTypes[$this->type]))\n\t\t{\n\t\t\t$method=self::$coreTypes[$this->type];\n\t\t\tif(strpos($method,'List')!==false)\n\t\t\t\treturn CHtml::$method($this->getParent()->getModel(), $this->name, $this->items, $this->attributes);\n\t\t\telse\n\t\t\t\treturn CHtml::$method($this->getParent()->getModel(), $this->name, $this->attributes);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$attributes=$this->attributes;\n\t\t\t$attributes['model']=$this->getParent()->getModel();\n\t\t\t$attributes['attribute']=$this->name;\n\t\t\tob_start();\n\t\t\t$this->getParent()->getOwner()->widget($this->type, $attributes);\n\t\t\treturn ob_get_clean();\n\t\t}\n\t}", "title": "" }, { "docid": "adabc601d32a8ec76a7331e93d5b5e8d", "score": "0.617514", "text": "private function inputText() { \n\n\t\t//check if we have been passed a closure\n\t\tif (is_callable($this->input['value'])) {\n\t\t\t$this->input['value'] = $this->input['value']();\n\t\t}\n\n\t\t$this->structureControlGroupOpen();\n\t\t$this->textLabelOpen();\n\t\t$this->textLabelClose();\n\t\t$this->structureControlOpen();\t\t\t\t\n\t\t$this->structureAddon('prepend');\n\n\t\t//add our input to the form string\n\t\t$this->form_build[] = '<input ' . $this->attrKeyValue($this->input, array('label', 'help', 'multiple', 'inline')) . ' />';\n\n\t\t$this->structureAddon('append');\n\t\t$this->structureControlClose();\n\t\t//put the help outside the control incase of errors (which wont show otherwise)\n\t\t$this->textHelp();\n\t\t$this->structureControlGroupClose();\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "5fa53a7eae922aef752db916ea32f199", "score": "0.6166255", "text": "protected function getInput()\n {\n return $this->input;\n }", "title": "" }, { "docid": "5fa53a7eae922aef752db916ea32f199", "score": "0.6166255", "text": "protected function getInput()\n {\n return $this->input;\n }", "title": "" }, { "docid": "bc4abc938aa3e5143494979e95e45f5f", "score": "0.61605895", "text": "public function render()\n {\n return view('components.forms.input', [\n \"name\" => $this->name, \"type\" => $this->type, \"placeholder\" => $this->placeholder,\n \"value\" => $this->value, \"required\" => $this->required , \"disabled\" => $this->disabled]);\n }", "title": "" }, { "docid": "1ef4ac09331361ea1da2f0e0c0070e55", "score": "0.6155613", "text": "function display_input_tag(page $page, mode $mode, driver_record $parent) {//field\n //\n //Display the input value of the current element. Typically this is an\n //input box wth the value, a checkbox with correct check, etc.\n //\n //The display is going to be driven by $this->element with the following \n //arguments: $this, $mode, $parent\n //\n $fname = $this->name;\n //\n echo \"<input\";\n //\n //Set the input type\n echo \" type='{$this->get_type()}' \";\n //\n echo \" name='$fname'\";\n //\n //Retrieve the (input) value of this field from the parent record's \n //property that matches the field name\n $value = isset($parent->values->$fname) ? $parent->values->$fname : \"\";\n //\n //Display the input value\n echo \" value='$value'\";\n //\n //Echo the hidden status\n echo $mode->hidden(mode::input);\n //\n //Close the input\n echo \" />\";\n }", "title": "" }, { "docid": "dafcd093fc577946273587e5e33df081", "score": "0.6155094", "text": "public function input()\r\n {\r\n print(\"<input\");\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "8d6627ec82891388f6cc29bc02b38410", "score": "0.6150125", "text": "public function render() {\n \n $this->enqueue_scripts();\n if( $this->form instanceof Formelement_Repeatable ) {\n\t return $this->render_repeatable();\n\t}\n\tparent::render();\n\tob_start();\n $this->options['textarea_name'] = $this->name( false );\n\twp_editor( $this->get_value(), $this->get_id(), $this->get_options() );\n $editor = ob_get_clean();\n\treturn $this->get_before() . $this->get_label() . $editor . $this->get_message() . $this->get_comment( '<p class=\"description\">%s</p>' ) . $this->get_after();\n }", "title": "" }, { "docid": "caedcec0a4f873600305d4144ef2cac6", "score": "0.614659", "text": "public function getInput()\n {\n return $this->input;\n }", "title": "" }, { "docid": "caedcec0a4f873600305d4144ef2cac6", "score": "0.614659", "text": "public function getInput()\n {\n return $this->input;\n }", "title": "" }, { "docid": "caedcec0a4f873600305d4144ef2cac6", "score": "0.614659", "text": "public function getInput()\n {\n return $this->input;\n }", "title": "" }, { "docid": "caedcec0a4f873600305d4144ef2cac6", "score": "0.614659", "text": "public function getInput()\n {\n return $this->input;\n }", "title": "" }, { "docid": "caedcec0a4f873600305d4144ef2cac6", "score": "0.614659", "text": "public function getInput()\n {\n return $this->input;\n }", "title": "" }, { "docid": "caedcec0a4f873600305d4144ef2cac6", "score": "0.614659", "text": "public function getInput()\n {\n return $this->input;\n }", "title": "" }, { "docid": "caedcec0a4f873600305d4144ef2cac6", "score": "0.614659", "text": "public function getInput()\n {\n return $this->input;\n }", "title": "" }, { "docid": "628774407acaf78bf5191c8930aec950", "score": "0.6134794", "text": "protected function getInput() {\n $html = array();\n $attr = '';\n\n // Initialize some field attributes.\n $attr .= $this->element['class'] ? ' class=\"' . (string) $this->element['class'] . '\"' : '';\n\n // To avoid user's confusion, readonly=\"true\" should imply disabled=\"true\".\n if ((string) $this->element['readonly'] == 'true' || (string) $this->element['disabled'] == 'true') {\n $attr .= ' disabled=\"disabled\"';\n }\n\n $attr .= $this->element['size'] ? ' size=\"' . (int) $this->element['size'] . '\"' : '';\n $attr .= $this->multiple ? ' multiple=\"multiple\"' : '';\n $attr .= $this->required ? ' required=\"required\" aria-required=\"true\"' : '';\n\n // Initialize JavaScript field attributes.\n $attr .= $this->element['onchange'] ? ' onchange=\"' . (string) $this->element['onchange'] . '\"' : '';\n\n // Get the field options.\n $options = (array) $this->getOptionsByQuery((string) $this->element['queryaccess']);\n\n // Create a read-only list (no name) with a hidden input to store the value.\n if ((string) $this->element['readonly'] == 'true') {\n $html[] = JHtml::_('select.genericlist', $options, '', trim($attr), 'value', 'text', $this->value, $this->id);\n $html[] = '<input type=\"hidden\" name=\"' . $this->name . '\" value=\"' . $this->value . '\"/>';\n }\n // Create a regular list.\n else {\n $html[] = JHtml::_('select.genericlist', $options, $this->name, trim($attr), 'value', 'text', $this->value, $this->id);\n }\n $options = (array) $this->getOptionsByQuery((string) $this->element['queryorganism']);\n $html[] = JHtml::_('select.genericlist', $options, \"organisms\", trim($attr), 'value', 'text', null, null);\n\n $options = (array) $this->getOptionsByQuery((string) $this->element['queryuser']);\n $html[] = JHtml::_('select.genericlist', $options, \"users\", trim($attr), 'value', 'text', null, null);\n\n $html [] = '\nfunction enableAccessScope(){\n // hide fields\n jQuery(\"#organisms, #users, #categories\").hide();\n \n // public case\n if(jQuery(\"#jform_accessscope_id\").val() == 1){\n // reset fields\n jQuery(\"#jform_users, #jform_organisms, #jform_categories\").val(\"\").trigger(\"liszt:updated\");\n }\n // organism case\n else if(jQuery(\"#jform_accessscope_id\").val() == 2){\n jQuery(\"#organisms\").show();\n // reset fields\n jQuery(\"#jform_users, #jform_categories\").val(\"\").trigger(\"liszt:updated\");\n }\n // user case\n else if(jQuery(\"#jform_accessscope_id\").val() == 3){\n jQuery(\"#users\").show();\n // reset fields\n jQuery(\"#jform_organisms, #jform_categories\").val(\"\").trigger(\"liszt:updated\");\n }\n // category case\n else if(jQuery(\"#jform_accessscope_id\").val() == 4){\n jQuery(\"#categories\").show();\n // reset fields\n jQuery(\"#jform_users, #jform_organisms\").val(\"\").trigger(\"liszt:updated\");\n }\n}\n';\n return implode($html);\n }", "title": "" }, { "docid": "e801f5023bfe1c328286c643961ebe0b", "score": "0.61188483", "text": "function mg_makeInputTextTag( $id, $label, $type, $code, $filter, $req, $col, $uid )\n{\n $out = \"\"; $info = \"\";\n if( strcmp($req, 'required')==0 ){ \n $info = \" <abbr class='mg_asterisk' title='required'> *</abbr>\"; \n }\n\n $lbl = str_replace(\"[q]\",\"'\",$label);\n\n $out .= \"<div class='form-group'><div class='col-sm-3'>\";\n $out .= \"<div class='input-group input-group-icon'>\";\n $out .= \"<label class='mg_control-label'>\".$lbl;\n\n $out .= $info;\n $out .= \"</label>\"; \n\n $out .= \"</div></div>\";\n\n $out .= \"<div class='col-sm-6 col-xs-12'>\";\n $out .= \"<label style='display:none' class='idfield' id='\".$code.$id.\"'></label>\";\n $out .= \"<input type='\".$type.\"' id='\".$uid.\"' placeholder='\".$label.\"' class='mg_form-control miglaNumAZ \".$code.\" \".$req.\"'/>\";\n $out .= \"</div>\";\n $out .= \"<div class='col-sm-3 hidden-xs'></div></div>\";\n\n return $out;\n}", "title": "" }, { "docid": "73186dfff0f67f2de4788bec2698e120", "score": "0.6116402", "text": "public function form_field_input( $args ){\n if( !is_array( $args ) || empty($args) ) return false;\n $input = empty( $wrap = $this->__wrapper( $args ) ) ? '' : $wrap[ 0 ] ;\n $input .= '<input ';\n foreach( $args as $key => $val ){\n if(method_exists( $this, '_'.$key) ){\n $input .= $this->{'_'.$key}( $args );\n }\n }\n $input .= isset( $args[ 'class' ] ) ? '' : $this->_class( $args );\n $input .= ' />';\n $input .= $this->__helpBlock( $args );\n $input .= empty( $wrap = $this->__wrapper( $args ) ) ? '' : $wrap[ 1 ] ;\n \n return $input;\n }", "title": "" }, { "docid": "56dc2e4029d04537521a107233b68a9e", "score": "0.6112112", "text": "function get_input_element(){\n //\n //\n //Fields named 'valid' or prefixed by is_ are boolean \n if ($this->name=='valid'){\n return new input_checkbox($this);\n }\n //\n //Interger fields of size will be considered boolean\n if (isset($this->length) && $this->length==1){\n return new input_checkbox($this);\n }\n //\n //Any field longer than 100 characters witth be considered a text area\n if (isset($this->length) && $this->length>100){\n return new input_textarea($this);\n }\n //\n //By default, the input tag will be used for capruring inputs\n return new input($this);\n }", "title": "" }, { "docid": "876448b6a9ff52df332becf8a53244f0", "score": "0.610537", "text": "public function toString()\n\t{\n return '<input type=\"' . $this->_type . '\" ' . $this->mergeAttribute() . '/>';\n }", "title": "" }, { "docid": "fc793bd13f803b6009e53f7b64b23252", "score": "0.608625", "text": "public function render()\n\t{\n\t\t$input =<<<HTML\n\t\t<input type=\"text\" name=\"$this->name\" value=\"$this->value\" />\nHTML;\n\n\t\techo $input;\n\t}", "title": "" }, { "docid": "15ba0e0d307ff26ad847d9a9afd1825d", "score": "0.60831904", "text": "public function render ()\n\t{\n\t\t$id = '';\n\t\tif (strpos($this->attrs, 'id=\"') === FALSE)\n\t\t{\n\t\t\t$name = Form::create_id($this->name);\n\t\t\t$id = ($this->type == 'radio') ? ' id=\"'.$name.'_'.str_replace(' ', '_', $this->value).'\"' : ' id=\"'.$name.'\"';\n\t\t}\n\t\t$this->attrs = str_replace('id=\"\"', '', $this->attrs);\n\t\t\n\t\t$str = \"<input type=\\\"\".$this->type.\"\\\" name=\\\"\".$this->name.\"\\\"\".$id.\" value=\\\"\".$this->value.\"\\\"\".$this->attrs.\" />\";\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "caf8cb357736b3165ea6aca2cbde3aa6", "score": "0.60781294", "text": "abstract public function getFrontEndInputHtml($value, array $renderingOptions = null): \\Twig_Markup;", "title": "" }, { "docid": "07afc2c7ef6c3162e3f9c1befa650505", "score": "0.6077915", "text": "protected function getInput()\n\t{\n\t\tif ((int)$this->form->getValue('id') == 0 && $this->value == '') {\n\t\t\t// default to default connection on new form where no value specified\n\t\t\t$options = (array) $this->getOptions();\n\t\t\tforeach ($options as $opt) {\n\t\t\t\tif ($opt->default == 1) {\n\t\t\t\t\t$this->value = $opt->value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ((int)$this->form->getValue('id') == 0 || !$this->element['readonlyonedit']) {\n\t\t\treturn parent::getInput();\n\t\t} else {\n\t\t\t$options = (array)$this->getOptions();\n\t\t\t$v = '';\n\t\t\tforeach ($options as $opt) {\n\t\t\t\tif ($opt->value == $this->value) {\n\t\t\t\t\t$v = $opt->text;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn '<input type=\"hidden\" value=\"'.$this->value.'\" name=\"'.$this->name.'\" />'.\n\t\t'<input type=\"text\" value=\"'.$v.'\" name=\"connection_justalabel\" class=\"readonly\" readonly=\"true\" />';\n\t}", "title": "" }, { "docid": "548147c15baafe6ac27a6c4475dba3ab", "score": "0.60717934", "text": "protected function getInput()\n {\n\n\t\t$html = array();\n\t \t$video = $this->value;\n\t \t//FIX add additional tests\n \t\tif (strpos($video,'/') !== false) {\n \t\t\t$vstringerror = 1;\n\t\t}\n\t\t$inputpl = 'e.g. kfEy-XpGj2U'; \n\t\t$inputst = '<table><tr><td valign=\"top\"><input name=\"' . $this->name . '\" type=\"text\" size=\"20\" maxlength=\"20\" value=\"' . $video . '\" placeholder = \"' . $inputpl .'\" ></td></tr>';\n\t\t$videost = '<tr><td><iframe width=\"220\" height=\"165\" src=\"//www.youtube.com/embed/' . $video . '?rel=0\" frameborder=\"0\" allowfullscreen></iframe></td><td><a href=\"http://www.youtube.com\" target=\"_blank\">&nbsp;&nbsp;Open<br/>&nbsp;&nbsp;Youtube</a></td></tr></table>';\n\t\t \n \t\tif (empty($video)){\n \t\t\t$html[] = $inputst . '</table>';\n \t\t}\n \t\t\n \t\tif ((!empty($video)) && (!$vstringerror)) {\n\t\t\t$html[] = $inputst;\n\t\t\t$html[] .= $videost;\n\t\t}\n\t\t\n\t\t\n return implode($html);\n\n\t}", "title": "" }, { "docid": "47b55ac970bc14edc5f1de588f00fe29", "score": "0.6071676", "text": "public function buildInput() {\n\t\t$element = $this->getElement();\n\t\t$element->setAttrib('class', 'cell');\n\t\t$helper = $element->helper;\n\t\t$output = $element->getView()->$helper( $element->getName(),$element->getValue(),$element->getAttribs(),$element->options);\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "54ee1cff389df79a7646714a3ca05872", "score": "0.6071674", "text": "protected function getInput()\n\t{\n\t\t// Switch the layouts\n\t\t$this->layout = $this->control === 'simple' ? $this->layout . '.simple' : $this->layout . '.advanced';\n\n\t\t// Trim the trailing line in the layout file\n\t\treturn rtrim($this->getRenderer($this->layout)->render($this->getLayoutData()), PHP_EOL);\n\t}", "title": "" }, { "docid": "6291a55011f8cec0fdb775dd623c8b12", "score": "0.60683584", "text": "public function get_content() {\n\t\tif (is_callable($this->content)) {\n\t\t\t$content = call_user_func_array($this->content, array($this));\n\t\t} else {\n\t\t\t$content = $this->content;\n\t\t}\n\n\t\treturn apply_filters('audition_get_form_field_content', $content, $this);\n\t}", "title": "" }, { "docid": "b04d0ae5a202aa59cef7827ad800a2ee", "score": "0.60678595", "text": "public function render()\r\n {\r\n $name = $this->getName();\r\n if ($this->getSize() > $this->getMaxcols()) {\r\n $maxcols = 5;\r\n } else {\r\n $maxcols = $this->getSize();\r\n }\r\n $class = ($this->getClass() != '' ? \" class='span\" . $maxcols . \" \" . $this->getClass() . \"'\" : \" class='span\" . $maxcols . \"'\");\r\n $list = ($this->isDatalist() != '' ? \" list='list_\" . $name . \"'\" : '');\r\n $pattern = ($this->getPattern() != '' ? \" pattern='\" . $this->getPattern() . \"'\" : '');\r\n $placeholder = ($this->getPlaceholder() != '' ? \" placeholder='\" . $this->getPlaceholder() . \"'\" : '');\r\n $extra = ($this->getExtra() != '' ? \" \" . $this->getExtra() : '');\r\n $required = ($this->isRequired() ? ' required' : '');\r\n return \"<input type='email' name='\" . $name . \"' title='\" . $this->getTitle() . \"' id='\" . $name . \"'\" . $class .\" maxlength='\" . $this->getMaxlength() . \"' value='\" . $this->getValue() . \"'\" . $list . $pattern . $placeholder . $extra . $required . \">\";\r\n }", "title": "" }, { "docid": "a2c54182890c44931808b403d647ef1d", "score": "0.6051158", "text": "public function render_content() {\r\n\t\t\t?>\r\n\t\t\t<label>\r\n\t\t\t\t<span class=\"customize-control-title\">\r\n\t\t\t\t\t<?php echo esc_html( $this->label ); ?>\r\n\t\t\t\t</span>\r\n\t\t\t\t<div class=\"input-group icp-container\">\r\n\t\t\t\t\t<span class=\"input-group-addon\"><i class=\"iconpicker-component <?php echo esc_attr( $this->value() ); ?>\"></i></span>\r\n\t\t\t\t\t<input data-placement=\"bottomRight\" class=\"icp icp-auto bst_icon_picker\" <?php $this->link(); ?> value=\"<?php echo esc_attr( $this->value() ); ?>\" type=\"text\">\r\n\t\t\t\t\t<span class=\"input-group-addon\" style=\"display: none;\"></span>\r\n\t\t\t\t</div>\r\n\t\t\t</label>\r\n\t\t\t<?php\r\n\t\t}", "title": "" }, { "docid": "fd35f917eb5f7d500b1c11de1564314c", "score": "0.60351425", "text": "public function getInputView()\n {\n if ($view = parent::getInputView()) {\n return $view;\n }\n\n if ($this->isPicker()) {\n return 'anomaly.field_type.datetime::picker';\n }\n\n return 'anomaly.field_type.datetime::input';\n }", "title": "" }, { "docid": "94d9c2d793caf1c8b7915ef63d36465c", "score": "0.6034722", "text": "public function getHtml()\n {\n return $this->input('html');\n }", "title": "" }, { "docid": "62eeffc0f475ab56f04fcd6e20c16b08", "score": "0.60299313", "text": "public function render()\n {\n return view('components.form.input');\n }", "title": "" }, { "docid": "6a8493ee77e86880e2ec7763e6d4bdf1", "score": "0.6028073", "text": "public function html() {\n\t\techo '<input type=\"text\" name=\"' .\n\t\t\tesc_attr( $this->name ) .\n\t\t\t'\" value=\"' .\n\t\t\tesc_attr( get_option( $this->name, $this->default_value ) ) .\n\t\t\t'\" class=\"regular-text\">';\n\t}", "title": "" }, { "docid": "776469ba18367999b9d4d5145f36b53e", "score": "0.6022209", "text": "public function fields() {\n\t\treturn apply_filters( 'tf_module_prev_next_post_fields', array(\n\t\t\t'prev_post_label' => array(\n\t\t\t\t'type' => 'text',\n\t\t\t\t'label' => __( 'Prev Post Label', 'themify-flow' ),\n\t\t\t\t'class' => 'tf_input_width_70',\n\t\t\t),\n\t\t\t'next_post_label' => array(\n\t\t\t\t'type' => 'text',\n\t\t\t\t'label' => __( 'Next Post Label', 'themify-flow' ),\n\t\t\t\t'class' => 'tf_input_width_70',\n\t\t\t),\n\t\t\t'show_arrow' => array(\n\t\t\t\t'type' => 'radio',\n\t\t\t\t'label' => __( 'Show Arrow Icon', 'themify-flow' ),\n\t\t\t\t'options' => array(\n\t\t\t\t\tarray( 'name' => __( 'Yes', 'themify-flow' ), 'value' => 'yes', 'selected' => true ),\n\t\t\t\t\tarray( 'name' => __( 'No', 'themify-flow' ), 'value' => 'no' ),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'in_same_cat' => array(\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => __( 'Same Category', 'themify-flow' ),\n\t\t\t\t'text' => __( 'Show only from the same category', 'themify-flow' ),\n\t\t\t),\n\t\t) );\n\t}", "title": "" }, { "docid": "5f4d97842899fcc25e0cc4adf6082483", "score": "0.6016339", "text": "public function getRendered()\n {\n return $this->formElement;\n }", "title": "" }, { "docid": "5f4d97842899fcc25e0cc4adf6082483", "score": "0.6016339", "text": "public function getRendered()\n {\n return $this->formElement;\n }", "title": "" }, { "docid": "5f4d97842899fcc25e0cc4adf6082483", "score": "0.6016339", "text": "public function getRendered()\n {\n return $this->formElement;\n }", "title": "" }, { "docid": "171276cd5c05e99a116e34dccd0e7638", "score": "0.60150856", "text": "public function show()\n {\n // atribui as propriedades da TAG\n $tag = new Element('input');\n $tag->class = 'field';\t\t // classe CSS\n $tag->name = $this->name; // nome da TAG\n $tag->value = $this->value; // valor da TAG\n $tag->type = 'password'; // tipo do input\n $tag->style = \"width:{$this->size}\"; // tamanho em pixels\n \n // se o campo não é editável\n if (!parent::getEditable()) {\n $tag->readonly = '1';\n }\n \n if ($this->properties) {\n foreach ($this->properties as $property=>$value) {\n $tag->$property = $value;\n }\n }\n \n // exibe a tag\n $tag->show();\n }", "title": "" }, { "docid": "0cf6791d07556569d057b618c0065b0c", "score": "0.6013543", "text": "protected function getField( $aField ) {\r\n //$this->aField = $aField;\r\n $this->init($aField);\r\n return\r\n $aField['before_label']\r\n . $aField['before_input']\r\n . \"<div class='repeatable-field-buttons'></div>\"\t// the repeatable field buttons will be replaced with this element.\r\n . $this->_getInputs( $aField )\r\n #.'XX'\r\n . $aField['after_input']\r\n . $aField['after_label'];\r\n }", "title": "" }, { "docid": "d9b9697523579dc79d9429e6506be258", "score": "0.6013199", "text": "protected function getInput()\n\t{\n\t\tif (empty($this->layout))\n\t\t{\n\t\t\tthrow new \\UnexpectedValueException(sprintf('%s has no layout assigned.', $this->name));\n\t\t}\n\n\t\treturn $this->getRenderer($this->layout)->render($this->getLayoutData());\n\t}", "title": "" }, { "docid": "d9b9697523579dc79d9429e6506be258", "score": "0.6013199", "text": "protected function getInput()\n\t{\n\t\tif (empty($this->layout))\n\t\t{\n\t\t\tthrow new \\UnexpectedValueException(sprintf('%s has no layout assigned.', $this->name));\n\t\t}\n\n\t\treturn $this->getRenderer($this->layout)->render($this->getLayoutData());\n\t}", "title": "" }, { "docid": "d34ed6096b9a88343bb963493c73c6d4", "score": "0.60052794", "text": "public function Field($properties = array())\n {\n if ($this->value) {\n $val = Convert::raw2xml($this->value);\n $val = _t('SilverStripe\\\\Forms\\\\CurrencyField.CURRENCYSYMBOL', '$') . number_format(preg_replace('/[^0-9.-]/', \"\", $val), 2);\n $valforInput = Convert::raw2att($val);\n } else {\n $valforInput = '';\n }\n return \"<input class=\\\"text\\\" type=\\\"text\\\" disabled=\\\"disabled\\\"\"\n . \" name=\\\"\" . $this->name . \"\\\" value=\\\"\" . $valforInput . \"\\\" />\";\n }", "title": "" }, { "docid": "62f0c0f087ec58ee3d41be5528d3d836", "score": "0.60008824", "text": "protected function getField( $aField ) { \n\n\t\treturn \n\t\t\t$aField['before_label']\n\t\t\t. $aField['before_input']\n\t\t\t. \"<div class='repeatable-field-buttons'></div>\"\t// the repeatable field buttons will be replaced with this element.\n\t\t\t. $this->_getInputs( $aField )\n\t\t\t. $aField['after_input']\n\t\t\t. $aField['after_label'];\n\t\t\n\t}", "title": "" }, { "docid": "15df0c156bcec4d68c2b6465c47362fc", "score": "0.59983766", "text": "public function renderBasic() {\n $html = \"<input type='number'\";\n $html .= \" \" . $this->getCompiledAttributes(\"form-control\");\n $html .= \">\";\n return $html;\n }", "title": "" }, { "docid": "d7d79dae4196a36b209ba3cf99eac1a0", "score": "0.5997101", "text": "function toHtml()\r\n {\r\n if ($this->getAttribute('label') != '') \r\n {\r\n $arr_return['label'] = '<label for=\"{attr_id}\">'.$this->getAttribute('label').'</label>';\r\n }\r\n $arr_return['html'] = '<input {attr_name=attr_value} {extra_attr} />';\r\n \r\n return $arr_return;\r\n }", "title": "" }, { "docid": "3266c5ff0574c3e6a4c1595d1742041e", "score": "0.59890914", "text": "function makeInput($fieldname){\n\n return '<input type=\"'.$this->form_array[$fieldname]['type'].'\" name=\"'.$fieldname.'\" id=\"'.$fieldname.'\" value=\"'.$this->filtered_array[$fieldname].'\" placeholder=\"'.$this->form_array[$fieldname]['placeholder'].'\" class=\"col2\"/>';\n\n }", "title": "" }, { "docid": "2e89bd13ae82bfce96ae6ad7970e173d", "score": "0.5988078", "text": "private function makeInput(){\n $details = '';\n \n //class logic\n if($this->_form && isset($this->_buttons[0])){$details .= ' class=\"form-control edit-field\"';}\n elseif(isset($this->_buttons[0])){$details .= ' class=\"edit-field\"';}\n elseif($this->_form){$details .= ' class=\"form-control\"';}\n \n if($this->_showDetails){$details .= ' id=\"'. $this->_id . '\" name=\"' . $this->_name . '\"';}\n if($this->_disabled){$details .= \" disabled\";}\n if($this->_multiple){$details .= \" multiple\";}\n $content = '<'. $this->_type .''. $details .'>';\n \n foreach($this->_option_array as $value => $text){\n \n if($value == $this->_selected){\n $sel_str = ' selected';\n }\n \n else {\n $sel_str = '';\n }\n \n $this_option = ' <option value=\"' . $value . '\"' . $sel_str . '>';\n $this_option .= $text . '</option>';\n\n $content .= '\n '. $this_option . '';\n }\n $content .= '\n </select>';\n foreach($this->_buttons as $button){\n $content .='\n '. $button .'';\n }\n return $content;\n }", "title": "" } ]
48a363e31145bf2cc033f381418b96db
Add the updates only make them visible if the user has manage options permission and the site is the main site of the network
[ { "docid": "83688a0b43ce0eae2d0ff17547814733", "score": "0.6056868", "text": "function after_render( &$response ) {\n\t\tif ( current_user_can( 'manage_options' ) && $this->is_main_site( $response ) ) {\n\t\t\t$jetpack_update = $this->get_updates();\n\t\t\tif ( ! empty( $jetpack_update ) ) {\n\t\t\t\t// In previous version of Jetpack 3.4, 3.5, 3.6 we synced the wp_version into to jetpack_updates\n\t\t\t\tunset( $jetpack_update['wp_version'] );\n\t\t\t\t// In previous version of Jetpack 3.4, 3.5, 3.6 we synced the site_is_version_controlled into to jetpack_updates\n\t\t\t\tunset( $jetpack_update['site_is_version_controlled'] );\n\n\t\t\t\t$response['updates'] = $jetpack_update;\n\t\t\t}\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "e5bfc5a8d421adda9920137828c7c4be", "score": "0.6668248", "text": "static function update()\n\t{\n\t\tPiwik::setUserIsSuperUser();\n\t\t$allSiteIds = Piwik_SitesManager_API::getAllSitesId();\n\t\tPiwik_Common::regenerateCacheWebsiteAttributes($allSiteIds);\n\t}", "title": "" }, { "docid": "40cbd149e16f6b26e37a1a31726888a1", "score": "0.66142684", "text": "public function updatesiteInfo(){\r\n\r\n\t\t\r\n\r\n\t}", "title": "" }, { "docid": "2ab30e9895dfdfdeaa7179c73e626a17", "score": "0.6472976", "text": "public function update() {\n if (!Visitor::current()->group->can(\"change_settings\"))\n show_403(__(\"Access Denied\"), __(\"You do not have sufficient privileges to perform the update.\"));\n\n if (isset($_GET['get_update']))\n return $this->display(\"update\",\n array(\"updating\" => Update::get_update()));\n else\n return $this->display(\"update\",\n array(\"changelog\" => Update::get_changelog()));\n }", "title": "" }, { "docid": "0cb2637011dd206ec390aac1e90725a0", "score": "0.6436341", "text": "function update_access_allowed() {\n global $update_free_access, $user;\n\n // Allow the global variable in settings.php to override the access check.\n if (!empty($update_free_access)) {\n return TRUE;\n }\n // Calls to user_access() might fail during the Drupal 6 to 7 update process,\n // so we fall back on requiring that the user be logged in as user #1.\n try {\n require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'user') . '/user.module';\n return user_access('administer software updates');\n }\n catch (Exception $e) {\n return ($user->uid == 1);\n }\n}", "title": "" }, { "docid": "2be674216d55b67847bd919e1b08f29c", "score": "0.6391858", "text": "public function _adminNotices() {\n\n\t\t// get warp xml\n\t\t$xml = $this['dom']->create($this['path']->path('warp:warp.xml'), 'xml');\n\n\t\t// cache writable ?\n\t\tif (!file_exists($this->cache_path) || !is_writable($this->cache_path)) {\n\t\t\t$update['cache'] = \"Cache not writable, please check directory permissions ({$this->cache_path})\";\n\t\t}\n\n\t\t// update check\n\t\tif ($url = $xml->first('updateUrl')->text()) {\n\n\t\t\t// create check urls\n\t\t\t$urls['tmpl'] = sprintf('%s?application=%s&version=%s&format=raw', $url, get_template(), $this->xml->first('version')->text());\n\t\t\t$urls['warp'] = sprintf('%s?application=%s&version=%s&format=raw', $url, 'warp', $xml->first('version')->text());\n\n\t\t\tforeach ($urls as $type => $url) {\n\n\t\t\t\t// only check once a day\n\t\t\t\t$hash = md5($url.date('Y-m-d'));\n\t\t\t\tif ($this['option']->get(\"{$type}_check\") != $hash) {\n\t\t\t\t\tif ($request = $this['http']->get($url)) {\n\t\t\t\t\t\t$this['option']->set(\"{$type}_check\", $hash);\n\t\t\t\t\t\t$this['option']->set(\"{$type}_data\", $request['body']);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// decode response and set message\n\t\t\t\tif (($data = json_decode($this['option']->get(\"{$type}_data\"))) && $data->status == 'update-available') {\n\t\t\t\t\t$update[$type] = $data->message;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\t// show notice\n\t\tif (!empty($update)) {\n\t\t\techo '<div class=\"update-nag\">'.implode('<br>', $update).'</div>';\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "a0e100ad9a7d2b819ea081b70074448f", "score": "0.6391419", "text": "public function action_update_check()\n\t{\n\t \tUpdate::add('Pageless', '9b146781-0ee5-406a-aed5-90d661f76ade', $this->info->version);\n\t}", "title": "" }, { "docid": "1b2cab1f63b73ce4ce371a9e573b6613", "score": "0.6360541", "text": "public function updateToBeVisible()\n {\n $this->update([\n 'live' => true,\n 'approved' => true\n ]);\n }", "title": "" }, { "docid": "007800d9d7e422db6f4d090da2871530", "score": "0.62412906", "text": "private function can_update() {\n\t\t// Don't check for updates on wp-login.php, this happens when you request\n\t\t// an admin page but are not logged in and then redirected to wp-login.php\n\t\tif ( false === wp_validate_auth_cookie() )\n\t\t\treturn false;\n\n\t\t// Don't run on plugin activation/deactivation, request will seem slow\n\t\tforeach ( array( 'activate', 'deactivate', 'activate-multi', 'deactivate-multi' ) as $key ) {\n\t\t\tif ( array_key_exists( $key, $_REQUEST ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Don't check for updates on the following actions\n\t\t$actions = array(\n\t\t\t'mscr_upgrade_diff',\n\t\t\t'mscr_upgrade',\n\t\t\t'mscr_upgrade_run',\n\t\t\t'activate',\n\t\t\t'deactivate',\n\t\t\t'activate-selected',\n\t\t\t'deactivate-selected',\n\t\t);\n\t\tif ( in_array( MSCR_Utils::get( 'action' ), $actions ) )\n\t\t\treturn false;\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "ed56223c36859d6a0f033a80db6cf28d", "score": "0.6190988", "text": "function klyp_remove_access_to_updates()\n{\n // Disallow installing plugins and updates\n define('DISALLOW_FILE_MODS', true);\n define('WP_AUTO_UPDATE_CORE', false);\n}", "title": "" }, { "docid": "5f7a03952996729cc44ed611419395b0", "score": "0.60930765", "text": "public function check_update() {\n /*\n $version = get_option('trackingcodesforwp_version', '0');\n \n if (!version_compare($version, Trackingcodes_for_WP::VERSION, '=')) {\n self::activate(is_multisite() && is_plugin_active_for_network($this->plugin_basename) ? true : false);\n }\n */\n // Do nothing for now\n }", "title": "" }, { "docid": "444fb303e6613f66561c383dacbbd298", "score": "0.60584646", "text": "function network_admin_notices() {\n\t\t\n\t\t$screen = get_current_screen();\n\t\t\t\t\n\t\t// if updated and the right page\n\t\tif ( isset( $_GET['updated'] ) && \n\t\t\t'settings_page_ensemble_video-network' === $screen->id\n\t\t\t) {\n\t\t\t\t\n\t\t\t$message = __( 'Options saved.', 'ensemble_video' );\n\t\t\techo '<div id=\"message\" class=\"updated\"><p>' . $message . '</p></div>';\n\t\t}\n\t}", "title": "" }, { "docid": "a273ddacb90ea39076a0783fdaee76f5", "score": "0.6038676", "text": "public static function update() {\n if (isset($_GET['page']) && preg_match('/shareaholic/', $_GET['page'])) {\n if (!ShareaholicUtilities::has_accepted_terms_of_service()) {\n add_action('admin_notices', array('ShareaholicAdmin', 'show_terms_of_service'));\n } else {\n if (ShareaholicUtilities::get_version() != self::VERSION) {\n ShareaholicUtilities::log_event(\"Upgrade\", array ('previous_plugin_version' => ShareaholicUtilities::get_version()));\n ShareaholicUtilities::perform_update();\n ShareaholicUtilities::set_version(self::VERSION);\n ShareaholicUtilities::notify_content_manager_sitemap();\n ShareaholicUtilities::notify_content_manager_singledomain();\n\n // Call the share counts api to check for connectivity on update\n if (has_action('wp_ajax_nopriv_shareaholic_share_counts_api') && has_action('wp_ajax_shareaholic_share_counts_api')) {\n ShareaholicUtilities::share_counts_api_connectivity_check();\n }\n\n // Activate the Shareaholic Cron job for existing plugin users\n ShareaholicCron::activate();\n }\n }\n }\n }", "title": "" }, { "docid": "7373e3a1a9a22d5a822f133bcafb6271", "score": "0.60235584", "text": "public function check_for_updates() {\n\t\t\tif ( is_admin() ) { \n\t\t\t\trequire_once(plugin_dir_path( FANCY_SH_PLUGIN_FILE ).'classes/autoupdate.php');\n\n\t\t\t\tif (!function_exists('get_plugin_data')) {\n\t\t\t\t\trequire_once(ABSPATH . 'wp-admin/includes/plugin.php');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$current_plugin = get_plugin_data(FANCY_SH_PLUGIN_FILE, $markup = true, $translate = true);\n\t\t\t\t$current_version = $current_plugin['Version'];\n\t\t\t\t//echo \"url: \".$this->modules['FSH_Settings']->settings['update-remote-path'];\n\t\t\t\tnew FSH_Autoupdate($current_version, $this->modules['FSH_Settings']->settings['update-remote-path'], FANCY_SH_PLUGIN_SLUG);\n\t\t\t\t\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "073af1ea8ef4efabfd748d202ac8d7bb", "score": "0.60194576", "text": "private function validateUpdate() {\n\t\t$this->context->checkPermission(\\Scrivo\\AccessController::WRITE_ACCESS);\n\t}", "title": "" }, { "docid": "073af1ea8ef4efabfd748d202ac8d7bb", "score": "0.60194576", "text": "private function validateUpdate() {\n\t\t$this->context->checkPermission(\\Scrivo\\AccessController::WRITE_ACCESS);\n\t}", "title": "" }, { "docid": "6e253db068e00226c580b491913c897f", "score": "0.5964077", "text": "public function authorizePatch()\n {\n return $this->user()->can('scripts.update');\n }", "title": "" }, { "docid": "114467c8f44ba186f92208cf408bb6da", "score": "0.5945345", "text": "public function list_mscr_updates() {\n\t\tif ( empty( $this->updates['updates'] ) ) {\n\t\t\techo '<h3>' . __( 'Mute Screamer', 'mute-screamer' ) . '</h3>';\n\t\t\techo '<p>' . __( 'All files are up to date.', 'mute-screamer' ) . '</p>';\n\t\t\treturn;\n\t\t}\n\n\t\t// TODO: Fix current revision number\n\t\tMSCR_Utils::view( 'admin_update', array( 'files' => $this->updates['updates'] ) );\n\t}", "title": "" }, { "docid": "21fd59b6fd08d2af6930b1d77772e955", "score": "0.59320736", "text": "function nrelate_save_settings() {\n\n\tfunction nrelate_admin_notices() {\n\t\n\t\tif ( (isset($_GET['updated']) && $_GET['updated'] == 'true') || (isset($_GET['settings-updated']) && $_GET['settings-updated'] == 'true') ) {\n\t\t\t\n\t\t\t$msg = __('nrelate settings updated');\n\t\t\t\n\t\t\t$msg = apply_filters( 'nrelate_flush_cache', $msg );\n\t\t\t\n\t\t\techo '<div class=\"updated\"><p><strong>'.$msg.'.</strong></p></div>';\n\t\t\t\n\t\t\tdo_action ('nrelate_settings_updated');\n\t\t}\n\t}\n\tadd_action('admin_notices','nrelate_admin_notices');\n}", "title": "" }, { "docid": "cc0d8cf10d34e2812427ba15d5705018", "score": "0.59149987", "text": "public function action_update_check()\n {\n\t\tUpdate::add( 'Postfields', '228D6060-38F0-11DD-AE16-0800200C9A66', $this->info->version );\n }", "title": "" }, { "docid": "8747aea1064f61d9bbd023c81e92b5cb", "score": "0.591071", "text": "function simple_edits_change(){\n $simple_edits_options = get_option( GSE_SETTINGS_FIELD );\n $simple_edits_options['footer_output_on'] = 1;\n $simple_edits_options['footer_output'] = '[vimm_link]';\n $simple_edits_options['footer_creds_text'] = '';\n $simple_edits_options['footer_backtotop_text'] = '';\n $simple_edits_options['post_meta'] ='[post_categories] [post_tags]';\n $simple_edits_options['post_info']='[post_date] By [post_author_posts_link] [post_comments] [post_edit]';\n update_option( GSE_SETTINGS_FIELD, $simple_edits_options );\n }", "title": "" }, { "docid": "cb1bd96fa6f814e9b27574c53c8edc17", "score": "0.5890274", "text": "function edit_site() {\n $dn = Get_User_Principle();\n $user = \\Factory::getUserService()->getUserByPrinciple($dn);\n\n //Check the portal is not in read only mode, returns exception if it is and user is not an admin\n checkPortalIsNotReadOnlyOrUserIsAdmin($user);\n\n if($_POST) {\n submit($user);\n } else {\n draw($user);\n }\n}", "title": "" }, { "docid": "e52aa91e6d6c156b0c89f26728066a2f", "score": "0.5876837", "text": "public function updateEditForm($form){\n\t\tif($this->modelIsMultiSitesAware()) {\n\t\t\t$managedSites = Multisites::inst()->sitesManagedByMember();\n\t\t\t$source = Site::get()->filter('ID', Multisites::inst()->sitesManagedByMember())->map('ID', 'Title')->toArray();\n\t\t\t$plural = singleton($this->owner->modelClass)->plural_name();\n\t\t\tif(!count($source)){\n\t\t\t\t$form->setFields(FieldList::create(\n\t\t\t\t\tLiteralField::create('NotAManager', \"You do not have permission to manage $plural on any Sites\")\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e4179806dd6f6d3b138e369b52cd2768", "score": "0.5875397", "text": "function hide_updates_nag() {\n\t\tif (!current_user_can('administrator')) {\n\t\t\tremove_action('admin_notices', 'update_nag', 3);\n\t\t}\n\t}", "title": "" }, { "docid": "02004d0a8e1790ec6b711d2d8d793fe0", "score": "0.5874196", "text": "public function check_update() {\n\t\t\t$version = get_option('wpmm_version', '0');\n\n\t\t\tif (!version_compare($version, WP_Maintenance_Mode::VERSION, '=')) {\n\t\t\t\tself::activate(is_multisite() && is_plugin_active_for_network($this->plugin_basename) ? true : false);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "66c203e05874bc5074480e1a5c502d18", "score": "0.58659893", "text": "function maybe_update_capabilities() {\n\t\t$internal_options = $this->internal_options( false );\n\t\tif ( ! isset( $internal_options['version'] ) ) {\n\t\t\t$roles = array('advanced_ads_admin', 'advanced_ads_manager' );\n\t\t\t// add notice if there is at least 1 user with that role\n\t\t\tforeach ( $roles as $role ) {\n\t\t\t\t$users_query = new WP_User_Query( array(\n\t\t\t\t\t'fields' => 'ID',\n\t\t\t\t\t'number' => 1,\n\t\t\t\t\t'role' => $role,\n\t\t\t\t) );\n\t\t\t\tif ( count( $users_query->get_results() ) ) {\n\t\t\t\t\tAdvanced_Ads_Admin_Notices::get_instance()->add_to_queue( 'pro_changed_caps' );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( $role = get_role( 'advanced_ads_admin' ) ) {\n\t\t\t\t$role->add_cap( 'upload_files' );\n\t\t\t\t$role->add_cap( 'unfiltered_html' );\n\t\t\t}\n\t\t\tif ( $role = get_role( 'advanced_ads_manager' ) ) {\n\t\t\t\t$role->add_cap( 'upload_files' );\n\t\t\t\t$role->add_cap( 'unfiltered_html' );\n\t\t\t}\n\n\t\t\t// save new version\n\t\t\t$this->internal_options();\n\t\t}\n\t}", "title": "" }, { "docid": "92112882e33920d5ecf260582c63580c", "score": "0.58566964", "text": "public function update() {\n\n\t\tif ( ! defined( 'IFRAME_REQUEST' ) && ! defined( 'DOING_AJAX' ) && ( get_option( 'wvtg_version' ) !== WVTG_VERSION ) ) {\n\n\t\t\t// Update hook.\n\t\t\tdo_action( 'wvtg_do_update' );\n\n\t\t\t// Update version.\n\t\t\tdelete_option( 'wvtg_version' );\n\t\t\tadd_option( 'wvtg_version', WVTG_VERSION );\n\n\t\t\t// After update hook.\n\t\t\tdo_action( 'wvtg_updated' );\n\t\t}\n\t}", "title": "" }, { "docid": "e3bf00cce9c50a52fab04c16b502b02e", "score": "0.5853058", "text": "public function duplicate_page_settings()\n {\n if (current_user_can('manage_options')) {\n include 'inc/admin-settings.php';\n }\n }", "title": "" }, { "docid": "5480a8428c4456cd29ce372140a3975b", "score": "0.5846072", "text": "public function action_update_check()\n\t{\n\t \tUpdate::add( $this->info->name, $this->info->guid, $this->info->version );\n\t}", "title": "" }, { "docid": "2d06327c501b89797780f1a3b984c56f", "score": "0.58415174", "text": "public function set_robot_permissions() {\n\n\t\tif ( $this->no_scheme_url() === $this->live_url ) {\n\t\t\tupdate_option( 'blog_public', 1 );\n\t\t} else {\n\t\t\tupdate_option( 'blog_public', 0 );\n\t\t}\n\n\t}", "title": "" }, { "docid": "2a01473141d9bd847fe63bd79bcd5b4b", "score": "0.58324045", "text": "function wp_mui_update_option()\r\n{\r\n\tglobal $wp_mui;\r\n\tcheck_admin_referer('wp_mui_insert_users_page');\t\r\n\t$is_visible_fields = true;\r\n\t$option_value = (isset($_POST['option_value']) ? $_POST['option_value'] : \"\");\r\n\tif($_POST['option_name'] == \"show_only_wp_mui_users\" || $_POST['option_name'] == \"autocreate_user\" || $_POST['option_name'] == \"autocreate_pass\" || $_POST['option_name'] == \"rows_per_page\") $is_visible_fields = false;\r\n\t\r\n\t$res['new_value'] = $wp_mui->toggle_setting($_POST['option_name'], $is_visible_fields, $option_value);\r\n\t$res['result'] = \"success\";\r\n\t$res['option_name'] = $_POST['option_name'];\r\n\t\r\n\techo json_encode($res);\r\n\t\r\n\tdie();\r\n}", "title": "" }, { "docid": "506cde2d551e662616a4b4d7650d8c13", "score": "0.58279365", "text": "public function action_update_check()\n\t{\n\t \tUpdate::add( 'AccountManager', '7b0c466c-16fe-4668-8366-50af0ba0dc5a', $this->info->version );\n\t}", "title": "" }, { "docid": "b5c1fc9babb86004d3535e0b102ec7e7", "score": "0.58261776", "text": "public function canBeEdited()\n {\n return true; ///< Every client sees only it's own information\n }", "title": "" }, { "docid": "ae2ea4d60209fae3f3cb32b4e25b7dad", "score": "0.5816024", "text": "public static function update_checker() {\n\t\tif ( empty( self::$update_checker ) || !is_admin() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$update_checker_objects = array();\n\t\t\n\t\t// This is only included if add-ons are installed\n\t\tinclude_once( plugin_dir_path( __FILE__ ) . 'vendor/update-checker/plugin-update-checker.php' );\n\n\t\tforeach ( self::$update_checker as $a_slug ) {\n\t\t\t$a_clean_slug = str_replace( array( 'wp_slimstat_', '_' ), array( '', '-' ), $a_slug );\n\t\t\t\n\t\t\tif ( !empty( self::$settings[ 'addon_licenses' ][ 'wp-slimstat-' . $a_clean_slug ] ) ) {\n\t\t\t\t$update_checker_objects[ $a_clean_slug ] = Puc_v4_Factory::buildUpdateChecker( 'https://www.wp-slimstat.com/update-checker/?slug=' . $a_clean_slug . '&key=' . urlencode( self::$settings[ 'addon_licenses' ][ 'wp-slimstat-' . $a_clean_slug ] ), dirname( dirname( __FILE__ ) ) . '/wp-slimstat-' . $a_clean_slug . '/index.php', 'wp-slimstat-' . $a_clean_slug );\n\n\t\t\t\tadd_filter( \"plugin_action_links_wp-slimstat-{$a_clean_slug}/index.php\", array( __CLASS__, 'add_plugin_manual_download_link' ), 10, 2 );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "2629f5c0d05ebfda3cb0022c15edeaad", "score": "0.5813952", "text": "public function update_web_commision()\n\t{\n\t\t$this->seesion_set();\n\n\t\t//$data=$_POST;\n\t\tif($this->session->userdata('username-admin') || $this->input->cookie('username-admin', false)){\n\t\t\t$permission = $this->permission();\n\t\t\tif(($this->session->userdata('role-admin') == 'admin') || ($permission == \"access\")) {\n\n\t\t\t\t$this->load->view('update_web_commision');\n\t\t\t}else{\n\t\t\t\tredirect('admin/not_admin');\n\t\t\t}\n\t\t}else{\n\t\t\tredirect('admin/index');\n\t\t}\n\t}", "title": "" }, { "docid": "13792e3e2e641e609d7d8239d3916f6e", "score": "0.5795562", "text": "function adm_adminPanel() {\n\t$check = checkPagePermission(ADMIN);\n\tif(!$check) {\n\t\techo \"<pre>Non sei autorizzato a visualizzare questa pagina.<br>Se sei l'amministratore, esegui il login e riprova.</pre>\";\n\t}\n\telse {\n\t\t$siteurl = $_SERVER['PHP_SELF'];\n\t\techo \"<h4>Benvenuto!</h4><br>\";\n\t\techo \"Da qui puoi gestire tutti gli aspetti relativi ad utenti, prenotazioni, lezioni.<br>\nPrima di effettuare qualsiasi operazione che coinvolge un utente potresti aver bisogno di alcuni suoi dati. \nIn tal caso puoi effettuare una ricerca tramite <b><a href=$siteurl?id=cercautente>questa interfaccia</a></b>.<br><br>\";\n\t\techo \"Che tipo di operazione vuoi eseguire?<br>\";\n\t\techo \"<ul>\";\n\t\techo \"<li><a href=$siteurl?id=admincalendar>Visualizza il calendario delle attività in programma</a>\";\n\t\techo \"<li><a href=$siteurl?id=adminprenotazioni>Prenota una sala per un utente</a>\";\n\t\techo \"<li><a href=$siteurl?id=adminlezioni>Fissa una lezione</a>\";\n\t\techo \"<li><a href=$siteurl?id=adminutenti>Gestisci utenti</a>\";\n\t\techo \"</ul>\";\n\t}\n}", "title": "" }, { "docid": "9d3db99972c0ef01e87877ef0b868018", "score": "0.57721597", "text": "public function canUpdate();", "title": "" }, { "docid": "9d3db99972c0ef01e87877ef0b868018", "score": "0.57721597", "text": "public function canUpdate();", "title": "" }, { "docid": "9d3db99972c0ef01e87877ef0b868018", "score": "0.57721597", "text": "public function canUpdate();", "title": "" }, { "docid": "410ef6b791e437094da8e81b1591a804", "score": "0.5770309", "text": "function update_settings( $settings ) {\n\t\t\tupdate_option( 'issuem-leaky-paywall', $settings );\n\t\t\tif ( $this->is_site_wide_enabled() ) {\n\t\t\t\tupdate_site_option( 'issuem-leaky-paywall', $settings );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b19a67ce68394aeadcd80adc9dd9b37e", "score": "0.5758937", "text": "public function adminNotices()\n {\n if (isset($_GET['updated'])) {\n $notice = __('Settings saved.');\n echo <<<HTML\n<div class=\"notice notice-success is-dismissible\">\n <p>\n <strong>$notice</strong>\n </p>\n</div>\nHTML;\n }\n }", "title": "" }, { "docid": "89622eb021b1f0fc46bc83654dbebe32", "score": "0.57562304", "text": "function backend_guestbook_moderate() {\n global $serendipity;\n\n // assign form array entries to smarty\n $serendipity['smarty']->assign('is_guestbook_admin_noapp', false);\n\n // view all unapproved(0) entries in a table\n $va = $this->backend_guestbook_view(0, 'gbapp');\n\n if ($va === false) $serendipity['smarty']->assign('is_gbadmin_noappresult', true);\n }", "title": "" }, { "docid": "16f6079e7ee8dd4876a6812058aba5d2", "score": "0.57522017", "text": "public function update_settings() {\n\n\t\t// $this->input() retrieves posted arguments whitelisted and casted to the $request_format\n\t\t// specs that get passed in when this class is instantiated\n\t\t/**\n\t\t * Filters the settings to be updated on the site.\n\t\t *\n\t\t * @module json-api\n\t\t *\n\t\t * @since 3.6.0\n\t\t *\n\t\t * @param array $input Associative array of site settings to be updated.\n\t\t */\n\t\t$input = apply_filters( 'rest_api_update_site_settings', $this->input() );\n\n\t\t$jetpack_relatedposts_options = array();\n\t\t$sharing_options = array();\n\t\t$updated = array();\n\n\t\tforeach ( $input as $key => $value ) {\n\n\t\t\tif ( ! is_array( $value ) ) {\n\t\t\t\t$value = trim( $value );\n\t\t\t}\n\t\t\t$value = wp_unslash( $value );\n\n\t\t\tswitch ( $key ) {\n\n\t\t\t\tcase 'default_ping_status':\n\t\t\t\tcase 'default_comment_status':\n\t\t\t\t\t// settings are stored as closed|open\n\t\t\t\t\t$coerce_value = ( $value ) ? 'open' : 'closed';\n\t\t\t\t\tif ( update_option( $key, $coerce_value ) ) {\n\t\t\t\t\t\t$updated[ $key ] = $value;\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'jetpack_protect_whitelist':\n\t\t\t\t\tif ( function_exists( 'jetpack_protect_save_whitelist' ) ) {\n\t\t\t\t\t\t$result = jetpack_protect_save_whitelist( $value );\n\t\t\t\t\t\tif ( is_wp_error( $result ) ) {\n\t\t\t\t\t\t\treturn $result;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$updated[ $key ] = jetpack_protect_format_whitelist();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'jetpack_sync_non_public_post_stati':\n\t\t\t\t\tJetpack_Options::update_option( 'sync_non_public_post_stati', $value );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'jetpack_relatedposts_enabled':\n\t\t\t\tcase 'jetpack_relatedposts_show_thumbnails':\n\t\t\t\tcase 'jetpack_relatedposts_show_headline':\n\t\t\t\t\tif ( ! $this->jetpack_relatedposts_supported() ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ( 'jetpack_relatedposts_enabled' === $key && method_exists( 'Jetpack', 'is_module_active' ) && $this->jetpack_relatedposts_supported() ) {\n\t\t\t\t\t\t$before_action = Jetpack::is_module_active('related-posts');\n\t\t\t\t\t\tif ( $value ) {\n\t\t\t\t\t\t\tJetpack::activate_module( 'related-posts', false, false );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tJetpack::deactivate_module( 'related-posts' );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$after_action = Jetpack::is_module_active('related-posts');\n\t\t\t\t\t\tif ( $after_action == $before_action ) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$just_the_key = substr( $key, 21 );\n\t\t\t\t\t$jetpack_relatedposts_options[ $just_the_key ] = $value;\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'social_notifications_like':\n\t\t\t\tcase 'social_notifications_reblog':\n\t\t\t\tcase 'social_notifications_subscribe':\n\t\t\t\t\t// settings are stored as on|off\n\t\t\t\t\t$coerce_value = ( $value ) ? 'on' : 'off';\n\t\t\t\t\tif ( update_option( $key, $coerce_value ) ) {\n\t\t\t\t\t\t$updated[ $key ] = $value;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'wga':\n\t\t\t\t\tif ( ! isset( $value['code'] ) || ! preg_match( '/^$|^UA-[\\d-]+$/i', $value['code'] ) ) {\n\t\t\t\t\t\treturn new WP_Error( 'invalid_code', 'Invalid UA ID' );\n\t\t\t\t\t}\n\t\t\t\t\t$wga = get_option( 'wga', array() );\n\t\t\t\t\t$wga['code'] = $value['code']; // maintain compatibility with wp-google-analytics\n\t\t\t\t\tif ( update_option( 'wga', $wga ) ) {\n\t\t\t\t\t\t$updated[ $key ] = $value;\n\t\t\t\t\t}\n\n\t\t\t\t\t$enabled_or_disabled = $wga['code'] ? 'enabled' : 'disabled';\n\n\t\t\t\t\t/** This action is documented in modules/widgets/social-media-icons.php */\n\t\t\t\t\tdo_action( 'jetpack_bump_stats_extras', 'google-analytics', $enabled_or_disabled );\n\n\t\t\t\t\t$business_plugins = WPCOM_Business_Plugins::instance();\n\t\t\t\t\t$business_plugins->activate_plugin( 'wp-google-analytics' );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'jetpack_testimonial':\n\t\t\t\tcase 'jetpack_portfolio':\n\t\t\t\tcase 'jetpack_comment_likes_enabled':\n\t\t\t\t\t// settings are stored as 1|0\n\t\t\t\t\t$coerce_value = (int) $value;\n\t\t\t\t\tif ( update_option( $key, $coerce_value ) ) {\n\t\t\t\t\t\t$updated[ $key ] = (bool) $value;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'jetpack_testimonial_posts_per_page':\n\t\t\t\tcase 'jetpack_portfolio_posts_per_page':\n\t\t\t\t\t// settings are stored as numeric\n\t\t\t\t\t$coerce_value = (int) $value;\n\t\t\t\t\tif ( update_option( $key, $coerce_value ) ) {\n\t\t\t\t\t\t$updated[ $key ] = $coerce_value;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\t// Sharing options\n\t\t\t\tcase 'sharing_button_style':\n\t\t\t\tcase 'sharing_show':\n\t\t\t\tcase 'sharing_open_links':\n\t\t\t\t\t$sharing_options[ preg_replace( '/^sharing_/', '', $key ) ] = $value;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'sharing_label':\n\t\t\t\t\t$sharing_options[ $key ] = $value;\n\t\t\t\t\tbreak;\n\n\t\t\t\t// Keyring token option\n\t\t\t\tcase 'eventbrite_api_token':\n\t\t\t\t\t// These options can only be updated for sites hosted on WordPress.com\n\t\t\t\t\tif ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {\n\t\t\t\t\t\tif ( empty( $value ) || WPCOM_JSON_API::is_falsy( $value ) ) {\n\t\t\t\t\t\t\tif ( delete_option( $key ) ) {\n\t\t\t\t\t\t\t\t$updated[ $key ] = null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if ( update_option( $key, $value ) ) {\n\t\t\t\t\t\t\t$updated[ $key ] = (int) $value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'holidaysnow':\n\t\t\t\t\tif ( empty( $value ) || WPCOM_JSON_API::is_falsy( $value ) ) {\n\t\t\t\t\t\tif ( function_exists( 'jetpack_holiday_snow_option_name' ) && delete_option( jetpack_holiday_snow_option_name() ) ) {\n\t\t\t\t\t\t\t$updated[ $key ] = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if ( function_exists( 'jetpack_holiday_snow_option_name' ) && update_option( jetpack_holiday_snow_option_name(), 'letitsnow' ) ) {\n\t\t\t\t\t\t$updated[ $key ] = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'timezone_string':\n\t\t\t\t\t// Map UTC+- timezones to gmt_offsets and set timezone_string to empty\n\t\t\t\t\t// https://github.com/WordPress/WordPress/blob/4.4.2/wp-admin/options.php#L175\n\t\t\t\t\tif ( ! empty( $value ) && preg_match( '/^UTC[+-]/', $value ) ) {\n\t\t\t\t\t\t$gmt_offset = preg_replace( '/UTC\\+?/', '', $value );\n\t\t\t\t\t\tif ( update_option( 'gmt_offset', $gmt_offset ) ) {\n\t\t\t\t\t\t\t$updated[ 'gmt_offset' ] = $gmt_offset;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$value = '';\n\t\t\t\t\t}\n\n\t\t\t\t\t// Always set timezone_string either with the given value or with an \n\t\t\t\t\t// empty string\n\t\t\t\t\tif ( update_option( $key, $value ) ) {\n\t\t\t\t\t\t$updated[ $key ] = $value;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t//allow future versions of this endpoint to support additional settings keys\n\t\t\t\t\tif ( has_filter( 'site_settings_endpoint_update_' . $key ) ) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Filter current site setting value to be updated.\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * @module json-api\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * @since 3.9.3\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * @param mixed $response_item A single site setting value.\n\t\t\t\t\t\t */\n\t\t\t\t\t\t$value = apply_filters( 'site_settings_endpoint_update_' . $key, $value );\n\t\t\t\t\t\t$updated[ $key ] = $value;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// no worries, we've already whitelisted and casted arguments above\n\t\t\t\t\tif ( update_option( $key, $value ) ) {\n\t\t\t\t\t\t$updated[ $key ] = $value;\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( count( $jetpack_relatedposts_options ) ) {\n\t\t\t// track new jetpack_relatedposts options against old\n\t\t\t$old_relatedposts_options = Jetpack_Options::get_option( 'relatedposts' );\n\t\t\tif ( Jetpack_Options::update_option( 'relatedposts', $jetpack_relatedposts_options ) ) {\n\t\t\t\tforeach( $jetpack_relatedposts_options as $key => $value ) {\n\t\t\t\t\tif ( $value !== $old_relatedposts_options[ $key ] ) {\n\t\t\t\t\t\t$updated[ 'jetpack_relatedposts_' . $key ] = $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( ! empty( $sharing_options ) && class_exists( 'Sharing_Service' ) ) {\n\t\t\t$ss = new Sharing_Service();\n\n\t\t\t// Merge current values with updated, since Sharing_Service expects\n\t\t\t// all values to be included when updating\n\t\t\t$current_sharing_options = $ss->get_global_options();\n\t\t\tforeach ( $current_sharing_options as $key => $val ) {\n\t\t\t\tif ( ! isset( $sharing_options[ $key ] ) ) {\n\t\t\t\t\t$sharing_options[ $key ] = $val;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$updated_social_options = $ss->set_global_options( $sharing_options );\n\n\t\t\tif ( isset( $input['sharing_button_style'] ) ) {\n\t\t\t\t$updated['sharing_button_style'] = (string) $updated_social_options['button_style'];\n\t\t\t}\n\t\t\tif ( isset( $input['sharing_label'] ) ) {\n\t\t\t\t// Sharing_Service won't report label as updated if set to default\n\t\t\t\t$updated['sharing_label'] = (string) $sharing_options['sharing_label'];\n\t\t\t}\n\t\t\tif ( isset( $input['sharing_show'] ) ) {\n\t\t\t\t$updated['sharing_show'] = (array) $updated_social_options['show'];\n\t\t\t}\n\t\t\tif ( isset( $input['sharing_open_links'] ) ) {\n\t\t\t\t$updated['sharing_open_links'] = (string) $updated_social_options['open_links'];\n\t\t\t}\n\t\t}\n\n\t\treturn array(\n\t\t\t'updated' => $updated\n\t\t);\n\n\t}", "title": "" }, { "docid": "9a0a247748b120c4334057923cd79ec8", "score": "0.5747396", "text": "private static function _save_setting_changes() {\r\n\t\t$page_content = array( 'message' => 'Settings unchanged.', 'body' => '' );\r\n\t\t\r\n\t\t$changed = self::_update_plugin_option( 'process_usp_posts', isset( $_REQUEST[ 'mla_usp_novo_map_options' ]['process_usp_posts'] ) );\r\n\r\n\t\t$changed |= self::_update_plugin_option( 'assign_usp_categories', isset( $_REQUEST[ 'mla_usp_novo_map_options' ]['assign_usp_categories'] ) );\r\n\t\t$changed |= self::_update_plugin_option( 'usp_category_slugs', stripslashes( $_REQUEST[ 'mla_usp_novo_map_options' ]['usp_category_slugs'] ) );\r\n\r\n\t\t$changed |= self::_update_plugin_option( 'assign_usp_tags', isset( $_REQUEST[ 'mla_usp_novo_map_options' ]['assign_usp_tags'] ) );\r\n\t\t$changed |= self::_update_plugin_option( 'usp_tag_slugs', stripslashes( $_REQUEST[ 'mla_usp_novo_map_options' ]['usp_tag_slugs'] ) );\r\n\r\n\t\t$changed |= self::_update_plugin_option( 'create_usp_title', isset( $_REQUEST[ 'mla_usp_novo_map_options' ]['create_usp_title'] ) );\r\n\t\t$changed |= self::_update_plugin_option( 'usp_title_template', stripslashes( $_REQUEST[ 'mla_usp_novo_map_options' ]['usp_title_template'] ) );\r\n\r\n\t\t$changed |= self::_update_plugin_option( 'create_usp_excerpt', isset( $_REQUEST[ 'mla_usp_novo_map_options' ]['create_usp_excerpt'] ) );\r\n\t\t$changed |= self::_update_plugin_option( 'usp_excerpt_template', stripslashes( $_REQUEST[ 'mla_usp_novo_map_options' ]['usp_excerpt_template'] ) );\r\n\r\n\t\t$changed |= self::_update_plugin_option( 'create_usp_content', isset( $_REQUEST[ 'mla_usp_novo_map_options' ]['create_usp_content'] ) );\r\n\t\t$changed |= self::_update_plugin_option( 'usp_content_template', stripslashes( $_REQUEST[ 'mla_usp_novo_map_options' ]['usp_content_template'] ) );\r\n\r\n\t\t$changed |= self::_update_plugin_option( 'create_novo_map_marker', isset( $_REQUEST[ 'mla_usp_novo_map_options' ]['create_novo_map_marker'] ) );\r\n\t\t$changed |= self::_update_plugin_option( 'novo_map_infobox_template', stripslashes( $_REQUEST[ 'mla_usp_novo_map_options' ]['novo_map_infobox_template'] ) );\r\n\t\t\r\n\t\t$usp_marker_index = absint( $_REQUEST[ 'mla_usp_novo_map_options' ]['usp_marker_index'] );\r\n\t\tif ( 9 < $usp_marker_index || 1 > $usp_marker_index ) {\r\n\t\t\t$usp_marker_index = self::$_default_settings['usp_marker_index'];\r\n\t\t}\r\n\t\t$changed |= self::_update_plugin_option( 'usp_marker_index', $usp_marker_index );\r\n\t\t\r\n\t\tif ( $changed ) {\r\n\t\t\t// No reason to save defaults in the database\r\n\t\t\tif ( self::$_settings === self::$_default_settings ) {\r\n\t\t\t\tdelete_option( self::SLUG_PREFIX . '-settings' ); \r\n\t\t\t} else {\r\n\t\t\t\t$changed = update_option( self::SLUG_PREFIX . '-settings', self::$_settings, false );\r\n\t\t\t}\r\n\r\n\t\t\tif ( $changed ) {\r\n\t\t\t\t$page_content['message'] = \"Settings have been updated.\";\r\n\t\t\t} else {\r\n\t\t\t\t$page_content['message'] = \"Settings updated failed.\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $page_content;\t\t\r\n\t}", "title": "" }, { "docid": "8eb7bbd8ec84813335edea75df1ac466", "score": "0.5745795", "text": "function updateOptions()\r\n\t{\r\n\t\tif(isset($_POST['save_cwc_settings']))\r\n\t\t{\r\n\t\t\t$options = Cloudware_Auth::getOptions();\r\n\r\n\t\t\t$options['cwc_vendorid'] \t= stripslashes($_POST['cwc_vendorid']);\r\n\t\t\t$options['cwc_apikey'] \t\t= stripslashes($_POST['cwc_apikey']);\r\n\t\t\t$options['role_mapping'] \t= stripslashes($_POST['role_mapping']);\r\n\t\t\t$options['cwc_prodid'] \t\t= stripslashes($_POST['cwc_prodid']);\r\n\t\t\t$options['test_mode'] \t\t= stripslashes($_POST['test_mode']);\r\n\t\t\t$options['demo_mode'] \t\t= stripslashes($_POST['demo_mode']);\r\n\t\t\t$options['show_link']\t\t= stripslashes($_POST['show_link']);\r\n\r\n\t\t\tupdate_option('cwc_auth_options', $options);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tCloudware_Auth::getOptions();\r\n\t\t}\r\n\r\n\t\t#add menu\r\n\t\tCloudware_Auth::cwc_auth_add_menu();\r\n\r\n\t}", "title": "" }, { "docid": "465185e041c86090d7d0e22a391e05c8", "score": "0.57420725", "text": "function progo_admin_notices() {\r\n\tif( get_option('progo_settings_just_saved')==true ) {\r\n\t?>\r\n\t<div id=\"message\" class=\"updated fade\">\r\n\t\t<p>Settings updated. <a href=\"<?php bloginfo('url'); ?>/\">View site</a></p>\r\n\t</div>\r\n<?php\r\n\t\tupdate_option('progo_settings_just_saved',false);\r\n\t}\r\n}", "title": "" }, { "docid": "950d18bf9f7e2089f297526172a9c648", "score": "0.5735584", "text": "public function updateAvailable(){\n\t\treturn true;\n\t}", "title": "" }, { "docid": "d61528bd71465630e9718e9c7040fd48", "score": "0.5728251", "text": "protected function __canUpdate() : bool|ReturnHelper {\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "90beae5dec6fa1e4ea3b68aa262fe82f", "score": "0.57245564", "text": "function hide_update_notice_to_all_but_admin_users()\n{\n if (!current_user_can('update_core')) {\n remove_action( 'admin_notices', 'update_nag', 3 );\n }\n}", "title": "" }, { "docid": "a6d6e46fb31199457deccd5e32d3b76a", "score": "0.57230884", "text": "private function can_edit_bu() {\n if ($this->login_user->user_type == \"team_member\") {\n } else {\n if (!get_setting(\"bu_can_view_files\")) {\n app_redirect(\"forbidden\");\n }\n }\n }", "title": "" }, { "docid": "644dd2ca82adcab0a84161258701da5d", "score": "0.57166237", "text": "public function update()\n {\n return \\Auth::user()->hasRight('update-contact');\n }", "title": "" }, { "docid": "d228f501249bf3b2229371f6864c2b6a", "score": "0.5714279", "text": "public function testModulePageSecurityUpdate() {\n $this->drupalLogin($this->drupalCreateUser([\n 'administer site configuration',\n 'administer modules',\n 'administer themes',\n 'view update notifications',\n ]));\n $this->setProjectInstalledVersion('8.0.0');\n // Instead of using refreshUpdateStatus(), set these manually.\n $this->config('update.settings')\n ->set('fetch.url', Url::fromRoute('update_test.update_test')->setAbsolute()->toString())\n ->save();\n $this->config('update_test.settings')\n ->set('xml_map', ['drupal' => 'sec.0.2'])\n ->save();\n\n $this->drupalGet('admin/reports/updates');\n $this->clickLink('Check manually');\n $this->checkForMetaRefresh();\n $this->assertSession()->pageTextContains('Checked available update data for one project.');\n $this->drupalGet('admin/modules');\n $this->assertSession()->pageTextNotContains('There are updates available for your version of Drupal.');\n $this->assertSession()->pageTextContains('There is a security update available for your version of Drupal.');\n\n // Make sure admin/appearance warns you you're missing a security update.\n $this->drupalGet('admin/appearance');\n $this->assertSession()->pageTextNotContains('There are updates available for your version of Drupal.');\n $this->assertSession()->pageTextContains('There is a security update available for your version of Drupal.');\n\n // Make sure duplicate messages don't appear on Update status pages.\n $this->drupalGet('admin/reports/status');\n $this->assertSession()->pageTextContainsOnce('There is a security update available for your version of Drupal.');\n\n $this->drupalGet('admin/reports/updates');\n $this->assertSession()->pageTextNotContains('There is a security update available for your version of Drupal.');\n\n $this->drupalGet('admin/reports/updates/settings');\n $this->assertSession()->pageTextNotContains('There is a security update available for your version of Drupal.');\n }", "title": "" }, { "docid": "cb6767baa65874c66ef1c8805b8294ce", "score": "0.57134134", "text": "function hide_update_version_notice() {\n if (!current_user_can('manage_options')) {\n remove_action( 'admin_notices', 'update_nag', 3 );\n }\n}", "title": "" }, { "docid": "4f82e588b66d99950eedd78773979a72", "score": "0.57054734", "text": "function wplook_update_notifier_menu() {\n\n\t\tglobal $wplook_update_theme_slug, $wplook_update_theme_info;\n\n\t\tif( version_compare( $wplook_update_theme_info->Version, get_option( 'wpl_latest_theme_version' ), \"<\" ) ) {\n\t\t\tadd_theme_page(\n\t\t\t\tsprintf( __( '%1$s Updates', 'healthmedical-wpl' ), $wplook_update_theme_info->Name ), // Page title\n\t\t\t\t__( 'Theme Updates', 'healthmedical-wpl' ) . ' ' . '<span class=\"update-plugins count-1\"><span class=\"update-count\">1</span></span>', // Menu name\n\t\t\t\t'install_themes', // Capability\n\t\t\t\t$wplook_update_theme_slug . '-updates', // Slug\n\t\t\t\t'wplook_update_notifier' // Handler\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "598ee744e2acbc7e3981c39f5f0ba699", "score": "0.56973106", "text": "public function update() {\n\t\t\t$this->autoRender = false;\n\t\t\t$this->CurrentUser->LastRefresh->set('now');\n\t\t\t$this->redirect('/entries/index');\n\t\t}", "title": "" }, { "docid": "416881bbeefeb2171607db5d44331f91", "score": "0.56930226", "text": "function ayecode_show_update_plugin_requirement() {\n if ( !defined( 'WP_EASY_UPDATES_ACTIVE' ) ) {\n ?>\n <div class=\"notice notice-warning is-dismissible\">\n <p>\n <strong>\n <?php\n echo sprintf( __( 'The plugin %sWP Easy Updates%s is required to check for and update some installed plugins/themes, please install it now.', 'geodirectory' ), '<a href=\"https://wpeasyupdates.com/\" target=\"_blank\" title=\"WP Easy Updates\">', '</a>' );\n ?>\n </strong>\n </p>\n </div>\n <?php\n }\n }", "title": "" }, { "docid": "477462d43563250de6af6bbf6d744599", "score": "0.56762755", "text": "public function allowedUpdates(): bool\n {\n return !$this->getReadOnlyAttribute();\n }", "title": "" }, { "docid": "80c91289ab4996f85c2acf68f2f88b15", "score": "0.56728345", "text": "function _settings_form_updates()\n\t{\n\t\tglobal $DSP, $LANG, $PREFS;\n\t\t\n\t\t$r = '';\n\t\t\n\t\t// Automatic updates.\n\t\t$r .= $DSP->table_open(\n\t\t\tarray(\n\t\t\t\t'class' \t=> 'tableBorder',\n\t\t\t\t'border' \t=> '0',\n\t\t\t\t'style' \t=> 'width : 100%; ',\n\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t$r .= $DSP->tr();\n\t\t$r .= $DSP->td('tableHeading', '', '2');\n\t\t$r .= $LANG->line('update_check_title');\n\t\t$r .= $DSP->td_c();\n\t\t$r .= $DSP->tr_c();\n\t\t\n\t\t$r .= $DSP->tr();\n\t\t$r .= $DSP->td('', '', '2');\n\t\t$r .= \"<div class='box' style='border-width : 0 0 1px 0; margin : 0; padding : 10px 5px'><p>\" . $LANG->line('update_check_info') . \"</p></div>\";\n\t\t$r .= $DSP->td_c();\n\t\t$r .= $DSP->tr_c();\t\n\t\t\n\t\t$r .= $DSP->tr();\n\t\t$r .= $DSP->td('tableCellOne', '40%');\n\t\t$r .= $DSP->qdiv('defaultBold', $LANG->line('update_check_label'));\n\t\t$r .= $DSP->qdiv('subtext', $LANG->line('update_check_subtext'));\n\t\t\n\t\t$r .= $DSP->td_c();\n\t\t\n\t\t$update_check = isset($this->settings[$this->site_id]['update_check']) ? $this->settings[$this->site_id]['update_check'] : 'y';\n\t\t\n\t\t$r .= $DSP->td('tableCellOne', '60%');\n\t\t\n\t\t$r .= '<label style=\"cursor:pointer; margin-right: 10px\">' . $LANG->line('yes');\n $r .= $DSP->input_radio('update_check', 'y', ($update_check == 'y' ? 1 : 0));\n $r .= '</label><label style=\"cursor:pointer\">' . $LANG->line('no');\n $r .= $DSP->input_radio('update_check', 'n', ($update_check == 'n' ? 1 : 0));\n $r .= '</label>';\n \n\t\t$r .= $DSP->td_c();\n\t\t\n\t\t$r .= $DSP->tr_c();\n\t\t$r .= $DSP->table_c();\n\t\t\n\t\treturn $r;\n\t}", "title": "" }, { "docid": "3ed7ace6a72b10d0c21d170af19f2838", "score": "0.56687814", "text": "public static function adminNotices(){\n\t\tif ( !empty( $_REQUEST['mvnAlgMessage'] ) && $_REQUEST['mvnAlgMessage'] === 'settingsUpdated' ):\n\t\t\t?>\n\t\t\t<div class=\"updated\">\n\t\t\t\t<p><?php _e( 'Settings were updated.', \\MavenAlgolia\\Core\\Registry::instance()->getPluginShortName() ); ?></p>\n\t\t\t</div>\n\t\t\t<?php\n\t\telseif ( !empty( $_REQUEST['mvnAlgMessage'] ) && $_REQUEST['mvnAlgMessage'] === 'settingsNotUpdated' ):\n\t\t\t?>\n\t\t\t<div class=\"error\">\n\t\t\t\t<p><?php _e( 'Settings were NOT updated, please try again.', \\MavenAlgolia\\Core\\Registry::instance()->getPluginShortName() ); ?></p>\n\t\t\t</div>\n\t\t\t<?php\n\t\tendif;\n\t\tif (\n\t\t\t\tRegistry::instance()->isValidApp() && !Registry::instance()->isValidAppSearch() ):\n\t\t\t?>\n\t\t\t<div class=\"error\">\n\t\t\t\t<p><?php _e( 'Please go to the Maven Algolia section and set a valid \"Api key for search only\" to enable the Maven Algolia search in your site. <a href=\"admin.php?page=mvnAlg_general_settings\">View Details</a>', Registry::instance()->getPluginShortName() ); ?></p>\n\t\t\t</div>\n\t\t\t<?php\n\t\tendif;\n\t\tif (\n\t\t\t\t!Registry::instance()->getAppId() || !Registry::instance()->getApiKey() || ( Registry::instance()->getAppId() && Registry::instance()->getApiKey() && !Registry::instance()->isValidApp() ) ):\n\t\t\t?>\n\t\t\t<div class=\"error\">\n\t\t\t\t<p><?php _e( 'Please go to the Maven Algolia section to enable the Maven Algolia module to work. <a href=\"admin.php?page=mvnAlg_general_settings\">View Details</a>', Registry::instance()->getPluginShortName() ); ?></p>\n\t\t\t</div>\n\t\t\t<?php\n\t\tendif;\n\t}", "title": "" }, { "docid": "e156761cfb388ab31a6066f58cdcc095", "score": "0.5663421", "text": "static function maybe_disable_updates() {\r\n global $flawless;\r\n\r\n if ( $flawless[ 'disable_updates' ][ 'plugins' ] == 'true' ) {\r\n remove_action( 'load-update-core.php', 'wp_update_plugins' );\r\n add_filter( 'pre_site_transient_update_plugins', create_function( '', \"return null;\" ) );\r\n wp_clear_scheduled_hook( 'wp_update_plugins' );\r\n }\r\n\r\n if ( $flawless[ 'disable_updates' ][ 'core' ] == 'true' ) {\r\n add_filter( 'pre_site_transient_update_core', create_function( '', \"return null;\" ) );\r\n wp_clear_scheduled_hook( 'wp_version_check' );\r\n }\r\n\r\n if ( $flawless[ 'disable_updates' ][ 'theme' ] == 'true' ) {\r\n remove_action( 'load-update-core.php', 'wp_update_themes' );\r\n add_filter( 'pre_site_transient_update_themes', create_function( '', \"return null;\" ) );\r\n wp_clear_scheduled_hook( 'wp_update_themes' );\r\n }\r\n\r\n }", "title": "" }, { "docid": "6be84a607cdf87eaf501984bade28051", "score": "0.5656659", "text": "public function updateDataSettings()\n\t{\n\t\t\t$data = [];\n\t\t\t$data['localization'] = DiGiuDevForm::getValSwitch('localization');\n\t\t\t$data['visible'] = DiGiuDevForm::getValSwitch('visible');\n\t\t\tDB::table('settings')->where('id_user', Input::get('id_user'))->update($data);\n\n\t\t\t// Reindirizzo l'utente nel form\n\t\t\treturn Redirect::to('admin/settings');\n\t}", "title": "" }, { "docid": "0819a82ba97c95633c63652fd6275dc6", "score": "0.56487155", "text": "public function updated_settings() {\n\t\t?>\n\t\t<div class=\"updated\">\n\t\t\t<p><?php _e( 'Settings updated.', 'DFLIP' ); ?></p>\n\t\t</div>\n\t<?php\n\n\t}", "title": "" }, { "docid": "caecc3e518e1c7e59b86dd3920028bfc", "score": "0.5635944", "text": "public function site_settings()\n {\n $site_settings = resolve('site_settings');\n\n View::share('site_name', $site_settings[0]->value);\n View::share('head_code', $site_settings[7]->value);\n View::share('version', $site_settings->where('name','version')->first()->value);\n View::share('version', \\Str::random(4));\n\n if($site_settings[10]->value == '' && @$_SERVER['HTTP_HOST'] && !\\App::runningInConsole()){\n \n $url = \"http://\".$_SERVER['HTTP_HOST'];\n $url .= str_replace(basename($_SERVER['SCRIPT_NAME']),\"\",$_SERVER['SCRIPT_NAME']);\n\n SiteSettings::where('name','site_url')->update(['value' => $url]);\n }\n\n }", "title": "" }, { "docid": "bef4631533d05c682857fb918642abc6", "score": "0.5619216", "text": "function itex_s_admin_sape()\n\t{\n\t\tif (isset($_POST['info_update']))\n\t\t{\n\t\t\t//phpinfo();die();\n\t\t\tif (isset($_POST['sape_sapeuser']))\n\t\t\t{\n\t\t\t\tupdate_option('itex_s_sape_sapeuser', trim($_POST['sape_sapeuser']));\n\t\t\t}\n\t\t\tif (isset($_POST['sape_enable']))\n\t\t\t{\n\t\t\t\tupdate_option('itex_s_sape_enable', intval($_POST['sape_enable']));\n\t\t\t}\n\n\t\t\tif (isset($_POST['sape_links_beforecontent']))\n\t\t\t{\n\t\t\t\tupdate_option('itex_s_sape_links_beforecontent', $_POST['sape_links_beforecontent']);\n\t\t\t}\n\n\t\t\tif (isset($_POST['sape_links_aftercontent']))\n\t\t\t{\n\t\t\t\tupdate_option('itex_s_sape_links_aftercontent', $_POST['sape_links_aftercontent']);\n\t\t\t}\n\n\t\t\tif (isset($_POST['sape_links_sidebar']))\n\t\t\t{\n\t\t\t\tupdate_option('itex_s_sape_links_sidebar', $_POST['sape_links_sidebar']);\n\t\t\t}\n\n\t\t\tif (isset($_POST['sape_links_footer']))\n\t\t\t{\n\t\t\t\tupdate_option('itex_s_sape_links_footer', $_POST['sape_links_footer']);\n\t\t\t}\n\n\t\t\t\n\t\t\t\n\t\t\tif (isset($_POST['sape_sapecontext_enable']) )\n\t\t\t{\n\t\t\t\tupdate_option('itex_s_sape_sapecontext_enable', intval($_POST['sape_sapecontext_enable']));\n\t\t\t}\n\n\t\t\tif (isset($_POST['sape_sapecontext_pages_enable']) )\n\t\t\t{\n\t\t\t\tupdate_option('itex_s_sape_sapecontext_pages_enable', intval($_POST['sape_sapecontext_pages_enable']));\n\t\t\t}\n\t\t\t\n\t\t\tif (isset($_POST['sape_pages_enable']) )\n\t\t\t{\n\t\t\t\tupdate_option('itex_s_sape_pages_enable', intval($_POST['sape_pages_enable']));\n\t\t\t}\n\t\t\tif (isset($_POST['global_debugenable']))\n\t\t\t{\n\t\t\t\tupdate_option('itex_s_global_debugenable', intval($_POST['global_debugenable']));\n\t\t\t}\n\t\t\t\n\t\t\tif (isset($_POST['global_debugenable_forall']))\n\t\t\t{\n\t\t\t\tupdate_option('itex_s_global_debugenable_forall', intval($_POST['global_debugenable_forall']));\n\t\t\t}\n\t\t\t\n\t\t\tif (isset($_POST['global_masking']))\n\t\t\t{\n\t\t\t\tupdate_option('itex_s_global_masking', intval($_POST['global_masking']));\n\t\t\t}\n\t\t\t\n\t\t\tif (isset($_POST['global_widget_links']))\n\t\t\t{\n\t\t\t\t$s_w = wp_get_sidebars_widgets();\n\t\t\t\t$ex = 0;\n\t\t\t\tif (count($s_w['sidebar-1'])) foreach ($s_w['sidebar-1'] as $k => $v)\n\t\t\t\t{\n\t\t\t\t\tif ($v == 'isape-links')\n\t\t\t\t\t{\n\t\t\t\t\t\t$ex = 1;\n\t\t\t\t\t\tif (!$_POST['global_widget_links']) unset($s_w['sidebar-1'][$k]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!$ex && $_POST['global_widget_links']) $s_w['sidebar-1'][] = 'isape-links';\n\t\t\t\twp_set_sidebars_widgets( $s_w );\n\t\t\t}\n\t\t\t\n\t\t\techo \"<div class='updated fade'><p><strong>Settings saved.</strong></p></div>\";\n\t\t}\n\t\tif (isset($_POST['sape_sapedir_create']))\n\t\t{\n\t\t\tif (get_option('itex_s_sape_sapeuser')) $this->itex_s_sape_install_file();\n\t\t}\n\t\tif (get_option('itex_s_sape_sapeuser')) \n\t\t{\n\t\t$file = $this->document_root . '/' . _SAPE_USER . '/sape.php'; //<< Not working in multihosting.\n\t\tif (file_exists($file)) {}\n\t\telse\n\t\t{\n\t\t\t$file = str_replace($_SERVER[\"SCRIPT_NAME\"],'',$_SERVER[\"SCRIPT_FILENAME\"]).'/'.get_option('itex_s_sape_sapeuser').'/sape.php';\n\t\t\tif (file_exists($file)) {}\n\t\t\telse {?>\n\t\t<div style=\"margin:10px auto; border:3px #f00 solid; background-color:#fdd; color:#000; padding:10px; text-align:center;\">\n\t\t\t\tSape dir not exist!\n\t\t</div>\n\t\t<div style=\"margin:10px auto; border:3px #f00 solid; padding:10px; text-align:center;\">\n\t\t\t\tCreate new sapedir and sape.php? (<?php echo $file;?>)\n\t\t\t\t<p class=\"submit\">\n\t\t\t\t<input type='submit' name='sape_sapedir_create' value='<?php echo __('Create', 'iSape'); ?>' />\n\t\t\t\t</p>\n\t\t\t\t<?php\n\t\t\t\tif (!get_option('itex_s_sape_sapeuser')) echo __('Enter your SAPE UID in this box!', 'iSape');\n\t\t\t\t?>\n\t\t</div>\n\t\t\n\t\t<?php }\n\t\t}\n\t\t}\n\t\t?>\n\t\t<table class=\"form-table\" cellspacing=\"2\" cellpadding=\"5\" width=\"100%\">\n\t\t\t\t<tr>\n\t\t\t\t\t<th valign=\"top\" style=\"padding-top: 10px;\">\n\t\t\t\t\t\t<label for=\"\"><?php echo __('Your SAPE UID:', 'iSape');?></label>\n\t\t\t\t\t</th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\techo \"<input type='text' size='50' \";\n\t\t\t\t\t\techo \"name='sape_sapeuser'\";\n\t\t\t\t\t\techo \"id='sapeuser' \";\n\t\t\t\t\t\techo \"value='\".get_option('itex_s_sape_sapeuser').\"' />\\n\";\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<p style=\"margin: 5px 10px;\"><?php echo __('Enter your SAPE UID in this box.', 'iSape');?></p>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<th width=\"30%\" valign=\"top\" style=\"padding-top: 10px;\">\n\t\t\t\t\t\t<label for=\"\"><?php echo __('Sape links:', 'iSape');?></label>\n\t\t\t\t\t</th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\techo \"<select name='sape_enable' id='sape_enable'>\\n\";\n\t\t\t\t\t\techo \"<option value='1'\";\n\n\t\t\t\t\t\tif(get_option('itex_s_sape_enable')) echo \" selected='selected'\";\n\t\t\t\t\t\techo \">\".__(\"Enabled\", 'iSape').\"</option>\\n\";\n\n\t\t\t\t\t\techo \"<option value='0'\";\n\t\t\t\t\t\tif(!get_option('itex_s_sape_enable')) echo\" selected='selected'\";\n\t\t\t\t\t\techo \">\".__(\"Disabled\", 'iSape').\"</option>\\n\";\n\t\t\t\t\t\techo \"</select>\\n\";\n\n\t\t\t\t\t\techo '<label for=\"\">'.__(\"Working\", 'iSape').'</label>';\n\t\t\t\t\t\techo \"<br/>\\n\";\n\n\t\t\t\t\t\techo \"<select name='sape_links_beforecontent' id='sape_links_beforecontent'>\\n\";\n\n\t\t\t\t\t\techo \"<option value='0'\";\n\t\t\t\t\t\tif(!get_option('itex_s_sape_links_beforecontent')) echo\" selected='selected'\";\n\t\t\t\t\t\techo \">\".__(\"Disabled\", 'iSape').\"</option>\\n\";\n\n\t\t\t\t\t\techo \"<option value='1'\";\n\t\t\t\t\t\tif(get_option('itex_s_sape_links_beforecontent') == 1) echo \" selected='selected'\";\n\t\t\t\t\t\techo \">1</option>\\n\";\n\n\t\t\t\t\t\techo \"<option value='2'\";\n\t\t\t\t\t\tif(get_option('itex_s_sape_links_beforecontent') == 2) echo \" selected='selected'\";\n\t\t\t\t\t\techo \">2</option>\\n\";\n\n\t\t\t\t\t\techo \"<option value='3'\";\n\t\t\t\t\t\tif(get_option('itex_s_sape_links_beforecontent') == 3) echo \" selected='selected'\";\n\t\t\t\t\t\techo \">3</option>\\n\";\n\n\t\t\t\t\t\techo \"<option value='4'\";\n\t\t\t\t\t\tif(get_option('itex_s_sape_links_beforecontent') == 4) echo \" selected='selected'\";\n\t\t\t\t\t\techo \">4</option>\\n\";\n\n\t\t\t\t\t\techo \"<option value='5'\";\n\t\t\t\t\t\tif(get_option('itex_s_sape_links_beforecontent') == 5) echo \" selected='selected'\";\n\t\t\t\t\t\techo \">5</option>\\n\";\n\n\t\t\t\t\t\techo \"</select>\\n\";\n\n\t\t\t\t\t\techo '<label for=\"\">'.__('Before content links', 'iSape').'</label>';\n\n\t\t\t\t\t\techo \"<br/>\\n\";\n\n\n\n\t\t\t\t\t\techo \"<select name='sape_links_aftercontent' id='sape_links_aftercontent'>\\n\";\n\n\t\t\t\t\t\techo \"<option value='0'\";\n\t\t\t\t\t\tif(!get_option('itex_s_sape_links_aftercontent')) echo\" selected='selected'\";\n\t\t\t\t\t\techo \">\".__(\"Disabled\", 'iSape').\"</option>\\n\";\n\n\t\t\t\t\t\techo \"<option value='1'\";\n\t\t\t\t\t\tif(get_option('itex_s_sape_links_aftercontent') == 1) echo \" selected='selected'\";\n\t\t\t\t\t\techo \">1</option>\\n\";\n\n\t\t\t\t\t\techo \"<option value='2'\";\n\t\t\t\t\t\tif(get_option('itex_s_sape_links_aftercontent') == 2) echo \" selected='selected'\";\n\t\t\t\t\t\techo \">2</option>\\n\";\n\n\t\t\t\t\t\techo \"<option value='3'\";\n\t\t\t\t\t\tif(get_option('itex_s_sape_links_aftercontent') == 3) echo \" selected='selected'\";\n\t\t\t\t\t\techo \">3</option>\\n\";\n\n\t\t\t\t\t\techo \"<option value='4'\";\n\t\t\t\t\t\tif(get_option('itex_s_sape_links_aftercontent') == 4) echo \" selected='selected'\";\n\t\t\t\t\t\techo \">4</option>\\n\";\n\n\t\t\t\t\t\techo \"<option value='5'\";\n\t\t\t\t\t\tif(get_option('itex_s_sape_links_aftercontent') == 5) echo \" selected='selected'\";\n\t\t\t\t\t\techo \">5</option>\\n\";\n\n\t\t\t\t\t\techo \"</select>\\n\";\n\n\t\t\t\t\t\techo '<label for=\"\">'.__('After content links', 'iSape').'</label>';\n\n\t\t\t\t\t\techo \"<br/>\\n\";\n\n\t\t\t\t\t\techo \"<select name='sape_links_sidebar' id='sape_links_sidebar'>\\n\";\n\n\t\t\t\t\t\techo \"<option value='0'\";\n\t\t\t\t\t\tif(!get_option('itex_s_sape_links_sidebar')) echo\" selected='selected'\";\n\t\t\t\t\t\techo \">\".__(\"Disabled\", 'iSape').\"</option>\\n\";\n\n\t\t\t\t\t\techo \"<option value='1'\";\n\t\t\t\t\t\tif(get_option('itex_s_sape_links_sidebar') == 1) echo \" selected='selected'\";\n\t\t\t\t\t\techo \">1</option>\\n\";\n\n\t\t\t\t\t\techo \"<option value='2'\";\n\t\t\t\t\t\tif(get_option('itex_s_sape_links_sidebar') == 2) echo \" selected='selected'\";\n\t\t\t\t\t\techo \">2</option>\\n\";\n\n\t\t\t\t\t\techo \"<option value='3'\";\n\t\t\t\t\t\tif(get_option('itex_s_sape_links_sidebar') == 3) echo \" selected='selected'\";\n\t\t\t\t\t\techo \">3</option>\\n\";\n\n\t\t\t\t\t\techo \"<option value='4'\";\n\t\t\t\t\t\tif(get_option('itex_s_sape_links_sidebar') == 4) echo \" selected='selected'\";\n\t\t\t\t\t\techo \">4</option>\\n\";\n\n\t\t\t\t\t\techo \"<option value='5'\";\n\t\t\t\t\t\tif(get_option('itex_s_sape_links_sidebar') == 5) echo \" selected='selected'\";\n\t\t\t\t\t\techo \">5</option>\\n\";\n\n\t\t\t\t\t\techo \"<option value='max'\";\n\t\t\t\t\t\tif(get_option('itex_s_sape_links_sidebar') == 'max') echo \" selected='selected'\";\n\t\t\t\t\t\techo \">\".__('Max', 'iSape').\"</option>\\n\";\n\n\t\t\t\t\t\techo \"</select>\\n\";\n\n\t\t\t\t\t\techo '<label for=\"\">'.__('Sidebar links', 'iSape').'</label>';\n\n\t\t\t\t\t\techo \"<br/>\\n\";\n\n\n\t\t\t\t\t\techo \"<select name='sape_links_footer' id='sape_links_footer'>\\n\";\n\t\t\t\t\t\techo \"<option value='0'\";\n\t\t\t\t\t\tif(!get_option('itex_s_sape_links_footer')) echo\" selected='selected'\";\n\t\t\t\t\t\techo \">\".__(\"Disabled\", 'iSape').\"</option>\\n\";\n\n\t\t\t\t\t\techo \"<option value='1'\";\n\t\t\t\t\t\tif(get_option('itex_s_sape_links_footer') == 1) echo \" selected='selected'\";\n\t\t\t\t\t\techo \">1</option>\\n\";\n\n\t\t\t\t\t\techo \"<option value='2'\";\n\t\t\t\t\t\tif(get_option('itex_s_sape_links_footer') == 2) echo \" selected='selected'\";\n\t\t\t\t\t\techo \">2</option>\\n\";\n\n\t\t\t\t\t\techo \"<option value='3'\";\n\t\t\t\t\t\tif(get_option('itex_s_sape_links_footer') == 3) echo \" selected='selected'\";\n\t\t\t\t\t\techo \">3</option>\\n\";\n\n\t\t\t\t\t\techo \"<option value='4'\";\n\t\t\t\t\t\tif(get_option('itex_s_sape_links_footer') == 4) echo \" selected='selected'\";\n\t\t\t\t\t\techo \">4</option>\\n\";\n\n\t\t\t\t\t\techo \"<option value='5'\";\n\t\t\t\t\t\tif(get_option('itex_s_sape_links_footer') == 5) echo \" selected='selected'\";\n\t\t\t\t\t\techo \">5</option>\\n\";\n\n\t\t\t\t\t\techo \"<option value='max'\";\n\t\t\t\t\t\tif(get_option('itex_s_sape_links_footer') == 'max') echo \" selected='selected'\";\n\t\t\t\t\t\techo \">\".__('Max', 'iSape').\"</option>\\n\";\n\n\t\t\t\t\t\techo \"</select>\\n\";\n\n\t\t\t\t\t\techo '<label for=\"\">'.__('Footer links', 'iSape').'</label>';\n\n\t\t\t\t\t\techo \"<br/>\\n\";\n\t\t\t\t\t\techo \"<select name='sape_pages_enable' id='sape_enable'>\\n\";\n\t\t\t\t\t\techo \"<option value='1'\";\n\n\t\t\t\t\t\tif(get_option('itex_s_sape_pages_enable')) echo \" selected='selected'\";\n\t\t\t\t\t\techo \">\".__(\"Enabled\", 'iSape').\"</option>\\n\";\n\n\t\t\t\t\t\techo \"<option value='0'\";\n\t\t\t\t\t\tif(!get_option('itex_s_sape_pages_enable')) echo\" selected='selected'\";\n\t\t\t\t\t\techo \">\".__(\"Disabled\", 'iSape').\"</option>\\n\";\n\t\t\t\t\t\techo \"</select>\\n\";\n\n\t\t\t\t\t\techo '<label for=\"\">'.__('Show content links only on Pages and Posts.', 'iSape').'</label>';\n\n\t\t\t\t\t\techo \"<br/>\\n\";\n\t\t\t\t\t\t?>\n\t\t\t\t\t</td>\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t</tr>\n\t\t\t\t<?php\n\t\t\t\t?>\n\t\t\t\t<tr>\n\t\t\t\t\t<th width=\"30%\" valign=\"top\" style=\"padding-top: 10px;\">\n\t\t\t\t\t\t<label for=\"\"><?php echo __('Sape context:', 'iSape'); ?></label>\n\t\t\t\t\t</th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\techo \"<select name='sape_sapecontext_enable' id='sape_enable'>\\n\";\n\t\t\t\t\t\techo \"<option value='1'\";\n\n\t\t\t\t\t\tif(get_option('itex_s_sape_sapecontext_enable')) echo \" selected='selected'\";\n\t\t\t\t\t\techo \">\".__(\"Enabled\", 'iSape').\"</option>\\n\";\n\n\t\t\t\t\t\techo \"<option value='0'\";\n\t\t\t\t\t\tif(!get_option('itex_s_sape_sapecontext_enable')) echo\" selected='selected'\";\n\t\t\t\t\t\techo \">\".__(\"Disabled\", 'iSape').\"</option>\\n\";\n\t\t\t\t\t\techo \"</select>\\n\";\n\n\t\t\t\t\t\techo '<label for=\"\">'.__('Context', 'iSape').'</label>';\n\n\t\t\t\t\t\techo \"<br/>\\n\";\n\n\t\t\t\t\t\techo \"<select name='sape_sapecontext_pages_enable' id='sape_enable'>\\n\";\n\t\t\t\t\t\techo \"<option value='1'\";\n\n\t\t\t\t\t\tif(get_option('itex_s_sape_sapecontext_pages_enable')) echo \" selected='selected'\";\n\t\t\t\t\t\techo \">\".__(\"Enabled\", 'iSape').\"</option>\\n\";\n\n\t\t\t\t\t\techo \"<option value='0'\";\n\t\t\t\t\t\tif(!get_option('itex_s_sape_sapecontext_pages_enable')) echo\" selected='selected'\";\n\t\t\t\t\t\techo \">\".__(\"Disabled\", 'iSape').\"</option>\\n\";\n\t\t\t\t\t\techo \"</select>\\n\";\n\n\t\t\t\t\t\techo '<label for=\"\">'.__('Show context only on Pages and Posts.', 'iSape').'</label>';\n\n\t\t\t\t\t\techo \"<br/>\\n\";\n\t\t\t\t\t\t?>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<th width=\"30%\" valign=\"top\" style=\"padding-top: 10px;\">\n\t\t\t\t\t\t<label for=\"\"><?php echo __('Masking of links', 'iSape'); ?>:</label>\n\t\t\t\t\t</th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\techo \"<select name='global_masking' id='global_masking'>\\n\";\n\t\t\t\t\t\techo \"<option value='1'\";\n\n\t\t\t\t\t\tif(get_option('itex_s_global_masking')) echo \" selected='selected'\";\n\t\t\t\t\t\techo __(\">Enabled</option>\\n\", 'iSape');\n\n\t\t\t\t\t\techo \"<option value='0'\";\n\t\t\t\t\t\tif(!get_option('itex_s_global_masking')) echo\" selected='selected'\";\n\t\t\t\t\t\techo __(\">Disabled</option>\\n\", 'iSape');\n\t\t\t\t\t\techo \"</select>\\n\";\n\n\t\t\t\t\t\techo '<label for=\"\">'.__('Masking of links', 'iSape').'.</label>';\n\n\t\t\t\t\t\t?>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<th width=\"30%\" valign=\"top\" style=\"padding-top: 10px;\">\n\t\t\t\t\t\t<label for=\"\"><?php echo __('Global debug:', 'iSape'); ?></label>\n\t\t\t\t\t</th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\techo \"<select name='global_debugenable' id='global_debugenable'>\\n\";\n\t\t\t\t\t\techo \"<option value='1'\";\n\n\t\t\t\t\t\tif(get_option('itex_s_global_debugenable')) echo \" selected='selected'\";\n\t\t\t\t\t\techo \">\".__(\"Enabled\", 'iSape').\"</option>\\n\";\n\n\t\t\t\t\t\techo \"<option value='0'\";\n\t\t\t\t\t\tif(!get_option('itex_s_global_debugenable')) echo\" selected='selected'\";\n\t\t\t\t\t\techo \">\".__(\"Disabled\", 'iSape').\"</option>\\n\";\n\t\t\t\t\t\techo \"</select>\\n\";\n\n\t\t\t\t\t\techo '<label for=\"\">'.__('Debug log in footer. For see debug user must register', 'iSape').'.</label>';\n\t\t\t\t\t\t\n\t\t\t\t\t\techo \"<br/>\";\n\t\t\t\t\t\t\n\t\t\t\t\t\techo \"<select name='global_debugenable_forall' id='global_debugenable_forall'>\\n\";\n\t\t\t\t\t\techo \"<option value='1'\";\n\n\t\t\t\t\t\tif(get_option('itex_s_global_debugenable_forall')) echo \" selected='selected'\";\n\t\t\t\t\t\techo \">\".__(\"Enabled\", 'iSape').\"</option>\\n\";\n\n\t\t\t\t\t\techo \"<option value='0'\";\n\t\t\t\t\t\tif(!get_option('itex_s_global_debugenable_forall')) echo\" selected='selected'\";\n\t\t\t\t\t\techo \">\".__(\"Disabled\", 'iSape').\"</option>\\n\";\n\t\t\t\t\t\techo \"</select>\\n\";\n\n\t\t\t\t\t\techo '<label for=\"\">'.__('Debug log in footer for all, who open the site. Dont leave this parameter switched Enabled for a long time, because in this case it will disclose your private data like SAPE UID', 'iSape').'.</label>';\n\t\t\t\t\t\t\n\t\t\t\t\t\t?>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<th width=\"30%\" valign=\"top\" style=\"padding-top: 10px;\">\n\t\t\t\t\t\t<label for=\"\"><?php echo __('Widgets settings:', 'iSape'); ?></label>\n\t\t\t\t\t</th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t$ws = wp_get_sidebars_widgets();\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\techo \"<select name='global_widget_links' id='global_widget_links'>\\n\";\n\t\t\t\t\t\techo \"<option value='0'\";\n\t\t\t\t\t\tif (count($ws['sidebar-1'])) if(!in_array('isape-links',$ws['sidebar-1'])) echo\" selected='selected'\";\n\t\t\t\t\t\techo \">\".__(\"Disabled\", 'iSape').\"</option>\\n\";\n\n\t\t\t\t\t\techo \"<option value='1'\";\n\t\t\t\t\t\tif (count($ws['sidebar-1'])) if (in_array('isape-links',$ws['sidebar-1'])) echo \" selected='selected'\";\n\t\t\t\t\t\techo \">\".__('Active','iSape').\"</option>\\n\";\n\n\t\t\t\t\t\techo \"</select>\\n\";\n\t\t\t\t\t\t\n\t\t\t\t\t\techo '<label for=\"\">'.__('Widget Links Active', 'iSape').'</label>';\n\n\t\t\t\t\t\techo \"<br/>\\n\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t?>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<th width=\"30%\" valign=\"top\" style=\"padding-top: 10px;\">\n\t\t\t\t\t\t<label for=\"\"></label>\n\t\t\t\t\t</th>\n\t\t\t\t\t<td align=\"center\">\n\t\t\t\t\t\t<br/><br/>\n\t\t\t\t\t\t<a target=\"_blank\" href=\"http://itex.name/go.php?http://www.sape.ru/r.a5a429f57e.php\"><img src=\"http://img.sape.ru/bn/sape_001.gif\" alt=\"www.sape.ru!\" border=\"0\" /></a>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t\t<?php\n\t}", "title": "" }, { "docid": "b56bd1baf18b57e0401ddc54425568b5", "score": "0.56158066", "text": "function _elgg_ajax_plugins_update() {\n\telgg_admin_gatekeeper();\n\t_elgg_admin_add_plugin_settings_menu();\n\telgg_set_context('admin');\n\n\treturn elgg_ok_response([\n\t\t'list' => elgg_view('admin/plugins', ['list_only' => true]),\n\t\t'sidebar' => elgg_view('admin/sidebar'),\n\t]);\n}", "title": "" }, { "docid": "92eb18fad287e9295ba86d90d2a0f653", "score": "0.5614569", "text": "public function updateAction(){\r\n \t\t\r\n \t\t/**\r\n \t\t * check serial number and domain\r\n \t\t */\r\n \t\t$hs\t\t= str_replace('www.', '', $_SERVER['HTTP_HOST']);\r\n \t\t$serial\t= $GLOBALS['server_info']['serialNum']; \r\n \t\t$request_url = $this->api_domain.'/wpform/update/domainCheck/domain/'.$hs.'/serial/'.$serial;\r\n \t\t\r\n\t\t$method\t= 'POST';\r\n\t\t$domain\t= request($request_url,$method);\r\n \t\t\r\n\t\t\r\n \t\tif ($domain == $hs){\r\n \t\t\t$this->updateCheck('0');\t\t\r\n \t\t}else{\r\n \t\t\t\r\n \t\t\techo \"You can't update\"; exit;\r\n \t\t\t$val_array = array('');\r\n\t \t\t$url = $this->makeUrl($val_array);\r\n\t \t\t$this->redirect($url);\r\n \t\t}\r\n \t\t\r\n \t\t\r\n \t}", "title": "" }, { "docid": "8631246864371adb257f398a1a7f99f8", "score": "0.5610884", "text": "function multi_admin_actions() { \n add_options_page(\"Multi Analytic Tracker Options\", \"Multi Analytic Tracker\", \"manage_options\", \"multi-analytic-tracker\", 'admin_menu_output'); \n }", "title": "" }, { "docid": "b8bb156c01d66760753a22df00522ab3", "score": "0.5602884", "text": "public function update( $args, $assoc_args ) {\n\n\t\tdelem_log( 'site update start' );\n\t\t$args = auto_site_name( $args, 'site', __FUNCTION__ );\n\t\t$this->site_data = get_site_info( $args, true, true, false );\n\t\t$ssl = get_flag_value( $assoc_args, 'ssl', false );\n\t\t$php = get_flag_value( $assoc_args, 'php', false );\n\t\t$proxy_cache = get_flag_value( $assoc_args, 'proxy-cache', false );\n\t\t$add_domains = get_flag_value( $assoc_args, 'add-alias-domains', false );\n\t\t$delete_domains = get_flag_value( $assoc_args, 'delete-alias-domains', false );\n\n\t\tif ( $ssl ) {\n\t\t\t$this->update_ssl( $assoc_args );\n\t\t}\n\n\t\tif ( $php ) {\n\t\t\t$this->update_php( $args, $assoc_args );\n\t\t}\n\n\t\tif ( $proxy_cache ) {\n\t\t\t$this->update_proxy_cache( $args, $assoc_args );\n\t\t}\n\n\t\tif ( $add_domains || $delete_domains ) {\n\t\t\t$this->update_alias_domains( $args, $assoc_args );\n\t\t}\n\t}", "title": "" }, { "docid": "aa39219ced7c4e74c1dab54517029615", "score": "0.56007123", "text": "function edit_always() {\n return (has_capability('moodle/site:manageblocks', get_context_instance(CONTEXT_SYSTEM)) && defined('ADMIN_STICKYBLOCKS'));\n }", "title": "" }, { "docid": "f5e2b498a341166a780eb853a460af31", "score": "0.55895", "text": "function updatesAvailable() {\n\t\t$currentTime = time();\n\t\t$lastChecked = $this->pref->read('lastUpdateCheck');\n\t\tif ($lastChecked==false) $lastChecked = $currentTime - 86400;\n\t\tif ($currentTime - $lastChecked >= 86400 || isset($_GET['checkForUpdates'])) {\n\t\t\t$updateAvailable = $this->checkForUpdates();\n\t\t\t$this->pref->save('updateAvailable', $updateAvailable);\n\t\t\t$this->pref->save('lastUpdateCheck', $currentTime);\n\t\t}\n\t\tif (!isset($updateAvailable)) $updateAvailable = (bool)$this->pref->read('updateAvailable');\n\t\treturn $updateAvailable;\n\t}", "title": "" }, { "docid": "e7da939747fa2ab7a25ba8deeda82eaa", "score": "0.5588731", "text": "public function update_permissions() {\n\t\tif ( ! $this->verify_nonce( 'ld_hub_update_permissions' ) ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( ! $this->check_permission() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$intention = isset( $_POST['intention'] ) ? sanitize_title( $_POST['intention'] ) : false;\n\t\t$user_id = isset( $_POST['user_id'] ) ? absint( $_POST['user_id'] ) : false;\n\t\tif ( false === $intention || false === $user_id ) {\n\t\t\treturn;\n\t\t}\n\t\tswitch ( $intention ) {\n\t\t\tcase 'add':\n\t\t\t\t$permissions = $_POST['allow'] ?? array();\n\t\t\t\t$permissions = array_map( 'sanitize_title', $permissions );\n\t\t\t\t$this->allow_user( $user_id, $permissions, false );\n\t\t\t\tbreak;\n\t\t\tcase 'remove':\n\t\t\t\t$this->disallow_user( $user_id );\n\t\t\t\tbreak;\n\t\t}\n\t\twp_send_json_success( $this->get_users_list() );\n\t}", "title": "" }, { "docid": "35bea95dd31b3f34ccb01f0219dba498", "score": "0.5586649", "text": "public function checkForUpdates() {\n\t\t$args = [\n\t\t\t'license' => $this->key,\n\t\t\t'domain' => aioseo()->helpers->getSiteDomain(),\n\t\t\t'sku' => $this->pluginSlug,\n\t\t\t'version' => $this->version,\n\t\t\t'php_version' => PHP_VERSION,\n\t\t\t'wp_version' => get_bloginfo( 'version' )\n\t\t];\n\t\treturn aioseo()->helpers->sendRequest( $this->getUrl() . 'update/', $args );\n\t}", "title": "" }, { "docid": "cf1e936a5bd4127a5526296edcc437b4", "score": "0.55809236", "text": "function update_accessright()\n {\n $parameter_array = $this->get_parameter_array();\n parent::update($this->id, 'ssi', $parameter_array);\n }", "title": "" }, { "docid": "e2139a427d1985946d4b68844b651600", "score": "0.5578787", "text": "public function setAtAdminPanel()\n {\n $this->_blAtAdminPanel = true;\n }", "title": "" }, { "docid": "caef0758eecab810e9ca7b21eedb5713", "score": "0.55770344", "text": "public static function reward_system_update_settings() {\n woocommerce_update_options(RSGeneralTabSetting::reward_system_admin_fields());\n }", "title": "" }, { "docid": "50dc4f824ee97fee36cf626e63da842d", "score": "0.5568818", "text": "public function maybe_add_option() {\n\t\tif ( $this->get_original_option() === false ) {\n\t\t\tif ( $this->multisite_only !== true ) {\n\t\t\t\tupdate_option( $this->option_name, $this->get_defaults() );\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->update_site_option( $this->get_defaults() );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c1a546ca571bf25eed68858dbd89ffe4", "score": "0.55654925", "text": "function admin()\n{\n return current_user_can('manage_options');\n}", "title": "" }, { "docid": "ece9e49a2b81e0f9ee360b80415055b0", "score": "0.5555948", "text": "public function editsiteAction()\n {\n $result = $this->checkId();\n if ($result == false) {\n return;\n }\n $pageIndex = (int)$this->_request->getParam('pageIndex');\n $hidSrhName = $this->_request->getParam('hidSrhName');\n $hidSrhOwner = $this->_request->getParam('hidSrhOwner');\n $hidSrhCate = (int)$this->_request->getParam('hidSrhCate');\n\n require_once 'Admin/Dal/AppSite.php';\n $dalApp = Admin_Dal_AppSite::getDefaultInstance();\n $rowSite = $dalApp->getSiteById($this->_aid);\n if (empty($rowSite)) {\n $this->_redirect($this->_baseUrl . '/manage/addsite');\n return;\n }\n\n require_once 'Admin/Dal/Category.php';\n $dalCategory = Admin_Dal_Category::getDefaultInstance();\n $this->view->lstCate = $dalCategory->getCategoryList();\n require_once 'Admin/Dal/User.php';\n $dalUser = Admin_Dal_User::getDefaultInstance();\n $this->view->lstOwner = $dalUser->getUserList(3);\n\n $this->view->siteInfo = $rowSite;\n $this->view->pageIndex = $pageIndex;\n $this->view->hidSrhName = $hidSrhName;\n $this->view->hidSrhOwner = $hidSrhOwner;\n $this->view->hidSrhCate = $hidSrhCate;\n $this->view->title = 'OpenSocial APP Control Panel|Admin';\n $this->render();\n }", "title": "" }, { "docid": "b7e78592085f2d44459ae499ce28e993", "score": "0.5552996", "text": "function update() {\n\t\t\t\t$this->update_html_option($this->name, Params::get($this->name, ''));\n\t\t\t}", "title": "" }, { "docid": "4b7db906e653b6608ba76c7474e4079e", "score": "0.5548445", "text": "public function has_update();", "title": "" }, { "docid": "021e6ed24f9995e13d28778efcffae00", "score": "0.5547626", "text": "function admin_footer_update() {\n\n\techo 'This tool is for authorized <a href=\"https://www.covenanthealth.com/\">Covenant Health</a> employees only. Your IP address has been recorded.';\n}", "title": "" }, { "docid": "ffd7d0f5ea9f113bb07aeb95478919f4", "score": "0.5534113", "text": "protected function setupUpdateOperation()\n {\n $this->authorize('update', $this->crud->getEntryWithLocale($this->crud->getCurrentEntryId()));\n\n $this->setupCreateOperation();\n CRUD::addField(['name' => 'timestamps', 'label' => 'Cập nhật thời gian', 'type' => 'checkbox', 'tab' => 'Cập nhật']);\n }", "title": "" }, { "docid": "d2c7d026d63c4c87f963abb5491600d3", "score": "0.5512448", "text": "public function authorize()\n {\n // only allow updates if the user is logged in\n return true;\n }", "title": "" }, { "docid": "a6a2b29b3f92790b12a681ca149289e3", "score": "0.55093455", "text": "function settings_page() {\n\t\t\t\n\t\t\t// Get the user options\n\t\t\t$settings = $this->get_settings();\n\t\t\t$settings_saved = false;\n\n\t\t\tif ( isset( $_REQUEST['update_leaky_paywall_settings'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tif ( !empty( $_REQUEST['license_key'] ) )\n\t\t\t\t\t$settings['license_key'] = $_REQUEST['license_key'];\n\t\t\t\t\t\n\t\t\t\tif ( !empty( $_REQUEST['page_for_login'] ) )\n\t\t\t\t\t$settings['page_for_login'] = $_REQUEST['page_for_login'];\n\t\t\t\t\t\n\t\t\t\tif ( !empty( $_REQUEST['page_for_subscription'] ) )\n\t\t\t\t\t$settings['page_for_subscription'] = $_REQUEST['page_for_subscription'];\n\n\t\t\t\tif ( !empty( $_REQUEST['page_for_after_subscribe'] ) )\n\t\t\t\t\t$settings['page_for_after_subscribe'] = $_REQUEST['page_for_after_subscribe'];\n\t\t\t\t\t\n\t\t\t\tif ( !empty( $_REQUEST['page_for_profile'] ) )\n\t\t\t\t\t$settings['page_for_profile'] = $_REQUEST['page_for_profile'];\n\t\t\t\t\t\n\t\t\t\tif ( !empty( $_REQUEST['login_method'] ) )\n\t\t\t\t\t$settings['login_method'] = $_REQUEST['login_method'];\n\t\t\t\t\n\t\t\t\tif ( !empty( $_REQUEST['post_types'] ) )\n\t\t\t\t\t$settings['post_types'] = $_REQUEST['post_types'];\n\t\t\t\t\t\n\t\t\t\tif ( isset( $_REQUEST['free_articles'] ) )\n\t\t\t\t\t$settings['free_articles'] = trim( $_REQUEST['free_articles'] );\n\t\t\t\t\t\n\t\t\t\tif ( !empty( $_REQUEST['site_name'] ) )\n\t\t\t\t\t$settings['site_name'] = trim( $_REQUEST['site_name'] );\n\t\t\t\t\t\n\t\t\t\tif ( !empty( $_REQUEST['from_name'] ) )\n\t\t\t\t\t$settings['from_name'] = trim( $_REQUEST['from_name'] );\n\t\t\t\t\t\n\t\t\t\tif ( !empty( $_REQUEST['from_email'] ) )\n\t\t\t\t\t$settings['from_email'] = trim( $_REQUEST['from_email'] );\n\n\t\t\t\tif ( !empty( $_REQUEST['new_email_subject'] ) )\n\t\t\t\t\t$settings['new_email_subject'] = trim( $_REQUEST['new_email_subject'] );\n\n\t\t\t\tif ( !empty( $_REQUEST['new_email_body'] ) )\n\t\t\t\t\t$settings['new_email_body'] = trim( $_REQUEST['new_email_body'] );\n\t\t\t\t\t\n\t\t\t\tif ( !empty( $_REQUEST['cookie_expiration'] ) )\n\t\t\t\t\t$settings['cookie_expiration'] = trim( $_REQUEST['cookie_expiration'] );\n\t\t\t\t\t\n\t\t\t\tif ( !empty( $_REQUEST['cookie_expiration_interval'] ) )\n\t\t\t\t\t$settings['cookie_expiration_interval'] = trim( $_REQUEST['cookie_expiration_interval'] );\n\n\t\t\t\tif ( !empty( $_REQUEST['leaky_paywall_currency'] ) )\n\t\t\t\t\t$settings['leaky_paywall_currency'] = trim( $_REQUEST['leaky_paywall_currency'] );\n\t\t\t\t\t\n\t\t\t\tif ( !empty( $_REQUEST['restrict_pdf_downloads'] ) )\n\t\t\t\t\t$settings['restrict_pdf_downloads'] = $_REQUEST['restrict_pdf_downloads'];\n\t\t\t\telse\n\t\t\t\t\t$settings['restrict_pdf_downloads'] = 'off';\n\t\t\t\t\t\n\t\t\t\tif ( !empty( $_REQUEST['subscribe_login_message'] ) )\n\t\t\t\t\t$settings['subscribe_login_message'] = trim( $_REQUEST['subscribe_login_message'] );\n\t\t\t\t\t\n\t\t\t\tif ( !empty( $_REQUEST['subscribe_upgrade_message'] ) )\n\t\t\t\t\t$settings['subscribe_upgrade_message'] = trim( $_REQUEST['subscribe_upgrade_message'] );\n\t\t\t\t\t\n\t\t\t\tif ( !empty( $_REQUEST['css_style'] ) )\n\t\t\t\t\t$settings['css_style'] = $_REQUEST['css_style'];\n\t\t\t\t\t\n\t\t\t\tif ( !empty( $_REQUEST['test_mode'] ) )\n\t\t\t\t\t$settings['test_mode'] = $_REQUEST['test_mode'];\n\t\t\t\telse\n\t\t\t\t\t$settings['test_mode'] = apply_filters( 'zeen101_demo_test_mode', 'off' );\n\t\t\t\t\t\n\t\t\t\tif ( !empty( $_REQUEST['payment_gateway'] ) )\n\t\t\t\t\t$settings['payment_gateway'] = $_REQUEST['payment_gateway'];\n\t\t\t\telse\n\t\t\t\t\t$settings['payment_gateway'] = array( 'stripe' );\n\t\t\t\t\t\n\t\t\t\tif ( !empty( $_REQUEST['live_secret_key'] ) )\n\t\t\t\t\t$settings['live_secret_key'] = apply_filters( 'zeen101_demo_stripe_live_secret_key', trim( $_REQUEST['live_secret_key'] ) );\n\t\t\t\t\t\n\t\t\t\tif ( !empty( $_REQUEST['live_publishable_key'] ) )\n\t\t\t\t\t$settings['live_publishable_key'] = apply_filters( 'zeen101_demo_stripe_live_publishable_key', trim( $_REQUEST['live_publishable_key'] ) );\n\t\t\t\t\t\n\t\t\t\tif ( !empty( $_REQUEST['test_secret_key'] ) )\n\t\t\t\t\t$settings['test_secret_key'] = apply_filters( 'zeen101_demo_stripe_test_secret_key', trim( $_REQUEST['test_secret_key'] ) );\n\t\t\t\t\t\n\t\t\t\tif ( !empty( $_REQUEST['test_publishable_key'] ) )\n\t\t\t\t\t$settings['test_publishable_key'] = apply_filters( 'zeen101_demo_stripe_test_publishable_key', trim( $_REQUEST['test_publishable_key'] ) );\n\t\t\t\t\t\n\t\t\t\tif ( !empty( $_REQUEST['paypal_live_email'] ) )\n\t\t\t\t\t$settings['paypal_live_email'] = apply_filters( 'zeen101_demo_paypal_live_email', trim( $_REQUEST['paypal_live_email'] ) );\n\t\t\t\t\t\n\t\t\t\tif ( !empty( $_REQUEST['paypal_live_api_username'] ) )\n\t\t\t\t\t$settings['paypal_live_api_username'] = apply_filters( 'zeen101_demo_paypal_live_api_username', trim( $_REQUEST['paypal_live_api_username'] ) );\n\t\t\t\t\t\n\t\t\t\tif ( !empty( $_REQUEST['paypal_live_api_password'] ) )\n\t\t\t\t\t$settings['paypal_live_api_password'] = apply_filters( 'zeen101_demo_paypal_live_api_password', trim( $_REQUEST['paypal_live_api_password'] ) );\n\t\t\t\t\t\n\t\t\t\tif ( !empty( $_REQUEST['paypal_live_api_secret'] ) )\n\t\t\t\t\t$settings['paypal_live_api_secret'] = apply_filters( 'zeen101_demo_paypal_live_api_secret', trim( $_REQUEST['paypal_live_api_secret'] ) );\n\t\t\t\t\t\n\t\t\t\tif ( !empty( $_REQUEST['paypal_sand_email'] ) )\n\t\t\t\t\t$settings['paypal_sand_email'] = apply_filters( 'zeen101_demo_paypal_sand_email', trim( $_REQUEST['paypal_sand_email'] ) );\n\t\t\t\t\t\n\t\t\t\tif ( !empty( $_REQUEST['paypal_sand_api_username'] ) )\n\t\t\t\t\t$settings['paypal_sand_api_username'] = apply_filters( 'zeen101_demo_paypal_sand_api_username', trim( $_REQUEST['paypal_sand_api_username'] ) );\n\t\t\t\t\t\n\t\t\t\tif ( !empty( $_REQUEST['paypal_sand_api_password'] ) )\n\t\t\t\t\t$settings['paypal_sand_api_password'] = apply_filters( 'zeen101_demo_paypal_sand_api_password', trim( $_REQUEST['paypal_sand_api_password'] ) );\n\t\t\t\t\t\n\t\t\t\tif ( !empty( $_REQUEST['paypal_sand_api_secret'] ) )\n\t\t\t\t\t$settings['paypal_sand_api_secret'] = apply_filters( 'zeen101_demo_paypal_sand_api_secret', trim( $_REQUEST['paypal_sand_api_secret'] ) );\n\t\t\t\t\t\n\t\t\t\tif ( !empty( $_REQUEST['restrictions'] ) )\n\t\t\t\t\t$settings['restrictions'] = $_REQUEST['restrictions'];\n\t\t\t\telse\n\t\t\t\t\t$settings['restrictions'] = array();\n\t\t\t\t\t\n\t\t\t\tif ( !empty( $_REQUEST['levels'] ) ) {\n\t\t\t\t\t$settings['levels'] = $_REQUEST['levels'];\n\t\t\t\t} else {\n\t\t\t\t\t$settings['levels'] = array();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->update_settings( $settings );\n\t\t\t\t$settings_saved = true;\n\t\t\t\t\n\t\t\t\tdo_action( 'leaky_paywall_update_settings', $settings );\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif ( $settings_saved ) {\n\t\t\t\t\n\t\t\t\t// update settings notification ?>\n\t\t\t\t<div class=\"updated\"><p><strong><?php _e( \"zeen101's Leaky Paywall Settings Updated.\", 'issuem-leaky-paywall' );?></strong></p></div>\n\t\t\t\t<?php\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Display HTML form for the options below\n\t\t\t?>\n\t\t\t<div class=wrap>\n <div style=\"width:70%;\" class=\"postbox-container\">\n <div class=\"metabox-holder\">\t\n <div class=\"meta-box-sortables ui-sortable\">\n \n <form id=\"issuem\" method=\"post\" action=\"\">\n \n <h2 style='margin-bottom: 10px;' ><?php _e( \"zeen101's Leaky Paywall Settings\", 'issuem-leaky-paywall' ); ?></h2>\n \t\t\n\t\t\t\t\t\t<?php if ( is_multisite() && is_super_admin() ) { ?>\n \t\t\n\t\t\t\t\t\t<div id=\"site-wide-option\" class=\"postbox\">\n\t \n\t <div class=\"handlediv\" title=\"Click to toggle\"><br /></div>\n\t \n\t <h3 class=\"hndle\"><span><?php _e( 'Site Wide Options', 'issuem-leaky-paywall' ); ?></span></h3>\n\t \n\t <div class=\"inside\">\n\t \n\t <table id=\"issuem_license_key\" class=\"leaky-paywall-table\">\n\t \t<tr>\n\t <th rowspan=\"1\"> <?php _e( 'Enable Settings Site Wide?', 'issuem-leaky-paywall' ); ?></th>\n\t <td>\n\t <td><input type=\"checkbox\" id=\"site_wide_enabled\" name=\"site_wide_enabled\" <?php checked( $this->is_site_wide_enabled() ); ?> /></td>\n\t </td>\n\t </tr>\n\t </table>\n\t \n\t <p class=\"submit\">\n\t <input class=\"button-primary\" type=\"submit\" name=\"update_leaky_paywall_settings\" value=\"<?php _e( 'Save Settings', 'issuem-leaky-paywall' ) ?>\" />\n\t </p>\n\t \n\t </div>\n\t \n\t </div>\n \t\t\n\t\t\t\t\t\t<?php } ?>\n \t\t\n\t\t\t\t\t\t<div id=\"license-key\" class=\"postbox\">\n\t \n\t \n\t \n\t <div class=\"inside\">\n\t \n\t <table id=\"issuem_license_key\" class=\"form-table\">\n\t \t<tr>\n\t <th rowspan=\"1\"> <?php _e( 'License Key', 'issuem-leaky-paywall' ); ?></th>\n\t <td>\n\t <input type=\"text\" id=\"license_key\" class=\"regular-text\" name=\"license_key\" value=\"<?php echo htmlspecialchars( stripcslashes( $settings['license_key'] ) ); ?>\" />\n\t \n\t <?php if( $settings['license_status'] !== false \n\t\t\t\t\t\t\t\t\t\t\t&& $settings['license_status'] == 'valid' ) { ?>\n\t\t\t\t\t\t\t\t\t\t<span style=\"color:green;\"><?php _e('active'); ?></span>\n\t\t\t\t\t\t\t\t\t\t<input type=\"submit\" class=\"button-secondary\" name=\"leaky_paywall_license_deactivate\" value=\"<?php _e( 'Deactivate License', 'issuem-leaky-paywall' ); ?>\"/>\n\t\t\t\t\t\t\t\t\t<?php } else if ( $settings['license_status'] == 'invalid' ) {\t?>\n\t\t\t\t\t\t\t\t\t<span style=\"color:red;\"><?php _e('invalid'); ?></span>\n\t\t\t\t\t\t\t\t\t<input type=\"submit\" class=\"button-secondary\" name=\"leaky_paywall_license_activate\" value=\"<?php _e( 'Activate License', 'issuem-leaky-paywall' ); ?>\"/>\n\t\t\t\t\t\t\t\t\t<?php } else { ?>\n\t\t\t\t\t\t\t\t\t\t<input type=\"submit\" class=\"button-secondary\" name=\"leaky_paywall_license_activate\" value=\"<?php _e( 'Activate License', 'issuem-leaky-paywall' ); ?>\"/>\n\t\t\t\t\t\t\t\t\t<?php } ?>\n\t <?php wp_nonce_field( 'verify', 'license_wpnonce' ); ?>\n\t </td>\n\t </tr>\n\t </table>\n\t \n\t <p class=\"submit\">\n\t <input class=\"button-primary\" type=\"submit\" name=\"update_leaky_paywall_settings\" value=\"<?php _e( 'Save Settings', 'issuem-leaky-paywall' ) ?>\" />\n\t </p>\n\t \n\t </div>\n\t \n\t </div>\n\t \n\t\t\t\t\t\t<?php wp_nonce_field( 'issuem_leaky_general_options', 'issuem_leaky_general_options_nonce' ); ?>\n\t \n\t <div id=\"modules\" class=\"postbox\">\n\t \n\t <div class=\"handlediv\" title=\"Click to toggle\"><br /></div>\n\t \n\t <h3 class=\"hndle\"><span><?php _e( 'General Settings', 'issuem-leaky-paywall' ); ?></span></h3>\n\t \n\t <div class=\"inside\">\n\t \n\t <table id=\"leaky_paywall_administrator_options\" class=\"form-table\">\n\t \n\t \t<tr>\n\t <th><?php _e( 'Page for Log In', 'issuem-leaky-paywall' ); ?></th>\n\t <td>\n\t\t\t\t\t\t\t\t\t<?php echo wp_dropdown_pages( array( 'name' => 'page_for_login', 'echo' => 0, 'show_option_none' => __( '&mdash; Select &mdash;' ), 'option_none_value' => '0', 'selected' => $settings['page_for_login'] ) ); ?>\n\t <p class=\"description\"><?php printf( __( 'Add this shortcode to your Log In page: %s', 'issuem-leaky-paywall' ), '[leaky_paywall_login]' ); ?></p>\n\t </td>\n\t </tr>\n\t \n\t \t<tr>\n\t <th><?php _e( 'Page for Subscription', 'issuem-leaky-paywall' ); ?></th>\n\t <td>\n\t\t\t\t\t\t\t\t\t<?php echo wp_dropdown_pages( array( 'name' => 'page_for_subscription', 'echo' => 0, 'show_option_none' => __( '&mdash; Select &mdash;' ), 'option_none_value' => '0', 'selected' => $settings['page_for_subscription'] ) ); ?>\n\t <p class=\"description\"><?php printf( __( 'Add this shortcode to your Subscription page: %s', 'issuem-leaky-paywall' ), '[leaky_paywall_subscription]' ); ?></p>\n\t </td>\n\t </tr>\n\t \n\t \t<tr>\n\t <th><?php _e( 'Page for Profile', 'issuem-leaky-paywall' ); ?></th>\n\t <td>\n\t\t\t\t\t\t\t\t\t<?php echo wp_dropdown_pages( array( 'name' => 'page_for_profile', 'echo' => 0, 'show_option_none' => __( '&mdash; Select &mdash;' ), 'option_none_value' => '0', 'selected' => $settings['page_for_profile'] ) ); ?>\n\t <p class=\"description\"><?php printf( __( 'Add this shortcode to your Profile page: %s', 'issuem-leaky-paywall' ), '[leaky_paywall_profile]' ); ?></p>\n\t </td>\n\t </tr>\n\t \n\t \t<tr>\n\t <th><?php _e( 'Login Method', 'issuem-leaky-paywall' ); ?></th>\n\t <td>\n\t\t\t\t\t\t\t\t\t<select id='login_method' name='login_method'>\n\t\t\t\t\t\t\t\t\t\t<option value='traditional' <?php selected( 'traditional', $settings['login_method'] ); ?> ><?php _e( 'Traditional', 'issuem-leaky-paywall' ); ?></option>\n\t\t\t\t\t\t\t\t\t\t<option value='passwordless' <?php selected( 'passwordless', $settings['login_method'] ); ?> ><?php _e( 'Passwordless', 'issuem-leaky-paywall' ); ?></option>\n\t\t\t\t\t\t\t\t\t</select>\n\t <p class=\"description\"><?php printf( __( 'Traditional allows users to log in with a username and password. Passwordless authenticates the user via a secure link sent to their email.', 'issuem-leaky-paywall' ) ); ?></p>\n\t </td>\n\t </tr>\n\t \n\t \t<tr>\n\t <th><?php _e( 'Subscribe or Login Message', 'issuem-leaky-paywall' ); ?></th>\n\t <td>\n\t \t\t\t\t<textarea id=\"subscribe_login_message\" class=\"large-text\" name=\"subscribe_login_message\" cols=\"50\" rows=\"3\"><?php echo stripslashes( $settings['subscribe_login_message'] ); ?></textarea>\n\t <p class=\"description\">\n\t <?php _e( \"Available replacement variables: {{SUBSCRIBE_LOGIN_URL}} {{SUBSCRIBE_URL}} {{LOGIN_URL}}\", 'issuem-leaky-paywall' ); ?>\n\t </p>\n\t </td>\n\t </tr>\n\t \n\t \t<tr>\n\t <th><?php _e( 'Upgrade Message', 'issuem-leaky-paywall' ); ?></th>\n\t <td>\n\t \t\t\t\t<textarea id=\"subscribe_upgrade_message\" class=\"large-text\" name=\"subscribe_upgrade_message\" cols=\"50\" rows=\"3\"><?php echo stripslashes( $settings['subscribe_upgrade_message'] ); ?></textarea>\n\t <p class=\"description\">\n\t <?php _e( \"Available replacement variables: {{SUBSCRIBE_LOGIN_URL}} {{SUBSCRIBE_URL}}\", 'issuem-leaky-paywall' ); ?>\n\t </p>\n\t </td>\n\t </tr>\n\t \n\t \t<tr>\n\t <th><?php _e( 'CSS Style', 'issuem-leaky-paywall' ); ?></th>\n\t <td>\n\t\t\t\t\t\t\t\t\t<select id='css_style' name='css_style'>\n\t\t\t\t\t\t\t\t\t\t<option value='default' <?php selected( 'default', $settings['css_style'] ); ?> ><?php _e( 'Default', 'issuem-leaky-paywall' ); ?></option>\n\t\t\t\t\t\t\t\t\t\t<option value='none' <?php selected( 'none', $settings['css_style'] ); ?> ><?php _e( 'None', 'issuem-leaky-paywall' ); ?></option>\n\t\t\t\t\t\t\t\t\t</select>\n\t </td>\n\t </tr>\n\n\t <tr>\n\t <th><?php _e( 'After Subscribe Page', 'issuem-leaky-paywall' ); ?></th>\n\t <td>\n\t\t\t\t\t\t\t\t\t<?php echo wp_dropdown_pages( array( 'name' => 'page_for_after_subscribe', 'echo' => 0, 'show_option_none' => __( '&mdash; Select &mdash;' ), 'option_none_value' => '0', 'selected' => $settings['page_for_after_subscribe'] ) ); ?>\n\t <p class=\"description\"><?php _e( 'Page to redirect to after a user subscribes', 'issuem-leaky-paywall' ); ?></p>\n\t </td>\n\t </tr>\n\t \n\t </table>\n\t \n\t <p class=\"submit\">\n\t <input class=\"button-primary\" type=\"submit\" name=\"update_leaky_paywall_settings\" value=\"<?php _e( 'Save Settings', 'issuem-leaky-paywall' ) ?>\" />\n\t </p>\n\t\n\t </div>\n\t \n\t </div>\n\t \n\t <div id=\"modules\" class=\"postbox\">\n\t \n\t <div class=\"handlediv\" title=\"Click to toggle\"><br /></div>\n\t \n\t <h3 class=\"hndle\"><span><?php _e( 'Email Settings', 'issuem-leaky-paywall' ); ?></span></h3>\n\t \n\t <div class=\"inside\">\n\t \n\t <table id=\"leaky_paywall_administrator_options\" class=\"form-table\">\n\t \n\t \t<tr>\n\t <th><?php _e( 'Site Name', 'issuem-leaky-paywall' ); ?></th>\n\t <td><input type=\"text\" id=\"site_name\" class=\"regular-text\" name=\"site_name\" value=\"<?php echo htmlspecialchars( stripcslashes( $settings['site_name'] ) ); ?>\" /></td>\n\t </tr>\n\t \n\t \t<tr>\n\t <th><?php _e( 'From Name', 'issuem-leaky-paywall' ); ?></th>\n\t <td><input type=\"text\" id=\"from_name\" class=\"regular-text\" name=\"from_name\" value=\"<?php echo htmlspecialchars( stripcslashes( $settings['from_name'] ) ); ?>\" /></td>\n\t </tr>\n\t \n\t \t<tr>\n\t <th><?php _e( 'From Email', 'issuem-leaky-paywall' ); ?></th>\n\t <td><input type=\"text\" id=\"from_email\" class=\"regular-text\" name=\"from_email\" value=\"<?php echo htmlspecialchars( stripcslashes( $settings['from_email'] ) ); ?>\" /></td>\n\t </tr>\n\n\t <tr><td colspan=\"2\"><h3>New Subscriber Email</h3></td></tr>\n\n\t <tr>\n\t <th><?php _e( 'Subject', 'issuem-leaky-paywall' ); ?></th>\n\t <td><input type=\"text\" id=\"new_email_subject\" class=\"regular-text\" name=\"new_email_subject\" value=\"<?php echo htmlspecialchars( stripcslashes( $settings['new_email_subject'] ) ); ?>\" />\n\t \t<p class=\"description\">The subject line for the email sent to new subscribers.</p>\n\t </td>\n\t </tr>\n\n\t <tr>\n\t <th><?php _e( 'Body', 'issuem-leaky-paywall' ); ?></th>\n\t <td><textarea id=\"new_email_body\" class=\"large-text\" name=\"new_email_body\"><?php echo htmlspecialchars( stripcslashes( $settings['new_email_body'] ) ); ?></textarea>\n\t <p class=\"description\">The email message that is sent to new subscribers.</p>\n\t <p class=\"description\">Available template tags: <br>\n\t %blogname%, %username%, %password%, %firstname%, %lastname%, and %displayname%</p>\n\t </td>\n\t </tr>\n\t \n\t </table>\n\t \n\t <p class=\"submit\">\n\t <input class=\"button-primary\" type=\"submit\" name=\"update_leaky_paywall_settings\" value=\"<?php _e( 'Save Settings', 'issuem-leaky-paywall' ) ?>\" />\n\t </p>\n\t\n\t </div>\n\t \n\t </div>\n\t \n\t <div id=\"modules\" class=\"postbox leaky-paywall-gateway-settings\">\n\t \n\t <div class=\"handlediv\" title=\"Click to toggle\"><br /></div>\n\t \n\t <h3 class=\"hndle\"><span><?php _e( 'Payment Gateway Settings', 'issuem-leaky-paywall' ); ?></span></h3>\n\t \n\t <div class=\"inside\">\n\t \n\t <table id=\"leaky_paywall_gateway_options\" class=\"form-table\">\n\t\t\t\t \t\t\t\t\t\t\t\t\n\t \t<tr class=\"gateway-options\">\n\t <th><?php _e( 'Enabled Gateways', 'issuem-leaky-paywall' ); ?></th>\n\t <td>\n\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t<input id=\"enable-stripe\" type=\"checkbox\" name=\"payment_gateway[]\" value=\"stripe\" <?php checked( in_array( 'stripe', $settings['payment_gateway'] ) ); ?> /> <label for=\"enable-stripe\"><?php _e( 'Stripe', 'issuem-leaky-paywall' ); ?></label>\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t<input id=\"enable-paypal-standard\" type=\"checkbox\" name=\"payment_gateway[]\" value='paypal_standard' <?php checked( in_array( 'paypal_standard', $settings['payment_gateway'] ) ); ?> /> <label for=\"enable-paypal-standard\"><?php _e( 'PayPal Standard', 'issuem-leaky-paywall' ); ?></label>\n\t\t\t\t\t\t\t\t\t\t</p>\n\t </td>\n\t </tr>\n\t \n\t <tr class=\"gateway-options\">\n\t \t<th><?php _e( \"Test Mode?\", 'issuem-leaky-paywall' ); ?></th>\n\t <td><input type=\"checkbox\" id=\"test_mode\" name=\"test_mode\" <?php checked( 'on', $settings['test_mode'] ); ?> /></td>\n\t </tr>\n\t \n\t </table>\n\t \n\t <?php\n\t if ( in_array( 'stripe', $settings['payment_gateway'] ) ) {\n\t ?>\n\t \n\t <table id=\"leaky_paywall_stripe_options\" class=\"form-table\">\n\t \n\t\t <tr><th><?php _e( 'Stripe Settings', 'issuem-leaky-paywall' ); ?></th><td></td></tr>\n\t \n\t \t<tr>\n\t <th><?php _e( 'Live Secret Key', 'issuem-leaky-paywall' ); ?></th>\n\t <td><input type=\"text\" id=\"live_secret_key\" class=\"regular-text\" name=\"live_secret_key\" value=\"<?php echo htmlspecialchars( stripcslashes( $settings['live_secret_key'] ) ); ?>\" /></td>\n\t </tr>\n\t \n\t \t<tr>\n\t <th><?php _e( 'Live Publishable Key', 'issuem-leaky-paywall' ); ?></th>\n\t <td><input type=\"text\" id=\"live_publishable_key\" class=\"regular-text\" name=\"live_publishable_key\" value=\"<?php echo htmlspecialchars( stripcslashes( $settings['live_publishable_key'] ) ); ?>\" /></td>\n\t </tr>\n\t \n\t <tr>\n\t \t<th><?php _e( 'Live Webhooks', 'issuem-leaky-paywall' ); ?></th>\n\t \t<td><p class=\"description\"><?php echo esc_url( add_query_arg( 'issuem-leaky-paywall-stripe-live-webhook', '1', get_site_url() . '/' ) ); ?></p></td>\n\t </tr>\n\t \n\t \t<tr>\n\t <th><?php _e( 'Test Secret Key', 'issuem-leaky-paywall' ); ?></th>\n\t <td><input type=\"text\" id=\"test_secret_key\" class=\"regular-text\" name=\"test_secret_key\" value=\"<?php echo htmlspecialchars( stripcslashes( $settings['test_secret_key'] ) ); ?>\" /></td>\n\t </tr>\n\t \n\t \t<tr>\n\t <th><?php _e( 'Test Publishable Key', 'issuem-leaky-paywall' ); ?></th>\n\t <td><input type=\"text\" id=\"test_publishable_key\" class=\"regular-text\" name=\"test_publishable_key\" value=\"<?php echo htmlspecialchars( stripcslashes( $settings['test_publishable_key'] ) ); ?>\" /></td>\n\t </tr>\n\t \n\t <tr>\n\t \t<th><?php _e( 'Test Webhooks', 'issuem-leaky-paywall' ); ?></th>\n\t \t<td><p class=\"description\"><?php echo esc_url( add_query_arg( 'issuem-leaky-paywall-stripe-test-webhook', '1', get_site_url() . '/' ) ); ?></p></td>\n\t </tr>\n\t \n\t </table>\n\t\n\t\t <?php } ?>\n\t\t \n\t\t <?php\n\t\t if ( in_array( 'paypal_standard', $settings['payment_gateway'] ) ) { \n\t\t ?>\n\t\t \n\t\t <table id=\"leaky_paywall_paypal_options\" class=\"gateway-options form-table\">\n\t\t \n\t\t\t <tr><th><?php _e( 'PayPal Standard Settings', 'issuem-leaky-paywall' ); ?></th><td></td></tr>\n\t\t \n\t\t \t<tr>\n\t\t <th><?php _e( 'Merchant ID', 'issuem-leaky-paywall' ); ?></th>\n\t\t <td>\n\t\t \t<input type=\"text\" id=\"paypal_live_email\" class=\"regular-text\" name=\"paypal_live_email\" value=\"<?php echo htmlspecialchars( stripcslashes( $settings['paypal_live_email'] ) ); ?>\" />\n\t\t \t<p class=\"description\"><?php _e( 'Use PayPal Email Address in lieu of Merchant ID', 'issuem-leaky-paywall' ); ?></p>\n\t\t </td>\n\t\t </tr>\n\t\t \n\t\t \t<tr>\n\t\t <th><?php _e( 'API Username', 'issuem-leaky-paywall' ); ?></th>\n\t\t <td>\n\t\t \t<input type=\"text\" id=\"paypal_live_api_username\" class=\"regular-text\" name=\"paypal_live_api_username\" value=\"<?php echo htmlspecialchars( stripcslashes( $settings['paypal_live_api_username'] ) ); ?>\" />\n\t\t \t<p class=\"description\"><?php _e( 'At PayPal, see: Profile &rarr; My Selling Tools &rarr; API Access &rarr; Update &rarr; View API Signature (or Request API Credentials).', 'issuem-leaky-paywall' ); ?></p>\n\t\t </td>\n\t\t </tr>\n\t\t \n\t\t \t<tr>\n\t\t <th><?php _e( 'API Password', 'issuem-leaky-paywall' ); ?></th>\n\t\t <td>\n\t\t \t<input type=\"text\" id=\"paypal_live_api_password\" class=\"regular-text\" name=\"paypal_live_api_password\" value=\"<?php echo htmlspecialchars( stripcslashes( $settings['paypal_live_api_password'] ) ); ?>\" />\n\t\t </td>\n\t\t </tr>\n\t\t \n\t\t \t<tr>\n\t\t <th><?php _e( 'API Signature', 'issuem-leaky-paywall' ); ?></th>\n\t\t <td>\n\t\t \t<input type=\"text\" id=\"paypal_live_api_secret\" class=\"regular-text\" name=\"paypal_live_api_secret\" value=\"<?php echo htmlspecialchars( stripcslashes( $settings['paypal_live_api_secret'] ) ); ?>\" />\n\t\t </td>\n\t\t </tr>\n\t\t \n\t\t <tr>\n\t\t \t<th><?php _e( 'Live IPN', 'issuem-leaky-paywall' ); ?></th>\n\t\t \t<td><p class=\"description\"><?php echo esc_url( add_query_arg( 'issuem-leaky-paywall-paypal-standard-live-ipn', '1', get_site_url() . '/' ) ); ?></p></td>\n\t\t </tr>\n\t\t \n\t\t \t<tr>\n\t\t <th><?php _e( 'Sandbox Merchant ID', 'issuem-leaky-paywall' ); ?></th>\n\t\t <td>\n\t\t \t<input type=\"text\" id=\"paypal_sand_email\" class=\"regular-text\" name=\"paypal_sand_email\" value=\"<?php echo htmlspecialchars( stripcslashes( $settings['paypal_sand_email'] ) ); ?>\" />\n\t\t \t<p class=\"description\"><?php _e( 'Use PayPal Sandbox Email Address in lieu of Merchant ID', 'issuem-leaky-paywall' ); ?></p>\n\t\t </td>\n\t\t </tr>\n\t\t \n\t\t \t<tr>\n\t\t <th><?php _e( 'Sandbox API Username', 'issuem-leaky-paywall' ); ?></th>\n\t\t <td>\n\t\t \t<input type=\"text\" id=\"paypal_sand_api_username\" class=\"regular-text\" name=\"paypal_sand_api_username\" value=\"<?php echo htmlspecialchars( stripcslashes( $settings['paypal_sand_api_username'] ) ); ?>\" />\n\t\t \t<p class=\"description\"><?php _e( 'At PayPal, see: Profile &rarr; My Selling Tools &rarr; API Access &rarr; Update &rarr; View API Signature (or Request API Credentials).', 'issuem-leaky-paywall' ); ?></p>\n\t\t </td>\n\t\t </tr>\n\t\t \n\t\t \t<tr>\n\t\t <th><?php _e( 'Sandbox API Password', 'issuem-leaky-paywall' ); ?></th>\n\t\t <td>\n\t\t \t<input type=\"text\" id=\"paypal_sand_api_password\" class=\"regular-text\" name=\"paypal_sand_api_password\" value=\"<?php echo htmlspecialchars( stripcslashes( $settings['paypal_sand_api_password'] ) ); ?>\" />\n\t\t </td>\n\t\t </tr>\n\t\t \n\t\t \t<tr>\n\t\t <th><?php _e( 'Sandbox API Signature', 'issuem-leaky-paywall' ); ?></th>\n\t\t <td>\n\t\t \t<input type=\"text\" id=\"paypal_sand_api_secret\" class=\"regular-text\" name=\"paypal_sand_api_secret\" value=\"<?php echo htmlspecialchars( stripcslashes( $settings['paypal_sand_api_secret'] ) ); ?>\" />\n\t\t </td>\n\t\t </tr>\n\t\t \n\t\t <tr>\n\t\t \t<th><?php _e( 'Sandbox IPN', 'issuem-leaky-paywall' ); ?></th>\n\t\t \t<td><p class=\"description\"><?php echo esc_url( add_query_arg( 'issuem-leaky-paywall-paypal-standard-test-ipn', '1', get_site_url() . '/' ) ); ?></p></td>\n\t\t </tr>\n\t\t \n\t\t </table>\n\t\t\n\t\t <?php } ?>\n\t \n\t <?php wp_nonce_field( 'issuem_leaky_general_options', 'issuem_leaky_general_options_nonce' ); ?>\n\t \n\t <p class=\"submit\">\n\t <input class=\"button-primary\" type=\"submit\" name=\"update_leaky_paywall_settings\" value=\"<?php _e( 'Save Settings', 'issuem-leaky-paywall' ) ?>\" />\n\t </p>\n\t\n\t </div>\n\t \n\t </div>\n\n\t <?php // currency options ?>\n\n\t <div id=\"modules\" class=\"postbox\">\n \n\t\t\t <div class=\"handlediv\" title=\"Click to toggle\"><br /></div>\n\t\t\t \n\t\t\t <h3 class=\"hndle\"><span><?php _e( 'Currency Options', 'issuem-leaky-paywall' ); ?></span></h3>\n\t\t\t \n\t\t\t <div class=\"inside\">\n\t\t\t \n\t\t\t <table id=\"leaky_paywall_currency_options\" class=\"form-table\">\n\t\t\t \n\t\t\t <tr>\n\t\t\t <th><?php _e( 'Currency', 'issuem-leaky-paywall' ); ?></th>\n\t\t\t <td>\n\t\t\t \t<select id=\"leaky_paywall_currency\" name=\"leaky_paywall_currency\">\n\t\t\t\t \t<?php\n\t\t\t\t\t\t\t\t\t\t\t$currencies = leaky_paywall_supported_currencies();\n\t\t\t\t\t\t\t\t\t\t\tforeach ( $currencies as $key => $currency ) {\n\t\t\t\t \t\techo '<option value=\"' . $key . '\" ' . selected( $key, $settings['leaky_paywall_currency'], true ) . '>' . $currency['label'] . ' - ' . $currency['symbol'] . '</option>';\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t \t?>\n\t\t\t \t</select>\n\t\t\t \t<p class=\"description\"><?php _e( 'This controls which currency payment gateways will take payments in.', 'issuem-leaky-paywall' ); ?></p>\n\t\t\t </td>\n\t\t\t </tr>\n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t </table>\n\t\t\t\n\t\t\t \n\t\t\t <p class=\"submit\">\n\t\t\t <input class=\"button-primary\" type=\"submit\" name=\"update_leaky_paywall_settings\" value=\"<?php _e( 'Save Settings', 'issuem-leaky-paywall' ) ?>\" />\n\t\t\t </p>\n\t\t\t\n\t\t\t </div>\n\t\t\t \n\t\t\t </div>\n\n\t <?php // end currency options ?>\n\t \n\t <div id=\"modules\" class=\"postbox leaky-paywall-restriction-settings\">\n\t \n\t <div class=\"handlediv\" title=\"Click to toggle\"><br /></div>\n\t \n\t <h3 class=\"hndle\"><span><?php _e( 'Content Restriction', 'issuem-leaky-paywall' ); ?></span></h3>\n\t \n\t <div class=\"inside\">\n\t \n\t <table id=\"leaky_paywall_default_restriction_options\" class=\"form-table\">\n\t \t \n\t \t<tr class=\"restriction-options\">\n\t <th><?php _e( 'Limited Article Cookie Expiration', 'issuem-leaky-paywall' ); ?></th>\n\t <td>\n\t \t<input type=\"text\" id=\"cookie_expiration\" class=\"small-text\" name=\"cookie_expiration\" value=\"<?php echo stripcslashes( $settings['cookie_expiration'] ); ?>\" /> \n\t \t<select id=\"cookie_expiration_interval\" name=\"cookie_expiration_interval\">\n\t \t\t<option value=\"hour\" <?php selected( 'hour', $settings['cookie_expiration_interval'] ); ?>><?php _e( 'Hour(s)', 'issuem-leaky-paywall' ); ?></option>\n\t \t\t<option value=\"day\" <?php selected( 'day', $settings['cookie_expiration_interval'] ); ?>><?php _e( 'Day(s)', 'issuem-leaky-paywall' ); ?></option>\n\t \t\t<option value=\"week\" <?php selected( 'week', $settings['cookie_expiration_interval'] ); ?>><?php _e( 'Week(s)', 'issuem-leaky-paywall' ); ?></option>\n\t \t\t<option value=\"month\" <?php selected( 'month', $settings['cookie_expiration_interval'] ); ?>><?php _e( 'Month(s)', 'issuem-leaky-paywall' ); ?></option>\n\t \t\t<option value=\"year\" <?php selected( 'year', $settings['cookie_expiration_interval'] ); ?>><?php _e( 'Year(s)', 'issuem-leaky-paywall' ); ?></option>\n\t \t</select>\n\t \t<p class=\"description\"><?php _e( 'Choose length of time when a visitor can once again read your articles/posts (up to the # of articles allowed).', 'issuem-leaky-paywall' ); ?></p>\n\t </td>\n\t </tr>\n\t \n\t \t<tr class=\"restriction-options \">\n\t <th><?php _e( 'Restrict PDF Downloads?', 'issuem-leaky-paywall' ); ?></th>\n\t <td><input type=\"checkbox\" id=\"restrict_pdf_downloads\" name=\"restrict_pdf_downloads\" <?php checked( 'on', $settings['restrict_pdf_downloads'] ); ?> /></td>\n\t </tr>\n\t \n\t \t<tr class=\"restriction-options\">\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"restriction-post-type-' . $row_key . '\"><?php _e( 'Restrictions', 'issuem-leaky-paywall' ); ?></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td id=\"issuem-leaky-paywall-restriction-rows\">\n\t\t \t<?php \n\t\t \t$last_key = -1;\n\t\t \tif ( !empty( $settings['restrictions']['post_types'] ) ) {\n\t\t \t\n\t\t\t \tforeach( $settings['restrictions']['post_types'] as $key => $restriction ) {\n\t\t\t \t\n\t\t\t \t\tif ( !is_numeric( $key ) )\n\t\t\t\t \t\tcontinue;\n\t\t\t\t \t\t\n\t\t\t \t\techo build_leaky_paywall_default_restriction_row( $restriction, $key );\n\t\t\t \t\t$last_key = $key;\n\t\t\t \t\t\n\t\t\t \t}\n\t\t\t \t\n\t\t \t}\n\t\t \t?>\n\t\t\t </td>\n\t\t </tr>\n\t \n\t \t<tr class=\"restriction-options\">\n\t\t\t\t\t\t\t\t\t<th>&nbsp;</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t <script type=\"text/javascript\" charset=\"utf-8\">\n\t\t\t\t\t\t\t\t var leaky_paywall_restriction_row_key = <?php echo $last_key; ?>;\n\t\t\t\t\t\t\t\t </script>\n\t\t\t\t\t\t\t\t\t\t<p class=\"description\"><?php _e( 'By default all content is allowed.', 'issuem-leaky-paywall' ); ?></p>\n\t\t\t\t \t<p>\n\t\t\t\t \t\t<input class=\"button-secondary\" id=\"add-restriction-row\" class=\"add-new-issuem-leaky-paywall-restriction-row\" type=\"submit\" name=\"add_leaky_paywall_restriction_row\" value=\"<?php _e( 'Add New Restricted Content', 'issuem-leaky-paywall-multilevel' ); ?>\" />\n\t\t\t\t \t</p>\n\t\t\t </td>\n\t\t </tr>\n\t \n\t </table>\n\t\n\t <p class=\"submit\">\n\t <input class=\"button-primary\" type=\"submit\" name=\"update_leaky_paywall_settings\" value=\"<?php _e( 'Save Settings', 'issuem-leaky-paywall' ) ?>\" />\n\t </p>\n\t \n\t </div>\n\t \n\t </div>\n\t \n\t <div id=\"modules\" class=\"postbox leaky-paywall-subscription-settings\">\n\t \n\t <div class=\"handlediv\" title=\"Click to toggle\"><br /></div>\n\t \n\t <h3 class=\"hndle\"><span><?php _e( 'Subscription Levels', 'issuem-leaky-paywall' ); ?></span></h3>\n\t \n\t <div id=\"leaky_paywall_subscription_level_options\" class=\"inside\">\n\t \n\t <table id=\"leaky_paywall_subscription_level_options_table\" class=\"leaky-paywall-table subscription-options form-table\">\n\t\n\t\t\t\t\t\t\t\t<tr><td id=\"issuem-leaky-paywall-subscription-level-rows\" colspan=\"2\">\n\t \t<?php \n\t \t$last_key = -1;\n\t \tif ( !empty( $settings['levels'] ) ) {\n\t \t\n\t\t \tforeach( $settings['levels'] as $key => $level ) {\n\t\t \t\n\t\t \t\tif ( !is_numeric( $key ) )\n\t\t\t \t\tcontinue;\n\t\t \t\techo build_leaky_paywall_subscription_levels_row( $level, $key );\n\t\t \t\t$last_key = $key;\n\t\t \t\t\n\t\t \t} \n\t\t \t\n\t \t}\n\t \t?>\n\t\t\t\t\t\t\t\t</td></tr>\n\t\n\t </table>\n\t\n\t\t\t\t\t <script type=\"text/javascript\" charset=\"utf-8\">\n\t\t\t\t\t var leaky_paywall_subscription_levels_row_key = <?php echo $last_key; ?>;\n\t\t\t\t\t </script>\n\t \n\t <p class=\"subscription-options\">\n\t\t <input class=\"button-secondary\" id=\"add-subscription-row\" class=\"add-new-issuem-leaky-paywall-subscription-row\" type=\"submit\" name=\"add_leaky_paywall_row\" value=\"<?php _e( 'Add New Level', 'issuem-leaky-paywall' ); ?>\" />\n\t </p>\n\t\n\t <p class=\"submit\">\n\t <input class=\"button-primary\" type=\"submit\" name=\"update_leaky_paywall_settings\" value=\"<?php _e( 'Save Settings', 'issuem-leaky-paywall' ) ?>\" />\n\t </p>\n\t\n\t </div>\n\t \n\t </div>\n\t \n\t <?php do_action( 'leaky_paywall_settings_form', $settings ); ?>\n \n </form>\n \n </div>\n </div>\n </div>\n\t\t\t</div>\n\t\t\t<?php\n\t\t\t\n\t\t}", "title": "" }, { "docid": "7826ea55f0a2cb64bcd1ced4d55ebfe0", "score": "0.5501584", "text": "function changeni_update_paypal_url_option($option) {\r\n global $changeni_lock_paypal_url_option;\r\n\r\n if($changeni_lock_paypal_url_option){\r\n $changeni_lock_paypal_url_option = false;\r\n }\r\n else{\r\n $changeni_lock_paypal_url_option = true;\r\n update_site_option('changeni_paypal_url', $option);\r\n }\r\n\r\n return $option;\r\n}", "title": "" }, { "docid": "b4a8de4beae4383f458c60a0979398b4", "score": "0.55004257", "text": "function monsterinsights_maybe_refresh_addons() {\n if ( ! monsterinsights_is_addons_page() ) {\n return;\n }\n\n\n if ( ! monsterinsights_is_refreshing_addons() ) {\n return;\n }\n\n if ( ! monsterinsights_refresh_addons_action() ) {\n return;\n }\n\n monsterinsights_get_addons_data( monsterinsights_get_license_key() );\n\n}", "title": "" }, { "docid": "942b8aad2b880b3e0c45268ec52dc282", "score": "0.5500313", "text": "function icopyright_update_global_settings() {\n\t// Get values\n\t$formData = $_POST['formValues'];\n\t$formData = explode(\"&\",$_POST['formValues']);\n\t\n\t//icx_global_settings_checkboxes=g-6+&icx_global_settings_checkboxes=p-13278+&icx_global_settings_checkboxes=p-13280+\n\t$post = array();\n\t$excludes = '';\n\tforeach($formData as $val) {\n\t\t$keyVal = explode(\"=\", $val);\n\t\tif($keyVal[0] == \"icx_global_settings_checkboxes\") {\n\t\t\t$excludes = $excludes . str_replace(\"+\", \"\", sanitize_text_field(stripslashes($keyVal[1]))) . ',';\n\t\t}\n\t\telse {\n\t\t\t$post[$keyVal[0]] = sanitize_text_field(stripslashes($keyVal[1]));\n\t\t}\n\t}\n\t\n\t$post['excludes'] = $excludes;\n\t\n\t$user_agent = ICOPYRIGHT_USERAGENT;\n\t$email = get_option('icopyright_conductor_email');\n\t$password = get_option('icopyright_conductor_password');\n\t\n\t$current_user = wp_get_current_user();\n\tif ($email != $current_user->user_email) {\n\t\t$post['memberEmail'] = $current_user->user_email;\n\t}\n\t\t\n\t$res = icopyright_post_global_settings($user_agent, $post, $email, $password);\n\n\tif((strlen($res->http_code) > 0) && ($res->http_code != '200')) {\n\t\techo \"<p>\" . $errorMessage . \" (\" . $res->http_code . ': ' . $res->http_expl . \")</p>\";\n\t\tif ($res->http_code == 401) {\n\t\t\techo '<p>Your email address and password don\\'t match a valid account. Please visit the ' .\n\t\t\t\t\t'<a href=\"' . $adminUrl . 'options-general.php?page=copyright-licensing-tools#advanced\">iCopyright settings page</a> and ' .\n\t\t\t\t\t'click <em>Show Advanced Settings</em> to update your email address and password. (If you\\'ve set a password for <a style=\"text-decoration: none;\" target=\"_blank\" href=\"//repubhub.com\">www.repubhub.com</a>, be sure to use the same password here.)</p>';\n\t\t}\n\t\texit();\n\t}\n\t\n\t$res = @simplexml_load_string($res->response);\n\t$attributes = $res->status->attributes();\n\t$code = $attributes['code'];\n\t$message = $res->status->messages->message;\n\t\n\tif ($code == 200 || $code == '200') {\n\t\techo '<div class=\"icx_success fadeout\"><p>' . $message . '</p></div>';\n\t} else {\n\t\techo '<div class=\"icx_error fadeout\"><p>' . $message . '</p></div>';\n\t}\n\t\t\n\texit();\n}", "title": "" }, { "docid": "d8cb337cab2de9c5136d66a00c571efa", "score": "0.54990065", "text": "public function admin_notices() {\n $user_id = get_current_user_id();\n\n // if the user isn't an admin, definitely don't show the notice\n if ( ! current_user_can( 'manage_options' ) ) {\n return;\n }\n\n // update the setting for the current user\n if ( isset( $_GET['new-user-approve-settings-notice'] ) && '1' == $_GET['new-user-approve-settings-notice'] ) {\n add_user_meta( $user_id, 'pw_new_user_approve_settings_notice', '1', true );\n }\n\n $show_notice = get_user_meta( $user_id, 'pw_new_user_approve_settings_notice' );\n\n // one last chance to show the update\n $show_notice = apply_filters( 'new_user_approve_show_membership_notice', $show_notice, $user_id );\n\n // Check that the user hasn't already clicked to ignore the message\n if ( ! $show_notice ) {\n echo '<div class=\"error\"><p>';\n printf( __( 'The Membership setting must be turned on in order for the New User Approve to work correctly. <a href=\"%1$s\">Update in settings</a>. | <a href=\"%2$s\">Hide Notice</a>', 'new-user-approve' ), admin_url( 'options-general.php' ), add_query_arg( array( 'new-user-approve-settings-notice' => 1 ) ) );\n echo \"</p></div>\";\n }\n }", "title": "" }, { "docid": "d7edf6ff408221f69cdd66d6a0df7b8b", "score": "0.54983294", "text": "private static function import_options() {\n if(get_option('livefyre_site_id', false) !== false) {\n update_option('livefyre_apps-livefyre_site_id', get_option('livefyre_site_id'));\n } elseif(get_option('livefyre_sidenotes_site_id', false) !== false) {\n update_option('livefyre_apps-livefyre_site_id', get_option('livefyre_sidenotes_site_id'));\n }\n if(get_option('livefyre_site_key', false) !== false) {\n update_option('livefyre_apps-livefyre_site_key', get_option('livefyre_site_key'));\n } elseif(get_option('livefyre_sidenotes_site_key', false) !== false) {\n update_option('livefyre_apps-livefyre_site_key', get_option('livefyre_sidenotes_site_key'));\n }\n if(get_option('livefyre_domain_name', false) !== false) {\n update_option('livefyre_apps-livefyre_domain_name', get_option('livefyre_domain_name'));\n }\n if(get_option('livefyre_domain_key', false) !== false) {\n update_option('livefyre_apps-livefyre_domain_key', get_option('livefyre_domain_key'));\n }\n if(get_option('livefyre_auth_delegate_name', false) !== false) {\n update_option('livefyre_apps-livefyre_auth_delegate_name', get_option('livefyre_auth_delegate_name'));\n }\n update_option('livefyre_apps-livefyre_environment', 'staging');\n if(get_option('livefyre_environment', false) === '1') {\n update_option('livefyre_apps-livefyre_environment', 'production');\n }\n if(get_option('livefyre_language', false) !== false) {\n update_option('livefyre_apps-livefyre_language', get_option('livefyre_language'));\n }\n \n update_option('livefyre_apps-livefyre_options_imported', true); \n }", "title": "" }, { "docid": "d3209764f208b16e7c073554ba39927f", "score": "0.5496734", "text": "public function updateOptions(){\n\t\tif ( !current_user_can( 'manage_options' ) || !isset( $_REQUEST['_wpnonce'] ) || !wp_verify_nonce( $_REQUEST['_wpnonce'], Settings::updateAction ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Get all the settings \n\t\t$options = Registry::instance()->getOptions();\n\t\tforeach ( $options as $option => $value ) {\n\t\t\tif ( !isset( $_POST[self::settingsField] ) || !isset( $_POST[self::settingsField][$option] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n $options[$option] = $this->sanitize($_POST[self::settingsField][$option]);\n//\t\t\tif ( is_array( $_POST[self::settingsField][$option] ) ) {\n//\t\t\t\t$options[$option] = array_map( 'sanitize_text_field', $_POST[self::settingsField][$option] );\n//\t\t\t} else {\n//\t\t\t\t$options[$option] = sanitize_text_field( $_POST[self::settingsField][$option] );\n//\t\t\t}\n\t\t}\n\n\t\t// If there is an apiKey and an appID validate them\n\t\t$options['appValid'] = 0;\n\t\tif ( !empty( $options['apiKey'] ) && !empty( $options['appId'] ) ) {\n\t\t\t$validApp = Core\\UtilsAlgolia::validApp( $options['appId'], $options['apiKey'] );\n\t\t\tif ( !is_wp_error( $validApp ) ) {\n\t\t\t\t$options['appValid'] = 1;\n\t\t\t} else {\n\t\t\t\t$options['appValid'] = 0;\n\t\t\t}\n\t\t}\n\n\t\t$options['appSearchValid'] = 0;\n\t\tif ( !empty( $options['apiKeySearch'] ) && !empty( $options['appId'] ) && !empty( $options['apiKey'] ) ) {\n\t\t\t$validSearchKey = Core\\UtilsAlgolia::validAppKeys( $options['appId'], $options['apiKey'], $options['apiKeySearch'], 'search' );\n\t\t\tif ( !is_wp_error( $validSearchKey ) ) {\n\t\t\t\t$options['appSearchValid'] = 1;\n\t\t\t} else {\n\t\t\t\t$options['appSearchValid'] = 0;\n\t\t\t}\n\t\t}\n\n\t\tRegistry::instance()->saveOptions( $options );\n\t\t$referer = add_query_arg( array( 'mvnAlgMessage' => 'settingsUpdated' ), wp_get_referer() );\n\t\t//Redirect back to the settings page that was submitted\n\t\twp_safe_redirect( $referer );\n\t\tdie( 'Failed redirect saving settings' );\n\t}", "title": "" }, { "docid": "d9acd37a755a3a74bada2ac7e6920c75", "score": "0.54959947", "text": "private function allowModify()\n { \n if($this->viewVar['loggedUserRole'] <= 40 )\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }", "title": "" }, { "docid": "d9acd37a755a3a74bada2ac7e6920c75", "score": "0.54959947", "text": "private function allowModify()\n { \n if($this->viewVar['loggedUserRole'] <= 40 )\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }", "title": "" }, { "docid": "70c4c155d206ad09c9a5bc1143e103a2", "score": "0.54857373", "text": "function block_poll_allowed_to_update($cid = 0) {\n global $COURSE;\n $cid = $cid == 0 ? $COURSE->id : $cid;\n $context = context_course::instance($cid);\n\n if (has_capability('block/poll:editpoll', $context)) {\n return true;\n }\n print_error(get_string('pollwarning', 'block_poll'));\n}", "title": "" }, { "docid": "67c18af110067a2c5496c7a2265c8804", "score": "0.5485117", "text": "private function allowModify()\n { \n if($this->controllerVar['loggedUserRole'] < 100 )\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }", "title": "" }, { "docid": "e05795287734a5a3c044184f0d0d8e0b", "score": "0.5478566", "text": "function kws_yourls_add_analytics_update_option() {\n\tif (isset($_POST['analytics_override'])) {\n\t\tyourls_update_option('analytics_override', !empty($_POST['analytics_override']));\n\t}\n\tif (isset($_POST['add_to_form']) && $_POST['add_to_form'] === 'yes' || $_POST['add_to_form'] === 'no') {\n\t\tyourls_update_option('add_to_form', $_POST['add_to_form']);\n\t}\n\tif (isset($_POST['analytics_defaults'])) {\n\t\t$analytics_defaults = array();\n\t\tif (is_array($_POST['analytics_defaults'])) {\n\t\t\tforeach ($_POST['analytics_defaults'] as $k => $v) {\n\t\t\t\t$analytics_defaults[$k] = yourls_sanitize_title($v);\n\t\t\t}\n\t\t\tyourls_update_option('analytics_defaults', $analytics_defaults);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "73d82b7270ac27e8ad43e537ded79978", "score": "0.54782593", "text": "public function detectPluginUpdate()\n {\n if (get_transient('rd_downloads_updated') && current_user_can('update_plugins')) {\n // if there is updated transient\n $Loader = new \\RdDownloads\\App\\Libraries\\Loader();\n\n if ($Loader->haveManualUpdate() === true) {\n // if found that there are manual update in this new version of code.\n // display link or redirect to manual update page. (display link is preferred to prevent bad user experience.)\n // -------------------------------------------------------------------------------------\n // display link to manual update page.\n if (!isset($_REQUEST['page']) || (isset($_REQUEST['page']) && $_REQUEST['page'] !== 'rd-downloads-manual-update')) {\n $manualUpdateNotice = '<div class=\"notice notice-warning is-dismissible\">\n <p>' . \n sprintf(\n /* translators: %1$s: Open link tag, %2$s: Close link tag. */\n __('The Rundiz Downloads is just upgraded and need to be manually update. Please continue to the %1$splugin update page%2$s.', 'rd-downloads'), \n '<a href=\"' . esc_attr(network_admin_url('index.php?page=rd-downloads-manual-update')) . '\">', // this link will be auto convert to admin_url if not in multisite installed.\n '</a>'\n ) . \n '</p>\n </div>';\n\n add_action('admin_notices', function() use ($manualUpdateNotice) {\n echo $manualUpdateNotice.\"\\n\";\n });\n add_action('network_admin_notices', function() use ($manualUpdateNotice) {\n echo $manualUpdateNotice.\"\\n\";\n });\n\n unset($manualUpdateNotice);\n }// endif;\n\n if (is_multisite()) {\n add_action('network_admin_menu', [$this, 'displayManualUpdateMenu']);\n } else {\n add_action('admin_menu', [$this, 'displayManualUpdateMenu']);\n }\n\n add_action('wp_ajax_plugin_template_manualUpdate', [$this, 'ajaxManualUpdate']);\n // end display link to manual update page.\n // -------------------------------------------------------------------------------------\n } else {\n // if don't have any manual update.\n delete_transient('rd_downloads_updated');\n }// endif;\n\n unset($Loader);\n }// endif;\n }", "title": "" }, { "docid": "ed16e1dbba9f8af2da575347ccacc232", "score": "0.547526", "text": "public function remove_update_nag_for_nonadmins() {\n\t\t\t$settings = $this->getSetOptions( self::OPT_FIELD ); // get settings\n\t\t\tif ( 1 == $settings['hide_updates'] ) { // is this enabled?\n\t\t\t\tif ( !current_user_can( 'update_plugins' ) ) { // can the current user update plugins?\n\t\t\t\t\tremove_action( 'admin_notices', 'update_nag', 3 ); // no they cannot so remove the nag for them.\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "fe2d83f5cabc095d1aa933afa3449007", "score": "0.5473657", "text": "function wpwebapp_get_block_admin_access() {\n\n\t// Get user info and plugin settings\n\tglobal $current_user;\n\tget_currentuserinfo();\n\t$user_id = $current_user->ID;\n\t$options = wpwebapp_get_plugin_options_user_access();\n\n\t// Determine minimum required capability for backend access\n\tif ( $options['block_wp_backend_access'] == 'admin' ) {\n\t\t$capability = 'edit_themes';\n\t} else if ( $options['block_wp_backend_access'] == 'editor' ) {\n\t\t$capability = 'edit_pages';\n\t} else if ( $options['block_wp_backend_access'] == 'author' ) {\n\t\t$capability = 'publish_posts';\n\t} else if ( $options['block_wp_backend_access'] == 'contributor' ) {\n\t\t$capability = 'edit_posts';\n\t} else {\n\t\t$capability = 'read';\n\t}\n\n\t// Determine if user has required capability for access\n\tif ( user_can( $user_id, $capability ) ) {\n\t\treturn 'show';\n\t} else {\n\t\treturn 'hide';\n\t}\n\n}", "title": "" }, { "docid": "92d3d1391efd0b3cda5172b701d2265e", "score": "0.5471269", "text": "public function update( $args, $assoc_args ) {\n\n\t\tverify_htpasswd_is_present();\n\n\t\t$global = $this->populate_info( $args, __FUNCTION__ );\n\t\t$site_url = $global ? 'default' : $this->site_data->site_url;\n\t\t$ips = EE\\Utils\\get_flag_value( $assoc_args, 'ip' );\n\n\t\tif ( $ips ) {\n\t\t\t$this->update_whitelist( $site_url, $ips );\n\t\t} else {\n\t\t\t$this->update_auth( $assoc_args, $site_url );\n\t\t}\n\t}", "title": "" }, { "docid": "787533b07f3d537d395f7f79f92c0afc", "score": "0.5470756", "text": "public function update_external_settings() {\n\t\tif ( isset( $_POST['cloneSites'] ) ) {\n\t\t\tif ( '0' !== $_POST['cloneSites'] ) {\n\t\t\t\t$arr = isset( $_POST['cloneSites'] ) ? json_decode( urldecode( wp_unslash( $_POST['cloneSites'] ) ), 1 ) : '';\n\t\t\t\tMainWP_Helper::update_option( 'mainwp_child_clone_sites', ( ! is_array( $arr ) ? array() : $arr ) );\n\t\t\t} else {\n\t\t\t\tMainWP_Helper::update_option( 'mainwp_child_clone_sites', '0' );\n\t\t\t}\n\t\t}\n\n\t\tif ( isset( $_POST['siteId'] ) ) {\n\t\t\tMainWP_Helper::update_option( 'mainwp_child_siteid', intval( wp_unslash( $_POST['siteId'] ) ) );\n\t\t}\n\n\t\tif ( isset( $_POST['pluginDir'] ) ) {\n\t\t\tif ( get_option( 'mainwp_child_pluginDir' ) !== $_POST['pluginDir'] ) {\n\t\t\t\tMainWP_Helper::update_option( 'mainwp_child_pluginDir', ( ! empty( $_POST['pluginDir'] ) ? wp_unslash( $_POST['pluginDir'] ) : '' ), 'yes' );\n\t\t\t}\n\t\t} elseif ( false !== get_option( 'mainwp_child_pluginDir' ) ) {\n\t\t\tMainWP_Helper::update_option( 'mainwp_child_pluginDir', false, 'yes' );\n\t\t}\n\t}", "title": "" }, { "docid": "6a675a3c7a80b381554d0b8cbe900860", "score": "0.54689676", "text": "function up_privacy_check(){\n if (get_option('blog_public') == 0 )return true;\n}", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "aaed5763fc1eb02e2f0473e8743148a4", "score": "0.0", "text": "public function edit($id)\n {\n $survey = Survey::findOrFail($id);\n return view('survey.surveyEdit',compact('survey'));\n }", "title": "" } ]
[ { "docid": "63497a4ff75a6b12992600d5af4d1bbe", "score": "0.7944804", "text": "public function edit(Resource $resource)\n {\n $rsr = $resource;\n return view('admin.resource.edit',compact('rsr'));\n }", "title": "" }, { "docid": "49b3fe3f7253d93f1c8579116d67814a", "score": "0.79241365", "text": "public function edit() {\n $data['resources'] = Resource::get($_REQUEST['idResource']);\n $this->view->show(\"resources/updateResources\", $data);\n\n }", "title": "" }, { "docid": "f09a11111572f588818123ad93c4854c", "score": "0.78617597", "text": "public function edit(Resource $resource)\n {\n return view('resources.edit', ['resource' => $resource]);\n }", "title": "" }, { "docid": "2bbbffcfdd4173a05cbc190726de80b5", "score": "0.7800815", "text": "public function edit(Resource $resource)\n {\n return view('Resource.update',['resource'=> $resource, 'types' => $this->types]);\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.7692893", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "ef3e9f01b5c403fd41a38f33d2f1a922", "score": "0.7691249", "text": "public function edit($id)\n\t{\n\t\t// get the resource\n\t\t$resource = Resource::find($id);\n\n\t\t// show the edit form and pass the resource\n\t\treturn view('resources.edit', ['resource' => $resource]);\n\t}", "title": "" }, { "docid": "ac53c5763e3a0b0ec0125039ef9bb509", "score": "0.7631773", "text": "public function edit()\n {\n $this->form();\n }", "title": "" }, { "docid": "0f32b306b1aa0f5b31036edb537b0c74", "score": "0.7169776", "text": "function edit() {\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t$productId = KRequest::getInt('productId');\n\n\t\t$view = $this->getDefaultViewForm();\n\t\t$view->setProductId($productId)->display();\n\n\t}", "title": "" }, { "docid": "d8e210ea6b36c944e816d8ec19543411", "score": "0.71480757", "text": "public function edit(Resource $resource, Identifier $identifier): View\n {\n $this->authorize('update', $identifier);\n\n return view('identifiers.edit')\n ->with('identifiable', $resource)\n ->with('identifier', $identifier);\n }", "title": "" }, { "docid": "219dcedd731665337d4912c0c43d0cb6", "score": "0.7053453", "text": "public function displaysEditForm();", "title": "" }, { "docid": "0a368a092d974074b6d8f048a5aa1f04", "score": "0.7036634", "text": "public function edit($id)\n {\n\n $file=Resource::where('id',$id)->with('form')->first();\n\n return view('dashboard2.resources.view-single',compact('file'));\n\n }", "title": "" }, { "docid": "96884a0d55f36349b743e3d913248156", "score": "0.70006657", "text": "function edit()\n {\n $this->_view_edit('edit');\n }", "title": "" }, { "docid": "fbf54e9e3bb25e5f2f4d8c933bfc17c1", "score": "0.69737965", "text": "public function edit($id)\n\t{\n\t\t$types = array('carousel'=>'carousel', 'block'=>'block');\n\t\t$resource = $this->resource->find($id);\n\n\t\tif (is_null($resource))\n\t\t{\n\t\t\treturn Redirect::route('backend.resources.index');\n\t\t}\n\n\t\treturn View::make('backend.resources.edit', compact('resource','types'));\n\t}", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.6945275", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "ec89f95d803c1882fe8f62198321e89d", "score": "0.6935729", "text": "public function edit()\n {\n return view('feregister::edit');\n }", "title": "" }, { "docid": "453c6ef4ad1256a84463a04120493055", "score": "0.6929833", "text": "public function edit($id)\n\t{\n\t\t$resource = Resource::find($id);\n\t\t$resourcetags = $resource->tags()->get();\n\t\t$resourceDevice = $resource->devices()->get();\n\t\t$tags = Tag::all();\n\t\treturn View::make(\"resources.edit\", compact('resource', 'tags', 'resourcetags', 'resourceDevice'));\n\n\t}", "title": "" }, { "docid": "ace9804aed3dcd98f54ca26999591399", "score": "0.69124234", "text": "public function editAction()\n {\n\n //changing layout for formbuilder\n $this->layout('layout/layoutformbuilder');\n\n //to check if the form is available with sending id\n $id = (int)$this->params()->fromRoute('id', 0);\n if (!$id) {\n return $this->redirect()->toRoute('forms');\n }\n\n try {\n $formtable = $this->table->getForm($id);\n } catch (\\Exception $ex) {\n\n return $this->redirect()->toRoute('formlar');\n }\n\n $public = ($formtable->public == 0 ? \"\" : \"checked\");\n\n $formdata = str_replace([\"\\r\", \"\\n\", \"\\t\"], \"\", $formtable->form_xml);\n\n return new ViewModel(array(\n 'formdata' => $formdata,\n 'title' => $formtable->title,\n 'public' => $public,\n 'form_id' => $id,\n ));\n }", "title": "" }, { "docid": "896f4a4d71aca2d677afe0b092e925ae", "score": "0.68977296", "text": "public function editForm()\n {\n $company = App::get('database')->select('companies', 'id', $_GET['id']);\n return view('companies.edit', compact('company'));\n }", "title": "" }, { "docid": "f60e724dc93ad65b7bd2e7142b16eabc", "score": "0.68976134", "text": "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "title": "" }, { "docid": "9eb1e5145183746d6174732b2e6ab6f7", "score": "0.6888274", "text": "public function edit($id)\n {\n $this->data[$this->modelName] = $this->repository->findById($id);\n $this->data[\"formRoute\"] = \"app.admin.{$this->pluralModelName}.update\";\n\n if ($this->package) {\n return \\View::make(\"{$this->package}{$this->pluralModelName}.form\", $this->data);\n }\n return \\View::make(\"{$this->pluralModelName}::form\", $this->data);\n }", "title": "" }, { "docid": "2891bcfcbba3d9ccd7e04a793a319678", "score": "0.6879567", "text": "public function edit()\n {\n return view('relatorio/edit');\n }", "title": "" }, { "docid": "e6470354f303106d7614dcb739e7ac8b", "score": "0.6868626", "text": "public function edit($id)\n\t{ \n return $this->showForm($id) ;\n\t}", "title": "" }, { "docid": "1261b2ff2c2892d8e345a090ebccdc20", "score": "0.6868574", "text": "public function edit($id)\n {\n //\n $resource= Resource::find($id);\n return view('admin.resources.edit')->with('resource',$resource)\n ->with('categories', ResourceCategory::all());\n \n \n }", "title": "" }, { "docid": "aa9bd3e29a3754d9df81fc4fecc9f778", "score": "0.68530333", "text": "public function edit()\n\t{\n\t\t$app = JFactory::getApplication();\n\t\t$app->input->set('view', \"{$this->resource}_edit\");\n\n\t\t$requestedIDs = THM_GroupsHelperComponent::cleanIntCollection($app->input->get('cid', [], 'array'));\n\t\t$requestedID = (empty($requestedIDs) or empty($requestedIDs[0])) ?\n\t\t\t$app->input->getInt('id', 0) : $requestedIDs[0];\n\n\t\t$app->input->set('id', $requestedID);\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "403e97bd79006ec2c70680a1e5607024", "score": "0.68462545", "text": "public function edit()\n //Affiche la vue d'édition\n {\n $idq = (int)$this->request->getParameter('idq');\n $idquest = (int)$this->request->getParameter('idquest');\n if(!isset($idquest))\n {\n $this->linkTo('Questionnaire','showQuest'); //Redirection si on tente de forcer l'action\n }\n $questionnaire=Questionnaire::getWithId($idq);\n $question=Question::getWithId($idquest);\n\n $view = new View($this,'question/editQuestion');\n $view->setArg('user',$this->request->getUserObject());\n $view->setArg('questionnaire',$questionnaire);\n $view->setArg('question',$question); \n $view->render();\n }", "title": "" }, { "docid": "3f0fdb8a9e0c5042bc834d969bd7f457", "score": "0.68393826", "text": "public function edit($id)\n {\n $form = $this->formRepo->getById($id);\n return view('form::edit',compact('form'));\n }", "title": "" }, { "docid": "bc8f4e204324385826216ccb48ad7f95", "score": "0.68303907", "text": "public function edit($id)\n {\n $employee = $this->employee_model->find($id);\n $page_name = \"Employee Edit\";\n $data = [\n 'title' => $page_name . \" |\" . $this->scope,\n 'page_name' => $page_name,\n 'method' => \"PUT\",\n 'employee' => $employee\n ];\n return view('admin.employee.employee_form', $data);\n }", "title": "" }, { "docid": "574cbb15d465710a6d0d6af84b51d1c4", "score": "0.6824977", "text": "public function edit(Request $request, $resource = null, $modelId = null)\n {\n $resource = $this->getResource($resource)->findOrNew($modelId);\n $fields = $resource->formFields($request);\n\n return view('orm.form_editar', compact('resource', 'modelId', 'fields'));\n }", "title": "" }, { "docid": "e2927e92778527f489c5ee4fae07174a", "score": "0.6823364", "text": "public function edit()\n {\n return view('hariperawatan::edit');\n }", "title": "" }, { "docid": "7e6f6b98f95d290854fd4b7b6ebea376", "score": "0.68107593", "text": "public function edit($id)\n {\n $formi = Form::find($id);\n return view('form.edit')->with('form',$formi);\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68047357", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68047357", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68047357", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "873a08d0f357fca631ccc7259052d9ce", "score": "0.68018645", "text": "public function edit()\n {\n return view('common::edit');\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "287fac0e40e0fc4457b5971a6b332ea5", "score": "0.67817605", "text": "public function edit($id)\n {\n $form = Form::find($id);\n return view ('edit', compact('form','id'));\n\n }", "title": "" }, { "docid": "a0bb44c51b89e19c05c40a5e00361787", "score": "0.678043", "text": "public function edit(FormBuilder $formBuilder, $id)\n {\n $this->checkAccess('edit');\n $model = $this->model->find($id);\n\n $form = $formBuilder->create($this->form, [\n 'method' => 'PUT',\n 'url' => route($this->url . '.update', $id),\n 'model' => $model\n ]);\n\n return view($this->folder . '.form', [\n 'title' => $this->title,\n 'form' => $form,\n 'breadcrumb' => 'new-' . $this->url\n ]);\n }", "title": "" }, { "docid": "e9a6ba4ac4a39eb71d0b22131b92e151", "score": "0.6778012", "text": "public function editAction()\n {\n //Renderiza la vista del formulario de edición pasando los datos del objeto de usuario como parámetros\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "title": "" }, { "docid": "c7a68fcc4c5d663b60bb79c1db0fd8f0", "score": "0.6777242", "text": "public function edit()\n {\n return view('rab::edit');\n }", "title": "" }, { "docid": "831f414162a04d60cf4626d4c7c10b29", "score": "0.676462", "text": "public function action_edit()\n {\n\n $article_id = Request::current()->param( 'id' );\n\n $article = ORM::factory( 'Article', $article_id );\n\n $this->template->content = View::factory( 'article/edit' )\n ->set( \"article\", $article );\n }", "title": "" }, { "docid": "d4cb0697dc022ba2b219ae706730a925", "score": "0.6759936", "text": "public function edit()\n {\n return view(\"customer.profile.edit-form\");\n }", "title": "" }, { "docid": "7db9741921d6fb649f2fe79d04292bd8", "score": "0.67557925", "text": "function action_edit()\n {\n if (!empty($this->m_partial))\n {\n $this->partial($this->m_partial);\n return;\n }\n\n $node = &$this->m_node;\n\n $record = $this->getRecord();\n\n if ($record === null)\n {\n $location = $node->feedbackUrl(\"edit\", ACTION_FAILED, $record);\n $node->redirect($location);\n }\n\n // allowed to edit record?\n if (!$this->allowed($record))\n {\n $this->renderAccessDeniedPage();\n return;\n }\n\n $record = $this->mergeWithPostvars($record);\n\n $this->notify(\"edit\", $record);\n if ($node->hasFlag(NF_LOCK))\n {\n if ($node->m_lock->lock($node->primaryKey($record), $node->m_table, $node->getLockMode()))\n {\n $res = $this->invoke(\"editPage\", $record, true);\n }\n else\n {\n $res = $node->lockPage();\n }\n }\n else\n {\n $res = $this->invoke(\"editPage\", $record, false);\n }\n\n $page = &$this->getPage();\n $page->addContent($node->renderActionPage(\"edit\", $res));\n }", "title": "" }, { "docid": "6aff33fd543a3dbe6a9a3f0bc6d4aa3f", "score": "0.6754868", "text": "public function edit($id)\n\t{\n\t\treturn view($this->getViewPath() . '.edit', [\n\t\t\t'entity' => $this->getRepository()->getById($id)\n\t\t]);\n\t}", "title": "" }, { "docid": "da50458558a47bf128b527dd0589bf19", "score": "0.6740746", "text": "public function getShowEdit(){\n\t\t$data=array(\n\t\t\t\"product_id\"=>$_GET['product_id'],\n\t\t\t\"id\"=>$_GET['id'],\n\t\t\t\"key\"=>$_GET['key'],\n\t\t\t\"value\"=>$_GET['value'],\n\t\t\t\"value_type\"=>$_GET['value_type']);\n\t\t$this->setTitle('Edit Meta Data Fields');\n\t\t$this->setContent( $this->getView('shopify/editForm',$data, dirname(__DIR__)) );\n\t}", "title": "" }, { "docid": "327eb9166841535d9866d10e4d98911d", "score": "0.673346", "text": "public function edit(FormBuilder $formBuilder,$id)\n {\n $model = $this->service->find($id);\n\n $form = $formBuilder->create($this->form, [\n 'method' => 'PUT',\n 'url' => route($this->url . '.update', $id),\n 'model' => $model\n ]);\n\n return view($this->folder . '.form', [\n 'title' => $this->title,\n 'form' => $form,\n 'breadcrumb' => 'new-' . $this->url\n ]);\n }", "title": "" }, { "docid": "327eb9166841535d9866d10e4d98911d", "score": "0.673346", "text": "public function edit(FormBuilder $formBuilder,$id)\n {\n $model = $this->service->find($id);\n\n $form = $formBuilder->create($this->form, [\n 'method' => 'PUT',\n 'url' => route($this->url . '.update', $id),\n 'model' => $model\n ]);\n\n return view($this->folder . '.form', [\n 'title' => $this->title,\n 'form' => $form,\n 'breadcrumb' => 'new-' . $this->url\n ]);\n }", "title": "" }, { "docid": "327eb9166841535d9866d10e4d98911d", "score": "0.673346", "text": "public function edit(FormBuilder $formBuilder,$id)\n {\n $model = $this->service->find($id);\n\n $form = $formBuilder->create($this->form, [\n 'method' => 'PUT',\n 'url' => route($this->url . '.update', $id),\n 'model' => $model\n ]);\n\n return view($this->folder . '.form', [\n 'title' => $this->title,\n 'form' => $form,\n 'breadcrumb' => 'new-' . $this->url\n ]);\n }", "title": "" }, { "docid": "ede615513f1cd6830cebbff1cff3d172", "score": "0.6730169", "text": "public function edit()\n {\n $show = false;\n return view('admin.company.new_edit_company', ['company' => $this->company, 'show' => $show]);\n }", "title": "" }, { "docid": "782ef4d2ddc01501d9d52db2e27382e3", "score": "0.6729418", "text": "public function edit()\n {\n $company = Company::firstOrFail();\n\n $this->authorize('update', $company);\n\n return view('company.edit', compact('company'));\n }", "title": "" }, { "docid": "dd81e1e93e373c64b8d97c13d404e1d9", "score": "0.672225", "text": "public function editAction()\n {\n $config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/forms/employees.ini', 'edit');\n $form = new Application_Form_Employees($config);\n\n //Verificando o \"id\" do employee e caso nao exista ou seja nulo redireciona para tela inicial do employees.\n $idEmployee = $this->_request->getParam('id');\n\n if(empty($idEmployee) || $idEmployee==null){\n $this->redirect('/employees');\n }//if id employees\n\n //Recupera os dados do registro.\n $dadosEmployee = $this->_modelEmployees->find($idEmployee)->current();\n\n //Verifica se os registros existem e se retornar nulo redireciona para a tela inidial do employee\n if($dadosEmployee==null){\n $this->redirect('/employees');\n }else{\n //Faz os tratamentos para realizar o update\n $arrayDados = $this->_modelEmployees->_convertDBArr($dadosEmployee);\n\n //Update elements in DB\n if($this->_request->isPost()){\n $valida=$this->validateData($this->_request,'edit');\n if(is_bool($valida) & $valida==true) {\n $this->redirect('/employees');\n }else{\n $form->populate($this->_request->getParams());\n $this->view->error=$this->_exception;\n }\n }//if post form\n }//if / else dadosRegistro employee\n $this->view->form=$form;\n }", "title": "" }, { "docid": "e351dcf650141a8698d44b64e5a4419d", "score": "0.67109543", "text": "public function edit($id) {\n //\n\n $record = Record::with(['project', 'version', 'step'])->findOrFail($id);\n $this->authorize('update', $record);\n return view('records.edit', compact('record'));\n }", "title": "" }, { "docid": "976ce24b8869bc5efd9d3b6a9ef9cd04", "score": "0.67107934", "text": "public function edit($id)\n {\n $existing_product = Product::find($id);\n if ($existing_product == null) {\n return view(\"errors.404\");\n }\n //\n return view(\"products.form\")->with([\n \"product\" => $existing_product,\n \"action\" => \"/products/\" . $existing_product->id,\n \"method\" => \"PUT\"\n ]);\n }", "title": "" }, { "docid": "0944fd8e1824339605e976256e0b3109", "score": "0.6708619", "text": "public function edit($id)\n {\n $item = AppService::find($id);\n return View::make(self::CID.'.form')->with(['item' => $item ]);\n }", "title": "" }, { "docid": "07eefe6f127805103bc2fce4d90a6c56", "score": "0.6693604", "text": "public function edit(FormBuilder $formBuilder, $model)\n {\n if (!$model instanceof Model) {\n throw new ModelNotFoundException();\n }\n\n $url = route(\"{$this->_resourceId()}.update\", [$model->id]);\n\n return view($this->_getViewId('edit'), [\n 'resourceId' => $this->_resourceId(),\n 'title' => ucfirst($this->_resourceId()) . ' edit',\n 'form' => $this->_buildForm($formBuilder, [], [\n 'model' => $model,\n 'method' => 'PUT',\n 'url' => $url,\n ]),\n ]);\n }", "title": "" }, { "docid": "fb7b3974efc6a63347c6199f4b029cd6", "score": "0.6691619", "text": "public function edit()\n {\n return View::make('hr.manage_person');\n }", "title": "" }, { "docid": "0a029a6ab148c259b840db15b5d5d47b", "score": "0.6689175", "text": "public function edit($id)\n { \n $user = $this->db->getForEdit($id);\n\n return view('forms.edit', compact('user'));\n }", "title": "" }, { "docid": "b53d80e937efeb059b69199175992b44", "score": "0.6682786", "text": "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "title": "" }, { "docid": "5b998b4d45aa274c94ce73446f3c3925", "score": "0.6672461", "text": "public function edit($id)\n {\n $this->data['product'] = Product::findOrFail($id);\n $this->data['category'] = Category::ArrayForSelect();\n $this->data['mode'] = 'edit';\n return view('product.form', $this->data);\n }", "title": "" }, { "docid": "d4aad26a259262122f565814e7ce84e7", "score": "0.66713744", "text": "public function edit()\r\n {\r\n return view('tasksmanagement::edit');\r\n }", "title": "" }, { "docid": "9886a60c72f344fb1a6f18d92026613c", "score": "0.66675514", "text": "public function edit($id)\n {\n $model = $this->model->findOrFail($id);\n\n $data = ['model' => $model, 'title' => $this->title, 'subtitle' => $this->subtitle, 'view' =>$this->view];\n\n return view($this->admin.'.form')->with($data);\n }", "title": "" }, { "docid": "f75501807012fb55bd7c913101cdf4db", "score": "0.6665343", "text": "public function EditForm() {\n\t\treturn $this->formForMode(Editable::ActionName);\n\t}", "title": "" }, { "docid": "e0f498f2af90518d72ea59b1f6b65e8b", "score": "0.66623044", "text": "public function edit($id)\n {\n $equipment = Equipment::find($id);\n\n // Show the form\n return view('equipment.equipment-update', ['equipment' => $equipment]);\n }", "title": "" }, { "docid": "547f26916fa94a09feb71222a052271a", "score": "0.6660905", "text": "public function edit()\n {\n return view('all::edit');\n }", "title": "" }, { "docid": "0181f4e5e9689f674dc79546331ae9bc", "score": "0.6658182", "text": "public function edit()\n {\n return view('pemenangtender::edit');\n }", "title": "" }, { "docid": "b9e7c17b5ca2a237f0c1d1e7d9ca5a1e", "score": "0.6656968", "text": "public function edit()\n {\n return view('rekap::edit');\n }", "title": "" }, { "docid": "6b69173e00e76eea22ba6c8aec29e554", "score": "0.66568744", "text": "public function edit($id)\n {\n return view('agent::Entry.edit');\n }", "title": "" }, { "docid": "3750ae1bfc7ba7197cadd140a6f90a57", "score": "0.66522", "text": "public function edit($id)\n {\n $internauta = Internauta::findOrFail($id);\n return view('/layouts/admin/internauta_form',compact('internauta'));\n\n }", "title": "" }, { "docid": "5abc6953fae7162215480b7a9fef57c1", "score": "0.66518015", "text": "public function edit()\n {\n return view('collection::edit');\n }", "title": "" }, { "docid": "56e8e9b08c0406905beb3036122cd7af", "score": "0.6642529", "text": "public function edit()\n {\n return view('home::edit');\n }", "title": "" }, { "docid": "6e4aaaecb164b8d0cbb900aa36edf9db", "score": "0.6638773", "text": "public function edit($id)\n {\n $data = $this->data;\n $data = $this->customFormData($data);\n $model = $this->model;\n $data['record'] = $model::find($id);\n $data['idUpdate'] = $id;\n return view($this->form, $data);\n }", "title": "" }, { "docid": "7adf75fec90d8eb00935443a4314abdf", "score": "0.66372186", "text": "function edit()\n\t{\n\t\tJRequest::setVar( 'view', 'personnalisation' );\n\t\tJRequest::setVar( 'layout', 'form' );\n\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "10f67101b1ec6fd3d0c3c35c1442e712", "score": "0.66361433", "text": "public function editForm();", "title": "" }, { "docid": "d0628008c21c857e6203f02c16d81776", "score": "0.6632226", "text": "public function edit(Request $request, $id)\n {\n $form = Form::find($id);\n \n return view('Admin.Form.edit',compact('form'));\n }", "title": "" }, { "docid": "9792a1a79a644a9b305c75264d7f1741", "score": "0.6632226", "text": "public function editAction()\n {\n\n $id = $this->_request->id;\n $server = $this->getTable('FedoraConnectorServer')->find($id);\n\n // Get the form.\n $form = $this->_doServerForm('edit', $id);\n\n // Fill it with the data.\n $form->populate(array(\n 'name' => $server->name,\n 'url' => $server->url,\n 'is_default' => $server->is_default\n ));\n\n $this->view->form = $form;\n $this->view->server = $server;\n\n }", "title": "" }, { "docid": "8590c55c1c70061cc325176390a29404", "score": "0.66302156", "text": "public function edit(\n $resource,\n $userId\n );", "title": "" }, { "docid": "a8366eccbd97542beb1dcee0b26eec87", "score": "0.6623415", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BackendBundle:Receipe')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Receipe entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n\n\n return $this->render('BackendBundle:Receipe:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n\n ));\n }", "title": "" }, { "docid": "3c40f107dc8a7c56dda24081ce12fac9", "score": "0.66224486", "text": "public function edit($id)\n {\n $template = (object) $this->template;\n $form = $this->form();\n $data = GambarDepan::findOrFail($id);\n return view('admin.master.edit',compact('template','form','data'));\n }", "title": "" }, { "docid": "537f56dbca99f12eba56dee2e6b7652c", "score": "0.6619818", "text": "public function edit($id)\n\t{\n $form = $this->form(Author::find($id), \"modify\", \"authors/\".$id);\n return view('authors.form', compact('form'));\n\t}", "title": "" }, { "docid": "70adb5a3151ff0ad7f56b3e02f53ecfb", "score": "0.6613304", "text": "public function edit($id)\n {\n return view('module::edit');\n }", "title": "" }, { "docid": "d615d8d8a4d8f4cf935c141dac481476", "score": "0.6613157", "text": "public function edit($id)\n {\n\n $this->init();\n\n $this->pre_edit($id);\n\n $model = \"App\\\\\" . $this->model;\n $data = $model::find($id);\n $action = $this->action;\n $view = $this->model;\n\n\n $form = $model::edit_form($data);\n\n $form['data']['action'] = $action . \"/\" . $id;\n $form['data']['heading'] = \"Edit \" . str_singular($this->model) . \": \" . $id;\n $form['data']['type'] = \"edit\";\n $form['data']['submit'] = \"Update\";\n\n\n return view('tm::forms.add',compact( \"form\", 'action','view'));\n }", "title": "" }, { "docid": "345d2a2590332cafb30fb6f184f6807e", "score": "0.66126305", "text": "public function edit($id)\n\t{\n\t\t$product = Product::find($id);\n\t\treturn view('admin.products.edit')->with(compact('product'));\t// Abrir form de modificacion\n\t}", "title": "" }, { "docid": "1c9e3fbaf6d64c606c4efb7b565c986a", "score": "0.66118526", "text": "public function edit($id)\n\t{\n\t\t$employee = $this->employee->find($id);\n\t\treturn view('employee.edit',$employee);\n\t}", "title": "" }, { "docid": "a363f0a8d7cee161faa9c4c20a035fea", "score": "0.6611423", "text": "public function edit()\n {\n $user = $this->user;\n return view('i.edit',compact(\"user\"));\n }", "title": "" }, { "docid": "c5f9f66773e15856a4fb998798981449", "score": "0.65987045", "text": "public function edit(Form $form)\n {\n return view('back.forms.edit', compact('form'));\n }", "title": "" }, { "docid": "2b5fb043a3c87778cf2cebbc780df3b7", "score": "0.659838", "text": "public function edit()\n\t{\n\t\tparent::edit();\n\t}", "title": "" }, { "docid": "0725d45df945a0db7f9c322605b7a2b3", "score": "0.65971076", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('StelQuestionBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('StelQuestionBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "2a47ad7ce79b806f24d1a15c7fc9c440", "score": "0.6596694", "text": "public function edit($id)\n {\n return view('frontend::edit');\n }", "title": "" }, { "docid": "6b40e5ba991031bdde690e4197097887", "score": "0.6595757", "text": "public function edit($id)\n {\n $data['module'] = array_merge($this->module(),[\n 'action' => 'update'\n ]);\n $data['data'] = Faq::findOrFail($id);\n return view(\"backend.{$this->module()['module']}.create-edit\", $data);\n }", "title": "" }, { "docid": "0ac449955cdecf917632987ec468ea81", "score": "0.6593962", "text": "public function editAction()\n {\n return $this->render();\n }", "title": "" }, { "docid": "83080d32c3b420a765df50f4c8ce9647", "score": "0.65927714", "text": "public function show($id){\n return $this->showForm('update', $id);\n }", "title": "" }, { "docid": "90b4761c6084dd8bf9c1af57e8c7a15e", "score": "0.65908116", "text": "public function display_edit() {\n\t\t$template = Template::get();\n\t\t$role = \\Role::get_by_id($_GET['id']);\n\n\t\tif (isset($_POST['role'])) {\n\t\t\t$role->load_array($_POST['role']);\n\t\t\t$role->save();\n\n\t\t\tSession::set_sticky('message', 'updated');\n\t\t\tSession::redirect('/administrative/role?action=edit&id=' . $role->id);\n\t\t}\n\n\t\t$permissions = \\Permission::get_all();\n\t\t$template->assign('permissions', $permissions);\n\t\t$template->assign('role', $role);\n\t}", "title": "" }, { "docid": "e2177174dce1589d74c83b8a2b827def", "score": "0.65875673", "text": "public function edit($id)\n {\n $product = ProductBook::find($id);\n if ($product==null){\n return redirect(\"errors\");\n }\n return view('admin.listItem.ProductBook.FormBook')->with([\n \"product\"=> $product,\n \"action\"=>\"/AdminProductBook/\" . $product->id,\n \"method\"=>\"PUT\"\n ]) ;\n }", "title": "" }, { "docid": "7f796cde701f9b339bc451ab192e51e9", "score": "0.65855646", "text": "public function edit($id)\n {\n $title = 'Editar Forma de pagamento';\n $formaPagto = $this->formaPagto->find($id);\n return view('painel.forma-de-pagamentos.create-edit',compact('formaPagto', 'title'));\n }", "title": "" }, { "docid": "8f5764d60e419bbdd688ce0400c69fda", "score": "0.6579371", "text": "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getGetParameter('id');\n\t\t$partner = $this->model->partner->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('partner/edit', [\n\t\t\t'partner' => $partner\n\t\t]);\n\t}", "title": "" }, { "docid": "6acc615a39a27e3e0c8dad0b3b8edffa", "score": "0.65793544", "text": "public function edit($id)\n {\n $field = FormField::find($id);\n return view('admin.form.field.edit', compact('field'));\n }", "title": "" }, { "docid": "2de3ab7e4c9b351247adb666d596460e", "score": "0.6571994", "text": "public function edit($id)\n {\n $rodo = Rodo::where('id', $id)->first();\n return view('admin.rodo.form', [\n 'entry' => $rodo,\n 'cardtitle' => 'Edytuj regułkę'\n ]);\n }", "title": "" }, { "docid": "5be28ce959fcbd926070cfaf781714d6", "score": "0.65718997", "text": "public function edit()\n {\n return view('mgepisodios::edit');\n }", "title": "" }, { "docid": "f845e400455aac9c438867bdedf1afcb", "score": "0.65701544", "text": "public function edit($id)\n {\n $product = $this->productsRepository->getById($id);\n\n return view('products.form')->with('product', $product);\n }", "title": "" }, { "docid": "5f6bdbd8f1459dcca737fbcb595d090f", "score": "0.65660715", "text": "public function edit($id)\n\t{\n\t\t$this->page_title = 'Edit Test';\n\t\t$data = $this->rendarEdit($id);\n\t\treturn view('admin.crud.form',$data);\n\t}", "title": "" }, { "docid": "21d99e41a1e26e985dcc253e30b0cdcd", "score": "0.6563645", "text": "public function actionEdit() { }", "title": "" }, { "docid": "adb65a1366e0acdb9d74ef45e02025d7", "score": "0.6556976", "text": "public function edit($id)\n {\n $form = Form::findOrFail($id);\n $form->valid_fields = $this->getFieldTypes();\n $form->field_types_with_options = $this->getTypesWithOptions();\n $form->json_form = $form->toJson();\n $form->getSortedFields();\n $form->json_fields = $form->prepareJsonFields();\n return view('customForms.edit', ['form' => $form]);\n\n }", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "0ef74c7ff4663ffc645c1e1045b4c61b", "score": "0.0", "text": "public function destroy(visite $visite)\n {\n //\n }", "title": "" } ]
[ { "docid": "ef853768d92b1224dd8eb732814ce3fa", "score": "0.7318632", "text": "public function deleteResource(Resource $resource);", "title": "" }, { "docid": "32d3ed9a4be9d6f498e2af6e1cf76b70", "score": "0.6830789", "text": "public function removeResource($resource)\n {\n // Remove the Saved Resource\n $join = new User_resource();\n $join->user_id = $this->user_id;\n $join->resource_id = $resource->id;\n $join->list_id = $this->id;\n $join->delete();\n\n // Remove the Tags from the resource\n $join = new Resource_tags();\n $join->user_id = $this->user_id;\n $join->resource_id = $resource->id;\n $join->list_id = $this->id;\n $join->delete();\n }", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.6659381", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "c3b6a958d3ad1b729bfd6e4353c3feba", "score": "0.6540415", "text": "public function deleteFile(ResourceObjectInterface $resource);", "title": "" }, { "docid": "00aa681a78c0d452ad0b13bfb8d908dd", "score": "0.64851683", "text": "public function removeResource(IResource $resource): void {\n\t\t$this->resources = array_filter($this->getResources(), function (IResource $r) use ($resource) {\n\t\t\treturn !$this->isSameResource($r, $resource);\n\t\t});\n\n\t\t$query = $this->connection->getQueryBuilder();\n\t\t$query->delete(Manager::TABLE_RESOURCES)\n\t\t\t->where($query->expr()->eq('collection_id', $query->createNamedParameter($this->id, IQueryBuilder::PARAM_INT)))\n\t\t\t->andWhere($query->expr()->eq('resource_type', $query->createNamedParameter($resource->getType())))\n\t\t\t->andWhere($query->expr()->eq('resource_id', $query->createNamedParameter($resource->getId())));\n\t\t$query->execute();\n\n\t\tif (empty($this->resources)) {\n\t\t\t$this->removeCollection();\n\t\t} else {\n\t\t\t$this->manager->invalidateAccessCacheForCollection($this);\n\t\t}\n\t}", "title": "" }, { "docid": "e63877a9259e2bac051cf6c3de5eca30", "score": "0.6431514", "text": "public function deleteResource(Resource $resource) {\n\t\t$pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n\t\ttry {\n\t\t\t$result = $this->filesystem->delete($pathAndFilename);\n\t\t} catch (\\Exception $e) {\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "680170dae622eedce573be6ddf82f8db", "score": "0.6371304", "text": "public function removeStorage($imgName,$storageName);", "title": "" }, { "docid": "95caa506b86f6d24869dcb0b83d598e5", "score": "0.63126063", "text": "public function unlink(IEntity $source, IEntity $target, string $relation): IStorage;", "title": "" }, { "docid": "2f5ddf194cad1d408d416d31cae16f05", "score": "0.6301321", "text": "public function delete()\n {\n Storage:: delete();\n }", "title": "" }, { "docid": "b907271045dec6299e819d6cb076ced8", "score": "0.6288393", "text": "abstract protected function doRemove(ResourceInterface $resource, $files);", "title": "" }, { "docid": "90bf57c42b6c381768022b254ea3b8e9", "score": "0.62784326", "text": "public static function remove ($resource, $data) {\n // Retrieve resource.\n $list = self::retriveJson($resource);\n // If resource is not availabe.\n if ($list == 1) return 1;\n\n // Iterate through list.\n foreach($list as $i => $object) {\n // If an object with the given id exists, remove it.\n if ($object['id'] == $data['id']) {\n array_splice($list, $i, 1);\n return 0;\n }\n }\n\n // If object does not exists.\n return 2;\n }", "title": "" }, { "docid": "5eda1f28deed9cc179d6350748fe7164", "score": "0.62480205", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n activity()\n ->performedOn(Auth::user())\n ->causedBy($resource)\n ->withProperties(['remove user' => 'customValue'])\n ->log('Resource Deleted successfully');\n $notification = array(\n 'message' => 'Resource Deleted successfully', \n 'alert-type' => 'success'\n );\n \n return back()->with($notification); \n }", "title": "" }, { "docid": "42a9b004cc56ed1225f545039f158828", "score": "0.6130072", "text": "function delete_resource($ref)\n\t{\n\t\n\tif ($ref<0) {return false;} # Can't delete the template\n\n\t$resource=get_resource_data($ref);\n\tif (!$resource) {return false;} # Resource not found in database\n\t\n\t$current_state=$resource['archive'];\n\t\n\tglobal $resource_deletion_state, $staticsync_allow_syncdir_deletion, $storagedir;\n\tif (isset($resource_deletion_state) && $current_state!=$resource_deletion_state) # Really delete if already in the 'deleted' state.\n\t\t{\n\t\t# $resource_deletion_state is set. Do not delete this resource, instead move it to the specified state.\n\t\tsql_query(\"update resource set archive='\" . $resource_deletion_state . \"' where ref='\" . $ref . \"'\");\n\n # log this so that administrator can tell who requested deletion\n resource_log($ref,'x','');\n\t\t\n\t\t# Remove the resource from any collections\n\t\tsql_query(\"delete from collection_resource where resource='$ref'\");\n\t\t\t\n\t\treturn true;\n\t\t}\n\t\n\t# Get info\n\t\n\t# Is transcoding\n\tif ($resource['is_transcoding']==1) {return false;} # Can't delete when transcoding\n\n\t# Delete files first\n\t$extensions = array();\n\t$extensions[]=$resource['file_extension']?$resource['file_extension']:\"jpg\";\n\t$extensions[]=$resource['preview_extension']?$resource['preview_extension']:\"jpg\";\n\t$extensions[]=$GLOBALS['ffmpeg_preview_extension'];\n\t$extensions[]='icc'; // also remove any extracted icc profiles\n\t$extensions=array_unique($extensions);\n\t\n\tforeach ($extensions as $extension)\n\t\t{\n\t\t$sizes=get_image_sizes($ref,true,$extension);\n\t\tforeach ($sizes as $size)\n\t\t\t{\n\t\t\tif (file_exists($size['path']) && ($staticsync_allow_syncdir_deletion || false !== strpos ($size['path'],$storagedir))) // Only delete if file is in filestore\n\t\t\t\t {unlink($size['path']);}\n\t\t\t}\n\t\t}\n\t\n\t# Delete any alternative files\n\t$alternatives=get_alternative_files($ref);\n\tfor ($n=0;$n<count($alternatives);$n++)\n\t\t{\n\t\tdelete_alternative_file($ref,$alternatives[$n]['ref']);\n\t\t}\n\n\t\n\t// remove metadump file, and attempt to remove directory\n\t$dirpath = dirname(get_resource_path($ref, true, \"\", true));\n\tif (file_exists(\"$dirpath/metadump.xml\")){\n\t\tunlink(\"$dirpath/metadump.xml\");\n\t}\n\t@rmdir($dirpath); // try to delete directory, but if it has stuff in it fail silently for now\n\t\t\t // fixme - should we try to handle if there are other random files still there?\n\t\n\t# Log the deletion of this resource for any collection it was in. \n\t$in_collections=sql_query(\"select * from collection_resource where resource = '$ref'\");\n\tif (count($in_collections)>0){\n\t\tif (!function_exists(\"collection_log\")){include (\"collections_functions.php\");}\n\t\tfor($n=0;$n<count($in_collections);$n++)\n\t\t\t{\n\t\t\tcollection_log($in_collections[$n]['collection'],'d',$in_collections[$n]['resource']);\n\t\t\t}\n\t\t}\n\n\thook(\"beforedeleteresourcefromdb\",\"\",array($ref));\n\n\t# Delete all database entries\n\tsql_query(\"delete from resource where ref='$ref'\");\n\tsql_query(\"delete from resource_data where resource='$ref'\");\n\tsql_query(\"delete from resource_dimensions where resource='$ref'\");\n\tsql_query(\"delete from resource_keyword where resource='$ref'\");\n\tsql_query(\"delete from resource_related where resource='$ref' or related='$ref'\");\n\tsql_query(\"delete from collection_resource where resource='$ref'\");\n\tsql_query(\"delete from resource_custom_access where resource='$ref'\");\n\tsql_query(\"delete from external_access_keys where resource='$ref'\");\n\tsql_query(\"delete from resource_alt_files where resource='$ref'\");\n\t\t\n\thook(\"afterdeleteresource\");\n\t\n\treturn true;\n\t}", "title": "" }, { "docid": "d9b3f9cbdf088b174df39b489f05872c", "score": "0.6087595", "text": "public function delete(UriInterface $uri, \\stdClass $resource)\n {\n $this->cachePool->deleteItem($this->createCacheKey($uri));\n\n if(!property_exists($resource, '_links')) {\n return;\n }\n\n $links = $resource->_links;\n\n if($links) {\n foreach ($links as $link) {\n if(is_object($link) && property_exists($link, 'href')) {\n $uri = Client::getInstance()\n ->getDataStore()\n ->getUriFactory()\n ->createUri($link->href);\n }\n\n $this->cachePool->deleteItem($this->createCacheKey($uri));\n }\n }\n\n }", "title": "" }, { "docid": "9b39cbd70aa1aa97e5e5907676b3271e", "score": "0.60398406", "text": "public function removeResource ($name)\n\t{\n\t\t\n\t\tif (isset ($this->resources[$name]))\n\t\t{\n\t\t\t\n\t\t\tunset ($this->resources[$name]);\n\t\t\t\n\t\t\tif (isset ($this->$name))\n\t\t\t{\n\t\t\t\tunset ($this->$name);\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "21644a433a62c5fd1c528ea36afc90b8", "score": "0.6036098", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return redirect()->route('resource.index');\n }", "title": "" }, { "docid": "ba57ef5b5809e7e9dff4ab48e18b343a", "score": "0.603003", "text": "public function delete()\n\t{\n\t\t$this->fs->remove($this->file);\n\t}", "title": "" }, { "docid": "d0b2a4440bb64c6f1cf160d3a82d7633", "score": "0.60045654", "text": "public function destroy($id)\n {\n $student=Student::find($id);\n //delete related file from storage\n $student->delete();\n return redirect()->route('student.index');\n }", "title": "" }, { "docid": "73c704a80ae4a82903ee86a2b821245a", "score": "0.5944851", "text": "public function delete()\n {\n unlink($this->path);\n }", "title": "" }, { "docid": "b4847ad1cd8f89953ef38552f8cdddbe", "score": "0.5935105", "text": "public function remove($identifier)\n {\n $resource = $this->repository->findOneByIdentifier($identifier);\n $this->repository->remove($resource);\n }", "title": "" }, { "docid": "b3d5aa085167568cd1836dd269d2e8dc", "score": "0.59211266", "text": "public function delete(User $user, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "b1845194ffa32f9bcc26cc1bed8ee573", "score": "0.5896058", "text": "public function destroy()\n {\n $item = Item::find(request('id'));\n if ($item) {\n if ($item->image_url != '' && file_exists(public_path().'/uploads/item/'.$item->image_url)) {\n unlink(public_path().'/uploads/item/'.$item->image_url);\n }\n $item->delete();\n return response()->json(['success'=>'Record is successfully deleted']);\n }\n}", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "53eee40f2e33c1c3b53b819bb59d254d", "score": "0.58634996", "text": "public function delete()\n {\n Storage::delete($this->path);\n return parent::delete();\n }", "title": "" }, { "docid": "28f192e8f4063c3aaceba80a5680f10b", "score": "0.5845638", "text": "public function deleteResource(Resource $resource)\n {\n $whitelist = ['id'];\n $reflObj = new \\ReflectionClass($resource);\n\n //null out all fields not in the whitelist\n foreach ($reflObj->getProperties() as $prop) {\n if (!in_array($prop->getName(), $whitelist)) {\n $prop->setAccessible(true);\n $prop->setValue($resource, null);\n }\n }\n\n //set delete date and status\n $resource->setDateDeleted(new \\DateTime());\n $resource->setStatus(Resource::STATUS_DELETED);\n\n return $resource;\n }", "title": "" }, { "docid": "90ed2fbe159714429baa05a4796e3ed0", "score": "0.58285666", "text": "public function destroy() { return $this->rm_storage_dir(); }", "title": "" }, { "docid": "62415c40499505a9895f5a25b8230002", "score": "0.58192986", "text": "public function destroy($id)\n {\n $storage = Storage::find($id);\n $storage->delete();\n return redirect()->route('storage.index')->with('success', 'Data Deleted');\n }", "title": "" }, { "docid": "a2754488896ea090fe5191a49d9d85b9", "score": "0.58119655", "text": "public function deleteFile()\n { \n StorageService::deleteFile($this);\n }", "title": "" }, { "docid": "368230bb080f8f6c51f1832974a498e2", "score": "0.58056664", "text": "public function destroy($id)\n {\n $product = Product::where('id',$id)->first();\n $photo = $product->image;\n if($photo){\n unlink($photo);\n $product->delete();\n }else{\n $product->delete();\n }\n\n }", "title": "" }, { "docid": "31e5cc4a0b6af59482a96519deaba446", "score": "0.5797684", "text": "public function delete()\r\n {\r\n $directory = rtrim(config('infinite.upload_path'), \"/\");\r\n\r\n Storage::delete($directory . '/' . $this->file_name . '.' . $this->extension);\r\n }", "title": "" }, { "docid": "5760f6df7c6ebd5440da74e84ef8e734", "score": "0.57779175", "text": "public function remove($identifier);", "title": "" }, { "docid": "c473e5d9c679fa421932f0d830432589", "score": "0.5770938", "text": "abstract public function destroyResource(\n DrydockBlueprint $blueprint,\n DrydockResource $resource);", "title": "" }, { "docid": "80ccefee911dbbebc88e3854b170acf7", "score": "0.5765826", "text": "public function removeRecord();", "title": "" }, { "docid": "22ecee59028ed62aa46bfb196c94d320", "score": "0.5745101", "text": "function remove_from_set($setID, $resource) {\n\tglobal $wpdb;\n\t$resource_table = $wpdb->prefix . 'savedsets_resources';\n\t\n\t$wpdb->delete( $resource_table, array( 'set_id' => $setID, 'resource_id' => $resource ), array( '%d','%d' ) );\n\t\n}", "title": "" }, { "docid": "80279a1597fc869ef294d03bcd1a6632", "score": "0.5721846", "text": "public function rm($id)\n {\n }", "title": "" }, { "docid": "f1357ea9bb8630aa33594f5035e30b53", "score": "0.57217026", "text": "public function drop() {\n global $DB;\n\n if (!$DB->count_records('amos_stashes', array('id' => $this->id, 'hash' => $this->hash, 'ownerid' => $this->ownerid))) {\n throw new coding_exception('Attempt to delete non-existing stash (record)');\n }\n if (!is_writable($this->get_storage_filename())) {\n throw new coding_exception('Attempt to delete non-existing stash (file)');\n }\n\n $DB->delete_records('amos_stashes', array('id' => $this->id, 'hash' => $this->hash, 'ownerid' => $this->ownerid));\n // if the stash file is not referenced any more, delete it\n if (!$DB->record_exists('amos_stashes', array('hash' => $this->hash))) {\n $filename = $this->get_storage_filename();\n unlink($filename);\n @rmdir(dirname($filename));\n @rmdir(dirname(dirname($filename)));\n }\n }", "title": "" }, { "docid": "45fc5fca7261f9ee05d7a7cfb701d0c1", "score": "0.5717582", "text": "public function destroy($id)\n {\n $del = File::find($id);\n\n if ($del->user_id == Auth::id()) {\n Storage::delete($del->path);\n $del->delete();\n return redirect('/file');\n } else {\n echo \"Its not your file!\";\n }\n }", "title": "" }, { "docid": "19b2a562afcef7db10ce9b75c7e6a8dc", "score": "0.57099277", "text": "public function deleteFromDisk(): void\n {\n Storage::cloud()->delete($this->path());\n }", "title": "" }, { "docid": "493060cb88b9700b90b0bdc650fc0c62", "score": "0.5700126", "text": "public function drop() {\n global $DB;\n\n if (!$DB->count_records('amos_stashes', array('id' => $this->id, 'hash' => $this->hash, 'ownerid' => $this->ownerid))) {\n throw new coding_exception('Attempt to delete non-existing stash (record)');\n }\n if (!is_writable($this->get_storage_filename())) {\n throw new coding_exception('Attempt to delete non-existing stash (file)');\n }\n\n $DB->delete_records('amos_stashes', array('id' => $this->id, 'hash' => $this->hash, 'ownerid' => $this->ownerid));\n // If the stash file is not referenced any more, delete it.\n if (!$DB->record_exists('amos_stashes', array('hash' => $this->hash))) {\n $filename = $this->get_storage_filename();\n unlink($filename);\n @rmdir(dirname($filename));\n @rmdir(dirname(dirname($filename)));\n }\n }", "title": "" }, { "docid": "a85f5bb361425e120c2b1c92b82b2fe9", "score": "0.56977797", "text": "public function destroy($id)\n {\n $file = File::findOrFail($id);\n Storage::disk('public')->delete(str_replace('/storage/','',$file->path));\n $file->delete();\n return redirect('/admin/media');\n }", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "c553ef667073b35a27db9e6a3bae3be3", "score": "0.56575704", "text": "public function unlink() {\n\t\t$return = unlink($this->fullpath);\n\t\t// destroy object ...testing :)\n\t\tunset($this);\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "0532947b7106b0e9285319a9eaf76b8e", "score": "0.56488144", "text": "public function destroy($id)\n\t{\n $entry = Fileentry::find($id);\n Storage::disk('local')->delete($entry->filename);\n $entry->delete();\n\n return redirect()->back();\n\t}", "title": "" }, { "docid": "c29cf340a7685b50d4992018f03a1a37", "score": "0.5645965", "text": "public function destroy() {\n return $this->resource->destroy();\n }", "title": "" }, { "docid": "0b78e5e9a8d5d2a166659b0988261da1", "score": "0.5633292", "text": "public function destroy($id)\n {\n //\n //\n $slider = Slider::findOrFail($id);\n// if(Storage::exists($slider->image_path))\n// {\n// Storage::delete($slider->image_path);\n// }\n $slider->delete();\n return redirect()->back()->with('success', 'Slider was deleted successfully!');\n }", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "f0bca51252baaca5a816eef1c2c06fc0", "score": "0.56296647", "text": "public function detach()\n {\n $oldResource=$this->resource;\n fclose($this->resource);\n $this->resource=NULL;\n return $oldResource;\n }", "title": "" }, { "docid": "41660f6084f57c1f6d52218d45380858", "score": "0.5612277", "text": "public function destroy($id)\n {\n $destroy = File::find($id);\n Storage::delete('public/img/'.$destroy->src);\n $destroy->delete();\n return redirect('/files');\n }", "title": "" }, { "docid": "b6093338d60ff2644649eac3d576e7d9", "score": "0.5606613", "text": "public function delete($resource, array $options = [])\n {\n return $this->request('DELETE', $resource, $options);\n }", "title": "" }, { "docid": "59de27765b5cb766d8d7c06e25831e55", "score": "0.5604046", "text": "function delete() {\n\n return unlink($this->path);\n\n }", "title": "" }, { "docid": "547eb07f41c94e071fb1daf6da02654d", "score": "0.55980563", "text": "public function destroy($id)\n {\n $product = Product::findOrFail($id);\n unlink(public_path() .'/images/'.$product->file->file);\n session(['Delete'=>$product->title]);\n $product->delete();\n return redirect()->back();\n }", "title": "" }, { "docid": "2b68a0dafbed1898fb849c8102af4ac1", "score": "0.55952084", "text": "public function destroy($id){\n $book = Book::withTrashed()->where('id', $id)->firstOrFail(); \n\n if ($book->trashed()) {\n session()->flash('success', 'El libro se a eliminado exitosamente');\n Storage::delete($book->image); \n $book->forceDelete();\n }else{\n session()->flash('success', 'El libro se envio a la papelera exitosamente');\n $book->delete();\n }\n return redirect(route('books.index'));\n }", "title": "" }, { "docid": "0354eb11a59ab56fb4c68c1ca1a34f9e", "score": "0.55922675", "text": "public function removeUpload(){\n if($file = $this->getAbsolutePath()){\n unlink($file);\n }\n \n }", "title": "" }, { "docid": "8a2965e7fd915ac119635055a709e09f", "score": "0.5591116", "text": "public function destroy($id, Request $request)\n {\n $imagePath = DB::table('game')->select('image')->where('id', $id)->first();\n\n $filePath = $imagePath->image;\n\n if (file_exists($filePath)) {\n\n unlink($filePath);\n\n DB::table('game')->where('id',$id)->delete();\n\n }else{\n\n DB::table('game')->where('id',$id)->delete();\n }\n\n return redirect()->route('admin.game.index');\n }", "title": "" }, { "docid": "954abc5126ecf3e25d5e32fc21b567ff", "score": "0.55901456", "text": "public function remove( $resourceId )\n {\n unset( $this->resourceList[ $resourceId ] );\n \n $this->database->exec( \"\n DELETE FROM\n `{$this->tbl['library_collection']}`\n WHERE\n collection_type = \" . $this->database->quote( $this->type ) . \"\n AND\n ref_id = \" . $this->database->quote( $this->refId ) . \"\n AND\n resource_id = \" . $this->database->escape( $resourceId ) );\n \n return $this->database->affectedRows();\n }", "title": "" }, { "docid": "f7194357aa4e137cfa50acffda93fc27", "score": "0.55829436", "text": "public static function delete($path){}", "title": "" }, { "docid": "a22fc9d493bea356070527d5c377a089", "score": "0.5578515", "text": "public function remove($name) { return IO_FS::rm($this->full_path_for($name)); }", "title": "" }, { "docid": "8a6c54307038aeccb488677b49209dac", "score": "0.5574026", "text": "public function destroy($id)\n {\n //\n //\n $resource = Resource::find($id);\n $resource->delete();\n return redirect()->back();\n\n }", "title": "" }, { "docid": "97914eb78d7cf648246f9bcd6ac69124", "score": "0.5573565", "text": "public function destroy($id)\n {\n /*\n\n = R::load( '', $id );\n R::trash( );*/\n }", "title": "" }, { "docid": "fa9a2e384d55e25ff7893069c00561f7", "score": "0.5568524", "text": "public function destroy($id)\n {\n $data = Crud::find($id);\n $image_name = $data->image;\n unlink(public_path('images'.'/'.$image_name));\n $data->delete();\n return redirect('crud')->with('success','record deleted successfully!');\n\n\n }", "title": "" }, { "docid": "9e4e139799275c6ed9f200c63b6d4a6d", "score": "0.55617994", "text": "public function delete($resource)\n {\n // Make DELETE Http request\n $status = $this->call('DELETE', $resource)['Status-Code'];\n if ($status) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "2160551c2833f1a763a1634fee961123", "score": "0.5560052", "text": "public function deleteItem($path, $options = null)\n {\n $this->_rackspace->deleteObject($this->_container,$path);\n if (!$this->_rackspace->isSuccessful()) {\n throw new Zend_Cloud_StorageService_Exception('Error on delete: '.$this->_rackspace->getErrorMsg());\n }\n }", "title": "" }, { "docid": "684ee86436e720744df6668b707a5ac0", "score": "0.5557478", "text": "public function deleteImage()\n {\n Storage::delete($this->image);\n }", "title": "" }, { "docid": "1bc9bf0c3a8c77c07fcaf9de0c876d86", "score": "0.5555183", "text": "public function destroy($id)\n { \n $record = Post::findOrFail($id); \n\n if($record->thumbnail !== 'default.png'){\n Storage::delete('Post/'.$record->thumbnail); \n } \n \n $done = Post::destroy($id); \n\n return back()->with('success' , 'Record Deleted');\n }", "title": "" }, { "docid": "9e9a9d9363b0ac3e68a1243a8083cd0b", "score": "0.55495435", "text": "public function destroy($id)\n {\n \n $pro=Product::find($id);\n $one=$pro->image_one;\n \n $two=$pro->image_two;\n $three=$pro->image_three;\n $four=$pro->image_four;\n $five=$pro->image_five;\n $six=$pro->image_six;\n $path=\"media/products/\";\n Storage::disk('public')->delete([$path.$one,$path.$two,$path.$three,$path.$four,$path.$five,$path.$six]);\n\n\n\n $pro->delete();\n Toastr()->success('Product Deleted successfully');\n return redirect()->back();\n \n }", "title": "" }, { "docid": "2c6776be63eac31e1729852dfa8745a9", "score": "0.5548924", "text": "public function destroy($id)\n {\n $partner = Partner::findOrFail($id);\n\n if($partner->cover && file_exists(storage_path('app/public/' . $partner->cover))){\n \\Storage::delete('public/'. $partner->cover);\n }\n \n $partner->delete();\n \n return redirect()->route('admin.partner')->with('success', 'Data deleted successfully');\n }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "fb75e67696c980503f7ebd09ae729fe9", "score": "0.5538126", "text": "final public function delete() {}", "title": "" }, { "docid": "aa31cbc566ad4ff78241eb4b0f49fe1e", "score": "0.5536226", "text": "public function destroy($id)\n\t{\n\t\t$this->resource->find($id)->delete();\n\n\t\treturn Redirect::route('backend.resources.index');\n\t}", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "ec759861dd3d396dcc09d5e1bfcf628b", "score": "0.5521281", "text": "public function unlink($path);", "title": "" }, { "docid": "b896244b5af3e4822537d0d1d7ab8fdf", "score": "0.5519644", "text": "public function destroy($id)\n {\n $input = $request->all();\n \t$url = parse_url($input['src']);\n \t$splitPath = explode(\"/\", $url[\"path\"]);\n \t$splitPathLength = count($splitPath);\n \tImageUploads::where('path', 'LIKE', '%' . $splitPath[$splitPathLength-1] . '%')->delete();\n }", "title": "" }, { "docid": "0d93adedaef8f05d9f7cbb129944a438", "score": "0.55152917", "text": "public function delete()\n {\n imagedestroy($this->image);\n $this->clearStack();\n }", "title": "" }, { "docid": "ceab6acdbc23ed7a9a41503580c0a747", "score": "0.55148435", "text": "public function delete()\n {\n $this->value = null;\n $this->hit = false;\n $this->loaded = false;\n $this->exec('del', [$this->key]);\n }", "title": "" }, { "docid": "28797da9ff018d2e75ab89e4bc5cd50d", "score": "0.5511856", "text": "public function destroy($id)\n {\n $user= Auth::user();\n\n $delete = $user->profileimage;\n $user->profileimage=\"\";\n $user->save();\n $image_small=public_path().'/Store_Erp/books/profile/'.$delete ;\n unlink($image_small);\n Session::flash('success',' Profile Image Deleted Succesfully!');\n return redirect()->route('user.profile'); \n \n }", "title": "" }, { "docid": "a92d57f4ccac431a9299e4ad1f0d1618", "score": "0.54956895", "text": "public function destroy($id)\n {\n //\n\n $personaje=Personaje::findOrFail($id);\n\n if(Storage::delete('public/'.$personaje->Foto)){\n \n Personaje::destroy($id);\n }\n\n\n\n\n\n return redirect('personaje')->with('mensaje','Personaje Borrado');\n }", "title": "" }, { "docid": "48a57deb7c791b1ea810616329e3805e", "score": "0.54922575", "text": "abstract public function delete($path);", "title": "" }, { "docid": "48a57deb7c791b1ea810616329e3805e", "score": "0.54922575", "text": "abstract public function delete($path);", "title": "" }, { "docid": "df0b2bf2ed8277a4cd77f933418a9cd1", "score": "0.5491558", "text": "public function deleteFile()\n\t{\n\t\tif($this->id)\n\t\t{\n\t\t\t$path = $this->getFileFullPath();\n\t\t\tif($path)\n\t\t\t{\t\t\t\n\t\t\t\t@unlink($path);\n\t\t\t\t$this->setFile(null);\n\t\t\t}\n\t\t}\n\t}", "title": "" } ]
a954c34f9ed2139675bba9807c451edd
Get the services provided by the provider.
[ { "docid": "89c74a2f2359bc668eb5c3ea2c73c43d", "score": "0.0", "text": "public function provides()\n\t{\n\t\treturn array('flash');\n\t}", "title": "" } ]
[ { "docid": "52ba01ad4e89ae56d3a37c7ba38a3623", "score": "0.79044753", "text": "final public function getServices()\n {\n if (is_null($this->serviceProviders)) {\n $this->serviceProviders = $this->getServiceProviders();\n }\n\n return $this->serviceProviders;\n }", "title": "" }, { "docid": "74ec73887880cab6aab332723d615307", "score": "0.7688538", "text": "public function get_providers() {\n\t\treturn $this->apply_filters(\n\t\t\t'miusage_get_service_providers',\n\t\t\t[\n\t\t\t\t'admin_menu' => AdminMenu::class,\n\t\t\t\t'user_loader' => UserLoader::class,\n\t\t\t\t'short_code' => ShortCode::class,\n\t\t\t\t'template' => Template::class,\n\t\t\t\t'cli' => CLI::class,\n\t\t\t]\n\t\t);\n\t}", "title": "" }, { "docid": "b27c2569b26085ed13b176a9fd97baab", "score": "0.7625617", "text": "protected static function getServiceProviders()\n {\n return [];\n }", "title": "" }, { "docid": "448253942d0243d3a70ceb8409ccd556", "score": "0.7559676", "text": "public static function get_service_providers(): array {\n\t\treturn self::$service_providers;\n\t}", "title": "" }, { "docid": "a50ec3259dd929ba822b60ae3e1231dd", "score": "0.7468642", "text": "public function getServices();", "title": "" }, { "docid": "c1e26928f94e8ed1539655fd7b2fac8d", "score": "0.7450686", "text": "public function getServiceProviders()\n {\n return $this->serviceProviders;\n }", "title": "" }, { "docid": "c2edbab5c1f9b4a638a3c3c6906e9a18", "score": "0.7422228", "text": "public function getServices()\n {\n return $this->services;\n }", "title": "" }, { "docid": "34998fb1efef4b73892e56b3d6b69474", "score": "0.74097335", "text": "public function services()\n {\n return $this->belongstomany(Service::class);\n }", "title": "" }, { "docid": "20b1fd66c58a8b9a72fd2528fe528c00", "score": "0.73654735", "text": "public function getServiceProviders();", "title": "" }, { "docid": "20b1fd66c58a8b9a72fd2528fe528c00", "score": "0.73654735", "text": "public function getServiceProviders();", "title": "" }, { "docid": "21e446987269d7a9484ddf8dc0344429", "score": "0.7363234", "text": "public function getServices() {\n return $this->services;\n }", "title": "" }, { "docid": "2254a4352eb24fe16abdde9b2e578efa", "score": "0.73209786", "text": "public function getServices() {\n\n return $this->services;\n\n }", "title": "" }, { "docid": "d1a048abf9e9894ed84ea53cf773f996", "score": "0.7282508", "text": "function services() {\n return $this->services;\n }", "title": "" }, { "docid": "df1755747257deafcd767b34ba82b250", "score": "0.72533107", "text": "public function getServices()\n\t{\n\t\treturn $this->services;\n\t}", "title": "" }, { "docid": "1cdf15e3e8381cb8b9496b6bed2b01dc", "score": "0.7187819", "text": "public function getServices()\n {\n return $this->pantonoServices;\n }", "title": "" }, { "docid": "9bfaaae136f8655ff2796b0fc0c97be3", "score": "0.7166526", "text": "public static function get_services() {\n return [\n Pages\\Admin::class,\n Base\\Enqueue::class,\n Base\\SettingsLinks::class\n ];\n }", "title": "" }, { "docid": "ffac0eeb9b9bf88fff08be929f87a349", "score": "0.7162174", "text": "public static function get_services(){\n\n return [\n Pages\\Admin::class,\n Base\\Enqueue::class,\n Base\\SettingsLinks::class\n ];\n }", "title": "" }, { "docid": "a8e337aea4688aa04dbb44878a6f1f2c", "score": "0.7119301", "text": "public function provides() : array\n {\n return array_keys($this->services);\n }", "title": "" }, { "docid": "5aa27b121e5d7590abb484d30cc9c8ef", "score": "0.70615125", "text": "public static function get_services()\n {\n return [\n Pages\\Dashboard::class,\n Base\\Enqueue::class,\n Base\\SettingsLink::class,\n Base\\CustomPostTypeController::class,\n ];\n }", "title": "" }, { "docid": "c749021571d94101a06e7dd4f7cdd0a8", "score": "0.704711", "text": "public static function get_services()\n {\n return [\n Pages\\Admin::class,\n Base\\Enqueue::class,\n Base\\CustomPostType::class,\n Base\\CustomMetaBox::class,\n Base\\Shortcode::class,\n Base\\Cron::class,\n ];\n }", "title": "" }, { "docid": "f82235f5abba9f095f179fc5938857a5", "score": "0.70409036", "text": "public function & getServices() {\n\t\treturn $this->services;\n\t}", "title": "" }, { "docid": "dc87e92f97a0ca6bb030489c435efc5f", "score": "0.69972384", "text": "public function provides()\n {\n return [SeoService::class];\n }", "title": "" }, { "docid": "98a53ec3e75ccc95809e2cc15736763c", "score": "0.69866574", "text": "private static function get_services(): array {\n\t\treturn [\n\t\t\tAdmin::class,\n\t\t\tBase\\Enqueue::class,\n\t\t\tBase\\Model::class\n\t\t];\n\t}", "title": "" }, { "docid": "5f2d4a971c4447feca300e07efadf123", "score": "0.69544965", "text": "public static function getServices()\r\n {\r\n \t$asRoles \t\t= self::buildRoles(true);\r\n \t$oRoleService \t= ClassManager::getInstance(PathFinder::tableToController('role_service'));\r\n \t\r\n \treturn $oRoleService->getServicesByRole($asRoles);\r\n }", "title": "" }, { "docid": "054f1879fe138e3b6deedd988f3c3311", "score": "0.69251657", "text": "protected function getServices(): array\n {\n }", "title": "" }, { "docid": "054f1879fe138e3b6deedd988f3c3311", "score": "0.69251657", "text": "protected function getServices(): array\n {\n }", "title": "" }, { "docid": "054f1879fe138e3b6deedd988f3c3311", "score": "0.69251657", "text": "protected function getServices(): array\n {\n }", "title": "" }, { "docid": "caf537ebc6c4cc18728af9b6679ee703", "score": "0.6916028", "text": "public function services()\n {\n return $this->getAngularLocation($this->service_path);\n }", "title": "" }, { "docid": "dfb3a15a6e49e5956bc5dc905dd3c451", "score": "0.6863469", "text": "private static function get_services() {\n\n return [\n Enqueue::class,\n controllers\\Contact_Form_Controller::class\n ];\n\n }", "title": "" }, { "docid": "1b0e04974d4b9c19c0b7e17b61535cc0", "score": "0.6805807", "text": "public function getServiceProvider();", "title": "" }, { "docid": "61b28b5945475266657fb75d67ebd968", "score": "0.6796126", "text": "public static function get_services() \n\t{\n\t\treturn [\n\n\t\t\tPages\\Dashboard::class,\n\t\t\tBase\\Enqueue::class,\n\t\t\tBase\\SettingsLinks::class,\n\t\t\tBase\\CustomPostTypeController::class,\n\t\t\tBase\\CustomTaxonomyController::class,\n\t\t\tBase\\WidgetController::class,\n\t\t\tBase\\GalleryController::class,\n\t\t\tBase\\TestimonialController::class,\n\t\t\tBase\\TemplateController::class,\n\t\t\tBase\\AuthController::class,\n\t\t\tBase\\MembershipController::class,\n\t\t\tBase\\ChatController::class,\n\t\t];\n\t}", "title": "" }, { "docid": "3462bca7de9760f5d502c9804170a0dc", "score": "0.6770017", "text": "public function provides()\n {\n return [\n SerasaService::class\n ];\n }", "title": "" }, { "docid": "64fafec0566dce4592d7fcbdc5b52b59", "score": "0.6730005", "text": "function services(){\n\n return Service::get();\n\n}", "title": "" }, { "docid": "b1249c760a25d9a49f70c46fad6bf4fa", "score": "0.6725327", "text": "public function getServices()\r\n {\r\n if (is_null($this->_services)) {\r\n if ($this->getConfig('auto')) {\r\n $this->_services = array();\r\n $config = Mage::app()->getConfig();\r\n foreach (array('cache', 'full_page_cache', 'fpc') as $cacheType) {\r\n $node = $config->getXpath('global/' . $cacheType . '[1]');\r\n if (isset($node[0]->backend) && in_array((string)$node[0]->backend, array(\r\n 'Cm_Cache_Backend_Redis',\r\n 'Mage_Cache_Backend_Redis'\r\n ))) {\r\n $this->_services[] = $this->_buildServiceArray(\r\n $this->__(str_replace('_', ' ', uc_words($cacheType))),\r\n $node[0]->backend_options->server,\r\n $node[0]->backend_options->port,\r\n $node[0]->backend_options->password,\r\n $node[0]->backend_options->database\r\n );\r\n }\r\n }\r\n // get session\r\n $node = $config->getXpath('global/redis_session');\r\n if ($node) {\r\n $this->_services[] = $this->_buildServiceArray(\r\n $this->__('Session'),\r\n $node[0]->host,\r\n $node[0]->port,\r\n $node[0]->password,\r\n $node[0]->db\r\n );\r\n }\r\n } else {\r\n $this->_services = unserialize($this->getConfig('manual'));\r\n }\r\n }\r\n return $this->_services;\r\n }", "title": "" }, { "docid": "f8a21d33d611096834198cacc88f3da2", "score": "0.67098963", "text": "public function getServiceProviders()\n {\n $authManager = $this->getServiceLocator()->get('authManager');\n $userMapper = $this->createMapper('\\Site\\Storage\\MySQL\\UserMapper');\n\n $userService = new UserService($authManager, $userMapper);\n $authManager->setAuthService($userService);\n\n return array(\n 'couponService' => new CouponService($this->getServiceLocator()->get('sessionBag'), new DefaultAdapter()),\n 'transactionService' => new TransactionService($this->createMapper('\\Site\\Storage\\MySQL\\TransactionMapper')),\n 'externalService' => new ExternalService($this->createMapper('\\Site\\Storage\\MySQL\\BookingExternalRelationMapper')),\n 'summaryService' => new SummaryService($this->getServiceLocator()->get('sessionBag')),\n 'exchangeService' => new ExchangeService($this->getServiceLocator()->get('sessionBag')),\n \n 'bookingService' => new BookingService(\n $this->createMapper('\\Site\\Storage\\MySQL\\BookingMapper'),\n $this->createMapper('\\Site\\Storage\\MySQL\\BookingGuestsMapper'),\n $this->createMapper('\\Site\\Storage\\MySQL\\BookingRoomMapper')\n ),\n \n 'bedService' => new BedService(\n $this->createMapper('\\Site\\Storage\\MySQL\\RoomTypeBedMapper')\n ),\n \n 'mealsService' => new MealsService(\n $this->createMapper('\\Site\\Storage\\MySQL\\MealsMapper'),\n $this->createMapper('\\Site\\Storage\\MySQL\\MealsGlobalPriceMapper')\n ),\n\n 'dictionaryService' => new DictionaryService(\n $this->createMapper('\\Site\\Storage\\MySQL\\DictionaryMapper')\n ),\n\n 'userService' => $userService,\n\n 'languageService' => new LanguageService(\n $this->createMapper('\\Site\\Storage\\MySQL\\LanguageMapper')\n ),\n\n 'priceGroupService' => new PriceGroupService(\n $this->createMapper('\\Site\\Storage\\MySQL\\PriceGroupMapper')\n ),\n\n 'reservationService' => new ReservationService(\n $this->createMapper('\\Site\\Storage\\MySQL\\ReservationMapper')\n ),\n\n 'roomService' => new RoomService(\n $this->createMapper('\\Site\\Storage\\MySQL\\RoomMapper'),\n $this->createMapper('\\Site\\Storage\\MySQL\\RoomTypeMapper')\n ),\n\n 'facilitiyService' => new FacilitiyService(\n $this->createMapper('\\Site\\Storage\\MySQL\\FacilitiyCategoryMapper'), \n $this->createMapper('\\Site\\Storage\\MySQL\\FacilitiyItemMapper')\n ),\n\n 'facilityItemDataService' => new FacilityItemDataService(\n $this->createMapper('\\Site\\Storage\\MySQL\\FacilityItemDataMapper')\n ),\n\n 'photoService' => new PhotoService(\n $this->createMapper('\\Site\\Storage\\MySQL\\PhotoMapper'),\n $this->getImageManager()\n ),\n\n 'roomTypeService' => new RoomTypeService(\n $this->createMapper('\\Site\\Storage\\MySQL\\RoomTypeMapper'),\n $this->createMapper('\\Site\\Storage\\MySQL\\RoomTypeGalleryMapper'),\n $this->createMapper('\\Site\\Storage\\MySQL\\RoomMapper'),\n $this->createMapper('\\Site\\Storage\\MySQL\\RoomTypePriceMapper'),\n $this->createMapper('\\Site\\Storage\\MySQL\\FacilitiyCategoryMapper')\n ),\n\n 'hotelService' => new HotelService(\n $this->createMapper('\\Site\\Storage\\MySQL\\HotelMapper'),\n $userMapper\n ),\n\n 'roomTypeGalleryService' => $this->createRoomTypeGalleryService(),\n\n 'regionService' => new RegionService(\n $this->createMapper('\\Site\\Storage\\MySQL\\RegionMapper')\n ),\n\n 'discountService' => new DiscountService(\n $this->createMapper('\\Site\\Storage\\MySQL\\DiscountMapper')\n ),\n\n 'paymentSystemService' => new PaymentSystemService(\n $this->createMapper('\\Site\\Storage\\MySQL\\PaymentSystemMapper')\n ),\n\n 'hotelTypeService' => new HotelTypeService(\n $this->createMapper('\\Site\\Storage\\MySQL\\HotelTypeMapper')\n ),\n\n 'serviceManager' => new ServiceManager(\n $this->createMapper('\\Site\\Storage\\MySQL\\ServiceMapper'),\n $this->createMapper('\\Site\\Storage\\MySQL\\ServicePriceMapper')\n ),\n \n 'reservationServiceManager' => new ReservationServiceManager(\n $this->createMapper('\\Site\\Storage\\MySQL\\ReservationServiceMapper')\n ),\n\n 'roomCategoryService' => new RoomCategoryService(\n $this->createMapper('\\Site\\Storage\\MySQL\\RoomCategoryMapper')\n ),\n\n 'districtService' => new DistrictService(\n $this->createMapper('\\Site\\Storage\\MySQL\\DistrictMapper')\n ),\n\n 'paymentFieldService' => new PaymentFieldService(\n $this->createMapper('\\Site\\Storage\\MySQL\\PaymentSystemFieldMapper'),\n $this->createMapper('\\Site\\Storage\\MySQL\\PaymentSystemFieldDataMapper')\n ),\n\n 'reviewService' => new ReviewService(\n $this->createMapper('\\Site\\Storage\\MySQL\\ReviewMapper'),\n $this->createMapper('\\Site\\Storage\\MySQL\\ReviewTypeMapper'),\n $this->createMapper('\\Site\\Storage\\MySQL\\ReviewMarkMapper')\n )\n );\n }", "title": "" }, { "docid": "bfdeed9513c8a09cda9e1c17ee1a7cf8", "score": "0.6692993", "text": "public function services(): array\n {\n return \\array_merge(\n \\array_keys($this->_services),\n \\array_keys($this->aliases)\n );\n }", "title": "" }, { "docid": "6590fbd202797e94018f3b8b0c262b07", "score": "0.667366", "text": "public function getServicesList()\n {\n return $this->services;\n }", "title": "" }, { "docid": "7d6d142907f366d5f7911d0a353b7e46", "score": "0.6662739", "text": "public function getRegisteredServices(): array\n {\n return $this->em->getRepository(Service::class)\n ->getActiveServices();\n }", "title": "" }, { "docid": "b705da69926379bd0c01176b6a609d7e", "score": "0.66499066", "text": "public function get_services() {\n return $this->linkemperor_exec(null, null,\"/api/v2/customers/services.json\");\n }", "title": "" }, { "docid": "c9dd54cbed27f72724d5fafacc5ffbda", "score": "0.6634857", "text": "public function getProviders();", "title": "" }, { "docid": "27be31bee25aab77541b6fe8965162e7", "score": "0.661399", "text": "public static function get_providers() {\n\t\treturn self::$providers;\n\t}", "title": "" }, { "docid": "725cd7eb2a65dc2b14fca3063384b7f9", "score": "0.66113895", "text": "public function provides()\n {\n return [\n \\Viviniko\\Review\\Services\\ReviewService::class,\n ];\n }", "title": "" }, { "docid": "ddbbaf7b4419334749715dab86e99e66", "score": "0.6599218", "text": "public function providers(): array;", "title": "" }, { "docid": "7d4d1c2bc8f0f048ca9805b1f6855d16", "score": "0.65842867", "text": "public function get_services() {\n return $this->linkemperor_exec(null, null,\"/api/v2/vendors/services.json\");\n }", "title": "" }, { "docid": "1895bb8d8a8c9b1facf20863c4057502", "score": "0.6571392", "text": "public function getModulesServiceProviders()\n {\n $modulesNamespace = ModulesConfig::getModulesNamespace();\n\n foreach (ModulesConfig::getModulesNames() as $moduleName) {\n // get the Module extra service providers (extra service providers are defined in the modules config file)\n foreach (ModulesConfig::getModulesExtraServiceProviders($moduleName) as $provider) {\n $allServiceProviders[] = $provider;\n }\n // append the Module main service provider\n $allServiceProviders[] = ModulesConfig::buildMainServiceProvider($modulesNamespace, $moduleName);\n }\n\n return array_unique($allServiceProviders) ? : [];\n }", "title": "" }, { "docid": "e6af6d04d462e9e0d925286142af8a21", "score": "0.6554432", "text": "public function provides()\n {\n return [\n \\Jihe\\Contracts\\Services\\Sms\\SmsService::class,\n ];\n }", "title": "" }, { "docid": "4ca623828cb0c55a71be271d7001e317", "score": "0.6529438", "text": "public function getUsersServices()\r\n {\r\n return $this->usersServices = new UsersService();\r\n }", "title": "" }, { "docid": "844c14d3a7af1484a39e146bfae158a5", "score": "0.6501289", "text": "public function provides()\n {\n return [\n \\Viviniko\\Country\\Services\\CountryService::class\n ];\n }", "title": "" }, { "docid": "c65d717bfe990750970c40527f1c5b38", "score": "0.6482615", "text": "public function providerGet()\n {\n $getList = $this->getMethodsName('get');\n $provider = [];\n\n foreach ($getList as $name) {\n $provider[$name] = [\n 'name' => $name,\n 'arguments' => $this->getArgumentsForMethod($name),\n ];\n }\n\n return $provider;\n }", "title": "" }, { "docid": "9da8576d12a5c5a0a408a4ee909578ec", "score": "0.6476603", "text": "public function all()\n {\n return $this->providers;\n }", "title": "" }, { "docid": "47e4cc6396350c1f91d722c2e9c63ea2", "score": "0.64713806", "text": "public function getRegisteredServices(): array\n {\n return collect(config('weather.services'))\n ->map(fn($serviceName) => $this->getServiceAsObject($serviceName))\n ->filter(fn($service) => is_object($service))\n ->toArray();\n }", "title": "" }, { "docid": "2d7915d4e4ccfa67f221c92bce0e710a", "score": "0.64517516", "text": "public function findServices(): array;", "title": "" }, { "docid": "0857c8e529e0f8dfa65e241d406ee962", "score": "0.6446514", "text": "public function getProvidersWrapper();", "title": "" }, { "docid": "133d9492067d0aa9833691b2c9ae8d50", "score": "0.6420505", "text": "protected function otherServiceProviders()\n {\n $providers = [\n \\Collective\\Html\\HtmlServiceProvider::class,\n \\Intervention\\Image\\ImageServiceProvider::class,\n \\Acacha\\AdminLTETemplateLaravel\\Providers\\AdminLTETemplateServiceProvider::class,\n \\Serff\\Cms\\Core\\Providers\\InstallationServiceProvider::class,\n \\Serff\\Cms\\Core\\Providers\\AdminServiceProvider::class,\n ];\n\n $manifestPath = app()->getCachedServicesPath();\n\n (new ProviderRepository(app(), new Filesystem, $manifestPath))\n ->load($providers);\n }", "title": "" }, { "docid": "997c0b24b931d865df46c4ec003fab54", "score": "0.6420118", "text": "protected function getProviders() {\n\n\t\treturn $this->providers;\n\t}", "title": "" }, { "docid": "bc376f839492f943b2048723086c4e22", "score": "0.6413998", "text": "public function provides()\n {\n return [\n 'sm.callback.factory',\n 'sm.event.dispatcher',\n 'sm.factory',\n Debug::class,\n ];\n }", "title": "" }, { "docid": "91db4aeb653dca04f525cf36df32d049", "score": "0.64002126", "text": "public function get_providers()\n {\n }", "title": "" }, { "docid": "287d43833e242311ac340ad9b4aec07a", "score": "0.6381187", "text": "public function getServiceProvider($provider);", "title": "" }, { "docid": "683c13133ccc8a36ec0900a14c7cc47a", "score": "0.6374174", "text": "public static function getListServices () {\n return self::findByStatus(self::STATUS_ACTIVE);\n }", "title": "" }, { "docid": "d05793b7a0845433a7bc1d3a7d3312f3", "score": "0.6358327", "text": "public function getServiceProvider()\n {\n return $this->service_provider;\n }", "title": "" }, { "docid": "fc153538843830a4b50a7a67205f6d6d", "score": "0.6337894", "text": "public function provides() {\n $providers = array();\n foreach ($this->providers as $key => $value) {\n $providers[] = $key;\n }\n return $providers;\n }", "title": "" }, { "docid": "c8bc5585d0f6384c4af6cb2342f7e86e", "score": "0.6314619", "text": "public function providers()\n {\n return $this->config('providers');\n }", "title": "" }, { "docid": "10e9ce070d037f18413908fc16d3bcc9", "score": "0.63104904", "text": "public function provides()\n {\n return [\n CreateService::class,\n CreateInterface::class,\n CreateProvider::class,\n ];\n }", "title": "" }, { "docid": "84a49b6ee1e0c47330977e0ed9b92050", "score": "0.630771", "text": "public function getProviders($provider)\n {\n }", "title": "" }, { "docid": "e94a94066f3aaca84e9a7a9b8e58bc8e", "score": "0.62985826", "text": "public function setProviders()\n {\n $services = $this->container['services']??null;\n\n if (is_array($services)) {\n foreach ($services as $service) {\n $service::register($this->container);\n $service::boot($this->container);\n }\n }\n }", "title": "" }, { "docid": "da1597cf104ee6f44e48b94cd873dcdb", "score": "0.6268218", "text": "public function getProviders()\n {\n return $this->providers;\n }", "title": "" }, { "docid": "da1597cf104ee6f44e48b94cd873dcdb", "score": "0.6268218", "text": "public function getProviders()\n {\n return $this->providers;\n }", "title": "" }, { "docid": "da1597cf104ee6f44e48b94cd873dcdb", "score": "0.6268218", "text": "public function getProviders()\n {\n return $this->providers;\n }", "title": "" }, { "docid": "3776fb843eee8e194f2fad203756b6b4", "score": "0.6259751", "text": "public static function getSubscribedServices()\n {\n return array_merge(parent::getSubscribedServices(), [\n 'my.entity.manager' => '?'.EntityManager::class,\n ]);\n }", "title": "" }, { "docid": "4db77f516660a4ec95a848bd17fd8042", "score": "0.625966", "text": "protected function getExpensesServices()\n\t{\n\t\treturn $this->expensesServices = new ExpensesServices();\n\t}", "title": "" }, { "docid": "3e49c6644a32c74415b1c69556fd0a25", "score": "0.6256871", "text": "public function services($ignore_cache = false) {\n if ($this->services === null || $ignore_cache) {\n $this->services = StatusBoard_Service::allForSite($this);\n }\n \n return $this->services;\n }", "title": "" }, { "docid": "c01eb1b81b3f3d836e672c0f78d3f868", "score": "0.6256314", "text": "public function getProviders(): array\n {\n return $this->providers;\n }", "title": "" }, { "docid": "c01eb1b81b3f3d836e672c0f78d3f868", "score": "0.6256314", "text": "public function getProviders(): array\n {\n return $this->providers;\n }", "title": "" }, { "docid": "c01eb1b81b3f3d836e672c0f78d3f868", "score": "0.6256314", "text": "public function getProviders(): array\n {\n return $this->providers;\n }", "title": "" }, { "docid": "3e565e284220ba3e32bbd6073be17c69", "score": "0.62446046", "text": "public function get_service() {\n\n\t\treturn $this->provider_instance;\n\t}", "title": "" }, { "docid": "e47c11a77efb5f2f738a037be5157203", "score": "0.62384015", "text": "public function provides()\n {\n return [\n 'dubbo_cli',\n 'dubbo_cli.factory',\n ];\n }", "title": "" }, { "docid": "7785e3a1b2607365a3eb531d31410d87", "score": "0.6214438", "text": "public function getAll(){\n return $this->providers;\n }", "title": "" }, { "docid": "0b2d82ad2b9b53621bef4364f869ecb0", "score": "0.6199716", "text": "public function provides()\n {\n return [AppleSubscriptionService::class, GoogleSubscriptionService::class];\n }", "title": "" }, { "docid": "23de439c0c33af192bad35fa4d6dc3bc", "score": "0.61750376", "text": "public function getServiceCheckProviders(): array\n {\n return $this->serviceCheckProviders;\n }", "title": "" }, { "docid": "ca3cfcd7a4a2e2125cb3db3ef64660dd", "score": "0.6169438", "text": "public static function getDeferredServices(){\n return \\Illuminate\\Foundation\\Application::getDeferredServices();\n }", "title": "" }, { "docid": "c54556b16497875f8d4624b2f12681f6", "score": "0.6165431", "text": "abstract public function getProviders();", "title": "" }, { "docid": "3f30c54bca1bff6a9b5736b5760cceb4", "score": "0.6164147", "text": "private function providers()\n {\n $this->register(new CorsServiceProvider());\n $this->register(new HmacServiceProvider());\n }", "title": "" }, { "docid": "2ded0d208f489497778e301b6c46573b", "score": "0.6153332", "text": "public function services(){\n\n $facades = Array(\n 'Cache' => 'Disco\\classes\\Cache',\n 'Crypt' => 'Disco\\classes\\Crypt',\n 'Data' => 'Disco\\classes\\Data',\n 'DB' => 'Disco\\classes\\DB',\n 'Email' => 'Disco\\classes\\Email',\n 'Event' => 'Disco\\classes\\Event',\n 'Html' => 'Disco\\classes\\Html',\n 'Form' => 'Disco\\classes\\Form',\n 'Model' => 'Disco\\classes\\ModelFactory',\n 'Queue' => 'Disco\\classes\\Queue',\n 'Session' => 'Disco\\classes\\Session',\n 'Template' => 'Disco\\classes\\Template',\n 'View' => 'Disco\\classes\\View'\n );\n\n foreach($facades as $facade=>$v){\n $this->make($facade,$v);\n }//foreach\n\n $this->as_factory('Router',function(){\n return new \\Disco\\classes\\Router::$base;\n });\n\n }", "title": "" }, { "docid": "2a246196b0750f9a9008d6db8815cc21", "score": "0.61508864", "text": "public function getServiceProvider(): Provider\n {\n return $this->serviceProvider;\n }", "title": "" }, { "docid": "348e55a7d96d239a819c2f32ebcba202", "score": "0.61487633", "text": "public function provides()\n {\n return [\n EventDispatcher::class,\n Repository::class,\n ];\n }", "title": "" }, { "docid": "7f2124cd00d6f3801e559fc3ac2d769f", "score": "0.6145689", "text": "public static function getAllServices()\n {\n $serviceList = DB::table('services')\n ->select('*')\n ->orderBy('id')\n ->get();\n\n return $serviceList;\n }", "title": "" }, { "docid": "34b3ff3de7a862b07f31dfc69fa29fd3", "score": "0.61375654", "text": "public function getProviders($provider)\n {\n $name = is_string($provider) ? $provider : get_class($provider);\n return Arr::where($this->serviceProviders, function ($value) use ($name) {\n return $value instanceof $name;\n });\n }", "title": "" }, { "docid": "400d48cebb1bfa9d41bb17f83603963e", "score": "0.612863", "text": "public function retrieveServices()\n {\n $groups = Group::all();\n $services = Service::all();\n\n return response()->json([\n \"grupos\" => $groups,\n \"servicios\"=> $services\n ]);\n }", "title": "" }, { "docid": "6c01f682eb5a8f9f1b1243514b6207db", "score": "0.61260927", "text": "public function provides()\n {\n return [\n Factory::class,\n 'flipbox.sdk',\n ];\n }", "title": "" }, { "docid": "c21cec397b724cc40445746b156df3c2", "score": "0.6121859", "text": "public function findAll()\n {\n return Provider::all();\n }", "title": "" }, { "docid": "806acb10de3d44aa44167e49b574cce0", "score": "0.612107", "text": "public function provides()\n {\n dd(config('services.weather.ak'));\n return [Weather::class, 'weather'];\n }", "title": "" }, { "docid": "0bfb88739be475121973177183017d23", "score": "0.60986894", "text": "public function provides()\n {\n return [\n ZhyuAuthServiceProvider::class,\n ];\n }", "title": "" }, { "docid": "e730afd74e5b46503ab95f30b9d51004", "score": "0.60873073", "text": "public function getServices()\r\n\t{\r\n\t\t$services = $this->_listServices($this->servicePath);\r\n\t\tksort($services);\r\n\t\t$out = array();\r\n\t\tforeach($services as $val) {\r\n\t\t\t$out[] = array('label' => $val, 'data' => '');\r\n\t\t}\r\n\t\treturn $out;\r\n\t}", "title": "" }, { "docid": "fa0751500a4487ef6e4e0e82b377999f", "score": "0.6081113", "text": "public function services_get(){\n\t\ttry {\n\t\t\t$services = $this->IM->getAll('services', array(\n\t\t\t\t'institution_id' => $this->input->get('institution_id'),\n\t\t\t));\n\t\t\t\n\t\t\t$this->response(array(\n\t\t\t\t'status' => 'TRUE',\n\t\t\t\t'labs' => ($this->input->get('json'))?json_encode($services):$services,\n\t\t\t));\n\t\t}catch(Exception $e){\n\t\t\t$this->response(array(\n\t\t\t\t'status' => 'FALSE',\n\t\t\t\t'message' => $e->getMessage(),\n\t\t\t));\n\t\t}\n\t}", "title": "" }, { "docid": "59a6aeb58fc4f965d0bb686cdb1960ad", "score": "0.6050165", "text": "public function provides()\n {\n return ['vk_service'];\n }", "title": "" }, { "docid": "18c25c5f0383165a923cd83577ee4aa4", "score": "0.6049583", "text": "public function provides() {\n\t\treturn array();\n\t}", "title": "" }, { "docid": "a93f2b0034626f844324503cf57f5ddd", "score": "0.6038841", "text": "public function provides()\n {\n return [\n FriendsRepositoryContract::class,\n ServerRepositoryContract::class,\n ChatroomRepositoryContract::class,\n ForumThreadsRepositoryContract::class,\n ForumPostsRepositoryContract::class,\n ];\n }", "title": "" }, { "docid": "800ca042cf0231e190cfc8a849ccb40f", "score": "0.60326916", "text": "protected function services()\n {\n if ($this->servicesDb === null)\n $this->servicesDb = new ServiceModel($this->db);\n return $this->servicesDb;\n }", "title": "" }, { "docid": "a5de448b9538100ce3291ba40a7009fa", "score": "0.59993094", "text": "public function provides()\n {\n return array();\n }", "title": "" }, { "docid": "a5de448b9538100ce3291ba40a7009fa", "score": "0.59993094", "text": "public function provides()\n {\n return array();\n }", "title": "" }, { "docid": "a5de448b9538100ce3291ba40a7009fa", "score": "0.59993094", "text": "public function provides()\n {\n return array();\n }", "title": "" } ]
8d3d2a685e7ec05805ebf08e16b4e7d3
TODO: Implement generateInt() method.
[ { "docid": "49727389dcc5f0a2ab2a6e03f620c672", "score": "0.69522893", "text": "public function generateInt(TypeInt $type, $value = null) {\n }", "title": "" } ]
[ { "docid": "f9bed7a7db259a0ba111621305ac57be", "score": "0.7347873", "text": "public function generate(): int\n {\n return random_int(0, 9999);\n }", "title": "" }, { "docid": "5ab6999ad5bede0f74cbced5d5cdb496", "score": "0.71464735", "text": "public function getRandomInt();", "title": "" }, { "docid": "c9247377a275aceda7d19a9c7de694fb", "score": "0.713374", "text": "public static function generateRandomInteger()\n {\n return (int) hexdec(bin2hex(Random::string(4))) & Optimus::MAX_INT;\n }", "title": "" }, { "docid": "7c7e56083d739a4eb48724b78f380fa6", "score": "0.69761765", "text": "private function getRandomIntMark() {\n\n $resultantInteger = -100;\n do {\n $bytes = openssl_random_pseudo_bytes(1, $cstrong);\n $hex = bin2hex($bytes);\n $resultantInteger = hexdec($hex);\n } \n while ( ($resultantInteger < 0) || ($resultantInteger > 100) );\n\n if (DEBUG) {\n echo \"<pre>\";\n echo \"int value from hex value: $resultantInteger\";\n echo \"</pre>\";\n }\n\n return $resultantInteger;\n\n }", "title": "" }, { "docid": "0f17e623357862ff517cb9fca9258b37", "score": "0.6915613", "text": "public function testGeneratingRandomIntegerByDefaults()\n {\n $generator = new Generator();\n $this->assertInternalType('int', $generator->generate());\n }", "title": "" }, { "docid": "7fceee1640630a4b110f6b7c10fd706d", "score": "0.6899336", "text": "abstract public function intValue();", "title": "" }, { "docid": "c4c080e40a27cc66a38a60331d93dd98", "score": "0.6749866", "text": "public abstract function intValue();", "title": "" }, { "docid": "6ac4aba3db54624837933b3f24f31244", "score": "0.6746435", "text": "private function generateSeedInteger(): int\n {\n return hexdec(substr(hash_hmac('sha256', $this->getServerSeed(), $this->getClientSeed()), -8, 8));\n }", "title": "" }, { "docid": "1d187055b9b7f53979118555bd1d99ce", "score": "0.6705822", "text": "public function randomInt()\n {\n return mt_rand();\n }", "title": "" }, { "docid": "5529fe65983250d58e8fe7518c524605", "score": "0.6654954", "text": "public function testGeneratingRandomIntegerByPhpDefault()\n {\n $generator = new Generator(Generator::MODE_PHP_DEFAULT);\n $this->assertInternalType('int', $generator->generate());\n }", "title": "" }, { "docid": "9d9dcb587bbe44d669d39097f47de784", "score": "0.662227", "text": "function CriaCodigo() { //Gera numero aleatorio\r\n for ($i = 0; $i < 40; $i++) {\r\n $tempid = strtoupper(uniqid(rand(), true));\r\n $finalid = substr($tempid, -12);\r\n return $finalid;\r\n }\r\n }", "title": "" }, { "docid": "fe1d0dc6b06f1230f42d88d4f3ac43f1", "score": "0.65751827", "text": "function CriaCodigo() { //Gera numero aleatorio\n for ($i = 0; $i < 40; $i++) {\n $tempid = strtoupper(uniqid(rand(), true));\n $finalid = substr($tempid, -12);\n return $finalid;\n }\n }", "title": "" }, { "docid": "63253fbccac6b1bef6a4d69e24dfb13d", "score": "0.657234", "text": "public function testGeneratingIntegerSeed()\n {\n $generator = new Generator();\n $seed = $generator->generateSeed();\n\n $this->assertInternalType('int', $seed);\n }", "title": "" }, { "docid": "a2e8191eb2883163604138bccf9efa11", "score": "0.6538099", "text": "function rand() {\n $int = -1;\n // since unpack appears to not make sense\n while ($int < 0 || $int > self::RAND_MAX) {\n $ary = unpack(\"Lint\", $this->bytes(4));\n $int = $ary['int'];\n }\n return $int;\n }", "title": "" }, { "docid": "d9a09270b5918625a26ef951c508ea09", "score": "0.6503382", "text": "function generateNumber()\n{\n return bin2hex(random_bytes(10));\n}", "title": "" }, { "docid": "01e635e10ec735d95d21ab5afe38d5f0", "score": "0.6495208", "text": "public static function generateRandomInt() {\n srand();\n $characters = '0123456789';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < 9; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n }", "title": "" }, { "docid": "7f8b5565b79805635210b5461bbf381d", "score": "0.64897895", "text": "public function idGen()\n\t{\n\t\t$result = $this->_getLastID()->id;\n\t\tif($result < 0)\n\t\t{\n\t\t\t$id = 'IP0001';\n\t\t\treturn $id;\n\t\t}\n\t\telseif($result > 0 && $result < 9)\n\t\t{\n\t\t\t$id = $result+1;\n\t\t\treturn 'IP000'.$id;\n\t\t}\n\t\telseif($result > 8 && $result < 99)\n\t\t{\n\t\t\t$id = $result+1;\n\t\t\treturn 'IP00'.$id;\n\t\t}\n\t\telseif($result > 98 && $result < 999)\n\t\t{\n\t\t\t$id = $result+1;\n\t\t\treturn 'IP0'.$id;\n\t\t}\n\t\telseif ($result > 998 && $result < 9999) {\n\t\t\t$id = $result+1;\n\t\t\treturn 'IP'.$id;\n\t\t}\n\t}", "title": "" }, { "docid": "446fcc702758ac7d7a50bc5e13518fae", "score": "0.6480341", "text": "private function gerarNum()\n {\n $numConta = rand(1000, 9999);\n return $numConta;\n }", "title": "" }, { "docid": "d269101f5c0145964693e1d6fd68dac7", "score": "0.6465372", "text": "function genId()\n\t{\n\t\t$this->flyId++;\n\t\t$this->recId = $this->flyId;\n\t\treturn $this->flyId;\n\t}", "title": "" }, { "docid": "d269101f5c0145964693e1d6fd68dac7", "score": "0.6465372", "text": "function genId()\n\t{\n\t\t$this->flyId++;\n\t\t$this->recId = $this->flyId;\n\t\treturn $this->flyId;\n\t}", "title": "" }, { "docid": "5bb37350cf12b3b62386f02488a92336", "score": "0.64232975", "text": "public function getRand()\n {\n return static::generateRandomInteger();\n }", "title": "" }, { "docid": "208b348ad037ad9548459308875ff954", "score": "0.6392493", "text": "private function _genRandomNumber() {\n\t\treturn substr(md5(rand(100, 999)), 4, 8);\n\t}", "title": "" }, { "docid": "556f33271b9ab0583454865d9363896a", "score": "0.6371641", "text": "public function generatedCode()\n {\n return mt_rand(1000,9999);\n }", "title": "" }, { "docid": "09ea1b1b1e32adfa9b9794a8b6bd069a", "score": "0.63429874", "text": "public function generate();", "title": "" }, { "docid": "09ea1b1b1e32adfa9b9794a8b6bd069a", "score": "0.63429874", "text": "public function generate();", "title": "" }, { "docid": "09ea1b1b1e32adfa9b9794a8b6bd069a", "score": "0.63429874", "text": "public function generate();", "title": "" }, { "docid": "09ea1b1b1e32adfa9b9794a8b6bd069a", "score": "0.63429874", "text": "public function generate();", "title": "" }, { "docid": "09ea1b1b1e32adfa9b9794a8b6bd069a", "score": "0.63429874", "text": "public function generate();", "title": "" }, { "docid": "09ea1b1b1e32adfa9b9794a8b6bd069a", "score": "0.63429874", "text": "public function generate();", "title": "" }, { "docid": "09ea1b1b1e32adfa9b9794a8b6bd069a", "score": "0.63429874", "text": "public function generate();", "title": "" }, { "docid": "09ea1b1b1e32adfa9b9794a8b6bd069a", "score": "0.63429874", "text": "public function generate();", "title": "" }, { "docid": "09ea1b1b1e32adfa9b9794a8b6bd069a", "score": "0.63429874", "text": "public function generate();", "title": "" }, { "docid": "09ea1b1b1e32adfa9b9794a8b6bd069a", "score": "0.63429874", "text": "public function generate();", "title": "" }, { "docid": "f07a707b690865d5ff70b7c21e001b09", "score": "0.6332871", "text": "private function generateUserId(): int\n {\n return random_int(1, self::maxUsers);\n }", "title": "" }, { "docid": "9414cefc88502741a57383e7dca84dd6", "score": "0.63294685", "text": "public function testGeneratingRandomIntegerByPhpMersenneTwister()\n {\n $generator = new Generator(Generator::MODE_PHP_MERSENNE_TWISTER);\n $this->assertInternalType('int', $generator->generate());\n }", "title": "" }, { "docid": "d299a30d80c99e7283c19787283ddf95", "score": "0.6325173", "text": "public function generate(int $max): int;", "title": "" }, { "docid": "66c12192cca827a8f0e6331c3fa67650", "score": "0.6312836", "text": "private function createNumber(): int\n {\n return intval(\n sprintf('%s01', date('Ymd'))\n );\n }", "title": "" }, { "docid": "c26d8057542b3ffe28f242620e5fc519", "score": "0.62949413", "text": "abstract public function generate();", "title": "" }, { "docid": "c26d8057542b3ffe28f242620e5fc519", "score": "0.62949413", "text": "abstract public function generate();", "title": "" }, { "docid": "c26d8057542b3ffe28f242620e5fc519", "score": "0.62949413", "text": "abstract public function generate();", "title": "" }, { "docid": "c26d8057542b3ffe28f242620e5fc519", "score": "0.62949413", "text": "abstract public function generate();", "title": "" }, { "docid": "c26d8057542b3ffe28f242620e5fc519", "score": "0.62949413", "text": "abstract public function generate();", "title": "" }, { "docid": "c783d121bccd9fe59a1c21461a61519c", "score": "0.62947094", "text": "public function generate() {}", "title": "" }, { "docid": "c783d121bccd9fe59a1c21461a61519c", "score": "0.62947094", "text": "public function generate() {}", "title": "" }, { "docid": "c783d121bccd9fe59a1c21461a61519c", "score": "0.62947094", "text": "public function generate() {}", "title": "" }, { "docid": "c783d121bccd9fe59a1c21461a61519c", "score": "0.62947094", "text": "public function generate() {}", "title": "" }, { "docid": "b09feb83569d2f7caef46544e69071b8", "score": "0.6284224", "text": "protected function _generateId()\n {\n return strval(new Horde_Support_Randomid());\n }", "title": "" }, { "docid": "a4f368a799871c31fb3ff5769d5c0f8b", "score": "0.6282657", "text": "public static function Numeric()\n {\n $length=10;\n $chars = \"1234567890\";\n $clen = strlen( $chars )-1;\n $id = '';\n\n for ($i = 0; $i < $length; $i++) {\n $id .= $chars[mt_rand(0,$clen)];\n }\n return ($id);\n }", "title": "" }, { "docid": "8b464f7a55c89f1cff19ceeaaf724748", "score": "0.62611747", "text": "protected function _constructInt($int) { }", "title": "" }, { "docid": "97a166b1cee5143cfb617e205eede4c0", "score": "0.62518966", "text": "function Gen() {\n\t$res = rand(0, 1400);\t\n\tif ($res >= 0 && $res < 100) { $n = 0; }\n\telseif ($res >= 100 && $res < 200) { $n = 1; }\n\telseif ($res >= 200 && $res < 300) { $n = 2; }\n\telseif ($res >= 300 && $res < 400) { $n = 3; }\n\telseif ($res >= 400 && $res < 500) { $n = 4; }\n\telseif ($res >= 500 && $res < 600) { $n = 5; }\n\telseif ($res >= 600 && $res < 700) { $n = 6; }\n\telseif ($res >= 700 && $res < 800) { $n = 7; }\n\telseif ($res >= 800 && $res < 900) { $n = 8; }\n\telseif ($res >= 900 && $res < 1000) { $n = 9; }\n\telseif ($res >= 1000 && $res < 1100) { $n = 10; }\n\telseif ($res >= 1100) { $n = 11; }\n\treturn $n;\n}", "title": "" }, { "docid": "69ff408a4bdeac316d16f38c9fa975aa", "score": "0.6249028", "text": "function generate();", "title": "" }, { "docid": "32d7a3f3f34c4b46a3c468faa353ef48", "score": "0.62272286", "text": "public static function generateLuck(): int {\n return rand(1, 100);\n }", "title": "" }, { "docid": "544e0b5bcdf66d29c2cbd25822b41e3c", "score": "0.62238663", "text": "abstract protected function generate();", "title": "" }, { "docid": "ee16b40f61dc1d1d047cc3b32ddf1982", "score": "0.62161684", "text": "public static function generate();", "title": "" }, { "docid": "6213247af34efeb50145a2c00dcae90b", "score": "0.62128097", "text": "static function getNumber() {\n $pre = rand(1000,150000);\n return pow(10, strlen($pre)-1);\n }", "title": "" }, { "docid": "9e4cf82a597f2f59f56bcb5e335dbe67", "score": "0.62004924", "text": "abstract public static function generate();", "title": "" }, { "docid": "305e28a7b4e418eee8d664a56177438d", "score": "0.6192728", "text": "function e_rand(){\n return random_int(0, 8000);\n}", "title": "" }, { "docid": "ecc1a9b81d49f74bc592b080c36f84bc", "score": "0.61893076", "text": "function get_int(): int {\n // chess square in a list.\n return (int)($this->rank . $this->file);\n }", "title": "" }, { "docid": "4cedd9172c3e3fa9108093639d9c0393", "score": "0.61740994", "text": "function writeInt(){\r\n\t\tdie('Not implemented');\r\n\t}", "title": "" }, { "docid": "0419ea41df46e701dd74ba4f10fa1ca3", "score": "0.61282474", "text": "static private function _generateUniqueCode($int)\n\t{\n\t\t$id = (string)$int;\n\t\t$bind = array('3', '4', '7', '9', 'V', 'W', 'X', 'Y',);\n\t\t$coded = '';\n\t\tforeach (str_split(decoct($id)) as $char) {\n\t\t\t$coded .= $bind[$char];\n\t\t}\n\n\t\treturn substr(\n\t\t\tstr_shuffle(str_repeat(\"ACEFHJKLMNPRTU\", 5)),\n\t\t\t0,\n\t\t\t7 - strlen($coded)\n\t\t) . $coded;\n\t}", "title": "" }, { "docid": "929d11403904c49e142ee1d4b83811ae", "score": "0.61281127", "text": "function generaNumeroOrdenUnico() { \n $codigo = uniqid('INTER_');\n return $codigo; \n }", "title": "" }, { "docid": "7661075d9c8302a2187818af69f6d364", "score": "0.6123227", "text": "static public function generate() {\n\n $id = uniqid();\n \n $id = base_convert($id, 16, 2);\n $id = str_pad($id, strlen($id) + (8 - (strlen($id) % 8)), '0', STR_PAD_LEFT);\n \n $chunks = str_split($id, 8);\n //$mask = (int) base_convert(IDGenerator::BIT_MASK, 2, 10);\n \n $id = array();\n foreach ($chunks as $key => $chunk) {\n //$chunk = str_pad(base_convert(base_convert($chunk, 2, 10) ^ $mask, 10, 2), 8, '0', STR_PAD_LEFT);\n if ($key & 1) { // odd\n array_unshift($id, $chunk);\n } else { // even\n array_push($id, $chunk);\n }\n }\n\n return base_convert(implode($id), 2, 36);\n }", "title": "" }, { "docid": "ce7edd063ecb09a9db8044374bd60dee", "score": "0.61189914", "text": "protected function idGenerator()\n {\n return $this->prefix . ++$this->internalIdCounter;\n }", "title": "" }, { "docid": "4fb8c20614d91a8a567264a0d11d9977", "score": "0.61187625", "text": "public function toInt(): int;", "title": "" }, { "docid": "9dc6532ccd0df76bb5b640f7027367d2", "score": "0.61128086", "text": "abstract public function generateId() : string;", "title": "" }, { "docid": "4bdfd7c1b160181e2ed7a734fbd7bddb", "score": "0.610699", "text": "protected function fetchDCRoll(): int {\n return rand(1, 1000);\n }", "title": "" }, { "docid": "4908b4e73545fcd8823239a1fc32cf4b", "score": "0.6082341", "text": "public function sequence() \n {\n return mt_rand(1, 1048576);\n }", "title": "" }, { "docid": "5ee6adbbeb10425311f6553430ed3185", "score": "0.6074433", "text": "public function testRawInt()\n {\n $uuid = $this->_generateRandomUuid(UUID_Rfc4122Uuid::VERSION_RANDOM);\n \n $this->assertTrue($uuid->toInt() instanceof Math_BigInteger);\n \n $max = new Math_BigInteger(str_repeat('1', $uuid->getIntSize()), 2);\n \n $this->assertTrue($uuid->toInt()->compare($max) <= 0);\n }", "title": "" }, { "docid": "8f568db4986cff7ef081654ca32f888e", "score": "0.6071024", "text": "private function genId()\n\t{\n\t\treturn oxUtilsObject::getInstance()->generateUId();\n\t}", "title": "" }, { "docid": "32f9bb686b562f8fc9391f1f1e857dad", "score": "0.60541826", "text": "public function convertToUserIntObject() {}", "title": "" }, { "docid": "24bb5e5942bc68f0ab865346360e0b77", "score": "0.6048838", "text": "public function generateId(): int\n {\n return ++$this->id;\n }", "title": "" }, { "docid": "2fe886eb6fb9fa16fcec54e4acc4a159", "score": "0.60354483", "text": "function generate_otp_code()\n\t{\n\t\t$code=sprintf('%010d', mt_rand(1,mt_getrandmax()));\n\t\treturn $code;\n\t}", "title": "" }, { "docid": "ae151c7113cfe9b52935c6fdf8fd6886", "score": "0.6027598", "text": "public abstract function generate();", "title": "" }, { "docid": "1857456c81087a31b794a2ca7d9bb0e6", "score": "0.6027147", "text": "public function testGeneratingRandomIntegerByOpenSsl()\n {\n $generator = new Generator(Generator::MODE_OPEN_SSL);\n $this->assertInternalType('int', $generator->generate());\n }", "title": "" }, { "docid": "881c68958b4a71505d5b81ee0dc2c833", "score": "0.6004664", "text": "public static function generateRandomNumber()\n\t{\n\t\treturn mt_rand(100000,999999);\n\t}", "title": "" }, { "docid": "becebea9566ead20fd7c6da4bcacc17b", "score": "0.59981716", "text": "function unique_code_transaction()\n{\n\treturn random_int(1000000000,9999999999);\n}", "title": "" }, { "docid": "7fcd40a7cabb1c23c734116c513b0670", "score": "0.5991004", "text": "public function generateCodes() {}", "title": "" }, { "docid": "bd252023dabe0576caa0a53420c6d015", "score": "0.5977256", "text": "function generateInvoiceNumber($inv_len = 7)\r\n{\r\n $max_inv_id = \\App\\Invoice::max('id');\r\n if (empty($max_inv_id))\r\n $max_inv_id = 1;\r\n return $dbValue = str_pad($max_inv_id, $inv_len, \"0\", STR_PAD_LEFT);\r\n}", "title": "" }, { "docid": "9ce8c10972aa1a249df424da66d83e94", "score": "0.596187", "text": "function getSumatoria(){\n\t// se genera el numero aleatorio\n\t$aleatorio = rand(1, 20);\n\t$sumatoria = 0;\n\t//loop para sumar desde 1 hasta aleatorio\n\tfor ($i=1; $i <= $aleatorio ; $i++) { \n\t\t$sumatoria = $i + $sumatoria;\n\t}\n\n\techo $aleatorio . \"<br/>Sumatoria: \" . $sumatoria;\n}", "title": "" }, { "docid": "a56d19c0e79106ccb13e75ec56ac02ea", "score": "0.59535795", "text": "public function generate()\n {\n return $this->_itemCode + $this->_itemBinding + $this->_itemGrade * self::ITEM_GRADE_CONSTANT;\n }", "title": "" }, { "docid": "dc6b2de282526f9ffc8de1e3ac0e901c", "score": "0.5948399", "text": "function generate_new_transaction_number(){\n\t\t$ref_number = \"\";\n\t\t$source = array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F');\n\t\tfor($i=0 ; $i<6 ; $i++){\n\t\t\t$index = rand(0,15); //generates a random number given the range.\n\t\t\t$ref_number .= $source[$index]; //concatenate/append a random character from the source array\n\t\t}\n\t\t$today = getdate(); //Seconds since Unix Epoch\n\t\treturn $ref_number . \"-\" . $today[0];\n\t}", "title": "" }, { "docid": "b149b5c2c6f68c87c224c2b3659aec29", "score": "0.59414333", "text": "function generate() {\n\t}", "title": "" }, { "docid": "9970631329d3bf4003bc3c5b12506ba1", "score": "0.59374446", "text": "private function generateOrderNumber(){\n $largest_order_number = (int)Order::max('number');\n return (1000 > $largest_order_number) ? 1001 : ++$largest_order_number;\n }", "title": "" }, { "docid": "b9f0504a4bd06c50fba6117caca17636", "score": "0.5930816", "text": "function generate_newid()\n\t\t\t\t {\n\t\t\t\t \n\t\t\t\t\t$query=\"SELECT count(*) as number_of_customers FROM customer\";\n\t\t\t\t\t$result=mysql_query($query);\n\t\t\t\t\t$result=mysql_fetch_array($result);\n\t\t\t\t\t$num=$result['number_of_customers'];\n\t\t\t\t\t$customerid=$num+1;\n\t\t\t\t return $customerid;\t\n\t\t\t\t\t}", "title": "" }, { "docid": "956d2a06ce5db641d9a9e825238a2f52", "score": "0.5926674", "text": "function generate_code( $digits_needed=8 ){\n\t$random_number=''; // set up a blank string\n\t$count=0;\n\twhile ( $count < $digits_needed ) {\n\t\t$random_digit = mt_rand(0, 9);\n\t\t$random_number .= $random_digit;\n\t\t$count++;\n\t}\n\treturn $random_number;\n}", "title": "" }, { "docid": "242b39fe83a81382c4670d46d1407d18", "score": "0.59223694", "text": "protected static function generateHashId()\n {\n $min = 0;\n $max = 999999999;\n return rand($min, $max);\n }", "title": "" }, { "docid": "112ade793d66a017a1fee13efeb34cb8", "score": "0.59172976", "text": "function aleatorio($min,$max){\n$numero=rand($min,$max);\n//Devolvemos el numero que nos ha dado el rand.\nreturn $numero;\n}", "title": "" }, { "docid": "f7b53ff30557e6f39f946c179d5a24fc", "score": "0.5914305", "text": "protected function regenerateID()\n {\n return Str::random(32);\n }", "title": "" }, { "docid": "adbe121b7126a73e7a47639ff4af45ad", "score": "0.5913827", "text": "public function getSequence() : int;", "title": "" }, { "docid": "c967c94a669a34a62768f463c5579494", "score": "0.5906179", "text": "function getNumber(){\n\t\t$input = getArray();\n\t\t$rand_keys = array_rand($input, 2);\n\t\techo $input[$rand_keys[0]] . \"\\n\";\n\t\treturn $rand_keys[0];\n\t}", "title": "" }, { "docid": "28abcceb48824b6ba8b91af50628a9b2", "score": "0.5903923", "text": "public function getSequence(): int;", "title": "" }, { "docid": "bd453ab97eb046d354a7112bebf31ab7", "score": "0.5896144", "text": "public function testGenerateNumber()\n {\n for ($i = 0; $i < 100; ++$i) {\n $result = Generator::generate('-', $words = 2, $number = 4);\n $this->assertRegExp(\n '/([a-z]+)-([a-z]+)-(\\d{4})/',\n $result\n );\n $resultSet = explode('-', $result);\n $this->assertEquals(3, sizeof($resultSet));\n }\n }", "title": "" }, { "docid": "3df336e0f571bc2ed2b0d3adf2cba076", "score": "0.58761764", "text": "public function generateUniqueNumber()\n {\n return strtoupper(str_replace(\".\", \"\", uniqid(rand(), 1)));\n }", "title": "" }, { "docid": "cd9e130ed536ce63fd24560ba1526c88", "score": "0.58708316", "text": "private function randNumbers()\n {\n return str_pad(rand(0, 999), 3, '0');\n }", "title": "" }, { "docid": "0fe87c5f6cb4e45f2566ead72bbf10f5", "score": "0.5869694", "text": "static function anInt($dataType, $field, PHPUnit_Fixture $obj) {\n if ('integer' === $dataType) {\n if ('id' !== $field) {\n $obj->setResult($field, rand());\n } else {\n \t$obj->setResult($field, NULL);\n }\n }\n }", "title": "" }, { "docid": "ad0b966dbddb7bceb768285346498bdb", "score": "0.5866425", "text": "function _random_number() {\n $number_arr = array(\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\");\n $i = rand(0, 9);\n return $number_arr[$i];\n }", "title": "" }, { "docid": "5612f9cf6aafa90a203614453d3a0296", "score": "0.58647037", "text": "public function fromInt(int $int);", "title": "" }, { "docid": "3f13cc0fc18ee84f95a7bf6823bf75aa", "score": "0.5859879", "text": "public function generateNumbers()\n {\n $a = mt_rand(0,9);\n $b = mt_rand(0,9);\n \n return array('a' => $a, 'b' => $b);\n }", "title": "" }, { "docid": "bb32d093f0c551ebbac52365e68dd272", "score": "0.5852488", "text": "public function randomInt(int $min, int $max): int;", "title": "" }, { "docid": "6b3307d192b48da4d2f3285a7c5b7ce1", "score": "0.5852212", "text": "function genNewRatingId() {\n global $db;\n \n $statement = $db->prepare(\"SELECT * FROM `ratings` WHERE 1 = 1;\");\n \n if ($statement->execute()) {\n $max = -1;\n \n while ($row = $statement->fetch()) {\n if ($max < hexdec($row['id'])) {\n $max = hexdec($row['id']);\n }\n }\n \n $max++;\n return dechex($max);\n } else {\n return false;\n }\n }", "title": "" } ]
8ef242df6ad03ea33f54ee76ecc344c0
Bootstrap any application services.
[ { "docid": "df619be5fb9f31cab55ac87bcd6e726f", "score": "0.0", "text": "public function boot()\n {\n $pengguna = array(\n 1 => 'Administrator',\n 2 => 'Petugas Yuridis',\n 3 => 'Petugas Pengukuran',\n 4 => 'Petugas Desa',\n );\n\n $jabatan = array(\n 1 => 'Ketua Panitia Ajudikasi',\n 2 => 'Wakil Ketua Bidang Fisik',\n 3 => 'Wakil Ketua Bidang Yuridis',\n 4 => 'Sekretaris',\n 5 => 'Anggota Panitia Ajudikasi (I)',\n 6 => 'Anggota Panitia Ajudikasi (II)',\n 7 => 'Anggota Panitia Ajudikasi (III)',\n 8 => 'Anggota Panitia Ajudikasi (IVI)',\n );\n\n $dokumen = array(\n 1 => 'Pemohon',\n 2 => 'Bukti Alas Hak Tanah',\n 3 => 'Persil',\n 4 => 'Risalah',\n );\n\n $jenis_pemohon = array(\n 1 => 'Perorangan',\n 2 => 'Badan Hukum',\n 3 => 'Pemerintah Kabupaten',\n 4 => 'Pemerintah Desa',\n 5 => 'BUMN',\n );\n\n View::share('pengguna', $pengguna);\n View::share('jabatan', $jabatan);\n View::share('dokumen', $dokumen);\n View::share('jenis_pemohon', $jenis_pemohon);\n Schema::defaultStringLength(191);\n }", "title": "" } ]
[ { "docid": "78dd65a9617c6a1088e92c764fc19b05", "score": "0.7341217", "text": "public function bootstrap(): void\n {\n if ( ! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n \n $this->app->loadDeferredProviders();\n }", "title": "" }, { "docid": "315d1511ff071aa3d03ea10edc7d4e29", "score": "0.7223426", "text": "public function boot()\n {\n \n $oProviders = $this->getServiceProviders();\n \n foreach($oProviders as $oProvider){\n $this->register($oProvider);\n }\n \n }", "title": "" }, { "docid": "5c020095c1339518c474f06eeafbb4b7", "score": "0.7169242", "text": "public function bootstrap()\n {\n // In the CreatesApplication trait the HTTP application/bootstrappers were initialized.\n // When doing an HTTP test (Ex. `->get`), in order to simulate the request,\n // it will be necessary to \"reload\" the bootstrappers because they have already\n // been initialized in the trait above, hence the removal of the `$this- check >app->hasBeenBootstrapped()`.\n // This is not necessary in production `nginx->php->index.php` as the `index.php` file is correct!\n $this->app->bootstrapWith($this->bootstrappers());\n\n $this->app->register(RouteServiceProvider::class, true);\n }", "title": "" }, { "docid": "17c7f49b01e53b1781c9077dd049b3d4", "score": "0.7143681", "text": "public function boot(): void\n {\n AnzuApp::init(\n appNamespace: $this->appNamespace,\n appSystem: $this->appSystem,\n appVersion: $this->appVersion,\n appReadOnlyMode: $this->appReadOnlyMode,\n projectDir: $this->getProjectDir(),\n appEnv: $this->getEnvironment(),\n userIdAdmin: $this->userIdAdmin,\n userIdConsole: $this->userIdConsole,\n userIdAnonymous: $this->userIdAnonymous,\n contextId: $this->contextId\n );\n\n parent::boot();\n\n $trustedProxies = Request::getTrustedProxies();\n if ($this->loadBalancerIp && $trustedProxies) {\n $trustedProxies[] = $this->loadBalancerIp;\n Request::setTrustedProxies($trustedProxies, Request::getTrustedHeaderSet());\n }\n }", "title": "" }, { "docid": "b5673981b5d0eaf2897499326e8c50bc", "score": "0.714105", "text": "protected function bootServiceProviders()\n {\n $config = $this->get('config');\n\n if (! $config->has('app.providers')) {\n return;\n }\n\n foreach ($config->get('app.providers') as $provider) {\n $this->addServiceProvider($provider);\n }\n }", "title": "" }, { "docid": "b866e2b06f9c0f7b75f1b7e1dfd607d4", "score": "0.71317947", "text": "public function boot()\n {\n $this->loadServiceProviders();\n $this->loadAliases();\n }", "title": "" }, { "docid": "f6a562927bd68d23e634e476b7362afa", "score": "0.7091688", "text": "public function boot()\n {\n $this->_processConfiguration();\n foreach(array_keys($this->_services) as $service)\n {\n $this->_bindService($service);\n }\n\n //Loop over all aliases to make sure the service is registered\n foreach($this->_aliases as $alias => $service)\n {\n $this->getCubex()->bind(\n $alias,\n function (Cubex $cubex) use ($alias, $service)\n {\n //Destroy the alias binding\n $cubex->forgetInstance($alias);\n\n //Force the service to register\n $cubex->make($service);\n\n //Make the service defined binding\n return $cubex->make($alias);\n }\n );\n }\n }", "title": "" }, { "docid": "cc6b3527797869f9bb0e208deefbc555", "score": "0.7082232", "text": "public function bootstrap()\n {\n if (! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n }", "title": "" }, { "docid": "b78992d410becd3fb5a5fc4121d794de", "score": "0.7076101", "text": "public function boot()\n {\n // 如果在后台运行, 启动后台服务\n if (request()->is('admin*')) {\n\n $this->registerEditorService();\n $this->registerAdminService();\n } elseif (request()->is('yxx*')) {\n\n $this->registerEditorService();\n } elseif (request()->is('api*')) {\n\n config(['auth.defaults.guard' => 'api']);\n $this->registerJwtService();\n } elseif ($this->app->runningInConsole()) {\n\n Schema::defaultStringLength(191);\n $this->registerJwtService();\n $this->registerAdminService();\n }\n }", "title": "" }, { "docid": "81a502766e97a0325d6a2f0262ed4377", "score": "0.70463765", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__.'/../config/services.php' => config_path('services.php'),\n ]);\n }\n }", "title": "" }, { "docid": "06371c4e0a9a3dc50f807d8b18a0c5d8", "score": "0.7032425", "text": "public function boot()\n {\n $this->bootMiddlewares();\n $this->bootGuards();\n }", "title": "" }, { "docid": "fd140f0511344d92fcf078c540996441", "score": "0.70194554", "text": "public function bootstrap(): void\n {\n if (!$this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n }", "title": "" }, { "docid": "375e20e4f66429580c26c92cec8d1d5e", "score": "0.7011949", "text": "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "b7b0b33ffad70846d98e0ca1e40d7f01", "score": "0.70042497", "text": "public function boot()\n {\n $this->app->bind(ICalculateService::class, CalculateService::class);\n }", "title": "" }, { "docid": "0489d2ade67681a91b8d75052908a1eb", "score": "0.7003907", "text": "public function boot(): void\n {\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "ec317e55c8e6c50d6fab3d56907c0e01", "score": "0.6984825", "text": "public function boot()\n {\n $this->registerResources();\n $this->registerServiceProviders();\n $this->registerAliases();\n $this->registerModuleRegistry();\n $this->registerCommands();\n $this->registerRoutesAndMiddlewares();\n $this->registerFields();\n $this->registerGeneratorStubs();\n $this->registerLocales();\n $this->registerViewComposers();\n $this->registerValidationRules();\n $this->registerAssets();\n\n $this->app->singleton( SecurityStrategy::class, function()\n {\n return $this->app->make( SessionSecurityService::class );\n } );\n\n $this->loadTranslationsFrom( __DIR__ . '/resources/lang', 'arbory' );\n }", "title": "" }, { "docid": "a10905d61904c9ae15808fdc65d3f7fd", "score": "0.69615155", "text": "public function boot()\n {\n $this->app->bind('zendesk', function () {\n $driver = config('zendesk-laravel.driver', 'api');\n if (is_null($driver) || $driver === 'log') {\n return new NullService($driver === 'log');\n }\n\n return new ZendeskService;\n });\n }", "title": "" }, { "docid": "83b5316864a6849c4a6f57ca2799cfe4", "score": "0.6961223", "text": "public function boot()\n {\n /** template service **/\n $this->app->register('Adtech\\Templates\\TemplatesServiceProvider');\n\n /** register optional **/\n if (($moduleConfigs = Config::get('site.modules'))) {\n foreach ($moduleConfigs as $package => $modules) {\n if ($modules) {\n foreach ($modules as $module) {\n $moduleData = explode('-', $module);\n $moduleNamespace = null;\n foreach ($moduleData as $k => $v) {\n $moduleNamespace .= ucfirst($v);\n }\n $namespace = ucfirst($package) . '\\\\' . $moduleNamespace . '\\\\' . $moduleNamespace . 'ServiceProvider';\n $this->app->register($namespace);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "8ff3a37d8ea964a02d920c45f63bba1e", "score": "0.6955807", "text": "public function boot()\n {\n $this->setupConfig($this->app);\n }", "title": "" }, { "docid": "8ff3a37d8ea964a02d920c45f63bba1e", "score": "0.6955807", "text": "public function boot()\n {\n $this->setupConfig($this->app);\n }", "title": "" }, { "docid": "861867c84f1785c621da70d7d3dc12a4", "score": "0.69522125", "text": "public static function boot()\n {\n static::container()->boot();\n }", "title": "" }, { "docid": "5ef6d8a8ccc4ef06b693bead7f8a6340", "score": "0.69228876", "text": "public function boot()\n\t{\n\t\t$this->setupConfig($this->app);\n\t\t$this->setupMigrations($this->app);\n\t}", "title": "" }, { "docid": "f239ac2a6bbb86a3da6648c8eb71707c", "score": "0.6914684", "text": "public function boot()\n {\n \\add_filter('mimicry_service_array', function ($services) {\n foreach ($services as $service) {\n if ($this->serviceNneeded($service)) {\n $this->neededServices[] = $service;\n }\n }\n\n return $this->neededServices;\n });\n }", "title": "" }, { "docid": "c815a94b9ddf541b8e89dc8e816ef101", "score": "0.6903436", "text": "public function boot()\n {\n $this->registerHelpers();\n\n if ($this->app->runningInConsole()) {\n $this->commands([\n Console\\InitializeCommand::class,\n Console\\InitializeGitHooksCommand::class,\n Console\\AbstractionMakeCommand::class,\n Console\\BusinessMakeCommand::class,\n Console\\BusinessServiceMakeCommand::class,\n Console\\ConsoleMakeCommand::class,\n Console\\ControllerMakeCommand::class,\n Console\\ApiControllerMakeCommand::class,\n Console\\DependencyMakeCommand::class,\n Console\\DomainModelMakeCommand::class,\n Console\\EloquentMakeCommand::class,\n Console\\ExceptionMakeCommand::class,\n Console\\RequestMakeCommand::class,\n Console\\ResourceMakeCommand::class,\n ]);\n }\n }", "title": "" }, { "docid": "97d3778f159e756b5510c753029b5585", "score": "0.6896277", "text": "public function boot()\n {\n $this->app->instance(MessageService::class,\n new MessageService(\n new MessageBaseRepository($this->app)\n )\n );\n }", "title": "" }, { "docid": "9936c6cb2094e72cdc7d4ef00b05de04", "score": "0.68957835", "text": "public function boot()\n {\n \\add_action('mimicry_handle_service', function ($service) {\n if (\\method_exists($service, 'init')) {\n $this->app->call(array($service, 'init'));\n }\n });\n }", "title": "" }, { "docid": "b42f252457a7422d7ae2406eb704f6aa", "score": "0.68862295", "text": "public function boot(): void\n {\n if (in_array($this->app->environment(), ['local', 'testing'], true)) {\n $this->registerProviders();\n $this->registerFacadeAliases();\n }\n }", "title": "" }, { "docid": "cee9f5f46dfbe326e2aea24d4ce90f09", "score": "0.68846315", "text": "public function boot()\n {\n $app = $this->app;\n }", "title": "" }, { "docid": "fc8746b63efc8ba920f2ea2bb1dbfbd5", "score": "0.6861902", "text": "public function boot()\n {\n // Add dirs where to find modules from config\n foreach (config('modules.dirs') as $dir)\n {\n Modules::addDir(base_path($dir));\n }\n\n // Boot installed modules\n foreach (Modules::installed() as $module)\n {\n // Register module service providers\n $providers = $module->getProviders();\n\n if (is_array($providers))\n {\n foreach($providers as $provider)\n {\n $this->app->register($provider);\n }\n }\n\n // Require files (relative to the module route path)\n $files = $module->getFiles();\n\n if (is_array($files))\n {\n foreach ($files as $file)\n {\n require_once $module->getPath() . '/' . $file;\n }\n }\n }\n }", "title": "" }, { "docid": "e4fb87e1b9af3191fceee5ffbc16d4b5", "score": "0.685902", "text": "public function boot()\n {\n (new Environment())->setEnvironment();\n \n if ($this->app->runningInConsole()) {\n $this->commands([\n Console\\Commands\\CiviDbBackup::class,\n Console\\Commands\\CiviMakeDb::class,\n Console\\Commands\\CiviMakeMigration::class,\n Console\\Commands\\CiviMakeModel::class,\n Console\\Commands\\CiviMakeSeeder::class,\n ]);\n }\n }", "title": "" }, { "docid": "6e82a537c65028c3623de6c9e22da5a7", "score": "0.6857054", "text": "public function boot()\n {\n\n if($this->app->runningInConsole()) {\n\n $this->commands([\n\n GenerateBoilerplate::class,\n GenerateSubsystem::class,\n GenerateFormatter::class,\n GenerateService::class,\n GenerateValidator::class,\n GenerateResource::class,\n GenerateVueComponent::class,\n\n ]);\n\n }\n\n }", "title": "" }, { "docid": "a574cdbc989c4d07fe3793c8a8f9720f", "score": "0.6853389", "text": "public function boot()\n {\n // Bring in the routes\n require __DIR__ . '/routes.php';\n require __DIR__ . '/transformers.php';\n }", "title": "" }, { "docid": "7673a2c662ab2c1215d391f2f5c63a61", "score": "0.68512523", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n // Registering package commands.\n $this->commands([\n Commands\\AppInstall::class,\n Commands\\UserCreate::class\n ]);\n }\n }", "title": "" }, { "docid": "58e21145f777cea555afbee8cb108c29", "score": "0.6843697", "text": "public function boot()\n {\n require __DIR__ . '/../../../autoload.php';\n }", "title": "" }, { "docid": "cfc70a05eae36eef39a60d92e25fab9d", "score": "0.6840489", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands($this->commands);\n }\n }", "title": "" }, { "docid": "dad7f82f39587cfc46e8afcc2044068a", "score": "0.6815152", "text": "protected function boot()\n {\n $this->addServiceProvider('Skaffold\\Console\\Filesystem\\FilesystemServiceProvider');\n $this->addServiceProvider('Skaffold\\Console\\Configuration\\ConfigurationServiceProvider');\n }", "title": "" }, { "docid": "b7135fa7ba2ec35ecc1fc8be7e0b9f9b", "score": "0.68118626", "text": "public function boot()\n {\n $this->app->bind(ITokenService::class, TokenService::class);\n $this->app->bind(IUserRegisterService::class, UserRegisterService::class);\n $this->app->bind(INotificationService::class, NotificationService::class);\n }", "title": "" }, { "docid": "cdaf449a8a2e340ae9e0859e85a97cfe", "score": "0.679358", "text": "public function boot()\n {\n $this->loadConsole();\n $this->loadConfig();\n \n $this->publishConfig();\n }", "title": "" }, { "docid": "bf3c82b78f83ccdb1ed66050ba025958", "score": "0.6785484", "text": "public function boot()\n {\n $this->app->singleton('wechatservice', function(){\n return new WechatService();\n }); \n $this->app->singleton('uploadservice', function(){\n return new UploadService();\n });\n }", "title": "" }, { "docid": "4567b8ee01d797792c6937bdfabe71a6", "score": "0.6783953", "text": "public function boot()\n\t{\n\t\tif ($this->booted) return;\n\n\t\t// To boot the application we will simply spin through each service provider\n\t\t// and call the boot method, which will give them a chance to override on\n\t\t// something that was registered by another provider when it registers.\n\t\tforeach ($this->serviceProviders as $provider)\n\t\t{\n\t\t\t$provider->boot();\n\t\t}\n\n\t\t$this->fireAppCallbacks($this->bootingCallbacks);\n\n\t\t// Once the application has booted we will also fire some \"booted\" callbacks\n\t\t// for any listeners that need to do work after this initial booting gets\n\t\t// finished. This is useful when ordering the boot-up processes we run.\n\t\t$this->booted = true;\n\n\t\t$this->fireAppCallbacks($this->bootedCallbacks);\n\t}", "title": "" }, { "docid": "a2cab9b4de0678549699843b74cc55f3", "score": "0.67816013", "text": "public function boot()\n {\n //Load the StationService service into the service container\n $this->app->bind(\\App\\Services\\StationService::class, function($app){\n return new \\App\\Services\\StationServiceImpl();\n });\n }", "title": "" }, { "docid": "f381f5eed4d94b12fab1eb6dff6e2056", "score": "0.6772533", "text": "public function boot()\n {\n $this->registerPublishes();\n $this->overwriteAppConfig();\n }", "title": "" }, { "docid": "4f3d0488acec0584ac0aaa8de26397a1", "score": "0.67656577", "text": "public function boot()\n {\n\t\t$this->app->configure('api');\n\t\t$this->app->register(\\MoeenBasra\\LaravelPassportMongoDB\\PassportServiceProvider::class);\n\n $this->app->singleton(Connection::class, function() {\n return $this->app['db.connection'];\n });\n\n if ($this->app->runningInConsole()) {\n $this->commands([\n Purge::class\n ]);\n }\n\n $this->registerRoutes();\n $this->registerAuthorizationServer();\n\n $this->registerResourceServer();\n }", "title": "" }, { "docid": "7ba4cff9bbecd5e4ee0194013e6c9d29", "score": "0.6765468", "text": "public function boot()\n {\n View::composer('*', AppComposer::class);\n }", "title": "" }, { "docid": "690c80f289cd1d20592e80e3f3155b41", "score": "0.67651725", "text": "public function boot()\n {\n $this->app->bind(ManagesCustomer::class, CustomerManager::class);\n $this->app->bind(ManagesOrders::class, OrderManager::class);\n }", "title": "" }, { "docid": "00201dd2fc59bbb50f061fe0e734941f", "score": "0.67639524", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n CrudCommand::class,\n CrudControllerCommand::class,\n CrudModelCommand::class,\n CrudMigrationCommand::class,\n CrudViewCommand::class,\n CrudLangCommand::class,\n CrudApiCommand::class,\n CrudApiControllerCommand::class,\n InstallRootsCommand::class,\n ]);\n }\n }", "title": "" }, { "docid": "e76a7a7ed9600d9189e8e2df90afc111", "score": "0.67554927", "text": "public function boot()\n {\n $this->bootCommands();\n $this->bootDirectives();\n $this->bootPublishing();\n $this->bootRoutes();\n }", "title": "" }, { "docid": "343cc5bd7c92bf1704d527161b58ae6e", "score": "0.67388827", "text": "public function boot()\n {\n // php artisan vendor:publish --tag=api\n $this->publishes([\n __DIR__ . '/config/api.php' => config_path('api.php'),\n __DIR__ . '/Http/Controllers/stubs/ApiController.stub' => app_path('Http/Controllers/ApiController.php'),\n __DIR__ . '/Policies/stubs/Policy.stub' => app_path('Policies/Policy.php'),\n ], 'api');\n\n if ($this->app->runningInConsole()) {\n $this->commands([\n ApiAllMakeCommand::class,\n ApiControllerMakeCommand::class,\n ApiMakeCommand::class,\n ApiPolicyMakeCommand::class,\n ApiResourceMakeCommand::class,\n ApiRequestMakeCommand::class,\n ApiServiceMakeCommand::class,\n ApiCreatePersonalAccessToken::class,\n ApiMediaCacheClean::class,\n ]);\n }\n\n $this->registerMiddlewareAliases();\n $this->registerPolicies();\n $this->registerRouterMacro();\n }", "title": "" }, { "docid": "562ddee785376ca64fc35a84b2a72736", "score": "0.6738323", "text": "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__.'/../config/config.php' => config_path('insular.php'),\n ], 'config');\n\n // Registering package commands.\n $this->commands([\n GenerateModuleCommand::class,\n GenerateOperationCommand::class,\n GenerateControllerCommand::class,\n GenerateMigrationCommand::class,\n GenerateModelCommand::class,\n GenerateTypeCommand::class,\n GenerateResourceCommand::class,\n GenerateRequestCommand::class,\n GenerateFeatureCommand::class,\n GenerateJobCommand::class,\n GenerateExceptionCommand::class,\n ]);\n }\n }", "title": "" }, { "docid": "4ce65be9f6c52fa7f7faaaba7ec00694", "score": "0.67373276", "text": "public function boot()\n {\n $this->setupEventFiring($this->app);\n $this->setupEventListening($this->app);\n }", "title": "" }, { "docid": "931f9f700b62b029be22c37286a6ac12", "score": "0.6731532", "text": "public function boot()\n {\n $this->registerResources();\n\n //加载核心辅助函数\n require_once __DIR__ . '/Helper/Helper.php';\n\n //是否有设置代理,有则获取设置为代理\n if (!empty(config('app.proxy_ips'))) {\n Request()->setTrustedProxies(config('app.proxy_ips'));\n }\n\n //调试模式\n // if (config('app.debug') === true) {\n // //注册路由\n // if (!$this->app->routesAreCached()) {\n // require __DIR__ . '/routes/debug.php';\n // }\n // new \\Yashon\\Laravel\\Core\\Debuger();\n // }\n\n //注册自动生成命令\n if ($this->app->runningInConsole()) {\n $this->commands([\n 'Yashon\\Laravel\\Core\\Console\\CreateModel',\n 'Yashon\\Laravel\\Core\\Console\\CreateModelDoc',\n 'Yashon\\Laravel\\Core\\Console\\CreateController',\n 'Yashon\\Laravel\\Core\\Console\\CreateLogic',\n 'Yashon\\Laravel\\Core\\Console\\CreateTest',\n 'Yashon\\Laravel\\Core\\Console\\CreateSeeder',\n 'Yashon\\Laravel\\Core\\Console\\CreateMigration',\n 'Yashon\\Laravel\\Core\\Console\\CreateInit',\n\n 'Yashon\\Laravel\\Core\\Console\\Config',\n 'Yashon\\Laravel\\Core\\Console\\Supervisor'\n\n ]);\n }\n\n }", "title": "" }, { "docid": "d468166b7e689571633acfeff7810b37", "score": "0.6727984", "text": "public function boot()\n {\n // If we configured the package to boot its services immediately after\n // the registration phase (auto-boot), don't boot the provider again:\n if ($this->isBooted) {\n return;\n }\n\n $this->bootComponentDrivers();\n\n // If we want Laravel's Redis API to use Sentinel, we'll remove the\n // \"redis\" service from the deferred services in the container:\n if ($this->config->shouldOverrideLaravelRedisApi) {\n $this->removeDeferredRedisServices();\n }\n\n if ($this->config->shouldIntegrateHorizon) {\n $horizon = new HorizonServiceProvider($this->app, $this->config);\n $horizon->register();\n $horizon->boot();\n }\n\n $this->isBooted = true;\n }", "title": "" }, { "docid": "44b6d399481468a53330e1bf9a7c91d4", "score": "0.67271423", "text": "public function boot()\n {\n app()->booted(function () {\n $this->booted();\n });\n }", "title": "" }, { "docid": "44b6d399481468a53330e1bf9a7c91d4", "score": "0.67271423", "text": "public function boot()\n {\n app()->booted(function () {\n $this->booted();\n });\n }", "title": "" }, { "docid": "44b6d399481468a53330e1bf9a7c91d4", "score": "0.67271423", "text": "public function boot()\n {\n app()->booted(function () {\n $this->booted();\n });\n }", "title": "" }, { "docid": "44b6d399481468a53330e1bf9a7c91d4", "score": "0.67271423", "text": "public function boot()\n {\n app()->booted(function () {\n $this->booted();\n });\n }", "title": "" }, { "docid": "dd26d6cc74b1dfc17bfa45e03c3046a8", "score": "0.67250526", "text": "public function boot()\n {\n $this->app->when(HooksChannel::class)\n ->needs(Hooks::class)\n ->give(function () {\n $hooksKey = config('services.hooks.key');\n\n return new Hooks($hooksKey, new HttpClient());\n });\n }", "title": "" }, { "docid": "b45fc533df2a3df2380e7e8f1b476551", "score": "0.6724427", "text": "private function boot(): void\n\t{\n\t\t// First check if the application is already booted\n\t\tif ($this->isBooted) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Boot all registered providers\n\t\tforeach ($this->registeredProviders as $provider) {\n\t\t\t$this->bootServiceProvider($provider);\n\t\t}\n\n\t\t$this->isBooted = true;\n\t}", "title": "" }, { "docid": "c55a67639a3afb04b530b9c8a57d3069", "score": "0.6720209", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands($this->commands);\n $this->publishMigrations();\n }\n }", "title": "" }, { "docid": "30ba9ee972df7877d6544a5b2f18cd22", "score": "0.6714308", "text": "public function boot()\n {\n $this->app->bind('GuzzleClient', function () {\n $logger = new Logger('laravel');\n $stack = HandlerStack::create();\n $stack->push(new LogMiddleware($logger, new DatabaseHandler()));\n return function ($config) use ($stack){\n return new Client(array_merge($config, ['handler' => $stack]));\n };\n });\n }", "title": "" }, { "docid": "a8982a9de26ad92c5b324c91dc159229", "score": "0.67141414", "text": "public function boot()\n {\n $this->app->instance(ApiGateway::class, new ApiGatewayManager());\n }", "title": "" }, { "docid": "76fcc4ba20cee00dcbe23ec7fec37287", "score": "0.67091525", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n GenerateDocsCommand::class,\n AccountChangePasswordCommand::class,\n AccountCreateCommand::class,\n LoginSanctumCommand::class,\n AccountCreateCommand::class,\n AccountAssignRoleCommand::class,\n JdlxInstallCommand::class,\n JdlxCreateAdminCommand::class,\n ]);\n }\n\n\n $this->publishes([\n __DIR__ . '/../publish/app' => base_path('app'),\n __DIR__ . '/../publish/routes' => base_path('routes'),\n __DIR__ . '/../publish/tests' => base_path('tests'),\n __DIR__ . '/../publish/config' => base_path('config'),\n __DIR__ . '/../publish/database/seeders' => base_path('database/seeders'),\n __DIR__ . '/../publish/.githooks' => base_path('.githooks'),\n ]);\n\n $this->loadViewsFrom(__DIR__ . '/../resources/views', 'jdlx');\n $this->loadRoutesFrom(__DIR__ . '/../routes/docs.php');\n\n }", "title": "" }, { "docid": "27b05f3be437044164382fb87b59cbea", "score": "0.6707637", "text": "public function boot()\n {\n $this->loadAutoloader(base_path('packages'));\n }", "title": "" }, { "docid": "ae1dc350aedf2bf9205bffae2e6b2e23", "score": "0.670334", "text": "public function boot(): void\n {\n if ($this->packageDirectoryExistsAndIsNotEmpty('bootstrap') &&\n file_exists($helpers = $this->packageHelpersFile())) {\n require $helpers;\n }\n\n if ($this->packageDirectoryExistsAndIsNotEmpty('resources/lang')) {\n $this->loadTranslationsFrom($this->packageLangsPath(), $this->vendorNameDotPackageName());\n }\n\n if ($this->packageDirectoryExistsAndIsNotEmpty('resources/views')) {\n // Load published views\n $this->loadViewsFrom($this->publishedViewsPath(), $this->vendorNameDotPackageName());\n\n // Fallback to package views\n $this->loadViewsFrom($this->packageViewsPath(), $this->vendorNameDotPackageName());\n }\n\n if ($this->packageDirectoryExistsAndIsNotEmpty('database/migrations')) {\n $this->loadMigrationsFrom($this->packageMigrationsPath());\n }\n\n if ($this->packageDirectoryExistsAndIsNotEmpty('routes')) {\n $this->loadRoutesFrom($this->packageRoutesFile());\n }\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n\n // Set app locale to default\n $this->app->setLocale(config($this->vendorNameDotPackageName())['default_locale']);\n\n // Register Facade\n $loader = AliasLoader::getInstance();\n $loader->alias('LocalizeRoute', LocalizeRoute::class);\n }", "title": "" }, { "docid": "dee11bee823f0333a203ec0940da9ca7", "score": "0.6700985", "text": "public function boot()\n {\n $this->app->bind(IUserService::class,UserService::class);\n $this->app->bind(IJsonReader::class,JsonReader::class);\n $this->app->bind(IFilterUsers::class,FilterUsers::class);\n }", "title": "" }, { "docid": "f694fd34b0461ace138748add6c24490", "score": "0.66987807", "text": "public function boot()\n {\n Inertia::share('flash', function () {\n return ['success' => FacadesSession::get('success')];\n });\n Inertia::share('errors', function () {\n return FacadesSession::get('errors') ? FacadesSession::get('errors')->getBag('default')->getMessages() : (object)[];\n });\n $this->app->singleton('App\\Youtube\\YoutubeServices', function () {\n return new YoutubeServices (env('YOUTUBE_API_KEY'));\n });\n }", "title": "" }, { "docid": "6db36813ce4520337a22d84e951d430f", "score": "0.66975754", "text": "public function boot()\n {\n $registryServiceName = 'service_provider_registry_' . $this->id;\n $this->container->set($registryServiceName, $this->getRegistry($this->container));\n }", "title": "" }, { "docid": "c2f9ce3f191c2f3c31903fbca4684a6a", "score": "0.66904914", "text": "public function boot()\n {\n $packagePath = __DIR__.'/../';\n\n $this->app->router->group([\n 'middleware' => 'web',\n 'namespace' => $this->getAppNamespace() . 'Http\\Controllers'\n ], function() use($packagePath) {\n require $packagePath . 'routes/web.php';\n });\n\n $this->loadTranslationsFrom($packagePath.'resources/lang', 'auth');\n\n $this->app->singleton('command.nwo.auth.migrations', function ($app) {\n return $app['NewJapanOrders\\Auth\\Commands\\PublishMigrations'];\n }); \n $this->commands('command.nwo.auth.migrations');\n $this->app->singleton('command.nwo.auth.views', function ($app) {\n return $app['NewJapanOrders\\Auth\\Commands\\PublishViews'];\n }); \n $this->commands('command.nwo.auth.views');\n\n\n $this->loadViewsFrom($packagePath . 'resources/views', 'auth');\n }", "title": "" }, { "docid": "420db9e5f66158b41498d6dc64ec716d", "score": "0.6690358", "text": "public function boot()\n {\n $this->bootAuthen();\n\n $path = \\realpath(__DIR__.'/../../');\n\n $this->addConfigComponent('orchestra/foundation', 'orchestra/foundation', \"{$path}/config\");\n $this->addLanguageComponent('orchestra/foundation', 'orchestra/foundation', \"{$path}/resources/lang\");\n $this->addViewComponent('orchestra/foundation', 'orchestra/foundation', \"{$path}/resources/views\");\n }", "title": "" }, { "docid": "0c9e27b28056b5b4626c3569974dcf1f", "score": "0.6688052", "text": "public function boot()\n {\n Schema::defaultStringLength(191);\n\n $this->app->bind(RekognitionClient::class, function () {\n $client = new RekognitionClient([\n 'credentials' => [\n 'key' => config('services.aws.key'),\n 'secret' => config('services.aws.secret'),\n ],\n 'region' => \"us-east-1\",\n \"version\" => \"latest\"\n ]);\n\n return $client;\n });\n\n $this->elasticSearchRegister();\n }", "title": "" }, { "docid": "f097fd5624b1a90769a48ff1dafd116b", "score": "0.6685961", "text": "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->registerConfiguration();\n }\n\n $this->registerRoutes();\n }", "title": "" }, { "docid": "49af1cc342aa15052132712a4bca7b13", "score": "0.66807675", "text": "public function boot()\n {\n // Commands & Config\n if ($this->app->runningInConsole()) {\n $this->commands([\n AliasCommand::class,\n MakeAllCommand::class,\n MakeControllerCommand::class,\n MakeModelCommand::class,\n MakeResourceCommand::class,\n MakeResourcesCommand::class,\n MakeRequestCommand::class,\n RouteCommand::class,\n ]);\n\n $this->publishes([\n __DIR__ . '/config/jsonapi.php' => config_path('jsonapi.php'),\n __DIR__ . '/config/jsonapi-alias.php' => config_path('jsonapi-alias.php'),\n ], 'config');\n }\n\n // Config\n $this->mergeConfigFrom(\n __DIR__ . '/config/jsonapi.php',\n 'jsonapi'\n );\n\n // Middlewares\n // Add middlewares to router\n $router = $this->app['router'];\n if (!$router->hasMiddlewareGroup('jsonapi')) {\n $router->middlewareGroup('jsonapi', []);\n }\n // $router->aliasMiddleware('jsonapi.addHeaders', AddResponseHeaders::class);\n // $router->pushMiddlewareToGroup('jsonapi', 'jsonapi.addHeaders');\n $router->aliasMiddleware('jsonapi.checkHeaders', CheckRequestHeaders::class);\n $router->pushMiddlewareToGroup('jsonapi', 'jsonapi.checkHeaders');\n $router->aliasMiddleware('jsonapi.checkQuery', CheckQueryParameters::class);\n $router->pushMiddlewareToGroup('jsonapi', 'jsonapi.checkQuery');\n\n // Add middlewares to kernel (globally)\n $this->app->make('Illuminate\\Contracts\\Http\\Kernel')->prependMiddleware(AddResponseHeaders::class);\n\n // Macros\n foreach (glob(__DIR__ . '/macro/*.php') as $file) {\n require_once $file;\n }\n\n // Routes\n app('router')->patterns(['id' => '[0-9]+', 'parentId' => '[0-9]+']);\n }", "title": "" }, { "docid": "590e97d327dd2777866b1262af492f2b", "score": "0.6679752", "text": "public function boot()\n {\n $this->app->singleton(CustomerAuthenticator::class, function (Application $app) {\n return new CustomerAuthenticator(\n $app->make(CustomerRepository::class),\n $app->make(Cookie::class)\n );\n });\n }", "title": "" }, { "docid": "5297f5bff15c963ded87272f7ff2f2ae", "score": "0.66797066", "text": "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n StartServelCommand::class\n ]);\n\n $this->publishes([\n $this->packageBasePath('config/servel.php') => config_path('servel.php')\n ], 'servel-config');\n }\n }", "title": "" }, { "docid": "0ea1523ec3e0dc7aa7c7e3dc5c8b71fb", "score": "0.6674666", "text": "public function boot(Application $app)\n {}", "title": "" }, { "docid": "6d2d40493a377dd923daaf85429d6e40", "score": "0.6673334", "text": "public function boot()\n {\n $this->registerTranslations();\n $this->registerConfig();\n $this->registerViews();\n $this->registerFactories();\n $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');\n $this->commands(\n [\n \\Modules\\Analytics\\Console\\AnalyticsCompute::class,\n \\Modules\\Analytics\\Console\\ComputeInvoices::class,\n \\Modules\\Analytics\\Console\\ComputePayments::class,\n \\Modules\\Analytics\\Console\\ComputeCredits::class,\n \\Modules\\Analytics\\Console\\ComputeExpenses::class,\n \\Modules\\Analytics\\Console\\ComputeEstimates::class,\n \\Modules\\Analytics\\Console\\ComputeDeals::class,\n \\Modules\\Analytics\\Console\\ComputeLeads::class,\n \\Modules\\Analytics\\Console\\ComputeProjects::class,\n \\Modules\\Analytics\\Console\\ComputeTasks::class,\n \\Modules\\Analytics\\Console\\ComputeTickets::class,\n \\Modules\\Analytics\\Console\\ComputeTimesheets::class,\n ]\n );\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" } ]
099e7bb6b1efe2cc10d1af6782684816
Retrieve a set of Genres by category.
[ { "docid": "802a861fc55e463cefc1c22164184a64", "score": "0.6284454", "text": "function getByCategory($category, $contextId = null, $rangeInfo = null) {\n\t\t$sqlParams = array((int)$category);\n\t\t$sqlParams[] = 1;\n\t\tif ($contextId) {\n\t\t\t$sqlParams[] = (int)$contextId;\n\t\t}\n\n\t\t$result = $this->retrieveRange('SELECT * FROM genres WHERE category = ? AND enabled = ?'. ($contextId ? ' AND context_id = ?' : ''), $sqlParams, $rangeInfo);\n\t\t$returner = new DAOResultFactory($result, $this, '_fromRow', array('id'));\n\t\treturn $returner;\n\t}", "title": "" } ]
[ { "docid": "b5cb350d3caf16fc3613d0fe8da230a6", "score": "0.65270376", "text": "public function genres_from_category($categoryId) {\n curl_setopt($this->curl, CURLOPT_COOKIEFILE, time() . $this->_cookie_file);\n curl_setopt($this->curl, CURLOPT_POST, 0);\n curl_setopt($this->curl, CURLOPT_URL, $this->mapiUrl . 'categories/'.$categoryId.'/genres');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, 1);\n \n $data = json_decode(curl_exec($this->curl));\n\t \n if(isset($data->code) AND $data->code==$this->auth_req_code){\n if (isset($data->message)){\n $this->whichAuthenticate($data->message);\n return $this->genres_from_category($categoryId);\n }\n }\n \n return $data;\n }", "title": "" }, { "docid": "e1c17839dca6a7306d08212702381018", "score": "0.61082935", "text": "function genrelist() {\n global $TABLE_PREFIX,$CACHE_DURATION;\n\n return get_result('SELECT * FROM '.$TABLE_PREFIX.'categories ORDER BY sort_index, id', true, $CACHE_DURATION);\n}", "title": "" }, { "docid": "efd88c9019f097aa208e4f5f4816b36a", "score": "0.59919846", "text": "public function get_all_genre() {\n\t\t$req = $this->db->conn_id->query('SELECT * FROM genre ORDER BY genre ASC');\n\t\t$genres = $req->fetchAll(PDO::FETCH_ASSOC);\n\n\t\treturn $genres;\n\t}", "title": "" }, { "docid": "37be0d8e317fb6e166bf6ecbadc120d2", "score": "0.59492874", "text": "public function getList()\n {\n $response = $this->get('genre/list');\n\n return $this->returnResponse($response, 'genres');\n }", "title": "" }, { "docid": "1e82feeb4ea2e3a3b53f13a5b26663ba", "score": "0.587936", "text": "private function GetCategories()\n\t{\n\t\t$catObj = new Category();\n\t\treturn $catObj->getAll();\n\t}", "title": "" }, { "docid": "a13d6f0980080e9c8d09cf6fad0f83a7", "score": "0.58771884", "text": "public function getCollection($category)\n\t{\n\t\treturn (isset($this->collections[$category]) ? $this->collections[$category] : []);\n\t}", "title": "" }, { "docid": "0199e7746bc04f485456c19b917320a2", "score": "0.5842453", "text": "public function getProductsByCategory($category) : array\r\n {\r\n return $this->all('SELECT * FROM `products` WHERE `category` = ?', array($category));\r\n }", "title": "" }, { "docid": "29204bfe828a55d7f1bdc1330d2caba6", "score": "0.58061963", "text": "private function GetGenres($get = null) {\r\n // SQL to get all genres in use\r\n $sql = \"SELECT DISTINCT G.name FROM rm_Genre AS G\r\n INNER JOIN rm_Movie2Genre AS M2G ON G.id = M2G.idGenre\";\r\n\r\n // SQL to get genre(s) for a movie\r\n if (is_numeric($get))\r\n $sql = \"SELECT DISTINCT G.name FROM rm_Movie2Genre AS M2G\r\n INNER JOIN rm_Genre AS G ON M2G.idGenre = G.id\r\n WHERE M2G.idMovie = $get\";\r\n\r\n // SQL to get all genres\r\n elseif ($get == \"all\")\r\n $sql = \"SELECT name FROM rm_Genre\";\r\n\r\n $res = parent::ExecuteSelectQueryAndFetchAll($sql);\r\n foreach($res as $val) {\r\n $genres[] = $val->name;\r\n }\r\n return $genres;\r\n }", "title": "" }, { "docid": "8eb1410a7c8dcb808acc219f297c10ba", "score": "0.57935685", "text": "public function categories_genres() {\n curl_setopt($this->curl, CURLOPT_COOKIEFILE, time() . $this->_cookie_file);\n curl_setopt($this->curl, CURLOPT_POST, 0);\n curl_setopt($this->curl, CURLOPT_URL, $this->mapiUrl . 'categories/all');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, 1);\n \n $data = json_decode(curl_exec($this->curl));\n\t \n if(isset($data->code) AND $data->code==$this->auth_req_code){\n if (isset($data->message)){\n $this->whichAuthenticate($data->message);\n return $this->categories_genres();\n }\n }\n \n return $data;\n }", "title": "" }, { "docid": "291c1df1e9662c84cc64e153ee28b3a9", "score": "0.5792393", "text": "function getcategory(){\n\n $db = \\Rizoa::getrizo('database');\n $view = 'by_type';\n $query = [\n 'descending' => 'true',\n 'reduce' => 'false',\n 'startkey' => '[\"category\",{}]',\n 'endkey' => '[\"category\"]',\n 'include_docs' => 'true'\n ];\n return \\Couch::get($db,$view,$query);\n\n }", "title": "" }, { "docid": "e09c242bcbf847eea018acccb554e343", "score": "0.5782843", "text": "public function getMoviesByGenre($cid){\n session_start();\n // Get all the movies if the cid is 0, which is the \"All\" tab\n $this->init();\n if($cid == 0){\n $this->movies = $this->conn->getAllMovies();\n }else{\n $this->movies = $this->conn->getMovieByCategoryId($cid);\n }\n }", "title": "" }, { "docid": "61be61b58b4ec72f018a306588bcf93f", "score": "0.57623214", "text": "public function getAll() : array {\n $genre = new \\db\\DataAccess();\n return $genre->selectAllGenreData();\n }", "title": "" }, { "docid": "a73686772c418e3a1a08ab1679bf3aa3", "score": "0.57589155", "text": "function findAllGenres() { \n return _queryArray(\"select * from gernres;\");\n}", "title": "" }, { "docid": "7a50703f535ebdf8648f84d9d015bd2d", "score": "0.5737832", "text": "public function getAll()\n {\n return Genre::all();\n }", "title": "" }, { "docid": "8abc651b33a18e13c3848b2c230867c5", "score": "0.5724915", "text": "public function gadgetsByType($category) {\r\n\t\t$this->load->model('GetGadgetsByType');\t\t\t//loads the model\r\n\t\t$data['gadgets'] = $this->GetGadgetsByType->getData($category);\t//gets data from the model by calling getData method\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//and passing the $category parameter\r\n\t\t$this->load->view('gadgets_view', $data);\t\t//loads the view\r\n\t}", "title": "" }, { "docid": "62d369746ef8891efb3e8935acbb1641", "score": "0.571222", "text": "public function getItemsByCategory() {\n return $this->_table->findBy(array(\"itemCategory\" => 2));\n }", "title": "" }, { "docid": "f4371a8f59559dab54825ebe564d2055", "score": "0.5684223", "text": "function getAllGenres()\n {\n $this->db->query(\"SELECT * FROM genre ORDER BY GenreID ASC;\");\n return $this->db->fetchAll();\n }", "title": "" }, { "docid": "9daea59564358dd4e2615d3ebb52e2b9", "score": "0.5679222", "text": "public static function getGenres()\r\n\t{\r\n\t\t$db = new Database();\r\n\t\t$genreIds = $db->getArray(\"SELECT `id` FROM `genres`\");\r\n\t\t$genres = array();\r\n\t\tforeach($genreIds as $genreId)\r\n\t\t{\r\n\t\t\t$genres[] = new Genre($genreId->id);\r\n\t\t}\r\n\t\treturn $genres;\r\n\t}", "title": "" }, { "docid": "0b7716ec907778b3289e311861f8cc63", "score": "0.5670909", "text": "public function getBookByCategory($category){\n $sql = 'SELECT * FROM book WHERE category_Id = ?';\n $bookTemp = $this->db->prepare($sql);\n $bookTemp->execute(array($category));\n \n $result = array();\n foreach($bookTemp as $row){\n $book = new book($row['book_Id'],$row['title'],$row['author_Id'],$row['category_Id']);\n $result[] = $book;\n }\n return $result;\n }", "title": "" }, { "docid": "05691cfdc862996e7a1d9f0871b300bd", "score": "0.5656781", "text": "public static function genres()\n {\n $genres = self::executeRequest(\"/genre/movie/list\");\n return $genres[\"genres\"];\n }", "title": "" }, { "docid": "58a2025e2745e0ab0c370469448510da", "score": "0.5656463", "text": "function choose_categories()\n\t{\n\t\tif (!addon_installed('galleries')) return NULL;\n\n\t\trequire_lang('galleries');\n\n\t\trequire_code('galleries');\n\t\treturn array(nice_get_gallery_tree(NULL,NULL,false,false,true),do_lang('GALLERIES'));\n\t}", "title": "" }, { "docid": "a2d993affe9df1316be688afe921ca70", "score": "0.5643213", "text": "public function getAll()\n\t{\n\t\treturn $this->category->all();\n\t}", "title": "" }, { "docid": "1df98933a852873af7785529a085cff7", "score": "0.55815625", "text": "public function getByCategory($category){\n $this->db->query(\"SELECT crime.*, categories.VehicleType AS cname \n FROM crime \n INNER JOIN categories\n ON crime.Category_ID = categories.id \n WHERE crime.category_id = $category\n ORDER BY post_date DESC \n \");\n // Assign Result Set\n $results = $this->db->resultSet();\n\n return $results;\n }", "title": "" }, { "docid": "ef0e9288c7858a760bcd1145df892f10", "score": "0.55754125", "text": "public function find_by_category($category)\n\t{\n\t\t$this->CI->load->module_model(FUEL_FOLDER, 'fuel_relationships_model');\n\t\t$model =& $this->model();\n\t\t$categories_table = $model->tables('fuel_categories');\n\t\t$tags_table = $model->tables('fuel_tags');\n\t\tif (is_int($category))\n\t\t{\n\t\t\t$where[$tags_table.'.category_id'] = $category;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$where[$categories_table.'.slug'] = $category;\n\t\t}\n\t\t$data = $model->find_all($where);\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "83b7627c0a4620280b355604a737d022", "score": "0.5552344", "text": "public function collection()\n {\n $request = \\Craft::$app->getRequest();\n $filter = $request->getParam('filter');\n $response = $request->getParam('response');\n \n $result = [];\n \n $categories = CraftCategory::find();\n \n // Apply any filters\n if ($filter) {\n foreach($filter AS $f) {\n $field = $f['attribute_code'];\n $categories->$field = $f['value'];\n }\n }\n \n // Custom output? E.g. ids, count, etc.\n if ($response)\n return $categories->$response();\n \n // Process each entry\n foreach($categories->all() AS $category) {\n $result[] = $this->processCategory($category);\n }\n \n return $result;\n }", "title": "" }, { "docid": "3f9da70dfabe346d1f3d56a8b8df2597", "score": "0.5548093", "text": "public function getCategories($category)\n\t{\n\t\t$conn = $this->getConnection();\n\t\t//Placeholder\n\t\t$query = \"SELECT name FROM Topics WHERE category = :category\";\n\t\t//Statement\n\t\t$stmt = $conn->prepare($query);\n\t\t//Bind\n\t\t$stmt->bindParam(\":category\", $category);\n\t\t//Execute\n\t\t$stmt->execute();\n\t\t//Return\n\t\treturn $stmt->fetchAll();\n\t}", "title": "" }, { "docid": "97736cf70bebbaec3e257558e426c0a8", "score": "0.5547056", "text": "function ParseGenre($cat){\n}", "title": "" }, { "docid": "8ab4425f81f0e38c3ab38115031943ff", "score": "0.5542445", "text": "public static function find_all_in_category($category) {\n\t\tglobal $database;\n\t\t\n\t\t$columns = implode(\", \".self::$table_name.\".\", self::$db_fields);\n\t\t$columns = self::$table_name.\".\".$columns;\n\n\t\t$sql = \"SELECT \".$columns.\" FROM \" . self::$table_name;\n\t\t$sql .= \" JOIN \". self::$x_table_name;\n\t\t$sql .= \" ON tags.id = content_x_tags.tag_id\";\n\t\t$sql .= \" JOIN content ON content.id = content_x_tags.content_id\";\n\t\t$sql .= \" JOIN categories ON categories.id = content.category_id\";\n\t\t$sql .= \" WHERE content.status ='\".ContentStatus::PUBLISHED.\"'\";\n\t\tif(is_numeric($category)) {\n\t\t\t$sql .= \" AND content.category_id = $category\";\n\t\t}elseif( is_string($category) ){\n\t\t\t$sql .= \" AND categories.title = '$category'\";\n\t\t} elseif( is_array($category) ) {\n\t\t\t$sql .= \" AND categories.title IN ('\".implode( \"','\" , $category ).\"')\";\n\t\t}\n $sql .= \" GROUP BY id\";\n\t\t$sql .= \" ORDER BY tag ASC\";\n\n\t\treturn self::find_by_sql($sql);\n\t}", "title": "" }, { "docid": "5df1635bcdfc20524d79929c28baaf6a", "score": "0.5540613", "text": "public function getCategories();", "title": "" }, { "docid": "5df1635bcdfc20524d79929c28baaf6a", "score": "0.5540613", "text": "public function getCategories();", "title": "" }, { "docid": "5df1635bcdfc20524d79929c28baaf6a", "score": "0.5540613", "text": "public function getCategories();", "title": "" }, { "docid": "577d2fec7b969ec150ee04e6a1b1c26e", "score": "0.5534688", "text": "public static function getGenreList() {\n\t\treturn Genre::orderBy('precedence')->lists('title', 'id');\n\t}", "title": "" }, { "docid": "e7aad9464ee205600e13fc3093d4ed74", "score": "0.55224323", "text": "public function categories_get_all(){\n\t\t$ids=$this->get_categories_ids();\t\t\n\t\treturn $this->categories_get($ids);\n\t\t}", "title": "" }, { "docid": "bee90098aa229c737f43232b2bd1f023", "score": "0.5518324", "text": "public function getMovieByGenre($genre){\n $query = 'SELECT m.*, \n GROUP_CONCAT(g.genre_name) AS genre_names \n FROM '.$this->movie_table.' m \n LEFT JOIN '.$this->movie_genre_linking_table.' \n link ON link.movies_id = m.movies_id \n LEFT JOIN '.$this->genre_table.' g \n ON g.genre_id = link.genre_id \n WHERE g.genre_name = \"%'.$genre.'%\" \n GROUP BY m.movies_id';\n\n echo $query;\n exit;\n\n $stmt = $this->conn->prepare($query);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n \n }", "title": "" }, { "docid": "a810fdd3403f6af376c51ee68bc15f07", "score": "0.5516597", "text": "private function genres(){\r\n\t\t\tif($this->get_request_method() != \"GET\"){\r\n\t\t\t\t$this->response('',406);\r\n\t\t\t}\r\n\r\n\t\t\t\t$query=\"\r\n\t\t\t\tSELECT DISTINCT *\r\n\t\t\t\t\tFROM (\r\n\t\t\t\t\t\tSELECT Homme.*\r\n\t\t\t\t\t\tFROM familymember As Homme\r\n\t\t\t\t\t\tWHERE Homme.genre = 'homme'\r\n\t\t\t\t\t\tUNION\r\n\t\t\t\t\t\tSELECT Femme.*\r\n\t\t\t\t\t\tFROM familymember As Femme\r\n\t\t\t\t\t\tWHERE Femme.genre = 'femme'\r\n\t\t\t\t\t)\r\n\t\t\t\tAS Result\";\r\n\r\n\t\t\t\t$r = $this->mysqli->query($query) or die($this->mysqli->error.__LINE__);\r\n\t\t\t\tif($r->num_rows > 0){\r\n\t\t\t\t\t$result = array();\r\n\t\t\t\t\t$femmes = array();\r\n\t\t\t\t\t$hommes = array();\r\n\t\t\t\t\twhile($row = $r->fetch_assoc()){\r\n\t\t\t\t\t\tif ($row['genre'] == 'homme'){\r\n\t\t\t\t\t\t\t$hommes[] = $row;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$femmes[] = $row;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$result[0] = $femmes;\r\n\t\t\t\t\t$result[1] = $hommes;\r\n\t\t\t\t}\r\n\t\t\t\t$this->response($this->json($result), 200);\r\n\r\n\t\t\t$this->response('',204);\r\n\t\t}", "title": "" }, { "docid": "f5bf2057d137529c09721feae30add34", "score": "0.5507077", "text": "function getCategories()\n {\n }", "title": "" }, { "docid": "59bb4086079e865f8a4c9fd627f3ba87", "score": "0.550668", "text": "public function productsFromCategory($category, $limit = null) {\n // SELECT * FROM filme WHERE find_in_set($categoy,id_gen) AND\n $filters = array(\n 'find_in_set(' . $category . ',id_gen)',\n 'visible > 0',\n 'stoc > 0'\n );\n $order = array(\n 'add_date' => \"DESC\"\n );\n return $this->fetch($filters, $order, null, $limit)->rows;\n }", "title": "" }, { "docid": "024a916dc31b0a44704cbbfd1ea9f9e9", "score": "0.55057985", "text": "public function getProductsByCategory($category, $dealer = false){\n if($dealer) {\n //Prendo tutti i prodotti dell'utente corrente\n $data = $this->getDealerProducts();\n }else{\n //Prendo tutti i prodotti dell'utente corrente\n $data = $this->getProducts();\n }\n\n //Creo un array vuoto ee faccio passare tutti i dati presi\n $dataArray = array();\n foreach ($data as $value){\n\n //Se la categoria del prodott è corretta lo inserisco nell'array\n if($value['nome_categoria'] == $category){\n array_push($dataArray, $value);\n }\n }\n\n //Ritorno l'array\n return $dataArray;\n }", "title": "" }, { "docid": "a77a8bcb9dca002621efc347048dd8a3", "score": "0.5502273", "text": "public function findByCategory($category)\n {\n\n $category = Category::findOrFail($category);//Category::searchSlug($category)->firstOrFail();\n $products = $category->products()->with('categories')->where('published', '=', 1)->orderBy('option_id','DESC')->paginate($this->limit);\n\n return array($products, $category);\n }", "title": "" }, { "docid": "3c4b6bdf5cdaef02ee91e6a0b528a252", "score": "0.54985857", "text": "function getAllProductsByCategory($category){\n //open connection\n $conn = openConnection();\n\n //MySQLi extension approach\n /*$sql = \"\";\n $result = $conn->query($sql);*/\n\n // prepare the statement.\n $stmt = $conn->prepare(\"SELECT * FROM product WHERE productcategory=:productcat\");\n\n // bind the parameters\n $stmt -> bindvalue(\":productcat\",$category);\n\n // initialize an array for the results\n $products = array();\n\n // execute prepared statement and store results into the array\n if ($stmt->execute()) {\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n $products[] = $row;\n }\n }\n //close connection\n closeConnection($conn);\n\n return $products;\n }", "title": "" }, { "docid": "7a257cee459236790b987ae43e81954d", "score": "0.54952186", "text": "private function GetGenres() {\n // Get all genres that are active\n $sql = '\n\t\tSELECT DISTINCT G.name\n\t\tFROM Genre AS G\n\t\tINNER JOIN Movie2Genre AS M2G\n\t\tON G.id = M2G.idGenre\n\t\tORDER BY G.name ASC';\n $res = $this->db->ExecuteSelectQueryAndFetchAll($sql);\n\n $genres = null;\n foreach ($res as $val) {\n if ($val->name == $this->genre) {\n $genres .= \"$val->name \";\n } else {\n $genres .= \"<a href='\" . $this->getQueryString(array('genre' => $val->name)) . \"'>{$val->name}</a> \";\n }\n }\n return $genres;\n }", "title": "" }, { "docid": "a99efdd78618578fedfd2a5e45367600", "score": "0.54817724", "text": "public function getCategories() : Collection;", "title": "" }, { "docid": "3dc463fc76afa58fd2c7cc7c691b54aa", "score": "0.54741144", "text": "function get_genres()\n\t{\n\t\t$query \t\t=\t $this->db->get('genre');\n return $query->result_array();\n\t}", "title": "" }, { "docid": "7219d475a5b2db50c44dae5fb9e902b3", "score": "0.54670304", "text": "function getCategoriesItems();", "title": "" }, { "docid": "9a563cdfff603966dbc17fc888886f87", "score": "0.5460197", "text": "public function findAll()\n {\n\n return $this->findBy(array(), array('category' => 'ASC'));\n\n }", "title": "" }, { "docid": "f4cc8703dbcf1e1a416ad8f71f069d60", "score": "0.54432684", "text": "public function getAllCategories() : Collection;", "title": "" }, { "docid": "72155605c6c9dafd8778818201196e45", "score": "0.5409403", "text": "public function getAll(String $category)\n {\n if (!Cache::get($category . 'Ids')) {\n throw new Exception('The resource was not found in the cache.');\n }\n\n $results = [];\n $ids = Cache::get($category . 'Ids');\n foreach($ids as $id){\n if (!Cache::get('http://swapi.dev/api/' . $category .'/' . $id . '/')) {\n throw new Exception('The resource was not found in the cache.');\n }\n $results[$id] = Cache::get('http://swapi.dev/api/' . $category .'/' . $id . '/');\n }\n\n return $results;\n }", "title": "" }, { "docid": "13bad834467748abfc578616b8848ec9", "score": "0.5391351", "text": "public function getByCategory($category){\n\t\t\t$this->db->query(\"SELECT addons.*, categories.name AS cname \n\t\t\t\t\t\tFROM addons \n\t\t\t\t\t\tINNER JOIN categories\n\t\t\t\t\t\tON addons.category_id = categories.id \n\t\t\t\t\t\tWHERE addons.category_id = $category\n\t\t\t\t\t\tORDER BY post_date DESC \n\t\t\t\t\t\t\");\n\t\t\t// Assign Result Set\n\t\t\t$results = $this->db->resultSet();\n\n\t\t\treturn $results;\n\t\t}", "title": "" }, { "docid": "3e975ced552a87948f7231a9226fc12b", "score": "0.5373665", "text": "public function getCat()\r\n\t{\r\n\t\t// Initialize variables.\r\n\t $db = JFactory::getDbo();\r\n\t $query = $db->getQuery(true);\r\n\t \r\n\r\n\t $query->select('*')->from('#__categories');\r\n\t\t // Join over the categories.\r\n\t // $query->select('DISTINCT c.catid as id')->join('RIGHT', $db->quoteName('#__trainings', 'c') . ' ON c.catid = a.id');\r\n\t \r\n\r\n\t $query->where($db->quoteName('published') .' = '. $db->quote('1') . ' AND '. $db->quoteName('extension') .' like '. $db->quote('com_corporatetraining'));\r\n\t $db->setQuery($query);\r\n\r\n\t $results = $db->loadObjectList();\r\n\r\n\r\n\t return $results;\r\n\t}", "title": "" }, { "docid": "1e9cb49eb59426e59019d3ab77024ef3", "score": "0.5352763", "text": "function getAllFoodpornsByCategory($cat)\n {\n $stmt = self::$_db->prepare(\"SELECT * FROM foodporn WHERE category=:cat\");\n $stmt->bindParam(\":cat\", $cat);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "f2e673af01badc64e8f9659db63fd73d", "score": "0.53387547", "text": "public function all()\n {\n return $this->category->orderBy('sort', 'ASC')->get();\n }", "title": "" }, { "docid": "710f60243b89cf4173015fe23a8f8f04", "score": "0.53386205", "text": "public function getCategory(): array;", "title": "" }, { "docid": "bc1e167ae42aabc1ec4491affc86df9d", "score": "0.5336303", "text": "public function getAllCategories() {\n $sql = \"SELECT * FROM categories WHERE c_type = ?\";\n $sqlData = array(\"media\");\n\n global $queriesModel;\n $statement = $queriesModel->pdoStatement($sql, $sqlData);\n\n $categoriesData = $statement->fetchAll();\n return $categoriesData;\n }", "title": "" }, { "docid": "8a256223530b024bebc7b9355b6c0dba", "score": "0.53084815", "text": "public static function retrieveAllObjectsFromCategory($categoryId, $page = 1, $limitPager = NULL, $limitQuery = NULL, $random = false, $add_sons = true) {\n return self::retrieveAllObjectsFromCatagory($categoryId, $page, $limitPager, $limitQuery, $random, $add_sons);\n }", "title": "" }, { "docid": "820185bbecef803ed2c458de65514202", "score": "0.5308361", "text": "public function all_by_cat($id_cat) \r\n {\r\n $query = $this->db->query(\"SELECT * FROM \".$this->table_name.\" WHERE fk_id_cat=\".$id_cat.\" ORDER BY nombre_scat;\");\r\n return $query->result_array(); \r\n }", "title": "" }, { "docid": "3a10ead610a694800d7d934a1de551c7", "score": "0.53015995", "text": "public function getCategorias();", "title": "" }, { "docid": "ad6fb74adcdfb676c1aa7379d7675840", "score": "0.5301076", "text": "public static function getMovieCategories($db){\n $sql = \"SELECT name FROM pGenre\";\n $res = $db->ExecuteSelectQueryAndFetchAll($sql, array());\n\n if(!isset($res[0])) {\n die('Misslyckades: det finns inga kategorier');\n }\n $unorderedList = CMovieSearch::getMovieCategoriesAsList($res);\n return $unorderedList;\n }", "title": "" }, { "docid": "4a21939e6d58a6d2f2a991873d79d0c4", "score": "0.52771354", "text": "public function all()\n {\n return Category::all();\n }", "title": "" }, { "docid": "f25de0c8208bb2b85ea6a8c7dce8322c", "score": "0.5259303", "text": "public function GetAllCategory() {\n try {\n $categoryMapper = new CategoryMapper();\n return $categoryMapper->GetAllCategory();\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n }\n }", "title": "" }, { "docid": "b497dc82c30ad34b8951391a230687ea", "score": "0.5251279", "text": "public function getCategories(){\r\n $stmt = $this->db->prepare(\"SELECT * FROM category\");\r\n $stmt->execute();\r\n $result = $stmt->get_result();\r\n\r\n return $result->fetch_all(MYSQLI_ASSOC);\r\n }", "title": "" }, { "docid": "6ed13737dd12621b1f97688eb8ad7bc8", "score": "0.5243743", "text": "function get_books_by_genre_id($genre_id) {\n global $wpdb;\n $books = []; \n\n $sql = $wpdb->prepare(\n '\n SELECT `book_id` FROM `'.$wpdb->prefix.'books_genres_relations`\n WHERE `genre_id`=%d\n ',\n $genre_id\n );\n $rows = $wpdb->get_results($sql);\n\n foreach ($rows as $row) {\n array_push($books, new Book($row->book_id));\n }\n\n return $books;\n}", "title": "" }, { "docid": "b605758d673f59abd1629971a6446f92", "score": "0.5239402", "text": "public function load_categories()\n {\n $l_return = [];\n\n $l_res = $this->retrieve('SELECT * FROM isysgui_catg WHERE isysgui_catg__parent IS NULL');\n while ($l_row = $l_res->get_row())\n {\n if (in_array($l_row['isysgui_catg__const'], self::$m_skipped_categories) || !class_exists($l_row['isysgui_catg__class_name']))\n {\n continue;\n } // if\n\n $l_return[] = [\n 'title' => _L($l_row['isysgui_catg__title']),\n 'const' => _L($l_row['isysgui_catg__const']),\n 'selfdefined' => false,\n 'active' => ($l_row['isysgui_catg__status'] == C__RECORD_STATUS__NORMAL) ? true : false\n ];\n } // while\n\n $l_res = $this->retrieve('SELECT * FROM isysgui_catg_custom');\n while ($l_row = $l_res->get_row())\n {\n $l_return[] = [\n 'title' => _L($l_row['isysgui_catg_custom__title']),\n 'const' => _L($l_row['isysgui_catg_custom__const']),\n 'selfdefined' => true,\n 'active' => ($l_row['isysgui_catg_cutsom__status'] == C__RECORD_STATUS__NORMAL) ? true : false\n ];\n } // while\n\n /**\n * Sort array by title\n */\n usort(\n $l_return,\n 'isys_glob_array_compare_title'\n );\n\n return $l_return;\n }", "title": "" }, { "docid": "ef9278ea5c23ee0eb1bdd82b15c0ce2b", "score": "0.5235356", "text": "function getSongsByCategoryId($category_id){\n $result = [];\n $qry = $this->conn->prepare(\"SELECT id, song_name, downloaded_count, created_date FROM \". $this->table_name .\" WHERE category_id = \". $category_id .\";\");\n if ($qry === false) {\n trigger_error(mysqli_error($this->conn));\n } else {\n if ($qry->execute()) {\n $qry->store_result();\n $qry->bind_result($id, $song_name, $downloaded_count, $created_date);\n while($qry->fetch()) {\n $result[$id] = [\n 'song_name' => $song_name,\n 'downloaded_count' => $downloaded_count,\n 'created_date' => $created_date\n ];\n }\n } else {\n trigger_error(mysqli_error($this->conn));\n }\n }\n $qry->close();\n \n return $result; \n }", "title": "" }, { "docid": "af832d30604c6738105c2f74cdac719e", "score": "0.5221506", "text": "public static function findAll() :array\n {\n $req=MonPdo::getInstance()->prepare(\"Select * from genre\");\n $req->setFetchMode(PDO::FETCH_CLASS|PDO::FETCH_PROPS_LATE,'models\\Genre');\n $req->execute();\n return $req->fetchAll();\n }", "title": "" }, { "docid": "1adf3446a67a0cd3216ea81f17ba3497", "score": "0.5215161", "text": "public function getAllCategory(){\n \n\n /* le pongo un alias a c.nombre clase 289 curso php minuto 14:30, */\n $sql= \"SELECT p.*, c.nombre AS 'catnombre' FROM productos p \"\n . \"INNER JOIN categorias c ON c.id = p.categoria_id \"\n . \"WHERE p.categoria_id = {$this->getCategoria_id()} \"\n . \"ORDER BY id DESC\";\n $productos= $this->db->query($sql);\n \n return $productos;\n }", "title": "" }, { "docid": "d4f6a4106550905d0e48e738dc42234f", "score": "0.52121687", "text": "public static function findAllCategories()\n {\n return static::find()->select('category')->groupBy('category')->orderBy('id')->all();\n }", "title": "" }, { "docid": "f9dddf8bfc465aa8566906641a09cb3e", "score": "0.521067", "text": "public function getCategory ();", "title": "" }, { "docid": "67948d0b394da11d42e25a73965ae20a", "score": "0.5210259", "text": "public function getCategory();", "title": "" }, { "docid": "67948d0b394da11d42e25a73965ae20a", "score": "0.5210259", "text": "public function getCategory();", "title": "" }, { "docid": "d3cdd1ccdfcb755989d15743640c26af", "score": "0.5206548", "text": "public function getAllCatsBy($params)\n {\n //i.e., get all cats that are male,\n //get all cats that are adopted, etc\n }", "title": "" }, { "docid": "6e1ebd7b7da359688d004f653464f51a", "score": "0.52057946", "text": "public function getCategoryChildren($category);", "title": "" }, { "docid": "adf939e2a43873aefd8a132c6eddcb13", "score": "0.52053887", "text": "public function get_songs( $category = NULL, $category_id = NULL )\n\t\t{\n\t\t\n\t\t\tif( is_null( $this->songs ) )\n\t\t\t\t$this->load_songs( $category, $category_id );\n\t\t\t\t\n\t\t\treturn $this->songs;\n\t\t\n\t\t}", "title": "" }, { "docid": "475bd01e3dbfe6164b3a4c5ae324970a", "score": "0.5201169", "text": "public function findNewsByCategory(Category $category)\n {\n $qb = $this->createQueryBuilder('news');\n $qb->where($qb->expr()->eq('news.category', ':category'));\n $qb->setParameter('category', $category);\n\n return $qb->getQuery()->getResult();\n }", "title": "" }, { "docid": "ae882165863a83d477c2e16a960ddd4e", "score": "0.5195214", "text": "abstract public function getCategory($category, $page = null);", "title": "" }, { "docid": "a6db145457c5822c9a36afbeab3cb228", "score": "0.51940054", "text": "static function getCategories()\n {\n $conn = ConnectionMaker::getConnection();\n\n $sql = \"SELECT * FROM CATEGORY;\";\n\n $result = $conn->query($sql);\n\n if ($result)\n {\n return $result;\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "d2825df834a237c624e9ba940abb7b30", "score": "0.5191841", "text": "public function GetAllSousGenre() : array\n {\n }", "title": "" }, { "docid": "a0819c6fb69849388f72a45da49b8713", "score": "0.51906955", "text": "function find_by_category($cats, $filter = '', $skip = null) {\n\n # make sure the user is subscribed to the categories he submited\n $cats = get_user_category($cats);\n\n # if cats was empty or incorrect use the standart categories\n if (empty($cats))\n $cats = get_user_category();\n\n\n $db = dbWrapper::getDb('db');\n // get all data.ids for this category\n $cats = implode(',', $cats);\n $query = \n \"SELECT GROUP_CONCAT(DISTINCT data_cats.did) ids\n FROM (data_cats) INNER JOIN cats ON (cats.id = data_cats.cid)\n WHERE cats.id IN ({$cats})\n \";\n\n if (($ids = $db->query($query)->getOne()) && $this->loadList($skip, articles_per_page, \" data.id DESC \", \" AND data.id IN ({$ids}) \".$filter)) {\n return $this->getAll();\n }\n \n return $this->emptyResult();\n \n }", "title": "" }, { "docid": "880b984aac184f4f6e0360f60678a523", "score": "0.518497", "text": "function bib_get_cat_groups()\n{\n\t$result = bib_db_query(\"SELECT DISTINCT cat_group FROM bib_cats\");\n\tif (!$result) $result = array();\n\treturn $result;\n}", "title": "" }, { "docid": "b93291108481767d65e33a7ff455d343", "score": "0.5181695", "text": "function getGenres( ) {\n global $db;\n $stmt = mysqli_prepare( $db, 'SELECT id, name FROM genres');\n mysqli_stmt_execute( $stmt );\n mysqli_store_result( $db );\n mysqli_stmt_bind_result( $stmt, $id, $genre );\n while ( mysqli_stmt_fetch( $stmt ) ) {\n $genres[ $id ] = $genre;\n }\n return $genres;\n }", "title": "" }, { "docid": "4c647ddcaba4114f50c69dbc540d934c", "score": "0.5175677", "text": "public function actionCategory($categories)\n {\n $categories = explode('/', $categories);\n\n $sql = \"\n WITH RECURSIVE r AS \n (\n SELECT id, parent_id, name\n FROM good_type\n WHERE slug = :slug\n \n UNION\n \n SELECT good_type.id, good_type.parent_id, good_type.name\n FROM good_type\n JOIN r\n ON good_type.parent_id = r.id\n )\n SELECT * FROM r\n \";\n\n $categories = Yii::$app->db->createCommand($sql)\n ->bindValue(':slug', $categories[count($categories)-1])\n ->queryAll();\n\n\n// var_dump($categories);die;\n\n\n $good_type_ids = array_map(function ($category){\n return intval($category['id']);\n },$categories);\n\n $goods = Good::findAll(['type_id'=>$good_type_ids]);\n\n\n\n return $this->render('category', ['goods'=>$goods, 'category'=>$categories, 'category'=>$categories[count($categories)-1]]);\n }", "title": "" }, { "docid": "73bc0d9f2127a76a92036f814319bd84", "score": "0.51696295", "text": "public static function get():array{\n $consulta=\"SELECT * FROM categories\"; //preparar la consulta\n return DB::selectAll($consulta, self::class);\n }", "title": "" }, { "docid": "2945b606a1926d38d339773a576fa6ad", "score": "0.5164047", "text": "public function allcats()\n {\n $cats = Category::orderBy('name','ASC')->with(['photos'])->get();\n return response()->json([\n 'cats' => $cats,\n 'status' => 'success'\n ]);\n }", "title": "" }, { "docid": "7f500eff576e38c7fb75e8d97a6dc06b", "score": "0.51633006", "text": "public function getByCategory($category){\n $this->db->query(\"SELECT jobs.*, categories.name AS cname FROM jobs INNER JOIN categories\n ON jobs.category_id = categories.id WHERE jobs.category_id = $category ORDER BY post_date DESC \" ); //jobs.category_id = $category which is in the url\n //http://localhost:8080/joblister/index.php?category=1\n \n //Assign result set\n $results = $this->db->resultSet();\n return $results;\n }", "title": "" }, { "docid": "fef01afb1fd8868952892fb8df53fea9", "score": "0.5161561", "text": "public static function getAll(){\n $SQL = 'SELECT * FROM category ORDER BY name;';\n $prep= Database::getInstance()->prepare($SQL);\n $prep->execute();\n return $prep->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "765113e28aee1a49b3ea0234e7ade56d", "score": "0.5160374", "text": "public function getAll(): Collection\n {\n return $this->categoryService->getAll();\n }", "title": "" }, { "docid": "853c66f5a97fc09bd11353b1d51ceb6d", "score": "0.51584196", "text": "public static function getAllCategories(){\n return Doctrine::getTable('Category')\n ->createQuery('c')\n ->orderBy('c.name DESC')\n ->execute();\n }", "title": "" }, { "docid": "ba10ebca35bec76a2890a664c9e1d078", "score": "0.5155559", "text": "function getProductsByCategory($type) {\n // Create a connection\n $db = acmeConnect();\n // The SQL statement to be used with the database\n $sql = 'SELECT * FROM inventory WHERE categoryId IN (SELECT categoryId FROM categories WHERE categoryName = :catType)';\n // Create the prepared statement using the acme connection\n $stmt = $db->prepare($sql);\n // Bind the variable value to the placeholder in the above SQL statement\n $stmt->bindValue(':catType', $type, PDO::PARAM_STR);\n // Execute the statement\n $stmt->execute();\n // Get the result of the query as an array\n $products = $stmt->fetchAll(PDO::FETCH_ASSOC);\n // Close the database interaction\n $stmt->closeCursor();\n // Return the array\n return $products; \n}", "title": "" }, { "docid": "df004e111f89772f90e8afa5ef2c0f53", "score": "0.5140837", "text": "public function getGalleries()\n {\n return $this->hasMany(Gallery::className(), ['category_id' => 'category_id']);\n }", "title": "" }, { "docid": "36b1a4b65e852ba874afd0e5820012a9", "score": "0.5139548", "text": "public function getByCategory($category){\r\n\t\t$this->db->query(\"SELECT jobs.*, categories.name AS cname FROM jobs INNER JOIN categories ON jobs.category_id = categories.id WHERE jobs.category_id = $category ORDER BY post_date DESC\");\r\n\t\t//Assign Result Set\r\n\t\t$results = $this->db->resultSet();\r\n\r\n\t\treturn $results;\r\n\t}", "title": "" }, { "docid": "a0317113d65f22392401931158539f45", "score": "0.5136147", "text": "function getOfShopCategories($shopCategories) {\n $rel = $this->getRelation('_shopCategories');\n $res = $rel->getSrc($shopCategories); \n return $res;\n }", "title": "" }, { "docid": "f25c123aa4886ec83999dae2ae8fe914", "score": "0.51328146", "text": "Function getCat(){\n\tglobal $con;\n\n\t$getCat = $con->prepare(\"SELECT * FROM categories ORDER BY category_id\");\n\n\t$getCat->execute();\n\n\t$cats = $getCat->fetchAll();\n\n\treturn $cats;\n}", "title": "" }, { "docid": "32274bf5c6385d0158f7304dae29859c", "score": "0.5131709", "text": "public function get_categorias()\n\t{\n\t\t$sql=\"select * from \".TBLCATEGORIAS.\" order by categoria asc\";\n\t\t//echo \"$sql<br>\";\n\t\t$res=mysql_query($sql,Conectar::con());\n\t\twhile ($reg = mysql_fetch_assoc($res))\n\t\t{\n\t\t\t$this->cat[]=$reg;\n\t\t}\n\t\t\treturn $this->cat;\n\t}", "title": "" }, { "docid": "5a62559012c14f536ca0a9add8b74ebe", "score": "0.5128922", "text": "public function productsWithCategories();", "title": "" }, { "docid": "87a523177adcf004ed06dd1497f0b1dc", "score": "0.51277816", "text": "function getCategories(){\n\t$categories = array();\n\t$sql = \"SELECT * FROM category ORDER BY id_category ASC\";\n\t$res = query($sql);\n\twhile($row = mysqli_fetch_assoc($res)){\n\t\t$categories[] = array(\n\t\t\t\"id_category\" => $row['id_category'],\n\t\t\t\"category\" => $row['category']\n\t\t);\n\t}\n\tfree($res);\n\treturn $categories;\n}", "title": "" }, { "docid": "f0a9fdd31387e2dc5650565399091f62", "score": "0.5127212", "text": "function getItemsFromCategory($conn, $category)\n {\n\n $items = [];\n $sql = \"SELECT * FROM ITEM\";\n\n if ($category != \"all\") {\n $sql = \"SELECT * FROM ITEM WHERE id_cat=?\";\n $statement = $conn->prepare($sql);\n\n if($statement === false)\n return $items;\n\n $prepared = $statement->bind_param(\"i\", $category);\n } else {\n $statement = $conn->prepare($sql);\n\n if($statement === false)\n return $items;\n\n $prepared = true;\n }\n\n $executed = $statement->execute();\n\n if ($prepared and $executed) {\n\n $result = $statement->get_result();\n while ($item = $result->fetch_assoc()) {\n $items[] = $item;\n }\n }\n\n $statement->close();\n return $items;\n }", "title": "" }, { "docid": "daeb93cb7b4aaf6ebeaf4470aeefbac6", "score": "0.5124309", "text": "public function index(Category $category)\n {\n $oCollection = $category->products()\n ->with(\"seller\")->get()\n ->pluck(\"seller\")\n ->unique(\"id\")\n ->values()\n ;\n return $this->showAll($oCollection);\n }", "title": "" }, { "docid": "9d807a51e098a132f38cde9cb3002649", "score": "0.5120694", "text": "public function category($category)\n {\n $products = Product::where('category_id', $category)\n ->orderBy('id', 'desc')\n ->paginate(12);\n\n // return new ProductRelationshipsCollection($products);\n return response()->json($products);\n }", "title": "" }, { "docid": "a4874b003b0a1ee2e0ac04c09d4dcb3e", "score": "0.51199764", "text": "public function getByCategorySlug($categorySlug);", "title": "" }, { "docid": "d838ce04ce3e0dc47335d71a9cec209c", "score": "0.51125413", "text": "public function categories()\n {\n return CategoryResource::collection(Category::orderBy('created_at', 'desc')->paginate(15));\n }", "title": "" }, { "docid": "8158a64452e65864d9e287f1523abeb0", "score": "0.5111952", "text": "abstract protected function getCarCategory( $enun );", "title": "" } ]
765b8c88175791cebd81bdb75406b299
Return an error json response
[ { "docid": "06685ff7a6f9d3bf674191e74c212e45", "score": "0.0", "text": "public function getResponse(): JsonResponse\n {\n return response()->json(['error' => [ 'code' => $this->error_code, 'message' => $this->message]], $this->httpCode);\n }", "title": "" } ]
[ { "docid": "d141e0f008019209e800019093130bf9", "score": "0.80954087", "text": "function errorJSON(){\n header('Content-Type: application/json');\n $output['Error'] = \"Invalid Request\";\n die(json_encode($output));\n }", "title": "" }, { "docid": "d099959ad7eab879be51a3d8e1c690c9", "score": "0.78775406", "text": "public function getErrorResponseJson()\n { \n $data = array();\n \n foreach ($this->_fields as $name => $info) {\n $errors = array();\n if (isset($this->_errors[$name]) && is_array($this->_errors[$name]) && count($this->_errors[$name]) > 0) { \n $errors = $this->_errors[$name];\n }\n $fieldData = ' \"' . $name . '\" : { \"value\" : \"' . $info['value'] . '\"';\n if (count($errors) > 0) {\n $fieldData .= ', \"errors\" : [ \"' . join('\", \"', $errors) . '\" ]';\n }\n $fieldData .= ' }';\n \n $data[] = $fieldData;\n }\n \n $response = '{ \"type\" : \"error\", \"data\" : { ' . join(', ', $data) . ' } }';\n return $response;\n }", "title": "" }, { "docid": "badb1cea85f187d53ed2a95c295f54cb", "score": "0.7675534", "text": "private function json_error($error)\n {\n return response()->json($error,500);\n }", "title": "" }, { "docid": "8f8c1334696981323a58ac85263d65dc", "score": "0.7673064", "text": "function failure($error) {\r\n $data = array();\r\n $data['success'] = false;\r\n $data['error'] = $error;\r\n\r\n header('Content-Type: application/json');\r\n exit(json_encode($data));\r\n}", "title": "" }, { "docid": "f28f0cfdc4a3c6c53170ae03d210ce39", "score": "0.7502434", "text": "private function returnError($message){\n return response()->json([\n 'status' => 'error',\n 'error' => $message\n ], 200);\n }", "title": "" }, { "docid": "948df4c97ad5c8688114dabd692d7d0e", "score": "0.74275595", "text": "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 }", "title": "" }, { "docid": "df5ce73fd159e2cd7b3e7be8fe57374a", "score": "0.74152106", "text": "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}", "title": "" }, { "docid": "0c6b14913bcf99306b29ca2e50363ff6", "score": "0.7381359", "text": "protected function invalidResponse(){\n return response()->json([\n 'ResultCode' => 1,\n 'ResultDesc' => 'Failed to complete the transaction',\n 'ThirdPartyTransID' => 0\n ]);\n\n }", "title": "" }, { "docid": "a36d65f6bb01baa4a6476581507c8226", "score": "0.7359389", "text": "function showjson_error($message) {\n\theader('Content-type: application/json');\n\techo json_encode( array(\"error\" => $message) );\n\texit();\n}", "title": "" }, { "docid": "5efc6916e286b149467d929b88eda404", "score": "0.7305648", "text": "function return_error($code) {\n $return[\"error\"] = $code;\n echo json_encode($return);\n exit();\n}", "title": "" }, { "docid": "e58436192801f11a19d2d2ce6a1fcf9d", "score": "0.730056", "text": "public function failAction()\n {\n //====================================================================//\n // Return Dummy Response\n return new JsonResponse(array('result' => 'Ko'), 500);\n }", "title": "" }, { "docid": "f8ff17e7f676ff0b0bfca1473d4a5d49", "score": "0.7292747", "text": "function Error(){\n header('Content-Type: application/json');\n echo ('false');\n http_response_code(200);\n }", "title": "" }, { "docid": "2b768e1f57e483ea06fac33a617f1950", "score": "0.7277087", "text": "function returnWithError( $err )\n\t{\n\t\t$retValue = json_encode($err);\n\t\tsendResultInfoAsJson( $retValue, JSON_FORCE_OBJECT);\n\t}", "title": "" }, { "docid": "f4388b191c7deef35b8adc87dc1151e5", "score": "0.724598", "text": "function error($message){\n die(json_encode([\"error\"=>true,\"data\"=>$message]));\n}", "title": "" }, { "docid": "15d9c4903c0a4f102622007e7e261f7d", "score": "0.7235205", "text": "private function getError()\n {\n return json_encode(array(\"error\" => $this->errorStack));\n }", "title": "" }, { "docid": "6f2f8dfd40b08247279e0195cf567f7f", "score": "0.7189376", "text": "function jsonErrorResponse($message = 'Error', $code = 400)\n{\n $data = [\n 'success' => false,\n 'code' => $code,\n ];\n\n if (is_array($message)) {\n $data = array_merge($data, $message);\n } else {\n $data['message'] = $message;\n }\n \n return\n response()\n ->json($data, $code);\n}", "title": "" }, { "docid": "6291f3e8468af7093b728292767f9d39", "score": "0.7166429", "text": "private function throwJsonError($status, $error)\n\t\t{\n\t\t\t$response = array('status' => $status, 'error' => $error);\n\t\t\techo json_encode($response);\n\t\t\texit;\n\t\t}", "title": "" }, { "docid": "5bc8dc8203dae6a54112f99656b335dc", "score": "0.7164457", "text": "function errorJson($msg){\n\tprint json_encode(array('error'=>$msg));\n\texit();\n}", "title": "" }, { "docid": "9523cd0c1901fe0525bab26ed2c4ed98", "score": "0.71438235", "text": "function newErr($type, $message) {\n $response = array(\n 'error' => $type,\n 'message' => $message\n );\n return json_encode($response);\n \n }", "title": "" }, { "docid": "dd3cc2d638d03c5c2b8eceb86f0aa2e8", "score": "0.7113844", "text": "public static function error()\n {\n return [\n 'code' => JsonResponse::HTTP_INTERNAL_SERVER_ERROR,\n 'status' => 'error',\n 'message' => 'Oops, something went wrong.'\n ];\n }", "title": "" }, { "docid": "c315adc26553c041b61a8a1fafdbf437", "score": "0.7107255", "text": "private function errorResponse($error)\n {\n $response['status_code_header'] = 'HTTP/1.1 404 Not Found';\n $response['status'] = '400';\n $response['error'] = $error;\n header('HTTP/1.1 404 Not Found');\n echo json_encode($response);\n }", "title": "" }, { "docid": "6946a62936fe8ea16259efd3f3f4fa9a", "score": "0.71003926", "text": "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}", "title": "" }, { "docid": "262e1bc9e41930a1d337ec50991ced1b", "score": "0.7084175", "text": "public function get_errors_json() {\n return json_encode($this->errors);\n }", "title": "" }, { "docid": "64ac7aad371fcbd1ccb1ce9be963889a", "score": "0.7084146", "text": "function error($sql) {\n\tif (defined('DEBUG')) {\n\t\tdie($sql);\n\t}\n\theader('Content-Type: application/json');\n\tdie('{\"result\":\"error\"}');\n}", "title": "" }, { "docid": "e95e6c2998e0bf12f5a17ec517e2af9d", "score": "0.70722663", "text": "function errorResponse ($messsage) {\n header('HTTP/1.1 500 Internal Server Error');\n die(json_encode(array('message' => $messsage)));\n }", "title": "" }, { "docid": "2b6192c504bc74d170c4f2fd86eaa30b", "score": "0.70610595", "text": "public static function getResponseError($code = '')\n {\n return response()->json([\n CommonConstant::KEY_ERROR => [\n CommonConstant::KEY_CODE => $code\n ],\n ], 200);\n }", "title": "" }, { "docid": "dd24e4eb58338420c9c869d77f5facaa", "score": "0.70314646", "text": "function returnWithError( $err ) {\r\n\t\t$retValue = array('error' => $err);\r\n\t\tsendResultInfoAsJson( $retValue );\r\n\t}", "title": "" }, { "docid": "33a7b33482e4748984a53e1f259193a3", "score": "0.70099425", "text": "public function responseError($key, $value) {\n return response()->json([\n 'code' => $key,\n 'message' => $value\n ]\n );\n }", "title": "" }, { "docid": "977c382e899964da68fefbdceba708c4", "score": "0.69798446", "text": "function api_error($code=5000, $data = [], $msg = '')\n{\n if (empty($data)) $data = (object)[];\n if ($msg == '') {\n $msg = config('api_response_code')[$code];\n }\n $json = [\n 'code'=>$code,\n 'data'=>$data,\n 'msg'=>$msg\n ];\n return response()->json($json);\n}", "title": "" }, { "docid": "92fb858fd640ba21b069334b1a48aa28", "score": "0.69670534", "text": "function returnWithError($err)\n\t{\n\t\t$retVal = '{\"id\" : -1, \"error\":\"' . $err . '\"}';\n\t\tsendResultInfoAsJson($retVal);\n\t}", "title": "" }, { "docid": "d10443681e0554c0e8789af12598ae3c", "score": "0.69255334", "text": "function errorOutput($output, $code = 500) {\n http_response_code($code);\n echo json_encode($output);\n}", "title": "" }, { "docid": "df65d293196884f73e8710c981f06bee", "score": "0.69081026", "text": "public function error($data)\n {\n $data = ['erro'=>$data];\n return $this->coreResponse($data);\n }", "title": "" }, { "docid": "e1c007a96d36bb33b6df1b9071de06d6", "score": "0.68942", "text": "private function error404(): JsonResponse\n {\n $mensaje = [\n 'code' => Response::HTTP_NOT_FOUND,\n 'message' => 'Not Found'\n ];\n\n return new JsonResponse(\n $mensaje,\n Response::HTTP_NOT_FOUND\n );\n }", "title": "" }, { "docid": "5fad809cd9f0f65fe86c53a20338e96d", "score": "0.68907446", "text": "public function getErrorResponse()\n {\n $result['responseCode'] = self::RESPONSE_LOGIN_ERROR;\n return $result;\n }", "title": "" }, { "docid": "38ca679c48b747594c886cad3a44d5f3", "score": "0.68703836", "text": "function upload_error($error)\n{\n\techo json_encode(array(\"error\"=>$error));\n}", "title": "" }, { "docid": "a280bf608d3f1e0448a065d7282b0917", "score": "0.6867351", "text": "function json_response($message = 'Error', $code = 500, $data = null)\n{\n header('Content-Type: application/json');\n $response = array(\n 'code' => $code,\n 'data' => $data,\n 'message' => $message\n );\n http_response_code($code);\n echo json_encode($response);\n}", "title": "" }, { "docid": "c1d0ff7aff93141f2b0e45d62c49dde4", "score": "0.6864296", "text": "private function error400(): JsonResponse\n {\n $mensaje = [\n 'code' => Response::HTTP_BAD_REQUEST,\n 'message' => 'Bad Request'\n ];\n\n return new JsonResponse(\n $mensaje,\n Response::HTTP_BAD_REQUEST\n );\n }", "title": "" }, { "docid": "3dc4991009c672d99ca7e1b3895956db", "score": "0.68562126", "text": "protected function get_json_last_error()\n {\n }", "title": "" }, { "docid": "248229b89514d387d9b08dc209138895", "score": "0.683014", "text": "public function getErrors(){\n echo json_encode($this->errors, JSON_PRETTY_PRINT);\n }", "title": "" }, { "docid": "530569b81fc674972cd0bf1972670a96", "score": "0.67862606", "text": "public function error(BaseResponse $response);", "title": "" }, { "docid": "f258d8170cb4fc62e38de2ae3af190c6", "score": "0.67781025", "text": "private function error()\n {\n $json = array_merge($this->data, ['message' => $this->error, 'class' => 'error']);\n wp_send_json($json);\n }", "title": "" }, { "docid": "5fbf92ee4ecda8455338b30318d523a1", "score": "0.676583", "text": "function admin_error($code = 5000, $data = [], $msg = '')\n{\n if (empty($data)) $data = (object)[];\n if ($msg == '') {\n $msg = config('admin_response_code')[$code];\n }\n $json = [\n 'code'=>$code,\n 'data'=>$data,\n 'msg'=>$msg\n ];\n return response()->json($json);\n}", "title": "" }, { "docid": "5c864fc0c9ef63393c321fb633c93da7", "score": "0.67589325", "text": "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}", "title": "" }, { "docid": "8bc364aabd7e1f2dd105491eb30ef84f", "score": "0.6740404", "text": "public static function error($params = array())\n {\n $response = new static(json_encode($params));\n $response\n ->set_status(400)\n ->header('Content-type', 'application/json');\n return $response;\n }", "title": "" }, { "docid": "0a0cb9e606aa1563d1dcc4d5c5f2b91f", "score": "0.6737759", "text": "function returnWithError($error) {\n $returnValue = '{\"characterNames\": \"\", \"campaignNames\": \"\", \"campaignIDs\": \"\", \"characterID\": \"\",\"DMs\": \"\", \"partySizes\": \"\", \"error\": \"' . $error . '\"}';\n sendResultInfoAsJson($returnValue);\n}", "title": "" }, { "docid": "ba5de2e163f2ca50025744cc1b479569", "score": "0.67340386", "text": "function json_response($code = 200, $message = null, $error = false)\n{\n header_remove();\n // set the actual code\n http_response_code($code);\n // set the header to make sure cache is forced\n header('Cache-Control: no-transform,public,max-age=300,s-maxage=900');\n // treat this as json\n header('Content-Type: application/json');\n $status = array(\n 200 => '200 OK',\n 400 => '400 Bad Request',\n 404 => '404 Not Found',\n 422 => 'Unprocessable Entity',\n 500 => '500 Internal Server Error'\n );\n // ok, validation error, or failure\n header('Status: '.$status[$code]);\n // return the encoded json\n if ($error){\n return json_encode(array(\n 'status' => $status[$code] === 200,\n 'error' => array('errorCode'=>0,'message' => $message)\n ));\n }\n return json_encode(array(\n 'success' => array('message' => $message)\n ));\n}", "title": "" }, { "docid": "817ddfa5e528e60802adaa5b5ac168b3", "score": "0.67135173", "text": "function json_error($message, $extra = NULL, $die = TRUE){\r\n\t$json_out = array(\r\n\t\t\"status\" => \"2\",\r\n\t\t\"message\" => $message\r\n\t);\r\n\tif(is_array($extra)){\r\n\t\t$json_out = array_merge($json_out, $extra);\r\n\t}\r\n\tif($die){\r\n\t\tdie(json_encode($json_out));\r\n\t}else{\r\n\t\treturn $json_out;\r\n\t}\r\n}", "title": "" }, { "docid": "96e7a9cb0d7d44cf0262adff4bc954ca", "score": "0.67090815", "text": "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}", "title": "" }, { "docid": "c55d4b6ddca69a4eb8d5d7a851a7d1e4", "score": "0.6690925", "text": "protected function sendFailedLoginResponse()\n {\n return response()->json([\n 'message' => $this->errorMessage,\n ], 401);\n }", "title": "" }, { "docid": "f760f0462c53fce9a0f6edd0834a2e43", "score": "0.6682365", "text": "function json_error ($msg='', $retval=null, $jqremote = false)\r\n {\r\n if (!empty($msg))\r\n {\r\n $msg = Lang::get($msg);\r\n }\r\n $result = array('done' => false , 'msg' => $msg);\r\n if (isset($retval)) $result['retval'] = $retval;\r\n\r\n $this->json_header();\r\n $json = ecm_json_encode($result);\r\n if ($jqremote === false)\r\n {\r\n $jqremote = isset($_GET['jsoncallback']) ? trim($_GET['jsoncallback']) : false;\r\n }\r\n if ($jqremote)\r\n {\r\n $json = $jqremote . '(' . $json . ')';\r\n }\r\n\r\n echo $json;\r\n }", "title": "" }, { "docid": "e65bb8f04e392aceff1a35dd5e671da0", "score": "0.66754025", "text": "private function send_error($error) {\n header('Content-Type: application/json');\n echo json_encode(array(\n 'error' => $error\n ));\n return;\n }", "title": "" }, { "docid": "52ad3f4191867365ba2c1cf43c7c1789", "score": "0.6674429", "text": "function invalidMethodResponse(){\n\n $return = array(\n 'status' => 400,\n 'message' => \"Bad method given\"\n );\n\n http_response_code(400);\n\n //Send back response to client. \n print_r(json_encode($return));\n\n}", "title": "" }, { "docid": "31cc56f3ab8df7b6e01b27681f47d257", "score": "0.6669552", "text": "function json_response($code = 200, $message = null, $error = false)\n{\n header_remove();\n // set the actual code\n http_response_code($code);\n // set the header to make sure cache is forced\n header('Cache-Control: no-transform,public,max-age=300,s-maxage=900');\n // treat this as json\n header('Content-Type: application/json');\n $status = array(\n 200 => '200 OK',\n 201 => '201 Created',\n 400 => '400 Bad Request',\n 401 => '401 Unauthorized',\n 404 => '404 Not Found',\n 409 => '409 Conflict',\n 422 => 'Unprocessable Entity',\n 500 => '500 Internal Server Error'\n );\n // ok, validation error, or failure\n header('Status: '.$status[$code]);\n // return the encoded json\n if ($error){\n return json_encode(array(\n 'status' => $status[$code] === 200,\n 'error' => array('errorCode'=>0,'message' => $message)\n ));\n }\n return json_encode(array(\n 'success' => array('message' => $message)\n ));\n}", "title": "" }, { "docid": "025f1733fdc4a4152668341e0ab56e91", "score": "0.6666621", "text": "public function index() {\r\n header(\"Content-Type: application/json\");\r\n header(\"HTTP/1.1 404\", true, 404);\r\n\r\n $response = $this->apiv1_core->errorResponse(404001, '');\r\n echo json_encode($response);\r\n return;\r\n }", "title": "" }, { "docid": "eb098c12bcac6ee465c1fdd9ecd60be0", "score": "0.66530806", "text": "protected function errorResponse($message = null, $code = 422)\n {\n return response()->json([\n 'status'=>'Error!',\n 'errors' => $message,\n 'data' => null\n ], $code);\n }", "title": "" }, { "docid": "497ef163e99753c78e0cd3b7947a33df", "score": "0.66466826", "text": "private function unprocessableResponse() {\r\n $response['status_code_header'] = HTTP_UNPROCESSABLE;\r\n $response['body'] = json_encode([\r\n 'error' => 'Invalid input'\r\n ]);\r\n\r\n return $response;\r\n }", "title": "" }, { "docid": "ba6efe83c72f4bfa6ea5c39e958f39a4", "score": "0.6637486", "text": "protected function getError()\n {\n return json_encode([\n '__type' => basename(__CLASS__) . 'Exception',\n 'Errors' => [\n [\n 'Code' => basename(__CLASS__) . 'CurlError',\n 'Message' => curl_error($this->handler) .'.'\n ]\n ]\n ]);\n }", "title": "" }, { "docid": "10e1ae1811c07031316bf6abe4ff807c", "score": "0.66181207", "text": "public function index(): JsonResponse\n {\n $this->authorize('index', ErrorLog::class);\n\n $params = request()->validate([\n 'person_id' => 'sometimes|integer',\n 'sort' => 'sometimes|string',\n\n 'starts_at' => 'sometimes|datetime',\n 'ends_at' => 'sometimes|datetime',\n\n 'error_type' => 'sometimes|string',\n\n 'page' => 'sometimes|integer',\n 'page_size' => 'sometimes|integer',\n ]);\n\n $result = ErrorLog::findForQuery($params);\n\n return $this->success($result['error_logs'], $result['meta'], 'error_logs');\n }", "title": "" }, { "docid": "a90831324291dd4e9d565fa36e1ef2e9", "score": "0.6613368", "text": "public function response(array $errors)\n\t{\n//\t\ttried but didn't work\n//\t\t return Response::json(array(\n//\t\t\t\t array(\n//\t\t\t\t 'message' => 'Validation Failed',\n//\t\t\t\t 'errors' => $errors),\n//\t\t\t \t\t'404'\n//\t\t\t )\n//\n//\t\t );\n\t\t$e = array(\n\t\t\t'error' => 'Validation Failed',\n\t\t\t'errors' => $errors);\n\t\treturn response($e, 400)->header('Content-Type', 'application/json');\n\n\t}", "title": "" }, { "docid": "ab0a4f1cf25934213f776d37651761b3", "score": "0.66012406", "text": "function showError(){\n\t\techo json_encode(array(\n\t\t\t\"alert\" => \"error\",\n\t\t\t\"title\" => \"Failed to Create!\",\n\t\t\t\"message\" => \"Course Creation has been Failed\"\n\t\t));\n\t}", "title": "" }, { "docid": "a26de715144922c24a30df0edfd7009d", "score": "0.65976083", "text": "function upload_error($error)\n{\n echo json_encode(array(\"error\"=>$error));\n}", "title": "" }, { "docid": "23c2b923aca81546dacf204a34e13a4b", "score": "0.65951407", "text": "public function errorJson()\n {\n return function ($message='Default Error Massage',$error_code='404'){\n return [\n 'message'=> $message,\n 'error_code'=>$error_code\n ];\n };\n }", "title": "" }, { "docid": "22c50bd87d13cc7df041639b1112eb86", "score": "0.65949374", "text": "private function error422(): JsonResponse\n {\n $mensaje = [\n 'code' => Response::HTTP_UNPROCESSABLE_ENTITY,\n 'message' => 'Unprocessable Entity'\n ];\n\n return new JsonResponse(\n $mensaje,\n Response::HTTP_UNPROCESSABLE_ENTITY\n );\n }", "title": "" }, { "docid": "a985afc07d80181bd5a0c5660cfb147d", "score": "0.6589686", "text": "function setErrorHeader($message){\n\thttp_response_code(404);\n\theader('Content-Type: application/json');\n\techo $message;\n}", "title": "" }, { "docid": "b79cc73d11266e3d150d46676ec45e64", "score": "0.6588355", "text": "function json_error_msg($msg){\n return json_encode('{ \"msg\":\"Error: ' . $msg . '\", \"success\":\"error\" }');\n}", "title": "" }, { "docid": "3e3e4a075628fec37171de31348e1bc8", "score": "0.6577877", "text": "function getErrorMessage(){\n\t$rawerrormessage = array(\"loginError\" => \"User has been logged out\");\n\t$errormessage = json_encode($rawerrormessage);\n\treturn $errormessage;\n}", "title": "" }, { "docid": "5fa06a66604f8297528d027adaa8993b", "score": "0.65456516", "text": "function constructError($e)\n{\n\treturn json_encode(array('status' => 'Failed', 'error' => '\"' . $e . '\"'));\n}", "title": "" }, { "docid": "b54ccb80447d3815078933209671639e", "score": "0.65288275", "text": "private function _throwJSONException( $e ) {\n\t\treturn new JsonResponse( array('success'=>false, 'errorMessage'=>$e->getMessage(), 'errorCode'=>$e->getCode() ) );\n\t}", "title": "" }, { "docid": "1568902c5a0a2bdf31e091b66a6ae694", "score": "0.6527655", "text": "public function badRequestResponse(){\n $this->response->statusCode(400);\n return $this->response;\n }", "title": "" }, { "docid": "43b2b1f28f6bf168d86d0e1f0feed6f6", "score": "0.6507863", "text": "protected function renderJsonNotFoundOutput()\n {\n return '{\"message\":\"Not found\"}';\n }", "title": "" }, { "docid": "4c604b0acbd7e37632675f15abb3f05a", "score": "0.6507399", "text": "public function actionError()\n {\n if($error=Yii::app()->errorHandler->error)\n {\n if($error['code'] != 404 || !isset($aErrorMsg[$error['errorCode']])){\n Yii::log(' error : ' . $error['file'] .\":\". $error['line'] .\":\". $error['message'], 'error', 'system');\n }\n $ret = new ReturnInfo(FAIL_RET, Yii::t('exceptions', $error['message']), intval($error['errorCode']));\n if(Yii::app()->request->getIsAjaxRequest()){\n echo json_encode($ret);\n \n }else{\n if( empty($error['errorCode']) ){\n if(isset($this->aErrorMsg[$error['code']])){\n if(empty($this->aErrorMsg[$error['code']]['message'])) {\n $this->aErrorMsg[$error['code']]['message'] = $error['message'];\n }\n $this->render('error', $this->aErrorMsg[$error['code']]);\n }else{\n $this->render('error', $this->aErrorMsg['1000']);\n }\n }else{\n $this->render('error', $this->aErrorMsg[ $error['errorCode'] ]);\n \n }\n }\n \n } \n }", "title": "" }, { "docid": "6873647a9b132cd6b04df29c4d64974c", "score": "0.6502767", "text": "public function respondWithError($message = null)\n {\n $data['error']['message'] = $message;\n if ($this->errorCode) {\n $data['error']['error_code'] = $this->errorCode;\n }\n if (env('APP_DEBUG', 'false')) {\n $data['error']['error_details'] = (!!$this->exception) ? $this->exception : null;\n //log the exception for monitoring\n Log::error($this->exception);\n }\n $data['status'] = $this->customStatusCode;\n return $this->respond($data);\n }", "title": "" }, { "docid": "5d3a3f036bfae2fb530daad5ff8f5b45", "score": "0.64962846", "text": "function returnWithError($error) {\n $returnValue = '{\"campaignID\": \"\", \"error\": \"' . $error . '\"}';\n sendResultInfoAsJson($returnValue);\n}", "title": "" }, { "docid": "e0538f1768929b48b87bfc839a183e43", "score": "0.64911157", "text": "public function throw()\n {\n $response = new JsonResponse($this->getResponse(), $this->code);\n\n die($response->send());\n }", "title": "" }, { "docid": "c8555d458b8524eef049f80ec7c1c04b", "score": "0.6471807", "text": "function sendError($errorText){\n echo json_encode(array(\n 'status' => '50x',\n 'infotext' => $errorText\n ));\n die();\n}", "title": "" }, { "docid": "f79c5b09f0e242d5986e626ea8209e64", "score": "0.64570135", "text": "public function getJson()\n {\n $response = [];\n\n $response['type'] = config('phpvms.error_root').'/'.$this->getErrorType();\n $response['title'] = $this->getMessage();\n $response['details'] = $this->getErrorDetails();\n $response['status'] = $this->getStatusCode();\n\n // For backwards compatibility\n $response['error'] = [\n 'status' => $this->getStatusCode(),\n 'message' => $this->getErrorDetails(),\n ];\n\n return array_merge($response, $this->getErrorMetadata());\n }", "title": "" }, { "docid": "b9240e31338249d72a2511c16c906567", "score": "0.6456807", "text": "public function render()\n {\n if(strstr($this->getMessage(), 'PDOException: SQLSTATE[')) {\n if(preg_match('/SQLSTATE\\[(\\w+)\\]:(.*):(\\s+\\d)(.*):(.*)/', $this->getMessage(), $matches) === false) {\n $this->message = 'Generic SQL exception unhandled';\n }\n else {\n $this->message = empty($matches[5]) ? 'Generic SQL exception unhandled' : trim($matches[5]);\n }\n }\n else {\n $this->message = 'Generic SQL exception unhandled';\n }\n\n return response()->json(['message' => $this->getMessage()], 409);\n }", "title": "" }, { "docid": "29f604bffee17627291ef765118c15dd", "score": "0.64424026", "text": "public function jsonSerialize()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "89a87f7c785310c66b9ff0f3f5e91829", "score": "0.6438298", "text": "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 }", "title": "" }, { "docid": "801fe8ff4091a2752bf73c849cd19500", "score": "0.6432647", "text": "public static function buildInvalidJsonResponse(): static\n {\n $dto = static::buildBadRequestErrorResponse();\n $dto->setMessage(self::MESSAGE_INVALID_JSON);\n return $dto;\n }", "title": "" }, { "docid": "17939dd005ba968eb363738ec2fdce05", "score": "0.6421113", "text": "function missingParamToPostResponse(){\n\n $return = array(\n 'status' => 400,\n 'message' => \"Missing params to post.\"\n );\n\n http_response_code(400);\n\n //Send back response to client. \n print_r(json_encode($return));\n\n}", "title": "" }, { "docid": "ca2b1facb716ff9ac93096776d8e78f5", "score": "0.64209217", "text": "public function getError()\n {\n\n if (!$this->getResponse()) {\n return null;\n }\n\n if ($this->isOK()) {\n return null;\n }\n\n $message = ($this->getResponse()->getStatusCode() ? $this->getResponse()->getStatusCode() . ' ' : '') .\n ($this->getResponse()->getReasonPhrase() ? $this->getResponse()->getReasonPhrase() : 'Unknown response reason phrase');\n\n try {\n\n $data = $this->getJson();\n\n if (!empty($data->message)) {\n $message = $data->message;\n }\n\n if (!empty($data->error_description)) {\n $message = $data->error_description;\n }\n\n if (!empty($data->description)) {\n $message = $data->description;\n }\n\n } catch (Exception $e) {\n }\n\n return $message;\n\n }", "title": "" }, { "docid": "278e72de665e414239756bb3c04ff51c", "score": "0.64201814", "text": "function report_error($msg) {\n print json_encode ( array (\n \"ResultSet\" => array(\"Result\" => array()),\n \"Message\" => $msg\n ));\n exit;\n}", "title": "" }, { "docid": "edf52f6bc3bf7b54db9c313f57cd4b6e", "score": "0.6419307", "text": "function jsonError($error) {\n\tswitch ( $error ) {\n\t\tcase JSON_ERROR_NONE:\n\t\t\treturn \"No error occurred\";\n\t\t\tbreak;\n\t\tcase JSON_ERROR_DEPTH:\n\t\t\treturn \"The maximum stack depth has been exceeded\";\n\t\t\tbreak;\n\t\tcase JSON_ERROR_STATE_MISMATCH:\n\t\t\treturn \"Invalid or malformed JSON\";\n\t\t\tbreak;\n\t\tcase JSON_ERROR_CTRL_CHAR:\n\t\t\treturn \"Control character error, possibly incorrectly encoded\";\n\t\t\tbreak;\n\t\tcase JSON_ERROR_SYNTAX:\n\t\t\treturn \"Syntax error\";\n\t\t\tbreak;\n\t\tcase JSON_ERROR_UTF8:\n\t\t\treturn \"Malformed UTF-8 characters, possibly incorrectly encoded\";\n\t\t\tbreak;\n\t\tcase JSON_ERROR_RECURSION:\n\t\t\treturn \"One or more recursive references in the value to be encoded\";\n\t\t\tbreak;\n\t\tcase JSON_ERROR_INF_OR_NAN:\n\t\t\treturn \"One or more NAN or INF values in the value to be encoded\";\n\t\t\tbreak;\n\t\tcase JSON_ERROR_UNSUPPORTED_TYPE:\n\t\t\treturn \"A value of a type that cannot be encoded was given\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn \"Unknown error\";\n\t\t\tbreak;\n\t}\n}", "title": "" }, { "docid": "b84d3e6940f6400114927b71fda39db7", "score": "0.6418727", "text": "public function record(): JsonResponse\n {\n $data = request()->input('data');\n $url = request()->input('url');\n $personId = request()->input('person_id');\n $errorType = request()->input('error_type');\n\n $record = [\n 'error_type' => $errorType,\n 'ip' => request_ip(),\n 'url' => $url,\n 'user_agent' => request()->userAgent(),\n 'data' => $data,\n ];\n\n if (is_numeric($personId)) {\n $record['person_id'] = $personId;\n }\n\n $log = new ErrorLog($record);\n $log->save();\n\n return $this->success();\n }", "title": "" }, { "docid": "6bc45517a06c288aa051eb3fbe4c54dc", "score": "0.64170563", "text": "public function render(): JsonResponse\n {\n return response()->json([\n 'message' => \"This item not exists in trash.\",\n 'status' => 400\n ],400);\n }", "title": "" }, { "docid": "b2ac26adb4a17d31d07e5fb2cdb6ff70", "score": "0.64150655", "text": "public static function throwRequestNotFoundException()\n {\n return Response::json([\n 'message' => 'Your request could not be found try again'\n ], 300);\n }", "title": "" }, { "docid": "499458ffdff1d4081c7373a31b3e693f", "score": "0.6412931", "text": "function json_response($code = 200, $message = null)\n{\n header_remove();\n // set the actual code\n http_response_code($code);\n // set the header to make sure cache is forced\n header(\"Cache-Control: no-transform,public,max-age=300,s-maxage=900\");\n // treat this as json\n header('Content-Type: application/json');\n $status = array(\n 200 => '200 OK',\n 400 => '400 Bad Request',\n 422 => 'Unprocessable Entity',\n 500 => '500 Internal Server Error'\n );\n // ok, validation error, or failure\n header('Status: '.$status[$code]);\n // return the encoded json\n return json_encode(array(\n 'status' => $code < 300, // success or not?\n 'message' => $message\n ));\n}", "title": "" }, { "docid": "4ffa68a8e31b5251317c81e34f33e3a0", "score": "0.6405007", "text": "private function getJsonException(\\Exception $e)\n {\n $file = Path::makeRelative($e->getFile(), $this->app['path_resolver']->resolve('root'));\n\n $error = [\n 'error' => [\n 'type' => get_class($e),\n 'file' => $file,\n 'line' => $e->getLine(),\n 'message' => $e->getMessage(),\n ],\n ];\n\n return new JsonResponse($error, Response::HTTP_INTERNAL_SERVER_ERROR);\n }", "title": "" }, { "docid": "e0bca3e5b54729de6cee5d81f6f2bbd9", "score": "0.6404014", "text": "function showError(){\n\t\techo json_encode(array(\n\t\t\t\"alert\" => \"error\",\n\t\t\t\"title\" => \"Failed to Update!\",\n\t\t\t\"message\" => \"Program Updating has been Failed\"\n\t\t));\n\t}", "title": "" }, { "docid": "333dac656ea0917a751c087cbf39d7a6", "score": "0.6399705", "text": "protected function respondError(string $message, int $code = 500)\n {\n return response()->json(['error' => $message], $code);\n }", "title": "" }, { "docid": "77d2fe277b4de2ac571162b08109e066", "score": "0.6396451", "text": "function api_error($err_code, $err_message, $err_data = null, $id = null) {\n $err = ['code'=>$err_code, 'message'=>$err_message];\n if (!is_null($err_data)) $err['data'] = $err_data;\n return api_return($err, $id, 'error');\n}", "title": "" }, { "docid": "037a276fb7bbe03970b764c14398cf45", "score": "0.6395404", "text": "protected function failure()\n {\n $this->response = $this->response->withStatus(400);\n $this->jsonBody($this->payload->getInput());\n }", "title": "" }, { "docid": "b92fe07d65d55b1873fc848b8cf2c734", "score": "0.6391329", "text": "protected function errorResponse($message, $code)\n {\n return response()->json(['error' => $message, 'code' => $code], $code);\n }", "title": "" }, { "docid": "b8034155a5f955f0ccd974e057cf8243", "score": "0.63858044", "text": "public static function throwResourceNotFoundException()\n {\n return Response::json([\n 'message' => \"Your request dosen't contain any resources\"\n ], 404);\n }", "title": "" }, { "docid": "cbed9dd781649908530298f55d1b310f", "score": "0.6381289", "text": "protected function respondInternalError($message)\n {\n return response()->json([\n 'success' => false,\n 'message' => $message\n ], 500);\n }", "title": "" }, { "docid": "f502f8d9d1acdbe05b8797b6fb976596", "score": "0.6375409", "text": "public function serverErrorAlert($message, \\Exception $exception = null): JsonResponse\n {\n if (null !== $exception) {\n Log::error(\"{$exception->getMessage()} on line {$exception->getLine()} in {$exception->getFile()}\");\n }\n\n $response = [\n 'statusCode' => config('jobberman.status_codes.server_error'),\n 'statusText' => config('jobberman.status_texts.server_error'),\n 'message' => $message,\n ];\n\n if (null !== $exception) {\n $response['exception'] = $exception->getMessage();\n }\n\n return Response::json($response, config('jobberman.status_codes.server_error'));\n }", "title": "" }, { "docid": "e700c2859f4ba07ed306d4c818a78462", "score": "0.63730407", "text": "protected function failure(string $message)\n {\n return response()->json([\n 'success' => false,\n 'msg' => $message,\n ]);\n }", "title": "" }, { "docid": "8cecd3f49c489d822c890e655b70d1c7", "score": "0.63583773", "text": "private function tokenNotFoundError() {\n return response()->json([\n 'error' => 'Either your email or token is wrong.'\n ], Response::HTTP_UNPROCESSABLE_ENTITY);\n }", "title": "" }, { "docid": "20b2d46a7cfaec6f2bccad4b5ab7a666", "score": "0.6347432", "text": "public function getInvalidUserResponse()\n {\n $result['responseCode'] = self::RESPONSE_INVALID_USER;\n return $result;\n }", "title": "" }, { "docid": "b9cd80fd1578089b5032b90e4fc22de6", "score": "0.6340187", "text": "protected function error(string $message, int $code = 400, array $errors = []) : JsonResponse\n {\n return response()->json([\n 'status' => 'error',\n 'message' => $message,\n 'errors' => $errors\n ], $code);\n }", "title": "" } ]
11dd3152c7a7f9151f19f7ec9c599c8a
Login to admin area and save information to session.
[ { "docid": "6873ee6883e6ad80da1ca3b1b10f7307", "score": "0.0", "text": "public function login($data)\n {\n $required = array(\n 'email' => 'Email required',\n 'password' => 'Password required',\n );\n $validator = $this->di['validator'];\n $validator->checkRequiredParamsForArray($required, $data);\n\n $config = $this->getMod()->getConfig();\n\n //check ip\n // if(isset($config['allowed_ips']) && isset($config['check_ip']) && $config['check_ip']) {\n // $allowed_ips = explode(PHP_EOL, $config['allowed_ips']);\n // if(!empty($allowed_ips)) {\n // $allowed_ips = array_map('trim', $allowed_ips);\n // if(!in_array($this->getIp(), $allowed_ips)) {\n // throw new \\Box_Exception('You are not allowed to login to admin area from :ip address', array(':ip'=>$this->getIp()), 403);\n // }\n // }\n // }\n\n return $this->getService()->login($data['email'], $data['password'], $this->getIp());\n }", "title": "" } ]
[ { "docid": "b03755a711730f3c8406e593b972d6f6", "score": "0.82231164", "text": "public function admin_login()\n {\n if( $_POST && isset($_POST['login']) && isset($_POST['password'])){\n $user = $this->model->getByLogin($_POST['login']);\n $hash = md5(Config::get('salt').$_POST['password']);\n if($user && $user['is_active'] && $hash == $user['password']){\n Session::set('login', $user['login']);\n Session::set('user_id', $user['id']);\n Session::set('role', $user['role']);\n }\n Router::redirect('/admin/pages/index');\n }\n }", "title": "" }, { "docid": "8adc0c7db1d6b0a8a6c82c61742cacff", "score": "0.77850896", "text": "public function postAdminLogin()\n\t{\n\t\t$details=Input::post(['name','password']);\n\t\tif ($user=Admins::login($details)) \n\t\t{\n\t\t\t$_SESSION['user']=json_encode($user);\n\t\t}\n\t\telse\n\t\t{\n\t\t\theader('location:/admin?error=1');\n\t\t\tdie;\n\t\t}\n\t\theader('location:/dashboard');\n\t}", "title": "" }, { "docid": "f907a71fc29652e7549719ddab4db508", "score": "0.76089215", "text": "public function success_adminLogin() {\n if($this->_result[1]) {\n $_SESSION['userName'] = \"active_admin\";\n }\n }", "title": "" }, { "docid": "f040b183a84482fe652ec2587bcfdd0d", "score": "0.7531026", "text": "public function loginIn() {\n\t\t\t$username = $_POST['username'];\n\t\t\t$password = md5($_POST['password']);\n\t\t\t$user = $this->user->getMember($username, $password);\n\t\t\tif ($user) {\n\t\t\t\tSession::set('user_id', $user['id']);\n\t\t\t}\n\t\t\theader('Location: '.SITE_URL.'admin');\n\t\t}", "title": "" }, { "docid": "efb7ce0ea9c7bb01c62fabae1a86c635", "score": "0.749", "text": "protected function doLogin() {\n\t\tif($_POST['usr'] == 'admin' && $_POST['pwd'] == 'admin1') {\n\t\t\t$_SESSION['uid'] = 1;\n\t\t} else {\n\t\t\tsession_destroy();\n\t\t\t$this->message = 'Login faild!';\n\t\t}\n\t}", "title": "" }, { "docid": "f669c4e6de75c730337df9d098de3938", "score": "0.7473245", "text": "protected function login()\n {\n if (isset($_POST['stayonline']) && $_POST['stayonline'] == 1) {\n admin_set_cookie($_POST['username'], $_POST['userpassword']);\n }\n\n if (isset($_COOKIE['login']) && $_COOKIE['login'] && !is_authorized()) {\n $userpassword = substr($_COOKIE['login'], 0, 32);\n $username = substr($_COOKIE['login'], 32, strlen($_COOKIE['login']));\n admin_login($username, $userpassword, TRUE);\n }\n\n if (isset($_POST['login']) && $_POST['login'] == 1 && !is_authorized()) {\n admin_login($_POST['username'], $_POST['userpassword'], false);\n }\n }", "title": "" }, { "docid": "250f94bc8dc1e3048fe25819b902d924", "score": "0.7459616", "text": "public function admin_login() \n\t{\n\t\tredirect('login/login_admin');\n\t}", "title": "" }, { "docid": "16063d4bb4831f5939b6b34ad1096400", "score": "0.7451708", "text": "protected function logInAsAdmin()\n {\n $session = $this->client->getContainer()->get('session');\n\n $firewallContext = 'main';\n\n $token = new UsernamePasswordToken('admin', null, $firewallContext, array('ROLE_ADMIN'));\n $session->set('_security_'.$firewallContext, serialize($token));\n $session->save();\n\n $cookie = new Cookie($session->getName(), $session->getId());\n $this->client->getCookieJar()->set($cookie);\n }", "title": "" }, { "docid": "f173e1a26574172f0ac702194a4d31aa", "score": "0.7444455", "text": "public function admin_login() {\n\t\tif($this->Session->check('Auth.User')){\n\t\t\t$this->redirect(array('action' => 'admin_index'));\t\t\n\t\t}\n\t\t\n\t\t// if we get the post information, try to authenticate\n\t\tif ($this->request->is('post')) {\n\t\t\tif ($this->Auth->login()) {\n\t\t\t\t//pr($this->Auth); exit;\n\t\t\t\t$this->Session->setFlash(__('Welcome, '. $this->Auth->user('username')));\n\t\t\t\t$this->redirect($this->Auth->redirectUrl());\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Invalid username or password'));\n\t\t\t}\n\t\t} \n\t}", "title": "" }, { "docid": "26d22408e0739b5e649c22f33aa50f0e", "score": "0.74315345", "text": "public function setAdminSession()\n\t{\n\t\t$this->setAuthenticatedSession();\n\t}", "title": "" }, { "docid": "b572adaf12003c0a11d9f317731e954d", "score": "0.73564994", "text": "function admin_login() {\n\t global $class_admin;\n\n\t $this->se_admin(0, $_POST['username']);\n\n\t // SHOW ERROR IF JAVASCRIPT IS DIABLED\n\t if(isset($_POST['javascript']) & $_POST['javascript'] == \"no\") {\n\t $this->is_error = 1;\n\t $this->error_message = $class_admin[1];\n\t } elseif($this->admin_exists == 0) {\n\t $this->is_error = 1;\n\t $this->error_message = $class_admin[2];\n\t } elseif(crypt($_POST['password'], $this->admin_salt) != $this->admin_info[admin_password]) {\n\t $this->is_error = 1;\n\t $this->error_message = $class_admin[2];\n\t } else {\n\t setcookie(\"admin_id\", $this->admin_info[admin_id], 0, \"/\");\n\t setcookie(\"admin_username\", crypt($this->admin_info[admin_username], $this->admin_salt), 0, \"/\");\n\t setcookie(\"admin_password\", $this->admin_info[admin_password], 0, \"/\");\n\t }\n\n\t}", "title": "" }, { "docid": "6137d14669449898aeed9894b3c3c342", "score": "0.73496705", "text": "function login_admin()\n\t{\n\t\t$this->template->write('title', 'Administration');\n\t\tif ($this->input->post())\n\t\t{\n\t\t\tif (isset($_POST['username']) && isset($_POST['password']))\n\t\t\t{\n\t\t\t\t$data = array('username' => $_POST['username'], 'password' => $_POST['password']);\n\t\t\t\t$user = $this->auth_model->validate($data);\n\t\t\t\tif ($user)\n\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$this->session->set_userdata('is_admin_logged_in', true);\n\t\t\n\t\t\t\t\tredirect('admin');\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->template->write('msg_error', '<div class=\"alert alert-error\">Wrong username/password</div>');\n\t\t\t\n\t\t}\n\t\t$this->template->render();\n\t\t\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "18d761fcd86834f598589feb22e3ea18", "score": "0.73001033", "text": "public function do_login()\n\t\t{\n\t\t\t$this->form_validation->set_rules('email', 'Email', 'required|valid_email');\n\t\t\t$this->form_validation->set_rules('password', 'Password', 'required');\n\n\t\t\tif ($this->form_validation->run() == FALSE)\n\t\t\t\t$this->page('login_admin', array('title' => 'Admin Login')); \n\t\t\telse{\n\t\t\t\t$post = $this->input->post();\n\t\t\t\t$clean = $this->security->xss_clean($post);\n\n\t\t\t\t$user_info = $this->mdl->check_login($clean);\n\t\t\t\t\n\t\t\t\tif (!$user_info) {\n\t\t\t\t\t$this->session->set_flashdata('flash_messsage', 'The login was unsuccessful');\n\t\t\t\t\tredirect('admin');\n\t\t\t\t}\n\n\t\t\t\tforeach ($user_info as $key => $value) \n\t\t\t\t\t$this->session->set_userdata($key.'_admin', $value);\n\n\t\t\t\t$this->session->set_userdata('session_admin', 'true');\n\n\t\t\t\tredirect(site_url().'administrator');\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "1799bd194b9d0efe40ccbc4685ec7b29", "score": "0.7281295", "text": "function login()\n{\n\t$username = $_POST['username'];\n\t$password = $_POST['password'];\n\t$result = admin()->get(\"username='$username' and password = '$password' and level='admin'\");\n\tif ($result){\n\t\t$_SESSION['admin_session'] = $username;\n\t\theader('Location: index.php');\n\t}\n\telse {\n\t\t\theader('Location: index.php?error=User not found in the Database');\n\t}\n}", "title": "" }, { "docid": "04b1c6778054e5f246c91fb4e130c7d8", "score": "0.7269793", "text": "public function iLoginAsAAdminUser()\n {\n $this->iLoginWithAnd(\n '[email protected]',\n 'xxx',\n '/admin/login'\n );\n }", "title": "" }, { "docid": "5be3c0f172749084c8c8bb9b0ba4d9df", "score": "0.7263122", "text": "public function admin_login() {\n\t\t$this->layout = FALSE;\n\t\tif($this->data){ //pr($this->data);die;\n\t\t\tif ($this->Auth->login()) {\n\t\t\t\tif(AuthComponent::User('role_id') == 1){\n\t\t\t\t\t$this->Session->setFlash('<div class=\"green\">Welcome ' . AuthComponent::User('email') . ' !!</div>');\n\t\t\t\t\t$this->redirect(array(\"controller\" => \"Users\", \"action\" => \"dashboard\"));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$this->Auth->logout();\n\t\t\t\t\t$this->Session->setFlash('Access by administrative authorities only !!');\n $this->redirect($this->referer());\n\t\t\t\t}\n } else {\n $this->Session->setFlash('Invalid username or password !!');\n\t\t\t\t$this->redirect($this->referer());\n }\n\t\t}\n\t}", "title": "" }, { "docid": "0ab285c19730f0177c4fc3de1fd9621f", "score": "0.72290486", "text": "public function admin_login()\n {\n if($this->Session->check('user') && $this->Session->read('user') == 1){\n $this->redirect(array('controller' => 'users','action'=>'dashboard','admin'=>true));\n }\n if($this->request->is('post')){\n $info_user = $this->request->data;\n $query = $this->User->findByEmailAndPasswordAndPermissionId($info_user['User']['email'],$info_user['User']['password'],2);\n if(count($query)){\n $this->Session->write('users',1);\n $this->redirect(array('controller' => 'Users', 'action' => 'dashboard'));\n }else{\n $this->Session->setFlash('User or Password is invalid. Please try again.');\n }\n }\n }", "title": "" }, { "docid": "c1355a7a713a975e91f6adc75575308a", "score": "0.716404", "text": "function admin_login() {\n\t\t$this->loadAllModel(array('Admin','User'));\n\t\t$userId = $this->Session->read('loggedUserInfo.id'); \n\t\tif(!empty($userId)) {\n\t\t\t$this->redirect('dashboard');\n\t\t}\n\t\t$remember_me = '';\n\t\t$this->layout = 'admin_login';\n\t\t$this->set('title','Sign in'); \n\t\tif(isset($this->request->data) && (!empty($this->request->data))) {\n\t\t\t$email = $this->request->data['Admin']['email'];\n\t\t\t$user_password = md5($this->request->data['Admin']['password']);\n\t\t\t$this->User->unBindModel(array('hasOne' => array('UserDetail')));\n\t\t\t$userInfo = $this->User->find('first',array('fields'=>array('id','first_name','last_name','email_address','password'),'conditions'=>array(\"User.email_address\" => $email,\"User.password\" => $user_password,\"User.status\"=>1,\"User.is_deleted\"=>0,\"User.user_type\"=>111)));\n\t\t\tif(!empty($userInfo['User']['password']) && ($userInfo['User']['password'] == $user_password) ) {\n\t\t\t\t$this->Session->write('loggedUserInfo', $userInfo['User']);\n\t\t\t\t$this->Session->write('ADMIN_SESSION', $userInfo['User']['id']); \n\t\t\t\tif(!empty($this->request->data['Admin']['remember_me'])) {\n\t\t\t\t\t$email = $this->Cookie->read('AdminEmail');\n\t\t\t\t\t$password = base64_decode($this->Cookie->read('AdminPass'));\t\t\t\t\t\t\n\t\t\t\tif(!empty($email) && !empty($password)) {\n\t\t\t\t\t$this->Cookie->delete('AdminEmail');\n\t\t\t\t\t$this->Cookie->delete('AdminPass'); \n\t\t\t\t} \t\t\t\t\t\t\n\t\t\t\t$cookie_email = $this->request->data['Admin']['email'];\t\t\t\t\t\t\n\t\t\t\t$this->Cookie->write('AdminEmail', $cookie_email, false, '+2 weeks');\t\t\t\t\t\t\n\t\t\t\t$cookie_pass = $this->request->data['Admin']['password'];\n\t\t\t\t$this->Cookie->write('AdminPass', base64_encode($cookie_pass), false, '+2 weeks'); \n\t\t\t\t}else {\n\t\t\t\t\t$email = $this->Cookie->read('AdminEmail');\n\t\t\t\t\t$password = base64_decode($this->Cookie->read('AdminPass'));\n\t\t\t\tif(!empty($email) && !empty($password)) {\n\t\t\t\t\t$this->Cookie->delete('AdminEmail');\n\t\t\t\t\t$this->Cookie->delete('AdminPass'); \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->redirect('dashboard'); \n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$this->Session->setFlash(\"Email or Password is incorrect\",'default',array('class'=>'alert alert-danger'));\t\t\t\n\t\t\t}\n\t\t}else {\n\t\t\t$email = $this->Cookie->read('AdminEmail');\n\t\t\t$password = base64_decode($this->Cookie->read('AdminPass'));\t\t\t\t\n\t\t\tif(!empty($email) && !empty($password)) {\n\t\t\t\t$remember_me = true;\n\t\t\t\t$this->request->data['Admin']['email'] = $email;\n\t\t\t\t$this->request->data['Admin']['password'] = $password;\t\t\t\t\t\n\t\t\t}\t\t\t\t\n\t\t}\n\t\t$this->set('remember_me',$remember_me);\n\t}", "title": "" }, { "docid": "25ffb72f391ea186a27ee55369235a53", "score": "0.7148592", "text": "private function logIn()\n {\n $firewall = 'main';\n\n $token = new UsernamePasswordToken('admin_test', '', $firewall, array('ROLE_USER'));\n $this->session->set('_security_' . $firewall, serialize($token));\n $this->session->save();\n\n $cookie = new Cookie($this->session->getName(), $this->session->getId());\n $this->client->getCookieJar()->set($cookie);\n }", "title": "" }, { "docid": "2f64fa4abf67cfb72e547d91f7c0789e", "score": "0.71463144", "text": "public function login_success_as_admin()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/admin/login')\n ->assertSee('SIGN IN DIBAWAH')\n ->type('email', '[email protected]')\n ->type('password', 'password')\n ->press('MASUK')\n ->assertPathIs('/admin')\n ->logout();\n });\n }", "title": "" }, { "docid": "ac8d1a952b15f330ec1c28b8f4671403", "score": "0.7129491", "text": "function admin_login()\n {\n\t $this->SEAdmin(0, $_POST['username']);\n \n\t // SHOW ERROR IF JAVASCRIPT IS DIABLED\n\t if( isset($_POST['javascript']) && $_POST['javascript'] == \"no\" )\n {\n\t $this->is_error = 31;\n\t }\n \n elseif( !$this->admin_exists )\n {\n\t $this->is_error = 32;\n\t }\n \n elseif( !$this->admin_info['admin_enabled'] )\n {\n\t $this->is_error = 677;\n\t }\n \n elseif( $this->admin_password_crypt($_POST['password']) != $this->admin_info['admin_password'] )\n {\n\t $this->is_error = 32;\n\t }\n \n else\n {\n $this->admin_setCookies();\n\t }\n\t}", "title": "" }, { "docid": "b70c60fc09c4b5ad95a5e068d03a7ac0", "score": "0.7087167", "text": "public function login(){\n $username = $_POST['username'];\n $password = $_POST['password'];\n $host = $_SERVER['HTTP_ORIGIN'];\n\n //authenticate\n if(User::matchPassword($username, $password)) {\n //set session and redirect to admin home\n $_SESSION['username'] = $username;\n header(\"Location:\". $host . '/admin');\n }\n else {\n //display errors and stay on login page\n $this->pageInformation['errorMessage'] = 'Invalid login information.';\n $pageInfo['pageTitle'] = 'Login';\n include( TEMPLATE_PATH . '/admin/loginForm.php' );\n }\n }", "title": "" }, { "docid": "f5ae81d4aa50d3372a68f11c7abb4b19", "score": "0.7076374", "text": "public static function adminLogin()\n {\n if(Data::arrayHasEmptyValue($_POST)){\n return trigger_error(Data::arrayHasEmptyValue($_POST));\n }\n $email = $_POST['email'];\n $sql = \"SELECT admin_id, password FROM admin_accounts WHERE email = '$email' AND deleted = false\";\n $result = mysqli_query(DB::connect(), $sql);\n $count = mysqli_num_rows($result);\n if($count !== 1){\n return trigger_error('Login credentials are not valid');\n }\n $row = mysqli_fetch_assoc($result);\n if(password_verify($_POST['password'], $row['password'])){\n self::unsetSessionId();\n $_SESSION['admin_id'] = $row['admin_id'];\n self::logAdminEntry($row['admin_id']);\n return null;\n } else {\n return trigger_error('Login credentials are not valid');\n }\n }", "title": "" }, { "docid": "f1f4471aeef22f68206072e19c2ae1fa", "score": "0.70725656", "text": "function Admin_authetic(){\r\n\t\t\t\r\n\t\tif(!$_SESSION['adminid']) {\r\n\t\t\t$this->redirectUrl(\"login.php\");\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "3a16602c8c187b01ae385afd161c8481", "score": "0.70445037", "text": "public function loginAction () {\n $this->_helper->layout->setLayout('login');\n $auth = Zend_Auth::getInstance();\n $auth->setStorage(new Zend_Auth_Storage_Session('hl_admin'));\n \n if ($auth->hasIdentity()) {\n // User is already logged in so just push them into the system\n $this->_redirect('/cms_admin/index');\n }\n \n $request = $this->getRequest();\n \n if ($request->isPost()) {\n // We have post data from the login form - so attempt a login\n $form = $this->getLoginForm();\n \n if (!$form->isValid($_POST)) {\n // Form is invalid\n $this->view->form = $form;\n //return $this->render();\n }\n else\n {\n // The forms passed validation so we now need to check the identity of the user\n $adapter = Auth_CmsAdmin::getAdapter($form->getValues());\n $result = $auth->authenticate($adapter);\n if (!$result->isValid()) {\n // Invalid credentials\n $form->setDescription('Invalid credentials provided');\n $this->view->form = $form;\n //return $this->render('login'); // re-render the login form\n } else {\n // Valid credentials - store the details we need from the database and move the user to the index page\n $storage = $auth->getStorage();\n $storage->write($adapter->getResultRowObject(array(\n 'username',\n 'real_name')));\n \n // Record activity\n Application_Core_ActivityLogger::log('CMS Admin Login', 'complete', 'CMS-Admin', $_POST['username']);\n \n $this->_redirect('/cms-admin/index');\n }\n }\n }\n }", "title": "" }, { "docid": "3a326ddbbfdfd8f51d0e8a718735c516", "score": "0.7035652", "text": "public function login() {\n\t\t\treturn ['tpl' => 'admin/login', 'data' => []];\n\t\t}", "title": "" }, { "docid": "8154d7677b9f0c73ac45073a6e7ddcbc", "score": "0.6990533", "text": "protected function set_admin() {\n\t\t$_SESSION['admin'] = true;\n\t}", "title": "" }, { "docid": "a9650b1b2f60bcd33e31a875c011324b", "score": "0.6988966", "text": "public function login()\n {\n if (!empty($_POST)) {\n if (isset($_POST['user']) || $_POST['password']) {\n if ($_POST['user'] == ADMIN_LOGIN && $_POST['password'] == ADMIN_PASSWORD) {\n $_SESSION['user'] = $_POST['user'];\n $_SESSION['password'] = $_POST['password'];\n header('Location: /admin/articlesList');\n } else {\n header('Location: /admin/login');\n }\n }\n } else {\n return $this->twig->render(\"/Admin/login.html.twig\");\n }\n }", "title": "" }, { "docid": "ee3ac28bd2c7b3a3f663a2a9792d8819", "score": "0.6920227", "text": "function login() {\n\t\t// Reset session in case someone else is logged in\n\t\t$this->clear('SESSION');\n\t\t// Render template\n\t\t$this->set('pagetitle','Login');\n\t\t$this->set('template','login');\n\t}", "title": "" }, { "docid": "b6bacebbdd0acb7e17ca5bdded6e1863", "score": "0.69114506", "text": "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n //return $this->goHome();\n return $this->redirect('/user/info');\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n //使用session和表tbl_admin_session记录登录账号的token:time&id&ip,并进行MD5加密\n $id = Yii::$app->user->id; //登录用户的ID\n \n $username = Yii::$app->user->identity->username; //登录账号\n $ip = Yii::$app->request->userIP; //登录用户主机IP\n $token = md5(sprintf(\"%s&%s&%s\",time(),$id,$ip)); //将用户登录时的时间、用户ID和IP联合加密成token存入表\n \n $session = Yii::$app->session;\n $session->set(md5(sprintf(\"%s&%s\",$id,$username)),$token); //将token存到session变量中\n //存session token值没必要取键名为$id&$username ,目的是标识用户登录token的键,$id或$username就可以\n \n $model->insertSession($id,$token);//将token存到tbl_admin_session\n //return $this->goHome();\n return $this->redirect('/user/info');\n } else {\n Yii::$app->user->setReturnUrl(Yii::$app->request->referrer);\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "747cae5598b00debc370042e5740c89f", "score": "0.6907878", "text": "private function login() {\n $this->model->login();\n }", "title": "" }, { "docid": "bef7b14123cfa21cffc8dc5bc907c157", "score": "0.6886465", "text": "public function admin_sign_in(){\n\t\t$this->layout = 'Admin/sign_in'; //echo $this->Auth->password('123456');\n\n\t\t$this->validateAfterLogin(); // validate after login\n\n\t\tif(!empty($this->request->data)){ //pr($this->request->data);die;\n\t\t\t$adminArr = $this->Admin->find('first', array('conditions'=>array('Admin.username'=>$this->request->data['Admin']['username'], 'Admin.password'=>$this->Auth->password($this->request->data['Admin']['password_1']))));\n\n\t\t\tif(!empty($adminArr)){ //pr($adminArr);die;\n\t\t\t\tif($adminArr['Admin']['type'] == 'SUP'){ //if SUPER ADMIN, then directly login\n\t\t\t\t\tif($this->Auth->login($adminArr)){\n\t\t\t\t\t\t$this->manageLastLogin($adminArr); // Manage the last login of admin\n\t\t\t\t\t\t$this->redirect('/admin/admins/dashboard/');\n\t\t\t\t\t}else\n\t\t\t\t\t\t$this->Session->setFlash('Unable to Authorize!', 'message', array('class'=>'msg_error'));\n\t\t\t\t}else{ // if SUB_ADMIN, then check the status\n\t\t\t\t\tif($adminArr['Admin']['status'] == '1')\n\t\t\t\t\t\t$this->redirect('/admin/admins/dashboard/');\n\t\t\t\t\telse\n\t\t\t\t\t\t$this->Session->setFlash('Inactive Account!', 'message', array('class'=>'msg_error'));\n\t\t\t\t}\n\t\t\t}else\n\t\t\t\t$this->Session->setFlash('Invalid Username or Password!', 'message', array('class'=>'msg_error'));\n\t\t}\n\t}", "title": "" }, { "docid": "9c5cc8d4b75d1f70d03abd6268f785da", "score": "0.6878968", "text": "public function action_login() {\n\t\tKohana::$log->add(Kohana::DEBUG, 'Executing Controller_Auth::action_login');\n\n\t\t// If user is already logged in, redirect to admin main\n\t\tif ($this->a2->logged_in())\n\t\t{\n\t\t\tKohana::$log->add('ACCESS', \"Attempt to login made by logged-in user\");\n\t\t\tKohana::$log->add(Kohana::DEBUG, \"Attempt to login made by logged-in user\");\n\t\t\tMessage::instance()->error(Kohana::message('a2', 'login.already'));\n\t\t\t$this->request->redirect( Route::get('admin')->uri() );\n\t\t}\n\n\t\t$this->template->content = View::factory('admin/auth/login')\n\t\t\t->bind('post', $post)\n\t\t\t->bind('errors', $errors);\n\n\t\t$post = Validate::factory($_POST)\n\t\t\t->filter(TRUE, 'trim')\n\t\t\t->rule('username', 'not_empty')\n\t\t\t->rule('password', 'not_empty')\n\t\t\t->callback('username', array($this, 'check_username'));\n\n\t\tif ($post->check())\n\t\t{\n\t\t\tif ($this->a1->login($post['username'], $post['password'],\n\t\t\t\t! empty($post['remember'])))\n\t\t\t{\n\t\t\t\tKohana::$log->add('ACCESS', 'Successful login made with username, '\n\t\t\t\t\t.$post['username']);\n\t\t\t\tMessage::instance()->info(Kohana::message('a2', 'login.success'),\n\t\t\t\t\tarray(':name' => $post['username']));\n\n\t\t\t\t// If external request, redirect to referring URL or admin main\n\t\t\t\tif ( ! $this->_internal)\n\t\t\t\t{\n\t\t\t\t\t// Get referring URI, if any\n\t\t\t\t\t$referrer = $this->session->get('referrer')\n\t\t\t\t\t\t? $this->session->get('referrer')\n\t\t\t\t\t\t: Route::get('admin')->uri();\n\t\t\t\t\t$this->session->delete('referrer');\n\n\t\t\t\t\t$this->request->redirect($referrer);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tKohana::$log->add('ACCESS', 'Unsuccessful login attempt made with username, '\n\t\t\t\t\t.$post['username']);\n\t\t\t\t$post->error('password', 'incorrect');\n\t\t\t}\n\t\t}\n\n\t\t$errors = $post->errors('admin');\n\t}", "title": "" }, { "docid": "2261c36a753783df26be4b48511c4958", "score": "0.68665004", "text": "function session_admin($username, $user_id, $arena_id)\n {\n\n\t$_SESSION['user_user_id'] = 8579; //dummy user for admin\n $_SESSION['admin_username'] = $username;\n $_SESSION['admin_user_id'] = $user_id;\n $_SESSION['admin_arena_id'] = $arena_id;\n\t$_SESSION['AdminUseOnly'] = \"adminuseonly\";\n\n\n\n }", "title": "" }, { "docid": "b8957a4e9bb511ae119ee75e8c846e4f", "score": "0.6858216", "text": "private function do_login()\n {\n // set logged in to true\n $this->is_logged_in = true;\n \n // load the user\n $this->load_user( $this->user_id );\n //$this->user_name = $this->name_from_id($this->user_id);\n \n // set session vars\n if( !isset($_SESSION['logged_in']) ){\n $_SESSION[\"logged_in\"] = $this->user_id;\n }\n }", "title": "" }, { "docid": "d7742e1dd3fe4a544551c3ea37363978", "score": "0.6850239", "text": "function action_login($params) {\n\n\t\t// If the form was submitted, validate credentials\n\t\t$form_error = FALSE;\n\t\tif (isset($_POST['form']['action'])) {\n\t\t\tif ($admin_user_id = model_admin::validate($_POST['form']['user'], $_POST['form']['password'])) {\n\t\t\t\t$_SESSION['myshop']['admin_user_id'] = $admin_user_id;\n\t\t\t\theader('Location: ' . APP_URL . 'admin');\n\t\t\t\tdie;\n\t\t\t}\n\t\t\t$form_error = TRUE;\n\t\t}\n\n\t\t// Include view for this page\n\t\t@include_once APP_PATH . 'view/admin_login.tpl.php';\n\t}", "title": "" }, { "docid": "5c51b54f701bcc314a5b92421dcd7799", "score": "0.6837257", "text": "public function admin_login(){\n\n\t\t$config = array(\n\t\t\tarray(\n\t\t\t\t\t'field' => 'username',\n\t\t\t\t\t'label' => 'Username',\n\t\t\t\t\t'rules' => 'required|trim|strip_tags',\n\t\t\t\t\t'errors' => array(\n\t\t\t\t\t\t'required' => 'You must provide a Username / Email',\n\t\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t\t'field' => 'password',\n\t\t\t\t\t'label' => 'Password',\n\t\t\t\t\t'rules' => 'required|trim|strip_tags',\n\t\t\t\t\t'errors' => array(\n\t\t\t\t\t\t\t'required' => 'You must provide a %s',\n\t\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\t$this->form_validation->set_rules($config);\n\n\t\tif($this->form_validation->run() == TRUE){\n\n\t\t\t//initiate login check\n\t\t\t$logindata = array(\n\t\t\t\t'username' => $this->input->post('username'),\n\t\t\t\t'password' => $this->input->post('password')\n\t\t\t);\n\t\t\t$result = $this->Login_model->adminlogin($logindata);\n\t\t\tif($result){\n\t\t\t\t//echo 'Logged In';\n\t\t\t\t$this->session->set_flashdata('admin_login_message','Logged In');\n\t\t\t\t//Saves login session\n\t\t\t\t$this->save_admin_session($result);\n\t\t\t\tredirect($this->router->fetch_class().'/loginpage','refresh');\n\t\t\t}else{\n\t\t\t\t//echo 'Fail';\n\t\t\t\t$this->session->set_flashdata('admin_login_message','Invalid Username or Password');\n\t\t\t\tredirect($this->router->fetch_class().'/loginpage','refresh');\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$this->session->set_flashdata('admin_login_message',validation_errors());\n\t\t\tredirect($this->router->fetch_class().'/loginpage','refresh');\n\t\t}\n\t}", "title": "" }, { "docid": "ee8550d1399dff492834a5fe50741a07", "score": "0.6828997", "text": "function setLoginAdmin(){\n $sessionUserLogin = $this->session->userdata('adminLogin');\n \n $this->data['user'] = null;\n if($sessionUserLogin!=null){\n if(isset($sessionUserLogin['loged_in']) && isset($sessionUserLogin['id_user'])){\n if($sessionUserLogin==true){\n $idUser = md6_decode($sessionUserLogin['id_user']);\n $findUser = $this->My_model->getbyid('user',$idUser);\n if($findUser!=null){\n if($findUser['is_active']==1 && $findUser['is_delete']==0){\n $this->data['user'] = $findUser;\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "af08554b0bec961826234b614b6ff816", "score": "0.6817232", "text": "public function login(){\n\t\t// check for cookie\n\t}", "title": "" }, { "docid": "2a06d7da197f4d67cbc0279f5d5cfaea", "score": "0.6810384", "text": "public function webtestLogin() {\n //$this->open(\"{$this->sboxPath}user\");\n $password = $this->settings->adminPassword;\n $username = $this->settings->adminUsername;\n // Make sure login form is available\n $this->waitForElementPresent('edit-submit');\n $this->type('edit-name', $username);\n $this->type('edit-pass', $password);\n $this->click('edit-submit');\n $this->waitForPageToLoad('30000');\n }", "title": "" }, { "docid": "2a06d7da197f4d67cbc0279f5d5cfaea", "score": "0.6810384", "text": "public function webtestLogin() {\n //$this->open(\"{$this->sboxPath}user\");\n $password = $this->settings->adminPassword;\n $username = $this->settings->adminUsername;\n // Make sure login form is available\n $this->waitForElementPresent('edit-submit');\n $this->type('edit-name', $username);\n $this->type('edit-pass', $password);\n $this->click('edit-submit');\n $this->waitForPageToLoad('30000');\n }", "title": "" }, { "docid": "2a06d7da197f4d67cbc0279f5d5cfaea", "score": "0.6810384", "text": "public function webtestLogin() {\n //$this->open(\"{$this->sboxPath}user\");\n $password = $this->settings->adminPassword;\n $username = $this->settings->adminUsername;\n // Make sure login form is available\n $this->waitForElementPresent('edit-submit');\n $this->type('edit-name', $username);\n $this->type('edit-pass', $password);\n $this->click('edit-submit');\n $this->waitForPageToLoad('30000');\n }", "title": "" }, { "docid": "fa1d6112973be3f8f216ff368e89dd8f", "score": "0.67968434", "text": "public function storeSessionLoginData(){\n\t\t\tSession::set('user_logged_id', $this->getField('id'));\n\t\t\tSession::set('user_logged_hash', $this->generateHash());\n\t\t\t\n\t\t\treturn;\n\t\t}", "title": "" }, { "docid": "b73ca9247f852a97541246e54bc441d0", "score": "0.67931986", "text": "private function login()\n {\n if (isset($this->_name)) {\n $this->auth->activate($this->_name);\n $this->auth->login();\n }\n\n $this->validate();\n\n if ($this->session->return) {\n $this->redirect($this->session->return);\n $this->session->return = false;\n } elseif ($this->config->auth['start']) {\n $this->redirect($this->config->auth['start']);\n }\n }", "title": "" }, { "docid": "6a4c47f0fb0b8af852560f76df378633", "score": "0.67770153", "text": "public function login()\n {\n if (!$this->bLoggedIn)\n {\n $this->iCommandCounter = 1;\n $this->command(\"LOGIN $this->sUser $this->sPassword\");\n $this->bLoggedIn = true;\n $this->setFolder($this->sFolder);\n }\n }", "title": "" }, { "docid": "0453c8a43cb7fc96d547e1b26983eeee", "score": "0.6743001", "text": "public function Login()\n {\n $userName = $_POST['Username']; \n $password = $_POST['Password'];\n $admin = ('1');\n $data = $this->loginModel->getUserData($userName); // data van de db\n \n if ($userName == $data[0]->name && $password == $data[0]->ov_number) {\n session_start();\n $_SESSION[\"username\"] = $_POST['Username'];\n $_SESSION[\"username\"] = $_POST['Username'];\n echo (\"true\");\n if ($admin == $data[0]->admin) {\n $_SESSION[\"admin\"] = ['admin'];\n } elseif ($admin !== $data[0]->admin) {\n $_SESSION[\"user\"] = ['user'];\n } else {\n echo (\"er ging iets mis probeer het later opnieuw\");\n }\n } else {\n echo (\"false\");\n } \n }", "title": "" }, { "docid": "70a5d76fa552af81bcc5a35150bff450", "score": "0.674275", "text": "public function loginAction() \n\t{\n\t\tif(!empty($_POST))\n\t\t{\n\t\t\t$username = $_POST['username'];\n\t\t\t$password = $_POST['password'];\n\t\t\t\n\t\t\t$users = new Users();\n\t\t\t$row = $users->checkLogin($username, $password);\n\t\t\t\n\t\t\tif($row)\n\t\t\t{\n\t\t\t\t$this->oSession->userdata['current_admin'] = $row;\n\t\t\t\t$this->oSession->userdata['is_logged'] = TRUE;\n\t\t\t\tredirect('dashboard/panel/show');\n\t\t\t}\n\t\t}\n\n\t\t$this->_layout_path = \"admin/layout_login\";\n\t\t$this->renderView('dashboard/member/login');\n// \t\t$this->oResponse->setOutput($this->_view->fetch('dashboard/member/login'), $this->oConfig->config_values['application']['config_compression']);\n\t}", "title": "" }, { "docid": "0af9c16d14eb94d4feb4aa33d4f81bbd", "score": "0.67366976", "text": "public function manage()\n\t{\n\t\t/* Clear previous session data */\n\t\tif( count( $_SESSION ) )\n\t\t{\n\t\t\tforeach( $_SESSION as $k => $v )\n\t\t\t{\n\t\t\t\tunset( $_SESSION[ $k ] );\n\t\t\t}\n\t\t}\n\n\t\t$login = new \\IPS\\Login( \\IPS\\Http\\Url::internal( \"controller=login&start=1\", NULL, NULL, NULL, \\IPS\\Settings::i()->logins_over_https ) );\n\t\t$login->flagOptions\t= FALSE;\n\t\t\t\t\n\t\t/* < 4.0.0 */\n\t\t$legacy = FALSE;\n\t\tif( \\IPS\\Db::i()->checkForTable( 'login_methods' ) )\n\t\t{\n\t\t\t$legacy = TRUE;\n\t\t}\n\t\t\n\t\t/* Restoring a part finished upgrade means no log in hander rows even though table has been renamed */\n\t\tif ( \\IPS\\Db::i()->checkForTable( 'core_login_handlers' ) )\n\t\t{\n\t\t\t$legacy = FALSE;\n\t\t\t\n\t\t\tif ( ! \\IPS\\Db::i()->select( 'COUNT(*)', 'core_login_handlers' )->first() )\n\t\t\t{\n\t\t\t\t$legacy = TRUE;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( $legacy === TRUE )\n\t\t{\n\t\t\t/* Force internal only as we don't have the framework installed (JS/templates, etc) at this point to run external log in modules */\n\t\t\t\\IPS\\Login\\LoginAbstract::$databaseTable = 'login_methods';\n\t\t\t\n\t\t\t$login::$allHandlers['internal'] = \\IPS\\Login\\LoginAbstract::constructFromData( array (\n\t\t\t\t'login_key' => 'Upgrade',\n\t\t\t\t'login_enabled' => 1,\n\t\t\t\t'login_settings' => '{\"auth_types\":\"3\"}',\n\t\t\t\t'login_order' => 1,\n\t\t\t\t'login_acp' => 1\n\t\t\t) );\n\t\t\t\n\t\t\t$login::$handlers = $login::$allHandlers;\n\t\t}\n\n\t\t$handlers = \\IPS\\Login::handlers();\n\n\t\t/* Process */\n\t\t$error = NULL;\n\t\ttry\n\t\t{\n\t\t\t$member = $login->authenticate();\n\t\t\tif ( $member !== NULL )\n\t\t\t{\n\t\t\t\t/* Create a unique session key and redirect */\n\t\t\t\t$_SESSION['uniqueKey']\t= md5( uniqid( microtime(), TRUE ) );\n\n\t\t\t\t\\IPS\\Output::i()->redirect( \\IPS\\Http\\Url::internal( \"controller=systemcheck\" )->setQueryString( 'key', $_SESSION['uniqueKey'] ) );\n\t\t\t}\n\t\t}\n\t\tcatch ( \\Exception $e )\n\t\t{\n\t\t\t$error = $e->getMessage();\n\t\t}\n\n\t\t/* Output */\n\t\t\\IPS\\Output::i()->title\t\t= \\IPS\\Member::loggedIn()->language()->addToStack('login');\n\t\t\\IPS\\Output::i()->output \t.= \\IPS\\Theme::i()->getTemplate( 'forms' )->login( $login->forms( TRUE ), $error );\n\t}", "title": "" }, { "docid": "39efd3feb6f1088de1cea552401250d5", "score": "0.6736668", "text": "function loginToSystem() {\n $this->model->loginToSystem();\n }", "title": "" }, { "docid": "4f726bcfb02730436050e4a19a105419", "score": "0.67365307", "text": "private function doLoginWithSessionData()\n {\n $this->user_is_logged_in = true; // ?\n }", "title": "" }, { "docid": "7831de00c01af9635d83a391a620e3cd", "score": "0.673248", "text": "function login()\n\t{\n\t\tif ( Auth::login() == true ) {\n\t\t\tif ( Session::get('user_account_type') == 'admin' ) {\n\t\t\t\theader('location: ' . Config::Web('/admin/index'));\n\t\t\t}\n\t\t\telse {\n\t\t\t\theader('location: ' . Config::Web('/index'));\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$this->view->model = Model::Named(\"Users\");\n\t\t\t$this->view->render('/login/index');\n\t\t}\n\t}", "title": "" }, { "docid": "304f67a03c834290d7cb777aa14b7eba", "score": "0.67324466", "text": "private function loginWithPOST() {\n if (empty($_POST['admin_name'])) {\n $this->setLoginErrorAndQuit('The Username field was empty.');\n }\n elseif (empty($_POST['admin_password'])) {\n $this->setLoginErrorAndQuit('The Password field was empty.');\n }\n elseif (!empty($_POST['admin_name']) && !empty($_POST['admin_password'])) {\n // Start the database connection\n if ($this->db_connection = startPDOConnection()) {\n // Trimming the whitespace. The input is not sanitized because prepared statements are being used\n $user_name = trim($_POST['admin_name']);\n\n // The database query which allows the admin to login via email address or by username.\n $stmt = $this->db_connection->prepare('SELECT username, email, password FROM admin WHERE username = ? OR email = ?');\n $stmt->execute(array($user_name, $user_name));\n\n // If the user exists, then verfiy the password\n if ($stmt->rowCount() == 1) {\n\n // Get the user row as an array\n $user = $stmt->fetch(PDO::FETCH_ASSOC);\n $stmt = null;\n\n // Using PHP 5.5's password_verify() function to check if the provided password matches the hash of the password entered\n if (password_verify($_POST['admin_password'], $user['password'])) {\n\n // Write the admin's data into a PHP SESSION\n $_SESSION['user_name'] = $user['username'];\n $_SESSION['user_email'] = $user['email'];\n //The user's privilege is always user from this console\n $_SESSION['privilege'] = 'admin';\n $_SESSION['user_login_status'] = 1;\n\n //The login is complete, redirect them\n header('Location: /account.php');\n exit();\n\n }\n // If the username or password is incorrect, notify the admin trying to log in\n else {\n $this->setLoginErrorAndQuit('The Username or Password is incorrect.<br />Please try again.');\n }\n }\n // If the username or password is incorrect, notify the admin trying to log in\n else {\n $this->setLoginErrorAndQuit('The Username or Password is incorrect.<br />Please try again.');\n }\n }\n // If the database connection fails, notify the admin trying to log in\n else {\n $this->setLoginErrorAndQuit('There was a problem connecting to the database.<br />Please try again.');\n }\n }\n }", "title": "" }, { "docid": "5f62c13959457da7ffc99d19d9f4abc7", "score": "0.671997", "text": "private function login_demo() {\n\t\t$this->login_with_id(config::DEMO_USER_ID);\n\t}", "title": "" }, { "docid": "73e11c8e3a287983df580e79802e9162", "score": "0.6696165", "text": "public function login()\n {\n $nick = $this->config->get('user.nick');\n $name = $this->config->get('user.name');\n $real = $this->config->get('user.real');\n\n if (!empty($this->config->get('pass'))) {\n $this->send('PASS', $this->config->get('pass'));\n }\n\n $this->send('USER', $name, $name, '*', $real);\n $this->send('NICK', $nick);\n $this->send('WHO', $nick);\n }", "title": "" }, { "docid": "2b755a32c858a9c00bab0d9599ea2ca6", "score": "0.66911894", "text": "public function login() {\n\t\t$this->layout = 'login';\n\t\tif ($this->data) {\n\t\t\tif(UserComponent::login($this->data['username'], $this->data['password'])) {\n\t\t\t\tError::flash('/admin', __('Welcome :user', array('user' => $this->data['username'])), 'notify');\n\t\t\t} else {\n\t\t\t\tError::report(__('Username or password are incorrect'), 'warning');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "485a1227ec511d397118a75009130276", "score": "0.66869193", "text": "public function openAdminPageJson() {\n $username = trim($_POST['username']);\n $password = isset($_POST['password']) ? $_POST['password'] : '';\n $result = $this->checkIfUserExistJson($username, $password);\n if ($result === 1) {\n //when user has being authenticated create the session\n $_SESSION['username'] = $username;\n $_SESSION['password'] = $password;\n $this->getAdminContent();\n } elseif ((isset($_SESSION['username']))) {\n $this->getAdminContent();\n } else {\n header('Location: index.php');\n }\n }", "title": "" }, { "docid": "c2aa3d47b0ade474cfc47b069cd18b51", "score": "0.6680333", "text": "public function action_login()\n {\n // Redirect user if already logged-in\n if (Auth::instance()->logged_in('admin'))\n {\n $this->_redirect('admin', 'home', 'index');\n }\n\n // Get or generate security token\n $token = Security::token();\n $this->view->set('token', $token);\n\n if ($this->request->post())\n {\n // Use validation class to validate input\n $post_validate = Validation::factory($this->request->post())\n ->rule('username', 'not_empty')\n ->rule('password', 'not_empty')\n ->rule('token', 'not_empty')\n ->rule('token', 'Security::check');\n\n $post = $post_validate->as_array();\n\n // User tries to login so authenticate input\n if ($post_validate->check())\n {\n if (Auth::instance()->login($post['username'], $post['password']))\n {\n // Redirect to admin home\n $this->_redirect('admin', 'home', 'index');\n }\n else\n {\n // Set authentication error\n $post_validate->error('username', 'invaliduser');\n }\n }\n\n // Get validation errors\n $errors = $post_validate->errors('auth');\n\n // Add post variables to form if something went wrong\n $this->view\n ->set('_post', $post)\n ->set('_errors', $errors);\n }\n }", "title": "" }, { "docid": "71bed6ced5a2a33ae819926bdb28d548", "score": "0.6676896", "text": "public function actionLogin()\n {\n define( \"SERVER_ONLINE\", TRUE);\n define( \"SPEED_APPKEY\" , '100011' );\n define( \"SPEED_APPSECRET\" , '4440f0f9527b3217ebe15009d6dae348' );\n parent::login();\n }", "title": "" }, { "docid": "3c182713f93d313434c2fd2d378408c2", "score": "0.66667104", "text": "public function loginAction()\n {\n try {\n if ($_SERVER['REQUEST_METHOD'] === 'POST') {\n if (isset($_POST['login']) && isset($_POST['password'])) {\n $login = $this->clean_post_params['login'];\n $password = $this->clean_post_params['password'];\n $admin = $this->model->getAdmin();\n // Add the salt\n $saltStr = '(['.md5($password).']@{'.md5($login).'})';\n $hash = hash('sha256', $saltStr);\n $response = [];\n if ($admin['pword'] == $hash) {\n $roleHash = md5('role is '.md5($login));\n $_SESSION['isAdmin'] = $roleHash;\n $response['success'] = 1;\n } else {\n $response['success'] = 0;\n }\n echo json_encode($response);\n } else {\n throw new Exception(\"Empty form parameters!\");\n }\n } else {\n throw new Exception(\"The method isn't allowed!\");\n }\n } catch (Exception $e) {\n echo $e->getMessage();\n die();\n }\n }", "title": "" }, { "docid": "3687c4084407e9a4030a42676d3b3a1b", "score": "0.6665747", "text": "public function login()\n {\n $loginPage = LoginPage::openBy($this);\n $loginPage->login('webmaster', 'webmaster');\n }", "title": "" }, { "docid": "051eb3330ae1317ab3b79885c3f391bb", "score": "0.6664483", "text": "function form_login(){\r\n\t\t\tif(array_key_exists('user', $_SESSION)){\r\n\t\t\t\trequire_once DIR.'/store/store.php';\r\n\t\t\t\t$store = new Store();\r\n\t\t\t\t$staff = $store->get_store_staff($_SESSION['user']['store']['id']);\r\n\t\t\t\techo '<div id=\"login_holder_home\" class=\"modal fade\" tabindex=\"-1\" role=\"dialog\" aria-hidden=\"true\">';\r\n\t\t\t\t$orignalModule = $this->module;\r\n\t\t\t\t$orignalMode = $this->mode;\r\n\t\t\t\t$this->mode = 'index';\r\n\t\t\t\t$this->module = 'login';\r\n\t\t\t\t$this->view();\t\t\t\r\n\t\t\t\t$this->mode = $orignalMode;\r\n\t\t\t\t$this->module = $orignalModule;\r\n\t\t\t\techo '</div> <script>var is_login_allowed = '.( array_key_exists($_SESSION['user']['mysql_id'], $staff) && ($_SESSION['user']['title']['id'] == 4 || $_SESSION['user']['title']['id'] == 6 ) ? 'false' : 'true').'; </script>';\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "041b376c0784e87cfeb62c6f8b680bed", "score": "0.66625464", "text": "public function login()\n\t\t{\n\t\t\t$formData = $this->objFactory->getObjHttp()->\n\t\t\t\tsetParams($this->form)->getParams();\n\n\t\t\t$userId = $this->objFactory->getObjValidatorLogin()\n\t\t\t\t->setForm($formData)->isValidForm();\n\n\t\t\t$result = false;\n\n\t\t\tif(!empty($userId))\n\t\t\t{\n\t\t\t\t$userId = $userId[0]['idUser'];\n\n\t\t\t\t$sessionId = $this->objFactory->getObjSession()\n\t\t\t\t\t->getSessionId();\n\n\t\t\t\t$this->objFactory->getObjUser()\n\t\t\t\t\t->sessionStart($userId, $sessionId);\n\n\t\t\t\t$this->objFactory->getObjCookie()->\n\t\t\t\t\tsetCookie('id', $userId)->\n\t\t\t\t\tsetCookie('session', $sessionId);\n\n\t\t\t\t$result = $userId;\n\t\t\t}\n\n\t\t\t$this->objFactory->getObjDataContainer()->\n\t\t\t\tsetParams(['nextPage' => 'Echo', 'result' => $result]);\n\t\t}", "title": "" }, { "docid": "b212b36599c675f88920da4c27d130b9", "score": "0.6657135", "text": "public function login() {\n\t\t//shortcut variable $v also in scope in our view php file.\n\t\t$v =& $this->scene;\n\t\tif( !$this->isGuest() )\n\t\t{\n\t\t\tif ($v->redirect)\n\t\t\t\treturn $v->redirect;\n\t\t\telse\n\t\t\t\treturn $this->getHomePage();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->setupLoginInfo($v);\n\t\t\t$v->redirect = $this->getHomePage() ;\n\t\t}\n\t\t//indicate what top menu we are currently in\n\t\t$this->setCurrentMenuKey('account');\n\t}", "title": "" }, { "docid": "5476c5fc4fcc8b95683000f7a213f90b", "score": "0.66548896", "text": "public function doLogin()\n {\n session_start();\n $userRepository = new UserRepository();\n if (!$userRepository->readByUsername($_POST['username'])) {\n header('Location: /user/index/?error=Falscher Benutzername'); // Weiterleitung zur Anmeldung mit Error\n }\n\n // Benutzer Objekt erstellen\n $user = $userRepository->readByUsername($_POST['username']);\n $password = $user->password;\n\n // Wenn das Passwort mit dem aus der DB übereinstimmt werden die Session Variablen gesetzt, sonst mit Fehler weitergeleitet\n if (hash('sha256',$_POST['password']) == $password) {\n $_SESSION['userid'] = $user->id; // Session Variable setzen (User ID)\n $_SESSION['username'] = $user->username; // Session Variable setzen (Username)\n $_SESSION['isLoggedIn'] = true; // Session Variable setzen (Boolean LoggedIn)\n header('Location: /');\n } else {\n header('Location: /user/index/?error=Falsches Passwort'); // Weiterleitung zur Anmeldung mit Error\n }\n }", "title": "" }, { "docid": "89cebf774b2fcd59204d1ccd09612ef9", "score": "0.6649302", "text": "function admin_logged_in() {\n if(isset($_SESSION['is_admin_logged_in']) && isset($_SESSION['is_admin_logged_in'])==1) {\n header(\"location:\".ADMIN_URL.\"dashboard/\");\n }\n }", "title": "" }, { "docid": "38e089c80891d98c165817a653f4daf2", "score": "0.6649008", "text": "public function login() {\n $this->loggedIn = true;\n }", "title": "" }, { "docid": "b20ba99f00df92dcda4546726db72f00", "score": "0.66444725", "text": "public function login() {\n // display index\n $available_courses = Application::displayAllCourses();\n $available_categories = Application::displayAllCats();\n $available_tags = Application::displayAllTags();\n $sidebar = Application::sidebar();\n $used_tags = Application::displayUsedTags();\n require_once('view/profile/login.php');\n }", "title": "" }, { "docid": "fb9b83d26982d20dd04623875076cd94", "score": "0.66311276", "text": "public function adminLogin($username, $password)\n {\n $_SESSION = null;\n $session = \\Mage::getModel('admin/session');\n @$session->start();\n\n $_POST['login']=array('username'=>$username);\n\n $this->app->setResponse(new \\Mage_Core_Controller_Response_Http());\n\n /** @var $user Mage_Admin_Model_User */\n $user = \\Mage::getModel('admin/user');\n $user->login($username, $password);\n if ($user->getId()) {\n @$session->renewSession();\n\n if (\\Mage::getSingleton('adminhtml/url')->useSecretKey()) {\n \\Mage::getSingleton('adminhtml/url')->renewSecretUrls();\n }\n $session->setIsFirstPageAfterLogin(true);\n $session->setUser($user);\n $session->setAcl(\\Mage::getResourceModel('admin/acl')->loadAcl());\n \\Mage::getSingleton('adminhtml/url')->getSecretKey();\n } else {\n throw new \\Exception('Invalid User Name or Password.');\n }\n\n $id = $session->getSessionId();\n session_write_close();\n $_SESSION = null;\n $_POST = array();\n return $id;\n }", "title": "" }, { "docid": "268db85c00fdd4bcf6aceb8ae23ddd15", "score": "0.66222984", "text": "private function login() {\n\t\ttry {\n\t\t\t//Get a User object from the loginView.\n\t\t\t$user = $this->loginView->getUser();\n\n\t\t\t//Login the user.\n\t\t\t$this->loginModel->doLogin($user);\n\t\t}\n\n\t\tcatch(\\Exception $e) {\n\t\t\t//Remove the cookies.\n\t\t\t$this->loginView->removeCookies();\n\t\t}\n\t}", "title": "" }, { "docid": "1bb696c8aca2d58517bc1987def23f79", "score": "0.66134495", "text": "public function login_admin()\n {\n $this->load->view('admin_login_view');\n }", "title": "" }, { "docid": "0b6b7fff116f0c5031f793b05ff7053e", "score": "0.6603724", "text": "function login()\r\n\t\t{\r\n\t\t\tglobal $object;\r\n\t\t\t\r\n\t\t\t$this->layout = 'empty';\r\n\t\t\t\r\n\t\t\t//inserts into the DB users, who unsuccessfully tried to log in more than 2 times\r\n\t\t\tif (!isset($_SESSION[suspect]))\r\n\t\t \t{\r\n\t\t\t\t$_SESSION[suspect] = 0;\t\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$_SESSION[suspect] = $_SESSION[suspect] + 1;\r\n\t\t\t}\r\n\t\t\tif ($_SESSION[suspect] == 3)\r\n\t\t\t{\t\t\t\r\n//\t\t\t\t$suspects_model = $this->GetModelObject('suspects');\r\n//\t\t\t\t$suspects_model->Update(array('IP'=>$this->GetIp()));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//analyzes post array\r\n\t\t\tif ($this->request->post)\r\n\t\t\t{\r\n\t\t\t\t$users_model = $this->GetModelObject('users');\r\n\t\t\t\t$password = md5($this->request->post[password]);\r\n\t\t\t\t$check = $this->GetModelObject('Users')->Execute(array('login'=>$this->request->post[login], 'password'=>$password), 'sp_users_authentication');\r\n\t\t\t\t\r\n\t\t\t\t//if authorization failed\r\n\t\t\t\tif (empty($check))\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->data[login] = $this->request->post[login];\r\n\t\t\t\t\t$this->data[error] = LANG_LOGIN_FAILED;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse\r\n\t\t\t\t{\t\r\n\t\t\t\t\t//unsets suspect counter, set SESSION variables\r\n\t\t\t\t\tunset($_SESSION[suspect]);\r\n\t\t\t\t\t$_SESSION[userlogin] = $check[login];\r\n\t\t\t\t\t$_SESSION[userid] = $check[id];\r\n\t\t\t\t\t$_SESSION[usertheme] = $check[theme];\r\n\t\t\t\t\t$_SESSION[userresultsperpage] = $check[results_per_page];\r\n\t\t\t\t\t$_SESSION[lang] = $check[language_system_name];\r\n\t\t\t\t\t$_SESSION[dragndrop] = unserialize($check[dragndrop]);\r\n\r\n\t\t\t\t\t//gets system_settings for the logged user and registers them in the session\r\n\t\t\t\t\t$system_settings = $this->GetModelObject('SystemSettings')->ListItems();\r\n\t\t\t\t\tforeach ($system_settings as $setting)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$_SESSION[system_settings][$setting[name]] = $setting[value];\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($object->config->use_table_access)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//gets table access for the logged user and registers it in the session\r\n\t\t\t\t\t\t$table_accesses = $this->GetModelObject('SystemAccess')->ListItems(array('user_id'=>$_SESSION[userid]), 'sp_system_access_check');\r\n\t\t\t\t\t\tforeach ($table_accesses as $key=>$value)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$_SESSION[table_accesses][$value[table_name]] = $value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//gets module access for the logged user and registers it in the session\r\n\t\t\t\t\t\tforeach (Menus::$contextual as $key=>$value)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tforeach ($value[sub] as $sub)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif (!empty($_SESSION[table_accesses][$sub[table_name]][access_list]))\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$modules_access[$value[module]]++;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\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$_SESSION[modules_access]=$modules_access;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//redirects to the url entered before or to the main page (in no redirection url is specified)\r\n\t\t\t\t\tif(isset($_SESSION[redirect_url]))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->Redirect(substr($_SESSION[redirect_url],1));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->Redirect($check[default_page]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "5c8cff46869ca295ba9dd3b71c9eaed4", "score": "0.65961313", "text": "public function login_admin_user ($data) {\n\t\t$name = $data->name;\n\t\t$password = $data->password;\n\n\t\t$admin = Admin::where([\n\t\t\t\t['name', $name], \n\t\t\t\t['password', $password],\n\t\t\t])->first();\n\n\t\tif ($admin) {\n\t\t\tsession()->put([\n 'name' => $admin->name,\n 'password' => $admin->password,\n ]);\n\n return true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "8d285b086bb7fcf05ecb4e36c9568bc6", "score": "0.65916175", "text": "function checkAdminLogin() {\n $loginOK = false;\n\n if (isset($_REQUEST['username']) && isset($_REQUEST['password'])) {\n $username = $_REQUEST['username'];\n $password = $_REQUEST['password'];\n $username = 'admin';\n $password = 'admin123';\n $user = Mage::getSingleton('admin/session')->login($username, $password);\n if ($user && $user->getId()) {\n $loginOK = true;\n }\n }\n\n if (!$loginOK) {\n outputError(50, \"The username or password is incorrect.\");\n }\n\n return $loginOK;\n}", "title": "" }, { "docid": "d9f5776d95045d8d0b98e710c3a195cb", "score": "0.65804243", "text": "public function login()\n {\n //Sanitize Post\n $post = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n\n if($post['submit'])\n {\n $this->CreateQuery('SELECT * FROM users WHERE username = :username');\n $this->bind(':username', $post['username']);\n $this->Execute();\n\n $row = $this->ResultSingle();\n if($row)\n {\n if(password_verify($post['password'], $row['password']))\n {\n $_SESSION['is_logged_in'] = true;\n $_SESSION['user_data'] = array(\n \"id\" => $row['id'],\n 'name' => $row['username'],\n 'admin' => $row['admin']\n );\n\n $this->LogMessage(LoggerCodes::Info, \"User \".$_SESSION['user_data']['name'].\" logged in.\");\n header('Location: '.ROOT_URL.\"/movie\");\n }\n else\n {\n $this->LogMessage(LoggerCodes::Error, \"User \".$post['username'].\" failed to login.\");\n }\n } else {\n $this->LogMessage(LoggerCodes::Error, \"User \".$post['username'].\" failed to login.\");\n }\n }\n }", "title": "" }, { "docid": "6be5cae2f918a6836ffe3e6b13e966e1", "score": "0.6578858", "text": "private function afterAdminLogin(){\n\n // Get user info\n $user = User::model()->findByPk(Yii::app()->user->id);\n\n $new_project_notes_notice = $user->getNewProjectNotesCount() > 0 ? true : false;\n Yii::app()->user->setState(User::SHOW_NEW_PROJECT_NOTES_NOTICE, $new_project_notes_notice);\n Yii::app()->user->setState(User::LOGOUT_PROCESS, null);\n\n // $admin_secret_question_notice = (!is_null($user->getAdminRole()) && (empty($user->secret_question_id) || empty($user->secrect_answer))) ? true : false;\n // Yii::app()->user->setState(User::SHOW_ADMIN_SECRET_QUESTION_NOTICE, $admin_secret_question_notice);\n\n $admin_secret_question_notice = (in_array($user->admin_role, array('admin', 'moderator', 'operations_admin', 'limited_admin', 'client')) && (empty($user->secret_question_id) || empty($user->secrect_answer))) ? true : false;\n Yii::app()->user->setState(User::SHOW_ADMIN_SECRET_QUESTION_NOTICE, $admin_secret_question_notice); \n }", "title": "" }, { "docid": "bbdda3dfaca86877356f3b7ae4ca4d84", "score": "0.6578508", "text": "public function admin_logged_in()\r\n {\r\n return $this->ci->session->userdata(SESSION . ADMIN_LOGIN_ID);\r\n }", "title": "" }, { "docid": "e76f72fd4399af3b3ea59476636b8df7", "score": "0.6573365", "text": "public function actionLogin() {\n if ($this->request->getPost('username')) {\n $username = Fari_Decode::accents($this->request->getPost('username'));\n $password = Fari_Decode::accents($this->request->getPost('password'));\n \n $this->user = new Fari_AuthenticatorSimple();\n\t\t if ($this->user->authenticate($username, $password, $this->request->getPost('token'))) {\n $this->redirectTo('/');\n } else {\n $this->flashFail = 'Sorry, your username or password wasn\\'t recognized';\n }\n }\n\n $this->flashNotify = 'Use \\'admin\\' for username and password.';\n \n\t\t// create token & display login form\n\t\t$this->bag->token = Fari_FormToken::create();\n\t\t$this->renderAction();\n\t}", "title": "" }, { "docid": "4fc4f30f7e938c527b2b6f86e8ff4483", "score": "0.6569339", "text": "public function admin_sign_in() {\n\t\t$this->layout = 'Admin/sign_in';\n\t\t$this->loadModel('User');\n\t\t$this->User->recursive = -1;\n\t\t//VALIDATE ADMIN START\n\t\t$redirectUrl = $this->Ami->validateAdmin();\n\t\t\n\t\tif($redirectUrl != '')\n\t\t\t$this->redirect($redirectUrl);\n\t\t//VALIDATE ADMIN END\n\t\t\n\t\tif(!empty($this->data)){ \n\t\t\t\t$adminArr = $this->Admin->find('first',array('conditions' =>array('Admin.email'=>trim($this->request->data['Admin']['username']), 'Admin.password'=>$this->Auth->password($this->request->data['Admin']['password']))));\n\t\t\t\t\n\t\t\tif(!empty($adminArr)){\n\t\t\t\tif($adminArr['Admin']['group_id']=='1'){\n\t\t\t\t\tif(!$adminArr['Admin']['status']){\n\t\t\t\t\t\t$this->Session->setFlash(__('You account has been deactivated by admin!!', true), 'message', array('class'=>'message-red'));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif($this->Auth->login($adminArr))\n\t\t\t\t\t\t$this->redirect('/admin/admins/dashboard/');\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$this->Session->setFlash(__('You are not authorize to access.!!', true), 'message', array('class'=>'message-red'));\n\t\t\t\t\t$this->redirect('/admin/admins/dashboard/');\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$this->Session->setFlash(__('Invalid Username or Password!!', true), 'message', array('class'=>'message-red'));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "4a5bbf203c76af669b483e6b5b25276f", "score": "0.6549792", "text": "public function runLogin () {\r\n\t\tif ($_POST['id'] == null || $_POST['password'] == null) {\r\n\t\t\tself::displayLogin();\r\n\t\t\techo 'User ID and Password required.';\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$id = $_POST['id'];\r\n\t\t\t$password = $_POST['password'];\r\n\t\t\tself::readUser($id,$data);\r\n\t\t\tif ($data['password'] == $password) {\r\n\t\t\t\t$_SESSION['id'] = $data['id'];\r\n\t\t\t\t$_SESSION['name'] = $data['name'];\r\n\t\t\t\theader(\"Location: index.php\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tself::displayLogin();\r\n\t\t\t\techo 'Incorrect password.';\r\n\t\t\t\techo $data['id'];\r\n\t\t\t\techo $data['password'];\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "755487333bbf3ad97b684410be204588", "score": "0.6544194", "text": "public function login()\n {\n $status = $this->validator->checkPost($_POST);\n if (is_string($status)) {\n HtmlRender::viewLogin($status);\n\n return;\n }\n $username = trim(strtolower($_POST[\"username\"]));\n $password = sha1($_POST[\"password\"]);\n $user = $this->model->getUser($username, $password);\n if (empty($user)) {\n $status = \"Try Again! Username or password is incorrect\";\n HtmlRender::viewLogin($status);\n\n return;\n }\n Sessions::set($user);\n HtmlRender::viewHome();\n }", "title": "" }, { "docid": "ff21198288d86ec56e91e5f7d5114bca", "score": "0.65428776", "text": "function do_login() { \n $this->vars['title'] = 'Anmeldung'; \n $this->vars['slogan'] = 'anmelden'; \n $this->vars['head_src'] = 'schluessel';\n $this->vars['head_title'] = 'juliaw / photocase.com';\n\n if (empty($_POST)) {\n $this->render();\n }\n else {\n $sql = 'SELECT * FROM users WHERE active = 1'\n . \" AND mail = '\" . mysql_real_escape_string($_POST['mail']) . \"'\"\n . ' AND password = MD5('\n . \"'\" . mysql_real_escape_string($_POST['password']) . \"'\"\n . ')';\n\n $rs = mysql_query($sql);\n $_SESSION['user'] = mysql_fetch_object($rs); \n \n if ($_SESSION['user']) {\n $_SESSION['user']->guest = FALSE;\n }\n \n $this->redirect();\n }\n }", "title": "" }, { "docid": "306eacf72a5c283816effa087e9bb9ca", "score": "0.65428126", "text": "public function actionAuth() {\n $id = new AdminIdentity($_POST['uname'], $_POST['passwd']);\n $id->authenticate();\n \n if ($id->errorCode === AdminIdentity::ERROR_NONE) {\n Yii::app()->user->login($id);\n Yii::app()->session['menu'] = 'xm1';\n $this->redirect('index.php?r=user');\n } else {\n Yii::app()->user->setFlash('err', 'Wrong combination of User Id and Password');\n $this->redirect('index.php?r=login');\n }\n }", "title": "" }, { "docid": "848b38b6def1f5431727f45e570edf77", "score": "0.6538882", "text": "function Login_admin($number)\n{\n $_SESSION['user_id'] = $number;\n //echo \"Login session\" . var_dump($_SESSION);\n}", "title": "" }, { "docid": "2026fca21c4c5b21cdabbb52dbe4d7a1", "score": "0.6538094", "text": "function admin_setCookies()\n {\n $admin_id = ( !empty($this->admin_info['admin_id']) ? $this->admin_info['admin_id'] : '' );\n $admin_username = ( !empty($this->admin_info['admin_username']) ? $this->admin_password_crypt($this->admin_info['admin_username']) : '' );\n $admin_password = ( !empty($this->admin_info['admin_password']) ? $this->admin_info['admin_password'] : '' );\n \n // SAFE MODE (cookies)\n if( defined('SE_ADMIN_SAFE_MODE') && SE_ADMIN_SAFE_MODE===TRUE )\n {\n\t setcookie(\"admin_id\", $admin_id, 0, \"/\");\n\t setcookie(\"admin_username\", $admin_username, 0, \"/\");\n\t setcookie(\"admin_password\", $admin_password, 0, \"/\");\n }\n \n // NORMAL (sessions)\n else\n {\n $session_object =& SESession::getInstance();\n \n //$session_object->restart();\n \n $session_object->set('admin_id', $admin_id);\n $session_object->set('admin_username', $admin_username);\n $session_object->set('admin_password', $admin_password);\n\t }\n\t}", "title": "" }, { "docid": "ce1060df09c05a03709400c9d41769d9", "score": "0.6531925", "text": "public function login() {\r\n\t\tif(isset($_POST['username']) && isset($_POST['password'])) {\r\n\t\t\t$mU = new mUser();\r\n\t\t\t$userId = $mU->login($_POST['username'], $_POST['password']);\r\n\t\t\tif($userId) {\r\n\t\t\t\t$_SESSION['loggedin'] = $userId;\r\n\t\t\t}\r\n\t\t}\r\n\t\theader('location: default.php');\r\n\t}", "title": "" }, { "docid": "fa8674232e2f129f4ea71524a4f8fd06", "score": "0.6529495", "text": "public function login();", "title": "" }, { "docid": "fa8674232e2f129f4ea71524a4f8fd06", "score": "0.6529495", "text": "public function login();", "title": "" }, { "docid": "fa8674232e2f129f4ea71524a4f8fd06", "score": "0.6529495", "text": "public function login();", "title": "" }, { "docid": "01c9a03b5f5feb47f4a58933d2692966", "score": "0.6512001", "text": "public function evt_admin_login($data=NULL)\n\t{\n\n\t\t$redir = Settings::get('shop_admin_login_location');\n\n\t\tswitch ($redir) \n\t\t{\n\t\t\tcase '0':\n\t\t\t\t$redir = 'admin';\n\t\t\t\tbreak;\n\t\t\tcase '1':\n\t\t\t\t$redir = 'admin/shop';\n\t\t\t\tbreak;\t\n\t\t\tcase '2':\n\t\t\t\t$redir = 'admin/shop/products';\n\t\t\t\tbreak;\t\n\t\t\tcase '3':\n\t\t\t\t$redir = 'admin/shop/orders';\n\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\tdefault:\n\t\t\t\t$redir = 'admin/shop';\n\t\t\t\tbreak;\n\t\t}\n\n\t\n\n\t\tredirect($redir);\n\n\t}", "title": "" }, { "docid": "ae23755e9b4c65c7b6b0ac7a0435618a", "score": "0.6502239", "text": "public function doLogIn() {\n\t\t\t$this->isLoggedIn = true;\n\t\t}", "title": "" }, { "docid": "4489e34f54cf03760f8986ed1f857c95", "score": "0.64947796", "text": "public function index()\n {\n if ($this->session->userdata('admin_login') != 1)\n redirect(base_url() . 'index.php?login', 'refresh');\n if ($this->session->userdata('admin_login') == 1)\n redirect(base_url() . 'index.php?admin/dashboard', 'refresh');\n }", "title": "" }, { "docid": "119d1689b33015677fc42c6080174d23", "score": "0.6493103", "text": "public function login() {\r\n if (isset($_POST['loginBtn'])) {\r\n $username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_EMAIL);\r\n $password = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\r\n \r\n if (!preg_match('/^.{6,64}$/', $username) or !preg_match('/^.{6,255}$/', $password)) {\r\n $this->set('message', 'Parametri za prijavu nisu ispravni!');\r\n return;\r\n }\r\n\r\n $hash = hash('sha512', $password . Configuration::USER_SALT);\r\n $password = '000000000000000000000000000000000000000000000000000';\r\n\r\n $user = UserModel::getByUsernameAndPasswordHash($username, $hash);\r\n $hash = '0000000000000000000000000000000000000000000000000000000';\r\n\r\n if ($user) {\r\n Session::set('user_id', $user->user_id);\r\n Session::set('username', $username);\r\n Session::set('ip', filter_input(INPUT_SERVER, 'REMOTE_ADDR'));\r\n Session::set('ua', filter_input(INPUT_SERVER, 'HTTP_USER_AGENT', FILTER_SANITIZE_STRING));\r\n\r\n Misc::redirect('admin/positions');\r\n } else {\r\n $this->set('message', 'Nisu dobri login parametri.');\r\n sleep(1);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "abce8a7e19b240f01d97ac0f3e11a81a", "score": "0.64866513", "text": "public function login()\n {\n $username = $this->input->post('username');\n $password = $this->input->post('password');\n\n if($this->UsersModel->validate_user($username, $password)>=1)\n {\n $userData = $this->UsersModel->retrive_user_data($username);\n\n foreach($userData as $user)\n {\n $darkmode = $user->DarkMode;\n $UID = $user->UID;\n $isAdmin = $user->IsAdmin;\n\n }\n // if the credentials match, the users data is added to a session\n $sessionData = array(\n\n 'username' => $username,\n 'dark_mode' => $darkmode,\n 'UID' => $UID,\n 'loggedIn' => TRUE,\n 'admin' => $isAdmin\n );\n\n $this->session->set_userdata($sessionData);\n redirect(base_url());// they are then sent to the front page\n }\n else\n {\n $this->UsersModel->addUser($username,$password);\n }\n \n }", "title": "" }, { "docid": "41def498f935c744e794e33d91c979ee", "score": "0.6484138", "text": "public static function AdminLogin($username,$acc_type)\n {\n #Attempt to initialize session variables, if this fails, print the error message\n if(!self::AdminInitSession($username,$acc_type))\n {\n ErrorHandler::PrintError(\"Could not retrieve the admin account requested for use in the session handler.\");\n }\n\n }", "title": "" }, { "docid": "d513b0814f8cd1a8df6fa951099bcd4f", "score": "0.6478751", "text": "public function login()\t\n\t{\n\t\tredirect('/user', 'refresh');\n\t\t\n\t}", "title": "" }, { "docid": "8963482e7d37c45770d6edaede85df82", "score": "0.64746726", "text": "public function do_login()\n\t{\n\t\t$login = $this->input->post('login');\n\t\t$pass = md5($this->input->post('pass'));\n\t\t\n\t\t//check data in db\n\t\tif($this->g->check_login($login, $pass) ) {\n\t\t\t$data = array(\n\t\t\t\t'login' => $login,\n\t\t\t\t'logged_in' => TRUE\n\t\t\t);\n\t\t\t\n\t\t\t//set session data & redirect\n\t\t\t$this->session->set_userdata($data);\n\t redirect('admin/dashboard');\n\t\t\t\n\t\t} else {\n\t\t\t//show error data\n\t\t\t$this->session->set_flashdata('message', '<p class=\"error\">It seems your username or password is incorrect, please try again.</p>');\n\t\t\t\n\t redirect('admin/index');\n\n\t\t}\n\t}", "title": "" }, { "docid": "4cddc1e68b395d7a0dc4e77e512c71c0", "score": "0.64731073", "text": "function displayLogin() {\n $postManager = new PostManager();\n $logManager = new LoginManager();\n\n $billMenu = $postManager->billMenu();\n\n if (isset($_SESSION['ID'])) {\n $comUser = $logManager->getComUserdB($_SESSION['ID']);\n }\n\n require ('view/episodeUpdate.php');\n require ('view/login.php');\n}", "title": "" }, { "docid": "af3ffb12b3cbb4000b84aeff4269e892", "score": "0.6471027", "text": "public function login()\r\n\t{\r\n\t\tif ($this->customerIsLoggedIn())\r\n\t\t{\r\n\t\t\t$this->Basket->getCollection();\r\n\r\n\t\t\t$customer = $this->Auth->user();\r\n\t\t\t$this->Basket->saveField('customer_id', $customer['Customer']['id']);\r\n\r\n\t\t\tConfigure::write('Customer.id', $customer['Customer']['id']);\r\n\r\n\t\t\t$this->Basket->bindFullDetails();\r\n\t\t\t$this->Basket->saveTotals();\r\n\r\n\t\t\t$this->redirect($this->Auth->redirect());\r\n\t\t}\r\n\t\t\r\n\t\tif ((isset($this->params['url']['ref']) && ($this->params['url']['ref'] == 'checkout')) || !empty($this->data['Customer']['to_checkout']))\r\n\t\t{\r\n\t\t\t$this->set('fromCheckout', true);\r\n\t\t}\r\n\r\n\t\t\r\n\t\t\r\n\t\t$this->addCrumb('/customers/login', 'Log In');\r\n\t}", "title": "" }, { "docid": "db427ba3431c0fd91e9b69d88d2c197d", "score": "0.64675003", "text": "public function login()\n {\n $this->model->login();\n }", "title": "" }, { "docid": "cfe105d7cc298a68c5eda1fa2dc80712", "score": "0.6466952", "text": "public function actionLogin(){\n if(isset($_POST['Login'])){\n try {\n $userLogic = new User;\n if($userLogic->authenticate($_POST['Login']['email'], $_POST['Login']['password'])){\n $userLogic->saveUserInfoToSession($_POST['Login']['email']);\n $userLogic->saveUserAction($_POST['Login']['email'], 'logged in to');\n SupportFunc::redirectByRole($_SESSION['user']['role']);\n }\n } catch (Exception $e) {\n echo 'Caught exception: ', $e->getMessage(), \"\\n\";\n }\n }\n }", "title": "" }, { "docid": "0e3d6d695d4552110bccddb6ba9581fa", "score": "0.6465442", "text": "function php_session_webadmin_login($username, $password) {\r\n if (!php_check_username_format($username)) {\r\n return 'Username format incorrect';\r\n }\r\n\r\n if (!php_check_password_format($password)) {\r\n return 'Password format incorrect.';\r\n }\r\n\r\n php_database_connect();\r\n\r\n //check the username and password field is matched in the table\r\n $safe_username = GetSQLValueString($username, 'text');\r\n\r\n $query = sprintf(\"SELECT username FROM webadmin WHERE username=%s\", $safe_username);\r\n $rs = php_database_query($query);\r\n if (mysql_num_rows($rs) != 1) {\r\n return 'Username is incorrect';\r\n }\r\n\r\n $hashPassword = hash('sha256', $username . $password . WEBADMIN_PASSWD_SALT);\r\n $safe_hashPassword = GetSQLValueString($hashPassword, 'text');\r\n\r\n $query = sprintf(\"SELECT id FROM webadmin WHERE username=%s AND password=%s\", $safe_username, $safe_hashPassword);\r\n $rs = php_database_query($query);\r\n if (mysql_num_rows($rs) != 1) {\r\n return 'Password is incorrect.';\r\n }\r\n\r\n $userInfo = mysql_fetch_array($rs);\r\n\r\n //perform login\r\n $_SESSION['uid'] = $userInfo['id'];\r\n $_SESSION['username'] = $username;\r\n $_SESSION['group'] = \"webadmin\";\r\n return 'success';\r\n}", "title": "" } ]
ff1cf3d3d36cb0723ab4eb38d5f01e76
end// END // METHOD GETS APPLICATION / COMAPNY TEAM ROLES method gets all the active team roles
[ { "docid": "a6bb634a00d02ec905b395ef5da0daee", "score": "0.68035537", "text": "public static function getTeamRoles ()\n {\n $status = 1; \n $roles = TeamRole::where('active', $status)->get();\n return (!$roles->isEmpty() ? $roles : false);\n }", "title": "" } ]
[ { "docid": "f3a60848503e5c381b3818ef95677f82", "score": "0.73505497", "text": "public function get_all_roles() {\n\n return $this->get_by_tbn(\"roles\");\n }", "title": "" }, { "docid": "52bbc6922c99ad94d5ef579ef19ea2d6", "score": "0.73482996", "text": "public function getRoles() \n\t{\n \tif(isset($_SESSION['AAT']['debug']) && $_SESSION['AAT']['debug'] === 1) \n\t\t{ \n\t \t$this->oDebugLog->addLog('input','MusaFunctions','getRoles','in');\n\t\t}\n $aSelect = array('name', 'user_type');\n $aFrom = array('aat_users');\n $aWhere = array();\n return $this->oMusa->fetchData($aSelect, $aFrom, $aWhere);\n }", "title": "" }, { "docid": "a13019845398f29c9dbed18d2851133f", "score": "0.7312334", "text": "public function getRoles();", "title": "" }, { "docid": "6c2f1c3055e9b7a7ac09e72bcb378263", "score": "0.72968626", "text": "public function getRoles()\n {\n \t$query = Zenfox_Query::create()\n \t\t\t\t->from ('Role r');\n \t\t\t\t\n \t$result = $query->fetchArray();\n \t\n \treturn $result;\n }", "title": "" }, { "docid": "d22fe9f8574a6cb093e3889b9376ba87", "score": "0.7268316", "text": "public function getRoles() {\n\t\t#obsolete, I don't wnat user roles, I want the permission those roles are linked to\n\t\t# so I just need a getPermissions once, store those constants in a small session array\n\t\t#$roles = $this->roles;\n\n\t\t#d($roles);\n\n\t\t#foreach ($roles as $role) {\n\t\t#\techo $role->name;\n\t\t#}\n\t}", "title": "" }, { "docid": "0ced84ebaee18f3d77ecb30eda9d3822", "score": "0.7248969", "text": "function GetRoles () {\n $this->roles = array();\n $qry = new AwlQuery( 'SELECT role_name FROM role_member m join roles r ON r.role_no = m.role_no WHERE user_no = ? ', $this->user_no );\n if ( $qry->Exec('Session::GetRoles') && $qry->rows() > 0 ) {\n while( $role = $qry->Fetch() ) {\n $this->roles[$role->role_name] = true;\n }\n }\n }", "title": "" }, { "docid": "5d1bfa8de1f7ef6bfb3413ffb311f487", "score": "0.7224831", "text": "public function ListaRoles(){\n $client = new Client([\n 'base_uri' => $this->servidor,\n ]);\n $response = $client->request('GET', \"Roles\");\n return json_decode((string) $response->getBody(), true);\n }", "title": "" }, { "docid": "8b7038c0d70a87309a9cc278c2f802e3", "score": "0.72016406", "text": "public function getRoles()\n\t{\n\t\t$handlerInstance=new CommonAPIHandler(); \n\t\t$apiPath=\"\"; \n\t\t$apiPath=$apiPath.('/crm/v2/settings/roles'); \n\t\t$handlerInstance->setAPIPath($apiPath); \n\t\t$handlerInstance->setHttpMethod(Constants::REQUEST_METHOD_GET); \n\t\t$handlerInstance->setCategoryMethod(Constants::REQUEST_CATEGORY_READ); \n\t\treturn $handlerInstance->apiCall(ResponseHandler::class, 'application/json'); \n\n\t}", "title": "" }, { "docid": "77d8aae8eaf90a78b6d289186ed7da44", "score": "0.71408784", "text": "public function getRoles(): array;", "title": "" }, { "docid": "77d8aae8eaf90a78b6d289186ed7da44", "score": "0.71408784", "text": "public function getRoles(): array;", "title": "" }, { "docid": "77d8aae8eaf90a78b6d289186ed7da44", "score": "0.71408784", "text": "public function getRoles(): array;", "title": "" }, { "docid": "b99fa415d3a329daa4b7597673972cb3", "score": "0.71282464", "text": "public function getAllRoles()\n {\n $roles = Role::all();\n return $roles ;\n }", "title": "" }, { "docid": "53fbe69e150bac4808e8981f3dbdcc55", "score": "0.7121916", "text": "public function getRoles()\n {\n }", "title": "" }, { "docid": "575f7103641b6e81406df051aba12144", "score": "0.71105707", "text": "public static function getRoles()\n\t{\n\t\t//return $data = Doctrine::getTable(\"Role\")->findAll()->toArray();\n\t\treturn $data = Doctrine_Query::create()->from(\"Role\")->addWhere('id >='.Auth_StaffAdapter::getIdentity()->roleId)->fetchArray();\n\n\t}", "title": "" }, { "docid": "36e9b7552bb4ed6c0d72a0c30132cea3", "score": "0.7052437", "text": "private function allRoles()\n {\n return role()->allRoles();\n }", "title": "" }, { "docid": "608141b255d2cad37436902160a9f8b8", "score": "0.70207083", "text": "function ncsuroles_list_roles() {\n \n\t$query = db_select('ncsuroles', 'n');\n\n $query->fields('n')//SELECT the fields from ncsuroles\n ->orderBy('rid', 'ASC');\n\n $result = $query->execute();\n\n $returnArray = array();\n \n\tforeach($result as $role) {\n $returnArray[$role->rid] = $role;\n }\n \n return $returnArray;\n}", "title": "" }, { "docid": "abfcb4092dbe3255280bc364172b739e", "score": "0.7005469", "text": "public function getAllRoles(){\n\t\t$result = null;\n\t\t$this->connect();\n\t\ttry{\n\t\t\t$sql = \"SELECT * FROM tbl_roles\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->execute();\n\n\t\t\t$result = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t}catch(PDOException $e){\n\t\t\tprint_r($e);\n\t\t}\n\t\t$this->close();\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "44e1e666901bcd9485b9ac81c162f05d", "score": "0.69648814", "text": "public function usersGetUserRoles()\n {\n $endpoint = '/user_roles';\n $data = ['access_token' => $this->config['access_token']];\n\n // Make API Call\n $result = samsara::callAPI(null, $this->config['base_url'] . $endpoint, $data);\n\n return $result;\n }", "title": "" }, { "docid": "ccfead63cbcc84c3496459b3677c65c0", "score": "0.69406736", "text": "function getRoles($active = 1) {\n // we will probably want to add these\n // to the database\n // to make them customizeable and\n // available for triggers and flowpaths\n return array(\n \"1\"=>array(\"role_id\"=>1,\"name\"=>\"Manager\"),\n \"2\"=>array(\"role_id\"=>2,\"name\"=>\"Tester\")\n );\n }", "title": "" }, { "docid": "2e607f98b77dc42dd3e4888d2755c5e2", "score": "0.69387454", "text": "public function getRoleList()\r\n {\r\n $db = $this->m_application->getBootstrap()->getResource('db');\r\n\t\tif (is_array($db)) $db = $db['elstr'];\r\n // Select all roles from db\r\n $select = $db->select();\r\n $select->from(array('r' => 'Role'),\r\n \t\t\t array('r.name','r._id'));\r\n \t$select->order('r.name');\r\n $stmt = $db->query($select);\r\n $resultRoles = $stmt->fetchAll();\r\n\r\n\t\tfor ($n = 0; $n < count($resultRoles); $n++) {\r\n\r\n\t\t\t$select = $db->select();\r\n\r\n\t\t\t$select->from(array('rr' => 'RoleRole'),array('rr._id1','rr._id2'));\r\n\t\t\t$select->from(array('r' => 'Role'),array('r.name','r._id'));\r\n\r\n\t\t\t$select->where('rr._id2 = ? AND rr._id1 = r._id', $resultRoles[$n][\"_id\"]);\r\n\r\n\t\t\t$stmt = $db->query($select);\r\n\t\t\t$resultParentRoles = $stmt->fetchAll();\r\n\r\n\t\t\tif (count($resultParentRoles)>0){\r\n\t\t\t\t$resultRoles[$n][\"parent\"] = $resultParentRoles[0][\"name\"];\r\n\t\t\t}\r\n\t\t}\r\n\r\n return $resultRoles;\r\n }", "title": "" }, { "docid": "f183f3bc863c4052efab3e31e517cb9d", "score": "0.6925878", "text": "public static function getRolesList() {\n\t\treturn Auth_Factory::getRoleInstance()->getRolesList();\n\t}", "title": "" }, { "docid": "b822d4811f50855f86e3a691496b8eca", "score": "0.6865201", "text": "public function get_roles()\r\n {\r\n return $this->roles;\r\n }", "title": "" }, { "docid": "736fe76b5d539ff1fa927f239b8ad82a", "score": "0.6862892", "text": "public function getAvailableRoles();", "title": "" }, { "docid": "4d72e180c8bdbca32d2e35fa8d50c361", "score": "0.6804929", "text": "public static function get_roles() {\n global $DB;\n\n $roles = $DB->get_records_menu('role', null, '', 'id, shortname');\n return $roles;\n }", "title": "" }, { "docid": "8bd9f2d673c0526c37970185bc438f3a", "score": "0.6794635", "text": "public function getRoles()\n {\n $consultaroles=\"SELECT id, nombre_rol FROM roles WHERE id in ('3','5') ordeR by id asc\";\n $this->getRoles=Yii::app()->db->createCommand($consultaroles)->queryAll();// consulta base de datos \n return $this->getRoles;// devuelve el valor de la funcion get \n \n }", "title": "" }, { "docid": "4cc4276c42904f9db99b9a909374f182", "score": "0.6792333", "text": "public function loadListOfRoles()\n {\n return $this->_getDatasource()\n ->select(\\Yana\\Security\\Data\\Tables\\RoleEnumeration::TABLE . '.*.' . \\Yana\\Security\\Data\\Tables\\RoleEnumeration::NAME);\n }", "title": "" }, { "docid": "acd7b89b72dd23b028de78846ea30fef", "score": "0.6784733", "text": "function getroles()\n {\n try {\n $userRole = (string) $_COOKIE['userRole'];\n } catch (Exception $e) {\n print(\"except\" . $e->getMessage());\n }\n $query3V = \"select * from role where id >= $userRole \";\n $r3V = $this->mysqli->query($query3V) or die($this->mysqli->error . __LINE__);\n if ($r3V->num_rows > 0) {\n $result3V = array();\n while ($row3V = $r3V->fetch_assoc()) {\n $result3V[] = $row3V;\n }\n // print($result3V);\n $this->response($this->json($result3V), 200); // send user details\n }\n $this->response('', 204);\n }", "title": "" }, { "docid": "acc78383ce4597b972c9a66114790f50", "score": "0.6755348", "text": "public function indexRoles()\n {\n if(auth()->user()->hasPermissionTo(Permission::findByName('users.change-role','api'))){\n return RoleResource::collection(Role::all());\n }\n }", "title": "" }, { "docid": "0f458d2c92ee07a49d5af04f2d9f8618", "score": "0.6750769", "text": "public function getRoles()\n {\n return $this->db->table('roles')->get()->getResult();\n }", "title": "" }, { "docid": "342f4eb3973b5e4f06e919ab9dfc0261", "score": "0.6738571", "text": "public function actionRoles()\n\t{\n\t\t$dataProvider = new RightsAuthItemDataProvider('roleTable', CAuthItem::TYPE_ROLE, array(\n\t\t\t'sortable'=>array(\n\t\t\t\t'id'=>'RightsRoleTableSort',\n\t\t\t\t'element'=>'.roleTable',\n\t\t\t\t'url'=>$this->createUrl('authItem/processSortable'),\n\t\t\t),\n\t\t));\n\t\t// Render the view\n\t\t$this->render('roles', array(\n\t\t\t'dataProvider'=>$dataProvider,\n\t\t\t'isBizRuleEnabled'=>$this->_module->enableBizRule,\n\t\t\t'isBizRuleDataEnabled'=>$this->_module->enableBizRuleData,\n\t\t));\n\t}", "title": "" }, { "docid": "c43b7fea366f9a02d3d76d0f7f86f0f2", "score": "0.6722347", "text": "abstract public function getCurrentUserRoles(mixed $team = null): array;", "title": "" }, { "docid": "e4a10df8fa4cd3f145e5e6b3f0891c72", "score": "0.67188585", "text": "function getRoles(){\n \n $arr = array();\n $results = $this->iamClient->listRoles();\n foreach($results->get('Roles') as $v){\n if(\n ($v['Path'] != '/service-role/' && substr($v['Path'], 0, 18) != '/aws-service-role/')\n && ( $this->roleFilterByName($v['RoleName']))\n )\n $arr[] = $v;\n }\n \n while($results->get('Marker') !== null){\n $results = $this->iamClient->listRoles([\n 'Marker' => $results->get('Marker')\n ]); \n \n foreach($results->get('Roles') as $v){\n if(\n ($v['Path'] != '/service-role/' && substr($v['Path'], 0, 18) != '/aws-service-role/')\n && ( $this->roleFilterByName($v['RoleName']))\n )\n $arr[] = $v;\n }\n }\n \n return $arr;\n }", "title": "" }, { "docid": "7c19c0d1e2a381d73345bc0e060f1aea", "score": "0.669802", "text": "public function getRoles()\n {\n return $this->get('roles');\n }", "title": "" }, { "docid": "41994091e7bf5d945ac0fbd0654da8d6", "score": "0.66967124", "text": "public function getAllRole()\n {\n $roles = Role::all();\n return response()->json(['status' => 'success', 'data' => $roles]);\n }", "title": "" }, { "docid": "2ca089009dfe26feb77e13b1eec17d00", "score": "0.66838497", "text": "public function getRoles()\n {\n return $this->data['roles'];\n }", "title": "" }, { "docid": "f610d25b476111fc3d44a2826fe67e10", "score": "0.66561085", "text": "public function get_roles(){\n\t\t$roles = array();\n\n\t\t$editable_roles = get_editable_roles();\n\n\t\tforeach ( $editable_roles as $role => $name ) {\n\t\t\t$roles[ $name['name'] ] = $role;\n\t\t}\n\n\t\treturn $roles;\n\t}", "title": "" }, { "docid": "009a613646891a49f3678838b8a9d884", "score": "0.66408634", "text": "function RoleList()\n {\n\n $val = GenericModel::simpleFetchGenericByWhere\n ('role', '=', 'IsActive', true, 'SortOrder');\n\n $resultArray = json_decode(json_encode($val), true);\n $data = $resultArray;\n if (count($data) > 0) {\n return response()->json(['data' => $data, 'message' => 'Roles fetched'], 200);\n } else {\n return response()->json(['data' => null, 'message' => 'Roles not found'], 200);\n }\n }", "title": "" }, { "docid": "c0589dbb28870b561ee005083f113edc", "score": "0.66392946", "text": "public function getRoles()\n {\n $roles = Role::all();\n return $roles;\n }", "title": "" }, { "docid": "20caaf1961438e6116791f17f292531a", "score": "0.6635699", "text": "public function list_roles() {\n \n $dataCache = $this->cache->memcached->get('mListroles');\n \n if ($dataCache){\n \n $this->cache->memcached->save('memcached6', 'cache', 30);\n return $dataCache;\n \n } else {\n \n /*Recupera los grupos creados*/\n $query = $this->db->query(\"SELECT\n idRol,\n descRol\n FROM\n roles\n WHERE idRol IN (1,2)\n ORDER BY 1 DESC\");\n \n $this->cache->memcached->save('mListroles', $query->result_array(), 28800); /*8 horas en Memoria*/\n $this->cache->memcached->save('memcached6', 'real', 30);\n\n if ($query->num_rows() == 0) {\n\n return false;\n\n } else {\n\n return $query->result_array();\n\n }\n }\n }", "title": "" }, { "docid": "7df404b761384c3aec46a3a6002a70b9", "score": "0.6609321", "text": "public function getRoles()\n {\n $roles = Role::all();\n\n return response()->success(compact('roles'));\n }", "title": "" }, { "docid": "38c060556981ac747a61504a7288039b", "score": "0.6600397", "text": "final public function getListRoles(): object\n {\n return $this->repo->all();\n }", "title": "" }, { "docid": "a9723cd54176eceb4b7d5e39cd87f104", "score": "0.6590216", "text": "function getRoles () {\r\n return array(\"login.edit\");\r\n }", "title": "" }, { "docid": "1dcb032e1cdbf88fe7a89f623b87715a", "score": "0.658401", "text": "public function getRoles()\n {\n $roles = $this->RolesUser->map(function($role){\n return $role->getTitre();\n })->ToArray();\n\n $roles[] = 'ROLE_FORMATEUR';\n\n return $roles;\n }", "title": "" }, { "docid": "9dbfa2a1dd9aa2ce267129d5d900c858", "score": "0.6577808", "text": "abstract public function getPermittedRoles();", "title": "" }, { "docid": "a3313654dd844236dc4ee81fa1ecaf5b", "score": "0.65772235", "text": "public function roles();", "title": "" }, { "docid": "a3313654dd844236dc4ee81fa1ecaf5b", "score": "0.65772235", "text": "public function roles();", "title": "" }, { "docid": "a3313654dd844236dc4ee81fa1ecaf5b", "score": "0.65772235", "text": "public function roles();", "title": "" }, { "docid": "a3313654dd844236dc4ee81fa1ecaf5b", "score": "0.65772235", "text": "public function roles();", "title": "" }, { "docid": "a3313654dd844236dc4ee81fa1ecaf5b", "score": "0.65772235", "text": "public function roles();", "title": "" }, { "docid": "b397b876cbe93d398e40002c9ae8a96d", "score": "0.6572218", "text": "public function getRoles()//se obtiene la info mediante el get\n\t\t{\n\t\t\t$arrData = $this->model->selectRoles();//llamamos al metodo selectRoles //con $this->model referenciamos al directorio Models/rolesModel.php\n\n\t\t\tfor ($i=0; $i < count($arrData); $i++) { \n\t\t\t\tif ($arrData[$i]['status'] == 1) \n\t\t\t\t{\n\t\t\t\t \t$arrData[$i]['status'] = '<span class=\"badge badge-success\">Activo</span>';\n\t\t\t\t}else{\n\t\t\t\t\t $arrData[$i]['status'] = '<span class=\"badge badge-danger\">Inactivo</span>';\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t //armaos el div en donde obtenemos los botones\n\t\t\t\t$arrData[$i]['options'] = '<div class=\"text-center\">\n\t\t\t\t\n\t\t\t\t<button class=\"btn btn-secondary btn-sm btnPermisosRol\" rl=\"'.$arrData[$i]['idrol'].'\" title=\"Permisos\"><i class=\"fas fa-key\"></i></button>\n\t\t\t\t<button class=\"btn btn-primary btn-sm btnEditRol\" rl=\"'.$arrData[$i]['idrol'].'\" title=\"Editar\"><i class=\"fas fa-pencil-alt\"></i></button>\n\t\t\t\t<button class=\"btn btn-danger btn-sm btnDelRol\" rl=\"'.$arrData[$i]['idrol'].'\" title=\"Eliminar\"><i class=\"fas fa-trash-alt\"></i></button>\n\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\t</div>';\n\t\t\t}\n\n\n\t\t\techo json_encode($arrData, JSON_UNESCAPED_UNICODE);\n\t\t\tdie();//finaliza el proceso \n \n\t\t}", "title": "" }, { "docid": "87d60d1a4c21f185d62468f496e98787", "score": "0.6567535", "text": "public function getAll() {\n\t $query = $this->select();\n\t $query->from('roles', array('name as role'));\n\t return $this->fetchAll($query);\n\t}", "title": "" }, { "docid": "307ecd4f77ee18429266b14700044aa2", "score": "0.6562804", "text": "public function findAll() {\n $url = '' . WSIKKAUSER . '/users/roles';\n $result = getDataFromJSON($url);\n $roles = array();\n //if result\n if ($result != null) {\n foreach ($result as $row) {\n $roleId = $row['role_id'];\n $roles[$roleId] = $this->buildDomainObject($row);\n }\n }\n return $roles;\n }", "title": "" }, { "docid": "ac26dddb4976a55e9cdeb3f46a8a22b1", "score": "0.65623665", "text": "public function listroles()\n {\n $roles = DB::table('roles')->get();\n $role = DB::table('role_user')->get();\n return view('admin.users.roles.roles', compact('roles'));\n }", "title": "" }, { "docid": "8b700c57ad7856b05dbb92c557a5192a", "score": "0.6547813", "text": "public function index()\n {\n return Roles::select(\n 'id_rol',\n 'rol'\n )\n ->get();\n }", "title": "" }, { "docid": "03aa74affb42905a9cc12d967f2019a6", "score": "0.65452176", "text": "public function getRoles()\n {\n return $this->role->getRoles();\n }", "title": "" }, { "docid": "7c7c752ff5bac97282a56c22d25be723", "score": "0.6538905", "text": "public function getRoles()\n {\n return array();\n }", "title": "" }, { "docid": "25851b21c6a42915b51a6740e5ccf112", "score": "0.6538669", "text": "public function findAll()\n {\n return Role::get();\n }", "title": "" }, { "docid": "d2423dc1a587482b2bfa418e3f505960", "score": "0.6534627", "text": "function getUserRoles() {\n\n $this->ci->db->where(array('user_id'=>floatval($this->userID)));\n $sql = $this->ci->db->get('user_roles');\n $data = $sql->result();\n\n $resp = array();\n foreach( $data as $row )\n {\n $resp[] = $row->role_id;\n }\n\n return $resp;\n }", "title": "" }, { "docid": "605626ed1fb3415edccf710fd8f4c8f3", "score": "0.6524313", "text": "public function getAllRoles(){\n $query = new Query;\n $query->select('name, description_en')->from('auth_item')->where(['type' => 1]);\n $roles = $query->all();\n\n $result = array_column($roles, 'name', 'name');\n return $result;\n }", "title": "" }, { "docid": "b5263e4e339da7431a226c9ec77d3275", "score": "0.6522859", "text": "public function getRoles()\n {\n return $this->roles;\n }", "title": "" }, { "docid": "b5263e4e339da7431a226c9ec77d3275", "score": "0.6522859", "text": "public function getRoles()\n {\n return $this->roles;\n }", "title": "" }, { "docid": "b5263e4e339da7431a226c9ec77d3275", "score": "0.6522859", "text": "public function getRoles()\n {\n return $this->roles;\n }", "title": "" }, { "docid": "b5263e4e339da7431a226c9ec77d3275", "score": "0.6522859", "text": "public function getRoles()\n {\n return $this->roles;\n }", "title": "" }, { "docid": "b5263e4e339da7431a226c9ec77d3275", "score": "0.6522859", "text": "public function getRoles()\n {\n return $this->roles;\n }", "title": "" }, { "docid": "b5263e4e339da7431a226c9ec77d3275", "score": "0.6522859", "text": "public function getRoles()\n {\n return $this->roles;\n }", "title": "" }, { "docid": "b5263e4e339da7431a226c9ec77d3275", "score": "0.6522859", "text": "public function getRoles()\n {\n return $this->roles;\n }", "title": "" }, { "docid": "69990748a438316d85c7d2b7211cdb1e", "score": "0.6511808", "text": "public function getRoles(){\n \n $groups = $this->em->getRepository('\\Application\\Entity\\Role')->findAll();\n foreach($groups as $group ){\n $role[$group->getPkRoleid()] = $group->getDescription();\n }\n \n return $role;\n }", "title": "" }, { "docid": "167c5e18ae22d799daac2595329331b4", "score": "0.6506083", "text": "public function getRoles () {\n\t\treturn $this->Roles[0];\n\t}", "title": "" }, { "docid": "d7361d981dfea8a8682c2a8eb337f9c1", "score": "0.65058255", "text": "public function index()\n {\n return Role::all();\n }", "title": "" }, { "docid": "d7361d981dfea8a8682c2a8eb337f9c1", "score": "0.65058255", "text": "public function index()\n {\n return Role::all();\n }", "title": "" }, { "docid": "3ff2ebd5577af2941eadc44a1cbfd21d", "score": "0.6492875", "text": "public function index()\n {\n Gate::authorize('view', 'roles');\n $role = Role::paginate();\n return RoleResource::collection($role);\n }", "title": "" }, { "docid": "2d44685ccb7904f283c8faa544e802a6", "score": "0.64836836", "text": "public function getRoles() {\n $role_level = $this->role;\n return [AppConstants::ROLES[$role_level]];\n }", "title": "" }, { "docid": "7bdf226c2edb11277a29033a941ccc6a", "score": "0.64807314", "text": "public function getRoles() {\n return $this->roles;\n }", "title": "" }, { "docid": "8b023e9af35965a1b9ed8e0ad263c0b2", "score": "0.6476164", "text": "public function getRoles()\n {\n if(!$this->roles){\n\n $this->roles = $this->grantedRoles()->get();\n\n $deniedRoles = $this->deniedRoles()->get();\n foreach($deniedRoles as $role)\n $deniedRoles = $deniedRoles->merge($role->descendants());\n\n foreach($this->roles as $role)\n if(!$deniedRoles->contains($role))\n $this->roles = $this->roles->merge($role->descendants());\n\n $this->roles = $this->roles->filter(function($role) use ($deniedRoles){\n return !$deniedRoles->contains($role);\n });\n }\n return $this->roles;\n }", "title": "" }, { "docid": "e4b7616fa0348b67e189bf2dbee8a2a8", "score": "0.6462692", "text": "public function testFetchCustomRoles()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "8c8eea840b25094fcf96b89ccfbdb98c", "score": "0.646236", "text": "public static function getAllAuthItemsRole()\n {\n return Yii::$app->params['ActiveRecordAccessTrait']['allAuthItemsRole'] ?? static::$allAuthItemsRole;\n }", "title": "" }, { "docid": "f1ab846e4a301a4b621cc4fe395f89f9", "score": "0.6461231", "text": "public function getUserRoles()\n\t{\n\t\t$roles = DB::table('roles_type')->where('active', '=', 1)->get();\n\t\tforeach($roles as $i => $r)\n\t\t{\n\t\t\t$r->active = ($r->active == 1) ? true : false;\n\t\t}\n\t\t$roles = $this->helper->normalizeLaravelObject((array)$roles);\n\n\t\treturn response()->json($roles);\n\t}", "title": "" }, { "docid": "2df7e580a5104239033e98dba5da435e", "score": "0.6454332", "text": "function wp_xprt_get_roles() {\n\n\t$roles['any'] = __( 'All Roles', 'wp-smart-export' );\n\n\treturn apply_filters( 'wp_xprt_query_user_roles', $roles );\n}", "title": "" }, { "docid": "7150e290683c110e337969e724c11b5f", "score": "0.64482975", "text": "public function getRole()\n\t{\n\t\ttry {\n\t\t\t$sql = \"SELECT * FROM roles\";\n\t\t\t$stmt = $this->connect()->prepare($sql);\n\t\t\t$stmt->execute();\n\t\t\treturn $stmt->fetchAll();\n\t\t} catch (PDOException $e) {\n\t\t\treturn array(\"e\" => $e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "1930ea173a742708cbe1429e74449481", "score": "0.6448044", "text": "public function listadoDeRoles(){\n $answer = $this->queryList(\"SELECT * FROM rol\", []);\n return $answer;\n }", "title": "" }, { "docid": "79419559be0e0a5eaf843cedb5659359", "score": "0.644753", "text": "public function getRoles()\n {\n return PaginatedIterator::factory($this, array(\n 'resourceClass' => 'Role',\n 'baseUrl' => $this->getUrl()->addPath('OS-KSADM')->addPath('roles'),\n 'key.marker' => 'id',\n 'key.collection' => 'roles'\n ));\n }", "title": "" }, { "docid": "01f0fa15871e7d70a500e80606cc59a9", "score": "0.6446969", "text": "public function admin_getRoles()\n {\n return View::make('admin.roles.roles',[\"roles\" => Rol::all()]);\n }", "title": "" }, { "docid": "08199658f30b69060a5718f06e27e853", "score": "0.6435754", "text": "public function getRoleList()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('tbl_role');\n\t\t$this->db->where('role_status', '1');\n\t\t$this->db->where('role_id !=', '1');\n\t\t$query = $this->db->get();\n\t\treturn $query->result() ;\n\t}", "title": "" }, { "docid": "6250456761a91509a3be4d6868052a64", "score": "0.6434069", "text": "public function getRoles()\n {\n return $this->_roles;\n }", "title": "" }, { "docid": "af5119f7a5e21fe8b94b3722b8c7dcff", "score": "0.6432265", "text": "public function getRoles()\n {\n // $roles = $this->roles;\n // guarantee every user at least has ROLE_USER\n // $roles[] = 'ROLE_USER';\n\n return $this->roles;\n }", "title": "" }, { "docid": "4735311d66125d6db17d3fa2c1a2e93e", "score": "0.64207405", "text": "public function index()\n {\n $result = Role::select(\n 'id',\n 'name',\n 'description'\n )->paginate(10);\n\n $roles = $result->items();\n\n $pagination = [\n 'total' => $result->total(),\n 'current_page' => $result->currentPage(),\n 'per_page' => $result->perPage(),\n 'last_page' => $result->lastPage(),\n 'from' => $result->firstItem(),\n 'to' => $result->lastItem()\n ];\n\n return response()->json([\n 'roles' => $roles,\n 'pagination' => $pagination\n ]);\n }", "title": "" }, { "docid": "6fd4706d5055745f45bd909a4303d3e3", "score": "0.6417911", "text": "public function index()\n\t{\n\t\t$roles = $this->roleRepository->all();\n\n\t\treturn $this->sendResponse($roles->toArray(), \"Roles retrieved successfully\");\n\t}", "title": "" }, { "docid": "0d11c16666d74b07ad8ed30b94e5d80d", "score": "0.6417258", "text": "function userRoles() {\n $roles = array();\n $CI = & get_instance();\n $data = $CI->user_model->viewAll(TBL_USERS_ROLES, '');\n foreach ($data as $val)\n $roles[$val->name] = $val->id;\n return $roles;\n}", "title": "" }, { "docid": "9224c6e8dc4fbc46d556a871ae128657", "score": "0.6415549", "text": "function getRole();", "title": "" }, { "docid": "42ab37f4f281393314b4f60dcfe2b90e", "score": "0.6413328", "text": "public function getRoles()\n {\n return $this->role;\n }", "title": "" }, { "docid": "efae32d00b9389c98b85d072ee0e5ff8", "score": "0.6410914", "text": "function authGetRole() {\r\n}", "title": "" }, { "docid": "ad9d866d609d3133de97c860294bea7d", "score": "0.6403373", "text": "public function get_all_roles()\n {\n $this->db->select('*');\n $this->db->from('cms_roles');\n $this->db->where('roles_status', '0');\n $query = $this->db->get();\n //echo $this->db->last_query();\n return $query->result();\n }", "title": "" }, { "docid": "857218415fab06e2e16c2c79b1c6b2e1", "score": "0.64005286", "text": "public function getRoleList()\n {\n return $this->_roleList;\n }", "title": "" }, { "docid": "c71188c8bc214d7b8c1e29359e07c2ca", "score": "0.63996744", "text": "public function index()\n {\n return RoleResource::collection(Role::all());\n }", "title": "" }, { "docid": "47259324b73da47d2a73f4cda47014a9", "score": "0.6397912", "text": "public function actionIndex()\n {\n $data = Role::get_roles(true);\n return $this->render('index',['data'=>$data]);\n }", "title": "" }, { "docid": "6465c968002e75955a71eb6a8060bd2a", "score": "0.6382321", "text": "function getAllUserRoles($params = array()){\n $qry = 'CALL getAllUserRoles()';\n $qry = $this->db->prepareQuery($qry);\n $rslt = $this->db->getResultSet($qry);\n\t\treturn $rslt;\n }", "title": "" }, { "docid": "6af5419cf086b81a80673257aa55c598", "score": "0.6381605", "text": "public function obtain_roles() {\r\n global $SESSION;\r\n\r\n $roles = array();\r\n\r\n $saml_attributes = $SESSION->onelogin_saml_login_attributes;\r\n $roleMapping = $this->config->field_map_role;\r\n if (!empty($roleMapping) && isset($saml_attributes[$roleMapping]) && !empty($saml_attributes[$roleMapping])) {\r\n $siteadminMapping = explode(',', $this->config->saml_role_siteadmin_map);\r\n $coursecreatorMapping = explode(',', $this->config->saml_role_coursecreator_map);\r\n $managerMapping = explode(',', $this->config->saml_role_manager_map);\r\n\r\n $samlRoles = $saml_attributes[$roleMapping];\r\n\r\n foreach ($samlRoles as $samlRole) {\r\n if (in_array($samlRole, $siteadminMapping)) {\r\n $roles[] = 'siteadmin';\r\n }\r\n if (in_array($samlRole, $coursecreatorMapping)) {\r\n $roles[] = 'coursecreator';\r\n }\r\n if (in_array($samlRole, $managerMapping)) {\r\n $roles[] = 'manager';\r\n }\r\n }\r\n }\r\n return array_unique($roles);\r\n }", "title": "" }, { "docid": "c0a9934d4e262fb69a8fa49db8bd3640", "score": "0.636583", "text": "public function getAllCommunityManagerRoles() {\n return CommunityUtil::getAllCommunityManagerRoles();\n }", "title": "" }, { "docid": "0b4e72643f1d54da413e07b16ac62780", "score": "0.6365353", "text": "public function getRolesCollection()\n {\n return $this->roles;\n }", "title": "" }, { "docid": "0b4e67786d893c5669b8bba7e7ff7fb9", "score": "0.63638544", "text": "public function getRoles()\n {\n return $this->user->getRoles();\n }", "title": "" } ]
ed81f6d606b83c0ec94887b31d73d001
Gets a call based on reverse key
[ { "docid": "0ec4d14ad430507af43fd426e6157a94", "score": "0.69419867", "text": "public function & call ($reverseKey) {\r\n\t\treturn $this->mb->call($reverseKey);\r\n\t}", "title": "" } ]
[ { "docid": "e6b250fafe737f5b19daa775a479e855", "score": "0.558794", "text": "public function getByKey($key);", "title": "" }, { "docid": "e6b250fafe737f5b19daa775a479e855", "score": "0.558794", "text": "public function getByKey($key);", "title": "" }, { "docid": "4f2c9853a300049a4dac9349836f2099", "score": "0.554112", "text": "function get(Key $key);", "title": "" }, { "docid": "aa7b58a6d762b5d83e772a9f69cdb200", "score": "0.54436266", "text": "public function get($key)\n {\n $query = new Query($this->uri->getQuery());\n\n return $query->getPair($key);\n }", "title": "" }, { "docid": "827601880d41e541231977067f9e6d4a", "score": "0.5360751", "text": "public function getEndpoint(KeyInterface $key): string;", "title": "" }, { "docid": "d2d0f4db08c06ce921884cc93bede704", "score": "0.5304542", "text": "public static function get(string $key)\n {\n if(!isset(self::$data[$key]))\n {\n $call = self::$functions[$key];\n self::$data[$key] = $call();\n }\n\n return self::$data[$key];\n }", "title": "" }, { "docid": "4a0c6f83168e6feeaf7dbd2cc5c5bfd1", "score": "0.52813834", "text": "public function __get($key){\n\t\tif (isset($this->_delegator->$key)){\n\t\t\treturn ($this->_delegator->$key);\n\t\t}\n\t}", "title": "" }, { "docid": "3af3df30eacff7ac8c925478c0613024", "score": "0.5276711", "text": "public function lookup($key, $closure=null)\n\t{\n\t\treturn $this->registry()->lookup($key, $closure);\n\t}", "title": "" }, { "docid": "11216cd3763294e0ae2fb2fa0064362b", "score": "0.5230647", "text": "public function get( $key );", "title": "" }, { "docid": "11216cd3763294e0ae2fb2fa0064362b", "score": "0.5230647", "text": "public function get( $key );", "title": "" }, { "docid": "40bdd4a3f6d9e371787f8761341cd5e1", "score": "0.5225902", "text": "public function __invoke(string $key) : string;", "title": "" }, { "docid": "f11318e97a61844218429490b073892a", "score": "0.51986766", "text": "public function get($key){}", "title": "" }, { "docid": "f11318e97a61844218429490b073892a", "score": "0.51986766", "text": "public function get($key){}", "title": "" }, { "docid": "d1f3a2151dc632c85c2d4e4c712a56a1", "score": "0.5197063", "text": "public function getArgument(?string $key = null);", "title": "" }, { "docid": "f11318e97a61844218429490b073892a", "score": "0.5196611", "text": "public function get($key){}", "title": "" }, { "docid": "f11318e97a61844218429490b073892a", "score": "0.5196611", "text": "public function get($key){}", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.5179671", "text": "public function get(string $key);", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.5179671", "text": "public function get(string $key);", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.5179671", "text": "public function get(string $key);", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.5179671", "text": "public function get(string $key);", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.5179671", "text": "public function get(string $key);", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.5179671", "text": "public function get(string $key);", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.5179671", "text": "public function get(string $key);", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.5179671", "text": "public function get(string $key);", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.5179671", "text": "public function get(string $key);", "title": "" }, { "docid": "9e2db738f0e6f0b5218ad9691c2e4573", "score": "0.51495105", "text": "public function getRouteKey();", "title": "" }, { "docid": "d1e13fbf528e2e62a907258c02343958", "score": "0.5103419", "text": "public function getCallback($method)\n {\n if (!isset($this->routes[$method])) {\n return null;\n }\n\n foreach ($this->routes[$method] as $name => $value) {\n if (preg_match($name, $this->currentPath, $matches)||preg_match($name, $this->currentPath.\"/\", $matches)) {\n // Get elements with string keys from matches\n $params = array_intersect_key($matches, array_flip(array_filter(array_keys($matches), 'is_string')));\n\n foreach ($params as $key => $value) {\n $this->request[\"params\"][$key] = $value;\n }\n\n\n return $this->routes[$method][$name];\n }\n }\n }", "title": "" }, { "docid": "75373f55af87fc93f4b2ce9491660e05", "score": "0.5102029", "text": "public function get_call( $index ) {\n\t\treturn $this->get_called_functions()[ $index ];\n\t}", "title": "" }, { "docid": "c4206ca6653c570d34821d2d169db99b", "score": "0.50978744", "text": "public function getCall()\n {\n return $this->call;\n }", "title": "" }, { "docid": "c4206ca6653c570d34821d2d169db99b", "score": "0.50978744", "text": "public function getCall()\n {\n return $this->call;\n }", "title": "" }, { "docid": "844eb09798aa5d81565448c300acfb87", "score": "0.5091855", "text": "function get_key() { }", "title": "" }, { "docid": "844eb09798aa5d81565448c300acfb87", "score": "0.5091855", "text": "function get_key() { }", "title": "" }, { "docid": "7d459338debc9f059786e8a5a7c1d7a6", "score": "0.50760627", "text": "public function get($key, Closure $lookup);", "title": "" }, { "docid": "1a9cca24975c680fc1486b2a723f4e7f", "score": "0.5075954", "text": "public function bubbleGet($key) {\n\n\t\treturn $this->_bubbleGet($this->_Model, $key);\n\n\t}", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.507454", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.507454", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.507454", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.507454", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.507454", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.507454", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.507454", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.507454", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.507454", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.507454", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.507454", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.507454", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.507454", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.507454", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.507454", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.507454", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.507454", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.507454", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.507454", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.507454", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.507454", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.507454", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.507454", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.507454", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.507454", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.507454", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.507454", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.507454", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.507454", "text": "public function get($key);", "title": "" }, { "docid": "9d8b96f6a9a74919278dc5cb2e288138", "score": "0.5054501", "text": "public function getSubscription($key);", "title": "" }, { "docid": "e893034e5c53da37bcb7fa4352fab6c2", "score": "0.5040345", "text": "protected function getFromCache(/*# string */ $key)\n {\n return $this->path_cache[$key[0]][$key];\n }", "title": "" }, { "docid": "842ca6d8802a996db2ba02cd7f77b969", "score": "0.5039939", "text": "public function __get( $key ) {\r\n\t\tif ( in_array( $key, array( 'funds_addition', 'repayment', 'dashboard', 'gateways', 'mailer' ), true ) ) {\r\n\t\t\treturn $this->$key() ;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "9a83e46ceaed1011ad999b524060b8e2", "score": "0.50273496", "text": "public function get($key) {}", "title": "" }, { "docid": "9a83e46ceaed1011ad999b524060b8e2", "score": "0.50273496", "text": "public function get($key) {}", "title": "" }, { "docid": "3fa9bd34fe01d71ab2a9f19b16967330", "score": "0.5018772", "text": "final public static function _callRegistryGet($key)\n\t{\n\t\t$oAuth = array();\n\t\tphpJar\\Registry::_set(static::REG_INDEX,$oAuth,false);\n\t\t$oAuth = phpJar\\Registry::_get(self::REG_INDEX);\n\t\treturn $oAuth[$key];\n\t}", "title": "" }, { "docid": "cf6533887ff477dc980657cd3e1e23dd", "score": "0.50128347", "text": "public function fetch($key) {}", "title": "" }, { "docid": "7cfd1f6e26966e1a71e8b98953e1f1fd", "score": "0.4984059", "text": "public function get($key = null);", "title": "" }, { "docid": "853f2539c7823ff9d166d317c2d1cbc6", "score": "0.49823767", "text": "public function getByKey($key, array $options = []);", "title": "" }, { "docid": "edb261271f274b24fa4ca6c1b05747a6", "score": "0.4975755", "text": "function get($key) {\n $keys = array($this->key);\n $values = array($key);\n return $this->get_with_parameter($keys, $values);\n }", "title": "" }, { "docid": "c2adf493aac0d84385a82e0403ecece7", "score": "0.49600187", "text": "function get($key);", "title": "" }, { "docid": "c2adf493aac0d84385a82e0403ecece7", "score": "0.49600187", "text": "function get($key);", "title": "" }, { "docid": "c2adf493aac0d84385a82e0403ecece7", "score": "0.49600187", "text": "function get($key);", "title": "" }, { "docid": "c2adf493aac0d84385a82e0403ecece7", "score": "0.49600187", "text": "function get($key);", "title": "" }, { "docid": "738ed3922e6962f1dd8ee531ddd27695", "score": "0.49354708", "text": "public function __get($key) {\n\n\t\treturn $this->bubbleGet($key);\n\n\t}", "title": "" }, { "docid": "72b02340eb1e94f83a9ddd8bc4e03ca1", "score": "0.49324664", "text": "public function get(string $key)\n { //\n $result = $this->strings[$key] ?? $key;\n\n // Is there a redirection to another string?\n if (is_string($result) && substr($result, 0, 2) == '@@') {\n $result = $this->get(substr($result, 2));\n }\n\n if ($result == $key && isset($this->fallback_language)) {\n $result = $this->fallback_language->get($key);\n }\n\n return $result;\n }", "title": "" }, { "docid": "cfd337920015d34b3ac29913b2c85f6f", "score": "0.49284896", "text": "public function get(string $key = null);", "title": "" }, { "docid": "4586920d3d23f7ba7637e87947210882", "score": "0.49269775", "text": "public function pull($key);", "title": "" }, { "docid": "6cbda02029e75e74b1925e7e66999de9", "score": "0.4915962", "text": "public function getResult($key);", "title": "" }, { "docid": "168ea88d26ac18921cdece869cb1ccc5", "score": "0.4911428", "text": "public static function get($key=null)\n {\n global $prev;\n if(self::$dummy_overwrite || self::$cacheType == 'dummy')\n return self::$dummy[$key];\n\n if(array_key_exists(self::$cacheType, self::$cacheInstalled))\n {\n $install = self::$cacheInstalled[self::$cacheType];\n\n if(show_cache_debug)\n {\n DebugConsole::insert_info('inc/cache.php', 'Get Cache => Key: '.$key);\n DebugConsole::insert_info('inc/cache.php', 'Call: '.$install['Class'].'::'.$install['CallTag'].'get | Keys: '.$key);\n }\n\n return call_user_func($install['Class'].'::'.$install['CallTag'].'get',$prev.$key);\n }\n\n return false;\n }", "title": "" }, { "docid": "d1289aa662b9f385f716a1ae5e84a9eb", "score": "0.48994282", "text": "abstract public function get(string $key);", "title": "" }, { "docid": "dd8b91bc316506dd0637fc0c1c6e15ba", "score": "0.4897102", "text": "function getQuery(string $key = null);", "title": "" }, { "docid": "1c7e7d7fb5326778c07a7fd8a1ff8786", "score": "0.48901057", "text": "public function getByKey( $key ){\n return $this->model->where('key',$key)->first();\n }", "title": "" }, { "docid": "fc6aae360e2444feaf7fa6a4df7fa4de", "score": "0.48854756", "text": "public function getCallNumber();", "title": "" }, { "docid": "847e0e2205d0de2b5e261b6506ddf1f7", "score": "0.48713374", "text": "public function callPointer(mixed $value, mixed &$key): mixed\n {\n return $this->pointers->matching()->call($value, $key);\n }", "title": "" }, { "docid": "7d404bb6405925829989a6ef69b02ab7", "score": "0.48659632", "text": "public static function get($key) {\n\t\t$id = self::getCacheKey($key);\n\t\t$conn = self::$connections[self::findServer($id)];\n\t\treturn \"{$conn}->get($id)\";\n\t}", "title": "" }, { "docid": "c26a3ed154bef7e0388546c60da61c2e", "score": "0.48640633", "text": "public function route($key = null){\n\n $route = null;\n\n // get key as a parm, or set by parent class\n $key = $key?$key:$this->key;\n\n // take action based on key\n switch( $key ){\n\n // Special case for Web Director\n case 'web-director':\n\n $route = 'web_director';\n\n break;\n\n default:\n\n $route = 'main';\n\n break;\n }\n\n return $route;\n }", "title": "" }, { "docid": "d8c3f62b3df43a3446de3ece8a55b1bb", "score": "0.4852973", "text": "public static function Get($key)\n\t\t{\n\t\t\treturn self::getData($_GET, $key);\n\t\t}", "title": "" }, { "docid": "5c7790b8b430624b24a90d1fb88fb14b", "score": "0.48518538", "text": "public function get(int $key);", "title": "" }, { "docid": "95be0875fd5a6940d954dc3794dc4885", "score": "0.48379597", "text": "public function getByKey($key)\n {\n return $this->model->where('key','=',$key)->first();\n }", "title": "" }, { "docid": "0703aab79a09c1050c9c0db24e299174", "score": "0.48354894", "text": "abstract function KeyGet($key);", "title": "" }, { "docid": "f3c08b9bb3fc79af8347fe05f6cb302f", "score": "0.4833884", "text": "public function getMethodKey()\n {\n return $this->methodKey;\n }", "title": "" }, { "docid": "e3af4d89bab5a3edd8359982dfb2b941", "score": "0.48288122", "text": "abstract public function get($key);", "title": "" }, { "docid": "e3af4d89bab5a3edd8359982dfb2b941", "score": "0.48288122", "text": "abstract public function get($key);", "title": "" }, { "docid": "e3af4d89bab5a3edd8359982dfb2b941", "score": "0.48288122", "text": "abstract public function get($key);", "title": "" }, { "docid": "e3af4d89bab5a3edd8359982dfb2b941", "score": "0.48288122", "text": "abstract public function get($key);", "title": "" }, { "docid": "e3af4d89bab5a3edd8359982dfb2b941", "score": "0.48288122", "text": "abstract public function get($key);", "title": "" } ]
630bbdc03bcbacab17cb1da7d2853603
Fngsi tambah data ke tabel pemain
[ { "docid": "1496c1732c4362c2aa5363650b958cfb", "score": "0.0", "text": "function addPemain($nama, $email, $score){\n $sql = \"INSERT INTO pemain (Nama, Email, Score) VALUES('\".$nama.\"','\".$email.\"','\".$score.\"')\";\n if (mysqli_query($GLOBALS['koneksi'], $sql)) {\n } else {\n echo \"Error: \" . $sql . \"<br>\" . mysqli_error($GLOBALS['koneksi']);\n }\n mysqli_close($GLOBALS['koneksi']);\n}", "title": "" } ]
[ { "docid": "563b1344ab75babbce0784714ea5a89c", "score": "0.7469896", "text": "public function tambahData()\n {\n $fieldPegawai = $this->poldaModel->getTableCollumn('pegawai'); // all field of table pegawai\n $fieldUsers = $this->poldaModel->getTableCollumn('users');\n $fieldPekerjaan = ['nip', 'id_jabatan', 'id_satker', 'id_bagian', 'id_subbag', 'periode_mulai'];\n $fieldGolongan = ['nip', 'id_golongan', 'periode_mulai'];\n\n $dataPegawai = array();\n $dataPekerjaan = array();\n $dataGolongan = array();\n $dataUsers = array();\n\n // format untuk tabel pegawai\n $passTTL = str_replace('-', '', $this->request->getVar('ttl'));\n $jabatan = explode(\" \", $this->request->getVar('jabatan'));\n $golongan = explode(\" \", $this->request->getVar('pangkat_gol'));\n $satker = explode(\" \", $this->request->getVar('id_satker'));\n $bagian = explode(\" \", $this->request->getVar('id_bagian'));\n $subbag = explode(\" \", $this->request->getVar('id_subbag'));\n\n foreach ($fieldPegawai as $field) {\n if ($field == 'jabatan') {\n $dataPegawai[$field] = $jabatan[0];\n } elseif ($field == 'id_satker') {\n $dataPegawai[$field] = $satker[0];\n } elseif ($field === \"id_bagian\") {\n $dataPegawai[$field] = $bagian[0];\n } elseif ($field == 'id_subbag') {\n $dataPegawai[$field] = $subbag[0];\n } else {\n $dataPegawai[$field] = $this->request->getVar($field);\n }\n }\n\n\n foreach ($fieldPekerjaan as $field) {\n if ($field == 'id_satker') {\n $dataPekerjaan[$field] = $satker[0];\n } elseif ($field === \"id_bagian\") {\n $dataPekerjaan[$field] = $bagian[0];\n } elseif ($field == 'id_subbag') {\n $dataPekerjaan[$field] = $subbag[0];\n } elseif ($field == 'id_jabatan') {\n $dataPekerjaan[$field] = $jabatan[0];\n } elseif ($field == 'periode_mulai') {\n $dataPekerjaan[$field] = '1000/01/01';\n } else {\n $dataPekerjaan[$field] = $this->request->getVar($field);\n }\n }\n foreach ($fieldGolongan as $field) {\n if ($field == 'id_golongan') {\n $dataGolongan[$field] = $golongan[0];\n } elseif ($field == 'periode_mulai') {\n $dataGolongan[$field] = '1000-10-1';\n } else {\n $dataGolongan[$field] = $this->request->getVar($field);\n }\n }\n\n\n foreach ($fieldUsers as $field) {\n if ($field == 'password') {\n $dataUsers[$field] = $passTTL;\n } elseif ($field == 'role') {\n $dataUsers[$field] = 'user';\n } elseif ($field == 'status') {\n $dataUsers[$field] = '1';\n } else {\n $dataUsers[$field] = $this->request->getVar($field);\n }\n }\n\n try {\n $this->pegawaiModel->insert($dataPegawai);\n $this->rwyGolonganModel->insert($dataGolongan);\n $this->rwyPekerjaanModel->insert($dataPekerjaan);\n $this->usersModel->insert($dataUsers);\n\n session()->setFlashdata('success-add', \"Pegawai a.n \" . $dataPegawai['nip'] . \" berhasil ditambahkan!\");\n } catch (\\Exception $e) {\n session()->setFlashdata('failed-add', $e);\n }\n\n return redirect()->to(base_url('/admin/lihat_pegawai'));\n }", "title": "" }, { "docid": "54af2ee814d9af98e8465dd113b5a9a1", "score": "0.7392239", "text": "function tambah_aksi()\n {\n $id_jenis_paket = $this->input->post('id_jenis_paket');\n $nama_jenis_paket = $this->input->post('nama_jenis_paket');\n\n\n $data = array(\n 'id_jenis_paket' => $id_jenis_paket,\n 'nama_jenis_paket' => $nama_jenis_paket,\n );\n //menginput data ke database dengan menggunakan model m_data\n $this->m_jenis_paket->input_data($data, 'jenis_paket');\n\n //pada parameter kedua, beri nama dari tabelnya. kemudian mengalihkannya ke metod index\n redirect('crud_jp/index');\n }", "title": "" }, { "docid": "b38ec35be3495396787be3797c1e97ab", "score": "0.734307", "text": "public function tambahDataMahasiswa()\n\t{\n\t\t// \"nama\" = field pada database\n\t\t//=> this->input->post('nama',true) = mengambil method post dari form pada view\n\t\t$data = [\n\t\t\t\"nama\" => $this->input->post('nama', true),\n\t\t\t\"nrp\" => $this->input->post('nrp', true),\n\t\t\t\"email\" => $this->input->post('email', true),\n\t\t\t\"jurusan\" => $this->input->post('jurusan', true)\n\t\t];\n\t\t// inset into mahasiswa (nama,nrp,email,jurusan) values(nama,nrp,email,jurusan)\n\t\t$this->db->insert('mahasiswa', $data);\n\t}", "title": "" }, { "docid": "e3daba12adf998ab4c1019d8d5debacf", "score": "0.73158175", "text": "function tambah_aksi(){\n\t\t$nama = $this->input->post('nama'); //menangkap values nama dari variabel nama pada form tambah data\n\t\t$alamat = $this->input->post('alamat'); //menangkap values alamat dari variabel alamt pada form tambah data\n\t\t$pekerjaan = $this->input->post('pekerjaan'); //menangkap values pekerjaan dari variabel pekerjaan pada form tambah data\n //membentuk array dari value yang ditangkap\n\t\t$data = array(\n\t\t\t'nama' => $nama, //menyesuaikan nama variabel nama untuk di input ke database\n\t\t\t'alamat' => $alamat, //menyesuaikan nama variabel alamat untuk di input ke database\n\t\t\t'pekerjaan' => $pekerjaan //menyesuaikan nama variabel pekerjaan untuk di input ke database\n );\n //proses pengiriman array yang telah dibuat ke folder model yang nama filenya m_data\n\t\t$this->m_data->input_data($data,'user');\n //apabila proses pengiriman berhasil maka akan membuka halaman utama dari crud\n redirect('/crud/');\n }", "title": "" }, { "docid": "57585be6828a378499224e214c94de0d", "score": "0.7287656", "text": "function tambah_aksi(){\n\t\t$nama = $this->input->post('nama');\n\t\t$alamat = $this->input->post('alamat');\n\t\t$pekerjaan = $this->input->post('pekerjaan');\n // Ini adalah sebuah array yang berguna untuk menjadikan ketiga diatas menjadi 1 variabel \n // yang nantinya akan disertakan ke dalam query insert pada model bernama m_data.\n\t\t$data = array(\n\t\t\t'nama' => $nama,\n\t\t\t'alamat' => $alamat,\n\t\t\t'pekerjaan' => $pekerjaan\n\t\t\t);\n\t\t $this->m_data->input_data($data,'user');\n\t\tredirect('crud/index');\n }", "title": "" }, { "docid": "e8b0341ecc05d6f979b5d43ee4c2789f", "score": "0.7277696", "text": "function tambah_aksi(){\n\t\t$nama = $this->input->post('nama');\n\t\t$alamat = $this->input->post('alamat');\n\t\t$pekerjaan = $this->input->post('pekerjaan');\n\t\t//Menjadikan array \n\t\t$data = array(\n\t\t\t'nama' => $nama,\n\t\t\t'alamat' => $alamat,\n\t\t\t'pekerjaan' => $pekerjaan\n\t\t\t);\n\t\t$this->m_data->input_data($data,'user');\n\t\t//Menginput data ke database dengan menggunakan model m_data\n\t\t//Pada parameter pertama diinputkan array data yang berisi data-data yang diinput\n\t\t//Pada parameter kedua diberi nama tabel nya(tabel tempat tujuan tempat menyimpan data inputan)\n\t\tredirect('crud/index');\n\t\t//Mengalihkan ke method index pada controller crud\n\t}", "title": "" }, { "docid": "e4cbbdb9f9ad63c3b2818d927052a5aa", "score": "0.7274031", "text": "public function tambahdataguru(){\n\t\t$guru['nama'] = $this->input->post('nama');\n\t\t$guru['mapel'] = $this->input->post('mapel');\n\t\t$guru['telp'] = $this->input->post('telp');\n\n\t\t$query = $this->crud_siswa->tambahdataguru($guru);\n\t\tredirect('beranda/tampil');\n\t}", "title": "" }, { "docid": "40603e6bdf85f84d90d15dd551057201", "score": "0.72506076", "text": "public function tambahdata($project){\n return $this->db->insert('project',$project);\n //Memasukkan Data Ke Dalam Tabel Dengan Parameter siswa.\n\n }", "title": "" }, { "docid": "d76415876d80010adc5fbb209355f65c", "score": "0.7205383", "text": "function tambah_barang(){\n\t\t$data = array(\n\t\t\t'kd_barang' => $this->input->post('kd_barang'),\n\t\t\t'nm_barang' => $this->input->post('nm_barang'),\n\t\t\t'stok' => $this->input->post('stok'),\n\t\t\t'harga' => $this->input->post('harga'),\n\t\t);\n\t\t$this->model_app->insertData('tbl_barang',$data);\n\t\tredirect('master_barang');\n\t}", "title": "" }, { "docid": "4e85c8809fd3a34f89bca6e866261010", "score": "0.7201042", "text": "public function tambahdata(){\n\t\t$siswa['nama'] = $this->input->post('nama');\n\t\t$siswa['kelas'] = $this->input->post('kelas');\n\t\t$siswa['alamat'] = $this->input->post('alamat');\n\t\n\t\t$query = $this->crud_siswa->tambahdatasiswa($siswa);\n\t\tredirect('beranda/tampil');\n\t}", "title": "" }, { "docid": "d8bbc8c3b4186385837fbb583545ae9d", "score": "0.71163297", "text": "public function tambah()\n {\n\t\t$this->data_pegawai->tambahDataPegawai();\n $this->session->set_flashdata('flash', 'Ditambahkan');\n\n\t\t//Redirect halaman menuju home view\n\t\tredirect('home');\n }", "title": "" }, { "docid": "458103b4c209c57d8ec58ba733afa430", "score": "0.7111182", "text": "public function tambahdatajadwal(){\n\t\t$jadwal['guru_id'] = $this->input->post('guru_id');\n\t\t$jadwal['mapel'] = $this->input->post('mapel');\n\t\t$jadwal['hari'] = $this->input->post('hari');\n\t\t$jadwal['jam'] = $this->input->post('jam');\n\t\t$jadwal['jamakhir'] = $this->input->post('jamakhir');\n\n\t\t$query = $this->crud_siswa->tambahdatajadwal($jadwal);\n\t\tredirect('beranda/tampil');\n\t}", "title": "" }, { "docid": "5a2e6f67c120d1a339ca8cb7ee9be5c0", "score": "0.7005227", "text": "public function tambah()\r\n {\r\n // kalau nilai nya lebih besar dari 0 maka ada baris baru yang kita lakukan yaitu redirect ke halaman utama mahasiswa\r\n // ingat phpdasar\r\n if ($this->model('Mahasiswa_model')->tambahDataMahasiswa($_POST) > 0) {\r\n // sebelum redirect kita set dulu flash messagenya yang dipanggil di index.php\r\n // ingat kita set 3 parameter di file flasher (pesan,aksi,tipe)\r\n Flasher::setFlash('berhasil', 'ditambahkan', 'success');\r\n header('location: ' . BASEURL . '/mahasiswa');\r\n exit;\r\n } else {\r\n Flasher::setFlash('gagal', 'ditambahkan', 'danger');\r\n header('location: ' . BASEURL . '/mahasiswa');\r\n exit;\r\n }\r\n }", "title": "" }, { "docid": "c63d4c543248e66aca4b6f256ae52f4e", "score": "0.7004872", "text": "public function actionTambah()\n {\n $this->layout = '//layouts/box_kecil';\n $model = new Penjualan;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Penjualan'])) {\n $model->attributes = $_POST['Penjualan'];\n if ($model->save()) {\n $this->redirect(['ubah', 'id' => $model->id, 'uid' => Yii::app()->user->id]);\n }\n }\n\n $customerList = Profil::model()->findAll([\n 'select' => 'id, nama',\n 'condition' => 'id>' . Profil::AWAL_ID . ' and tipe_id=' . Profil::TIPE_CUSTOMER,\n 'order' => 'nama',\n ]);\n\n $this->render('tambah', [\n 'model' => $model,\n 'customerList' => $customerList,\n ]);\n }", "title": "" }, { "docid": "73c2e7f2235752a1b4d3d51cb4ba5696", "score": "0.69944197", "text": "function tambah_aksi(){\n\t\t$nama = $this->input->post('nama');\n\t\t$alamat = $this->input->post('alamat');\n\t\t$pekerjaan = $this->input->post('pekerjaan');\n \n\t\t$data = array(\n\t\t\t'nama' => $nama,\n\t\t\t'alamat' => $alamat,\n\t\t\t'pekerjaan' => $pekerjaan\n\t\t\t);\n\t\t$this->m_data->input_data($data,'user');\n\t\tredirect('crud/index');\n }", "title": "" }, { "docid": "a2c155f327db8e790fa6b19672b07eae", "score": "0.6988441", "text": "public function tambahAction() {\n $session = $this->getServiceLocator()->get('EtaxService')->getStorage()->read();\n $frm = new \\Bphtb\\Form\\Setting\\PemdaFrm();\n $req = $this->getRequest();\n $newFile = \"\";\n if ($req->isPost()) {\n $base = new \\Bphtb\\Model\\Setting\\PemdaBase();\n $post = array_merge_recursive($req->getPost()->toArray(), $req->getFiles()->toArray());\n $frm->setData($post);\n if ($frm->isValid()) {\n $base->exchangeArray($frm->getData());\n $httpadapter = new \\Zend\\File\\Transfer\\Adapter\\Http();\n $httpadapter->setDestination('public/upload/');\n if ($httpadapter->receive($post[\"s_logofile\"][\"name\"])) {\n $newFile = $httpadapter->getFileName();\n }\n $this->getTbl()->savedata($base, $newFile, $session);\n return $this->redirect()->toRoute('setting_pemda');\n }\n }\n }", "title": "" }, { "docid": "67a62afa6191c13a8c03f47fbd7dba8f", "score": "0.69393104", "text": "public function tambah()\n\t{\n\t\t// $config['allowed_types'] = 'pdf';\n\t\t// $config['max_size'] = '2048';\n\t\t// $config['upload_path'] = './assets/img/upload/';\n\t\t// $config['file_name']\t = $nama;\n\t\t// $this->upload->initialize($config);\n\t\tif ($this->model_alumni->insertAlumni() == true) {\n\n\t\t\t$this->session->set_flashdata('pesan', '<div class=\"callout callout-success\"><h4><b>Berhasil !</b></h4> Data berhasil ditambahkan.</div>');\n\t\t\tredirect(base_url('alumni/data_diri'));\n\t\t} else {\n\t\t\t$this->session->set_flashdata('pesan', '<div class=\"callout callout-danger\"><h4><b>Gagal !</b></h4> Ekstensi file tidak diijikan. Harus (.jpeg / .png / .jpg)</div>');\n\t\t\tredirect(base_url('alumni/data_diri'));\n\t\t}\n\t}", "title": "" }, { "docid": "a38c460f78e3dda911465ee050ec9e26", "score": "0.69321406", "text": "function tambah_pegawaikeuangan($data_pegawaikeuangan){\n\t\t\tglobal $con;\n\n\t\t\t$id_pegawaikeuangan = $data_pegawaikeuangan['id_pegawaikeuangan'];\n\t\t\t$id_pegawai = $data_pegawaikeuangan['id_pegawai']; \n\t\t\t\n\t\t\tmysqli_query($con, \"insert into tb_pegawaikeuangan(id_pegawaikeuangan,id_pegawai)\n\t\t\t\t\t\tvalues ('$id_pegawaikeuangan','$id_pegawai')\");\n\t\t}", "title": "" }, { "docid": "339a869040105b60513ba54acce60c63", "score": "0.69311035", "text": "function tambah_data(){\n $bulan = $this->input->post('bulan');\n $keterangan = $this->input->post('keterangan');\n $uang = $this->input->post('uang');\n //mengubah data string pada database menjadi bentuk array\n $data = array(\n 'bulan' => $bulan,\n 'keterangan' => $keterangan,\n 'uang' => $uang\n );\n $this->m_kas->tambah_data($data, 'kas_masuk'); //perintah yang digunakan untuk memasukkan data sesuai variabel yang telah ditentukan\n redirect('kasmasuk/index');\n\n }", "title": "" }, { "docid": "93da729133e732120a9f49f8d1898ed4", "score": "0.69229805", "text": "public function tambah_jalur_pembayaran()\n {\n $this->template->load('template_backend', 'tampilan_backend/jalur_pembayaran/v_tambah_form');\n }", "title": "" }, { "docid": "ceac2c303b67f2cc0055a5d639fda2d4", "score": "0.6901325", "text": "function tambah(){\n\t\t//Method tambah ini berfungsi untuk menampilkan view v_input\n\t\t//v_input digunakan untuk tampilan form inputan, di mana data yang diinput akan masuk ke database\n\t\t//Pada form ditentukan aksi dari form yang diarahkan ke method tambah_aksi pada controller crud\n\t\t$this->load->view('v_input');\n\t}", "title": "" }, { "docid": "f5446303d18ec25659042d20e5cacdc9", "score": "0.6900669", "text": "public function tambah($data)\n {\n $this->db->insert('homepage', $data);\n }", "title": "" }, { "docid": "4af9c9477aca03b9c31c3113b3c82831", "score": "0.6899057", "text": "function tambah_aksi()\n {\n $kode = $this->M_jalur_pembayaran->get_no();\n $nm_jalur = $this->input->post('nm_jalur');\n //validasi\n $this->form_validation->set_rules('nm_jalur', 'Nama Jalur', 'required|alpha');\n if ($this->form_validation->run() == FALSE)\n {\n $this->template->load('template_backend', 'tampilan_backend/jalur_pembayaran/v_tambah_form');\n }\n else\n {\n // memasukkan data ke dalam array assoc\n $data = array(\n 'id_jalur' => $kode,\n 'nm_jalur' => $nm_jalur\n );\n\n // mengirim data ke model untuk diinputkan ke dalam database\n $this->M_jalur_pembayaran->input_data('jalur_pembayaran', $data);\n\n // kembali ke halaman utama\n redirect('backend/v_jalur_pembayaran');\n }\n \n }", "title": "" }, { "docid": "8909f29a25bb51a21d38a12c9e5b809b", "score": "0.68718266", "text": "public function prosesTambah()\n {\n $this->peserta->tambahData($this->input->post(NULL, TRUE));\n header(\"Location: \".site_url(\"peserta\")); // Arahkan kembali user ke halaman daftar\n }", "title": "" }, { "docid": "903b5f494d5f2f88be1d22f76dc66c7e", "score": "0.68715197", "text": "function tambah_jadwal($data_jadwal){\n\t\t\tglobal $con;\t\n\t\t\t\n\t\t\t$id_jadwal = gen_uuid();\n\t\t\t$id_pegawai = $data_jadwal['id_pegawai'];\n\t\t\t$tgl_mulai = $data_jadwal['tgl_mulai'].' '.$data_jadwal['waktu_mulai'];\n\t\t\t$tgl_akhir = $data_jadwal['tgl_akhir'].' '.$data_jadwal['waktu_akhir'];\n\t\t\t$informasi = $data_jadwal['informasi'];\n\n\t\t\tmysqli_query($con, \"insert into tb_jadwal(id_jadwal,id_pegawai,tgl_mulai,tgl_akhir,informasi)\n\t\t\t\t\t\tvalues ('$id_jadwal','$id_pegawai','$tgl_mulai','$tgl_akhir','$informasi')\");\n\t\t}", "title": "" }, { "docid": "a99fb58035b336821105a77c3fa43c9f", "score": "0.6866878", "text": "public function tambah_jadwalmengajar()\n\t\t\t{\n\t\t\t\t$data['prodi'] = $this->jadwalmengajar->get_prodi();\n\t\t\t\t$this->load->view('head',$data);\n\t\t\t\t$this->load->view('jadwalmengajar/menu');\n\t\t\t\t$this->load->view('jadwalmengajar/V_tambah_jadwal');\n\t\t\t\t$this->load->view('footer');\n\t\t\t}", "title": "" }, { "docid": "ab0d49070aae52b84155b73fe77a1eb0", "score": "0.6858218", "text": "public function tambah_data(){\n\t\t$oke['content_page']=\"surat/v_tambah_surat\";\n\t\t$this->load->view('body/menu',$oke);\n\t}", "title": "" }, { "docid": "26d938080108423211e2141e10c0e902", "score": "0.68474495", "text": "public function tambah_ebook()\n {\n $post = $this->input->post();\n $data = [\n 'judul'=>$post['judul'],\n 'penulis'=>$post['penulis'],\n 'tahun'=>$post['tahun'],\n 'email'=>$post['email'],\n 'penerbit'=>$post['penerbit'],\n 'kota'=>$post['kota'],\n 'sinopsis'=>$post['sinopsis']\n ];\n $this->ebook_model->add_ebook($data);\n $this->session->set_flashdata('msg','Data Berhasil disimpan');\n redirect('admin/ebook_admin');\n }", "title": "" }, { "docid": "09791e13bc1cfb2c1f862dd7e10dc42c", "score": "0.6839267", "text": "public function tambah($table,$data)\n\t{\n\t\t$this->db->insert_batch($table, $data);\n\t}", "title": "" }, { "docid": "a67bc603461a4c62dcc004a2c3274beb", "score": "0.6834054", "text": "protected function insertData()\n {\n /* silahkan di rubah sesuai kebutuhan */\n foreach($this->readCSV() as $data){\n\n $this->model->create([\n 'id' => $data['id'],\n 'sekolah_id' => $data['sekolah_id'],\n 'program_keahlian_id' => $data['program_keahlian_id'],\n 'kuota_siswa' => $data['kuota_siswa'],\n 'keterangan' => $data['keterangan'],\n 'user_id' => $data['user_id'],\n ]);\n\n if($this->textInfo){\n echo \"============[DATA]============\\n\";\n $this->orangeText('id : ').$this->greenText($data['id']);\n echo\"\\n\";\n $this->orangeText('sekolah_id : ').$this->greenText($data['sekolah_id']);\n echo\"\\n\";\n $this->orangeText('program_keahlian_id : ').$this->greenText($data['program_keahlian_id']);\n echo\"\\n\";\n $this->orangeText('keterangan : ').$this->greenText($data['keterangan']);\n echo\"\\n\";\n $this->orangeText('kuota_siswa : ').$this->greenText($data['kuota_siswa']);\n echo\"\\n\";\n $this->orangeText('user_id : ').$this->greenText($data['user_id']);\n echo\"\\n\";\n echo \"============[DATA]============\\n\\n\";\n }\n\n }\n\n $this->greenText('[ SEEDER DONE ]');\n echo\"\\n\\n\";\n }", "title": "" }, { "docid": "37ec11a59cf43f404b52ed4394fbdb08", "score": "0.68031645", "text": "function tambahData($tabel,$nama) {\n\tinclude('db.config.php');\n\n\t$query \t= \"INSERT INTO $tabel (nama) VALUES ('$nama')\";\n\t$tambah\t= mysqli_query($db, $query);\n\n\tif (!$tambah) {\n\t\techo \"Gagal mmenambah data\".$tabel;\n\t\texit();\n\t}\n}", "title": "" }, { "docid": "4ba8f0e3bdfa03dab83d2168f42f2644", "score": "0.68004125", "text": "function peminjaman_tambah(){\n $where = array(\n 'status' => 1\n );\n $data['buku'] = $this->m_data->edit_data($where,'buku')->result();\n \n //mengambil data anggota dari database\n $data['anggota'] = $this->m_data->get_data('anggota')->result();\n $this->load->view('petugas/v_header');\n $this->load->view('petugas/v_peminjaman_tambah',$data);\n $this->load->view('petugas/v_footer');\n }", "title": "" }, { "docid": "a844da317afb2eb895e5a52ad8cbf68d", "score": "0.676399", "text": "public function proses_tambah()\n {\n $data = [\n 'nama_guru' => $this->input->post('nama_guru', true),\n 'kd_guru' => $this->input->post('kode', true),\n 'no_hp' => $this->input->post('nohp', true),\n 'alamat' => $this->input->post('alamat', true)\n ];\n // $data akan Di terima Di model \n // dengan param $ guru \n $this->guru->insert_guru($data);\n }", "title": "" }, { "docid": "463184bc9c420b046163d4977aeb2936", "score": "0.67615706", "text": "public function Tambah_pengumuman() \n\t{\n\t\t$data = array(\n\t\t\t'Judul_pengumuman'=>$this->input->post('judul_pengumuman'),\n\t\t\t'Isi_pengumuman'=>$this->input->post('isi_pengumuman'),\n\t\t\t'tanggal_acara'=>$this->input->post('tanggal'),\n\t\t\t'created_by'=>'admin',\n\t\t\t'created_date'=>date('Y-m-d H:i:s'),\n\t\t);\n\t\t$this->Pengumuman_model->insert($data);\n\t\t$this->session->set_flashdata('message', 'Berhasil Tambah Pengumuman');\n\t\tredirect(site_url('Halaman_admin'));\n\t}", "title": "" }, { "docid": "e1be926c51a29101aa1a490f03eb501d", "score": "0.67522454", "text": "function tambah_validasikeuangan($data_validasikeuangan){\n\t\t\tglobal $con;\n\n\t\t\t$id_validasikeuangan = gen_uuid();\n\t\t\t$id_mhs = $data_validasikeuangan['id_mhs'];\n\t\t\t$id_pegawaikeuangan = $data_validasikeuangan['id_pegawaikeuangan'];\n\t\t\t$validasi_keuangan = $data_validasikeuangan['validasi_keuangan']; \n\t\t\t$tgl_validasikeuangan = $data_validasikeuangan['tgl_validasikeuangan'];\n\t\t\t\n\t\t\tmysqli_query($con, \"insert into tb_validasikeuangan(id_validasikeuangan,id_mhs,id_pegawaikeuangan,validasi_keuangan,tgl_validasikeuangan)\n\t\t\t\t\t\tvalues ('$id_validasikeuangan','$id_mhs','$id_pegawaikeuangan','$validasi_keuangan','$tgl_validasikeuangan')\");\n\t\t}", "title": "" }, { "docid": "26f0c44d155ef994b02fc181b9713c42", "score": "0.6725515", "text": "public function tambah($object)\n\t{\n\t\t$this->db->insert('tbl_pegawai', $object);\n\t}", "title": "" }, { "docid": "0d3660aaa8292b0ba12e34d8f070dd0b", "score": "0.67152417", "text": "function tambahDataProsesBk($no_faktur, $kode_pembeli, $tgl_trans) {\n\t\t$query = \"INSERT INTO brg_keluar (no_faktur, kode_pembeli, tgl_trans)\n\t\t VALUES ('$no_faktur', '$kode_pembeli', '$tgl_trans')\";\n\t\t$hasil = mysql_query($query);\n\t}", "title": "" }, { "docid": "96f1d348108d01be81120c897d881655", "score": "0.6701555", "text": "function tambah_bank_soal($idsub, $soal, $kunci, $jawab1, $jawab2, $jawab3, $jawab4, $jawab5, $bahas){\n\t$data = array(\n\t\t'id_psep_sub_bab' \t=> $idsub,\n\t\t'soal'\t\t\t\t=> $soal,\n\t\t'kunci'\t\t\t\t=> $kunci,\n\t\t'jawab_1'\t\t\t=> $jawab1,\n\t\t'jawab_2'\t\t\t=> $jawab2,\n\t\t'jawab_3'\t\t\t=> $jawab3,\n\t\t'jawab_4'\t\t\t=> $jawab4,\n\t\t'jawab_5'\t\t\t=> $jawab5,\n\t\t'pembahasan'\t\t=> $bahas,\n\t\t'id_guru'\t\t\t=> $this->session->userdata('idpsepsekolah')\n\t);\n\t$this->db->insert(\"bank_soal_sekolah\", $data);\n}", "title": "" }, { "docid": "bf543520dfd59aa9b6400c200a4da106", "score": "0.6697626", "text": "public function tambahkaryawan()\n\t{\n\n\t\t//Mengambil Session\n\t\t$role_id = $this->session->userdata(\"role_id\");\n\t\t//Jika yang login Admin, Dan Staff HRD\n\t\tif ($role_id == 1 || $role_id == 11) {\n\n\t\t\t//Mengambil data dari session, yang sebelumnya sudah diinputkan dari dalam form login\n\t\t\t$data['title'] = 'Tambah Karyawan';\n\t\t\t//Menyimpan session dari login\n\t\t\t$data['user'] = $this->db->get_where('login', ['email' => $this->session->userdata('email')])->row_array();\n\n\t\t\t//Mengambil data karyawan, dari model, dengan di join dengan data penempatan, dan data jabatan\n\t\t\t$data['joinkaryawan'] = $this->karyawan->getJoinKaryawan();\n\t\t\t//Mengambil data perusahaan\n\t\t\t$data['perusahaan'] = $this->karyawan->getAllPerusahaan();\n\t\t\t//Mengambil data penempatan\n\t\t\t$data['penempatan'] = $this->karyawan->getAllPenempatan();\n\t\t\t//Mengambil data jabatan\n\t\t\t$data['jabatan'] = $this->karyawan->getAllJabatan();\n\t\t\t//Mengambil data jamkerja\n\t\t\t$data['jamkerja'] = $this->karyawan->getAllJamKerja();\n\n\t\t\t\n\n\t\t\t$this->curl->http_header('x-rapidapi-host','restcountries-v1.p.rapidapi.com');\n\t\t\t$this->curl->http_header('x-rapidapi-key','3e33277e62mshc9ce8b92dcfa9b2p13765djsn809b8f4d5bd8');\n\t\t\t$this->curl->create('https://restcountries-v1.p.rapidapi.com/all');\n\t\t\t$result \t= $this->curl->execute();\n\t\t\t//print_r($result)->exit();\n\t\t\t$data['negara']=json_decode($result);\n\t\t\t\n\n\t\t\t//Validation Form Input\n\t\t\t$this->form_validation->set_rules('perusahaan_id', 'Nama Perusahaan', 'required');\n\t\t\t$this->form_validation->set_rules('penempatan_id', 'Penempatan', 'required');\n\t\t\t$this->form_validation->set_rules('jabatan_id', 'Jabatan', 'required');\n\t\t\t$this->form_validation->set_rules('jam_kerja_id', 'Jam Kerja', 'required');\n\t\t\t$this->form_validation->set_rules('status_kerja', 'Status Kerja', 'required');\n\t\t\t$this->form_validation->set_rules('tanggal_mulai_kerja', 'Tanggal Mulai Kerja', 'required');\n\t\t\t$this->form_validation->set_rules('tanggal_akhir_kerja', 'Tanggal Akhir Kerja', 'required');\n\t\t\t$this->form_validation->set_rules('nik_karyawan', 'NIK Karyawan', 'required|is_unique[karyawan.nik_karyawan]|min_length[16]');\n\t\t\t$this->form_validation->set_rules('nama_karyawan', 'Nama Karyawan', 'required|trim');\n\t\t\t$this->form_validation->set_rules('email_karyawan', 'Alamat Email', 'valid_email|trim|is_unique[karyawan.email_karyawan]');\n\t\t\t$this->form_validation->set_rules('nomor_absen', 'Nomor Absen', 'required|min_length[4]');\n\t\t\t$this->form_validation->set_rules('nomor_npwp', 'Nomor NPWP', 'min_length[15]');\n\t\t\t$this->form_validation->set_rules('tempat_lahir', 'Tempat Lahir', 'required');\n\t\t\t$this->form_validation->set_rules('tanggal_lahir', 'Tanggal Lahir', 'required');\n\t\t\t$this->form_validation->set_rules('agama', 'Agama', 'required');\n\t\t\t$this->form_validation->set_rules('jenis_kelamin', 'Jenis Kelamin', 'required');\n\t\t\t$this->form_validation->set_rules('pendidikan_terakhir', 'Pendidikan Terakhir', 'required');\n\t\t\t$this->form_validation->set_rules('nomor_handphone', 'Nomor Handphone', 'required');\n\t\t\t$this->form_validation->set_rules('golongan_darah', 'Golongan Darah', 'required');\n\t\t\t$this->form_validation->set_rules('alamat', 'Alamat', 'required|trim');\n\t\t\t$this->form_validation->set_rules('rt', 'RT', 'required|min_length[3]');\n\t\t\t$this->form_validation->set_rules('rw', 'RW', 'required|min_length[3]');\n\t\t\t$this->form_validation->set_rules('provinsi', 'Provinsi', 'required');\n\t\t\t$this->form_validation->set_rules('kota', 'Kota', 'required');\n\t\t\t$this->form_validation->set_rules('kecamatan', 'Kecamatan', 'required');\n\t\t\t$this->form_validation->set_rules('kelurahan', 'Kelurahan', 'required');\n\t\t\t$this->form_validation->set_rules('kode_pos', 'Kode Pos', 'required');\n\t\t\t$this->form_validation->set_rules('nomor_rekening', 'Nomor Rekening', 'required');\n\t\t\t$this->form_validation->set_rules('gaji_pokok', 'Gaji Pokok', 'required');\n\t\t\t$this->form_validation->set_rules('uang_makan', 'Uang Makan', 'required');\n\t\t\t$this->form_validation->set_rules('uang_transport', 'Uang Transport', 'required');\n\t\t\t$this->form_validation->set_rules('nomor_kartu_keluarga', 'Nomor KK', 'required|min_length[16]');\n\t\t\t$this->form_validation->set_rules('status_nikah', 'Status Nikah', 'required');\n\t\t\t$this->form_validation->set_rules('nama_ayah', 'Nama Ayah', 'required|trim|min_length[2]');\n\t\t\t$this->form_validation->set_rules('nama_ibu', 'Nama Ibu', 'required|trim|min_length[2]');\n\t\t\t$this->form_validation->set_rules('nomor_jht', 'Nomor Jaminan Hari Tua', 'min_length[11]');\n\t\t\t$this->form_validation->set_rules('nomor_jp', 'Nomor Jaminan Pensiun', 'min_length[11]');\n\t\t\t$this->form_validation->set_rules('nomor_jkn', 'Nomor Jaminan Kesehatan', 'min_length[13]');\n\t\t\t//Akhir Validation \n\n\t\t\t//Jika form input ada yang salah\n\t\t\tif ($this->form_validation->run() == false) {\n\t\t\t\t//menampilkan halaman tambah data karyawan\n\t\t\t\t$this->load->view('templates/header', $data);\n\t\t\t\t$this->load->view('templates/sidebar', $data);\n\t\t\t\t$this->load->view('templates/topbar', $data);\n\t\t\t\t$this->load->view('karyawan/tambah_karyawan', $data);\n\t\t\t\t$this->load->view('templates/footer');\n\t\t\t}\n\t\t\t//Jika semua form input benar \n\t\t\telse {\n\t\t\t\t//Memanggil model karyawan dengan method tambahKaryawan\n\t\t\t\t$this->karyawan->tambahKaryawan();\n\t\t\t\t//Memanggil model karyawan dengan method tambahMasterGaji\n\t\t\t\t$this->karyawan->tambahMasterGaji();\n\t\t\t\t//Memanggil model karyawan dengan method tambahHistoryKontrak\n\t\t\t\t$this->karyawan->tambahHistoryKontrak();\n\t\t\t\t//Memanggil model karyawan dengan method tambahHistoryJabatan\n\t\t\t\t$this->karyawan->tambahHistoryJabatan();\n\n\t\t\t\t$this->session->set_flashdata('message', '<div class=\"alert alert-success\" role=\"alert\">Success Tambah Data Karyawan</div>');\n\t\t\t\t//redirect ke halaman data karyawan\n\t\t\t\tredirect('karyawan/karyawan');\n\t\t\t}\n\t\t}\n\t\t//Jika Yang Login Bukan HRD\n\t\telse {\n\t\t\t$this->load->view('auth/blocked');\n\t\t}\n\t}", "title": "" }, { "docid": "88c27b16a7725026ef4a8de42a5ce3d7", "score": "0.6692558", "text": "public function add() {\r\n $data['tahun_ajar'] = $this->tahun_ajars->add();\r\n $data['action'] = 'tahun_ajar/save';\r\n $data['title'] = \"Tahun Ajar\";\r\n\r\n $this->template->display('tahun_ajar/form_tambah', $data);\r\n }", "title": "" }, { "docid": "9ab359d037cc13f078cebf1e3f3ae9a6", "score": "0.66911185", "text": "public function data_add()\n\t{\n $data['pusat'] = $this->cms_model->get_pusat();\n\t\t$data['select_tahun'] = $this->cms_model->get_tahun_proyek($this->table_name);\n\t\tarray_unshift($data['select_tahun'],array('id_item' => '--Pilih--', 'nama_item' => '--Pilih--'));\n\n\t\techo json_encode($data);\n\t}", "title": "" }, { "docid": "a35f7646ee12e20c7dca82b1e1a4f2c8", "score": "0.66777754", "text": "public function Tambah_kumpulan() \n\t{\n\t\t$data = array(\n\t\t\t'nama_ibadah'=>$this->input->post('nama_ibadah'),\n\t\t\t'tempat'=>$this->input->post('tempat'),\n\t\t\t'tanggal'=>$this->input->post('tanggal'),\n\t\t\t'pelayan'=>$this->input->post('pelayan'),\n\t\t);\n\t\t$this->Kumpulan_model->insert($data);\n\t\t$this->session->set_flashdata('message', '<script>swal(\"success!\", \"Berhasil Tambah Data Kumpulan, Silakan cek di Menu Kumpulan\", \"success\")</script>');\n\t\tredirect(site_url('Halaman_admin'));\n\t}", "title": "" }, { "docid": "d197338e8f0f6ee68b60f25fc61fac98", "score": "0.6674593", "text": "function addData($data){\n // $query=$this->db->query(\"insert into mahasiswa VALUES ('nim','nama','umur')\");\n $this->db->insert('penilaian_aset',$data);\n }", "title": "" }, { "docid": "728f9c6c7b18debe92e2dff25806c084", "score": "0.6666482", "text": "public function tambah($sv=null, $cariID = null, $mula = null, $akhir = null, $cetak = null)\n\t{\n\t\t$myJadual['kawal'] = dpt_senarai('kawalan_tahunan');\n\t\t$myJadual['proses'] = $this->senarai_jadual($sv); \n\t\t$medan = '*'; # senarai nama medan\n\t\t$cariKawal = array (\n\t\t\t'sv' => $sv, # senarai survey\n\t\t\t'id' => (isset($cariID) ? $cariID : null) , # benda yang dicari\n\t\t\t);\n\t\t$cariProses = array (\n\t\t\t'sv' => $sv, # senarai survey\n\t\t\t'medan' => 'estab', # cari dalam medan apa\n\t\t\t'id' => (isset($cariID) ? $cariID : null) , # benda yang dicari\n\t\t\t'thn_mula' => $mula, # tahun mula\n\t\t\t'thn_akhir' => $akhir # tahun akhir\n\t\t\t);\n\t\t$this->papar->sv = $sv;\n\t\t$this->papar->kesID = array();\n\t\t$this->papar->thn_mula = $cariProses['thn_mula'];\n\t\t$this->papar->thn_akhir = $cariProses['thn_akhir'];\n\n\t\tif (!empty($cariKawal['id'])&& !empty($sv)) \n\t\t{\n\t\t\t# mula cari $cariID dalam $myJadual['kawal']\n\t\t\tforeach ($myJadual['kawal'] as $key => $myTable)\n\t\t\t{# mula ulang table\n\t\t\t\t$kawalID[$myTable] = \n\t\t\t\t$this->tanya->cariKawal($myTable, $cariKawal);\n\t\t\t}# tamat ulang table\n\n\t\t\t# mula cari $cariID dalam $myJadual['proses']\n\t\t\tforeach ($myJadual['proses'] as $key => $myTable)\n\t\t\t{# mula ulang table\n\t\t\t\t$prosesID[$myTable] = \n\t\t\t\t$this->tanya->cariEstab($myTable, $cariProses);\n\t\t\t}# tamat ulang table\n\n\t\t\t# paparkan data kesID yang ada nilai sahaja\n\t\t\t$this->semakKawalProses($sv, $kawalID, $prosesID, $cariKawal, $cariProses);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->papar->carian='[id:0]';\n\t\t}\n\t\t\t/*echo '<pre>';\n\t\t\techo '<hr>$this->papar->kawalID='; print_r($this->papar->kawalID);\n\t\t\techo '<hr>$this->papar->prosesID='; print_r($this->papar->prosesID);\n\t\t\t//echo '<hr>$this->papar->kod_produk='; print_r($this->papar->kod_produk); # khas untuk survey 205\n\t\t\t//echo '<hr>$this->papar->paparID=' . $this->papar->paparID;\n\t\t\t//echo '<hr>$this->papar->carian: ' . $this->papar->carian;\n\t\t\techo '</pre>';//*/\n\n\t\t/* Set pemboleubah utama\n\t\t$this->papar->kelas = 'semakan/ubah/' . $sv . '/';\n\t\t# memilih antara papar dan cetak\n\t\tif ($cetak == 'cetak') //echo 'cetak';\n\t\t\t$this->papar->baca($this->papar->_folder . 'cetak', 0);\n\t\telse //echo 'ubah';\n\t\t\t$this->papar->baca($this->papar->_folder . 'ubah', 0);\n\t\t//*/\n\t}", "title": "" }, { "docid": "75808542b5a81cbcab76a8e3896a402f", "score": "0.6650882", "text": "function tambah_aksi(){\n\t\t\n\t\t$config = [ //membuat konfigurasi\n\t\t\t'upload_path' => './upload/hewan/', //direktori upload\n\t\t\t'allowed_types' => 'gif|jpg|png', //ekstensi gambar yang diperbolehkan\n\t\t\t'max_size' => 2000, 'max_width' => 2000, //ukuran maksimal dan lebar gambar\n\t\t\t'max_height' => 2000 //maksimal tinggi\n\t\t ];\n\t\t $this->load->library('upload'); //memanggil library upload\n\t\t $this->upload->initialize($config); //memanggil konfigurasi\n\n\t\t if ( ! $this->upload->do_upload('GAMBAR')){ //fungsi upload gambar\n\t\t\t$error = array('error' => $this->upload->display_errors()); //menampilkan error\n\t\t\t$this->load->view('v_upload', $error); //meneruskan ke view v_upload\n\t\t}else{\n\t\t\t$file = $this->upload->data(); //mengambil data dari file yang diupload\n\t\t\t$data = ['GAMBAR' => $file['file_name'], //menginputkan data nama file ke dalam database gambar\n 'NAMA_HEWAN' => set_value('NAMA_HEWAN'), //mengambil data nama hewan dari inputan user\n 'JENIS' => set_value('JENIS'), //mengambil data jenis dari inputan user\n\t\t 'DESKRIPSI' => set_value('DESKRIPSI'), //memanggil data deskripsi dari inputan user\n\t\t 'JUMLAH_JANTAN' => set_value('JUMLAH_JANTAN'), //memanggil data jumlah jantan dari inputan user\n\t\t 'JUMLAH_BETINA' => set_value('JUMLAH_BETINA')]; //memanggil data jumlah betina dari inputan user\n\n\t\t$this->m_data->input_data($data,'hewan'); //memanggil input_data pada model m_data\n\t\tredirect('karyawan/hewan/index'); //meneruskan input data ke link direktori file \"crud/index\"\n\t}\n}", "title": "" }, { "docid": "75e8321d35fdd4ff44ef281a2996c7c8", "score": "0.6637726", "text": "public function actionTambah($id) {\n $model = new SimpelPersonil();\n $model2 = $this->findModel($id);\n $model3 = new SimpelRincianBiaya();\n if ($_POST) {\n // print_r($_POST);\n // die();\n $model->id_kegiatan = $model2->id_kegiatan;\n $model->pegawai_id = $_POST['SimpelPersonil']['pegawai_id'];\n $model->tgl_penugasan = $_POST['SimpelPersonil']['tgl_penugasan'];\n $model->tgl_berangkat = $_POST['SimpelKeg']['tgl_mulai'];\n $model->tgl_kembali = $_POST['SimpelKeg']['tgl_selesai'];\n $model->no_sp = $_POST['SimpelPersonil']['no_sp'];\n \n $model->pejabat = $_POST['SimpelPersonil']['pejabat'];\n $model->uang_makan = $_POST['SimpelPersonil']['uang_makan'];\n $model->angkutan = $_POST['SimpelPersonil']['angkutan'];\n if ($model->save()) {\n $data = count($_POST['rows']);\n for ($i = 1; $i <= $data; $i++) {\n $model3 = new SimpelRincianBiaya();\n $model3->id_kegiatan = $model2->id_kegiatan;\n $model3->personil_id = $model->getId();\n $model3->kat_biaya_id = $_POST['kat_biaya_id' . $i];\n $model3->harga_satuan = $_POST['satuan' . $i];\n $model3->bukti_kwitansi = $_POST['bukti_kwitansi' . $i];\n $model3->volume = $_POST['volume' . $i];\n $model3->jml = $_POST['jml' . $i];\n $model3->uraian_rincian = $_POST['uraian' . $i];\n $model3->save();\n }\n }\n return $this->redirect(['create', 'id' => $model2->id_kegiatan]);\n } else {\n switch ($model2->negara) {\n case \"1\": \n return $this->renderAjax('input_personil', [\n 'model' => $model,\n 'model2' => $model2,\n ]);\n case \"2\":\n return $this->renderAjax('input_luar_negri', [\n 'model' => $model,\n 'model2' => $model2,\n ]);\n break;\n \n }\n \n \n }\n }", "title": "" }, { "docid": "0cf67ac31f694bf918764a0fc34697c0", "score": "0.66298044", "text": "public function add_data()\n\t{\n\t\t$this->load->view('admin/view_tambahstatusbayaran');\n\t}", "title": "" }, { "docid": "627bd229370d600b7ba497dac0416147", "score": "0.66279334", "text": "public function setDataLaporan($data) {\n $this->db->insert($this->table,$data); \n }", "title": "" }, { "docid": "554873a38227cc5a43e67e2cec193432", "score": "0.66254354", "text": "public function tambah()\n\t{\t\n\t\t$this->load->model('M_fakultas'); //Meload model M_fakultas\n\t\t$this->load->model('M_prodi'); //Meload model M_prodi\n\n\t\t$data['fakultas'] = $this->M_fakultas->getAllData(); //Menampilkan semua data Fakultas\n\t\t$data['prodi'] = $this->M_prodi->getAllData(); //Menampilkan semua data Prodi\n\n\t\t$this->form_validation->set_rules('nim', 'NIM', 'required|is_unique[tb_mahasiswa.nim]'); //Set pengaturan Form validation\n\t\t$this->form_validation->set_rules('nama', 'Nama Mahasiswa', 'required'); //Set pengaturan Form validation\n\t\t$this->form_validation->set_rules('fakultas', 'fakultas', 'required'); //Set pengaturan Form validation\n\t\t$this->form_validation->set_rules('prodi', 'Prodi', 'required'); //Set pengaturan Form validation\n\n\t\t//Kondisi jika semua syarat Form validation terpenuhi\n\t\tif ($this->form_validation->run() == FALSE) {\n\t\t\t$data['title'] = \"Tambah Data Mahasiswa\";\n\t\t\t$this->load->view('templates/header', $data);\n\t\t\t$this->load->view('pages/tambah_mahasiswa', $data);\n\t\t\t$this->load->view('templates/footer');\t\n\t\t}else{\n\t\t\t$this->session->set_flashdata('flash', '<div class=\"alert alert-success alert-dismissible\" role=\"alert\">\n\t\t\t\t\t\t\t<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button> Data Mahasiswa <strong>Berhasil Ditambah!!</strong>\n\t\t\t\t\t\t</div>'); //Menampilkan notifikasi\n\t\t\t$this->M_mahasiswa->addDataMahasiswa(); //Proses tambah data Mahasiswa ke database\n\t\t\tredirect('mahasiswa');\t\n\t\t}\n\t}", "title": "" }, { "docid": "1d06d5f7850c11440b2a91b5c928337e", "score": "0.6621688", "text": "function tambah_jabatan($id_jabatan) \n\t{\n\t\t$this->db->insert('jabatan', $id_jabatan);\n\t}", "title": "" }, { "docid": "d50ba551407c5b1805db60b90e4c2c5a", "score": "0.66074324", "text": "function tambah_bagian($id_bagian) \n\t{\n\t\t$this->db->insert('bagian', $id_bagian);\n\t}", "title": "" }, { "docid": "6f3b544308c3b5b3073636ae1e0c3da5", "score": "0.66006976", "text": "public function add_data()\n\t{\n\t\t$this->load->model('model_barang_keluar');\n\t\t$data['stok_barang'] = $this->model_barang_keluar->get_kode_barang();\n\t\t//Data Combo kode barang\n\n\t\t$data['masuk'] = $this->model_cart->count_cart();\n\t\t$this->load->view('backend/barang_keluar/view_add_barang_keluar', $data);\n\t}", "title": "" }, { "docid": "6321fb2da74c0ef43b63b3051d197d0a", "score": "0.65785784", "text": "public function proses_tambah()\n\t{\n\t\t$data = array(\n\t\t\t'page_title' \t\t\t=> \"Tambah Sekolah\", \n\t\t\t'form_action' \t\t=> current_url(),\n\t\t\t'select_jenjang' \t=> $this->model_adm->fetch_options_jenjang(),\n\t\t\t'select_provinsi' => $this->model_adm->fetch_options_provinsi(),\n\t\t\t'select_kota' \t\t=> $this->model_adm->fetch_options_kota()\n\n\t\t\t);\n\n\t\t//fetch input (make sure that the variable name is the same as column name in database!) \n\t\t$params = $this->input->post(null, true);\n\t\t$nama_sekolah \t= $params['nama_sekolah'];\n\t\t$jenjang\t\t\t\t= $params['jenjang'];\n\t\t$email\t\t\t\t\t= $params['email'];\n\t\t$telepon\t\t\t\t= $params['telepon'];\n\t\t$kota\t\t\t\t\t\t= $params['kota'];\n\t\t$alamat_sekolah\t= $params['alamat'];\n\n\t\t//run the validation\n\t\tif ($this->form_validation->run() == FALSE) \n\t\t{\n\t\t\talert_error(\"Error\", \"Data gagal ditambahkan\");\n\t\t\t$this->load->view('pg_admin/sekolah_form', $data);\n\t\t}\n\t\telse \n\t\t{\n\t\t\t//passing input value to Model\n\t\t\t$result = $this->model_adm->add_sekolah($nama_sekolah, $jenjang, $email, $telepon, $kota, $alamat_sekolah);\n\t\t\talert_success(\"Sukses\", \"Data berhasil ditambahkan\");\n\t\t\tredirect('pg_admin/sekolah');\n\t\t\t// echo \"Status Insert: \" . $result;\n\t\t}\t\n\t}", "title": "" }, { "docid": "a793a12df6f21a88d2a1dce1ca85eed3", "score": "0.65664893", "text": "function tambahDataPembeli($kode_pembeli,$nama_pembeli,$alamat,$telp)\n\t{\t\t\n\t\t$query = \"INSERT INTO pembeli (kode_pembeli,nama_pembeli,alamat,telp) VALUES ('$kode_pembeli','$nama_pembeli','$alamat','$telp')\";\n\t\t$hasil = mysql_query($conn, $query);\n\t}", "title": "" }, { "docid": "01430ad5469635954d4a088372e5e22a", "score": "0.65596867", "text": "public function tambahPendaftaran(Request $request){\n $pendaftar = PendaftaranModel::where('nis', Auth::user()->username)->first();\n\n if($pendaftar == null){\n $tambah = new PendaftaranModel();\n $tambah->nis = $request->nis;\n $tambah->dudipilihan = $request->dudipilihan;\n $tambah->status = $request->status;\n $tambah->save();\n return redirect(route('dashboard'));\n\n }else if($pendaftar != null and $pendaftar->status == 2){\n $update = new PendaftaranModel();\n $update = PendaftaranModel::where('nis', $request->nis)->first();\n $update->dudipilihan = $request->dudipilihan;\n $update->status = $request->status;\n $update->save();\n return redirect(route('dashboard'));\n } else{\n return redirect(route('dashboard'))->with('message-pendaftaran-error', 'Pendaftaran gagal! Anda telah melakukan pendaftaran');\n }\n }", "title": "" }, { "docid": "940bbd5c719f4c940897af3cca044b25", "score": "0.6556827", "text": "function tambahDataProsesBm($no_faktur, $kode_sup, $tg_trans) {\n\t\t$query = \"INSERT INTO brg_masuk (no_faktur, kode_sup, tg_trans)\n\t\t VALUES ('$no_faktur', '$kode_sup', '$tg_trans')\";\n\t\t$hasil = mysql_query($query);\n\t}", "title": "" }, { "docid": "7e5f73fa221c684bbca2d8b7e1b7e767", "score": "0.6549334", "text": "function tambah($data) {\n\tglobal $conn;\n\t// ambil data dari tiap elemen dalam form\n\t$nrp = htmlspecialchars($data[\"nrp\"]);\n\t$nama = htmlspecialchars($data[\"nama\"]);\n\t$email = htmlspecialchars($data[\"email\"]);\n\t$jurusan = htmlspecialchars($data[\"jurusan\"]);\n\t$gambar = htmlspecialchars($data[\"gambar\"]);\n\n\t// query insert data\n\t$masuk = \"INSERT INTO mahasiswa\n\t\t\t\tVALUES \n\t\t\t\t-- masukan data sesuai urutan / susunan field dalam tabel mahasiswa, field id dikosongkan.\n\t\t\t\t('','$nama','$nrp','$email','$jurusan','$gambar')\n\t\t\t\";\n\tmysqli_query($conn, $masuk);\n\n\t// beritahu perubahan data, jika data berubah nilai int=1 / jika tidak nilai int=-1\n\treturn mysqli_affected_rows($conn);\n}", "title": "" }, { "docid": "043bc61bf81c0ebd59c96ec15555a08a", "score": "0.65427697", "text": "public function data_tabel_jalur_pembayaran()\n {\n\n $data['tbl_data'] = $this->M_jalur_pembayaran->tampil_data()->result();\n\n $this->template->load('template_backend', 'tampilan_backend/jalur_pembayaran/v_data_table', $data);\n }", "title": "" }, { "docid": "ba52e4cc80a00c78e7d5152abfefea12", "score": "0.6532019", "text": "public function tambah()\n {\n $data['title'] = 'Tambah Kategori';\n $this->view('templates/header', $data);\n $this->view('templates/sidebar', $data);\n $this->view('kategori/create', $data);\n $this->view('templates/footer');\n }", "title": "" }, { "docid": "af1ac50b59ca5bdb9765eec236e24e2b", "score": "0.652762", "text": "public function addData(){\n //Reset Form values\n $this->resetForm();\n //Open Model\n $this->openModal();\n }", "title": "" }, { "docid": "9dd283c183b347eef171f80620f05540", "score": "0.65124154", "text": "public function tambah()\n {\n $this->form_validation->set_rules('jenisTransaksi', 'Jenis Transaksi', 'required');\n $this->form_validation->set_rules('tanggalTransaksi', 'Tanggal Transaksi', 'required');\n $this->form_validation->set_rules('pengeluaran', 'Pengeluaran', 'required');\n $this->form_validation->set_rules('pemasukan', 'Pemasukan', 'required');\n\n if ($this->form_validation->run() == FALSE) {\n $this->session->set_flashdata('gagal', 'ditambahkan');\n redirect('keuangan');\n } else {\n $this->Keuangan_model->tambahDataTransaksi();\n $this->session->set_flashdata('berhasil', 'ditambahkan');\n redirect('keuangan');\n }\n }", "title": "" }, { "docid": "da39d139df1ee394fb703f456476652c", "score": "0.6503942", "text": "public function tambah_skripsi()\n {\n $post = $this->input->post();\n $data = [\n 'judul'=>$post['judul'],\n 'penulis'=>$post['penulis'],\n 'tahun'=>$post['tahun'],\n 'email'=>$post['email'],\n 'universitas'=>$post['univ']\n ];\n $this->skripsi_model->add_skripsi($data);\n $this->session->set_flashdata('msg','Data Berhasil disimpan');\n redirect('admin/skripsi_admin');\n }", "title": "" }, { "docid": "3f7337b9dc9f304e934ea3bef8bc824c", "score": "0.64868927", "text": "function tambahDataBarang($kode_brg)\n\t{\n\t\t$this->connectMySQL();\n\t\t$query = \"INSERT INTO barang (kode_brg,nama_brg,harga_satuan,stok_brg) VALUES ('$kode_brg','$nama_brg','$harga_satuan','$stok_brg')\";\n\t\t$hasil = mysql_query($query);\n\t}", "title": "" }, { "docid": "179d0ec17acf04d90239efd8658d527d", "score": "0.64686227", "text": "public function tambah_lainnya()\n {\n $post = $this->input->post();\n $data = [\n 'judul'=>$post['judul'],\n 'penulis'=>$post['penulis'],\n 'tahun'=>$post['tahun'],\n 'email'=>$post['email'],\n 'jenis'=>$post['jenis'],\n 'ringkasan'=>$post['ringkasan']\n ];\n $this->lainnya_model->add_lainnya($data);\n $this->session->set_flashdata('msg','Data Berhasil disimpan');\n redirect('admin/lainnya_admin');\n }", "title": "" }, { "docid": "c532e43d5a589fc8b92491556e007b87", "score": "0.6459968", "text": "public function add()\n {\n $data = [\n 'IdDetailTarget' => $this->input->post('isi'),\n 'IdJadwal' => $this->input->post('jadwalHalaqoh'),\n 'IdDetailKelompok' => $this->input->post('kelompok'),\n 'Presensi' => $this->input->post('presensi'),\n 'Keterangan' => $this->input->post('keterangan')\n ];\n $this->Setoran_M->addSetoran($data);\n $this->session->set_flashdata('pesan', 'Berhasil ditambahkan!');\n redirect('halaqoh/setoran');\n }", "title": "" }, { "docid": "caee2f14dde75b76f041f8ac7a56f40d", "score": "0.64595443", "text": "function tambahkelasuser($data) {\n\t\tglobal $dbh; //mengkoneksikan ke database\n\n\t\t$kelas = htmlspecialchars($data[\"kelas\"]); //mengambil data kelas dari database\n\t\t$user = htmlspecialchars($data[\"user\"]); //mengambil data user dari database\n\n\t\ttry{ \n\t\t\t$insert = $dbh->prepare(\"INSERT INTO kelas_user (ID_KELAS_USER, ID_KELAS, ID_USER) values ('', :kelas, :user)\"); //query untuk memasukkan user ke kelas\n\t\t\t$insert->bindValue(':kelas', $kelas);\n\t\t\t$insert->bindValue(':user', $user);\n\t\t\t$insert->execute(); //mengeksekusi query\n\n\t\t\treturn 1; //pengecekan error\n\t\t} catch(PDOException $e) {\n\t\t\treturn 0;}\n\t}", "title": "" }, { "docid": "1a4cc599000c3e633b6d5f078045ee0f", "score": "0.64409065", "text": "function tambahDataBk($id_detail, $kode_brg, $jum_brg) {\n\t\t$query = \"INSERT INTO temp_brgkeluar (id_detail, kode_brg, jum_brg)\n\t\t VALUES ('$id_detail', '$kode_brg', '$jum_brg')\";\n\t\t$hasil = mysql_query($query);\n\t}", "title": "" }, { "docid": "c6adf06e5a8fc5164df1dfb51dae5057", "score": "0.64387006", "text": "function tambahKelogistik(){\n\n $config = array(\n array(\n 'field' => 'nama-barang',\n 'label' => 'Commodity Name',\n 'rules' => 'required'\n ),\n array(\n 'field' => 'stok-kebutuhan',\n 'label' => 'Stock',\n 'rules' => 'required'\n )\n );\n \n $this->form_validation->set_rules($config);\n \n if ($this->form_validation->run() == false) {\n \n $this->template->load('petugas/template', 'petugas/buat_kelogistik');\n \n } else {\n $this->Kelogistik_model->tambahDataKelogistik();\n $this->session->set_flashdata('flash', 'Ditambah');\n redirect('petugas/tambahKelogistik');\n }\n }", "title": "" }, { "docid": "29edfdc1094949a5abd1bf68537cdeee", "score": "0.643694", "text": "public function batal($data)\n {\n $query = \"INSERT INTO riwayat_pembatalan\n VALUES\n (\n :id, :sub_bagian, :keperluan, :waktu, :nama_barang, :jumlah, :satuan, :alasan, :user_id, :operator_id\n )\";\n\n $this->db->query($query);\n // Informasi Umum\n $this->db->bind('id', $data['id']);\n $this->db->bind('sub_bagian', $data['sub_bagian']);\n $this->db->bind('keperluan', $data['keperluan']);\n $this->db->bind('waktu', $data['waktu']);\n $this->db->bind('nama_barang', $data['nama_barang']);\n $this->db->bind('jumlah', $data['jumlah']);\n $this->db->bind('alasan', $data['alasan']);\n $this->db->bind('satuan', $data['satuan']);\n $this->db->bind('user_id', $data['user_id']);\n $this->db->bind('operator_id', $data['operator_id']);\n $this->db->count();\n // akhir tambah data ke tabel riwayat_pembatalan)\n\n // (hapus data dari tabel belum_ditinjau\n $this->db->query(\"DELETE FROM belum_ditinjau WHERE id = :id\");\n $this->db->bind('id', $data['id']);\n\n $this->db->execute();\n // kembalikan hasil\n return $this->db->rowCount();\n // akhir data dari tabel belum_ditinjau)\n }", "title": "" }, { "docid": "91ea350c2920e5df3118ea01f8826ad5", "score": "0.64325523", "text": "public function tambahuser()\n\t{\n\t\tif ($this->session->userdata('posisi')==\"Administrator\") {\n\t\t\t$id_user=$this->input->post('nuser');\n\t\t\t$data['tambahuser']=$this->m_user->get_iduser($id_user)->result();\n\t\t\t$this->template->load('index','user/v_tambah_user',$data);\n\t\t}\n\t\telse {\n\t\t\t$this->load->view('error');\n\t\t}\n\t}", "title": "" }, { "docid": "7cec8e611dd3c00478f4f6aa64bf87d4", "score": "0.6421633", "text": "public function insert()\n {\n $data[\"titulo\"]=\"crear proyecto\";\n require_once \"views/proyectos/insert.php\";\n \n }", "title": "" }, { "docid": "071bf79d6c333b14dfba8671b114a11f", "score": "0.6417145", "text": "public function create()\n {\n //KEMUDIAN DI DALAMNYA KITA MENJALANKAN FUNGSI UNTUK MENGOSONGKAN FIELD\n $this->resetFields();\n //DAN MEMBUKA MODAL\n $this->openModal();\n }", "title": "" }, { "docid": "4c3365a087a30575174bfc27390e0bfd", "score": "0.641115", "text": "public function setData($data){\n if (!empty($data['nis'])) : $this->siswa->setNis($data['nis']); endif;\n if (!empty($data['nama'])) : $this->siswa->setNama($data['nama']); endif;\n if (!empty($data['jenis_kelamin'])) : $this->siswa->setJenis_kelamin($data['jenis_kelamin']); endif;\n if (!empty($data['tempat_lahir'])) : $this->siswa->setTempat_lahir($data['tempat_lahir']); endif;\n if (!empty($data['tgl_lahir'])){\n $tgl_arr = explode('-', $data['tgl_lahir']);\n $tgl = new DateTime();\n $tgl->setDate($tgl_arr[0], $tgl_arr[1], $tgl_arr[2]);\n $this->siswa->setTgl_lahir($tgl); \n //insert password adalah tgl lahir\n $data['password'] = password_hash($tgl_arr[2].'-'.$tgl_arr[1].'-'.$tgl_arr[0], PASSWORD_BCRYPT);\n }\n if (!(empty($data['kelas'])&&empty($data['jurusan'])&&empty($data['no_kelas'])&&empty($data['tahun_ajaran']))) :\n $str_jur = ($data['kelas'] == 'X')?'':$data['jurusan'].'-';\n $id = $data['kelas'].\"-\".$str_jur.$data['no_kelas'].'-'.$data['tahun_ajaran'];\n $this->kelas = $this->em->find(\"KelasEntity\", $id);\n if(!is_null($this->kelas)){\n $this->siswa->addKelas($this->kelas, $data['kelas'], $data['tahun_ajaran']);\n }else{\n $this->kelas = new KelasEntity();\n $this->kelas->setKelas($data['kelas'])\n ->setJurusan($data['jurusan'])\n ->setNo_kelas($data['no_kelas'])\n ->setTahun_ajaran($data['tahun_ajaran'])\n ->generateId();\n $this->em->persist($this->kelas);\n $this->siswa->addKelas($this->kelas, $data['kelas'], $data['tahun_ajaran']);\n }\n endif;\n if (!empty($data['password'])) : $this->siswa->setPassword($data['password']); endif;\n if (!empty($data['nama_ortu'])) : $this->siswa->setNama_ortu($data['nama_ortu']); endif;\n }", "title": "" }, { "docid": "f483f30379941ed64d92c254579cf73c", "score": "0.64060915", "text": "public function tambah_penjualan_proses() {\n $data = array(\n 'tgl_jual' => $this->input->post('tgl_jual'),\n 'nomor_struk' => $this->input->post('nomor_struk'),\n 'customer' => $this->input->post('customer'),\n 'alamat' => $this->input->post('alamat'),\n 'telpon' => $this->input->post('telpon'),\n 'nama_user' => $this->input->post('nama_user'),\n 'jumlah_total' => $this->input->post('jumlah_total'),\n 'pembulatan' => $this->input->post('pembulatan'),\n 'total_jual' => $this->input->post('total_jual'),\n 'bayarcash' => $this->input->post('bayarcash'),\n 'kembali' => $this->input->post('kembali')\n );\n $insert = $this->db->insert('penjualan',$data);\n //end menambahkan ke tabel pembelian\n\n\n //menambahkan ke tabel penjualan_detail\n $nomor_struk_jual = $_POST['nomor_struk_jual'];\n $kode_brg = $_POST['kode_brg'];\n $nama_barang = $_POST['nama_barang'];\n $satuan_brg = $_POST['satuan_brg'];\n $hrg_jual = $_POST['hrg_jual'];\n $jual_qty = $_POST['jual_qty'];\n $jual_total = $_POST['jual_total'];\n $data2 = array();\n\n $index = 0;\n foreach ($nomor_struk_jual as $data_nomor_struk_jual){\n array_push($data2, array(\n 'nomor_struk_jual' => $data_nomor_struk_jual,\n 'kode_brg' => $kode_brg[$index],\n 'nama_barang' => $nama_barang[$index],\n 'satuan_brg' => $satuan_brg[$index],\n 'hrg_jual' => $hrg_jual[$index],\n 'jual_qty' => $jual_qty[$index],\n 'jual_total' => $jual_total[$index],\n ));\n\n //kurang stok\n $this->db->query(\"update barang set stock=stock-'$jual_qty[$index]' where kode_brg='$kode_brg[$index]'\"); //Tambah Add Stock\n $index++;\n\n }\n\n $insert_detail = $this->m_penjualan->simpan_penjualan_detail($data2);\n //end menambahkan ke tabel pembelian_detail\n\n if ($insert_detail){\n $nomor_struk = $_POST['nomor_struk'];\n $this->db->delete('add_to_jual',array('nomor_struk' => $nomor_struk));\n } else {\n redirect('penjualan');\n }\n\n redirect('penjualan');\n }", "title": "" }, { "docid": "625553e1f8628d7b18a0b5d15c3b8574", "score": "0.63862073", "text": "public function actionTambah($tambah1)\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => HasilProyeksi::find()->where(['provinsi' => $tambah1])\n ,'sort' => [\n 'defaultOrder' => [\n 'provinsi' => SORT_ASC\n ]\n ]\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n 'prov' => $tambah1,\n ]);\n }", "title": "" }, { "docid": "734f1d640fdc2e6131e0846a08d56c18", "score": "0.6374061", "text": "function daftarahli() \n\t{\n\t\t$this->papar->tawaran = $this->tanya->tawaran();\n\t\t$this->papar->terkini = $this->tanya->terkini();\n\t\t$this->papar->terlaris = $this->tanya->terlaris();\n\t\t$this->papar->daftarAkaun = $this->tanya->daftar();\n\t\t$this->papar->loginMasuk = $this->tanya->login();\n\t\t$this->papar->ingatPassword = $this->tanya->ingat();\n\n\t\t# pergi papar kandungan\n\t\t$this->papar->baca('index/daftarahli'); // untuk twitter bootstrap\n\t\t//$this->papar->baca('index/index'); // untuk twitter bootstrap\n\t\t//$this->papar->baca('index/index', 1 ); // tanpa twitter bootstrap\n\t\t//$this->papar->baca('index/index', 'mobile');\n\t}", "title": "" }, { "docid": "be25de9be122fd61bc10326cb345b4ca", "score": "0.6369448", "text": "function tambahDataBm($id_detail, $kode_brg, $jum_brg) {\n\t\t$query = \"INSERT INTO temp_brgmasuk (id_detail, kode_brg, jum_brg)\n\t\t VALUES ('$id_detail', '$kode_brg', '$jum_brg')\";\n\t\t$hasil = mysql_query($query);\n\t}", "title": "" }, { "docid": "cd5d30b539b56091025fb73e113fe527", "score": "0.63689595", "text": "public function run()\n {\n DB::table('master_form')->insert([\n [\n 'nama_kegiatan' => 'Posyandu Remaja',\n 'opd_id' => 1,\n\n ],\n\n [\n 'nama_kegiatan' => 'Fasilitator Lingkungan',\n 'opd_id' => 2,\n\n ],\n\n [\n 'nama_kegiatan' => 'Satgas PPKM',\n 'opd_id' => 3,\n\n ],\n\n \n\n\n ]);\n }", "title": "" }, { "docid": "5f52e1475e2e2c1c9f61b47822d1f3a4", "score": "0.63683856", "text": "public function run()\n {\n DB::table('labas')->insert([\n \t'nama' => '10'\n \t]);\n }", "title": "" }, { "docid": "5120fcbd40ecdd0d89e9213696b35246", "score": "0.63674116", "text": "public function tambahDataTindakanKC()\n {\n $data[\"judulHalaman\"] = \"Tambah Tindakan\";\n $data[\"user\"] = $this->User_model->dataSessionUser();\n $idKC = $data[\"user\"][\"id_kantorcabang\"];\n $data[\"perangkat\"] = $this->Perangkat_model->getAllPerangkatByKC($idKC);\n\n //MENYIAPKAN ATURAN/SYARAT UNTUK FORM TAMBAH PERANGKAT\n $this->form_validation->set_rules('kode_tindakan', 'kode', 'required|trim', [\n 'required' => 'Kolom kode tindakan tidak boleh kosong!'\n ]);\n $this->form_validation->set_rules('tgl_tindakan', 'tgl', 'required|trim', [\n 'required' => 'Kolom tanggal tindakan tidak boleh kosong!'\n ]);\n $this->form_validation->set_rules('id_perangkat', 'perangkat', 'required|trim', [\n 'required' => 'Kolom perangkat tidak boleh kosong!'\n ]);\n\n //JIKA ISI FORM VALIDASINYA SALAH\n if ($this->form_validation->run() == false) {\n // MEMANGGIL VIEW HALAMAN TAMBAH DATA USER\n $this->load->view('templates/halaman_header', $data);\n $this->load->view('templates/halaman_sidebar', $data);\n $this->load->view('templates/halaman_topbar', $data);\n $this->load->view('teknisi/tambahdatatindakankc', $data);\n $this->load->view('templates/halaman_footer', $data);\n } else {\n // //KE METHOD YANG ADA DI MODEL\n $this->Teknisi_model->tambahDataTindakanKC();\n // //KIRIM FLASHDATA\n $this->session->set_flashdata(\"flashPesanDataTindakan\", \"ditambah\");\n // //ALIHKAN HALAMAN\n redirect('teknisi/tindakan');\n }\n }", "title": "" }, { "docid": "86d3efdfd70bc8de312f3a3682e7e7e3", "score": "0.636592", "text": "function tambah($data) {\n\t$conn = koneksi();\n\n\t$nama = htmlspecialchars($data['nama']);\n\t$warna = htmlspecialchars($data['warna']);\n\t$harga = htmlspecialchars($data['harga']);\n\t$ukuran = htmlspecialchars($data['ukuran']);\n\t// $gambar = htmlspecialchars($data['gambar']);\n\n\t// upload gambar\n\t$gambar = upload();\n\tif (!$gambar) {\n\t\treturn false;\n\t}\n\n\t$query = \"INSERT INTO tupperware VALUES('', '$gambar', '$nama', '$warna', '$harga', '$ukuran')\";\n\n\tmysqli_query($conn, $query);\n\treturn mysqli_affected_rows($conn);\n}", "title": "" }, { "docid": "f7550feadd29c97de3e46b5b87fcfbc5", "score": "0.63638043", "text": "public function prosestambah(){\t\n\t\t$this->m_komentar->tambah();\n\t\tredirect(\"page/blog\");\n\t}", "title": "" }, { "docid": "0306ca4d266b00ab6f3a7b85b56bfe05", "score": "0.6362408", "text": "public function pengeluaranAdd() {\n $data_pengeluaran = $this->mtransaksi->getjenistransaksi()->result();\n // print_r($data_pengeluaran);\n // die();\n $data_page = array(\n 'title' => '<div class=\"navbar-brand\" style=\"margin-left:-45px\"><a href='.site_url('transaksi/add').'>Transaksi Baru</a> / Pengeluaran</div>',\n 'button' => '',\n 'side_bar' => $this->mmenu->getmenu()->result(),\n 'content' => $this->parser->parse('transaksi_pengeluaran_add', array('data_pengeluaran' => $data_pengeluaran),true)\n );\n $this->parser->parse('main', $data_page);\n }", "title": "" }, { "docid": "fbc026eab2a1eccc898dfc19d305b3a4", "score": "0.6352412", "text": "public function tambahalumni()\n { \n //tambah alumni\n $data['title'] = 'Manajemen Data Alumni';\n $data['user'] = $this->admin->getProfilUtama();\n $data['active'] = 'class=\"active\"';\n $data['agama'] = $this->admin->getAgama();\n $data['jabatan'] = $this->admin->getJabatanPredatech();\n \n $this->form_validation->set_rules('name', 'Nama Lengkap', 'required|trim');\n $this->form_validation->set_rules('tanggal_lahir', 'Tanggal Lahir', 'required|trim');\n $this->form_validation->set_rules('username', 'Username', 'required|trim');\n $this->form_validation->set_rules('email', 'Email', 'required|trim');\n $this->form_validation->set_rules('nip', 'NIP', 'required|trim');\n $this->form_validation->set_rules('jabatan', 'Jabatan', 'required|trim');\n $this->form_validation->set_rules('jenis_kelamin', 'Jenis Kelamin', 'required|trim');\n $this->form_validation->set_rules('agama', 'Agama', 'required|trim');\n $this->form_validation->set_rules('domisili', 'Domisili', 'required|trim');\n // $this->form_validation->set_rules('role', 'Role', 'required|trim');\n \n if ($this->form_validation->run() == false) {\n $this->load->view('templates/admin/header', $data);\n $this->load->view('templates/admin/sidebar', $data);\n $this->load->view('templates/admin/topbar', $data);\n $this->load->view('admin/tambah-alumni', $data);\n $this->load->view('templates/admin/footer');\n } else {\n $name = $this->input->post('name');\n $tanggal_lahir=$this->input->post('tanggal_lahir');\n $username = $this->input->post('username');\n $email=$this->input->post('email');\n $image = 'default.jpg';\n $password= password_hash('12345678', PASSWORD_DEFAULT);\n $role_id='2';\n $status='Dosen';\n $is_active='1';\n $date_created= time();\n \n $nip=$this->input->post('nip');\n $jabatan=$this->input->post('jabatan');\n\n $jenis_kelamin=$this->input->post('jenis_kelamin');\n $agama=$this->input->post('agama');\n $domisili=$this->input->post('domisili');\n $data = [\n 'name' => $name,\n 'tanggal_lahir' => $tanggal_lahir,\n 'username' => $username,\n 'email' => $email,\n 'image' => $image,\n 'password' => $password,\n 'role_id' => $role_id,\n 'status' => 'Dosen',\n 'is_active' => $is_active,\n 'date_created' => $date_created\n ];\n\n $datas = [\n 'username' => $username,\n 'nip' => $nip,\n 'jabatan' => $jabatan\n ];\n\n $datax = [\n 'username' => $username,\n 'jenis_kelamin' => $jenis_kelamin,\n 'agama' => $agama,\n 'domisili' => $domisili\n ];\n \n\n $this->db->insert('user', $data,['username'=>$username]);\n $this->db->insert('user_profil_dosen', $datas,['username'=>$username]);\n $this->db->insert('user_demografi', $datax,['username'=>$username]);\n $_SESSION['message'] = \"\n Swal.fire({\n icon: 'success',\n title: 'Selamat!',\n text: 'Berhasil menambah data dosen!'\n })\";\n redirect('admin/data-dosen/');\n\n\n }\n \n }", "title": "" }, { "docid": "f47020811d56df0dd6d3f5530aa02ba1", "score": "0.6333497", "text": "function tambah($data) {\n $conn = koneksi();\n\n $merk = htmlspecialchars($data['merk']);\n $nama_artikel = htmlspecialchars($data['nama_artikel']);\n $size = htmlspecialchars($data['size']);\n $harga = htmlspecialchars($data['harga']);\n $stok = htmlspecialchars($data['stok']);\n\n // upload gambar\n $display = upload();\n if (!$display) {\n return false;\n }\n\n $query = \"INSERT INTO \n apparel \n VALUES\n (null , '$display', '$merk', '$nama_artikel', '$size', '$harga', '$stok')\";\n\n mysqli_query($conn, $query) or die(mysqli_error($conn));\n\n return mysqli_affected_rows($conn);\n}", "title": "" }, { "docid": "df23035de8f9a88276ce3479f4ed6b9c", "score": "0.63321996", "text": "public function add()\n {\n $data = [\n 'JenisIqob' => $this->input->post('jenis_iqob'),\n 'Poin' => $this->input->post('poin'),\n 'Kategori' => $this->input->post('kategori')\n ];\n $this->Jenis_pelanggaran_M->addJenisPelanggaran($data);\n $this->session->set_flashdata('pesan', 'Berhasil ditambahkan!');\n redirect('pelanggaran/jenis_pelanggaran');\n }", "title": "" }, { "docid": "48ca715a808a73745133b69594d261b5", "score": "0.63295835", "text": "public function create()\n {\n \t$p = Pengeluaran::orderBy('no','desc')->first();\n \treturn view('pengeluaran.tambah', [\n \t\t'title' => 'Tambah Pengeluaran',\n \t\t'modul_link' => url()->previous(),\n \t\t'modul' => 'Pengeluaran',\n \t\t'action' => route('pengeluaran.store'),\n \t\t'active' => 'pengeluaran.create',\n \t\t'listVendor'=>Vendor::selectMode(),\n \t\t'listProyek'=>Proyek::selectMode(),\n \t\t'listPelaksana'=>Karyawan::selectMode(),\n \t\t'listKategori'=>Kategori::selectMode(),\n \t\t'no'=>is_null($p) ? 1 : $p->no+1,\n \t]);\n }", "title": "" }, { "docid": "071aab494c6d324734f73406a28c65dc", "score": "0.6322856", "text": "public function setNomerPasien()\n {\n //ambil data yang isi kolom nama = pasien dari tabel hitung\n $getKode = Hitung::where('nama', 'pasien')->first();\n \n if ($getKode) {\n //update kolom nomer yang isi kolom nama = pasien, di tabel hitung\n Hitung::where('nama', 'pasien')->update(['nomer' => $getKode->nomer++]);\n } else {\n //insert data nomer urut pasien ke dalam table hitung\n Hitung::create(['nama' => 'pasien', 'nomer' => 2]);\n }\n }", "title": "" }, { "docid": "cb02309435c1f7fc6068ad3aef9bf619", "score": "0.63225985", "text": "public function tambahData_Agt()\r\n {\r\n $this->form_validation->set_rules(\r\n 'nik',\r\n 'Nik',\r\n 'required|trim|is_unique[user.nik]',\r\n [\r\n 'is_unique' => 'This NIK has already registered!'\r\n ],\r\n ['required' => 'NIK Wajib Diisi!']\r\n );\r\n $this->form_validation->set_rules('nama', 'Nama Anggota', 'required', ['required' => 'Nama Anggota Wajib Diisi!']);\r\n $this->form_validation->set_rules('tempat_lahir', 'Tempat Lahir', 'required');\r\n $this->form_validation->set_rules('tgl_lahir', 'Tanggal Lahir', 'required');\r\n $this->form_validation->set_rules('jk', 'Jenis Kelamin', 'required');\r\n $this->form_validation->set_rules('no_hp', 'Nomor HP', 'required');\r\n $this->form_validation->set_rules('saldo_uang', 'Saldo Uang', 'required');\r\n $this->form_validation->set_rules('saldo_emas', 'Saldo Emas', 'required');\r\n $this->form_validation->set_rules('inpass', 'Inpass', 'required|trim|min_length[3]|matches[repass]');\r\n $this->form_validation->set_rules('repass', 'Repass', 'required|trim|matches[inpass]');\r\n\r\n if ($this->form_validation->run() == false) {\r\n $title['title'] = 'Form Tambah Data';\r\n $data['user'] = $this->db->get_where('user_admin', ['nik' =>\r\n $this->session->userdata('nik')])->row_array();\r\n $this->load->view('templates/header', $title);\r\n $this->load->view('temp_Admin/sidebar');\r\n $this->load->view('templates/navbar', $data);\r\n $this->load->view('admin/form_add_data', $data);\r\n $this->load->view('templates/footer');\r\n } else {\r\n $data = [\r\n \"nik\" => htmlspecialchars($this->input->post('nik', true)),\r\n \"nama\" => htmlspecialchars($this->input->post('nama', true)),\r\n \"password\" => password_hash($this->input->post('inpass'), PASSWORD_DEFAULT),\r\n \"tempat_lahir\" => htmlspecialchars($this->input->post('tempat_lahir'), true),\r\n \"tgl_lahir\" => htmlspecialchars($this->input->post('tgl_lahir'), true),\r\n \"jk\" => htmlspecialchars($this->input->post('jk'), true),\r\n \"no_hp\" => htmlspecialchars($this->input->post('no_hp'), true),\r\n \"status\" => '1',\r\n \"jabatan\" => 'Anggota',\r\n \"kode_list\" => '0',\r\n \"filter\" => '2',\r\n \"email\" => '[email protected]',\r\n \"hak_akses\" => '0',\r\n \"saldo_uang\" => htmlspecialchars($this->input->post('saldo_uang'), true),\r\n \"saldo_emas\" => htmlspecialchars($this->input->post('saldo_emas'), true),\r\n \"foto\" => 'default.jpg',\r\n \"pendaftar\" => 'Admin Komunitas Koperasi',\r\n ];\r\n $this->db->insert('user', $data);\r\n //$this->_sendEmail();\r\n $this->session->set_flashdata('message', '<div class=\"alert alert-success \r\n\t\t\t\t\t\talert-dismissible fade show font-italic\" role=\"alert\"> \r\n\t\t\t\t\t\tAnggota Baru Berhasil Didaftarkan! <button type=\"button\" class=\"close\"\r\n\t\t\t\t\t\tdata-dismiss=\"alert\" aria-label=\"close\"\r\n\t\t\t\t\t\t<span aria-hidden=\"true\">&times;</span>\r\n\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t</div>');\r\n redirect('admin/list_anggota');\r\n }\r\n }", "title": "" }, { "docid": "c7450ef2092b8b605b36ef0f34cb0f29", "score": "0.63180107", "text": "function tambahDataSupplier($kode_sup, $nama_sup, $alamat_sup, $telp_sup) {\n\t\t$this->connectMySQL();\n\t\t$query = \"INSERT INTO supplier (kode_sup, nama_sup, alamat_sup, telp_sup)\n\t\t VALUES ('$kode_sup', '$nama_sup', '$alamat_sup', '$telp_sup')\";\n\t\t$hasil = mysql_query($query);\n\t}", "title": "" }, { "docid": "1f297ded217a75d8874d63ab55f3f6e4", "score": "0.6316654", "text": "public function actionCreate()\n {\n $model = new Omset();\n $usaha = (new \\yii\\db\\Query())\n ->select(['id','nama_usaha'])\n ->from('usaha')\n ->all();\n if ($model->load(Yii::$app->request->post()) ) {\n $model->save();\n return $this->redirect(['index']);\n }\n \n return $this->render('create', [\n 'model' => $model,\n 'usaha'=> ArrayHelper::map($usaha,'id','nama_usaha'),\n ]);\n }", "title": "" }, { "docid": "a78299e9e51e5a8084ffa18d13f55e10", "score": "0.6314655", "text": "public function add_pasien($no_rm,$nama,$tipe_pasien,$alamat){\r\nif(empty($no_rm) || empty($nama) || empty($tipe_pasien) || empty($alamat)){\r\n return $this->empty_response();\r\n }else{\r\n $data = array(\r\n \"no_rm\"=>$no_rm,\r\n \"nama\"=>$nama,\r\n \"tipe_pasien\"=>$tipe_pasien,\r\n \"alamat\"=>$alamat\r\n );\r\n$insert = $this->db->insert(\"tokobuah\", $data);\r\nif($insert){\r\n $response['status']=200;\r\n $response['error']=false;\r\n $response['message']='Data person ditambahkan.';\r\n return $response;\r\n }else{\r\n $response['status']=502;\r\n $response['error']=true;\r\n $response['message']='Data person gagal ditambahkan.';\r\n return $response;\r\n }\r\n }\r\n}", "title": "" }, { "docid": "1c97b741cc6763844cce53447a61e0b7", "score": "0.63134825", "text": "public function tambahPemesanan()\n {\n \n $this->load->view('admin/kelola_inventory/v_tambahOrder');\n }", "title": "" }, { "docid": "ebc11efc8ca601aa863e8df9a8a9696b", "score": "0.63089734", "text": "public function addata(){\n // $products = Product::all();\n // $categorys = Category::all();\n // include_once './app/views/detail-product.php';\n $name = \"Ly uong nuoc\";\n $model = new Category;\n $model->category_name = $name;\n $model->save();\n\n }", "title": "" }, { "docid": "1b3640aad6eed4c1970433a671e7b724", "score": "0.62979424", "text": "public function tambahDataSiswa()\n\t{\n\t\t$this->db->insert('siswa', [\n\t\t\t\t'nama' => $this->input->post('nama', true),\n\t\t\t\t'nis' => $this->input->post('nis', true),\n\t\t\t\t'email' => $this->input->post('email', true),\n\t\t\t\t'jurusan' => $this->input->post('jurusan', true),\n\t\t\t\t'foto' => $this->input->post('foto', true)\n\t\t\t]);\n\t\t\n\t\t$foto = $_FILES['foto'];\n\t\tif($foto='') {} else {\n\t\t\t$config['upload_path'] \t= './assets/img/profile';\n\t\t\t$config['allowed_types'] = 'jpg|png|gif';\n\t\t\t$config['max_width'] = 512;\n\t\t\t$config['max_height'] = 512;\n\n\t\t\t$this->load->library('upload', $config);\n\t\t\tif(!$this->upload->do_upload('foto')) {\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t$foto = $this->upload->data('file_name');\n\t\t\t\tredirect('user/profile');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "6e32cadca1fa94ed7c5f7dde31e288b9", "score": "0.6294014", "text": "public function insertData($tab,$data){\n $this->db->insert($tab, $data);//otomatis insert ke dalam tabel (tabel buku) sesuai semua inputan (controller)\n //hasil generate seperti insert into database ....\n }", "title": "" }, { "docid": "5e44ca7787e7074d4e461e7b8dd673a3", "score": "0.6293188", "text": "public function create(){\n $this->title = self::NVO;\n \n //obtener los paises para usar en el list del form de ciudades\n $paises = $this->ciudadModelo->obtenerPaises();\n \n $datos = ['table' => $this->table,\n //'action' => $this->action,\n 'title' => $this->title,\n 'message' => '',\n 'paises' => $paises\n ];\n \n $this->vista('admin/ciudades/create', $datos);\n }", "title": "" }, { "docid": "4339347b81b6b9567f646cfbe2e5ed29", "score": "0.6288096", "text": "public function tambah(){\t\t\n\t\t$this->load->view(\"admin/header\");\n\t\t$this->load->view(\"admin/menu\");\n\t\t$this->load->view(\"admin/blog/artikel/form_artikel_tambah\");\n\t\t$this->load->view(\"admin/footer\");\n\t}", "title": "" }, { "docid": "a51416eb98aaafa41bc3da4bd788f6e0", "score": "0.62842375", "text": "public static function storeData1($request){\n $data = new self();\n $data->nama = $request->nama_pegawai;\n $data->tempat_lahir = $request->tempat_lahir;\n $data->tanggal_lahir = $request->tanggal_lahir;\n $data->save();\n }", "title": "" }, { "docid": "1617772f0b836d31a02818d67fce9618", "score": "0.62819916", "text": "function crear()\r\n {\r\n $data['test']=$this->model->getTest();\r\n $data['categorias']=$this->model->get_cat_T();\r\n $data['preguntas']=$this->model->get_all_PT();\r\n $this->addData($data);\r\n $this->view3->__construct($this->dataView,$this->dataTable);\r\n $this->view3->show();\r\n }", "title": "" }, { "docid": "fe885f4033b10c9888fd9ecfd623902d", "score": "0.6278872", "text": "function tambahKeamanan($data){\n\tglobal $conn;\n\n\t$keterangan \t= htmlspecialchars($data[\"keterangan\"]);\n\t$tipeBesar\t \t= htmlspecialchars($data[\"besar\"]);\n\t$tipeKecil\t \t= htmlspecialchars($data[\"kecil\"]);\n\t$kantor \t \t= htmlspecialchars($data[\"kantor\"]);\n\n\t$query \t\t\t= \"INSERT INTO tabel_keamanan VALUES ('','$keterangan','$tipeBesar','$tipeKecil','$kantor')\";\n\tmysqli_query($conn,$query);\n\treturn mysqli_affected_rows($conn);\n}", "title": "" } ]
d03b388b5c2bcd743860d5a3096e1c5d
Execute the console command.
[ { "docid": "b82707fb94d2d2ddfd19b3d38ea3165d", "score": "0.0", "text": "public function handle()\n {\n Redis::psubscribe(['__keyevent*__:expired'], function ($message) {\n $redis = Redis::connection('connection2');\n if($message == 'category-list'){ //category list\n $category_response = Http::get(config('config.pspApiPath').'/categories');\n foreach($category_response->categories as $item){\n $redis->set($item->url,json_encode($item));\n $redis->expire($item->url,60*60*24);\n $redis->lpush(\"category-list\", $item->url);\n\n $subcategory_response = Http::get(config('config.pspApiPath').'/categories', ['parent_id' => $item->id]);\n foreach($subcategory_response->categories as $subitem){\n $redis->set($subitem->url,json_encode($subitem));\n $redis->expire($subitem->url,60*60*24);\n $redis->lpush(\"category-list\", $subitem->url);\n }\n }\n $redis->expire(\"category-list\",60*60*24);\n Log::info('redis:psubscripe update redis data for key:'.$message);\n }\n elseif($message == 'more-campaigns'){ // more campaign\n //More campaign\n //Hard code category id\n $cat_more = '1V84sYfazfHFMilr';\n \n //Get campaign data\n $campaign_more = Http::get(config('config.pspApiPath').'/campaigns', ['state' => 'launching','categories'=>$cat_more,'page'=>1,'page_size'=>4]);\n $campaign_more = extendCampaignObj($campaign_more->campaigns);\n \n $redis->set(\"more-campaigns\",json_encode($campaign_more));\n $redis->expire(\"more-campaigns\",60*10);\n Log::info('redis:psubscripe update redis data for key:'.$message);\n }\n elseif(strpos($message, '?page=') != false){ //campaign list depend on category\n $url = parse_url($message);\n $cat_url = str_replace('/shop','',$url['path']);\n $page = str_replace('page=','',$url['query']);\n $category_selected = json_decode($redis->get($cat_url));\n\n //Get campaign list\n $campaign_list = Http::get(config('config.pspApiPath').'/campaigns', ['state' => 'launching','categories' => $category_selected->id,'page'=>$page,'page_size'=>12]);\n $campaign_data = array(\"total\" => $campaign_list->total,\n \"data\" => extendCampaignObj($campaign_list->campaigns));\n \n $redis->set($message,json_encode($campaign_data));\n $redis->expire($message,60*10);\n Log::info('redis:psubscripe update redis data for key:'.$message);\n }\n });\n \n }", "title": "" } ]
[ { "docid": "e9e2e65f3b3c15f42fd1c8daac787788", "score": "0.6330314", "text": "public function handle()\n {\n $user = User::whereUsername($this->argument('username'))->first();\n\n if ($user !== null) {\n $this->showUserInfo($user);\n } else {\n $this->error('User not found');\n }\n }", "title": "" }, { "docid": "d8d3172246218ff4715bf1793822bccb", "score": "0.627718", "text": "public function handle()\n {\n $watch = __DIR__ . '/../../watch/index.js';\n $path = $this->argument('path');\n $command = $this->argument('cmd');\n \\passthru(\"node {$watch} {$path} {$command}\");\n }", "title": "" }, { "docid": "501ac5af4c26cc79a74ac8ad6a747192", "score": "0.62644666", "text": "public function handle()\n {\n $to_summon = $this->choice('Which to summon?', $this->summonableCommands());\n\n $this->info(\"$to_summon ey? a fine choice!\");\n $this->prepare();\n\n $this->line(''); // spacer\n $this->section('Summoning your selected console command...');\n\n $linux = str_replace('\\\\', '/', $to_summon);\n\n $explode = explode('/', $linux);\n\n $filename = array_pop($explode);\n $path = implode('/', $explode);\n\n $this->copy(\n $filename . '.php',\n \"vendor/laravel/framework/src/$path/\",\n 'app/Console/Commands/'\n );\n\n $namespace = str_replace('/', '\\\\', $path);\n\n $this->patch(\n \"app/Console/Commands/$filename.php\",\n \"namespace $namespace;\",\n 'namespace App\\Console\\Commands;'\n );\n\n // update namespace of summoned console command\n $this->patch(\n 'app/Providers/ArtisanServiceProvider.php',\n \"use $to_summon;\",\n \"use App\\\\Console\\\\Commands\\\\$filename;\"\n );\n }", "title": "" }, { "docid": "b3526e9d71fde32ddf4e61fde7a4ab71", "score": "0.62580454", "text": "public function handle()\n {\n try {\n $frames = json_decode($this->argument('frames'));\n \n if ($frames) {\n $score_list = json_encode((new Game)->setFrames($frames)->getScoreList());\n $this->info(\"Total scores are: {$score_list}\");\n } else {\n $this->info('Invalid format of input arguments'); \n }\n \n } catch (Exception $e) {\n $this->info('Invalid format of input arguments');\n }\n }", "title": "" }, { "docid": "76d9aa487f1f3e2abd27b5075fe7d0ae", "score": "0.6255328", "text": "public function handle()\n {\n $start = microtime(true);\n\n $merchant = Merchant::find($this->argument('merchant_id'));\n\n $products = new CsvGenerator($merchant, 'create');\n $products->generate();\n\n echo (microtime(true) - $start).PHP_EOL;\n }", "title": "" }, { "docid": "e8f2ea2def6b543183d5e0a4b9fdd04e", "score": "0.62454414", "text": "public function handle()\n {\n $this->runCommand();\n }", "title": "" }, { "docid": "d7cf07310a413be4545b2ce63ddc67e8", "score": "0.62394565", "text": "public function handle()\n {\n $this->info('Testing custom Translation drivers.');\n $drivers = $this->prepareExtensions();\n $this->info('These drivers are being tested: '.implode(', ', $drivers));\n\n system($this->makeCommand());\n }", "title": "" }, { "docid": "236163b9c7bb3b9d43c05778cfe57c0b", "score": "0.6233985", "text": "public function handle() {\n Check24::setCustomerConfig($this->argument('account_name'));\n if ($this->argument('orderid')) {\n $OrderXMLFiles = Check24::getSingleXMLOrder($this->argument('orderid'),$this->option('cache'));\n } else {\n $OrderXMLFiles = Check24::getXMLOrders($this->option('cache'));\n }\n /** @noinspection ForgottenDebugOutputInspection */\n dump($OrderXMLFiles);\n }", "title": "" }, { "docid": "1792cf38f12e7c56b4624c832d0134a1", "score": "0.6211052", "text": "public function handle()\n {\n $user = $this->argument('user');\n $ds = new DataSendTest2();\n $ds->Send();\n }", "title": "" }, { "docid": "3679aeb354e6879bf82443b5ff1ccbe1", "score": "0.6208037", "text": "public function fire()\n {\n $name = trim($this->input->getArgument('name'));\n\n $this->writeMigration($name);\n\n $this->composer->dumpAutoloads();\n }", "title": "" }, { "docid": "d7283304a95caa6265bc049f4521a78b", "score": "0.6203544", "text": "public function handle()\n {\n $user = User::find($this->argument('user'));\n if (!$user) {\n $this->warn('User not found');\n return;\n }\n if (!$user->telegram_chat_id) {\n $this->warn('Telegram is not connected to this account');\n return;\n }\n $text = $this->argument('msg');\n $response = $this->telegram->sendPlainMessage($user->telegram_chat_id, $text);\n $this->info($response);\n }", "title": "" }, { "docid": "957e2fcd8f8b274c516c944c3a5812c8", "score": "0.61831933", "text": "public function handle() {\n $candidate = $this->argument('candidate');\n try {\n $this->info($this->getDebate()->speech($candidate));\n } catch (\\Exception $ex) {\n $this->error($ex->getMessage());\n }\n }", "title": "" }, { "docid": "82eeb555aae1c185484e5b7b35685fc3", "score": "0.6169508", "text": "public function handle()\n {\n $this->info('Updating prediction data for model ' . $this->argument('token'));\n $this->mlModelService->reviewModelPerformance($this->argument('token'));\n }", "title": "" }, { "docid": "777d952935839063658c3c92aaaace76", "score": "0.6169033", "text": "public function handle()\n {\n $permissions = $this->getPermissions();\n\n $this->savePermissions($permissions);\n }", "title": "" }, { "docid": "9c0f2aa4dd794653ff49ec0f52aa0a24", "score": "0.6168362", "text": "public function handle()\n {\n $this->call('config:cache');\n $this->call('migrate');\n\n $this->info('Everything has been successfully updated!');\n }", "title": "" }, { "docid": "69f65bfe7a563245022195a51d005f76", "score": "0.6158796", "text": "public function handle() {\n\n \ttry {\n\n \t\t$organization = NonProfitCharitySearch::search($this->argument('query'))\n \t\t\t\t\t\t\t\t\t\t\t ->organization();\n\n \t\t$this->displayResult($organization->getResult(), $organization);\n\n \t} catch (Exception $exception) {\n\n \t\t$this->error(\"Throws Exception with code : {$exception->getCode()}\");\n \t\t$this->error(\"Exception Message : {$exception->getMessage()}\");\n \t\t\n \t}\n }", "title": "" }, { "docid": "22c9a51665d4318d0bd06060262931d2", "score": "0.61493754", "text": "public function handle()\n {\n return $this->commandExecutor->run(\n Builder::make('echo custom')\n );\n }", "title": "" }, { "docid": "886ce5f5b70315b61dfec49a1aac8309", "score": "0.6148541", "text": "public function handle()\n {\n #Ask user to specify what team is red and what team is blue\n $teamR = strtolower(str_replace(' ', '', $this->ask('Enter red team name')));\n $teamB = strtolower(str_replace(' ', '', $this->ask('Enter blue team name')));\n\n #grab the serialized file with the same team names\n $data = unserialize(file_get_contents('app/Console/Commands/SerializedTeams2017/R_'.$teamR.'_B_'.$teamB.'.bin'));\n $this->cacheContent($data['teamInfo'],$data['colors'],$data['teamName'],$data['players']);\n\n $this->info(\"Teams [$teamR, $teamB] successfully updated\");\n }", "title": "" }, { "docid": "095087fff4dfabd6a54f928bf5e1a0db", "score": "0.613983", "text": "public function handle()\n {\n $mode = $this->argument('mode');\n\n (new TweetFetcher())->setCommand($this)->fetchLatestTweets(true, $mode);\n }", "title": "" }, { "docid": "480b62c8f140670524ebb1f18c624345", "score": "0.61308086", "text": "public function handle()\n {\n $action = $this->argument('action');\n $email = $this->argument('email');\n $role = Role::where('name', 'admin')->first();\n if ($user = User::where('email', $email)->first()) {\n $this->info('User found ... '.$action.' Admin role');\n $this->{$action}($user, $role);\n } else {\n $this->warn('User not found!');\n }\n }", "title": "" }, { "docid": "eaeb9622f1af1ba6d4491389e7d956f1", "score": "0.6128591", "text": "public function handle()\n {\n if (!$this->argument('fileName')) {\n echo \"Nombre de archivo inválido\";\n return;\n }\n\n if (!$this->option('eps')) {\n echo \"Código EPS inválido\";\n return;\n }\n\n Patient::processMassivePatientFile($this->option('eps'), $this->argument('fileName'));\n }", "title": "" }, { "docid": "18f32312a72526f2fcf7f32ef10bc5aa", "score": "0.6126815", "text": "public function handle()\n {\n $this->info('Permission generator is started ... !!!');\n\n $permissions = $this->cachePermissions($this->retrievePermissions());\n $this->savePermissions($permissions);\n\n $this->info('Successfully generated !!!');\n }", "title": "" }, { "docid": "412d09de6957588335571ee9f3db3f0b", "score": "0.61217177", "text": "public function fire()\n {\n\n $name = $this->argument('name');\n $properties = $this->option('properties');\n $path = $this->option('path');\n\n // Parse the command input.\n $parsedInput = $this->parser->parse($name, $properties);\n\n // Actually create the files with the correct boilerplate.\n $this->generator->make($parsedInput, $path);\n\n $this->info('Conductor Track Created');\n }", "title": "" }, { "docid": "ec1791b7a17d3bf3d3d5f37b2539cc8f", "score": "0.6120795", "text": "public function handle()\n {\n if($this->argument('character_name')) {\n $character = Character::where('character_name', $this->argument('character_name'))->first();\n if(is_null($character)) {\n Log::error(\"No character found by name {$this->argument('character_name')}\");\n return;\n }\n\n CharacterUpdate::dispatch($character);\n\n } else {\n $characters = Character::all();\n foreach ($characters as $character) {\n CharacterUpdate::dispatch($character);\n }\n }\n\n }", "title": "" }, { "docid": "aaf92dfd9f081fdf7ac56a959c60e8a7", "score": "0.61180824", "text": "public function handle()\n {\n $email = $this->argument('email');\n\n $this->info('User: ' . $email);\n\n try {\n $user = User::where(['email' => $email])->firstOrFail();\n\n if ($password = $this->option('password')) {\n $user->password = bcrypt($password);\n $user->save();\n }\n\n } catch (ModelNotFoundException $exception) {\n $this->error(\n sprintf('User not found with email. [email: %s]', $email)\n );\n\n return;\n }\n }", "title": "" }, { "docid": "f1415667e2832e408bdd1e8f791f3264", "score": "0.6103917", "text": "public function handle()\n {\n $user = User::where($this->option('field'), $this->argument('to'))->firstOrFail();\n\n $user->notify(new TestBroadcastNotification($this->argument('message')));\n }", "title": "" }, { "docid": "434766adae0c266da4e6457a8ac604f9", "score": "0.6102253", "text": "public function handle()\r\n {\r\n $this->publishAssets();\r\n\r\n $this->runMigration();\r\n\r\n $this->seedSuperAdmin();\r\n\r\n $this->publishAndCompileUI();\r\n }", "title": "" }, { "docid": "83ced4c2f6c5cf91beb5a94ef6eae234", "score": "0.61005086", "text": "public function handle()\n {\n $alphabets = $this->generateRandomAlphabets(\n $this->getTimes(),\n (string) $this->option('characters')\n );\n\n $this->comment(implode(PHP_EOL, $alphabets));\n }", "title": "" }, { "docid": "50380b01c2907f09b7833ad00482dcee", "score": "0.60834277", "text": "public function handle()\n {\n $cardinality = $this->argument('cardinality');\n $movieController = new Controller(20);\n $movieController->getTopMovies($cardinality);\n\n $this->info('Top '.$cardinality.' movies are up to date!');\n }", "title": "" }, { "docid": "b97f0fb4f521579db68ea29aff6cbfb7", "score": "0.6082109", "text": "public function handle()\n {\n $version = $this->argument('version');\n\n $this->downloadZip($version);\n $this->runExtractors($version);\n $this->cleanup($version);\n }", "title": "" }, { "docid": "9ea91061871daefc4824aa931a74bb0e", "score": "0.60808414", "text": "public function handle()\n {\n $this->vehicleService->createFromXML($this->argument('xmlFile'));\n }", "title": "" }, { "docid": "2aab46336f9d5eeb1a1715c9e8f80196", "score": "0.60797364", "text": "public function handle()\n {\n $proxy = new FineproxyOrgProxy();\n $proxy->update();\n }", "title": "" }, { "docid": "b0fc23e6172b34319574db0a061c5053", "score": "0.6076527", "text": "public function handle()\n {\n try {\n $this->{$this->argument('operation')}();\n } catch (\\Exception $e) {\n $this->info($e->getMessage());\n }\n }", "title": "" }, { "docid": "a27099a497477c479bece487f7fb8ec1", "score": "0.6072169", "text": "public function handle()\n {\n $this->swift_mail->send(User::find($this->argument('user')));\n }", "title": "" }, { "docid": "ec5a70d02f413b0a0b983d6ab1a2fcdc", "score": "0.6071765", "text": "public function handle()\n {\n $this->createTaskClassFile($this->argument('name'));\n }", "title": "" }, { "docid": "ac76612fa039532a85c765e632a61e09", "score": "0.6070546", "text": "public function handle()\n {\n $this->noReplace = $this->option(\"no-replace\");\n\n $this->exports();\n\n $this->makeDefaultRoles();\n }", "title": "" }, { "docid": "4f9f3adf4d9400c4bff3d45306637ec7", "score": "0.606319", "text": "public function handle()\n\t{\n\t\t// Delete the specified channel. Or all channels if none was specified.\n\t\tif ($this->argument('user')) {\n\t\t\tUser::find($this->argument('user'))->updateScore();\n\t\t} else {\n\n\t\t\t/** @var User $user */\n\t\t\tforeach (User::cursor() as $user) {\n\t\t\t\t$user->updateScore();\n\t\t\t}\n\n\t\t}\n\t}", "title": "" }, { "docid": "3096de41263e76dbdd07ff4d50f4b800", "score": "0.60595465", "text": "public function handle()\n {\n $whitelist = Redis::smembers($this->options->whitelist_key);\n\n $this->info(\"List of IPs whitelisted:\");\n foreach ($whitelist as $ip) {\n $this->info($ip);\n }\n }", "title": "" }, { "docid": "4fa929d38c3e4bc8af9adef839cb6011", "score": "0.6058218", "text": "public function handle()\n {\n $this->dispatch(new ProcessUrl(\n $this->argument('url'), \n session()->getId(),\n $this->argument('replacement')\n ));\n $sessionId = session()->getId();\n\n $this->info(\"URL processing. Check storage/archives for {$sessionId}.zip\");\n }", "title": "" }, { "docid": "6fca2ba519b24f0611c23ce57e0aae5f", "score": "0.60580754", "text": "public function handle()\n {\n $names = $this->argument('name');\n print_r($names);\n $controller = new TimelineController;\n $controller->fillData($names);\n }", "title": "" }, { "docid": "f23a5bb72d72dd19d27da286c4f03e9d", "score": "0.6056524", "text": "public function handle()\n {\n $this->call('make:view', [\n 'type' => $this->viewName,\n 'name' => $this->argument('name')\n ]);\n }", "title": "" }, { "docid": "c3d5e9b789fd36b3f5edea4c10a2c80c", "score": "0.6051725", "text": "public function handle()\n {\n $crawlerType = $this->argument('crawler_type');\n try {\n $params = [\n 'limit' => 100,\n 'offset' => 0\n ];\n $this->getProjects($params);\n\n } catch (Exception $e) {\n print_r( $e->getMessage());\n }\n }", "title": "" }, { "docid": "e48ab69a618126e944db5aaa0ba22a0c", "score": "0.60460085", "text": "public function handle()\n {\n $entityCode = $this->input->getArgument('entity');\n\n try {\n $entity = Entity::findByCode($entityCode);\n\n if ($this->option('enable') == 'true') {\n $entity->is_flat_enabled = true;\n $entity->save();\n $this->info(\"Enabling flat table for `{$entityCode}`.\");\n } else {\n $entity->is_flat_enabled = false;\n $entity->save();\n $this->info(\"Disabling flat table for `{$entityCode}`.\");\n }\n } catch (ModelNotFoundException $e) {\n $this->error(\"`{$entityCode}` entity doesn't exists.\");\n }\n }", "title": "" }, { "docid": "be88bd2be324863be11755f329d16b53", "score": "0.60433525", "text": "public function handle()\n {\n $type = $this->argument('type');\n\n if ($type == 'company') {\n $this->company();\n }\n }", "title": "" }, { "docid": "8385dfaee0b3095706b92a288dc2e58b", "score": "0.6038648", "text": "public function handle()\n {\n $seedOptions = SeedOptions::getGroupsOnly($this->baseSeedFolder);\n\n if (!$seedOptions->count()) {\n return $this->info('No seed groups available. Use the seed:generate or seed:migrate command to generate one');\n }\n\n $name = $this->choice('Which scenario would you like to rename?', $seedOptions->toArray());\n $newName = $this->ask('What will you rename \"' . $name . '\" to?');\n $this->rename($name, $newName);\n }", "title": "" }, { "docid": "9335d73c9a6e15ed0b574a912df4e366", "score": "0.6038099", "text": "public function handle()\n {\n if ($this->argument('type'))\n $type = $this->argument('type');\n else\n $type = 'all';\n $league = $this->argument('league');\n $gc = new GameController;\n switch ($type) {\n case 'moneyline':\n $gc->updateMoneylines($league);\n break;\n case 'points':\n $gc->updatePointSpreads($league);\n break;\n case 'totals':\n $gc->updateOverUnders($league);\n break;\n default:\n $gc->updateMoneylines($league);\n $gc->updatePointSpreads($league);\n $gc->updateOverUnders($league);\n }\n }", "title": "" }, { "docid": "415dc0208a6c366db6eee0de4985e31a", "score": "0.60374993", "text": "public function handle()\n {\n $loaded = app()->make('extension.booted');\n $search = array_search(\n $this->argument('name'),\n (array_column($loaded, 'name'))\n );\n\n if ($search === false) {\n $this->error(\"Extension `{$this->argument('name')}` not found in list.\");\n exit;\n } else {\n dd( $loaded[$search] );\n }\n }", "title": "" }, { "docid": "d211ef99319c378292e982d0b758323d", "score": "0.6035988", "text": "public function handle()\n {\n $this->createDirectories();\n\n $this->exportViews();\n\n file_put_contents(\n base_path('routes/web.php'),\n file_get_contents(__DIR__.'/stubs/make/routes/web.stub'),\n FILE_APPEND\n );\n\n $this->info('Landing pages generated successfully.');\n\n return Command::SUCCESS;\n }", "title": "" }, { "docid": "e0fd509e8754e714988a07dbeb070103", "score": "0.60300267", "text": "public function handle()\n {\n $forced = $this->option('force');\n\n if (app()->environment('production') && ! $forced) {\n $this->error('You cannot run this command in production without --force.');\n die;\n }\n\n $this->runMigrations();\n $this->runSeeders();\n\n $this->info('Finished!');\n }", "title": "" }, { "docid": "c4554ebb7ab906113b30c259ef093ea2", "score": "0.6025368", "text": "public function handle(): void\n {\n if ( $this->argument( 'dev' ) === 'dev' ) {\n Config::set( 'env', 'dev' );\n }\n\n $processor = self::getVendor( $this->argument( 'vendor' ), $this->argument( 'storage' ) );\n\n print \"\\nStart feed {$this->argument('vendor')}\\n\";\n\n $processor->process();\n\n print \"\\nDONE!\\n\";\n }", "title": "" }, { "docid": "f7c62886c4c8c1376745b8d4367d94e8", "score": "0.6024977", "text": "public function handle()\n {\n $userId = $this->argument('id');\n broadcast(new UserTestEvent($userId, 'test message'));\n }", "title": "" }, { "docid": "7f8a1b54a25585f3ab9d5590594fcda3", "score": "0.60206056", "text": "public function handle()\n {\n dd($this->signature);\n // $args = [\n // 'name' => $this->argumentName()\n // ];\n // // extra custom option\n // if ($this->extraOption) {\n // $args[\"--{$this->extraOption}\"] = $this->optionExtra();\n // }\n // $this->call('generate:file', $args);\n }", "title": "" }, { "docid": "cb2b3209c455ca8eda55b0d56ac77406", "score": "0.6020508", "text": "public function handle()\n {\n try {\n $user = $this->argument('user');\n if (Auth::attempt(['email' => $user[0], 'password' => $user[1]])) {\n $emails = ConfigUtils::get('NOTIFICATION_EMAILS');\n if ($emails) {\n foreach ($emails as $email) {\n Mail::to($email)->send(new DailySalesSummary());\n }\n }\n }\n } catch (\\Exception $e) {\n report($e);\n echo $e->getMessage().\"\\n\";\n }\n }", "title": "" }, { "docid": "fe1f6d6cc8ac804a4a5e6e4acc96931c", "score": "0.6019896", "text": "public function handle()\n {\n $this->game = new Game($this);\n\n $this->game->run();\n\n $this->game->save();\n\n $this->info(\"Not to worry, your progress has been saved!\");\n\n $this->info(\"Thanks for playing!\");\n\n return;\n }", "title": "" }, { "docid": "4146779fafcce6b8cb6143bfb7f4f201", "score": "0.60166365", "text": "public function handle()\n {\n $numbers = $this->generateOptimusNumbers(\n $this->getTimes(),\n (int) $this->option('prime')\n );\n\n $this->table(['prime', 'inverse', 'random'], $numbers);\n }", "title": "" }, { "docid": "d200512a514d018f97260e43861cfd39", "score": "0.6016307", "text": "public function handle()\n {\n $file_contents = \"<?php\" . PHP_EOL . PHP_EOL .\n \"namespace Camrymps\\MeLikey\\Reactions;\" . PHP_EOL . PHP_EOL .\n \"class \" . $this->argument('reaction_name') . PHP_EOL .\n \"{\" . PHP_EOL .\n \"use ReactionTrait;\" . PHP_EOL .\n \"}\";\n\n \\File::put(\n \\dirname(__DIR__) . '/Reactions/' . $this->argument('reaction_name') . '.php',\n $file_contents\n );\n }", "title": "" }, { "docid": "e638083348f08bbc6d0209edc78d18a1", "score": "0.6015652", "text": "public function handle()\n {\n $params = [\n 'domain' => $this->argument('domain'),\n 'depth' => $this->option('depth'),\n 'max_pages' => $this->option('max_pages'),\n ];\n\n /** @var ICrawler $crawlerRepository */\n $crawlerRepository = app(CrawlerRepository::class);\n $crawlerRepository->setup($params);\n $crawlerRepository->run();\n }", "title": "" }, { "docid": "e2b5de2ffc279b0ab5b5346da9db084b", "score": "0.6014581", "text": "public function handle()\n {\n $limit = $this->argument('limit') ? intval($this->argument('limit')) : -1;\n\n $clubs = Admin::where('role', Admin::JLEAGUE_ROLE)\n ->whereHas('dropbox')->get();\n\n foreach ($clubs as $club) {\n $this->service->fetchDropboxJleague($club, $limit);\n }\n\n $this->info('success');\n }", "title": "" }, { "docid": "85be0a75395da5ec931e983e2bb684cb", "score": "0.6013276", "text": "public function handle()\n {\n $name = $this->argument('name');\n $path = config('languagecli.path');\n $languages = glob($path . '/*' , GLOB_ONLYDIR);\n\n foreach($languages as $language) {\n $filePath = \"{$language}/{$name}.php\";\n if(!file_exists($filePath)) {\n $file = fopen(\"{$language}/{$name}.php\", \"w\");\n $this->boilerplate($file, ucfirst($name));\n $this->info(\"{$filePath} √\");\n }\n }\n }", "title": "" }, { "docid": "e6432e19ee01d52e7ac00a0f3a2f7221", "score": "0.6012323", "text": "public function handle()\n {\n $this->line(\"\");\n $this->line(\"****************************************************************\");\n $this->info(\"Started Sync of Countries with Reloadly Platform\");\n $this->line(\"****************************************************************\");\n $this->line(\"Fetching Countries list from Reloadly\");\n $countries = User::admin()->getCountries();\n $this->info(\"Fetching Complete.\");\n $this->line(\"Syncing with database.\");\n foreach ($countries as $country)\n Country::updateOrCreate(\n ['iso' => $country->isoName],\n [\n 'name' => $country->name,\n 'currency_code' => $country->currencyCode,\n 'currency_name' => $country->currencyName,\n 'currency_symbol' => $country->currencySymbol,\n 'flag' => $country->flag,\n 'calling_codes' => $country->callingCodes\n ]\n );\n $this->line(\"****************************************************************\");\n $this->info(\"Sync Complete !!! \".sizeof($countries).\" Countries Synced.\");\n $this->line(\"****************************************************************\");\n $this->line(\"\");\n }", "title": "" }, { "docid": "143db5bcef0a4725c1570f35a7d9afbd", "score": "0.6006728", "text": "public function handle()\n {\n $userId = $this->argument('userId');\n $this->plotter->setUserId($userId);\n $this->plotter->plotUser();\n }", "title": "" }, { "docid": "7a68977572977f2bbe478e596713f2cf", "score": "0.6004358", "text": "public function handle()\n {\n Service::sync()->users(\n $this->option('full')\n );\n }", "title": "" }, { "docid": "df42021c529f3f2d4e08359b9854911d", "score": "0.6003005", "text": "public function handle()\n {\n $sourceId = (int) $this->argument('sourceId');\n $parser = ParserFabric::get($sourceId);\n $parser->run();\n }", "title": "" }, { "docid": "5505c195ee876e13d5fa183ab3724b0c", "score": "0.6001902", "text": "public function handle() {\n $footballLives = $this->getLiveChannels(MatchLive::kSportFootball);\n foreach ($footballLives as $football) {\n $this->saveLiveLog($football, MatchLive::kSportFootball);\n }\n\n $basketLives = $this->getLiveChannels(MatchLive::kSportBasketball);\n foreach ($basketLives as $basketLive) {\n $this->saveLiveLog($basketLive, MatchLive::kSportBasketball);\n }\n }", "title": "" }, { "docid": "72465b25af15fd958cde08300a65b5d0", "score": "0.60017043", "text": "public function handle()\n\t{\n\t\t$year = CompYear::yearOrMostRecent($this->argument('year'));\n\t\t$result = App::make('\\App\\Http\\Controllers\\InvoiceReview')->invoice_sync($year,false);\n\t\t$this->info(date(\"r\") . \" - \" . $result);\n\t}", "title": "" }, { "docid": "d1460e56c1d41cd0778f4aaafe8948f6", "score": "0.6001577", "text": "public function handle()\n {\n switch ($this->argument('action')) {\n // 补数据\n case 'refetchReport':\n for ($i=0; $i < $this->option('value'); $i++) {\n LibUchc::syncAllCreativeReport(['subDays' => $i]);\n }\n break;\n case 'cronEveryFiveMinutes':\n // 同步 UC汇川(UC头条)状态\n LibUchc::syncAllCampaignStatus();\n // LibUchc::syncAllAdgroupStatus();\n LibUchc::syncAllCreativeReport();\n LibUchc::syncAllCreativeStatus();\n break;\n case 'cronDailyAtEarlyMorning':\n // 同步 UC汇川(UC头条) 前一天 创意报表\n LibUchc::syncAllCreativeReport(['subDays' => 1]);\n break;\n default:\n break;\n }\n }", "title": "" }, { "docid": "6330dd35ae4ece2b9d7feb11cc17064f", "score": "0.6000745", "text": "public function handle()\n {\n foreach ($this->parseTenants() as $tenant) {\n $tenant->setActive();\n \n $this->handleTenantCommand($tenant);\n }\n }", "title": "" }, { "docid": "abad57898718666782281fa646c0654f", "score": "0.5999979", "text": "public function handle()\n {\n $this->publishAssets();\n $this->publishConfigs();\n $this->copyNavigationView();\n $this->copyMigrationFiles();\n $this->copyThirdPartyMigrationFiles();\n\n if ($this->confirm('Run migrations?')) {\n $this->call('migrate');\n }\n\n $this->info('Completed');\n }", "title": "" }, { "docid": "c300a95b7dcf90641ad4b910b9db9c90", "score": "0.5997138", "text": "public function handle()\n {\n $gameId = $this->argument('game');\n\n if ($gameId) {\n $this->import($gameId);\n return;\n }\n\n foreach ($this->importableGameIds as $gameId) {\n $this->import($gameId);\n }\n }", "title": "" }, { "docid": "e32f7d584da3023c19001bc2764faf64", "score": "0.5996409", "text": "public function handle()\n {\n $table = trim($this->input->getArgument('table_name'));\n $name = \"create_{$table}_table\";\n\n $this->writeMigration($name, $table);\n\n $this->composer->dumpAutoloads();\n }", "title": "" }, { "docid": "d1c1601dd18c56bc7e16b61d146f74e0", "score": "0.59959024", "text": "public function handle()\n {\n $user = $this->retrieveUser();\n\n $this->showActualStatus($user);\n\n if (! $this->confirm('Voulez vous vraiment modifier le status administrateur de ' . $user->name)) {\n return;\n }\n\n $user = $this->switchAdminStatus($user);\n\n $this->output($user);\n }", "title": "" }, { "docid": "a725a929174becbe56316cd7f81e120b", "score": "0.59949046", "text": "public function handle()\n {\n $accountId = $this->argument('account');\n\n $account = Account::findOrFail($accountId);\n\n $backupDate = new DateTime($this->argument('since'));\n\n BackupAccountLibrary::getInstance($account, $backupDate)->handle();\n }", "title": "" }, { "docid": "5d862d679a177091acf0b2eaf4c32d8f", "score": "0.59945333", "text": "public function handle()\n\t{\n\t\t$generator = new ModelGenerator();\n\t\t$name = $this->argument('model');\n\t\ttry {\n\t\t\t$model = $generator->generate($name);\n\t\t\t$this->info('Model class created successfully.' .\n\t\t\t\t\"\\n\" .\n\t\t\t\t\"\\n\" .\n\t\t\t\t'Find it at <comment>' . $model->relativePath . '</comment>' . \"\\n\"\n\t\t\t);\n\t\t} catch (Exception $e) {\n\t\t\t$this->error($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "6df95dd75f1d7f4aa49edacdde7b3126", "score": "0.59932405", "text": "public function handle()\n {\n $userName = $this->argument('userName');\n $user = User::where('name', $userName)->first();\n if (!$user) {\n exit(\"user with name {$userName} does not exist\");\n }\n $method = $this->argument('method');\n switch ($method) {\n\n case 'points':\n $this->givePoints($user);\n break;\n case 'following':\n $this->addFollowing($user);\n break;\n case 'notification':\n $this->addNotification($user);\n break;\n case 'boxopen':\n $this->openBox($user);\n break;\n default:\n $this->error(\"wrong method - <bg=yellow;fg=black> $method </>\");\n $this->line(\"Existing methods:\");\n $this->info(\"points\");\n $this->line(' give points to user');\n $this->info(\"following\");\n $this->line(' add random following to user');\n $this->info(\"notification\");\n $this->line(' add notification to user');\n $this->info(\"boxopen\");\n $this->line(' open box');\n $this->line(\"FORMAT: php artisan emulate <fg=yellow>userName methodName</>\");\n break;\n }\n }", "title": "" }, { "docid": "1fb617af1475a7488dca7f94e3fe223e", "score": "0.59930784", "text": "public function handle()\n {\n $command = $this->argument('c');\n $this->cmd('docker-compose '.$command);\n $this->info('Done.');\n }", "title": "" }, { "docid": "f914a7bb9b27d8212439cead3a61fe9e", "score": "0.5991615", "text": "public function handle()\n {\n /** @var User $user */\n $user = User::where('email', $email = $this->argument('email'))\n ->firstOrFail();\n\n try {\n $user->assignRole('Super-Admin');\n\n $this->info('User ' . $email . ' is now admin.');\n } catch (RoleDoesNotExist $roleDoesNotExist) {\n $this->info('Role does not exist, please seed.');\n }\n }", "title": "" }, { "docid": "6e296bc53e1343b36981491d9be1c1d8", "score": "0.59884655", "text": "public function handle()\n {\n $addon = Str::studly($this->argument('name'));\n $vendor = Str::slug($this->argument('vendor'));\n\n $path = addons_path(join('/', [$addon, 'composer.json']));\n\n if (File::exists($path)) {\n $this->error(\"File already exists at: {$path}\");\n\n return;\n }\n\n $stub = File::get(__DIR__ . \"/stubs/composer.json.stub\");\n\n $contents = str_replace(\n ['vendor', 'package'],\n [$vendor, Str::slug($addon)],\n $stub\n );\n\n File::put($path, $contents);\n\n $this->info(\"Your Composer file awaits at: \" . Path::makeRelative($path));\n }", "title": "" }, { "docid": "692747030666eaada257015d1c730a17", "score": "0.59861135", "text": "public function handle()\n {\n $options = [];\n\n $result = Card::getPricing(\n $options, true,\n ['allowZeroPlace' => 0]\n );\n\n if ($result) {\n self::setStatus('railway.v1.card.pricing', true);\n\n $this->info('Сервис Railway доступен!');\n } else {\n self::setStatus('railway.v1.card.pricing', false, 'Сервис Railway доступен!');\n\n $this->error('Сервис Railway доступен!');\n }\n }", "title": "" }, { "docid": "8a5c1b487a0b5805cd3d5e01ce6bf217", "score": "0.598496", "text": "public function handle()\n {\n $currency = $this->argument('currency');\n $rate = (new ExchangeRateService())->query($currency);\n Mail::to('[email protected]')->send(new ExchangeRateMail($rate));\n }", "title": "" }, { "docid": "6ef998807e57ada8c6f3edc439aa4b38", "score": "0.5983099", "text": "public function handle()\n {\n $repositoryName = $this->argument('repositoryName');\n $modelName = $this->argument('modelName');\n $moduleName = $this->argument('moduleName');\n\n $this->repository($repositoryName, $modelName, $moduleName);\n\n }", "title": "" }, { "docid": "f2755f8a77784f2f9f47f5154dec676d", "score": "0.5981614", "text": "public function handle()\n {\n $args = $this->options();\n $this->options = $args;\n if ($name = $args['all']) {\n return $this->generateAll($name);\n }\n }", "title": "" }, { "docid": "de904e25765ecb55d993002851ffe2a2", "score": "0.5978018", "text": "public function handle()\n {\n $userIds = [\n 'Ud7a58ed5efb8a8f8eb845bf7e1b2c958',\n 'U1a4f2cb47ed3c5eef0fa8656d9611274'\n ];\n\n $multicast = $this->lineHelper->multicast($userIds, new TextMessageBuilder('This is scheduled multicast message from Son Tran\\'s bot'));\n\n if (!$multicast->isSucceeded()) {\n Log::channel('single')->info('Broadcast message:' . $multicast->getHTTPStatus() . ' ' . $multicast->getRawBody());\n }\n }", "title": "" }, { "docid": "cae4e5623fbef00544f27004fa9ae3ee", "score": "0.59773165", "text": "public function handle()\n {\n $error = 'Are you really sure you want to export translations from the database to the lang files?'.PHP_EOL.' Existing translations will be overwritten, and translations that have not been imported will be lost.';\n\n if ($this->confirm($error)) {\n // Set options from the command context\n $options = [\n 'allow-vendor' => $this->option('allow-vendor'),\n 'allow-json' => $this->option('allow-json'),\n 'ignore-groups' => $this->option('ignore-groups'),\n 'only-groups' => $this->option('only-groups'),\n ];\n $this->manager->exportTranslations($options);\n\n $this->info('All translations have been exported.');\n } else {\n $this->warn('Exporting cancelled.');\n }\n }", "title": "" }, { "docid": "17e6e9efce901ab2ee40096363dd680b", "score": "0.5975938", "text": "public function handle()\n {\n $isRepositoryPresent = false;\n $isInterfacePresent = false;\n\n $class = $this->getClassArgument();\n\n if(is_null( $interface = $this->getInterfaceInput() ))\n {\n $interface = $class;\n }\n else\n {\n $interface = $interface;\n }\n\n if(is_null( $repository = $this->getRepositoryInput() ))\n {\n $repository = $class;\n }\n else\n {\n $repository = $repository;\n }\n\n Artisan::call('make:datalayer:class', ['name' => $class]);\n $classOutput = Artisan::output();\n\n Artisan::call('make:datalayer:interface', ['name' => $interface]);\n $interfaceOutput = Artisan::output();\n\n Artisan::call('make:datalayer:repository',[ \n 'name' => $repository, \n '--interface' => $interface, \n '--class' => $class\n ]);\n $repositoryOutput = Artisan::output();\n\n $this->info($classOutput.$interfaceOutput.$repositoryOutput);\n }", "title": "" }, { "docid": "434e313ab1cc498697f4fcbb4400bc19", "score": "0.5971473", "text": "public function handle()\n {\n $sites = Site::all();\n $keywords = Keyword::all();\n\n $this->info('Evaluation started.');\n\n $this->info('');\n $this->info('Sites: ' . $sites->count());\n foreach ($sites as $site) {\n $this->info($site->title . ' ' . $site->url);\n }\n\n $this->info('');\n $this->info('Keywords: ' . $keywords->count());\n foreach ($keywords as $keyword) {\n $this->info($keyword->keyword);\n }\n\n DB::transaction(function () use ($keywords, $sites) {\n $this->keywordEvaluatorService->reEvaluate($keywords, $sites, $this);\n });\n\n $this->info('Sok boldogsagot...');\n }", "title": "" }, { "docid": "0d20a86263054ecb117f0f75ef7e402a", "score": "0.5968936", "text": "public function handle()\n {\n $article = Article::find($this->argument('article'));\n\n if (!$article) {\n return $this->error('Article not found.');\n }\n\n $this->info('Sending emails to subscribers');\n \n SendingAlertForNewArticle::dispatch($article);\n }", "title": "" }, { "docid": "5b904a0857d6d3f3d67a7171cf21effd", "score": "0.59669316", "text": "public function handle()\n {\n if (!$this->confirmToProceed()) {\n return;\n }\n\n $this->seedMetricPoints();\n\n $this->info('Demo metric seeded with demo data successfully!');\n }", "title": "" }, { "docid": "959785504ad1f5cdc879149f4c5e624b", "score": "0.5965973", "text": "public function handle()\n {\n $egressFile = $this->argument('infile');\n\n\t\t$result = EgressParser::sendPairingReports(\n\t\t\t$this->argument('infile'),\n\t\t\t$this->options()\n\t\t);\n\n\t\tif (!empty($result['errors'])) {\n\t\t\tforeach ($result['errors'] as $error) {\n\t\t\t\t$this->error($error);\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($result['info'])) {\n\t\t\tforeach ($result['info'] as $info) {\n\t\t\t\t$this->info($info);\n\t\t\t}\n\t\t}\n }", "title": "" }, { "docid": "7cda6161bdcce993090a7cd8eafef784", "score": "0.5965511", "text": "public function handle()\n {\n $name = Str::studly($this->argument('name'));\n \n $seeder = resolve(\"\\App\\Modules\\\\$name\\Database\\Seeds\\MainSeeder\");\n $seeder->run();\n \n $this->output->writeln(\"<info>Module {$name} seeded</info>\");\n }", "title": "" }, { "docid": "d38f9f8ad443c2cf5f1c560c9eb4e971", "score": "0.59645605", "text": "public function handle()\n {\n $totalGenres = $this->genres()\n ->refreshGenres($this->output);\n\n $this->line(\n '<info>Refreshed:</info> '.\n $totalGenres.' genres '.\n 'loaded from themoviedb.org'\n );\n }", "title": "" }, { "docid": "e2a5af03a250c05e34400835b3162a4d", "score": "0.5957798", "text": "public function handle()\n {\n $this->purgePublicStorageFiles();\n $this->purgePrivateStorageFiles();\n $this->refreshDatabase();\n $this->resetSettings();\n\n $this->info('Demo refresh is completed successfully.');\n }", "title": "" }, { "docid": "868196a0093506d64aa04f390812eee6", "score": "0.59565973", "text": "public function handle()\n {\n $this->mainModel = ucfirst($this->argument('main-model'));\n $this->targetModel = ucfirst($this->argument('target-model'));\n\n $this->defineRelation();\n $this->defineRelation(true);\n\n }", "title": "" }, { "docid": "8d721d5fe1265c5d8e73b5b8544de255", "score": "0.5951088", "text": "public function handle()\n {\n $id = $this->argument('id');\n\n if($id)\n {\n $client = Client::find($id);\n\n if($client) \n {\n $this->execCommand($client);\n }\n\n return;\n }\n\n $clients = Client::all();\n\n foreach ($clients as $client) {\n $this->execCommand($client);\n }\n }", "title": "" }, { "docid": "e93e374491b414729b3523a7c88a1c05", "score": "0.5949865", "text": "public function handle()\n {\n $projects = app(ApiService::class)->getProjects();\n\n foreach ($projects as $project) {\n $this->info($project->name.': '.$project->uuid);\n }\n }", "title": "" }, { "docid": "26cf5c87039086003f994f0102afa97f", "score": "0.59495693", "text": "public function handle()\n {\n parent::handle();\n Config::setConsoleLive(true);\n\n $user = User::find(1326);\n /*\n * One simply performance check\n */\n Performance::point('Retrieving accessible properties');\n\n\n $user->getAccessiblePropertyObjArr();\n\n // Finish all tasks and show test results\n Performance::results();\n }", "title": "" }, { "docid": "95285b7623449e5936fb96dd9dc7968c", "score": "0.5949411", "text": "public function handle()\n {\n try {\n $students = UpdateEmployeesCommand::updateEmployees();\n } catch (Exception $e) {\n $this->error(\"An error occurred\");\n }\n }", "title": "" }, { "docid": "ab89d41f8a15b1b16d5265e9520757ff", "score": "0.5947712", "text": "public function handle()\n {\n $id = $this->argument('credit');\n\n if ($id > 0) {\n $credit = CreditNote::findOrFail($id);\n $credit->unsetEventDispatcher();\n $credit->compute();\n } else {\n CreditNote::open()->chunk(\n 200,\n function ($credits) {\n foreach ($credits as $credit) {\n $credit->unsetEventDispatcher();\n $credit->compute();\n }\n }\n );\n }\n $this->info('Credit balances calculated successfully');\n }", "title": "" }, { "docid": "d456515c9dc9ab140851aaa8d3f6269d", "score": "0.59401387", "text": "public function handle() {\n \t\tif ($this->manifest->delete())\n\t\t\t$this->info('Manifest has been deleted. All collections will are now required to be rebuilt.');\n\t\telse\n\t\t\t$this->comment('Manifest does not exist or could not be deleted.');\n\t}", "title": "" }, { "docid": "8458d6e67dfcf07c77df0f1f7074d53e", "score": "0.59388375", "text": "public function handle()\n\t{\n\t\t$channel = $this->argument('channel');\n\n\t\tif ($channel == 'slack' && !class_exists(SlackWebhookChannel::class))\n\t\t{\n\t\t\t$this->error(\"Please install laravel/slack-notification-channel package before using Slack notifications\");\n\t\t\treturn 1;\n\t\t}\n\n\t\tif ($channel == 'nexmo' && !class_exists(NexmoSmsChannel::class))\n\t\t{\n\t\t\t$this->error(\"Please install laravel/nexmo-notification-channel package before using Nexmo SMS notifications\");\n\t\t\treturn 1;\n\t\t}\n\n\t\t$destination = $this->argument('destination');\n\n\t\ttry\n\t\t{\n\t\t\tNotification::route($channel, $destination)->notifyNow(new TestNotification());\n\t\t\t$this->info(\"Notification sent via {$channel} to {$destination}\");\n\t\t\treturn 0;\n\t\t}\n\t\tcatch (\\Exception $e)\n\t\t{\n\t\t\t$this->error($e->getMessage() . ($e->getCode() ? \" [\" . $e->getCode() . \"]\" : \"\"));\n\t\t\treturn 1;\n\t\t}\n\t}", "title": "" }, { "docid": "f4aa5e0987be52f8bc72ca12b0b0e199", "score": "0.5938701", "text": "public function handle()\n {\n $this->validateParams();\n\n switch ($this->argument('source')) {\n case 'eoddata':\n $this->processEoddataCsv($this->argument('filepath'));\n break;\n }\n }", "title": "" }, { "docid": "b92430e3ce968ca633e13c8ce10f2934", "score": "0.59312904", "text": "public function fire()\n\t{\n\n\n \t$handler = fopen (\"php://stdin\",\"r\");\n\n \techo \"Eloquent Model e.g User:\";\n\n \t$this->model = trim(fgets($handler));\n\n \techo \"Api Version e.g 1.0:\";\n\n \t$this->version = trim(fgets($handler));\n\n $this->processor->run($this->model, $this->version);\n\t}", "title": "" } ]
6f8f48d976c851f7cf4899468310ee61
Returns the customer code.
[ { "docid": "fc0348ad81b00807591a0ac2639619fa", "score": "0.9066956", "text": "public function getCustomerCode();", "title": "" } ]
[ { "docid": "92fc66621d25af4b2aa9f4d4d5d41cf1", "score": "0.9152689", "text": "public function getCustomerCode()\n {\n return $this->getData(static::FIELD_CODE);\n }", "title": "" }, { "docid": "21cc9b252aad7b62a553c08e636a9a0e", "score": "0.74184346", "text": "public function GetCustomerNumber()\n {\n $sCustNr = '';\n if (is_array($this->sqlData) && array_key_exists('customer_number', $this->sqlData)) {\n $sCustNr = $this->sqlData['customer_number'];\n }\n\n return $sCustNr;\n }", "title": "" }, { "docid": "ed942a6d675aa2b0e86e8ef1eae33e30", "score": "0.73674095", "text": "public function getMerchantCode(): string\n {\n return $this->getData(self::MERCHANT_CODE);\n }", "title": "" }, { "docid": "5abfec7ec7c06887b94e59f405e71283", "score": "0.730373", "text": "public function getCustomerNumber() { return $this->customer_number; }", "title": "" }, { "docid": "3a0311ec08efa2b04922a96b32081cac", "score": "0.7281176", "text": "public function getCustomerId()\n {\n return $this->getData('customer');\n }", "title": "" }, { "docid": "7091422dc76ff97bfd4243ea73bb1855", "score": "0.7179008", "text": "public function getCode()\n\t{\n\t\tif( isset( $this->values['coupon.code.code'] ) ) {\n\t\t\treturn (string) $this->values['coupon.code.code'];\n\t\t}\n\t}", "title": "" }, { "docid": "e7033c7a53c12d59429badd6910c0c01", "score": "0.7137654", "text": "public function getCode(): string\n {\n return $this->code;\n }", "title": "" }, { "docid": "e7033c7a53c12d59429badd6910c0c01", "score": "0.7137654", "text": "public function getCode(): string\n {\n return $this->code;\n }", "title": "" }, { "docid": "e7033c7a53c12d59429badd6910c0c01", "score": "0.7137654", "text": "public function getCode(): string\n {\n return $this->code;\n }", "title": "" }, { "docid": "e7033c7a53c12d59429badd6910c0c01", "score": "0.7137654", "text": "public function getCode(): string\n {\n return $this->code;\n }", "title": "" }, { "docid": "e7033c7a53c12d59429badd6910c0c01", "score": "0.7137654", "text": "public function getCode(): string\n {\n return $this->code;\n }", "title": "" }, { "docid": "e7033c7a53c12d59429badd6910c0c01", "score": "0.7137654", "text": "public function getCode(): string\n {\n return $this->code;\n }", "title": "" }, { "docid": "e7033c7a53c12d59429badd6910c0c01", "score": "0.7137654", "text": "public function getCode(): string\n {\n return $this->code;\n }", "title": "" }, { "docid": "508ca312424990229033922f748515c3", "score": "0.7126993", "text": "public function getCode()\n {\n return isset($this->code) ? $this->code : '';\n }", "title": "" }, { "docid": "65cdc7d717635f28dd994c7f0a655368", "score": "0.70763636", "text": "public function getClientCode() {\n return $this->m_Client_code;\n }", "title": "" }, { "docid": "408ec0b64044a062af83d46afb16ef42", "score": "0.7055435", "text": "public function getCustomerId(){\n\t\treturn $this->customerId;\n\t}", "title": "" }, { "docid": "c97d2c3b8629f8ac2b46423ae9f73ad0", "score": "0.703947", "text": "public function getCustomerId()\n {\n return $this->customerData->getCustomerId();\n }", "title": "" }, { "docid": "fee679b4f12810cf9ac76f580630eb78", "score": "0.7038116", "text": "public function getAccountCode();", "title": "" }, { "docid": "5bee04fe839d96007edb850621c82285", "score": "0.70266896", "text": "function getCode() {\n return $this->getFieldValue('code');\n }", "title": "" }, { "docid": "281a88b7217df15537800474ec092492", "score": "0.7024215", "text": "public function getCode():string\n {\n return $this->code;\n }", "title": "" }, { "docid": "f0c8324ec207abc55e21be970724f5e3", "score": "0.70151776", "text": "public function getcode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "e3c7ac0d3194a8326a7f78dd1b2a943e", "score": "0.70089686", "text": "public function getCode() : string\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.7003046", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.7003046", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.7003046", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.7003046", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.7003046", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.7003046", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.7003046", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.7003046", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.7003046", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.7003046", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.7003046", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.7003046", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.7003046", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.7003046", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.7003046", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.7003046", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.7003046", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.7003046", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.7003046", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.7003046", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.7003046", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.7003046", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.7003046", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.7003046", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.7003046", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.7003046", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.7003046", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "624cb61e71f226e321dbd974a5e7dae4", "score": "0.69805366", "text": "public function getCode()\r\n\t{\r\n\t\treturn $this->code;\r\n\t}", "title": "" }, { "docid": "6f48632ab127b9df4a96cfa6e55cc407", "score": "0.6977823", "text": "public function getClientCustomerId() {\n return $this->clientCustomerId;\n }", "title": "" }, { "docid": "a53e9dd2ac9f062dae89b627aaa26089", "score": "0.6977437", "text": "public function getCustomerId()\n {\n return $this->customer_id;\n }", "title": "" }, { "docid": "a53e9dd2ac9f062dae89b627aaa26089", "score": "0.6977437", "text": "public function getCustomerId()\n {\n return $this->customer_id;\n }", "title": "" }, { "docid": "a53e9dd2ac9f062dae89b627aaa26089", "score": "0.6977437", "text": "public function getCustomerId()\n {\n return $this->customer_id;\n }", "title": "" }, { "docid": "a53e9dd2ac9f062dae89b627aaa26089", "score": "0.6977437", "text": "public function getCustomerId()\n {\n return $this->customer_id;\n }", "title": "" }, { "docid": "a53e9dd2ac9f062dae89b627aaa26089", "score": "0.6977437", "text": "public function getCustomerId()\n {\n return $this->customer_id;\n }", "title": "" }, { "docid": "cca484c6510f64afbbabdfff245ccc89", "score": "0.69669574", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "e2fe7870ad8545663db5013357917465", "score": "0.69642556", "text": "public function GetCustomerNumber()\n {\n $sCustNr = parent::GetCustomerNumber();\n if (empty($sCustNr)) {\n $oShop = TdbShop::GetInstance();\n $sCustNr = $oShop->GetNextFreeCustomerNumber();\n $aData = $this->sqlData;\n $aData['customer_number'] = $sCustNr;\n $this->LoadFromRow($aData);\n }\n\n return $this->fieldCustomerNumber;\n }", "title": "" }, { "docid": "f4b11ad7cb0353006b69928c3c3010d5", "score": "0.6956202", "text": "public function getCustomerId()\n {\n return $this->getCheckout()->getCustomerSession()->getCustomerId();\n }", "title": "" }, { "docid": "157d59aaffe0301210fa0f69fa46878a", "score": "0.69432735", "text": "public function getCode()\n {\n return isset($this->Code) ? $this->Code : null;\n }", "title": "" }, { "docid": "ca67d9e9cc3aeb20545f2650ff19e2cc", "score": "0.6942195", "text": "public function getCode() {\n return $this->code;\n }", "title": "" }, { "docid": "ca67d9e9cc3aeb20545f2650ff19e2cc", "score": "0.6942195", "text": "public function getCode() {\n return $this->code;\n }", "title": "" }, { "docid": "ca67d9e9cc3aeb20545f2650ff19e2cc", "score": "0.6942195", "text": "public function getCode() {\n return $this->code;\n }", "title": "" }, { "docid": "76867f3f488e3cca706df6503e77dcf4", "score": "0.69271874", "text": "public function getCode()\n\t{\n\t\treturn $this->code;\n\t}", "title": "" }, { "docid": "76867f3f488e3cca706df6503e77dcf4", "score": "0.69271874", "text": "public function getCode()\n\t{\n\t\treturn $this->code;\n\t}", "title": "" }, { "docid": "f1c358da800ba49f2d791c131178d730", "score": "0.69260025", "text": "public function getPurchaseCustomer_ID()\n {\n return $this->customer_id;\n \n }", "title": "" }, { "docid": "8c4440cc8a041adedf862eebab8dc3a4", "score": "0.6925835", "text": "public function getCustomerId();", "title": "" }, { "docid": "8c4440cc8a041adedf862eebab8dc3a4", "score": "0.6925835", "text": "public function getCustomerId();", "title": "" }, { "docid": "2012b170f35d2b517a6b602dad21fb33", "score": "0.6919178", "text": "public function getCode() {\n return $this->code;\n }", "title": "" }, { "docid": "91ff8a12da7fc7f49ec3a7a759f7baf1", "score": "0.6912964", "text": "public function getCode() {\r\n return $this->code;\r\n }", "title": "" }, { "docid": "e1b6924aed36de693d5bea164d65763e", "score": "0.69087374", "text": "public function getCustomerId()\n {\n return $this->_mpHelper->getCustomerId();\n }", "title": "" }, { "docid": "e5bb90bda923048c51458c9889ff519c", "score": "0.69069594", "text": "public function getCustomerId()\n {\n return $this->_customerId;\n }", "title": "" }, { "docid": "4c2fc9977cc2a49039d820fcebd9b805", "score": "0.6903791", "text": "public function getCode()\n {\n return $this->Code;\n }", "title": "" }, { "docid": "84f772547edf9ed7c06c32af0eb22895", "score": "0.6900356", "text": "public function getCode(): string;", "title": "" }, { "docid": "84f772547edf9ed7c06c32af0eb22895", "score": "0.6900356", "text": "public function getCode(): string;", "title": "" }, { "docid": "84f772547edf9ed7c06c32af0eb22895", "score": "0.6900356", "text": "public function getCode(): string;", "title": "" }, { "docid": "95ec00ac60aadde47fa6dbc3622ba12a", "score": "0.6887225", "text": "public function GetCode () \r\n\t{\r\n\t\treturn ($Code);\r\n\t}", "title": "" }, { "docid": "f6f416fc7cebb14d55c72c72ddc81843", "score": "0.6886149", "text": "public function getCustomerNumber(): ?string;", "title": "" }, { "docid": "7e11fcd7a9050e5a4aeffe227dce019e", "score": "0.68845904", "text": "public function getCustomerBankCode()\n {\n return $this->customerBankCode;\n }", "title": "" }, { "docid": "c4443e6e5afc544ec30f97bc72c86f36", "score": "0.68824995", "text": "public function getCode() {\n\t\treturn $this->code;\n\t}", "title": "" }, { "docid": "c4443e6e5afc544ec30f97bc72c86f36", "score": "0.68824995", "text": "public function getCode() {\n\t\treturn $this->code;\n\t}", "title": "" }, { "docid": "c4443e6e5afc544ec30f97bc72c86f36", "score": "0.68824995", "text": "public function getCode() {\n\t\treturn $this->code;\n\t}", "title": "" }, { "docid": "712e6d68e8587416c1ac83aebfcee286", "score": "0.6841039", "text": "public function get_code()\r\n\t{\r\n\t\treturn $this->get_attr('code');\r\n\t}", "title": "" }, { "docid": "b47ef7465cbdbcf816894745673b81b4", "score": "0.6838558", "text": "public function getCode()\r\n\t{\r\n\t\treturn $this->_code;\r\n\t}", "title": "" }, { "docid": "de8d03c1dcfee253fe49aa03a00aaa98", "score": "0.68265605", "text": "public function getCustomerId() : int\n {\n return $this->customerId;\n }", "title": "" }, { "docid": "1dc5a2828276a9f2faf40367cb6c6c60", "score": "0.67839193", "text": "public function getCode() {\n return $this->_code;\n }", "title": "" }, { "docid": "1dc5a2828276a9f2faf40367cb6c6c60", "score": "0.67839193", "text": "public function getCode() {\n return $this->_code;\n }", "title": "" }, { "docid": "b0d1476c16f087b9c29effb47ac7e475", "score": "0.67824835", "text": "function getCode() {\n return $this->code;\n }", "title": "" }, { "docid": "9d330e603ae17b1942759bd74199e68f", "score": "0.6782368", "text": "public function getCode()\n {\n return $this->attributes['code'];\n\n }", "title": "" }, { "docid": "6e72419b60f84e982e42b50324d64966", "score": "0.6771847", "text": "public function getCustomer()\n\t{\n\t\t$dataType = 'Meta_Subscriber_CustomerInformation';\n\t\t$data = json_decode($this->getData($this->cfg['url'] . 'session' . $this->_session . '/data?data='. $dataType . '&version=' . self::client_version));\n\t\t$this->dn = $data->data[0]->objectIdentity->line;\n\t\treturn $data->data[0]->data;\n\t}", "title": "" }, { "docid": "66d0776b88a69d73e3aabfc38821e450", "score": "0.6769025", "text": "function getCodeClienti() {\n $sql = \"SELECT * FROM vsecommerce_info WHERE field_name='CODICECLI'\";\n $db = new MySQL();\n $result = $db -> QuerySingleRow($sql);\n return $result -> value;\n }", "title": "" }, { "docid": "fa2a5dc6285a930be075370527365e62", "score": "0.6714795", "text": "public function getAcpCustomercode()\n {\n $limit = 10;\n $offset = (Input::get('page') == \"1\" ? \"0\" : (Input::get('page')-1)*$limit);\n\n if(Input::get('term')===\"\")\n {\n //Get Most Popular customers\n $searchresult = \\SwiftACPRequest::groupBy('billable_company_code')\n ->select(\\DB::Raw('COUNT(*) as count, jdecustomers.ALPH, jdecustomers.AN8, jdecustomers.AC09'))\n ->limit($limit)\n ->offset($offset)\n ->orderBy('count','DESC')\n ->join('sct_jde.jdecustomers','swift_acp_request.billable_company_code','=','jdecustomers.an8')\n ->remember(5)->get();\n\n $total = \\SwiftACPRequest::distinct('billable_company_code')\n ->join('sct_jde.jdecustomers','swift_acp_request.billable_company_code','=','jdecustomers.an8')\n ->remember(5)->count('billable_company_code');\n }\n else\n {\n if(is_numeric(Input::get('term')))\n {\n $searchresult = JdeCustomer::getByCode(Input::get('term'),$offset,$limit);\n $total = JdeCustomer::countByCode(Input::get('term'));\n }\n else\n {\n $searchresult = JdeCustomer::getByName(Input::get('term'),$offset,$limit);\n $total = JdeCustomer::countByName(Input::get('term'));\n }\n }\n \n if($searchresult !== false)\n {\n echo json_encode(array('customers'=>$searchresult,'total'=>$total));\n }\n else\n {\n echo json_encode(array('total'=>0));\n }\n }", "title": "" }, { "docid": "cdf3fa96fd1436bf546c723698e480ac", "score": "0.67114586", "text": "public function getCustomerName();", "title": "" }, { "docid": "88d6fb6fd81bc2abc6b6bdc38e5dc4ef", "score": "0.6699857", "text": "public function getActivationCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "a3c818802d46e3ab8f2d84bc1c2b07b3", "score": "0.6693816", "text": "public function getCode();", "title": "" }, { "docid": "a3c818802d46e3ab8f2d84bc1c2b07b3", "score": "0.6693816", "text": "public function getCode();", "title": "" }, { "docid": "a3c818802d46e3ab8f2d84bc1c2b07b3", "score": "0.6693816", "text": "public function getCode();", "title": "" }, { "docid": "a3c818802d46e3ab8f2d84bc1c2b07b3", "score": "0.6693816", "text": "public function getCode();", "title": "" }, { "docid": "a3c818802d46e3ab8f2d84bc1c2b07b3", "score": "0.6693816", "text": "public function getCode();", "title": "" }, { "docid": "a3c818802d46e3ab8f2d84bc1c2b07b3", "score": "0.6693816", "text": "public function getCode();", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "2d57e59e3152e4412dc6f00c1e8ca8b0", "score": "0.0", "text": "public function run()\n {\n TipoArtesanato::create(\n [\n 'nome' => 'Arte Popular',\n 'cod' => 'arte_popular',\n 'descricao' => 'Caracteriza-se pelo trabalho individual do artista popular, artesão autodidata, reconhecido pelo valor histórico e/ou artístico e/ou cultural, trabalhado em harmonia com um tema, uma realidade e uma matéria, expressando aspectos identitários da comunidade ou do imaginário do artista.',\n ]\n );\n TipoArtesanato::create(\n [\n 'nome' => 'Contemporâneo-Conceitual',\n 'cod' => 'contemp_conceitual',\n 'descricao' => 'Produção artesanal, predominantemente urbana, resultante da inovação de materiais e processos e da incorporação de elementos criativos, em diferentes formas de expressão, resgatando técnicas tradicionais, utilizando, geralmente, matéria-prima manufaturada reciclada e reaproveitada, com identidade cultural.',\n ]\n );\n TipoArtesanato::create(\n [\n 'nome' => 'Indígena',\n 'cod' => 'indigena',\n 'descricao' => 'É resultado do trabalho produzido por membros de etnias indígenas, no qual se identifica o valor de uso, a relação social e a cultural da comunidade, sendo os produtos, em sua maioria, incorporados ao cotidiano da vida tribal e resultantes de trabalhos coletivos, de acordo com a divisão do trabalho indígena.',\n ]\n );\n TipoArtesanato::create(\n [\n 'nome' => 'Quilombola',\n 'cod' => 'quilombola',\n 'descricao' => 'É resultado do trabalho produzido coletivamente por membros remanescentes dos quilombos, de acordo com a divisão do trabalho quilombola, no qual se identifica o valor de uso, a relação social e cultural da comunidade, sendo os produtos, em sua maioria, incorporados ao cotidiano da vida comunitária.',\n ]\n );\n TipoArtesanato::create(\n [\n 'nome' => 'Referência Cultural',\n 'cod' => 'referencia_cultural',\n 'descricao' => 'Produção artesanal decorrente do resgate ou da releitura de elementos culturais tradicionais nacionais ou estrangeiros assimilados, podendo se dar por meio da utilização da iconografia (símbolos e imagens) e/ou pelo emprego de técnicas tradicionais que podem ser somadas à inovação; dinamiza a produção, sem descaracterizar as referências tradicionais locais',\n ]\n );\n TipoArtesanato::create(\n [\n 'nome' => 'Tradicional',\n 'cod' => 'tradicional',\n 'descricao' => 'A produção, geralmente de origem familiar ou comunitária, que possibilita e favorece a transferência de conhecimentos de técnicas, processos e desenhos originais, cuja importância e valor cultural decorrem do fato de preservar a memória cultural de uma comunidade, transmitida de geração em geração.',\n ]\n );\n \n }", "title": "" } ]
[ { "docid": "520d3a91ddad10619dacf1b7197c5aec", "score": "0.7992128", "text": "public function run()\n {\n DB::table('users')->insert([\n 'id' => 1,\n 'name' => 'Usuário',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n ]);\n\n DB::table('empresas')->insert([\n 'nome' => 'Empreendimentos S.A.',\n 'telefone' => '11900001111',\n 'endereco' => 'Rua Qualquer',\n 'cep' => '00000-000',\n 'cnpj' => '00.000.000/0000-00',\n 'user_id' => 1\n ]);\n\n $faker = Faker::create();\n foreach (range(1,5) as $i){\n DB::table('fornecedores')->insert([\n 'nome' => $faker->name,\n 'email' => $faker->email,\n 'mensalidade' => mt_rand( 0, $faker->numberBetween(100, 1000) ) / 10,\n 'user_id' => 1\n ]);\n }\n }", "title": "" }, { "docid": "9d32f8ff8b6ed1c924761b8262ce875e", "score": "0.79787016", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n\t factory(App\\Models\\Person::class , 10)->create(); \n\t factory(App\\Models\\Company::class , 10)->create(); \n\t factory(App\\Models\\Account::class , 10)->create(); \n factory(App\\Models\\Tag::class , 10)->create();\n factory(App\\Models\\Customer::class , 10)->create();\n factory(App\\Models\\Project::class , 10)->create();\n factory(App\\Models\\Domain::class , 3)->create();\n\n foreach (['Watermark', 'Filter', 'Optimize'] as $index) {\n DB::table('processes')->insert([\n 'name' => $index, \n 'class' => $index,\n ]);\n }\n\n DB::table('process_tag')->insert([\n 'process_id' => 1, \n 'tag_id' => 1,\n ]);\n \n DB::table('process_tag')->insert([\n 'process_id' => 1, \n 'tag_id' => 2,\n ]);\n\n DB::table('process_tag')->insert([\n 'process_id' => 2, \n 'tag_id' => 3,\n ]);\n\n }", "title": "" }, { "docid": "e3f2301106fd912254f1c33890600754", "score": "0.7965562", "text": "public function run()\n {\n //Create faker instance\n $faker = \\Faker\\Factory::create();\n //Flush the table before recreate\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n DB::table('chapters')->truncate();\n \\App\\Chapter::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n foreach (range(1,5) as $number) {\n \\App\\Chapter::create([\n 'chapter' => $faker->word,\n 'subject_id'=> rand(1,3),\n ]);\n }\n }", "title": "" }, { "docid": "9e7127cb6c71143fb79c04b4fee8ad17", "score": "0.7947562", "text": "public function run()\n {\n /**\n * Seed Users Table\n */\n DB::table('users')->insert([\n [\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('admin'),\n 'role_id' => Config::get('constants.roles.administrator'),\n 'created_at' => Carbon::now()\n ],\n [\n 'name' => 'John Doe',\n 'email' => '[email protected]',\n 'password' => Hash::make('johndoe'),\n 'role_id' => Config::get('constants.roles.user'),\n 'created_at' => Carbon::now()\n ],\n ]);\n\n /**\n * Seed Roles Table\n */\n DB::table('roles')->insert([\n [\n 'display_name' => 'Administrator',\n 'description' => 'System Admin',\n 'created_at' => Carbon::now()\n ],\n [\n 'display_name' => 'User',\n 'description' => 'Can access expenses',\n 'created_at' => Carbon::now()\n ],\n ]);\n }", "title": "" }, { "docid": "37ee2d6976618f232b9fc479d5b57a06", "score": "0.79213214", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n \n Post::insert([\n [\n 'id' => 1,\n 'title' => 'post 1',\n 'content' => 'post content 1'\n ], \n [\n 'id' => 2,\n 'title' => 'post 2',\n 'content' => 'post content 2'\n ],\n [\n 'id' => 3,\n 'title' => 'post 3',\n 'content' => 'post content 3'\n ],\n [\n 'id' => 4,\n 'title' => 'post 4',\n 'content' => 'post content 4'\n ],\n [\n 'id' => 5,\n 'title' => 'post 5',\n 'content' => 'post content 5'\n ],\n [\n 'id' => 6,\n 'title' => 'post 6',\n 'content' => 'post content 6'\n ],\n [\n 'id' => 7,\n 'title' => 'post 7',\n 'content' => 'post content 7'\n ]\n ]);\n \n }", "title": "" }, { "docid": "341ec9573f9443b609a2c9e8c0a90413", "score": "0.79124165", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \tfactory(App\\User::class)->create();\n factory(App\\Client::class, 40)->create();\n factory(App\\Driver::class, 20)->create();\n factory(App\\Guide::class, 20)->create();\n factory(App\\Vehicle::class, 30)->create();\n factory(App\\Order::class, 80)->create();\n factory(App\\Invoice::class, 160)->create();\n factory(App\\DriverSchedule::class, 50)->create();\n factory(App\\GuideSchedule::class, 50)->create();\n factory(App\\VehicleSchedule::class, 50)->create();\n\n\n // Seed driver_order table\n\n $orders = App\\Order::all();\n $drivers = App\\Driver::all();\n $guides = App\\Guide::all();\n $vehicles = App\\Vehicle::all();\n\n $this->seedManyToMany($drivers, $orders);\n $this->seedManyToMany($guides, $orders);\n $this->seedManyToMany($vehicles, $orders);\n }", "title": "" }, { "docid": "c455dbfa0c734909206ed15084e64a1d", "score": "0.79038024", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(ArticlesTableSeeder::class);\n\n\n DB::table('categories')->delete();\n //insert some dummy records\n DB::table('categories')->insert(array(\n array('name'=>'groenten','pic'=>'groenten.png'),\n array('name'=>'vlees','pic'=>'vlees.png'),\n array('name'=>'fruit','pic'=>'fruit.png'),\n array('name'=>'snacks','pic'=>'snacks.png'),\n array('name'=>'drinken','pic'=>'drinken.png')\n\n ));\n }", "title": "" }, { "docid": "ec53d7f325471d31c8d4b9ef320da423", "score": "0.78988916", "text": "public function run()\n {\n $this->call(LanguageTableSeeder::class);\n $this->call(SkillsTableSeeder::class);\n\n// factory(\\App\\Skill::class, 1000)->create();\n\n factory(\\App\\User::class, 20)->create()->each(function($user) {\n $user->skills()->saveMany(\\App\\Skill::all()->random(rand(1, 25)));\n $user->languages()->saveMany(\\App\\Language::all()->random(rand(1, 10)));\n $user->save();\n });\n\n factory(\\App\\Question::class, 50)->create()->each(function($question) {\n $question->skills()->saveMany(\\App\\Skill::all()->random(rand(1, 5)));\n $question->save();\n });\n\n factory(\\App\\Answer::class, 50)->create();\n factory(\\App\\Vote::class, 80)->create();\n }", "title": "" }, { "docid": "b29caf34b66d3312d3383baca3e725cf", "score": "0.7895321", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(\\App\\Set::class, 3)->create()->each(function ($set) {\n $setProducts = factory(\\App\\Product::class, 30)->make();\n\n $set->products()->saveMany($setProducts);\n });\n factory(\\App\\Category::class, 3)->create();\n\n }", "title": "" }, { "docid": "88258f9f401554ae03712d5c26de4e86", "score": "0.78949255", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker\\Factory::create();\n\n foreach (range(1,10) as $index) {\n Product::create([\n 'title' => $faker->name ,\n 'description' => $faker->text ,\n 'price' => $faker->numberBetween(10, 100),\n ]);\n }\n }", "title": "" }, { "docid": "c5ca42e038468200777d2f68273e9f74", "score": "0.7888331", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => \"Jovan\",\n 'password' => Hash::make(\"12121212\"),\n 'email' => \"[email protected]\"\n ]);\n\n DB::table('users')->insert([\n 'name' => \"Pera\",\n 'password' => Hash::make(\"123123123\"),\n 'email' => \"[email protected]\"\n ]);\n\n $faker = Faker::create();\n for ($i = 0; $i < 10; $i++) {\n DB::table('posts')->insert([\n 'title' => $faker->text(40),\n 'content' => $faker->sentence(10),\n 'user_id' => $faker->numberBetween(1, 2)\n ]);\n }\n }", "title": "" }, { "docid": "3b2875053d0fe7dd172affc98ba741cd", "score": "0.7887019", "text": "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n\n\n DB::table('users')->insert([\n 'name' => 'Juste',\n 'email' => '[email protected]',\n 'password' => Hash::make('123'),\n ]);\n\n foreach (range(0, 10) as $_ ) {\n \n DB::table('posts')->insert([\n 'town' => $faker->city(),\n 'capacity' => 20,\n 'code' =>'P-'.rand(1,99),\n ]);\n }\n\n foreach (range(1, 50) as $_ ) {\n DB::table('parcels')->insert([\n 'weight' => mt_rand(111, 15999)/100,\n 'phone' => '+37069'.rand(100000, 999999),\n 'info' => $faker->text(400),\n 'post_id' => rand(1, 11)\n ]);\n }\n\n\n }", "title": "" }, { "docid": "b07e3ee3c4b1736184933db829b4a9bc", "score": "0.7874933", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n App\\Role::create([\n 'name' => 'Administrador',\n 'description' => 'no se'\n ]);\n\n App\\Role::create([\n 'name' => 'Edil',\n 'description' => 'no se'\n ]);\n\n App\\Role::create([\n 'name' => 'Ciudadano',\n 'description' => 'no se'\n ]);\n\n\n App\\Locality::create([\n 'name' => 'Puente Aranda',\n 'city_id' => 495,\n ]);\n\n\n App\\Entity::create([\n 'name' => 'Administracion del sistema',\n 'phone_contact' => '301301301',\n 'email' => '[email protected]',\n 'country_id' => 48\n ]);\n\n App\\Entity::create([\n 'name' => 'Entidad 1',\n 'phone_contact' => '301301301',\n 'email' => '[email protected]',\n 'country_id' => 48\n ]);\n\n App\\User::create([\n 'name' => 'Oscar',\n 'email' => '[email protected]',\n 'password' => bcrypt('oscar123'),\n 'last_name' => 'Amado',\n 'entity_id' => 1,\n 'rol_id' => 1,\n 'document' => '1022445546',\n ]);\n\n }", "title": "" }, { "docid": "385bfd731a375a2d4ef0c36d568c50e1", "score": "0.786952", "text": "public function run()\n {\n //Clears database\n DB::table('users')->delete();\n DB::table('settings')->delete();\n\n //Seeds database\n factory(User::class,\"admin\", 1)->create();\n factory(User::class, 10)->create();\n factory(Setting::class, 1)->create();\n }", "title": "" }, { "docid": "6e77cc4bd37ebe82a97b96bf3dec7bab", "score": "0.7860597", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n \tforeach (range(1,10) as $index) {\n\t DB::table('item')->insert([\n 'title' => $faker->name,\n 'description' => $faker->realText($maxNbChars = 200, $indexSize = 2),\n 'id_model' =>$faker->numberBetween(1,69),\n 'id_province' =>$faker->numberBetween(1,96),\n 'id_brand' =>$faker->numberBetween(1,79),\n 'id_user' =>$faker->numberBetween(1,7),\n\t 'created_at' => $faker->dateTimeBetween($startDate = '-1 months', $endDate = 'now'),\n 'status' => $faker->randomElement(array('New', 'Active', 'Inactive')),\n\t ]);\n }\n }", "title": "" }, { "docid": "10380f0624cacc8ec438ce737cd5a23c", "score": "0.785481", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n \\App\\Review::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 50; $i++) {\n \\App\\Review::create([\n 'user_id' => $faker->randomElement(\\App\\User::all()->pluck('id')->toArray()),\n 'restaurant_id' => $faker->randomElement(\\App\\Restaurant::all()->pluck('google_places_id')->toArray()),\n 'review_text' => $faker->paragraph,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "7b08efa0e8b289b221b37a9f42fcbab6", "score": "0.7840935", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(VideosTableSeeder::class);\n\n factory(App\\Models\\User::class, 5)->create()->each(function ($i) {\n $i->interests()\n ->saveMany(\n factory(App\\Models\\Interest::class, rand(1, 5))->make()\n );\n });\n }", "title": "" }, { "docid": "4d8a3e194e5213b07ba6e1f01065371a", "score": "0.78395134", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n User::create(array('first_name' => 'George','last_name' => 'Petrou', 'avatar' => 'default.jpg', 'email' => '[email protected]','password' => Hash::make('1234')));\n User::create(array('first_name' => 'Nick','last_name' => 'Jones', 'avatar' => 'default.jpg', 'email' => '[email protected]','password' => Hash::make('1235')));\n User::create(array('first_name' => 'Ryan','last_name' => 'Giggs', 'avatar' => 'default.jpg', 'email' => '[email protected]','password' => Hash::make('1236')));\n Roles::create(array('role' => 'admin','user_id' => 1));\n Roles::create(array('role' => 'user','user_id' => 2));\n Roles::create(array('role' => 'user','user_id' => 3));\n }", "title": "" }, { "docid": "bc912a8c1dddc8fa40444c9031b40718", "score": "0.78330994", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $users = [\n [\n 'name' => 'admin',\n 'email' => '[email protected]'\n ],\n [\n 'name' => 'jahed',\n 'email' => '[email protected]'\n ],\n [\n 'name' => 'hasan',\n 'email' => '[email protected]'\n ],\n [\n 'name' => 'jahedhasan',\n 'email' => '[email protected]'\n ],\n [\n 'name' => 'jh',\n 'email' => '[email protected]'\n ],\n \n [\n 'name' => 'jahedd',\n 'email' => '[email protected]'\n ],\n [\n 'name' => 'jb',\n 'email' => '[email protected]'\n ],\n ];\n foreach ($users as $user) {\n factory(User::class)->create([\n 'name' => $user['name'],\n 'email' => $user['email']\n ]);\n }\n factory(Note::class, 30)->create();\n }", "title": "" }, { "docid": "32f8a9675ac74c00bb4974c472281dba", "score": "0.7821223", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // Customer::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n Customer::create([\n 'full_name' =>$faker->name,\n 'cin' =>$faker->word,\n 'phone' => $faker->e164PhoneNumber ,\n 'email' =>$faker->Email, \n // 'user_id' =>$i+1, \n 'workspace_id' =>1, \n ]);\n }\n }", "title": "" }, { "docid": "7390b50b8fae46f7555e0eaf084fd3ef", "score": "0.7807736", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('users')->insert([\n // 'name' => str_random(10),\n // 'email' => str_random(10).'@gmail.com',\n // 'password' => bcrypt('secret'),\n // ]);\n for($count=1;$count<=3; $count++ ){\n\t DB::table('users')->insert([\n\t 'name' => 'admin'.$count,\n\t 'email' => 'admin'.$count.'@gmail.com',\n\t 'password' => bcrypt('admin'),\n\t 'admin'\t=>1,\n\t ]);\n }\n // DB::table('projects')->insert([\n // 'title' => str_random(10),\n // 'description' => str_random(100),\n // 'status' => 'open',\n // 'category' => 'Web',\n // ]); \n // DB::table('tasks')->insert([\n // 'title' => str_random(10),\n // 'description' => str_random(100),\n // 'status' => 'in progress',\n // 'category' => 'Front-End',\n // 'project_id'=>1\n // ]);\n // DB::table('task_user')->insert([\n // \t'task_id' => 1,\n // \t'user_id'\t=> 1,\n\n // \t]);\n }", "title": "" }, { "docid": "4d4c9c609f68448903976a4c7b76bb72", "score": "0.7806386", "text": "public function run() {\n $this->call(CountriesSeeder::class);\n $this->call(CastsTableSeeder::class);\n $this->call(MoviesSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'user_type' => 'ADMIN'\n ]);\n DB::table('ratings')->insert(\n [\n 'user_id' => 1,\n 'movie_id' => 1,\n 'rating_value' => 5\n ]\n );\n }", "title": "" }, { "docid": "39cab0ab1b75aec77c6b02db375756d1", "score": "0.7804264", "text": "public function run()\n {\n /*$this->call([\n //LanguageTableSeeder::class,\n UsersTableSeeder::class\n ]);*/\n\n //create dummy data for cashflow\n $faker = Faker::create();\n foreach (range(1,100) as $index) {\n\n DB::table('cashflow')->insert([\n 'name' => $faker->sentence(6, true),\n 'description' => $faker->text,\n 'flow_type' => $faker->randomElement(array ('1','2')),\n 'amount' => $faker->numberBetween(1000, 9000),\n 'created_at' => $faker->dateTimeThisYear('now', 'UTC') \n ]);\n }\n }", "title": "" }, { "docid": "249635981f4ce9205eb86a95422d00e1", "score": "0.780369", "text": "public function run()\n {\n $this->call(RoleSeeder::class);\n $this->call(PermissionSeeder::class);\n factory(Tag::class, 20)->create();\n Permission::where('slug', 'manage-users')->first()->roles()\n ->sync([\n Role::where('slug', 'administrator')->first()->id,\n ]);\n Permission::where('slug', 'manage-articles')->first()->roles()\n ->sync([\n Role::where('slug', 'administrator')->first()->id,\n Role::where('slug', 'editor')->first()->id,\n ]);\n $this->call(UserSeeder::class);\n factory(User::class, 2)->create()->each(function($user) {\n $user->articles()->saveMany(factory(Article::class, (int) rand(10, 20))->make());\n $user->news()->saveMany(factory(News::class, (int) rand(10, 20))->make());\n });\n $this->call(EntryTagTableSeeder::class);\n $this->call(CommentTableSeeder::class);\n }", "title": "" }, { "docid": "11218f98139c57a6846510c7c4c15a64", "score": "0.77917063", "text": "public function run()\n {\n $faker = FakerFactory::create();\n\n # php artisan migrate:refresh --seed\n $bob = new App\\User();\n $bob->name = \"Bob\";\n $bob->email = \"[email protected]\";\n $bob->password = bcrypt(\"123456\");\n $bob->save();\n\n $alice = new App\\User();\n $alice->name = \"Alice\";\n $alice->email = \"[email protected]\";\n $alice->password = bcrypt(\"123456\");\n $alice->save();\n\n for($i=0; $i<20; $i++) {\n $comment = new App\\Comment();\n $comment->comment = $faker->paragraph;\n $comment->post_id = rand(1, 10);\n $comment->user_id = rand(1, 2);\n $comment->save();\n }\n\n for($i=0; $i<10; $i++) {\n $post = new App\\Post();\n $post->title = $faker->sentence;\n $post->body = $faker->paragraph;\n $post->category_id = rand(1, 5);\n $post->save();\n }\n\n for($i=0; $i<5; $i++) {\n $category = new App\\Category();\n $category->name = ucwords( $faker->word );\n $category->save();\n }\n\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "0abeef674742d2ee575c2285b0a63e54", "score": "0.7787361", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n //seta = 0\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n //Cidades \n DB::table('cidades')->truncate();\n \tDB::table('cidades')->insert([\n \t\t// 'id' => \"1\",\n 'cidade_nome' => \"Cuiabá\",\n ]);\n \tDB::table('cidades')->insert([\n \t\t// 'id' => \"2\",\n 'cidade_nome' => \"Várzea Grande\",\n ]);\n\n\n //Planos \n DB::table('planos')->truncate();\n \tDB::table('planos')->insert([\n \t\t// 'id' => \"1\",\n 'plano_nome' => \"Silver\",\n 'plano_vantagens' => \"Para controle financeiro de quem trabalha sozinho\",\n ]);\n \tDB::table('planos')->insert([\n \t\t// 'id' => \"2\",\n 'plano_nome' => \"Gold\",\n 'plano_vantagens' => \"Melhor opção para quem quer crescer e receber mais rápido.\", \n ]);\n \tDB::table('planos')->insert([\n \t\t// 'id' => \"2\",\n 'plano_nome' => \"Platium\",\n 'plano_vantagens' => \"Mais notas e boletos para sua empresa.\",\n ]);\n\n\n }", "title": "" }, { "docid": "e1d4f0e4e0b4cd624b555f00f69d8386", "score": "0.77770865", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n //----DATOS REALES DE PRUEBA---------\n $this->call(CitySeeder::class);\n $this->call(SucursaleSeeder::class);\n $this->call(StateSeeder::class);\n $this->call(CategorySeeder::class);\n $this->call(RoleSeeder::class);\n\n //-----DATOS FALSOS DE PRUEBA--------\n //User::factory(10)->create();\n Product::factory(5)->create();\n Group::factory(5)->create();\n Modifier::factory(20)->create();\n //Sale::factory(20)->create();\n }", "title": "" }, { "docid": "5636dd7cb3d474c1bf2462b273b361ff", "score": "0.7776088", "text": "public function run()\n {\n\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n DB::table('users')->truncate();\n DB::table('categories')->truncate();\n\n\n //seeding the data\n\n User::factory()->count(1)->create();\n\n Category::factory()->count(10)->create()->each(function($category){\n $category->products()->saveMany(Product::factory(Product::class)->count(5)->create());\n });\n\n // \\App\\Models\\User::factory(10)->create();\n }", "title": "" }, { "docid": "a8dfa675e6ffec96b1dd6192fd68b3a2", "score": "0.77732474", "text": "public function run()\n {\n \t// Crear Seeder\n \t// php artisan make:seeder MiniSkillsTableSeeder\n\n \t// Ejecutar\n \t//php artisan db:seed --class=MiniSkillsTableSeeder\n \t//\n \t/*\n \tDB::table('mini_skills')->insert([\n\t 'title' => 'SEO',\n\t 'progress' => 100, \n\t 'status' => 1,\n\t 'created_at' => now(),\n\t 'updated_at' => now()\n ]);\n */\n \n \n\n \tMiniSkill::create([\n\t 'title' => 'SEO',\n\t 'progress' => 100, \n\t 'status' => 1\n ]);\n }", "title": "" }, { "docid": "e09eb1651561e63be4b2b1e9c41c333c", "score": "0.77729875", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\Admin', 1)->create();\n factory('App\\Membre', 10)->create();\n factory('App\\Psychologue', 10)->create();\n factory('App\\Blog', 10)->create();\n factory('App\\Statut', 10)->create();\n factory('App\\Discussion', 10)->create();\n }", "title": "" }, { "docid": "fc4ebf94d0a8bf8e90abe65163ca460c", "score": "0.77711946", "text": "public function run()\n {\n $this->call(UsersSeeder::class);\n // factory(App\\User::class, 5)->create()->each(function ($u) {\n // \t$u->laporan()->saveMany(factory(App\\Laporan::class, 5)->make());\n // });\n // factory(App\\Dospem::class, 2)->create();\n // factory(App\\Pemlap::class, 2)->create();\n // factory(App\\Instansi::class, 2)->create();\n }", "title": "" }, { "docid": "afcd93274839927545e6c2a6489c97b4", "score": "0.7769354", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $faker=Faker::create();\n foreach (range(1,100) as $index) {\n DB::table('posts')->insert([\n 'title'=>$faker->text(30),\n 'body'=>$faker->text(300)\n ]);\n }\n }", "title": "" }, { "docid": "b9f891c56a6dcdf4ec65f847082d6389", "score": "0.77666545", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1, 5) as $index) {\n DB::table('articles')->insert(\n [\n 'name' => $faker->unique()->word,\n 'user_id' => 1,\n 'title' => $faker->words(3, true),\n 'text' => $faker->text(1000),\n 'rank' => $faker->randomNumber(),\n 'enabled' => $faker->boolean(true),\n 'created_at' => $faker->date(),\n 'updated_at' => $faker->date(),\n ]\n );\n }\n }", "title": "" }, { "docid": "f908dcf673136d275768a26e1ed8f43d", "score": "0.77663046", "text": "public function run()\n {\n /*\n // Seed with a database querry.\n DB::table('users')->insert([\n 'name' => Person::firstNameMale(),\n 'email' => str_random(10) . '@' . str_random(5) . '.com',\n 'password' => bcrypt('secret'),\n 'date_birth' => DateTime::unixTime(),\n 'telephone' => PhoneNumber::phoneNumber(),\n 'address' => Address::streetSuffix() . $this->delimiter . Address::buildingNumber() . $this->address_delimiter .\n Address::postcode() . $this->delimiter . Address::citySuffix() . $this->address_delimiter .\n Address::country(),\n 'nationality' => Miscellaneous::countryCode(),\n 'work_permit' => str_random(1),\n 'driver_permit' => 'yes',\n ]);\n */\n\n //Seeding with a factory.\n // No relationships are made.\n factory(App\\User::class,5)->create();\n /*\n // Seed and attach relationships to each user;\n factory(App\\User::class,5)->create()->each(function($u){\n $u->templates()->save(factory(App\\Template::class)->make());\n // Cannot continue as the foreign key integrities are not respected afterwards.\n $u->cvs()->save(factory(App\\Cv::class)->make());\n $u->sections()->save(factory(App\\Section::class)->make());\n $u->skills()->save(factory(App\\Skill::class)->make());\n $u->hobbies()->save(factory(App\\Hobby::class)->make());\n $u->jobs()->save(factory(App\\Work::class)->make());\n $u->languages()->save(factory(App\\Language::class)->make());\n $u->educations()->save(factory(App\\Education::class)->make());\n });\n */\n }", "title": "" }, { "docid": "40ca19c7f708ecdfdcd4af8c02d83f2f", "score": "0.7763938", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(AdminTableSeeder::class);\n // factory(App\\Admin::class, 50)->create();]\n factory(App\\Model\\Artist::class, 15)->create();\n factory(App\\Model\\Category::class, 20)->create();\n factory(App\\Model\\Album::class, 20)->create();\n factory(App\\Model\\Song::class, 50)->create();\n }", "title": "" }, { "docid": "78fa4e7ae6998de91422744dcdef4f25", "score": "0.77621245", "text": "public function run()\n { \n \n /* factory(App\\Resource::class, 10000)->create();\n factory(App\\Work::class, 50)->create();\n factory(App\\Cost::class, 500)->create();\n factory(App\\Refwork::class, 50)->create();\n factory(App\\Refresource::class, 200)->create(); */\n\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n \n }", "title": "" }, { "docid": "480eecd886ef3ee8fb2edf36add7a6e6", "score": "0.7761234", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(RolesTableSeeder::class);\n $this->call(RoleUserTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n// factory('App\\User', 15)->create();\n factory('App\\Article', 6)->create();\n $this->call(ArticlesTableSeeder::class);\n $this->call(ArticleCategoryTableSeeder::class);\n\n }", "title": "" }, { "docid": "43e31086667a15be4100b3788e32525a", "score": "0.77569884", "text": "public function run()\n {\n $faker = Faker::create('id_ID');\n DB::table('users')->insert([\n [\"role_id\" => 1, \"name\" => 'Admin 1', \"email\" => \"[email protected]\", \"password\" => Hash::make(\"admin12345\")],\n [\"role_id\" => 1, \"name\" => 'Admin 2', \"email\" => \"[email protected]\", \"password\" => Hash::make(\"admin12345\")],\n [\"role_id\" => 2, \"name\" => 'John Doe', \"email\" => \"[email protected]\", \"password\" => Hash::make(\"john12345\")],\n [\"role_id\" => 2, \"name\" => 'Ji Eun', \"email\" => \"[email protected]\", \"password\" => Hash::make(\"jieun12345\")],\n ]);\n }", "title": "" }, { "docid": "c5a55e8cf6dced6dcea94dbb4eb4d4fe", "score": "0.7746075", "text": "public function run()\n {\n $this->seed('EntryTypesTableSeeder');\n\t\t$this->seed('TaxonomyTableSeeder');\n\t\t$this->seed('RolesTableSeeder');\n\t\t$this->seed('SettingsTableSeeder');\n\t\t$this->seed('PagesTableSeeder');\n\t\t$this->seed('MenuTableSeeder');\n }", "title": "" }, { "docid": "84eb153850f1545b5a2f9529a74ca3bb", "score": "0.774333", "text": "public function run()\n {\n Author::factory(10)->create();\n Book::factory(10)->create();\n Relation::factory(10)->create();\n $this->call([\n UserSeeder::class,\n RelationSeeder::class\n ]);\n }", "title": "" }, { "docid": "1159542e19a2f9f8712ba8239cdba0c8", "score": "0.7737675", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Category::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n $categories = [\n 'Acheter et vendre','Autos et véhicules','Immobilier','Services','Animaux','Locations de vacances','Communauté'\n ];\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 7; $i++) {\n Category::create([\n 'name' => $categories[$i]\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n }", "title": "" }, { "docid": "d2d80f7d460efe018a3f140847e1a279", "score": "0.7736776", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // Dejar nulo las claves foraneas\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n DB::table('category_product')->truncate();\n\n //Me ayudara para que los eventos al comienzo no se activen\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $catidadUsuarios = 200;\n $cantidadCategorias = 30;\n $cantidadProductos = 500;\n $cantidadTransacciones = 1000;\n\n factory(User::class,$catidadUsuarios)->create();\n factory(Category::class,$cantidadCategorias)->create();\n\n factory(Product::class,$cantidadProductos)->create()->each(\n function($producto){\n //random (colleccion)\n $categorias=Category::all()->random(mt_rand(1,5))->pluck('id');\n $producto->categories()->attach($categorias);\n }\n );\n\n factory(Transaction::class, $cantidadTransacciones)->create();\n }", "title": "" }, { "docid": "b71b6c9d43290ee575ba0a2222937224", "score": "0.7735867", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n \n $data = [];\n\n $users=App\\User::pluck('id')->toArray();//permet de retourner les id de la table et les stock dans une table\n \n for ($i = 1; $i <= 100 ; $i++) {\n array_push($data, [\n 'name'=>$faker->sentence,\n 'body'=>$faker->realText(2000) ,\n 'user_id'=>$faker->randomElement($users),\n 'published_at'=>$faker->datetime(),\n\n ]);\n }\n Article::insert($data);\n }", "title": "" }, { "docid": "9d2e1f29bfaf34564e90f02a58e8ad3b", "score": "0.77346915", "text": "public function run()\n {\n \t\n \tDB::table('profissao')->insert([\n 'descricao' => 'Professor'\n ]);\n\n DB::table('profissao')->insert([\n 'descricao' => 'Aluno'\n ]);\n\n DB::table('profissao')->insert([\n 'descricao' => 'Engenheiro'\n ]);\n\n DB::table('profissao')->insert([\n 'descricao' => 'Agricultor'\n ]);\n\n DB::table('profissao')->insert([\n 'descricao' => 'Outro'\n ]);\n\n\n DB::table('perfil')->insert([\n 'descricao' => 'Administrador'\n ]);\n\n DB::table('perfil')->insert([\n 'descricao' => 'Registrador'\n ]);\n \n $this->call(ModelosTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(PluviometrosSeeder::class); \n }", "title": "" }, { "docid": "de46177ac0fa0a295c6ae2ab0fba4901", "score": "0.7733467", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(Course::class, 10)->create()->each(function($course){\n $course->episodes()->saveMany(factory(Episode::class,10)->make());\n });\n }", "title": "" }, { "docid": "5c50c6331a8da5e7c37b7e78f795a900", "score": "0.7731594", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n User::create([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => '123123'\n ]);\n\n Security::create(['code' => 'helloworld']);\n Security::create(['code' => 'welcomehere']);\n }", "title": "" }, { "docid": "5594e3238793cf289d046986c5f56d58", "score": "0.77295095", "text": "public function run() {\n // \\App\\Models\\User::factory(10)->create();\n// $this->call(ArticlesTableSeeder::class);\n// $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n // Let's make sure everyone has the same password and\n // let's hash it before the loop, or else our seeder\n // will be too slow.\n $password = Hash::make('netireki');\n\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => $password,\n ]);\n\n // And now let's generate a few dozen users for our app:\n for ($i = 0; $i < 10; $i++) {\n User::create([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => $password,\n ]);\n }\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'title' => $faker->sentence,\n 'body' => $faker->paragraph,\n ]);\n }\n }", "title": "" }, { "docid": "b330d291de9fbd392f253311a96f3c6d", "score": "0.7729395", "text": "public function run()\n {\n // \\App\\Models\\User::factory(1)->create();\n // \\App\\Models\\Article::factory(5)->create();\n // \\App\\Models\\Category::factory(5)->create();\n // \\App\\Models\\Topic::factory(5)->create();\n // \\App\\Models\\Tag::factory(5)->create();\n // $this->call(ArticleCategorySeeder::class);\n // $this->call(ArticleTopicSeeder::class);\n $this->call(RegionSeeder::class);\n }", "title": "" }, { "docid": "bad0c06d6cc426f60d248d0caa0771bb", "score": "0.77290624", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call(AssessmentSeeder::class);\n DB::table('users')->insert([\n\n [\n 'name' => 'Admin 1',\n 'email' => '[email protected]',\n 'password' => bcrypt('test1234'),\n ],\n [\n 'name' => 'Admin 2',\n 'email' => '[email protected]',\n 'password' => bcrypt('test1234'),\n ],\n [\n 'name' => 'Admin 3',\n 'email' => '[email protected]',\n 'password' => bcrypt('test1234'),\n ]\n\n ]);\n }", "title": "" }, { "docid": "2e159f4e54504bdde9f62ecdf35810ee", "score": "0.772654", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\User',50)->create();\n factory('App\\Post',50)->create();\n factory('App\\Profile',50)->create();\n factory('App\\Category',3)->create();\n \n $posts = factory(App\\Post::class)->create();\n\n factory(Comment::class, 30)->create([\n 'post_id' => $posts->id\n ]);\n\n $comment = Comment::first();\n\n factory(Comment::class, 20)->create([\n 'post_id' => $posts->id,\n 'comment_id' => $comment->id,\n ]);\n\n }", "title": "" }, { "docid": "bad3760d584e717874b4137c76409e6b", "score": "0.7724795", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n DB::table('roles')->insert([\n 'name' => 'SUPERUSER',\n ]);\n\n DB::table('contractors')->insert([\n 'name' => 'MY ENTERPRISE',\n ]);\n\n DB::table('projects')->insert([\n 'name' => 'PROJECT EXAMPLE',\n 'datestart' => now()->format('Y-m-d H:i:s'),\n 'dateFinish' => now()->format('Y-m-d H:i:s'),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'SUPERUSER',\n 'user' => 'superuser',\n 'email' => '[email protected]',\n 'password' => Hash::make('IdonSoft'),\n 'role_id' => '1',\n 'contractor_id' => '1',\n ]);\n\n DB::table('permits')->insert([\n 'user_id' => '1',\n 'create_folio' => '1',\n 'create_dailyreport' => '1',\n 'create_note' => '1',\n 'create_comment' => '1',\n 'print_dailyreport' => '1',\n 'print_note' => '1',\n 'print_folio' => '1',\n 'edit_sequence' => '1',\n ]);\n \n }", "title": "" }, { "docid": "d6c8622705e47deae5dda1c458f83e8a", "score": "0.7724516", "text": "public function run()\n {\n DB::table('dias')->insert([\n // Para que los tres tipos de roles puedan darse,\n // Poner php artisan migrate:fresh --seed para hacer la migración del seed\n // primero php artisan db:seed --class=RolesTableSeeder\n // y luego php artisan db:seed --class=UsersTableSeeder\n // finalmente php artisan db:seed --class=DiasTableSeeder\n [\n 'nombre' => 'Lunes'\n ],\n [\n 'nombre' => 'Martes'\n ],\n [\n 'nombre' => 'Miercoles'\n ],\n [\n 'nombre' => 'Jueves'\n ],\n [\n 'nombre' => 'Viernes'\n ],\n [\n 'nombre' => 'Sabado'\n ],\n [\n 'nombre' => 'Domingo'\n ]\n ]);\n }", "title": "" }, { "docid": "7c1039e8faa671c62b7faf41b7d53536", "score": "0.77197814", "text": "public function run()\n {\n Model::unguard();\n Category::where('id', '<=', '5')->delete();\n $data = [\n ['name' => '汽车'],\n ['name' => '游戏'],\n ['name' => '影视'],\n ['name' => '社会'],\n ['name' => '政治'],\n ];\n foreach ($data as $d) {\n Category::create($d);\n }\n factory(Content::class, 1000)->create();\n // $this->call(\"OthersTableSeeder\");\n }", "title": "" }, { "docid": "bbdcb34cad1d7381d781f85b5830c22f", "score": "0.77192366", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n// $this->depeartmntTableSeed();\n// $this->designationTableSeed();\n /**\n * Run the database seeds.\n *\n * @return void\n */\n\n }", "title": "" }, { "docid": "7d13b7cccd5ea1d589bdc8b1ce81b63f", "score": "0.7715028", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // factory(App\\User::class)->create();\n\n // factory(Student::class,50)->create()->each(function($student)\n // {\n // $student->educationalQualification()->save(factory(Parents::class)->make());\n // $student->educationalQualification()->save(factory(Payment::class)->make());\n // $student->educationalQualification()->save(factory(Guardian::class)->make());\n // $student->educationalQualification()->save(factory(EQ::class)->make());\n // });\n }", "title": "" }, { "docid": "b84407b90ecd0da0f136c70b54b6b0f0", "score": "0.7710997", "text": "public function run()\n {\n /// Let's truncate our existing records to start from scratch.\n Category::truncate();\n\n $faker = \\Faker\\Factory::create();\n $category_names = array('Category One', 'Category Two');\n foreach($category_names as $name) {\n Category::create([\n 'name' => $name,\n 'price_mod' => $faker->randomFloat($nbMaxDecimals = 2, $min = -2, $max = 10.0),\n ]);\n }\n }", "title": "" }, { "docid": "1506f1139a748a04763396e2ad86ef7a", "score": "0.7710608", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n factory(Category::class,10)->create();\n factory(ProductType::class,20)->create();\n // factory(Product::class,150)->create();\n $this->call(ProductSeeder::class);\n\n }", "title": "" }, { "docid": "510b6a95b0bda8150598fcfcd5e0fa41", "score": "0.77091455", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n \n \\App\\User::truncate();\n \\App\\Category::truncate();\n \\App\\Product::truncate();\n \\App\\Transaction::truncate();\n\n \\App\\User::flushEventListeners();\n \\App\\Category::flushEventListeners();\n \\App\\Product::flushEventListeners();\n \\App\\Transaction::flushEventListeners();\n\n factory(\\App\\User::class,100)->create();\n factory(\\App\\Category::class,10)->create();\n factory(\\App\\Product::class,30)->create()->each(\n function ($product) {\n $categories = \\App\\Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n }\n );\n factory(\\App\\Transaction::class,10)->create();\n\n }", "title": "" }, { "docid": "2f62f5093b8e26beb38831e5bdf29130", "score": "0.7708483", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1,10) as $index) {\n DB::table('employees')->insert([\n 'id' => $index,\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => Hash::make('12345678')\n ]);\n }\n $this->call(UserSeeder::class);\n }", "title": "" }, { "docid": "c31a689ff9ae8523f84c6d76cbc5c3ea", "score": "0.7707085", "text": "public function run()\n {\n $user = [\n 'name' => 'Heru Trijaya',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt(\"password\"),\n 'remember_token' => Str::random(10),\n 'created_at' => now(),\n ];\n DB::table('users')->insert($user);\n $user = [\n 'name' => 'John Doe',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt(\"password\"),\n 'remember_token' => Str::random(10),\n 'created_at' => now(),\n ];\n DB::table('users')->insert($user);\n \\App\\Models\\Author::factory(10)->create();\n \\App\\Models\\Book::factory(10)->create();\n }", "title": "" }, { "docid": "5b9bc9e211e20662e2eb7209dd7f3c70", "score": "0.7703563", "text": "public function run()\n {\n Student::factory(10)->create();\n Post::factory(10)->create();\n Category::factory(10)->create();\n Category_Post::factory(10)->create();\n Comment::factory(10)->create();\n // $this->call([\n // TableFirst::class,\n // SubjectTableSeeder::class,\n // ThuanSeeder::class,\n // ]);\n }", "title": "" }, { "docid": "134a3a3db82b46df656b48877e3819ce", "score": "0.77008", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n // Seed the Time Zones\n //$this->call(TimeZonesTableSeeder::class);\n\n // Seed the Languages\n $this->call(LanguagesTableSeeder::class);\n\n // Seed the countries\n $this->call(CountriesTableSeeder::class);\n\n // Seed the setting table\n $this->call(SettingsTableSeeder::class);\n\n // Seed the company & company translation\n //$this->call(CompanySeeder::class);\n\n // Seed Brand table\n //$this->call(BrandSeeder::class);\n\n // Seed Vehicle table\n //$this->call(VehicleSeeder::class);\n\n // Seed dealership group table\n //$this->call(GroupSeeder::class);\n\n // Seed Dealership table\n //$this->call(DealershipSeeder::class);\n\n // Seed Event type table\n //$this->call(EventTypeSeeder::class);\n\n // Seed Event table\n //$this->call(EventSeeder::class);\n\n // Seed Region table\n //$this->call(RegionSeeder::class);\n\n // Seed Brand Dealership table\n //$this->call(BrandDealershipSeeder::class);\n\n\n // Seed User table\n $this->call(UserSeeder::class);\n\n // Seed Guest table\n// $this->call(GuestSeeder::class);\n }", "title": "" }, { "docid": "c9cd9baaee4f0804b80ef0f6ae5ccbb6", "score": "0.7700753", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n User::create([\n 'email' => '[email protected]',\n 'name' => 'Ceci',\n 'password' => bcrypt('123456'),\n 'role' => 'U'\n ]);\n User::create([\n 'email' => '[email protected]',\n 'name' => 'Emmanuel',\n 'password' => bcrypt('123456'),\n 'role' => 'U'\n ]);\n User::create([\n 'email' => '[email protected]',\n 'name' => 'Fabián Montero',\n 'password' => bcrypt('123456'),\n 'role' => 'A'\n ]);\n User::create([\n 'email' => '[email protected]',\n 'name' => 'Santiago Montero',\n 'password' => bcrypt('123456'),\n 'role' => 'U'\n ]);\n }", "title": "" }, { "docid": "cf80c34d1b3a3ce834cad902d96a49ae", "score": "0.7695887", "text": "public function run()\n {\n \\App\\Models\\User::factory(10)->create();\n $this->call(DicRegionsTableSeeder::class);\n $this->call(DicCitiesTableSeeder::class);\n $this->call(AdCategoriesTableSeeder::class);\n Adverts::factory()->count(100)->create();\n }", "title": "" }, { "docid": "8d26d80f703923cebce1f22a4b67618a", "score": "0.76952183", "text": "public function run()\n {\n\n //Make roles and permissions\n\t Role::create(['name' => 'user']); // normal register user\n\t Role::create(['name' => 'owner']); // owner club user\n\t Role::create(['name' => 'manager']); // portal manager\n\t Role::create(['name' => 'admin']); // admin with full permission\n\n //Start other seeders.\n $this->call([\n MusicTypesTableSeeder::class,\n\t VoivodeshipsTableSeeder::class,\n\t CitiesTableSeeder::class,\n UsersTableSeeder::class,\n\t ClubsTableSeeder::class,\n\t EventsTableSeeder::class,\n\t UserSettingsSeeder::class\n ]);\n\n }", "title": "" }, { "docid": "d95416047e958fc5cae8011cf9c8b698", "score": "0.7695155", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker\\Factory::create();\n for ($i=0; $i < 20; $i++) { \n \tPost::create([\n \t\t'title'=> $faker->sentence,\n \t\t'body'=> implode('',$faker->sentences(4))\n \t\t]);\n }\n }", "title": "" }, { "docid": "58e1005fcab19ab4f45f7567ad4fbe32", "score": "0.76921916", "text": "public function run()\n {\n //factory(App\\Category::class, 5)->create();\n $this->call(PageSeeder::class);\n $this->call(TagSeeder::class);\n $this->call([\n CategorySeeder::class,\n ProductCategorySeeder::class,\n ProductTagSeeder::class,\n RelationshipSeeder::class,\n \n ]);\n factory(App\\Comment::class, 200)->create();\n factory(App\\User::class, 25)->create();\n //factory(App\\ProductCategory::class,5)->create();\n factory('App\\Post',50)->create();\n factory('App\\Product',80)->create();\n }", "title": "" }, { "docid": "07d21e2f0b22563e12932cf198047658", "score": "0.7690095", "text": "public function run()\n {\n $faker = Faker::create();\n $products = c2a(Product::lists('id'));\n $users = c2a(User::lists('id'));\n\n foreach (range(1, 20) as $index) {\n Topic::create([\n 'title' => $faker->sentence(6),\n 'slug' => $faker->name,\n 'product_id' => $faker->randomElement($products),\n 'user_id' => $faker->randomElement($users),\n 'keywords' => $faker->sentence,\n 'description' => $faker->sentence(10),\n 'content' => $faker->sentence(100),\n 'page_view_count' => rand(10, 3059),\n 'vote_count' => rand(0, 199),\n 'reply_count' => rand(0, 100)\n ]);\n }\n\n }", "title": "" }, { "docid": "454fbceec11c7288d6d51c17b75dacd8", "score": "0.7688257", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(\\App\\User::class, 1)->create([\n 'email' => '[email protected]',\n 'role' => \\App\\User::ROLE_ADMIN\n ]);\n\n factory(\\App\\User::class, 1)-> create([\n 'email' => '[email protected]'\n ]);\n\n $this->call(PostTableSeeder::class);\n $this->call(TbSinproAdminPermissaoSeeder::class);\n// factory(\\App\\Post::class, 20)->create();\n\n }", "title": "" }, { "docid": "201732e6ba9e0b6eef969d5379841fde", "score": "0.7688141", "text": "public function run()\n {\n //factory(\\App\\Models\\User::class, 10)->create();\n\n $users = \\App\\Models\\Role::all()->pluck('id')->toArray();\n\n /**\n * Creating seeder for every role\n */\n for ($i = 1; $i < (sizeof($users)); $i++) {\n DB::table('users')->insert([\n\n 'name' => 'Janko',\n 'email' => 'janko' . $i . '@gmail.com',\n 'surname' => 'Mrkvicka',\n 'password' => bcrypt('test123'),\n 'email_verified_at' => now(),\n 'id_role' => $users[$i - 1],\n 'created_at' => now(),]);\n }\n\n }", "title": "" }, { "docid": "d0ebc0b2fe28ccfde9a1ac80f9ebf4ad", "score": "0.768708", "text": "public function run()\n {\n $this->call(UserTableSeeder::class);\n // $this->call(MissionTableSeeder::class);\n factory(App\\Models\\Mission::class, 20)->create();\n factory(App\\Models\\Project::class, 20)->create();\n factory(App\\Models\\News::class, 20)->create();\n factory(App\\Models\\Event::class, 20)->create();\n }", "title": "" }, { "docid": "2603f00e40c258c840226bb9122a174d", "score": "0.76867145", "text": "public function run() {\n $this->call(AppConfigSeeder::class);\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n $this->call(TopicTableSeeder::class);\n $this->call(BankTableSeeder::class);\n $this->call(ProvinceTableSeeder::class);\n\n // factory(App\\Product::class, 100)\n // ->create()\n // ->each(function ($product) {\n // $product->fees()->saveMany(factory(App\\ProductFee::class, 3)->create([\n // 'product_id' => $product->id,\n // ]));\n // });\n }", "title": "" }, { "docid": "0e51afc722eeda1b1ce5a397b6fed9ba", "score": "0.76860857", "text": "public function run()\n {\n \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\ItemCondition::factory(10)->create();\n\n $this->call([\n PrimaryCategorySeeder::class,\n SecondaryCategorySeeder::class,\n // ItemConditionSeeder::class,\n ]);\n\n DB::table('users')->insert([\n 'name' => 'root',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'remember_token' => Str::random(10),\n 'password' => Hash::make('11111111'),\n ]);\n }", "title": "" }, { "docid": "869949cd0ca1c0b3e62d490a128b7a0b", "score": "0.76857895", "text": "public function run()\n {\n $this->call(ReputationsTableSeeder::class);\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(PublishersTableSeeder::class);\n $this->call(AuthorsTableSeeder::class);\n $this->call(TagsTableSeeder::class);\n $this->call(BooksTableSeeder::class);\n // $this->call(UserImagesTableSeeder::class);\n // $this->call(BookImagesTableSeeder::class);\n // $this->call(AuthorImagesTableSeeder::class);\n // $this->call(ScoresTableSeeder::class);\n\n $this->call(AuthorBookTableSeeder::class);\n $this->call(BookTagTableSeeder::class);\n // $this->call(RoleUserTablerSeeder::class);\n\n // factory(App\\User::class, 35)->create();\n\n // factory(App\\Score::class, 100)->create();\n\n factory(App\\Review::class, 35)->create();\n\n // factory(App\\ReviewResponse::class, 35)->create();\n\n $this->call(SocialMediasTableSeeder::class);\n }", "title": "" }, { "docid": "989db8f23e2aa4fc9b9956c2987e7b19", "score": "0.7683379", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create('en_GB');\n\n \\App\\User::create([\n 'name' => env('ADMIN_NAME', ''),\n 'email' => env('ADMIN_EMAIL', ''),\n 'email_verified_at' => now(),\n 'password' => bcrypt(env('ADMIN_PASSWORD', '')),\n 'role' => 'admin',\n 'created_at' => now(),\n ]);\n\n // Added seed of random UK address data for ease\n for ($i = 0; $i < 10; $i++) \n {\n \\App\\Restaurant::create([\n 'name' => $faker->name,\n 'street' => $faker->streetName,\n 'city' => $faker->city,\n 'postcode' => $faker->postcode\n ]);\n }\n }", "title": "" }, { "docid": "ec07eb0122812cf17ee5e1ceaae51aeb", "score": "0.7680502", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\n factory(Subscriber::class, 2)->create();\n factory(Shop::class, 10)->create();\n factory(Music::class, 10)->create();\n factory(Video::class, 2)->create();\n\n }", "title": "" }, { "docid": "51a1f86bae6860c0a7c4877c0fefde5c", "score": "0.76785475", "text": "public function run()\n {\n User::create([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('password')\n ]);\n User::create([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => bcrypt('password')\n ]);\n\n Companies::create([\n 'name' => 'Mark Zuckenberg',\n 'email' => '[email protected]',\n 'website' => 'https://www.facebook.com/'\n ]);\n\n Companies::create([\n 'name' => 'Kevin Systrom',\n 'email' => '[email protected]',\n 'website' => 'https://www.instagram.com/'\n ]);\n\n // Companies::factory(5)->create();\n\n Employees::factory(20)->create();\n }", "title": "" }, { "docid": "68c5a5f69b2f6ff14c735017c7d3ac07", "score": "0.76763934", "text": "public function run()\n {\n $this->call([\n ItemSeeder::class,\n PropertySeeder::class,\n ItemPropertiesSeeder::class,\n\n ]);\n /*\n \\App\\Models\\Item::factory(10)->create();\n \\App\\Models\\Property::factory(10)->create();\n \\App\\Models\\ItemProperties::factory(10)->create();\n */\n \\App\\Models\\User::create([\n 'name' => 'simple',\n 'email' => '[email protected]',\n 'password' =>Hash::make('simple'),\n ]);\n \n\n\n }", "title": "" }, { "docid": "040547254a75eaa4c796f44c64dd6435", "score": "0.76726955", "text": "public function run()\n {\n $user_ids = ['1','2','3','4','5'];\n\n\t\t$faker = app(Faker\\Generator::class);\n\n $posts = factory(Post::class)->times(50)->make()->each(function ($post) use ($faker, $user_ids) {\n $post->user_id = $faker->randomElement($user_ids);\n });\n\n Post::insert($posts->toArray());\n }", "title": "" }, { "docid": "bd269fc9c6211e950f76f57cd2214618", "score": "0.76678604", "text": "public function run()\n {\n\n $data = [\n ['name'=>'Computer Science'],\n ['name'=>'Pharmacy'],\n ['name'=>'Psychology'],\n ['name'=>'Medicine'],\n ['name'=>'Dentistry'],\n\n ];\n $faker = Faker::create();\n foreach($data as $d){\n DB::table('faculties')->insert([\n 'name' => $d['name'],\n 'description' => $faker->sentence,\n ]);\n }\n }", "title": "" }, { "docid": "b8157e614e83d25d500f4d94dffc10e8", "score": "0.76667905", "text": "public function run()\n {\n m_dosens::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n m_dosens::create([\n 'body' => $faker-> paragraph,\n 'id'=> $faker -> rand(),\n 'nama_dosen'=> $faker -> sentence,\n 'matkul'=> $faker -> sentence,\n 'ruang kelas' => $faker -> sentence,\n $table->timestamps(),\n ]);\n }\n }", "title": "" }, { "docid": "f3ec341e6252123b6f3f5aacac2d5793", "score": "0.7664834", "text": "public function run()\n {\n \\App\\Models\\Address::factory(20)->create(); // php artisan db:seed --class=AddressSeeder\n \\App\\Models\\User::factory(15)->create(); // php artisan db:seed --class=UserSeeder\n \\App\\Models\\Admin::factory(4)->create(); // php artisan db:seed --class=AdminSeeder\n \\App\\Models\\Client::factory(16)->create(); // php artisan db:seed --class=ClientSeeder\n \\App\\Models\\Unit::factory(5)->create(); // php artisan db:seed --class=UnitSeeder\n \\App\\Models\\Category::factory(13)->create(); // php artisan db:seed --class=CategorySeeder\n \\App\\Models\\Market::factory(20)->create(); // php artisan db:seed --class=MarketSeeder\n \\App\\Models\\Product::factory(30)->create(); // php artisan db:seed --class=ProductSeeder\n // \\App\\Models\\Rating::factory(10)->create(); // php artisan db:seed --class=RatingSeeder\n // \\App\\Models\\Price::factory(30)->create(50); // php artisan db:seed --class=PriceSeeder\n }", "title": "" }, { "docid": "e6df187fdede5a2fd76c7dced952e9f5", "score": "0.76642543", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'username' => 'Admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('Admin')\n ]);\n Author::factory(30)->create()->each(function($author){\n $volumes = Volum::factory(10)->make();\n $author->volums()->saveMany($volumes);\n });\n\n }", "title": "" }, { "docid": "c184051466e0849a143a12cd08517914", "score": "0.76604694", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n // DB::table('socios')->insert(['nombre'=>'pepe','dni'=>'12345678','direccion'=>'por ahi 222','nacimiento'=>'2020-10-10','email'=>'[email protected]','telefono'=>'456798456','url'=>'www.google.com']);\n // DB::table('socios')->insert(['nombre'=>'juan','dni'=>'12332378','direccion'=>'por allk 222','nacimiento'=>'2010-10-10','email'=>'[email protected]','telefono'=>'223242434','url'=>'www.google1.com']);\n \\App\\Models\\Estado::factory(3)->create();\n \\App\\Models\\Socios::factory(10)->create();\n //$this->call(SociosSeeder::class);\n }", "title": "" }, { "docid": "ffe63233202bdd209cfbffd2e2f07ebd", "score": "0.7660093", "text": "public function run()\n {\n Author::factory(50)->create();\n Books::factory(100)->create();\n $this->call(UserTableSeeder::class);\n $this->call(ShelveTableSeeder::class);\n $this->call(ShelveBookSeeder::class);\n }", "title": "" }, { "docid": "bb85cd62424281e6a7862cad3a9b9b5a", "score": "0.7659672", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'luoyinghao',\n 'email' => '[email protected]',\n 'group_id' => 1,\n 'status' => 1,\n 'password' => bcrypt('123456'),\n ]);\n\n DB::table('pet')->insert([\n 'name' => 'default',\n 'nick' => '弹幕娘',\n 'user_id' => 1,\n ]);\n\n DB::table('user_pet')->insert([\n 'user_id' => 1,\n 'pet_id' => 1,\n 'exp' => 1,\n ]);\n\n DB::table('event')->insert([\n 'sender' => '系统',\n 'sender_id' => 0,\n 'action' => 7,\n 'target' => 0,\n 'target_type' => 'announce',\n 'content' => '这是通告,通告听到了吗?听到了请回答,听到了请回答',\n 'type' => 'remind',\n 'receiver' => 0,\n 'is_read' => 1,\n 'time' => date('Y-m-d H:i:s')\n ]);\n\n }", "title": "" }, { "docid": "d200dedc6a0dba3a8fcc4d5cb3b5af61", "score": "0.7659325", "text": "public function run()\n {\n /* $this->call(UsersTableSeeder::class);\n $this->call(CollectoinsTableSeeder::class);\n $this->call(Extra_itemsTableSeeder::class);\n $this->call(AdditionalsTableSeeder::class);*/\n\n\n DB::table('roles')-> insert([\n [\n 'name' => 'Admin',\n 'alias' => 'admin',\n 'created_at' => date(\"Y-m-d H:i:s\")\n ],\n [\n 'name' => 'User',\n 'alias' => 'user',\n 'created_at' => date(\"Y-m-d H:i:s\")\n ]\n ]);\n\n\n }", "title": "" }, { "docid": "a5ce77c3e99f12ab19018d9164fdffc8", "score": "0.76591766", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $directors=factory(App\\Director::class)->times(7)->create();\n $movies=Movie::all();\n\n foreach ($movies as $oneMovies) {\n $oneMovies->director()->associate($directors->random(1)->first()->id);\n $oneMovies->save();\n }\n\n }", "title": "" }, { "docid": "d26cbbf9444f51683da0101c8bae9147", "score": "0.7656243", "text": "public function run()\n {\n //create a known demo user\n User::factory()->create([\n 'email' => '[email protected]'\n ]);\n\n $this->call([\n UserTableSeeder::class,\n ]);\n\n Quiz::factory()->count(20)->create()->each(function($c) {\n $c->mcqs()->saveMany(\n MCQ::factory()->count(random_int(10,50))->create()\n );\n });\n }", "title": "" }, { "docid": "5340b733c0c35d4a0890dae51ca9f01e", "score": "0.7655571", "text": "public function run()\n {\n $this->truncateUserTables();\n\n \\App\\Models\\User::firstOrCreate([\n 'name' => 'Admin User',\n 'email' => '[email protected]',\n 'password' => Hash::make('admin1123'),\n ]);\n\n $faker = Faker::create();\n\n foreach (range(1, 25) as $index) {\n \\App\\Models\\Student::create([\n 'fullname' => $faker->firstname,\n 'roll' => $index,\n 'propic' => null,\n ]);\n }\n }", "title": "" }, { "docid": "a48cd5bbd88c4d067c54457c50be726c", "score": "0.7653848", "text": "public function run()\n {\n $this->truncateTables([\n 'users',\n 'images',\n 'likes',\n 'comments'\n ]);\n \n User::factory(10)->create();\n Image::factory(10)->create();\n Like::factory(10)->create();\n Comment::factory(10)->create();\n\n $this->call([\n UserSeeder::class,\n ]);\n }", "title": "" }, { "docid": "786ba8399b50f481be52bd7398718a58", "score": "0.76531196", "text": "public function run()\n {\n //$this->call(CitySeeder::class);\n \n City::factory(12)->create();\n $this->call(VehicleSeeder::class);\n \n //$this->call(TelephoneSeeder::class);\n \n Telephone::factory(50)->create();\n Rental::factory(100)->create();\n\n }", "title": "" }, { "docid": "e6f06365d22e1b28b3bd14b58444dc04", "score": "0.76521194", "text": "public function run()\n {\n\n $faker = Faker::create();\n\n foreach(range(1,10) as $index){\n DB::table('iis_interpret')->insert([\n 'name' => $faker->sentence(3, true),\n 'members' => $faker->sentence(3, true),\n 'genre' => $faker->randomElement($array = array ('pop','rock','rap', 'metal', 'punk')),\n 'publisher' => $faker->word(),\n 'image' => $faker->imageUrl($width = 1280, $height = 720),\n 'description' => $faker->paragraph(2),\n 'formed_at' => $faker->date($format = 'Y-m-d H:i:s', $max = 'now'),\n 'created_at' => $faker->date($format = 'Y-m-d H:i:s', $max = 'now'),\n 'updated_at' => $faker->date($format = 'Y-m-d H:i:s', $max = 'now')\n ]);\n }\n\n }", "title": "" }, { "docid": "c8e097995b44d3b77d7922d45d3e7d18", "score": "0.7651747", "text": "public function run()\n {\n Model::unguard();\n\n // https://gist.github.com/isimmons/8202227\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n User::truncate();\n Category::truncate();\n Post::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $categories = factory(App\\Category::class, 30)->create();\n\n factory(App\\User::class, 10)->create()->each(function($user) use ($categories) {\n $user->posts()->saveMany(factory(App\\Post::class, 50)->create()->each(function($post) use ($categories) {\n $post->categories()->sync($categories->random(3)->pluck('id')->all());\n }));\n });\n\n Model::reguard();\n }", "title": "" }, { "docid": "b95080596763428b065e5fbdb7fdf0c5", "score": "0.7650356", "text": "public function run()\n {\n $faker \t= Factory::create('id_ID');\n \t$data \t= [];\n \tforeach (range(1,50) as $i) {\n \t\t$data[] = [\n \t\t\t'title' \t\t=> 'Beli Deposit',\n \t\t\t'content'\t\t=> 'Membeli deposit sebesar 50000',\n \t\t\t'user_id'\t\t=> '38',\n \t\t\t'created_at'\t=> $faker->datetime,\n \t\t\t'updated_at'\t=> now(),\n \t\t];\n \t}\n \tDB::statement('SET FOREIGN_KEY_CHECKS=0;');\n \tDB::table('activities')->truncate();\n \tDB::table('activities')->insert($data);\n }", "title": "" }, { "docid": "4caecf4e2dbd3c5accb7ad81244e8ae2", "score": "0.76480454", "text": "public function run()\n {\n // seed of perfis\n DB::table('perfis')->insert([\n [\n 'id' => 1,\n 'name' => 'admin',\n 'display_name' => 'Administrador',\n 'description' => 'Perfil de administrador',\n ],\n [\n 'id' => 2,\n 'name' => 'usuario',\n 'display_name' => 'Usuario',\n 'description' => 'Perfil do Usuario que aloca e compra imoveis.',\n ],\n ]);\n\n /**\n * Adicionar a permissao para os usurios da seed\n */\n DB::table('usuarios_perfis')->insert([\n [\n 'usuario_id' => 1,\n 'perfil_id' => 1\n ],\n [\n 'usuario_id' => 2,\n 'perfil_id' => 1\n ],\n [\n 'usuario_id' => 3,\n 'perfil_id' => 1\n ],\n [\n 'usuario_id' => 4,\n 'perfil_id' => 1\n ],\n [\n 'usuario_id' => 5,\n 'perfil_id' => 1\n ],\n [\n 'usuario_id' => 6,\n 'perfil_id' => 2\n ],\n ]);\n }", "title": "" }, { "docid": "4f4496d20543369fd27d03bb58fe3133", "score": "0.76468253", "text": "public function run()\n {\n $faker = app(Faker\\Generator::class);\n $user = User::find(1);\n\n $topics = factory(Topic::class)->times(rand(100, 200))->make()->each(function ($topic) use ($faker, $user) {\n $topic->user_id = 1;\n $topic->category_id = 1;\n $topic->is_excellent = rand(0, 1) ? 'yes' : 'no';\n });\n Topic::insert($topics->toArray());\n }", "title": "" }, { "docid": "4ac022527ef235783677bc6ef115503d", "score": "0.76461226", "text": "public function run()\n {\n $this->call(BlogArticlesCategoriesTableSeeder::class);\n $this->call(ProductsCategoriesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(BlogEventsCategoriesTableSeeder::class);\n $this->call(ProductsTableSeeder::class);\n factory(\\App\\Models\\User::class, 50)->create();\n factory(\\App\\Models\\BlogEvent::class, 50)->create();\n factory(\\App\\Models\\BlogArticle::class, 50)->create();\n\n }", "title": "" }, { "docid": "8945612ec7a49f0f1852938590417f44", "score": "0.7646043", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('items')->insert([\n ['name' => '1 More E1001 Triple Driver IEM'],\n ['name' => '1 More E1001 Triple Driver IEM (Demo)'],\n ['name' => '1 More Piston Fit'],\n ['name' => 'ALO Litz MMCX 2.5'],\n ['name' => 'ATH-AR1iS'],\n ['name' => 'ATH-DSR7BT Black'],\n ['name' => 'ATH-LS50iS Black'],\n ['name' => 'ATH-LS70iS Black'],\n ]);\n }", "title": "" }, { "docid": "68bf7d23d85baec30f2ba67a6fa4e4b6", "score": "0.76455927", "text": "public function run()\n {\n $this->studentSkillsSeeder();\n $this->studentTagsSeeder();\n }", "title": "" }, { "docid": "8494dc0b48ead42c5e9f8183bb5471d3", "score": "0.76453424", "text": "public function run()\n {\n \\App\\User::truncate();\n $faker = Faker\\Factory::create();\n for($i=0;$i<50;$i++){\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'lastName' => $faker->lastName,\n 'email' => $faker->email,\n 'sex' => 'f',\n 'phone' => $faker->phoneNumber,\n 'pesel' => $faker->randomDigit,\n 'role' => 'user',\n 'password' => bcrypt('secret'),\n ]);\n }\n DB::table('users')->insert([\n 'name' => 'Sample',\n 'lastName' => 'Example',\n 'email' => \"[email protected]\",\n 'sex' => 'f',\n 'phone' => $faker->phoneNumber,\n 'pesel' => $faker->randomDigit,\n 'role' => 'admin',\n 'password' => bcrypt('secret'),\n ]);\n }", "title": "" } ]
8f9223f0d7c0ee1161248f30d827b948
SETUP // ++ DATA RECORDS ACCESS ++ // / USED BY: Cart object, for retrieving cart stats (totals) reported to customer internally, for initializing datagroup objects ASSUMES: If caller passes NULL for $idCart, then data for the correct cart has already been loaded.
[ { "docid": "f40ef423ed6d4c9e052f2331241d73c6", "score": "0.5620726", "text": "public function FieldRows($idCart=NULL) {\n\tif (!is_null($idCart) && ($this->idCart != $idCart)) {\n\t // if cart fields not already loaded for the given cart, load them:\n\t $sql = 'SELECT ID_Type, Val FROM '.$this->NameSQL().' WHERE ID_Cart='.$idCart;\n\t $this->rsFields = $this->DataSQL($sql);\n\t $this->idCart = $idCart;\t\t// we need to know which cart the recordset has, for caching\n\t $this->rsFields->CartID($idCart);\t// recordset needs to know it too (not sure why)\n\t}\n\treturn $this->rsFields;\n }", "title": "" } ]
[ { "docid": "68f5ba28b95cdca1091b169bef369bbf", "score": "0.6585346", "text": "public function setCartData() {\n\t\t\t$user = setUser();\n\t\t\t$cart = array();\n\t\t\t$cart['itemCount'] = $user->getObjectData('package', 'itemCount');\n\t\t\t$cart['subTotal'] = $user->getObjectData('package', 'totalCost');\n\t\t\t$cart['contents'] = $user->getObjectData('package', 'contents');\n\t\t\t$this->assignClean('_CART', $cart);\n\t\t}", "title": "" }, { "docid": "3b040e89f5c2fafdb35eef41f4f8f3ff", "score": "0.60842973", "text": "public function loadData(Cart $cart)\n\t{\n\t\tif (!Validate::isLoadedObject($cart) || ($products = $cart->getProducts()) === array())\n\t\t\treturn;\n\n\t\t$currency = new Currency($cart->id_currency);\n\t\tif (!Validate::isLoadedObject($currency))\n\t\t\treturn;\n\n\t\t// Cart rules are available from prestashop 1.5 onwards.\n\t\tif (_PS_VERSION_ >= '1.5')\n\t\t{\n\t\t\t$cart_rules = (array)$cart->getCartRules(CartRule::FILTER_ACTION_GIFT);\n\n\t\t\t$gift_products = array();\n\t\t\tforeach ($cart_rules as $cart_rule)\n\t\t\t\tif ((int)$cart_rule['gift_product'])\n\t\t\t\t{\n\t\t\t\t\tforeach ($products as $key => &$product)\n\t\t\t\t\t\tif (empty($product['gift'])\n\t\t\t\t\t\t\t&& (int)$product['id_product'] === (int)$cart_rule['gift_product']\n\t\t\t\t\t\t\t&& (int)$product['id_product_attribute'] === (int)$cart_rule['gift_product_attribute'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$product['cart_quantity'] = (int)$product['cart_quantity'];\n\t\t\t\t\t\t\t$product['cart_quantity']--;\n\n\t\t\t\t\t\t\tif (!($product['cart_quantity'] > 0))\n\t\t\t\t\t\t\t\tunset($products[$key]);\n\n\t\t\t\t\t\t\t$gift_product = $product;\n\t\t\t\t\t\t\t$gift_product['cart_quantity'] = 1;\n\t\t\t\t\t\t\t$gift_product['price_wt'] = 0;\n\t\t\t\t\t\t\t$gift_product['gift'] = true;\n\n\t\t\t\t\t\t\t$gift_products[] = $gift_product;\n\n\t\t\t\t\t\t\tbreak; // One gift product per cart rule\n\t\t\t\t\t\t}\n\t\t\t\t\tunset($product);\n\t\t\t\t}\n\n\t\t\t$items = array_merge($products, $gift_products);\n\t\t}\n\t\telse\n\t\t\t$items = $products;\n\n\t\tforeach ($items as $item)\n\t\t{\n\t\t\t$name = $item['name'];\n\t\t\tif (isset($item['attributes_small']))\n\t\t\t\t$name .= ' ('.$item['attributes_small'].')';\n\n\t\t\t$this->line_items[] = array(\n\t\t\t\t'product_id' => (int)$item['id_product'],\n\t\t\t\t'quantity' => (int)$item['cart_quantity'],\n\t\t\t\t'name' => (string)$name,\n\t\t\t\t'unit_price' => Tiresias::helper('price')->format($item['price_wt']),\n\t\t\t\t'price_currency_code' => (string)$currency->iso_code,\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "ec94c166350beae4e06ef29f1b0f475d", "score": "0.58920777", "text": "private function loadCart() {\r\n\t\t$this->cartXml = AWSHelper::makeAWSRequest(array(\r\n\t\t\t\t\t\t\t\t 'Operation' \t\t=> 'CartGet',\r\n\t\t\t\t\t\t\t\t 'ResponseGroup'\t=> 'Cart',\r\n\t\t\t\t\t\t\t\t 'CartId' \t\t\t=> $this->cartId,\r\n\t\t\t\t\t\t\t\t 'HMAC'\t\t\t=> $this->hmac));\r\n\t}", "title": "" }, { "docid": "7ba8e049ff6d2c0dd5ed01a001f3dfb4", "score": "0.5862092", "text": "public function getCartItems($cart_id);", "title": "" }, { "docid": "abc2ae925b3a10218aa5e4fd06bc4894", "score": "0.5761437", "text": "public function __construct($iDB) {\n\t$objIdx = new clsIndexer_Table_multi_key($this);\n\t$objIdx->KeyNames(array('ID_Cart','ID_Type'));\n\n\t$this->arChg = NULL;\n\t$this->idCart = NULL;\n\t$this->rsFlds = NULL;\n\n\tparent::__construct($iDB);\n\t $this->Name('shop_cart_data');\n\t $this->ClassSng('clsCartVar');\n\t $this->Indexer($objIdx);\n }", "title": "" }, { "docid": "300d0eb46f6c3cec937c495062bf86aa", "score": "0.57241523", "text": "public function initShoppingCarts()\n\t{\n\t\t$this->collShoppingCarts = array();\n\t}", "title": "" }, { "docid": "263928654f8ce413aecf6f560eed2140", "score": "0.5720603", "text": "protected function populate_cart()\n {\n $result_array=Service_ShoppingCart::generate_cart_content_with_prices($this->cart_products);\n // zajisteni likvidace kosiku pri nulove hodnote\n if($result_array[\"cart_prices\"][\"total_cart_price_with_tax\"]<=0) $this->flush();\n \n $this->full_products=$result_array[\"cart_products\"];\n $this->full_prices=$result_array[\"cart_prices\"];\n $this->total_items=$result_array[\"total_items\"];\n $this->session->set(\"total_\".$this->cart_name.\"_price_without_tax\",$result_array[\"cart_prices\"][\"total_cart_price_without_tax\"]);\n $this->session->set(\"total_\".$this->cart_name.\"_price_with_tax\",$result_array[\"cart_prices\"][\"total_cart_price_with_tax\"]);\n $this->session->set(\"total_\".$this->cart_name.\"_items\",$result_array[\"total_items\"]);\n\n }", "title": "" }, { "docid": "6ca55f4c2079a2527998b3bd33b44698", "score": "0.57132834", "text": "public function get_all_data($cartid=0) {\n\t\t// get all data in the current cart\n\t\treturn $this->db->query('')->result_array();\n\t\n\t}", "title": "" }, { "docid": "6be02eb8e9f261c612197f916c3137c1", "score": "0.56639314", "text": "function CartInfo($cartId)\n {\n $query = \"SELECT * FROM cart_details WHERE cart_id=?\";\n $parameters = array($cartId);\n $types = array(\"s\");\n return $this->db->GetRowList($query, $parameters, $types);\n }", "title": "" }, { "docid": "c4e4a564bda3a92c3bb0e96a928f5cf4", "score": "0.5644262", "text": "function load_cart_data($cart_data_id = 0, $dashboard_redirect = FALSE) \n\t\t{\n\t\t\tif (!$this->data['user'])\n\t\t\t{\n\t\t\t\t// Users that are not logged in cannot save cart data.\n\t\t\t\t$this->flexi_cart->set_error_message('You must be logged in to load saved carts.', 'public');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The load/save/delete cart data functions require the flexi cart ADMIN library.\n\t\t\t\t$this->load->library('flexi_cart_admin');\n\t\t\t\t$this->load->model('demo_cart_model');\n\n\t\t\t\t// Load saved cart data array.\n\t\t\t\t// This data is loaded into the browser session as if you were shopping with the cart as normal.\n\t\t\t\t$this->flexi_cart_admin->load_cart_data($cart_data_id);\n\t\t\t\t\n\t\t\t\t// To ensure that the prices and other data of all loaded items are still correct, a custom demo function has been made to loop through each item in the cart, \n\t\t\t\t// query the demo item database table and retrieve the current item data.\n\t\t\t\t// As flexi cart does not manage item tables, this function has to be custom made to suit each sites requirements, this is an example of how it can be achieved.\n\t\t\t\t// Note that cart items including selectable options would potentially require a more complex query.\t\n\t\t\t\t$this->demo_cart_model->demo_update_loaded_cart_data();\n\t\t\t}\n\t\t\t\n\t\t\t// Set a message to the CI flashdata so that it is available after the page redirect.\n\t\t\t$this->session->set_flashdata('message', $this->flexi_cart->get_messages());\n\n\t\t\t($dashboard_redirect) ? redirect('user_dashboard/carts') : redirect('cart');\n\t\t}", "title": "" }, { "docid": "3d1a624e4ee959291f215a9e27c9ed25", "score": "0.558637", "text": "public function CartID($id=NULL) {\n\tif (!is_null($id)) {\n\t $this->idCart = $id;\n\t}\n\treturn $this->idCart;\n }", "title": "" }, { "docid": "2f024c068a0c23452fa6163a5e901bb0", "score": "0.558148", "text": "public function getCart();", "title": "" }, { "docid": "354d2c1a57d12174beed53636d2595e8", "score": "0.5567884", "text": "public function load_cart()\n {\n }", "title": "" }, { "docid": "64025c7aa0ff11080f90851b52e0955b", "score": "0.5563423", "text": "public function get($cartId);", "title": "" }, { "docid": "64025c7aa0ff11080f90851b52e0955b", "score": "0.5563423", "text": "public function get($cartId);", "title": "" }, { "docid": "64025c7aa0ff11080f90851b52e0955b", "score": "0.5563423", "text": "public function get($cartId);", "title": "" }, { "docid": "33a837d1fd27217a60f43f20e87c63a0", "score": "0.55457675", "text": "function setCartId($id)\n {\n if (!$id) {\n $this->_cart = null;\n $this->_cart_id = null;\n } else if ($id != $this->_id) {\n $this->_cart_id = $id;\n $this->_cart = null;\n }\n }", "title": "" }, { "docid": "b9716af03f11487cfa1aaeb7c821f0ab", "score": "0.54653186", "text": "public function export_to_pdf($id = null){\n\n\t\tif (!$this->Cart->exists($id)) throw new NotFoundException('Invalid Cart');\n\n\n\t\t/*salesreps*/\n\t\t$this->loadModel('Salesrep');\n\t\t$salesreps = $this->Salesrep->find('list');\n\t\t$this->set('salesreps', $salesreps);\n\n\n\t\tif ($this->request->is(array('post', 'put'))) {\n\n\t\t\tif ($this->Cart->save($this->request->data)) {\n\n\t\t\t\t $this->Session->setFlash('<strong>Cart Updated!</strong>','default',array('class' =>'alert alert-success'));\n\n\t\t\t} else {\n\t\t\t\t $this->Session->setFlash('<strong>The Cart could not be saved. Please, try again.</strong>','default',array('class' =>'alert alert-danger'));\n\t\t\t}\n\t\t} else {\n\n\t\t\t$options = array('conditions' => array('Cart.' . $this->Cart->primaryKey => $id));\n\t\t\t$options['contain'] = array('Customer');\n\t\t\t$options['fields'] = array('Cart.*','Customer.*', 'Coupon.*', 'Package.*', 'Shipping.*');\n\t\t\t/* for coupon and package */\n\t\t\t$options['joins'] = array(\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'table'=>'coupons',\n\t\t\t\t\t\t\t\t\t\t'alias'=>'Coupon',\n\t\t\t\t\t\t\t\t\t\t'type'=>'left',\n\t\t\t\t\t\t\t\t\t\t'conditions'=>array('Coupon.id=Cart.coupon_id')\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'table'=>'productpackages',\n\t\t\t\t\t\t\t\t\t\t'alias'=>'Package',\n\t\t\t\t\t\t\t\t\t\t'type'=>'left',\n\t\t\t\t\t\t\t\t\t\t'conditions'=>array('Package.id=Cart.package_id')\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'table'=>'shippings',\n\t\t\t\t\t\t\t\t\t\t'alias'=>'Shipping',\n\t\t\t\t\t\t\t\t\t\t'type'=>'left',\n\t\t\t\t\t\t\t\t\t\t'conditions'=>array('Shipping.cust_id=Cart.customer_id')\n\t\t\t\t\t\t\t\t\t)\n\t\t\t);\n\t\t\t/* end of for coupon and package */\n\t\t\t$this->request->data = $this->Cart->find('first', $options);\n\n\t\t}\n\t\t\t\n\t\t\t$this->set('page_title',$this->name.' / '.$this->request->data['Cart']['id']);\n\n\t\t\t// Category\n\t\t\t$options = array();\n\t\t\t$options['conditions'] = array('Cart.id'=>$id);\n\t\t\t$options['fields'] = array('Product.*','CartsProducts.*','Color.name');\n\t\t\t$options['joins'] = array(\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t 'table'=>'carts_products',\n\t\t\t\t\t 'alias'=>'CartsProducts',\n\t\t\t\t\t 'type' =>'inner',\n\t\t\t\t\t 'conditions'=>array('CartsProducts.cart_id=Cart.id')\n\t\t\t\t\t ),\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t 'table'=>'products',\n\t\t\t\t\t 'alias'=>'Product',\n\t\t\t\t\t 'type' =>'inner',\n\t\t\t\t\t 'conditions'=>array('CartsProducts.product_id=Product.id')\n\t\t\t\t\t ),\n\t\t\t\t\t array(\n\t\t\t\t\t 'table'=>'colors',\n\t\t\t\t\t 'alias'=>'Color',\n\t\t\t\t\t 'type' =>'left',\n\t\t\t\t\t 'conditions'=>array('Product.color_id=Color.id')\t\t\t\t\t \t\n\t\t\t\t\t ) \n\t\t\t\t );\n\n\t\t\t\n\t\t\t$datas = $this->Cart->find('all',$options);\n\t\t\t/*$this->set('carts_products',$datas);\n\t\t\t$this->set('show_search_box',false);\n\n\t\t\t$this->set(compact('carts_products'));\n\t // Setup the PDF parameters. This is where it all happens.\n\t $params = array(\n\t 'download' => false,\n\t 'name' => \"customer_details.pdf\",\n\t 'paperOrientation' => 'portrait',\n\t 'paperSize' => 'legal'\n\t );\n\t $this->set($params);*/\n\n\n\t /*\n\t *\tPDF conversion with images - also edit dompdf_config.inc.php\n\t * \tnever indent the heredoc\n\t */\n\t \n\t $dompdf = new DOMPDF();\n$html = <<<ENDHTML\n<html>\n<head>\n<style type=\"text/css\">\ntable {\n border:1px solid #CCC;\n border-collapse:collapse;\n}\ntd {\n border:none;\n}\n</style>\n</head>\n<body style=\"font:Verdana, Arial, Helvetica, sans-serif\">\nENDHTML;\n$html .= <<<ENDHTML\n\t\t<div style=\"margin-bottom: 100px\">\n\t\t<h1> Billing Information </h1>\n\t\t<table width=\"100%\" border=\"1\" align=\"left\" style=\"font:Verdana, Arial, Helvetica, sans-serif; margin-bottom: 100px;\">\n\t\t\t\n\t\t\t<tbody>\n\t\t\t\t<tr style=\"background-color: #cccccc;\">\n\t\t\t\t<th width=\"90\">Company</th>\n\t\t\t\t<th>Street</th>\n\t\t\t\t<th>City</th>\n\t\t\t\t<th>State</th>\n\t\t\t\t<th>Country</th>\n\t\t\t\t<th>Zip</th>\n\t\t\t\t</tr>\nENDHTML;\n$bill_company = $this->request->data['Customer']['bill_company'];\n$bill_street = $this->request->data['Customer']['bill_street'];\n$bill_city = $this->request->data['Customer']['bill_city'];\n$bill_state = $this->request->data['Customer']['bill_state'];\n$bill_country = $this->request->data['Customer']['bill_country'];\n$bill_zip = $this->request->data['Customer']['bill_postcode'];\n\n$html .= <<<ENDHTML\n\t\t\t<tr>\n\t\t\t\t<td style=\"text-align: center;\">$bill_company</td>\n\t\t\t\t<td style=\"text-align: center;\">$bill_street</td>\n\t\t\t\t<td style=\"text-align: center;\">$bill_city</td>\n\t\t\t\t<td style=\"text-align: center;\">$bill_state</td>\n\t\t\t\t<td style=\"text-align: center;\">$bill_country</td>\n\t\t\t\t<td style=\"text-align: center;\">$bill_zip</td>\n\t\t\t\t</tr>\n\t\t\t</tbody>\n\t\t</table>\n\t\t</div>\nENDHTML;\n\n$html .= <<<ENDHTML\n\t\t<div style=\"margin-bottom: 100px\">\n\t\t<h1> Shipping Information </h1>\n\t\t<table width=\"100%\" border=\"1\" align=\"left\" style=\"font:Verdana, Arial, Helvetica, sans-serif; margin-bottom: 100px;\">\n\t\t\t\n\t\t\t<tbody>\n\t\t\t\t<tr style=\"background-color: #cccccc;\">\n\t\t\t\t<th width=\"90\">Company</th>\n\t\t\t\t<th>Street</th>\n\t\t\t\t<th>City</th>\n\t\t\t\t<th>State</th>\n\t\t\t\t<th>Country</th>\n\t\t\t\t<th>Zip</th>\n\t\t\t\t</tr>\nENDHTML;\n$ship_company = $this->request->data['Customer']['ship_company'];\n$ship_street = $this->request->data['Customer']['ship_street'];\n$ship_city = $this->request->data['Customer']['ship_city'];\n$ship_state = $this->request->data['Customer']['ship_state'];\n$ship_country = $this->request->data['Customer']['ship_country'];\n$ship_zip = $this->request->data['Customer']['ship_postcode'];\n\n$html .= <<<ENDHTML\n\t\t\t<tr>\n\t\t\t\t<td style=\"text-align: center;\">$ship_company</td>\n\t\t\t\t<td style=\"text-align: center;\">$ship_street</td>\n\t\t\t\t<td style=\"text-align: center;\">$ship_city</td>\n\t\t\t\t<td style=\"text-align: center;\">$ship_state</td>\n\t\t\t\t<td style=\"text-align: center;\">$ship_country</td>\n\t\t\t\t<td style=\"text-align: center;\">$ship_zip</td>\n\t\t\t\t</tr>\n\t\t\t</tbody>\n\t\t</table>\n\t\t</div>\nENDHTML;\n\n\n$html .= <<<ENDHTML\n\t\t<div style=\"margin-bottom: 100px\">\n\t\t<h1> Sales Representative </h1>\n\t\t<table width=\"100%\" border=\"1\" align=\"left\" style=\"font:Verdana, Arial, Helvetica, sans-serif; margin-bottom: 100px;\">\n\t\t\t\n\t\t\t<tbody>\nENDHTML;\nif( isset($this->request->data['Customer']['salesrep_id']) && $this->request->data['Customer']['salesrep_id'] != 0 ){\n\t$sales_representative = ucfirst($salesreps[ $this->request->data['Customer']['salesrep_id'] ]);\n}\nelseif( isset($this->request->data['Customer']['salesrep']) && $this->request->data['Customer']['salesrep'] != '' ){\n\t$sales_representative = ucfirst( $this->request->data['Customer']['salesrep'] );\n}\nelse{\n\t$sales_representative = 'No Sales Representative.';\n}\n/*$sales_representative = ucfirst($salesreps[$this->request->data['Customer']['salesrep_id']]);*/\n\n$html .= <<<ENDHTML\n\t\t\t<tr>\n\t\t\t\t<th style=\"background-color: #cccccc;\">Sales Representative: </th>\n\t\t\t\t<td style=\"text-align: center;\">$sales_representative</td>\n\t\t\t</tr>\n\t\t\t</tbody>\n\t\t</table>\n\t\t</div>\nENDHTML;\n\n\n$html .= <<<ENDHTML\n <h1>Product Details</h1>\n\t<table width=\"100%\" border=\"1\" align=\"left\" style=\"font:Verdana, Arial, Helvetica, sans-serif\">\n\t<tbody>\n\t<tr style=\"background-color: #cccccc;\">\n\t<th width=\"90\">Image</th>\n\t<th>Number</th>\n\t<th>Color</th>\n\t<th>Qty</th>\n\t<th>Unit Price</th>\n\t<th>Discount (%)</th>\n\t<th>Total</th>\n\t</tr>\nENDHTML;\nforeach($datas as $data){\n\t$image_name = PRODUCTS_IMAGES_THUMBS.$data['Product']['image_name'].'.jpg';\n\t/*if( file_exists($image_name) ){*/\n\tif( @getimagesize($image_name) ){\n\t\t$image_name = '<img src='.$image_name.' width=\"113\" height=\"90\" style=\"margin-left: 2px; border: 1px solid #000;\" />';\n\t}\n\telse{\n\t\t$image_name = PRODUCTS_IMAGES_THUMBS.'notavailable.jpg';\n\t\t$image_name = '<img src='.$image_name.' width=\"115\" height=\"90\" style=\"margin-left: 2px; border: 1px solid #000;\" />';\n\t}\n\t/*$image_name = '<img src='.$image_name.' width=\"104\" height=\"104\" />';*/\n\t$prod_number = $data['Product']['number'];\n\t$color = $data['Color']['name'];\n\t$cp_qty = $data['CartsProducts']['qty'];\n\n\t/* \n\t* used for product discounted price and product discount value\n\t* based on the calculation by Zach Tanzinco - sep 24, 2014 \n\t*/\n\t$discount_value_for_each_product = '';\t/* product discount value */\n\t$discounted_price_for_each_product = 0;\n\t$total_calculated_amount_for_each_product = 0;\n\tif( $data['CartsProducts']['qty'] <= 2 ){\t/* 1-2 products */\n\t\t\n\t\t/* check if product has discount_value */\n\t\tif( isset( $data['Product']['discount_value'] ) && $data['Product']['discount_value'] != 0.00 ){\n\t\t\t$discount_value_for_each_product = $data['Product']['discount_value'].'%';\n\t\t}\n\t\telseif( isset( $data['Product']['discount_value'] ) && $data['Product']['discount_value'] == 0.00 ){\n\t\t\t$discount_value_for_each_product = '0.00%';\n\t\t}\n\t\t\n\t\t/* For special discount_values (e.g. 75%) */\n\t\tif( isset( $data['Product']['discount_value'] ) && $data['Product']['discount_value'] == 75.00 ){\n\t\t\t$the_discount_value = number_format( ($data['Product']['price'] * 0.75), 2, '.', ', ');\n\t\t\t$discounted_price_for_each_product = $data['Product']['price'] - $the_discount_value;\n\t\t\t$total_calculated_amount_for_each_product = $data['CartsProducts']['qty'] * $discounted_price_for_each_product;\n\t\t}\n\t\telse{\n\t\t\t$discounted_price_for_each_product = $data['Product']['price'];\n\t\t\t$total_calculated_amount_for_each_product = $data['CartsProducts']['qty'] * $discounted_price_for_each_product;\n\t\t}\n\t\t\n\t}\n\telseif( $data['CartsProducts']['qty'] == 3 || $data['CartsProducts']['qty'] <= 5 ){\n\t\t\n\t\t/* check if product has discount_value - for discount_Value display on product details */\n\t\tif( isset( $data['Product']['discount_value'] ) && $data['Product']['discount_value'] != 0.00 ){\n\t\t\t$discount_value_for_each_product = $data['Product']['discount_value'].'%';\n\t\t}\n\t\telseif( isset( $data['Product']['discount_value'] ) && $data['Product']['discount_value'] == 0.00 ){\n\t\t\t$discount_value_for_each_product = '15.00%';\n\t\t}\n\n\t\t/* For special discount_values (e.g. 75%) */\n\t\tif( isset( $data['Product']['discount_value'] ) && $data['Product']['discount_value'] == 75.00 ){\n\t\t\t$the_discount_value = number_format( ($data['Product']['price'] * 0.75), 2, '.', ', ');\n\t\t\t$discounted_price_for_each_product = $data['Product']['price'] - $the_discount_value;\n\t\t\t$total_calculated_amount_for_each_product = $data['CartsProducts']['qty'] * $discounted_price_for_each_product;\n\t\t}\n\t\telse{\n\t\t\t$the_discount_value = number_format( ($data['Product']['price'] * 0.15), 2, '.', ', ');\n\t\t\t$discounted_price_for_each_product = $data['Product']['price'] - $the_discount_value;\n\t\t\t$total_calculated_amount_for_each_product = $data['CartsProducts']['qty'] * $discounted_price_for_each_product;\n\t\t}\n\n\t\t\n\t}\n\telseif( $data['CartsProducts']['qty'] == 6 || $data['CartsProducts']['qty'] <= 11 ){\n\t\t\n\t\t/* check if product has discount_value */\n\t\tif( isset( $data['Product']['discount_value'] ) && $data['Product']['discount_value'] != 0.00 ){\n\t\t\t$discount_value_for_each_product = $data['Product']['discount_value'].'%';\n\t\t}\n\t\telseif( isset( $data['Product']['discount_value'] ) && $data['Product']['discount_value'] == 0.00 ){\n\t\t\t$discount_value_for_each_product = '25.00%';\n\t\t}\n\n\t\t/* For special discount_values (e.g. 75%) */\n\t\tif( isset( $data['Product']['discount_value'] ) && $data['Product']['discount_value'] == 75.00 ){\n\t\t\t$the_discount_value = number_format( ($data['Product']['price'] * 0.75), 2, '.', ', ');\n\t\t\t$discounted_price_for_each_product = $data['Product']['price'] - $the_discount_value;\n\t\t\t$total_calculated_amount_for_each_product = $data['CartsProducts']['qty'] * $discounted_price_for_each_product;\n\t\t}\n\t\telse{\n\t\t\t$the_discount_value = number_format( ($data['Product']['price'] * 0.25), 2, '.', ', ');\n\t\t\t$discounted_price_for_each_product = $data['Product']['price'] - $the_discount_value;\n\t\t\t$total_calculated_amount_for_each_product = $data['CartsProducts']['qty'] * $discounted_price_for_each_product;\n\t\t}\n\n\t\t\n\t}\n\telseif( $data['CartsProducts']['qty'] >= 12 ){\n\t\t\n\t\t/* check if product has discount_value */\n\t\tif( isset( $data['Product']['discount_value'] ) && $data['Product']['discount_value'] != 0.00 ){\n\t\t\t$discount_value_for_each_product = $data['Product']['discount_value'].'%';\n\t\t}\n\t\telseif( isset( $data['Product']['discount_value'] ) && $data['Product']['discount_value'] == 0.00 ){\n\t\t\t$discount_value_for_each_product = '35.00%';\n\t\t}\n\n\t\t/* For special discount_values (e.g. 75%) */\n\t\tif( isset( $data['Product']['discount_value'] ) && $data['Product']['discount_value'] == 75.00 ){\n\t\t\t$the_discount_value = number_format( ($data['Product']['price'] * 0.75), 2, '.', ', ');\n\t\t\t$discounted_price_for_each_product = $data['Product']['price'] - $the_discount_value;\n\t\t\t$total_calculated_amount_for_each_product = $data['CartsProducts']['qty'] * $discounted_price_for_each_product;\n\t\t}\n\t\telse{\n\t\t\t$the_discount_value = number_format( ($data['Product']['price'] * 0.35), 2, '.', ', ');\n\t\t\t$discounted_price_for_each_product = $data['Product']['price'] - $the_discount_value;\n\t\t\t$total_calculated_amount_for_each_product = $data['CartsProducts']['qty'] * $discounted_price_for_each_product;\n\t\t}\n\n\t\t\n\t}\n\t$price = $discounted_price_for_each_product;\n\t$discount = $discount_value_for_each_product;\n\t$totalamount = \"$\".number_format($total_calculated_amount_for_each_product, 2, '.' , ', ');\n\t/* end */\n\n\t/*$price = $data['CartsProducts']['price'];\n\t$discount = $data['Product']['discount_value'];\n\t$totalamount = $data['CartsProducts']['qty'] * $data['Product']['price'];\n\t$totalamount = \"$\".number_format($totalamount,2,'.',0);*/\n$html .= <<<ENDHTML\n\t<tr>\n\t<td>$image_name</td>\n\t<td style=\"text-align: center;\">$prod_number</td>\n\t<td style=\"text-align: center;\">$color</td>\n\t<td style=\"text-align: center;\">$cp_qty</td>\n\t<td style=\"text-align: center;\">$price</td>\n\t<td style=\"text-align: center;\">$discount</td>\n\t<td style=\"text-align: center;\">$totalamount</td>\n\t</tr>\nENDHTML;\n}\n$html .= <<<ENDHTML\n\t</tbody>\n\t</table>\n</body>\n</html>\nENDHTML;\n\t\t\t \n\t\t\t$dompdf->load_html($html);\n\t\t\t$dompdf->render();\n\t\t\t \n\t\t\t$dompdf->stream(\"export_to_pdf.pdf\");\n\n\t /*\n\t *\tend PDF conversion with images\n\t */\n\n\t}", "title": "" }, { "docid": "98f3f3a36d1efa449941f687c7c23b6d", "score": "0.54299647", "text": "public function getItemDetailsList($cartId);", "title": "" }, { "docid": "0548c4f1de9f1291e006d38787d7c08f", "score": "0.54124063", "text": "public function getCartData($email_id,$cartId,$validation_id){\n\t\t$data = array();\n\t\tif(!empty($cartId) && !empty($email_id)){\n\t\t\t$db = \\Config\\Database::connect();\n\t\t\t$builder = $db->table('payu_token_validation'); \n\t\t\t$builder->select('*'); \n\t\t\t$builder->where('email_id', $email_id);\n\t\t\t$builder->where('validation_id', $validation_id);\n\t\t\t$query = $builder->get();\n\t\t\t$result = $query->getResultArray();\n\t\t\tif (count($result) > 0) {\n\t\t\t\t$result = $result[0];\n\t\t\t\t$request = '';\n\t\t\t\t$url = getenv('bigcommerceapp.STORE_URL').$result['store_hash'].'/v3/checkouts/'.$cartId.'?include=cart.line_items.physical_items.options%2Ccart.line_items.digital_items.options%2Ccustomer%2Ccustomer.customerGroup%2Cpayments%2Cpromotions.banners%2Ccart.line_items.physical_items.categoryNames%2Ccart.line_items.digital_items.category_names';\n\t\t\t\t\n\t\t\t\t$client = \\Config\\Services::curlrequest();\n\t\t\t\t$response = $client->request('get', $url, [\n\t\t\t\t\t\t'headers' => [\n\t\t\t\t\t\t\t\t'X-Auth-Token' => $result['acess_token'],\n\t\t\t\t\t\t\t\t'store_hash' => $result['store_hash'],\n\t\t\t\t\t\t\t\t'Accept' => 'application/json',\n\t\t\t\t\t\t\t\t'Content-Type' => 'application/json'\n\t\t\t\t\t\t]\n\t\t\t\t]);\n\t\t\t\t\n\t\t\t\tif (strpos($response->getHeader('content-type'), 'application/json') != false){\n\t\t\t\t\t$res = $response->getBody();\n\t\t\t\t\n\t\t\t\t\t$data = [\n\t\t\t\t\t\t'email_id' => $email_id,\n\t\t\t\t\t\t'type' => 'BigCommerce',\n\t\t\t\t\t\t'action' => 'Cart Data',\n\t\t\t\t\t\t'api_url' => addslashes($url),\n\t\t\t\t\t\t'api_request' => addslashes($request),\n\t\t\t\t\t\t'api_response' => addslashes($res),\n\t\t\t\t\t\t'token_validation_id' => $validation_id,\n\t\t\t\t\t];\n\t\t\t\t\t$builderinsert = $db->table('api_log'); \n\t\t\t\t\t$builderinsert->insert($data);\n\t\t\t\t\tif(!empty($res)){\n\t\t\t\t\t\t$res = json_decode($res,true);\n\t\t\t\t\t\tif(isset($res['data'])){\n\t\t\t\t\t\t\t$data = $res['data'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "26ebdf6a80d2deaffde621c762024d84", "score": "0.53935856", "text": "function __construct(){\n // nothing to go here; ShoppingCart is just an array of Items\n }", "title": "" }, { "docid": "36a1259a858644cdfd6deee27379e82b", "score": "0.53874594", "text": "public function __construct($cart = null)\n {\n if($cart){\n $this->items = $cart->items;\n $this->totalQty = $cart->totalQty;\n $this->totalPrice = $cart->totalPrice;\n }\n }", "title": "" }, { "docid": "80d5ec2423ded90e7727b3e43f1d9a41", "score": "0.5347123", "text": "function setCart($cart)\n {\n if (!$cart) {\n $this->_cart_id = null;\n $this->_cart = null;\n } else {\n $this->_cart = $cart;\n $this->_cart_id = $cart->id;\n }\n }", "title": "" }, { "docid": "9898264620c26f89ceab91d841ecf16b", "score": "0.5346462", "text": "public function getCartItemsCount ($cart_id);", "title": "" }, { "docid": "d82b84029cf65d83e3db4e8d8004c8f2", "score": "0.5338401", "text": "public function getData()\n {\n // The base data.\n $data = $this->getBaseData();\n\n // Add basket contents next.\n // It seems that we MUST have at least one item in\n // the cart to be valid.\n\n $items = $this->getItems();\n\n if (empty($items) || $items->count() == 0) {\n // No items in the basket, so we will have to make\n // one up. The Frontend API MUST have at least one cart item.\n // The basket MUST add up to the total payment amount, so\n // be aware of that.\n\n $item = new ExtendItem([\n 'id' => $this->defaultItemId,\n 'price' => $this->getAmountInteger(),\n 'quantity' => 1,\n 'name' => $this->getDescription(),\n 'vat' => null,\n ]);\n\n $items = new ItemBag;\n $items->add($item);\n\n // Add this dummy cart to the gateway cart.\n $this->setItems($items);\n }\n\n // Add the cart items to the data.\n $data += $this->getDataItems();\n\n if ($this->getDisplayName()) {\n $data['display_name'] = $this->getDisplayName();\n }\n\n if ($this->getDisplayAddress()) {\n $data['display_address'] = $this->getDisplayAddress();\n }\n\n if ($this->getInvoiceId()) {\n $data['invoiceid'] = $this->getInvoiceId();\n }\n\n // The errorurl does not appear in the Frontend documentation, but does\n // work and is implemented in other platform gateways.\n\n $data += $this->getDataUrl();\n\n if ($this->getTargetWindow()) {\n $data['targetwindow'] = $this->getTargetWindow();\n }\n\n if ($this->getParam() !== null) {\n $data['param'] = $this->getParam();\n }\n\n if ($this->getDescription()) {\n $data['narrative_text'] = $this->getDescription();\n }\n\n $data += $this->getDataPersonal();\n $data += $this->getDataShipping();\n\n if ($this->getLanguage()) {\n $data['language'] = $this->getLanguage();\n }\n\n if ($this->getWalletType()) {\n $data['wallettype'] = $this->getWalletType();\n }\n\n if ($this->getAutosubmit()) {\n $data['autosubmit'] = $this->getAutosubmit();\n }\n\n if ($this->getFinancingtype()) {\n $data['financingtype'] = $this->getFinancingtype();\n }\n\n // Create the hash for hashable fields.\n $data['hash'] = $this->hashArray($data);\n\n return $data;\n }", "title": "" }, { "docid": "0358aea419cc599774afe326c08bfc82", "score": "0.5338", "text": "public function getCart_id()\n {\n return $this->cart_id;\n }", "title": "" }, { "docid": "802c79daeccacae21ee6b59bb23fb457", "score": "0.533646", "text": "private function createCart()\n\t{\n\t\tif ($this->debug)\n\t\t{\n\t\t\techo \"<br>Creating new cart\";\n\t\t}\n\n\t\t$user = User::getInstance();\n\n\t\t$uId = 'NULL';\n\t\t$cart = new \\stdClass();\n\t\tif (!$user->get('guest'))\n\t\t{\n\t\t\t$uId = $user->id;\n\t\t\t$cart->linked = 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$cart->linked = 0;\n\t\t}\n\n\t\t$sql = \"INSERT INTO `#__cart_carts` SET `crtCreated` = NOW(), `crtLastUpdated` = NOW(), `uidNumber` = {$uId}\";\n\t\t$this->_db->setQuery($sql);\n\t\t$this->_db->query();\n\t\t$crtId = $this->_db->insertid();\n\n\t\t$session = \\App::get('session');\n\t\t$cart->crtId = $crtId;\n\t\t$this->crtId = $cart->crtId;\n\t\t$session->set('cart', $cart);\n\n\t\t// Set cookie for non logged-in users to recover the cart\n\t\tif ($user->get('guest'))\n\t\t{\n\t\t\tif ($this->debug)\n\t\t\t{\n\t\t\t\techo \"<br>Setting a cookie\";\n\t\t\t}\n\t\t\tsetcookie(\"cartId\", $crtId, time() + $this->cookieTTL); // Set cookie life time\n\t\t}\n\n\t\t// Update session cart\n\t\t$this->syncSessionCart();\n\t}", "title": "" }, { "docid": "467b628db940ce2ad390649329aba9c7", "score": "0.53339076", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\t// Get user\n\t\t$user = User::getInstance();\n\n\t\t//Set the user scope\n\t\t$this->warehouse->addAccessLevels($user->getAuthorisedViewLevels());\n\n\t\t$this->cart = new \\stdClass();\n\n\t\t// Load current user cart\n\n\t\t// Check if there is a session or cookie cart\n\n\t\t// Get cart from session\n\t\t$cart = $this->liftSessionCart();\n\n\t\t// If no session cart, try to locate a cookie cart (only for not logged in users)\n\t\tif (!$cart && $user->get('guest'))\n\t\t{\n\t\t\t$cart = $this->liftCookie();\n\t\t}\n\n\t\tif ($cart)\n\t\t{\n\t\t\t// If cart found and user is logged in, verify if the cart is linked to the user cart in the DB\n\t\t\tif (!$user->get('guest'))\n\t\t\t{\n\t\t\t\tif (empty($this->cart->linked) || !$this->cart->linked)\n\t\t\t\t{\n\t\t\t\t\t// link carts if not linked (this should only happen when user logs in with a cart created while not logged in)\n\t\t\t\t\t// if linking fails create a new cart\n\t\t\t\t\tif (!$this->linkCarts())\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->createCart();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} // Make sure cart is marked as unlinked is the user is not logged in\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->cart->linked = 0;\n\t\t\t}\n\t\t} // If no session & cookie cart found, but user is logged in\n\t\telseif (!$user->get('guest'))\n\t\t{\n\t\t\t// Try to get the saved cart in the DB\n\t\t\tif (!$this->liftUserCart($user->id))\n\t\t\t{\n\t\t\t\t// If no session, no cookie, no DB cart -- create a brand new cart\n\t\t\t\t$this->createCart();\n\t\t\t}\n\t\t} // No session, no cookie -- create new cart\n\t\telse\n\t\t{\n\t\t\t$this->createCart();\n\t\t}\n\t}", "title": "" }, { "docid": "0d1448c139e0c1a24f5f15469904e358", "score": "0.533033", "text": "function carts()\n\t\t{\n\t\t\tif ( ! $this->data['user'])\n\t\t\t{\n\t\t\t\t$this->flexi_cart->set_error_message('You must login to view saved carts.', 'public', TRUE);\n\t\t\t\tredirect('login');\n\t\t\t}\n\n\t\t\t// The load/save/delete cart data functions require the flexi cart ADMIN library.\n\t\t\t$this->load->library('flexi_cart_admin');\n\n\t\t\t// Create an SQL WHERE clause to list all previously saved cart data for a specific user.\n\t\t\t// This examples also prevents cart session data from confirmed orders being loaded, by checking the readonly status is set at '0'.\n\t\t\t$sql_where = array(\n\t\t\t\t$this->flexi_cart->db_column('db_cart_data', 'user') => $this->data['user']->id,\n\t\t\t\t$this->flexi_cart->db_column('db_cart_data', 'readonly_status') => 0\n\t\t\t);\n\t\t\t// Get a list of all saved carts that match the SQL WHERE statement.\n\t\t\t$this->data['saved_cart_data'] = $this->flexi_cart_admin->get_db_cart_data_query(FALSE, $sql_where)->result_array();\n\n\t\t\t// Get any status message that may have been set.\n\t\t\t$this->data['message'] = $this->session->flashdata('message');\n\n\t\t\t$this->load->view('public/dashboard/carts_view', $this->data);\n\t\t}", "title": "" }, { "docid": "0e2f3e5c4f268659173008235374f149", "score": "0.53301746", "text": "function getCart($cart) //when i get a cart, i can manipulate\n {\n $this->cart=$cart;\n }", "title": "" }, { "docid": "0dd2ef367ffbe4115288f9316585e277", "score": "0.532057", "text": "public function set_id_cart($id_cart) \n\t{\n\t\t$this->id_cart = $id_cart;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "90947d9196da5458f6b9e98a37600c15", "score": "0.530259", "text": "public function getCartInfo () {\n\n $data = array(\n 'itemsCount' => 0,\n 'total' => 0\n );\n\n $order = $this->getOrder();\n\n if ( !$order ) {\n return $data;\n }\n\n $data['itemsCount'] = count( $order->getItems() );\n $data['total'] = $order->getTotal();\n\n return $data;\n }", "title": "" }, { "docid": "67037f9965a7591754be2a2116d7e251", "score": "0.52970165", "text": "public function getCart($account_id);", "title": "" }, { "docid": "01c599fb70e1dddb5d35551e3825e17c", "score": "0.52604765", "text": "public function addCartItem($rateplanId, $quantity){\r\n\t\terror_log('cart.php rateplanId is: ' . $rateplanId, 0);\r\n\t\terror_log('cart.php quantity is: ' . $quantity, 0);\r\n\t\t//$newCartItem = new Cart_Item($rateplanId, $quantity, $this->latestItemId);\r\n\r\n\r\n\r\n\t\t$newCartItem = new Cart_Item();\r\n\t\t$newCartItem->ratePlanId = $rateplanId;\r\n\t\terror_log('cart.php ratePlanId2 is: ' . $newCartItem->ratePlanId, 0);\r\n\t\t$newCartItem->itemId = $this->latestItemId++;\r\n\t\terror_log('cart.php itemId is: ' . $newCartItem->itemId, 0);\r\n\t\t$newCartItem->quantity = $quantity;\r\n\r\n\t\t//$plan = Catalog::getRatePlan($newCartItem->ratePlanId);\r\n\t\t$rpId = $newCartItem->ratePlanId;\r\n\r\n\t\r\n\r\n\r\n\t\t$catalog_groups = self::readCache();\t//should be in associative array already.\r\n\r\n\t\t$catalog_products = $catalog_groups->products;\t//returns enture product array.\r\n\t\t//error_log(print_r($catalog_products, true));\r\n\t\t//error_log(print_r($catalog_products[2], true));\t//returns a product array with productrateplan and productrateplancharges arrays embedded inside.\r\n\t\t$catalog_rateplans = $catalog_products[0]->productRatePlans;\r\n\t\t//error_log(print_r($catalog_rateplans, true));\r\n\r\n\r\n\r\n\t\t//Commented out for DEMO\r\n\t\t// foreach($catalog_groups as $group){\r\n\t\t// \t\r\n\t\t// \tforeach($group->products as $product){\r\n\t\t// \t\t\r\n\t\t// \t\tforeach($product->productRatePlans as $ratePlan){\r\n\t\t// \t\t\tif($ratePlan->id == $rpId){\r\n\t\t// \t\t\t\t$plan = $ratePlan;\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// $plan = NULL;\r\n\r\n\t/**\r\n\t * Given a RatePlan ID, retrieves all rateplan information by searching through the cached catalog file\r\n\t * @return RatePlan model\r\n\t */\r\n\t// public static function getRatePlan($rpId){\r\n\t// \t$catalog_groups = self::readCache();\r\n\t// \tforeach($catalog_groups as $group){\r\n\t// \t\tforeach($group->products as $product){\r\n\t// \t\t\tforeach($product->ratePlans as $ratePlan){\r\n\t// \t\t\t\tif($ratePlan->Id == $rpId){\r\n\t// \t\t\t\t\treturn $ratePlan;\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// \treturn NULL;\r\n\t// }\r\n\r\n\r\n/*\t\t//Not needed? no Uom. \r\n\t\tif(isset($plan->Uom)){\r\n\t\t\t$newCartItem->uom = $plan->Uom;\r\n\t\t} else {\r\n\t\t\t$newCartItem->uom = null;\t\t\t\r\n\t\t}\r\n*/\t\r\n\t\t// $newCartItem->ratePlanName = $plan!=null ? $plan->Name : 'Invalid Product';\r\n\t\t// $newCartItem->ProductName = $plan!=null ? $plan->productName : 'Invalid Product';\r\n\r\n\t\t//Commented out for DEMO\r\n\t\t// $newCartItem->ratePlanName = $plan!=null ? $plan->name : 'Invalid Product';\r\n\t\t// $newCartItem->productName = $plan!=null ? $plan->productName : 'Invalid Product';\r\n\t\tarray_push($this->cart_items, $newCartItem);\r\n\t}", "title": "" }, { "docid": "65f41c6f772616cb3738390f52530af5", "score": "0.52582234", "text": "protected function GetCartRecord_ifKnown() {\n\tif (!$this->IsCartCached()) {\t// Cart record not cached?\n\t if (!$this->IsNew()) {\t\t// Session record has been created?\n\t\t$this->SetCartRecord_fromCurrentID();\t// fetch/cache the Cart record\n\t }\n\t}\n\treturn $this->rcCart;\n }", "title": "" }, { "docid": "d1d89e6c97ea73df104ef2c71c8232ea", "score": "0.5230892", "text": "public function __construct()\n\t{\n\t\t$this->config = Kohana::config_load('simple_cart');\n\t\tif (Simple_Auth::instance()->logged_in(NULL))\n\t\t{\n\t\t\t$this->user = Simple_Auth::instance()->get_user();\n\t\t}\n\t\t\n\t\tif ($this->use_db AND empty($_SESSION[$this->config['cart_key']]) AND is_object($this->user))\n\t\t{\n\t\t\t$this->db_get();\n\t\t}\n\t}", "title": "" }, { "docid": "31928896f7fdb1ff80ffd0eecb11b287", "score": "0.52228266", "text": "function getCart(){\n \treturn $this->myCart->getList();\n }", "title": "" }, { "docid": "e0324c3dc9505fed82239a2e879fb4cc", "score": "0.5210443", "text": "function get_cartvars(){\n\t$cart = $_SESSION['custCart_ID']; // the SESSION and COOKIE customer cart items array\n\t// Check for session array with current cart items \n\tif ( isset($_SESSION[$cart]) ) {\n\t // build an associative array of cart items\n\t $cartdata = array(); // individual cart line items\n\t foreach ($_SESSION[$cart] as $key => $val) {\n\t\t// found customer scart item, print to list\n\t\tforeach ($_SESSION[$cart][$key] as $field => $contents) {\n\t\t\t$cartdata[$key][$field] = $contents; // add next item element to line item\n\t\t}\n\t }\n\t} // end check for session array with current cart items\n\treturn $cartdata;\n}", "title": "" }, { "docid": "c1be3e120b9c14abacfa4c7d2d4a4337", "score": "0.5206027", "text": "public function getPurchaseId($cartId);", "title": "" }, { "docid": "a257b047ede5f9787061ccdda4a83082", "score": "0.51926523", "text": "function getCartId()\n {\n if (!$this->_cart) {\n return $this->_cart_id;\n } else {\n return $this->_cart->id;\n }\n }", "title": "" }, { "docid": "93f4b836f14f943f25ed373449d7e2fb", "score": "0.5188521", "text": "public function setCart()\n {\n }", "title": "" }, { "docid": "4813cd955be48821d4b10e7c1fc8778f", "score": "0.5182973", "text": "function data_cart($dbc, $cart_id) {\r\n\t// Additionally, assure that the latest chosen coupon code is always used \r\n\t$q = \"UPDATE carts SET country = '$_SESSION[country]', promo_code_id = '\" . $_SESSION['coupon']['id'] . \"' WHERE carts.id = $cart_id;\";\r\n\t//$_SESSION['test'] = $q;\r\n\tmysqli_query($dbc,$q);\r\n\t\r\n\t$q = \"SELECT pet_country.name_en as pet_country, products.id as product_id, ordered_products.product_subid, product_subids.descr as subid, product_subids.descr_short as subid_short, products_lang.name, products_lang.short_name, pets.pet_id, pets.name as pet_name, pets.flag, ordered_products.id as ordered_product_id, qty, price\r\n\t\t\t\tFROM carts\r\n\t\t\t\tLEFT JOIN countries ON countries.iso = carts.country\r\n\t \t\tLEFT JOIN ordered_products ON carts.id = ordered_products.order_id\r\n\t \t\tLEFT JOIN products ON products.id = ordered_products.product_id\r\n\t\t\t\tLEFT JOIN products_price ON products.id = products_price.product_id AND countries.currency = products_price.currency\r\n\t\t\t\tLEFT JOIN products_lang ON products.id = products_lang.product_id AND countries.lang = products_lang.lang\r\n\t\t\t\tLEFT JOIN product_subids ON ordered_products.product_subid = product_subids.product_subid AND countries.lang = product_subids.lang\r\n\t \t\tLEFT JOIN pets ON ordered_products.pet_id = pets.pet_id\r\n\t \t\tLEFT JOIN countries pet_country ON pets.flag = pet_country.iso\r\n\t\t \t\tWHERE carts.id = $cart_id\r\n\t\t \t\tORDER BY pets.name ASC, products.id ASC, ordered_products.product_subid ASC\";\r\n $r = mysqli_query($dbc,$q);\r\n\treturn $r;\r\n}", "title": "" }, { "docid": "0e8021d1b44530a19416da9bd99d28e9", "score": "0.5179375", "text": "private function getCart()\n {\n if (array_key_exists('cart', $_SESSION)) {\n $this->items = $_SESSION['cart'];\n }\n return;\n }", "title": "" }, { "docid": "037dde2c8e84a5986e4347793932f279", "score": "0.51757", "text": "protected function get_item_data($cart_item)\n {\n }", "title": "" }, { "docid": "5a280d6cce6091ee7ab86c6469e28019", "score": "0.5163236", "text": "public function getCartItemsByCardId($id)\n {\n\n\n $select = $this->tableGateway->getSql()->select();\n $select->columns(array(\n 'sum_quantity' => new Expression('SUM(cart_items.qty)'),\n 'sum_price' => new Expression('SUM(cart_items.price)'),\n 'cart_item_id' => 'cart_item_id',\n 'cart_id' => 'cart_id',\n 'product_id' => 'product_id',\n 'weight' => 'weight',\n 'qty' => 'qty',\n 'unit_price' => 'unit_price',\n 'price' => 'price'\n ));\n\n\n $select->join(array(\"p\" => \"products\"), \"p.product_id=cart_items.product_id\", array(\"product_desc\", \"product_name\", \"product_thumbnail\", \"price\"), \"left\");\n\n $select->where(array(\"cart_items.cart_id\" => $id));\n $select->group(array(\"group\" => \"p.product_id\"));\n\n //echo $select->getSqlString();die;\n\n $resultSet = $this->tableGateway->selectWith($select);\n\n $results = array();\n foreach ($resultSet as $r) {\n $results[] = $r;\n }\n\n return $results;\n }", "title": "" }, { "docid": "4068c631879361e7b73a95ddd6289535", "score": "0.51601034", "text": "public function __construct($cart)\n {\n $this->cart = $cart;\n }", "title": "" }, { "docid": "69171d677b425adc99f07684606a5626", "score": "0.51545364", "text": "function getCart() {\n\t\t$cartData = array();\n\t\t\tif($stmt = $this->connection->prepare(\"select * FROM cart;\")) {\n\t\t\t\t$stmt -> execute();\n\n\t\t\t\t$stmt->store_result();\n\t\t\t\t$stmt->bind_result($id, $itemName, $itemDesc, $numberOf, $price);\n\n\t\t\t\tif($stmt ->num_rows >0){\n\t\t\t\t\twhile($stmt->fetch() ){\n\t\t\t\t\t\t$cartData[] = array(\n\t\t\t\t\t\t\t'id' =>$id,\n\t\t\t\t\t\t\t'productName' => $itemName,\n\t\t\t\t\t\t\t'productDescription' => $itemDesc,\n\t\t\t\t\t\t\t'numberOf' => $numberOf,\n\t\t\t\t\t\t\t'price' => $price\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\treturn $cartData;\n\t}", "title": "" }, { "docid": "fd420c54bf8a83053a3e77c3a653ebc4", "score": "0.5153643", "text": "public function retrieve()\r\n\t\t{\r\n\t\t\t//Validate request method\r\n\t\t\tif($this->getRequestMethod() != \"GET\"){\r\n\t\t\t\t$this->methodNotAllowed();\r\n\t\t\t}\r\n\r\n\t\t\t$arrGetData = array(\"fields\"=>\"c.sCartName,p.sProductName,c.iTotal,c.iTotalDiscount,c.iTotalWithDiscount,c.iTotalTax,c.iTotalWithTax,c.iGrandTotal\");\r\n\t\t\t$arrCartList = $this->getRecord($this->_sCartTable.' c',$arrGetData,'cart-join');\r\n\t\t\t$iStatus \t = (count($arrCartList)>0) ? 'Success' : 'False';\r\n\t\t\t$sMessage\t = (count($arrCartList)>0) ? 'Total '.count($arrCartList).' record(s) found.' : \"Record not found.\";\r\n\t\t\t$arrData \t = (count($arrCartList)>0) ? $arrCartList : \"Record not found.\";\r\n\t\t\t$iTotalRecord = count($arrCartList);\r\n\r\n\t\t\t$arrResponse['status']\t\t= $iStatus;\r\n\t\t\t$arrResponse['message']\t\t= $sMessage;\r\n\t\t\t$arrResponse['total_record']= $iTotalRecord;\r\n\t\t\t$arrResponse['data']\t\t= $arrData;\r\n\t\t\t$this->response($this->json($arrResponse), 200);\r\n\t\t}", "title": "" }, { "docid": "d12f92b7b5300a1378484e2fe866dabb", "score": "0.5147758", "text": "public function setupData();", "title": "" }, { "docid": "dcf912b470a268ae1dc3d8106b9242d1", "score": "0.51358885", "text": "public function __construct()\n {\n $this->id = rand(1, 10000);\n $this->createCartStructure();\n }", "title": "" }, { "docid": "5b78736a477596c91af9af7ab3c265a1", "score": "0.51339704", "text": "function add_table_data($connID,$database){\n // new order data in tables\n\t$order_info = \"scart_purchases\"; // purchases table - order header info\n\t$order_items = \"scart_purchdetail\"; // purchdetail table - order item info\n\t$nextorderid = $_SESSION['newOrder_ID']; // SESSION variable for next order id\n // session order information references\n\t$cart = $_SESSION['custCart_ID']; // the SESSION and COOKIE customer cart items array\n\t$orderitems = count($_SESSION[$cart]); // number of items on the order\n\t$currentcust = $_SESSION['custID']; // => 23\n\t$currentuser = $_SESSION['strUser']; // => ghornbec\n\t$order_stamp = $_SESSION['login_time']; // => 2014-12-07 15:58:49\n\t$ordertotal = get_order_total(); // current carts (session vars) order total\n\t// insert command table1 new order header information\n\t$cmdorder = \"insert into $order_info (custid, order_quantity, order_total, cust_userid, order_stamp)\n\t\t values ($currentcust, $orderitems, $ordertotal, '$currentuser', '$order_stamp');\";\n\t$result = mysql_query($cmdorder);\n\tif ($result) {\n\t // insert good table1 new order header information\n\t // insert command table2 new order item details\n\t // retireve cart item contents array\n\t $data = get_cartvars(); // individual cart line items\n\t // ========= start order items data records from $_SESSION['custCart_ID'] => cartItems23 =========\n\t for ($row = 0; $row < count($data); $row++) {\n\t\t $rowbookid = $data[$row]['bookid']; // current row bookid\n\t\t $rowprice = get_price($rowbookid); // current row price\n\t\t $rowqty = $data[$row]['qty']; // current row quantity\n\t\t $rowitem = intval($row+1); // current row order line item\n\t\t $cmditems = \"insert into $order_items \n\t\t\t\t(order_quantity, bookid, orderid, line_item, order_price, order_stamp)\n\t\t\t values ($rowqty, $rowbookid, $nextorderid, $rowitem, $rowprice, '$order_stamp');\";\n\t\t $result2 = mysql_query($cmditems);\n\t\t if ($result2) {\n\t\t /* echo \"New record created successfully\"; */\n\t\t // print '<script type=\"text/javascript\">';\n\t\t // print 'alert(\"insert order_item number '.$row.' \\n\\insert into '\n\t\t\t//\t.$order_items.' for bookid id '.$rowbookid.'\\n\\n\")';\n\t\t // print '</script>'; \n\t\t } else {\n\t\t // usually a duplicate error, but could be something else\n\t\t print '<script type=\"text/javascript\">';\n\t\t print 'alert(\"query result mysql_errno is = '.mysql_errno($connID).' !\\nmysql_errormsg = '\n\t\t\t\t .mysql_error($connID).'\\nNo results found - Returning empty!\\n\")';\n\t\t print '</script>'; \n\t\t }\n\t } // end of single row for statement\n\t // ========= finish order items data records from $_SESSION['custCart_ID'] => cartItems23 =========\n\t// echo \"New record created successfully\";\n\t print '<script type=\"text/javascript\">';\n\t print 'alert(\"New order inserted into '\n\t\t .$order_info.'\\n\\n for new order id '.$nextorderid.'\\n\\n\")';\n\t print '</script>'; \n\t return $nextorderid;\n\t} else {\n\t print '<script type=\"text/javascript\">';\n\t print 'alert(\"query result mysql_errno is = '.mysql_errno($connID).' !\\nmysql_errormsg = '\n\t\t\t .mysql_error($connID).'\\nNo results found - Returning empty!\\n\")';\n\t print '</script>'; \n\t return 0;\n\t}\n}", "title": "" }, { "docid": "fc1e86f96ed3b5847c400ffa88768d04", "score": "0.5117049", "text": "protected function CartTable($id=NULL) {\n\treturn $this->GetConnection()->MakeTableWrapper($this->CartsClass(),$id);\n }", "title": "" }, { "docid": "77fdb0a8c36c96703ddd18847fafe2f6", "score": "0.51151955", "text": "public function cartData(){\n $data = [];\n $data['items'] = [];\n\n // foreach(Cart::content() as $kkey=>$cart){}\n foreach ($datas as $key => $item) {\n $itemDetails = [\n 'name' => $item->name,\n 'price' => $item->price,\n 'qty' => $item->qty\n ];\n\n $data['items'][] = $itemDetails;\n }\n\n // $data['invoice_id'] = unique();\n $data['invoice_id'] = $invoiceId;\n $data['invoice_description'] = \"Payment Invoice!\";\n $data['return_url'] = route('payment.store');\n $data['cancel_url'] = route('payment.index')->with('danger', 'Transaction Failed! Ask Admin for help.');\n\n $total = 0;\n foreach($data['items'] as $item) {\n $total += $item['price']*$item['qty'];\n }\n\n $data['total'] = $total;\n // give a discount of 10% of the order amount\n // $data['shipping_discount'] = round((10 / 100) * $total, 2);\n $data['shipping_discount'] = 0;\n\n return $data;\n }", "title": "" }, { "docid": "274726de545be91f7c835fb623b3ce2e", "score": "0.51038927", "text": "public function addToCart() {\n\t\t$baseQuantity = 1;\n\t\t$result = $this->db->select();\n\t\twhile(($row = mysql_fetch_assoc($result)) != FALSE){\n\t\t\t$_SESSION['cart'][] = array($row['id'], $row['name'], $row['description'], $row['cost'], $baseQuantity);\n\t\t}\n\t}", "title": "" }, { "docid": "cb9ee46ea33c155c69e614620ad54ab3", "score": "0.5102712", "text": "public function put($cartId, $data);", "title": "" }, { "docid": "3fd091f3a7cfe36658bd029a3a07f06f", "score": "0.5101921", "text": "public function createCart() {\n if (!is_array($this->cart)) {\n $this->cart = array();\n $this->updateSession();\n }\n }", "title": "" }, { "docid": "643f519b3c2966780da556d7f5539695", "score": "0.5098195", "text": "function wpsc_cart_item($product_id, $parameters, $cart) {\n global $wpdb;\n // still need to add the ability to limit the number of an item in the cart at once.\n // each cart item contains a reference to the cart that it is a member of, this makes that reference\n // The cart is in the cart item, which is in the cart, which is in the cart item, which is in the cart, which is in the cart item...\n $this->cart = &$cart;\n\n\n foreach($parameters as $name => $value) {\n $this->$name = $value;\n }\n\n\n $this->product_id = absint($product_id);\n // to preserve backwards compatibility, make product_variations a reference to variations.\n $this->product_variations =& $this->variation_values;\n\n\n\n if(($parameters['is_customisable'] == true) && ($parameters['file_data'] != null)) {\n $this->save_provided_file($this->file_data);\n }\n $this->refresh_item();\n }", "title": "" }, { "docid": "0365c8d3a9cdc87ae390a51a64aa68c1", "score": "0.50919473", "text": "public function getCart():Cart { //o metodo vai retornar uma instancia da classe Cart\n\n //criar a instancia da classe\n $cart = new Cart();\n\n $cart->get((int)$this->getidcart()); //apontar o objeto para retornar os dados do carrinho, o this, indica dado da propria classe\n\n return $cart;\n\n }", "title": "" }, { "docid": "971317a29dbaf63a59e027bec4b7e4e4", "score": "0.5074983", "text": "public function __construct(){ \n \tparent::__construct(); \n \tif(isset($_SESSION['cart'])){\n \t\t$this->cart = $_SESSION['cart'];\n \t}\n }", "title": "" }, { "docid": "fc976111d6dca6ea6d44287455b5f7f5", "score": "0.50655603", "text": "function getCart()\n {\n if (!$this->_cart) {\n if ($this->_cart_id) {\n $cart_dao = new cart_CartDAO;\n $this->_cart = $cart_dao->fetch($this->_cart_id);\n if (!$this->_cart) {\n trigger_error(\"Failed to find cart for id={$this->_cart_id}\", E_USER_WARNING);\n }\n }\n }\n return $this->_cart;\n }", "title": "" }, { "docid": "d14ca5dfd012313d85c2748bdb157b24", "score": "0.5058421", "text": "public function __construct(Cart $cart)\n\t{\n\t\t$this->cart = $cart;\n\t}", "title": "" }, { "docid": "a1a54e279b03a92f822245e7609dfde6", "score": "0.50538176", "text": "public function testCheckCart()\n {\n \n\n $customerSession = $this->getModelMock('customer/session', array('getQuote', 'start', 'renewSession', 'init'));\n $this->replaceByMock('model', 'customer/session', $customerSession);\n \n $itemsCollection = array();\n $product = new Varien_Object();\n $product->setId(1);\n $item = new Varien_Object();\n $item->setProduct($product);\n $item->setId(1);\n $itemsCollection[] = $item;\n $item = new Varien_Object();\n $product->setId(2);\n $item->setProduct($product);\n $item->setId(2);\n $itemsCollection[] = $item;\n $item = new Varien_Object();\n $product->setId(3);\n $item->setProduct($product);\n $item->setId(3);\n $itemsCollection[] = $item;\n $quoteMock = $this->getModelMock('sales/quote', array('getAllItems'));\n $quoteMock->expects($this->any())\n ->method('getAllItems')\n ->will($this->returnValue($itemsCollection));\n $this->replaceByMock('model', 'sales/quote', $quoteMock);\n $quote = Mage::getModel('sales/quote')->load(2);\n $checkoutSession = $this->getModelMock('checkout/session', array('getQuote', 'start', 'renewSession', 'init'));\n $checkoutSession->expects($this->any())\n ->method('getQuote')\n ->will($this->returnValue($quote));\n $this->replaceByMock('model', 'checkout/session', $checkoutSession);\n \n $this->assertEquals(21, Mage::helper('postident/data')->checkCart());\n }", "title": "" }, { "docid": "6ca02ad0250e67278b2434d883211112", "score": "0.5049847", "text": "public function get_id_cart()\n\t{\n\t\treturn $this->id_cart;\n\t}", "title": "" }, { "docid": "09b2eed3f51461d6ace945f781612924", "score": "0.5048572", "text": "function\tnewFromCustomerCart( $_key, $_id, $_customerCartNo) {\n\t\tFDbg::begin( 1, basename( __FILE__), __CLASS__, __METHOD__.\"( '$_key', $_id, '$_customerCartNo')\") ;\n\t\t/**\n\t\t * create the (provisionary) PCuComm and CuComm for each distinct supplier\n\t\t */\n\t\t$this->_newFrom( \"CustomerCart\", $_customerCartNo, \"\", \"\", \"900000\", \"949999\") ;\t\t// create a new instance\n//\t\t$myCustomerRFQPos\t=\tnew CustomerRFQItem() ;\n//\t\t$myCustomerRFQItem->CustomerRFQNo\t=\t$this->CustomerRFQNo\n//\t\tfor ( $valid = $myCustomerRFQPos->firstFromDb( \"CustomerRFQNo\", \"\", null, \"\", \"ItemNo, SubItemNo \") ;\n//\t\t\t\t$valid ;\n//\t\t\t\t$valid = $myCustomerRFQPos->nextFromDb()) {\n//\t\t\t$myCustomerRFQPos->updateInDb() ;\n//\t\t}\n\t\t$buffer\t=\t\"\" ;\n\t\tFDbg::end() ;\n\t\treturn $buffer ;\n\t}", "title": "" }, { "docid": "086b7dc16d107ed7904418741359d540", "score": "0.5047501", "text": "public function fetchData($id)\n\t{\n\t\t//list($arg1, $arg2) = $args;\n\t\t$query=\"SELECT * FROM \".self::$tableName.\" WHERE product_id=\".$id;\n\n\t\t$row = $this->db->getRow($query);\n\t\t\n\t\tif (count($row) > 0)\n\t\t\t$this->setPropertyValues($row);\n\n\t\tif ($this->product_id > 0)\n\t\t\t$this->exists = true;\n\t}", "title": "" }, { "docid": "d331467e7eca5018a4f3556d5080af8a", "score": "0.50340086", "text": "public function getCartEntityById($id) {\n $obj_store = $this->getStore();\n $cart_obj = $obj_store->fetchOne(\"SELECT * FROM carts WHERE id= $id\");\n return $cart_obj;\n }", "title": "" }, { "docid": "d8670879f5e82f2edfa559c52076fab2", "score": "0.50305617", "text": "public function scopeCartItems($query, $userId)\n{\n $cartItems = array(); //an array for storing cart items\n\n $userCartExistence = $query->HasCart($userId); // check if this user has any cart, returns true or false\n\n\n if($userCartExistence)\n {\n $userCart = $query->UserCart($userId); //user's cart object\n\n foreach($userCart->files as $item)\n {\n $item->productType = 'file';\n $cartItems[] = $item;\n }\n\n foreach($userCart->episodes as $item)\n {\n $item->productType = 'episode';\n $cartItems[] = $item;\n }\n\n foreach($userCart->plans as $item)\n {\n $item->productType = 'plan';\n $cartItems[] = $item;\n }\n }\n\n\n return $cartItems;\n}", "title": "" }, { "docid": "c0ed1e2013b656e79a5bf39552162ec2", "score": "0.50291103", "text": "private function setCartId(string $cartId) {\n $this->cartId = $cartId;\n }", "title": "" }, { "docid": "c4860fa5a13bc0ae4ce8039ae3c9800d", "score": "0.50266284", "text": "public function findCartBySessionId($id)\n {\n \t$cart = $this->model->whereSessionId($id)->first();\n \n \treturn $cart;\n }", "title": "" }, { "docid": "1e3c0291b50bbae5910bf6960a810498", "score": "0.5018941", "text": "public function testGetCartById()\n {\n }", "title": "" }, { "docid": "87d0a4aaf639e2bdad09d7cc0f403330", "score": "0.5018881", "text": "public function getShoppingInformation($id);", "title": "" }, { "docid": "5f6a98f495c240fbd572f99de357b605", "score": "0.5011857", "text": "private function cObjData_init()\n {\n // Make a backup\n $this->cObjDataBak = $this->pObj->cObj->data;\n\n // DRS\n if ( $this->pObj->b_drs_cObjData )\n {\n $prompt = implode( ', ', array_keys( $this->pObj->cObj->data ) );\n $prompt = 'cObj-data had this elements: ' . $prompt;\n t3lib_div::devlog( '[INFO/COBJ] ' . $prompt, $this->pObj->extKey, 0 );\n }\n // DRS\n // Remove all data\n $this->pObj->cObj->data = null;\n\n // Add mode and view\n $this->pObj->cObj->data[ $this->pObj->prefixId . '.mode' ] = $this->pObj->piVar_mode;\n $this->pObj->cObj->data[ $this->pObj->prefixId . '.view' ] = $this->pObj->view;\n\n // DRS\n if ( $this->pObj->b_drs_cObjData )\n {\n $prompt = 'Init - cObj->data has now this elements: ' . implode( ', ', array_keys( $this->pObj->cObj->data ) );\n t3lib_div::devlog( '[INFO/COBJ] ' . $prompt, $this->pObj->extKey, 0 );\n }\n // DRS\n }", "title": "" }, { "docid": "407df5f1d6f029035fecea7f687efc1b", "score": "0.501174", "text": "public function initialize()\n {\n\n $this->setSource(\"cart\");\n }", "title": "" }, { "docid": "09091e30bb60677bbf6fd8672ab8bd7a", "score": "0.4998575", "text": "protected function initCart(CartInterface $cart)\n {\n $this->setCartPricingSet($cart, $this->pricingProvider->createPricingSet());\n\n // Set default state (for now we set it to \"open\"), do this last since it will persist and flush the cart\n $cartClass = $this->cartClass;\n $this->setCartState($cart, $cartClass::STATE_OPEN);\n\n //Delegate further initialization of the cart to those concerned\n $cartEvents = $this->cartEvents;\n $this->eventDispatcher->dispatch($cartEvents::INIT, new $this->eventClass($cart));\n }", "title": "" }, { "docid": "98ab8a36f99e4ff171d8e6d8e8a2d4ef", "score": "0.49947974", "text": "function _initData()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_data))\n\t\t{\n\t\t\t$club=new stdClass();\n\t\t\t$club->id\t\t\t\t\t= 0;\n\t\t\t$club->name\t\t\t\t\t= null;\n\t\t\t$club->admin\t\t\t\t= 0;\n\t\t\t$club->address\t\t\t\t= null;\n\t\t\t$club->zipcode\t\t\t\t= null;\n\t\t\t$club->location\t\t\t\t= null;\n\t\t\t$club->state\t\t\t\t= null;\n\t\t\t$club->country\t\t\t\t= null;\n\t\t\t$club->founded\t\t\t\t= null;\n\t\t\t$club->phone\t\t\t\t= null;\n\t\t\t$club->fax\t\t\t\t\t= null;\n\t\t\t$club->email\t\t\t\t= null;\n\t\t\t$club->website\t\t\t\t= null;\n\t\t\t$club->president\t\t\t= null;\n\t\t\t$club->manager\t\t\t\t= null;\n\t\t\t$club->logo_big\t\t\t\t= null;\n\t\t\t$club->logo_middle\t\t\t= null;\n\t\t\t$club->logo_small\t\t\t= null;\n\t\t\t$club->logo_icon\t\t\t= null;\n\t\t\t$club->stadium_picture\t\t= null;\n\t\t\t$club->standard_playground\t= null;\n\t\t\t$club->extended\t\t\t\t= null;\n\t\t\t$club->ordering\t\t\t\t= 0;\n\t\t\t$club->checked_out\t\t\t= 0;\n\t\t\t$club->checked_out_time\t\t= 0;\n\t\t\t$club->ordering\t\t\t\t= 0;\n\t\t\t$club->alias\t\t\t\t= null;\n\t\t\t$club->modified\t\t\t\t= null;\n\t\t\t$club->modified_by\t\t\t= null;\n\t\t\t\n\t\t\t$club->dissolved\t= null;\n\t\t\t$club->dissolved_year\t= null;\n\t\t\t$club->unique_id\t= null;\n\t\t\t$club->new_club_id\t= null;\n\t\t\t$club->enable_sb\t= null;\n\t\t\t$club->sb_catid\t= null;\n\t\t\t$club->founded_year\t= null;\n\t\t\t\n $userfields = $this->getUserfields();\n foreach( $userfields as $field )\n {\n $fieldname = $field->fieldname; \n $club->$fieldname\t\t\t\t= null;\n }\n\t\t\t\n\t\t\t$this->_data\t\t\t\t= $club;\n\t\t\treturn (boolean) $this->_data;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "d9cef1446537b1e38cfd12ed2096064c", "score": "0.49939173", "text": "public function on_cart_loaded_from_session( $cart ) {\n\t\t\t$this->setup_cart( $cart );\n\t\t}", "title": "" }, { "docid": "1e08210f16fead7865c9369438636c27", "score": "0.49929753", "text": "public function findCartByUserId($id)\n {\n \t$cart = $this->model->whereUserId($id)->first();\n \n \treturn $cart;\n }", "title": "" }, { "docid": "04b91c6dc607bed1f179bf850ac2986e", "score": "0.4989435", "text": "public function clear_cart_data($user_id,$cart_id)\n\t{\n\t\t$this->db->where(\"id\",$cart_id);\n\t\t$this->db->where(\"member_id\",$user_id);\n\t\t$this->db->delete(\"tbl_events_cart\");\n\t\t//echo $this->db->last_query();exit;\n\t}", "title": "" }, { "docid": "0899c6cd13342e6cc564ce1c4c432265", "score": "0.49866858", "text": "public function __construct(Cart $cart)\n {\n $this->cart = $cart;\n }", "title": "" }, { "docid": "109adb1e851a6d78487639f620b70bc9", "score": "0.49806648", "text": "public function setCart_id($cart_id)\n {\n $this->cart_id = $cart_id;\n\n return $this;\n }", "title": "" }, { "docid": "bb537df7e4783e83fef79a67e8cf35b6", "score": "0.49796456", "text": "public function flush($cartId);", "title": "" }, { "docid": "0c71a910eaefddecdde1c42c3d9f448d", "score": "0.49771455", "text": "public function setCartId($cartId)\n\t{\n\t\t$this->parameter['CartId'] = $cartId;\n\t}", "title": "" }, { "docid": "92d6e764af3f5a9ce7dd47f2fee65753", "score": "0.49727926", "text": "public function __construct(){\n $this->cart_contents= !empty($_SESSION['cart_contents'])?$_SESSION['cart_contents']:NULL;\n if ($this->cart_contents === Null){\n\n $this->cart_contents=array('cart_total'=>0,'total_items'=>0);\n }\n }", "title": "" }, { "docid": "b9f7f59581c913220eaef00efcd16022", "score": "0.49689204", "text": "public function __construct()\n {\n $this->catalog = new Catalog();\n $this->cart = new Cart($this->catalog);\n }", "title": "" }, { "docid": "a4198a13e0ddf18b4d55f395d3b7e1ea", "score": "0.4951807", "text": "public function get_id_cart_detail()\n\t{\n\t\treturn $this->id_cart_detail;\n\t}", "title": "" }, { "docid": "62640a08541eb73423b84971ab0c2fc5", "score": "0.49515837", "text": "public function idcarta(){\n\t\treturn $this->_idcarta;\n\t}", "title": "" }, { "docid": "4c0b60b2b496da3b24acbd58ed36f5a5", "score": "0.49486357", "text": "function setSessionCart(){\n\t\t$custid = $_POST['custid'];\n\t\t$custid = $this->mysqli->real_escape_string($custid);\n\n\t\t$query \t= \"SELECT cart FROM tmp_cart WHERE custid = '$custid'\";\n\t\t$result = $this->mysqli->query($query);\n\t\t$row \t= $result->fetch_row();\n\t\t\n\t\t$cart = str_replace(\"+\",\"\\\"\",$row[0]);\n\t\t$_SESSION['cart'] = unserialize($cart);\n\t}", "title": "" }, { "docid": "dc4336a3546d2cb1d007e19591a0f087", "score": "0.49481243", "text": "protected static function availableCart($id,$post)\n {\n $data['value'] = 1 ;\n //$data['value'] = -1;\n $data['message'] = \"\";\n\n if(!empty($post['Cart']['remark']))\n {\n return $data;\n }\n \n $addedCart =\"\";\n $isAvailable = false;\n $allcart = Cart::find()->where(\"uid = :uid and fid = :fid \",[':uid'=>Yii::$app->user->identity->id,':fid'=>$id])->joinWith(['selection'])->all();\n \n if(empty($allcart))\n {\n return $data;\n }\n foreach($allcart as $i => $cart)\n {\n $isAvailable = self::detectAvailable($cart,$post);\n if($isAvailable)\n {\n //$isAvailable = true;\n $addedCart = $cart;\n break;\n }\n }\n\n if($isAvailable)\n {\n $oldQuantity = $addedCart->quantity;\n $addedCart->quantity += $post['Cart']['quantity'];\n if($cart->save())\n {\n self::generateNickName($addedCart->quantity-$oldQuantity,$addedCart->id);\n $data['message'] = Yii::t('cart','Food item has been added to cart.').' '.Html::a('<u>'.Yii::t('cart','Go to my Cart').'</u>', ['/cart/view-cart']).'.';\n $data['value'] = 4;\n //Yii::$app->session->setFlash('success', 'Food item has been added to cart. '.Html::a('<u>Go to my Cart</u>', ['/cart/view-cart']).'.');\n \n }\n else\n {\n $data['message'] = Yii::t('cart',\"Something Went Wrong!\");\n $data['value'] = -1;\n \n }\n }\n return $data;\n }", "title": "" }, { "docid": "3084acf3c7c0f2341dc3ddf1ad648414", "score": "0.4941527", "text": "public function setCartId() {\r\n\t\t$this->data['Order']['session'] = $this->getCartSession();\r\n\t\t$this->save($this->data, array('validate' => false));\r\n\t\treturn $this->getLastInsertID();\r\n\t}", "title": "" }, { "docid": "9422d2d02db2b0e82cb2fcf08fd50fa1", "score": "0.49360538", "text": "public abstract function getCart($merchantID, $awsAccessKeyID);", "title": "" }, { "docid": "460958a09552d00763df42b9352e7ec3", "score": "0.4934899", "text": "public function cartDocumentProvider()\n {\n $data = [];\n\n // Case #0.\n $data[] = [\n [],\n [],\n [],\n ];\n\n // Case #1.\n $document = new ProductDocument();\n $document->setId(11);\n $data[] = [\n [11 => 2],\n [$document],\n [['document' => $document, 'quantity' => 2]],\n ];\n\n // Case #2.\n $document = new ProductDocument();\n $document->setId(11);\n $document2 = new ProductDocument();\n $document2->setId(13);\n $data[] = [\n [13 => 2, 11 => 3],\n [$document, $document2],\n [\n ['document' => $document, 'quantity' => 3],\n ['document' => $document2, 'quantity' => 2],\n ],\n ];\n\n return $data;\n }", "title": "" }, { "docid": "aedeedb3c442fee946efef5e3be8c3b7", "score": "0.4930265", "text": "private function loadShoppingCart()\n {\n $this->view->shoppingCart = null;\n $shoppingCart = Auth_Model_SystemAuth::getInstance()->getAuthVariable('shoppingCart');\n\n if ($shoppingCart != null) {\n $productsList = $shoppingCart->getProducts();\n $this->view->shoppingCart = $this->prepareShoppingCartProducts($productsList);\n }\n }", "title": "" }, { "docid": "a38e0dc869fe944fc3d517062aa7b61f", "score": "0.49252298", "text": "public function getProductsByCart ($cart) {\n\t\t\n $errorCode = 0;\n\t\t$errorMessage = \"\";\n \n \n\t\ttry {\n \n\t\t\t$cart_array = json_decode($cart);\n //var_dump($cart_array);\n $list = \"\";\n $cart = array();\n foreach ($cart_array as $key=>$value) {\n if ($list == \"\") {\n $list = \"$key\"; \n } else {\n $list .= \",$key\";\n }\n $cart[$key] = $value;\n }\n \n $query = \"SELECT ea_product.id, upc, brand, product_name, \n product_description, avg_price, ea_category.name\n\t\t\tFROM ea_product, ea_category\n WHERE ea_product.category_id = ea_category.id\n AND ea_product.id IN ($list)\n\t\t\tORDER BY avg_price\";\n //print(\"$query\");\n\t\t\tforeach($this->dbo->query($query) as $row) {\n\t\t\t\t$id = stripslashes($row[0]);\n\t\t\t\t$upc = strval(stripslashes($row[1]));\n\t\t\t\t$brand = $this->convertFancyQuotes(stripslashes($row[2]));\n\t\t\t\t$product_name = $this->convertFancyQuotes(stripslashes($row[3]));\n\t\t\t\t$product_description = $this->convertFancyQuotes(stripslashes($row[4]));\n\t\t\t\t$avg_price = stripslashes($row[5]);\n\t\t\t\t$category_name = $this->convertFancyQuotes(stripslashes($row[6]));\n \n $product[\"id\"] = $id;\n $product[\"upc\"] = $upc;\n $product[\"brand\"] = $brand;\n $product[\"product_name\"] = $product_name;\n $product[\"product_description\"] = $product_description;\n $product[\"avg_price\"] = $avg_price;\n $product[\"category_name\"] = $category_name;\n $product[\"quantity\"] = \"$cart[$id]\"; \n //\n \n $product[\"image_path\"] = $this->getImagePath($upc);\n \n $products[] = $product;\n\t\t\t}\n\t \n\t\t} catch (PDOException $e) {\n\t\t\t$this->errorCode = 1;\n\t\t\t$errorCode = -1;\n\t\t\t$errorMessage = \"PDOException for getProductsByCategory.\";\n\t\t}\t\n \n \n\t\t$error[\"id\"] = $errorCode;\n\t\t$error[\"message\"] = $errorMessage;\n\t\t\n\t\t$data[\"error\"] = $error;\n\t\t\n\t\t$data[\"search\"] = $category_name;\n $data[\"query\"] = $query;\n \n $data[\"products\"] = $products;\n\t\t\n\t\t\n \n \n $data = json_encode($data);\n \n\t\treturn $data;\n\t}", "title": "" }, { "docid": "ae8243971236245c109f2f48117e9432", "score": "0.49166772", "text": "public function get_cart(){\n return $this->db->get_table($this->cart);\n }", "title": "" }, { "docid": "df290b5f7b244af9d9b8a8633965e5ec", "score": "0.4904518", "text": "function getDataByID($strDataID)\n{\n global $db;\n $tbl = new cGaConsumablePurchase();\n $dataEdit = $tbl->findAll(\"id = $strDataID\", \"\", \"\", null, 1, \"id\");\n $arrTemp = getEmployeeInfoByID($db, $dataEdit[$strDataID]['id_employee'], \"employee_id\");\n $arrResult['dataIdItem'] = $dataEdit[$strDataID]['id_item'];\n $arrResult['dataRequestDate'] = $dataEdit[$strDataID]['request_date'];\n $arrResult['dataItemAmount'] = $dataEdit[$strDataID]['item_amount'];\n $arrResult['dataRemark'] = $dataEdit[$strDataID]['remark'];\n $arrResult['dataConsPurchaseNo'] = $dataEdit[$strDataID]['consumable_purchase_no'];\n $arrResult['dataConsReqNo'] = $dataEdit[$strDataID]['id_consumable_request'];\n //foreach($arrTripCost[$dataDonation ['trip_type']\n return $arrResult;\n}", "title": "" }, { "docid": "c3f4a3a31a6213e6faf81239ceb25c0c", "score": "0.4903226", "text": "public function filterByIdCart($idCart = null, $comparison = null)\n\t{\n\t\tif (is_array($idCart) && null === $comparison) {\n\t\t\t$comparison = Criteria::IN;\n\t\t}\n\t\treturn $this->addUsingAlias(Oops_Db_CustomizationPeer::ID_CART, $idCart, $comparison);\n\t}", "title": "" }, { "docid": "ab9a515b4aad260085b68cc9a98efc26", "score": "0.48992467", "text": "private function set_data() {\r\n $params = array();\r\n $coefs = array();\r\n foreach ($this->groups as $group) {\r\n foreach ($group['items'] as $item => $type) {\r\n if ($type) {\r\n $params[] = $item;\r\n } else {\r\n $coefs[] = $item;\r\n }\r\n }\r\n }\r\n $this->coefs = $coefs;\r\n $this->params = $params;\r\n }", "title": "" }, { "docid": "addc18b3b5bec6dccd17e448883892b0", "score": "0.48947072", "text": "public function getOrderData($dataId, OrderRequest $orderRequest, AbstractTransaction $transaction);", "title": "" }, { "docid": "74f8182797f0453038313c4844992cab", "score": "0.48899257", "text": "function getData() {\t\t\t\t\n\t\trequire_once JPATH_COMPONENT.DS.'helper'.DS.'os_cart.php';\n\t\t$db = & JFactory::getDBO() ;\n\t\t$cart = new EBCart();\t\n\t\treturn $cart->getEvents();\t\t\t\t\t\t\t\t\t\n\t}", "title": "" }, { "docid": "6331444d7d581bf506af1094c20bb1c6", "score": "0.4883144", "text": "public function getData($productId)\n\t{\t\n\t\t//database selection\n\t\t$database = \"\";\n\t\t$constantDatabase = new ConstantClass();\n\t\t$databaseName = $constantDatabase->constantDatabase();\n\t\t\n\t\tDB::beginTransaction();\n\t\t$raw = DB::connection($databaseName)->select(\"select \n\t\tpmst.product_id,\n\t\tpmst.product_name,\n\t\tpmst.alt_product_name,\n\t\tpmst.highest_measurement_unit_id,\n\t\tpmst.higher_measurement_unit_id,\n\t\tpmst.medium_measurement_unit_id,\n\t\tpmst.medium_lower_measurement_unit_id,\n\t\tpmst.lower_measurement_unit_id,\n\t\tpmst.measurement_unit,\n\t\tpmst.primary_measure_unit,\n\t\tpmst.is_display,\n\t\tpmst.highest_purchase_price,\n\t\tpmst.higher_purchase_price,\n\t\tpmst.medium_purchase_price,\n\t\tpmst.medium_lower_purchase_price,\n\t\tpmst.lower_purchase_price,\n\t\tpmst.purchase_price,\n\t\tpmst.highest_unit_qty,\n\t\tpmst.higher_unit_qty,\n\t\tpmst.medium_unit_qty,\n\t\tpmst.medium_lower_unit_qty,\n\t\tpmst.lower_unit_qty,\n\t\tpmst.lowest_unit_qty,\n\t\tpmst.highest_mou_conv,\n\t\tpmst.higher_mou_conv,\n\t\tpmst.medium_mou_conv,\n\t\tpmst.medium_lower_mou_conv,\n\t\tpmst.lower_mou_conv,\n\t\tpmst.lowest_mou_conv,\n\t\tpmst.wholesale_margin,\n\t\tpmst.wholesale_margin_flat,\n\t\tpmst.semi_wholesale_margin,\n\t\tpmst.vat,\n\t\tpmst.purchase_cgst,\n\t\tpmst.purchase_sgst,\n\t\tpmst.purchase_igst,\n\t\tpmst.margin,\n\t\tpmst.margin_flat,\n\t\tpmst.mrp,\n\t\tpmst.igst,\n\t\tpmst.hsn,\n\t\tpmst.color,\n\t\tpmst.size,\n\t\tpmst.variant,\n\t\tpmst.product_description,\n\t\tpmst.minimum_stock_level,\n\t\tpmst.additional_tax,\n\t\tpmst.product_type,\n\t\tpmst.product_menu,\n\t\tpmst.product_code,\n\t\tpmst.item_code,\n\t\tpmst.product_cover_id,\n\t\tpmst.not_for_sale,\n\t\tpmst.max_sale_qty,\n\t\tpmst.best_before_time,\n\t\tpmst.best_before_type,\n\t\tpmst.cess_flat,\n\t\tpmst.cess_percentage,\n\t\tpmst.tax_inclusive,\n\t\tpmst.web_integration,\n\t\tpmst.opening,\n\t\tpmst.remark,\n\t\tpmst.document_name,\n\t\tpmst.document_format,\n\t\tpmst.created_by,\n\t\tpmst.updated_by,\n\t\tpmst.created_at,\n\t\tpmst.updated_at,\n\t\tpmst.deleted_at,\n\t\tpmst.product_category_id,\n\t\tpmst.product_group_id,\n\t\tpmst.branch_id,\n\t\tpmst.company_id,\n\t\tptrm.qty as quantity\n\t\tfrom product_mst as pmst LEFT JOIN product_trn_summary as ptrm ON ptrm.product_id = pmst.product_id where pmst.product_id = '\".$productId.\"' and pmst.deleted_at='0000-00-00 00:00:00'\");\n\t\tDB::commit();\n\t\t\n\t\t//get exception message\n\t\t$exception = new ExceptionMessage();\n\t\t$exceptionArray = $exception->messageArrays();\n\t\tif(count($raw)==0)\n\t\t{\n\t\t\treturn $exceptionArray['404'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//get product-document data\n\t\t\t// $productResult = $this->getProductDocumentData($raw);\n\t\t\t// $enocodedData = json_encode($productResult);\n\t\t\t// return $enocodedData;\n\t\t\treturn json_encode($raw);\n\t\t}\n\t}", "title": "" } ]
fa3b0bf4de23986efff285e3b4b7dafa
Setup before running each test case
[ { "docid": "b54921597c39dbc431843744739b8589", "score": "0.0", "text": "public function setUp()\n {\n }", "title": "" } ]
[ { "docid": "3533d1c495644d9a1cdf4c6e6483a145", "score": "0.80855495", "text": "protected function setUp() {\n\t\t\n\t}", "title": "" }, { "docid": "3533d1c495644d9a1cdf4c6e6483a145", "score": "0.80855495", "text": "protected function setUp() {\n\t\t\n\t}", "title": "" }, { "docid": "d74b08eb9c89d419c47a0c199fb4a8f3", "score": "0.80237913", "text": "protected function setUp() {\n \t}", "title": "" }, { "docid": "2e0630b7a7e24dd18e6eadbbb795c7f8", "score": "0.79955673", "text": "abstract public function setUp();", "title": "" }, { "docid": "f169945faff48a3dd60341456f310bf2", "score": "0.7973833", "text": "protected function setUp() {\n\t}", "title": "" }, { "docid": "8bb624f5ed6295af15cf6c400c414d73", "score": "0.7968416", "text": "protected function setUp() :void {\n\t}", "title": "" }, { "docid": "0d66052891c3ecc8c3486fafb1ad85bd", "score": "0.79599935", "text": "public function setUp() {\n\t\t}", "title": "" }, { "docid": "058a3ceae157c87e019241c5067515e5", "score": "0.7926855", "text": "protected function setUp() { }", "title": "" }, { "docid": "57890fb6380b541d9d66a5986ca35803", "score": "0.792153", "text": "public function setUp()\n\t{\n\t\tparent::setUp();\n\t\t$this -> prepareForTests();\n\t}", "title": "" }, { "docid": "f3b144baf27c06c129ffe4c3e8f379bf", "score": "0.7904265", "text": "public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}", "title": "" }, { "docid": "f3b144baf27c06c129ffe4c3e8f379bf", "score": "0.7904265", "text": "public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}", "title": "" }, { "docid": "cc9e5d04cc51e06c6574f3bc37f5e761", "score": "0.7897371", "text": "protected function setUp() : void {\n \n }", "title": "" }, { "docid": "f20d2c0a55f50e817a444d45a84c88dd", "score": "0.7865736", "text": "public function setup()\n {\n //\n // we need to make sure that it is empty at the start of every\n // test\n InvokeMethod::onString(FirstMethodMatchingType::class, 'resetCache');\n }", "title": "" }, { "docid": "d28df8f6b3b01f65075e252e22673097", "score": "0.7855112", "text": "protected function setUp()\n\t{\n\t}", "title": "" }, { "docid": "d28df8f6b3b01f65075e252e22673097", "score": "0.7855112", "text": "protected function setUp()\n\t{\n\t}", "title": "" }, { "docid": "0daddd8a7500a92bf6013d223395a268", "score": "0.7848647", "text": "public function setup() {}", "title": "" }, { "docid": "0daddd8a7500a92bf6013d223395a268", "score": "0.7848647", "text": "public function setup() {}", "title": "" }, { "docid": "0daddd8a7500a92bf6013d223395a268", "score": "0.7848647", "text": "public function setup() {}", "title": "" }, { "docid": "0daddd8a7500a92bf6013d223395a268", "score": "0.7848647", "text": "public function setup() {}", "title": "" }, { "docid": "e3f7462cfb94e46264b9cc429553225a", "score": "0.7842798", "text": "public function setUp() {}", "title": "" }, { "docid": "eccf5004604e9b4a8036bc9641cf8f10", "score": "0.7831556", "text": "protected function setUp() {\n \n }", "title": "" }, { "docid": "eccf5004604e9b4a8036bc9641cf8f10", "score": "0.7831556", "text": "protected function setUp() {\n \n }", "title": "" }, { "docid": "5145be25d1a783916b481318f65e4f0b", "score": "0.78125954", "text": "protected function setUp() {\n\t\tparent::setUp();\n\t\tMonkey\\setUp();\n\t}", "title": "" }, { "docid": "e3ec27e3ce7d2f8c0013025efb93c472", "score": "0.78000975", "text": "protected function setUp(){\r\n \r\n }", "title": "" }, { "docid": "c8ddcadcab1daede2ceeb4dfc4814d27", "score": "0.77943116", "text": "protected function setUp() {\n\n\t\tparent::setUp();\n\t\tMonkey\\setUp();\n\t}", "title": "" }, { "docid": "2720012d4a0ba48dfc14172079f3ec2a", "score": "0.7783898", "text": "public function setUp();", "title": "" }, { "docid": "2720012d4a0ba48dfc14172079f3ec2a", "score": "0.7783898", "text": "public function setUp();", "title": "" }, { "docid": "e9ffb259c9d7422c0ab7d5c52db73c47", "score": "0.77752006", "text": "public final function setUp() {\n\t\t// run the default setUp() method first\n\t\tparent::setUp();\n\t}", "title": "" }, { "docid": "27ae341755357f50b22f5bdedbe3a729", "score": "0.77727073", "text": "protected function setUp() {\r\n }", "title": "" }, { "docid": "50b451e43cafa1c4079edf52519a6e60", "score": "0.7768499", "text": "function setUp() {\n }", "title": "" }, { "docid": "a550635a00f61860dbec0582c8678718", "score": "0.7767285", "text": "protected function setup()\n\t{\n\t\t//how data will be executed.\n\t}", "title": "" }, { "docid": "a550635a00f61860dbec0582c8678718", "score": "0.7767285", "text": "protected function setup()\n\t{\n\t\t//how data will be executed.\n\t}", "title": "" }, { "docid": "a550635a00f61860dbec0582c8678718", "score": "0.7767285", "text": "protected function setup()\n\t{\n\t\t//how data will be executed.\n\t}", "title": "" }, { "docid": "5dc778f47e270420855383cdb56ae879", "score": "0.7743621", "text": "protected function _setup()\n {\n }", "title": "" }, { "docid": "5dc778f47e270420855383cdb56ae879", "score": "0.7743621", "text": "protected function _setup()\n {\n }", "title": "" }, { "docid": "e2ec27bf834880c98d08f90375f02660", "score": "0.7735681", "text": "function setup() {\n parent::setUp();\n parent::doCreateInternalTestPageIfMissing();\n }", "title": "" }, { "docid": "6043b28905b1b5066dee1ee6b5b64a77", "score": "0.77255636", "text": "abstract protected function setUp(): void;", "title": "" }, { "docid": "b1573af41645f6abe9114cba0b401788", "score": "0.77190596", "text": "public function setUp() {\n check_before_wreck();\n }", "title": "" }, { "docid": "b1573af41645f6abe9114cba0b401788", "score": "0.77190596", "text": "public function setUp() {\n check_before_wreck();\n }", "title": "" }, { "docid": "06c432f23ac02991ee1df3ccfc775d33", "score": "0.77168334", "text": "protected function setUp() {\n\t\t// make sure there's nothing in the cache\n\t\t// TODO: this makes everything oh so slow - should in-mem tests be separated from db tests?\n\t\t//wire('pages')->uncacheAll();\n\n\t\t// populate $this->allPages to be able to run in-memory selector tests.\n\t\t// TODO: this belongs to suite-level setup (does not yet exist)\n\t\tif(is_null($this->allPages)) $this->allPages = wire('pages')->find('include=all');\n\t}", "title": "" }, { "docid": "1ea8196acd475f5faa08b9c5d62248a1", "score": "0.769351", "text": "protected function setUp()\n {\n # Warning:\n PHPUnit_Framework_Error_Warning::$enabled = false;\n\n # notice, strict:\n PHPUnit_Framework_Error_Notice::$enabled = false;\n create_user('test', '[email protected]', 'test');\n $users = list_users();\n /** @var User $user */\n foreach ($users as $user) {\n if ($user->getUsername() === 'test'){\n $this->user = $user;\n break;\n }\n }\n\n create_result($this->user->getId(),10,'2016-12-20');\n $results = get_all_results();\n /** @var Result $result */\n foreach ($results as $result) {\n if ($result->getUser()->getUsername() === 'test'){\n $this->result = $result;\n break;\n }\n }\n }", "title": "" }, { "docid": "53251fa563ad8d73332f3aa228ea2652", "score": "0.76820993", "text": "public function setUp()\n\t{\n\n\t}", "title": "" }, { "docid": "53251fa563ad8d73332f3aa228ea2652", "score": "0.76820993", "text": "public function setUp()\n\t{\n\n\t}", "title": "" }, { "docid": "a43cc036d7543d12c521db6e61af382c", "score": "0.767096", "text": "protected function setUp()\n {\n $this->object = new PerformScript;\n }", "title": "" }, { "docid": "af251b7683f79704391e3ee40d5fafde", "score": "0.7652619", "text": "protected function setUp() {\n }", "title": "" }, { "docid": "af251b7683f79704391e3ee40d5fafde", "score": "0.7652619", "text": "protected function setUp() {\n }", "title": "" }, { "docid": "dd44e1851f9bae7cf2f8334f226e693a", "score": "0.7652196", "text": "public function setUp()\n {\n setup();\n }", "title": "" }, { "docid": "ed0f885b8cbc32e436b3af27c9047006", "score": "0.7650066", "text": "protected function setUp()\r\n {\r\n }", "title": "" }, { "docid": "ed0f885b8cbc32e436b3af27c9047006", "score": "0.7650066", "text": "protected function setUp()\r\n {\r\n }", "title": "" }, { "docid": "df050f11c9589a6d940e8a96b03e4c3d", "score": "0.76391315", "text": "protected function setUp() {\n }", "title": "" }, { "docid": "dde640cdc85570ac2fb6471a19d89372", "score": "0.7637935", "text": "protected function setUp()\r\n\t{\r\n\t\tparent::setUp();\r\n\t\r\n\t}", "title": "" }, { "docid": "f55a1d151cf77103069432a4881929bb", "score": "0.7635086", "text": "abstract public function setup();", "title": "" }, { "docid": "fc2025adb94ec394b08f19d3408ef0ed", "score": "0.7634103", "text": "protected function setUp()\n {\n \n }", "title": "" }, { "docid": "fc2025adb94ec394b08f19d3408ef0ed", "score": "0.7634103", "text": "protected function setUp()\n {\n \n }", "title": "" }, { "docid": "7d739a70f797d47b4626804e364d9e0f", "score": "0.7623367", "text": "protected function setUp()\r\n {\r\n \r\n }", "title": "" }, { "docid": "48b03f2d9a9d33f6af8f5d4693599bf5", "score": "0.7617485", "text": "function setUp()\n {\n }", "title": "" }, { "docid": "e08119149741ea8b3deeb1d5682aacc1", "score": "0.7614294", "text": "protected function setUp() {\r\n\t\tparent::setUp();\r\n\t}", "title": "" }, { "docid": "d5be25c1ef7aba97e39e1f53f2a6c192", "score": "0.7611576", "text": "public function setUp(): void\n {\n if (!defined('RUNNING_TEST')) {\n define('RUNNING_TEST', true);\n }\n\n parent::setUp();\n }", "title": "" }, { "docid": "6dcbbf9e8685243e30127a9806d1ce37", "score": "0.76062095", "text": "protected function setUp()\n {\n parent::setUp();\n // Initialization codes.\n }", "title": "" }, { "docid": "c957a75318a26bbc9c40bb1f77468ed1", "score": "0.75945175", "text": "public function setUp(): void\n {\n $configuration = new Configuration('example-api-key');\n $configuration->setEnabled(false);\n\n $this->inspector = new Inspector($configuration);\n $this->inspector->startTransaction('testcase');\n }", "title": "" }, { "docid": "facd2d7a0148aa6d687a321ab627d23b", "score": "0.7589982", "text": "public function setUp()\n {\n parent::setUp();\n \n $this->prepareForTests();\n }", "title": "" }, { "docid": "c9740471c8a0a80c0e44e435a569405c", "score": "0.75781965", "text": "protected function setUp(): void\n {\n $this->initialArgv = $_SERVER['argv'];\n $_SERVER['argv'] = [getcwd() . '/bin/phpinsights'];\n\n parent::setUp();\n }", "title": "" }, { "docid": "370f4c5664f161bcc31ad6273c8c499a", "score": "0.7564911", "text": "abstract protected function setup();", "title": "" }, { "docid": "0cd10fd7c7e41a700204d150cdb77975", "score": "0.75631857", "text": "protected function setUp()\n {\n parent::setUp();\n $this->performer = new Performer();\n }", "title": "" }, { "docid": "ca78c9ab134d29066316c7ce18a899d0", "score": "0.7561288", "text": "public function setup()\n\t{\n\t\tparent::setUp();\n\t\tArtisan::call('migrate');\n\t\tArtisan::call('db:seed');\n\t\t$this->setVariables();\n\t}", "title": "" }, { "docid": "5bb92623f8afa0994e414376c704511a", "score": "0.75598353", "text": "protected function setUp(): void\n {\n }", "title": "" }, { "docid": "92aabfbdde306d360da5c68e8811c7ba", "score": "0.7559725", "text": "public function setUp()\n {\n // setup test user\n $this->User = $this->createUser();\n\n // setup test company\n $this->RecruitingCompany = $this->createRecruitingCompany($this->User->id);\n\n // setup test token\n $this->RecruitingToken = $this->createRecruitingToken($this->User->id, $this->RecruitingCompany->id);\n\n // test videos\n $this->vids = array();\n }", "title": "" }, { "docid": "586a2bf69d00d3194762977a021d1817", "score": "0.7552607", "text": "protected function setUp()\r\n\t{\r\n\t\tparent::setUp();\r\n\t}", "title": "" }, { "docid": "586a2bf69d00d3194762977a021d1817", "score": "0.7552607", "text": "protected function setUp()\r\n\t{\r\n\t\tparent::setUp();\r\n\t}", "title": "" }, { "docid": "58fe83b38c5c7c0378c9fa996edd81ce", "score": "0.7550267", "text": "public function setUp():void {\n }", "title": "" }, { "docid": "f73417ad0975e3f6d665c1cf45c5e89d", "score": "0.75452536", "text": "protected function setUp(): void\n {\n parent::setUp();\n\n $this->data = include __DIR__ . '/Objects/data.php';\n $this->queries = include __DIR__ . '/Objects/queries.php';\n $this->results = include __DIR__ . '/Objects/results.php';\n }", "title": "" }, { "docid": "5bd47815c577ddee19f3dd290dd76585", "score": "0.7544189", "text": "protected function setUp(): void {\n\t\trequire_once( dirname( __FILE__ ) . '/../vendor/aliasapi/frame/client/create_client.php' );\n\t\trequire_once( dirname( __FILE__ ) . '/TestHelpers.php' );\n\t\trequire_once( dirname( __FILE__ ) . '/TestParameters.php' );\n\n\t\tTestHelpers::prepareDatabaseConfigs();\n\n\t\tClient\\create_client( 'money' );\n\t\t$this->http_client = new GuzzleHttp\\Client( [ 'base_uri' => 'http://money/' ] );\n\t\t$this->tag = 'create_purchase';\n\t}", "title": "" }, { "docid": "220e5040abf002d30f7d80a1d7dc4707", "score": "0.7543595", "text": "protected function setUp()\n {\n $config = array();\n $this->config = $config;\n }", "title": "" }, { "docid": "1034aaa836431c8c1dcd7d54be4b9c08", "score": "0.75393635", "text": "public function setUpBeforeTests()\n {\n }", "title": "" }, { "docid": "2203854a7ac3d9e7f95932db3f4e75f6", "score": "0.75362116", "text": "protected function setUp(){\n }", "title": "" }, { "docid": "492eab46448c74172b18674d9db69c96", "score": "0.7532625", "text": "protected function setUp() {\n\t\tparent::setUp();\n\n\t\t$this->commandOutputHelper = new CommandOutputHelper();\n\t}", "title": "" }, { "docid": "50c4f05e1674d5e0d0a46637cb18251b", "score": "0.75323874", "text": "protected function setUp()\n {\n }", "title": "" }, { "docid": "50c4f05e1674d5e0d0a46637cb18251b", "score": "0.75323874", "text": "protected function setUp()\n {\n }", "title": "" }, { "docid": "50c4f05e1674d5e0d0a46637cb18251b", "score": "0.75323874", "text": "protected function setUp()\n {\n }", "title": "" }, { "docid": "50c4f05e1674d5e0d0a46637cb18251b", "score": "0.75323874", "text": "protected function setUp()\n {\n }", "title": "" }, { "docid": "50c4f05e1674d5e0d0a46637cb18251b", "score": "0.75323874", "text": "protected function setUp()\n {\n }", "title": "" }, { "docid": "50c4f05e1674d5e0d0a46637cb18251b", "score": "0.75323874", "text": "protected function setUp()\n {\n }", "title": "" }, { "docid": "50c4f05e1674d5e0d0a46637cb18251b", "score": "0.75323874", "text": "protected function setUp()\n {\n }", "title": "" }, { "docid": "50c4f05e1674d5e0d0a46637cb18251b", "score": "0.75323874", "text": "protected function setUp()\n {\n }", "title": "" }, { "docid": "50c4f05e1674d5e0d0a46637cb18251b", "score": "0.75323874", "text": "protected function setUp()\n {\n }", "title": "" }, { "docid": "50c4f05e1674d5e0d0a46637cb18251b", "score": "0.75323874", "text": "protected function setUp()\n {\n }", "title": "" }, { "docid": "97a64fa8f532f9994ac5822de830749a", "score": "0.7529581", "text": "protected function setUp()\n\t{\n\t\tmfwServerEnv::setEnv('unittest');\n\t}", "title": "" }, { "docid": "d421d2e611cc1938835be9aea5886065", "score": "0.7527813", "text": "public function setup() {\r\n\r\n\t}", "title": "" }, { "docid": "e8d14dcc0e6ad89b5a32f2e0edd20344", "score": "0.752608", "text": "protected function setUp(): void\n {\n parent::setUp();\n\n $this->setUpToolsAliases(true);\n $this->setUpToolsRoutes();\n $this->setUpToolsModels();\n }", "title": "" }, { "docid": "fcbb1a3b24330e97b5a8974f353cd290", "score": "0.7521794", "text": "public function setUp(): void\n {\n parent::setUp();\n $this->setUpUserAdministrator();\n $this->setUpUserDesign();\n $this->setUpUserPlayer();\n }", "title": "" }, { "docid": "fcbb1a3b24330e97b5a8974f353cd290", "score": "0.7521794", "text": "public function setUp(): void\n {\n parent::setUp();\n $this->setUpUserAdministrator();\n $this->setUpUserDesign();\n $this->setUpUserPlayer();\n }", "title": "" }, { "docid": "45d543b0c16718c7aed12f54cc062949", "score": "0.75106436", "text": "public function setUp()\n {\n parent::setUp();\n $this->init();\n }", "title": "" }, { "docid": "1e4255faf5ade5eb1d86e73e3a5df92a", "score": "0.74993014", "text": "protected function setUp()\n {\n if( !defined('PHPUNIT_RUN')) {\n define( 'PHPUNIT_RUN', 1 );\n }\n $this->homeDir = realpath( dirname(__FILE__) );\n if( !defined('HOME_DIR')) {\n define( 'HOME_DIR', $this->homeDir );\n }\n if( !defined('API_DIR')) {\n define( 'API_DIR' , HOME_DIR . '' );\n }\n if( !defined('APP_DIR')) {\n define( 'APP_DIR' , API_DIR . '/Stub' );\n }\n if( !defined('VALI_DIR')) {\n define( 'VALI_DIR' , API_DIR . '/Stub/Nal/parameterCheck' );\n }\n }", "title": "" }, { "docid": "f3ef1ddefba0a901f59b1eb0b9619312", "score": "0.7497283", "text": "protected function setUp(): void\n {\n if (!\\defined('PHPUNIT_TESTSUITE')) {\n \\define('PHPUNIT_TESTSUITE', true);\n }\n }", "title": "" }, { "docid": "c3818e9786e1f748e77b078f8a5601f6", "score": "0.7494024", "text": "protected function setUp(): void\n {\n $this->year = $this->generateRandomYear(1980);\n }", "title": "" }, { "docid": "28048ff2964e6601eef844919aae69d6", "score": "0.7491891", "text": "protected function setUp(): void\n {\n $this->normalizer = new IISLogging();\n }", "title": "" }, { "docid": "57fa5e97be029f3a4fd4a7cfce491a31", "score": "0.74888724", "text": "public function setup();", "title": "" }, { "docid": "57fa5e97be029f3a4fd4a7cfce491a31", "score": "0.74888724", "text": "public function setup();", "title": "" }, { "docid": "57fa5e97be029f3a4fd4a7cfce491a31", "score": "0.74888724", "text": "public function setup();", "title": "" }, { "docid": "57fa5e97be029f3a4fd4a7cfce491a31", "score": "0.74888724", "text": "public function setup();", "title": "" }, { "docid": "57fa5e97be029f3a4fd4a7cfce491a31", "score": "0.74888724", "text": "public function setup();", "title": "" } ]
ddef16461a6e0e9238ab4a7d4c230946
Add desired post type supports. See config file at `config/posttypesupports.php`.
[ { "docid": "136d58cc083a4affe08b4c1a07410d3a", "score": "0.8296147", "text": "function genesis_sample_post_type_support() {\n\n\t$post_type_supports = genesis_get_config( 'post-type-supports' );\n\n\tforeach ( $post_type_supports as $post_type => $args ) {\n\t\tadd_post_type_support( $post_type, $args );\n\t}\n\n}", "title": "" } ]
[ { "docid": "c2bb6f99c2a64d058f112716e74678ab", "score": "0.7473023", "text": "function agnosia_support_post_formats_custom_post_types() {\r\n\r\n\tglobal $post_formats;\r\n\r\n\t$custom_post_types = get_post_types( array( 'public' => true , '_builtin' => false ) );\r\n\r\n\tif ( is_array( $post_formats ) \r\n\t\tand !empty( $post_formats ) \r\n\t\tand !empty( $custom_post_types )\r\n\t\tand agnosia_evaluate( 'content_enable_post_format_custom_post_types' ) \r\n\t\tand !current_theme_supports( 'agnosia-post-formats-custom-post-types' )\r\n\t) :\r\n\r\n\t\tforeach ( $custom_post_types as $key => $value ) :\r\n\r\n\t\t\tif ( !post_type_support( $key , 'post-formats' ) ) :\r\n\t\t\t\tadd_post_type_support( $key , 'post-formats' );\r\n\t\t\tendif;\r\n\r\n\t\tendforeach;\r\n\r\n\tendif;\r\n\r\n}", "title": "" }, { "docid": "7da5356cae24a564d22f03c307d5763c", "score": "0.73728025", "text": "function coe_custom_posts_supports() {\n\t\tadd_post_type_support('lsvrdocument', array( 'page-attributes')); // allow as type attributes for ordering documents\n\n\t}", "title": "" }, { "docid": "e4cc5355fb21346050023ae9e3c96852", "score": "0.7318436", "text": "function reign_add_post_type_support(){\n // add post support\n add_post_type_support('post', 'excerpt', 'post-thumbnails');\n add_theme_support('post-thumbnails');\n}", "title": "" }, { "docid": "eff28aa4f75b9c1eca252339516ee6d4", "score": "0.7284191", "text": "public function register_post_types() {}", "title": "" }, { "docid": "699d6c6a3d3358bd16565fad50ff5796", "score": "0.72308224", "text": "function wpTheme_custom_post_formats_setup()\n {\n add_post_type_support( 'page', 'post-formats' );\n add_post_type_support( 'page', 'excerpt' );\n\n // add post-formats to post_type 'my_custom_post_type'\n add_post_type_support( 'book', 'post-formats' );\n }", "title": "" }, { "docid": "a25e8e23d4e382fe32609eae0bd5204a", "score": "0.7173186", "text": "protected function is_supported_post_type($post_type)\n {\n }", "title": "" }, { "docid": "4c6e52f92a13ced54426a2d600b728dc", "score": "0.71216273", "text": "public function register_post_types();", "title": "" }, { "docid": "715417d2c0aa92736f4dfaf09fad2047", "score": "0.71010214", "text": "public function register_post_types() {\n\n\t}", "title": "" }, { "docid": "ae0bee1ba824bbe1190770cd8336bc40", "score": "0.7058877", "text": "public function zoninator_post_type_support() {\n\t\tglobal $zoninator;\n\t\t// Remove the standard menu and put one in that is more Museum friendly.\n\t\tremove_action( 'admin_menu', array( $zoninator, 'admin_page_init' ) );\n\t\tadd_action( 'admin_menu', array( $this, 'setup_curated_area_menu' ) );\n\n\t\t$post_types = array( 'tms_object', 'exhibition' );\n\n\t\t// Add the Zoninator taxonomy for the defined post types\n\t\tforeach ( $post_types as $post_type ) {\n\t\t\tadd_post_type_support( $post_type, 'zoninator_zones' );\n\t\t\tregister_taxonomy_for_object_type( 'zoninator_zones', $post_type );\n\t\t}\n\n\t\t// The Zoninator internal post_types array has already been written and cached by this point.\n\t\t// We must override it to enabled these post types for the recent posts dropdown and AJAX searches.\n\t\tz_get_zoninator()->post_types = array_merge( z_get_zoninator()->post_types, $post_types );\n\t}", "title": "" }, { "docid": "554f17db9284655f3df63d304f05e002", "score": "0.70359856", "text": "function edali_add_cpt_support() {\n\n //if exists, assign to $cpt_support var\n $cpt_support = get_option( 'elementor_cpt_support' );\n\n //check if option DOESN'T exist in db\n if ( ! $cpt_support ) {\n $cpt_support = [ 'page', 'post', 'header', 'footer' ]; //create array of our default supported post types\n update_option( 'elementor_cpt_support', $cpt_support ); //write it to the database\n }\n //if it DOES exist, but header is NOT defined\n elseif ( !in_array( 'header', $cpt_support ) ) {\n $cpt_support[] = 'header'; //append to array\n update_option( 'elementor_cpt_support', $cpt_support ); //update database\n }\n //if it DOES exist, but footer is NOT defined\n elseif ( !in_array( 'footer', $cpt_support ) ) {\n $cpt_support[] = 'footer'; //append to array\n update_option( 'elementor_cpt_support', $cpt_support ); //update database\n\t}\n}", "title": "" }, { "docid": "963a07ab4c5302659a85ba14f27f252e", "score": "0.70322067", "text": "protected function get_post_type_supports() {\n\t\t$supports = ['custom-fields'];\n\n\t\tif ( method_exists( $this, 'remove' ) ) {\n\t\t\t$output = $this->remove();\n\t\t\t$output = is_string( $output ) ? [$output] : $output;\n\t\t\t$output = is_array( $output ) ? $output : [];\n\t\t\t$output = array_filter( $output, 'is_string' );\n\t\t\t$supports = array_merge( $supports, $output );\n\t\t}\n\n\t\t$parent_class = get_parent_class( $this );\n\t\t$parent_remove = method_exists( $parent_class, 'remove' );\n\n\t\twhile ( $parent_remove ) {\n\t\t\t$parent = new $parent_class();\n\t\t\t$output = $parent->remove();\n\t\t\t$output = is_string( $output ) ? [$output] : $output;\n\t\t\t$output = is_array( $output ) ? $output : [];\n\t\t\t$output = array_filter( $output, 'is_string' );\n\t\t\t$supports = array_merge( $supports, $output );\n\t\t\t$parent_class = get_parent_class( $parent_class );\n\t\t\t$parent_remove = method_exists( $parent_class, 'remove' );\n\t\t}\n\n\t\treturn $supports;\n\t}", "title": "" }, { "docid": "abf3961f4f852499437d9a39e7709135", "score": "0.7019873", "text": "function register_post_types()\n {\n }", "title": "" }, { "docid": "0e20679176877833dacbb8b78bd91eb4", "score": "0.70189327", "text": "function register_post_types() {\n }", "title": "" }, { "docid": "957a773cc313eb49ca22e7ec9f34f48d", "score": "0.69294655", "text": "function register_post_types() {\n\t}", "title": "" }, { "docid": "957a773cc313eb49ca22e7ec9f34f48d", "score": "0.69294655", "text": "function register_post_types() {\n\t}", "title": "" }, { "docid": "957a773cc313eb49ca22e7ec9f34f48d", "score": "0.69294655", "text": "function register_post_types() {\n\t}", "title": "" }, { "docid": "7374d2dbad9d869f4053cdd862bd3d42", "score": "0.6752677", "text": "public function register_custom_post_type(){\n\n\t\t// Just convert in boolean if necessary\n\t\tforeach( $this->args as $key => $val ){\n\t\t\tif( in_array($val, array('true', 'false') ) ){\n\t\t\t\t$this->args[$key] = convertToBoolean($val);\n\t\t\t}\n\t\t}\n\n\t\t// Call Wordpress register post type function\n\t \tregister_post_type($this->slug, $this->args);\n\n\t\tif( is_array($this->taxonomy) ){\n\t\t\t$this->register_custom_taxonomy( $this->taxonomy );\n\t\t}\n\n\t\tif( is_array($this->taxonomies) && count($this->taxonomies) > 0 ){\n\t\t\tforeach( $this->taxonomies as $taxo )\n\t\t\t\t$this->register_custom_taxonomy( $taxo );\n\t\t}\n\t }", "title": "" }, { "docid": "2e7e77ad0a5a2f1e9bbb06289dffbf50", "score": "0.6734225", "text": "function wp1482371_custom_post_type_args( $args, $post_type ) {\n if ( $post_type == \"testimonial\" ) {\n \n $args['supports'] = array( 'title', 'editor', 'comments');\n\n $args['capability_type'] = array('psp_project','psp_projects'),\n\n }\n\n return $args;\n}", "title": "" }, { "docid": "3c18ecab742d5359eb259af56395b57f", "score": "0.67284906", "text": "public function remove_post_type_support()\n {\n foreach (array_keys(config('admin-ui', [])) as $key) :\n if (!preg_match('/^remove_support_(.*)/', $key, $match)) :\n continue;\n endif;\n\n $post_type = $match[1];\n\n if (!post_type_exists($post_type)) :\n continue;\n endif;\n\n foreach (config(\"admin-ui.{$key}\") as $support) :\n remove_post_type_support($post_type, $support);\n endforeach;\n endforeach;\n }", "title": "" }, { "docid": "c28f0b48ce8ddc8786ead271d441e507", "score": "0.67165333", "text": "function usr_post_types(){\n register_post_type( 'projects', array(\n \"public\" => true,\n \"show_in_rest\" => true,\n \"labels\" => array(\n \"name\" => \"Proiecte\",\n \"add_new_item\" => \"Add Project\"\n ),\n \"menu_icon\" => \"dashicons-book-alt\",\n 'supports' => [ 'title', 'editor', 'thumbnail' ]\n ));\n\n register_post_type( 'parteners', array(\n \"public\" => true,\n \"show_in_rest\" => true,\n \"labels\" => array(\n \"name\" => \"Parteneri\",\n \"add_new_item\" => \"Add Partner\"\n ),\n \"menu_icon\" => \"dashicons-businessperson\",\n 'supports' => [ 'title', 'editor', 'thumbnail' ],\n 'taxonomies' => ['post_tag']\n ));\n\n register_post_type( 'zones', array(\n \"public\" => true,\n \"show_in_rest\" => true,\n \"label\" => \"Zone\",\n \"menu_icon\" => \"dashicons-admin-site\",\n 'supports' => [ 'title', 'editor', 'thumbnail' ],\n 'taxonomies' => ['post_tag']\n ));\n}", "title": "" }, { "docid": "e7770abf6adedf4b3a55a414b5320392", "score": "0.66911477", "text": "public function register_post_type()\n {\n $args = array(\n 'label' => esc_html('Documentation', 'test-plugin'),\n 'public' => true,\n 'menu_position' => 47,\n 'menu_icon' => 'dashicons-book',\n 'supports' => array('title', 'editor', 'revisions', 'thumbnail'),\n 'has_archive' => true,\n 'show_in_rest' => true,\n 'publicly_queryable' => true,\n 'exclude_from_search' => true,\n 'menu_position' => 6\n );\n\n register_post_type(self::POST_TYPE_SLUG, $args);\n }", "title": "" }, { "docid": "1dd0b11d46b9736c68d9dcc7baa8916d", "score": "0.6683467", "text": "function hatemyphone_post_types(){\n\n //HEADER\n register_post_type('header', array(\n 'supports' => array('title'),\n 'public' => false,\n 'show_ui' => true,\n 'labels' => array(\n 'name' => 'Header',\n 'add_new_item' => 'Add New Title',\n 'edit_item' => 'Edit Title'\n ),\n 'menu_icon' => 'dashicons-star-filled'\n ));\n\n //FEATURES \n register_post_type('features', array(\n 'supports' => array('title'),\n 'public' => false,\n 'show_ui' => true,\n 'labels' => array(\n 'name' => 'Features',\n 'add_new_item' => 'Add New Feature',\n 'edit_item' => 'Edit Feature'\n ),\n 'menu_icon' => 'dashicons-star-filled'\n ));\n\n //RECYCLING\n register_post_type('recycling', array(\n 'supports' => array('title'),\n 'public' => false,\n 'show_ui' => true,\n 'labels' => array(\n 'name' => 'Recycling',\n 'add_new_item' => 'Add New Item',\n 'edit_item' => 'Edit Item'\n ),\n 'menu_icon' => 'dashicons-star-filled'\n ));\n\n //CHOOSE US\n register_post_type('choose', array(\n 'supports' => array('title', 'thumbnail'),\n 'public' => false,\n 'show_ui' => true,\n 'labels' => array(\n 'name' => 'Choose Us',\n 'add_new_item' => 'Add New Feature',\n 'edit_item' => 'Edit Feature'\n ),\n 'menu_icon' => 'dashicons-star-filled'\n ));\n\n //PROCESS\n register_post_type('process', array(\n 'supports' => array('title'),\n 'public' => false,\n 'show_ui' => true,\n 'labels' => array(\n 'name' => 'Process',\n 'add_new_item' => 'Add New Process',\n 'edit_item' => 'Edit Process'\n ),\n 'menu_icon' => 'dashicons-star-filled'\n ));\n\n\n //SERVICES\n register_post_type('services', array(\n 'supports' => array('title', 'thumbnail'),\n 'public' => false,\n 'show_ui' => true,\n 'labels' => array(\n 'name' => 'Services',\n 'add_new_item' => 'Add New Service',\n 'edit_item' => 'Edit Service'\n ),\n 'menu_icon' => 'dashicons-star-filled'\n ));\n\n\n //ABOUT US\n register_post_type('about', array(\n 'supports' => array('title', 'thumbnail'),\n 'public' => false,\n 'show_ui' => true,\n 'labels' => array(\n 'name' => 'About',\n 'add_new_item' => 'Add New About',\n 'edit_item' => 'Edit About'\n ),\n 'menu_icon' => 'dashicons-star-filled'\n ));\n\n\n //TEAM\n register_post_type('team', array(\n 'supports' => array('title', 'thumbnail'),\n 'public' => false,\n 'show_ui' => true,\n 'labels' => array(\n 'name' => 'Team',\n 'add_new_item' => 'Add New Member',\n 'edit_item' => 'Edit Member'\n ),\n 'menu_icon' => 'dashicons-star-filled'\n ));\n\n\n //CONTACT\n register_post_type('contact', array(\n 'supports' => array('title', 'editor', 'thumbnail'),\n 'public' => false,\n 'show_ui' => true,\n 'labels' => array(\n 'name' => 'Contact',\n 'add_new_item' => 'Add New Contact',\n 'edit_item' => 'Edit Contact'\n ),\n 'menu_icon' => 'dashicons-star-filled'\n ));\n\n //NEWSLETTER\n register_post_type('newsletter', array(\n 'supports' => array('title', 'editor', 'thumbnail'),\n 'public' => false,\n 'show_ui' => true,\n 'labels' => array(\n 'name' => 'Newsletter',\n 'add_new_item' => 'Add New Newsletter',\n 'edit_item' => 'Edit Newsletter'\n ),\n 'menu_icon' => 'dashicons-star-filled'\n ));\n\n //FAQ PAGE\n register_post_type('faq', array(\n 'supports' => array('title', 'thumbnail'),\n 'public' => false,\n 'show_ui' => true,\n 'labels' => array(\n 'name' => 'Faq',\n 'add_new_item' => 'Add New Faq',\n 'edit_item' => 'Edit Faq'\n ),\n 'menu_icon' => 'dashicons-star-filled'\n ));\n}", "title": "" }, { "docid": "451eea39bfd58fbf1508135a11ba09e8", "score": "0.6628612", "text": "public function supports(){\n\t\t#Default support array\n\t\t$supports = array();\n\t\tif ($this->options('use_title')){\n\t\t\t$supports[] = 'title';\n\t\t}\n\t\tif ($this->options('use_order')){\n\t\t\t$supports[] = 'page-attributes';\n\t\t}\n\t\tif ($this->options('use_thumbnails')){\n\t\t\t$supports[] = 'thumbnail';\n\t\t}\n\t\tif ($this->options('use_editor')){\n\t\t\t$supports[] = 'editor';\n\t\t}\n\t\tif ($this->options('use_revisions')){\n\t\t\t$supports[] = 'revisions';\n\t\t}\n\t\treturn $supports;\n\t}", "title": "" }, { "docid": "d1a9ce37898edef0d569945e562adfd7", "score": "0.6622285", "text": "public function registerPostTypes(){\n EquipmentPostType::register();\n ReferencesPostType::register();\n }", "title": "" }, { "docid": "fcdb40c72b66555ae13244d22837e578", "score": "0.6614651", "text": "function bpb_extended_post_types_management() {\n\t$blog = bpb_extended_current_blog();\n\n\t// For demo purpose..\n\tif ( empty( $blog ) || ! bpb_extended()->is_debug ) {\n\t\treturn;\n\t}\n\n\t$supported = bpb_extended_get_buddypress_supported_post_types();\n\t$tracked = isset( $blog->post_types_tracked ) ? $blog->post_types_tracked : array( 'post' );\n\n\tif ( empty( $supported ) ) {\n\t\tbp_blogs_update_blogmeta( $blog->id, 'post_types_tracked', array() );\n\t\treturn;\n\t}\n\n\t$active = array();\n\t?>\n\n\t<ul>\n\t\t<?php foreach ( $supported as $post_type => $name ) :\n\n\t\t\tif ( in_array( $post_type, $tracked ) ) {\n\t\t\t\t$active[ $post_type ] = $post_type;\n\t\t\t}\n\t\t?>\n\t\t<li>\n\t\t\t<label for=\"post-type-<?php echo esc_attr( $post_type );?>\">\n\t\t\t\t<input type=\"checkbox\" name=\"bpb_extended[post_types][]\" id=\"post-type-<?php echo esc_attr( $post_type );?>\" value=\"<?php echo esc_attr( $post_type );?>\" <?php checked( isset( $active[ $post_type ] ) ); ?> />\n\t\t\t\t<?php echo esc_html( $name ); ?>\n\t\t\t</label>\n\t\t</li>\n\t\t<?php endforeach ;?>\n\t</ul>\n\t<input type=\"hidden\" name=\"bpb_extended[post_types][active]\" value=\"<?php echo join( ',', $active );?>\"/>\n\t<p class=\"description\"><?php esc_html_e( 'Activate the checkbox(es) to track the post type(s).', 'bp-blogs-extended' ); ?></p>\n\t<?php\n}", "title": "" }, { "docid": "a0864036d9042c7a70e93f274973e341", "score": "0.66139853", "text": "function register_post_types(){\n\t\trequire('lib/custom-types.php');\n\t}", "title": "" }, { "docid": "a0864036d9042c7a70e93f274973e341", "score": "0.66139853", "text": "function register_post_types(){\n\t\trequire('lib/custom-types.php');\n\t}", "title": "" }, { "docid": "a0864036d9042c7a70e93f274973e341", "score": "0.66139853", "text": "function register_post_types(){\n\t\trequire('lib/custom-types.php');\n\t}", "title": "" }, { "docid": "a0864036d9042c7a70e93f274973e341", "score": "0.66139853", "text": "function register_post_types(){\n\t\trequire('lib/custom-types.php');\n\t}", "title": "" }, { "docid": "66afd1eb138814809ca60bed1fab6d46", "score": "0.6612933", "text": "public function registerPostType()\n {\n $posts = $this->getConfig('posts');\n foreach ($posts as $key => $item) {\n $item['args']['labels'] = $item['labels'];\n $this->register_post_type($key, $item['args']);\n }\n }", "title": "" }, { "docid": "8aeb8d87d1c51e35921658560430568e", "score": "0.6608738", "text": "function get_allowed_post_formats( $type = null ) {\n if ( $type == 'post' ) {\n return array( 'aside', 'status', 'gallery', 'audio', 'video' );\n } elseif ( $type == 'tutorial' ) {\n return array( 'video' );\n } elseif ( $type == 'resource' ) {\n return array( 'image', 'audio', 'video', 'link' );\n }\n return get_theme_support( 'post-formats' )[0];\n}", "title": "" }, { "docid": "e0c4ab25f062f353a7ab5c1bf077807a", "score": "0.6596144", "text": "function reg_post_types(){\n\n\t/* TESTIMONIALS*/\n\tregister_post_type( 'testi',\n\t array(\n\t\t'labels' => array(\n\t\t\t'name' => __( 'Testimonials' ),\n\t\t\t'singular_name' => __( 'Testimonial' )\n\t\t ),\n\t\t 'public' => true,\n\t\t 'has_archive' => true,\n\t\t 'menu_icon' => 'dashicons-testimonial',\n\t\t 'supports' => array('title', 'editor', 'thumbnail')\n\t )\n\t);\n\n\t/* partners*/\n\tregister_post_type( 'partners',\n\t array(\n\t\t'labels' => array(\n\t\t\t'name' => __( 'Partners' ),\n\t\t\t'singular_name' => __( 'Partner' )\n\t\t ),\n\t\t 'public' => true,\n\t\t 'has_archive' => true,\n\t\t 'menu_icon' => 'dashicons-groups',\n\t\t 'supports' => array('title', 'editor', 'thumbnail')\n\t )\n\t);\n\n\t/* services*/\n\tregister_post_type( 'services',\n\t array(\n\t\t'labels' => array(\n\t\t\t'name' => __( 'Services' ),\n\t\t\t'singular_name' => __( 'Service' )\n\t\t ),\n\t\t 'public' => true,\n\t\t 'has_archive' => true,\n\t\t 'menu_icon' => 'dashicons-screenoptions',\n\t\t 'supports' => array('title', 'editor', 'thumbnail')\n\t )\n\t);\n\n\t/* TEAM */\n\tregister_post_type( 'team',\n\t array(\n\t\t'labels' => array(\n\t\t\t'name' => __( 'Team' ),\n\t\t\t'singular_name' => __( 'Team' )\n\t\t ),\n\t\t 'public' => true,\n\t\t 'has_archive' => true,\n\t\t 'menu_icon' => 'dashicons-admin-users',\n\t\t 'supports' => array('title', 'editor', 'thumbnail')\n\t )\n\t);\n\n\t /* hero slider */\n\tregister_post_type( 'heroslider',\n\t array(\n\t\t'labels' => array(\n\t\t\t'name' => __( 'Hero Slider' ),\n\t\t\t'singular_name' => __( 'Slider' )\n\t\t ),\n\t\t 'public' => true,\n\t\t 'has_archive' => true,\n\t\t 'menu_icon' => 'dashicons-format-gallery',\n\t\t 'supports' => array('title', 'thumbnail')\n\t )\n\t);\n\n\t/* Videos */\n\tregister_post_type( 'Videos',\n\t array(\n\t\t'labels' => array(\n\t\t\t'name' => __( 'Videos' ),\n\t\t\t'singular_name' => __( 'Video' )\n\t\t ),\n\t\t 'public' => true,\n\t\t 'has_archive' => true,\n\t\t 'menu_icon' => 'dashicons-video-alt3',\n\t\t 'supports' => array('title', 'editor')\n\t )\n\t);\n\n}", "title": "" }, { "docid": "f4a0d28fe2d1a2ced235cef69aaea390", "score": "0.6592588", "text": "function registerPostTypes() {\n\t\tregister_post_type( $this->plugin->posttype, array(\n 'labels' => array(\n 'name' => _x( 'Post Signature', 'post type general name' ),\n 'singular_name' => _x( 'Post Signature', 'post type singular name' ),\n 'add_new' => _x( 'Add New Post Signature', 'insertpostsignature' ),\n 'add_new_item' => __( 'Add New Post Signature' ),\n 'edit_item' => __( 'Edit Post Signature' ),\n 'new_item' => __( 'New Post Signature' ),\n 'view_item' => __( 'View Post Signature' ),\n 'search_items' => __( 'Search Post Signature' ),\n 'not_found' => __( 'No post signature found' ),\n 'not_found_in_trash' => __( 'No post signature found in Trash' ),\n 'parent_item_colon' => ''\n ),\n 'description' => 'Post Signature',\n 'public' => false,\n 'publicly_queryable' => false,\n 'exclude_from_search' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 100,\n 'menu_icon' => 'dashicons-migrate',\n 'capability_type' => 'post',\n 'hierarchical' => false,\n 'has_archive' => false,\n 'show_in_nav_menus' => false,\n 'supports' => array( 'title' ),\n\t\t\t'capabilities' => array(\n\t\t\t\t'edit_post' => 'manage_options',\n\t\t\t\t'delete_post' => 'manage_options',\n\t\t\t\t'edit_posts' => 'manage_options',\n\t\t\t\t'edit_others_posts' => 'manage_options',\n\t\t\t\t'delete_posts' => 'manage_options',\n\t\t\t\t'publish_posts' => 'manage_options',\n\t\t\t\t'read_private_posts' => 'manage_options'\n\t\t\t),\n ));\n\t}", "title": "" }, { "docid": "1a726321634d9b1a214ac98690e50144", "score": "0.6584295", "text": "function register_post_types() {\n\t\t//self::register_post_type_cpt() and function outside for better code;\n\t}", "title": "" }, { "docid": "5c5e7cb7e2cfda45ce19a5d967502eb3", "score": "0.6543738", "text": "public function register_post_types()\n {\n require get_template_directory() . '/import/post-types.php';\n }", "title": "" }, { "docid": "00c836a563944c9916d39e78923b929b", "score": "0.6527689", "text": "public function register_post_type()\n {\n if (class_exists('acf')) {\n require_once APLB_PLUGIN_DIR . 'lib/aplb-post-type.php';\n }\n }", "title": "" }, { "docid": "ebb51be5b05dc91dfd152f80f40b24fd", "score": "0.65254366", "text": "function alice_remove_post_type_support()\n{\n\tremove_post_type_support( 'post', 'post-formats' );\n}", "title": "" }, { "docid": "77aecc542697b600965f998954f8cddf", "score": "0.650259", "text": "function LOE_theme_support(){\n\tadd_theme_support('post-thumbnails');\n\n\t//adding post formats options\n\tadd_theme_support('post-formats',array('aside','gallery'));\n}", "title": "" }, { "docid": "47273dcce8a10f9cac7833766f020ba8", "score": "0.6493122", "text": "public function registerCustomPostTypes()\n {\n $music = new CustomPostType('music', 'Music');\n $music->register();\n\n //!$this->flushRoutes();\n }", "title": "" }, { "docid": "890fb9d4ac6e602824bef23a464cedf6", "score": "0.6482429", "text": "public function add_mime_type_to_posts() {\n\t\tglobal $wpdb;\n\t\t$wpdb->update( $wpdb->posts, array( 'post_mime_type' => 'application/json' ), array( 'post_type' => $this->model_post->get_post_type() ) );\n\t}", "title": "" }, { "docid": "e9ffbce4f1bbd49db00a5e11e5da8239", "score": "0.6478014", "text": "function add_theme_supported_postformats( $theme_supported_postformats ) {\n\t\t\t\treturn $theme_supported_postformats = array(\n#\t\t\t \t\t\t\t'aside', \t\t// title less blurb\n#\t\t\t\t\t\t\t'gallery', \t// gallery of images\n#\t\t\t\t\t\t\t'link', \t\t// quick link to other site\n#\t\t\t\t\t\t\t'image', \t\t// an image\n#\t\t\t\t\t\t\t'quote', \t\t// a quick quote\n#\t\t\t\t\t\t\t'status', \t// a Facebook like status update\n#\t\t\t\t\t\t\t'video', \t\t// video\n#\t\t\t\t\t\t\t'audio', \t\t// audio\n#\t\t\t\t\t\t\t'chat' \t\t\t// chat transcript*\n\t\t\t\t\t);\n\t\t}", "title": "" }, { "docid": "3cd67f68c083d506f39281eb1b40a230", "score": "0.6464304", "text": "function fn_theme_supports(){\r\n\tadd_theme_support('title-tag');\r\n\tadd_theme_support('post-thumbnails');\r\n\tadd_theme_support('html5', array('search-form'));\r\n\tadd_theme_support('custom-logo');\r\n\tadd_theme_support('custom-header');\r\n\tadd_theme_support('custom-background');\r\n\tadd_theme_support('post-formats', array('aside', 'image', 'video'));\r\n\tadd_theme_support('menus');\r\n}", "title": "" }, { "docid": "de56ba0ae0cc129466115660e7dcf7d7", "score": "0.6462519", "text": "public function registerPostType()\n { \n register_post_type($this->formatName($this->post_type), $this->options);\n\n if(isset($this->options['icon_code'])) add_action('admin_enqueue_scripts', array(&$this, 'addMenuIcon'));\n }", "title": "" }, { "docid": "f0d5f1d036515eb3bffc4520c9f3a4ae", "score": "0.6459795", "text": "function knowledgebase_register_post_types() {\n\n\t/* Get plugin settings. */\n\t$settings = get_option( 'knowledgebase_settings', kbp_get_default_settings() );\n\n\t/* Set up the arguments for the post type. */\n\t$args = array(\n\t\t'description' => $settings['knowledgebase_item_description'],\n\t\t'public' => true,\n\t\t'publicly_queryable' => true,\n\t\t'exclude_from_search' => false,\n\t\t'show_in_nav_menus' => false,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'show_in_admin_bar' => true,\n\t\t'menu_position' => null,\n\t\t'menu_icon' => 'dashicons-lightbulb',\n\t\t'can_export' => true,\n\t\t'delete_with_user' => false,\n\t\t'hierarchical' => false,\n\t\t'has_archive' => kbp_knowledgebase_base(),\n\t\t'query_var' => 'knowledgebase_item',\n\t\t'capability_type' => 'knowledgebase_item',\n\t\t'map_meta_cap' => true,\n\n\t\t'capabilities' => array(\n\n\t\t\t// meta caps (don't assign these to roles)\n\t\t\t'edit_post' => 'edit_knowledgebase_item',\n\t\t\t'read_post' => 'read_knowledgebase_item',\n\t\t\t'delete_post' => 'delete_knowledgebase_item',\n\n\t\t\t// primitive/meta caps\n\t\t\t'create_posts' => 'create_knowledgebase_items',\n\n\t\t\t// primitive caps used outside of map_meta_cap()\n\t\t\t'edit_posts' => 'edit_knowledgebase_items',\n\t\t\t'edit_others_posts' => 'manage_knowledgebase',\n\t\t\t'publish_posts' => 'manage_knowledgebase',\n\t\t\t'read_private_posts' => 'read',\n\n\t\t\t// primitive caps used inside of map_meta_cap()\n\t\t\t'read' => 'read',\n\t\t\t'delete_posts' => 'manage_knowledgebase',\n\t\t\t'delete_private_posts' => 'manage_knowledgebase',\n\t\t\t'delete_published_posts' => 'manage_knowledgebase',\n\t\t\t'delete_others_posts' => 'manage_knowledgebase',\n\t\t\t'edit_private_posts' => 'edit_knowledgebase_items',\n\t\t\t'edit_published_posts' => 'edit_knowledgebase_items'\n\t\t),\n\n\t\t'rewrite' => array(\n\t\t\t'slug' => kbp_knowledgebase_base() . '/item',\n\t\t\t'with_front' => false,\n\t\t\t'pages' => true,\n\t\t\t'feeds' => true,\n\t\t\t'ep_mask' => EP_PERMALINK,\n\t\t),\n\n\t\t'supports' => array(\n\t\t\t'title',\n\t\t\t'editor',\n\t\t\t'excerpt',\n\t\t\t'thumbnail',\n\t\t\t'comments',\n\t\t\t'revisions',\n\t\t),\n\n\t\t'labels' => array(\n\t\t\t'name' => __( 'Knowledgebase Articles', 'knowledgebase' ),\n\t\t\t'singular_name' => __( 'Knowledgebase Article', 'knowledgebase' ),\n\t\t\t'menu_name' => __( 'Knowledgebase', 'knowledgebase' ),\n\t\t\t'name_admin_bar' => __( 'Knowledgebase Article', 'knowledgebase' ),\n\t\t\t'all_items' => __( 'Articles', 'knowledgebase' ),\n\t\t\t'add_new' => __( 'Add Article', 'knowledgebase' ),\n\t\t\t'add_new_item' => __( 'Add New Article', 'knowledgebase' ),\n\t\t\t'edit_item' => __( 'Edit Article', 'knowledgebase' ),\n\t\t\t'new_item' => __( 'New Article', 'knowledgebase' ),\n\t\t\t'view_item' => __( 'View Article', 'knowledgebase' ),\n\t\t\t'search_items' => __( 'Search Articles', 'knowledgebase' ),\n\t\t\t'not_found' => __( 'No articles found', 'knowledgebase' ),\n\t\t\t'not_found_in_trash' => __( 'No articles found in trash', 'knowledgebase' ),\n\n\t\t\t/* Custom archive label. Must filter 'post_type_archive_title' to use. */\n\t\t\t'archive_title' => $settings['knowledgebase_item_archive_title'],\n\t\t)\n\t);\n\n\t/* Register the post type. */\n\tregister_post_type( 'knowledgebase_item', $args );\n}", "title": "" }, { "docid": "84585e12e10b15a295bac8a7ad2eee6f", "score": "0.6434838", "text": "function pb_add_meta() {\n\t$options = get_option( 'pb_settings' );\n\t$post_types = get_post_types();\n\tforeach ($post_types as $post_type ) :\n\t\tif ($options['enable_post_type_' . $post_type]) {\n\t\t\tadd_meta_box('myplugin_sectionid',\n\t\t\t\t__( 'Pirobox Settings', 'pb_domain' ), \n\t\t\t\t'pb_output_meta',\n\t\t\t\t$post_type\n\t\t\t);\n\t\t}\n\tendforeach;\n}", "title": "" }, { "docid": "e093c91ab9ebdb464570a77a715a8979", "score": "0.6433915", "text": "function customize_post_type_support()\n {\n remove_post_type_support('page', 'editor');\n remove_post_type_support('page', 'comments');\n remove_post_type_support('page', 'author');\n remove_meta_box('slugdiv', 'page', 'normal');\n remove_meta_box('edit-slug-box', 'page', 'normal');\n }", "title": "" }, { "docid": "a2d257b317cbab66dff78a4f1ceb42a1", "score": "0.6427617", "text": "function tomato_theme_support() {\n add_theme_support( 'post-formats', array('page') );\n}", "title": "" }, { "docid": "26993ff90249b624d4cc12a923fcbd36", "score": "0.6399127", "text": "public function render_post_types_support() {\n\t\t$builtin_support = AMP_Post_Type_Support::get_builtin_supported_post_types();\n\t\t$element_name = AMP_Options_Manager::OPTION_NAME . '[supported_post_types][]';\n\t\t?>\n\t\t<fieldset>\n\t\t\t<?php foreach ( array_map( 'get_post_type_object', AMP_Post_Type_Support::get_eligible_post_types() ) as $post_type ) : ?>\n\t\t\t\t<?php\n\t\t\t\t$element_id = AMP_Options_Manager::OPTION_NAME . \"-supported_post_types-{$post_type->name}\";\n\t\t\t\t$is_builtin = amp_is_canonical() || in_array( $post_type->name, $builtin_support, true );\n\t\t\t\t?>\n\t\t\t\t<?php if ( $is_builtin ) : ?>\n\t\t\t\t\t<input type=\"hidden\" name=\"<?php echo esc_attr( $element_name ); ?>\" value=\"<?php echo esc_attr( $post_type->name ); ?>\">\n\t\t\t\t<?php endif; ?>\n\t\t\t\t<input\n\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\tid=\"<?php echo esc_attr( $element_id ); ?>\"\n\t\t\t\t\tname=\"<?php echo esc_attr( $element_name ); ?>\"\n\t\t\t\t\tvalue=\"<?php echo esc_attr( $post_type->name ); ?>\"\n\t\t\t\t\t<?php checked( true, amp_is_canonical() || post_type_supports( $post_type->name, amp_get_slug() ) ); ?>\n\t\t\t\t\t<?php disabled( $is_builtin ); ?>\n\t\t\t\t\t>\n\t\t\t\t<label for=\"<?php echo esc_attr( $element_id ); ?>\">\n\t\t\t\t\t<?php echo esc_html( $post_type->label ); ?>\n\t\t\t\t</label>\n\t\t\t\t<br>\n\t\t\t<?php endforeach; ?>\n\t\t\t<p class=\"description\">\n\t\t\t\t<?php\n\t\t\t\tif ( ! amp_is_canonical() ) :\n\t\t\t\t\tesc_html_e( 'Enable/disable AMP post type(s) support', 'amp' );\n\t\t\t\telse :\n\t\t\t\t\tesc_html_e( 'Canonical AMP is enabled in your theme, so all post types will render.', 'amp' );\n\t\t\t\tendif;\n\t\t\t?>\n\t\t\t</p>\n\t\t</fieldset>\n\t\t<?php\n\t}", "title": "" }, { "docid": "8b0db87b54a28353e29d14592feb8b57", "score": "0.6396676", "text": "public function register_post() {\r\n\t\t$args = array(\r\n\t\t\t'labels' => [],\r\n\t\t\t'public' => false,\r\n\t\t\t'query_var' => false,\r\n\t\t\t'supports' => [ 'title', 'thumbnail' ],\r\n\t\t);\r\n\r\n\t\t// Make it is registered in main site only in multisite.\r\n\t\tif ( is_main_site() ) {\r\n\t\t\tregister_post_type( $this->post_type, $args );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "11a9f623474c7043f23d3cd272674a57", "score": "0.6392838", "text": "public function theme_supports() {\n\t\tglobal $wpv_post_formats, $content_width;\n\n\t\tdefine( 'WPV_RESPONSIVE', wpv_get_optionb( 'is-responsive' ) );\n\n\t\t/**\n\t\t * the max content width the css is built for should equal the actual content width,\n\t\t * for example, the width of the text of a page without sidebars\n\t\t */\n\t\tif ( ! isset( $content_width ) ) $content_width = wpv_get_option( 'site-max-width' );\n\n\t\t$wpv_post_formats = apply_filters( 'wpv_post_formats', array( 'aside', 'link', 'image', 'video', 'audio', 'quote', 'gallery' ) );\n\n\t\tadd_theme_support( 'post-thumbnails' );\n\t\tadd_theme_support( 'automatic-feed-links' );\n\t\tadd_theme_support( 'html5', array( 'gallery', 'caption', ) );\n\t\tadd_theme_support( 'post-formats', $wpv_post_formats );\n\t\tadd_theme_support( 'title-tag' );\n\t\tadd_theme_support( 'customize-selective-refresh-widgets' );\n\n\t\tadd_theme_support( 'wpv-ajax-siblings' );\n\t\tadd_theme_support( 'wpv-page-title-style' );\n\t\tadd_theme_support( 'wpv-centered-text-divider' );\n\n\t\tif ( function_exists( 'register_nav_menus' ) ) {\n\t\t\tregister_nav_menus(\n\t\t\t\tarray(\n\t\t\t\t\t'menu-header' => __( 'Menu Header', 'construction' ),\n\t\t\t\t\t'menu-top' => __( 'Menu Top', 'construction' ),\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\tadd_image_size( 'posts-widget-thumb', 60, 60, true );\n\t\tadd_image_size( 'posts-widget-thumb-small', 43, 43, true );\n\n\t\t$size_names = array( 'theme-single', 'theme-loop' );\n\t\t$size_info = array();\n\n\t\tforeach ( $size_names as $name ) {\n\t\t\t$size_info[$name] = ( object )array(\n\t\t\t\t'wth' => abs( floatval( wpv_get_option( \"$name-images-wth\" ) ) ),\n\t\t\t\t'crop' => true,\n\t\t\t);\n\t\t}\n\n\t\t$width = $content_width;\n\n\t\t$single_sizes = array( 'theme-single' );\n\t\t$columnated_sizes = array( 'theme-loop' );\n\n\t\tforeach ( $single_sizes as $name ) {\n\t\t\t$height = $size_info[$name]->wth ? $width / $size_info[$name]->wth : false;\n\t\t\tadd_image_size( $name, $width, $height, $size_info[$name]->crop );\n\t\t}\n\n\t\t// these are used for resolution upgrades in extended columns\n\t\tadd_image_size( 'theme-large-replacement-normal', 800, 0 ); // width=1000, normal proportions\n\t\tadd_image_size( 'theme-large-replacement-loop', 800, $size_info[ 'theme-loop' ]->wth ? 800 / $size_info[ 'theme-loop' ]->wth : 0, $size_info[ 'theme-loop' ]->crop ); // width=1000, loop proportions\n\n\t\tfor ( $num_columns = 1; $num_columns <= 4; $num_columns++ ) {\n\t\t\t$small_width = ( $width + 30 ) / $num_columns - 30;\n\t\t\t$small_width = ( $width + 30 ) / $num_columns - 30;\n\n\t\t\tadd_image_size( 'theme-normal-' . $num_columns, $small_width, 0 ); // special case where we always use the original proportions\n\n\t\t\tforeach ( $columnated_sizes as $name ) {\n\t\t\t\t$col_width = ( $width + 30 ) / $num_columns - 30;\n\t\t\t\t$height = $size_info[$name]->wth ? $col_width / $size_info[$name]->wth : false;\n\n\t\t\t\tadd_image_size( $name.'-'.$num_columns, $col_width, $height, $size_info[$name]->crop );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "ba8ce65a7361a93e883b4d6c909a1739", "score": "0.63865304", "text": "private function set_post_type_hooks()\n {\n }", "title": "" }, { "docid": "a2454492375d58c03c249559842dabc0", "score": "0.63690585", "text": "function wppp_register_settings ( ) {\n $post_types = get_post_types();\n foreach ( $post_types as $post_type ) {\n register_setting( 'wp-power-posts', $post_type );\n }\n}", "title": "" }, { "docid": "75ad4459e148f06a21e909204d8afa8b", "score": "0.636477", "text": "function add_feature_support_to_product_types() {\n\t\t// Register the recurring-payments_addon\n\t\t$slug = 'recurring-payments';\n\t\t$description = 'The recurring payment options for a product';\n\t\tit_exchange_register_product_feature( $slug, $description );\n\n\t\t// Add it to all enabled product-type addons\n\t\t$products = it_exchange_get_enabled_addons( array( 'category' => 'product-type' ) );\n\t\tforeach( $products as $key => $params ) {\n\t\t\tit_exchange_add_feature_support_to_product_type( 'recurring-payments', $params['slug'] );\n\t\t}\n\t}", "title": "" }, { "docid": "fde490e2d16aa160ad1e9f8c09a3e0c7", "score": "0.63614005", "text": "public function register_post_type() {\n\n\t\t$single = $this->post_type_name;\n \t\t$plural = $single.'s';\n \t\t$supports = $this->supports;\n\n\t $labels = array(\n\t 'name' => _x( $plural, 'post type general name', 'dopress' ),\n\t 'singular_name' => _x( \"$single\", 'post type singular name','dopress' ),\n\t 'add_new' => _x( \"Add New $single\", \"$single\",'dopress' ),\n\t 'add_new_item' => __( \"Add New $single\", 'dopress' ),\n\t 'edit_item' => __( \"Edit $single\" , 'dopress'),\n\t 'new_item' => __( \"New $single\" , 'dopress'),\n\t 'all_items' => __( \"All $plural\" , 'dopress'),\n\t 'view_item' => __( \"View $single\" , 'dopress'),\n\t 'search_items' => __( \"Search $plural\" , 'dopress'),\n\t 'not_found' => __( \"No $plural found\" , 'dopress'),\n\t 'not_found_in_trash' => __( \"No $single found in Trash\", 'dopress' ),\n\t 'parent_item_colon' => '',\n \t'menu_name' => 'DoPress'\n\t );\n\t $args = array(\n\t 'labels' => $labels,\n\t 'public' => true,\n\t 'publicly_queryable' => true,\n\t 'show_ui' => true,\n\t 'show_in_menu' => true,\n\t 'query_var' => true,\n\t 'rewrite' => true,\n\t 'capability_type' => 'post',\n\t 'has_archive' => true,\n\t 'hierarchical' => false,\n\t 'menu_position' => 5,\n\t\t\t'menu_icon' => '',\n\t 'register_meta_box_cb' => array($this, 'dp_cpt_add_meta_boxes'),\n\t 'supports' => ( $supports ) ? $supports : array( 'title', 'editor', 'page-attributes' )\n\t );\n\n\t register_post_type( $single, $args );\n\n\t}", "title": "" }, { "docid": "535b67f00d6531a77d71548e4f1398df", "score": "0.6357951", "text": "function stacy_post_type_testimonial() {\n\n register_post_type( 'testimonial',\n array( \n 'label' => __('Testimonial'), \n 'public' => true, \n 'show_ui' => true,\n 'show_in_nav_menus' => false,\n 'menu_position' => 5,\n 'supports' => array(\n 'title', \n 'editor',\n 'thumbnail')\n ) \n );\n}", "title": "" }, { "docid": "bc56f0bd2f87d7daff296787959a23fe", "score": "0.6353848", "text": "function register_post_type( $type, $label = null, $supports = array( 'title', 'thumbnail', 'editor' ) )\n {\n \n if( empty($label))\n $label = ucfirst($type);\n \n // Equipment\n \n $args = array(\n 'public' => true,\n 'label' => __( $label ),\n 'supports' => $supports,\n 'public' => true,\n 'has_archive' => true,\n 'rewrite' => array('slug' => $type)\n );\n \n register_post_type($type, $args);\n }", "title": "" }, { "docid": "63bad17d13aaebd9ba4366de1996f45c", "score": "0.63533735", "text": "public function theme_supports()\n {\n add_theme_support('automatic-feed-links');\n /*\n * Let WordPress manage the document title.\n * By adding theme support, we declare that this theme does not use a\n * hard-coded <title> tag in the document head, and expect WordPress to\n * provide it for us.\n */\n add_theme_support('title-tag');\n /*\n * Enable support for Post Thumbnails on posts and pages.\n *\n * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/\n */\n add_theme_support('post-thumbnails');\n /*\n * Switch default core markup for search form, comment form, and comments\n * to output valid HTML5.\n */\n add_theme_support(\n 'html5',\n array(\n 'comment-form',\n 'comment-list',\n 'gallery',\n 'caption',\n )\n );\n /*\n * Enable support for Post Formats.\n *\n * See: https://codex.wordpress.org/Post_Formats\n */\n add_theme_support(\n 'post-formats',\n array(\n 'aside',\n 'image',\n 'video',\n 'quote',\n 'link',\n 'gallery',\n 'audio',\n )\n );\n add_theme_support('menus');\n }", "title": "" }, { "docid": "527e8712ba006de8572dc38e515e88f4", "score": "0.6352512", "text": "function doc_register_custom_post_types() {\n\t//TODO : Refactor\n\tregister_post_type( 'custom_card',\n\t\tarray(\n\t\t\t'labels'=> array(\n\t\t\t\t\t\t\t'name'\t=> __( 'Custom Card' ),\n\t\t\t\t\t\t\t),\n\t\t\t'public'\t\t=> false,\n\t\t\t'show_ui'\t\t=> true,\n\t\t\t'supports'\t\t=> array(\n\t\t\t\t\t\t\t\t'title',\n\t\t\t\t\t\t\t\t'editor'\n\t\t\t\t\t\t\t)\n\t\t)\n\t);\n\t\n\tregister_post_type( 'video_post',\n\t\tarray(\n\t\t\t'labels' => array(\n\t\t\t\t'name' => __( 'Video Post' ),\n\t\t\t),\n\t\t\t'public' => false,\n\t\t\t'show_ui' => true,\n\t\t\t'supports' => array(\n\t\t\t\t'title',\n\t\t\t\t'editor',\n\t\t\t\t'excerpt',\n\t\t\t\t'author'\n\t\t\t)\n\t\t)\n\t);\n\n\tregister_post_type( 'service_card',\n\t\tarray(\n\t\t\t'labels' => array(\n\t\t\t\t'name' => __( 'Service Card' ),\n\t\t\t),\n\t\t\t'public' => false,\n\t\t\t'show_ui' => true,\n\t\t\t'supports' => array(\n\t\t\t\t'title',\n\t\t\t\t'editor'\n\t\t\t)\n\t\t)\n\t);\n\n\tregister_post_type( 'place_of_work',\n\t\tarray(\n\t\t\t'labels' => array(\n\t\t\t\t'name' => __( 'Place Of Work' ),\n\t\t\t),\n\t\t\t'public' => false,\n\t\t\t'show_ui' => true,\n\t\t\t'supports' => array(\n\t\t\t\t'title',\n\t\t\t\t'excerpt',\n\t\t\t\t'editor'\n\t\t\t)\n\t\t)\n\t);\n\n\tregister_post_type( 'testimonial',\n\t\tarray(\n\t\t\t'labels' => array(\n\t\t\t\t'name' => __( 'Testimonial' ),\n\t\t\t),\n\t\t\t'public' => false,\n\t\t\t'show_ui' => true,\n\t\t\t'supports' => array(\n\t\t\t\t'title'\n\t\t\t)\n\t\t)\n\t);\n\n\n}", "title": "" }, { "docid": "f995456adf9aee5be2f37c91100e26fb", "score": "0.63258654", "text": "function post_type() {\n register_post_type( self::$post_type, array(\n 'labels' => array(\n 'name' => __('Maps', 'some-maps' ),\n 'singular_name' => __('Map', 'some-maps' ),\n 'add_new_item' => __('New Map', 'some-maps' ),\n 'edit_item' => __('Edit Map', 'some-maps' ),\n ),\n 'public' => true,\n 'map_meta_cap' => true,\n 'rewrite' => array( 'slug' => self::$post_type ),\n 'supports' => array( 'title', 'comments' ),\n 'register_meta_box_cb' => array( __CLASS__, 'meta_boxes' ),\n 'exclude_from_search' => true,\n 'publicly_queryable' => false,\n 'show_ui' => true\n ) );\n }", "title": "" }, { "docid": "65c287123d7648a123df17087891fa95", "score": "0.63134474", "text": "protected function setup_post_types() {\n\t\t$this->post_type = papi_to_array( $this->post_type );\n\n\t\t// Set a default value to post types array\n\t\t// if we don't have a array or a empty array.\n\t\tif ( empty( $this->post_type ) ) {\n\t\t\t$this->post_type = ['page'];\n\t\t}\n\n\t\tif ( count( $this->post_type ) === 1 && $this->post_type[0] === 'any' ) {\n\t\t\t$this->post_type = get_post_types( '', 'names' );\n\t\t\t$this->post_type = array_values( $this->post_type );\n\t\t}\n\t}", "title": "" }, { "docid": "e1c536a097b0746003c6d0362fbf7c1c", "score": "0.63120556", "text": "function baa_supports() {\n\n $labels = array(\n 'name' => __( 'Support', 'Post Type General Name', 'baa_supports' ),\n 'singular_name' => __( 'Support', 'Post Type Singular Name', 'baa_supports' ),\n 'menu_name' => __( 'Support', 'baa_supports' ),\n 'parent_item_colon' => __( 'Parent Item:', 'baa_supports' ),\n 'all_items' => __( 'Tutti gli elementi', 'baa_supports' ),\n 'view_item' => __( 'View Item', 'baa_supports' ),\n 'add_new_item' => __( 'Aggiungi nuovo', 'baa_supports' ),\n 'add_new' => __( 'Aggiungi nuovo', 'baa_supports' ),\n 'edit_item' => __( 'Edit Item', 'baa_supports' ),\n 'update_item' => __( 'Aggiorna', 'baa_supports' ),\n 'search_items' => __( 'Search Item', 'baa_supports' ),\n 'not_found' => __( 'Not found', 'baa_supports' ),\n 'not_found_in_trash' => __( 'Not found in Trash', 'baa_supports' ),\n );\n $rewrite = array(\n 'slug' => 'baa_supports',\n 'with_front' => true,\n 'pages' => true,\n 'feeds' => true,\n );\n $args = array(\n 'label' => __( 'baa_supports', 'baa_supports' ),\n 'description' => __( 'Support in Bed and Art', 'baa_supports' ),\n \n 'labels' => $labels,\n 'supports' => array( 'title', 'editor', 'escerpt', 'thumbnail', 'custom-fields' ),\n 'hierarchical' => false,\n 'public' => false,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'show_in_nav_menus' => false,\n 'show_in_admin_bar' => true,\n 'menu_position' => 6,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => true,\n 'publicly_queryable' => true,\n 'rewrite' => $rewrite,\n 'capability_type' => 'post',\n );\n\n\n register_post_type( 'baa_supports', $args );\n register_taxonomy('support_type', 'baa_supports', array('hierarchical' => true, 'label' => 'Categorie Support', 'query_var' => true, 'rewrite' => true));\n\n }", "title": "" }, { "docid": "96a87c61793157c6ff92b645b375e451", "score": "0.63095754", "text": "function reg_post_types() {\n\n register_post_type('project', array(\n 'capability_type' => 'project',\n 'map_meta_cap' => true,\n 'supports' => array('title', 'editor', 'thumbnail'),\n 'public' => true,\n 'show_in_rest' => true,\n 'rewrite' => array(\n 'with_front' => false\n ),\n 'labels' => array(\n 'name' => 'Projects',\n 'add_new_item' => 'Add New Project',\n 'edit_item' => 'Edit Project',\n 'all_items' => 'All Projects',\n 'singular_name' => 'Project'\n ),\n 'menu_icon' => 'dashicons-media-archive'\n ));\n\n // Register Career Post Type\n\n register_post_type('career', array(\n 'capability_type' => 'career',\n 'map_meta_cap' => true,\n 'supports' => array('title', 'editor', 'thumbnail', 'excerpt'),\n 'public' => true,\n 'show_in_rest' => true,\n 'rewrite' => array(\n 'with_front' => false\n ),\n 'labels' => array(\n 'name' => 'Careers',\n 'add_new_item' => 'Add New Career',\n 'edit_item' => 'Edit Career',\n 'all_items' => 'All Careers',\n 'singular_name' => 'Career'\n ),\n 'menu_icon' => 'dashicons-universal-access'\n ));\n\n // Register Service Post Type\n\n register_post_type('service', array(\n 'capability_type' => 'service',\n 'map_meta_cap' => true,\n 'supports' => array('title', 'editor', 'thumbnail'),\n 'public' => true,\n 'show_in_rest' => true,\n 'rewrite' => array(\n 'with_front' => false\n ),\n 'labels' => array(\n 'name' => 'Services',\n 'add_new_item' => 'Add New Service',\n 'edit_item' => 'Edit Service',\n 'all_items' => 'All Services',\n 'singular_name' => 'Service'\n ),\n 'menu_icon' => 'dashicons-chart-pie'\n ));\n\n // Register Amazon Post Type\n\n register_post_type('amazon', array(\n 'capability_type' => 'amazon',\n 'map_meta_cap' => true,\n 'supports' => array('title', 'editor', 'thumbnail'),\n 'public' => true,\n 'show_in_rest' => true,\n 'rewrite' => array(\n 'with_front' => false\n ),\n 'labels' => array(\n 'name' => 'Amazon',\n 'add_new_item' => 'Add New Product',\n 'edit_item' => 'Edit Product',\n 'all_items' => 'All Products',\n 'singular_name' => 'Product'\n ),\n 'menu_icon' => 'dashicons-amazon'\n ));\n\n}", "title": "" }, { "docid": "bce4b21de284fa7dbcdd360a477449b8", "score": "0.6301875", "text": "function register_custom_post_types() {\r\n\r\n\tregister_post_type( 'movie',\r\n\t\t[\r\n\t\t\t'labels' => [\r\n\t\t\t\t'name' => 'Movies',\r\n\t\t\t\t'singular_name' => 'Movie',\r\n\t\t\t\t'menu_name' => 'Movies',\r\n\t\t\t],\r\n\t\t\t'public' => true,\r\n\t\t\t'publicly_queryable' => true,\r\n\t\t\t'menu_icon' => 'dashicons-clipboard',\r\n\t\t\t'has_archive' => true,\r\n\t\t\t'rewrite' => [ 'slug' => 'movie' ],\r\n\t\t\t'supports' => [\r\n\t\t\t\t'title',\r\n\t\t\t\t'editor',\r\n\t\t\t\t'thumbnail',\r\n\t\t\t\t'author'\r\n\t\t\t],\r\n\t\t]\r\n\t);\r\n\r\n\tregister_post_type( 'project', [\r\n\t\t'labels' => [\r\n\t\t\t'name' => __( 'Projects' ),\r\n\t\t\t'singular_name' => __( 'Project' ),\r\n\t\t\t'menu_name' => __( 'Projects' ),\r\n\t\t],\r\n\t\t'public' => true,\r\n\t\t'menu_icon' => 'dashicons-location',\r\n\t\t'rewrite' => [ 'slug' => 'project' ],\r\n\t\t'supports' => [ 'title', 'editor', 'thumbnail' ]\r\n\t] );\r\n}", "title": "" }, { "docid": "c18ecb06aa1ef87c8f28fdf82ed39fd0", "score": "0.63008463", "text": "public static function allowed_post_types() {\n\n\t\tif ( ! empty( self::$allowed_post_types ) ) {\n\t\t\treturn self::$allowed_post_types;\n\t\t}\n\n\t\t$options = get_option( 'fusion_builder_settings', [] );\n\n\t\tself::$allowed_post_types = self::default_post_types();\n\t\tif ( ! empty( $options ) && isset( $options['post_types'] ) ) {\n\t\t\t// If there are options saved, use them.\n\t\t\t$post_types = ( ' ' === $options['post_types'] ) ? [] : $options['post_types'];\n\t\t\t// Add defaults to allowed post types ( bc ).\n\t\t\t$post_types[] = 'fusion_element';\n\t\t\t$post_types[] = 'fusion_tb_section';\n\t\t\tself::$allowed_post_types = apply_filters( 'fusion_builder_allowed_post_types', $post_types );\n\t\t}\n\t\treturn self::$allowed_post_types;\n\t}", "title": "" }, { "docid": "187db2959267d3e1c80f5b4f6685006d", "score": "0.62969524", "text": "function register_custom_posttypes() {\r\n\tCustomPostType::Register_Posttypes(array(\r\n\t\t__NAMESPACE__.'\\Post',\r\n\t\t__NAMESPACE__.'\\Page',\r\n\t\t__NAMESPACE__.'\\StudentService',\r\n\t\t__NAMESPACE__.'\\Spotlight',\r\n\t\t__NAMESPACE__.'\\IconLink',\r\n\t));\r\n}", "title": "" }, { "docid": "a3073f6e24d15500295a65a1ee4f65f2", "score": "0.62957454", "text": "public static function register_post_types() {\n\t\t// self::register_post_type(TSU_Modules_Controller::$postType, 'Modulo', 'Modulos');\n\n\t\t// self::register_post_type(TSU_Property_Groups_Controller::$postType, 'Grupo de propiedades', 'Grupos de propiedades');\n\n\t\tself::register_post_type('tsu_crm_properties', 'Propiedades', 'Propiedades');\n\t}", "title": "" }, { "docid": "b0d2be93e67bd387469bbab5b02f2d59", "score": "0.6286895", "text": "function register_post_type()\n {\n $n = ucwords($this->post_type_name);\n\n $args = array(\n \"label\" => $n . 's',\n 'singular_name' => $n,\n \"public\" => true,\n \"publicly_queryable\" => true,\n \"query_var\" => true,\n #\"menu_icon\" => get_stylesheet_directory_uri() . \"/article16.png\",\n \"rewrite\" => true,\n \"capability_type\" => \"post\",\n \"hierarchical\" => false,\n \"menu_position\" => null,\n \"supports\" => array(\"title\", \"editor\", \"thumbnail\"),\n 'has_archive' => true\n );\n\n // Take user provided options, and override the defaults.\n $args = array_merge($args, $this->post_type_args);\n\n register_post_type($this->post_type_name, $args);\n }", "title": "" }, { "docid": "223fd9983d0ef5344c7d8e93470a3aa7", "score": "0.62809557", "text": "function tutsplus_theme_support() {\n\n /* post formats */\n add_theme_support( 'post-formats', array( 'aside', 'quote' ) );\n \n /* post thumbnails */\n add_theme_support( 'post-thumbnails', array( 'post', 'page', 'project' ) );\n\n /* HTML5 */\n add_theme_support( 'html5' );\n\n /* automatic feed links */\n add_theme_support( 'automatic-feed-links' );\n\n}", "title": "" }, { "docid": "51c52730f9499e5e009b087bc1c8a578", "score": "0.6276366", "text": "function ar_luottohakemus_custom_post_type() {\n add_theme_support( 'post-thumbnails' );\n register_post_type('application',\n array(\n 'rewrite' => array('slug' => 'applications'),\n 'labels' => array(\n 'name' => 'Hakemukset',\n 'singular_name' => 'Hakemus',\n 'add_new' => 'Luo Hakemus',\n 'add_new_item' => 'Uusi Hakemus',\n 'edit_item' => 'Muokkaa Hakemusta'\n ),\n 'menu_icon' => 'dashicons-welcome-write-blog',\n 'public' => true,\n 'has_archive' => true,\n 'supports' => array(\n 'title', 'thumbnail',\n )\n )\n );\n}", "title": "" }, { "docid": "ead238ca4a119bde5a72e7b708c009ea", "score": "0.6265168", "text": "public function registerPostType()\n {\n register_post_type( 'video',\n array(\n 'labels' => array(\n 'name' => __( 'Videos' ),\n 'singular_name' => __( 'Video' ),\n 'add_new' => \"Add Video\",\n 'add_new_item' => \"Add Video\",\n 'all_items' => 'All Videos',\n 'view_item' => \"View Video\",\n 'edit_item' => \"Edit Video\",\n 'new_item' => \"New Video\",\n ),\n 'menu_position' => 20,\n 'menu_icon' => 'dashicons-video-alt3',\n 'supports' => array('title', 'revisions', 'author'),\n 'public' => true,\n 'has_archive' => false,\n 'rewrite' => array('slug' => 'video')\n )\n );\n\n $this->registerCustomFields();\n }", "title": "" }, { "docid": "ef4cf8fa215d561285abd6de695a7666", "score": "0.625963", "text": "function wporg_custom_post_type() {\n register_post_type('editores_portal',\n array(\n 'labels' => array(\n 'name' => __( 'Grupos', 'textdomain' ),\n 'singular_name' => __( 'Grupo', 'textdomain' ),\n ),\n 'public' => true,\n 'has_archive' => true,\n\t\t\t'rewrite' => array( 'slug' => 'editores_portal' ), // my custom slug\n 'menu_position'=> 20,\n\t\t\t'capabilities' => array(\n\t\t\t\t'edit_post' => 'activate_plugins',\n\t\t\t\t'read_post' => 'activate_plugins',\n\t\t\t\t'delete_post' => 'activate_plugins',\n\t\t\t\t'edit_posts' => 'add_grupo',\n\t\t\t\t'edit_others_posts' => 'activate_plugins',\n\t\t\t\t'delete_posts' => 'activate_plugins',\n\t\t\t\t'publish_posts' => 'activate_plugins',\n\t\t\t\t'read_private_posts' => 'activate_plugins',\n\t\t\t\t'create_posts' => 'activate_plugins'\n\t\t\t),\n )\n );\n}", "title": "" }, { "docid": "f71b1d8f1ed0b1cc156bc900579603bb", "score": "0.6234462", "text": "public static function register_post_types() {\n\t\tforeach ( self::$post_types_to_register as $post_type => $args ) {\n\t\t\t$args = apply_filters('gbs_register_post_type_args-'.$post_type, $args);\n\t\t\t$args = apply_filters('gbs_register_post_type_args', $args, $post_type);\n\t\t\tregister_post_type($post_type, $args);\n\t\t}\n\t}", "title": "" }, { "docid": "b70e8f3647c8ac4c49efe98e8b8212b3", "score": "0.6214623", "text": "public function init() {\n\t register_post_type( 'team', array( 'public' => true, 'label' => 'Our Team','supports' => array('title', 'editor','', 'thumbnail') ));\n\t}", "title": "" }, { "docid": "eaf6b518c6af996b706845a0397eccff", "score": "0.62089473", "text": "function blogtype1_post_type()\r\n{\r\n\r\n $blogtype1_labels = array(\r\n 'name' => __('Technical', 'medicalStore_site'),\r\n 'singular_name' => __('Technical', 'medicalStore_site'),\r\n 'add_new' => __('Add new Technical', 'medicalStore_site'),\r\n 'add_new_item' => __('Add new Technical', 'medicalStore_site'),\r\n 'featured_image' => __('Technical post image', 'medicalStore_site'),\r\n 'set_featured_image' => __('Set Technical image', 'medicalStore_site'),\r\n\r\n );\r\n\r\n $blogtype1_args = array(\r\n\r\n 'labels' => $blogtype1_labels,\r\n 'public' => true,\r\n 'show_ui' => true,\r\n 'capability_type' => 'post',\r\n 'menu_position' => null,\r\n 'show_in_rest' => true,\r\n 'rewrite' => array('slug' => 'blogtype1'),\r\n 'supports' => array(\r\n 'title', 'editor', 'thumbnail', 'excerpt', 'author', 'permalinks',\r\n 'comments', 'revisions', 'custom-fields'\r\n ),\r\n 'taxonomies' => array('category', 'post_tag'),\r\n\r\n\r\n );\r\n\r\n register_post_type('blogtype1', $blogtype1_args);\r\n}", "title": "" }, { "docid": "265e20ca78c3f81e74d1714c571fc8e2", "score": "0.6198738", "text": "function add_post_types_to_rest_api( $allowed_types ) {\n\t$allowed_types += array( 'wcb_speaker', 'wcb_session', 'wcb_sponsor' );\n\n\treturn $allowed_types;\n}", "title": "" }, { "docid": "1862b4ebd0a0c2e4e609723f416af1b6", "score": "0.61966676", "text": "function custom_post_example() {\n\t// creating (registering) the custom type\n\tregister_post_type( 'works', /* (http://codex.wordpress.org/Function_Reference/register_post_type) */\n\t\t// let's now add all the options for this post type\n\t\tarray( 'labels' => array(\n\t\t\t'name' => __( '作品', 'bonestheme' ), /* This is the Title of the Group */\n\t\t\t'singular_name' => __( '作品', 'bonestheme' ), /* This is the individual type */\n\t\t\t'all_items' => __( '作品一覧', 'bonestheme' ), /* the all items menu item */\n\t\t\t'add_new' => __( '作品を投稿する', 'bonestheme' ), /* The add new menu item */\n\t\t\t'add_new_item' => __( '新しい作品を投稿する', 'bonestheme' ), /* Add New Display Title */\n\t\t\t'edit' => __( '編集', 'bonestheme' ), /* Edit Dialog */\n\t\t\t'edit_item' => __( '編集', 'bonestheme' ), /* Edit Display Title */\n\t\t\t'new_item' => __( '新しい作品', 'bonestheme' ), /* New Display Title */\n\t\t\t'view_item' => __( '作品を見る', 'bonestheme' ), /* View Display Title */\n\t\t\t'search_items' => __( '作品を検索', 'bonestheme' ), /* Search Custom Type Title */\n\t\t\t'not_found' => __( 'まだ作品がありません', 'bonestheme' ), /* This displays if there are no entries yet */\n\t\t\t'parent_item_colon' => ''\n\t\t\t), /* end of arrays */\n\t\t\t'public' => true,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'exclude_from_search' => false,\n\t\t\t'show_ui' => true,\n\t\t\t'query_var' => true,\n\t\t\t'menu_position' => 8, /* this is what order you want it to appear in on the left hand side menu */\n\t\t\t'menu_icon' => 'dashicons-art', /* the icon for the custom post type menu */\n\t\t\t'rewrite'\t=> array( 'slug' => 'works', 'with_front' => false ), /* you can specify its url slug */\n\t\t\t'has_archive' => 'works', /* you can rename the slug here */\n\t\t\t'capability_type' => 'post',\n\t\t\t'hierarchical' => true,\n\t\t\t/* the next one is important, it tells what's enabled in the post editor */\n\t\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'author', 'excerpt', 'revisions', 'sticky')\n\t\t) /* end of options */\n\t); /* end of register post type */\n}", "title": "" }, { "docid": "7183dff475495fdd61e2c685273bf414", "score": "0.6194744", "text": "public function add_custom_post_types(){\n\n\t\tregister_post_type( 'bcit_todo', // http://codex.wordpress.org/Function_Reference/register_post_type\n\t\t\tarray(\n\t\t\t\t'labels' => array(\n\t\t\t\t\t'name' => __('TODOS'),\n\t\t\t\t\t'singular_name' => __('TODO'),\n\t\t\t\t\t'add_new' => __('Add New'),\n\t\t\t\t\t'add_new_item' => __('Add New TODO'),\n\t\t\t\t\t'edit' => __('Edit'),\n\t\t\t\t\t'edit_item' => __('Edit TODO'),\n\t\t\t\t\t'new_item' => __('New TODO'),\n\t\t\t\t\t'view' => __('View TODO'),\n\t\t\t\t\t'view_item' => __('View TODO'),\n\t\t\t\t\t'search_items' => __('Search TODOS'),\n\t\t\t\t\t'not_found' => __('No TODOS Found'),\n\t\t\t\t\t'not_found_in_trash' => __('No TODOS found in Trash')\n\t\t\t\t\t), // end array for labels\n\t\t\t\t'public' => true,\n\t\t\t\t'menu_position' => 5, // sets admin menu position\n\t\t\t\t'menu_icon' => 'dashicons-list-view',\n\t\t\t\t'hierarchical' => false, // functions like posts\n\t\t\t\t'supports' => array('title', 'editor', 'revisions', 'excerpt', 'thumbnail'),\n\t\t\t\t'rewrite' => array('slug' => 'bcit-todo', 'with_front' => true,), // permalinks format\n\t\t\t\t'can_export' => true,\n\t\t\t)\n\t\t);\n\n\t}", "title": "" }, { "docid": "3988ae76b6311cd312e32bfcc44ebad8", "score": "0.618533", "text": "private function register_post_features() {\n\t\trequire_once plugin_dir_path( __FILE__ ) . 'class-post-link-cpt.php';\n\t\t$this->cpt = new postlink_cpt();\n\t\t$this->cpt->register_cpt();\n\t\t$this->cpt->add_endpoint();\n\t}", "title": "" }, { "docid": "59e3a5d5008c74af4eeab26cbe389980", "score": "0.617702", "text": "public function theme_supports() {\n\t\tadd_theme_support( 'automatic-feed-links' );\n\n\t\t/*\n\t\t * Let WordPress manage the document title.\n\t\t * By adding theme support, we declare that this theme does not use a\n\t\t * hard-coded <title> tag in the document head, and expect WordPress to\n\t\t * provide it for us.\n\t\t */\n\t\tadd_theme_support( 'title-tag' );\n\n\t\t/*\n\t\t * Enable support for Post Thumbnails on posts and pages.\n\t\t *\n\t\t * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/\n\t\t */\n\t\tadd_theme_support( 'post-thumbnails' );\n\n\t\t/*\n\t\t * Switch default core markup for search form, comment form, and comments\n\t\t * to output valid HTML5.\n\t\t */\n\t\tadd_theme_support(\n\t\t\t'html5', array(\n\t\t\t\t'comment-form',\n\t\t\t\t'comment-list',\n\t\t\t\t'gallery',\n\t\t\t\t'caption',\n\t\t\t)\n\t\t);\n\n\t\t/*\n\t\t * Enable support for Post Formats.\n\t\t *\n\t\t * See: https://codex.wordpress.org/Post_Formats\n\t\t */\n\t\tadd_theme_support(\n\t\t\t'post-formats', array(\n\t\t\t\t'aside',\n\t\t\t\t'image',\n\t\t\t\t'video',\n\t\t\t\t'quote',\n\t\t\t\t'link',\n\t\t\t\t'gallery',\n\t\t\t\t'audio',\n\t\t\t)\n\t\t);\n\n\t\tadd_theme_support( 'menus' );\n\n\t\tadd_theme_support('woocommerce');\n\t}", "title": "" }, { "docid": "d6bf13e680cc3a70a29c17afdf88dd8c", "score": "0.61750674", "text": "final public function register()\n {\n Log::debug(\"Register PostType\", array('name' => $this->name, 'args' => $this->args()));\n\n // register_post_type($this->name, $this->args());\n }", "title": "" }, { "docid": "c5c7b4844f50c9729d4227f0a9f552f5", "score": "0.6168691", "text": "public function register() {\n\t\t\t$this->register_post_type();\t\t\t\n\t\t}", "title": "" }, { "docid": "bf72cc266ca41167535fe42a7a16c2c1", "score": "0.61682427", "text": "function reg_post_types() {\n\t\t$labels = array(\n\t\t\t\t\t'name' => 'Menus',\n\t\t\t\t\t'singuular_name' => 'Menu',\n\t\t\t\t\t'menu_name' => 'Menu',\n\t\t\t\t\t'name_admin_bar' => 'Menu',\n\t\t\t\t\t'all_items' => 'All Menus',\n\t\t\t\t\t'add_new' => 'Add New Menu',\n\t\t\t\t\t'edit_item' => 'Edit Menu',\n\t\t\t\t\t'new_item' => 'New Menu',\n\t\t\t\t\t'view_item' => 'View Menu',\n\t\t\t\t\t'search_items' => 'Search Menus',\n\t\t\t\t\t'not_found' => 'No Menus Found'\n\t\t\t\t );\n\n\t\t$staff_labels = array(\n\t\t\t\t\t'name' => 'Stafff',\n\t\t\t\t\t'singuular_name' => 'Staff',\n\t\t\t\t\t'menu_name' => 'Staff',\n\t\t\t\t\t'name_admin_bar' => 'Staff',\n\t\t\t\t\t'all_items' => 'All Staff Members',\n\t\t\t\t\t'add_new' => 'Add New Staff Member',\n\t\t\t\t\t'edit_item' => 'Edit Staff Member',\n\t\t\t\t\t'new_item' => 'New Staff Member',\n\t\t\t\t\t'view_item' => 'View Staff',\n\t\t\t\t\t'search_items' => 'Search Staff',\n\t\t\t\t\t'not_found' => 'No Menus Found'\n\t\t\t\t );\n\n\t\t$menu_supports = array(\n\t\t\t\t\t\t\t'title', \n\t\t\t\t\t\t\t'revisions',\n\t\t\t\t\t\t\t'custom-fields',\n\t\t\t\t\t\t\t'excerpt'\n\t\t\t\t\t\t);\n\n\t\t$staff_supports = array(\n\t\t\t\t\t\t\t'title',\n\t\t\t\t\t\t\t'editor',\n\t\t\t\t\t\t\t'thumbnail'\n\t\t\t\t\t\t);\n\n\t\t$menu_tax = array('menu_types');\n\n\t\t$staff_tax = array('staff_categories');\n\n\t\t$args = array(\n\t\t\t\t\t'label' => 'Menus',\n\t\t\t\t\t'labels' => $labels,\n\t\t\t\t\t'descrition' => 'Availble food menu options',\n\t\t\t\t\t'public' => true,\n\t\t\t\t\t'menu_postion' => 5,\n\t\t\t\t\t'supports' => $menu_supports,\n\t\t\t\t\t'taxonomies' => $menu_tax,\n\t\t\t\t\t'rewrite' => array('slug' => 'menus')\n\t\t\t\t);\n\n\t\t$staff_args = array(\n\t\t\t\t\t'label' => 'Staff',\n\t\t\t\t\t'labels' => $staff_labels,\n\t\t\t\t\t'descrition' => 'Staff Members',\n\t\t\t\t\t'public' => true,\n\t\t\t\t\t'menu_postion' => 6,\n\t\t\t\t\t'supports' => $staff_supports,\n\t\t\t\t\t'taxonomies' => $staff_tax,\n\t\t\t\t\t'rewrite' => array('slug' => 'staff')\n\t\t\t\t);\n\n\n\t\tregister_post_type('Menus', $args);\n\n\t\tregister_post_type('Staff', $staff_args);\n\t}", "title": "" }, { "docid": "6bdcf98ee5e2b6df7006de4d2fff938d", "score": "0.6167193", "text": "function register_post_type( array $args = array() ): void {\n\t\t\\wpinc\\post\\event\\register_post_type( $args );\n\t}", "title": "" }, { "docid": "9ca82ed9826911dde8d33120b83f8ee6", "score": "0.61670154", "text": "public function register_post_types() {\n\n\t\t\t// Iterate custom post-types...\n\t\t\tforeach ( $this->post_types as $k=>$v ) {\n\n\t\t\t\t// Sanitize post-type... a-z_- only\n\t\t\t\t$post_type = sanitize_key( str_replace( ' ', '_', $k ) );\n\n\t\t\t\t// Sanity checks - reserved words and max post-type length\n\t\t\t\tif ( in_array( $post_type, $this->post_type_reserved ) || strlen( $post_type ) > 20 ) { \n\t\t\t\t\t$this->post_type_errors[] = $post_type;\n\t\t\t\t\tcontinue; \n\t\t\t\t}\t\t \n\n\t\t\t\t// Set up singluar & plural\n\t\t\t\t$singular\t\t= ( isset( $v['name'] ) && !empty( $v['name'] ) ) ? ucwords( $v['name'] ) : ucwords( str_replace( '_', ' ', $post_type ) );\n\t\t\t\t$plural\t\t\t= ( isset( $v['plural'] ) && !empty( $v['plural'] ) ) ? ucwords( $v['plural'] ) : $singular . 's'; \n\t\t\t\t$description\t= ( isset( $v['description'] ) && !empty( $v['description'] ) ) ? ucfirst( $v['description'] ) : 'This is the ' . $singular . ' post-type';\n\t\t\t\n\t\t\t\t// Set up post-type labels - Rename to suit, common options here @see https://codex.wordpress.org/Function_Reference/register_post_type\n\t\t\t\t$labels = [\n\t\t\t\t\t'name'\t\t\t\t\t=> sprintf( _x( '%s', 'Post type general name', 'ipress' ), $plural ),\n\t\t\t\t\t'singular_name'\t\t\t=> sprintf( _x( '%s', 'Post type singular name', 'ipress' ), $singular ),\n\t\t\t\t\t'menu_name'\t\t\t\t=> sprintf( _x( '%s', 'Admin menu text', 'ipress' ), $plural ),\n\t\t\t\t\t'add_new'\t\t\t\t=> sprintf( _x( 'Add New', '%s', 'ipress' ), $singular ),\n\t\t\t\t\t'add_new_item'\t\t\t=> sprintf( __( 'Add New %s', 'ipress' ), $singular ),\n\t\t\t\t\t'edit_item'\t\t\t\t=> sprintf( __( 'Edit %s', 'ipress' ), $singular ),\n\t\t\t\t\t'new_item'\t\t\t\t=> sprintf( __( 'New %s', 'ipress' ), $singular ),\n\t\t\t\t\t'view_item'\t\t\t\t=> sprintf( __( 'View %s', 'ipress' ), $singular ),\n\t\t\t\t\t'view_items'\t\t\t=> sprintf( __( 'View %s', 'ipress' ), $plural ),\n\t\t\t\t\t'search_items'\t\t\t=> sprintf( __( 'Search %s', 'ipress' ), $plural ),\n\t\t\t\t\t'not_found'\t\t\t\t=> sprintf( __( 'No %s found', 'ipress' ), $plural ),\n\t\t\t\t\t'not_found_in_trash'\t=> sprintf( __( 'No %s found in Trash', 'ipress' ), $plural ),\n\t\t\t\t\t'parent_item_colon'\t\t=> sprintf( __( 'Parent %s:', 'ipress' ), $singular ),\n\t\t\t\t\t'all_items'\t\t\t\t=> sprintf( __( 'All %s', 'ipress' ), $plural ), \n\t\t\t\t\t'archives'\t\t\t\t=> sprintf( __( '%s Archives', 'ipress' ), $singular ),\n\t\t\t\t\t'attributes'\t\t\t=> sprintf( __( '%s Attributes', 'ipress' ), $singular ),\n\t\t\t\t\t'insert_into_item'\t\t=> sprintf( __( 'Insert into %s', 'ipress' ), $singular ),\n\t\t\t\t\t'uploaded_to_this_item' => sprintf( __( 'Uploaded to this %s', 'ipress' ), $singular ),\n\t\t\t\t\t'featured_image'\t\t=> sprintf( __( '%s Featured Image', 'ipress' ), $singular ),\n\t\t\t\t\t'set_featured_image'\t=> sprintf( __( 'Set %s Featured Image', 'ipress' ), $singular ),\n\t\t\t\t\t'remove_featured_image' => sprintf( __( 'Remove %s Featured Image', 'ipress' ), $singular ),\n\t\t\t\t\t'use_featured_image'\t=> sprintf( __( 'Use %s Featured Image', 'ipress' ), $singular ),\n\t\t\t\t\t'filter_items_list'\t\t=> sprintf( __( 'Filter %s list', 'ipress' ), $plural ),\n\t\t\t\t\t'items_list_navigation' => sprintf( __( '%s list navigation', 'ipress' ), $plural ), \n\t\t\t\t\t'items_list'\t\t\t=> sprintf( __( '%s list', 'ipress' ), $plural ),\n\t\t\t\t\t'name_admin_bar'\t\t=> sprintf( __( '%s', 'ipress' ), $singular )\n\t\t\t\t];\n\n\t\t\t\t// Set up post-type support - default: 'title', 'editor', 'thumbnail'\n\t\t\t\t$supports = ( isset( $v['supports'] ) && is_array( $v['supports'] ) && !empty( $v['supports'] ) ) ? $v['supports'] : [\n\t\t\t\t\t'title',\n\t\t\t\t\t'editor',\n\t\t\t\t\t'thumbnail'\n\t\t\t\t];\n\t\t\n\t\t\t\t// Set up post-type args - common options here @see https://codex.wordpress.org/Function_Reference/register_post_type\n\t\t\t\t$defaults = ( isset( $v['args'] ) && is_array( $v['args'] ) && ! empty( $v['args'] ) ) ? $v['args'] : [];\n\t\t\t\t$args = array_merge( [\n\t\t\t\t\t'labels'\t\t=> $labels,\n\t\t\t\t\t'public'\t\t=> true,\n\t\t\t\t\t'has_archive'\t=> sanitize_title( $plural ),\n\t\t\t\t\t'supports'\t\t=> $supports\n\t\t\t\t], $defaults );\n\t\t\n\t\t\t\t// Associated taxonomies... still need to explicitly register with 'register_taxonomy'\n\t\t\t\t$taxonomies = ( isset( $v['taxonomies'] ) && is_array( $v['taxonomies'] ) && ! empty( $v['taxonomies'] ) ) ? $v['taxonomies'] : '';\n\t\t\t\tif ( ! empty( $taxonomies ) ) {\n\t\t\t\t\t$args['taxonomies'] = $taxonomies;\n\t\t\t\t}\n\t\t\n\t\t\t\t// Register new post-type\n\t\t\t\tregister_post_type( $post_type, $args );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "f09e18158d7cc7928a9d45a92d399430", "score": "0.61617243", "text": "function mbudm_post_types() {\n\tregister_post_type( MBUDM_PT_ARTWORK,\n\t\tarray(\n\t\t\t'labels' => array(\n\t\t\t\t'name' => __( 'Artworks' , TEMPLATE_DOMAIN ),\n\t\t\t\t'singular_name' => __( 'Artwork', TEMPLATE_DOMAIN ),\n\t\t\t\t'add_new_item' => __('Add New Artwork', TEMPLATE_DOMAIN ),\n\t\t\t\t'edit_item' => __('Edit Artwork', TEMPLATE_DOMAIN ),\n\t\t\t\t'new_item' => __('New Artwork', TEMPLATE_DOMAIN ),\n\t\t\t\t'view_item' => __('View Artwork', TEMPLATE_DOMAIN ),\n\t\t\t\t'search_items' => __('Search Artworks', TEMPLATE_DOMAIN ),\n\t\t\t\t'not_found' => __('No Artworks found', TEMPLATE_DOMAIN ),\n\t\t\t\t'not_found_in_trash' => __('No Artworks found in Trash', TEMPLATE_DOMAIN )\n\t\t\t),\n\t\t\t'public' => true,\n\t\t\t'has_archive' => true,\n\t\t\t'rewrite' => array('slug' => 'artworks'),\n\t\t\t'supports' => array('title','thumbnail','comments','editor' ),\n\t\t\t'taxonomies' => array('category'),\n\t\t\t'register_meta_box_cb' => 'mbudm_add_artworks_metaboxes'\n\t\t)\n\t);\n}", "title": "" }, { "docid": "d7d0154d20a3d2d37c31a2845eacfd82", "score": "0.6157662", "text": "function odin_artigo_cpt() {\r\n $artigo = new Odin_Post_Type(\r\n 'Artigo', // Nome (Singular) do Post Type.\r\n 'artigos' // Slug do Post Type.\r\n );\r\n\r\n $artigo->set_labels(\r\n array(\r\n 'menu_name' => __( 'Artigos', 'odin' )\r\n )\r\n );\r\n\r\n $artigo->set_arguments(\r\n array(\r\n 'supports' => array( 'title', 'editor', 'thumbnail' ),\r\n\t \t\t\t'menu_icon' => 'dashicons-format-aside'\r\n )\r\n );\r\n}", "title": "" }, { "docid": "3525d2e7cdee19576a659b5811cb6893", "score": "0.61525124", "text": "function event_cpt_functionality() { //see https://codex.wordpress.org/Function_Reference/post_type_supports\n\t$features = get_all_post_type_features('post', array( #list of excluded features. See lines 59 and 88\n\t\t'trackbacks',\n\t\t'custom-fields',\n\t\t'revisions',\n\t\t'author',\n\t\t'post-formats'\n\t));\n\n\tregister_post_type( 'event_cpt', array(\n\t\t'labels' => array(\n\t\t\t\t'name' => __( 'Events', 'Events CPT general name' , 'events-functionality'),\n\t\t\t\t'singular_name' => __( 'Event', 'Events CPT singular name' , 'events-functionality'),\n\t\t\t\t'all_items' => __('All Events'),\n \t\t 'add_new_item' => __('Add New Event', 'events-functionality'),\n \t\t 'edit_item' => __('Edit Event', 'events-functionality'),\n \t\t 'new_item' => __('New Event', 'events-functionality'),\n\t\t\t'view_item' => __('View Event', 'events-functionality'),\n\t\t\t'featued_image' => __('Event image', 'events-functionality'),\n\t\t\t'set_featued_image' => __('Choose Event image', 'events-functionality'),\n\t\t\t'remove_featued_image' => __('Remove Event image', 'events-functionality'),\n\t\t\t'use_featued_image' => __('Use Event image', 'events-functionality'),\n \t\t 'view_items' => __('View Events', 'events-functionality'),\n \t\t 'search_items' => __('Search Event', 'events-functionality'),\n \t\t 'not_found' => __( 'No Events found.', 'events-functionality' ),\n \t\t \t'not_found_in_trash' => __( 'No Events found in Trash.', 'events-functionality' )\n\t\t),\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'has_archive' => true, #this means it'll have an \"index/loop\" page\n\t\t'rewrite' => array(\n\t\t\t'slug' => __( 'events', 'CPT permalink slug', 'event_cpt'),\n\t\t\t'with_front' => false,\n\t\t),\n\t\t'menu_icon' => 'dashicons-images-alt2',\n\t\t'menu_position' => 20,\n\t\t'supports' => $features, #see line 21\n\t\t'taxonomies' => array('event-type')\n\t\t// 'register_meta_box_cb' => __NAMESPACE__.'\\cm_events_add_meta_box'\n\t));\n\n\tregister_taxonomy('event-type', 'cm_event', array(\n\t\t'hierarchical' => true,\n\t\t'show_in_nav_menus' => false,\n\t\t'labels' => array(\n\t\t\t'name' => __('Event type'),\n\t\t\t'singular_name' => __('Event type'),\n\t\t\t'all_items' => __('All Event types'),\n\t\t\t'edit_item' => __('Edit Event type'),\n\t\t\t'view_item' => __('View Event type'),\n\t\t\t'update_item' => __('Update Event type'),\n\t\t\t'add_new_item' => __('Add new Event type'),\n\t\t\t'new_item_name' => __('New Event type'),\n\t\t\t'popular_items' => __('Most used Event types'),\n\t\t\t'separate_items_with_commas' => __('Separate Event types with commas'),\n\t\t\t'add_or_remove_items' => __('Add or remove Event types'),\n\t\t\t'choose_from_most_used' => __('Choose from most used Event types'),\n\t\t)\n\t) ); //categories will be set as \"children classes\" and \"teacher training\"\n}", "title": "" }, { "docid": "2406b25ae99f9591905a4bc5fe400824", "score": "0.6146182", "text": "public function register_post_types()\n {\n if (post_type_exists('wc_crm_accounts')) {\n return;\n }\n $post_types = array(\n 'wc_crm_accounts' => array(\n array(\n 'description' => __('This is where Accounts are stored.', 'wc_crm'),\n 'supports' => array('custom-fields'),\n ),\n __('Account', 'wc_crm'),\n __('Accounts', 'wc_crm')\n ),\n 'wc_crm_tasks' => array(\n array(\n 'supports' => array('custom-fields'),\n ),\n __('Task', 'wc_crm'),\n __('Tasks', 'wc_crm')\n ),\n 'wc_crm_calls' => array(\n array(\n 'supports' => array('custom-fields'),\n ),\n __('Call', 'wc_crm'),\n __('Calls', 'wc_crm')\n ),\n 'wc_crm_validations' => array(\n array(\n 'supports' => false,\n 'capabilities' => array(\n 'create_posts' => false,\n ),\n 'map_meta_cap' => true,\n ),\n __('Document', 'wc_crm'),\n __('Documents', 'wc_crm')\n )\n );\n\n foreach ($post_types as $post_type => $opt) {\n $this->register_post_type($post_type, $opt[0], $opt[1], $opt[2]);\n }\n\n\n }", "title": "" }, { "docid": "f00b8303f51f1d1e995e6c97d98d1f36", "score": "0.61391157", "text": "function ideapro_custom_posttype()\n{\n\tregister_post_type('Example',\n\t\tarray(\n\t\t\t'labels'=>array(\n 'name'=>__('Examples'),\n 'singular_name'=>__('Example'),\n 'add_new'=>__('Add New Example'),\n 'add_new_item'=>__('Add New Example'),\n 'edit_item'=>__('Edit Example'),\n 'search_items'=>__('Search Examples'),\n\t\t\t),\n\t\t\t'menu_position'=>5,\n\t\t\t'public'=>true,\n\t\t\t'exclude_from_search'=>true,\n\t\t\t'has_archive'=>false,\n\t\t\t'register_meta_box_cb'=>'example_metabox',\n\t\t\t'supports'=>array('title','editor','thumbnail'),\n\t\t)\n\n\t);\n\n}", "title": "" }, { "docid": "ff9b5e0d22532d78bfceee2f9c3ffa89", "score": "0.611549", "text": "public function set_post_types()\n {\n $this->post_types = apply_filters('aplb_post_types', ['aplb']);\n }", "title": "" }, { "docid": "3814d1ec4e95e4c72faac5e763839423", "score": "0.61132973", "text": "function posts_type() {\r\n register_post_type( 'press',\r\n array(\r\n 'labels' => array(\r\n 'name' => __( 'Press', 'metrika' ),\r\n 'singular_name' => __( 'Press', 'metrika' ),\r\n 'all_items' => __('Press List', 'metrika'),\r\n 'has_archive' => true,\r\n 'show_ui' => true,\r\n 'add_new' => 'Add Press',\r\n 'not_found' => 'No found.',\r\n 'not_found_in_trash' => 'In the cart slides found',\r\n 'add_new_item' => 'Add Press Item'\r\n ),\r\n 'public' => true,\r\n 'has_archive' => true,\r\n 'supports' => array(\r\n 'title',\r\n 'content',\r\n 'thumbnail',\r\n 'editor',\r\n 'excerpt'\r\n ),\r\n 'show_ui' => true,\r\n 'taxonomies' => array('post_tag','category')\r\n ));\r\n\r\n \r\n register_post_type( 'works',\r\n array(\r\n 'labels' => array(\r\n 'name' => __( 'What We Do', 'metrika' ),\r\n 'singular_name' => __( 'What we do', 'metrika' ),\r\n 'all_items' => __('List of We Do', 'metrika'),\r\n 'has_archive' => true,\r\n 'add_new' => 'Add New What We do',\r\n 'not_found' => 'No found.',\r\n 'not_found_in_trash' => 'In the cart slides found',\r\n 'add_new_item' => 'Add New Work'\r\n ),\r\n 'public' => true,\r\n 'has_archive' => true,\r\n 'supports' => array(\r\n 'title',\r\n 'thumbnail',\r\n 'editor',\r\n 'content'\r\n ),\r\n ));\r\n \r\n register_post_type( 'program',\r\n array(\r\n 'labels' => array(\r\n 'name' => __( 'Education', 'metrika' ),\r\n 'singular_name' => __( 'Education Program', 'metrika' ),\r\n 'all_items' => __('Program List', 'metrika'),\r\n 'has_archive' => true,\r\n 'add_new' => 'Add New Program',\r\n 'not_found' => 'No found.',\r\n 'not_found_in_trash' => 'In the cart slides found',\r\n 'add_new_item' => 'Add New Program'\r\n ),\r\n 'public' => true,\r\n 'has_archive' => true,\r\n 'supports' => array(\r\n 'title',\r\n 'thumbnail',\r\n 'editor',\r\n 'content'\r\n ),\r\n 'show_ui' => true,\r\n 'taxonomies' => array('post_tag','category')\r\n ));\r\n register_post_type( 'event',\r\n array(\r\n 'labels' => array(\r\n 'name' => __( 'Events', 'metrika' ),\r\n 'singular_name' => __( 'Events', 'metrika' ),\r\n 'all_items' => __('Event List', 'metrika'),\r\n 'has_archive' => true,\r\n 'add_new' => 'Add New',\r\n 'not_found' => 'No found.',\r\n 'not_found_in_trash' => 'In the cart slides found',\r\n 'add_new_item' => 'Add New Event'\r\n ),\r\n 'public' => true,\r\n 'has_archive' => true,\r\n 'supports' => array(\r\n 'title',\r\n 'thumbnail',\r\n 'editor',\r\n 'content'\r\n ),\r\n 'show_ui' => true,\r\n 'taxonomies' => array('post_tag','category')\r\n ));\r\n}", "title": "" }, { "docid": "5bb2062bda03e3d7c8371a63cb0419d8", "score": "0.61076844", "text": "private static function add_register_post_types_hooks() {\n\t\tstatic $registered = FALSE; // only do it once\n\t\tif ( !$registered ) {\n\t\t\t$registered = TRUE;\n\t\t\tadd_action( 'init', array(get_class(), 'register_post_types'));\n\t\t\tadd_action( 'template_redirect', array(get_class(), 'context_fixer') );\n\t\t\tadd_filter( 'body_class', array(get_class(), 'body_classes') );\n\t\t}\n\t}", "title": "" }, { "docid": "8833f1f71af69409780e1b9f95c3fd2d", "score": "0.6101369", "text": "public function remove_post_type_support() {\n\t\tglobal $_wp_post_type_features;\n\n\t\t$post_type = $this->get_post_type();\n\n\t\tif ( empty( $post_type ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$post_type_supports = $this->get_post_type_supports();\n\n\t\tforeach ( $post_type_supports as $key => $value ) {\n\t\t\tif ( is_numeric( $key ) ) {\n\t\t\t\t$key = $value;\n\t\t\t\t$value = '';\n\t\t\t}\n\n\t\t\tif ( isset( $_wp_post_type_features[$post_type], $_wp_post_type_features[$post_type][$key] ) ) {\n\t\t\t\tunset( $_wp_post_type_features[$post_type][$key] );\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( in_array( strtolower( $key ), ['all', 'normal', 'side', 'advanced'], true ) ) {\n\t\t\t\t$value = strtolower( $key );\n\t\t\t} else if ( empty( $value ) ) {\n\t\t\t\t$value = 'normal';\n\t\t\t}\n\n\t\t\t$this->remove_meta_boxes[] = [$key, $value];\n\t\t}\n\n\t\tadd_action( 'add_meta_boxes', [$this, 'remove_meta_boxes'], 999 );\n\t}", "title": "" }, { "docid": "ed67a72598fab2bcf7da64cc4fb1a6e3", "score": "0.6097924", "text": "function custom_post_type()\n\t{\n\t /*Create a custom post For OUR Team About Us page*/\n\t\tregister_post_type( 'acme_ourteam',\n\t\t array(\n\t\t\t\t\t 'labels' => array(\n\t\t\t\t\t\t'name' => __( 'Our Team' ),\n\t\t\t\t\t\t'id' => 'acme_ourteam',\n\t\t\t\t\t\t'singular_name' => __( 'Our Team' )\n\t\t\t\t ),\n\t\t\t 'public' => true,\n\t\t\t 'has_archive' => true,\n\t\t\t 'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt' )\n\t\t\t ) \n\t\t );\n\t\t\t\n\t\t/*Create a custom post For OUR CLIENTS slider on About Us page*/\n\t\t register_post_type( 'acme_ourclient',\n\t\t\t array(\n\t\t\t\t\t\t 'labels' => array(\n\t\t\t\t\t\t\t'name' => __( 'Our Client Slider' ),\n\t\t\t\t\t\t\t'id' => 'acme_ourclient',\n\t\t\t\t\t\t\t'singular_name' => __( 'Our Client Slider' )\n\t\t\t\t\t ),\n\t\t\t\t 'public' => true,\n\t\t\t\t 'has_archive' => true,\n\t\t\t\t 'supports' => array( 'title', 'thumbnail', 'excerpt' )\n\t\t\t\t ) \n\t\t\t );\n\n\n\t}", "title": "" }, { "docid": "1111165ea63a285fa3b3436ae344833a", "score": "0.60902977", "text": "public static function register() {\n\t\tforeach ( self::$post_types as $post_type ) {\n\t\t\tregister_post_type( $post_type->post_type, $post_type->post_type_data );\n\t\t}\n\t}", "title": "" }, { "docid": "f1113ee7b7c24898dc08e9f61027201a", "score": "0.6084843", "text": "function features() {\n\tadd_theme_support( 'title-tag' );\n\n\tadd_theme_support( 'post-thumbnails' );\n\n\tadd_post_type_support( 'page', 'excerpt' );\n\n\tadd_theme_support( 'html5', array(\n\t\t'search-form',\n\t\t'gallery',\n\t\t'caption',\n\t) );\n}", "title": "" }, { "docid": "aff373c75740aadb0c5e77a6c0c7d8c7", "score": "0.60842454", "text": "function custom_post_type() {\n \n $labels = array(\n 'name' => 'Products', \n 'singular_name' => 'Product' \n );\n\n \n $supports = array(\n 'title',\n 'editor', \n 'excerpt', \n 'author', \n 'thumbnail', \n 'comments', \n 'trackbacks', \n 'revisions', \n 'custom-fields' \n );\n\n \n $args = array(\n 'labels' => $labels,\n 'description' => 'Post type post product', \n 'supports' => $supports,\n 'taxonomies' => array( 'category', 'post_tag' ),\n 'hierarchical' => false, \n 'public' => true, \n 'show_ui' => true, \n 'show_in_menu' => true, \n 'show_in_nav_menus' => true, \n 'show_in_admin_bar' => true, \n 'menu_position' => 5, \n 'menu_icon' => true, \n 'can_export' => true, \n 'has_archive' => true, \n 'exclude_from_search' => false, \n 'publicly_queryable' => true, \n 'capability_type' => 'post' \n );\n\n register_post_type('product', $args); \n}", "title": "" }, { "docid": "d208c0cb5977012e7de78cb85da59b91", "score": "0.6083976", "text": "public function get_allowed_post_types() {\n\t\t\treturn apply_filters( 'wapu_core/post_type_switcher/allowed_post_types', array() );\n\t\t}", "title": "" }, { "docid": "eb47871aeb7b2a413831590dbc1c2883", "score": "0.6077943", "text": "function create_custom_post_types() {\n// create a featured work custom post type\n \n register_post_type('featured_work', \n array(\n 'labels' => array (\n 'name' => __( 'Featured Work' ),\n 'singular_name' => __( 'Project' )\n ),\n 'public' => true,\n 'has_archive' => true,\n 'rewrite' => array(\n 'slug' => 'featured-work'\n ),\n )\n );\n register_post_type('course_info', \n array(\n 'labels' => array (\n 'name' => __( 'Course Info' ),\n 'singular_name' => __( 'Benefit' )\n ),\n 'public' => true,\n 'has_archive' => true,\n 'rewrite' => array(\n 'slug' => 'course-info'\n ),\n )\n );\n register_post_type('social_links',\n array(\n 'labels' => array (\n 'name' => __( 'Social Media' ),\n 'singular_name' => __( 'Network' )\n ),\n 'public' => true,\n 'has_archive' => false,\n 'rewrite' => array(\n 'slug' => 'social-links'\n ),\n )\n );\n register_post_type('about_section',\n array(\n 'labels' => array (\n 'name' => __( 'About Section' ),\n 'singular_name' => __( 'Member' )\n ),\n 'public' => true,\n 'has_archive' => false,\n 'rewrite' => array(\n 'slug' => 'about_section'\n ),\n )\n );\n}", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "8e8e03727ca6544a2d009483f6d1aca9", "score": "0.0", "text": "public function destroy($id)\n {\n //\n }", "title": "" } ]
[ { "docid": "2b9d2c85f4c5a3ea90f0276710558864", "score": "0.7359858", "text": "public function removeResource(ResourceInterface $resource);", "title": "" }, { "docid": "993b4783957b008ba5348591f59665c8", "score": "0.72771627", "text": "public function del($resource)\n {\n }", "title": "" }, { "docid": "f927c8635493c1dd0ac8db6bd602ddb2", "score": "0.6954274", "text": "protected function removeResourceFromStorage(HCResource $resource, string $disk): void\n {\n if (Storage::disk($disk)->has($resource['path'])) {\n Storage::disk($disk)->delete($resource['path']);\n }\n }", "title": "" }, { "docid": "440048b39bf8ab60c81c3f27962faaf1", "score": "0.69413745", "text": "public function deleteResource(PersistentResource $resource);", "title": "" }, { "docid": "9935d5b93e750a6c0ddc712ef3c08960", "score": "0.68777406", "text": "public function deleteResource($resourceId);", "title": "" }, { "docid": "9ce11cccf2dced06dd47b1882f8da1bb", "score": "0.6699116", "text": "public function deleted(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "6f90ef2bb7cdf15d03e7caac57f399ca", "score": "0.66539735", "text": "public function remove(ResourceInterface $resource, $files);", "title": "" }, { "docid": "062d77ad6e956ba37743db6eb7cdce0c", "score": "0.66244495", "text": "public function delete(string $resource)\n {\n $name = Normalizer::className($resource);\n $path = PATH_CUSTOM_RESOURCES . \"{$name}.php\";\n if (!file_exists($path)) {\n self::error(\"Resource not found!\", true);\n }\n\n if (!unlink($path)) {\n self::error(\"Failed to delete resource!\");\n return;\n }\n\n self::success(\"Resource deleted!\");\n }", "title": "" }, { "docid": "6c60b1eff618aa8951f7900cc60261d9", "score": "0.6574286", "text": "public static function remove()\n {\n self::$storage = null;\n }", "title": "" }, { "docid": "9bf523fe37f0dc36010278d5bebdd0a1", "score": "0.6515256", "text": "public function unpublishResource(Resource $resource) {\n if ( $this->debug ) {\n $this->systemLogger->log('target ' . $this->name . ': unpublishResource');\n }\n try {\n $this->deleteFile($this->getRelativePublicationPathAndFilename($resource));\n } catch (\\Exception $e) {\n }\n }", "title": "" }, { "docid": "c040ed02d56811524efd11951dd9e13e", "score": "0.651169", "text": "public function delete(string $id): IStorage;", "title": "" }, { "docid": "eb8ef8644496015cbec33f776a7522f6", "score": "0.6462599", "text": "public function deleteResource($resource)\n {\n // instanceof instead of type hinting so it can be used as slot\n if ($resource instanceof \\TYPO3\\Flow\\Resource\\Resource) {\n $this->resourcePublisher->unpublishPersistentResource($resource);\n if (is_file($this->persistentResourcesStorageBaseUri . $resource->getResourcePointer()->getHash())) {\n unlink($this->persistentResourcesStorageBaseUri . $resource->getResourcePointer()->getHash());\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "b45656cb095db000c7a18b0789ffe517", "score": "0.6383384", "text": "public function delete() {\n $this->storage_file->delete();\n }", "title": "" }, { "docid": "538b378a63649cab0724cc3f9c14d7e7", "score": "0.63659215", "text": "public function delete(resource $resource) {\n $stmt = $this->db->prepare(\"DELETE from resource WHERE id=?\");\n $stmt->execute(array($resource->getIdresource()));\n }", "title": "" }, { "docid": "1a061574cc458c41cee05049e84b3d56", "score": "0.62814736", "text": "public function remove() {\n\t\t$this->assert_ready();\n\n\t\tif (is_file($this->get_internal_path())) {\n\t\t\tif (!unlink($this->get_internal_path())) {\n\t\t\t\tthrow new IntException('Failed to remove asset.');\n\t\t\t}\n\t\t}\n\t\tif (is_file($this->get_internal_thumb_path())) {\n\t\t\tif (!unlink($this->get_internal_thumb_path())) {\n\t\t\t\tthrow new IntException('Failed to remove asset thumbnail.');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "d9d905e10fc59213e9d27bf1adc77c9c", "score": "0.6241156", "text": "public function delete(Resource\\ResourceInterface $resource)\r\n\t{\r\n\t\t$resourceName = $resource->resourceName();\r\n\t\t$resourceId = $resource->resourceId();\r\n\t\t$params = $resource->params();\r\n\t\t$hash = $this->generateHash($resourceName, $resourceId, $params);\r\n\t\t$hashParts = explode(\"-\", $hash);\r\n\t\t\r\n\t\t$this->_delete($hash);\r\n\t\t\r\n\t\tif (!$resourceId || empty($params)) {\r\n\t\t\t$partialHash = !$resourceId \r\n\t\t\t\t? $hashParts[0] \r\n\t\t\t\t: $hashParts[0] .\"-\". $hashParts[1];\r\n\t\t\t\r\n\t\t\tforeach ($this->hashes as $hash) {\r\n\t\t\t\tif (preg_match(\"/^{$partialHash}/i\", $hash)) {\r\n\t\t\t\t\t$this->_delete($hash);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "23797bba0e5c4bab3f3e851d0a2e599d", "score": "0.62405044", "text": "function delete($resource, $data='') {\n\t\t\t$this->_auth();\n\t\t\treturn $this->_request('DELETE', $this->_resourcefix($resource), $data);\n\t\t}", "title": "" }, { "docid": "71cdf2c8771b0884ed0346cbff1672a0", "score": "0.62043154", "text": "abstract protected function destroyResource(): void;", "title": "" }, { "docid": "c59e81ef63187237bc9f5f3b5e74592e", "score": "0.6179614", "text": "public function deleteResourceType(ResourceTypeInterface $resourceType);", "title": "" }, { "docid": "5292bf6424220d49a3107255e329dbd6", "score": "0.6160933", "text": "public function delete()\n {\n Storage::disk('s3')->delete($this->id);\n }", "title": "" }, { "docid": "f4f09ec06bcbe6e72b5430af6aae6dd6", "score": "0.61480373", "text": "public function forceDeleted(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "02d92a998dda9d4406781461e1522038", "score": "0.6130383", "text": "public function delete()\n {\n if (!$this->linked) {\n try {\n $this->storage->delete();\n } catch (Exception $e) {}\n }\n }", "title": "" }, { "docid": "e13c01fffe22886d2b3f34922a8a2e93", "score": "0.6126908", "text": "public function deleteAfter($resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "e0ec0bbfbe81f9c324f82b9e4214f65b", "score": "0.61104554", "text": "public function delete()\n {\n if ($this->exists()) {\n $this->filesystem->remove($this->path);\n }\n }", "title": "" }, { "docid": "e3417229f36e4c96d533be83d06bde0c", "score": "0.6042828", "text": "public function deleteResource($id)\n\t{\n\t}", "title": "" }, { "docid": "902bb49bf75f0b9c9365d23387afb5d1", "score": "0.6037374", "text": "public function remove($resource)\n {\n $resourceName = $this->getResourceName($resource);\n $index = array_search($resourceName, $this->indexes, true);\n\n if (false !== $index) {\n unset($this->indexes[$index]);\n unset($this->resources[$resourceName]);\n\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "21644a433a62c5fd1c528ea36afc90b8", "score": "0.6036632", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return redirect()->route('resource.index');\n }", "title": "" }, { "docid": "5cbdbc3d6fcbfefa1426cf0c64aa04ca", "score": "0.60237616", "text": "public function remove($name) {\n unset($this->storage[$name]);\n }", "title": "" }, { "docid": "6c062b635ba3468052de6e300a6359c6", "score": "0.6006576", "text": "public function destroy(Resource $resource)\n {\n //\n // $this->authorize('delete',Resource::class);\n // $resource->delete();\n // return redirect('/resource');\n return response(['message'=>'Deleted']);\n }", "title": "" }, { "docid": "106ec422b24f32e2c69e65e6763760ce", "score": "0.59982485", "text": "public function remove()\n {\n $this->setId($this->getIdMd5());\n\n $filename =\n $this->_parameters->getFormattedParameter('file.cache.directory') .\n $this->_parameters->getFormattedParameter('file.cache.file');\n\n $file = new HoaFile\\Read($filename);\n $file->delete();\n $file->close();\n\n return;\n }", "title": "" }, { "docid": "9dc6c3fff99085d4ce4d32df40726961", "score": "0.5968201", "text": "public function destroy($id)\n {\n //delete existing image and file\n $userdata = Resources::findOrFail($id);\n\n $image_name = $userdata->book_image;\n $image_name='assets/uploads/cover_images/'.$image_name;\n File::delete($image_name);\n\n $file_name = $userdata->file_name;\n $file_name='assets/uploads/resources/'.$file_name;\n File::delete($file_name);\n $userdata->delete();\n return redirect('/resource/view')->with('success','Resource Successfully Deleted');\n\n }", "title": "" }, { "docid": "b23bab0dfabcc169486df5c49c4053a8", "score": "0.59378874", "text": "public function deletePersonalData()\n {\n if ($this->resource) {\n $this->resource->removeFromStorage();\n $this->resource->delete();\n }\n }", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59338665", "text": "public function remove($path);", "title": "" }, { "docid": "78f3fcb6a4df88ba8ea45797087a7e8d", "score": "0.59108466", "text": "public function remove($entity);", "title": "" }, { "docid": "1c1c61cd59ebc38ac44e886b6478a747", "score": "0.59073865", "text": "public function remove()\n {\n if ($this->id) {\n static::delete($this->id);\n }\n }", "title": "" }, { "docid": "8f6877c27ea14309583a0c11d265f37c", "score": "0.5904454", "text": "public function delete() {\n if($this->exists()) {\n unlink($this->path);\n }\n }", "title": "" }, { "docid": "94efa591f8ef8e0d19e7776ed552595e", "score": "0.5898321", "text": "public function deleteBefore($resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "5336825b23ae57c225d3534fd55b1861", "score": "0.589786", "text": "public function remove() {}", "title": "" }, { "docid": "5336825b23ae57c225d3534fd55b1861", "score": "0.589786", "text": "public function remove() {}", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58958197", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58958197", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58958197", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58958197", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58958197", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58958197", "text": "public function remove();", "title": "" }, { "docid": "6dbf60ad37b681821654b0dc63e31a44", "score": "0.5887877", "text": "public function destroy($path)\n {\n // Remove S3 object path\n }", "title": "" }, { "docid": "dab9609eae6b95de02e986dc8f30ef30", "score": "0.58856326", "text": "public function delete($key) {\n\t\tif ($this->readOnly) {\n\t\t\tthrow new StorageException('Trying to write to a read only storage');\n\t\t}\n\n\t\t$startTime = microtime(true);\n\t\t$fileName = $this->makeFullPath($key);\n\n\t\ttry {\n\t\t\t$this->fileHandler->remove($fileName);\n\t\t}\n\t\tcatch (NotFoundException $e) {\n\t\t}\n\t\tcatch (FileException $e) {\n\t\t\tthrow new StorageException('Unable to remove the file: ' . $fileName, 0, $e);\n\t\t}\n\n\t\t$debugger = Application::getInstance()->getDiContainer()->getDebugger();\n\t\tif (!$this->debuggerDisabled && $debugger !== false) {\n\t\t\t$debugger->addItem(new StorageItem('file', 'file.' . $this->currentConfigurationName,\n\t\t\t\tStorageItem::METHOD_DELETE . ' ' . $key, null, microtime(true) - $startTime));\n\t\t}\n\t}", "title": "" }, { "docid": "34400e55dd4ebc208c4594b57d8127b5", "score": "0.5881468", "text": "public function removeResourceParent(ResourceInterface $resource, ResourceInterface $parentResource);", "title": "" }, { "docid": "e3bc23faa27c9a9250d1f82e5c8ffe69", "score": "0.5879455", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return $this->api_success([\n 'data' => new ResourceResource($resource),\n 'message' => __('pages.responses.deleted'),\n 'code' => 201\n ], 201);\n }", "title": "" }, { "docid": "4ca008dccccbaa2670890adc84077b0d", "score": "0.5873689", "text": "public function destroy($id)\n {\n $student = Student::findOrFail($id);\n if($student->delete()){\n return new StudentResource($student);\n }\n}", "title": "" }, { "docid": "3ec1051c44bcdbf6b8f0b979de237ca0", "score": "0.586125", "text": "public function destroy () {\n\t\treturn unlink(self::filepath($this->name));\n\t}", "title": "" }, { "docid": "7c2dd27bffbd51546ccd25eded472c62", "score": "0.5852525", "text": "public static function remove(string $path): void\n\t{\n\t\tif(file_exists(storage_path($path))) {\n\t\t\tunlink(storage_path($path));\n\t\t}\n\t}", "title": "" }, { "docid": "a145f758f727b845157c93040e3789f9", "score": "0.5852287", "text": "public function remove(FileInterface $file);", "title": "" }, { "docid": "0715c406e16677dec9ed9d1639329836", "score": "0.58505213", "text": "public function deleteResourceById(Request $request, $id = 0);", "title": "" }, { "docid": "4c976f8fadd1a0e0cd388ea9b1c3e799", "score": "0.58336896", "text": "public function destroy($id)\n {\n $get=Product::where('id',$id)->first();\n if($get->thumbnail!=null){\n unlink('storage/'.$get->thumbnail);\n }\n if($get->attachment!=null){\n unlink('storage/'.$get->attachment);\n }\n \n Product::where('id',$id)->delete();\n return redirect()->route('listProduct');\n }", "title": "" }, { "docid": "15bc067b90dbe253b89a72946214ee6f", "score": "0.5821856", "text": "public function destroy($id)\n { \n if(\\File::exists(public_path().\"/uploads/\".$id)){\n \\File::deleteDirectory(public_path().\"/uploads/\".$id);\n Resource::destroy($id);\n \\Session::flash('message', 'Tutto bene, eliminato!');\n }else {\n \\Session::flash('message', 'Errore imprevisto, cartella in /uploads non trovata!');\n }\n return \\Redirect::to('admin/resources');\n }", "title": "" }, { "docid": "1006371b48f79fb503e249a0abf3d90d", "score": "0.5814543", "text": "function delete_resource($id, $type = 'thumb')\n {\n $constraints = ['clip_id' => $id];\n\n if($type != '*'){\n $constraints['type'] = $this->res_type[$type];\n }\n\n $query = $this->db->get_where('lib_clips_res', $constraints);\n $rows = $query->result_array();\n\n if ($rows) {\n foreach ($rows as $res) {\n $file = $this->config->item('clip_dir') . $type . '/' .\n $id . '.' . $res['resource'];\n if (is_file($file)) {\n unlink($file);\n }\n if($res['location']){\n if($s3Path = $this->getS3Path($res['location'])){\n $this->aws3_sqs_delete_resources_model->put_job(['MessageBody' => $s3Path]);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "7addba7772d86602ad38891183d5c5c0", "score": "0.5805049", "text": "public function destroy($id)\n {\n $obj = Obj::where('id',$id)->first();\n $this->authorize('update', $obj);\n\n // remove file\n if(Storage::disk('public')->exists($obj->image))\n Storage::disk('public')->delete($obj->image);\n\n $obj->delete();\n\n flash('('.$this->app.'/'.$this->module.') item Successfully deleted!')->success();\n return redirect()->route($this->module.'.index');\n }", "title": "" }, { "docid": "f35aaf17008b130a60b3962b50777f92", "score": "0.58018947", "text": "public function unlink();", "title": "" }, { "docid": "2f7fda6501bcbbb5f68ddb7c065c2c8f", "score": "0.57982564", "text": "private function removeResource($filesystemPath, &$removed)\n {\n if (!file_exists($filesystemPath)) {\n return;\n }\n\n ++$removed;\n\n if (is_dir($filesystemPath)) {\n $removed += $this->countChildren($filesystemPath);\n }\n\n $this->filesystem->remove($filesystemPath);\n }", "title": "" }, { "docid": "d4218bcd90f4a47f5ea0150ee353dc32", "score": "0.579125", "text": "public function destroy($id)\n {\n $brand=Brand::find($id);\n //delete related file from storage\n $brand->delete();\n return redirect()->route('brands.index');\n }", "title": "" }, { "docid": "87a257458af9749998d2821206a44b54", "score": "0.579045", "text": "public function destroy($id)\n {\n $producto= Producto::findOrFail($id);\n\n if(Storage::delete('public/'.$producto->imagen)){\n\n Producto::destroy($id); \n }\n\n return redirect('producto');\n }", "title": "" }, { "docid": "cc42a160a9315cdd157733240e749135", "score": "0.57901055", "text": "public function remove($entity): void;", "title": "" }, { "docid": "2c0196ccc0507912483f0092cd84b4ae", "score": "0.57787216", "text": "public function removeAvatarResource($resource): bool\n {\n return imagedestroy($resource);\n }", "title": "" }, { "docid": "5760f6df7c6ebd5440da74e84ef8e734", "score": "0.57784384", "text": "public function remove($identifier);", "title": "" }, { "docid": "642f1d1205457b11ef73140be49aa079", "score": "0.5777424", "text": "public function delete($resource)\n {\n return DB::transaction(function () use ($resource) {\n $resource = $this->deleteBefore($resource);\n\n $resource->delete();\n\n return $this->deleteAfter($resource);\n });\n }", "title": "" }, { "docid": "33b7f072f2b9b81d6150ecf51df6b25f", "score": "0.57701963", "text": "abstract public function remove($path);", "title": "" }, { "docid": "d63269c2f97e9f20ab93b60f53363fbc", "score": "0.57567686", "text": "public function destroy($class_id, $resource)\n {\n $classResource = ClassResource::find($resource);\n\n // Delete Image\n Storage::delete('public/resources/'.$classResource->classResource_location);\n $classResource->delete();\n\n return redirect('/viewClass'.'/'.$class_id.'/resources')->with('success', 'File Deleted!');\n }", "title": "" }, { "docid": "c41a8c586f3cfc39935459b577d1b862", "score": "0.5753429", "text": "public function removeUpload()\n {\n if (isset($this->temp)) {\n unlink($this->temp);\n }\n }", "title": "" }, { "docid": "d142a02423f60696b0dd1bc440aa7621", "score": "0.5740696", "text": "public function deleteUploadedFile() {\n // delete file if exists\n if (file_exists(\"../uploaded_resources/\" . $this->filename)) {\n unlink(\"../uploaded_resources/\" . $this->filename);\n }\n }", "title": "" }, { "docid": "37d1f8df79d1b403823098c91384300b", "score": "0.57397014", "text": "public function destroy() {\n $filepath = $this->getFilepath();\n @unlink($filepath);\n }", "title": "" }, { "docid": "966236614f1d8ba524f6647f934a480c", "score": "0.573215", "text": "public function destroy($id)\n {\n $slider = slider::where('slider_id', $id)->first();\n $imagename = $slider->image;\n if(!empty($imagename)){\n if(Storage::disk('s3')->exists($imagename)) {\n Storage::disk('s3')->delete($imagename);\n } \n /*$filename = public_path().'/images/slider/'.$file;\n \\File::delete($filename);*/\n }\n slider::where('slider_id',$id)->delete();\n return redirect()->route('slider.index')\n ->with('success','Slider deleted successfully.');\n }", "title": "" }, { "docid": "2433a592ecee814d4683e51a2a9ef8b4", "score": "0.57305866", "text": "public function unindex($resource)\n {\n $dataset = $this->util->getDataset($resource);\n\n if($dataset){\n //find the belonging indexes\n $index = $this->getIndexedWords($dataset);\n\n //remove indexed\n foreach($index as $currentIndexToDelete) {\n $word = $currentIndexToDelete->getWord();\n $this->em->remove($currentIndexToDelete);\n $this->searchDirty($word);\n }\n\n //remove dataset\n $this->em->remove($dataset);\n $this->em->flush();\n $this->searchUpdateTotals();\n }\n }", "title": "" }, { "docid": "f895b50d35ef0b215af95a187ee4f8e1", "score": "0.5717315", "text": "public function delete()\n {\n return Storage::disk(config('screeenly.filesystem_disk'))->delete($this->filename);\n }", "title": "" }, { "docid": "8c0c11de31899ddf1bbfd6c29f1c19a7", "score": "0.57156736", "text": "public function deleteImage(){\n Storage::delete($this->image);\n }", "title": "" }, { "docid": "e5f174b2d48a7745c3be9c52c54e88b4", "score": "0.5696835", "text": "function delete()\n\t{\n\t\tglobal $sql;\n\t\t$sql->Query(\"DELETE FROM $this->tablename WHERE id = '$this->id'\");\n\n\t\tif($this->path)\n\t\t\t@unlink($this->path);\n\t\tif($this->thumbnail)\n\t\t\t@unlink($this->thumbnail);\n\t\tif($this->square)\n\t\t\t@unlink($this->square);\n\t\tif($this->small)\n\t\t\t@unlink($this->small);\n\t\tif($this->medium)\n\t\t\t@unlink($this->medium);\n\t\tif($this->large)\n\t\t\t@unlink($this->large);\n\n\t}", "title": "" }, { "docid": "9f8e141fd6e26ce3fe7a6921b622fe0e", "score": "0.56894207", "text": "public function delete()\n {\n $path = str_replace(storage_path('app'), '', $this->path);\n\n Storage::delete($path);\n\n return parent::delete();\n }", "title": "" }, { "docid": "b8c78cd19161cf7966e7567365e984a3", "score": "0.5685399", "text": "public function remove(): void;", "title": "" }, { "docid": "04406afe569e9b74ee2744b1cf4852d9", "score": "0.56848085", "text": "public function delete() {\n $this->resourceable->delete();\n return parent::delete();\n }", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684556", "text": "public function delete($path);", "title": "" }, { "docid": "b3f8c1c4e871f05ee3123e1f7f5255e8", "score": "0.5676897", "text": "public function destroy($id)\n {\n $Man = Manufacture::find($id);\n $image_path = storage_path('app/public/manufacturers/'.$Man->image); // Value is not URL but directory file path\n if(File::exists($image_path)) {\n File::delete($image_path);\n\n }\n $Man->delete();\n }", "title": "" }, { "docid": "45aa00d01271e734f5db2a1fa7f76483", "score": "0.56756234", "text": "function remove($entity);", "title": "" }, { "docid": "37ff2347ddf9a6db6a9844965dd1ec38", "score": "0.5667402", "text": "public function destroy($id)\n\t{\n\t\t//eliminar usuario \n\t\t$filename = public_path().'/uploads/foo.bar';\n\n\t\tif (File::exists($filename)) \n\t\t{\n \t\tFile::delete($filename);\n\t\t}\n\t}", "title": "" }, { "docid": "9b8aab241578958a2469c7a9782795c1", "score": "0.56621665", "text": "public function destroy($id)\n {\n $actor=Actor::find($id);\n //delete related file from storage\n $actor->delete();\n return redirect()->route('actors.index');\n }", "title": "" }, { "docid": "493127367eaabfb3f87af291ac81b31c", "score": "0.5645837", "text": "public function remove_resource($resource)\n\t{\n\t\tif (isset($this->acl_perms['user_role'][$resource])) {\n\t\t\tunset($this->acl_perms['user_role'][$resource]);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "9c63fb3cdb6ebf314539690c581f739a", "score": "0.56408364", "text": "public function remove($id){\n $destinationPath = 'public/uploads/'.$id;\n File::delete($destinationPath);\n }", "title": "" }, { "docid": "218fe18765b1d7c380dddd8b2ac4b37b", "score": "0.5638419", "text": "public function removeFile(FileInterface $file);", "title": "" }, { "docid": "dc6cb92328efd21aca7092caec752017", "score": "0.5638112", "text": "public function delete(SectionStorageInterface $section_storage);", "title": "" }, { "docid": "a6b9c5e2bcb825e1cfba302990ec2140", "score": "0.563752", "text": "public function remove()\n\t{\n\t\tFile::remove($this->getFilePath());\n\t}", "title": "" }, { "docid": "e61268a82a87f7cb8cbe76d15484a282", "score": "0.56351787", "text": "static public function remove($objectName);", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56340766", "text": "public function removeById($id);", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56340766", "text": "public function removeById($id);", "title": "" }, { "docid": "cb6fd12ed6b6c067c3274543aee20401", "score": "0.5630964", "text": "public function clearResource(ResolvedObject $resource, Transaction $transaction)\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "0428848b8d6110c6be21d9479ece2192", "score": "0.56238794", "text": "public function removeImage()\n {\n if (!empty($this->image) && !empty($this->id)) {\n $path = storage_path($this->image);\n if (is_file($path)) {\n unlink($path);\n }\n if (is_file($path.'.thumb.jpg')) {\n unlink($path.'.thumb.jpg');\n }\n }\n }", "title": "" }, { "docid": "a6f4504c52a348844985d64b90dad904", "score": "0.56228375", "text": "public function destroy($id)\n {\n $supplier = DB::table('suppliers')->where('id',$id)->first();\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n DB::table('suppliers')->where('id',$id)->delete();\n }\n DB::table('suppliers')->where('id',$id)->delete();\n }", "title": "" }, { "docid": "0ef712f262167f08d89550be49a07125", "score": "0.56160456", "text": "public function unlinkResource($yResource){\n try{\n if (is_file($yResource->getPath())){\n unlink($yResource->getPath());\n }elseif (is_dir($yResource->getPath())){\n rmdir($yResource->getPath());\n }\n }catch(Exception $e){\n \n }\n return $this->getResource($yResource->getPath());\n }", "title": "" }, { "docid": "1a1220576ae4b4bfabb91c580117d74a", "score": "0.5615573", "text": "public function destroy($id)\n {\n $get=Destination::where('id',$id)->first();\n if($get->thumbnail!=null){\n unlink('storage/'.$get->thumbnail);\n }\n \n Destination::where('id',$id)->delete();\n return redirect()->route('listDestination');\n }", "title": "" }, { "docid": "39948b150ec808236472ff391114e58e", "score": "0.56143665", "text": "public function delete()\n {\n File::delete([\n $this->path,\n $this->thumbnail_path\n ]);\n\n parent::delete();\n }", "title": "" }, { "docid": "c3420f68b471063a55ff6b63a8e7fce0", "score": "0.56090957", "text": "public function removePurgeable($attribute);", "title": "" }, { "docid": "3c91c642d62c969c158b37413a399fd7", "score": "0.56055695", "text": "public function delete(){\n if($this->id > 0){\n SQL::delete($this::STORAGE, [\"id\" => $this->id]);\n }\n }", "title": "" }, { "docid": "554af8987fffe76970c60a65212b72cf", "score": "0.56018853", "text": "public function destroy($id)\n {\n $art = art::findOrFail($id);\n if($art->image!=null){\n $sliderimage = public_path(\"uploads/{$art->image}\");\n if(File::exists($sliderimage)){\n if(File::exists($sliderimage)){\n unlink($sliderimage);\n }\n }\n }\n $art->delete();\n return redirect()->back();\n }", "title": "" } ]
748e4f6502c78f1e852a5d55ee5638b8
Create request for operation 'deleteDocument'
[ { "docid": "c8f922d2a8e02604e2b9652db3854141", "score": "0.6489396", "text": "protected function deleteDocumentRequest($indexName, $docTypeName, $docId)\n {\n // verify the required parameter 'indexName' is set\n if ($indexName === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $indexName when calling deleteDocument'\n );\n }\n // verify the required parameter 'docTypeName' is set\n if ($docTypeName === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $docTypeName when calling deleteDocument'\n );\n }\n // verify the required parameter 'docId' is set\n if ($docId === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $docId when calling deleteDocument'\n );\n }\n\n $resourcePath = '/indexes/{index_name}/document_types/{doc_type_name}/documents/{doc_id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($indexName !== null) {\n $resourcePath = str_replace(\n '{' . 'index_name' . '}',\n ObjectSerializer::toPathValue($indexName),\n $resourcePath\n );\n }\n // path params\n if ($docTypeName !== null) {\n $resourcePath = str_replace(\n '{' . 'doc_type_name' . '}',\n ObjectSerializer::toPathValue($docTypeName),\n $resourcePath\n );\n }\n // path params\n if ($docId !== null) {\n $resourcePath = str_replace(\n '{' . 'doc_id' . '}',\n ObjectSerializer::toPathValue($docId),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('auth_token');\n if ($apiKey !== null) {\n $queryParams['auth_token'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('X-RSearch-App-ID');\n if ($apiKey !== null) {\n $headers['X-RSearch-App-ID'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" } ]
[ { "docid": "e421f77e25cae5a5811f3fdd6d808ce7", "score": "0.69513524", "text": "public function delete($document_id);", "title": "" }, { "docid": "ad983c7e5ff6fa8ba7bb673923c19a49", "score": "0.68416107", "text": "public function deleteDocumentRequest($id)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling deleteDocument'\n );\n }\n\n $resourcePath = '/public/v1/documents/{id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() != null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "abf35ffb4e5321b86785be39f342b66d", "score": "0.67875546", "text": "function delete() {\n\n $document = Doctrine::getTable('DocDocument')->find($this->input->post('doc_document_id'));\n $node = Doctrine::getTable('Node')->find($document->node_id);\n\n if ($document && $document->delete()) {\n//echo '{\"success\": true}';\n\n $this->syslog->register('delete_document', array(\n $document->doc_document_filename,\n $node->getPath()\n )); // registering log\n\n $success = 'true';\n $msg = $this->translateTag('General', 'operation_successful');\n } else {\n//echo '{\"success\": false}';\n $success = 'false';\n $msg = $e->getMessage();\n }\n\n $json_data = $this->json->encode(array('success' => $success, 'msg' => $msg));\n echo $json_data;\n }", "title": "" }, { "docid": "ecbd399e19339fef25960f767283d4bf", "score": "0.67680544", "text": "protected function getDeleteRequest()\n\t{\n\t\t$url = $this->url();\n\t\t\n\t\t$url->getQuery()->setParameter('code', 204);\n\t\t\n\t\treturn new Api\\Request\\Create((string) $url);\n\t}", "title": "" }, { "docid": "66d9047fec3584536adec6cb0bf8fd3d", "score": "0.6705242", "text": "public function deleteDocumentAction()\n {\n try {\n $this->_helper->viewRenderer->setNoRender();\n\n // Les modèles\n $model_commission = new Model_DbTable_Commission();\n\n $commission = $model_commission->find($this->_request->id_commission)->current();\n\n // On supprime le fichier\n unlink(REAL_DATA_PATH.DS.'uploads'.DS.'documents_commission'.DS.$commission->DOCUMENT_CR);\n\n // On met à null dans la DB\n $commission->DOCUMENT_CR = null;\n $commission->save();\n\n $this->_helper->flashMessenger([\n 'context' => 'success',\n 'title' => 'Le document a bien été supprimé',\n 'message' => '',\n ]);\n } catch (Exception $e) {\n $this->_helper->flashMessenger([\n 'context' => 'error',\n 'title' => 'Erreur lors de la suppression du document',\n 'message' => $e->getMessage(),\n ]);\n }\n }", "title": "" }, { "docid": "2eb9319cc81c95c818a4ecd2cce43a7c", "score": "0.66110647", "text": "public function deleteDocument(string $documentType, string $identifier);", "title": "" }, { "docid": "c6c8d6799bf2cace90a9c628bb07c6c0", "score": "0.6443045", "text": "public function delete() {\n\t\tif (!$this->preDelete()) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->requireDatabase();\n\t\t$this->requireId();\n\t\t$this->requireRev();\n\n\t\t$this->options[\"rev\"] = $this->document->_rev;\n\n\t\ttry {\n\t\t\t$request = new HttpRequest();\n\t\t\t$request->setUrl($this->databaseHost . \"/\" . rawurlencode($this->databaseName) . \"/\" . rawurlencode($this->document->_id) . self::encodeOptions($this->options));\n\t\t\t$request->setMethod(\"delete\");\n\t\t\t$request->send();\n\n\t\t\t$request->response = json_decode($request->response);\n\t\t} catch (Exception $exception) {\n\t\t\tthrow new DocumentException(\"HTTP request failed.\", DocumentException::HTTP_REQUEST_FAILED, $exception);\n\t\t}\n\n\t\tif ($request->status === 200) {\n\t\t\t$this->document->_id = $request->response->id;\n\t\t\t$this->document->_rev = $request->response->rev;\n\n\t\t\treturn $this->postDelete();\n\t\t} else {\n\t\t\tthrow new DocumentException(self::describeError($request->response));\n\t\t}\n\t}", "title": "" }, { "docid": "13ef7a6a58a36caea2ded7d9d5fad968", "score": "0.630797", "text": "public function DeleteDocente() {\n\t\t\t$this->objDocente->Delete();\n\t\t}", "title": "" }, { "docid": "ad260ac0acd6f814f8891482fa6144cf", "score": "0.63029337", "text": "public function testDeleteDocument()\n {\n echo \"\\nTesting subject deletion...\";\n $id = \"0\";\n \n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/documents/\".$id;\n $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context.\"/documents/\".$id;\n \n $response = $this->curl_delete($url);\n // echo $response;\n $json = json_decode($response);\n $this->assertTrue(!$json->success);\n }", "title": "" }, { "docid": "6984aa49a1c3201a2ea23a21c558a023", "score": "0.62815297", "text": "protected function doDeleteDocument() {\n try{\n $this->service->remove($this->owner);\n }\n catch(NotFoundException $e)\n {\n trigger_error(\"Deleted document not found in search index.\", E_USER_NOTICE);\n }\n\n }", "title": "" }, { "docid": "bf4597eecdac28dd17d31fb2a5a30ac5", "score": "0.6266906", "text": "public function doc_req_delete()\r\n\t{\r\n\t\t$doc_req_id = $this->input->post('del_doc_req_id');\r\n\t\t$result = $this->Document_Req_model->doc_req_delete($doc_req_id);\r\n\t if($result)\r\n\t {\r\n\t \t$this->session->set_flashdata('qstage_success', 'Document Required has been Deleted successfully.');\r\n \t\tredirect('/Document_Req');\r\n\t }\r\n\t else\r\n\t {\r\n\t \t$this->session->set_flashdata('qstage_err', 'Something Went Wrong.');\r\n \t\tredirect('/Document_Req');\r\n\t }\r\n\t}", "title": "" }, { "docid": "f036b8dff0d05956be5fbc31d77058e4", "score": "0.62295383", "text": "public function destroy(Document $document)\n {\n //\n }", "title": "" }, { "docid": "f036b8dff0d05956be5fbc31d77058e4", "score": "0.62295383", "text": "public function destroy(Document $document)\n {\n //\n }", "title": "" }, { "docid": "f036b8dff0d05956be5fbc31d77058e4", "score": "0.62295383", "text": "public function destroy(Document $document)\n {\n //\n }", "title": "" }, { "docid": "f036b8dff0d05956be5fbc31d77058e4", "score": "0.62295383", "text": "public function destroy(Document $document)\n {\n //\n }", "title": "" }, { "docid": "f036b8dff0d05956be5fbc31d77058e4", "score": "0.62295383", "text": "public function destroy(Document $document)\n {\n //\n }", "title": "" }, { "docid": "1e3f868bfc49788cc4f304217b18a5cf", "score": "0.6191205", "text": "public function deleteInvestmentDoc(Request $request)\n \t{\n \t\ttry\n \t\t{\n \t\t\t$type = $request->type;\n \t\t\t$docId = $request->docId;\n\n \t\t\tif(!empty($type) && !empty($docId))\n \t\t\t{\n \t\t\t\t$getname = InvestmentDocs::where('id',$docId)->first();\n\n \t\t\t\tif($type==1)\n\t\t \t\t{\n\t\t \t\t\t$path = 'docs/'.$getname->doc_name;\n\t\t \t\t}\n\t\t \t\telse if($type==2)\n\t\t \t\t{\n\t\t \t\t\t$path = 'videos/'.$getname->doc_name;\n\t\t \t\t}\n\n \t\t\t\t$res = $this->RemoveFileFromBucket($path);\n\n \t\t\t\tif($res)\n \t\t\t\t{\n \t\t\t\t\tInvestmentDocs::where('id',$docId)->delete();\n\n\t \t\t\t\treturn response()->json([\n\t\t\t 'message' => 'Document Removed Successfully.',\n\t\t\t 'status' => 1,\n\t\t \t]);\n \t\t\t\t}\n \t\t\t\telse\n\t \t\t\t{\n\t \t\t\t\treturn response()->json([\n\t\t\t 'message' => 'Invalid Request.Please Try Again After Some Time.',\n\t\t\t 'status' => 0,\n\t\t \t]);\n\t \t\t\t}\n\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\treturn response()->json([\n\t\t 'message' => 'Invalid Request.Please Try Again After Some Time.',\n\t\t 'status' => 0,\n\t \t]);\n \t\t\t}\n \t\t}\n \t\tcatch(Exception $e)\n \t\t{\n \t\t\treturn response()->json([\n\t 'message' => $e->getMessage(),\n\t 'status' => 0,\n \t]);\n \t\t}\n \t}", "title": "" }, { "docid": "a28752fea54e327cd553b7d9dc426160", "score": "0.614277", "text": "public function deleteDocument($document_id): string\n {\n return $this->request('documents/'.$document_id, 'DELETE');\n }", "title": "" }, { "docid": "259da3f4584b7404bd51e1d02b8a8349", "score": "0.6122596", "text": "public function deleteAction()\n {\n if ( $this->getRequest()->getParam('id') > 0) {\n try {\n $curriculumdoc = Mage::getModel('bs_curriculumdoc/curriculumdoc');\n $curriculumdoc->setId($this->getRequest()->getParam('id'))->delete();\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('bs_curriculumdoc')->__('Curriculum Document was successfully deleted.')\n );\n $this->_redirect('*/*/');\n return;\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_curriculumdoc')->__('There was an error deleting curriculum doc.')\n );\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n Mage::logException($e);\n return;\n }\n }\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_curriculumdoc')->__('Could not find curriculum doc to delete.')\n );\n $this->_redirect('*/*/');\n }", "title": "" }, { "docid": "327d8b0616b58f4a06379a34a120884b", "score": "0.6079233", "text": "public function destroy(Request $request)\n\t{\n\t\tif (!isset($request->document_variation_id)) {\n\t\t\treturn Response::make('', 400);\n\t\t}\n\n\t\t$variation = DocumentVariation::find($request->document_variation_id);\n\t\tif (!isset($variation)) {\n\t\t\treturn Response::json([\n\t\t\t\t\"message\"\t=> \"Document variation with the provided ID not found\",\n\t\t\t], 404);\n\t\t}\n\n\t\tDB::transaction(function () use ($variation) {\n\t\t\t$fields = DocumentField::where(\"document_variation_id\", $variation->id)->get();\n\n\t\t\t/**\n\t\t\t * delete fields and their positions\n\t\t\t */\n\t\t\tforeach ($fields as $field) {\n\t\t\t\tFieldPosition::where(\"document_field_id\", $field->id)->delete();\n\t\t\t\t$field->delete();\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * delete document field groups\n\t\t\t */\n\t\t\tDocumentFieldGroup::where(\"document_variation_id\", $variation->id)->delete();\n\n\t\t\t/**\n\t\t\t * signatories\n\t\t\t */\n\t\t\t$document_signatories = Signatory::where(\"document_variation_id\", $variation->id)->get();\n\t\t\tforeach ($document_signatories as $signatory) {\n\t\t\t\tSignaturePosition::where(\"signatory_id\", $signatory->id)->delete();\n\t\t\t\t$signatory->delete();\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * template images\n\t\t\t */\n\t\t\t$template_images = TemplateImage::where(\"document_variation_id\", $variation->id)->get();\n\t\t\tforeach ($template_images as $image) {\n\t\t\t\tStorage::delete($image->location);\n\t\t\t\t$image->delete();\n\t\t\t}\n\n\t\t\t$variation->delete();\n\t\t});\n\t}", "title": "" }, { "docid": "91e3fede89753118faa48dac533e05b9", "score": "0.6075771", "text": "abstract public function delete(Request $request);", "title": "" }, { "docid": "0f23fcd662ec597f3c969bb32d044b7c", "score": "0.6069795", "text": "public function testDeleteDocument()\n {\n }", "title": "" }, { "docid": "742ba29c2d2b62d06d9f2771b2e53fb5", "score": "0.60689664", "text": "public function destroy(Document $document)\n {\n\n $user = Auth::user();\n\n if(($document->situation == 'Pendente de Envio' or $document->situation == 'Devolvida') and $document->user_id == $user->id){\n\n Storage::delete('ordinance/'.$document->ordinance);\n Storage::delete('declaration/'.$document->declaration);\n\n $document->delete();\n session()->flash('message','Solicitação excluída com sucesso');\n return redirect()->route('documents.index');\n }\n\n return redirect()\n ->back()\n ->with('error', 'Essa solicitação não pode ser excluida!')\n ->withInput();\n }", "title": "" }, { "docid": "48cfac32a8db00f73ce09919cae8f937", "score": "0.6064661", "text": "public function documents_delete($id)\n {\n if(!$this->canWrite())\n {\n $array = $this->getErrorArray2(\"permission\", \"This user does not have the write permission\");\n $this->response($array);\n return;\n }\n $sutil = new CILServiceUtil();\n $result = $sutil->deleteDocument($id);\n $this->response($result); \n }", "title": "" }, { "docid": "54521e470f3bebfefde71b30befa95e1", "score": "0.6060378", "text": "public function destroy(Application $application, Document $document)\n\t{\n\t\t$document->delete();\n\t\t\n\t\treturn $this->successResponse(['data' => new ApplicationResource($application),\n\t\t\t\t\t\t\t\t\t 'message' => 'Document Deleted',]);\n\t}", "title": "" }, { "docid": "ee33c129668bfc68e53593439667f3ea", "score": "0.60200197", "text": "public function testDeleteForm() {\n $document = $this->createDocument();\n\n $document_name = $document->id();\n\n // Log in and check for existence of the created document.\n $this->drupalLogin($this->adminUser);\n $this->drupalGet('admin/structure/legal');\n $this->assertRaw($document_name, 'Document found in overview list');\n\n // Delete the document.\n $this->drupalPostForm('admin/structure/legal/manage/' . $document_name . '/delete', [], 'Delete');\n\n // Ensure document no longer exists on the overview page.\n $this->assertUrl('admin/structure/legal', [], 'Returned to overview page after deletion');\n $this->assertNoText($document_name, 'Document not found in overview list');\n }", "title": "" }, { "docid": "7bcd8a4e8d6874e38c17a081370b9462", "score": "0.60153717", "text": "public function deleteAction()\n {\n if ( $this->getRequest()->getParam('id') > 0) {\n try {\n $traineedoc = Mage::getModel('bs_traineedoc/traineedoc');\n $traineedoc->setId($this->getRequest()->getParam('id'))->delete();\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('bs_traineedoc')->__('Trainee Document was successfully deleted.')\n );\n $this->_redirect('*/*/');\n return;\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_traineedoc')->__('There was an error deleting trainee document.')\n );\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n Mage::logException($e);\n return;\n }\n }\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_traineedoc')->__('Could not find trainee document to delete.')\n );\n $this->_redirect('*/*/');\n }", "title": "" }, { "docid": "65e0621a4b8100b6eab3c49a67fb56c0", "score": "0.60146624", "text": "public function destroy(Request $request)\n {\n $Documentos_Adjuntos = new Documentos_Adjuntos;\n $val= $Documentos_Adjuntos::where(\"id_doc_adj\",\"=\",$request['id_doc_adj'] )->first();\n if(count($val)>=1)\n {\n $val->delete();\n }\n return \"destroy \".$request['id_doc_adj'];\n }", "title": "" }, { "docid": "1433dd2ee99ec1b010c8467baa4e5787", "score": "0.6004875", "text": "public function destroy(documento $documento)\n {\n //\n }", "title": "" }, { "docid": "eff2d240ab35676e2bd1d1a00847018d", "score": "0.598761", "text": "public function deleteDocument() {\n\n // should get instance of model and run delete-function\n\n // softdeletes-column is found inside database table\n\n return redirect('/home');\n }", "title": "" }, { "docid": "5b122f8ef9fb3e3fc2e213e88e571a96", "score": "0.5967708", "text": "public function testDelete()\n {\n if (! $this->_url) $this->markTestSkipped(\"Test requires a CouchDb server set up - see TestConfiguration.php\");\n $db = $this->_setupDb();\n \n $db->create(array('a' => 1), 'mydoc');\n \n // Make sure document exists in DB\n $doc = $db->retrieve('mydoc');\n $this->assertType('Sopha_Document', $doc);\n \n // Delete document\n $ret = $db->delete('mydoc', $doc->getRevision());\n \n // Make sure return value is true\n $this->assertTrue($ret);\n \n // Try to fetch doc again \n $this->assertFalse($db->retrieve('mydoc'));\n \n $this->_teardownDb();\n }", "title": "" }, { "docid": "54d2edfc55debcdf39829438bc2c8da5", "score": "0.5932644", "text": "public function delete_document($document_id)\n {\n $endpoint_name = \"/documents/{$document_id}/\";\n $request_arguments = [ \"id\" => $document_id ];\n $this->request(\"DELETE\", $endpoint_name, $request_arguments);\n \n }", "title": "" }, { "docid": "5b6bd4ba022240259dfc34d5e1acf953", "score": "0.5910344", "text": "public function destroy(Request $request, BasicDocument $basic_document)\n {\n $basic_document->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('basic_document.index');\n }", "title": "" }, { "docid": "4748918219f4f91ab2dbfc1b14bfbf5f", "score": "0.58651906", "text": "public function delete()\n {\n return $this->setMethod(__FUNCTION__)\n ->makeRequest();\n }", "title": "" }, { "docid": "61d2b1af8312f04c0f9a87c4dbfad269", "score": "0.5864053", "text": "public function deleteDocument($document_id) {\n\t\t$user = $this->auth->user();\n\n\t\tif(!$user) {\n\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\"code\" => 401,\n\t\t\t\t\"message\" => \"Permisos denegados para el cliente\",\n\t\t\t\t\"response\" => null\n\t\t\t]);\n\t\t} else {\n\t\t\tif(empty($document_id)) {\n\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\"code\" => 400,\n\t\t\t\t\t\"message\" => \"Parametros incorrectos, document_id es requerido\",\n\t\t\t\t\t\"response\" => null\n\t\t\t\t]);\n\t\t\t} else {\n\t\t\t\t$document = Documents::where(\"id_user\", $user->id)->where(\"id\", $document_id)->first();\n\n\t\t\t\tif($document) {\n\t\t\t\t\t$document->status = 0;\n\t\t\t\t\t$document->save();\n\n\t\t\t\t\t$return = Documents::where(\"id\", $document_id)->get(['id'])->first();\n\t\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\t\"code\" => 200,\n\t\t\t\t\t\t\"message\" => \"Documento borrado exitosamente\",\n\t\t\t\t\t\t\"response\" => array(\"document\" => $return)\n\t\t\t\t\t]);\n\t\t\t\t} else {\n\t\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\t\"code\" => 400,\n\t\t\t\t\t\t\"message\" => \"El documento que intenta borrar no existe\",\n\t\t\t\t\t\t\"response\" => null\n\t\t\t\t\t]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9f6323e6103b0e9d563fc24fb059cadf", "score": "0.58556354", "text": "function delete(Request &$request, Response &$response);", "title": "" }, { "docid": "b34cef782c79d50c7c910b0d6d775606", "score": "0.5841403", "text": "protected function deleteParagraphRequest(Requests\\DeleteParagraphRequest $request)\n {\n // verify the required parameter 'name' is set\n if ($request->name === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $name when calling deleteParagraph');\n }\n // verify the required parameter 'slide_index' is set\n if ($request->slideIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $slideIndex when calling deleteParagraph');\n }\n // verify the required parameter 'shape_index' is set\n if ($request->shapeIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $shapeIndex when calling deleteParagraph');\n }\n // verify the required parameter 'paragraph_index' is set\n if ($request->paragraphIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $paragraphIndex when calling deleteParagraph');\n }\n\n $resourcePath = '/slides/{name}/slides/{slideIndex}/shapes/{shapeIndex}/paragraphs/{paragraphIndex}';\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n\n // query params\n if ($request->password !== null) {\n $queryParams['password'] = ObjectSerializer::toQueryValue($request->password);\n }\n // query params\n if ($request->folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($request->folder);\n }\n // query params\n if ($request->storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($request->storage);\n }\n\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"name\", $request->name);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"slideIndex\", $request->slideIndex);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"shapeIndex\", $request->shapeIndex);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"paragraphIndex\", $request->paragraphIndex);\n $this->headerSelector->selectHeaders(\n $headerParams,\n ['application/json'],\n ['application/json']);\n\n return $this->createRequest($resourcePath, $queryParams, $headerParams, $httpBody, 'DELETE');\n }", "title": "" }, { "docid": "fbe4b6ad26d1cca6ab38371d68b8f241", "score": "0.5835222", "text": "function deleteDocument() {\n \tglobal $synAbsolutePath;\n global ${$this->name}, ${$this->name.\"_name\"}, ${$this->name.\"_old\"}; // ${$this->name} = ${\"surname\"} = $surname\n include_once(\"../../includes/php/utility.php\");\n $ext=$this->translate($this->getValue());\n $mat=$this->translatePath($this->mat);\n $filename=$this->createFilename(false);\n $documentRoot=$synAbsolutePath.\"/\";\n $fileToBeRemoved=$documentRoot.$mat.$filename.\"*\";\n foreach (glob($fileToBeRemoved) as $filename)\n unlink($filename);\n }", "title": "" }, { "docid": "91c647a94ce862ab3d4712ca363b8595", "score": "0.5803234", "text": "protected function restNewslettersDeleteRequest()\n {\n\n $resourcePath = '/rest/newsletters';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "5d2808d336af20f4907dd4c93fcd99af", "score": "0.57995397", "text": "public function deleteDocument(AgentProfileInterface $profile);", "title": "" }, { "docid": "3fa50f80e081075d21dd0e83fac1eaa3", "score": "0.57954705", "text": "public function delete_user_single_document(Request $request, $dr_id)\n {\n try\n {\n $user = array(\n 'userid' => Auth::user()->id,\n 'role' => Auth::user()->role\n );\n \n $query = DB::table('documents_rules')\n ->where('dr_id', '=', $dr_id)\n ->delete();\n if(count($query) < 1)\n {\n $result = array('code'=>404, \"description\"=>\"No Records Found\");\n return response()->json($result, 404);\n }\n else\n {\n $result = array('data'=>$query,'code'=>200);\n return response()->json($result, 200);\n }\n }\n catch(Exception $e)\n {\n return response()->json(['error' => 'Something is wrong'], 500);\n }\n }", "title": "" }, { "docid": "bbfbb7b7b8c8e7cea8c6f200b4c773bc", "score": "0.57897174", "text": "public function destroy(Document $document)\n {\n $this->authorize('delete documents', $document);\n try {\n $document->delete();\n } catch (\\Illuminate\\Database\\QueryException $e) {\n if($e->getCode() == 23000)\n {\n return redirect()\n ->back()\n ->withErrors(__('crud.general.integrity_violation'));\n }\n return redirect()\n ->back()\n ->withErrors(__('crud.general.not_done'));\n }\n\n return redirect()\n ->back()\n ->withSuccess(__('crud.general.deleted'));\n }", "title": "" }, { "docid": "cfa378f41f3a6b570ba29373e879d1ee", "score": "0.5787881", "text": "public function deleteAction()\n {\n if ( $this->getRequest()->getParam('id') > 0) {\n try {\n $coursedoc = Mage::getModel('bs_coursedoc/coursedoc');\n $coursedoc->setId($this->getRequest()->getParam('id'))->delete();\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('bs_coursedoc')->__('Course Document was successfully deleted.')\n );\n $this->_redirect('*/*/');\n return;\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_coursedoc')->__('There was an error deleting course doc.')\n );\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n Mage::logException($e);\n return;\n }\n }\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_coursedoc')->__('Could not find course doc to delete.')\n );\n $this->_redirect('*/*/');\n }", "title": "" }, { "docid": "a3636690495ea9b63d345e9b3eb17063", "score": "0.5787563", "text": "public function deleteWebhook(): Request\n {\n return $this->request('deleteWebhook');\n }", "title": "" }, { "docid": "7195d4b2e9c85c854ecc0ded50589f33", "score": "0.5767725", "text": "function delete_document_process()\n\t{\n\t\t$this->load->model('document_model');\n\t\treturn $this->document_model->delete_document_process();\t\n\t\t\n\t}", "title": "" }, { "docid": "ebd18f656e60e1a182cf4b170f085fde", "score": "0.5758611", "text": "public function delete(Request $request){\n if($request->request->has(\"delete\")){\n $this->getDoctrine()->getManager()->getRepository('App:Articles')->deleteArticle($request->request->get('dA'));\n $this->getDoctrine()->getManager()->getRepository('App:Commandes')->deleteCommande($request->request->get('delete'));\n $this->getDoctrine()->getManager()->getRepository('App:Clients')->deleteClient($request->request->get('delete'));\n return $this->redirect(\"/\");\n }\n }", "title": "" }, { "docid": "2b69b6635bf787caf9e88895e76260c3", "score": "0.5753564", "text": "public function delete() {\n // Find document ID.\n if (!$this->find()) {\n debugging('Failed to find ousearch document');\n return false;\n }\n self::wipe_document($this->id);\n }", "title": "" }, { "docid": "4e3cb498b1089990a580cbbf665d080e", "score": "0.5745323", "text": "public function delete(Request $request)\n {\n }", "title": "" }, { "docid": "db69581d1f60ebaa9cab0d94f9d7b581", "score": "0.5713953", "text": "public function destroy(Request $request, $id)\n {\n $request->session()->flash('success', 'Le doc à été Supprimé !');\n\n $doc = Document::find($id);\n \n File::delete(\"doc/\" . $doc->fichier);\n \n\n $doc->delete();\n\n return redirect()->route(\"document.index\");\n }", "title": "" }, { "docid": "484340c30afea0e3c5597c8f8cf2634f", "score": "0.56901866", "text": "function __safeDeleteDocument() {\n\t\ttry {\n\t\t\t$this->solr->deleteById($this->__createDocId());\n\t\t\t$this->solr->commit();\n\t\t\t$this->solr->optimize();\t\n\t\t} catch (Exception $e) {\n\t\t\t$this->log($e, 'solr');\n\t\t}\n\t}", "title": "" }, { "docid": "55012b9d01e9ada8cb1e6eb7fe102623", "score": "0.5687116", "text": "public function destroy($doc)\n\t{\n\t\t$doc = Document::findBySlug($doc);\n\n\t\tif (!$doc) {\n\t\t\treturn response(view('docs.404'), 404);\n\t\t}\n\n\t\t$this->authorize('delete', $doc);\n\n\t\t$doc->delete();\n\n\t\treturn redirect()->route('docs.index')\n\t\t\t->with('alert-success', 'Document deleted!');\n\t}", "title": "" }, { "docid": "153dc7f48155dd261ff0060c2a7ddc83", "score": "0.56829906", "text": "public function delete() {\n\n try {\n /**\n * Set up request method\n */\n $this->method = 'POST';\n\n\n /**\n * Process request and call for response\n */\n return $this->requestProcessor();\n\n } catch (\\Throwable $t){\n new ErrorTracer($t);\n }\n }", "title": "" }, { "docid": "398725f6eaf43a51539c9c040bb594a3", "score": "0.5678687", "text": "function delete()\n {\n $this->_api->doRequest(\"DELETE\", \"{$this->getBaseApiPath()}\");\n }", "title": "" }, { "docid": "398725f6eaf43a51539c9c040bb594a3", "score": "0.5678687", "text": "function delete()\n {\n $this->_api->doRequest(\"DELETE\", \"{$this->getBaseApiPath()}\");\n }", "title": "" }, { "docid": "9836f165b3d22bbedcce525429508fa3", "score": "0.5663079", "text": "private function delete_request( $endpoint = '/', $args = [], $request_args = [] ) {\n return $this->request( 'DELETE', $endpoint, $args, $request_args );\n }", "title": "" }, { "docid": "787777872a7164fdba4325d42aa955a5", "score": "0.56562614", "text": "function deleteDocument($document)\r\n\t{\r\n\t\t$fullPath = $this->library->getLibraryDirectory() . DIRECTORY_SEPARATOR . $document->file;\r\n\t\tif (file_exists($fullPath))\r\n\t\t{\r\n\t\t\tunlink($fullPath);\r\n\t\t}\r\n\t\t\r\n\t\t$document->delete();\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "7eabe3f22fc23165ea43caaea0214c76", "score": "0.56525636", "text": "public function delete( $oid=null );", "title": "" }, { "docid": "8a2085a95f5416c9e144eb6b98d0beaa", "score": "0.5644657", "text": "public function DeleteDocumentosFase() {\n\t\t\t$this->objDocumentosFase->Delete();\n\t\t}", "title": "" }, { "docid": "4186202cb169a9c88abc0fa326eb1987", "score": "0.56386644", "text": "protected function deleteSlidesDocumentPropertyRequest(Requests\\DeleteSlidesDocumentPropertyRequest $request)\n {\n // verify the required parameter 'name' is set\n if ($request->name === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $name when calling deleteSlidesDocumentProperty');\n }\n // verify the required parameter 'property_name' is set\n if ($request->propertyName === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $propertyName when calling deleteSlidesDocumentProperty');\n }\n\n $resourcePath = '/slides/{name}/documentproperties/{propertyName}';\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n\n // query params\n if ($request->password !== null) {\n $queryParams['password'] = ObjectSerializer::toQueryValue($request->password);\n }\n // query params\n if ($request->folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($request->folder);\n }\n // query params\n if ($request->storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($request->storage);\n }\n\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"name\", $request->name);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"propertyName\", $request->propertyName);\n $this->headerSelector->selectHeaders(\n $headerParams,\n ['application/json'],\n ['application/json']);\n\n return $this->createRequest($resourcePath, $queryParams, $headerParams, $httpBody, 'DELETE');\n }", "title": "" }, { "docid": "f6d76806c4b58012d91dfcdffdc9bb1c", "score": "0.56365746", "text": "public function delete($id, Request $request)\n { \n $document=document::find($id);\n if($request->ajax())\n return view('documents.ajax.delete-confirm')->with('document', $document);\n \n return view('documents.http.delete-confirm')->with('document', $document);\n }", "title": "" }, { "docid": "d1a0feec4f56f7a69a519bced43ce9b5", "score": "0.5624905", "text": "function deleteDocumentAction()\n\t{\n\t\tif($this->_request->isPost() && $_SERVER['HTTP_X_REQUESTED_WITH']=='XMLHttpRequest')\n\t\t{\n\t\t\t$parmas = $this->_request->getParams();\n\t\t\t$explode_identifier = explode(\"_\",$parmas['identifier']);\n\t\t\t$offset = $explode_identifier[0];\n\t\t\t$identifier = $explode_identifier[1];\n\t\t\t$quoteMission_obj=new Ep_Quote_QuoteMissions();\n\t\t\t$result = $quoteMission_obj->getQuoteMission($identifier);\n\t\t\t$documents_paths = explode(\"|\",$result[0]['documents_path']);\n\t\t\t$documents_names = explode(\"|\",$result[0]['documents_name']);\n\n\t\t\tunlink($this->mission_documents_path.$documents_paths[$offset]);\n\n\t\t\tunset($documents_paths[$offset]);\n\t\t\tunset($documents_names[$offset]);\n\n\t\t\t$data['documents_path']\t= implode(\"|\",$documents_paths);\n\t\t\t$data['documents_name']\t= implode(\"|\",$documents_names);\n\t\t\t$quoteMission_obj->updateQuoteMission($data,$identifier);\n\n\t\t\t$documents_paths = array_filter(array_values($documents_paths));\n\t\t\t$documents_names = array_values($documents_names);\n\n\n\t\t\t\n\t\t\t$files = \"<table class='table'>\";\n\t\t\t\n\t\t\tif($parmas['assignmission']):\n\t\t\t$k=0;\n\t\t\t$zip = \"\";\n\t\t\t$zip_req = $parmas['zip_req'];\n\t\t\tforeach($documents_paths as $row)\n\t\t\t{\n\t\t\t\t$file_path=$this->mission_documents_path.$row;\n\t\t\t\tif(file_exists($this->mission_documents_path.$documents_paths[$k]) && !is_dir($this->mission_documents_path.$documents_paths[$k]))\n\t\t\t\t{\n\t\t\t\t\t$zip = true;\n $fname = $documents_names[$k];\n\t\t\t\t\tif($fname==\"\")\n\t\t\t\t\t\t$fname = basename($row);\n\t\t\t\t\t$ofilename = pathinfo($file_path);\n\t\t\t\t\t$files .= '<tr><td width=\"30%\">'.utf8_encode($fname).'</td><td width=\"35%\">'.utf8_encode($ofilename['basename']).'</td><td width=\"20%\">'.formatSizeUnits(filesize($file_path)).'</td><td align=\"center\" width=\"15%\"><a href=\"/quote/download-document?type=seo_mission&mission_id='.$identifier.'&index='.$k.'\"><i style=\"margin-right:5px\" class=\"splashy-download\"></i></a><span class=\"delete\" rel=\"'.$k.'_'.$identifier.'\"> <i class=\"icon-adt_trash\"></i></span><td></tr>';\n\n\t\t\t\t}\n\t\t\t\t$k++;\n\t\t\t}\n\t\t\t\tif($zip && !$zip_req):\n\t\t\t\t$files .= '<thead><tr><td colspan=\"5\"><a href=\"/quote/download-document?type=seo_mission&index=-1&mission_id='.$identifier.'\" class=\"btn btn-small pull-right\">Download Zip</a></td></tr></thead>';\n\t\t\t\tendif;\n\t\t\telse:\n\t\t\t$k=0;\n\t\t\tforeach($documents_paths as $row)\n\t\t\t{\n\t\t\t\tif(file_exists($this->mission_documents_path.$documents_paths[$k]) && !is_dir($this->mission_documents_path.$documents_paths[$k]))\n\t\t\t\t{\n $fname = $documents_names[$k];\n\t\t\t\t\tif($fname==\"\")\n\t\t\t\t\t\t$fname = basename($row);\n\t\t\t\t\t$files .= '<div class=\"topset2\"><a href=\"/quote/download-document?type=seo_mission&mission_id='.$identifier.'&index='.$k.'\">'.utf8_encode($fname).'</a><span class=\"delete\" rel=\"'.$k.'_'.$identifier.'\"> <i class=\"splashy-error_x\"></i></span></div>';\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$k++;\n\t\t\t}\t\n\t\t\tendif;\n\t\t\t$files .= '</table>';\n\t\t\techo $files;\n\t\t}\n\t}", "title": "" }, { "docid": "ad82ef82ad5c12a3b6dbb7139430f1b1", "score": "0.56197727", "text": "public function deleteDocument() {\n $file = $this->getDocumentFile().$this->getAttribute('evidencias')[2];\n\n// check if file exists on server\n if (empty($file) || !file_exists($file)) {\n return false;\n }\n\n// check if uploaded file can be deleted on server\n if (!unlink($file)) {\n return false;\n }\n\n// if deletion successful, reset your file attributes\n $this->evidencias = null;\n\n return true;\n }", "title": "" }, { "docid": "58eda41d5d0fe1f2e418a6ef1526f1d9", "score": "0.56162053", "text": "public function massDestroy(Request $request)\n {\n if (! Gate::allows('document_delete')) {\n return abort(401);\n }\n\n if ($request->input('ids')) {\n $entries = Document::whereIn('id', $request->input('ids'))->get();\n\n foreach ($entries as $entry) {\n $entry->delete();\n }\n }\n }", "title": "" }, { "docid": "198e6a792f9ce52e8d055441aa13e264", "score": "0.56009215", "text": "public function deleteIndex(string $documentType);", "title": "" }, { "docid": "790799281c1fe183d2220ba4365133ad", "score": "0.55883193", "text": "public function testDeleteDocument($name, $fields, $expectedValues)\n {\n $crud = new Enumerates();\n $crud->setUrlParameters(array(\n \"familyId\" => $name\n ));\n try {\n $crud->delete(null);\n $this->assertFalse(true, \"An exception must occur\");\n }\n catch(DocumentException $exception) {\n $this->assertEquals(501, $exception->getHttpStatus());\n }\n }", "title": "" }, { "docid": "44a72b8ce65d313650540ae74180c423", "score": "0.5586767", "text": "function documents_civicrm_pre( $op, $objectName, $id, &$params ) {\n $repo = CRM_Documents_Entity_DocumentRepository::singleton();\n if ($objectName == 'Individual' || $objectName == 'Household' || $objectName == 'Organization') {\n if ($op == 'delete') {\n try {\n $contact = civicrm_api3('Contact', 'getsingle', array('contact_id' => $id, 'is_deleted' => '1'));\n //contact is in trash so this deletes the contact permanenty\n $docs = $repo->getDocumentsByContactId($id);\n foreach($docs as $doc) {\n $doc->removeContactId($id);\n $repo->persist($doc);\n }\n } catch (Exception $e) {\n //contact not found, or contact is in transh\n }\n }\n }\n \n if ($op == 'delete') {\n $refspec = CRM_Documents_Utils_EntityRef::singleton();\n $ref = $refspec->getRefByObjectName($objectName);\n if ($ref) {\n $documents = $repo->getDocumentsByEntityId($ref->getEntityTableName(), $id);\n foreach($documents as $doc) {\n $entity = new CRM_Documents_Entity_DocumentEntity($doc);\n $entity->setEntityId($id);\n $entity->setEntityTable($ref->getEntityTableName());\n $doc->removeEntity($entity);\n \n $repo->persist($doc);\n }\n }\n }\n}", "title": "" }, { "docid": "089103cccecde58a0cbb2bac5e2ea101", "score": "0.5586489", "text": "public function destroy($id_documento)\n {\n $documentos = Documento::find($id_documento)->delete();\n return redirect('documentos');\n }", "title": "" }, { "docid": "a407c25133d6e5575328ea3b24924d53", "score": "0.55663425", "text": "public function delete($database, CouchDBObject $object);", "title": "" }, { "docid": "353a1b6243d248a816807148121e4977", "score": "0.5561329", "text": "public function destroy($id)\n {\n $document = Document::findOrFail($id);\n $this->authorize('delete', $document);\n $document->delete();\n\n return \\response('OK.');\n }", "title": "" }, { "docid": "022c4a1c4817ad0756a3d1df90116d2d", "score": "0.55544347", "text": "public function deleteAction(Request $request, $id, $document_id)\n {\n if (!$this->container->getParameter('manhattan_posts.include_attachments')) {\n throw new AccessDeniedHttpException('Attachment functionality has not been enabled in the bundle.');\n }\n\n if (false === $this->get('security.context')->isGranted('ROLE_ADMIN')) {\n throw new AccessDeniedException();\n }\n\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('ManhattanPostsBundle:Attachment')->find($document_id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Attachment entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('console_news_documents', array('id' => $id)));\n }", "title": "" }, { "docid": "b1e664ea31949436cf866b7408af5017", "score": "0.55417204", "text": "public function delDocument(){\n if(!empty($_POST['doc_id'])){\n $result = $this->user_model->delDocument($_POST['doc_id']);\n\n if($result){\n $response=array(\n 'status' => 'success',\n 'message' => '<b>Success:</b> You Have Successfully deleted Document!'\n );\n }\n else{\n $response=array(\n 'status' => 'error',\n 'message' => '<b>Error:</b> Document was not deleted Successfully!'\n );\n } \n}\nelse{\n $response=array(\n 'status' => 'validation',\n 'message' => '<b>Warning:</b> Document not found!'\n );\n}\n\necho json_encode($response);\n}", "title": "" }, { "docid": "b151bb717dbbd008a39592f09dda0d13", "score": "0.5536228", "text": "public function createDocumentRequest($documentCreateRequest, $editorVer = null)\n {\n // verify the required parameter 'documentCreateRequest' is set\n if ($documentCreateRequest === null || (is_array($documentCreateRequest) && count($documentCreateRequest) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $documentCreateRequest when calling createDocument'\n );\n }\n\n $resourcePath = '/public/v1/documents';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($editorVer !== null) {\n if('form' === 'form' && is_array($editorVer)) {\n foreach($editorVer as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['editor_ver'] = $editorVer;\n }\n }\n\n\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json', 'multipart/form-data']\n );\n }\n\n // for model (json/xml)\n if (isset($documentCreateRequest)) {\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($documentCreateRequest));\n } else {\n $httpBody = $documentCreateRequest;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() != null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "10dfca85cdeb7d7047c6ab499c01260a", "score": "0.55294764", "text": "public function destroy($id)\n\t{\n $documento = $this->documentoRepo->find($id);\n\n $this->notFoundUnless($documento);\n\t\t\n\t \\DB::table('documentos')\n\t ->where('Emp_Id', $documento->Emp_Id)\n\t ->where('Doc_Id', $documento->Doc_Id)\n\t ->delete();\n\n \treturn Redirect::route('documentos.list', $documento->Obj_Id . '-' . $documento->Doc_Oper_Id);\n \t}", "title": "" }, { "docid": "1d8cda17fee015986e7dc99601613fde", "score": "0.5527162", "text": "protected function httpDelete() {\n $this->manageCollectionPermissionCheck();\n\n $collectionObj = Collection::getByID((int)$_REQUEST['collectionID']);\n $collectionObj->unapproveCollectionEvents(explode(',', $_REQUEST['events']));\n $this->setResponseCode(Response::HTTP_ACCEPTED);\n }", "title": "" }, { "docid": "404a01f24fcfdaa7e6e36d2ba8f8e825", "score": "0.55162495", "text": "public function deleted(Document $document)\n {\n if(isset($document->path)) {\n // delete the associated file\n $path = $document->path;\n $fileExists = Storage::disk('spaces')->exists($path);\n if($fileExists) {\n Storage::disk('spaces')->delete($path);\n }\n } \n }", "title": "" }, { "docid": "247a4b959c519fcd19527bc7cbb0585b", "score": "0.55153424", "text": "public function actionDelete() {}", "title": "" }, { "docid": "247a4b959c519fcd19527bc7cbb0585b", "score": "0.55153424", "text": "public function actionDelete() {}", "title": "" }, { "docid": "9309500956e632c3a03e8b71276f461b", "score": "0.55101144", "text": "public function __invoke(Request $request)\n {\n //\n return $this->repository->delete($request->all());\n }", "title": "" }, { "docid": "a5da984d755b89fa851b49cdf5b72e97", "score": "0.54994994", "text": "public function delete($requestUrl, $requestBody, array $requestHeaders = []);", "title": "" }, { "docid": "0dcfdf6643e790ffd0571391e35d55e6", "score": "0.5494485", "text": "public function destroy(Document $document)\n {\n if ($document === null) {\n return GeneralHelper::sendNotification(NotificationTypes::ERROR, \"Dieses Dokument existiert nicht.\");\n }\n $documentName = $document->name;\n Storage::delete($document->path);\n $document->delete();\n\n return GeneralHelper::sendNotification(NotificationTypes::SUCCESS, \"Das Dokument \\\"\" . $documentName . \"\\\" wurde erfolgreich gelöscht.\");\n }", "title": "" }, { "docid": "e1fe8352bb2112f8ecfef3af64bcf3cf", "score": "0.5493715", "text": "public function destroy(Tipo_documento $tipo_documento)\n {\n //dd(count($tipo_documento->expedientes));\n if(count($tipo_documento->expedientes) == 0){\n $tipo_documento->delete();\n Session::flash('estado', 'ok');\n \n }else{\n Session::flash('estado', 'error');\n }\n \n return redirect()\n ->route('admin.tipodocumento.index')\n ->with('flash', 'La publicación ha sido eliminada.');\n \n \n }", "title": "" }, { "docid": "797ce054946afdc74797cc4375284dae", "score": "0.54934055", "text": "public function destroy($id)\n {\n if(Gate::denies('delete')) {\n return abort('401');\n } \n\n $document = Document::find($id);\n\n $property = $document->property()->first(); \n\n $property_slug = \\Str::slug($property->property_name);\n\n $document_type = $document->document_type()->pluck('slug')->first();\n\n $property_type_slug = @ProprtyType::find($property->proprty_type_id)->slug;\n\n $folderPath = Document::PROPERTY.\"/\";\n\n $property_type_slug = ($property_type_slug) ? $property_type_slug : Document::ARCHIEVED;\n\n $folderPath .= \"$property_type_slug/$property_slug/$document_type/\";\n\n $path = @public_path().'/'.$folderPath;\n\n $files = $document->files()->get();\n\n $aPath = public_path().'/'. Document::PROPERTY.\"/\".Document::ARCHIEVED.'/'. Document::DOCUMENTS; \n \\File::makeDirectory($aPath, $mode = 0777, true, true);\n \n foreach (@$files as $key => $file) {\n $proprty_type = ProprtyType::find($id);\n @\\File::copy($path.$file->file, $aPath.'/'.$file->file);\n @unlink($path.$file->file);\n }\n\n $document->delete();\n\n return redirect()->back()->with('message', 'Document Delete Successfully!');\n }", "title": "" }, { "docid": "ba135b2edcd720809a8d7a9bbe5ad13d", "score": "0.5492878", "text": "protected function deleteSlidesDocumentPropertiesRequest(Requests\\DeleteSlidesDocumentPropertiesRequest $request)\n {\n // verify the required parameter 'name' is set\n if ($request->name === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $name when calling deleteSlidesDocumentProperties');\n }\n\n $resourcePath = '/slides/{name}/documentproperties';\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n\n // query params\n if ($request->password !== null) {\n $queryParams['password'] = ObjectSerializer::toQueryValue($request->password);\n }\n // query params\n if ($request->folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($request->folder);\n }\n // query params\n if ($request->storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($request->storage);\n }\n\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"name\", $request->name);\n $this->headerSelector->selectHeaders(\n $headerParams,\n ['application/json'],\n ['application/json']);\n\n return $this->createRequest($resourcePath, $queryParams, $headerParams, $httpBody, 'DELETE');\n }", "title": "" }, { "docid": "417751ee0f5895cb4d3c341be7b8b199", "score": "0.5489122", "text": "public function destroy(Request $request)\n {\n \n try {\n $input=json_decode($request->id,true);\n\n $docente_periodo=DocentePeriodo::where('periodo_id','=',$input['periodo_id'])->where('docente_id','=',$input['docente_id'])->delete();\n\n session()->flash('msg_danger', \"El docente ha sido eliminado del periodo\");\n } catch (Exception $e) {\n session()->flash('msg_danger', $e->getMessage());\n }\n\n return redirect()->route('docente_periodo.show', ['id' => $input['periodo_id']]);\n\n }", "title": "" }, { "docid": "f9d49c3ff4f174de93b4a21831b16882", "score": "0.54396385", "text": "public function destroy(documento $documento)\n {\n //find the category\n\n //delete the category\n $documento->delete();\n\n return redirect('/document');\n }", "title": "" }, { "docid": "463f9de34d6ad41e929bf676398b8e81", "score": "0.54358387", "text": "public function destroy(Documentos $documentos)\n {\n //\n }", "title": "" }, { "docid": "05e0d500e17e7c0fd128f2603ae9a73b", "score": "0.542994", "text": "public function delete($id)\n\t{\n\t\tif(!($this -> isOfficer($id) || $this -> isLace()))\n\t\t\t$this -> redirectHome();\n\t\tif (!$id)\n\t\t{\n\t\t\t$this -> Session -> setFlash(__('Invalid ID for document', true));\n\t\t\t$this -> redirect(array('action' => 'index'));\n\t\t}\n\t\t\n\t\t// Find the document to be deleted.\n\t\t$doc = $this -> Document -> findById($id);\n\t\t$org_id = $doc['Document']['org_id'];\n\t\t\n\t\t// Create a file object and delete the actual file.\n\t\t$filepath = Document::getFilepathWithIdAndName($org_id, $doc['Document']['name']);\n\t\t$file = new File($filepath);\n\t\t$file -> delete();\n\n\t\t// Delete the record in the database for the above file\n\t\tif ($this -> Document -> delete($id))\n\t\t{\n\t\t\t$this -> Session -> setFlash(__('Document deleted.', true));\n\t\t\t$this -> redirect(array(\n\t\t\t\t'controller' => 'documents',\n\t\t\t\t'action' => 'index',\n\t\t\t\t$org_id\n\t\t\t));\n\t\t}\n\t\t$this -> Session -> setFlash(__('Document was not deleted.', true));\n\t\t//$this -> redirect(array('action' => 'index'));\n\t}", "title": "" }, { "docid": "704f3c6169ac56a74ef7a7bddd1bf90d", "score": "0.54288775", "text": "public function forceDeleted(Document $document)\n {\n //\n }", "title": "" }, { "docid": "17d81ac052ae839117dce026067961d8", "score": "0.54286057", "text": "public function destroy(Document $document)\n {\n\n Storage::delete($document->file);\n $document->delete();\n Session::flash('message-success',' Document '. $document->name.' '.trans('messages.deleted'));\n }", "title": "" }, { "docid": "c9cd97ce84f950691432e07e4d42dda4", "score": "0.5424829", "text": "function delete($documents=null){\n if(!$this->db_coll_set()){\n return [\"error\"=>\"db or collection not set.\"];\n }\n $bulk = new MongoDB\\Driver\\BulkWrite;\n if($documents){\n foreach($documents as $doc){\n if(!$this->isAssoc($doc)){\n return array(\"error\"=>\"DELETE failed, document not associative array.\");\n }\n //If the '_id' is in array and its long (like a mongo id) \n //then convert into a mongoid object\n if(array_key_exists('_id',$doc) && strlen($doc['_id']) >= 24){\n $doc['_id'] = new MongoDB\\BSON\\ObjectID($doc['_id']);\n }\n \n //run the delete\n $bulk->delete($doc);\n\t\t\t\t\n }\n }else{\n $bulk->delete([]);\n }\n \n $result = $this->manager->executeBulkWrite($this->dbdotcoll, $bulk, $this->writeConcern);\n return $result->getDeletedCount();\n\n }", "title": "" }, { "docid": "502462ab16f866cc597a84c77eb6d26a", "score": "0.5416005", "text": "public function massDeleteAction()\n {\n $traineedocIds = $this->getRequest()->getParam('traineedoc');\n if (!is_array($traineedocIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_traineedoc')->__('Please select trainee document to delete.')\n );\n } else {\n try {\n foreach ($traineedocIds as $traineedocId) {\n $traineedoc = Mage::getModel('bs_traineedoc/traineedoc');\n $traineedoc->setId($traineedocId)->delete();\n }\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('bs_traineedoc')->__('Total of %d trainee document were successfully deleted.', count($traineedocIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_traineedoc')->__('There was an error deleting trainee document.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "title": "" }, { "docid": "b3d1d91a1e16e8611159278da006ee46", "score": "0.54119265", "text": "public static function delete_doc($id, $doc) {\r\n\t\t$client = self::get_client();\r\n\t\r\n\t\t$index = $client->getIndex(self::get_index());\r\n\t\t$type = $index->getType($doc->get_type());\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tif ($index->exists()) {\r\n\t\t\t\t$type->deleteDocument(new \\Elastica\\Document($id, array()));\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (\\Elastica\\Exception\\Connection\\HttpException $e)\r\n\t\t{\r\n\t\t\techo 'ESWP: Error deleting: ', $e->getMessage(), \"\\n\";\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "270350233f9c343949f4195b556772ad", "score": "0.5411651", "text": "public function delete(Request $request)\n {\n //\n if($request->ajax())\n { \n $orden = OrdenTrabajo::findOrFail($request->orden_number);\n\n $orden->delete();\n\n $ot = OrdenTrabajoProducto::where('ot_producto_orden_trabajo',$request->orden_number)->findOrFail();\n\n $ot->delete();\n\n //respuesta al cliente\n return response()->json([\n \"ok\"\n ]);\n }\n }", "title": "" }, { "docid": "9a27adea53d55bd611f85c985936d0d6", "score": "0.54025275", "text": "public function softDelete(Request $request)\n {\n //Using the productDocument's id and name to ensure that if the data is tampered with it won't delete the wrong file\n $productDocument = ProductDocument::where('id', '=', $request->id)\n ->where('document_name', '=', $request->name)\n ->first();\n $productDocument->deleted = 1;\n $saved = $productDocument->save();\n\n if($productDocument !== null) {\n //destroy file\n }\n\n if($saved) {\n return response()->json(['success' => 'File deleted.', 'document' => $productDocument]);\n }\n else {\n return response()->json(['error' => 'File not deleted.']);\n }\n }", "title": "" }, { "docid": "4dafb48c477489f3004fd9027c1f99fb", "score": "0.5400747", "text": "public function deleteAction(Request $request)\n {\n\t\t\t$id = $request->query->get(\"id\");\n\t\t\t$em = $this->getDoctrine()->getManager();\n\t\t\t$anotacion = $em->getRepository(\"App:Anotacion\")->find($id);\n $em->remove($anotacion);\n $em->flush();\n \n\n return $this->redirectToRoute('anotacion_index');\n }", "title": "" }, { "docid": "6701f80285040ee195f0dbfe03237557", "score": "0.53997725", "text": "public function DELETE() {\n #\n }", "title": "" }, { "docid": "8c6baa681e6623c87e5361f597ed4f96", "score": "0.53947437", "text": "public function deleteAction()\n {\n Extra_ErrorREST::setInvalidHTTPMethod($this->getResponse());\n }", "title": "" }, { "docid": "8dab3d020fe9356c4d252cda381c2b7e", "score": "0.5390464", "text": "function deleteDocmanItem($sessionKey, $group_id, $item_id) {\n return _makeDocmanRequest($sessionKey, $group_id, 'delete', array('id' => $item_id));\n}", "title": "" }, { "docid": "0d95cb39096e6a7ec477a55cae9ecbe1", "score": "0.53881174", "text": "public function deleteAction(Request $request, $id)\n {\n $form = $this->createDeleteForm($id);\n $form->bind($request);\n\n if ($form->isValid()) {\n $dm = $this->getDocumentManager();\n $document = $dm->getRepository('StoreBundle:Product')->find($id);\n\n if (!$document) {\n throw $this->createNotFoundException('Unable to find Product document.');\n }\n\n $dm->remove($document);\n $dm->flush();\n }\n\n return $this->redirect($this->generateUrl('product'));\n }", "title": "" }, { "docid": "d23a89e785d37f4541a43166302b6611", "score": "0.53854775", "text": "public function destroy(Request $request)\n {\n //Using the productDocument's id and name to ensure that if the data is tampered with it won't delete the wrong file\n $productDocument = ProductDocument::where('id', '=', $request->id)\n ->where('document_name', '=', $request->name)\n ->first();\n\n $userRelationkey = $productDocument->user_relation_key;\n $userRelationkey = explode(\",\", $userRelationkey);\n $userCompanyName = Company::where('id', '=', $userRelationkey[1])->first();\n\n if($productDocument !== null) {\n //delete record from database\n $productDocument->delete();\n\n //delete file from disk\n $filePath = 'public/files/' . strtolower(str_replace(\" \", \"_\", $userCompanyName->name)) . '/' . $productDocument->document_name;\n Storage::delete($filePath);\n\n return response()->json(['success' => 'File deleted.']);\n }\n\n return response()->json(['error' => 'File not deleted.']);\n }", "title": "" } ]
56615734090134328d4ecb37ee03bc60
Echo discount percent badge html.
[ { "docid": "83ce9322aa34462fb1b9f5a9a5485e22", "score": "0.6568164", "text": "function pancode_echo_sale_percent( $html ) {\n global $product;\n\n /**\n * @var WC_Product $product\n */\n\n $regular_max = 0;\n $sale_min = 0;\n $discount = 0;\n\n if ( 'variable' === $product->get_type() ) {\n $prices = $product->get_variation_prices();\n $regular_max = max( $prices['regular_price'] );\n $sale_min = min( $prices['sale_price'] );\n } else {\n $regular_max = $product->get_regular_price();\n $sale_min = $product->get_sale_price();\n }\n\n if ( ! $regular_max && $product instanceof WC_Product_Bundle ) {\n $bndl_price_data = $product->get_bundle_price_data();\n $regular_max = max( $bndl_price_data['regular_prices'] );\n $sale_min = max( $bndl_price_data['prices'] );\n }\n\n if ( floatval( $regular_max ) ) {\n $discount = round( 100 * ( $regular_max - $sale_min ) / $regular_max );\n }\n\n return '<span class=\"onsale\"><span class=\"onsale_text\">Sale</span><span class=\"percent\">-&nbsp;' . esc_html( $discount ) . '%</span></span>';\n // return '<span class=\"onsale\"><span>Акция</span><br>-&nbsp;' . esc_html( $discount ) . '%</span>';\n}", "title": "" } ]
[ { "docid": "59f78aa070ca0a415c944019026de0dc", "score": "0.6828967", "text": "function print_donation_percentage($percentage = 0)\r\n\t{\r\n\t\tfor ($i = 5; $i <= 100; $i = $i + 5)\r\n\t\t{\r\n\t\t\t$values[$i] = $i . '%';\r\n\t\t}\r\n\t\treturn construct_pulldown('donationpercentage', 'donationpercentage', $values, $percentage, 'style=\"font-family: verdana\"');\r\n\t}", "title": "" }, { "docid": "2e51a0e95d8b10e033644ccdbd2a429b", "score": "0.6217832", "text": "public function getTextDiscount(){\n\n return 'PayPal Desconto';\n }", "title": "" }, { "docid": "85833ad093ef11f6300df2926cf7bf4d", "score": "0.60568285", "text": "function webseo24h_tie_format_price_discount_show_return_single($price,$discount,$echo)\n{\n $html = '';\n $price = intval($price);\n $discount = intval($discount);\n\n if($price<1)\n { \n $html .= ' \n <span class=\"items-product-single\">Giá bán</span>\n : <b class=\"price_ctpd\"> Liên hệ</b>\n '; \n }\n else if($discount<1 || $discount>=$price)\n {\n $html .= ' \n <span class=\"items-product-single\">Giá bán</span>\n : <b class=\"price_ctpd\">'.webseo24h_tie_format_price_with_prefix($price, FALSE).'</b>\n ';\n }\n else if($discount>1 && $discount < $price)\n {\n $html .= ' \n <b class=\"price_ctpd\">'.webseo24h_tie_format_price_with_prefix($discount, FALSE).'</b><b class=\"price_ctpd2\"> Giá cũ: '.webseo24h_tie_format_price_with_prefix($price, FALSE).'</b>\n ';\n }\n\n if($echo)\n echo $html;\n else\n return $html;\n}", "title": "" }, { "docid": "3662bd86a18f3cc871e7064bbb636028", "score": "0.59583277", "text": "function webseo24h_tie_format_price_discount_show_return($price,$discount,$echo)\n{\n $html = '';\n $price = intval($price);\n $discount = intval($discount);\n\n if($price<1)\n { \n $html .= ' \n <div class=\"group-price\"> \n <span class=\"pri1_wf\">Liên hệ</span> \n </div> \n '; \n }\n else if($discount<1 || $discount>=$price)\n {\n $html .= ' \n <div class=\"group-price\"> \n <span class=\"pri2_wf\">'.webseo24h_tie_format_price_with_prefix($price, FALSE).'</span> \n </div> \n ';\n }\n else if($discount>1 && $discount < $price)\n {\n $html .= ' \n <div class=\"group-price\"> \n <span class=\"pri1_wf\">'.webseo24h_tie_format_price_with_prefix($price, FALSE).'</span> \n <span class=\"pri2_wf\">'.webseo24h_tie_format_price_with_prefix($discount, FALSE).'</span> \n </div> \n ';\n }\n\n if($echo)\n echo $html;\n else\n return $html;\n}", "title": "" }, { "docid": "3e030e8e966112a400dda32f6adb7917", "score": "0.59534335", "text": "protected function _formatDiscount($discount){\r\n\t\treturn Mage::getModel('directory/currency')->format($discount, array('display'=>Zend_Currency::NO_SYMBOL), false);\r\n\t}", "title": "" }, { "docid": "638963bc31a1006e42b053d895e3bef5", "score": "0.59109676", "text": "public function getDiscount(): float|string\n {\n return $this->format($this->discountAmount);\n }", "title": "" }, { "docid": "e27d7ab0dd3d85744ada8de6405d8f76", "score": "0.59064394", "text": "public function getMethodLabelAfterHtml()\n {\n if (false == $this->getFeeConfig()) {\n return '';\n }\n\n $text = '+ %s';\n $text = $this->__($text, $this->getFormattedFeePrice());\n\n $id = 'payone_payment_fee_' . $this->getMethodCode();\n\n $formatting = ' <span id=' . $id . '>' . $text . '</span>';\n \n return $formatting;\n }", "title": "" }, { "docid": "3ac36b90b9f8b09082c8e5ae1bc5b984", "score": "0.5863049", "text": "function showperc($part,$total,$decs=2) {\n if ($total>0) {\n $vys=round(($part/$total)*100,$decs);\n if ($vys==100 && $part<$total) {\n $vys-=1/(10^$decs);\n }\n if ($vys==0 && $part>0) {\n $vys+=1/(10^$decs);\n }\n } else {\n $vys=0;\n }\n $vysnew=niceround($vys,$decs);\n return $vysnew;\n}", "title": "" }, { "docid": "52790fe8e15ee3e7fda5d1a497c7c1ca", "score": "0.58607966", "text": "function get_total_discount() {\n\t\tif (self::$discount_total) return jigoshop_price(self::$discount_total); else return false;\n\t}", "title": "" }, { "docid": "89a03e4ae8a7231b93588f0b3d79bf00", "score": "0.58406955", "text": "public function getDiscount();", "title": "" }, { "docid": "706a9531e89301a8c07d47b2359a6668", "score": "0.5820672", "text": "function percent_bar($percent)\n{\n if ($percent == '') $percent = 0;\n if ($percent < 0) $percent = 0;\n if ($percent > 100) $percent = 100;\n // #B4D6B4;\n $html = \"<div class='percentcontainer'>\";\n $html .= \"<div class='percentbar' style='width: {$percent}%;'> <span class='percentbarpercent'>{$percent}&#037;</span>\";\n $html .= \"</div></div>\\n\";\n return $html;\n}", "title": "" }, { "docid": "78401f09f0bd26cea017c8d0f505f378", "score": "0.57839555", "text": "public function getPriceWithDiscountAttribute($value){\n return number_format($value, 2, ',', '.');\n }", "title": "" }, { "docid": "14fdbe50bf4362fd996b644961bbd438", "score": "0.5769451", "text": "public function getDiscount()\n {\n return $this->discount;\n }", "title": "" }, { "docid": "14fdbe50bf4362fd996b644961bbd438", "score": "0.5769451", "text": "public function getDiscount()\n {\n return $this->discount;\n }", "title": "" }, { "docid": "14fdbe50bf4362fd996b644961bbd438", "score": "0.5769451", "text": "public function getDiscount()\n {\n return $this->discount;\n }", "title": "" }, { "docid": "14fdbe50bf4362fd996b644961bbd438", "score": "0.5769451", "text": "public function getDiscount()\n {\n return $this->discount;\n }", "title": "" }, { "docid": "14fdbe50bf4362fd996b644961bbd438", "score": "0.5769451", "text": "public function getDiscount()\n {\n return $this->discount;\n }", "title": "" }, { "docid": "cea2e14771002585ae9ab536c734b533", "score": "0.5762078", "text": "public function getDiscountAmount();", "title": "" }, { "docid": "37a1139a1f46b483bb8c3939119a9710", "score": "0.5742859", "text": "public static function nitro_template_single_rating() {\n\t\techo '<div class=\"fc jcsb aic mgb20\">';\n\t}", "title": "" }, { "docid": "66ab56819873d13559f27c7193d923c6", "score": "0.57427347", "text": "public function getDiscountOrChargePercentage()\n {\n return $this->discountOrChargePercentage;\n }", "title": "" }, { "docid": "e6c65016a4c1b871dfb9ed84d319f7bb", "score": "0.57413274", "text": "function get_htm_price($qty = 1, $method){\n\t\t$htm = '<div id=\"price\">%d</div>';\n\t\tprintf($htm, call_user_func_array(array($this, $method), [$qty]));\n }", "title": "" }, { "docid": "26932006b45a3864ff77ea4fe27fc2c3", "score": "0.5723108", "text": "public function get_combined_simple_cart_discount_label()\n {\n $label = RP_WCDPD_Settings::get('cart_discounts_combined_title');\n return !RightPress_Helper::is_empty($label) ? $label : __('Discount', 'rp_wcdpd');\n }", "title": "" }, { "docid": "ccf563fc093c4f69c1fd32d8156485a7", "score": "0.5721668", "text": "public function applyDiscount();", "title": "" }, { "docid": "4f79664476a455e905e569598074329d", "score": "0.57170767", "text": "public function totalNice() : string {\n return $this->formatBytes($this->total);\n }", "title": "" }, { "docid": "1a43eb1af033a23009a8e6cb21eab295", "score": "0.57133514", "text": "public function discountRate()\n {\n return $this->discount;\n }", "title": "" }, { "docid": "09f5ee4f7af493871cd6ced84ccc253a", "score": "0.5704388", "text": "private static function getPercentPaintedStr($itemDamage, $maxDamage){\r\n $damaged = self::getPercentDamaged($itemDamage, $maxDamage);\r\n if( ((string)$damaged) == '0' ) return('Brand New!');\r\n else if( ((string)$damaged) == '100') return('Empty!');\r\n else return(((string)$damaged).'% used');\r\n}", "title": "" }, { "docid": "72ece132ecc2bd861a450777ae33477a", "score": "0.56894404", "text": "public function getPercent(): float;", "title": "" }, { "docid": "7d866565c87d771d062c3601be0e6125", "score": "0.5681308", "text": "public function PercDiscount($discount){\n if ($discount == 3){\n \n $discount = 3;\n }\n\n elseif ($discount == 5){\n $discount = 5;\n }\n else{\n\n $discount = 10;\n }\n\n }", "title": "" }, { "docid": "4d96908db9d047af2c26c9162e963d0a", "score": "0.56596786", "text": "public function getPercent()\n {\n return $this->__get(\"percent\");\n }", "title": "" }, { "docid": "a51906f43672456681a764e17fd5c296", "score": "0.56492573", "text": "public function getRatingOutput() {\n\t\t$rating = $this->getRating();\n\t\tif ($rating !== false) $roundedRating = round($rating, 0);\n\t\telse $roundedRating = 0;\n\t\t$description = '';\n\t\tif ($this->ratings > 0) {\n\t\t\t$description = WCF::getLanguage()->get('wcf.business.vote.description', array('$votes' => StringUtil::formatNumeric($this->ratings), '$vote' => StringUtil::formatNumeric($rating)));\n\t\t}\n\t\t\n\t\treturn '<img src=\"'.StyleManager::getStyle()->getIconPath('rating'.$roundedRating.'.png').'\" alt=\"\" title=\"'.$description.'\" />';\n\t}", "title": "" }, { "docid": "25493195eb0b412a680c9aa97b616f19", "score": "0.5645535", "text": "public function getDiscountedPrice();", "title": "" }, { "docid": "cc5cda0346dbd633bd7c54f3e2678989", "score": "0.5641162", "text": "public function getPercent()\n {\n return $this->percent;\n }", "title": "" }, { "docid": "e2c88c15615d371595b7bed59cdb9d52", "score": "0.5640242", "text": "public function decimal_to_pence()\n {\n echo $this->redeem_value * 100;\n }", "title": "" }, { "docid": "6b74494c6a621bb115f082958945dc81", "score": "0.5635603", "text": "public function getDiscountAmount() {\n return $this->getOrder()->formatPrice(str_replace('-', '', $this->getOrder()->getData('discount_amount')));\n }", "title": "" }, { "docid": "911a21ac7b4113b81200df8d64122228", "score": "0.56268156", "text": "public function generate_badge_HTML( $badge_label ) {\n\n\t\treturn '<span class=\"better-custom-badge\">' . $badge_label /* escaped before */ . '</span>';\n\t}", "title": "" }, { "docid": "c360cd298e567e2c509d586f8c98864a", "score": "0.56202483", "text": "public function applyDiscount(float $discountPercent);", "title": "" }, { "docid": "58081cb21405a57afaaf2708d8d2a953", "score": "0.5612179", "text": "public function getCashbackAttribute()\n {\n if ($this->cashback_type == 'percentage') {\n return $this->cashback_value . '%';\n } else {\n return '<span class=\"currency\">' . $this->cashback_value . '</span>';\n }\n }", "title": "" }, { "docid": "f8a1e40a51e7255e52e8d2681e023f35", "score": "0.56097287", "text": "public function calculatePercent()\n {\n $sum1 = $this->halfS * self::GRADE_HALF_S + $this->S + $this->SS * self::GRADE_SS;\n\n return ($this->sumGrade() == 0) ? 0 : number_format(($sum1 / $this->sumGrade()) * 100, 2);\n }", "title": "" }, { "docid": "3be5b9ec0204a0340f3e0d5e0eb462c4", "score": "0.56063634", "text": "public function asHtml()\n {\n return $this->getTypeElementHtml() . __(\n 'Total shopping cart items quantity %1 %2:',\n $this->getOperatorElementHtml(),\n $this->getValueElementHtml()\n ) . $this->getRemoveLinkHtml();\n }", "title": "" }, { "docid": "277635971874f651d49fc40ad683d602", "score": "0.55947", "text": "function getDiscount($product)\n\t{\n\t\t// it would return discounted price as percentage\n\t\treturn 30;\n\t}", "title": "" }, { "docid": "8271fc9581c7d1a413205a4b73d4c7d4", "score": "0.5593492", "text": "function dokan_display_quantity_discount() {\n ?>\n <?php $total_discount_amount_for_lot = dokan_discount_for_lot_quantity(); ?>\n <?php if ( $total_discount_amount_for_lot > 0 ) : ?>\n <tr class=\"cart-discount\">\n <th><?php esc_html_e( 'Quantity Discount', 'dokan' ); ?></th>\n <td data-title=\"<?php esc_html_e( 'Quantity Discount', 'dokan' ); ?>\"><?php echo wc_price( $total_discount_amount_for_lot ); ?></td>\n </tr>\n <?php endif; ?>\n <?php $total_discount_amount_for_order = dokan_discount_for_minimum_order(); ?>\n <?php if ( $total_discount_amount_for_order > 0 ) : ?>\n <tr class=\"cart-discount\">\n <th><?php esc_html_e( 'Order Discount', 'dokan' ); ?></th>\n <td data-title=\"<?php esc_html_e( 'Order Discount', 'dokan' ); ?>\"><?php echo wc_price( $total_discount_amount_for_order ); ?></td>\n </tr>\n <?php endif; ?>\n <?php\n}", "title": "" }, { "docid": "e120ac9aaacb94a585a0d7ca5e768a6d", "score": "0.55769557", "text": "public function testBookCouponDiscount()\n {\n $total = $this->cart->getTotal(); // total is 10\n\n $this->cart->setCoupon('testCoupon'); // 15% discount is added\n\n $discountTotal = $this->cart->getCoupon() === null ? $total : $total - ($total * ($this->cart->getCouponDiscount() / 100));\n\n $this->assertEquals(8.50, $discountTotal, '', 0.2);\n }", "title": "" }, { "docid": "eeb8348aec4d8965c74e042b0f6e3008", "score": "0.5572025", "text": "function getPriceWithDiscount ($price){\n// and 5% for prices greater than or equal 1000\nif ($price<1000) {\n return $dis=$price*(10/100);\n}elseif($price>=1000){\n\n return $dis=$price*(5/100);\n}\n\n\n}", "title": "" }, { "docid": "dc8dd682ea199c0d354657817e5fd93c", "score": "0.55720186", "text": "public static function get_percent_browsable() {\n $title_count = self::get_title_count();\n $title_count_with_call_nums = self::get_title_count_with_call_nums();\n return self::percent($title_count_with_call_nums, $title_count);\n }", "title": "" }, { "docid": "55383d840543b637eca93dbe2dd276a4", "score": "0.5566477", "text": "private function getDiscount() {\n if($this->membership==\"platinum\") {\n return self::PLATINUM;\n } elseif($this->membership==\"gold\") {\n return self::GOLD;\n } elseif($this->membership==\"silver\") {\n return self::SILVER;\n } else {\n return 0;\n }\n\n }", "title": "" }, { "docid": "06a4a90aae4f7082d858ded4acbaf4d4", "score": "0.5563076", "text": "public function display_fancy_currency_notification() {\n\t\tglobal $wpsc_cart;\n\n\t\tif ( $wpsc_cart->selected_currency_code == ( $currency = wpsc_get_customer_meta( 'wpsc_base_currency_code' ) ) )\n\t\t\treturn;\n\t\t\n\t\t$output = \"<div id='wpsc_currency_notification'>\";\n\t\t$output .= '<p>' . __( 'By clicking Make Purchase, you will be redirected to the gateway, and the cart prices will be converted to the store\\'s local currency, ', 'wpsc' ) . ' ' . $currency . '</p>';\n\t\t$output .= '</div>';\n\t\t\n\t\techo $output;\n\t\t\n\t}", "title": "" }, { "docid": "d0939f2a091888ded5571f5a3de5cf8b", "score": "0.55478716", "text": "function df_oqi_discount($i):float {return df_oqi_amount($i);}", "title": "" }, { "docid": "01520b1ed33eb1fac1e7de617b8739a3", "score": "0.5546357", "text": "public function getPriceWithDiscount() {\n\t\t$discounted = 1;\n\t\tif ($this->supplier_discount !== null) {\n\t\t\t$discounted = 1 - $this->supplier_discount / 100;\n\t\t}\n\t\treturn $this->price * $discounted;\n\t}", "title": "" }, { "docid": "b1ed42af494d88a66a6b5611281b50fb", "score": "0.55453855", "text": "protected function displayCost()\n {\n echo \"Your full cost is {$this->fullCost}\";\n }", "title": "" }, { "docid": "9774db94741d341b3eec0ebf3d5bba03", "score": "0.5544891", "text": "public function getDiscount()\n {\n $discount = $this->_rootElement->find($this->discount);\n return $discount->isVisible() ? $this->escapeCurrency($discount->getText()) : null;\n }", "title": "" }, { "docid": "9ecd266cecf263f6d235a4f22f73b7f5", "score": "0.554139", "text": "static function percent($val, $div, $dp = 0, $showp = true, $brackets = true) {\n\t\t$dat = sprintf('%.'.$dp.'f',$val/$div*100);\n\t\tif($showp) { $dat .= '%'; }\n\t\tif($brackets) { $dat = '(' . $dat . ')'; }\n\t\treturn $dat;\n\t}", "title": "" }, { "docid": "d56fb685ec8e77863ba8dd2179c5b137", "score": "0.5522805", "text": "public function getRatingOutput() {\n\t\t$rating = $this->getRating();\n\t\tif ($rating !== false) $roundedRating = round($rating, 0);\n\t\telse $roundedRating = 0;\n\t\t$description = '';\n\t\tif ($this->ratings > 0) {\n\t\t\t$description = WCF::getLanguage()->get('wbb.board.vote.description', array('$votes' => StringUtil::formatNumeric($this->ratings), '$vote' => StringUtil::formatNumeric($rating)));\n\t\t}\n\t\t\n\t\treturn '<img src=\"'.StyleManager::getStyle()->getIconPath('rating'.$roundedRating.'.png').'\" alt=\"\" title=\"'.$description.'\" />';\n\t}", "title": "" }, { "docid": "8bdf8ba3611f216b81d974a41e41f6d5", "score": "0.55217606", "text": "public function showStatus()\n {\n switch ($this->status) {\n case 0:\n return '<span class=\"badge badge-secondary\">Not Posted</span>';\n case 1:\n return '<span class=\"badge badge-success\">Posted</span>';\n case 2:\n return '<span class=\"badge badge-danger\">Hidden</span>';\n }\n }", "title": "" }, { "docid": "790528abceb82abaf7ab752e5604d028", "score": "0.5516867", "text": "public function getDiscountDescription(){\n return $this->_getData(self::DISCOUNT_DESCRIPTION);\n }", "title": "" }, { "docid": "3c85731d834781bbb9befa031b0001d4", "score": "0.55122286", "text": "function showRating($level, $max)\n{\n\t$green = $level <= 50 ? $level : 50;\n\t$red = $level > 75 ? $level - 75 : 0;\n\t$yellow = $level > 50 && $level <= 75 ? $level - 50 : (25 * ($red > 0));\n\n\techo '<div class=\"progress\" style=\"width:100px\">';\n\techo '<div class=\"progress-bar progress-bar-success\" role=\"progressbar\" style=\"width:' . $green . '%\"></div>';\n\tif($yellow)\n\t{\n\t\techo '<div class=\"progress-bar progress-bar-warning\" role=\"progressbar\" style=\"width:' . $yellow . '%\"></div>';\n\t}\n\tif($red)\n\t{\n\t\techo '<div class=\"progress-bar progress-bar-danger\" role=\"progressbar\" style=\"width:' . $red . '%\"></div>';\n\t}\n\techo '</div>';\n}", "title": "" }, { "docid": "7b906f78b1cfc453f8e4f861c8eaab78", "score": "0.5492846", "text": "public function getAlcoholpercentage()\n {\n $this->beerInfo();\n echo $this->beerInfo();\n echo \"<br>\";\n return $this->alcoholpercentage;\n }", "title": "" }, { "docid": "a1e2905506d6609c317c3d7c7e1b6b61", "score": "0.548153", "text": "function print_rate($cur_str, $rate, $discount=0, $unit='', $format=FORMAT_ALWAYS) {\n $new_rate = apply_discount($rate, $discount);\n $rate = $new_rate < $rate ? \n html_strike(formatFloat($rate, $format, $cur_str)).' '.formatFloat($new_rate, $format, $cur_str) : \n formatFloat($rate, $format, $cur_str);\n return $unit ? \"$rate / \".phrase($unit) : $rate;\n}", "title": "" }, { "docid": "c55a6c253e02120688fe5d30f105f6b6", "score": "0.54767346", "text": "public function statusBadgeHtml()\n {\n switch ($this->status) {\n case 0:\n return array('html' => '<i class=\"far fa-clock\"></i>&nbsp;Pending', 'class' => 'orange white-text');\n break;\n case 1:\n return array('html' => '<i class=\"fas fa-check\"></i>&nbsp;Accepted', 'class' => 'green white-text');\n break;\n case 2:\n return array('html' => '<i class=\"fas fa-times\"></i>&nbsp;Rejected', 'class' => 'red white-text');\n break;\n case 3:\n return array('html' => '<i class=\"fas fa-times\"></i>&nbsp;Withdrawn', 'class' => 'grey white-text');\n break;\n case 4:\n return array('html' => 'Deleted', 'class' => 'grey white-text');\n break;\n default:\n return $this->status;\n }\n }", "title": "" }, { "docid": "e765e4f0ce4a1e3755000a4304c6fabe", "score": "0.5470485", "text": "public function getDiscountAmount(){\n return $this->_getData(self::DISCOUNT_AMOUNT);\n }", "title": "" }, { "docid": "dcdbb6b77190ff6490a128dbdcf25820", "score": "0.5465053", "text": "public function display_cart_calculation_message() {\n\n\t\t/** This filter is documented in woocommerce-avatax/woocommerce-avatax.php */\n\t\t$title = apply_filters( 'wc_avatax_tax_label', WC()->countries->tax_or_vat() );\n\n\t\techo '<tr class=\"tax-total\">';\n\t\t\techo '<th>' . esc_html( $title ) . '</th>';\n\t\t\techo '<td data-title=\"' . esc_attr( $title ) . '\">' . esc_html( $this->get_cart_calculation_message() ) . '</td>';\n\t\techo '</tr>';\n\t}", "title": "" }, { "docid": "e7eac8b84d86fac735bc85cc01b45e07", "score": "0.5459771", "text": "function tipCalculate($total, $percentage){ \n $total_tip = $total * ($percentage * 0.01);\n echo \"<p> If your bill is $total and you'd like to tip $percentage, you should tip $total_tip</p>\";\n}", "title": "" }, { "docid": "67a0d61cdc0def4f7d4c12924b596f17", "score": "0.5453934", "text": "function expbar() {\n\t\n\t\t// Get the counts\n\t\t$current\t= $this->rank['current_rank'];\n\t\t$next\t\t= $this->rank['next_rank'];\n\t\t$total\t\t= $this->posts['total'];\n\t\t\n\t\t// Calculate the exp\n\t\t$percent \t= ( $total - $current ) / ( $next - $current );\n\t\t$percent \t= round( $percent , 2) * 100;\n\t\t$to_ding \t= $next - $total;\n\t\t$tip \t\t= $to_ding . ' more until next rank!';\t\t\n\n\t\t// Display the bar\n\t\t$bar = '<div class=\"user-exp\" title=\"' . $tip . '\"><div class=\"user-expbar\" style=\"width:' . $percent . '%;\"></div></div>';\n\t\treturn $bar;\n\t}", "title": "" }, { "docid": "143c76da37ff84eff205a0b9203f98c4", "score": "0.5452277", "text": "public function calculateAppreciationCostAsPercentage();", "title": "" }, { "docid": "d37993f10d7d5a7a831c5f2ab3364455", "score": "0.5449154", "text": "function printTotalDiskBar($dup, $name = \"\", $dsu, $dts)\n{\n\tif ($dup < 95)\n\t{\n\t\t$progress = \"progress-bar\";\n\t}\n\telse if (($dup >= 95) && ($dup < 99))\n\t{\n\t\t$progress = \"progress-bar progress-bar-warning\";\n\t}\n\telse\n\t{\n\t\t$progress = \"progress-bar progress-bar-danger\";\n\t}\n\n\tif ($name != \"\") echo '<!-- ' . $name . ' -->';\n\techo '<div class=\"exolight\">';\n\t\tif ($name != \"\")\n\t\t\techo $name . \": \";\n\t\t\techo number_format($dup, 0) . \"%\";\n\t\techo '<div rel=\"tooltip\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"' . byteFormat(autoByteFormat($dsu)[0], autoByteFormat($dsu)[1], autoByteFormat($dsu)[2]) . ' free out of ' . byteFormat(autoByteFormat($dts)[0], autoByteFormat($dts)[1], autoByteFormat($dts)[2]) . '\" class=\"progress\">';\n\t\t\techo '<div class=\"'. $progress .'\" style=\"width: ' . $dup . '%\"></div>';\n\t\techo '</div>';\n\techo '</div>';\n}", "title": "" }, { "docid": "74cce9a966cf85bef2ab4cc66e6e7221", "score": "0.5441391", "text": "public function priceDisplay()\n {\n return Currency::withPrefix($this->prices(), null, 2);\n }", "title": "" }, { "docid": "29f0e9b6ff40453a4155f8a8b449c3d6", "score": "0.54259294", "text": "public function getPaidStatusHtml(): string\n {\n switch ($this->getStatus()) {\n case self::STATUS_PAID:\n {\n return '<span class=\"invoiceStatusLabel\"><span class=\"status green\"></span> ' . Craft::t('affiliate', 'Paid') . '</span>';\n }\n case self::STATUS_UNPAID:\n {\n return '<span class=\"invoiceStatusLabel\"><span class=\"status red\"></span> ' . Craft::t('affiliate', 'Unpaid') . '</span>';\n }\n }\n\n return '';\n }", "title": "" }, { "docid": "d33fbb9757bce01f8e73fb96c11a7bfc", "score": "0.5419668", "text": "function getDiscount($product_price, $discount)\n{\n $discounted_price = $product_price - ($product_price * ($discount / 100));\n return $discounted_price;\n}", "title": "" }, { "docid": "d42df16512bc109622f1edfac6c738f6", "score": "0.54146415", "text": "public function getDiscountAmount()\n {\n return $this->getData('discountAmount');\n }", "title": "" }, { "docid": "aa9a81dbd2cd1dda03cda013dbe5c633", "score": "0.54101306", "text": "function outputDBUsage($used,$quota) {\n\t$dp = sprintf('%.2f',($used / $quota) * 100);\n\t\n\t/* and we formate the size from bytes to MB, GB, etc. */\n\t$free = formatSize(($quota-$used));\n\t\n\t$output = '<div class=\"progress\">\n <div class=\"prgbar\" style=\"width: '.$dp.'%;\"></div>\n\t\t<div class=\"prgtext\">'.$dp.'% Used | '.$free.' Free</div>\n</div>';\n\treturn $output;\n}", "title": "" }, { "docid": "c965ba94ef8150f27ff55d33738dc496", "score": "0.5407466", "text": "public function getDiscount() {\n return $this->get(self::DISCOUNT);\n }", "title": "" }, { "docid": "7fb4f7fe9849cd48771c8f0df12fe581", "score": "0.5394238", "text": "public function getValue()\n {\n //first five are for whole kilograms\n //the sixth is for hundrets grams\n //000015 means 1,5kg\n //we dont care about grams currently\n return sprintf('%06d', $this->label->getContent()->getGrossWeight() * 10);\n }", "title": "" }, { "docid": "7b0c801d07d62b3303b3519c7d72787b", "score": "0.5381634", "text": "public function checkIfWon() {\n\t$html=\"\";\n\tif ($this->dice->getSum()>=100) {\n\t\t$html=\"Grattis! Du har fått 100 poäng på \" . $this->dice->getNumberOfRolls() . \" kast!\";\n\t\t$this->dice->setSavePoints(0);\n\t\t$this->dice->setNumberOfRolls(0);\n\t}\n\treturn $html;\n}", "title": "" }, { "docid": "67c5d6ebce5a3ce14be500300ef95483", "score": "0.53775245", "text": "public function adjust_single_tax_total_html( $html ) {\n\n\t\tif ( is_cart() && wc_avatax()->override_wc_rates() ) {\n\t\t\t$html = esc_html( $this->get_cart_calculation_message() );\n\t\t}\n\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "215097e78e742d8c8e7bee5f3601d77a", "score": "0.5371792", "text": "function showStats() {\n\tglobal $files;\n\t$width = array();\n\tforeach ($files['extensions'] as $ext => $number) {\n\t\t$ext = strtoupper($ext);\n\t\t$width[$ext] = ($number / array_sum($files['extensions'])) * 100;\n\t}\n\t$html = '<details><summary class=\"extensions-bar\" style=\"display:flex;\">';\n\t// Building summary extension bar\n\tforeach ($width as $ext => $percent) {\n\t\t$html .= '<span class=\"extensions-bar-color\" aria-label=\"' . $percent ;\n\t\t$html .= '%\" style=\"width:' . $percent . '%; background-color:#' . substr(crc32($ext), 2, 3);\n\t\t$html .= ';\" title=\"' . $ext . ' (' . round($percent, 1) . '%)\">';\n\t\t$html .= $ext . '</span>';\n\t}\n\t$html .= '</summary><ol class=\"extensions-list\">';\n\t// Building details\n\tforeach ($width as $ext => $percent) {\n\t\t$html .= '<li><strong>' . $ext . '</strong> ' . round($percent, 1) . '%</li>';\n\t}\n\t$html .= '</ol></details>';\n\treturn $html;\n}", "title": "" }, { "docid": "1f6a57e23ae38465249a9c9ce5de50b2", "score": "0.53678906", "text": "public function usage()\n {\n return $this->licences ? round($this->userCount() / $this->licences * 100) : 0;\n }", "title": "" }, { "docid": "31cd5e5c60ba672ecf767445905d7503", "score": "0.5364735", "text": "public function calculatePercentage()\n {\n \t$document\t= JFactory::getDocument();\n \t$vName\t\t= 'report';\n \t$vFormat\t= 'raw';\n \t\t\n \t$model = $this->getModel('Report');\n \t \t\t\n \tif ($view = $this->getView($vName, $vFormat)) {\n \t\t// Push document object into the view.\n \t\t$view->setModel($model);\n \t\t$view->assignRef('document', $document);\n \t\t$view->setLayout('percentage');\n \t\t$view->display(); \t\t\n \t} \t\n }", "title": "" }, { "docid": "63e69ef7c68dffd80ef5d072704bfff9", "score": "0.5362749", "text": "public function getDiscountedPricePerQuantity();", "title": "" }, { "docid": "c6a7b33dda7fee8b4509e9dace32f1b1", "score": "0.53618985", "text": "private function totalMinusPercentage()\n {\n $total = $this->parsed[1];\n $percentage = $this->parsed[3];\n\n $amount = $this->cleanupNumber($total);\n $percent = $this->cleanupNumber($percentage);\n $percent_min = ($percent / 100) * $amount;\n\n $result = $percent == 100 ? '0.00' : $this->formatNumber($amount - $percent_min);\n return $result;\n\n /*\n // This is a more advanced output with more information\n // not sure if necessary but i'll keep it for now\n // in case i add a setting to configure the output\n\n $saved = $amount - $this->cleanupNumber($result);\n $famount = $this->formatNumber($amount);\n $saved = $this->formatNumber($saved);\n\n $values = [];\n $values[$result] = $famount . ' - ' . $percentage . ' = ' . $result;\n $values[$saved] = sprintf($this->lang['percentage_of'], $percentage, $famount, $saved);\n return $values; */\n }", "title": "" }, { "docid": "34f8e8fc3eec0617f201acac2cab6dd3", "score": "0.53611726", "text": "function df_oqi_discount_b($i):float {return df_oqi_amount($i);}", "title": "" }, { "docid": "1ab4c4ef7cb5d1d376bcd06c467a6ab9", "score": "0.5350365", "text": "public function getStatusLabelAttribute()\n {\n $color = $this->is_active == 1 ? ' style=\"background-color: #337ab7\"' : '';\n\n return '<span class=\"badge\"'.$color.'>'.$this->status.'</span>';\n }", "title": "" }, { "docid": "7171afdf3b7912de8e09c1f562735e91", "score": "0.53487897", "text": "public function getPercent()\n {\n return round(($this->amount / $this->getStepsMaxValue()) * 100);\n }", "title": "" }, { "docid": "bb35d50d53f042d846306f9cbc55b4dd", "score": "0.5347203", "text": "public function getDiscount()\n {\n $value = $this->get(self::discount);\n return $value === null ? (double)$value : $value;\n }", "title": "" }, { "docid": "cd349bd82db371210ab43101941d7a03", "score": "0.53470486", "text": "public function getDiscountTotal() {\n return $this->get(self::DISCOUNT_TOTAL);\n }", "title": "" }, { "docid": "25e1a58aa177e35725b89c454e10051a", "score": "0.53451073", "text": "public function getBaseDiscountAmount();", "title": "" }, { "docid": "c9952f6b9b9e953da815a54d895a3cd4", "score": "0.5344873", "text": "function echo_price($to_echo){\n\tif ((int)(($to_echo % 100)/10) == 0) return (int)($to_echo/100).\".0\".(int)($to_echo % 10);\n\telse return (int)($to_echo/100).\".\".(int)($to_echo % 100);\n}", "title": "" }, { "docid": "d0b6b8c6ed3f8611aaaa66214976f999", "score": "0.53368884", "text": "public function discount(Cart $cart);", "title": "" }, { "docid": "2f268216ae21f26dee3ccf33d5ccf47b", "score": "0.5335087", "text": "public function getCommissionPercent() {\n return Mage::getStoreConfig('marketplace/marketplace/percentperproduct');\n }", "title": "" }, { "docid": "e074c545f31d007bc661825ae610dad2", "score": "0.5332266", "text": "public function print_stats() {\n\t\t\tif ($this->stats != null) {\n\t\t\t\techo $this->stats->percentage . \"%\";\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "731eed4f493e1a0ca9e1658371d2e3b9", "score": "0.53315145", "text": "public function getDiscount($price , $discount)\n {\n return ($price * $discount) / 100;\n }", "title": "" }, { "docid": "8f707899753db6a10dbafddb3134a13e", "score": "0.5330383", "text": "public function total()\n {\n return ($this->count * $this->cateringMenu->price) + ($this->delivery ? 150 : 0);\n }", "title": "" }, { "docid": "27be72337f49c97ec6c19918e26eea43", "score": "0.53292626", "text": "public function getPercentage() {\n return $this->attributes['percentage'];\n }", "title": "" }, { "docid": "5d6a033abb8edb35b74bf5724441048a", "score": "0.5323547", "text": "function theme_wc_cart_totals_coupon_html( $coupon ) {\n if ( is_string( $coupon ) ) {\n $coupon = new WC_Coupon( $coupon );\n }\n $discount_amount_html = '';\n if ( $amount = WC()->cart->get_coupon_discount_amount( $coupon->get_code(), WC()->cart->display_cart_ex_tax ) ) {\n $discount_amount_html = '-' . wc_price( $amount );\n } elseif ( $coupon->get_free_shipping() ) {\n $discount_amount_html = __( 'Free shipping coupon', 'woocommerce' );\n }\n $discount_amount_html = apply_filters( 'woocommerce_coupon_discount_amount_html', $discount_amount_html, $coupon );\n $coupon_html = $discount_amount_html . ' <a href=\"' . esc_url( add_query_arg( 'remove_coupon', urlencode( $coupon->get_code() ), defined( 'WOOCOMMERCE_CHECKOUT' ) ? wc_get_checkout_url() : wc_get_cart_url() ) ) . '\" class=\"woocommerce-remove-coupon\" data-coupon=\"' . esc_attr( $coupon->get_code() ) . '\">' . __( 'Remove', 'woocommerce' ) . '</a>';\n echo wp_kses( apply_filters( 'woocommerce_cart_totals_coupon_html', $coupon_html, $coupon, $discount_amount_html ), array_replace_recursive( wp_kses_allowed_html( 'post' ), array( 'a' => array( 'data-coupon' => true ) ) ) );\n}", "title": "" }, { "docid": "73b92a532ca24dd01c54291b44af83d5", "score": "0.5322437", "text": "public function GetTotal()\n\t {\n\t\t if($this->sum > 1)\n\t\t {\n\t\t \t return $this->sum;\n\t\t } else if($this->sum == 1) {\n\t\t\t return \"<b>Du slog en etta och din poäng återställs</b>\";\n\t\t\t InitRound();\n\t\t }\n\t }", "title": "" }, { "docid": "b98e4046df5586d027d97480489323ff", "score": "0.53207695", "text": "public function getDiscountAmount()\n {\n return $this->itemAmount * $this->get('discountAmount');\n }", "title": "" }, { "docid": "0c124539fac2e3fd65385d86a129928a", "score": "0.531701", "text": "function comment_percentage($percentage) \r\n{\r\n $percentage = round($percentage, 2);\r\n $padded_percentage = sprintf(\"%010d\", $percentage);\r\n $string = \"<!-- {$padded_percentage} --> {$percentage}% \";\r\n return $string;\r\n}", "title": "" }, { "docid": "b9383bf78dac6bf54b98907b6378c7e0", "score": "0.5314726", "text": "public function getOptiondiscount()\n {\n return $this->optiondiscount;\n }", "title": "" }, { "docid": "04a1b65237b4eea5b787bb860a6c720f", "score": "0.5313507", "text": "public function badge($content, $options);", "title": "" }, { "docid": "6b7a84b1f7b300d32525ff329c79ea7f", "score": "0.53011084", "text": "public function getFeePercent(): float\n {\n return 7.5;\n }", "title": "" }, { "docid": "fb9f3abbce6d71e9726b94368df7a7e9", "score": "0.52991235", "text": "public function getDiscount()\n {\n return array_sum($this->discounted);\n }", "title": "" }, { "docid": "1abd610b71e10bea18399b230b28391e", "score": "0.5283115", "text": "public function badge($count, $align = '')\n {\n return $this->page->tag('span', array(\n 'class' => !empty($align) ? 'badge pull-'.$align : 'badge',\n ), (is_numeric($count) && $count == 0) ? '' : $count);\n }", "title": "" } ]
bf13f0fedc4ab541224c6547d281c1b4
path parameter, example, /delete/1
[ { "docid": "6ac9d90624b1ae0da4db942cde77b461", "score": "0.0", "text": "function delete_booking_delete($booking_id)\n {\n $result = $this\n ->wm\n ->delete_booking($booking_id);\n\n if ($result === false)\n {\n $this->response(array(\n 'status' => 'failed'\n ));\n }\n else\n {\n $this->response(array(\n 'status' => 'success'\n ));\n }\n }", "title": "" } ]
[ { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.7696161", "text": "public function delete($path);", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.7696161", "text": "public function delete($path);", "title": "" }, { "docid": "fdddc05c9a7741dc3b4684566e67d9a5", "score": "0.7155671", "text": "function handler_delete($db, $path)\n{\n\t/**\n\t * http://www.phpliveregex.com/\n\t * http://www.phpliveregex.com/p/CZ\n\t */\n\tif (preg_match(\"/\\/delete\\/(?<id>[^\\/?]+)(?:\\/.*)*/i\", $path, $matches) === 1)\n\t{\n\t\t$streamid = $matches[\"id\"];\n\n\t\t$stream = new Stream($streamid, $db);\n\t\t$stream->load();\n\t\t$stream->delete();\n\n\t\treturn;\n\t}\n\n\theader('400 Missing a stream ID');\n}", "title": "" }, { "docid": "635fc9f7a4a2830c651a29b140289b35", "score": "0.7086004", "text": "public function delete(string $path): void;", "title": "" }, { "docid": "ac55d308179f3709225edcbad9bcf3c0", "score": "0.694843", "text": "public function delete($path)\n\t{\n\t\treturn $this->makeRequest(self::DELETE, $path);\n\t}", "title": "" }, { "docid": "de2e1455e2ba7ff7961b9320516330c7", "score": "0.6753986", "text": "function delete($path, $callback, $request = null)\n{\n return route('delete', $path, $callback, $request);\n}", "title": "" }, { "docid": "6a7aee0ff8e7deeea7a6ed86706b6c6a", "score": "0.66327673", "text": "public function remove($path)\n {\n }", "title": "" }, { "docid": "140cd5237955a1170968b7a8b98da74c", "score": "0.6564557", "text": "public function readAndDelete($path);", "title": "" }, { "docid": "64b2887250cfcf9a4f36537eec767fc0", "score": "0.65299946", "text": "public function delete($path, $params = null)\n\t{\n\t\treturn $this->call('DELETE', $path, $params);\n\t}", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.6524103", "text": "public function remove($path);", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.6524103", "text": "public function remove($path);", "title": "" }, { "docid": "a970f8d8474dd827040e3247c9a4bc79", "score": "0.6487119", "text": "public function delete($routePattern, $handler){ }", "title": "" }, { "docid": "a970f8d8474dd827040e3247c9a4bc79", "score": "0.6487119", "text": "public function delete($routePattern, $handler){ }", "title": "" }, { "docid": "91d0abfba516849f162315ad6f84221d", "score": "0.64869356", "text": "public static function deleteResource($path)\n {\n return self::connection()->delete(self::$api_path . $path);\n }", "title": "" }, { "docid": "6c9d2fc4fcca706290c635aba8878b5d", "score": "0.6473305", "text": "public function delete($path, $body = null, array $headers = array());", "title": "" }, { "docid": "6c9d2fc4fcca706290c635aba8878b5d", "score": "0.6473305", "text": "public function delete($path, $body = null, array $headers = array());", "title": "" }, { "docid": "a2c0ce6b8a4b330d876b96de281951a3", "score": "0.64037645", "text": "public function delete($path, $callback){\n $this->router->post($path, $callback);\n }", "title": "" }, { "docid": "82cecec99e981cdc0dafa4257d1449ff", "score": "0.6394848", "text": "public static function delete($path, $func = null)\n\t{\n\t\tif(page::method() === \"DELETE\")\n\t\t{\n\t\t\treturn self::match($path, $func);\n\t\t}\n\t}", "title": "" }, { "docid": "4d9c7b92305a30e2d5a7ab4ff2bddec9", "score": "0.6283324", "text": "public function delete( $id ){\n\n }", "title": "" }, { "docid": "4d9c7b92305a30e2d5a7ab4ff2bddec9", "score": "0.6283324", "text": "public function delete( $id ){\n\n }", "title": "" }, { "docid": "2473f49ac1ddd96cddc6b8703e305c9d", "score": "0.6283232", "text": "public function delete($path, $params) {\n $opts = array(\n CURLOPT_CUSTOMREQUEST => \"DELETE\",\n CURLOPT_HTTPHEADER => array(\n\t\t\t\t\"apikey: \" . $this->api_key,\n\t\t\t\t\"apitoken: \" . $this->api_token,\n\t\t\t)\n );\n \n $exec = $this->execute($path, $opts, $params);\n \n return $exec;\n }", "title": "" }, { "docid": "c76b5f3b6d66e8d2fe01056ede7c09a5", "score": "0.6277772", "text": "public function deleteObject($container, $path)\n\t{\n\t\t// Re-authenticate if necessary\n\t\t$this->authenticate();\n\n\t\t// Get the URL to list containers\n\t\t$url = $this->storageEndpoint . '/' . $this->apiVersion . '/' . $this->userContract . '/' . $container;\n\t\t$url = rtrim($url, '\\\\/');\n\t\t$path = ltrim($path, '\\\\/');\n\t\t$url .= '/' . $path;\n\n\t\t// Get the request object\n\t\t$request = new Request('DELETE', $url);\n\t\t$request->setHeader('X-Auth-Token', $this->token);\n\t\t//$request->setHeader('Accept', 'application/json');\n\n\t\t$request->getResponse();\n\t}", "title": "" }, { "docid": "a95b6507b011b816f6830a0142ba96b1", "score": "0.6260644", "text": "public function deleteAction()\n {\n $store = OntoWiki::getInstance()->erfurt->getStore();\n\n $response = $this->getResponse();\n $response->setHeader('Content-Type', 'text/plain');\n\n // fetch param\n $uriString = $this->_request->getParam('uri', '');\n\n if (get_magic_quotes_gpc()) {\n $uriString = stripslashes($uriString);\n }\n\n $res = 'All OK';\n if (!empty($uriString)) {\n try {\n //find the db\n $userdb = $this->getUserQueryDB(false);\n\n //TODO pass the \"where it is\" as param\n //delete from private\n if ($userdb != null)\n $userdb->deleteMatchingStatements($uriString, null, null);\n //delete from shared\n $this->_owApp->selectedModel->deleteMatchingStatements($uriString, null, null);\n } catch (Exception $e) {\n $res = $e;\n }\n } else {\n $res = 'need to pass uri';\n }\n\n $response->setBody($res);\n }", "title": "" }, { "docid": "9907d413bf0ef33db1e16cdf0c573390", "score": "0.6256141", "text": "public function delete($path, $content = null)\n {\n return $this->rawRequest(\"DELETE\", $path, $content);\n }", "title": "" }, { "docid": "1e606bf6e1b49852d40b2822f9625627", "score": "0.62412703", "text": "public function delete($id){\n\n }", "title": "" }, { "docid": "e2dee5894c105724aabf062db617c10b", "score": "0.62380886", "text": "public function delete($_id=null){\n\t \t\n \t}", "title": "" }, { "docid": "2ec683b37686b1fb04338641dea6b114", "score": "0.6216839", "text": "public function delete($path, $root = null)\n {\n\n if (is_null($root)) $root = $this->root;\n $response = $this->fetch(self::URL_API . 'fileops/delete', array('path' => $path, 'root' => $root));\n return json_decode($response['body']);\n\n }", "title": "" }, { "docid": "ba6e4e9f4ace2575f25f706528df71e2", "score": "0.6212455", "text": "abstract function actionDelete($id);", "title": "" }, { "docid": "62650ad3e70f08934e2062acb4a6ca70", "score": "0.6207085", "text": "public function delete()\n {\n //is to take string value for delete values\n parse_str(file_get_contents(\"php://input\"), $_DELETE);\n $id = $_DELETE['id'];\n //$this->db->query(\"DELETE FROM user WHERE id = $id\");\n\n //if no id is given by user then \n if ($id == null) {\n echo \"message: give id\";\n return;\n }\n //make query\n $query = \"DELETE FROM user WHERE id = $id\";\n //run query\n $this->queryFun($query);\n\n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.6194045", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.6194045", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.6194045", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.6194045", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.6194045", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.6194045", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.6194045", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.6194045", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.6194045", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.6194045", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.6194045", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.6194045", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.6194045", "text": "public function delete();", "title": "" }, { "docid": "7b79b9c0b1a8ebe68ce584146e9fdc11", "score": "0.618153", "text": "public function delete($value)\n {\n }", "title": "" }, { "docid": "e968f46fba114c537ae714ca11c62b7a", "score": "0.6176035", "text": "static function delete($router, $params)\n\t{\t\n\t\tif($params['url_name']){\n\t\t\t$result = Page::delete($params['url_name']);\n\t\t} else {\n\t\t\tdie(print_r($params['url_name']));\n\t\t}\n\n\t\t\\Lib\\Utils\\Redirect::go('/admin/cms');\n\t}", "title": "" }, { "docid": "b1b40d0fe77abfe94c3b25dd2123ce36", "score": "0.61749756", "text": "public function delete($url = '/', $options = []);", "title": "" }, { "docid": "f2ab486374f8661c18262c9f31ee278c", "score": "0.61669606", "text": "public function hdelete($id)\n {\n $post = Post::withTrashed()->where('id', $id)->first();\n //dd($post); //till here is fine \n $path =$post->photo;\n // dd($path.$path);\n //$path = str_replace('\\\\','/',public_path());\n //dd($path.$image);\n // if (File::exists($path)) {\n // return 'file found';\n // } else {\n // return 'file not found';\n // }\n if(File::exists($path)){\n unlink($path);\n }\n $post->forceDelete();\n return redirect()->back();\n }", "title": "" }, { "docid": "d58e1d520ad42f7e1545130debad3a7c", "score": "0.615082", "text": "function delete(){\r\n $this->model->delete_do($this->reg->url->get('id'));\r\n header('location:/content/index/');\r\n }", "title": "" }, { "docid": "4b6292276b52e38026a73f5b107ccbb3", "score": "0.6146455", "text": "public function testDeleteNamespacedRoute()\n {\n\n }", "title": "" }, { "docid": "849372e907a6f62f56e335a3e67083bc", "score": "0.61434233", "text": "public function delete(){}", "title": "" }, { "docid": "2577ed7a87ce7279a09479fb1442a976", "score": "0.6142124", "text": "public function delete($value);", "title": "" }, { "docid": "a1d3aada8db202b25fc97c1a11d511b3", "score": "0.611879", "text": "public function delete($path, $params) {\n $opts = array(\n CURLOPT_CUSTOMREQUEST => \"DELETE\"\n );\n \n $exec = $this->execute($path, $opts, $params);\n \n return $exec;\n }", "title": "" }, { "docid": "941923dc828b54527d5bfa6bb41f42d4", "score": "0.6118443", "text": "function delete($id)\n {\n }", "title": "" }, { "docid": "35e7c167539d30bfd338158a771bb3d2", "score": "0.61071706", "text": "function dh_existingresourceupload_form_submit_delete(&$form, &$form_state) {\n list($pg, $us, $id) = explode('/', $_GET['destination']);\n unset($_GET['destination']);\n drupal_goto(\n 'admin/content/dh_adminreg_feature/manage/' . $form_state['dh_adminreg_feature']->fid . '/delete',\n array('query' => array(\n 'destination' => $pg\n )\n ) \n );\n}", "title": "" }, { "docid": "48fb373ceeaa17a868800e3dba598c3d", "score": "0.61071664", "text": "public function delete($id)\n {\n\n }", "title": "" }, { "docid": "adcc0bc4feea232b09c13c376df9e094", "score": "0.60888296", "text": "public function DELETE(string $path, $handle) {\n\t\t$this->Handle(\"DELETE\", $path, $handle);\n\t}", "title": "" }, { "docid": "524f17fa52716215e9022678cec85db0", "score": "0.6085989", "text": "public static function delete($path){\n return \\Storage::delete($path);\n }", "title": "" }, { "docid": "96725f57a1070bfbd9b9ba1bc4a3544c", "score": "0.60821", "text": "public function actionDelete($id)\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "f01b9126493d233446178ed4c861785d", "score": "0.6059553", "text": "function index_delete() {\n $id = $this->delete('id');\n\t\t\n\t\t//Hapus Image Lama\n\t\t$queryimg = $this->db->query(\"SELECT image FROM `\".$this->db->dbprefix('heros').\"` WHERE id='\".$id.\"'\");\n\t\t$row = $queryimg->row();\n\t\t$picturepath=\"./assets/files/heros/\".$row->image;\t\n\t\tunlink($picturepath);\n\t\t\n $this->db->where('id', $id);\n $delete = $this->db->delete('heros');\n if ($delete) {\n $this->response(array('status' => 'success'), 201);\n } else {\n $this->response(array('status' => 'fail', 502));\n }\n }", "title": "" }, { "docid": "427ce9c15d9385e802fdc9434ee6aa12", "score": "0.6056361", "text": "function delete($id = -1)\n\t{\n\t}", "title": "" }, { "docid": "7fb59cacddc4a0977260c382eade0a62", "score": "0.6055213", "text": "abstract public function delete(array $query_params);", "title": "" }, { "docid": "a82cf0124342f74d51ea29ff37320dc8", "score": "0.6051278", "text": "public function delete() {\n\n if (!GravacaoDAO::delete(base64_decode($_GET['id']))) {\n $_SESSION['error'] = \"Ocorreu um erro ao deletar o gravacao!\";\n }else{\n $_SESSION['success'] = \"Gravacao removido com sucesso!\";\n }\n\n return call('gravacao', 'index');\n\n }", "title": "" }, { "docid": "2277a2327ae1ccbeae2620925625059f", "score": "0.603804", "text": "private function delete()\n {\n $id = (int) $_GET['id'];\n $db = \\Database::newDB();\n $t = $db->addTable('douglas_applicants');\n $t->addFieldConditional('id', $id);\n $row = $db->selectOneRow();\n if (is_file($row['resume'])) {\n unlink($row['resume']);\n }\n if (is_file($row['essay'])) {\n unlink($row['essay']);\n }\n $db->delete();\n }", "title": "" }, { "docid": "831bb084fa958076bd2dd9de6c172eab", "score": "0.6036366", "text": "public function delete ($id);", "title": "" }, { "docid": "974411b904c19a192a6e563a1f2e8b50", "score": "0.6028482", "text": "public function delete($id)\r\n {\r\n\r\n }", "title": "" }, { "docid": "bdae6b44a271e377ee808aa99afce92a", "score": "0.60236025", "text": "function delete($uri, $action)\n\t{\n\t\treturn app('router')->delete($uri, $action);\n\t}", "title": "" }, { "docid": "db442491b7e6714e77d16e45e0ee8131", "score": "0.60208356", "text": "public function delete($id) {\n }", "title": "" }, { "docid": "cc54f4f4c9f9494c9b876efd310468a8", "score": "0.6016811", "text": "function delete_img($path){\n $path = json_decode($path);\n // $path will be single path or path of array\n return File_helper::deleteFile($path);\n }", "title": "" }, { "docid": "21e1739a03ee3823ac17cbc7ffaa7d45", "score": "0.60155505", "text": "protected function actionDelete(){\n\t\t$fileName = $this->extractFileNameFromRequest();\n\t\t$version = $this->extractVersionFromRequest();\n\t\t$noSync = (bool) H::getRP('noSync');\n\n\t\t$response = $this->server->deleteFile($fileName, $version, $noSync);\n\t\t$this->sendResponse($response);\n\t}", "title": "" }, { "docid": "555cb8701c9a927faf5dac53a5f5d6f2", "score": "0.60058135", "text": "public function delete($id){\n\t}", "title": "" }, { "docid": "ce9df83fabc0a1bdb215a80b6ba8c4a0", "score": "0.6004431", "text": "public function delete(string $pathname, bool $clean = false): void;", "title": "" }, { "docid": "69f383ca841190f8ce7874553e0b23b4", "score": "0.6001803", "text": "function deleteUrlPatterns() {\n if (!$this->isAuthenticated())\n exit;\n\n $id = $this->input->post('element');\n echo json_encode($this->adminmodel->deleteUrlPattern($id));\n }", "title": "" }, { "docid": "153c70b8405a2c907a99f60f1fad9067", "score": "0.599417", "text": "public function testDeleteTaskPath()\n {\n $this->assertDatabaseHas('tasks', $this->task->toArray());\n\n $response = $this->delete('/tasks/' . $this->task->id);\n\n $response->assertStatus(302)\n ->assertRedirect('/tasks/');\n\n $this->assertDatabaseMissing('tasks', $this->task->toArray());\n }", "title": "" }, { "docid": "e1b7002871ea748584f7104c6be45f4f", "score": "0.5990363", "text": "public function delete($arg) {\n\t# only admin has access to deletion\n\tif($this->user->name != \"Supersecretuser\") {\n die(\"Sorry. We can't do that. <a href='/'>Home</a>\");\n }\n\n if(!$arg) {\n die(\"Sorry. We can't do that. <a href='/'>Home</a>\");\n }\n \n # Build the query to find this faucet's faucet_id\n $q = \"SELECT faucet_id\n \tFROM faucets\n \tWHERE serial_no = '\".$arg.\"'\";\n\n # Run the query\n $faucet_id = DB::instance(DB_NAME)->select_field($q);\n\n # delete row with this faucet_id\n DB::instance(DB_NAME)->delete('faucets', \"WHERE faucet_id = '$faucet_id'\");\n\n # reroute to gallery\n Router::redirect('/gallery/browse');\n}", "title": "" }, { "docid": "6d0f06ee04fce32614c0ec34dbea7a05", "score": "0.5983573", "text": "function dh_cwsserviceareamap_form_submit_delete(&$form, &$form_state) {\n list($pg, $us, $id) = explode('/', $_GET['destination']);\n unset($_GET['destination']);\n drupal_goto(\n 'admin/content/dh_adminreg_feature/manage/' . $form_state['dh_adminreg_feature']->fid . '/delete',\n array('query' => array(\n 'destination' => $pg\n )\n ) \n );\n}", "title": "" }, { "docid": "45b89f2c304f609379eec689eb08b76c", "score": "0.59829867", "text": "abstract public function delete($id);", "title": "" }, { "docid": "45b89f2c304f609379eec689eb08b76c", "score": "0.59829867", "text": "abstract public function delete($id);", "title": "" }, { "docid": "45b89f2c304f609379eec689eb08b76c", "score": "0.59829867", "text": "abstract public function delete($id);", "title": "" }, { "docid": "45b89f2c304f609379eec689eb08b76c", "score": "0.59829867", "text": "abstract public function delete($id);", "title": "" }, { "docid": "bb7188713c46bf2f7cd940fbc5ebcb3a", "score": "0.59819335", "text": "public function delete($pattern, $handler, $name = \"\")\n\t{\n\t\t$this->addRoute('DELETE', ...func_get_args());\n\t}", "title": "" }, { "docid": "b58f46d5ed1fb93105fd863b9f58f461", "score": "0.59792995", "text": "public function delete($id) {\r\n\r\n\t}", "title": "" }, { "docid": "b7781f45633a36c09c6a958fe3c8b771", "score": "0.59791505", "text": "public function delete()\n {\n $id = $this->uri->segment(2);\n if (empty($id))\n {\n show_404();\n }\n \n $links = $this->links_model->delete($id);\n \n redirect(''); \n }", "title": "" }, { "docid": "aafbf2abd81ce19601d455d7ab53fa69", "score": "0.597377", "text": "public function getDeleteUrl(){\n\t\t$url = sprintf(\"/%s/%s/%d/delete\",\n\t\t\t$_ENV['BASE_DIR'], static::$baseRoute, $this->id\n\t\t);\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "2e591c10396a1e5b38b6f7deed1de5e6", "score": "0.59726965", "text": "public abstract function delete($id = NULL);", "title": "" }, { "docid": "2d09e0fc8b1cc0866b9277c3bb72ab2c", "score": "0.5955505", "text": "function delete_single_img($path){\n // $path will be single path or path of array\n return File_helper::deleteFile($path);\n }", "title": "" }, { "docid": "7dc97e41391d56608bef4c06551d69d5", "score": "0.59536374", "text": "function fn_hdpi_delete($path, $name)\n{\n /** @var \\Tygh\\Backend\\Storage\\ABackend $storage */\n $storage = Storage::instance('images');\n\n $hdpi_name = fn_hdpi_form_name($name);\n $old_path = $path . $hdpi_name;\n if ($storage->isExist($old_path)) {\n $storage->delete($old_path);\n }\n}", "title": "" }, { "docid": "8578b83e9fdf2d3836bc7a8719139def", "score": "0.5953008", "text": "public function delete(string $slug);", "title": "" }, { "docid": "ece3b826ab208144f1b9944c2ae8fed0", "score": "0.5946758", "text": "function DELETE() {\r\n \r\n }", "title": "" }, { "docid": "b5ee50ee5f520e6646d7e47c944c300b", "score": "0.59412706", "text": "public function delete()\n {\n $this->validator->check_request($_POST);\n \n $id = (int) $_POST['id'];\n\n $this->model->delete($id);\n }", "title": "" }, { "docid": "ec3f51bb3c17a867b5b0bce058af143f", "score": "0.5940624", "text": "public function delete($id)\n {\n }", "title": "" }, { "docid": "ec3f51bb3c17a867b5b0bce058af143f", "score": "0.5940624", "text": "public function delete($id)\n {\n }", "title": "" }, { "docid": "ec3f51bb3c17a867b5b0bce058af143f", "score": "0.5940624", "text": "public function delete($id)\n {\n }", "title": "" }, { "docid": "ec3f51bb3c17a867b5b0bce058af143f", "score": "0.5940624", "text": "public function delete($id)\n {\n }", "title": "" }, { "docid": "ec3f51bb3c17a867b5b0bce058af143f", "score": "0.5940624", "text": "public function delete($id)\n {\n }", "title": "" }, { "docid": "ec3f51bb3c17a867b5b0bce058af143f", "score": "0.5940624", "text": "public function delete($id)\n {\n }", "title": "" }, { "docid": "ec3f51bb3c17a867b5b0bce058af143f", "score": "0.5940624", "text": "public function delete($id)\n {\n }", "title": "" }, { "docid": "ec3f51bb3c17a867b5b0bce058af143f", "score": "0.5940624", "text": "public function delete($id)\n {\n }", "title": "" }, { "docid": "ec3f51bb3c17a867b5b0bce058af143f", "score": "0.5940624", "text": "public function delete($id)\n {\n }", "title": "" }, { "docid": "ec3f51bb3c17a867b5b0bce058af143f", "score": "0.5940624", "text": "public function delete($id)\n {\n }", "title": "" }, { "docid": "ec3f51bb3c17a867b5b0bce058af143f", "score": "0.5940624", "text": "public function delete($id)\n {\n }", "title": "" }, { "docid": "ec3f51bb3c17a867b5b0bce058af143f", "score": "0.5940624", "text": "public function delete($id)\n {\n }", "title": "" }, { "docid": "ec3f51bb3c17a867b5b0bce058af143f", "score": "0.5940624", "text": "public function delete($id)\n {\n }", "title": "" } ]
f82dd67a6ee7376708131c0f547aab4a
Displays the login page
[ { "docid": "6d687a8cd0bdcaae2af39e88434621e7", "score": "0.0", "text": "public function actionLogin()\n\t{\n if(!Yii::app()->user->isGuest){\n $this->actionIndex();\n }else{\n $this->layout = '//layouts/login';\n\t\t$model=new LoginForm;\n\n\t\t// if it is ajax validation request\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='login-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\n\t\t// collect user input data\n\t\tif(isset($_POST['LoginForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['LoginForm'];\n\t\t\t// validate user input and redirect to the previous page if valid\n\t\t\tif($model->validate() && $model->login()){\n $usuario = Usuario::model()->findByPk(Yii::app()->user->id);\n Yii::app()->getSession()->add('email', $usuario->email);\n if(Yii::app()->getSession()->get('perfil')=='apoderado' || Yii::app()->getSession()->get('tipoFuncionario')=='Oficial'){\n $this->redirect(array('apoderado/selectCadete')); \n }else{\n $this->redirect(Yii::app()->user->returnUrl);\n }\n }\n\t\t}\n\t\t// display the login form\n\t\t$this->render('login',array('model'=>$model));\n }\n\t}", "title": "" } ]
[ { "docid": "a0a5b63e1847e242460808b28c5eef95", "score": "0.86108726", "text": "public function loginPage()\n {\n $this->render( 'auth.login' );\n }", "title": "" }, { "docid": "81df1594770083b90998e4f2c6d1c8d0", "score": "0.83102", "text": "public function login(){\n\t\t/// Send the user to this view\n\t\t$this->render(\"login\");\n\t}", "title": "" }, { "docid": "24798ed04cf38dd71e93ccded2c8a78c", "score": "0.8247861", "text": "public function loginAction()\n {\n $this->loggedInCheck();\n\n return $this->render('AuthModule:auth:login.html.php');\n }", "title": "" }, { "docid": "41862429f88dbc9620c532207b43719c", "score": "0.8243132", "text": "private function display_login() {\n library::show_debug(\"<!-- switch to login view -->\");\n require_once (dirname(__FILE__) . '/view/view_login.php');\n $this->_o_view = new view_login();\n echo $this->_o_view->create_output();\n }", "title": "" }, { "docid": "09d7280a84a982885e9d3b1ffd066f98", "score": "0.8231612", "text": "public function loginPage()\n {\n $this->view->show('loginView', 0);\n }", "title": "" }, { "docid": "9f934dd7a410e830123b21d50b38331a", "score": "0.82154757", "text": "public function loginAction() {\n $this->Layout->pagetitle = 'Login screen';\n $this->Layout->viewtitle = 'Please log in';\n\n $params = $this->DispatcherController->getPostParams();\n $this->Smarty->assign('login', $params['login']);\n $this->Smarty->display('authenticate/login.html');\n }", "title": "" }, { "docid": "5b1129d71675a6d64e844cbb83d45f18", "score": "0.82136047", "text": "function showLoginPage(){\n \tif(!isset($_SESSION['username'])){\n \t\t$this->render('registrationForm');\n \t\t}\n \telse{\n \t\t$this->render('index');\n \t}\n \n }", "title": "" }, { "docid": "e4ff5c1f1ed6fa722062b886c0172018", "score": "0.82071763", "text": "public function loginAction()\n {\n $this->view->render('front/auth', 'login');\n }", "title": "" }, { "docid": "0ecdaeb25badf94a8117263291d34270", "score": "0.81651026", "text": "public function showLogin()\n {\n if (App::loggedIn()) {\n App::redirect(URL_BASE.'community');\n }\n $app = App::getInstance();\n\n $app->template->addValidation();\n $app->template->addRequiredJs('pages/account/login.js');\n $app->template->render('Account/Login.php');\n }", "title": "" }, { "docid": "f59180b2ef417671acad9f441415340f", "score": "0.81184345", "text": "public function showLoginAction()\n {\n $user = App_User_Factory::getSessionUser();\n\n $this->view->isLoggedIn = $user !== null;\n if ($user !== null) {\n $this->view->login = $user->getLogin();\n } else {\n \t$form = new App_Form_Auth_Login($this->_helper->url('login', 'auth'));\n $this->view->form = $form;\n }\n }", "title": "" }, { "docid": "04fffa38ab75a5e7939bde0f4a129aa4", "score": "0.8118128", "text": "public function loginAction () \n\t{\n\t\t$this->di->theme->setTitle('Login');\n\n\t\t\n\t\t$form = new \\Anax\\Users\\CFormLogin($this->users);\n\t\t$form->setDI($this->di);\n\t\t$form->check(); \n\t\t\n\t\t\n // Prepare the page content\n\n $this->views->add('users/login', [\n 'content' => $form->getHTML(),\n ]);\n\t\t\n\t\t\n\n\t\t\t\n\t\t\n\t}", "title": "" }, { "docid": "d07fa71692f441aab6d006d227c98c80", "score": "0.8100596", "text": "public function login() {\n\n # Set up the view\n $this->template->content = View::instance('v_users_login');\n $this->template->title = \"Login\";\n\n # Set the body background color\n $this->template->middle_color = \"honeydew\";\n\n # Render the view\n echo $this->template;\n }", "title": "" }, { "docid": "fad1b5a49b9a0dbd7bda60ee54d9d342", "score": "0.8080422", "text": "public function login() {\n $view = new Login();\n $view->display();\n }", "title": "" }, { "docid": "88aa2c8b4fa45ba1040f68a39d40d4b4", "score": "0.80632365", "text": "public function Login()\n {\n $this->render(\"login/login\");\n }", "title": "" }, { "docid": "ea5e74474df5f0c3ccd42eb320e98edc", "score": "0.8050606", "text": "public function login() {\n \n $this->template->content = View::instance('v_users_login');\n echo $this->template;\n \n }", "title": "" }, { "docid": "081538e1dc6c377b7d3a9f171be6b388", "score": "0.8043096", "text": "static public function display()\n {\n if (getSession()->get(Constants::LOGGED_IN) == true)\n {\n getRoute()->redirect('/dashboard');\n }\n\n $params = array();\n $params['title'] = 'Login page';\n $params['rid_email'] = 'Email';\n $params['email'] = '';\n $params['rid_pwd'] = 'Password';\n $params['rid_login'] = 'Login';\n\n getTemplate()->display('login.php', $params);\n }", "title": "" }, { "docid": "fe1151ad598393de244ad50e9a8d5721", "score": "0.8038142", "text": "public function login() {\n \n \t$this->template->content = View::instance('v_users_login'); \t\n \techo $this->template; \n \n }", "title": "" }, { "docid": "6aeb59417cd20d27028dc3e13c000b45", "score": "0.8022675", "text": "public function login() {\r\n echo $this->setPageTitle(\"Login\");\r\n //renderiza a pagina e o layout\r\n $this->Render(\"home/login\", 'layoutHome');\r\n }", "title": "" }, { "docid": "f0271eee6e2daad677f470de7cf917a4", "score": "0.80058813", "text": "public function showLogin() {\n require VIEWS . 'Auth/login.php';\n }", "title": "" }, { "docid": "823977f5456ac07e2a69c4026d42215c", "score": "0.79772437", "text": "public function getShowLoginPage()\n {\n echo $this->blade->render(\"login\", [\n 'signer' => $this->signer,\n ]);\n }", "title": "" }, { "docid": "8634394960ecb20b8e1fe5bb230be4b6", "score": "0.7957847", "text": "public function login() {\n \n $this->app->setTitle(\"Connexion\");\n \n $this->render('utilisateurs/login');\n }", "title": "" }, { "docid": "01f9bc0a40de2d4ecc130b9d5073d878", "score": "0.79555976", "text": "public function Login() {\n $form = new CFormUserLogin($this);\n if($form->Check() === false) {\n $this->AddMessage('notice', 'Du måste fylla i användarnamn och lösenord.');\n $this->RedirectToController('login');\n }\n $content = new CMContent();\n $modules = new CMModules();\n $controllers = $modules->AvailableControllers();\n $this->views->SetTitle('Logga in')\n ->AddInclude(__DIR__ . '/login.tpl.php', array(\n 'login_form' => $form,\n 'allow_create_user' => CZelda::Instance()->config['create_new_users'],\n 'create_user_url' => $this->CreateUrl(null, 'create'),\n ), 'primary')\n ->AddInclude(__DIR__ . '/../sidebar.tpl.php', array('is_authenticated'=>$this->user['isAuthenticated'], \n 'user'=>$this->user,'controllers'=>$controllers,'contents'=>$content->ListAll(array('type'=>'post', 'order-by'=>'title', 'order-order'=>'DESC')),), 'sidebar');\n }", "title": "" }, { "docid": "8f1d1673f100f016310306c8a809acc6", "score": "0.7948673", "text": "public function login()\n\t{\n\t\tif( $this->uri->uri_string() == 'examples/login')\n\t\t\tshow_404();\n\n\t\tif( strtolower( $_SERVER['REQUEST_METHOD'] ) == 'post' )\n\t\t\t$this->require_min_level(1);\n\n\t\t$this->setup_login_form();\n\n\t\t$html = $this->load->view('examples/page_header', '', TRUE);\n\t\t$html .= $this->load->view('examples/login_form', '', TRUE);\n\t\t$html .= $this->load->view('examples/page_footer', '', TRUE);\n\n\t\techo $html;\n\t}", "title": "" }, { "docid": "5b98cac94b46cc470746f1c8bd2fab6a", "score": "0.7946626", "text": "public function login()\n\t{\n\t\t$this->layout = 'access';\n\t\t$this->User->getActive($this->Auth->user('username'));\n\t\tif (!$this->User->null()) {\n\t\t\t$this->loginUser($this->User);\n\t\t}\n//\t\t$this->set('available', $this->GApi->available());\n return $this->render('plugins/access/users/login.twig', [\n 'available' => $this->GApi->available()\n ]);\n\t}", "title": "" }, { "docid": "3d5f0b523767993bd691d87dcb25ff38", "score": "0.7932017", "text": "public function loginAction()\n {\n $pageTitle = 'Login';\n $loginLinkStyle = 'current_page';\n\n require_once __DIR__ . '/../templates/login.php';\n }", "title": "" }, { "docid": "9beddf97d9aeaae831822f39b5666197", "score": "0.7918858", "text": "public function userLoginDisplay(){\r\n \t \t$this->display();\r\n \t }", "title": "" }, { "docid": "ca1541117febcb4c7819d46b381bcfc1", "score": "0.79167193", "text": "public function displayFormLogin(): void\n {\n require_once('views/users/login.php');\n }", "title": "" }, { "docid": "d4a50dce20378ba7b9d6427172e0e865", "score": "0.79141146", "text": "public function loginAction()\n\t\t{\n\t\t\techo \"dsff\";\n\t\t\t\n\t\t\treturn $this->render('SalonSolutionSalonBundle:Page:login.html.twig');\n\t\t}", "title": "" }, { "docid": "8142e8257f4ea2579e695b834e7a6a4d", "score": "0.7905387", "text": "public function login()\n {\n $this -> load -> view('common/login');\n }", "title": "" }, { "docid": "d3eb4836194f21539ee1ec2c3f95f207", "score": "0.7902128", "text": "public function Login() {\n $form = new CFormUserLogin($this);\n if($form->Check() === false) {\n $this->AddMessage('notice', 'Du måste använda ditt användarnamn och lösenord');\n $this->RedirectToController('login');\n }\n $this->views->SetTitle('Login')\n ->AddInclude(__DIR__ . '/login.tpl.php', array(\n 'login_form' => $form,\n 'allow_create_user' => CLydia::Instance()->config['create_new_users'],\n 'create_user_url' => $this->CreateUrl(null, 'create'),\n ));\n }", "title": "" }, { "docid": "4f2047e3dd8d57a9cb8c8207edae5e7a", "score": "0.78975964", "text": "public function login() {\n $this->set('title_layout' , '会員ログイン | 訪問看護ステーションナビ' );\n $this->set('description_layout' , '訪問看護ステーションナビ' );\n $this->set('keywords_layout' , '訪問看護ステーションナビ' );\n $this->hkRender('login', 'portal');\n }", "title": "" }, { "docid": "e861afa476cbe5041c7a3f90bb878a6f", "score": "0.78478163", "text": "public function loginAction(): void\n {\n $vars = array();\n if ($_POST) {\n $login = new Login($_POST);\n $errors = $login->login($this->auth, $this->user);\n $vars = [\n 'errors' => $errors,\n 'data' => $this->auth->getData(),\n ];\n }\n $this->view->render('Login Page', $vars, true);\n }", "title": "" }, { "docid": "5d758b81c719960f509dfbffc8d71c42", "score": "0.7823104", "text": "public function login()\n {\n $this->show('user/login');\n }", "title": "" }, { "docid": "5a4be1f8157b6969373eeba95168ad04", "score": "0.7749184", "text": "public function login(){\n\t\t//incluimos un arreglo que contendra toda la informacion que se enviara al home\n\t\t$data['page_title'] = \"Login\";\n\t\t$data['page_userImg'] = \"usuario/default.png\";\n\t\t$data['page_userNomb'] = \"William Enrique\";\n\t\t$data['page_userRol'] = \"Administrador\";\n\t\t$data['page_name'] = \"login\";\n\t\t$data['page_functions'] = \"functionLogin.js\";\n\t\t$this->views->getViews($this, \"login\", $data);\n\t}", "title": "" }, { "docid": "486e566c633ccaefa35ecdbe8cd7c0f2", "score": "0.7743722", "text": "public function actionLogin()\n {\n\t\t//var_dump(1);die();\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n \n return $this->render('signin.twig', []);\n }", "title": "" }, { "docid": "d36e7d552b92ae0218b03badb6471deb", "score": "0.77253276", "text": "function display_login() {\n\t\t// Get language vars\n\t\tglobal $MESSAGE;\n\t\tglobal $MENU;\n\t\tglobal $TEXT;\n\t\t// If attemps more than allowed, warn the user\n\t\tif($this->get_session('ATTEMPS') > $this->max_attemps) {\n\t\t\t$this->warn();\n\t\t}\n\t\t// Show the login form\n\t\tif($this->frontend != true) {\n\t\t\trequire_once(WB_PATH.'/include/phplib/template.inc');\n\t\t\t// $template = new Template($this->template_dir);\n\t\t\t// Setup template object, parse vars to it, then parse it\n\t\t\t$template = new Template(dirname($this->correct_theme_source($this->template_file)));\n\t\t\t$template->set_file('page', $this->template_file);\n\t\t\t$template->set_block('page', 'mainBlock', 'main');\n\t\t\tif($this->remember_me_option != true) {\n\t\t\t\t$template->set_var('DISPLAY_REMEMBER_ME', 'display: none;');\n\t\t\t} else {\n\t\t\t\t$template->set_var('DISPLAY_REMEMBER_ME', '');\n\t\t\t}\n\t\t\t$template->set_var(array(\n\t\t\t\t'ACTION_URL' => $this->login_url,\n\t\t\t\t'ATTEMPS' => $this->get_session('ATTEMPS'),\n\t\t\t\t'USERNAME' => $this->username,\n\t\t\t\t'USERNAME_FIELDNAME' => $this->username_fieldname,\n\t\t\t\t'PASSWORD_FIELDNAME' => $this->password_fieldname,\n\t\t\t\t'MESSAGE' => $this->message,\n\t\t\t\t'INTERFACE_DIR_URL' => ADMIN_URL.'/interface',\n\t\t\t\t'MAX_USERNAME_LEN' => $this->max_username_len,\n\t\t\t\t'MAX_PASSWORD_LEN' => $this->max_password_len,\n\t\t\t\t'WB_URL' => WB_URL,\n\t\t\t\t'THEME_URL' => THEME_URL,\n\t\t\t\t'VERSION' => VERSION,\n\t\t\t\t'REVISION' => REVISION,\n\t\t\t\t'LANGUAGE' => strtolower(LANGUAGE),\n\t\t\t\t'FORGOTTEN_DETAILS_APP' => $this->forgotten_details_app,\n\t\t\t\t'TEXT_FORGOTTEN_DETAILS' => $TEXT['FORGOTTEN_DETAILS'],\n\t\t\t\t'TEXT_USERNAME' => $TEXT['USERNAME'],\n\t\t\t\t'TEXT_PASSWORD' => $TEXT['PASSWORD'],\n\t\t\t\t'TEXT_REMEMBER_ME' => $TEXT['REMEMBER_ME'],\n\t\t\t\t'TEXT_LOGIN' => $TEXT['LOGIN'],\n\t\t\t\t'TEXT_HOME' => $TEXT['HOME'],\n\t\t\t\t'PAGES_DIRECTORY' => PAGES_DIRECTORY,\n\t\t\t\t'SECTION_LOGIN' => $MENU['LOGIN']\n\t\t\t\t)\n\t\t\t);\n\t\t\tif(defined('DEFAULT_CHARSET')) {\n\t\t\t\t$charset=DEFAULT_CHARSET;\n\t\t\t} else {\n\t\t\t\t$charset='utf-8';\n\t\t\t}\n\t\t\t\n\t\t\t$template->set_var('CHARSET', $charset);\t\n\n\t\t\t$template->parse('main', 'mainBlock', false);\n\t\t\t$template->pparse('output', 'page');\n\t\t}\n\t}", "title": "" }, { "docid": "3041c61eb243deaa64186366fd0e97d0", "score": "0.7718385", "text": "protected function display() {\n\n $this->smarty->display('login.tpl');\n }", "title": "" }, { "docid": "7621e10af332715ed81d444ca74785ce", "score": "0.77152115", "text": "public function login ()\n\t{\n\t\treturn $this->view('auth/auth');\n\t}", "title": "" }, { "docid": "7e5ae9f58d2cac37681c14aee702c040", "score": "0.76860636", "text": "public function login() {\n $this->autoRender = FALSE;\n $error = NULL;\n if ($this->request->is('post')) {\n $login_res = $this->UserCommon->processFormLogin();\n if (!isset($login_res['hasError']) || $login_res['hasError'] !== true) {\n $this->redirect(array('plugin' => 'User', 'controller' => 'Users', 'action' => 'index'));\n } else {\n $error = \"Error : \" . $login_res['err']['errCode'];\n }\n }\n $this->set('error', $error);\n $this->render('login');\n }", "title": "" }, { "docid": "818982e8033c374467dbe3a0c39b6409", "score": "0.7674383", "text": "public function login() {\n // Method should not be directly accessible\n if ($this->uri->uri_string() == 'examples/login')\n show_404();\n\n if (strtolower($_SERVER['REQUEST_METHOD']) == 'post')\n $this->require_min_level(1);\n\n $this->setup_login_form();\n\n $html = $this->load->view('site_header', '', TRUE);\n $html .= $this->load->view('site_navbar', '', TRUE);\n $html .= $this->load->view('examples/login_form', '', TRUE);\n $html .= $this->load->view('site_footer', '', TRUE);\n\n echo $html;\n }", "title": "" }, { "docid": "071ac5f74978d556b4ec9f3680c53bf1", "score": "0.76539224", "text": "public function doLogin()\n {\n return view('auth.login_page');\n }", "title": "" }, { "docid": "8490c561c4b096a730abbcb0c6317106", "score": "0.7646748", "text": "public function login()\n {\n // Method should not be directly accessible\n if( $this->uri->uri_string() == 'users/login')\n {\n show_404();\n }\n\n if( strtolower( $_SERVER['REQUEST_METHOD'] ) == 'post' )\n {\n $this->require_min_level(1);\n }\n \n $this->setup_login_form();\n \n $data = array(\n \t'content' => 'users/login_form',\n \t'title' => 'PMS Login'\n );\n \n $this->load->view('global/layout', $data);\n }", "title": "" }, { "docid": "c7453ab83928508fc15fb8031b0dfd07", "score": "0.76389647", "text": "public function index()\r\n\t{\r\n\t\t$this->data['page_body'] = 'login';\r\n $this->render();\r\n\t}", "title": "" }, { "docid": "e80bf33d950a1d678677dfedf867d355", "score": "0.76286894", "text": "public function login()\n {\n $this->output['register'] = isset($this->params['register']) ? $this->params['register'] : null;\n $this->output['error'] = isset($this->params['error']) ? $this->params['error'] : null;\n $this->output['templatePath'] = APP_PATH . 'templates/login.php';\n $this->output['login'] = true;\n }", "title": "" }, { "docid": "f36446ff9bc74d13490f00789aeb2bf9", "score": "0.76196855", "text": "public function login(){\n\n\t\tinclude \"views/login.php\";\n\n\t}", "title": "" }, { "docid": "6af39065e5a4f0f3a0a30a3761e8ccb6", "score": "0.7618902", "text": "public function login(){\r\n $this->returnView(null, 'login', true);\r\n }", "title": "" }, { "docid": "b285f7411f931d0308528ffec9e0f7c4", "score": "0.76137656", "text": "public function loginAction()\n\t{\n\t\t/* y nos entregara toda la lógica de seguridad\n\t\t * \n\t\t */\n\t\t$authenticationUtils = $this->get('security.authentication_utils');\n\n\t\t$error = $authenticationUtils->getLastAuthenticationError();\n\n\t\t$lastUsername = $authenticationUtils->getLastUsername();\n\n\t\treturn $this->render('FirstEngineBundle:Default:login.html.twig', array('last_username' => $lastUsername, 'error' => $error));\n\t}", "title": "" }, { "docid": "6ddc195e65a34ee3fb35d93cfe72adce", "score": "0.7605677", "text": "public function login(){\n add_breadcrumb(get_config_value('brand'), url('/'));\n add_breadcrumb(t('strings.login'), url('login'));\n \\Session::forget('gridsrun');\n $this->loadLayout(false,false,'users_login');\n $this->setPageTitle(t('strings.login'));\n }", "title": "" }, { "docid": "eb37b08c345d994082b6632640571210", "score": "0.7602999", "text": "function loginAction()\n {\n $pageTitle = 'Login';\n $loginLinkStyle = 'selected';\n require_once __DIR__ . '/../templates/login.php';\n }", "title": "" }, { "docid": "d64285ab834bde1537232138c57fd2f1", "score": "0.75924253", "text": "function ViewLogin(){\n\t \t\t\n\t\t# check for values in $_REQUEST\n\t\tif (isset($_POST['cmdLogin']) AND !empty($_REQUEST[\"accounType\"])) {\n\t\t\t\t\t\t\t\n\t\t\t# run login check function\n\t\t\t$this->CheckLogin();\t\n\t\n\t\t} else {\n\n\t\t\t# include default tpl for the login form\n include (\"../includes/tpl/HomeLoginForm.tpl\");\n\t\t}\n\t}", "title": "" }, { "docid": "47164b01c1cfb30fef25565c9d7d313d", "score": "0.7583558", "text": "public function index()\n\t{\n\t\t$data['title'] = 'Form Login';\n\t\t$this->load->view('template/header', $data);\n\t\t$this->load->view('auth/login', $data);\n\t\t$this->load->view('template/footer');\n\t}", "title": "" }, { "docid": "e387ba8ee089e56ebf66a8d2cbbff2e0", "score": "0.75739425", "text": "public function showLoginForm()\n {\n $this->seo()->setTitle(__('Login'));\n return $this->view('auth.login');\n }", "title": "" }, { "docid": "e387ba8ee089e56ebf66a8d2cbbff2e0", "score": "0.75739425", "text": "public function showLoginForm()\n {\n $this->seo()->setTitle(__('Login'));\n return $this->view('auth.login');\n }", "title": "" }, { "docid": "cd13098fe413a518fd03318c160d022e", "score": "0.75726825", "text": "public function login()\n\t{\n\t\t$data['title'] = 'Inloggen';\n\t\t$relLinks = Types::where('name', 'Link')->first();\n\t\t$data['links'] = Actions::where('type_id', $relLinks->id)->get();\n\t\t$this->blade->render('auth/login', $data);\n\t}", "title": "" }, { "docid": "f4fdd03c858a2d29c209aaeb2b5cb35f", "score": "0.75709236", "text": "public function login() {\n\n return $this->get_view('user-login', ['header'=>'Login']);\n }", "title": "" }, { "docid": "53c0e944964f70d28a3815ce7099d773", "score": "0.756878", "text": "public function loginPage(){\r\n if($this->isUserConnected()){\r\n header(\"Location: spaziopersonale.php\");\r\n }\r\n elseif($this->esisteView(views::login)){\r\n echo file_get_contents(views::login); \r\n }\r\n \r\n }", "title": "" }, { "docid": "784185009e2dcb74e0f04c316697b0cf", "score": "0.75637233", "text": "public function login()\n {\n //todo Data::__call() doesn't work on $this-data\n $data = $this->data;\n\n // Set view templates.\n $this->view->set('login_template', $data, ['login_form']);\n\n // Get page's specific data.\n $data('title', 'Авторизация');\n $data('login.form', $this->model->processForm());\n\n //todo Better session handling. Move to router, create method redirect; for generate too?\n if ($this->model->isLogged()) {\n $this->router->redirect('plan.index');\n }\n\n $this->view->render();\n }", "title": "" }, { "docid": "ad08eb94c11cccbd188f2e85d3cfc8b3", "score": "0.7543455", "text": "public function display_login()\n {\n $this->template['header'] = $this->load->view('templates/_part/master_public_header',$this->data,TRUE);\n $this->template['top_nav'] = '';\n $this->template['footer'] = '';//$this->load->view('templates/_part/master_public_footer',$this->data,TRUE);\n $this->template['page'] = $this->load->view($this->page, $this->data, TRUE);\n $this->load->view('public/main', $this->template);\n \n }", "title": "" }, { "docid": "38a04955590a8bca273f4d8bddde9187", "score": "0.7539116", "text": "public function login()\n\t{\n\t\t// Method should not be directly accessible\n\t\tif( $this->uri->uri_string() == 'examples/login')\n\t\t\tshow_404();\n\n\t\tif( strtolower( $_SERVER['REQUEST_METHOD'] ) == 'post' )\n\t\t\t$this->require_min_level(1);\n\n\t\t$this->setup_login_form();\n\n\t\t$html = $this->load->view('masy_login_view', '', TRUE);\n\n\t\techo $html;\n\t}", "title": "" }, { "docid": "ec2eb696c5250a878a0724afd59eb6e6", "score": "0.7533787", "text": "public function showLoginForm()\n {\n $config = [];\n\n return hcview('HCACL::auth.login', $config);\n }", "title": "" }, { "docid": "68a72873452cd5f8f4146b0812ddc93e", "score": "0.75183845", "text": "public function login()\n\t{\n\t\t$this->template->load('bootstrap', 'users/login', array(\n\t\t\t'title' => 'Login/Registration'\n\t\t));\n\t}", "title": "" }, { "docid": "bd78729309552b9b0fbac3ef7b3fd002", "score": "0.7518099", "text": "public function Login() {\n\n $this->show('user/login');\n }", "title": "" }, { "docid": "27435e22343993b21830dbfa8f11cde4", "score": "0.75178784", "text": "public function showLogin() {\n\t $username = $this->misc->getCreatedUsername();\n\t \n\t if (empty($username))\n\t $username = empty($_POST[self::$username]) ? '' : $_POST[self::$username];\n\n $ret = \"<h2>Laborationskod mn22nw (mh222zr) </h2>\n <a href='?register'>Registrera ny användare</a>\n <h3>Ej inloggad.</h3>\n \t <p>Tips: Användarnamnet är <em>Admin</em> och lösenordet är <em>Password</em></p>\";\n\n $ret .= \"<span class='alert'>\" . $this->misc->getAlert() . \"</span>\";\n\n $ret .= \"\n\t <form action='?\" . self::$getLogin . \"' method='post'>\n\t <input type='text' name='\". self::$username . \"' placeholder='Användarnamn' value='\".$username.\"' maxlength='30'>\n\t <input type='password' name='\". self::$password. \"' placeholder='Lösenord' value='' maxlength='30'>\n\t <label for='remember'>Håll mig inloggad:</label>\n\t <input type='checkbox' id='\". self::$rememberUser. \"' name='\". self::$rememberUser. \"'>\n\t <input type='submit' value='Logga in' name='\". self::$loginBtn. \"'>\n\t </form>\";\n\n return $ret;\n }", "title": "" }, { "docid": "9fd8f50dcd460841ab7db7cbc2d884e9", "score": "0.74994177", "text": "public function login()\n {\n $this->set( 'view', 'login' );\n\n return $this->show();\n }", "title": "" }, { "docid": "02c860fe5937f14ee20fa6550813de8f", "score": "0.7491784", "text": "public function index()\n {\n $messages = $this->getService('flash')->getMessages();\n $settings = $this->getService('config')->get();\n $fields = $settings['fields']['user'];\n $action = $settings['routes']['login'];\n $links = [\n 'reset' => $settings['routes']['password-reset']\n ];\n $data = compact('messages', 'fields', 'action', 'links');\n\n return $this->render('Common/login.twig', $data);\n }", "title": "" }, { "docid": "81a2d6b548bfcf070637929b8113a2ca", "score": "0.74883664", "text": "public function login()\n {\n $output = View::adminRender('frontLogin.loginlogin');\n return View::render('login.loginlogin', ['html' => $output]);\n\n // return View::render('login.login', ['html' => $output]);\n }", "title": "" }, { "docid": "70d1a248acae6c709a7b897ac5df1cd8", "score": "0.7483821", "text": "public function login()\n\t{\n\t\treturn view(\"header.Login\");\n\t}", "title": "" }, { "docid": "bb6c9ea44988a3ddeaad8ddf88cf551c", "score": "0.747455", "text": "private function showPageLoginForm()\n {\n\n $datadir = $this->datadir;\n $dbfile = $this->db_sqlite_path;\n\n\n echo '<div class=\"wrapper\">';\n echo '<div class=\"navbar-brand\">';\n echo 'Monitorr | Login';\n echo '</div>';\n echo '<br><br>';\n\n //Check if user database is present if not output error below:\n\n if(!is_file($dbfile)){\n\n echo \"<div id='loginerror'>\";\n echo \"<br>\";\n echo \"No user database detected.\";\n echo \"<br><br>\";\n echo \"<div>\";\n\n echo \"<div id='loginmessage'>\";\n\n echo 'Browse to <a href=\"../config/_installation/_register.php\">../config/_installation/_register.php</a> to create a user database and establish user credentials. ';\n\n echo \"</div>\";\n\n }\n\n else {\n\n echo '<form method=\"post\" action=\"\" name=\"loginform\">';\n echo '<label for=\"login_input_username\"> </label> ';\n echo '<br>';\n echo '<i class=\"fa fa-fw fa-user\"></i> <input id=\"login_input_username\" type=\"text\" placeholder=\"Username\" name=\"user_name\" autofocus required /> ';\n\n echo '<br>';\n\n echo '<label for=\"login_input_password\"> </label> ';\n echo '<br>';\n echo '<i class=\"fa fa-fw fa-key\"></i> <input id=\"login_input_password\" type=\"password\" placeholder=\"Password\" name=\"user_password\" required /> ';\n echo '<br><br>';\n\n echo \"<div id='loginerror'>\";\n\n if ($this->feedback) {\n echo $this->feedback . \"<br/> <br/>\"; // Failed login notification //\n }\n\n echo \"</div>\";\n\n echo '<div id=\"loginbtn\">';\n echo '<input type=\"submit\" class=\"btn btn-primary\" name=\"login\" value=\"Log in\" />';\n echo \"</div>\";\n\n echo '</form>';\n echo '<br><br>';\n\n echo \"<div id='reginfo'>\";\n echo \"User database Dir: \" . $datadir;\n echo '<br>';\n echo \"User database file: \" . $dbfile;\n echo \"</div>\";\n\n }\n\n echo '</div>';\n\n }", "title": "" }, { "docid": "b223ac1abed5e3c1f7e78070b688b947", "score": "0.7466195", "text": "function loginAction()\n\t {\n\t \t$this->view->loginStatus = $this->isLoggedIn();\n\t \t\n\t \tif($this->view->loginStatus == 1)\n\t \t//$this->view->memberStatus = $this->checkUserMembership();\n\t \t\n\t \t$this->view->pageTitle = \"\";\n\t }", "title": "" }, { "docid": "a48b223169d7b58301c9d3f7a989cd48", "score": "0.7465427", "text": "public function showLoginForm()\n {\n Page::setTitle('Sign in | Wealthman');\n Page::setDescription('Website authorization form');\n\n return view('auth.login');\n }", "title": "" }, { "docid": "be4b9841de4707f0db6468e6141bc3af", "score": "0.746241", "text": "public function login()\n\t{\n\t$error= \t\"\";\n\t$email= \t\"\";\n\t$username= \t\"\";\n\t$password_confirm = \"\";\n\n\t\tif (!empty($_POST)){\n\t\t\tforeach($_POST as $k => $v){\n\t\t\t\t//creer une variable $username$email $password etc...\n\t\t\t\t$$k = trim(strip_tags($v));\n\n\t\t\t}\n\t\t\tif (strlen($username) < 4){\n\t\t\t\t$error = \"pseudo trop court\";\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t}\n\t\t$dataToPassToTheView =[\n\t\t'error' => $error,\n\t\t\"username\" => $username,\n\t\t\"email\" => $email\n\t\t];\n\t\t\n\t$this->show('login/login',$dataToPassToTheView);\n\t$this->redirectToRoute('show_all_terms');\n\t\n\t}", "title": "" }, { "docid": "6522958d9a11eb99145ceca353030495", "score": "0.7459797", "text": "public function get_login_page()\n {\n return view('provider_interface.login');\n }", "title": "" }, { "docid": "1e0f65ce52f351e67d5e7509278c6257", "score": "0.744437", "text": "public function showLoginForm()\n\t{\n\t\treturn view('layouts.auth.login');\n\t}", "title": "" }, { "docid": "1527f950c89867d9f7fcf7a2bebbaf73", "score": "0.74402297", "text": "public function loginAction()\n {\n $authenticationUtils = $this->get('security.authentication_utils');\n\n // get the login error if there is one\n $error = $authenticationUtils->getLastAuthenticationError();\n\n // last username entered by the user\n $lastUsername = $authenticationUtils->getLastUsername();\n\n return $this->render(\n '@App/login.html.twig',\n array(\n // last username entered by the user\n 'last_username' => $lastUsername,\n 'error' => $error,\n )\n );\n }", "title": "" }, { "docid": "622ca36e0b67e5770db02adfc8f91453", "score": "0.74381095", "text": "public function login()\n\t{\n\t\t$this->load->view('Login');\n\t}", "title": "" }, { "docid": "fa009f1baa8b98f4153ec2f2b8b15c2f", "score": "0.74360794", "text": "public function showLogin()\n {\n return view('pages.standaard.inloggen');\n }", "title": "" }, { "docid": "0dd2bcbc5b28fe20805b78f02ae3731a", "score": "0.7435691", "text": "public function showLoginForm() \n\t{\n\t\treturn view('backends.login');\n\t}", "title": "" }, { "docid": "731417a60c08fe0c8c88747b234c0eaf", "score": "0.74351215", "text": "public function login(){\n //if( $this->uri->uri_string() == 'examples/login')\n // show_404();\n\n if( strtolower( $_SERVER['REQUEST_METHOD'] ) == 'post' )\n $this->require_min_level(1);\n\n $this->setup_login_form();\n //$html = $this->load->view('examples/page_header', '', TRUE);\n $this->load->view('view_login');\n //$html .= $this->load->view('examples/page_footer', '', TRUE);\n }", "title": "" }, { "docid": "7945600b859676f023010756a904939e", "score": "0.74297315", "text": "public function action_login()\n {\n // check logined\n if (\\Auth::check())\n {\n \\Response::redirect(\\Router::get('dashboard'));\n }\n $data['title'] = 'Đăng nhập';\n $data['cms_name'] = \\Config::get('cms_name');\n return \\View_Smarty::forge('backend/admin/login.tpl', $data);\n }", "title": "" }, { "docid": "eaf974a6466a461403d6f8df157adc46", "score": "0.74291754", "text": "public function LoginPage(){\n \\Hybrid_Auth::logoutAllProviders(); \n $loginPage = $this->getconfig('loginPage');\n if( $loginPage !== null){\n \\Hybrid_Auth::redirect($loginPage,\"PHP\");\n }\n //!TODO Make an alternative with loginList\n $this->loginList();\n exit;\n }", "title": "" }, { "docid": "d869f79dd8d4f5e572755b98f279ce8d", "score": "0.7423894", "text": "public function index() {\n\t\tif (isset($_GET['logout'])) {\n\t\t\tunset($_SESSION['user']);\n\t\t\tredirect('');\n\t\t}\n\t\tif (isset($this->user)) \n\t\t\t$this->redirect('');\n\t\t$this->tpl->display('login.phtml');\n\t}", "title": "" }, { "docid": "36ca97eff9a85a81ca2b8a1e34f9b02e", "score": "0.7420627", "text": "public function showLoginForm()\n\t{\n\t\treturn view('auth.login');\n\t}", "title": "" }, { "docid": "abc42b3c292a8973fddb83d6c58377d7", "score": "0.7417751", "text": "public function showLoginPage(){\n\t\treturn view('pages.login');\n\t}", "title": "" }, { "docid": "711d4a4f521fec19da58e51645de31a2", "score": "0.74174863", "text": "public function login()\n\t{\n\t\tif($this->session->userlogged_in == '*#loggedin@Yes')\n\t\t{\n\t\t\tredirect(base_url().'dashboard/');\n\t\t}\n\n\t\t$data = array(\n\t\t\t'page_title' => 'Login'\n\t\t);\n\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('login_view');\n\t\t$this->load->view('templates/footer');\n\t}", "title": "" }, { "docid": "e2ee999060e12596f17693693a7e10af", "score": "0.741623", "text": "public function actionLogin()\n {\n $this->layout = 'main2';\n\t\t\n\t\tif (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n\t\t\n }", "title": "" }, { "docid": "96338278208133e41be2ff878b3f353a", "score": "0.74159205", "text": "public function login() {\n $data['direction'] = $this->global_model->getSiteDirection();\n\t\t// set main content\n\t\tif (strpos($_SERVER['HTTP_REFERER'], 'book/confirm') !== false) {\n\t\t\t$refer = \"book/confirm\";\n\t\t}else{\n\t\t\t$refer = \"explore\";\n\t\t}\n\t\t$data['main_content'] = 'members/login';\n //set page title\n $data['pageTitle'] = $this->lang->line('home');\t\t\n\t\t\n $data['javascripts'] = $this->_javascript('home');\n $data['pageCssFiles'] = $this->_cssFiles('home');\n $data['javascriptCode'] = $this->_javascriptCode('home');\n\t\t// set form validations\n $this->form_validation->set_rules('username', 'أسم المستخدم', 'required|min_length[1]');\n $this->form_validation->set_rules('password', 'كلمة المرور', 'required|min_length[8]');\n\n\t\tif ($this->form_validation->run() == FALSE) {\n\t\t\t$this->load->view('includes/template', $data);\n\t\t}else{\n\t\t\t$this->members_model->validate();\n\t\t\t$refer = $_SERVER['HTTP_REFERER'];\n\t\t\tredirect($refer);\n\t\t}\n }", "title": "" }, { "docid": "9c10c0cd1a0c0364cb9953b8798820cc", "score": "0.7412525", "text": "public function action_login()\n {\n\t\tif (Auth::instance()->logged_in()) \n {\n $url = URL::base();\n\t\t $this->request->redirect($url);\n \n }\n\t\t\t\t\n \n \n\t\t// received the POST\n\t\tif (isset($_POST) AND Valid::not_empty($_POST)) \n {\n \n $post = $_POST;\n\t\t\t// validate the login form\n\t\t\t$post = Validation::factory($_POST)\n\t\t\t->rule('username', 'not_empty')\n\t\t\t->rule('password', 'not_empty')\n\t\t\t->rule('password', 'min_length', array(':value', 3));\n \n $remember = TRUE;\n \n\t\t\t// if the form is valid and the username and password matches\n\t\t\tif (Auth::instance()->login($_POST['username'],$_POST['password'],$remember))\n\t\t\t{\n $url = URL::base();\n $this->request->redirect($url);\n\t\t\t\n\t\t\t} \n else \n {\n // wrong username or password (but form is valid)\n\t\t\t\t$loginerrors =__('Wrong username or password');\n\t\t\t}\n\t\t\t// validation failed, collect the errors\n\t\t\t$errors = $post->errors('user');\n\t\t}\n // display\n \n \n\t\t$this->template->loginbox = View::factory('login')\n\t\t\t->bind('post', $post)\n\t\t\t->bind('errors', $errors)\n\t\t\t->bind('loginerrors', $loginerrors);\n \n \n }", "title": "" }, { "docid": "2802e57cea99ed8bed95428f023a1ccc", "score": "0.74096555", "text": "public static function showLogin(){\n\n \treturn View('auth.auth');\n\n }", "title": "" }, { "docid": "8c4eb7020b6c687fbb7b5dee1ed508c1", "score": "0.7397836", "text": "public function actionLogin()\n {\n if (!Yii::app()->user->isGuest)\n {\n $this->actionDashboard();\n exit;\n }\n $form = new LoginForm;\n if (isset($_POST['LoginForm']))\n {\n $form->attributes = $_POST['LoginForm'];\n if ($form->validate())\n {\n $this->redirect(Yii::app()->user->returnUrl);\n }\n }\n $this->pageTitle = Yii::t('app', 'Login');\n $this->renderPartial('login', array('form' => $form));\n }", "title": "" }, { "docid": "26c500baac50198fcd63f33dc7661501", "score": "0.73969984", "text": "protected function user_login_form() {\n $this->layout = 'layouts/one_column';\n\t\t$this->session->set_userdata('sess_redirect_url',current_app_url());\n\n\t\tredirect('/login/');\n //$this->render('modules/login/index');\n }", "title": "" }, { "docid": "3b2fd1e858e21440bc84dc1947e9eb88", "score": "0.7384788", "text": "public function loginAction()\n\t{\n\t\t$user = User::findByUsername($this->connection, $this->request->post('username'));\n\t\tif (!$user) {\n\t\t\t$this->view->set('loginError', 'Invalid Username or Password');\n\t\t\t$this->response->setContent($this->indexAction());\n\t\t\t$this->response->send();\n\t\t}\n\n\t\t$loggedIn = password_verify($this->request->post('password'), $user->getHashedPassword());\n\n\t\tif ($loggedIn) {\n\t\t\tsession_start();\n\t\t\t$_SESSION['username'] = $user->username;\n\t\t\t$this->response->addHeader('Location: /');\n\t\t\t$this->response->send();\n\t\t} else {\n\t\t\t$this->view->set('loginError', 'Invalid Username or Password');\n\t\t\t//$this->response->setContent($loginError = 'Invalid Username or Password');\n\t\t\t$this->response->setContent($this->indexAction());\n\t\t\t$this->response->send();\n\t\t}\n\t}", "title": "" }, { "docid": "9a9d6ea07ff3b915dc6ababc758975f2", "score": "0.7381256", "text": "public function showLogin()\n\t{\n\t\treturn View::make('login');\n\t}", "title": "" }, { "docid": "48c767ed4f490109fe3dff6305952091", "score": "0.73763", "text": "public function login()\n {\n\n // Check that the user is unauthenticated.\n Utility\\Auth::checkUnauthenticated();\n\n if (!Input::exists()) {\n // Show view Login page\n $this->View->assign('title', 'Login');\n if (isset($_SERVER['HTTP_X_PJAX'])) {\n echo $this->View->fetch('login.tpl');\n die();\n }\n $this->View->display('extends:layout.tpl|login.tpl');\n } else {\n // Process the login request, redirecting to the home controller if\n // successful or back to the login controller if not.\n if (Model\\UserLogin::login()) {\n Utility\\Redirect::to(APP_URL . $this->lang['prefix']);\n }\n\n Utility\\Redirect::to(APP_URL . $this->lang['prefix'] . '/' . 'login');\n }\n }", "title": "" }, { "docid": "84dd08a495a9299aeb9ef7fb7424dd92", "score": "0.73740494", "text": "public function login()\n\t{\n\t\treturn View::make('login_user_form');\n\t}", "title": "" }, { "docid": "8e462e8ce1a3f6cec54ed4e836fd5e4b", "score": "0.736834", "text": "public function login()\n\t{\n\t\treturn view(\"public/login\");\n\t}", "title": "" }, { "docid": "f59c8e1ad4c728212d4da7ff4b4116cb", "score": "0.7357218", "text": "public function showLogin()\n {\n if (Auth::check())\n {\n // Redirect to homepage\n return Redirect::to('');\n }\n\n // Show the login page\n return View::make('monitoring/login');\n }", "title": "" }, { "docid": "a3349c22551ef213cb1bb0047dcd2222", "score": "0.735471", "text": "public function loginAction()\n {\n if ($this->get('security.context')->isGranted('IS_AUTHENTICATED_REMEMBERED'))\n return $this->redirect($this->generateUrl('bodu_home_bo'));\n\n return $this->render('BoduSecurityBundle::login.html.twig');\n }", "title": "" }, { "docid": "dc4129a40d88b72270894a3be8110415", "score": "0.7354506", "text": "public function showLoginForm()\n {\n return view(self::LOGIN_VIEW);\n }", "title": "" }, { "docid": "32616da59867e9eaa63a5e5feecea3f7", "score": "0.73515594", "text": "public function showLoginForm()\n {\n return view('atomic::auth.login');\n }", "title": "" }, { "docid": "6b8947858516e7d4de667bca9920a00e", "score": "0.7346753", "text": "public function index()\n\t{\n\t\t$this->slice->view('admin.login.login');\n\t}", "title": "" }, { "docid": "3827ea0caa410559b41f81f63b8bb805", "score": "0.73413897", "text": "public function user_login()\n {\n return view(\"auth.login\");\n }", "title": "" } ]