query
stringlengths 9
43.3k
| document
stringlengths 17
1.17M
| metadata
dict | negatives
listlengths 0
30
| negative_scores
listlengths 0
30
| document_score
stringlengths 5
10
| document_rank
stringclasses 2
values |
---|---|---|---|---|---|---|
/ export dumpage param string $w: wrapper return void
|
function export($w=''){
if($this->vars['log'] == 1) $this->ilog();// log
if($w == ''){
$w = $this->skin->wrapper;
$mtime = explode (' ', microtime());// Run Time
//======= system =======
if($this->vars['area'] == 's'){
$this->page['onload'] = 'dc.menu(\'menu\');dc.notification();' . $this->page['onload'];
$w = str_replace("<%NAVTITLE%>", $this->page['navtitle'], $w);
$this->page['title'] = $this->vars['titleERP'].' - ' . $this->page['title'];
$w = str_replace("<%NAV%>", $this->user['userid']>0?$this->menu():'', $w);
//======= admin =======
}elseif($this->vars['area'] == 'a'){
$this->page['title'] = $this->vars['titleERP'].' - ' . $this->page['title'];
$w = str_replace("<%LEFT%>", $this->skin->navSide(), $w);
$w = str_replace("<%NAV%>", $this->skin->nav(ucfirst($this->user['username'])), $w);
//======= Web =======
}elseif($this->vars['area'] == 'w'){
}
$w=str_replace("<%ONLOAD%>", $this->iif($this->page['onload']=='', '', ' onload="'.$this->page['onload'].'"'), $w);
$w = str_replace("<%HEADER%>", $this->page['header'], $w);
$w = str_replace("<%TITLE%>", $this->page['title'], $w);
$w = str_replace("<%LOGO%>", $this->skin->logo(), $w);
$w = str_replace("<%MAIN%>", $this->page['main'], $w);
$w = str_replace("<%RUNTIME%>", number_format(($mtime[1] + $mtime[0] - (TIMENOW + MICRO_TIME))*1000, 2).'ms | ', $w);
$w = str_replace("<%COPYRIGHT%>", COPYRIGHT, $w);
}
header("HTTP/1.0 200 OK");
header("HTTP/1.1 200 OK");
header('Content-type:text/html;charset=utf-8');
print $w;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function getW() {}",
"function wtbString($str){\n echo $str;\n }",
"function DWT() { \n }",
"public function setW($dw) {}",
"public static function print_w($sth) {\n echo '<pre>';\n var_dump($sth);\n echo '</pre>';\n }",
"public function w($data, $return = false) {\n return $this->warn($data, $return);\n }",
"function bd($data) {\r\n bdump($data);\r\n}",
"function width($w) {\r\n\t\treturn ((!empty($w)) ? ' width:'.$w. 'px;' : '');\r\n\t}",
"function _w($original) {\n return Pontoon::wrap($original);\n}",
"function save_me($creation, $dwl_number, $dwl_last) {\n\n}",
"public function WriteCode($w)\n {\n if($w->type == 'audio')\n {\n return 'audio';\n }else{\n $w->SetState(new Video());\n return $w->WriteCode();\n }\n }",
"function wddx_serialize_vars($var_name, $_ = NULL)\n{\n}",
"function dd( $param ) {\r\n var_dump( $param );\r\n die();\r\n}",
"function dump($var, $name='') {\r\n}",
"public function setDW($dw) {}",
"public function helper()\n\t{\n\t\n\t}",
"function wfWikiTrustDebug($msg){\n WikiTrust::debug($msg, WIKITRUST_DEBUG);\n}",
"function post_param_string($name, $default = false, $html = false, $conv_from_wysiwyg = true)\n{\n $ret = __param($_POST, $name, $default, false, true);\n\n if ($ret === null) {\n return null;\n }\n if ((trim($ret) === '') && ($default !== '') && (array_key_exists('require__' . $name, $_POST)) && ($_POST['require__' . $name] !== '0')) {\n if ($default === null) {\n return null;\n }\n\n require_code('failure');\n improperly_filled_in_post($name);\n }\n\n if (($ret !== '') && (addon_installed('wordfilter'))) {\n if ($name !== 'password') {\n require_code('wordfilter');\n if ($ret !== $default) {\n $ret = check_wordfilter($ret, $name);\n }\n }\n }\n if ($ret !== null) {\n $ret = unixify_line_format($ret, null, $html);\n\n if (post_param_integer($name . '_download_associated_media', 0) === 1) {\n require_code('comcode_cleanup');\n download_associated_media($ret);\n }\n }\n\n if ((isset($_POST[$name . '__is_wysiwyg'])) && ($_POST[$name . '__is_wysiwyg'] === '1') && ($conv_from_wysiwyg)) {\n if (trim($ret) === '') {\n $ret = '';\n } else {\n require_code('comcode_from_html');\n $ret = trim(semihtml_to_comcode($ret));\n }\n } else {\n if ((substr($ret, 0, 10) === '[semihtml]') && (substr(trim($ret), -11) === '[/semihtml]')) {\n $_ret = trim($ret);\n $_ret = substr($_ret, 10, strlen($_ret) - 11 - 10);\n if (strpos($_ret, '[semihtml') === false) {\n require_code('comcode_from_html');\n $ret = trim(semihtml_to_comcode($_ret));\n }\n }\n }\n\n require_code('input_filter');\n\n if ((!$GLOBALS['BOOTSTRAPPING']) && (!$GLOBALS['MICRO_AJAX_BOOTUP'])) {\n if ($ret !== $default) {\n check_posted_field($name, $ret);\n }\n\n // Custom fields.xml filter system\n $ret = filter_form_field_default($name, $ret, true);\n }\n\n if ($ret === $default) {\n return $ret;\n }\n\n if (strpos($ret, ':') !== false && function_exists('cms_url_decode_post_process')) {\n $ret = cms_url_decode_post_process($ret);\n }\n\n check_input_field_string($name, $ret, true);\n\n return $ret;\n}",
"function dd ($par) {\n\tdie($par);\n}",
"function dump($arg){\r\n echo \"<pre>\";\r\n print_r($arg);\r\n echo \"</pre>\";\r\n}",
"static function h($stuff=''){\r\n self::ps();\r\n self::p($stuff);\r\n self::ps();\r\n }",
"public function dumpWfp(): string\n {\n return implode($this->snippets);\n }",
"public function getDW() {}",
"function __desctuct(){\r\n\t\t?>\r\n\r\n\t\t</body>\r\n\t\t</html>\r\n\t\t<?php\r\n\t}",
"public function ls_callback_mw($matches) {\n // Two situations envisioned:\n // <ls>X</ls> \n // <ls n=\"C\">Y</ls>\n $dbg=false;\n $ans = $matches[0];\n $ndata = $matches[1]; // empty string or ' n=\"C\"'\n $data0 = $matches[2];\n if (preg_match('|n=\"(.*?)\"|',$ndata,$matchesn)) {\n $n = $matchesn[1]; //\n $data1 = \"$n $data0\"; // controversial.\n $data = $data0; //10-07\n } else{\n $n = '';\n $data1 = $data0;\n $data = $data0;\n }\n dbgprint($dbg,\"\\nls_callback_mw BEGIN: ndata=$ndata, n=$n, data0=$data0, data1=$data1\\n\");\n if (!$this->dal_auth->status) {\n return $ans;\n }\n // --------------------------------------------------------------\n // Tooltip for name of work\n $fieldname = 'key';\n if ($this->dict == 'mw') {\n $fieldidx = 1;\n }else { // ap90, ben\n $fieldidx = 0;\n }\n $result = $this->ls_matchabbr($fieldname,$fieldidx,$data1);\n if (count($result) == 0) {\n dbgprint($dbg,\"ls_callback_mw : ls_matchabbr returns no results\\n\");\n return $ans; // failure\n }\n $rec = $result[0];\n if ($this->dict == 'mw') {\n list($cid,$code,$title,$type) = $rec;\n $text = \"$title ($type)\";\n dbgprint($dbg,\"ls_matchabbr returns: cid=$cid, code=$code, title=$title, type=$type\\n\");\n } else if (in_array($this->dict,array('ap90','ben','sch'))) {\n list($code,$text) = $rec;\n }\n # Add lshead, so as to be able to style\n // for mw and ap90, codecap = code\n dbgprint($dbg,\"ls_callback_mw : n=$n, data=$data\\n\");\n $codecap = $code;\n $ncode = strlen($code); // use substr_replace in case $code has parens\n if ($n != '') {\n //$datanew = substr_replace($data,\"<lshead>$data</lshead>\",0);\n $datanew = $data;\n dbgprint($dbg,\"lshead 1: n=$n: datanew=$datanew\\n\");\n } else {\n $datanew = substr_replace($data,\"<lshead>$codecap</lshead>\",0,$ncode);\n dbgprint($dbg,\"lshead 2: n=$n: datanew=$datanew\\n\");\n }\n # be sure there is no xml in the text\n $text = preg_replace('/<.*?>/',' ',$text);\n # convert special characters to html entities\n # for instance, this handles cases when $tran has single (or double) quotes\n $tooltip = $this->htmlspecial($text);\n // --------------------------------------------------------------\n $href = null;\n //dbgprint(true,\"before ls_callback_mw_href, dict=\" . $this->dict . \"\\n\");\n if ($this->dict == 'mw') {\n $href = $this->ls_callback_mw_href($code,$n,$data);\n }else if ($this->dict == 'ap90') {\n $href = $this->ls_callback_ap90_href($code,$n,$data);\n }else if ($this->dict == 'sch') {\n $href = $this->ls_callback_sch_href($code,$n,$data);\n }\n dbgprint($dbg,\"ls_callback_mw: href=$href\\n\");\n if ($href != null) {\n // link\n //$ans = \"<gralink href='$href' n='$tooltip'><ls>$datanew</ls></gralink>\";\n dbgprint($dbg,\"ls_callback_mw: n=$n, datanew=$datanew\\n\");\n if ($n == '') {\n $datanew1 = preg_replace(\"|</lshead>(.*)$|\",'</lshead><span class=\"ls\">${1}</span>',$datanew);\n }else {\n $datanew1 = '<span class=\"ls\">' . $datanew . '</span>';\n }\n //dbgprint(true,\"datanew1=$datanew1\\n\");\n $ans = \"<gralink href='$href' n='$tooltip'><span class='ls'>$datanew1</span></gralink>\";\n }else {\n $ans = \"<ls n='$tooltip'><span class='dotunder ls'>$datanew</span></ls>\";\n }\n dbgprint($dbg,\"ls_callback_mw: ans=$ans\\n\");\n return $ans;\n}",
"function write()\n {\n }",
"function wlog($msg,$typ='INF',$level=1)\n{\n global $log;\n\n if ($level==0)\n {\n return; //no logging\n }\n else {\n $log->log($msg,$typ );\n }\n\n}",
"function WriteLog($s) {\r\n}",
"public function debugDumpParams()\n {\n }",
"function wbr ( $arguments = \"\" ) {\n $arguments = func_get_args();\n $rc = new ReflectionClass('twbr');\n return $rc->newInstanceArgs ( $arguments ) ;\n}"
] |
[
"0.5957143",
"0.5810008",
"0.5750894",
"0.562331",
"0.5597114",
"0.54812664",
"0.5429434",
"0.5347579",
"0.5302772",
"0.5297843",
"0.52611965",
"0.51306",
"0.5125467",
"0.5081438",
"0.50561476",
"0.5016091",
"0.4991051",
"0.4986212",
"0.49346185",
"0.49296224",
"0.49265495",
"0.49216032",
"0.49193925",
"0.4916218",
"0.4915231",
"0.4889441",
"0.48892528",
"0.4888512",
"0.4883181",
"0.4880197"
] |
0.6556237
|
0
|
/ iif param boolean e param string t param string f return string
|
function iif($e, $t, $f){
if($e){
return $t;
}else{
return $f;
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function getBooleanString($tf);",
"function t($f)\n\t{\n\tglobal $dyno;\n\tglobal $params;\n\tglobal $db;\n\t// return cleaned up POST data for $f or blank\n\tif (empty($_REQUEST[$f]))\n\t\treturn('');\n\telse\n\t\t{\n\n\t\t$dyno.=\"$f='\".$db->real_escape_string($_REQUEST[$f]).\"',\";\n\t\t$params.=$f.'='.r($_REQUEST[$f]).'&'; // for call to lender\n\t\treturn($_REQUEST[$f]);\n\t\t}\n\t}",
"function sif($condition,$true_value,$false_value)\n{\n\treturn $condition?$true_value:$false_value;\n}",
"function tf($string){\n\t$args=func_get_args();\n\t$r=CLang::translate(array_shift($args),'a');\n\treturn vsprintf($r!==false ? $r : $string,$args);\n}",
"function checkifstr($str){\r\n if (substr($str,0,2) === \"if\")\r\n {\r\n return $str;\r\n }else {\r\n return \"if,\" . $str;\r\n }\r\n }",
"function format_bool(mixed $input): string\n{\n return $input ? 'true' : 'false';\n}",
"public function what_is($fing)\n {\n if (is_null($fing)) {\n return 'null';\n }\n if (is_string($fing)) {\n return 'string='.$fing;\n }\n if (is_array($fing)) {\n $o = 'array{';\n foreach ($fing as $k => $v) {\n $o .= $k . '=' . $v . ', ';\n }\n $o .= '}';\n return $o;\n }\n return 'unk';\n }",
"function bool($val,$str=false){\n if(is_string($val)) {\n $val=strtolower($val);\n $val=$val && $val!=\"false\" && $val !=\"no\" && $val !=\"n\" && $val !=\"f\" && $val !=\"off\";\n }else $val=(bool)$val;\n return $str?($val?\"true\":\"false\"):$val;\n}",
"public function e($string, $functions = null);",
"function if_printf( $sprintf, ...$item ) {\n\techo if_sprintf( $sprintf, ...$item );\n}",
"function str_bool($string) {\n if (strtolower($string) === 'true') {\n return true;\n } elseif (strtolower($string) === 'false') {\n return false;\n }\n\n return $string;\n}",
"function bool2str($data)\n {\n TRUE === $data && $data = 'true';\n FALSE === $data && $data = 'false';\n return $data;\n }",
"function mIF(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$IF;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:84:3: ( 'if' ) \n // Tokenizer11.g:85:3: 'if' \n {\n $this->matchString(\"if\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }",
"function bool_str($value) {\r\n if ($value) {\r\n return 'yes'; \r\n } else {\r\n return 'no';\r\n }\r\n}",
"function output_logical($x,$format=10){\n\t//-NO or -N or -0 that format only when value=false, nothing for true\n\t//-YES or -yes or -Y or -1 would only show that format when value=true\n\t$x=read_logical($x);\n\tif(is_null($x))return NULL;\n\tswitch(true){\n\t\tcase $format==10:\n\t\t\treturn ($x?1:0);\n\t\tcase $format=='yn':\n\t\t\treturn ($x?'y':'n');\n\t\tcase $format=='YN':\n\t\t\treturn ($x?'Y':'N');\n\t\tcase $format=='yesno':\n\t\t\treturn ($x?'yes':'no');\n\t\tcase $format=='YESNO':\n\t\t\treturn ($x?'YES':'NO');\n\t\tcase $format=='tf':\n\t\t\treturn ($x?'t':'f');\n\t\tcase $format=='TF':\n\t\t\treturn ($x?'T':'F');\n\t\tcase $format=='truefalse':\n\t\t\treturn ($x?'true':'false');\n\t\tcase $format=='TRUEFALSE':\n\t\t\treturn ($x?'TRUE':'FALSE');\n\t\tcase preg_match('/^-(0|n|f)/i',$format):\n\t\t\treturn ($x?'':ltrim($format,'-')); \n\t\tcase preg_match('/^-(1|y|t)/i',$format):\n\t\t\treturn ($x?ltrim($format,'-'):''); \n\t\tdefault:\n\t\t\treturn ($x?$format:'');\n\t}\n}",
"public function ifStr($str);",
"function checkType($instruction)\n{ // INSTRUKCE S JEDNIM ARGUMENTEM\n if (count($instruction) == 2)\n {\n // kontrola int\n if (preg_match('/^int@.*$/', strtolower($instruction[1])))\n {\n if ((preg_match('/^int@[-+]?\\d+$/', ($instruction[1]))))\n {\n $first_arg = \"int\";\n paramsValidateOne($instruction, $first_arg);\n $instruction[1] = ltrim(($instruction[1]),\"int@\");\n echo \" <arg1 type=\\\"int\\\">{$instruction[1]}</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n // kontrola bool\n else if (preg_match('/^bool@.*$/', strtolower($instruction[1])))\n {\n if (preg_match('/^bool@true$/', ($instruction[1])))\n {\n $first_arg = \"bool_t\";\n paramsValidateOne($instruction, $first_arg);\n echo \" <arg1 type=\\\"bool\\\">true</arg1>\\n\";\n }\n else if (preg_match('/^bool@false$/', ($instruction[1])))\n {\n $first_arg = \"bool_f\";\n paramsValidateOne($instruction, $first_arg);\n echo \" <arg1 type=\\\"bool\\\">false</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n // kontrola string\n else if (preg_match('/^string@.*$/', strtolower($instruction[1])))\n {\n if (preg_match('/^^string@(([a-zA-Z\\x{0021}\\x{0022}\\x{0024}-\\x{005B}\\x{005D}-\\x{FFFF}])|(\\\\\\\\[0-9][0-9][0-9]))*$/', ($instruction[1])))\n {\n $first_arg = \"string\";\n paramsValidateOne($instruction, $first_arg);\n $instruction[1] = substr(($instruction[1]),7);\n $instruction[1] = preg_replace('/&/', \"&\", $instruction[1]);\n $instruction[1] = preg_replace('/</', \"<\", $instruction[1]);\n $instruction[1] = preg_replace('/>/', \">\", $instruction[1]);\n echo \" <arg1 type=\\\"string\\\">{$instruction[1]}</arg1>\\n\";\n }\n else if (preg_match('/^string@[^\\u0000-\\u007F]+/', ($instruction[1])))\n {\n $first_arg = \"string\";\n paramsValidateOne($instruction, $first_arg);\n echo \" <arg1 type=\\\"string\\\">{$instruction[1]}</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n // kontrola type\n else if (preg_match('/^(int|bool|string)$/', ($instruction[1])))\n {\n $first_arg = \"type\";\n paramsValidateOne($instruction, $first_arg);\n echo \" <arg1 type=\\\"type\\\">{$instruction[1]}</arg1>\\n\";\n }\n // kontrola var\n else if ((preg_match('/^(GF|LF|TF)@.*$/', strtoupper($instruction[1]))))\n {\n if (preg_match('/^(GF|LF|TF)@([[:alpha:]]|(_|-|\\$|&|\\?|!|%|\\*))([[:alnum:]]|(_|-|\\$|&|\\?|!|%|\\*))*/', ($instruction[1])))\n {\n $first_arg = \"var\";\n paramsValidateOne($instruction, $first_arg);\n $instruction[1] = preg_replace('/&/', \"&\", $instruction[1]);\n $instruction[1] = preg_replace('/</', \"<\", $instruction[1]);\n $instruction[1] = preg_replace('/>/', \">\", $instruction[1]);\n echo \" <arg1 type=\\\"var\\\">{$instruction[1]}</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n // kontrola nil\n else if (preg_match('/^nil@.*$/', strtolower($instruction[1])))\n {\n if (preg_match('/^nil@nil$/', ($instruction[1])))\n {\n $first_arg = \"nil\";\n paramsValidateOne($instruction, $first_arg);\n $instruction[1] = substr(($instruction[1]),4);\n echo \" <arg1 type=\\\"nil\\\">{$instruction[1]}</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^nil$/', strtolower($instruction[1])))\n {\n Err();\n }\n // ostatni ...@neco filtrovat jako chybu\n else if (preg_match('/[[:alnum:]]@.*$/', ($instruction[1])))\n {\n Err();\n }\n // kontrola label\n else if (preg_match('/^([[:alpha:]]|(_|-|\\$|&|%|\\*))((_|-|\\$|&|%|\\*)|[[:alnum:]])*/', ($instruction[1])))\n {\n $first_arg = \"label\";\n paramsValidateOne($instruction, $first_arg);\n echo \" <arg1 type=\\\"label\\\">{$instruction[1]}</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n\n else if (count($instruction) == 3)\n { // INSTRUKCE S DVEMA ARGUMENTY\n //////////////////////////////////// prvni argument instrukce /////////////////////////////////////////////////////\n if (preg_match('/^int@.*$/', strtolower($instruction[1])))\n {\n if ((preg_match('/^int@[-+]?\\d+$/', ($instruction[1]))))\n {\n $first_arg = \"int\";\n $instruction[1] = ltrim(($instruction[1]),\"int@\");\n echo \" <arg1 type=\\\"int\\\">{$instruction[1]}</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^bool@.*$/', strtolower($instruction[1])))\n {\n if (preg_match('/^bool@true$/', ($instruction[1])))\n {\n $first_arg = \"bool_t\";\n echo \" <arg1 type=\\\"bool\\\">true</arg1>\\n\";\n }\n else if (preg_match('/^bool@false$/', ($instruction[1])))\n {\n $first_arg = \"bool_f\";\n echo \" <arg1 type=\\\"bool\\\">false</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^string@.*$/', strtolower($instruction[1])))\n {\n if (preg_match('/^^string@(([a-zA-Z\\x{0021}\\x{0022}\\x{0024}-\\x{005B}\\x{005D}-\\x{FFFF}])|(\\\\\\\\[0-9][0-9][0-9]))*$/', ($instruction[1])))\n {\n $first_arg = \"string\";\n $instruction[1] = substr(($instruction[1]),7);\n $instruction[1] = preg_replace('/&/', \"&\", $instruction[1]);\n $instruction[1] = preg_replace('/</', \"<\", $instruction[1]);\n $instruction[1] = preg_replace('/>/', \">\", $instruction[1]);\n echo \" <arg1 type=\\\"string\\\">{$instruction[1]}</arg1>\\n\";\n }\n else if (preg_match('/^string@[^\\u0000-\\u007F]+/', ($instruction[1])))\n {\n $first_arg = \"string\";\n echo \" <arg1 type=\\\"string\\\">{$instruction[1]}</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^(int|bool|string)$/', ($instruction[1])))\n {\n $first_arg = \"type\";\n echo \" <arg1 type=\\\"type\\\">{$instruction[1]}</arg1>\\n\";\n }\n else if ((preg_match('/^(GF|LF|TF)@.*$/', strtoupper($instruction[1]))))\n {\n if (preg_match('/^(GF|LF|TF)@([[:alpha:]]|(_|-|\\$|&|\\?|!|%|\\*))([[:alnum:]]|(_|-|\\$|&|\\?|!|%|\\*))*/', ($instruction[1])))\n {\n $first_arg = \"var\";\n $instruction[1] = preg_replace('/&/', \"&\", $instruction[1]);\n $instruction[1] = preg_replace('/</', \"<\", $instruction[1]);\n $instruction[1] = preg_replace('/>/', \">\", $instruction[1]);\n echo \" <arg1 type=\\\"var\\\">{$instruction[1]}</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^nil@.*$/', strtolower($instruction[1])))\n {\n if (preg_match('/^nil@nil$/', ($instruction[1])))\n {\n $first_arg = \"nil\";\n $instruction[1] = substr(($instruction[1]),4);\n echo \" <arg1 type=\\\"nil\\\">{$instruction[1]}</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^nil$/', strtolower($instruction[1])))\n {\n Err();\n }\n else if (preg_match('/[[:alnum:]]@.*$/', ($instruction[1])))\n {\n Err();\n }\n else if (preg_match('/^([[:alpha:]]|(_|-|\\$|&|%|\\*))((_|-|\\$|&|%|\\*)|[[:alnum:]])*/', ($instruction[1])))\n {\n $first_arg = \"label\";\n echo \" <arg1 type=\\\"label\\\">{$instruction[1]}</arg1>\\n\";\n }\n else\n {\n Err();\n }\n //////////////////////////////////// druhy argument instrukce /////////////////////////////////////////////////////\n if (preg_match('/^int@.*$/', strtolower($instruction[2])))\n {\n if ((preg_match('/^int@[-+]?\\d+$/', ($instruction[2]))))\n {\n $sec_arg = \"int\";\n paramsValidateTwo($instruction, $first_arg, $sec_arg);\n $instruction[2] = ltrim(($instruction[2]),\"int@\");\n echo \" <arg2 type=\\\"int\\\">{$instruction[2]}</arg2>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^bool@.*$/', strtolower($instruction[2])))\n {\n if (preg_match('/^bool@true$/', ($instruction[2])))\n {\n $sec_arg = \"bool_t\";\n paramsValidateTwo($instruction, $first_arg, $sec_arg);\n echo \" <arg2 type=\\\"bool\\\">true</arg2>\\n\";\n }\n else if (preg_match('/^bool@false$/', ($instruction[2])))\n {\n $sec_arg = \"bool_f\";\n paramsValidateTwo($instruction, $first_arg, $sec_arg);\n echo \" <arg2 type=\\\"bool\\\">false</arg2>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^string@.*$/', strtolower($instruction[2])))\n {\n if (preg_match('/^^string@(([a-zA-Z\\x{0021}\\x{0022}\\x{0024}-\\x{005B}\\x{005D}-\\x{FFFF}])|(\\\\\\\\[0-9][0-9][0-9]))*$/', ($instruction[2])))\n {\n $sec_arg = \"string\";\n paramsValidateTwo($instruction, $first_arg, $sec_arg);\n $instruction[2] = substr(($instruction[2]),7);\n $instruction[2] = preg_replace('/&/', \"&\", $instruction[2]);\n $instruction[2] = preg_replace('/</', \"<\", $instruction[2]);\n $instruction[2] = preg_replace('/>/', \">\", $instruction[2]);\n echo \" <arg2 type=\\\"string\\\">{$instruction[2]}</arg2>\\n\";\n }\n else if (preg_match('/^string@[^\\u0000-\\u007F]+/', ($instruction[2])))\n {\n $sec_arg = \"string\";\n paramsValidateTwo($instruction, $first_arg, $sec_arg);\n echo \" <arg2 type=\\\"string\\\">{$instruction[2]}</arg2>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^(int|bool|string)$/', ($instruction[2])))\n {\n $sec_arg = \"type\";\n paramsValidateTwo($instruction, $first_arg, $sec_arg);\n echo \" <arg2 type=\\\"type\\\">{$instruction[2]}</arg2>\\n\";\n }\n else if ((preg_match('/^(GF|LF|TF)@.*$/', strtoupper($instruction[2]))))\n {\n if (preg_match('/^(GF|LF|TF)@([[:alpha:]]|(_|-|\\$|&|\\?|!|%|\\*))([[:alnum:]]|(_|-|\\$|&|\\?|!|%|\\*))*/', ($instruction[2])))\n {\n $sec_arg = \"var\";\n paramsValidateTwo($instruction, $first_arg, $sec_arg);\n $instruction[2] = preg_replace('/&/', \"&\", $instruction[2]);\n $instruction[2] = preg_replace('/</', \"<\", $instruction[2]);\n $instruction[2] = preg_replace('/>/', \">\", $instruction[2]);\n echo \" <arg2 type=\\\"var\\\">{$instruction[2]}</arg2>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^nil@.*$/', strtolower($instruction[2])))\n {\n if (preg_match('/^nil@nil$/', ($instruction[2])))\n {\n $sec_arg = \"nil\";\n paramsValidateTwo($instruction, $first_arg, $sec_arg);\n $instruction[2] = substr(($instruction[2]),4);\n echo \" <arg2 type=\\\"nil\\\">{$instruction[2]}</arg2>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^nil$/', strtolower($instruction[2])))\n {\n Err();\n }\n else if (preg_match('/[[:alnum:]]@.*$/', ($instruction[2])))\n {\n Err();\n }\n else if (preg_match('/^([[:alpha:]]|(_|-|\\$|&|%|\\*))((_|-|\\$|&|%|\\*)|[[:alnum:]])*/', ($instruction[2])))\n {\n $sec_arg = \"label\";\n paramsValidateTwo($instruction, $first_arg, $sec_arg);\n echo \" <arg2 type=\\\"label\\\">{$instruction[2]}</arg2>\\n\";\n }\n else\n {\n Err();\n }\n\n }\n\n else if (count($instruction) == 4)\n { // INSTRUKCE S TREMI ARGUMENTY\n //////////////////////////////////// prvni argument instrukce /////////////////////////////////////////////////////\n if (preg_match('/^int@.*$/', strtolower($instruction[1])))\n {\n if ((preg_match('/^int@[-+]?\\d+$/', ($instruction[1]))))\n {\n $first_arg = \"int\";\n $instruction[1] = ltrim(($instruction[1]),\"int@\");\n echo \" <arg1 type=\\\"int\\\">{$instruction[1]}</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^bool@.*$/', strtolower($instruction[1])))\n {\n if (preg_match('/^bool@true$/', ($instruction[1])))\n {\n $first_arg = \"bool_t\";\n echo \" <arg1 type=\\\"bool\\\">true</arg1>\\n\";\n }\n else if (preg_match('/^bool@false$/', ($instruction[1])))\n {\n $first_arg = \"bool_f\";\n echo \" <arg1 type=\\\"bool\\\">false</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^string@.*$/', strtolower($instruction[1])))\n {\n if (preg_match('/^^string@(([a-zA-Z\\x{0021}\\x{0022}\\x{0024}-\\x{005B}\\x{005D}-\\x{FFFF}])|(\\\\\\\\[0-9][0-9][0-9]))*$/', ($instruction[1])))\n {\n $first_arg = \"string\";\n $instruction[1] = substr(($instruction[1]),7);\n $instruction[1] = preg_replace('/&/', \"&\", $instruction[1]);\n $instruction[1] = preg_replace('/</', \"<\", $instruction[1]);\n $instruction[1] = preg_replace('/>/', \">\", $instruction[1]);\n echo \" <arg1 type=\\\"string\\\">{$instruction[1]}</arg1>\\n\";\n }\n else if (preg_match('/^string@[^\\u0000-\\u007F]+/', ($instruction[1])))\n {\n $first_arg = \"string\";\n echo \" <arg1 type=\\\"string\\\">{$instruction[1]}</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^(int|bool|string)$/', ($instruction[1])))\n {\n $first_arg = \"type\";\n echo \" <arg1 type=\\\"type\\\">{$instruction[1]}</arg1>\\n\";\n }\n else if ((preg_match('/^(GF|LF|TF)@.*$/', strtoupper($instruction[1]))))\n {\n if (preg_match('/^(GF|LF|TF)@([[:alpha:]]|(_|-|\\$|&|\\?|!|%|\\*))([[:alnum:]]|(_|-|\\$|&|\\?|!|%|\\*))*/', ($instruction[1])))\n {\n $first_arg = \"var\";\n $instruction[1] = preg_replace('/&/', \"&\", $instruction[1]);\n $instruction[1] = preg_replace('/</', \"<\", $instruction[1]);\n $instruction[1] = preg_replace('/>/', \">\", $instruction[1]);\n echo \" <arg1 type=\\\"var\\\">{$instruction[1]}</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^nil@.*$/', strtolower($instruction[1])))\n {\n if (preg_match('/^nil@nil$/', ($instruction[1])))\n {\n $first_arg = \"nil\";\n $instruction[1] = substr(($instruction[1]),4);\n echo \" <arg1 type=\\\"nil\\\">{$instruction[1]}</arg1>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^nil$/', strtolower($instruction[1])))\n {\n Err();\n }\n else if (preg_match('/[[:alnum:]]@.*$/', ($instruction[1])))\n {\n Err();\n }\n else if (preg_match('/^([[:alpha:]]|(_|-|\\$|&|%|\\*))((_|-|\\$|&|%|\\*)|[[:alnum:]])*/', ($instruction[1])))\n {\n $first_arg = \"label\";\n echo \" <arg1 type=\\\"label\\\">{$instruction[1]}</arg1>\\n\";\n }\n else\n {\n Err();\n }\n //////////////////////////////////// druhy argument instrukce /////////////////////////////////////////////////////\n if (preg_match('/^int@.*$/', strtolower($instruction[2])))\n {\n if ((preg_match('/^int@[-+]?\\d+$/', ($instruction[2]))))\n {\n $sec_arg = \"int\";\n $instruction[2] = ltrim(($instruction[2]),\"int@\");\n echo \" <arg2 type=\\\"int\\\">{$instruction[2]}</arg2>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^bool@.*$/', strtolower($instruction[2])))\n {\n if (preg_match('/^bool@true$/', ($instruction[2])))\n {\n $sec_arg = \"bool_t\";\n echo \" <arg2 type=\\\"bool\\\">true</arg2>\\n\";\n }\n else if (preg_match('/^bool@false$/', ($instruction[2])))\n {\n $sec_arg = \"bool_f\";\n echo \" <arg2 type=\\\"bool\\\">false</arg2>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^string@.*$/', strtolower($instruction[2])))\n {\n if (preg_match('/^^string@(([a-zA-Z\\x{0021}\\x{0022}\\x{0024}-\\x{005B}\\x{005D}-\\x{FFFF}])|(\\\\\\\\[0-9][0-9][0-9]))*$/', ($instruction[2])))\n {\n $sec_arg = \"string\";\n $instruction[2] = substr(($instruction[2]),7);\n $instruction[2] = preg_replace('/&/', \"&\", $instruction[2]);\n $instruction[2] = preg_replace('/</', \"<\", $instruction[2]);\n $instruction[2] = preg_replace('/>/', \">\", $instruction[2]);\n echo \" <arg2 type=\\\"string\\\">{$instruction[2]}</arg2>\\n\";\n }\n else if (preg_match('/^string@[^\\u0000-\\u007F]+/', ($instruction[2])))\n {\n $sec_arg = \"string\";\n echo \" <arg2 type=\\\"string\\\">{$instruction[2]}</arg2>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^(int|bool|string)$/', ($instruction[2])))\n {\n $sec_arg = \"type\";\n echo \" <arg2 type=\\\"type\\\">{$instruction[2]}</arg2>\\n\";\n }\n else if ((preg_match('/^(GF|LF|TF)@.*$/', strtoupper($instruction[2]))))\n {\n if (preg_match('/^(GF|LF|TF)@([[:alpha:]]|(_|-|\\$|&|\\?|!|%|\\*))([[:alnum:]]|(_|-|\\$|&|\\?|!|%|\\*))*/', ($instruction[2])))\n {\n $sec_arg = \"var\";\n $instruction[2] = preg_replace('/&/', \"&\", $instruction[2]);\n $instruction[2] = preg_replace('/</', \"<\", $instruction[2]);\n $instruction[2] = preg_replace('/>/', \">\", $instruction[2]);\n echo \" <arg2 type=\\\"var\\\">{$instruction[2]}</arg2>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^nil@.*$/', strtolower($instruction[2])))\n {\n if (preg_match('/^nil@nil$/', ($instruction[2])))\n {\n $sec_arg = \"nil\";\n $instruction[2] = substr(($instruction[2]),4);\n echo \" <arg2 type=\\\"nil\\\">{$instruction[2]}</arg2>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^nil$/', strtolower($instruction[2])))\n {\n Err();\n }\n else if (preg_match('/[[:alnum:]]@.*$/', ($instruction[2])))\n {\n Err();\n }\n else if (preg_match('/^([[:alpha:]]|(_|-|\\$|&|%|\\*))((_|-|\\$|&|%|\\*)|[[:alnum:]])*/', ($instruction[2])))\n {\n $sec_arg = \"label\";\n echo \" <arg2 type=\\\"label\\\">{$instruction[2]}</arg2>\\n\";\n }\n else\n {\n Err();\n }\n //////////////////////////////////// treti argument instrukce /////////////////////////////////////////////////////\n if (preg_match('/^int@.*$/', strtolower($instruction[3])))\n {\n if ((preg_match('/^int@[-+]?\\d+$/', ($instruction[3]))))\n {\n $th_arg = \"int\";\n paramsValidateThree($instruction, $first_arg, $sec_arg, $th_arg);\n $instruction[3] = ltrim(($instruction[3]),\"int@\");\n echo \" <arg3 type=\\\"int\\\">{$instruction[3]}</arg3>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^bool@.*$/', strtolower($instruction[3])))\n {\n if (preg_match('/^bool@true$/', ($instruction[3])))\n {\n $th_arg = \"bool_t\";\n paramsValidateThree($instruction, $first_arg, $sec_arg, $th_arg);\n echo \" <arg3 type=\\\"bool\\\">true</arg3>\\n\";\n }\n else if (preg_match('/^bool@false$/', ($instruction[3])))\n {\n $th_arg = \"bool_f\";\n paramsValidateThree($instruction, $first_arg, $sec_arg, $th_arg);\n echo \" <arg3 type=\\\"bool\\\">false</arg3>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^string@.*$/', strtolower($instruction[3])))\n {\n if (preg_match('/^^string@(([a-zA-Z\\x{0021}\\x{0022}\\x{0024}-\\x{005B}\\x{005D}-\\x{FFFF}])|(\\\\\\\\[0-9][0-9][0-9]))*$/', ($instruction[3])))\n {\n $th_arg = \"string\";\n paramsValidateThree($instruction, $first_arg, $sec_arg, $th_arg);\n $instruction[3] = substr(($instruction[3]),7);\n $instruction[3] = preg_replace('/&/', \"&\", $instruction[3]);\n $instruction[3] = preg_replace('/</', \"<\", $instruction[3]);\n $instruction[3] = preg_replace('/>/', \">\", $instruction[3]);\n echo \" <arg3 type=\\\"string\\\">{$instruction[3]}</arg3>\\n\";\n }\n else if (preg_match('/^string@[^\\u0000-\\u007F]+/', ($instruction[3])))\n {\n $th_arg = \"string\";\n paramsValidateThree($instruction, $first_arg, $sec_arg, $th_arg);\n echo \" <arg3 type=\\\"string\\\">{$instruction[3]}</arg3>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^(int|bool|string)$/', ($instruction[3])))\n {\n $th_arg = \"type\";\n paramsValidateThree($instruction, $first_arg, $sec_arg, $th_arg);\n echo \" <arg3 type=\\\"type\\\">{$instruction[3]}</arg3>\\n\";\n }\n else if ((preg_match('/^(GF|LF|TF)@.*$/', strtoupper($instruction[3]))))\n {\n if (preg_match('/^(GF|LF|TF)@([[:alpha:]]|(_|-|\\$|&|\\?|!|%|\\*))([[:alnum:]]|(_|-|\\$|&|\\?|!|%|\\*))*/', ($instruction[3])))\n {\n $th_arg = \"var\";\n paramsValidateThree($instruction, $first_arg, $sec_arg, $th_arg);\n $instruction[3] = preg_replace('/&/', \"&\", $instruction[3]);\n $instruction[3] = preg_replace('/</', \"<\", $instruction[3]);\n $instruction[3] = preg_replace('/>/', \">\", $instruction[3]);\n echo \" <arg3 type=\\\"var\\\">{$instruction[3]}</arg3>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^nil@.*$/', strtolower($instruction[3])))\n {\n if (preg_match('/^nil@nil$/', ($instruction[3])))\n {\n $th_arg = \"nil\";\n paramsValidateThree($instruction, $first_arg, $sec_arg, $th_arg);\n $instruction[3] = substr(($instruction[3]),4);\n echo \" <arg3 type=\\\"nil\\\">{$instruction[3]}</arg3>\\n\";\n }\n else\n {\n Err();\n }\n }\n else if (preg_match('/^nil$/', strtolower($instruction[3])))\n {\n Err();\n }\n else if (preg_match('/[[:alnum:]]@.*$/', ($instruction[3])))\n {\n Err();\n }\n else if (preg_match('/^([[:alpha:]]|(_|-|\\$|&|%|\\*))((_|-|\\$|&|%|\\*)|[[:alnum:]])*/', ($instruction[3])))\n {\n $th_arg = \"label\";\n paramsValidateThree($instruction, $first_arg, $sec_arg, $th_arg);\n echo \" <arg3 type=\\\"label\\\">{$instruction[3]}</arg3>\\n\";\n }\n else\n {\n Err();\n }\n\n }\n\n}",
"function _t($string,$alt=null){\n\t$r=CLang::translate($string,'a');\n\treturn $r!==false ? $r : ($alt===null?$string:$alt);\n}",
"function inf($ige,$ae) {\r\n $sug = ('(b|c|d|f|g|h|k|m|p|t|v)');\r\n $sugl = ('(b|c|d|f|g|h|j|k|l|m|n|p|r|s|t|v|z)');\r\n if (substr($ige, -2) === 'ik') {\r\n $ige = str_replace('ik','',$ige);\r\n }\r\n $inf = $ige . 'ni';\r\n if (preg_match('(vesz|visz|tesz|hisz)',$ige)) {\r\n $ige = str_replace('sz','n',$ige);\r\n $inf = $ige . 'ni';\r\n }\r\n if (substr($ige,-3) == 'ít') {\r\n $inf = $ige . $ae . 'ni';\r\n }\r\n if ((preg_match($sugl, substr($ige,-2,1))) && (preg_match($sug, substr($ige,-2,2)))) {\r\n $inf = $ige . $ae . 'ni';\r\n }\r\n if ($ige === 'esz') {\r\n $inf = 'enni';\r\n }\r\n return $inf;\r\n }",
"public function evaString($str)\n {\n $str = trim($str);\n // 条件式を取得\n $preg_str = \"/^(\\S+?)\\s*?([\\!\\<\\>\\+\\-\\*\\/%=]+)\\s*?(\\S+)$/\";\n if (preg_match($preg_str, $str, $tp)) {\n $i1 = $this->convertString($tp[1]);\n $is = $tp[2];\n $i2 = $this->convertString($tp[3]);\n //if(!is_null($i1) && !is_null($i2)){\n switch ((string)$is) {\n case '===':\n $item = ($i1 === $i2);\n break;\n case '==':\n $item = ($i1 == $i2);\n break;\n case '<=':\n $item = ($i1 <= $i2);\n break;\n case '>=':\n $item = ($i1 >= $i2);\n break;\n case '<':\n $item = ($i1 < $i2);\n break;\n case '>':\n $item = ($i1 > $i2);\n break;\n case '!=':\n $item = ($i1 != $i2);\n break;\n case '+':\n $item = ($i1 + $i2);\n break;\n case '-':\n $item = ($i1 - $i2);\n break;\n case '*':\n $item = ($i1 * $i2);\n break;\n case '/':\n $item = ($i1 / $i2);\n break;\n case '%':\n $item = ($i1 % $i2);\n break;\n }\n //}\n } else {\n $item = $this->convertString($str);\n }\n return $item;\n }",
"function es_filtro($vfiltro){\n $res = false;\n if ($vfiltro != SIN_FILTRO)\n $res = true;\n return $res;\n}",
"private function boolToString ($value)\n\t{\n\t\tif (true === $value)\n\t\t{\n\t\t\treturn 'true';\n\t\t}\n\t\telseif (false === $value)\n\t\t{\n\t\t\treturn 'false';\n\t\t}\n\t\telse \n\t\t{\n\t\t\treturn $value;\n\t\t}\n\t}",
"function b2s($b) {\n return ($b) ? 'TRUE' : 'FALSE';\n}",
"function testf1($aa)\n{\n return \"ee\";\n}",
"function smarty_function_boolean($params, &$smarty) {\n if($params['b']) {\n return \"<img src='/icons/tick.png' /><span class='hiddenSpan'>Ja</span>\";\n } else {\n return \"<img src='/icons/cross.png' /><span class='hiddenSpan'>Nee</span>\";\n }\n}",
"public function convertirCheckBox($param='') {\n if($param == \"on\" || $param == 1) {\n $param = \"S\";\n } else {\n $param = \"N\";\n }\n return $param;\n }",
"function bool2str($bool) {\n\tif($bool ===false)\n\t\treturn 'false';\n\telse\n\t\treturn 'true';\n}",
"function required_if($str, $parms)\n\t{\t\t\n\t\tlist($campo, $valor,$label,$desc)=explode(',',$parms,4);\t\t\n\t\tif($_POST[$campo]==$valor && $str=='')\n\t\t{\n\t\t\t$campo=str_replace(array('_id','_'),array('',' '),$campo);\n\t\t\t$this->CI->form_validation->set_message('required_if', \"El campo %s debe contener un dato si {$label} es '{$desc}'.\");\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}",
"function get_finput($iname, $itype, $idvalue =\"\", $idata = \"\")\n\t{\n\t\tif($itype == \"text\")\n\t\t{\n\t\t\treturn \"<input class=\\\"cell_floating\\\" type=\\\"text\\\" name=\\\"student[CUSTOM_$iname]\\\" size=\\\"30\\\" />\";\t\n\t\t}\n\t\tif($itype == \"select\")\n\t\t{\n\t\t\t$options = split(\"\\n\",$idata);\n\t\t\t$retvalue = \"\\n<select class=\\\"cell_floating\\\" name=\\\"student[CUSTOM_$iname]\\\" >\";\n\t\t\t$retvalue .= \"\\n\\t<option value=\\\"\\\">Any Value . . .</option>\";\n\t\t\tfor($o = 0; $o < count($options); $o++){\n\t\t\t\t$retvalue .= \"\\n\\t<option value=\\\"$options[$o]\\\">$options[$o]</option>\";\n\t\t\t}\n\t\t\t$retvalue .= \"\\n</selct>\";\n\t\t\treturn $retvalue;\n\t\t}\n\t}",
"public function flexformConditionStringDataProvider() {}"
] |
[
"0.6448789",
"0.61126",
"0.60300314",
"0.5999112",
"0.57668275",
"0.57495517",
"0.56358916",
"0.5511284",
"0.5496055",
"0.5475992",
"0.54441905",
"0.5404686",
"0.53882825",
"0.5369635",
"0.532928",
"0.5309852",
"0.530744",
"0.53060776",
"0.52651244",
"0.52558184",
"0.5253147",
"0.52105147",
"0.5188432",
"0.518454",
"0.5182247",
"0.51317173",
"0.5122281",
"0.5121704",
"0.51093155",
"0.50935024"
] |
0.7419
|
0
|
/ Function: write_header Purpose: Displays header information. Parameters: Input: date the date for display title the title info to be displayed this_page for write_jscript Output: none Author(s):
|
function write_header($date, $title, $this_page)
{
print("<head>\n");
print(" <link rel=\"icon\" href=\"./common_files/favicon.ico\" type=\"image/x-icon\">\n");
print(" <link rel=\"shortcut icon\" href=\"./common_files/favicon.ico\" type=\"image/x-icon\">\n");
print(" <meta http-equiv=\"Pragma\" content=\"no-cache\">\n");
print(" <meta http-equiv=\"refresh\" content=\"1800\">\n");
print(" <title>$title</title>\n");
print(" <link rel=stylesheet href=\"./common_files/arm-style.css\" type=\"text/css\">\n");
print(" <meta name=\"orgcode\" content=\"682\">\n");
print(" <meta name=\"rno\" content=\"Joseph.B.Gurman.1\">\n");
print(" <meta name=\"content-owner\" content=\"Peter.T.Gallagher.1\">\n");
print(" <meta name=\"webmaster\" content=\"Amy.E.Skowronek.1\">\n");
print(" <script type=\"text/javascript\" src=\"./common_files/slider.js\"></script>");
print(" <script type=\"text/javascript\" src=\"./common_files/warning.js\"></script>");
print(" <script type=\"text/javascript\" src=\"./function_table.js\"></script>");
print(" <script language=JavaScript1.2>\n");
write_jscript($date, $this_page);
print(" </script>\n");
print("<script language=\"JavaScript\" src=\"./common_files/global.js\"></script>\n");
//TODO: Clean calendar files and tests (DPS, 27/Aug/'10)
print(" <!-- link calendar files -->\n");
print("<script language=\"JavaScript\" src=\"./common_files/tigra_calendar/calendar_eu.js\"></script>\n");
print("<link rel=\"stylesheet\" href=\"./common_files/tigra_calendar/calendar.css\">\n");
//TODO: Clean transition table files (DPS, 31/Aug/'10)
//From: http://www.gayadesign.com/diy/animated-tabbed-content-with-jquery/
print("<script type=\"text/javascript\" src=\"./common_files/tabbedContent/js/jquery-1.4.4.min.js\"></script>\n");
print("<script type=\"text/javascript\" src=\"./common_files/tabbedContent/js/tabbedContent.js\"></script>\n");
print("<link href=\"./common_files/tabbedContent/css/tabbedContent.css\" rel=\"stylesheet\" type=\"text/css\" />\n");
//Inclusion of lightbox2
// print("<script type=\"text/javascript\" src=\"./common_files/js/prototype.js\"></script>\n");
// print("<script type=\"text/javascript\" src=\"./common_files/js/scriptaculous.js?load=effects,builder\"></script>\n");
// print("<script type=\"text/javascript\" src=\"./common_files/js/lightbox.js\"></script>\n");
// print("<link rel=\"stylesheet\" href=\"./common_files/css/lightbox.css\" type=\"text/css\" media=\"screen\" />\n");
//Inclusion of jq-lightbox
//print("<script type=\"text/javascript\" src=\"./common_files/js/jqlightbox/jquery.js\"></script>\n");
// print("<script type=\"text/javascript\" src=\"./common_files/js/jqlightbox/jquery.lightbox-0.5.js\"></script>\n");
// print("<link rel=\"stylesheet\" type=\"text/css\" href=\"./common_files/css/jqlightbox/jquery.lightbox-0.5.css\" media=\"screen\" />\n");
// print("<script type=\"text/javascript\">\n");
// print(" $(function test() {\n");
// print(" $('a[@rel*=lightbox]').lightBox();\n");
// print(" });\n");
// print("</script>\n");
//Incluiding ticker js
print("<link href=\"./ticker/jquery_news_ticker/styles/ticker-style.css\" rel=\"stylesheet\" type=\"text/css\" />\n");
print("<script src=\"./ticker/jquery_news_ticker/includes/jquery.ticker.js\" type=\"text/javascript\"></script>\n");
//Inclusion of colorbox (using same version of jquery.
print("<link rel=\"stylesheet\" type=\"text/css\" href=\"./common_files/js/colorbox/colorbox/colorbox.css\" media=\"screen\" />\n");
print("<script src=\"./common_files/js/colorbox/colorbox/jquery.colorbox.js\"></script>\n");
print("<script>\n");
print(" $(document).ready(function(){\n");
print(" $(\"a[rel='lightbox']\").colorbox({transition:\"fade\"});\n");
print(" });\n");
print("</script>\n");
include("globals.php");
//Inclusion of form
print(" <script type=\"text/javascript\">\n");
print(" //<![CDATA[ \n");
print(" $(window).load(function(){\n");
print(" $(function() {\n");
print(" $('input.cal_box').each(function() {\n");
print(" $.data(this, 'default', this.value);\n");
print(" }).css(\"color\",\"white\")\n");
print(" .focus(function() {\n");
print(" if (!$.data(this, 'edited')) {\n");
print(" this.value = \"YYYYMMDD ");
print($date);
print("\";\n");
print(" $(this).css(\"color\",\"white\");\n");
print(" }\n");
// print(" }).change(function() {\n");
// print(" $.data(this, 'edited', this.value != "");\n");
// print(" }).blur(function() {\n");
// print(" if (!$.data(this, 'edited')) {\n");
// print(" this.value = $.data(this, 'default');\n");
// print(" $(this).css(\"color\",\"gray\");\n");
// print(" }\n");
print(" });\n");
print(" });\n");
print(" });\n");
print(" //]]> \n");
print(" </script> \n");
//Inclusion of NOAA search form
//Inclusion of form
print(" <script type=\"text/javascript\">\n");
print(" //<![CDATA[ \n");
print(" $(window).load(function(){\n");
print(" $(function() {\n");
print(" $('input.ar_box').each(function() {\n");
print(" $.data(this, 'default', this.value);\n");
print(" }).css(\"color\",\"white\")\n");
print(" .focus(function() {\n");
print(" if (!$.data(this, 'edited')) {\n");
print(" this.value = \"00000\";\n");
print(" $(this).css(\"color\",\"white\");\n");
print(" }\n");
// print(" }).change(function() {\n");
// print(" $.data(this, 'edited', this.value != "");\n");
// print(" }).blur(function() {\n");
// print(" if (!$.data(this, 'edited')) {\n");
// print(" this.value = $.data(this, 'default');\n");
// print(" $(this).css(\"color\",\"gray\");\n");
// print(" }\n");
print(" });\n");
print(" });\n");
print(" });\n");
print(" //]]> \n");
print(" </script> \n");
//Insert the cool Zoom Function. (Edit: P.A.Higgins 14-May-2009)
if ($this_page == "full_disk.php")
{
print(" <script type='text/javascript' src='common_files/tjpzoom.js'></script>\n");
print(" <script type='text/javascript' src='common_files/tjpzoom_config_default.js'></script>\n");
print(" <script type='text/javascript'>\n");
print(" function writeText(txt){document.getElementById('zoomtoggle').innerHTML=txt;}\n");
print(" </script>\n");
print(" <script type='text/javascript'>\n");
print(" var TJPzoomoffset='smart';\n");
print(" var zoomable=-1;\n");
print(" </script>\n");
}
if (preg_match("/pop.php/",$this_page,$rubbish))
{
print(" <meta http-equiv=\"Pragma\" content=\"no-cache\">\n");
// print(" <meta http-equiv=\"refresh\" content=\"300\">\n");
// print(" <title>$title ( Updates dynamically every 5-mins) </title>\n");
}
if ($this_page == "aurora_pop.php")
{
print(" <link rel=\"stylesheet\" href=\"./common_files/js_gifplayer/aeplayer.css\" type=\"text/css\">\n");
print(" <script type=\"text/javascript\" src=\"./common_files/js_gifplayer/menu.js\"></script>\n");
print(" <script type=\"text/javascript\" src=\"./common_files/js_gifplayer/aeplayer.js\"></script>\n");
print(" <script type=\"text/javascript\">\n");
print(" window.onload = function() {\n");
print(" aemenu.init(\"icmenu\", \"icact\");\n");
print(" aemenu.init(\"stmenu\", \"stact\");\n");
print(" aemenu.init(\"simenu\", \"siact\");\n");
print(" aemenu.init(\"abmenu\", \"abact\");\n");
print(" aep.makeAllPlayers();\n");
print(" }\n");
print(" </script>\n");
}
/* check the theme in a cookie */
$theme = @$_COOKIE["theme"];
if (!$theme) { //we didn't set the cookie yet
// select first key of the themes array in config.inc.php as default
$theme_keys = array_keys($themes);
$theme = $theme_keys[0];
}
foreach ($themes as $skin => $url) {
//var_dump($skin);
echo "<link type=\"text/css\" rel=\"";
if ($skin==$theme) {
echo "stylesheet";
} else {
echo "prefertch alternate stylesheet";
}
echo "\" href=\"$url\" title=\"$skin\"";
echo " media=\"screen\" />\n";
}
$current_date = gmdate("Ymd");
if (strtotime($date) > strtotime($current_date))
{
print("<STYLE type=\"text/css\">\n");
print(".cal_box{ color: red}\n");
print("</STYLE>\n");
}
print("</head>\n");
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function Header()\r\n\t{\r\n\t\t$this->Ln();\r\n\t\t$this->SetFont('Arial','',14);\r\n\t\t$this->Cell(170,7,\"Date :: \". $this->today_date ,1,0,'C');\r\n\t\t$this->Ln();\r\n\t\t$this->SetFont('Arial','',14); \r\n\t\t$this->MultiCell(170,8,\"Room Things Report \\n\".$this->title,1,'C');\r\n\t\t$this->Ln(5);\r\n\r\n\t}",
"abstract public function header();",
"function print_header(){\n\t\tglobal $worksheet, $xlsRow;\n\t\tglobal $heading_name,$ORG_TITLE;\n\t\t\n\t\t$worksheet->set_column(0, 0, 5);\n\t\t$worksheet->set_column(1, 1, 40);\n\t\t$worksheet->set_column(2, 2, 27);\n\t\t$worksheet->set_column(3, 3, 25);\n\t\t$worksheet->set_column(4, 4, 12);\n\t\t$worksheet->set_column(5, 5, 5);\n\t\t$worksheet->set_column(6, 6, 4);\n\t\t$worksheet->set_column(7, 7, 4);\n\t\t$worksheet->set_column(8, 8, 4);\n\t\t$worksheet->set_column(9, 9, 4);\n\t\t$worksheet->set_column(10, 10, 4);\n\t\t$worksheet->set_column(11, 11, 4);\n\t\t$worksheet->set_column(12, 12, 18);\n\t\t$worksheet->set_column(13, 13, 25);\n\t\t$worksheet->set_column(14, 14, 5);\n\t\t$worksheet->set_column(15, 15, 8);\n\t\t$worksheet->set_column(16, 16, 28);\n\t\t$worksheet->set_column(17, 17, 15);\n\t\t$worksheet->set_column(18, 18, 20);\n\t\t$worksheet->set_column(19, 19, 12);\n\t\t$worksheet->set_column(20, 20, 8);\n\t\t$worksheet->set_column(21, 21, 12);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"(1)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"(2)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"(3)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"(4)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"(5)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"(6)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 9, \"(7)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 10, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 11, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 12, \"(8)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 13, \"(9)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 14, \"(10)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 15, \"(11)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 16, \"(12)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 17,\"(13)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 18, \"(14)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 19, \"(15)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 20, \"(16)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 21, \"(17)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"ชื่อส่วนราชการ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"เลข\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\",0));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 9, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"L\", 0));\n\t\t$worksheet->write($xlsRow, 10, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 11, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 12, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 13, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 14, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 15, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 16, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 17, \"พื้นที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 18, \"วุฒิการศึกษา/\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 19, \"อัตรา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 20, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 21, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"ชื่อ-สกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"ประจำตัว\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"เพศ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"เกิด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 9, \"บรรจุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 10, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 11, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 12, \"หมวด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 13, \"ชื่อตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 14, \"ชั้น\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 15, \"ตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 16, \"ส่วนกลาง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 17, \"ปฏิบัติงาน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 18, \"ประกาศนียบัตร\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 19, \"เงินเดือน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 20, \"ปีที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\t\t\n\t\t$worksheet->write($xlsRow, 21, \"หมายเหตุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\t\t\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 1, \"$ORG_TITLE\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"เขต/แขวง/ศูนย์\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"ประชาชน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"ว\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"ด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"ป\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 9, \"ว\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 10, \"ด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 11, \"ป\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 12, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 13, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 14, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 15, \"เลขที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 16, \"/ภูมิภาค\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 17, \"(จังหวัด)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 18, \"เฉพาะทาง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 19, \"ปัจจุบัน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 20, \"เกษียณ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 21, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t}",
"function display_header() {}",
"function Header() {\r\n // print the title\r\n $this->SetTitleFont();\r\n $this->Cell(100, 8, $this->title, 0, 0, \"L\");\r\n\r\n // print the author\r\n $this->SetAuthorFont();\r\n $this->Cell(0, 8, $this->author, 0, 0, \"R\");\r\n\r\n // header line\r\n $this->SetFillColor(0, 0, 0);\r\n $this->Rect(10, 17, 190, 0.2, \"F\");\r\n $this->Rect(10, 17.5, 190, 0.2, \"F\");\r\n $this->Ln(14);\r\n }",
"abstract protected function header();",
"public function Header()\n {\n // Set the header logo.\n $this->Image('C:\\xampp\\htdocs\\Nexus\\resource\\img\\fpdf\\Nexus-logo.png', 120, 18, 40, 30);\n\n // Set the font.\n $this->AddFont('BebasNeue-Regular', '', 'BebasNeue-Regular.php');\n $this->SetFont('BebasNeue-Regular', '', 26);\n\n // Line break.\n $this->Ln(42);\n\n // Move to the right.\n $this->Cell(120);\n\n // Set page header title.\n $this->Cell(20, 3, 'NEXUS IT TRAINING CENTER', 0, 0, 'C');\n\n // Set the font.\n $this->AddFont('AsiyahScript', '', 'AsiyahScript.php');\n $this->SetFont('AsiyahScript', '', 40);\n\n // Line break.\n $this->Ln(12);\n\n // Set page header title.\n $this->Cell(259, 15, 'Certificate of Attendance', 0, 0, 'C');\n }",
"function print_header(){\n\t\tglobal $worksheet, $xlsRow;\n\n\t\t$worksheet->set_column(0, 0, 10);\n\t\t$worksheet->set_column(1, 1, 25);\n\t\t$worksheet->set_column(2, 2, 30);\n\t\t$worksheet->set_column(3, 3, 20);\n\t\t$worksheet->set_column(4, 4, 30);\n\t\t$worksheet->set_column(5, 5, 15);\n\t\t$worksheet->set_column(6, 6, 20);\n\t\t$worksheet->set_column(7, 7, 30);\n\t\t$worksheet->set_column(8, 8, 30);\n\t\t$worksheet->set_column(9, 9, 20);\n\t\t$worksheet->set_column(10, 10, 10);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"ชื่อ-สกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"สาขาวิชา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"ระดับการศึกษา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"สถานศึกษา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 5, \"ประเทศ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 6, \"ตำแหน่ง/ระดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"สังกัด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"ชื่อทุน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 9, \"ระยะเวลา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 10, \"จำนวนวัน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t}",
"function Header()\n\t{\n\t\t$this->SetFont('Arial','',12);\n\t\t$this->MultiCell(190,5,nombre_empresa(),'0','C');\n\t\t$this->SetFont('Arial','',10);\n\t\t$this->MultiCell(190,5,tipo_serv(),'0','C');\n\t\t$this->SetFont('Arial','B',10);\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->MultiCell(190,7,strtoupper(_('listado de clientes para cortes')),'0','C');\n\t\t$this->SetFont('Arial','B',8);\n\t\t$this->SetX(133);\n\t\t$this->Cell(12,5,strtoupper(_('fecha')).': ',0,0,'L');\n\t\t$this->SetFont('Arial','',8);\n\t\t$this->Cell(18,5,date(\"d/m/Y\"),0,0,'L');\n\t\t$this->SetFont('Arial','B',8);\n\t\t$this->Cell(12,5,strtoupper(_('hora')).': ',0,0,'L');\n\t\t$this->SetFont('Arial','',8);\n\t\t$this->Cell(18,5,date(\"h:i:s A\"),0,0,'L');\n\t\t$this->Ln();\t\t\n\t}",
"function printHeader($title) {\n\tprint <<<ENDOLA\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \n \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n\t<meta http-equiv=\"Content-type\" content=\"text/html;charset=UTF-8\" />\n\t<title>${title}</title>\nENDOLA;\n\n\tprintJQuery();\n\n\techo '</head><body>';\n}",
"function header($title=false) {\n\t\tif(!$title) {\n\t\t\t$title = 'Beerlogger';\n\t\t}\n\t\tob_start();\n\t\tinclude('templates/header.php');\n\t\t$output = ob_get_clean();\n\t\treturn $output;\n\t}",
"function print_header(){\n\t\tglobal $worksheet, $xlsRow, $COM_LEVEL_SALP;\n\n\t\t$worksheet->set_column(0, 0, 6);\n\t\t$worksheet->set_column(1, 1, 20);\n\t\t$worksheet->set_column(2, 2, 25);\n\t\t$worksheet->set_column(3, 3, 50);\n\t\t$worksheet->set_column(4, 4, 15);\n\t\t$worksheet->set_column(5, 5, 15);\n\t\t$worksheet->set_column(6, 6, 15);\n\t\t$worksheet->set_column(7, 7, 15);\n\t\t$worksheet->set_column(8, 8, 35);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"เลขประจำตัวประชาชน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"ชื่อ-นามสกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"ตำแหน่ง/สังกัด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"เลขที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 5, \"อัตราเงินเดือน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 6, \"เงินตอบแทน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 8, \"หมายเหตุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"ตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"ที่เต็มขั้น\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"ร้อยละ 2 (บาท)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"ร้อยละ 4 (บาท)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t}",
"function addHeader($title)\n {\n $this->page .= <<<EOD\n<html>\n<head>\n<title>$title</title>\n</head>\n<body>\n<h1 align=\"center\">$title</h1>\nEOD;\n }",
"protected function generatePageHeader($headline = \"\") \n {\t\n $headline = htmlspecialchars($headline);\n header(\"Content-type: text/html; charset=UTF-8\");\n \n\t\t\n\t\techo \"<!DOCTYPE html>\\n\";\n\t\techo \"<html lang=\\\"de\\\">\\n\";\n\t\techo \"<head>\\n\";\n\t\techo \"<meta charset=\\\"UTF-8\\\" />\\n\";\n\t\techo \"<title> $headline </title>\\n\";\n\t\techo \"<link rel=\\\"stylesheet\\\" href=\\\"style/main.css\\\"/>\\n\";\n\t\techo \"<script type=\\\"text/javascript\\\" src=\\\"js/functions.js\\\"> </script>\\n\";\n\t\techo \"</head>\\n\";\n\t\techo \"<body>\\n\";\n\t\techo \"<header><h1>$headline</h1></header>\\n\";\n // to do: output common beginning of HTML code \n // including the individual headline\n }",
"public function Header() {\n\t\t$x = 0;\n\t\t$dx = 0;\n\t\tif ($this->rtl) {\n\t\t\t$x = $this->w + $dx;\n\t\t} else {\n\t\t\t$x = 0 + $dx;\n\t\t}\n\n\t\t// print the fancy header template\n\t\tif($this->print_fancy_header){\n\t\t\t$this->printTemplate($this->header_xobjid, $x, 0, 0, 0, '', '', false);\n\t\t}\n\t\tif ($this->header_xobj_autoreset) {\n\t\t\t// reset header xobject template at each page\n\t\t\t$this->header_xobjid = false;\n\t\t}\n\t\t\n\t\t$this->y = $this->header_margin;\n\t\t$this->SimpleHeader();\n\t\t//$tmpltBase = $this->MakePaginationTemplate();\n\t\t//echo $tmpltBase;die();\n\t\t//echo('trying to print header template: ');\n\t\t//$this->printTemplate($tmpltBase, $x, $this->y, 0, 0, '', '', false);\n\t\t//die();\n\t}",
"function Header() \n { \n\n list($r, $b, $g) = $this->xheadercolor; \n $this->setY(10); // shouldn't be needed due to page margin, but helas, otherwise it's at the page top \n $this->SetFillColor($r, $b, $g); \n $this->SetTextColor(0 , 0, 0); \n $this->Cell(0,20, '', 0,1,'C', 1); \n $this->Text(15,26,$this->xheadertext ); \n }",
"function myheader($additionalHeaderContent = NULL) {\n\t\tprint '<html>';\n\t\t\tprint '<head>';\n\t\t\t\tprint '<title>';\n\t\t\t\t\tif (defined('TITLE')) {\n\t\t\t\t\t\tprint TITLE;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tprint 'MiddleClik';\n\t\t\t\t\t}\n\t\t\t\tprint '</title>';\n\t\t\t\tprint \"<meta http-equiv=\\\"content-type\\\" content=\\\"text/html; charset=utf-8\\\" />\";\n\t\t\t\tprint $additionalHeaderContent;\n\t\t\t\tprint \"<style type=\\\"text/css\\\">\";\n\t\t\t\t\tprint '//this is where my css, js goes';\n\t\t\t\tprint \"</style>\";\n\t\t\tprint '</head>';\n\t}",
"function Header()\n{\n $this->SetFont('Arial','B',15);\n // Move to the right\n $this->Cell(80);\n // Framed title\n\t$this->SetDrawColor(0,80,180);\n $this->SetFillColor(230,230,0);\n $this->SetTextColor(220,50,50);\n // Thickness of frame (1 mm)\n $this->SetLineWidth(1);\n\t$this->Cell($w,9,$title,1,1,'C',true);\n $this->Cell(30,10,'Title',1,0,'C');\n // Line break\n $this->Ln(40);\n}",
"private function pageheader_print() {\n\t\tif (defined('DEBUG_ENABLED') && DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))\n\t\t\tdebug_log('Entered (%%)',129,0,__FILE__,__LINE__,__METHOD__,$fargs);\n\n\t\t# HTML prepage requirements.\n\t\tforeach ($this->_pageheader as $line)\n\t\t\techo $line.\"\\n\";\n\n\t\t# Page Title\n\t\techo '<head>';\n\t\tprintf('<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />');\n\n\t\t$DNs = get_request('dn','REQUEST');\n\t\tif (is_array($DNs))\n\t\t\t$DNs = '';\n\n\t\tif (isset($_SESSION[APPCONFIG]))\n\t\t\tprintf('<title>%s (%s) - %s%s</title>',\n\t\t\t\t$this->_app['title'],\n\t\t\t\tapp_version(),\n\t\t\t\t$DNs ? htmlspecialchars($DNs).' ' : '',\n\t\t\t\t$_SESSION[APPCONFIG]->getValue('appearance','page_title'));\n\t\telse\n\t\t\tprintf('<title>%s - %s</title>',$this->_app['title'],app_version());\n\n\t\techo '<link rel=\"shortcut icon\" href=\"images/favicon.ico\" type=\"image/vnd.microsoft.icon\" />';\n\t\t# Style sheet.\n\t\tprintf('<link type=\"text/css\" rel=\"stylesheet\" href=\"%s\" />',$this->_app['urlcss']);\n\n\t\tif (defined('JSDIR')) {\n\t\t\tprintf('<link type=\"text/css\" rel=\"stylesheet\" media=\"all\" href=\"%sjscalendar/calendar-blue.css\" title=\"blue\" />',JSDIR);\n\t\t\techo \"\\n\";\n\t\t\tprintf('<script type=\"text/javascript\" src=\"%sajax_functions.js\"></script>',JSDIR);\n\t\t\tprintf('<script type=\"text/javascript\" src=\"%sjscalendar/calendar.js\"></script>',JSDIR);\n\t\t\techo \"\\n\";\n\t\t}\n\n\t\t# HTML head requirements.\n\t\tif (is_array($this->_head) && count($this->_head))\n\t\t\tforeach ($this->_head as $line)\n\t\t\t\techo $line.\"\\n\";\n\n\t\techo '</head>';\n\t\techo \"\\n\";\n\t}",
"public function Header() {\r\n $this->varcave->logger->debug('Create PDF top header');\r\n\t\tif ($this->noheader){\r\n\t\t\treturn true;\r\n\t\t}\r\n // Logo\r\n\t\t$this->setFont($this->font, 'BI', 8, '', 'false');\r\n\t\t$this->Image($this->headerImg,4,4,170);\r\n\t\t\r\n\t\t//text box after header image\r\n\t\t$this->RoundedRect(172,4,35,10,3.5,'D');\r\n\t\t$this->SetXY(173,5);\r\n\t\t$this->cell(0,3, LNE::pdf_caveRef . ': ' . $this->cavedata['caveRef'],0);\r\n\t\t$this->SetXY(173,9);\r\n\t\t//If pagegroup is on set group page number, or set a global PDF page number \r\n\t\tif ( $this->pagegroups == false )\r\n\t\t{\r\n\t\t\t$this->cell(0,3,LNE::pdf_page. ': '. $this->getAliasNumPage() . '/' . $this->getAliasNbPages(),0);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->cell(0,3,LNE::pdf_page .': '. $this->getPageGroupAlias(). '-'.$this->getPageNumGroupAlias() ,0);\r\n\t\t}\r\n\t\t\r\n }",
"function Header() {\n if(empty($this->title) || $this->PageNo() == 1) return;\n $oldColor = $this->TextColor;\n $this->SetTextColor(PDF_HEADER_COLOR['red'],\n PDF_HEADER_COLOR['green'],\n PDF_HEADER_COLOR['blue']);\n $x = $this->GetX();\n $y = $this->GetY();\n $this->SetY(10, false);\n $this->SetFont('', 'B');\n $this->Cell(0, 10, $this->title);\n $this->SetFont('', '');\n $this->SetXY($x, $y);\n $this->TextColor = $oldColor;\n }",
"function Header(){\n\t\t}",
"function header (){\n\t\t$this->setfont('Arial','B', 16);\n\t\t$this->settextcolor(0, 0, 0);\n\t\t$this->cell(0, 10, 'WANANCHI', 0, 0, 'C');\n\t\t$this->Ln(10);\n\t\t$this->setfont('Arial','',12);\n\t\t$this->settextcolor(0, 0, 0);\n\t\t$this->cell(0, 10, 'INFORMATION',0, 0, 'C');\n\t\t$this->Ln(30);\n\t}",
"function Header()\n {\n\n\n //list($r, $b, $g) = $this->xheadercolor;\n $this->setY(5);\n //$this->SetFillColor($r, $b, $g);\n //$this->SetTextColor(0 , 0, 0);\n //$this->Cell(0,20, '', 0,1,'C', 1);\n //$this->Text(15,26,$this->xheadertext );\n \n \n // get the current page break margin\n $bMargin = $this->getBreakMargin();\n // get current auto-page-break mode\n $auto_page_break = $this->AutoPageBreak;\n // disable auto-page-break\n $this->SetAutoPageBreak(false, 0);\n // set bacground image\n $img_file = WWW_ROOT.'/img/Resul_Agua.jpg';\n $this->Image($img_file, 0, 0, 216, 279, '', '', '', false, 300, '', false, false, 0);\n // restore auto-page-break status\n $this->SetAutoPageBreak($auto_page_break, $bMargin);\n // set the starting point for the page content\n $this->setPageMark();\n \n\n $this->writeHTML($this->xheadertext, true, false, true, false, '');\n\n // Transformacion para la rotacion de el numero de orden y el contenedor de la muestra\n $this->StartTransform();\n //$this->SetFont('freesans', '', 5);\n $this->SetFont('', '', 5);\n $this->Rotate(-90, 117, 117);\n //$tcpdf->Rect(39, 50, 40, 10, 'D');\n $this->Text(5, 30, 'Software Asistencial Médico \"SAM\" V.1.1 ® - https://samsalud.info ®');\n // Stop Transformation\n $this->StopTransform();\n\n // if ( $this->variable == 1 )\n // {\n // draw jpeg image x, y ancho, alto\n // $this->Image(WWW_ROOT.'/img/BORRADOR.png', 40, 60, 450, 250, '', '', '', true, 72);\n\n // restore full opacity\n $this->SetAlpha(0);\n // }\n\n }",
"function header() {\n }",
"function Header()\n{\n\tglobal $title;\n\t$this->Ln(5);\n}",
"function do_html_header($title)\r\n{\r\n?>\r\n <html>\r\n <head>\r\n <title><?=$title?></title>\r\n <? /* <style>\r\n body { font-family: Arial, Helvetica, sans-serif; font-size: 13px }\r\n li, td { font-family: Arial, Helvetica, sans-serif; font-size: 13px }\r\n hr { color: #3333cc; width:300; text-align:left; }\r\n a { color: #000000 }\r\n </style> \r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /> */?>\r\n<link rel=\"stylesheet\" type=\"text/css\" href=\"css/style.css\" />\r\n </head>\r\n <body>\r\n<!-- <img src=\"top_1.gif\" alt=\"Selena logo\" border=0\r\n align=left valign=bottom height = 82 width = 350><br>\r\n <h1> </h1><br> <hr>-->\r\n\r\n<?\r\n if($title)\r\n do_html_heading($title);\r\n}",
"public function print_header() {\n header('Content-type: text/csv');\n $filename = $this->page->title;\n $filename = preg_replace('/[^a-z0-9_-]/i', '_', $filename);\n $filename = preg_replace('/_{2,}/', '_', $filename);\n $filename = $filename.'.csv';\n header(\"Content-Disposition: attachment; filename=$filename\");\n }",
"function Header(){\r\n\t\t//Aqui va el encabezado\r\n\t\tif ($this->iSector==98){\r\n\t\t\tp_FuenteGrandeV2($this,'B');\r\n\t\t\t$this->Cell($this->iAnchoLibre,5,utf8_decode('Información de depuración'), 0, 0, 'C');\r\n\t\t\t$this->Ln();\r\n\t\t\treturn;\r\n\t\t\t}\r\n\t\t$iConFondo=0;\r\n\t\tif ($this->sFondo!=''){\r\n\t\t\tif (file_exists($this->sFondo)){\r\n\t\t\t\t$this->Image($this->sFondo, 0, 0, $this->iAnchoFondo);\r\n\t\t\t\t$iConFondo=1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t$yPos=$this->GetY();\r\n\t\tif ($yPos<$this->iBordeEncabezado){\r\n\t\t\t$this->SetY($this->iBordeEncabezado);\r\n\t\t\t}\r\n\t\tif ($iConFondo==0){\r\n\t\t\tp_TituloEntidad($this, false);\r\n\t\t\t}else{\r\n\t\t\tp_FuenteGrandeV2($this,'B');\r\n\t\t\t}\r\n\t\tif ($this->iReporte==1902){\r\n\t\t\t//Ubique aqui los componentes adicionales del encabezado\r\n\t\t\t$this->Cell($this->iAnchoLibre,5,'Eventos '.$this->sRefRpt, 0, 0, 'C');\r\n\t\t\t$this->Ln();\r\n\t\t\t}\r\n\t\t$yPos=$this->GetY();\r\n\t\tif ($yPos<$this->iBordeSuperior){\r\n\t\t\t$this->SetY($this->iBordeSuperior);\r\n\t\t\t}\r\n\t\t}",
"private function writeHeader(): void\n {\n $record = 0x0014; // Record identifier\n\n /* removing for now\n // need to fix character count (multibyte!)\n if (strlen($this->phpSheet->getHeaderFooter()->getOddHeader()) <= 255) {\n $str = $this->phpSheet->getHeaderFooter()->getOddHeader(); // header string\n } else {\n $str = '';\n }\n */\n\n $recordData = StringHelper::UTF8toBIFF8UnicodeLong($this->phpSheet->getHeaderFooter()->getOddHeader());\n $length = strlen($recordData);\n\n $header = pack('vv', $record, $length);\n\n $this->append($header . $recordData);\n }"
] |
[
"0.71713406",
"0.70816946",
"0.7007791",
"0.6978833",
"0.69364303",
"0.6915148",
"0.68568426",
"0.6812247",
"0.6812209",
"0.6794814",
"0.6789016",
"0.67726743",
"0.67185825",
"0.6714872",
"0.6711297",
"0.67060137",
"0.6702238",
"0.66937584",
"0.6691366",
"0.6681655",
"0.66745526",
"0.66560817",
"0.6640657",
"0.6632121",
"0.6600635",
"0.659941",
"0.6592749",
"0.65818936",
"0.6578352",
"0.6575054"
] |
0.8250703
|
0
|
Function addDriverDB This function adds to the database information about a user who wants to be a driver
|
function addDriverDB($licenseID,$email,$vehiculeNum){
global $db;
$sql = "INSERT INTO driver(licenceID,user_email,score,vehiculeNum,numRides) VALUES('$licenseID','$email',null,'$vehiculeNum',0)";
if ($db->query($sql) === TRUE)
return "";
else
return "Error: " . $sql . "<br>" . $db->error;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function addOnDB() {\n\t\t\t$db = mysqli_connect($GLOBALS['host'], $GLOBALS['username'], $GLOBALS['password'], $GLOBALS['dbname']);\n\t\t\t\n\t\t\t$format = \"INSERT INTO `user` \n\t\t\t\t(`username`, `password`, `fullname`, `birthplace`, `birthdate`, `email`, `avatar`) VALUES \n\t\t\t\t('%s', '%s', '%s', '%s', '%s', '%s', '%s');\";\n\t\t\t$stmt = sprintf($format, $this->username, $this->password, $this->fullname, $this->birthplace, $this->birthdate,\n\t\t\t\t$this->email, $this->avatar_path);\n\t\t\t$result = mysqli_query($db, $stmt);\n\t\t\t\n\t\t\t$db->close();\n\t\t}",
"public function addDB()\n {\n $this->model->addDB();\n header('location:index.php?controller=user');\n }",
"public function addToDb()\n {\n\n // make sure this is a valid new entry\n if ($this->isValid()) {\n // check for duplicate\n $vals = sprintf(\"('%s',%d)\",$this->email,$this->level);\n $sql = \" insert into Admins values $vals\";\n Dbc::getReader()->Exec($sql);\n }\n else\n print \"<br> Invalid entry. STOP! ($sql)<br>\";\n }",
"function addToDB($actualname,$name,$rating,$url){\n $db = new ImageDB();\n if(!$db){\n return \"Error creating database class\";\n }\n $res = $db->addImage($actualname,$name,$rating,$url);//TODO: Change to identified name \n $db->close();\n return $res;\n}",
"public function DBDriver()\n\t{\n\t\t$_SESSION['queries'] = 0; // for DEBUG ONLY and to be removed or handled more priopriate way!\n\t\t$this->loadDBProperties();\n\t\t$this->connect();\n\t}",
"function add_newuser($user) {\n global $DB;\n $DB->insert_record('report_user_statistics', $user, false);\n}",
"public function addUser() {\n $db = new ClassDB();\n $db->connect();\n\n $result = $db->getConnection()->prepare('INSERT INTO users (user_email,\n user_password,\n user_first_name,\n user_last_name) \n VALUES (:email,\n :pass,\n :firstName,\n :lastName)');\n\n $result->bindParam(':email', $this->user_email); \n $result->bindParam(':pass', $this->user_password); \n $result->bindParam(':firstName', $this->user_first_name);\n $result->bindParam(':lastName', $this->user_last_name);\n \n $result->execute();\n $db->disconnect();\n }",
"public function addDB()\n {\n $this->model->addDB();\n header('location:index.php?controller=new');\n }",
"function addDriver() {\n $drivers = $_SESSION['drivers'];\n $l = sizeof($drivers);\n // We don't allow more than 20 drivers in this sandbox\n if ($l>19) {\n throw new Exception(\"You can only have 20 drivers in this sandbox\");\n return;\n }\n $request = Slim::getInstance()->request();\n \t$body = $request->getBody();\n \t$driver = json_decode($body);\n $driver->lastModified = date('Y-m-d H:i:s');\n $driver->deleted = false;\n $driver->id = sizeof($drivers) + 1;\n $drivers[] = $driver;\n $_SESSION['drivers'] = $drivers;\n echo json_encode($driver);\n}",
"function addToDatabase() {\n\t\tif ($this->id != null && $this->id != 0) return false;\n\n\t\t$db = getDb();\n\n\t\t$add_query = \"INSERT INTO user_table \n\t\t(user_name, \n\t\t user_password,\t\n\t\t isAdmin,\t\n\t\t user_first_name,\n\t\t user_last_name) \n\t\tVALUES \n\t\t('$this->username', \n\t\t '$this->password',\t\n\t\t '$this->isAdmin',\t\n\t\t '$this->firstName',\t\n\t\t '$this->lastName');\";\n\n\t\t$result = mysqli_query($db, $add_query);\n\n\t\tmysqli_close($db);\n\n\t\tif (!$result) return false;\n\n\t\treturn true;\n\n\t}",
"public function addToDB(&$dbForm) {\n\t\tglobal $config;\n\t\t$added = $this->value();\n\t\t$added = $added['added'];\n\t\t$filenames = Array();\n\t\tforeach ($added as $file) {\n\t\t\t$filename = $file['tmp_name'];\n\t\t\twhile (isset($this->move_map[$filename])) {\n\t\t\t\t$filename = $this->move_map[$filename];\n\t\t\t}\n\t\t\t$filenames [] = Array('src'=>$filename, 'name'=>$file['name']);\n\t\t}\n\t\t$dbForm->addFile($dbForm->dbName($this->label), $filenames, $this->uploadDirFS, $this->uploadDir);\n\t\tif (mysql_error()) {\n\t\t\techo mysql_error();\n\t\t}\n\t}",
"public function addToDb ($user_id) {\n\n $_data = array();\n $this->generateAssocData ($_data);\n \n # Associate this show with this user\n $_data['user_id'] = $user_id;\n \n # Unix timestamp of when this show was created / modified\n $_data['created'] = Time::now();\n $_data['modified'] = Time::now(); \n \n return DB::instance(DB_NAME)->insert('shows', $_data);\n }",
"public function addUserToDatabase($user) {\n $name = $user->getName();\n $password = $user->getHashedPassword();\n $sql = \"INSERT INTO users (name, password) VALUES (:name, :password)\";\n $insertToDb = $this->connection->prepare($sql);\n $insertToDb->bindParam(':name', $name);\n $insertToDb->bindParam(':password', $password);\n $insertToDb->execute();\n $this->registerStatus = true;\n }",
"function addUser ($user) {\n\n $conn = \\Database\\Connection::connect();\n\n try {\n $sql = \"INSERT INTO user (_user_FirstName, _user_Email, _user_Password) VALUES (?, ?, ?)\";\n $query = $conn->prepare($sql);\n $query->execute(array($user->_user_FirstName, $user->_user_Email, $user->_user_Password));\n }\n catch(\\PDOException $e)\n {\n echo $sql . \"<br>\" . $e->getMessage();\n }\n\n \\Database\\Connection::disconnect();\n }",
"public static function addUser()\n {\n // ADD NEW DATA TO A TABLE\n // MAKE SURE TO SEND USERS TO THE /users page when a user is added\n }",
"function registerToDatabase() {\n\t\t\tif ($this->id != null && $this->id != 0) return false;\n\n\t\t\t$this->conn = connectToDb(\"db_avalanche_store\");\n\n\t\t\t$add_query = \"INSERT INTO tbl_dev_info \n\t\t\t(user_id, \n\t\t\t dev_name,\t\n\t\t\t dev_desc) \n\t\t\tVALUES \n\t\t\t('$this->dev_id', \n\t\t\t '$this->dev_name',\t\n\t\t\t '$this->dev_description');\";\n\n\t\t\t$result = $this->conn->query($add_query);\n\n\t\t\t$this->conn->close();\n\n\t\t\tif (!$result) return false;\n\n\t\t\treturn true;\n\t\t}",
"function add_user ($User_name, $User_password, $User_email, $user_type)\n\t{\n\t\tglobal $conn;\n\n $sql_i = \"INSERT INTO login_db(user_name, user_password, user_email, user_type) VALUES \" .\n \"('$User_name', '$User_password', '$User_email', '$user_type')\";\n\n run_update($sql_i);\n\t}",
"public function addDB($key, $db){\n $this->db[$key]=$db;\n }",
"function addUser($id=0, $first_name, $last_name, $email_primary, $email_secondary, $phone_primary, $mag_stripe, $prox_id, $affil, $campus_id, $netid, $level){\n\t// This \"try\" runs completely unless something gets \"caught\" by the \"catch\" portion below.\n\ttry {\n\t\t$db = getDatabase(); // Creates a database connection (found in database.php), and returns the connection.\n\t\t$query = $db->prepare( \"INSERT INTO dbUser (ID, First_Name, Last_Name, Email_Primary, Email_Secondary, Phone_Primary, Mag_Stripe, Prox_ID, Affil, Campus_ID, Netid, Level) VALUES ( :id, :first_name, :last_name, :email_primary, :email_secondary, :phone_primary, :mag_Stripe, :prox_ID, :affil, :campus_id, :netid, :level)\"); // Prepare an SQL statement to be performed on the database. In this example we are telling the database to Insert a row into the dbItem table, with the provided information of ID, Name, and Description (all of which have to be the exact table names in our database). The first parenthesis contains the database columns that we will fill with the values in the second parenthesis. Notice how the values in the second parenthesis are prefaced with a colon (:). These are placeholders for our information given by the saveItem function - before we execute the call on the database, we will have to replace these placeholders with the item information we were given. Lastly, the ON DUPLICATE KEY UPDATE portion tells the database what to do if an item already exists with the ID that we specified. In this case, it is telling the database to update the item with the same ID that we were given, so essentially it is doing nothing.\n\t\t// We fill in the placeholders in our prepare statement above with the variables passed to our saveItem function (that we are currently in), using the bindParam function. Our :id, :name, and :description values should now be substituted with their actual values.\n\t\t\n\t\t$query->bindParam( ':id', $id );\n\t\t$query->bindParam( ':first_name', $first_name );\n\t\t$query->bindParam( ':last_name', $last_name );\n\t\t$query->bindParam( ':email_primary', $email_primary );\n\t\t$query->bindParam( ':email_secondary', $email_secondary );\n\t\t$query->bindParam( ':phone_primary', $phone_primary );\n\t\t$query->bindParam( ':mag_stripe', $mag_stripe );\n\t\t$query->bindParam( ':prox_id', $prox_id );\n\t\t$query->bindParam( ':affil', $affil );\n\t\t$query->bindParam( ':campus_id', $campus_id );\n\t\t$query->bindParam( ':net_id', $net_id );\n\t\t$query->bindParam( ':level', $level );\n\n\t\t// Execute the request. The execute function returns true or false based on if it was successful or not, so we will check here for the status of the call.\n\t\tif ( $query->execute() ) {\n\t\t\t// Create a success response, and echo the message back, and reset the database.\n\t\t\t$response = '{\"success\":{\"text\":\"Saved User Successfully.\" }}';\n\t\t\t\n\t\t\t$db = null;\n\t\t\techo $response;\n\t\t}\n\t\t// Run something if the query failed.\n\t\telse {\n\t\t\t// This is how you generate a custom error message, below in the \"catch\" portion of our try, we will echo out these errors if any were created.\n\t\t\tthrow new PDOException(\"User could not be saved.\");\n\t\t}\n\t}\n\t// Catches any thrown error in the try{}, and returns the error message in JSON form.\n\tcatch(PDOException $e) {\n\t\techo '{\"error\": {\"text\":\"' . $e->getMessage() . '\"}}';\n\t}\n}",
"public function addDriver(DriverInterface $driver)\n {\n $this->drivers[$driver->getName()] = $driver;\n }",
"function addUser($user_name, $display_name,$fullname,$roll,$yearjoin,$yearend,$dept,$section,$alumni, $title, $password, $email, $active, $activation_token){\n try {\n global $db_table_prefix;\n\n $db = pdoConnect();\n\n $query = \"INSERT INTO \".$db_table_prefix.\"users (\n user_name,\n display_name,\n password,\n email,\n activation_token,\n last_activation_request,\n lost_password_request,\n lost_password_timestamp,\n active,\n title,\n sign_up_stamp,\n last_sign_in_stamp\n )\n VALUES (\n :user_name,\n :display_name,\n :password,\n :email,\n :activation_token,\n '\".time().\"',\n '0',\n '\".time().\"',\n :active,\n :title,\n '\".time().\"',\n '0'\n )\";\n\n $sqlVars = array(\n ':user_name' => $user_name,\n ':display_name' => $display_name,\n ':title' => $title,\n ':password' => $password,\n ':email' => $email,\n ':active' => $active,\n ':activation_token' => $activation_token\n );\n\n $stmt = $db->prepare($query);\n\n if (!$stmt->execute($sqlVars)){\n // Error: column does not exist\n return false;\n }\n\n $inserted_id = $db->lastInsertId();\n\t\t\t\t$stmt = null;\n\t\t\t\t$query2 = \"INSERT INTO \".$db_table_prefix.\"user_details\n\t\t\t\t\t\tVALUES(\n\t\t\t\t\t\t:user_id,\n\t\t\t\t\t\t:full_name,\n\t\t\t\t\t\t:rollno,\n\t\t\t\t\t\t:dept,\n\t\t\t\t\t\t:section,\n\t\t\t\t\t\t:yj,\n\t\t\t\t\t\t:ye,\n\t\t\t\t\t\t:alumni,\n\t\t\t\t\t\t'0',\n\t\t\t\t\t\t'0'\n\t\t\t\t\t\t)\";\n\n\t\t\t\t$sqlVars2 = array(\n\t\t\t\t\t\t':user_id' => $inserted_id,\n\t\t\t\t\t\t':full_name' => $fullname,\n\t\t\t\t\t\t':rollno' => $roll,\n\t\t\t\t\t\t':dept' => $dept,\n\t\t\t\t\t\t':section'=>$section,\n\t\t\t\t\t\t':yj' => $yearjoin,\n\t\t\t\t\t\t':ye' => $yearend,\n\t\t\t\t\t\t':alumni' => $alumni\n\t\t\t\t);\n\n\t\t\t\t$stmt2 = $db->prepare($query2);\n\n\t\t\t\tif (!$stmt2->execute($sqlVars2)){\n\t\t\t\t\t\t// Error: column does not exist\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\n $stmt2 = null;\n\t\t\t\tif($alumni==1){\n\t\t\t\t\tdbAddUserToGroups($inserted_id,5);\n\t\t\t\t}\n\t\t\t\tautoSubscribe($inserted_id);\n return $inserted_id;\n\n } catch (PDOException $e) {\n addAlert(\"danger\", \"Oops, looks like our database encountered an error.\");\n error_log(\"Error in \" . $e->getFile() . \" on line \" . $e->getLine() . \": \" . $e->getMessage());\n return false;\n } catch (ErrorException $e) {\n addAlert(\"danger\", \"Oops, looks like our server might have goofed. If you're an admin, please check the PHP error logs.\");\n return false;\n }\n}",
"function addUser()\n{\n $username = Slim::getInstance()->request()->post('username');\n $password = Slim::getInstance()->request()->post('password');\n\n $sql = \"SELECT username FROM users WHERE username=:username\";\n\n try\n {\n $db = getConnection();\n\n $stmt = $db->prepare($sql);\n $stmt->bindParam(\"username\", $username);\n $stmt->execute();\n $db = null;\n $username_test = $stmt->fetchObject();\n\n if($username_test) {\n echo \"error_username\";\n return;\n }\n }\n catch(PDOException $e) \n {\n echo '{\"error\":{\"text\":'. $e->getMessage() .'}}'; \n }\n\n\n $sql = \"INSERT INTO users (username, password) VALUES (:username, :password)\";\n\n try\n {\n $db = getConnection();\n\n $stmt = $db->prepare($sql);\n $stmt->bindParam(\"username\", $username);\n $stmt->bindParam(\"password\", $password);\n\n $stmt->execute();\n $db = null;\n\n }\n catch(PDOException $e) \n {\n echo '{\"error\":{\"text\":'. $e->getMessage() .'}}'; \n }\n}",
"function addItemToDB()\n {\n $this->database->addItemToDB($this);\n }",
"public function addToDb ($user_id) {\n\n $_data = array();\n $this->generateAssocData ($_data);\n \n # Associate this venue with this user\n $_data['user_id'] = $user_id;\n \n # Unix timestamp of when this venue was created / modified\n $_data['created'] = Time::now();\n $_data['modified'] = Time::now(); \n \n return DB::instance(DB_NAME)->insert('venues', $_data);\n }",
"protected function _getDatabaseAdapter()\n {\n // initialize the Adapter\n $adapter = new TDProject_Core_Model_Auth_Adapter_Database(\n $this->getUsername(),\n $this->getPassword()\n );\n // add it to the internal array\n $this->_adapters[] = $adapter->setContainer($this->getContainer());\n }",
"public function addToDB(&$dbForm) {\n\t\t$values = $this->value();\n\t\tif ($this->db_join) {\n\t\t\t$save = Array();\n\t\t\tforeach ($this->options as $value => $label) {\n\t\t\t\tif ($values[$value]) {\n\t\t\t\t\t$save []= $label;\n\t\t\t\t}\n\t\t\t}\n\t\t\tforeach ($this->others as $value => $label) {\n\t\t\t\tif ($values[$value]) {\n\t\t\t\t\t$save []= $label.\":: \".$values[$value];\n\t\t\t\t}\n\t\t\t}\n#\t\t\tif ($this->other && $values[$this->other_name]) {\n#\t\t\t\t$save []= \"[\".$this->other_label.\"] \".$values[$this->other_name];\n#\t\t\t}\n\n\t\t\t$dbForm->addItem($dbForm->dbName($this->label()), join(\" | \", $save));\n\t\t} else {\n\t\t\tforeach ($this->options as $value => $label) {\n\t\t\t\t$dbForm->addItem($dbForm->dbName($label), ($values[$value]?'X':''));\n\t\t\t}\n foreach ($this->others as $value => $label) {\n\t\t\t\t$dbForm->addItem($dbForm->dbName($label), ($values[$value]));\n\t\t\t}\n\t\t}\n\t}",
"function registerUser()\n {\n $DBA = new DatabaseInterface();\n $fields = array(0 => 'title', 1 => 'first_name', 2 => 'last_name', 3 => 'contacttelephone', 4 => 'contactemail', 5 => 'password', 6 => 'username', 7 => 'dob', 8 => 'house', 9 => 'street', 10 => 'town', 11 => 'county', 12 => 'pcode', 13 => 'optout', 14 => 'newsletter', 15 => 'auth_level');\n $fieldvals = array(0 => $this->Title, 1 => $this->FirstName, 2 => $this->LastName, 3 => $this->ContactTelephone, 4 => $this->ContactEmail, 5 => $this->Password, 6 => $this->Username, 7 => $this->DOB, 8 => $this->House, 9 => $this->Street, 10 => $this->Town, 11 => $this->County, 12 => $this->PCode, 13 => $this->Optout, 14 => $this->NewsletterSubscriber, 15 => $this->AuthLevel);\n $rs = $DBA->insertQuery(DBUSERTABLE, $fields, $fieldvals);\n if ($rs == 1)\n {\n $this->RegistrationSuccess = 1;\n }\n if (isset($this->PCode))\n {\n $this->geoLocate();\n }\n unset($DBA, $rs, $fields, $fieldvals);\n $DBA = new DatabaseInterface();\n $fields = array(0 => 'id');\n $idfields = array(0 => 'username');\n $idvals = array(0 => $this->Username);\n $rs = $DBA->selectQuery(DBUSERTABLE, $fields, $idfields, $idvals);\n if (!isset($rs[2]))\n {\n while ($res = mysql_fetch_array($rs[0]))\n {\n $this->setUserVar('ID', $res['id']);\n }\n }\n unset($DBA, $rs, $fields, $idfields, $idvals);\n }",
"public function setDbDetails($name, $user, $pass)\n {\n $this->_dbName = $name;\n $this->_dbUser = $user; \n $this->_dbPassword = $pass;\n }",
"public static function createDatabaseDriver(){\n return \\Illuminate\\Auth\\AuthManager::createDatabaseDriver();\n }",
"public function addUserToDb($token) {\n\t\t\trequire_once('classes/canvasWrapper.php');\n\t\t\t$canvas = new CanvasWrapper();\n\t\t\t$user = $canvas->formatUserData();\n\t\t\t$sql = \"INSERT INTO users (osuId,token,name) VALUES (\" . $user->user_id . \",'\" . $token . \"','\" . $user->name . \"')\";\n\t\t\t$result = $this->db->query($sql);\n\t\t}"
] |
[
"0.70040447",
"0.6190715",
"0.5931054",
"0.58137834",
"0.5799467",
"0.57937866",
"0.57405704",
"0.570636",
"0.5698795",
"0.5693047",
"0.5623912",
"0.5619905",
"0.5607132",
"0.559152",
"0.55761933",
"0.55392146",
"0.5537491",
"0.546928",
"0.53566426",
"0.5355839",
"0.53334945",
"0.53304607",
"0.53278136",
"0.5313729",
"0.5313028",
"0.52969813",
"0.5289999",
"0.5279932",
"0.527429",
"0.52737105"
] |
0.65522146
|
1
|
Check if a specific date is greater than another
|
public static function dateGreater($date1, $date2)
{
$timestamp1 = strtotime($date1);
$timestamp2 = strtotime($date2);
if($timestamp1 > $timestamp2){
return true;
}else
{
return false;
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static function is_date_greater(DateTime $date1, DateTime $date2){\r\n \r\n return $date1->format(\"Ymd\") >= $date2->format(\"Ymd\");\r\n \r\n// var_dump($date1->format(\"Ymd\"));\r\n \r\n \r\n }",
"function greaterDate($start_date = null, $end_date = null, $equalTo = false)\n {\n $start = strtotime($start_date);\n $end = strtotime($end_date);\n if ($end-$start > 0)\n return true;\n else if ($equalTo && $end-$start >= 0)\n return true;\n else\n return false;\n }",
"function greaterDate($start_date,$end_date)\r\n\t\t{\r\n\t\t $start = strtotime($start_date);\r\n\t\t $end = strtotime($end_date);\r\n\t\t if ($start-$end > 0)\r\n\t\t return 1;\r\n\t\t else\r\n\t\t return 0;\r\n\t\t}",
"private function compare_with_date()\n {\n }",
"public static function greaterDate($start_date, $end_date)\r\n {\r\n $start = strtotime($start_date);\r\n $end = strtotime($end_date);\r\n if ($start - $end > 0)\r\n return 1;\r\n else\r\n return 0;\r\n }",
"public static function compare(Date $a, Date $b) {\n return $b->compareTo($a);\n }",
"public function isLaterThan(Tiramizoo_Shipping_Model_Date $date)\n {\n \treturn $this->getTimestamp() > $date->getTimestamp();\n }",
"function is_fecha1_menor($fecha1,$fecha2){\n $dtime1 = strtotime(fecha_mysql($fecha1));\n $dtime2 = strtotime(fecha_mysql($fecha2));\n if($dtime1<$dtime2){\n return true;\n }{\n return false;\n }\n}",
"function comparedate( ) {\n\t$check_in_date = \"2013-12-25\";\n\t$check_out_date = \"2013-12-26\";\n\n\n\t\tif ( $check_in_date > $check_out_date ) {\n\t\t\techo \" check in date is first than check out date\";\n\t\t}else{ \n\t\t\techo \"na bali and check in may na ulahi\";\n\t\t}\n\t}",
"function date_compare($a, $b) {\n //var_dump($a);\n $t1 = strtotime($a);\n $t2 = strtotime($b);\n // The negative in front the result sorts by the most recent entry\n return -($t1 - $t2);\n }",
"public function testDateGreaterThan($min, $format, $inclusive, $date, $expected)\n {\n $validator = new DateGreaterThan(\n [\n 'min' => $min,\n 'format' => $format,\n 'inclusive' => $inclusive\n ]\n );\n\n $this->assertEquals($expected, $validator->isValid($date));\n }",
"protected function isGreaterThan($comparedDate, $referenceDate): bool\n {\n return $this->compare($comparedDate, $referenceDate) > 0;\n }",
"function dateCompare($dateToCompare, $dateModified) {\n\t// these dates are expected in unixtimestamp\n\tif ($dateModified > $dateToCompare)\n\t\treturn true;\n\telse\n\t\treturn false;\n}",
"public function testDateGreaterThanOptions()\n {\n $options = [\n 'min' => '2020-06-05',\n 'format' => 'Y-m-d',\n 'inclusive' => false,\n ];\n $validator = new DateGreaterThan($options);\n\n $optionsValidator = [\n 'min' => $validator->getMin(),\n 'format' => $validator->getFormat(),\n 'inclusive' => $validator->getInclusive(),\n ];\n\n $this->assertSame($options, $optionsValidator);\n }",
"public function DateGreater($time) {\n $this->filter->Greater('udate', $time);\n }",
"public function date_compare($a, $b) {\n\t\t$t1 = strtotime ( $a ['date'] );\n\t\t$t2 = strtotime ( $b ['date'] );\n\t\treturn $t1 - $t2;\n\t}",
"function CHECK_valability($endDATE) {\n\n $TMSP_end = strtotime($endDATE);\n $TMSP_today = time();\n\n if($TMSP_end > $TMSP_today) return true;\n else return false;\n }",
"static function compareDates($date, $referenceDate)\n {\n $dateTimestamp = strtotime($date);\n $referenceDateTimestamp = strtotime($referenceDate);\n\n if ($dateTimestamp > $referenceDateTimestamp)\n return true;\n else\n return false;\n }",
"function date_compare($a, $b) {\n\t\t $t1 = strtotime($a['debut']);\n\t\t $t2 = strtotime($b['debut']);\n\t\t return $t1 - $t2;\n\t\t}",
"function isPast()\r\n {\r\n $agora = new Date();\r\n if($this->before($agora)) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }",
"function dateCompare($a, $b) { \n\t\t\t\t\t\tif(sameDate($a->startDate, $b->startDate)) {\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn ($a->startDate->getTimestamp() < $b->startDate->getTimestamp()) ? -1 : 1;\n\t\t\t\t\t}",
"private static function DateCmp($a, $b)\n {\n if ($a[1]<$b[1])\n $r = -1;\n else if ($a[1]>$b[1])\n $r = 1;\n else $r=0;\n return $r;\n }",
"function compareDates($date1, $time1, $date2, $time2) {\n\t\t//Get individual values\n\t\t$d1arr = explode(\"/\",$date1);\n\t\t$t1arr = explode(\"/\",$time1);\n\t\t$d2arr = explode(\"/\",$date2);\n\t\t$t2arr = explode(\"/\",$time2);\n\t\t//Get time in seconds\n\t\t$start = mktime($t1arr[0],$t1arr[1],0,$d1arr[1],$d1arr[2],$d1arr[0]);\n\t\t$end = mktime($t2arr[0],$t2arr[1],0,$d2arr[1],$d2arr[2],$d2arr[0]);\n\t\treturn $start >= $end;\n\t}",
"function validateDateRange($date1, $date2){\n\treturn ( strtotime($date1) - strtotime($date2) ) <= 0;\t//should be a negative number, or 0 if posts=expiration\n}",
"public function isLater(Date $date)\n {\n return $this->getTimestamp() > $date->getTimestamp();\n }",
"public function isGreaterThan(self $that): bool;",
"function intervalGreaterThan($interval1,$interval2)\n{\n\n $e = new DateTime('00:00');\n $f = clone $e;\n $e->add($interval1);\n $f->add($interval2);\n\n return $e>$f;\n}",
"protected function isGreaterThanOrEqualTo(\n $comparedDate,\n $referenceDate\n ): bool {\n return $this->compare($comparedDate, $referenceDate) >= 0;\n }",
"function buscar_fecha ($fecha) {\n global $DB;\n $fechamin = buscar_menor_fecha();\n $fechamax = buscar_mayor_fecha();\n if ($fecha >= $fechamin->date && $fecha <= $fechamax->date) {\n return true;\n } else {\n return false;\n }\n}",
"function date_larger($ended_date = NULL, $started_date) {\n\n // Ended date value is not required , only check when $ended_date has value\n if($ended_date && strtotime($ended_date) < strtotime($started_date)) {\n $this->set_message('date_larger', '終了日時は開始日時より後になるように設定してください。');\n return FALSE;\n }\n\n return TRUE;\n }"
] |
[
"0.77825433",
"0.77091247",
"0.73620564",
"0.71635634",
"0.6977342",
"0.68906087",
"0.6753108",
"0.67075515",
"0.65824646",
"0.65369284",
"0.6530378",
"0.64471173",
"0.63764745",
"0.6376147",
"0.6354954",
"0.63528216",
"0.6348756",
"0.634279",
"0.63399273",
"0.63001186",
"0.62524754",
"0.6241362",
"0.62372327",
"0.62157243",
"0.6193255",
"0.6185989",
"0.6184825",
"0.6181909",
"0.6156349",
"0.6147355"
] |
0.7834326
|
0
|
Check if two dates are equal
|
public static function datesEqual($date1, $date2)
{
$timestamp1 = strtotime($date1);
$timestamp2 = strtotime($date2);
if($timestamp1 == $timestamp2){
return true;
}else
{
return false;
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private function compare_with_date()\n {\n }",
"function date_compare($first_date, $second_date)\n{\n $first_date = date('Ymd', strtotime($first_date));\n $second_date = date('Ymd', strtotime($second_date));\n\n if ($first_date == $second_date) {\n return 0;\n } else {\n if ($first_date > $second_date) {\n return 1;\n } else {\n return 2;\n }\n }\n}",
"public function isSameDay()\n {\n $this->getSameDay();\n }",
"static public function compareDates($initialDate, $finalDate=''){\n\t\tif($finalDate===\"\"){\n\t\t\t$finalDate = self::getCurrentDate();\n\t\t}\n\t\t$initialDate = new Date($initialDate);\n\t\t$finalDate = new Date($finalDate);\n\t\treturn self::_cmp($initialDate->getTimestamp(), $finalDate->getTimestamp());\n\t}",
"function dateCompare($a, $b) { \n\t\t\t\t\t\tif(sameDate($a->startDate, $b->startDate)) {\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn ($a->startDate->getTimestamp() < $b->startDate->getTimestamp()) ? -1 : 1;\n\t\t\t\t\t}",
"static public function isEquals($initialDate, $finalDate){\n\t\treturn self::compareDates($initialDate, $finalDate) == 0 ? true : false;\n\t}",
"public static function compareDates($date1, $date2)\r\n {\r\n if (!is_numeric($date1)) {\r\n $date1 = izDateTime::timeStringToStamp($date1);\r\n }\r\n if (!is_numeric($date2)) {\r\n $date2 = izDateTime::timeStringToStamp($date2);\r\n }\r\n if ($date1 < $date2) {\r\n return -1;\r\n } else if ($date1 > $date2) {\r\n return 1;\r\n } else {\r\n return 0;\r\n }\r\n }",
"function compareDates($date1, $time1, $date2, $time2) {\n\t\t//Get individual values\n\t\t$d1arr = explode(\"/\",$date1);\n\t\t$t1arr = explode(\"/\",$time1);\n\t\t$d2arr = explode(\"/\",$date2);\n\t\t$t2arr = explode(\"/\",$time2);\n\t\t//Get time in seconds\n\t\t$start = mktime($t1arr[0],$t1arr[1],0,$d1arr[1],$d1arr[2],$d1arr[0]);\n\t\t$end = mktime($t2arr[0],$t2arr[1],0,$d2arr[1],$d2arr[2],$d2arr[0]);\n\t\treturn $start >= $end;\n\t}",
"public function isEqualTo(Tiramizoo_Shipping_Model_Date $date)\n {\n return $this->getTimestamp() == $date->getTimestamp();\n }",
"function is_fecha1_menor($fecha1,$fecha2){\n $dtime1 = strtotime(fecha_mysql($fecha1));\n $dtime2 = strtotime(fecha_mysql($fecha2));\n if($dtime1<$dtime2){\n return true;\n }{\n return false;\n }\n}",
"public function date_compare($a, $b) {\n\t\t$t1 = strtotime ( $a ['date'] );\n\t\t$t2 = strtotime ( $b ['date'] );\n\t\treturn $t1 - $t2;\n\t}",
"public static function is_date_greater(DateTime $date1, DateTime $date2){\r\n \r\n return $date1->format(\"Ymd\") >= $date2->format(\"Ymd\");\r\n \r\n// var_dump($date1->format(\"Ymd\"));\r\n \r\n \r\n }",
"function comparedates($a, $b)\n\t{\n\n\t\tif (!array_key_exists('DTSTART', $a) || !array_key_exists('DTSTART', $b))\n\t\t{\n\t\t\techo \"help<br/>\";\n\t\t}\n\t\tif ($a['DTSTART'] == $b['DTSTART']) return 0;\n\n\t\treturn ($a['DTSTART'] > $b['DTSTART']) ? +1 : -1;\n\t}",
"function compare_date($date1, $date2, $format, $operator){\r\n\t// exemplo 1: compare_date(\"20/02/2009\",\"23/02/2009\",\"d/m/Y\",\"<\"); (retorna FALSE)\r\n\t// exemplo 2: compare_date(\"2001-08-10\",\"2001-08-10\",\"Y-m-d\",\"==\"); (retorna TRUE)\r\n\t$separator = substr($format, 1, 1);\r\n\t$format = explode($separator, strtoupper($format));\r\n\t$date1 = explode($separator, $date1);\r\n\t$date2 = explode($separator, $date2);\r\n\tforeach($format as $i => $char){\r\n\t\tswitch($char){\r\n\t\t\tcase \"D\":\r\n\t\t\t\t$day1 = $date1[$i];\r\n\t\t\t\t$day2 = $date2[$i];\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"M\":\r\n\t\t\t\t$mon1 = $date1[$i];\r\n\t\t\t\t$mon2 = $date2[$i];\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"Y\":\r\n\t\t\t\t$yea1 = $date1[$i];\r\n\t\t\t\t$yea2 = $date2[$i];\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\t$date1 = @mktime(0, 0, 0, $mon1, $day1, $yea1);\r\n\t$date2 = @mktime(0, 0, 0, $mon2, $day2, $yea2);\r\n\tswitch($operator){\r\n\t\tcase \"==\": return ($date1 == $date2);\r\n\t\t\tbreak;\r\n\t\tcase \"!=\": return ($date1 != $date2);\r\n\t\t\tbreak;\r\n\t\tcase \">\" : return ($date1 > $date2);\r\n\t\t\tbreak;\r\n\t\tcase \"<\" : return ($date1 < $date2);\r\n\t\t\tbreak;\r\n\t\tcase \">=\": return ($date1 >= $date2);\r\n\t\t\tbreak;\r\n\t\tcase \"<=\": return ($date1 <= $date2);\r\n\t\t\tbreak;\r\n\t}\r\n}",
"function comparedate( ) {\n\t$check_in_date = \"2013-12-25\";\n\t$check_out_date = \"2013-12-26\";\n\n\n\t\tif ( $check_in_date > $check_out_date ) {\n\t\t\techo \" check in date is first than check out date\";\n\t\t}else{ \n\t\t\techo \"na bali and check in may na ulahi\";\n\t\t}\n\t}",
"public static function compare(Date $a, Date $b) {\n return $b->compareTo($a);\n }",
"public function date_compare($a, $b)\n\t{\n\t\t$t1 = strtotime($a);\n\t\t$t2 = strtotime($b);\n\t\treturn $t1 - $t2;\n\t}",
"private function checkNewCommondaty()\n {\n $date = new DateTime($this->addDate);\n $date->modify(self::TIME_INTERVAL);\n $date->format('Y-m-d H:i:s');\n $dateNow = new DateTime();\n $dateNow->format('Y-m-d H:i:s');\n\n if ($dateNow < $date) {\n return 1;\n }\n return 0;\n }",
"function solucion($fecha1, $fecha2){\r\n $respuesta=false;\r\nif($fecha1 < $fecha2){\r\n //$respuesta=true\r\n echo \"es mayor\" (date(\"d-m-Y\",$fecha1));\r\n}else{\r\n\techo \"La fecha menor\";\r\n }\r\nreturn $respuesta; \r\n }",
"function date_compare($a, $b) {\n\t\t $t1 = strtotime($a['debut']);\n\t\t $t2 = strtotime($b['debut']);\n\t\t return $t1 - $t2;\n\t\t}",
"private function checkDate($start_date, $end_date, $start_date_2, $end_date_2) {\n // Convert to timestamp\n $date['start'] = strtotime($start_date);\n $date['end'] = strtotime($end_date);\n $date2['start'] = strtotime($start_date_2);\n $date2['end'] = strtotime($end_date_2);\n \n // check if intervals overlap\n if(($date['start'] <= $date2['end']) && ($date['end'] >= $date2['start'])) {\n return FALSE;\n }\n \n return TRUE;\n }",
"function validateDateRange($date1, $date2){\n\treturn ( strtotime($date1) - strtotime($date2) ) <= 0;\t//should be a negative number, or 0 if posts=expiration\n}",
"private function checkDatesValidity(){\n\t\t$valid=true;\n\t\t$today = date(\"Y-m-d\");\n\t\tif($this->validFrom!=\"\" && $this->validFrom!=\"0000-00-00\" && $today<$this->validFrom) $valid=false;\n\t\tif($this->validUntil!=\"\" && $this->validUntil!=\"0000-00-00\" && $today>$this->validUntil) $valid=false;\n\t\treturn $valid;\n\t}",
"protected function _checkDate($from, $to) {\r\n $return = true;\r\n $date = date( 'Y-m-d');\r\n $today = strtotime ($date);\r\n if ($from && $today < $from) {\r\n $return = false;\r\n }\r\n if ($to && $today > $to) {\r\n $return = false;\r\n }\r\n if (! $to && ! $from) {\r\n $return = false;\r\n }\r\n return $return;\r\n }",
"function dateCompare($dateToCompare, $dateModified) {\n\t// these dates are expected in unixtimestamp\n\tif ($dateModified > $dateToCompare)\n\t\treturn true;\n\telse\n\t\treturn false;\n}",
"public function validateDate()\n {\n if (\n ($from = $this->getAvailableFrom()) &&\n ($till = $this->getAvailableTill()) &&\n $from->InPast() &&\n $till->InFuture()\n ) {\n return true;\n }\n\n return false;\n }",
"public function dateEquals($date)\n {\n return $this->rule(\"date_equals:$date\");\n }",
"function valida_dates($enter_date, $obsolescense_date)\n{\n $day1 = substr($enter_date, 0, 2);\n $month1 = substr($enter_date, 3, 2);\n $year1 = substr($enter_date, 6, 4);\n $day2 = substr($obsolescense_date, 0, 2);\n $month2 = substr($obsolescense_date, 3, 2);\n $year2 = substr($obsolescense_date, 6, 4);\n\n if ($enter_date <= $obsolescense_date) {\n return true;\n }\n\n return false;\n}",
"public static function compareDates( $date1, $date2 )\n\t{\n\t\t$date1 = strtotime( $date1 );\n\t\t$date2 = strtotime( $date2 );\n\n\t\tif ( $date1 < $date2 )\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\telseif( $date1 > $date2 )\n\t\t{\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn 0;\n\t}",
"public function hasDate() : bool;"
] |
[
"0.7355435",
"0.6695659",
"0.66203266",
"0.6567592",
"0.65156215",
"0.6439691",
"0.63848853",
"0.63383585",
"0.63123226",
"0.6251001",
"0.6215478",
"0.6208655",
"0.6199862",
"0.61702895",
"0.6169341",
"0.61678207",
"0.61504036",
"0.6122958",
"0.60929704",
"0.6046396",
"0.60433435",
"0.6014339",
"0.6001149",
"0.59932977",
"0.59914917",
"0.5988235",
"0.5979917",
"0.59649444",
"0.59522825",
"0.59336585"
] |
0.7823088
|
0
|
Check days passed between two dates
|
public static function daysPassed($date1, $date2)
{
$timestamp1 = strtotime($date1);
$timestamp2 = strtotime($date2);
$datediff = $timestamp1 - $timestamp2;
return floor($datediff/(60*60*24));
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function validateDateRange($date1, $date2){\n\treturn ( strtotime($date1) - strtotime($date2) ) <= 0;\t//should be a negative number, or 0 if posts=expiration\n}",
"static function daysBetweenDates($date1, $date2)\n\t{\n\t\t// If input dates have datetime 'Y-m-d X' format, take only the date part\n\t\tlist($d1) = array_pad(explode(' ',$date1), 1, 0);\n\t\tlist($d2) = array_pad(explode(' ',$date2), 1, 0);\n\t\t\n\t\tif( !self::checkDate($d1) || !self::checkDate($d2)){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif( !($dates = self::splitDates($d1, $d2)) ) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn (count($dates) - 1);\n\t}",
"function getdays($date1,$date2)\r\n {\r\n return round((strtotime($date2)-strtotime($date1))/(24*60*60),0);\r\n }",
"function getDaysBetweenDates($date_from, $date_to)\n {\n $number_of_days=0;\n\n if (verifyDate($date_from, \"Y-m-d\") && verifyDate($date_to, \"Y-m-d\"))\n {\n $date_to=new DateTime($date_to);\n $date_from=new DateTime($date_from);\n $number_of_days=$date_from->diff($date_to)->format(\"%a\");\n }\n\n return $number_of_days;\n }",
"public function isDayPassed()\n {\n return ($this->declineTime < (time() - self::ONE_DAY_IN_SECONDS));\n }",
"function count_days( $a, $b )\n {\n // First we need to break these dates into their constituent parts:\n $gd_a = getdate( $a );\n $gd_b = getdate( $b );\n\n // Now recreate these timestamps, based upon noon on each day\n // The specific time doesn't matter but it must be the same each day\n $a_new = mktime( 12, 0, 0, $gd_a['mon'], $gd_a['mday'], $gd_a['year'] );\n $b_new = mktime( 12, 0, 0, $gd_b['mon'], $gd_b['mday'], $gd_b['year'] );\n\n // Subtract these two numbers and divide by the number of seconds in a\n // day. Round the result since crossing over a daylight savings time\n // barrier will cause this time to be off by an hour or two.\n return round( abs( $a_new - $b_new ) / 86400 );\n }",
"public static function is_reservtion_possible(DateTime $date1, DateTime $date2, Room $room_for_check){\r\n if ($date1>$date2) return false;\r\n \r\n $unavailable_dates = (new self)->all_unavailable_dates($room_for_check);\r\n// var_dump($unavailable_dates); \r\n $unav_dates_between = array();\r\n foreach($unavailable_dates as $the_date){\r\n if (self::is_date_greater($the_date, $date1) && self::is_date_greater($date2, $the_date)){\r\n $unav_dates_between[] = $the_date;\r\n// var_dump($the_date);\r\n break;\r\n \r\n }\r\n }\r\n// var_dump($unav_dates_between);\r\n return empty($unav_dates_between);\r\n}",
"private function compare_with_date()\n {\n }",
"private function checkDatesValidity(){\n\t\t$valid=true;\n\t\t$today = date(\"Y-m-d\");\n\t\tif($this->validFrom!=\"\" && $this->validFrom!=\"0000-00-00\" && $today<$this->validFrom) $valid=false;\n\t\tif($this->validUntil!=\"\" && $this->validUntil!=\"0000-00-00\" && $today>$this->validUntil) $valid=false;\n\t\treturn $valid;\n\t}",
"function getNumberOfDays($date1, $date2)\n\t{\n\t\t$datetime1 = new DateTime($date1);\n\t\t$datetime2 = new DateTime($date2);\n\t\t$interval = $datetime1->diff($datetime2);\n\t\treturn $interval->format('%a');\n\t}",
"function dateDiffDay ($d1, $d2) {\n// Return the number of days between the two dates:\n\n return round(abs(strtotime($d1)-strtotime($d2))/(DAY_VAL));\n\n}",
"public function validateDates(&$start, &$end) {\n $sixMonthsAgo = strtotime(\"-6 months\");\n $day = 86400;\n $end = time();\n \n if (!$start) {\n $start = strtotime(\"-7 days\");\n }\n \n $gap = $end - $start; \n \n //Don't mess the dates!\n switch ($gap) {\n case $gap < ($day * 31) :\n $gap = $day * 7;\n break;\n\n case $gap < ($day * 180) ://6 months\n $gap = $day * 31;\n break;\n \n case $gap >= ($day * 180) : \n default : \n $gap = $day * 180; \n break;\n }\n \n $end = time();\n $start = $end - $gap;\n }",
"public function getTotalDifferenceInDays();",
"private static function start_of_count_down($date1,$date2){\n $stat=0;\n \n for($i=0;$i<3;$i++){\n if($date2[$i]>$date1[$i]){\n $stat=1;\n break;\n }\n }\n return $stat;\n }",
"public function getNumberOfDaysBetweenTwoDates() {\n\t return str_replace(\"-\",\"\", $this->calculateNumberOfDays());\n\t}",
"function dateDiffInDays($date1, $date2) \n\t{\n\t\t$diff = strtotime($date2) - strtotime($date1); \n\t\t \n\t\t// 1 day = 24 hours \n\t\t// 24 * 60 * 60 = 86400 seconds \n\t\treturn abs(round($diff / 86400)); \n\t}",
"function CompareDates($arrDateData){\n $intLastDay = 0;\n foreach($arrDateData as $intCalendarId=>$arrDates){\n if(sizeof($arrDates) < 2){\n $this->strResults .= 'Cannot compare less than two dates!';\n continue 1;\n }\n $this->strResults .= '<h3>Calendar ID ['.$intCalendarId.']</h3>';\n $this->strResults .= '<h4>There are ['.sizeof($arrDates).'] dates selected</h4>';\n foreach($arrDates as $intIndex=>$intDate){\n if($intIndex == 0){\n $intLastDay = $intDate;\n continue 1;\n }\n $this->strResults .= 'Day '.($intIndex).' '.$this->MakeDateFromMembers($intLastDay).' is '.($intDate - $intLastDay).' days apart from day '.($intIndex + 1).' '.$this->MakeDateFromMembers($intDate).'.<br />';\n $intLastDay = $intDate;\n }\n }\n return TRUE;\n }",
"function dateDiffInDays($date11, $date22) \n {\n $diff = strtotime($date22) - strtotime($date11); \n \n // 1 day = 24 hours \n // 24 * 60 * 60 = 86400 seconds \n return abs(round($diff / 86400)); \n }",
"function dateDiffInDays($date11, $date22) \n {\n $diff = strtotime($date22) - strtotime($date11); \n \n // 1 day = 24 hours \n // 24 * 60 * 60 = 86400 seconds \n return abs(round($diff / 86400)); \n }",
"private function CheckDateOverlapping()\n\t{\n\t\t$rid = MicroGrid::GetParameter('rid');\n\t\t$start_date = MicroGrid::GetParameter('start_date', false);\n\t\t$finish_date = MicroGrid::GetParameter('finish_date', false);\n\t\t$hotel_id = MicroGrid::GetParameter('hotel_id', false);\n\n\t\t$sql = 'SELECT * FROM '.TABLE_HOTEL_PERIODS.'\n\t\t\t\tWHERE\n\t\t\t\t\tid != '.(int)$rid.' AND\n\t\t\t\t\thotel_id = '.(int)$hotel_id.' AND\n\t\t\t\t\t(((\\''.$start_date.'\\' >= start_date) AND (\\''.$start_date.'\\' <= finish_date)) OR\n\t\t\t\t\t((\\''.$finish_date.'\\' >= start_date) AND (\\''.$finish_date.'\\' <= finish_date))) ';\t\n\t\t$result = database_query($sql, DATA_AND_ROWS, FIRST_ROW_ONLY);\n\t\tif($result[1] > 0){\n\t\t\t$this->error = _TIME_PERIOD_OVERLAPPING_ALERT;\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public function cakeFestDaysLeft()\n {\n $startDate = Configure::read('Site.cakefest.start_date');\n\n return (new Time($startDate))->diff(new Time())->days;\n }",
"protected function _checkDate($from, $to) {\r\n $return = true;\r\n $date = date( 'Y-m-d');\r\n $today = strtotime ($date);\r\n if ($from && $today < $from) {\r\n $return = false;\r\n }\r\n if ($to && $today > $to) {\r\n $return = false;\r\n }\r\n if (! $to && ! $from) {\r\n $return = false;\r\n }\r\n return $return;\r\n }",
"function valida_dates($discharge_day, $expiry_day) {\n //conole.log( $discharge_day + \"\" + $expiry_day);\n $discharge_day = date(\"m/d/Y\", strtotime($discharge_day));\n $expiry_day = date(\"m/d/Y\", strtotime($expiry_day));\n\n $discharge_day_arr = explode('/', $discharge_day);\n $expiry_day_arr = explode('/', $expiry_day);\n\n $dateOne = new DateTime($discharge_day_arr[2] . \"-\" . $discharge_day_arr[0] . \"-\" . $discharge_day_arr[1]);\n $dateTwo = new DateTime($expiry_day_arr[2] . \"-\" . $expiry_day_arr[0] . \"-\" . $expiry_day_arr[1]);\n\n if ($dateOne < $dateTwo) {\n return true;\n }\n return false;\n}",
"function checkBeforeToday($day_to_check,$today_check){\n\n\n $today_time = strtotime($today_check);\n $check_time = strtotime($day_to_check);\n\n if ($check_time <= $today_time) {\n return \"true\" ;\n }\n else {\n return \"false\" ;\n\n }\n\n}",
"function comparedates($a, $b)\n\t{\n\n\t\tif (!array_key_exists('DTSTART', $a) || !array_key_exists('DTSTART', $b))\n\t\t{\n\t\t\techo \"help<br/>\";\n\t\t}\n\t\tif ($a['DTSTART'] == $b['DTSTART']) return 0;\n\n\t\treturn ($a['DTSTART'] > $b['DTSTART']) ? +1 : -1;\n\t}",
"public function test_start_date_is_after_end_date()\n {\n // show actiual errors without handling\n //$this->withoutExceptionHandling();\n \n $this->json('POST', '/', array_merge($this->data(),['start_date'=>date('Y-m-d', strtotime('+35 days')),'end_date'=>date('Y-m-d')]))\n ->seeJson([\n 'start_date' => [\"The start date must be a date before end date.\",\"The start date must be a date before today.\"]\n ]);\n \n }",
"function DayDifferences($y_from, $m_from, $d_from, $y_to, $m_to, $d_to){\n $from = new DateTime($y_from.'-'.$m_from.'-'.$d_from);\n $to = new DateTime($y_to.'-'.$m_to.'-'.$d_to);\n return ($to->getTimeStamp() - $from->getTimeStamp())/3600/24;\n }",
"public function getRemainDateCount($startDate,$endDate)\r\n {\r\n // mysql date convert to timeStamp\r\n $startDateUnix = mysql_to_unix($startDate);\r\n $endDateUnix = mysql_to_unix($endDate);\r\n\r\n\r\n // check reservation expired\r\n if(($endDateUnix-$startDateUnix) > 0)\r\n {\r\n // get remain seconds\r\n $remainSeconds = $endDateUnix-$startDateUnix;\r\n // get remain dates\r\n return ((($remainSeconds /24) /60) /60);\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n \r\n }",
"function diffInDays ($firstDate, $secondDate)\n\t{\n\t\t$diff = $firstDate - $secondDate;\n\t\t$dayInSecs = 60 * 60 * 24;\n\t\treturn ($diff/$dayInSecs);\n\t}",
"function CHECK_valability($endDATE) {\n\n $TMSP_end = strtotime($endDATE);\n $TMSP_today = time();\n\n if($TMSP_end > $TMSP_today) return true;\n else return false;\n }"
] |
[
"0.7072083",
"0.68539184",
"0.67325306",
"0.6631316",
"0.65535676",
"0.6448423",
"0.6415305",
"0.6362149",
"0.63263047",
"0.62962884",
"0.62887293",
"0.6268182",
"0.6198297",
"0.61981803",
"0.6181604",
"0.6178472",
"0.61684",
"0.6160423",
"0.6160423",
"0.6145939",
"0.613001",
"0.60899055",
"0.6068368",
"0.6062145",
"0.6051884",
"0.6046785",
"0.6040875",
"0.6034018",
"0.60339606",
"0.60268515"
] |
0.72669864
|
0
|
Return years and months passed between two dates
|
public static function yearsMonthsPassed ( $date1, $date2 )
{
$d1 = new DateTime( $date1 );
$d2 = new DateTime( $date2 );
$diff = $d2->diff( $d1 );
// Return array years and months
return array ( $diff->y, $diff->m );
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function monthsDif($start, $end)\n{\n $splitStart = explode('-', date('Y-n',$start));\n $splitEnd = explode('-', date('Y-n',$end));\n\n if (is_array($splitStart) && is_array($splitEnd)) \n {\n $startYear = $splitStart[0];\n $startMonth = $splitStart[1];\n $endYear = $splitEnd[0];\n $endMonth = $splitEnd[1];\n\n $difYears = $endYear - $startYear;\n $difMonth = $endMonth - $startMonth;\n\n if (0 == $difYears && 0 == $difMonth) \n { // month and year are same\n return 0;\n }\n else if (0 == $difYears && $difMonth > 0) \n { // same year, dif months\n return $difMonth;\n }\n else if (1 == $difYears) \n {\n $startToEnd = 13 - $startMonth; // months remaining in start year(13 to include final month\n return ($startToEnd + $endMonth); // above + end month date\n }\n else if ($difYears > 1) \n {\n $startToEnd = 13 - $startMonth; // months remaining in start year \n $yearsRemaing = $difYears - 2; // minus the years of the start and the end year\n $remainingMonths = 12 * $yearsRemaing; // tally up remaining months\n $totalMonths = $startToEnd + $remainingMonths + $endMonth; // Monthsleft + full years in between + months of last year\n return $totalMonths;\n }\n }\n else \n {\n return false;\n }\n}",
"function dateDiffYears($time1, $time2){\n \n $yrs = 0;\n $time1 = date_create($time1);\n $time2 = date_create($time2);\n $diffArray = date_diff($time1, $time2); \n $yrs = $diffArray->format('%R%y'); \n return $yrs * 1;\n}",
"function nb_mois($date1, $date2)\r\n\t{\r\n\t // $end = new DateTime( $date2 );\r\n\t // $end = $end->modify( '+1 month' );\r\n\r\n\t // $interval = DateInterval::createFromDateString('+ 1 month');\r\n\r\n\t // $period = new DatePeriod($begin, $interval, $end);\r\n\t // $counter = 0;\r\n\t // foreach($period as $dt) {\r\n\t // $counter++;\r\n\t // }\r\n\r\n\t // return $counter;\r\n\t\t// $date1 = '2000-01-25';\r\n\t\t// $date2 = '2010-02-20';\r\n\r\n\t\t$ts1 = strtotime($date1);\r\n\t\t$ts2 = strtotime($date2);\r\n\r\n\t\t$year1 = date('Y', $ts1);\r\n\t\t$year2 = date('Y', $ts2);\r\n\r\n\t\t$month1 = date('m', $ts1);\r\n\t\t$month2 = date('m', $ts2);\r\n\r\n\t\t$diff = (($year2 - $year1) * 12) + ($month2 - $month1);\r\n\t\treturn $diff;\r\n\t}",
"function get_age_difference($start_date,$end_date, $separator){\n \n\tlist($start_month,$start_date,$start_year) = explode($separator, $start_date);\n list($current_month,$current_date,$current_year) = explode($separator, $end_date);\n $result = '';\n \n /** days of each month **/\n \n for($x=1 ; $x<=12 ; $x++){\n \n $dim[$x] = date('t',mktime(0,0,0,$x,1,date('Y')));\n \n }\n \n /** calculate differences **/\n \n $m = $current_month - $start_month;\n $d = $current_date - $start_date;\n $y = $current_year - $start_year;\n\n /** if the start day is ahead of the end day **/\n \n if($d < 0) {\n \n $today_day = $current_date + $dim[$current_month];\n $today_month = $current_month - 1;\n $d = $today_day - $start_date;\n $m = $today_month - $start_month;\n if(($today_month - $start_month) < 0) {\n \n $today_month += 12;\n $today_year = $current_year - 1;\n $m = $today_month - $start_month;\n $y = $today_year - $start_year;\n \n }\n \n }\n \n /** if start month is ahead of the end month **/\n \n if($m < 0) {\n \n $today_month = $current_month + 12;\n $today_year = $current_year - 1;\n $m = $today_month - $start_month;\n $y = $today_year - $start_year;\n \n }\n \n /** Calculate dates **/\n \n if($y < 0) {\n \n die(\"Start date entered is a future date.\");\n \n } else {\n \n switch($y) {\n \n case 0 : $result .= ''; break;\n case 1 : $result .= $y.($m == 0 && $d == 0 ? ' Year' : ' Year'); break;\n default : $result .= $y.($m == 0 && $d == 0 ? ' Years' : ' Years');\n \n }\n \n switch($m) {\n \n case 0: $result .= ''; break;\n case 1: $result .= ($y == 0 && $d == 0 ? $m.' Month' : ($y == 0 && $d != 0 ? $m.' Month' : ($y != 0 && $d == 0 ? ' and '.$m.' Month' : ', '.$m.' Month'))); break;\n default: $result .= ($y == 0 && $d == 0 ? $m.' Months' : ($y == 0 && $d != 0 ? $m.' Months' : ($y != 0 && $d == 0 ? ' and '.$m.' Months' : ', '.$m.' Months'))); break;\n \n }\n \n switch($d) {\n \n case 0: $result .= ($m == 0 && $y == 0 ? 'Today' : ''); break;\n case 1: $result .= ($m == 0 && $y == 0 ? $d.' Day' : ($y != 0 || $m != 0 ? ' and '.$d.' Day' : '')); break;\n default: $result .= ($m == 0 && $y == 0 ? $d.' Days' : ($y != 0 || $m != 0 ? ' and '.$d.' Days' : ''));\n \n }\n \n }\n\n return $result;\n \n}",
"public function getDifferenceInYears();",
"function months_diff($date1, $date2 = FALSE)\n{\n $date1 = is_int($date1) ? $date1 : strtotime($date1);\n $date2 = ($date2 === FALSE) ? time() : (is_int($date2) ? $date2 : strtotime($date2));\n\n return (int) floor(abs($date2 - $date1) / (30*60*60*24));;\n}",
"public function age() {\n $years = ((integer) date('Y')) - $this->year;\n\n if (((integer) date('n')) < $this->month) {\n $years -= 1;\n }\n else if (((integer) date('n')) == $this->month) {\n if (((integer) date('j')) < $this->day) {\n $years -= 1;\n }\n }\n\n return $years;\n }",
"protected static function months_between(DateTime $date1, DateTime $date2){\r\n \r\n\r\n $months_between = array();\r\n $m1 = $date1->format('n');\r\n $m2 = $date2->format('n');\r\n $y1 = $date1->format('Y');\r\n $y2 = $date2->format('Y');\r\n// echo \"<h5>1: $m1 $y1 2: $m2 $y2</h5>\";\r\n \r\n $total_months_between = $m2-$m1 + ($y2-$y1)*12 ;\r\n// echo \"<h5>ukupno izmedju $total_months_between</h5>\";\r\n \r\n $date1->modify('first day of this month');\r\n $date2->modify('first day of this month');\r\n $date1->modify('+1 month');\r\n\r\nfor ($i=1; $i<=$total_months_between; $i++){\r\n $month = $date1->format('F');\r\n $month = strtolower($month);\r\n $year = $date1->format('Y');\r\n \r\n $months_between[$year][] = $month;\r\n $date1->modify('+1 month');\r\n }\r\n\r\n \r\n// var_dump($months_between);\r\n return $months_between;\r\n\r\n }",
"public static function getDateDifference($dateStart, $dateEnd) {\r\n \r\n $age = $dateStart->diff($dateEnd)->format(\"%Y year\");\r\n \r\n if ($dateStart->diff($dateEnd)->format(\"%Y\") > 1) {\r\n $age .= \"s\";\r\n }\r\n \r\n if ($dateStart->diff($dateEnd)->format(\"%M\") > 0) {\r\n $age .= $dateStart->diff($dateEnd)->format(\" and %m month\");\r\n \r\n if ($dateStart->diff($dateEnd)->format(\"%m\") > 1) {\r\n $age .= \"s\";\r\n }\r\n }\r\n \r\n return $age;\r\n \r\n }",
"function date_diff($d1, $d2){\n\t$d1 = (is_string($d1) ? strtotime($d1) : $d1);\n\t$d2 = (is_string($d2) ? strtotime($d2) : $d2);\n\n\t$diff_secs = abs($d1 - $d2);\n\t$base_year = min(date(\"Y\", $d1), date(\"Y\", $d2));\n\n\t$diff = mktime(0, 0, $diff_secs, 1, 1, $base_year);\n\t$diffArray = array(\n\t\t\"years\" => date(\"Y\", $diff) - $base_year,\n\t\t\"months_total\" => (date(\"Y\", $diff) - $base_year) * 12 + date(\"n\", $diff) - 1,\n\t\t\"months\" => date(\"n\", $diff) - 1,\n\t\t\"days_total\" => floor($diff_secs / (3600 * 24)),\n\t\t\"days\" => date(\"j\", $diff) - 1,\n\t\t\"hours_total\" => floor($diff_secs / 3600),\n\t\t\"hours\" => date(\"G\", $diff),\n\t\t\"minutes_total\" => floor($diff_secs / 60),\n\t\t\"minutes\" => (int) date(\"i\", $diff),\n\t\t\"seconds_total\" => $diff_secs,\n\t\t\"seconds\" => (int) date(\"s\", $diff)\n\t);\n\tif($diffArray['days'] > 0){\n\t\tif($diffArray['days'] == 1){\n\t\t\t$days = '1 day';\n\t\t}else{\n\t\t\t$days = $diffArray['days'] . ' days';\n\t\t}\n\t\treturn $days . ' and ' . $diffArray['hours'] . ' hours ago';\n\t}else if($diffArray['hours'] > 0){\n\t\tif($diffArray['hours'] == 1){\n\t\t\t$hours = '1 hour';\n\t\t}else{\n\t\t\t$hours = $diffArray['hours'] . ' hours';\n\t\t}\n\t\treturn $hours . ' and ' . $diffArray['minutes'] . ' minutes ago';\n\t}else if($diffArray['minutes'] > 0){\n\t\tif($diffArray['minutes'] == 1){\n\t\t\t$minutes = '1 minute';\n\t\t}else{\n\t\t\t$minutes = $diffArray['minutes'] . ' minutes';\n\t\t}\n\t\treturn $minutes . ' and ' . $diffArray['seconds'] . ' seconds ago';\n\t}else{\n\t\treturn 'Less than a minute ago';\n\t}\n}",
"public static function numMonthsBetweenDates( $date1, $date2 )\n\t{\n\t\t$date_comp = Time::compareDates( $date1, $date2 );\n\t\tif( $date_comp < 1 )\n\t\t{\n\t\t\t$time1\t\t\t= strtotime( $date2 );\n\t\t\t$time2\t\t\t= strtotime( $date1 );\n\t\t}\n\t\telseif( $date_comp > 1 )\n\t\t{\n\t\t\t$time1\t\t\t= strtotime( $date1 );\n\t\t\t$time2\t\t\t= strtotime( $date2 );\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\n\t\t$day_diff\t\t= date( 'j', $time1 ) - date( 'j', $time2 );\n\t\t$months_diff\t= date( 'n', $time1 ) - date( 'n', $time2 );\n\t\t$year_diff\t\t= date( 'Y', $time1 ) - date( 'Y', $time2 );\n\n\t\t$months\t\t\t= $months_diff + ( $year_diff * 12 );\n\t\tif ( $day_diff < 0 )\n\t\t{\n\t\t\t$months = $months - 1;\n\t\t}\n\t\telseif ( $day_diff > 0 )\n\t\t{\n\t\t\t$months = $months + 1;\n\t\t}\n\n\t\treturn $months; \n\t}",
"public function getDifferenceInMonths();",
"function diff_two_dates2($startdate,$enddate){\n $date1 = strtotime($startdate); \n $date2 = strtotime($enddate); \n \n // Formulate the Difference between two dates \n $diff = abs($date2 - $date1); \n \n \n // To get the year divide the resultant date into \n // total seconds in a year (365*60*60*24) \n $years = floor($diff / (365*60*60*24)); \n \n \n // To get the month, subtract it with years and \n // divide the resultant date into \n // total seconds in a month (30*60*60*24) \n $months = floor(($diff - $years * 365*60*60*24) \n / (30*60*60*24)); \n \n \n // To get the day, subtract it with years and \n // months and divide the resultant date into \n // total seconds in a days (60*60*24) \n $days = floor(($diff - $years * 365*60*60*24 - \n $months*30*60*60*24)/ (60*60*24)); \n \n \n // To get the hour, subtract it with years, \n // months & seconds and divide the resultant \n // date into total seconds in a hours (60*60) \n $hours = floor(($diff - $years * 365*60*60*24 \n - $months*30*60*60*24 - $days*60*60*24) \n / (60*60)); \n \n \n // To get the minutes, subtract it with years, \n // months, seconds and hours and divide the \n // resultant date into total seconds i.e. 60 \n $minutes = floor(($diff - $years * 365*60*60*24 \n - $months*30*60*60*24 - $days*60*60*24 \n - $hours*60*60)/ 60); \n \n \n // To get the minutes, subtract it with years, \n // months, seconds, hours and minutes \n $seconds = floor(($diff - $years * 365*60*60*24 \n - $months*30*60*60*24 - $days*60*60*24 \n - $hours*60*60 - $minutes*60)); \n \n // Print the result \n return array(\n 'seconds'=>$seconds,\n 'minutes'=>$minutes,\n 'hours'=>$hours,\n 'days'=>$days,\n 'months'=>$months,\n 'years'=>$years\n );\n}",
"function compute_date_diff($start, $end)\n{\n $date1 = new DateTime($start->format(\"Y-m-d\"));\n $date2 = new DateTime($end->format(\"Y-m-d\"));\n\n $interval = $date1->diff($date2);\n\n $day1 = intval($date1->format(\"d\"));\n $day2 = intval($date2->format(\"d\"));\n if ($day1 <= 28 || $day1 <= $day2)\n {\n return $interval;\n }\n\n $year1 = intval($date1->format(\"Y\"));\n $month1 = intval($date1->format(\"m\"));\n\n $year2 = intval($date2->format(\"Y\"));\n $month2 = intval($date2->format(\"m\"));\n\n $date3 = $date2->add(new DateInterval('P1D'));\n $month3 = intval($date3->format(\"m\"));\n if ($month2 != $month3)\n {\n $interval->d = 0;\n if ($interval->m == 11)\n {\n $interval->m = 0;\n $interval->y = $interval->y + 1;\n }\n else\n {\n $interval->m = $interval->m + 1;\n }\n return $interval;\n }\n\n $interval->d = $day2;\n $interval->m = $month2 - $month1 - 1;\n if ($interval->m < 0)\n {\n $interval->y = $year2 - $year1 - 1;\n $interval->m = $interval->m + 12;\n }\n return $interval;\n}",
"function diffDate($date1 ,$date2){\n\t$diff = abs(strtotime($date2) - strtotime($date1));\n\t$years = floor($diff / (365*60*60*24));\n\t$months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24));\n\t$days = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24));\n\t$hours = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24 - $days*60*60*24)/ (60*60));\n\t$minuts = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24 - $days*60*60*24 - $hours*60*60)/ 60);\n\t$seconds = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24 - $days*60*60*24 - $hours*60*60 - $minuts*60));\n\t$result [0]= $years;\n\t$result [1]= $months;\n\t$result [2]= $days;\n\t$result [3]= $hours;\n\t$result [4]= $minuts;\n\t$result [5]= $seconds;\n\treturn $result;\n}",
"public static function experienceCalculator($start_date,$end_date,$is_current){\n $start_date = strtotime($start_date);\n if ($is_current==1 && $end_date==\"Continue\"){\n $end_date = strtotime(date('Y-m-d'));\n }else{\n $end_date = strtotime($end_date);\n }\n $months = 0;\n $years = 0;\n while (strtotime('+1 MONTH', $start_date) < $end_date) {\n $months++;\n $start_date = strtotime('+1 MONTH', $start_date);\n if($months>11){\n $years++;\n $months=0;\n }\n }\n return $years.\" year, \". $months. ' month, '. ($end_date - $start_date) / (60*60*24). ' days';\n }",
"function calc_date_range_years($start, $end)\n{\n\t$years = array();\n\t\n\t$start_prts = explode('-', $start);\n\t$end_prts = explode('-', $end);\n\t\n\t$years[] = $start_prts[0];\n\t\n\tfor ($i=$start_prts[0]; $i<$end_prts[0]; $i++)\n\t{\n\t\t$years[] = $i + 1;\n\t}\n\t\n\treturn $years;\n}",
"public function getYearsOfService() {\n if (!empty($this->hireDate)) {\n if (!empty($this->departureDate)) {\n return $this->departureDate->diff($this->hireDate)->y;\n }\n return $this->hireDate->diff(new \\DateTime('now'))->y;\n }\n return 0;\n }",
"function getDifference($date1 ,$date2 , $in ='d'){\n \t$diff = abs(strtotime($date2) - strtotime($date1));\n \t$years = floor($diff / (365*60*60*24));\n\t$months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24));\n\t$days = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24));\n\t$hours = floor($diff / 60 / 60);\n\t$minites = floor($diff / 60 );\n\t\n\tswitch($in){\n \t\tcase 'd':\n \t\t\t$op_days = $years*365 + $months*30 + $days; \n\t\t\treturn $op_days ;\n \t\t\t/* Return No of Days Between Two Days*/\n\t\tbreak;\n\t\t\n\t\tcase 'h':\n \t\t\t$hours = $hours % 24;\n\t\t\t\n\t\t\tif($minites!=0){\n\t\t\t\treturn $hours +1;\n\t\t\t}\n\t\t\treturn $hours ;\n\t\t/* Return No of Hours After Day */\n\t\tbreak;\n\t}\n \t\n\tif($years){\n\t\treturn $years.\" years \" ;\n\t}\n\telseif($months){\n\t\treturn $months.\" months \"; \n\t}\n\telseif($days){\n\t\treturn $days.\" days \";\n\t}\n\telseif($hours){\n\t\treturn $hours.\" hours \";\n\t}\n\telse{\n\t\treturn $minites.\" minites \";\n\t} \n\t//printf(\"%d years, %d months, %d days\\n\", $years, $months, $days);\n}",
"public static function daysPassed($date1, $date2)\r\n\t{\r\n\t\t$timestamp1 = strtotime($date1);\r\n\t\t$timestamp2 = strtotime($date2);\r\n\t\t$datediff = $timestamp1 - $timestamp2;\r\n\t\treturn floor($datediff/(60*60*24));\r\n }",
"function datediff($interval,$date1,$date2){\n\n switch($interval){\n case 'Y': // Year\n case 'y':\n return ceil(($date2-$date1)/31536000); break;\n case 'm': // Month \n case 'n':\n return ceil(($date2-$date1)/2592000); break;\n case 'd': // Day \n case 'j':\n return ceil(($date2-$date1)/86400); break;\n case 'H': // Hour \n case 'h':\n case 'g':\n case 'G':\n return ceil(($date2-$date1)/3600); break;\n case 'i': // Minute \n return ceil(($date2-$date1)/60); break;\n case 's': // Second\n return $date2-$date1; break;\n }\n}",
"public static function getYears($start='now', $end='1930')\n {\n \tif( $start == 'now' ) $start = date('Y');\n \tif( $end == 'now' ) $end = date('Y');\n \t\n \t//array com os anos\n \t$return = array();\n \t\n \t//loop em todos os anos\n \tfor( $i=$start; $i>=$end; $i-- )\n \t{\n \t\t$return[$i] = $i;\n \t}\n \t\n \treturn $return;\n }",
"public function getAge() {\n date_default_timezone_set('America/New_York');\n list($year,$month,$day) = explode(\"-\",$this->birthDate);\n $year_diff = date(\"Y\") - $year;\n $month_diff = date(\"m\") - $month;\n $day_diff = date(\"d\") - $day;\n if ($month_diff < 0 || ($month_diff == 0 && $day_diff < 0)) {\n $year_diff--;\n }\n return $year_diff;\n }",
"function _date_diff($start, $end){\n $end = $end ? $end : date();\n \n $start = ($start instanceof DateTime) ? $start->format('Y-m-d H:i:s') : $start;\n $end = ($end instanceof DateTime) ? $end->format('Y-m-d H:i:s') : $end;\n \n $inv = $start > $end;\n $max = max($start, $end);\n $start = min($start, $end);\n $end = $max;\n \n $diff = strtotime($end) - strtotime($start);\n \n $interval = array();\n \n $interval['y'] = substr($end,0,4) - substr($start,0,4);\n $interval['m'] = substr($end,5,2) - substr($start,5,2);\n $interval['d'] = substr($end,8,2) - substr($start,8,2);\n $interval['h'] = substr($end,11,2) - substr($start,11,2);\n $interval['i'] = substr($end,14,2) - substr($start,14,2);\n $interval['s'] = substr($end,17,2) - substr($start,17,2);\n $interval['invert'] = $inv;\n \n // 1. При переходе с летнего времени на зимнее и наоборот возможны чудеса\n // 2. PHP5.3.2 вылетает с Fatal error при попытке изменить поле DateInterval::days\n // $interval['days'] = floor((strtotime($end) - strtotime($start)) / 86400);\n \n _date_diff_normalize($interval, substr($start,0,4), substr($start,5,2));\n \n $result = new DateInterval('P0Y');\n foreach ($interval as $key => $value){\n $result->{$key} = $value;\n }\n \n return $result;\n}",
"function time_ago($d1, $d2){\r\n\t$d1 = (is_string($d1) ? strtotime($d1) : $d1);\r\n\t$d2 = (is_string($d2) ? strtotime($d2) : $d2);\r\n\r\n\t$diff_secs = abs($d1 - $d2);\r\n\t$base_year = min(date(\"Y\", $d1), date(\"Y\", $d2));\r\n\r\n\t$diff = mktime(0, 0, $diff_secs, 1, 1, $base_year);\r\n\t$diffArray = array(\r\n\t\t\"years\" => date(\"Y\", $diff) - $base_year,\r\n\t\t\"months_total\" => (date(\"Y\", $diff) - $base_year) * 12 + date(\"n\", $diff) - 1,\r\n\t\t\"months\" => date(\"n\", $diff) - 1,\r\n\t\t\"days_total\" => floor($diff_secs / (3600 * 24)),\r\n\t\t\"days\" => date(\"j\", $diff) - 1,\r\n\t\t\"hours_total\" => floor($diff_secs / 3600),\r\n\t\t\"hours\" => date(\"G\", $diff),\r\n\t\t\"minutes_total\" => floor($diff_secs / 60),\r\n\t\t\"minutes\" => (int) date(\"i\", $diff),\r\n\t\t\"seconds_total\" => $diff_secs,\r\n\t\t\"seconds\" => (int) date(\"s\", $diff)\r\n\t);\r\n\tif($diffArray['days'] > 0){\r\n\t\tif($diffArray['days'] == 1){\r\n\t\t\t$days = '1 day';\r\n\t\t}else{\r\n\t\t\t$days = $diffArray['days'] . ' days';\r\n\t\t}\r\n\t\treturn $days . ' and ' . $diffArray['hours'] . ' hours ago';\r\n\t}else if($diffArray['hours'] > 0){\r\n\t\tif($diffArray['hours'] == 1){\r\n\t\t\t$hours = '1 hour';\r\n\t\t}else{\r\n\t\t\t$hours = $diffArray['hours'] . ' hours';\r\n\t\t}\r\n\t\treturn $hours . ' and ' . $diffArray['minutes'] . ' minutes ago';\r\n\t}else if($diffArray['minutes'] > 0){\r\n\t\tif($diffArray['minutes'] == 1){\r\n\t\t\t$minutes = '1 minute';\r\n\t\t}else{\r\n\t\t\t$minutes = $diffArray['minutes'] . ' minutes';\r\n\t\t}\r\n\t\treturn $minutes . ' and ' . $diffArray['seconds'] . ' seconds ago';\r\n\t}else{\r\n\t\treturn 'Less than a minute ago';\r\n\t}\r\n}",
"public function dateInterval($date1, $date2, $format = \"%y\")\n {\n $date1 = date_create($date1);\n $date2 = date_create($date2);\n $interval = date_diff($date1, $date2);\n return $interval->format($format);\n }",
"function getAge($dob) { \n $dob = explode(\"/\", $dob); \n $curMonth = date(\"m\");\n $curDay = date(\"j\");\n $curYear = date(\"Y\");\n // echo \"curYear: $curYear\";\n $age = $curYear - $dob[2]; \n if($curMonth<$dob[0] || ($curMonth==$dob[0] && $curDay<$dob[1])) \n $age--; \n return $age; \n}",
"public function countAllMonths(DateTime $start, DateTime $end) : int\n\t{\n\t\t$startYear = (int) $start->format('Y');\n\t\t$startMonth = (int) $start->format('m');\n\t\t$endYear = (int) $end->format('Y');\n\t\t$endMonth = (int) $end->format('m');\n\t\treturn ($endYear - $startYear) * 12 + ($endMonth - $startMonth) + 1;\n\t}",
"public function getdifftime($date1,$date2)\n {\n\n\n\n \n\n// Declare and define two dates \n$diff = abs($date1->getTimestamp()-$date2->getTimestamp());\n\n \n \n// To get the year divide the resultant date into \n// total seconds in a year (365*60*60*24) \n$years = floor($diff / (365*60*60*24)); \n \n \n// To get the month, subtract it with years and \n// divide the resultant date into \n// total seconds in a month (30*60*60*24) \n$months = floor(($diff - $years * 365*60*60*24) \n / (30*60*60*24)); \n \n \n// To get the day, subtract it with years and \n// months and divide the resultant date into \n// total seconds in a days (60*60*24) \n$days = floor(($diff - $years * 365*60*60*24 - \n $months*30*60*60*24)/ (60*60*24)); \n \n \n// To get the hour, subtract it with years, \n// months & seconds and divide the resultant \n// date into total seconds in a hours (60*60) \n$hours = floor(($diff - $years * 365*60*60*24 \n - $months*30*60*60*24 - $days*60*60*24) \n / (60*60)); \n \n \n// To get the minutes, subtract it with years, \n// months, seconds and hours and divide the \n// resultant date into total seconds i.e. 60 \n$minutes = floor(($diff - $years * 365*60*60*24 \n - $months*30*60*60*24 - $days*60*60*24 \n - $hours*60*60)/ 60); \n \n \n// To get the minutes, subtract it with years, \n// months, seconds, hours and minutes \n$seconds = floor(($diff - $years * 365*60*60*24 \n - $months*30*60*60*24 - $days*60*60*24 \n - $hours*60*60 - $minutes*60)); \n \nreturn $hours;\n }",
"function date_diff_between_ts($time1, $time2, $what='d') {\n\t$result = 0;\n\n\tif($time2 > $time1) {\n\t\t$nseconds = $time2 - $time1;\n\t} else {\n\t\t$nseconds = $time1 - $time2;\n\t}\n\n\tif($what == 'd') {\t\t// Days\n\t\t$result = (float)($nseconds / 86400);\n\t} elseif($what == 'w') {\t// Weeks\n\t\t$result = (float)($nseconds / 604800);\n\t} elseif($what == 'm') {\t// Months\n\t\tif($time1 > $time2) {\n\t\t\t$temp = $time1;\n\t\t\t$time1 = $time2;\n\t\t\t$time2 = $temp;\n\t\t}\n\n\t\t$day1 = uwa_date('j', $time1);\n\t\t$mon1 = uwa_date('n', $time1);\n\t\t$year1 = uwa_date('Y', $time1);\n\t\t$day2 = uwa_date('j', $time2);\n\t\t$mon2 = uwa_date('n', $time2);\n\t\t$year2 = uwa_date('Y', $time2);\n\n\t\tif($day1 > $day2) {\n\t\t\t$result = (($year2 - $year1) * 12) + ($mon2 - $mon1 - 1);\n\t\t} else {\n\t\t\t$result = (($year2 - $year1) * 12) + ($mon2 - $mon1);\n\t\t}\n\t} elseif($what == 'y') {\t// Years\n\t\t$weeks = (float)($nseconds / 604800);\n\t\t$result = $weeks / 52;\n\t} elseif($what == 'h') {\t// Hours\n\t\t$result = (float)($nseconds / 3600);\n\t} elseif($what == 'i') {\t// Minutes\n\t\t$result = (int)($nseconds / 60);\n\t}\n\n\treturn $result;\n}"
] |
[
"0.7238637",
"0.7233387",
"0.6933669",
"0.68868375",
"0.67893064",
"0.67124414",
"0.6543582",
"0.653876",
"0.65215385",
"0.6474659",
"0.6463007",
"0.6431327",
"0.63810986",
"0.63674754",
"0.63091004",
"0.6194091",
"0.61859244",
"0.58400327",
"0.58231974",
"0.57823086",
"0.5779993",
"0.57689595",
"0.5763109",
"0.5754299",
"0.5740683",
"0.5735943",
"0.57298404",
"0.5722162",
"0.57163036",
"0.5704099"
] |
0.7735405
|
0
|
Get the transaction id
|
public function getTransactionID();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function getTransactionID()\n\t{\n\t\treturn $this->transaction_id;\n\t}",
"public function getTxnId()\n {\n return $this->response['result']['id'];\n }",
"public function get_transaction_id() {\n\n\t\treturn $this->transaction_tag;\n\t}",
"public function getTransactionID()\r\n\t{\r\n\t\treturn $this->root->getAttribute('transactionid');\r\n\t}",
"function get_transaction_id()\n {\n return $this->platnosci_post_vars['txn_id']; \n }",
"public function getTransactionId()\n {\n return isset($this->transaction['transactionId']) ? $this->transaction['transactionId'] : '';\n }",
"public function getId()\n {\n return $this->transaction->getTransactionResponse()->getTransId();\n }",
"public function getTransactionUid ();",
"public function getTxId()\n {\n return $this->tx_id;\n }",
"public function getTransactionIdentifier()\n {\n return $this->transactionIdentifier;\n }",
"public function uniqueId()\n {\n return $this->transaction->id;\n }",
"public function getTransactionId(): string\n {\n return $this->transactionId;\n }",
"public function getTransactionId()\n {\n $value = $this->get(self::TRANSACTION_ID);\n\n return $value === null ? (int) $value : $value;\n }",
"public function get_transaction_id() {\n\n\t\treturn $this->is_credit_card_response() && isset( $this->response->paymentMethod, $this->response->paymentMethod->verification ) ? $this->response->paymentMethod->verification->id : null;\n\t}",
"public function getTxnID()\n\t{\n\t\treturn $this->get('TxnID');\n\t}",
"public function getTransactionID(): string\n {\n return (string) $this->transactionID;\n }",
"public function getTransactionId()\n {\n return $this->transactionIdentifier;\n }",
"public function getTransactionId()\n {\n return $this->transaction_id;\n }",
"public function getTransactionId()\n {\n return $this->transaction_id;\n }",
"public function getTransactionId()\n {\n return $this->transaction_id;\n }",
"public function getTransactionXID()\n {\n return $this->transactionXID;\n }",
"public function getTransactionId() {\n return $this->transactionId;\n }",
"public function getTransactionId()\n {\n return $this->transactionId;\n }",
"function getTxnId() {\n return $this->txn_id;\n }",
"public function getTransactionId() { return $this->transactionId; }",
"public function getTransactionId();",
"public function getTransactionId();",
"public function getTxid()\n {\n return $this->txid;\n }",
"public function getTransactionId() {\n return $this->transactionId;\n }",
"public function getTransactionId()\n {\n return $this->transactionId++;\n }"
] |
[
"0.8506425",
"0.84893644",
"0.84310275",
"0.84022194",
"0.83046526",
"0.82853913",
"0.82031816",
"0.81446373",
"0.8118883",
"0.81116474",
"0.8104309",
"0.8068944",
"0.80446637",
"0.80021006",
"0.79870766",
"0.79790646",
"0.7975853",
"0.79286814",
"0.79286814",
"0.79286814",
"0.7882808",
"0.7839599",
"0.7831641",
"0.7818456",
"0.7763559",
"0.7748494",
"0.7748494",
"0.7743969",
"0.77356076",
"0.7673733"
] |
0.89775497
|
0
|
Check if a meta data with a specific key is available.
|
public function hasMetaData($key);
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function hasMeta(string $key): bool\n {\n return (bool) $this->metas()->firstWhere('key', $key);\n }",
"public function metaExists($key): bool\n {\n /** @var HasMetadataInterface $this */\n return Meta::metable(static::class, $this->id)\n ->where('key', $key)->exists();\n }",
"function metadata_exists($meta_type, $object_id, $meta_key)\n {\n }",
"public function hasMeta(string $key): bool\n {\n return isset($this->meta[$key]);\n }",
"public function hasData($key = '');",
"protected function hasData($key) {\n\t\t\treturn array_key_exists($key, $this->data);\n\t\t}",
"public function hasItem(string $key): bool;",
"public function hasItem(string $key): bool;",
"public function hasMeta($key, $value = null)\n {\n $query = $this->userMeta()\n ->where('meta_key', $key);\n\n if ($value) {\n $query = $query->where('meta_value', $value);\n }\n\n return !is_null($query->first());\n }",
"protected function _have( $key ) {\n\t\treturn isset( self::$data[ $key ] );\n\t}",
"public function hasData($key = null);",
"public function hasKey($key){\n $item = CacheManager::getInstance('files')->getItem($key);\n return !is_null($item->get());\n }",
"public function has(string $key) {\n\t\treturn array_key_exists($key, $this->data);\n\t}",
"public function hasItem( $key ) {\n return false;\n }",
"public function has($key);",
"public function has($key);",
"public function has($key);",
"public function has($key);",
"public function has($key);",
"public function has($key);",
"public function has($key);",
"public function has($key);",
"public function has($key);",
"public function has($key);",
"public function has($key);",
"public function has($key);",
"public function has($key);",
"public function has($key);",
"public function has($key);",
"public function has($key);"
] |
[
"0.75015664",
"0.7457449",
"0.74465597",
"0.7431359",
"0.7134132",
"0.70887035",
"0.70853835",
"0.70853835",
"0.7078979",
"0.70390075",
"0.6991665",
"0.6888787",
"0.68843883",
"0.68729156",
"0.68500644",
"0.68500644",
"0.68500644",
"0.68500644",
"0.68500644",
"0.68500644",
"0.68500644",
"0.68500644",
"0.68500644",
"0.68500644",
"0.68500644",
"0.68500644",
"0.68500644",
"0.68500644",
"0.68500644",
"0.68500644"
] |
0.77703214
|
0
|
/ Extra: For a given Email, return all his valid Voucher Codes with the Name of the Special Offer
|
public function listOfCodesByEmail($email)
{
$recipient = Recipient::where('email', $email)->first();
if ($recipient) {
$codes = $recipient->codes()
->join('offers', 'offers.id', '=', 'codes.offer_id')
->whereNull('codes.used_on')
->where('offers.expiry', '>=', Carbon::today())->get();
foreach ($codes as $code) {
$vcodes[] = [
'offer_name' => $code->Offer->name,
'code' => $code->code,
'discount' => number_format($code->Offer->discount),
'expiry' => $code->Offer->expiry->format('d-m-Y'),
];
}
if (isset($vcodes)) {
return response()->json
(
[
'code' => 200,
'message' => 'Successful',
'vouchers' => $vcodes
], 200
);
} else {
return response()->json
(
[
'code' => 200,
'message' => 'No More Offers left for : ' . $recipient->email . '',
], 200
);
}
} else {
return response()->json(
[
'code' => 400,
'message' => 'Invalid email address.'
], 400);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function suggestCompanyEmailSearch()\n\t{\n\t\t$emails = array();\n\n\t\t$sql = \" select email,name from company where active = 1 and email > '' and email is not null\";\n\t\t$sql .= \" and (email like '%\" . $this->emailCompany->Text . \"%' \";\n\t\t$sql .= \" or name like '%\" . $this->emailCompany->Text . \"%' )\";\n\n\t\t$result = Dao::getResultsNative($sql);\n\t\tif($result)\n\t\t{\n\t\t\tforeach($result as $rows)\n\t\t\t{\n\t\t\t\t$emails[] = array('id'=> $rows[0], 'email'=> $rows[1].\" - \".$rows[0]);\n\t\t\t}\n\t\t}\n\t\tif(count($emails)==0)\n\t\t{\n\t\t\t$emails[] = array('id'=> 0, 'email'=> 'No emails Found!');\n\t\t}\n\n\t\treturn $emails;\n\t}",
"public function voucherRecipient(Request $request, $email){\n\n // Getting all voucher valids\n return response()->json($this->repository->voucherRecipient($email)->get());\n\n }",
"public function showAllByEmail(Request $request)\n {\n $this->validate($request, ['email' => 'required|email']);\n\n $recipient = Recipient::where('email', $request->input('email'))->first();\n if ($recipient === null) {\n return response()->json(['error' => 'Recipient not found!'], 400);\n } else {\n $vouchers = VoucherPool::where(\n 'recipient_id',\n $recipient->id\n )->with(\n 'specialoffer'\n )->get();\n\n return response()->json(\n ['data' => ['recipient' => $recipient, 'vouchers' => $vouchers]]\n );\n }\n }",
"private function clean_poea_email($email) {\n\n \t$emails = array();\n\n \t$email = str_replace('@y.c', \"@yahoo.com\", $email);\n\n\t\t$slash_email = explode(\"/\", $email);\n\t\t$or_email = explode(\" or \", $email);\n\t\t$and_email = explode(\"&\", $email);\n\n\t\tif(count($slash_email) > 1) {\n\t\t\t\n\t\t\tforeach ($slash_email as $v) {\n\n\t\t\t\t$v = trim($v);\n\n\t\t\t\tif(filter_var($v, FILTER_VALIDATE_EMAIL)) {\n\n\t\t\t\t\t$emails[] = $v;\t\t\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t} elseif(count($and_email) > 1) {\n\n\t\t\tforeach ($and_email as $v) {\n\n\t\t\t\t$v = trim($v);\n\n\t\t\t\tif(filter_var($v, FILTER_VALIDATE_EMAIL)) {\n\n\t\t\t\t\t$emails[] = $v;\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t} elseif(count($or_email) > 1) {\n\n\t\t\tforeach ($or_email as $v) {\n\n\t\t\t\t$v = trim($v);\n\n\t\t\t\tif(filter_var($v, FILTER_VALIDATE_EMAIL)) {\n\t\n\t\t\t\t\t$emails[] = $v;\t\t\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t} elseif(filter_var($email, FILTER_VALIDATE_EMAIL)) {\n\n\t\t\t$emails[] = $email;\t\n\n\t\t}\n\n\t\tif(empty($emails)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn json_encode($emails);\n }",
"function getAds_email($email)\n\t\t{\n\t\t\t$seachValues = $this->manage_content->getValue_email('company_info','*','company_email',$email);\n\t\t\tif($seachValues != \"\")\n\t\t\t{\n\t\t\t\tforeach($seachValues as $searchValue)\n\t\t\t\t{\n\t\t\t\t\techo '<!--container for adds to be repeated-->\n\t\t\t\t\t\t<a href=\"manage_ads.php?comp_name='.$searchValue['company_name'].'\">\n\t\t\t\t\t\t\t<div class=\"a_content\">\n\t\t\t\t\t\t\t\t<div class=\"a_image\">\n\t\t\t\t\t\t\t\t\t<img src=\"'.$searchValue['company_logo'].'\" alt=\"grafti cartt\" /> \n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"a_company_name\">'.$searchValue['company_name'].'</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</a>';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo \"No se encontraron resultados para la busqueda realizada\";\n\t\t\t}\n\t\t}",
"function get_email_hak_akses($company_id){\n\t\t$sql = \"\n\t\t\tselect \n\t\t\t\tusers.user_email as email_val, users.user_email, users.user_group_id, users.company_id, users.full_name\n\t\t\t\t, groups.user_group_description\n\t\t\tfrom tb_m_users as users \n\t\t\tinner join tb_m_user_group groups on groups.user_group_id = users.user_group_id\n\t\t\twhere users.company_id = '\" . $company_id . \"'\n\t\t\tand user_email not in (select distinct coalesce(user_email,0) from tb_m_employee where company_id = '\" . $company_id . \"')\n\t\t\";\n\t\treturn $this->db->query($sql)->result();\n\t}",
"public function validate_vendor_email($vendor_email) {\n $this->db->select('*');\n $this->db->from('vendors');\n $this->db->where('username', $vendor_email);\n $query = $this->db->get();\n $query_result = $query->result();\n return $query_result;\n }",
"public function validateCode(Request $request)\n {\n $this->validate($request, ['email' => 'required|email', 'code' => 'required']);\n\n $code = $request->input('code');\n\n $voucher = VoucherPool::where(\n 'code',\n $code\n )->with(\n 'recipients'\n )->with(\n 'specialoffer'\n )->first();\n\n if (null === $voucher) {\n return response()->json(['error' => 'Voucher not found'], 400);\n } else {\n if ($voucher->recipients->email === $request->input('email')) {\n if ($voucher->used) {\n return response()->json(\n ['error' => 'Voucher already used!'],\n 400\n );\n } else {\n if ($voucher->expires_at < new Carbon()) {\n return response()->json(\n ['error' => 'Voucher expired!'],\n 400\n );\n } else {\n return $this->useVoucher($voucher);\n }\n }\n } else {\n return response()->json(['error' => 'Invalid email address!'], 400);\n }\n }\n }",
"public function verify_email($code) {\n $this->db->select('*');\n $this->db->from('vendors');\n $this->db->join('business_details', 'business_details.business_id = vendors.id');\n $this->db->where('vendors.email_verification_code', $code);\n $query = $this->db->get();\n $query_result = $query->result();\n if (!empty($query_result)) {\n $order_status_update = array(\n 'email_verification_status' => '1'\n );\n\n $this->db->where('email_verification_code', $code);\n $this->db->update('vendors', $order_status_update);\n\n\n $partner_details = array();\n if (count($query_result) == 0) {\n $partner_details = $query_result;\n } else {\n $partner_details = $query_result[0];\n }\n return $partner_details;\n } else {\n return \"not matched\";\n }\n }",
"public function codeActivationByEmailAndCode(Request $request)\n {\n\n $recipient = Recipient::where('email', $request->input('email'))->first();\n\n if (!$recipient) {\n return response()->json([\n 'code' => 400,\n 'message' => 'Invalid email address'\n ], 400);\n }\n\n $vCode = $recipient->codes()\n ->select(['codes.id', 'offers.discount'])\n ->join('offers', 'offers.id', '=', 'codes.offer_id')\n ->where('codes.code', $request->input('code'))\n ->whereNull('codes.used_on')\n ->where('offers.expiry', '>=', Carbon::today())\n ->first();\n\n if (!$vCode) {\n return response()->json([\n 'code' => 400,\n 'message' => 'Invalid code.'\n ], 400);\n }\n\n Code::where('id', $vCode->id)\n ->update(['used_on' => Carbon::now()]);\n\n return response()->json([\n 'code' => 200,\n 'message' => 'Successful',\n 'discount' => number_format($vCode->discount, 2)\n ]);\n }",
"function getByEmail($email);",
"private function emailList()\n {\n return array(\n '[email protected]',\n '[email protected]',\n '[email protected]',\n );\n }",
"public function getVetInfoQuery($p_email){\n $stmt = $this->adapter->conn->prepare(\n \"SELECT * FROM VETS WHERE email=?\");\n $stmt->bindParam(1,$p_email);\n \n $result = null;\n try{\n $result = $this->adapter->executeFetchPrepared($stmt)[0];\n }catch(PDOException $e){\n return null;\n }\n \n return $result;\n }",
"function get_relevant_email($emails){\n\tglobal $aPreferableEmails;\n\t\n\t$bestEmails = array();\n\t\n\tif(count($emails) != 1){\n\t\tforeach( $emails as $email ){\n\t\t\t$em = explode( '@', $email, 2);\n\t\t\t\n\t\t\tif( in_array($em[0], $aPreferableEmails) ){\n\t\t\t\t$bestEmails[ array_search($em[0], $aPreferableEmails) ] = $email;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( $bestEmails ){\n\t\t\tksort($bestEmails);\n\t\t\t\n\t\t\treturn reset($bestEmails);\n\t\t}\n\t}\n\t\n\treturn implode(\";\",$emails);\n}",
"public function alertEmailList($accountId) {\n $result = $this->db->where('id', $accountId)->select('support_email,fault_alert_email,safety_alert_email')->from('accounts')->get();\n\n if ($result->num_rows() > 0) {\n\n return $result->result_array();\n } else {\n return FALSE;\n }\n }",
"function getTeamsUserInvitedIn($user_email)\n{\n try {\n $conection = Database::connect();\n if (!$conection) {\n die('Error: in connection Team');\n }\n\n $query = \"select teams_team_id from invitedUsers where user_email='$email'\";\n $result = mysqli_query($conection, $query);\n $a = array();\n while ($row = mysqli_fetch_assoc($result)) {\n $a[] = $row;\n }\n return $a;\n\n \n } catch (Exception $e) {\n echo $e->getMessage();\n }\t\n }",
"public function filterValidEmailsProvider() {}",
"public function suggestWarehouseEmailSearch()\n\t{\n\t\t$emails = array();\n\n\t\t$sql = \" select wa.alias, w.name, wat.name from warehousealias wa\n\t\t\t\t\tleft join warehouse w on (w.id = wa.warehouseid and w.active=1)\n\t\t\t\t\tleft join warehousealiastype wat on (wat.id = wa.warehousealiastypeid and wat.active=1)\n\t\t\t\t\twhere\n\t\t\t\t\t\twa.active = 1 and\n\t\t\t\t\t\twa.warehousealiastypeid in (\".$this->_frEmailWarehouseAliasTypeIds.\" )\";\n\n\t\t$sql .= \" and (wa.alias like '%\" . $this->emailWarehouse->Text . \"%' or w.name like '%\" . $this->emailWarehouse->Text . \"%')\";\n\n\t\t$result = Dao::getResultsNative($sql);\n\t\tif($result)\n\t\t{\n\t\t\tforeach($result as $rows)\n\t\t\t{\n\t\t\t\t$emails[] = array('id'=> $rows[0], 'email'=> $rows[1].\" - \".$rows[2].\" - \".$rows[0]);\n\t\t\t}\n\t\t}\n\t\tif(count($emails)==0)\n\t\t{\n\t\t\t$emails[] = array('id'=> 0, 'email'=> 'No emails Found!');\n\t\t}\n\n\t\treturn $emails;\n\t}",
"public function get_not_exist_emails($post_data){\n $userId = $post_data['userId'];\n $searchId = $post_data['searchId'];\n //print_r($post_data);exit();\n $invitees = array_key_exists(\"invitees\",$post_data);\n if($invitees){ \n $invitees = $post_data['invitees']; \n $emails = array();\n $nonExistingEmails = array();\n for($i=0;$i<sizeof($invitees);$i++){\n $email = strtolower($invitees[$i]['inviteEmail']);\n $query = $this->db->query(\"select email from users where email = '$email'\");\n if($query->num_rows()==0){\n $emails[$i]['inviteEmail'] = strtolower($invitees[$i]['inviteEmail']); \n $nonExistingEmails[] = strtolower($emails[$i]['inviteEmail']);\n }\n\n }\n return $nonExistingEmails;\n }\n }",
"function get_emp_list($email1)\r\n\t{\r\n\t\t$email = trim(Yii::app()->user->getState(\"employee_email\"));\r\n\t\t$connection=Yii::app()->db;\r\n\t\t$sql = \"select distinct `Employee_id` from `kpi_auto_save` use index (emp_index) where appraisal_id1 = '\".$email.\"' and (final_kra_status !='')\";\r\n\t\t$command=$connection->createCommand($sql);\r\n\t\t$rows=$command->queryAll();\t\t\r\n\t\treturn $rows;\r\n\t}",
"public static function CekAkunByEmail() {\n \t$mail = self::model()->countByAttributes(array(\"EMAIL\" => $_POST['email'], \"PELANGGAN_STATUS\" => self::PUNYA_AKUN));\n return $mail;\n }",
"public function checkOfferAppliedInOrder($offerCode)\n {\n $result = DB::table($this->DBTables['Orders'])\n ->where('offer_Code', 'like', trim($offerCode))\n ->get();\n return $result;\n }",
"public function getGiftcardRecipientEmail();",
"public function check_email($email)\r\n\t{\r\n\t\t$query=$this->db->query(\"SELECT * FROM users WHERE emailid='\".$email.\"'\");\r\n\tforeach ($query->result() as $row)\r\n\t\t{\r\n\t\t$storeid=$row->storeid;\r\n\t\t}\r\n\t\t$rows=$query->num_rows();\r\n\t\t$result=array('afftected_rows'=>$rows,'storeid'=>$storeid);\r\n\t\treturn $result;\r\n\t}",
"function getByEmail($email){\n\t\t}",
"public function company_email_list($lead_email_ID)\n {\n $result = common_select_values('Distinct company_email', 'emails', ' lead_email = \"'.$lead_email_ID.'\"', 'result');\n return $result;\n }",
"function get_aacteam_member($email)\n{\n\t$email = strtolower($email);\n\t$csv = file_get_contents(\"https://docs.google.com/spreadsheets/d/1_V8xH5UmJBoWWMtXjkaGaLoaBsgYhLb4dHAN-a6WXag/export?format=csv\");\n\tif(empty($csv) || $csv==null)\n\t{\n\t\treturn array();\n\t}\n\t$lines=explode(PHP_EOL, $csv);\n\t$header_line=array();\n\tif(count($lines)>=1)\n\t{\n\t\t$header_line=str_getcsv($lines[0]);\n\t}\n\t$matched_rows=array();\n\tfor($i=1; $i<count($lines); $i++)\n\t{\n\t\t$row=str_getcsv($lines[$i]);\n\t\t$assoc_row=array();\n\t\tfor($j=0; $j<count($header_line) && $j<count($row); $j++)\n\t\t{\n\t\t\t$key=$header_line[$j];\n\t\t\t$assoc_row[$key] = $row[$j];\n\t\t}\n\t\t$email_field = \"Team_Lead_Email\";\n\t\tif(isset($assoc_row[$email_field]))\n\t\t{\n\t\t\t$cmp_email = strtolower($assoc_row[$email_field]);\n\t\t\tif($email==$cmp_email)\n\t\t\t{\n\t\t\t\tarray_push($matched_rows, $assoc_row);\n\t\t\t}\n\t\t}\n\t}\n\treturn $matched_rows;\n}",
"function get_voucher_by_code($code)\n\t{\n\t\t$this->db->where('code', $code);\n\t\t$return = $this->db->get('vouchers')->row_array();\n\t\t\n\t\tif(!$return)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t$return['product_list'] = $this->get_product_ids($return['id']);\n\t\treturn $return;\n\t}",
"function do_select_list_suppliers_additional_emails($avalue, $aname) {\n\t# Dim some Vars:\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\t\t$_out = '';\n\n\t# Set Query for select.\n\t\t$query\t= 'SELECT contacts_id, contacts_s_id, contacts_name_first, contacts_name_last, contacts_email FROM '.$_DBCFG['suppliers_contacts'];\n\t\tIF ($avalue) {$query .= ' WHERE contacts_s_id='.$avalue;}\n\t\t$query .= ' ORDER BY contacts_name_last ASC, contacts_name_first ASC';\n\n\t# Do select\n\t\t$result\t= $db_coin->db_query_execute($query);\n\t\t$numrows\t= $db_coin->db_query_numrows($result);\n\n\t\tIF ($numrows) {\n\t\t# Process query results to list individual clients\n\t\t\twhile(list($contacts_id, $contacts_cl_id, $contacts_name_first, $contacts_name_last, $contacts_email) = $db_coin->db_fetch_row($result)) {\n\t\t \t$i++;\n\t\t\t\t$_out .= '<option value=\"'.'alias|'.$contacts_id.'\">';\n\t\t\t\t$_out .= $_sp.$_sp.$_sp.$aname.' - '.$contacts_name_last.', '.$contacts_name_first.' ('.$_LANG['_BASE']['Email_Additional'].')</option>'.$_nl;\n\t\t\t}\n\t\t\treturn $_out;\n\t\t} ELSE {\n\t\t return '';\n\t\t}\n}",
"function getApprover1Email($connid)\r\n\t{\r\n\t\t$query = \"SELECT srno,sbu_head,emailComp FROM sbu_master a,emp_master b WHERE a.sbu_head = b.userID\";\r\n\t\t$dbquery = new dbquery($query,$connid);\r\n\t\twhile($row = $dbquery->getrowarray())\r\n\t\t{\r\n\t\t\t$arrRet[$row[\"srno\"]] = $row[\"emailComp\"];\r\n\t\t}\r\n\t\treturn $arrRet;\r\n\t}"
] |
[
"0.57328916",
"0.545251",
"0.53802425",
"0.5338572",
"0.5269421",
"0.5256774",
"0.5253543",
"0.5237446",
"0.5211232",
"0.51989067",
"0.51887",
"0.5170154",
"0.51623887",
"0.514367",
"0.5073752",
"0.5059117",
"0.50551134",
"0.50474244",
"0.50471586",
"0.5010196",
"0.50032127",
"0.4998378",
"0.4988405",
"0.4987131",
"0.4977057",
"0.49744406",
"0.4961027",
"0.49335054",
"0.49306312",
"0.49282438"
] |
0.67621905
|
0
|
Test scanning and coding of values.
|
public function testScanningAndCoding()
{
$toolbox = R::$toolbox;
$adapter = $toolbox->getDatabaseAdapter();
$writer = $toolbox->getWriter();
$redbean = $toolbox->getRedBean();
$pdo = $adapter->getDatabase();
$writer->createTable( "testtable" );
$writer->addColumn( "testtable", "special", RedBean_QueryWriter_CUBRID::C_DATATYPE_SPECIAL_DATE );
$cols = $writer->getColumns( "testtable" );
asrt( $writer->code( $cols['special'], TRUE ), RedBean_QueryWriter_CUBRID::C_DATATYPE_SPECIAL_DATE );
asrt( $writer->code( $cols['special'], FALSE ), RedBean_QueryWriter_CUBRID::C_DATATYPE_SPECIFIED );
$writer->addColumn( "testtable", "special2", RedBean_QueryWriter_CUBRID::C_DATATYPE_SPECIAL_DATETIME );
$cols = $writer->getColumns( "testtable" );
asrt( $writer->code( $cols['special2'], TRUE ), RedBean_QueryWriter_CUBRID::C_DATATYPE_SPECIAL_DATETIME );
asrt( $writer->code( $cols['special'], FALSE ), RedBean_QueryWriter_CUBRID::C_DATATYPE_SPECIFIED );
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function scanType( $value ) {\n\t\treturn 1;\n\t}",
"public function testGetValues()\n {\n $this->todo('stub');\n }",
"public function testGetValues()\n {\n $hand = new DiceHand(3);\n\n $hand->roll();\n\n $res = $hand->getValues();\n\n $this->assertIsArray($res);\n }",
"public function testRegistrationValuesContainNumbers(): void { }",
"public function testGetValues()\n {\n $values = new \\models\\Cards\\Values();\n $values = $values->getValues();\n $count = count($values);\n // number of values should be 13\n $this->assertEquals($count, 13);\n }",
"public function testBasic(): void\n {\n $valuesExpected = [\n 'string' => 'string',\n ' str ' => 'str',\n \"\\ns\\t\" => 's',\n ];\n foreach ($valuesExpected as $input => $output) {\n self::assertSame($output, $this->filter->filter($input));\n }\n }",
"public function supportsValues();",
"function value($r) \r\n{ \r\n if ($r == 'I') \r\n return 1; \r\n if ($r == 'V') \r\n return 5; \r\n if ($r == 'X') \r\n return 10; \r\n if ($r == 'L') \r\n return 50; \r\n if ($r == 'C') \r\n return 100; \r\n if ($r == 'D') \r\n return 500; \r\n if ($r == 'M') \r\n return 1000; \r\n \t//else echo \"error\";\r\n return 0; \r\n}",
"function inputChecker($input){\n \n // il valore che deve essere restituito\n $ret = true;\n \n foreach($input as $key => $value){\n \n switch ($key){\n case 'file': // echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break; \n case 'id_cinguettio': // echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n $ret = idFormat($value);// echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'utente_seguace': \n case 'utente_seguito':\n case 'utente_segnalato':\n case 'utente_giudicato': \n case 'utente_luogo': \n case 'email_utente':\n $ret = emailFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\"; \n break;\n case 'password_conferma': \n case 'password':\n $ret = pwdFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'nickname':\n $ret = nickFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'nome':\n $ret = nameFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break; \n case 'cognome':\n $ret = nameFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break; \n case 'sesso':\n $ret = sexFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break; \n case 'giorno':\n $ret = dayFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'mese':\n $ret = monthFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'anno':\n $ret = yearFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'nazione_nascita':\n case 'regione_nascita':\n case 'citta_residenza':\n $ret = placeFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'hobby_1':\n $ret = hobbyFormat($value, VALID_HOBBY_1_FORMAT); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'hobby_2':\n $ret = hobbyFormat($value, VALID_HOBBY_2_FORMAT); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'hobby_3':\n $ret = hobbyFormat($value, VALID_HOBBY_3_FORMAT); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break; \n case 'hobby_4':\n $ret = hobbyFormat($value, VALID_HOBBY_4_FORMAT); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'hobby_5':\n $ret = hobbyFormat($value, VALID_HOBBY_5_FORMAT); // echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'hobby_6':\n $ret = hobbyFormat($value, VALID_HOBBY_6_FORMAT); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'hobby_7':\n $ret = hobbyFormat($value, VALID_HOBBY_7_FORMAT); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'hobby_8':\n $ret = hobbyFormat($value, VALID_HOBBY_8_FORMAT); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'hobby_9':\n $ret = hobbyFormat($value, VALID_HOBBY_9_FORMAT); // echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'hobby_10':\n $ret = hobbyFormat($value, VALID_HOBBY_10_FORMAT); // echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break; \n case 'commento':\n case 'messaggio':\n $ret = textFormat($value); // echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'descrizione_foto':\n $ret = descrFormat($value);// echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'gradi_lat':\n $ret = gradiLatFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'gradi_lng': \n $ret = gradiLngFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'minuti_lat':\n case 'minuti_lng': \n $ret = secMinFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break; \n case 'secondi_lat':\n case 'secondi_lng': \n $ret = secMinFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break; \n case 'direzione_lat':\n $ret = direzioneLatFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'direzione_lng':\n $ret = direzioneLngFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n default:\n return false;\n } \n \n if($ret == false){\n break;\n }\n } \n return $ret;\n}",
"public function testing(){\n\t\t$this->load->library(\"unit_test\");\n\n\t\t$this->unit->run($this->isValid(\"\"), \"null\", \"Test Validasi Null\");\n\t\t$this->unit->run($this->isValid(\"*&&^^\"), \"symbolerror\", \"Test Validasi Symbol\");\n\t\t$this->unit->run($this->isValidHari(\"Selasa\"), true, \"Test Validasi Hari\");\n\t\t$this->unit->run($this->isValidJam(\"0\"), false, \"Test Validasi Jam\");\n\n\t\techo $this->unit->report();\n\t}",
"public function testGenerateBarcodeEAN8()\n {\n }",
"public function testExample()\n {\n echo \" testing numbers \";\n $isbnNumbers = [\n \"807229654X\", \"807229654\", \"978 032 640 615-1\", \"978032640615\", \"0072296542\",\n \"176041640615766\", \"0072296552\", \"007-229-654 2\", \"2460323406152\"\n ];\n $results = [1,0,1,0,1,0,0,1,1];\n\n $evaluated = [];\n foreach ($isbnNumbers as $isbn) {\n $evaluated[$isbn] = Helpers\\ISBN::isValidISBN($isbn);\n }\n $index = 0;\n $true = true;\n\n foreach($evaluated as $number => $output) {\n $true = $true && ($results[$index] == $output['valid']);\n if(!$true) {\n echo $results[$index].\" true: \".($true? \"1 \":\"0 \");\n print_r($output);\n }\n $index++;\n }\n\n $this->assertTrue($true);\n }",
"abstract protected function checkValue( &$value );",
"public function testBasic()\n {\n if (self::$_unicodeEnabled && extension_loaded('mbstring')) {\n // Filter for the value with mbstring\n /**\n * The first element of $valuesExpected contains multibyte digit characters.\n * But , Zend_Filter_Digits is expected to return only singlebyte digits.\n *\n * The second contains multibyte or singebyte space, and also alphabet.\n * The third contains various multibyte characters.\n * The last contains only singlebyte digits.\n */\n $valuesExpected = [\n '192八3四8' => '123',\n 'C 4.5B 6' => '456',\n '9壱8@7.6,5#4' => '987654',\n '789' => '789'\n ];\n } else {\n // POSIX named classes are not supported, use alternative 0-9 match\n // Or filter for the value without mbstring\n $valuesExpected = [\n 'abc123' => '123',\n 'abc 123' => '123',\n 'abcxyz' => '',\n 'AZ@#4.3' => '43',\n '1.23' => '123',\n '0x9f' => '09'\n ];\n }\n\n foreach ($valuesExpected as $input => $output) {\n $this->assertEquals(\n $output,\n $result = $this->_filter->filter($input),\n \"Expected '$input' to filter to '$output', but received '$result' instead\"\n );\n }\n }",
"public function testSetValues()\n {\n $tests = array(\n array(\n 'label' => __LINE__ . \" string input\",\n 'value' => \"write user * * //...\",\n 'error' => true\n ),\n array(\n 'label' => __LINE__ . \" bool input\",\n 'value' => true,\n 'error' => true\n ),\n array(\n 'label' => __LINE__ . \" string input, doubled-up space\",\n 'value' => array(\"writer user * * //...\"),\n 'error' => true\n ),\n array(\n 'label' => __LINE__ . \" string input, space in field\",\n 'value' => array(\"writ er user * * //...\"),\n 'error' => true\n ),\n array(\n 'label' => __LINE__ . \" string input, missing field\",\n 'value' => array(\"writer * * //...\"),\n 'error' => true\n ),\n array(\n 'label' => __LINE__ . \" string input, space in unquoted path\",\n 'value' => array(\"writ er user * * //test path/...\"),\n 'error' => true\n ),\n array(\n 'label' => __LINE__ . \" array input, name has space\",\n 'value' => array (\n 0 => array (\n 'mode' => \"write\",\n 'type' => \"user\",\n 'name' => \"* \",\n 'host' => \"*\",\n 'path' => \"//test with spaces/...\"\n )\n ),\n 'error' => true,\n ),\n array(\n 'label' => __LINE__ . \" array input, missing type\",\n 'value' => array (\n 0 => array (\n 'mode' => \"write \",\n 'name' => \"*\",\n 'host' => \"*\",\n 'path' => \"//test with spaces/...\"\n )\n ),\n 'error' => true,\n ),\n array(\n 'label' => __LINE__ . \" array input, missing path\",\n 'value' => array (\n 0 => array (\n 'mode' => \"write\",\n 'type' => \"user\",\n 'name' => \"*\",\n 'host' => \"*\",\n )\n ),\n 'error' => true,\n ),\n array(\n 'label' => __LINE__ . \" one string input, path has spaces.\",\n 'value' => array('write user * * \"//test with spaces/...\"'),\n 'error' => false,\n 'out' => array (\n 0 => array (\n 'mode' => \"write\",\n 'type' => \"user\",\n 'name' => \"*\",\n 'host' => \"*\",\n 'path' => \"//test with spaces/...\"\n )\n )\n ),\n array(\n 'label' => __LINE__ . \" one array input, path has spaces.\",\n 'value' => array (\n 0 => array (\n 'mode' => \"write\",\n 'type' => \"user\",\n 'name' => \"*\",\n 'host' => \"*\",\n 'path' => \"//test with spaces/...\"\n )\n ),\n 'error' => false,\n ),\n array(\n 'label' => __LINE__ . \" one string input.\",\n 'value' => array(\"write user * * //...\"),\n 'error' => false,\n 'out' => array (\n 0 => array (\n 'mode' => \"write\",\n 'type' => \"user\",\n 'name' => \"*\",\n 'host' => \"*\",\n 'path' => \"//...\"\n )\n )\n ),\n array(\n 'label' => __LINE__ . \" four string input\",\n 'value' => array(\n \"write user * * //...\",\n \"read user bob * //test1/...\",\n \"review group testGroup * //test2/...\",\n \"open user * example.com //test3/...\"\n ),\n 'out' => array (\n 0 => array (\n 'mode' => \"write\",\n 'type' => \"user\",\n 'name' => \"*\",\n 'host' => \"*\",\n 'path' => \"//...\"\n ),\n 1 => array (\n 'mode' => \"read\",\n 'type' => \"user\",\n 'name' => \"bob\",\n 'host' => \"*\",\n 'path' => \"//test1/...\"\n ),\n 2 => array (\n 'mode' => \"review\",\n 'type' => \"group\",\n 'name' => \"testGroup\",\n 'host' => \"*\",\n 'path' => \"//test2/...\"\n ),\n 3 => array (\n 'mode' => \"open\",\n 'type' => \"user\",\n 'name' => \"*\",\n 'host' => \"example.com\",\n 'path' => \"//test3/...\"\n )\n ),\n 'error' => false\n ),\n array(\n 'label' => __LINE__ . \" four array input\",\n 'value' => array (\n 0 => array (\n 'mode' => \"write\",\n 'type' => \"user\",\n 'name' => \"*\",\n 'host' => \"*\",\n 'path' => \"//...\"\n ),\n 1 => array (\n 'mode' => \"read\",\n 'type' => \"user\",\n 'name' => \"bob\",\n 'host' => \"*\",\n 'path' => \"//test1/...\"\n ),\n 2 => array (\n 'mode' => \"review\",\n 'type' => \"group\",\n 'name' => \"testGroup\",\n 'host' => \"*\",\n 'path' => \"//test2/...\"\n ),\n 3 => array (\n 'mode' => \"open\",\n 'type' => \"user\",\n 'name' => \"*\",\n 'host' => \"example.com\",\n 'path' => \"//test3/...\"\n )\n ),\n 'error' => false\n ),\n array(\n 'label' => __LINE__ . \" mixed string/array input\",\n 'value' => array(\n \"write user * * //...\",\n array (\n 'mode' => \"read\",\n 'type' => \"user\",\n 'name' => \"bob\",\n 'host' => \"*\",\n 'path' => \"//test1/...\"\n ),\n 'review group testGroup * \"//test2 with spaces/...\"',\n 3 => array (\n 'mode' => \"open\",\n 'type' => \"user\",\n 'name' => \"*\",\n 'host' => \"example.com\",\n 'path' => \"//test3/...\"\n )\n ),\n 'out' => array (\n 0 => array (\n 'mode' => \"write\",\n 'type' => \"user\",\n 'name' => \"*\",\n 'host' => \"*\",\n 'path' => \"//...\"\n ),\n 1 => array (\n 'mode' => \"read\",\n 'type' => \"user\",\n 'name' => \"bob\",\n 'host' => \"*\",\n 'path' => \"//test1/...\"\n ),\n 2 => array (\n 'mode' => \"review\",\n 'type' => \"group\",\n 'name' => \"testGroup\",\n 'host' => \"*\",\n 'path' => \"//test2 with spaces/...\"\n ),\n 3 => array (\n 'mode' => \"open\",\n 'type' => \"user\",\n 'name' => \"*\",\n 'host' => \"example.com\",\n 'path' => \"//test3/...\"\n )\n ),\n 'error' => false\n ),\n );\n\n foreach ($tests as $test) {\n $label = $test['label'];\n\n $protect = new P4_Protections;\n\n try {\n $protect->setProtections($test['value']);\n\n if ($test['error']) {\n $this->fail(\"$label: Unexpected success.\");\n }\n\n $expected = array_key_exists('out', $test) ? $test['out'] : $test['value'];\n\n $this->assertSame(\n $expected,\n $protect->getProtections(),\n \"$label: Unexpected Output\"\n );\n } catch (InvalidArgumentException $e) {\n if (!$test['error']) {\n $this->fail(\"$label: Unexpected failure.\");\n } else {\n $this->assertTrue(true, \"$label: Expected exception found\");\n }\n } catch (PHPUnit_Framework_AssertionFailedError $e) {\n $this->fail($e->getMessage());\n } catch (Exception $e) {\n $this->fail(\n \"$label: Unexpected Exception (\" . get_class($e) . '): ' . $e->getMessage()\n );\n }\n }\n }",
"public function testRegisterValues()\n {\n $values = ['foobar' => 10, 'foo' => 20, 'bar' => 30];\n $this->generator->registerValues($values);\n\n foreach ($this->generator->getWeightedValues() as $weightedValue)\n {\n $this->assertArrayHasKey($weightedValue->getValue(), $values);\n $this->assertEquals($values[$weightedValue->getValue()], $weightedValue->getWeight());\n }\n }",
"function upper_scan($t_data, $mode){\n if(!$mode){\n switch ($t_data) {\n case 'int':\n case 'string':\n case 'nil':\n case 'bool':\n case 'LF':\n case 'GF':\n case 'TF':\n break;\n\n default:\n fwrite(STDERR, \"ERROR : LEX : Wrong case sensitivity detected in $t_data\\n\");\n exit(23); #lex error\n break;\n }\n }\n else {\n if(!preg_match(\"/^(true)|(false)$/\", $t_data)){\n fwrite(STDERR, \"ERROR : LEX : Wrong case sensitivity detected in $t_data\\n\");\n exit(23);\n }\n }\n }",
"public function testGenerateBarcodeUPCA()\n {\n }",
"public function testGenerateBarcodeEAN13()\n {\n }",
"public function getValueReturnsCorrectValuesDataProvider() {}",
"public function testGenerateBarcodeUPCE()\n {\n }",
"function test_value($text, $type){\n global $varregex, $labelregex, $intregex, $stringregex, $boolregex, $typeregex;\n if($type == 'var'){\n if(preg_match($varregex, $text)) {\n return $text;\n }\n else exit(calls::call_error(\"Error: Chybný tvar argumentu typu var.\\n\", 21));\n }\n elseif ($type == 'label') {\n if(preg_match($labelregex, $text)){\n return $text;\n }\n else exit(calls::call_error(\"Error: Chybný tvar argumentu typu label.\\n\", 21));\n }\n elseif ($type == 'int') {\n if(preg_match($intregex, $text)){\n return $text;\n }\n else exit(calls::call_error(\"Error: Chybný tvar argumentu typu int.\\n\", 21));\n }\n elseif ($type == 'string') {\n if(preg_match($stringregex, $text)){\n return $text;\n }\n else exit(calls::call_error(\"Error: Chybný tvar argumentu typu string.\\n\", 21));\n }\n elseif ($type == 'bool') {\n if(preg_match($boolregex, $text)){\n return $text;\n }\n else exit(calls::call_error(\"Error: Chybný tvar argumentu typu bool.\\n\", 21));\n }\n elseif ($type == 'type') {\n if(preg_match($typeregex, $text)){\n return $text;\n }\n else exit(calls::call_error(\"Error: Chybný tvar argumentu typu type.\\n\", 21));\n }\n }",
"public function testGetValue()\n {\n $this->todo('stub');\n }",
"function walk_test_input(&$value,$key)\n{\n $value=test_input($value);\n}",
"public function testValueValid(): void {\n $transform = $this->getTransform('count', [\n 'source' => 'source',\n 'field' => 'example_source_field',\n ]);\n $result = $transform->transform([\n 'example_source_field' => [ 'test', 'test2' ]\n ]);\n // Make sure it stays an array\n $this->assertEquals(2, $result);\n }",
"public function forValueWithValues()\n {\n assert(\n TestEnumWithValues::forValue(10),\n isSameAs(TestEnumWithValues::$FOO)\n );\n }",
"function TestCheckDigit($barcode)\n{\n $sum=0;\n for($i=1;$i<=11;$i+=2)\n $sum+=3*$barcode[$i];\n for($i=0;$i<=10;$i+=2)\n $sum+=$barcode[$i];\n return ($sum+$barcode[12])%10==0;\n}",
"public function testGetIndicesForValuesDealsWithNumericValues()\r\n {\r\n $values = array('0', '1');\r\n $this->assertSame(array(0, 1), $this->list->getIndicesForValues($values));\r\n }",
"public function testValues() {\n\t\t$array = array('one' => 1, 'two' => 2, 'three' => 3);\n\t\t$expected = array(1, 2, 3);\n\t\t$result = _::values($array);\n\t\t$this->assertEquals($expected, $result);\n\n\t\t// test with an object\n\t\t$object = (object)$array;\n\t\t$result = _::values($object);\n\t\t$this->assertEquals($expected, $result);\n\t}",
"function validate_value($valid, $value, $field, $input)\n {\n }"
] |
[
"0.56692964",
"0.56489074",
"0.56166244",
"0.5614022",
"0.5595234",
"0.5593685",
"0.5448339",
"0.5443806",
"0.53663105",
"0.5358587",
"0.5337038",
"0.5315485",
"0.52841264",
"0.5237063",
"0.52146804",
"0.51899",
"0.5169254",
"0.51650983",
"0.5132859",
"0.51114994",
"0.51069194",
"0.5103005",
"0.50828034",
"0.5080869",
"0.5023605",
"0.5015053",
"0.5010153",
"0.5009675",
"0.49998128",
"0.49870744"
] |
0.6030428
|
0
|
Add Location to list.
|
public function add(Location $location): void
{
$this->locations[] = $location;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function addLocation(string $location);",
"public function addLocation($location)\n {\n $this->locations[] = $this->createLocationFromInput($location);\n }",
"public function addLocations($locations)\n {\n foreach ($locations as $location) {\n $this->addLocation($location);\n }\n }",
"public function add_locations($data){\n\t\tforeach($data as $rec){\n\t\t\t$docs[] = $this->_location($rec);\n\t\t}\n\t\treturn $this->update_docs($docs);\n\t}",
"public function testAddLocation(): void\n {\n $session = $this->getMinkSession();\n $this->login('dkatz', 'pr1test');\n $session->visit($this->getUrl('/Publisher/manage_location?id=4612')); // A Bruccoli Clark Layman Book\n $page = $session->getPage();\n $this->clickCss($page, '.add-location-link');\n $this->checkFor500Error();\n }",
"public function insertOne($location) {\n\t\t$temp = $this;\n\t\t\n\t\twhile ($temp->next != NULL)\n\t\t\t$temp = $temp->next;\n\t\t\n\t\t$temp->next = new testsList($location);\n\t\t\n\t\t/*\n\t\t * This is where you will set the bounds for where you want the points located\n\t\t * \n\t\t * Set minimum and maximum latitude and longitude for the view\n\t\t */\n\t\tif (($location->getLat() < $this->minLatitude) && ($location->getLat() > 42.9811436))\n\t\t\t$this->minLatitude = $location->getLat();\n\t\t\n\t\tif (($location->getLng() < $this->minLongitude) && ($location->getLng() > -83.7412662))\n\t\t\t$this->minLongitude = $location->getLng();\n\t\t\n\t\tif (($location->getLat() > $this->maxLatitude) && ($location->getLat() < 43.0765585))\n\t\t\t$this->maxLatitude = $location->getLat();\n\t\t\n\t\tif (($location->getLng() > $this->maxLongitude) && ($location->getLng() < -83.6349159))\n\t\t\t$this->maxLongitude = $location->getLng();\n\t\t\n\t\tif ($location->getLead() > 15)\n\t\t\t$this->countDanger++;\n\t\t\n\t\t$this->listCount++;\n\t}",
"function addLocation($data) {\r\n\r\n\r\n\t\t$this->query('INSERT INTO locations (`id`, `created`, `modified`, `name`) \r\n\t\t\t\t\t\t\t VALUES (NULL, CURRENT_TIMESTAMP(), CURRENT_TIMESTAMP(), \"'. $data['name'] .'\");');\r\n\r\n\t}",
"public function add_location( string $location ): self {\n\t\t$this->locations[] = $this->ensure_trailing_slash( $location );\n\n\t\treturn $this;\n\t}",
"public static function registerLocation(string $location): void\n {\n static::$locations[] = $location;\n }",
"public function add_location($rec){\n\t\t$doc = json_encode($this->_location($rec));\n\t\treturn $this->update($doc);\n\t}",
"function LocationList()\n\t{\tif ($this->id)\n\t\t{\techo \"<table><tr class='newlink'><th colspan='2'><a href='locationedit.php?city=\", $this->id, \"'>add new location</a></th></tr>\\n<tr><th>Location name</th><th>Actions</th></tr>\\n\";\n\t\t\tif ($locations = $this->GetLocations())\n\t\t\t{\tforeach ($locations as $location)\n\t\t\t\t{\t\n\t\t\t\t\techo \"<tr>\\n<td>\", $this->InputSafeString($location->details[\"loctitle\"]), \"</td>\\n<td><a href='locationedit.php?id=\", $location->id, \"'>edit</a>\";\n\t\t\t\t\tif ($histlink = $this->DisplayHistoryLink(\"locations\", $location->id))\n\t\t\t\t\t{\techo \" | \", $histlink;\n\t\t\t\t\t}\n\t\t\t\t\tif ($location->CanDelete())\n\t\t\t\t\t{\techo \" | <a href='locationedit.php?id=\", $location->id, \"&delete=1'>delete</a>\";\n\t\t\t\t\t}\n\t\t\t\t\techo \"</td>\\n</tr>\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\techo \"</table>\\n\";\n\t\t}\n\t}",
"public function add($address, $list, $type);",
"public function add($i, $name, $longitude, $latitude)\r\n {\r\n $this->locations[$i] = array('name' => $name, 'longitude' => $longitude, 'latitude' => $latitude);\r\n }",
"function addLocations(){\n $l = $this->api->locate('addons', __NAMESPACE__, 'location');\n $addon = $this->api->locate('addons', __NAMESPACE__);\n $this->api->pathfinder->addLocation($addon, array(\n 'template' => 'templates',\n //'css' => 'templates/css',\n //'js' => 'js',\n ))->setParent($l);\n }",
"public function addImageLocation(ImageLocation $imageLocation = NULL)\n\t{\n\t\t$imageLocation = $imageLocation ?: new ImageLocation();\n\t\t$this->imageLocation[] = $imageLocation;\n\t\treturn $imageLocation;\n\t}",
"public function prependLocation($location)\n {\n array_unshift($this->locations, $this->createLocationFromInput($location));\n }",
"public function addLocationById($locationId)\n {\n if (!array_key_exists($locationId,\n $this->locations) && $locations = $this->container->get('search.engine')->locationIdSearch($locationId)) {\n $this->addLocation(array_pop($locations));\n }\n }",
"public function addUserLocation ($location)\n\t{\n\t\t$Statement = $this->Database->prepare(\"UPDATE users SET location = ? WHERE id = ?\");\n\t\t$Statement->execute(array($location, $this->id));\n\t}",
"public function setLocations(array $data) {}",
"protected function addLocation($remote_id, $item)\n {\n if(!empty($item['latitude']) && !empty($item['longitude']) && !empty($item['address']))\n {\n $pointObj = new Point($item['latitude'], $item['longitude']);\n $point = [\n 'location' => DB::raw(sprintf(\"ST_GeogFromText('%s')\", $pointObj->toWKT())),\n 'address' => $item['address'],\n ];\n $this->locations[$remote_id] = $point;\n }\n }",
"function locationsAddLocation($text){\n array_push($text, array('key' => 'PARENT_LOCATIONS_ADD_LOCATION',\n 'parent' => '',\n 'text' => 'Locations - Add location'));\n \n array_push($text, array('key' => 'LOCATIONS_ADD_LOCATION_NAME',\n 'parent' => 'PARENT_LOCATIONS_ADD_LOCATION',\n 'text' => 'New location'));\n array_push($text, array('key' => 'LOCATIONS_ADD_LOCATION_SUBMIT',\n 'parent' => 'PARENT_LOCATIONS_ADD_LOCATION',\n 'text' => 'Add location'));\n array_push($text, array('key' => 'LOCATIONS_ADD_LOCATION_ADDING',\n 'parent' => 'PARENT_LOCATIONS_ADD_LOCATION',\n 'text' => 'Adding a new location ...'));\n array_push($text, array('key' => 'LOCATIONS_ADD_LOCATION_SUCCESS',\n 'parent' => 'PARENT_LOCATIONS_ADD_LOCATION',\n 'text' => 'You have succesfully added a new location.'));\n \n return $text;\n }",
"public function add($address, $list, $type)\n {\n $range = Range::parse($address);\n\n $this->getQuery()->insert([\n 'type' => $type,\n 'list' => $list,\n 'label' => $address,\n 'range_start' => $range->getFirstIp()->long,\n 'range_end' => $range->getLastIp()->long,\n ]);\n }",
"public function insertTwo($location, $countIn) {\n\t\t$temp = $this; //Point to our current list and use temp to view/edit it\n\t\t\n\t\twhile ($temp->next != NULL) //walk to the end of the list\n\t\t\t$temp = $temp->next; //Shuffles through nodes\n\t\t\t\n\t\t$temp->next = new testsList($location, $countIn); //add a location to the end of the list\n\t\t\n\t\t//set the lower bound for latitude in visualization\n\t\tif (($location->getLat() < $this->minLatitude) && ($location->getLat() > 42.9811436))\n\t\t\t$this->minLatitude = $location->getLat();\n\t\t\n\t\t//set the lower bound for longitude in visualization\n\t\tif (($location->getLng() < $this->minLongitude) && ($location->getLng() > -83.7412662))\n\t\t\t$this->minLongitude = $location->getLng();\n\t\t\n\t\t//set the upper bound for latitude in the visualization\n\t\tif (($location->getLat() > $this->maxLatitude) && ($location->getLat() < 43.0765585))\n\t\t\t$this->maxLatitude = $location->getLat();\n\t\t\n\t\t//set the upper bound for longitude in the visualization\n\t\tif (($location->getLng() > $this->maxLongitude) && ($location->getLng() < -83.6349159))\n\t\t\t$this->maxLongitude = $location->getLng();\n\t\t\n\t\t//count dangerous lead levels\n\t\tif ($location->getLead() > 15)\n\t\t\t$this->countDanger++;\n\t\t\n\t\t//count the dangerous levels in this area\n\t\t$this->listCount++;\n\t}",
"public function setLocations($value)\n {\n return $this->set('Locations', $value);\n }",
"function addLocation($location_details){\n\t if ($this->db->insert('pofloc',$location_details))\n\t\t\t{ \n\t\t\treturn TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\treturn FALSE;\n\t\t\t}\n }",
"public function locationLists() {\n return $this->belongsToMany('App\\LocationList')->withTimestamps();\n }",
"public function setLocation(string $location): void;",
"public function setLocation($var)\n {\n GPBUtil::checkString($var, True);\n $this->location = $var;\n\n return $this;\n }",
"public function setLocation($var)\n {\n GPBUtil::checkString($var, True);\n $this->location = $var;\n\n return $this;\n }",
"public function setLocation($var)\n {\n GPBUtil::checkString($var, True);\n $this->location = $var;\n\n return $this;\n }"
] |
[
"0.71591526",
"0.68633837",
"0.6618987",
"0.63968384",
"0.6302326",
"0.6255869",
"0.6021738",
"0.5970363",
"0.5953169",
"0.5952708",
"0.5869182",
"0.5840583",
"0.5731005",
"0.5704934",
"0.56236136",
"0.5610279",
"0.5581678",
"0.55008304",
"0.5474437",
"0.5474364",
"0.54698366",
"0.54424226",
"0.53926224",
"0.53761584",
"0.5367182",
"0.5314059",
"0.5307802",
"0.5284362",
"0.5284362",
"0.5284362"
] |
0.7251164
|
0
|
Get the endpoint URI.
|
public function getUri()
{
return $this->normalize($this->service->uri()) . '/' . $this->normalize($this->uri ?: '');
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function getEndpointUri()\n {\n return $this->_endpointUri;\n }",
"public function getEndpoint(): string\n {\n return $this->endpoint;\n }",
"public function getEndpointUri($method) {\n\t\treturn 'http://' . $this->_makeDomain($this->_domain)\n\t\t\t. self::API_PATH\n\t\t\t. self::$_methods[$method];\n\t}",
"public function getEndpoint(): string\n {\n return \"{$this->endpoint}/v{$this->version}/{$this->path}\";\n }",
"protected function getEndpoint(): string\n {\n return $this->getTestMode() ? $this->testEndpoint : $this->productionEndpoint;\n }",
"public function getEndPoint(): string\n {\n return $this->endpoint;\n }",
"public function getUri()\n {\n $server = provider::access('server');\n\n return ($server->isExist('REQUEST_URI') && $server->isValid('REQUEST_URI', validate::T_PRINTABLE)\n ? $server->getValue('REQUEST_URI')\n : '/');\n }",
"public function getEndpoint()\n {\n return $this->endpoint;\n }",
"public function getEndpoint()\n {\n return $this->endpoint;\n }",
"public function getEndpoint()\n {\n return $this->endpoint;\n }",
"public function getEndpoint()\n {\n return $this->endpoint;\n }",
"public function getEndpoint()\n {\n return $this->endpoint;\n }",
"public function getEndpoint()\n {\n return $this->endpoint;\n }",
"public function getEndPointURL()\n {\n return $this->isSandboxMode() ? $this->getTestEndPointURL() : $this->getProductionEndPointURL();\n }",
"protected function uri($endpoint)\n {\n return $this->base() . $endpoint;\n }",
"public function getEndpoint()\n {\n if ($this->merchant_id) {\n return $this->endpoint.\"/{$this->merchant_id}\";\n }\n\n return $this->endpoint;\n }",
"public function getEndpoint() \n {\n return $this->endpoint;\n }",
"public function endpoint()\n {\n if(!$this->properties['endpoint'] && $this->channel_id())\n {\n $url = route('directory', [\n 'channel_id' => $this->channel_id(),\n 'directory_id' => $this->id()\n ]);\n\n $this->properties['endpoint'] = parse_url($url, PHP_URL_PATH);\n }\n\n return $this->properties['endpoint'];\n }",
"public function getEndpoint() {\n return $this->endpoint;\n }",
"protected function getEndpoint() {\n $endpoint = isset($this->options['store_endpoint']) ? $this->options['store_endpoint'] : $this->options['store_key'] . '.' . BenchmarkArchiverAzure::DEFAULT_AZURE_ENDPOINT_PREFIX;\n if (!preg_match('/^http/', $endpoint)) $endpoint = isset($this->options['store_insecure']) && $this->options['store_insecure'] ? 'http://' : 'https://' . $endpoint;\n\n return $endpoint;\n }",
"protected function get_endpoint_url() {\n\n\t\t$args = http_build_query( array( 'apikey' => $this->api_key ) );\n\t\t$base = $this->route . $this->app_id;\n\t\t$url = \"$base?$args\";\n\n\t\treturn $url;\n\t}",
"public function uri() {\n\t\treturn $this->getUri();\n\t}",
"public function uri()\n {\n return $this->factory->getUri($this->handle);\n }",
"public function getUri() {\n return $this->request->getUri();\n }",
"public function getUri(): string\n {\n return $this->uri;\n }",
"public function getEndpoint()\n {\n $basePath = $this->app['config']->get('api.base_path', self::DEFAULT_BASE_PATH);\n $basePath = $this->stripTrailingSlash($basePath);\n\n // determine the base URL for the API,\n // i.e. https://api.example.com/v1\n $urlBase = $this->app['config']->get('api.url');\n if ($urlBase) {\n $urlBase = $this->stripTrailingSlash($urlBase);\n } else {\n // no base URL was defined so we're going to generate one\n $urlBase = $this->app['base_url'];\n $urlBase = $this->stripTrailingSlash($urlBase).$basePath;\n }\n\n // get the requested path, strip any trailing '/'\n $path = $this->stripTrailingSlash($this->request->path());\n\n // strip out the base path (i.e. /api/v1) from the\n // requested path\n if ($basePath) {\n $path = str_replace($basePath, '', $path);\n }\n\n return $urlBase.$path;\n }",
"public function getEndpoint(): string;",
"public function getEndpoint(): string;",
"public function getEndpoint(): string;",
"public function getEndpoint(): string;"
] |
[
"0.87519574",
"0.79829484",
"0.78573096",
"0.7785546",
"0.77819735",
"0.77791816",
"0.77401984",
"0.76932853",
"0.76932853",
"0.76932853",
"0.76932853",
"0.76932853",
"0.76932853",
"0.7679873",
"0.7658427",
"0.76440513",
"0.7601722",
"0.7583886",
"0.7579459",
"0.7534397",
"0.75046855",
"0.7499318",
"0.7498806",
"0.7486",
"0.74751836",
"0.74449754",
"0.7421157",
"0.7421157",
"0.7421157",
"0.7421157"
] |
0.8250744
|
1
|
Get the endpoint method.
|
public function getMethod()
{
return $this->method ?: 'GET';
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function get_method() {\n\t\treturn $this->method;\n\t}",
"public function getMethod(): string\n {\n return $this->method;\n }",
"public function getMethod(): string\n {\n return $this->method;\n }",
"public function GetMethod () {\n\t\treturn $this->method;\n\t}",
"public function getMethod()\n {\n return $this->values[\"method\"];\n }",
"public function get_method() {\n return $this->_method;\n }",
"public function getMethod() {\n \n return $this->method;\n \n }",
"public function getMethod() {\n return $this->method;\n }",
"public function getMethod() {\n return $this->method;\n }",
"public function getMethod() {\n return $this->method;\n }",
"public function getMethod ()\n {\n\n return $this->method;\n\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->getAttribute('method', 'get');\n }"
] |
[
"0.7885144",
"0.7882401",
"0.7882401",
"0.7879144",
"0.7843956",
"0.7825677",
"0.7823108",
"0.78097236",
"0.78097236",
"0.78097236",
"0.7802889",
"0.7795543",
"0.7795543",
"0.7795543",
"0.7795543",
"0.7795543",
"0.7795543",
"0.7795543",
"0.7795543",
"0.7795543",
"0.7795543",
"0.7795543",
"0.7795543",
"0.7795543",
"0.7795543",
"0.7795543",
"0.7795543",
"0.7795543",
"0.7795543",
"0.77816826"
] |
0.78874403
|
0
|
Check if item name contains which type of item it is
|
public function checkItemType(string $name, string $type): bool
{
return str_contains(ucfirst($name), $type);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function hasItemtype(){\n return $this->_has(40);\n }",
"function valid_item_name ($item_name) {\n if ( empty($item_name) )\n return false;\n else \n return true;\t\n}",
"public function canCreateItem(string $type, string $name): bool;",
"function isItem( $var );",
"function existsItemStrict ($name, $type) {\n\t\tif (array_key_exists ('/'.$type.$name, $this->allConfigItems) or\n\t\t\tarray_key_exists ('/'.$type.$name, $this->allUserItems)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public static function item_type_attribute($attr, $model){\n\t\tforeach($model->get_item_types() as $item_type){\n\t\t\tif( Model_Kiwi::starts_with($attr, $item_type)){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"static function GetItemType() { return \"\"; }",
"function existsItem ($name) {\n\t\tif ($this->existsItemStrict ($name, STRING)) {\n\t\t\treturn true;\n\t\t} elseif ($this->existsItemStrict ($name, BOOL)) {\n\t\t\treturn true;\n\t\t} elseif ($this->existsItemStrict ($name, NUMERIC)) {\n\t\t\treturn true;\n\t\t} elseif ($this->existsItemStrict ($name, REAL)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function hasItemType(): bool\n {\n return $this->itemTypeAttr !== NULL;\n }",
"public function hasType($name);",
"public function available_item_types()\n {\n }",
"public function get_type() {\n\t\treturn isset( $this->item['type'] ) ? esc_attr( $this->item['type'] ) : false;\n\t}",
"public function isItemChecked($name);",
"public function hasType(string $name): bool;",
"public function getTypeOfItem()\n {\n return $this->type;\n }",
"public function getItemName();",
"public function getMatchingTypeName();",
"function isType($input) {\n\treturn ((strcmp($input, 'dynamic') == 0) || (strcmp($input, 'static') == 0));\n}",
"public function testGetItemsByType()\n\t{\n\t\t$items = self::$items->getItemsByType(\\ElectronicItem\\ElectronicItem::ELECTRONIC_ITEM_CONSOLE);\n\t\t$this->assertSame(350.98, $items[0]->getPrice());\n\t\t$this->assertSame(80, $items[0]->getExtrasPrice());\n\t}",
"public function get_item_type() {\n $query = $this->db->get('item_type');\n if ($query->num_rows() > 0) {\n return $query->result();\n } else {\n return false;\n }\n }",
"function order_contains_line_item_type($order, $type) {\n if (!empty($order->commerce_line_items)) {\n $order_wrapper = entity_metadata_wrapper('commerce_order', $order);\n foreach ($order_wrapper->commerce_line_items->value() as $line_item) {\n if ($line_item->type == trim($type)) {\n return TRUE;\n }\n }\n }\n return FALSE;\n}",
"function order_contains_product_type($order, $type) {\n if (!empty($order->commerce_line_items)) {\n $order_wrapper = entity_metadata_wrapper('commerce_order', $order);\n foreach ($order_wrapper->commerce_line_items as $line_item_wrapper) {\n if (!empty($line_item_wrapper->commerce_product)) {\n if ($line_item_wrapper->commerce_product->type->value() == trim($type)) {\n return TRUE;\n }\n }\n }\n }\n return FALSE;\n}",
"abstract public function hasItemChild($itemName, $childName);",
"function is_exists_item_attribute_type($s_item_type, $s_attribute_type, $order_no = NULL) {\n\t$query = \"SELECT 'x' FROM s_item_attribute_type \";\n\n\tif (strlen($s_attribute_type) > 0) {\n\t\t$where .= \" s_attribute_type = '\" . $s_attribute_type . \"'\";\n\t\tif (is_numeric($order_no))\n\t\t\t$where .= \" AND order_no = '$order_no'\";\n\t}\n\n\t// Support check for any instances of the s_attribute_type in the s_item_attribute_type table,\n\t// or a specific s_item_type instance if $s_item_type specified.\t\n\tif (strlen($s_item_type) > 0) {\n\t\tif (strlen($s_attribute_type) > 0)\n\t\t\t$where .= \" AND \";\n\t\t$where .= \"s_item_type = '$s_item_type'\";\n\t}\n\n\tif (strlen($where) > 0)\n\t\t$query .= \" WHERE $where \";\n\n\t$result = db_query($query);\n\tif ($result && db_num_rows($result) > 0) {\n\t\tdb_free_result($result);\n\t\treturn TRUE;\n\t}\n\n\t//else\n\treturn FALSE;\n}",
"function _is_valid_nav_menu_item($item)\n {\n }",
"protected function isSpecialFieldtype(array $item): bool\n {\n $specialFieldtypes = ['bard', 'grid', 'replicator', 'table'];\n\n if (in_array($item['field']['type'], $specialFieldtypes)) {\n return true;\n }\n\n return false;\n }",
"abstract public function getTypeName();",
"public function getNamedItem($name) { }",
"private function setType( string $name ) {\n return in_array($name, ['Beverage', 'Appetizer', 'Entree', 'Dessert'], true) ? 'course' : 'mess-up';\n }",
"function link_to_items_with_item_type($text = null, $props = array(),\n $action = 'browse', $itemTypeObj = null\n) {\n if (!$itemTypeObj) {\n $itemTypeObj = get_current_record('item_type');\n }\n $queryParams = array();\n $queryParams['type'] = $itemTypeObj->id;\n if ($text === null) {\n $text = $itemTypeObj->totalItems();\n }\n return link_to('items', $action, $text, $props, $queryParams);\n}"
] |
[
"0.6640764",
"0.66392213",
"0.6529418",
"0.6520155",
"0.65078425",
"0.64542973",
"0.64149886",
"0.62875617",
"0.6218366",
"0.61955833",
"0.59936076",
"0.5985854",
"0.5964475",
"0.59142655",
"0.5893545",
"0.58895105",
"0.58772796",
"0.5873737",
"0.5843116",
"0.5830917",
"0.57863617",
"0.57676893",
"0.5750013",
"0.57447064",
"0.5727342",
"0.5647582",
"0.56237423",
"0.5586692",
"0.5579848",
"0.5573696"
] |
0.74295384
|
0
|
Iterates through each item and updates their properties differently depending on type
|
public function updateQuality(): void
{
foreach ($this->items as $item) {
switch ($item->name) {
case $this->checkItemType($item->name, 'Aged Brie'):
$itemType = new AgedBrie($item);
$this->itemTypeUpdateQuality($itemType);
break;
case $this->checkItemType($item->name, 'Backstage passes'):
$itemType = new BackstageTicket($item);
$this->itemTypeUpdateQuality($itemType);
break;
case $this->checkItemType($item->name, 'Sulfuras'):
$itemType = new Sulfuras($item);
$this->itemTypeUpdateQuality($itemType);
break;
case $this->checkItemType($item->name, 'Conjured'):
$itemType = new Conjured($item);
$this->itemTypeUpdateQuality($itemType);
break;
default:
$itemType = new Common($item);
$this->itemTypeUpdateQuality($itemType);
}
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function updateItemHashes()\n {\n foreach ($this->getItems() as $itemHash => $item) {\n $this->updateItemHash($itemHash);\n }\n }",
"abstract public function updateItem(&$object);",
"public function updateItems()\n {\n if (count($this->items)) {\n foreach ($this->items as $item) {\n $item->setInvoice($this);\n }\n }\n }",
"public function updateItems()\n {\n if (count($this->items)) {\n foreach ($this->items as $item) {\n $item->setQuote($this);\n }\n }\n }",
"protected function updateItems()\n {\n $this->log(\"Loading items...\");\n\n /** @var Item[] $items */\n $items = Item::find()->all();\n\n foreach ($items as $item) {\n if (!$this->hasItemSavedValue($item->id)) {\n $this->saveItemValue($item->id, $item->getDefaultNAValue(), $item->type, false);\n }\n }\n\n $this->log(\"Done\");\n }",
"abstract protected function transformItem($item);",
"public function setUpdated(): void\n {\n $this->originalData = $this->itemReflection->dehydrate($this->item);\n }",
"abstract protected function updateSpecificProperties($row);",
"protected function updateItems()\n\t{\n\t\t$old_items = $this->old->getPdo()->query(\n\t\t\t\"SELECT ti.scti_type, i.* FROM tbl_scorecard_items i\n\t\t\tjoin tbl_scorecard_template_items ti ON i.sci_scti_id = scti_id\n\t\t\tWHERE i.sci_scorecard_id IN(\n\t\t\t\tSELECT scorecard_id FROM tbl_scorecards WHERE scorecard_type = 'MASTER' ORDER BY scorecard_template_id ASC\n\t\t\t)\n\t\t\tORDER BY i.sci_scorecard_id ASC, ti.scti_order ASC\"\n\t\t)->fetchAll(PDO::FETCH_OBJ);\n\n\t\t$new_items = $this->new->getPdo()->query(\n\t\t\t\"SELECT ti.type, i.* FROM scorecard_items i\n\t\t\tjoin scorecard_template_items ti ON i.template_item_id = ti.id\n\t\t\tWHERE i.scorecard_id IN(\n\t\t\t\tSELECT id FROM scorecards WHERE type = 'MASTER' ORDER BY template_id ASC\n\t\t\t)\n\t\t\tORDER BY i.scorecard_id ASC, ti.order ASC\n\t\t\")->fetchAll(PDO::FETCH_OBJ);\n\n\t\tforeach($old_items as $key => $old)\n\t\t{\n\t\t\t$this->updateItem($old, $new_items[$key]);\n\t\t}\n\t}",
"public function setItems($items)\n {\n $all_items = true;\n foreach ($items as $product) {\n $all_items &= $product instanceof Assurance;\n }\n if ($all_items) {\n $this->items = $items;\n parent::setCollection($items);\n }\n }",
"public function convertItem($item);",
"function updates($list_item, $params)\n {\n foreach ($list_item as $value) {\n $this->update($params, $value);\n }\n }",
"public function updateQuality(): void\n {\n foreach ($this->items as $item) {\n $this->updateItemQuality($item);\n }\n }",
"private function parseFields(): void\n {\n foreach ($this->reflect->getProperties() as $item) {\n $name = $item->getName();\n if (in_array($name, self::SKIP_FIELDS, true)) {\n continue;\n }\n\n $docblock = $item->getDocComment();\n $defType = $this->getFieldType($name, $docblock);\n $varType = $this->getVarType($name, $docblock);\n $isRequired = $this->isRequired($name, $docblock);\n $storage = &$this->fieldsBuffer[$defType];\n\n switch ($defType) {\n case self::FIELD_SIMPLE_TYPE:\n $storage[] = $this->processSimpleField($name, $varType, $isRequired);\n break;\n case self::FIELD_DATE_TYPE:\n $storage[] = $this->processDateField($name, $varType, $isRequired);\n break;\n case self::FIELD_MO_TYPE:\n $storage[] = $this->processManyToOneField($name, $varType, $isRequired);\n break;\n case self::FIELD_OM_TYPE:\n $storage[] = $this->processOneToManyField($name);\n break;\n }\n }\n\n unset($storage);\n }",
"function mongo_node_mass_update($entity_type, $entities, $args) {\n foreach ($entities as $entity_id) {\n $entity = entity_get_controller($entity_type)->load(array($entity_id));\n $entity = reset($entity);\n // Skip if not updates.\n if (!isset($args['updates'])) {\n continue;\n }\n foreach ($args['updates'] as $p_name => $p_val) {\n $entity->$p_name = $p_val;\n }\n entity_save($entity_type, $entity);\n }\n}",
"function wp_is_auto_update_forced_for_item($type, $update, $item)\n {\n }",
"function get_meta($items) {\n\t\tif($items) {\n\t\t\tif(is_array($items)) {\n\t\t\t\tforeach($items as $item) {\n\t\t\t\t\t$item->meta = get_post_custom($item->ID);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$items->meta = get_post_custom($items->ID);\n\t\t\t}\n\t\t}\n\t\treturn $items;\n\t}",
"function UpdateItem($dataType, $item, $calendarID = NULL)\r\n {\r\n if ($dataType == 'contact groups')\r\n return $this->UpdateContactGroup($item);\r\n if ($dataType == 'contacts')\r\n return $this->UpdateContact($item);\r\n if ($dataType == 'calendars')\r\n return $this->UpdateCalendar($item);\r\n if ($dataType == 'events')\r\n return $this->UpdateEvent($item, $calendarID);\r\n if ($dataType == 'task lists')\r\n return $this->UpdateTaskList($item);\r\n if ($dataType == 'tasks')\r\n return $this->UpdateTask($item, $calendarID);\r\n if ($dataType == 'message boxes')\r\n return $this->UpdateMessageBox($item);\r\n if ($dataType == 'messages')\r\n return $this->UpdateMessage($item, $calendarID);\r\n \r\n WriteError(\"Unrecognized data type: $dataType\");\r\n exit(1);\r\n }",
"public function should_update($type, $item, $context)\n {\n }",
"private function update_type($new_type) { \n\n\t\tif ($this->_update_item('type',$new_type,'50')) { \n\t\t\t$this->type = $new_type;\n\t\t}\n\n\t}",
"function setUniversalFields($items)\n\t{\n\t\tforeach ($items as $item)\n\t\t{\n\t\t\t$item->universalFields = new stdClass;\n\n\t\t\tarray_walk(parse_ini_string($item->plugins), function (&$v, $k) use ($item)\n\t\t\t{\n\t\t\t\tif (preg_match('/universal_fields/', $k))\n\t\t\t\t{\n\t\t\t\t\t$k = str_replace('universal_fields', '', $k);\n\t\t\t\t\t$item->universalFields->$k = $v;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn $items;\n\n\t}",
"private function mapProperties(): void\n {\n $this->properties = Collect::keyBy($this->collection->getProperties()->getValues(), 'identifier');\n }",
"public function handlePropertyValueUpdates()\n {\n $locales = [];\n if (class_exists(Locale::class)) {\n $locales = Locale::listLocales()->where('is_enabled', true)->all();\n }\n\n $formData = array_wrap(post('PropertyValues', []));\n if (count($formData) < 1) {\n PropertyValue::where('product_id', $this->id)->whereNull('variant_id')->delete();\n }\n\n $properties = Property::whereIn('id', array_keys($formData))->get();\n $propertyValues = PropertyValue::where('product_id', $this->id)->whereNull('variant_id')->get();\n\n foreach ($formData as $id => $value) {\n $property = $properties->find($id);\n\n $pv = $propertyValues->where('property_id', $id)->first()\n ?? new PropertyValue([\n 'product_id' => $this->id,\n 'property_id' => $id,\n ]);\n\n $pv->value = $value;\n foreach ($locales as $locale) {\n $transValue = post(\n sprintf('RLTranslate.%s.PropertyValues.%d', $locale->code, $id),\n post(sprintf('PropertyValues.%d', $id)) // fallback\n );\n $transValue = $this->handleTranslatedPropertyValue(\n $property,\n $pv,\n $value,\n $transValue,\n $locale->code\n );\n $pv->setAttributeTranslated('value', $transValue, $locale->code);\n }\n\n // If the value became empty delete it.\n if (($value === null || $value === '') && $pv->exists) {\n $pv->delete();\n } else {\n $pv->save();\n }\n\n // Transfer any deferred media\n if ($property->type === 'image') {\n $media = DeferredBinding::where('master_type', PropertyValue::class)\n ->where('master_field', 'image')\n ->where('session_key', post('_session_key'))\n ->get();\n\n foreach ($media as $m) {\n $slave = $m->slave_type::find($m->slave_id);\n $slave->field = 'image';\n $slave->attachment_type = PropertyValue::class;\n $slave->attachment_id = $pv->id;\n $slave->save();\n $m->delete();\n }\n }\n }\n }",
"function setItemSystemFields($data, $item){\n if ($this->debug_mode)\n echo $this->ClassName . \"setItemSystemFields();\" . \"<HR>\";\n foreach ($item as $key => $value) {\n \tif($key == '_lastmodified'){\n \t\tcontinue;\n \t}\n if ((substr($key, 0, 1) == \"_\") && (! isset($data[$key]))) {\n $data[$key] = $value;\n }\n }\n if (isset($data['_lastmodified'])) {\n \tunset ($data['_lastmodified']);\n }\n }",
"protected function fillProperties()\n {\n foreach ($this as $key => $value) {\n if ($this->isPrivate($key)) {\n continue;\n }\n $this->currentProperties[\"{$key}\"] = $value;\n $this->newProperties[\"{$key}\"] = $value;\n }\n }",
"protected function setProperties()\n {\n foreach ($this->data as $key => $value) {\n $this->$key = $value;\n }\n }",
"public function canIterateOverProperties()\n {\n $object0 = $this->getMock('ATM_Config_Abstract', array('getName'));\n $object1 = $this->getMock('ATM_Config_Comment', array(), array('comment'));\n $this->object->append($object0);\n $this->object->append($object1);\n $this->object->append($object0);\n $this->object->iterateOn('objIds');\n $expect = $this->object->getArrayCopy();\n foreach ($this->object as $position=>$objectId) {\n $this->assertInternalType('string', $objectId);\n $this->assertEquals($expect[$position], $objectId);\n }\n $this->assertEquals(2, $position);\n }",
"protected function makeItemTraversable($item) {\n\t\tif ($item instanceof AbstractEntity) {\n\t\t\t$item = $item->_getProperties();\n\t\t}\n\t\treturn $item;\n\t}",
"abstract function set ($item, $data);",
"protected function _loopObject($data, $type)\n {\n try {\n if (!is_array($data)) {\n if (get_class($data) != $type) {\n throw new CollectionException(\"Wrong object added to collection\", self::WRONG_OBJECT);\n }\n } else {\n foreach ($data as $item) {\n if (get_class($item) != $type) {\n throw new CollectionException(\"Wrong object added to collection\", self::WRONG_OBJECT);\n }\n }\n }\n } catch (CollectionException $e) {\n $this->_getError($e);\n }\n }"
] |
[
"0.5729681",
"0.567684",
"0.5620959",
"0.55612016",
"0.55297667",
"0.5506761",
"0.54386526",
"0.541698",
"0.53475237",
"0.52811646",
"0.52700526",
"0.5209477",
"0.5160742",
"0.513327",
"0.5113657",
"0.5108039",
"0.5063898",
"0.50471354",
"0.50427264",
"0.50260043",
"0.500275",
"0.4979904",
"0.4953963",
"0.49385867",
"0.49244013",
"0.49146742",
"0.49037752",
"0.48825473",
"0.48674655",
"0.48586637"
] |
0.63794893
|
0
|
Convert time in different formats to mongo date
|
protected function _timeToMongoDate($time)
{
if(!is_numeric($time)) {
$time = strtotime($time);
if(!$time) {
$time = time();
}
}
return new \MongoDate($time);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function unixTimeToDBTime($time) {\n return date(\"Y-m-d\", $time);\n }",
"function rfc_3339($time)\n {\n return \\Carbon\\Carbon::createFromFormat('Y-m-d H:i:s', $time)->toRfc3339String();\n }",
"function modify_lora_date($time)\n\t{\n\t\t$cdate = strtotime($time);\n\t\t# miliseconds unix time\n\t\tif( $cdate == false ) {\n\t\t\t$militime = DateTime::createFromFormat('U.u', $time/1000);\n\t\t\t$militime->setTimezone(new DateTimeZone(date_default_timezone_get())); \n\t\t\treturn $militime->format(\"Y.m.d H:i:s.u\");\n\t\t}\n\t\treturn Date(\"Y.m.d H:i:s\", $cdate);\n\t}",
"static function convertToDBFormat($timeStr){\n\t\t$date = new DateTime();\n\t\t$time = Vtiger_Time_UIType::getTimeValueWithSeconds($timeStr);\n\t\t$dbInsertDateTime = DateTimeField::convertToDBTimeZone($date->format('Y-m-d').' '.$time);\n\t\treturn $dbInsertDateTime->format('H:i:s');\n\t}",
"function dateConvert($date,$format){\n //Casting created_at\n $date = new DateTime($date);\n $waktu = $date->Format($format);\n return $waktu;\n}",
"function convert_time($time) {\n\t$date = date('g:i A', strtotime($time));\n\n\treturn $date;\n}",
"function str2DBDT($str)\n{\n $intTime = strtotime($str);\n if ($intTime === false)\n return NULL;\n return date(\"Y-m-d H:i:s\", $intTime);\n}",
"public function convertDateTimeToDB($_dtime) {\n\t\tif(ereg(\"^([0-9]{1,2})-([0-9]{1,2})-([0-9]{4})[[:space:]]\n\t\t\t([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}).*$\",\n\t\t\t$_dtime, $_arrdt) !== false) {\n\t\t\treturn sprintf(\"%04.4d-%02.2d-%02.2d %02.2d:%02.2d:%02.2d\",\n\t\t\t\t$_arrdt[3], $_arrdt[2], $_arrdt[1],\n\t\t\t\t$_arrdt[4], $_arrdt[5], $_arrdt[6]);\n\t\t}\n\t\treturn false;\n\t}",
"function ppConvertDate($date,$time='') {\n // Breakup the string using either a space, fwd slash, bkwd slash or colon as a delimiter\n $atok = strtok($date,\" /-\\\\:\");\n while ($atok !== FALSE) {\n $atoks[] = $atok;\n $atok = strtok(\" /-\\\\:\"); // get the next token\n }\n if ($time == '') {\n $timestamp = mktime(0,0,0,$atoks[1],$atoks[2],$atoks[0]);\n } else {\n $btok = strtok($time,\" /-\\\\:\");\n while ($btok !== FALSE) {\n $btoks[] = $btok;\n $btok = strtok(\" /-\\\\:\");\n }\n $timestamp = mktime($btoks[0],$btoks[1],$btoks[2],$atoks[1],$atoks[2],$atoks[0]);\n }\n return $timestamp;\n}",
"function convertDate ($matches) {\n\t$year = array_pop($matches['year']); //Get last found year\n\t$year = ($year) ? $year : date('Y'); //If nothing found, use this year\n\t$month = array_pop($matches['month']); //Get last found month\n\t$month = ($month) ? $month : '01'; //If nothing found, use January\n\t$day = array_pop($matches['day']); //Get last found day\n\t$day = ($day) ? $day : '01'; //If nothing found, use 1st\n\t$time = date('U', strtotime($month . '/' . $day . '/' . $year)); //Convert to unix timestamp\n\treturn $time;\n}",
"function __makeSolrTime($dateString) {\n\t\t$date = $this->time->format('Y-m-d', intval($this->time->fromString($dateString)));\n\t\t$date .= 'T';\n\t\t$date .= $this->time->format('H:i:s', intval($this->time->fromString($dateString)));\n\t\t$date .= 'Z';\n\t\treturn $date;\n\t}",
"protected static function field($value)\n { if ( ! is_string($value)) {\n return $value;\n }\n\n if (preg_match('/^\\d{4}\\D\\d{2}\\D\\d{2}(?:\\D?\\d{2}:\\d{2}(?::\\d{2})?)?$/', $value)) {\n return new \\MongoDate(strtotime($value));\n }\n }",
"public function testMapMongoDateToDb()\n {\n $date = new \\MongoDate();\n $this->assertFalse($this->mapper->isResponsibleToDb($date));\n $dump = $this->mapper->mapToDb($date);\n }",
"function toDate($time, $format = 'Y-m-d H:i:s') {\n\tif (empty($time)) {\n\t\treturn '';\n\t}\n\t$format = str_replace('#', ':', $format);\n\treturn date($format, $time);\n}",
"function acf_convert_time_to_php($time = '')\n{\n}",
"function time_2_timestamp(&$time) {\r\n if ($time instanceof \\DateTime)\r\n $time = $time->getTimestamp();\r\n else\r\n $time = strtotime($time);\r\n}",
"public function dateTimeFormat();",
"public function fieldsToMongo($fields)\n {\n if (isset($fields['channel_code'])) {\n $fields['channel_code'] = (string) $fields['channel_code'];\n }\n if (isset($fields['time'])) {\n if ($fields['time'] instanceof \\DateTime) { $fields['time'] = $fields['time']->getTimestamp(); } elseif (is_string($fields['time'])) { $fields['time'] = strtotime($fields['time']); } $fields['time'] = new \\MongoDate($fields['time']);\n }\n\n\n return $fields;\n }",
"function s2_date($time)\n{\n if (!$time)\n return '';\n\n $date = date(Lang::get('Date format'), $time);\n $lang_month_small = Lang::get('Inline Months');\n if (isset($lang_month_small))\n $date = str_replace(array_keys($lang_month_small), array_values($lang_month_small), $date);\n\n return $date;\n}",
"function mysql_to_rfc3339($date_string)\n {\n }",
"function s2_date_time($time)\n{\n if (!$time)\n return '';\n\n $date = date(Lang::get('Time format'), $time);\n $lang_month_small = Lang::get('Inline Months');\n if (!empty($lang_month_small))\n $date = str_replace(array_keys($lang_month_small), array_values($lang_month_small), $date);\n\n return $date;\n}",
"function convDate($theDate) {\r\n return date(\"Y-m-d H:i:s\", strtotime($theDate));\r\n}",
"function str2date($in){\n\n\t$t = split(\"/\",$in);\n\n\tif (count($t)!=3) return -1;\n\n\tif (!is_numeric($t[0])) return -1;\n\tif (!is_numeric($t[1])) return -2;\n\tif (!is_numeric($t[2])) return -3;\n\n\tif ($t[2]<1902 || $t[2]>2037) return -3;\n\n\treturn mktime (0,0,0, $t[1], $t[0], $t[2]);\n}",
"function standard_date_time2($date) {\n\t$timestamp = strtotime($date);\n\t$fdate=date('d M, Y h:i A', $timestamp);\n\treturn $fdate;\n\t}",
"function dbToUIdate() {\r\n\t\t\r\n\t\t$year = substr($this->event_date_time, -19, 4);\r\n\t\t$month = substr($this->event_date_time, -14, 2);\r\n\t\t$day = substr($this->event_date_time, -11, 2);\r\n\r\n\t\t$this->date = $month . \"/\" . $day . \"/\" . $year;\r\n\t\r\n\t}",
"function convetDate($date, $time)\n{\n $tmp = explode(\"-\", $date);\n $newDate = $tmp[2] . '-' . $tmp[1] . '-' . $tmp[0] . ' ' . $time;\n return $newDate;\n}",
"public static function datetime_db($time) {\n\t\treturn $time == \"0000-00-00 00:00:00\" ? \"\" : date(env('DATETIME_DB',\"Y-m-d H:i:s\"),strtotime($time));\n\t}",
"function upnp_date($timedate, $format) {\n\t$res = date('Y-m-d', $timedate);\n\n\tif (1 === $format) {\n\t\t$res = $res . 'T' . date('H:i:s', $timedate);\n\t}\n\n\treturn ($res);\n}",
"public function _toGeneralType($data)\n {\n if($data instanceof MongoDate)\n {\n return new DateTime('@'.$data->sec);\n }\n\n if($data instanceof MongoId)\n {\n return (string) $data;\n }\n\n if($data instanceof DBRef)\n {\n // Need to determine how to handle this...\n // ... either send a request to mongo\n // ... or come up with a standard format to provide a psuedo view\n }\n }",
"function api_date($str){\n\t\treturn datetime_convert('UTC', 'UTC', $str, 'D M d H:i:s +0000 Y' );\n\t}"
] |
[
"0.585422",
"0.5738282",
"0.5735248",
"0.57086897",
"0.5683741",
"0.56679165",
"0.56278473",
"0.55990416",
"0.5571864",
"0.5501401",
"0.54973614",
"0.54967755",
"0.5470626",
"0.5470617",
"0.54412585",
"0.53976214",
"0.53975034",
"0.5373763",
"0.53324676",
"0.53056043",
"0.5303874",
"0.52917916",
"0.527986",
"0.5274527",
"0.5271278",
"0.5257233",
"0.5220169",
"0.5216252",
"0.5207504",
"0.52045643"
] |
0.6893923
|
0
|
we dont want to hardcode "isFavorited" in our vue file, so we will do is to get its attribute, so that we can do something like: $reply>isFavorited, as seen below:
|
public function getIsFavoritedAttribute(){
return $this->isFavorited();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function isFavorited(){\n // return ! $this->favorites->where('user_id', auth()->id())->isEmpty();\n\n //so we do: \n //we are casting to boolean \"!!\"\n //if there is a reply, the user favorites the reply\n return !! $this->favorites->where('user_id', auth()->id())->count();\n }",
"public function getIsFavoritedAttribute()\n {\n return $this->isFavorited();\n }",
"public function isFavorited()\n {\n return $this->getData('isFavorited', false) === true;\n }",
"public function getIsFavouriteAttribute()\n {\n $user = auth()->guard('client')->user() ?? auth()->guard('api')->user();\n if (!$user)\n {\n return false;\n }\n $favourite = $this->whereHas('favourites',function ($query) use($user){\n $query->where('client_post.client_id',$user->id);\n $query->where('client_post.post_id',$this->id);\n })->first();\n // client\n // null\n if ($favourite)\n {\n return true;\n }\n return false;\n }",
"public function isFavorited()\n {\n\n // NB FARE ATTENZIONE CHE SE VALORIZZIAMO CON IL QUERY BUILDER IL METODO WHERE VUOLE UN ARRAY KEY=>VALUE\n // MENTRE IL METODO WHERE DELLA COLLECTION VUOLE 2 PARAMETRI\n\n // Metodo via SQL - N+1 problem () ad ogni commento lancio la query per sapere se ho messo il like\n //return $this->favorites()->where(['user_id' => Auth::id()])->exists();\n\n // Metodo via Collection - NON HO IL N+1 problem () ad ogni commento NON lancio la query in quanto ho già i favorites precaricati tramite eagerLoad, quindi lavoro sulla collection per sapere se ho messo il like\n return !! $this->favorites->where('user_id', auth()->id())->count(); // !! inverto la negazione facendo il cast a boolean\n }",
"public function getIsFavorite()\n {\n if (!$this->isPropertyAvailable(\"IsFavorite\")) {\n return null;\n }\n return $this->getProperty(\"IsFavorite\");\n }",
"public function getRecommend()\n {\n return $this->recommend;\n }",
"public function getRecommend()\n {\n return $this->recommend;\n }",
"public function getReplyPost();",
"public function show(Reply $reply)\n {\n //\n }",
"public function show(Reply $reply)\n {\n //\n }",
"public function show(Reply $reply)\n {\n //\n }",
"public function show(Reply $reply)\n {\n //\n }",
"public function favorite()\n {\n $mentor = User::leftJoin('review_mentor', 'user_id_mentor', '=', 'users.id')\n ->where('mentor', 'Y')\n ->groupBy('users.id')\n ->select('users.id', 'users.first_name', 'users.last_name', 'users.photo',\n DB::raw(\"SUM(CASE WHEN is_like = 'Y' THEN 1 ELSE 0 END) as islike \"),\n DB::raw(\"SUM(CASE WHEN is_like = 'N' THEN 1 ELSE 0 END) as unlike \")\n )\n ->get();\n return MentorFavorite::collection($mentor);\n }",
"public function show_favorite_post()\n {\n $client = auth()->user();\n\n\n $post = Client::find($client->id)->posts()->get();\n return $this->responsejson(true, 'تم العملية بنجاح' , $post);\n\n }",
"public function isFavorite()\n {\n $favorite = Favorite::where('news_id' , $this->id)\n ->where('user_id', Auth::user()->id)\n ->first();\n if (!$favorite) {\n return false;\n }\n return true;\n }",
"public function show(Favorite $favorite)\n {\n //\n }",
"public function getShowOnFaq()\n {\n return $this->getData('show_on_faq');\n }",
"public function getAvailableReactions()\n {\n return 'Follow';\n }",
"public function favorite(Post $post)\n {\n if (Groupe::findOrFail($post->groupe_id)->is_member())\n return $post->favorited_users()->toggle(Auth::user());\n \n return response()->json(['message' => 'Not a member'], 200);\n /*if (empty($post->favorited_users()->find(Auth::id()))) {\n $post->favorited_users()->attach(Auth::id());\n return response()->json(['message' => 'Le post a été aimé avec succès'], 200);\n } else {\n DB::table('favorises')->where('compte_id', Auth::id())->where('post_id', $post->id)->delete();\n return response()->json(['message' => 'Le post a été - avec succès'], 200);\n }*/\n }",
"public function getReply()\n {\n return $this->reply;\n }",
"function bibdk_favourite_remember_favourites_message() {\n $link = l(t('add_favourites',array(),array('context'=>'bibdk_favourite')), 'vejviser');\n return t('remember_to_add_favourite_libraries',array(),array('context'=>'bibdk_favourite')) . ' ' . $link;\n}",
"public function an_authenticated_user_can_toggle_favourite_any_reply()\n {\n $post = factory(Post::class)->create();\n $post->comments()->create(factory(Comment::class)->make()->toArray());\n $user = factory(User::class)->create();\n\n $this->actingAs($user);\n\n $this->actingAs($user)->get('/posts/' . $post->id . '/comments/' . $post->comments()->first()->id . '/favourites');\n $this->assertCount(1, $post->comments()->first()->favourites);\n\n $this->actingAs($user)->get('/posts/' . $post->id . '/comments/' . $post->comments()->first()->id . '/favourites');\n $this->assertCount(0, $post->comments()->first()->favourites);\n }",
"function reply_author() {\n\tglobal $reply;\n\treturn $reply['author'];\n}",
"function recuperarFavoritos(){\n\t\t$codpincho = new CodigoPincho();\n\t\t$res = $codpincho->recuperarFavoritos();\n\t\treturn $res;\n\t}",
"public function liked()\n {\n\t\t$user = $this->uri->segment(2, 0);;\n }",
"public function store(Reply $reply)\n {\n $reply->favorite();\n\n return back()\n ->with('flash' , 'Favorite it');\n }",
"public function destroy(Reply $reply)\n {\n\n $reply->unfavorite();\n\n if (request()->expectsJson()) {\n return response(['status' => 'favorite was toggled']);\n }\n }",
"public function get_mention(){retrun($id_local_mention); }",
"public function likes(){\n }"
] |
[
"0.6613013",
"0.644836",
"0.59057933",
"0.5687825",
"0.5355456",
"0.5339774",
"0.5201861",
"0.5201861",
"0.51937497",
"0.5191021",
"0.5191021",
"0.5191021",
"0.5191021",
"0.5186547",
"0.51308936",
"0.5126078",
"0.5062854",
"0.5038636",
"0.5014614",
"0.5011257",
"0.49579406",
"0.49358836",
"0.49006864",
"0.48714206",
"0.48562232",
"0.48553932",
"0.48371476",
"0.48147961",
"0.48116416",
"0.48032185"
] |
0.6529701
|
1
|
Update kit color formation
|
public function update_kit_color_formation(){
if($this->authenticate_api())
{
$response = array( "status" => "error" );
$required_fields = array("kit_color", "formation", "match_id");
$status = $this->verifyRequiredParams($required_fields);
$kit_color = $this->request->getVar("kit_color");
$match_id= $this->request->getVar("match_id");
if($this->ifempty($match_id, "match id")!== true){
$response['message'] = $this->ifempty($match_id, "match id");
$this->sendResponse($response);
}
if($this->ifexists('tbl_tournament_match', $match_id, 'id') != true){
$response['message'] = "Please enter valid match id";
$this->sendResponse($response);
}
if(!in_array($kit_color, array(1, 2))){
$response['message'] = "Please select valid color";
$this->sendResponse($response);
}else{
$color_update = array("kit_color" =>$kit_color);
$update_kit_color = $this->db->table('tbl_tournament_match')->where('id',$match_id)->set($color_update)->update();
$response['status'] = "success";
$response['message'] = "Somthing wrong Data not Updated";
if($update_kit_color)
$response['message'] = "Data Update Successfully";
$this->sendResponse($response);
}
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function setColor( $c ) {\n $this->currentColor = $c;\n}",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"public function color()\n {\n }",
"public function colorImage() {}",
"public function changeColorCup($request);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function getColor() {\n\t}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function colour();",
"function setColor($newColor) {\n\t\t$this->color = $newColor;\n\t}",
"public function getColor()\n {\n }",
"function getColor() { return $this->_color; }",
"public function updateProfileColor() {\n\t\t\n\t\treturn $this->_post(self::URL_UPDATE_PROFILE_COLOR, $this->_query);\n\t\t\n\t}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function setColor() {\n\t\t$cnt = func_num_args();\n\t\tif ($cnt == 0) {\n\t\t\t$this->Color = new TColor(255,100,255);\n\t\t}\telse\n\t\tif ($cnt == 1) {\n\t\t\tlist ($sender) = func_get_args();\n\t\t\tif ($sender instanceof TColor) {\n\t\t\t\t$this->Color = new TColor(\n\t\t\t\t$sender->getRed (),\n\t\t\t\t$sender->getGreen(),\n\t\t\t\t$sender->getBlue ());\n\t\t\t}\telse\n\t\t\tif (is_string($sender)) {\n\t\t\t\t// todo: string\n\t\t\t}\n\t\t}\telse\n\t\tif ($cnt == 3) {\n\t\t\tlist($a1,$a2,$a3) = func_get_args();\n\t\t\t$this->Color = new TColor($a1,$a2,$a3);\n\t\t}\n\t}",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }"
] |
[
"0.6178387",
"0.60125643",
"0.58980244",
"0.5876594",
"0.58747625",
"0.5868117",
"0.5669373",
"0.56349283",
"0.5600344",
"0.5581751",
"0.5581751",
"0.5581751",
"0.5581751",
"0.55722016",
"0.55722016",
"0.55692965",
"0.55497074",
"0.55409425",
"0.5524944",
"0.54903084",
"0.5485746",
"0.5485683",
"0.5485683",
"0.5485683",
"0.5485683",
"0.5485683",
"0.5485683",
"0.5470546",
"0.5469571",
"0.5469571"
] |
0.6819535
|
0
|
update Match team score
|
public function update_team_score(){
if($this->authenticate_api()){
$response = array( "status" => "error" );
$response['message'] = "Somthing Wrong";
$required_fields = array("match_id");
$status = $this->verifyRequiredParams($required_fields);
$match_id= $this->request->getVar("match_id");
if($this->ifempty($match_id, "match id")!== true){
$response['message'] = $this->ifempty($match_id, "match id");
$this->sendResponse($response);
}
if($this->ifexists('tbl_tournament_match', $match_id, 'id') != true){
$response['message'] = "Please enter valid match id";
$this->sendResponse($response);
}
if($match_id){
$match_tournament_team = $this->db->table('tbl_tournament_match')->where('id', $match_id)->get()->getRowArray();
if($match_tournament_team){
$team_id = $match_tournament_team['team_id'];
$opponent_team_id = $match_tournament_team['opponent_team_id'];
$match_end_status = $match_tournament_team['match_end_status'];
$match_end_status_for_opponent_team = $match_tournament_team['match_end_status_for_opponent_team'];
if($match_end_status == 1 && $match_end_status_for_opponent_team == 1){
$where_match_team['match_id'] = $team_id;
$where_match_opponent_team['match_id'] = $opponent_team_id;
$match_team = $this->db->table('tbl_match_team')->where($where_match_team);
$match_opponent_team = $this->db->table('tbl_match_team')->where($where_match_opponent_team);
$match_team_goal = $this->db->query("SELECT SUM(g) as Total_g FROM tbl_match_team where match_id = ".$team_id)->getRowArray();
$match_opponent_team_goal = $this->db->query("SELECT SUM(g) as Total_g FROM tbl_match_team where match_id = ".$opponent_team_id)->getRowArray();
$match_team_goal['Total_g'] = $match_team_goal['Total_g'] ? $match_team_goal['Total_g'] : 0;
$match_team_goal['Total_g'] = $match_opponent_team_goal['Total_g'] ? $match_opponent_team_goal['Total_g'] : 0;
if($match_team_goal['Total_g'] > $match_opponent_team_goal['Total_g']){
$winner_team_id = $team_id;
}else if($match_team_goal['Total_g'] < $match_opponent_team_goal['Total_g']){
$winner_team_id = $opponent_team_id;
}else{
$winner_team_id = 0;
}
$tbl_tournament_match_result_data['match_id'] = $match_id;
$tbl_tournament_match_result_data['team_id_score'] = $match_team_goal['Total_g'];
$tbl_tournament_match_result_data['opponent_team_id_score'] = $match_opponent_team_goal['Total_g'];
$tbl_tournament_match_result_data['winner_team_id'] = $winner_team_id;
$response['status'] = "success";
$table_name = 'tbl_tournament_match_result';
$id = $match_id;
$fild_to_check = 'match_id';
if($this->ifexists($table_name,$id,$fild_to_check)){
$response['message'] = "Team score already Added";
}else{
$tbl_tournament_match_result = $this->db->table($table_name)->insert($tbl_tournament_match_result_data);
if($tbl_tournament_match_result)
$response['message'] = "Team score Added Successfully";
}
}
}
}
$this->sendResponse($response);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function promoteScoreToBGAScore() {\n \n // If team game, add the score of the teammate first\n if (self::decodeGameType(self::getGameStateValue('game_type')) == 'team') {\n self::DbQuery(\"\n UPDATE\n player AS a\n LEFT JOIN (\n SELECT\n player_team, SUM(player_innovation_score) AS team_score\n FROM\n player\n GROUP BY\n player_team\n \n ) AS b ON a.player_team = b.player_team\n SET\n a.player_innovation_score = b.team_score\n \");\n }\n \n self::DbQuery(\"\n UPDATE\n player\n SET\n player_score_aux = player_score,\n player_score = player_innovation_score\n \");\n }",
"function editTeamScore($teamId, $points, $cause){\r\n //$GLOBALS['GLOBALS['link']'] = connect();\r\n mysqli_query($GLOBALS['link'], 'update teams set `score`=`score` + '. $points .' where `id`='. $teamId .';');\r\n\r\n return mysqli_affected_rows($GLOBALS['link']);\r\n}",
"public function updatePoints(Match $match){\n\n if($match->played){\n dd($match);\n $match->updateMatch();\n }\n else{\n //update values\n //revert points?\n\n }\n }",
"public function updateMatch(){\n\t\t\n\t\t}",
"public function update(Request $request)\n {\n $match = Match::where('id', $request->match_id)->first();\n $match->host_team_result = $request->host_goals;\n $match->guest_team_result = $request->guest_goals;\n\n\n// //update host team standings\n $host_team_standings = Standing::where('team_id', $match->host_team_id)->first();\n $host_team_standings->gp += 1;\n//\n// //update guest team standings\n $guest_team_standings = Standing::where('team_id', $match->guest_team_id)->first();\n $guest_team_standings->gp += 1;\n\n// //update win results\n if ($request->host_goals > $request->guest_goals) {\n $host_team_standings->w += 1;\n $host_team_standings->pts += 3;\n $guest_team_standings->l += 1;\n $guest_team_standings->pts += 1;\n } else if ($request->host_goals < $request->guest_goals)\n {\n\n $host_team_standings->l += 1;\n $host_team_standings->pts += 1;\n $guest_team_standings->w += 1;\n $guest_team_standings->pts += 3;\n } else if ($request->host_goals == $request->guest_goals)\n {\n $host_team_standings->d += 1;\n $guest_team_standings->d += 1;\n }\n $host_team_standings->save();\n $guest_team_standings->save();\n $match->save();\n\n return response()->json(['success'=> \"Results updated\"]);\n }",
"public function enterMatchScore($captain, $match, $homeTeamScore, $awayTeamScore);",
"protected function updateTeamStats()\n {\n $conditions = array('stats.needs_update' => true);\n $fields = array('league_id');\n $teams_needing_update = Teams::all(compact('conditions', 'fields'));\n\n $team_id_list = array();\n $team_stats = array();\n foreach ($teams_needing_update as $team) {\n $team_id_list[] = $team->_id;\n $team_stats[(string)$team->_id] = array(\n 'wins' => 0,\n 'losses' => 0,\n 'point_differential' => 0\n );\n }\n\n // Grab all of the games that apply to these teams, standings should be re-calced from the ground up.\n $conditions = array('teams' => array('$in' => $team_id_list), 'scores' => array('$exists' => true), 'winner' => array('$ne' => null));\n $fields = array('scores', 'winner', 'teams', 'league_id');\n $relevant_games_list = Games::all(compact('conditions', 'fields'));\n\n $league_list = array();\n foreach ($relevant_games_list as $game) {\n // Calculate stats for each team\n foreach ($game->getTeams() as $t) {\n $team_id = (string)$t->_id;\n if (!isset($team_stats[$team_id])) {\n // If we didn't pull all of this team's games, do not update their stats. \n continue;\n }\n\n if ($t->_id == $game->winner) {\n $team_stats[$team_id]['wins']++;\n $team_stats[$team_id]['point_differential'] += $game->getScoreDiff();\n } else {\n $team_stats[$team_id]['losses']++;\n $team_stats[$team_id]['point_differential'] -= $game->getScoreDiff();\n }\n }\n\n // Make sure we have a list of all of the leagues being updated\n $league_list[] = $game->league_id;\n }\n\n // Do the team stats updates:\n foreach ($team_stats as $team_id => $stats) {\n $conditions = array('_id' => new \\MongoId($team_id));\n $query = array('$set' => array('stats' => $stats));\n Teams::update($query, $conditions);\n }\n\n // Mark leagues as needing an update\n $league_list = array_unique($league_list);\n $conditions = array('_id' => array('$in' => $league_list));\n $query = array('$set' => array('needs_standings_update' => true));\n Leagues::update($query, $conditions); \n }",
"function updateScore(Player $player, int $points)\n{\n $score = $player->getScore();\n $player->setScore($score + $points);\n}",
"public function resolveMatchScore($fixedHomeScore, $fixedAwayScore, $match);",
"public function scoreMatchPlayers( $id_match, $id_player_scorer, $score_info )\n\t{\n\t\t$id_match \t\t\t= intval( $id_match );\n\t\t$id_player_scorer\t= intval( $id_player_scorer );\n\n\t\tforeach ( $score_info as $score )\n\t\t{\n\t\t\t$id_player = intval( $score['id_player'] );\n\t\t\t$best\t= $this->database->real_escape_string( $score['best'] );\n\t\t\t$worst\t= $this->database->real_escape_string( $score['worst'] );\n\n\t\t\t$new_score = 'NULL';\n\t\t\tif ( '' != $score['score'] )\n\t\t\t{\n\t\t\t\t$new_score = \"'{$score['score']}'\";\n\t\t\t\t$query = <<<QUERY\nUPDATE\n\t`matches_player`\nSET\n\t`score` = IF( ( ISNULL( `score` ) ),\n\t\t\t\t\t\t$new_score,\n\t\t\t\t\t\tROUND( ( ( `score` + $new_score ) / 2 ), 2 ) )\nWHERE\n\tid_match = $id_match AND\n\tid_player = $id_player\nLIMIT 1\nQUERY;\n\n\t\t\t\t$this->database->query( $query, \"Update average for player #$id_player and match #$id_match\" );\n\t\t\t}\n\n\t\t\t$values[] = \"( $id_match, $id_player, $id_player_scorer, $new_score, '$best', '$worst' )\";\n\t\t}\n\t\t$values = implode( ',', $values );\n\n\t\t$query = <<<QUERY\nINSERT INTO matches_player_score\n\t( id_match, id_player, id_player_scorer, score, best, worst )\nVALUES\n\t$values\nQUERY;\n\n\t\t$this->database->query( $query, \"Save score from player #$id_player_scorer to match #$id_match\" );\n\n\t\treturn true;\n\t}",
"public function updateScores(OnScoresStructure $scores) {\n\t\t$round = $this->matchScore->round;\n\n\t\t$this->matchScore->mapPointsBlueTeam[$round] = $scores->getTeamScores()[self::BLUE_TEAM]->getMapPoints();\n\t\t$this->matchScore->mapPointsRedTeam[$round] = $scores->getTeamScores()[self::RED_TEAM]->getMapPoints();\n\n\t\tif (!array_key_exists($round, $this->matchScore->blueTeamPlayerPointsSum)) {\n\t\t\t$this->matchScore->blueTeamPlayerPointsSum[$round] = 0;\n\t\t\t$this->matchScore->redTeamPlayerPointsSum[$round] = 0;\n\n\t\t\tforeach ($scores->getPlayerScores() as $playerScore) {\n\t\t\t\tif ($playerScore->getPlayer()->teamId == self::BLUE_TEAM) {\n\t\t\t\t\t$this->matchScore->blueTeamPlayerPointsSum[$round] += $playerScore->getRoundPoints();\n\t\t\t\t} else if ($playerScore->getPlayer()->teamId == self::RED_TEAM) {\n\t\t\t\t\t$this->matchScore->redTeamPlayerPointsSum[$round] += $playerScore->getRoundPoints();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\tforeach ($scores->getPlayerScores() as $playerScore) {\n\n\t\t\tif ($playerScore->getPlayer()->teamId == self::BLUE_TEAM) {\n\t\t\t\t$this->matchScore->blueTeamPlayers[trim($playerScore->getPlayer()->login)] = new TrackmaniaPlayer(trim($playerScore->getPlayer()->login), $playerScore->getPlayer()->nickname, $playerScore->getBestRaceTime(), $playerScore->getRoundPoints(), $playerScore->getMapPoints(), $playerScore->getMatchPoints(), $playerScore->getPlayer()->teamId, false);\n\n\t\t\t} else if ($playerScore->getPlayer()->teamId == self::RED_TEAM) {\n\t\t\t\t$this->matchScore->redTeamPlayers[trim($playerScore->getPlayer()->login)] = new TrackmaniaPlayer(trim($playerScore->getPlayer()->login), $playerScore->getPlayer()->nickname, $playerScore->getBestRaceTime(), $playerScore->getRoundPoints(), $playerScore->getMapPoints(), $playerScore->getMatchPoints(), $playerScore->getPlayer()->teamId, false);\n\n\t\t\t}\n\n\t\t}\n\t\t$this->displayTeamScoreWidget(false);\n\t}",
"public function update_tictactoe_score($data) {\n\n $model_data = $this->db->where('game_tictactoe_id',$data['game_tictactoe_id'])->update('ct_game_tictactoe',array('sender_score'=>$data['sender_score'],'receiver_score'=>$data['receiver_score'],'tictactoe_status'=>3));\n\n return TRUE;\n }",
"function update_match_stats_entered($team_id1, $team_id2, $team1_points, $team2_points, $site, $connection)\n\t{\n\t\t$query = 'UPDATE `teams_profile` SET `num_matches_total`=`num_matches_total`+1';\n\t\t$query .= ' WHERE (`teamid`=' . sqlSafeStringQuotes($team_id1) . ' OR `teamid`=' . sqlSafeStringQuotes($team_id2) . ')';\n\t\tif (!($result = $site->execute_query('teams_overview', $query, $connection)))\n\t\t{\n\t\t\tunlock_tables($site, $connection);\n\t\t\t$site->dieAndEndPage('The match count for the teams with id'\n\t\t\t\t\t\t\t\t . sqlSafeString($team_id1) . ' and ' . sqlSafeString($team_id2) . ' could not be updated due to a sql problem!');\n\t\t}\n\t\t\n\t\t// mark both participating teams as active\n\t\t$query = ('UPDATE `teams_overview` SET `deleted`=' . sqlSafeStringQuotes('1')\n\t\t\t\t . ' WHERE `teamid`=' . sqlSafeStringQuotes($team_id1) . ' OR `teamid`=' . sqlSafeStringQuotes($team_id2)\n\t\t\t\t . ' LIMIT 2');\n\t\tif (!($result = @$site->execute_query('teams_overview', $query, $connection)))\n\t\t{\n\t\t\t$site->dieAndEndPage('Could not mark team with id ' . sqlSafeString($teamid) . ' as active!');\n\t\t}\n\t\t\n\t\t\n\t\t// increase match win count for teams that participated\n\t\tif ($team1_points > $team2_points)\n\t\t{\n\t\t\t// team 1 won\n\t\t\t$query = 'UPDATE `teams_profile` SET `num_matches_won`=`num_matches_won`+1';\n\t\t\t$query .= ' WHERE `teamid`=' . sqlSafeStringQuotes($team_id1);\n\t\t\tif (!($result = $site->execute_query('teams_profile', $query, $connection)))\n\t\t\t{\n\t\t\t\tunlock_tables($site, $connection);\n\t\t\t\t$site->dieAndEndPage('The match win count for team ' . sqlSafeString($team_id1) . ' could not be updated due to a sql problem!');\n\t\t\t}\n\t\t\t\n\t\t\t// team 2 lost\n\t\t\t$query = 'UPDATE `teams_profile` SET `num_matches_lost`=`num_matches_lost`+1';\n\t\t\t$query .= ' WHERE `teamid`=' . sqlSafeStringQuotes($team_id2);\n\t\t\tif (!($result = $site->execute_query('teams_profile', $query, $connection)))\n\t\t\t{\n\t\t\t\tunlock_tables($site, $connection);\n\t\t\t\t$site->dieAndEndPage('The match lose count for team ' . sqlSafeString($team_id2) . ' could not be updated due to a sql problem!');\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($team1_points < $team2_points)\n\t\t{\n\t\t\t// team 2 won\n\t\t\t$query = 'UPDATE `teams_profile` SET `num_matches_won`=`num_matches_won`+1';\n\t\t\t$query .= ' WHERE `teamid`=' . sqlSafeStringQuotes($team_id2);\n\t\t\tif (!($result = $site->execute_query('teams_profile', $query, $connection)))\n\t\t\t{\n\t\t\t\tunlock_tables($site, $connection);\n\t\t\t\t$site->dieAndEndPage('The match win count for team ' . sqlSafeString($team_id2) . ' could not be updated due to a sql problem!');\n\t\t\t}\n\t\t\t\n\t\t\t// team 1 lost\n\t\t\t$query = 'UPDATE `teams_profile` SET `num_matches_lost`=`num_matches_lost`+1';\n\t\t\t$query .= ' WHERE `teamid`=' . sqlSafeStringQuotes($team_id1);\n\t\t\tif (!($result = $site->execute_query('teams_profile', $query, $connection)))\n\t\t\t{\n\t\t\t\tunlock_tables($site, $connection);\n\t\t\t\t$site->dieAndEndPage('The match lose count for team ' . sqlSafeString($team_id1) . ' could not be updated due to a sql problem!');\n\t\t\t}\n\t\t}\n\t\t\n\t\t// match entered ended in a draw\n\t\tif (((int) $team1_points) === ((int) $team2_points))\n\t\t{\n\t\t\t$query = 'UPDATE `teams_profile` SET `num_matches_draw`=`num_matches_draw`+1';\n\t\t\t$query .= ' WHERE (`teamid`=' . sqlSafeStringQuotes($team_id1) . ' OR `teamid`=' . sqlSafeStringQuotes($team_id2) . ')';\n\t\t\tif (!($result = $site->execute_query('teams_profile', $query, $connection)))\n\t\t\t{\n\t\t\t\tunlock_tables($site, $connection);\n\t\t\t\t$site->dieAndEndPage('The match draw count for the teams with id'\n\t\t\t\t\t\t\t\t\t . sqlSafeString($team_id1) . ' and ' . sqlSafeString($team_id2) . ' could not be updated due to a sql problem!');\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"public function updateScoresAndShots()\n {\n $this->player1score = 0;\n $this->player1shots = 0;\n $this->player2score = 0;\n $this->player2shots = 0;\n\n foreach ($this->getTurns() as $turn) {\n if ($turn->isVoid()) {\n continue;\n }\n\n if ($turn->getPlayer() == $this->getGame()->getPlayer1()) {\n $this->player1score += $turn->getTotalScore();\n $this->player1shots += 3;\n } else {\n $this->player2score += $turn->getTotalScore();\n $this->player2shots += 3;\n }\n }\n }",
"public function UpdateScore() {\n\t\t$this->score = self::ComputeScore( $this->goods, $this->bads );\n\t\t$this->tier = self::GetTier( $this->score );\n\t\treturn $this->score;\n\t}",
"public function saveScore()\n {\n $this->savedScore += $this->score;\n $this->score = 0;\n }",
"public function updateScore($data)\n {\n $bet = $this->bettingRepository->findBetById($data['bet_id']);\n if (!$bet) {\n return false;\n }\n if ($data['player_id'] == $bet->origin_guid) {\n $scoreColumn = 'origin_score';\n } else if ($data['player_id'] == $bet->opponent_guid) {\n $scoreColumn = 'opponent_score';\n } else return false;\n\n return $this->bettingRepository->updateScore($data, $scoreColumn);\n }",
"function update_score($member_id){\n\t$score = 0;\n\n\trequire_once('/var/www/settings.php');\n\t$db = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n\n\t$document_query = \n\t\"SELECT * FROM member_documents \n\tLEFT JOIN exp_members ON member_documents.member_id=exp_members.member_id \n\tLEFT JOIN exp_channel_titles ON exp_channel_titles.author_id=exp_members.member_id \n\tWHERE exp_channel_titles.entry_id = '{$member_id}' \";\n\tif($db->query($document_query)->num_rows){\n\t\t$score++;\n\t}\n\n\t$user_results = $db->query(\"SELECT * FROM exp_channel_data WHERE entry_id='{$member_id}'\");\n\tif($user_results->num_rows > 0){\n\t\t$user_array = $user_results->fetch_array(MYSQLI_ASSOC);\n\t\tif($user_array['field_id_90'] != \"\") $score++;\n\t\tif($user_array['field_id_91'] != \"\") $score++;\n\t\tif($user_array['field_id_94'] != \"\") $score++;\n\t\tif($user_array['field_id_95'] != \"\") $score++;\n\t\tif($user_array['field_id_98'] != \"\") $score++;\n\t\tif($user_array['field_id_99'] != \"\") $score++;\n\t\tif($user_array['field_id_100'] != \"\") $score++;\n\t\tif($user_array['field_id_102'] != \"\") $score++;\n\t\tif($user_array['field_id_103'] != \"\") $score++;\n\t\tif($user_array['field_id_105'] != \"\") $score++;\n\t\tif($user_array['field_id_107'] != \"\") $score++;\n\t}\n\n\t$query = \"UPDATE exp_channel_data SET field_id_108='{$score}' WHERE entry_id='{$member_id}' \";\n\tif(!$db->query($query)){\n\t\t$error_set = true; // possible error handling for later\n\t}\n\treturn $score;\n}",
"public function score()\n {\n $this->score++;\n }",
"function setScore( &$value )\r\n {\r\n $this->Score = $value;\r\n }",
"public function updateTeam($team)\n\t{\n\t}",
"function binarizeBGAScore() {\n self::DbQuery(self::format(\"\n UPDATE\n player\n SET\n player_score_aux = 0,\n player_score = (CASE WHEN player_id = {winner} THEN 1 ELSE 0 END)\n \",\n array('winner' => self::getGameStateValue('winner_by_dogma')) \n ));\n \n if (self::decodeGameType(self::getGameStateValue('game_type')) == 'team') {\n // Add the score of the teammate 0 + 0 for losers, 0 + 1 for winners\n self::DbQuery(\"\n UPDATE\n player AS a\n LEFT JOIN (\n SELECT\n player_team, SUM(player_score) AS team_score\n FROM\n player\n GROUP BY\n player_team\n \n ) AS b ON a.player_team = b.player_team\n SET\n a.player_score = b.team_score\n \");\n }\n }",
"public function updateCurrentBestTimes() {\n\t\tforeach ($this->playerBestTimes as $key => $curBest) {\n\t\t\tif (array_key_exists($key, $this->matchScore->blueTeamPlayers)) {\n\t\t\t\t$this->matchScore->blueTeamPlayers[$key]->currentBestTime = $curBest;\n\t\t\t} else if (array_key_exists($key, $this->matchScore->redTeamPlayers)) {\n\t\t\t\t$this->matchScore->redTeamPlayers[$key]->currentBestTime = $curBest;\n\t\t\t}\n\t\t}\n\t}",
"public function populateMatchStandings(){\n\t\t $team = new Application_Model_Mapper_Team();\n\t\t //cath all teams\n\t\t $teamList=$team->fetchAll();\n\t\t $prosGoal= null;\n\t\t $agaistGoal=null;\n\t\t if(count($teamList)>0){\n\t\t \t foreach($teamList as $row){\n\t\t \t \t //begin team statistics by 0\n\t\t \t \t $row->setWins(0);\n\t\t \t \t $row->setLosses(0);\n\t\t \t \t $row->setPoints(0);\n\t\t \t \t $row->setDraws(0);\n\t\t \t \t //catch all matches by team\n\t\t $championship = $this->seachMatchByTeam($row->getId());\n\t\t foreach ($championship as $match) {\n\t\t //if a team is a visitor team goals of visitor team it is\n\t\t \t $prosGoal=$match['goalVisitorTeam'];\n\t\t \t $agaistGoal=$match['goalHomeTeam'];\n\t\t \t //if a team is a home team goals of home team it is\n\t\t \t if($match['idHomeTeam']==$row->getId()){\n\t\t \t \t $prosGoal=$match['goalHomeTeam'];\n\t\t \t \t $agaistGoal=$match['goalVisitorTeam'];\n\t\t \t }\n\t\t \t //if team win\n\t\t \t if($agaistGoal<$prosGoal){\n\t\t \t \t$row->setWins($row->getWins()+1);\n\t\t \t \t$row->setPoints($row->getPoints()+3);\n\t\t \t }//if team lost\n\t\t \t elseif($agaistGoal>$prosGoal){\n\t\t \t \t$row->setLosses($row->getLosses()+1);\n\t\t \t }//if team draw\n\t\t \t else{\n\t\t \t \t$row->setDraws($row->getDraws()+1);\n\t\t \t \t$row->setPoints($row->getPoints()+1);\n\t\t \t }\n\t\t }\n\t\t //update table team\n\t\t $team->updateTeam($row);\n\t\t \t }\n\t\t }\n\t}",
"public function testSetScore()\n {\n $controller = new Player(\"test\", \"player\");\n $this->assertInstanceOf(\"\\Jeso20\\Game\\Player\", $controller);\n\n $controller->setScore(\"One pair\", 12);\n $controller->setScore(\"One pair\", 12);\n $exp = [\"One pair\" => 12];\n $sum = $controller->getCombinations();\n $this->assertEquals($exp, $sum);\n }",
"function update_score($answer_validity, $user_id){\n\t\tglobal $mysqli_gamedb;\n\n\t\t$query_query = \"SELECT score, level FROM User WHERE id=\".$user_id;\n\n\t\tif($result = $mysqli_gamedb->query($query_query)){\n\t\t\t$array = $result->fetch_assoc();\n\t\t\t$result->close();\n\t\t}\n\n\t\t$score = $array[\"score\"];\n\t\t$level = $array[\"level\"];\n\n\t\t$update_query = \"UPDATE User SET score=\".$score.\" WHERE id=\".$user_id;\n\n\t\tif(!$mysqli_gamedb->query($update_query)){\n\t\t\t//TODO\n\t\t}\n\n\t\tif(!$score)\n\t\t\treturn 10;\n\t\treturn $score;\n\t}",
"public function update_score_table ($score,$user_id) {\n\t\t\n\t\tif ($score > 0) {\n\t\t\t$scores = DB::table('meal_scores')->select('meal_1','meal_2','meal_3','meal_4','meal_5')->where('user_id',$user_id)->get();\n\t\t\t$scores = array_values($scores);\n\t\t\t$mealscores = array($scores[0]->meal_1,$scores[0]->meal_2,$scores[0]->meal_3,$scores[0]->meal_4,$scores[0]->meal_5);\n\t\t\t$count = 0;\n\t\t\t$sum = 0.0;\n\t\t\tforeach ($mealscores as $mealscore){\n\t\t\t\tif ($mealscore > 0) {\n\t\t\t\t\t$sum = $sum + $mealscore;\n\t\t\t\t\t$count = $count + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$sum = $sum + $score;\n\t\t\t$status = $sum/($count + 1);\n\t\t\tif ($status < 0.5) {\n\t\t\t\t$status = 0.5;\n\t\t\t}\n\t\t\telseif ($status >= 3.5) {\n\t\t\t\t$status = 3.499999;\n\t\t\t}\n\n\t\t\t// Update database table with new meal score value\n\t\t\t$mealscores = array_values($mealscores);\n\t\t\tDB::table('meal_scores')\n ->where('user_id', $user_id)\n ->update(array('meal_1' => $score,'meal_2' => $mealscores[0],'meal_3' => $mealscores[1],'meal_4' => $mealscores[2],'meal_5' => $mealscores[3],'current_status' => $status));\n\t\t} \n\t\telse {\n\t\t\t$status = DB::table('meal_scores')->where('user_id',$user_id)->pluck('current_status');\n\t\t}\n\t\t\n\t\t$status = round($status);\n\t\treturn $status;\n\t}",
"function updateScore($ev_id, $user_pseudo, $score){\n $bdd = getBDD();\n $request = $bdd -> prepare(\"UPDATE `sprt_contestants` SET cont_score = \".$score.\" WHERE ev_id =\".$ev_id.\" AND user_pseudo = \\\"\".$user_pseudo.\"\\\"\");\n $request -> execute();\n}",
"public function addScore($score)\n {\n $this->score += $score;\n }",
"public function confirmMatchScore($report1, $report2, $match);"
] |
[
"0.7206188",
"0.70234454",
"0.69864935",
"0.6900444",
"0.68952006",
"0.6631083",
"0.65412116",
"0.6484652",
"0.6416889",
"0.64163685",
"0.6383575",
"0.6348069",
"0.63415897",
"0.630434",
"0.6281727",
"0.62610817",
"0.62358254",
"0.622747",
"0.62204003",
"0.62159",
"0.61789024",
"0.61525285",
"0.6094413",
"0.60806465",
"0.6079344",
"0.6062902",
"0.60599226",
"0.60496247",
"0.60185987",
"0.60122544"
] |
0.7747962
|
0
|
$pdf = new Pdf(); $pdf>font_size(12); $pdf>rm_font_size(); eq(10.5,$pdf>font_size());
|
protected function __rm_font_size__(){
$this->font_size(10.5);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function getFontSize() {}",
"public function getFontSize() {}",
"function SetFontSize($size)\n\t\t{\n\t\t\t/*if($this->FontSizePt==$size) return;\n\t\t\t$this->FontSizePt=$size;\n\t\t\t$this->FontSize=$size/$this->k;\n\t\t\tif($this->page>0)\n\t\t\t\t$this->_out(sprintf('BT /F%d %.2f Tf ET',$this->CurrentFont['i'],$this->FontSizePt));*/\n\t\t}",
"public function setFont(\\SetaPDF_Core_Font_FontInterface $font, $size) {}",
"protected function setTextFont($size = 12)\n\t{\n\t\tfor($i=0;$i<$this->copies;$i++){\n\t\t\t$this->_getPdf()->pages[$i]->setFont(Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA), $size);\n\t\t\t$this->_getPdf()->pages[$i]->setFillColor(new Zend_Pdf_Color_GrayScale(0));\n\t\t}\n\t}",
"function velicinaFonta($fontSize)\n{\n $text = 'Neki tekst';\n echo \"<p style='font-size:$fontSize'>$text</p>\"; \n}",
"public function testPropertyFontSize($value)\n {\n $object = new ConditionalTextStyle();\n $object->setFontSize($value);\n\n $this->assertEquals($value, $object->getFontSize());\n }",
"function PDF_findfont($p, $fontname, $encoding, $embed)\n{\n}",
"public function testPropertyFontSize($value)\n {\n $object = new ConditionalComponentTextStyle();\n $object->setFontSize($value);\n\n $this->assertEquals($value, $object->getFontSize());\n }",
"function _ga_typography_fontsize( $option ) {\n\n\tif ( ! ( $_size = genesis_get_option( $option, GA_CHILDTHEME_FIELD ) ) )\n\t\treturn false;\n\n\t return 'font-size: ' . absint( $_size ) . 'px;';\n\n}",
"function fontsize($args) {\r\n\t\t$args['selections'] = array('6'=>'6','7'=>'7', '8'=>'8', '9'=>'9', '10'=>'10', '11'=>'11','12'=>'12', '14'=>'14', '16'=>'16', '18'=>'18');\r\n\t\t$args['multiple'] = false;\r\n\t\t$args['width'] = '60';\r\n\t\t$args['tooltip'] = 'Choose the font size';\r\n\t\t$this->select($args);\r\n\t}",
"public function testSetTextSizeNormal()\n {\n $this -> printer -> setTextSize(1, 1);\n $this -> checkOutput(\"\\x1b@\\x1d!\\x00\");\n }",
"function InlineFontSize($content) {\n if(!is_admin()):\n return str_replace(\"font-size\",\"--font-size\",$content);\n endif;\n }",
"function SetFont($family,$style='',$size=0)\n\t\t{\n\t\t\tglobal $fpdf_charwidths;\n\n\t\t\t$family=strtolower($family);\n\t\t\tif($family=='')\t$family=$this->FontFamily;\n\t\t //EDITEI - now understands: monospace,serif,sans [serif]\n\t\t if($family=='monospace') $family='courier';\n\t\t if($family=='serif') $family='times';\n\t\t if($family=='sans') $family='arial';\n\t\t\tif($family=='arial') $family='helvetica';\n\t\t\telseif($family=='symbol' or $family=='zapfdingbats') $style='';\n\t\t\t$style=strtoupper($style);\n\t\t\tif(is_int(strpos($style,'U')))\n\t\t\t{\n\t\t\t\t$this->underline=true;\n\t\t\t\t$style=str_replace('U','',$style);\n\t\t\t}\n\t\t\telse $this->underline=false;\n\t\t\tif ($style=='IB') $style='BI';\n\t\t\tif ($size==0) $size=$this->FontSizePt;\n\t\t\t//Test if font is already selected\n\t\t\tif($this->FontFamily==$family and $this->FontStyle==$style and $this->FontSizePt==$size) return;\n\t\t\t//Test if used for the first time\n\t\t\t$fontkey=$family.$style;\n\t\t\tif(!isset($this->fonts[$fontkey]))\n\t\t\t{\n\t\t\t\t//Check if one of the standard fonts\n\t\t\t\tif(isset($this->CoreFonts[$fontkey]))\n\t\t\t\t{\n\t\t\t\t\tif(!isset($fpdf_charwidths[$fontkey]))\n\t\t\t\t\t{\n\t\t\t\t\t\t//Load metric file\n\t\t\t\t\t\t$file=$family;\n\t\t\t\t\t\tif($family=='times' or $family=='helvetica') $file.=strtolower($style);\n\t\t\t\t\t\t$file.='.php';\n\t\t\t\t\t\tif(defined('FPDF_FONTPATH')) $file=FPDF_FONTPATH.$file;\n\t\t\t\t\t\tinclude($file);\n\t\t\t\t\t\tif(!isset($fpdf_charwidths[$fontkey])) $this->Error('Could not include font metric file');\n\t\t\t\t\t}\n\t\t\t\t\t$i=count($this->fonts)+1;\n\t\t\t\t\t$this->fonts[$fontkey]=array('i'=>$i,'type'=>'core','name'=>$this->CoreFonts[$fontkey],'up'=>-100,'ut'=>50,'cw'=>$fpdf_charwidths[$fontkey]);\n\t\t\t\t}\n\t\t\t\telse $this->Error('Undefined font: '.$family.' '.$style);\n\t\t\t}\n\t\t\t//Select it\n\t\t\t$this->FontFamily=$family;\n\t\t\t$this->FontStyle=$style;\n\t\t\t$this->FontSizePt=$size;\n\t\t\t$this->FontSize=$size/$this->k;\n\t\t\t$this->CurrentFont=&$this->fonts[$fontkey];\n\t\t\tif($this->page>0)\n\t\t\t\t$this->_out(sprintf('BT /F%d %.2f Tf ET',$this->CurrentFont['i'],$this->FontSizePt));\n\t\t}",
"function updateFontSize($p_text_id, $p_font_size) {\n $con = open_connection();\n mysqli_query($con, \"UPDATE text SET font_size = '\". $p_font_size .\"' WHERE text_id = '\". $p_text_id .\"'\");\n mysqli_close($con);\n }",
"public function setPickTrayByPdfSize($value = true) {}",
"public function testConvertRecognizesFontSizeInConfiguration()\n {\n $config = new PHP_Depend_Util_Configuration('<?xml version=\"1.0\"?>\n <configuration>\n <imageConvert>\n <fontSize>14</fontSize>\n </imageConvert>\n </configuration>\n ');\n PHP_Depend_Util_ConfigurationInstance::set($config);\n\n $this->_out = self::createRunResourceURI('pdepend.svg');\n copy(dirname(__FILE__) . '/_input/pyramid.svg', $this->_out);\n\n $svg = file_get_contents($this->_out);\n preg_match_all('/font-size:\\s*11px/', $svg, $matches);\n $expected11 = count($matches[0]);\n preg_match_all('/font-size:\\s*14px/', $svg, $matches);\n $expected14 = count($matches[0]);\n\n\n $this->assertEquals(25, $expected11);\n $this->assertEquals(0, $expected14);\n\n PHP_Depend_Util_ImageConvert::convert($this->_out, $this->_out);\n\n $svg = file_get_contents($this->_out);\n preg_match_all('/font-size:\\s*11px/', $svg, $matches);\n $actual11 = count($matches[0]);\n preg_match_all('/font-size:\\s*14px/', $svg, $matches);\n $actual14 = count($matches[0]);\n\n $this->assertEquals(0, $actual11);\n $this->assertEquals(25, $actual14);\n }",
"public function setPaperSize($size = 0)\n {\n // Measurements\n // 1 inch = 1440 twips\n // 1 cm = 567 twips\n // 1 mm = 56.7 twips\n $inch = 1440;\n $mm = 56.7;\n // 1 => Letter (8.5 x 11 inch)\n // 2 => Legal (8.5 x 14 inch)\n // 3 => Executive (7.25 x 10.5 inch)\n // 4 => A3 (297 x 420 mm)\n // 5 => A4 (210 x 297 mm)\n // 6 => A5 (148 x 210 mm)\n // 7 => Wochenspiegel Format (209.85 x 297.01 mm)\n // Orientation considered as Portrait\n\n switch ($size) {\n case 1:\n $this->page_width = floor(8.5 * $inch);\n $this->page_height = floor(11 * $inch);\n $this->page_size = 1;\n break;\n case 2:\n $this->page_width = floor(8.5 * $inch);\n $this->page_height = floor(14 * $inch);\n $this->page_size = 5;\n break;\n case 3:\n $this->page_width = floor(7.25 * $inch);\n $this->page_height = floor(10.5 * $inch);\n $this->page_size = 7;\n break;\n case 4:\n $this->page_width = floor(297 * $mm);\n $this->page_height = floor(420 * $mm);\n $this->page_size = 8;\n break;\n case 5:\n default:\n $this->page_width = floor(210 * $mm);\n $this->page_height = floor(297 * $mm);\n $this->page_size = 9;\n break;\n case 6:\n $this->page_width = floor(148 * $mm);\n $this->page_height = floor(210 * $mm);\n $this->page_size = 10;\n break;\n case 7:\n $width = 209.85;\n $height = 297.01;\n $this->page_width = floor($width * $mm);\n $this->page_height = floor($height * $mm);\n $this->margins['left'] = floor($this->page_width / ($width / 10));\n $this->margins['right'] = 6637;\n $this->margins['top'] = floor($this->page_width / ($width / 10));\n $this->margins['bottom'] = floor($this->page_width / ($width / 10));\n $this->page_size = 11;\n break;\n }\n }",
"function _pdf($order_id, $html, $file_name, $head){\n $this->load->library('pdf');\n $od = $this->order_details_model->get_count($order_id);\n $size ='';// $od .\" ___ \" .PDF_PAGE_FORMAT;\n\n switch (true) {\n case $od>3 and $od <=5:\n $size = \"<h1>$od recipt A5</h1>\";\n $this->pdf->changePageFormat('A5');\n break;\n case $od>5 and $od<9: \n $size = \"<h1>$od recipt2</h1>\";\n $this->pdf->changePageFormat('RECIPT2');\n default:\n $size = \"<h1>$od recipt def</h1>\";\n \n break;\n }\n\n return $this->pdf->html($html, $file_name, $head);\n }",
"protected function _setFontRegular($object, $size = 7)\n {\n $font = \\Zend_Pdf_Font::fontWithPath(\n $this->_rootDirectory->getAbsolutePath('lib/internal/LinLibertineFont/LinLibertine_Re-4.4.1.ttf')\n );\n $object->setFont($font, $size);\n return $font;\n }",
"function textMetrics($string, $font, $fontsize)\n\t{\n\t\t$im = new Imagick();\n\n\t\t$fontfile = $this->fontTTF[$font];#fontfile($font);\n\t\t#error_log(\"FONT FILE=$fontfile\");\n\t\t$draw = new ImagickDraw();\n\t\t$draw->setFont(\"images/designs/fonts/$fontfile\");\n\t\t$draw->setFontSize($fontsize); # This needs to be in pixels.\n\t\t# TOMAS_MALY XXX not right - too small....\n\t\t$metric = $im->queryFontMetrics($draw, $string, false);\n\n\t\t$lastchar = substr($string,-1);\n\t\t$lastCharMetric = $im->queryFontMetrics($draw, $lastchar, false);\n\t\t$firstchar = substr($string,0,1);\n\t\t$firstCharMetric = $im->queryFontMetrics($draw, $firstchar, false);\n\n\t\t$firstedge = $firstCharMetric['originX'];\n\t\t$lastedge = $lastCharMetric['maxHorizontalAdvance'] - $lastCharMetric['characterWidth'] - $lastCharMetric['originX'];\n\n\n\t\t#error_log(\"FIRST CHAR($firstchar) METRICS=\".print_r($firstCharMetric,true));\n\t\t#error_log(\"LAST CHAR($lastchar) METRICS=\".print_r($lastCharMetric,true));\n\n\t\t# DISABLED We need to compensate by removing the last char's right edge and first char's left edge\n\t\t# To get accurate \"width\" (175 vs 180) - that the web uses...\n\n\t\t/*\n\t\tif(false && $string == 'orem ipsum dolor sit amet, ')\n\t\t{\n\t\t\t$draw->setFillColor(new ImagickPixel('blue'));\n\t\t\t$draw->annotation(0,25, $string);\n\t\t\t$im->newImage($metric['textWidth'], $metric['textHeight']*2, new ImagickPixel('white'));\n\t\t\t$im->drawImage($draw);\n\n\t\t\t$im->setImageFormat(\"png\");\n\t\t\theader(\"Content-Type: image/png\");\n\t\t\techo $im;\n\t\t\texit(0);\n\t\t}\n\t\t*/\n\t\t#error_log(\"FOR ($font/$fontfile) $string, METRICS=\".print_r($metric,true));\n\t\treturn array($metric['textWidth'], $metric['textHeight'], $metric['characterWidth'], $metric['characterHeight'], $metric['boundingBox']);\n\t\t#-$firstedge-$lastedge, \n\t}",
"public function setFont($font, $size) {\n\t\t$this->_font=$font;\n\t\t$this->_fontSize=$size;\n\t}",
"public function getFontSize() {\n\t\treturn $this->font_size;\n\t}",
"protected function setNumbersFont($size = 10)\n\t{\n\t\tfor($i=0;$i<$this->copies;$i++){\n\t\t\t$this->_getPdf()->pages[$i]->setFont(Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_COURIER), $size);\n\t\t\t$this->_getPdf()->pages[$i]->setFillColor(new Zend_Pdf_Color_GrayScale(0));\n\t\t}\n\t}",
"public function getFontSize() {\n\t\treturn $this->fontSize;\n\t}",
"public function withFontSize($font_size) {\n\t\tassert('is_int($font_size)');\n\t\t$clone = clone $this;\n\t\t$clone->font_size = $font_size;\n\t\treturn $clone;\n\t}",
"public function getPdfValue() {}",
"public function getPdfValue() {}",
"public function getPdfValue() {}",
"public function fontSet()\n {\n $family = strtolower($this->value['font-family']);\n\n $b = ($this->value['font-bold'] ? 'B' : '');\n $i = ($this->value['font-italic'] ? 'I' : '');\n $u = ($this->value['font-underline'] ? 'U' : '');\n $d = ($this->value['font-linethrough'] ? 'D' : '');\n $o = ($this->value['font-overline'] ? 'O' : '');\n\n // font style\n $style = $b.$i;\n\n if ($this->_defaultFont) {\n if($family=='arial')\n $family='helvetica';\n elseif($family=='symbol' || $family=='zapfdingbats')\n $style='';\n\n $fontkey = $family.$style;\n if (!$this->_pdf->isLoadedFont($fontkey))\n $family = $this->_defaultFont;\n }\n\n if($family=='arial')\n $family='helvetica';\n elseif($family=='symbol' || $family=='zapfdingbats')\n $style='';\n\n // complete style\n $style.= $u.$d.$o;\n\n // size : mm => pt\n $size = $this->value['font-size'];\n $size = 72 * $size / 25.4;\n\n // apply the font\n $this->_pdf->SetFont($family, $style, $this->value['mini-size']*$size);\n $this->_pdf->setTextColorArray($this->value['color']);\n if ($this->value['background']['color'])\n $this->_pdf->setFillColorArray($this->value['background']['color']);\n else\n $this->_pdf->setFillColor(255);\n }"
] |
[
"0.65624154",
"0.65624154",
"0.6513468",
"0.64565194",
"0.6433846",
"0.6227392",
"0.59962857",
"0.59635997",
"0.5927904",
"0.5917032",
"0.59156513",
"0.57820314",
"0.57161194",
"0.5680483",
"0.5661798",
"0.56446725",
"0.5642019",
"0.56230795",
"0.559545",
"0.55929434",
"0.55783504",
"0.5568401",
"0.5559233",
"0.5542736",
"0.5507327",
"0.5502601",
"0.548395",
"0.54829824",
"0.54829824",
"0.54809874"
] |
0.6576521
|
0
|
Creates a cache key using selected values from an array of values (usually _GET)
|
public static function createCacheKey($prefix, $params, $values) {
$retVal = [ $prefix ];
foreach ($params as $param) {
$value = Url::Get($param, 'null', $values);
if (is_array($value)) {
$value = implode(',', $value);
}
$retVal[] = $value;
}
return implode('_', $retVal);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private function cacheKey(array $primary_key_values) {\n\t\treturn static::ORM . crc32(implode('-', $primary_key_values));\n\t}",
"private function cacheKey(array $primary_key_values) {\r\n\t\treturn static::ORM . crc32(implode('-', $primary_key_values));\r\n\t}",
"private function make_cache_key($params, &$ret) {\n foreach ($params as $key => $value) {\n if (is_array($value)) {\n // recursive\n $ret.=$key;\n $this->make_cache_key($value, $ret);\n }\n else {\n $ret.=$value;\n }\n }\n }",
"public function setMultiByKey(array $values, $expiry = 0) {}",
"public function makeCacheKey($configKey, $parts = []);",
"function wp_cache_get_multiple($keys, $group = '', $force = \\false)\n {\n }",
"protected function create_cache_key()\n\t{\n\t\treturn hash($this->config['hash'], serialize($this->options));\n\t}",
"private function getCacheKey(array $input): string\n {\n return json_encode($input);\n }",
"public static function build_cache($ids) { \n\t\t\n\t\tif (!count($ids)) { return false; } \n\n\t\t$idlist = '(' . implode(',',$ids) . ')'; \n\n\t\t$sql = \"SELECT * FROM `playlist` WHERE `id` IN $idlist\"; \n\t\t$db_results = Dba::query($sql); \n\n\t\twhile ($row = Dba::fetch_assoc($db_results)) { \n\t\t\tparent::add_to_cache('playlist',$row['id'],$row); \n\t\t} \n\n\t}",
"public static function arrayToCacheId($values, $includeKeys = false)\n {\n $ctx = hash_init('md5');\n\n $values = (array) $values;\n\n foreach ($values as $id => $value) {\n if (is_array($value)) {\n $value = self::arrayToCacheId($value, $includeKeys);\n }\n\n hash_update($ctx, ($includeKeys ? $id : null) . (string)$value);\n }\n\n return hash_final($ctx);\n }",
"private function cacheId(array $params)\n\t{\n\t\treturn md5(json_encode($params));\n\t}",
"final protected function getCacheKey($cacheId = array())\n\t{\n\t\tif(!is_array($cacheId))\n\t\t\t$cacheId = array((string) $cacheId);\n\n\t\t$cacheId['SITE_ID'] = SITE_ID;\n\t\t$cacheId['LANGUAGE_ID'] = LANGUAGE_ID;\n\t\t// if there are two or more caches with the same id, but with different cache_time, make them separate\n\t\t$cacheId['CACHE_TIME'] = intval($this->arResult['CACHE_TIME']);\n\n\t\tif(defined(\"SITE_TEMPLATE_ID\"))\n\t\t\t$cacheId['SITE_TEMPLATE_ID'] = SITE_TEMPLATE_ID;\n\n\t\treturn implode('|', $cacheId);\n\t}",
"public function create_cache_key(Rest_Request $request, $callback = NULL)\n\t{\n\t\tif (is_callable($callback))\n\t\t{\n\t\t\treturn call_user_func($callback, $request);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn Rest_HTTP_Cache::basic_cache_key_generator($request);\n\t\t}\n\t}",
"public function createCacheIdentifier($params) {\n\t\t$cacheIdentifierModifiers = array(\n\t\t\t'params' => $params,\n\t\t\t'domain' => (isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $_SERVER['HTTP_X_FORWARDED_HOST'] : $_SERVER['HTTP_HOST']),\n\t\t);\n\n\t\t$cacheIdentifier = md5(join('_', $this->createCacheTagsInternal($cacheIdentifierModifiers)));\n\t\treturn $cacheIdentifier;\n\t}",
"public function getCacheKey($method, $args = null);",
"public function &cacheKey($function, $args = [], $___prop = 'cache')\n {\n $function = (string) $function;\n $args = (array) $args;\n\n if (!isset($this->{$___prop}[$function])) {\n $this->{$___prop}[$function] = null;\n }\n $cache_key = &$this->{$___prop}[$function];\n\n foreach ($args as $_arg) {\n // Use each arg as a key.\n\n switch (gettype($_arg)) {\n case 'integer':\n $_key = (int) $_arg;\n break; // Break switch handler.\n\n case 'double':\n case 'float':\n $_key = (string) $_arg;\n break; // Break switch handler.\n\n case 'boolean':\n $_key = (int) $_arg;\n break; // Break switch handler.\n\n case 'array':\n case 'object':\n $_key = sha1(serialize($_arg));\n break; // Break switch handler.\n\n case 'NULL':\n case 'resource':\n case 'unknown type':\n default:\n $_key = \"\\0\".(string) $_arg;\n }\n if (!isset($cache_key[$_key])) {\n $cache_key[$_key] = null;\n }\n $cache_key = &$cache_key[$_key];\n }\n\n return $cache_key;\n }",
"function unity_query_k_gen() {\r\n $length = func_arg(0);\r\n $key = get_random($length);\r\n return \"{'key':'\" . $key . \"'}\";\r\n}",
"public static function cacheBuildKeystring($userid)\n\t{\n\t\treturn 'mutualfriend_'.$userid;\n\t}",
"public function loadByKey($vals, $filter = null, array $options = null, $ttl = 0, $useFind = false);",
"protected static function generateKey(...$params)\n {\n return md5(implode('_', $params));\n }",
"protected function calculateCacheKey()\n {\n if ($this->_cacheKey === null) {\n $key = [__CLASS__, Yii::$app->requestedRoute];\n if (is_array($this->variations)) {\n foreach ($this->variations as $value) {\n $key[] = $value;\n }\n }\n $this->_cacheKey = $key;\n }\n \n return $this->_cacheKey;\n }",
"public static function getKeyStatic(...$keys) {\n $new_this = new Config();\n return call_user_func_array(array($new_this,\"getKey\"), $keys);\n }",
"function wp_cache_set_multiple(array $data, $group = '', $expire = 0)\n {\n }",
"protected function _getRequestCacheKey(array $request)\n {\n $key = serialize($request);\n return md5($key);\n }",
"function wp_cache_get_multiple( $keys, $group = '', $force = false ) {\n\t\t$values = array();\n\n\t\tforeach ( $keys as $key ) {\n\t\t\t$values[ $key ] = wp_cache_get( $key, $group, $force );\n\t\t}\n\n\t\treturn $values;\n\t}",
"public function cacheKey() {\n $params = $this->getParameters();\n $ret = '';\n $this->make_cache_key($params, $ret);\n\n return md5($ret);\n }",
"public function it_should_correctly_generate_key_for_numeric_array_components() {\n\t\t$components_1 = [ __FILE__, [ 23, 89 ], [ 1 => 'bar', 23 => 'baz', 89 => 'bar' ] ];\n\t\t$components_2 = [ __FILE__, [ 23, 89 ], [ 89 => 'bar', 23 => 'baz', 1 => 'bar' ] ];\n\n\t\t$cache = $this->make_instance();\n\n\t\t$this->assertEquals( $cache->make_key( $components_1 ), $cache->make_key( $components_2 ) );\n\t\t$this->assertEquals( $cache->make_key( $components_1, 'pre' ), $cache->make_key( $components_2, 'pre' ) );\n\t\t$this->assertNotEquals( $cache->make_key( $components_1, 'foo' ), $cache->make_key( $components_2, 'pre' ) );\n\t\t$this->assertNotEquals( $cache->make_key( $components_1, '', false ), $cache->make_key( $components_2, '', false ) );\n\t}",
"private function requestedIdentifiers($ids)\n {\n\n $ids = $this->getInput('ids', $ids);\n\n if (!$ids) {\n return false;\n }\n\n if (!is_array($ids)) {\n $ids = explode(',', $ids);\n }\n\n $ids = array_values(array_unique($ids));\n return CacheItem::prefixIdentifier($ids);\n\n }",
"public static function basic_cache_key_generator(Rest_Request $request)\n\t{\n\t\t$uri = $request->get_uri();\n\t\t$query = $request->query();\n\t\t$headers = $request->headers();\n\t\treturn sha1($uri . '?' . http_build_query($query, NULL, '&') . '~' . implode('~', $headers));\n\t}",
"public function generateCacheKey(array $pieces, $includeCommonData=true)\n {\n if ($includeCommonData) {\n $pieces[] = $this->getCurrencyCode();\n $pieces[] = $this->getStoreId();\n\n // customer group id\n if ($this->isCacheUniqueToCustomerGroup()) {\n $pieces[] = $this->getCustomerGroup();\n }\n\n if (Mage::helper('ddq')->getPriceUpdatesEnabled()) {\n // tax request data\n $taxRateRequest = Mage::getSingleton('tax/calculation')->getRateRequest();\n\n if ($taxRateRequest && $taxRateRequest->getData()) {\n $pieces = array_merge($pieces, $taxRateRequest->getData());\n }\n\n // module / controller / action data (tier prices etc. if for example not included on product lists, thus the cache needs to be unique)\n $mca = Mage::helper('mageparts_base/url')->getMca();\n\n if ($mca == 'catalog/product/view') {\n $pieces[] = 'product_view';\n } else if (strpos($mca, 'checkout/cart') === 0) {\n $pieces[] = 'cart';\n } else {\n $pieces[] = 'product_default';\n }\n }\n }\n\n return parent::generateCacheKey($pieces, true);\n }"
] |
[
"0.61945325",
"0.61731637",
"0.5980446",
"0.55600774",
"0.55121803",
"0.5482575",
"0.54809695",
"0.5414574",
"0.53665787",
"0.53499967",
"0.53186744",
"0.52598226",
"0.5240595",
"0.52305543",
"0.523033",
"0.5176822",
"0.5139295",
"0.51178664",
"0.5097414",
"0.5092228",
"0.50835735",
"0.5074933",
"0.5065371",
"0.5031686",
"0.49922657",
"0.4958855",
"0.4944523",
"0.49369514",
"0.4935733",
"0.4921668"
] |
0.69717246
|
0
|
Get the test type clamped between 1 and 5 (included)
|
function do_test_get_test_type($testtype)
{
if ($testtype < 1) {
$testtype = 1;
}
if ($testtype > 5) {
$testtype = 5;
}
return $testtype;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function rand($min = null, $max = null)\n{\n if ($min == null && $max == null) {\n return \\Genesis\\SQLExtension\\Tests\\Context\\SQLHandlerTest::INT_NUMBER;\n }\n\n return \\Genesis\\SQLExtension\\Tests\\Context\\SQLHandlerTest::TINY_INT_NUMBER;\n}",
"function single_trial($cutoff) {\n global $PRIOR_LOWER_MAX;\n $lower_value = $PRIOR_LOWER_MAX * (float) rand() / (float) getrandmax(); \n $higher_value = 2 * $lower_value;\n if (rand(0, 1) == 0) {\n return $lower_value >= $cutoff ? $lower_value : $higher_value;\n } else {\n return $higher_value >= $cutoff ? $higher_value : $lower_value;\n }\n}",
"public function type(): string\n {\n return 'ranged-value';\n }",
"function php05($min,$max){\n\t$random = rand($min,$max);\n\treturn $random;\n}",
"public function getTestType()\n\t{\n\t\treturn $this->test_type;\n\t}",
"#[@test]\n public function integerType() {\n $this->testType(new Integer(0), 0, 0.0);\n }",
"function get_test_type()\n{\n return do_test_get_test_type((int)getreq('type'));\n}",
"public function getTest()\n {\n return 55;\n }",
"public function getThreshold()\n {\n return 5000;\n }",
"function getQuality() {\n $quality = 0;\n $randNum = mt_rand(0, 100);\n\n if ($randNum < 30) { // 30%\n $quality = 0;\n }\n else if ($randNum < 55) { // 25%\n $quality = 1;\n }\n else if ($randNum < 75) { // 20%\n $quality = 2;\n }\n else if ($randNum < 90) { // 15%\n $quality = 3;\n }\n else if ($randNum < 97) { // 7%\n $quality = 4;\n }\n else if ($randNum <= 100) { // 3%\n $quality = 5;\n }\n\n return $quality;\n}",
"public static function minValue()\n {\n if (self::$PHPIntSize === 4) {\n // 32 bit\n return static::createFromTimestamp(~PHP_INT_MAX); // @codeCoverageIgnore\n }\n\n // 64 bit\n return static::create(1, 1, 1, 0, 0, 0);\n }",
"abstract public function getMinimumLevel()\n\t{\n\t\treturn 0.5;\n\t}",
"public function getMaxValue();",
"public function getMaxValue();",
"public function testRandom() {\n\t\t$results = array();\n\t\tforeach (range(0, 100) as $run) {\n\t\t\t$results[] = _::random(10);\n\t\t}\n\t\t$this->assertContainsOnly('int', $results);\n\t\t$this->assertGreaterThanOrEqual(0, min($results));\n\t\t$this->assertLessThanOrEqual(10, max($results));\n\t}",
"#[@test]\n public function shortType() {\n $this->testType(new Short(0), 0, 0.0);\n }",
"function earthquakeClass(string $value)\n {\n // Class\tMagnitude\n // Great\t8 or more\n // Major\t7 - 7.9\n // Strong\t6 - 6.9\n // Moderate\t5 - 5.9\n // Light\t4 - 4.9\n // Minor\t3 - 3.9\n if ((int)$value >= 8) {\n return 'Great';\n } elseif ((int)$value == 7) {\n return 'Major';\n } elseif ((int)$value == 6) {\n return 'Strong';\n } elseif ((int)$value == 5) {\n return 'Moderate';\n } elseif ((int)$value == 4) {\n return 'Light';\n } elseif ((int)$value == 3) {\n return 'Minor';\n } else {\n return 'Negligible';\n }\n }",
"function under (float $value, float $max) : float\n{\n return $value > $max ? $max : $value;\n}",
"public function type() : int;",
"public function testRange() {\n\t\t$result = _::range(5);\n\t\t$this->assertInternalType('array', $result);\n\t\t$this->assertCount(5, $result);\n\t\t$this->assertEquals(0, $result[0]);\n\t\t$this->assertEquals(1, $result[1]);\n\t\t$this->assertEquals(2, $result[2]);\n\t\t$this->assertEquals(3, $result[3]);\n\t\t$this->assertEquals(4, $result[4]);\n\n\t\t// test range with two parameters\n\t\t$result = _::range(1, 4);\n\t\t$this->assertInternalType('array', $result);\n\t\t$this->assertCount(3, $result);\n\t\t$this->assertEquals(1, $result[0]);\n\t\t$this->assertEquals(2, $result[1]);\n\t\t$this->assertEquals(3, $result[2]);\n\n\t\t// test range with three parameters\n\t\t$result = _::range(1, 10, 2);\n\t\t$this->assertInternalType('array', $result);\n\t\t$this->assertCount(5, $result);\n\t\t$this->assertEquals(1, $result[0]);\n\t\t$this->assertEquals(3, $result[1]);\n\t\t$this->assertEquals(5, $result[2]);\n\t\t$this->assertEquals(7, $result[3]);\n\t\t$this->assertEquals(9, $result[4]);\n\t}",
"public function getMinValue();",
"public function getMinValue();",
"function test18() {\n return '1';\n}",
"#[@test]\n public function longType() {\n $this->testType(new Long(0), 0, 0.0);\n }",
"public function getTributeType();",
"public function getRangeUnit(): string;",
"public function getTiers()\n\t{\n\t\treturn range(0, 4);\n\t}",
"function testMaxval(){\n\t\t#mdx:maxval\n\t\tParam::get('age')->filters()->maxval(150, \"Age cannot be more than %d!\");\n\t\t$error = Param::get('age')->process(['age'=>200])->error;\n\t\t#/mdx var_dump($error)\n\n\t\t$this->assertContains(\"more than 150\", $error);\n\t}",
"public function testIntegerFieldValidation()\n {\n $field = $this->table->getField('numberfour');\n\n $testVal = 1;\n $expected = 1;\n $this->assertEquals($expected, $field->getPHPValue($testVal));\n\n $testVal = 1.123;\n $this->assertEquals($expected, $field->getPHPValue($testVal));\n\n $testVal = 0;\n $expected = 0;\n $this->assertEquals($expected, $field->getPHPValue($testVal));\n }",
"public function getSampleType();"
] |
[
"0.55770415",
"0.5402577",
"0.5338391",
"0.5194098",
"0.5140965",
"0.5134963",
"0.51042366",
"0.508055",
"0.50591046",
"0.505275",
"0.499514",
"0.49897087",
"0.49820676",
"0.49820676",
"0.4906944",
"0.48975155",
"0.48847386",
"0.48715553",
"0.48705795",
"0.4845056",
"0.4842022",
"0.4842022",
"0.48259532",
"0.4821774",
"0.4792776",
"0.47491312",
"0.47029823",
"0.4700838",
"0.46897715",
"0.46762294"
] |
0.74614334
|
0
|
Set sql request for the word test.
|
function get_test_sql()
{
return do_test_get_test_sql(
$_REQUEST['selection'], $_SESSION['testsql'],
$_REQUEST['lang'], $_REQUEST['text']
);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function setSQL( $string,$string_num='unset') \n {\n if ( strlen( $string ) < 0 ) {\n throw new Exception( \"<<THE QUERY NEEDS A SQL STRING>>\" );\n } \n \n $this->_sql = $string;\n\t\t\n\t\t\n\t\t$this->_numsql = $string_num;\n \n }",
"public function addDefinition()\r\n{\r\n $query_string = \"INSERT INTO glossary \";\r\n $query_string .= \"SET \";\r\n $query_string .= \"word = :word, \";\r\n $query_string .= \"worddefinition = :worddefinition\";\r\n\r\n return $query_string;\r\n}",
"function change_query($request = NULL, $user_query = NULL) {\n $default_query = array(\n 'case' => 'select',\n 'query' => QUERY_SELECT_ALL\n );\n if (!empty($request) && !is_bool($request)) {\n $getValue = array_keys($request);\n $sanitized_req = filter_var($getValue[0], FILTER_SANITIZE_STRING);\n switch ($sanitized_req) {\n case 'IMG' :\n $this->query = array(\n 'case' => 'real_img',\n 'query' => QUERY_SELECT_IMG\n );\n break;\n case 'INFO' :\n $this->query = array(\n 'case' => 'api',\n 'query' => QUERY_SELECT_JSON\n );\n break;\n default :\n $this->query = $default_query;\n }\n } else if (is_bool($request)) {\n $this->query = array(\n 'case' => 'insert',\n 'query' => $user_query\n );\n } else {\n $this->query = $default_query;\n }\n }",
"public function source($source)\n {\n $this->query = $source;\n }",
"private function setQuery($sql){\n $this->isStatement = false;\n return $this->sqli->query($sql);\n }",
"public function setKeyWords()\n {\n if (empty($this->sqlKeywords)) {\n $this->sqlKeywords = [\"abort\",\"absolute\",\"access\",\"action\",\"add\",\"admin\",\"after\",\"aggregate\",\"all\",\"also\",\"alter\",\"always\",\"analyse\",\"analyze\",\"and\",\"any\",\"array\",\"as\",\"asc\",\"assertion\",\"assignment\",\"asymmetric\",\"at\",\"attribute\",\"authorization\",\"backward\",\"before\",\"begin\",\"between\",\"bigint\",\"binary\",\"bit\",\"boolean\",\"both\",\"by\",\"cache\",\"called\",\"cascade\",\"cascaded\",\"case\",\"cast\",\"catalog\",\"chain\",\"char\",\"character\",\"characteristics\",\"check\",\"checkpoint\",\"class\",\"close\",\"cluster\",\"coalesce\",\"collate\",\"collation\",\"column\",\"comment\",\"comments\",\"commit\",\"committed\",\"concurrently\",\"configuration\",\"conflict\",\"connection\",\"constraint\",\"constraints\",\"content\",\"continue\",\"conversion\",\"copy\",\"cost\",\"create\",\"cross\",\"csv\",\"cube\",\"current\",\"current_catalog\",\"current_date\",\"current_role\",\"current_schema\",\"current_time\",\"current_timestamp\",\"current_user\",\"cursor\",\"cycle\",\"data\",\"database\",\"day\",\"deallocate\",\"dec\",\"decimal\",\"declare\",\"default\",\"defaults\",\"deferrable\",\"deferred\",\"definer\",\"delete\",\"delimiter\",\"delimiters\",\"depends\",\"desc\",\"dictionary\",\"disable\",\"discard\",\"distinct\",\"do\",\"document\",\"domain\",\"double\",\"drop\",\"each\",\"else\",\"enable\",\"encoding\",\"encrypted\",\"end\",\"enum\",\"escape\",\"event\",\"except\",\"exclude\",\"excluding\",\"exclusive\",\"execute\",\"exists\",\"explain\",\"extension\",\"external\",\"extract\",\"false\",\"family\",\"fetch\",\"filter\",\"first\",\"float\",\"following\",\"for\",\"force\",\"foreign\",\"forward\",\"freeze\",\"from\",\"full\",\"function\",\"functions\",\"global\",\"grant\",\"granted\",\"greatest\",\"group\",\"grouping\",\"handler\",\"having\",\"header\",\"hold\",\"hour\",\"identity\",\"if\",\"ilike\",\"immediate\",\"immutable\",\"implicit\",\"import\",\"in\",\"including\",\"increment\",\"index\",\"indexes\",\"inherit\",\"inherits\",\"initially\",\"inline\",\"inner\",\"inout\",\"input\",\"insensitive\",\"insert\",\"instead\",\"int\",\"integer\",\"intersect\",\"interval\",\"into\",\"invoker\",\"is\",\"isnull\",\"isolation\",\"join\",\"key\",\"label\",\"language\",\"large\",\"last\",\"lateral\",\"leading\",\"leakproof\",\"least\",\"left\",\"level\",\"like\",\"limit\",\"listen\",\"load\",\"local\",\"localtime\",\"localtimestamp\",\"location\",\"lock\",\"locked\",\"logged\",\"mapping\",\"match\",\"materialized\",\"maxvalue\",\"method\",\"minute\",\"minvalue\",\"mode\",\"month\",\"move\",\"name\",\"names\",\"national\",\"natural\",\"nchar\",\"next\",\"no\",\"none\",\"not\",\"nothing\",\"notify\",\"notnull\",\"nowait\",\"null\",\"nullif\",\"nulls\",\"numeric\",\"object\",\"of\",\"off\",\"offset\",\"oids\",\"on\",\"only\",\"operator\",\"option\",\"options\",\"or\",\"order\",\"ordinality\",\"out\",\"outer\",\"over\",\"overlaps\",\"overlay\",\"owned\",\"owner\",\"parallel\",\"parser\",\"partial\",\"partition\",\"passing\",\"password\",\"placing\",\"plans\",\"policy\",\"position\",\"preceding\",\"precision\",\"prepare\",\"prepared\",\"preserve\",\"primary\",\"prior\",\"privileges\",\"procedural\",\"procedure\",\"program\",\"quote\",\"range\",\"read\",\"real\",\"reassign\",\"recheck\",\"recursive\",\"ref\",\"references\",\"refresh\",\"reindex\",\"relative\",\"release\",\"rename\",\"repeatable\",\"replace\",\"replica\",\"reset\",\"restart\",\"restrict\",\"returning\",\"returns\",\"revoke\",\"right\",\"role\",\"rollback\",\"rollup\",\"row\",\"rows\",\"rule\",\"savepoint\",\"schema\",\"scroll\",\"search\",\"second\",\"security\",\"select\",\"sequence\",\"sequences\",\"serializable\",\"server\",\"session\",\"session_user\",\"set\",\"setof\",\"sets\",\"share\",\"show\",\"similar\",\"simple\",\"skip\",\"smallint\",\"snapshot\",\"some\",\"sql\",\"stable\",\"standalone\",\"start\",\"statement\",\"statistics\",\"stdin\",\"stdout\",\"storage\",\"strict\",\"strip\",\"substring\",\"symmetric\",\"sysid\",\"system\",\"table\",\"tables\",\"tablesample\",\"tablespace\",\"temp\",\"template\",\"temporary\",\"text\",\"then\",\"time\",\"timestamp\",\"to\",\"trailing\",\"transaction\",\"transform\",\"treat\",\"trigger\",\"trim\",\"true\",\"truncate\",\"trusted\",\"type\",\"types\",\"unbounded\",\"uncommitted\",\"unencrypted\",\"union\",\"unique\",\"unknown\",\"unlisten\",\"unlogged\",\"until\",\"update\",\"user\",\"using\",\"vacuum\",\"valid\",\"validate\",\"validator\",\"value\",\"values\",\"varchar\",\"variadic\",\"varying\",\"verbose\",\"version\",\"view\",\"views\",\"volatile\",\"when\",\"where\",\"whitespace\",\"window\",\"with\",\"within\",\"without\",\"work\",\"wrapper\",\"write\",\"xml\",\"xmlattributes\",\"xmlconcat\",\"xmlelement\",\"xmlexists\",\"xmlforest\",\"xmlparse\",\"xmlpi\",\"xmlroot\",\"xmlserialize\",\"year\",\"yes\",\"zone\"];\n }\n }",
"public function editDefinition()\r\n{\r\n $query_string = \"UPDATE glossary \";\r\n $query_string .= \"SET \";\r\n $query_string .= \"word = :word, \";\r\n $query_string .= \"worddefinition = :worddefinition \";\r\n $query_string .= \"WHERE wordid = :wordid\";\r\n\r\n return $query_string;\r\n}",
"function searchSQL ($aRequest) {\n $sVersion = DBUtil::getOneResultKey(\"SHOW VARIABLES LIKE 'version'\", \"Value\");\n if ((int)substr($sVersion, 0, 1) >= 4) {\n $boolean_mode = \"IN BOOLEAN MODE\";\n } else {\n $boolean_mode = \"\";\n }\n\n $p = array();\n $p[0] = \"MATCH(DTT.document_text) AGAINST (? $boolean_mode)\";\n\t$p[1] = KTUtil::phraseQuote($aRequest[$this->getWidgetBase()]);\n \n // handle the boolean \"not\" stuff.\n $want_invert = KTUtil::arrayGet($aRequest, $this->getWidgetBase() . '_not');\n if (is_null($want_invert) || ($want_invert == \"0\")) {\n return $p;\n } else {\n $p[0] = '(NOT (' . $p[0] . '))';\n } \n \n return $p;\n }",
"protected function setUp()\n {\n // create request\n $this->request = new Request([\n 'sEcho' => 13,\n 'iDisplayStart' => 11,\n 'iDisplayLength' => 103,\n 'iColumns' => 1, // will be ignored, the column number is already set on the server side\n 'sSearch' => 'fooBar',\n 'bRegex' => true,\n 'bSearchable_1' => true, // will be ignored, the configuration is already set on the server side\n 'sSearch_0' => 'fooBar_1',\n 'bRegex_0' => true, // will be ignored, the configuration is already set on the server side\n 'bSortable_0' => true, // will be ignored, the configuration is already set on the server side\n 'iSortingCols' => 1,\n 'iSortCol_0' => 0,\n 'sSortDir_0' => 'desc',\n ]);\n\n $this->parser = new Datatable19QueryParser();\n }",
"public function setQueryString($sql):self\n {\n $this->querystring=$sql;\n return $this;\n }",
"public function setSqlRequestTranslator(SqlRequestParametersTranslator $sqlRequestTranslator): void\n {\n $this->sqlRequestTranslator = $sqlRequestTranslator;\n $this->sqlRequestTranslator\n ->getRequestParameters()\n ->setConcordanceStrictMode(\n RequestParameters::CONCORDANCE_MODE_STRICT\n );\n }",
"private function sqlstatements() {\n $this->select = array( );\n $this->insert = array( 'INSERT INTO :entity (xxx) VALUES (yyy)' );\n $this->update = array( );\n $this->delete = array( );\n }",
"public function setSqlRequestTranslator(SqlRequestParametersTranslator $sqlRequestTranslator): void\n {\n $this->sqlRequestTranslator = $sqlRequestTranslator;\n $this->sqlRequestTranslator\n ->getRequestParameters()\n ->setConcordanceStrictMode(RequestParameters::CONCORDANCE_MODE_STRICT);\n }",
"public function executeHint(sfWebRequest $request) {\n \t// NOTE -- changed this from `getGetParameter` to `getParameter.`\n\t\t// The former wasn't working for some reason, $word was coming up empty\n\t\t// andyinabox - 2010-05-20\n \t$word = $request->getParameter('word');\n \t$firstExample = Wordnik::getFirstExample($word);\n \t$hint = str_replace($word, \"_____________\", $firstExample);\n\t\t$this->logMessage($hint);\n \t$this->hint = $hint;\n \t//$this->examples = Wordnik::getAllExamples(\"gree\");\n }",
"public function setSql($sql) {\r\n $this->sql = $sql;\r\n return $this;\r\n }",
"private function setSQLcondition($input) {\n\t\tif (is_int($input)) {\n\t\t\t$this->setIntCondition($input);\n\t\t\treturn;\n \t\t} else if (!is_array($input)) {\n \t\t\tthrow new tx_newspaper_IllegalUsageException(\n\t\t\t\t'Argument to generate a page type must be either an integer UID or the _GET array.\n\t\t\t\t In fact it is:\n\t\t\t\t' . print_r($input, 1)\n\t\t\t);\n \t\t}\n \t\t\n\t\t$this->setConditionFromGET($input);\n\t}",
"function searchSQL ($aRequest) {\n $sVersion = DBUtil::getOneResultKey(\"SHOW VARIABLES LIKE 'version'\", \"Value\");\n if ((int)substr($sVersion, 0, 1) >= 4) {\n $boolean_mode = \"IN BOOLEAN MODE\";\n } else {\n $boolean_mode = \"\";\n }\n\n $p = array();\n $p[0] = \"MATCH(DDCT.body) AGAINST (? $boolean_mode)\";\n\t$p[1] = KTUtil::phraseQuote($aRequest[$this->getWidgetBase()]);\n \n // handle the boolean \"not\" stuff.\n $want_invert = KTUtil::arrayGet($aRequest, $this->getWidgetBase() . '_not');\n if (is_null($want_invert) || ($want_invert == \"0\")) {\n return $p;\n } else {\n $p[0] = '(NOT (' . $p[0] . '))';\n } \n \n return $p;\n }",
"public function setSql($sql = NULL)\n\t{\n\t /**\n\t * @todo adjust regular expression, as multiple statements can be\n\t * executed at once. The first could be a select, one of the\n\t * following could drop the database, delete, or whatever.\n\t */\n\t\tif (!$sql ||\n\t\t\t!preg_match('/^SELECT/i', $sql)) {\n\t\t throw new L8M_Doctrine_Import_Exception('For security reasons, only SELECT statements are allowed.');\n\t\t}\n\n\t\t$this->_sql = $sql;\n\t\treturn $this;\n\t}",
"public function testInitialSet()\n {\n $method = $this->builder_reflection->getMethod('sql_set');\n $method->setAccessible(TRUE);\n\n $property = $this->builder_reflection->getProperty('set');\n $property->setAccessible(TRUE);\n\n $method->invokeArgs($this->builder, array( array('column1' => 'value1')));\n\n $string = 'SET column1 = value1';\n\n $this->assertEquals($string, $property->getValue($this->builder));\n }",
"function addQuery() {}",
"public function setQuery($query)\n\t{\n\t\t$query = trim($query);\n\t\t$query = preg_replace('# {2,}#', ' ', $query);\n\t\t$query = Strings::utf8_strtolower($query);\n\t\t$query = Strings:: utf8_accents_to_ascii($query);\n\n\t\t$this['query'] = $query;\n\t}",
"public function setQuery($query);",
"public function setRequestContent($request_content) {\n $this->request_content = $this->replaceTokenStrings($request_content);\n }",
"public function setQuery($q)\n {\n if (is_string($q)) {\n $this->options['Query'] = $q;\n } else {\n return false;\n }\n }",
"public function query(string $sql);",
"public function init_save_queries()\n {\n }",
"protected function set_database_name($val){ $this->input ['db_nam_sar_sup'] = $val ;}",
"public function addSql(string $query)\n {\n $this->query = $query;\n $this->runScript();\n }",
"public static function set_request($request){\n\t\t\tself::$request = $request;\n\t\t}",
"public function set_default_query($query){\n $this->default_query = $query;\n }"
] |
[
"0.5578821",
"0.55531704",
"0.5467802",
"0.5433356",
"0.54016316",
"0.536277",
"0.53180104",
"0.52778006",
"0.52530897",
"0.5241036",
"0.52375466",
"0.5232926",
"0.52131337",
"0.5185715",
"0.51772666",
"0.5168415",
"0.51663923",
"0.51345277",
"0.5129421",
"0.5127689",
"0.508492",
"0.50533855",
"0.5022467",
"0.50120693",
"0.49955425",
"0.49936208",
"0.49818194",
"0.49692655",
"0.4964334",
"0.4959228"
] |
0.5575943
|
1
|
Give the test type.
|
function get_test_type()
{
return do_test_get_test_type((int)getreq('type'));
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function getTestType()\n\t{\n\t\treturn $this->test_type;\n\t}",
"public function testType()\n {\n $user = new User(null, null, null, \"student\");\n $this->assertEquals(\"student\", $user->getType());\n\n $user->setType(\"wrong\");\n $this->assertEquals(\"student\", $user->getType());\n\n $user->setType(\"admin\");\n $this->assertEquals(\"admin\", $user->getType());\n\n $user->setType(\"lecturer\");\n $this->assertEquals(\"lecturer\", $user->getType());\n\n $user->setType(\"student\");\n $this->assertEquals(\"student\", $user->getType());\n }",
"public function type($type);",
"public function testGettingType()\n {\n $this->assertEquals('foo', $this->principal->getType());\n }",
"public function setTestType($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (int) $v;\n\t\t}\n\n\t\tif ($this->test_type !== $v) {\n\t\t\t$this->test_type = $v;\n\t\t\t$this->modifiedColumns[] = CampaignPeer::TEST_TYPE;\n\t\t}\n\n\t\treturn $this;\n\t}",
"function do_test_get_test_type($testtype)\n{\n if ($testtype < 1) { \n $testtype = 1; \n }\n if ($testtype > 5) { \n $testtype = 5; \n }\n return $testtype;\n}",
"public function setTyp( $type );",
"#[@test]\n public function correctTypeNameSet() {\n $this->assertEquals('string', \n $this->xpath->query('string(/document/table/attribute[3]/@typename)'));\n $this->assertEquals('int', \n $this->xpath->query('string(/document/table/attribute[2]/@typename)'));\n }",
"public function type() { }",
"function setType($type = \"\")\n\t\t{\n\t\t\t$this->type = $type;\n\t\t}",
"private function get_type() {\n\n\t}",
"public function setType($type) {}",
"public function gettestTubeTypeId()\n {\n return $this->testtubetype_id;\n }",
"public function setType($type){ }",
"public function setType( $type )\n {\n }",
"public function get_type()\n {\n }",
"public function get_type()\n {\n }",
"public function get_type()\n {\n }",
"public function get_type()\n {\n }",
"public function get_type()\n {\n }",
"function setType($type) {\n $this->type = $type;\n }",
"public function getType()\n {\n }",
"public function getType()\n {\n }",
"public function getType()\n\t{\n\n\t}",
"public function getType()\n\t{\n\n\t}",
"public function setType($type);",
"public function setType($type);",
"public function setType($type);",
"public function setType($type);",
"public function setType($type);"
] |
[
"0.7762408",
"0.68215483",
"0.66171634",
"0.6570151",
"0.6558088",
"0.64613616",
"0.6430818",
"0.64280623",
"0.64164454",
"0.6360723",
"0.63453645",
"0.6332546",
"0.62907684",
"0.6288236",
"0.6189538",
"0.6174307",
"0.61729336",
"0.61729336",
"0.61725944",
"0.6171966",
"0.6170898",
"0.61536056",
"0.61536056",
"0.6151652",
"0.6151652",
"0.6128768",
"0.6128768",
"0.6128768",
"0.6128768",
"0.6128768"
] |
0.74952364
|
1
|
Output a message for a finished test, with the number of tests for tomorrow.
|
function do_test_test_finished($testsql, $totaltests, $ajax=false)
{
$tomorrow_tests = do_test_get_tomorrow_tests_count($testsql);
echo '<p id="test-finished-area" class="center" style="display: ' .
($ajax ? 'none' : 'inherit') . ';">
<img src="img/ok.png" alt="Done!" />
<br /><br />
<span class="red2">
<span id="tests-done-today">
Nothing ' . ($totaltests ? 'more ' : '') . 'to test here!
</span>
<br /><br />
<span id="tests-tomorrow"">
Tomorrow you\'ll find here ' . $tomorrow_tests . ' test' .
($tomorrow_tests == 1 ? '' : 's') . '!
</span>
</span>
</p>
</div>';
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function paintFooter($test_name) {\n $colour = ($this->getFailCount() + $this->getExceptionCount() > 0 ? \"red\" : \"green\");\n print \"<div id=\\\"results\\\" style=\\\"background-color: $colour;\\\">\";\n print $this->getTestCaseProgress() . \"/\" . $this->getTestCaseCount();\n print \" test cases complete:\\n\";\n print \"<b>\" . $this->getPassCount() . \"</b> passes, \";\n print \"<b>\" . $this->getFailCount() . \"</b> fails and \";\n print \"<b>\" . $this->getExceptionCount() . \"</b> exceptions.\";\n print \"</div>\\n\";\n print \"</body>\\n</html>\\n\";\n }",
"function countfinishedTest()\n\t{\n\t\tglobal $DB,$frmdata;\n\t\t\n\t\t$query=\"select count(*) as finishtest,tc.candidate_id from test join test_candidate as tc on tc.test_id = test.id\n\t\t\t\twhere test_date<now() AND tc.candidate_id =\".$_SESSION['candidate_id'];\n\t\t\t\t\n\t\t$result = $DB->RunSelectQuery($query);\n\t\treturn $result;\n\t}",
"public function testRunFinished(\\unittest\\TestSuite $suite, \\unittest\\TestResult $result) {\n $this->writeStatus();\n $this->out->writeLine();\n\n // Summary output\n $this->out->writeLinef(\n \"\\n%s: %d/%d run (%d skipped), %d succeeded, %d failed\",\n $result->failureCount() > 0 ? 'FAIL' : 'OK',\n $result->runCount(),\n $result->count(),\n $result->skipCount(),\n $result->successCount(),\n $result->failureCount()\n );\n foreach ($result->metrics() as $name => $metric) {\n $this->out->writeLine($name, ': ', $metric->formatted());\n }\n }",
"public function showTestResults() {\n echo \"Tests: {$this->tests}\\n\";\n echo \"Pass: {$this->pass}\\n\";\n echo \"Fail: {$this->fail}\\n\";\n }",
"function succ_test_html($test_counter, $test_name){\n echo \"<font size=\\\"2\\\" color=\\\"green\\\">$test_counter. $test_name TEST : passed</font><br>\\n\";\n }",
"function atTestEnd($test_method, &$test) {\n foreach ($this->expected_counts as $method => $expectation) {\n $test->assert($expectation, $this->getCallCount($method));\n }\n foreach ($this->max_counts as $method => $expectation) {\n if ($expectation->test($this->getCallCount($method))) {\n $test->assert($expectation, $this->getCallCount($method));\n }\n }\n }",
"function do_test_test_javascript($count)\n{\n ?>\n<script type=\"text/javascript\">\n const waitTime = <?php \n echo json_encode((int)getSettingWithDefault('set-test-edit-frame-waiting-time')) \n ?>;\n\n /**\n * Prepare the different frames for a test.\n */\n function prepare_test_frames()\n {\n window.parent.frames['ru'].location.href='empty.html';\n if (waitTime <= 0) {\n window.parent.frames['ro'].location.href='empty.html';\n } else {\n setTimeout(\n 'window.parent.frames[\"ro\"].location.href=\"empty.html\";', \n waitTime\n );\n }\n new CountUp(\n <?php echo time(); ?>, \n <?php echo $_SESSION['teststart']; ?>, \n 'timer', <?php echo ($count ? 0 : 1); ?>\n );\n }\n\n /**\n * Make a custom display when tests are finished for today.\n */\n function do_test_finished(total_tests)\n {\n $('#term-test').css(\"display\", \"none\");\n $('#test-finished-area').css(\"display\", \"inherit\");\n $('#tests-done-today').text(\n \"Nothing \" + (total_tests > 0 ? 'more ' : '') + \"to test here!\"\n );\n\n $('#tests-tomorrow').css(\"display\", \"none\");\n }\n\n $(document).ready(prepare_test_frames);\n</script>\n <?php\n}",
"protected function _report()\n {\n // report summary\n $done = $this->_info['done'];\n $plan = $this->_info['plan'];\n $time = $this->_info['time'];\n \n $this->_log(\"$done/$plan tests, $time seconds\");\n \n $tmp = array();\n $show = array('fail', 'todo', 'skip', 'pass');\n foreach ($show as $type) {\n $count = count($this->_info[$type]);\n $tmp[] = \"$count $type\";\n }\n $this->_log(implode(', ', $tmp));\n }",
"public function getFinished(): int;",
"private function writeStatus(Test $test= null) {\n if ($test) {\n $this->cur++;\n $color= self::CODE_BLUE;\n } else if ($this->status) {\n $this->cur= $this->sum;\n $color= self::CODE_GREEN;\n } else {\n $color= self::CODE_RED;\n }\n \n // Create status bar\n $done= floor($this->cur / $this->sum * self::PROGRESS_WIDTH);\n $status= sprintf('Running %-3d of %d ▐%s▌ %01d 📛▕ %01d ❌▕ %01d ⚡▕ %01d ⏩▕ %01d ⌛',\n $this->cur,\n $this->sum,\n str_repeat('█', $done).str_repeat(' ', self::PROGRESS_WIDTH - $done),\n $this->stats['failed'],\n $this->stats['errored'],\n $this->stats['warned'],\n $this->stats['skipped'],\n $this->stats['notrun']\n );\n\n // Format output so it's 72 characters wide (8 for status, 2 spaces padding)\n $this->out->writef(\n \"\\r\\033[%sm %s%s❯ %s \\033[0m\",\n $color,\n $status,\n str_repeat(' ', 60 - iconv_strlen($status, 'utf-8')),\n $this->status ? 'PASSING' : 'FAILURE!'\n );\n }",
"public function _summary() {\n $text = $this->_failed ? 'TESTS FAILED!' : 'TESTS PASSED';\n $result = $this->_colors->getColoredString($text, $this->_colorsPalete[!$this->_failed]);\n $this->_log($result);\n }",
"public function runTests() {\n $results = \"\";\n for ($i = 0; $i < sizeof($this->tests); $i++) {\n $results .= \"Test \" . ($i + 1) . \": \" . $this->tests[$i]->runTest() . \"<br>\";\n }\n return $results;\n }",
"public function after(TestEvent $e): void\n {\n $name = $this->getTestName($e);\n\n if (empty($this->timeList[$name])) {\n $this->timeList[$name] = 0;\n }\n $this->timeList[$name] += $e->getTime();\n }",
"function test($num, $expected){\n $output = PHP_EOL .\"<br>Recieved: $num.\" . PHP_EOL . \"<br>Expected: $expected\". PHP_EOL . \"<br>Result: \";\n $output .= ($num == $expected) ? \"Passed Test\" : \"Failed Test\";\n return $output;\n}",
"public function printFooter(\\PHPUnit_Framework_TestResult $result)\n {\n $testCount = $result->count();\n $assertionCount = $this->numAssertions;\n $failureCount = $result->failureCount();\n $errorCount = $result->errorCount();\n $incompleteCount = $result->notImplementedCount();\n $skipCount = $result->skippedCount();\n $riskyCount = $result->riskyCount();\n\n $resultStatus = ($errorCount + $failureCount) ? 'KO' : 'OK';\n $resultMessage = sprintf('Results %s. ', $resultStatus) .\n $this->formatCounters(\n $testCount,\n $assertionCount,\n $failureCount,\n $errorCount,\n $incompleteCount,\n $skipCount,\n $riskyCount\n )\n ;\n\n $context = array(\n 'operation' => __FUNCTION__,\n 'status' => $resultStatus,\n 'testCount' => $testCount,\n 'assertionCount' => $assertionCount,\n 'failureCount' => $failureCount,\n 'errorCount' => $errorCount,\n 'incompleteCount' => $incompleteCount,\n 'skipCount' => $skipCount,\n 'riskyCount' => $riskyCount,\n );\n\n $this->logger->notice($resultMessage, $context);\n }",
"public function testGetFinishedGame()\n {\n $game = new DiceGame(4, 1);\n $this->assertInstanceOf(\"\\Ida\\Dice\\DiceGame\", $game);\n $finished = $game->getFinishedGame();\n \n $exp = false;\n $this->assertEquals($exp, $finished);\n }",
"function countremainingTest()\n\t{\n\t\tglobal $DB,$frmdata;\n\t\t\n\t\t$query=\"select count(*) as test from test where test_date>=now()\";\n\t\t\t\t\n\t\t$result = $DB->RunSelectQuery($query);\n\t\treturn $result;\n\t}",
"public function testStarted(\\unittest\\TestStart $start) {\n $this->writeStatus($start->test());\n }",
"function test_test_run_complete() {\n if (drush_bootstrap_max(DRUSH_BOOTSTRAP_DRUPAL_FULL) == DRUSH_BOOTSTRAP_DRUPAL_FULL && module_exists('simpletest')) {\n // Retrieve all tests and groups.\n list($groups, $all_tests) = drush_test_get_all_tests();\n return array('values' => array_keys($groups) + $all_tests);\n }\n}",
"public function testIterationEnd(): void\n {\n foreach ($this->variant as $iteration) {\n foreach (TestUtil::createResults(10, 10) as $result) {\n $iteration->setResult($result);\n }\n }\n $this->variant->computeStats();\n\n $this->logger->variantEnd($this->variant);\n $display = $this->output->fetch();\n $this->assertStringContainsString(\n '1 (σ = 0.000ms ) -2σ [ █ ] +2σ summary',\n $display\n );\n }",
"public function run () {\r\n print \"\\n\";\r\n \r\n # Console spacing.\r\n foreach ( $this->tests as $test ) {\r\n if ( strlen( $test->name() ) > $this->longest_test_name_length )\r\n $this->longest_test_name_length = strlen( $test->name() );\r\n }\r\n \r\n foreach ( $this->tests as $test ) {\r\n $test->run();\r\n $this->print_test( $test );\r\n }\r\n \r\n $this->print_summary_stats();\r\n }",
"public function pass($msg) {\n $this->tests++;\n $this->pass++;\n echo \"[PASS] {$msg}\\n\";\n }",
"public function onFinish(ImportFinishedEvent $event) {\n $GLOBALS['feeds_test_events'][] = (__METHOD__ . ' called');\n }",
"public function benchmarkEnd()\n\t{\n\t\tif ($this->startTime == 0) {\n\t\t\treturn 'Benchmark not started';\n\t\t}\n\n\t\treturn \"Completed in \".(round(microtime(true) * 1000) - $this->startTime).\" ms\";\n\t}",
"public function testSendAlertSuccess()\n {\n $this->exec('alert-upcoming-expirations');\n $this->assertOutputContains('Expiring memberships found:');\n $this->assertOutputContains('User with membership expiring tomorrow');\n $this->assertOutputContains('User with membership auto-renewing tomorrow');\n $this->assertOutputContains('Sent');\n $this->assertOutputNotContains('Exception');\n $this->assertOutputNotContains('Member User');\n $this->assertErrorEmpty();\n }",
"public function report()\r\n {\r\n echo \"Question Bank Work is finish\";\r\n\r\n echo \"<br>\";\r\n\r\n echo \"Please Check Storage Folder\";\r\n\r\n echo \"<br>\";\r\n\r\n echo 'Count of Questions Get From Hsmai Server is: ' . count($this->questionInfo->items);\r\n\r\n echo \"questions\";\r\n }",
"public function suiteFooter(xTestRunner $testRunner)\r\n {\r\n\r\n }",
"public function displayFinished() \n {\n if ($this->has_finished) {\n return '<i style=\"font-size:25px;color:#449D44;\" class=\"fa fa-check\" aria-hidden=\"true\"></i>';\n } else {\n return '<i style=\"font-size:25px;color:#C9302C;\" class=\"fa fa-times\" aria-hidden=\"true\"></i>';\n }\n }",
"public function totalTimer() {\n return \"It took \" . $this->getTime() . \" seconds to run \" . $this->getName() . \" <br>\";\n }",
"public function endTestSuite(\\PHPUnit_Framework_TestSuite $suite)\n {\n $this->endedSuites++;\n\n $suiteName = $suite->getName();\n\n $context = array(\n 'suiteName' => $suiteName,\n 'testCount' => $this->stats[$suiteName]['tests'],\n 'assertionCount' => $this->stats[$suiteName]['assertions'],\n 'failureCount' => $this->stats[$suiteName]['failures'],\n 'errorCount' => $this->stats[$suiteName]['errors'],\n 'incompleteCount' => $this->stats[$suiteName]['incompletes'],\n 'skipCount' => $this->stats[$suiteName]['skips'],\n 'riskyCount' => $this->stats[$suiteName]['risky'],\n 'operation' => __FUNCTION__,\n );\n\n $this->logger->notice(\n sprintf(\"TestSuite '%s' ended.\", $suiteName),\n $context\n );\n }"
] |
[
"0.6712416",
"0.6377418",
"0.626899",
"0.6014381",
"0.58857805",
"0.5782044",
"0.574487",
"0.5728979",
"0.5727081",
"0.57116693",
"0.5696293",
"0.5689664",
"0.56791127",
"0.5669787",
"0.5602462",
"0.558085",
"0.5576183",
"0.556193",
"0.55164546",
"0.5504614",
"0.5500166",
"0.54463154",
"0.5417199",
"0.5405914",
"0.5395018",
"0.5370402",
"0.53638756",
"0.53169155",
"0.53030264",
"0.524258"
] |
0.67613894
|
0
|
Prepare JavaScript code so that you can click on words.
|
function do_test_test_javascript_clickable($wo_record, $solution) {
global $tbpref, $langDefs;
$wid = $wo_record['WoID'];
$lang = get_first_value(
'SELECT LgName AS value FROM ' . $tbpref . 'languages
WHERE LgID = ' . $wo_record['WoLgID'] . '
LIMIT 1'
);
$abbr = $langDefs[$lang][1];
$phoneticText = phonetic_reading($wo_record['WoText'], $abbr);
?>
<script type="text/javascript">
/**
* Read the word aloud
*/
function read_word() {
if (('speechSynthesis' in window) &&
document.getElementById('utterance-allowed').checked) {
const text = <?php echo json_encode($phoneticText); ?>;
const lang = <?php echo json_encode($abbr); ?>;
readRawTextAloud(text, lang);
}
}
SOLUTION = <?php echo prepare_textdata_js($solution); ?>;
WID = <?php echo $wid; ?>;
$(document).on('keydown', keydown_event_do_test_test);
$('.word')
.on('click', word_click_event_do_test_test)
.on('click', read_word);
</script>
<?php
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function all_words_wellknown_javascript($txid, $javascript)\n{\n ?>\n<script type=\"text/javascript\">\n //<![CDATA[\n const context = window.parent.document;\n <?php echo $javascript; ?> \n $('#learnstatus', context)\n .html('<?php echo addslashes(texttodocount2($txid)); ?>');\n window.parent.setTimeout(window.parent.cClick, 1000);\n //]]>\n</script>\n <?php\n}",
"private function _addJavascript ()\n {\n $options = array ();\n\n if ($this->isTypeahead) {\n $options['documentReady'][] = 'init';\n if ($this->desc)\n $options['documentReady'][] = 'tooltip';\n }\n \n if ($this->selectable) {\n $options['documentReady'][] = 'selectable';\n if ($this->sortable) {\n $options['documentReady'][] = 'sortable';\n }\n }\n\n if ($this->clickable) {\n \t$options['documentReady'][] = 'click';\n }\n\n if (!empty ($options)) {\n $this->buildJS('thesaurus/', $options);\n }\n\n if ($this->selectable) {\n $this->_element->addDocumentReady($this->endJavascript);\n if (isset($this->required_items) && is_array ($this->required_items)) {\n foreach ($this->required_items as $item) {\n $this->_element->addDocumentReady(\"setRequiredItems_\" . $this->idfilter . \" ('$item');\");\n }\n }\n }\n }",
"protected function generateJavascript() {}",
"protected function generateJavascript() {}",
"function ajouter_liens_javascript($java)\n{\n\tif ($java == \"2\")\n\t{\n\t\t$javascript = ecrire_js();\n\t\t$javascript .= bbcode_js();\n\t}\n\telse\n\t{\n\t\t$javascript = \"\";\n\t}\n\treturn $javascript;\n}",
"private function addScripts() {\n global $CFG; \n $script = \"<script type=\\\"text/javascript\\\">\n jQuery(document).ready(function() {\n codeActivity.initEdit(); \n codeActivity.ajaxURL = '\" . $CFG->wwwroot . \"/mod/codeactivity/ajax.php';\n codeActivity.lang = {\n empty_name: '\" . addslashes(get_string('js_empty_name', 'codeactivity')) . \"',\n empty_test_code: '\" . addslashes(get_string('js_empty_test_code', 'codeactivity')).\"',\n error_add: '\" . addslashes(get_string('js_error_add', 'codeactivity')).\"',\n error_delete: '\" . addslashes(get_string('js_error_delete', 'codeactivity')).\"',\n error_forbidden: '\" . addslashes(get_string('js_error_forbidden', 'codeactivity')).\"'\n }\n });\n </script>\";\n \n $this->_form->addElement('html', $script);\n }",
"protected function generateJavascript()\n\t{\n\t}",
"function makeJS($vars){\n\t$snippet = \"<script>\\n\\t\";\n\tforeach ($vars as $k => $var){\n\t\t$snippet .= \"var \" . $k . \" ='\" . $var . \"';\\n\\t\";\n\t}\n\t$snippet .= \"</script>\";\n\treturn $snippet;\n}",
"function skShortIncludeJsActivators() {\r\n\t\t$output = \"\r\n\t\t<script type=\\\"text/javascript\\\">\r\n\t\t\tjQuery(document).ready(function() {\r\n\t\t\t\tjQuery('.sktooltip').each(function() {\r\n\t\t\t\t\tjQuery(this).SKTooltip();\r\n\t\t\t\t});\r\n\t\t\t\tjQuery('.sk-notification').each(function() {\r\n\t\t\t\t\tjQuery(this).closeNotification();\r\n\t\t\t\t});\r\n\t\t\t\tjQuery('.skimage-slider').each(function() {\r\n\t\t\t\t\tjQuery(this).skImageSlider();\r\n\t\t\t\t});\r\n\t\t\t\tjQuery('.sktoggle-open, .sktoggle-closed').each(function() {\r\n\t\t\t\t\tjQuery(this).skToggle();\r\n\t\t\t\t});\r\n\t\t\t\tjQuery('.sktabbed').each(function() {\r\n\t\t\t\t\tjQuery(this).skTabbed();\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t</script>\";\r\n\t\techo $output;\r\n\t}",
"protected function doConcatenateJavaScript() {}",
"function funky_javascript_fix($text)\n {\n }",
"public function wp_print_footer_scripts() {\n\t\t// Don't use directly e[0] just in case there is somewhere else an element named 's'\n\t\t// Check before if the hidden input has not already been introduced by get_search_form ( FIXME: is there a way to improve this ) ?\n\t\t// Thanks to AndyDeGroo for improving the code for compatibility with old browsers\n\t\t// http://wordpress.org/support/topic/development-of-polylang-version-08?replies=6#post-2645559\n\t\t$lang = esc_js( $this->curlang->slug );\n\t\t$js = \"//<![CDATA[\n\t\te = document.getElementsByName( 's' );\n\t\tfor ( i = 0; i < e.length; i++ ) {\n\t\t\tif ( e[i].tagName.toUpperCase() == 'INPUT' ) {\n\t\t\t\ts = e[i].parentNode.parentNode.children;\n\t\t\t\tl = 0;\n\t\t\t\tfor ( j = 0; j < s.length; j++ ) {\n\t\t\t\t\tif ( s[j].name == 'lang' ) {\n\t\t\t\t\t\tl = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( l == 0 ) {\n\t\t\t\t\tvar ih = document.createElement( 'input' );\n\t\t\t\t\tih.type = 'hidden';\n\t\t\t\t\tih.name = 'lang';\n\t\t\t\t\tih.value = '$lang';\n\t\t\t\t\te[i].parentNode.appendChild( ih );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//]]>\";\n\t\techo '<script type=\"text/javascript\">' . $js . '</script>'; // phpcs:ignore WordPress.Security.EscapeOutput\n\t}",
"function wp_kses_js_entities($content)\n {\n }",
"function use_codepress()\n {\n }",
"public function admin_js() {\n\t\t\t$js = parent::admin_js();\n\t\t\t$js .= '\n\t\t\t\tcfct_builder.addModuleLoadCallback(\"'.$this->id_base.'\", function() {\n\t\t\t\t\t$(\"input[name='.$this->get_field_name('hero_alignment').']\").click(function() {\n\t\t\t\t\t\t$(\"#'.$this->id_base.'-selected-alignment\").html($(this).val().replace(\"-\", \"/\"));\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t';\n\t\t\treturn $js;\n\t\t}",
"function material_press_javascript_detection() {\n \techo \"<script>(function(html){html.className = html.className.replace(/\\bno-js\\b/,'js' )})(document.documentElement);</script>\\n\";\n }",
"function add_ordin_widget_scripts() {\n if( ! apply_filters( 'add_ordin_widget_scripts', true, $this->id_base ) )\n return;\n ?>\n <script>\n jQuery(document).ready(function( $ ) {\n\n });\n </script>\n <?php\n }",
"protected function initJavascriptCode() {}",
"private function dd_content_inline_js() {\n global $COURSE, $CFG;\n \n echo \"<script>\";\n echo \"dd_content_php['orientation'] = '\".$this->get_menu_oritentation().\"';\";\n echo \"</script>\";\n }",
"function draw_javascript_block(){\r\n\r\n\t\t// sort order\r\n\t\t$out_sort_order='var arr_sort_order= new Array();';\r\n\r\n\t\tfor($i=0; $i<strlen($this->sort_order); $i++){\r\n\t\t\tif($i==strlen($this->sort_order)-1)\r\n\t\t\t\t$out_sort_order.='arr_sort_order[\"'.$this->sort_order[$i].'\"]=\"'.$this->sort_order[0].'\";';\r\n\t\t\telse\r\n\t\t\t\t$out_sort_order.='arr_sort_order[\"'.$this->sort_order[$i].'\"]=\"'.$this->sort_order[$i+1].'\";';\r\n\t\t}\r\n\r\n\t\tif(strpos($this->sort_order,'t')===false)\r\n\t\t\t$out_sort_order.='arr_sort_order[\"t\"]=\"\";';\r\n\r\n\t\t$out_sort_order.='arr_sort_order[\"first\"]=\"'.$this->sort_order[0].'\";';\r\n\r\n\t\t$out='<script type=\"text/javascript\">'.$out_sort_order.'var extra_cols ='.json_encode($this->extra_cols).';';\r\n\r\n\t\tif($this->search=='')\r\n\t\t\t$out.='jQuery(document).ready(function(){ jQuery(\"#'.$this->id.'_search_value\").css(\"opacity\",\"1\"); });';\r\n\r\n\t\t$out.='</script>';\r\n\r\n\t\treturn $out;\r\n\t}",
"public function insert_js_code() {\n echo \"\\n<script>\\n\" . $this->getJsCodeToEcho($this->pluginCommon->optGid(), array(\n 'log' => $this->pluginCommon->optUseLogging(),\n 'localserver' => $this->isIgnoredServer(),\n )) . '</script>' . \"\\n\";\n }",
"function fresh_text_add_js()\n\t{\n\t\techo '<script>';\n\t\techo require_once 'replacement.php';\n\t\techo '</script>';\n\t}",
"public function addMenuItemsJavascript()\n {\n ?>\n <script>\n window.tinymce_submenus = window.tinymce_submenus || [];\n window.tinymce_submenus.push({\n id: '<?php echo $this->id ?>',\n label: '<?php echo $this->label ?>',\n items: '<?php echo str_replace(\"'\", \"\\\\'\", json_encode($this->items)) ?>'\n });\n </script>\n <?php\n }",
"function do_ajax_edit_impr_text($textid, $wordlc) \n{\n chdir('..');\n\n list($html_content, $js_content) = make_form($textid, $wordlc);\n if ($wordlc == '') {\n echo \"$('#editimprtextdata').html(\" . prepare_textdata_js($html_content) . \");\"; \n } else {\n echo $js_content; \n }\n}",
"public static function editor_js()\n {\n }",
"function the_javascript_html() {\n\t\techo wp_kses(\n\t\t\t$this->javascript_html(),\n\t\t\t$this->javascript_allowed_html()\n\t\t);\n\t}",
"function cmdeals_meta_scripts() {\n\t?>\n\t<script type=\"text/javascript\">\n\t\tjQuery(function(){\n\t\t\t<?php do_action('cmdeals_deals_write_panel_js'); ?>\n\t\t});\n\t</script>\n\t<?php\n}",
"function pre_word() {\r\n\t\t//$this->code = preg_replace('/<ins\\s/is', '<ins stripme=\"y\" ', $this->code);\r\n\t\t//$this->code = str_replace('<span class=msoIns>', '<span stripme=\"y\">', $this->code);\r\n\t\tReTidy::non_DOM_deleteme('<style[^>]*? id=\"dynCom\"[^>]*?>');\r\n\t\tReTidy::non_DOM_deleteme('<script language=\"JavaScript\">');\r\n\t\tReTidy::non_DOM_stripme('<ins\\s[^>]*?>');\r\n\t\tReTidy::non_DOM_stripme('<span\\s+class=msoIns>');\r\n\t\tReTidy::non_DOM_stripme('<span\\s+class=msoDel>');\r\n\t\t$this->code = preg_replace('/<del\\s/is', '<del deleteme=\"y\" ', $this->code);\r\n\t\t$this->code = preg_replace('/<div([^<>]*?) class=msocomtxt/is', '<div$1 deleteme=\"y\" ', $this->code);\r\n\t\t$this->code = preg_replace('/<span([^<>]*?)class=MsoCommentReference>/is', '<span$1 deleteme=\"y\">', $this->code);\r\n\t\t$this->code = preg_replace('/<span([^<>]*?)style=\\'[^\\']*?display\\s*:\\s*none[^\\']*?\\'/is', '<span$1 deleteme=\"y\" ', $this->code);\r\n\t\t$this->code = preg_replace('/<span([^<>]*?)style=\"[^\"]*?display\\s*:\\s*none[^\"]*?\\\"/is', '<span$1 deleteme=\"y\" ', $this->code);\r\n\t\t\r\n\t\t$this->code = preg_replace('/<(w:\\w+)[^<>]*?>(.*?)<\\/\\1>/is', '$2', $this->code); // will cause problems if there are nested tags with w: namespace\r\n\t\t\r\n\t//\t// microsoft classes to delete\r\n\t//\t$arrayMicrosoftClassesToDelete = array(\r\n\t//\t'msoIns',\r\n\t//\t'msoDel',\r\n\t//\t);\r\n\t//\tforeach($arrayMicrosoftClassesToDelete as $microsoftClass) {\r\n\t//\t\twhile(true) {\r\n\t//\t\t\t$this->code = preg_replace('/class=\"([^\"]*)' . ReTidy::preg_escape($microsoftClass) . '([^\"]*)\"/is', 'class=\"$1$2\"', $this->code, -1, $countA);\r\n\t//\t\t\t$this->code = str_replace(' class=' . ReTidy::preg_escape($microsoftClass), '', $this->code, $countB);\r\n\t//\t\t\tif($countA === 0 && $countB === 0) {\r\n\t//\t\t\t\tbreak;\r\n\t//\t\t\t}\t\t\t\t\r\n\t//\t\t}\r\n\t//\t}\r\n\t\t\r\n\t\t//$this->code = preg_replace('/\\n/', 'XXX\\n', $this->code);\r\n\t\t\r\n\t\t//<tr style='page-break-inside:avoid;height:11.25pt'> \r\n\t\t// <span lang=FR-CA style='font-size:9.0pt;font-family:\"Times New Roman\"; \r\n\t\t// color:black;layout-grid-mode:line'> \r\n\t\t// <td style='height:11.25pt;border:none' width=0 height=15></td> \r\n\t\t// </span> \r\n\t\t// </tr> \r\n\r\n\t\t// does this do anything?!?\r\n\t\t\r\n\t\t$this->code = str_replace('\r\n', ' \r\n', $this->code);\t\t\r\n\t}",
"public function set_quicktags() {\n\n if (!wp_script_is('quicktags')) {\n return;\n }\n $post_type = get_post_type();\n\n echo '<script type=\"text/javascript\">';\n echo 'document.addEventListener(\"DOMContentLoaded\", function() {';\n foreach ($this->options['quicktags'] as $button_id => $button) {\n if (in_array('any', $button['post_type']) || in_array($post_type, $button['post_type'])) {\n $item_id = \"wputinymce_\" . $button_id;\n $callback_item = 'callback__' . $item_id;\n $button['html'] = str_replace(\"\\n\", '\\n', $button['html']);\n echo 'function ' . $callback_item . '(b,el){wputinymce_insertAtCursor(el,wputinymce_filter_vars(\"' . addslashes($button['html']) . '\"));};';\n echo \"QTags.addButton( '\" . $item_id . \"', '\" . addslashes($button['title']) . \"', \" . $callback_item . \", '', '', '\" . addslashes($button['title']) . \"', 200 );\\n\";\n }\n }\n echo '});';\n echo '</script>';\n }",
"public function insert_inline_scripts() {\n }"
] |
[
"0.6281131",
"0.6109158",
"0.6041839",
"0.6039743",
"0.59804887",
"0.5932588",
"0.58633494",
"0.580877",
"0.5758072",
"0.5740585",
"0.56830454",
"0.56218284",
"0.5593001",
"0.55764115",
"0.55671966",
"0.5549277",
"0.5522155",
"0.55052006",
"0.5497883",
"0.5444046",
"0.5440364",
"0.54074514",
"0.5405382",
"0.53998274",
"0.5358558",
"0.53460276",
"0.5342261",
"0.5340137",
"0.5338135",
"0.53256357"
] |
0.657783
|
0
|
Action for modal popup values for edit lookup options
|
public function actionEditlookupoptions() {
if (\Yii::$app->SessionCheck->isLogged () == true) // checking logged session
{
$model_codemaster = new TblAcaCodeMaster (); // initialising models
$model_lookupoptions_modal = new TblAcaLookupOptions ();
$post = \Yii::$app->request->post ();
if (! empty ( $post )) { // getting the values through post
$id = $post ['id'];
$model_lookupoptions = TblAcaLookupOptions::editlookupoptionsalldetails ( $id ); // Retriving Lookupoptions details for particular id
$lookup_id = $model_lookupoptions->lookup_id; // assigning values to model
$code_id = $model_lookupoptions->code_id;
$lookup_value = $model_lookupoptions->lookup_value;
$lookup_element = $model_lookupoptions ['code']->lookup_code;
$arrEditvalues = array (
"lookup_value" => $lookup_value, // preparing array to send in response for ajax
"lookup_element" => $lookup_element,
"lookup_id" => $lookup_id,
"code_id" => $code_id
);
echo json_encode ( $arrEditvalues ); // sending as a object
}
} else {
\Yii::$app->SessionCheck->adminlogout (); // Redirecting to home page if session destroyed
return $this->goHome ();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function actionLookupoptions() {\n\t\t\\Yii::$app->view->title = 'ACA Reporting Service | Lookup Options';\n\t\t$this->layout = 'main';\n\t\t$session = \\Yii::$app->session;\n\t\t$admin_permissions = $session ['admin_permissions'];\n\t\tif (\\Yii::$app->SessionCheck->isLogged () == true && in_array(\"7\", $admin_permissions)) \t\t// checking logged session\n\t\t{\n\t\t/*\tif(\\Yii::$app->Permission->CheckAdminactionpermission ( '7' ) == true)\n {*/\n\t\t\t$model_lookupoptions = TblAcaLookupOptions::lookupoptionsalldetails (); // Retriving Lookupoptions details\n\t\t\t$model_codemaster = new TblAcaCodeMaster (); // initialising model TblAcaCodeMaster\n\t\t\t$model_lookupoptions_modal = new TblAcaLookupOptions (); // initialising model TblAcaLookupOptions\n\t\t\t\n\t\t\t$this->layout = 'main'; // rendering the layout\n\t\t\treturn $this->render ( 'lookupoptions', [ // Rendering to index view\n\t\t\t\t\t'model' => $model_lookupoptions,\n\t\t\t\t\t'model_codemaster' => $model_codemaster,\n\t\t\t\t\t'model_lookupoptions_modal' => $model_lookupoptions_modal \n\t\t\t] );\n\t\t\t\n\t\t/*\t}else{\n\t\t\t\t\t\\Yii::$app->session->setFlash ( 'error', 'Permission denied' );\n\t\t\t\t\t\t\treturn $this->redirect ( array (\n\t\t\t\t\t\t\t\t\t'/admin' \n\t\t\t\t\t\t\t) ); \n\t\t\t\t }*/\n\t\t\t\t \n\t\t} else {\n\t\t\t\\Yii::$app->SessionCheck->adminlogout (); // Redirecting to home page if session destroyed\n\t\t\t\n\t\t\treturn $this->goHome ();\n\t\t}\n\t}",
"private function updateModal(){\n $pId = $_REQUEST['info'];\n\n $this->assign('partnerId', $pId);\n $this->assign('partner', $this->getPartnerById($pId));\n $this->display('partners/edit.tpl');\n }",
"public function _editAction() {\n\t\t\n\t\t$args = $this->getAllArguments ();\n\t\t\n\t\tif (array_key_exists ( 'cid', $args )) {\n\t\t\t$action_id = $args ['cid'] [0];\n\t\t} else {\n\t\t\t$action_id = @$args [3] ? @$args [3] : $args [1];\n\t\t}\n\t\t\n\t\t$field = $this->getModel ( 'field' );\n\t\t$field->getAllWhere ( 'form_id = \"' . ( int ) $this->_getFormId () . '\"' );\n\t\t\n\t\t$action = $this->getModel ( 'action' );\n\t\t$action->get ( ( int ) $action_id );\n\t\t\n\t\t$this->loadPluginModel ( 'actions' );\n\t\t\n\t\t$this->setView ( 'edit_action' );\n\t\n\t}",
"public function actionUpdatelookupoptions() {\n\t\tif (\\Yii::$app->SessionCheck->isLogged () == true) \t\t// checking logged session\n\t\t{\n\t\t\t\n\t\t\t$post = \\Yii::$app->request->post ();\n\t\t\tif (! empty ( $post )) { // checking the values\n\t\t\t\t$value_name = $post ['TblAcaLookupOptions'] ['lookup_value']; // assigining them to variables\n\t\t\t\t$lookup_id = $post ['lookupid'];\n\t\t\t\t$code_id = $post ['codeid'];\n\t\t\t\t\n\t\t\t\tif (! empty ( $code_id )) {\n\t\t\t\t\t\n\t\t\t\t\t$transaction = \\Yii::$app->db->beginTransaction (); // begining the transaction\n\t\t\t\t\ttry {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$model_lookup = TblAcaLookupOptions::lookupuniquedetails ( $lookup_id ); // Retriving Lookupoptions details for particular id\n\t\t\t\t\t\t$model_findoption = TblAcaLookupOptions::lookupfindoption ( $value_name ,$code_id );\n\t\t\t\t\t\tif ($value_name != $model_lookup->lookup_value) { // Checking for unique\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (! empty ( $model_findoption )) {\n\t\t\t\t\t\t\t\tthrow new Exception ( 'lookup value already exist.' ); // throw a exception\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$model_lookup->lookup_value = strip_tags ( $value_name ); // assiging the values to model\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$model_lookup->lookup_value = strip_tags ( $value_name ); // assiging the values to model\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($model_lookup->validate () && $model_lookup->save ()) \t\t\t\t\t\t// validating model and saving it(server side validation)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo 'success';\n\t\t\t\t\t\t\t$transaction->commit (); // commiting the transaction\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo 'fail';\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch ( Exception $e ) { // catching the exception\n\t\t\t\t\t\t\n\t\t\t\t\t\t$msg = $e->getMessage ();\n\t\t\t\t\t\t\\Yii::$app->session->setFlash ( 'error', $msg );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$transaction->rollback (); //if exception occurs transaction rollbacks\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn $this->redirect ( array (\n\t\t\t\t\t\t\t\t'/admin/masterdata/lookupoptions' // redirecting to main grid screen\n\t\t\t\t\t\t\t\t\t\t\t\t) );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\techo 'fail'; // sending response to ajax\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\techo 'fail'; // sending response to ajax\n\t\t\t}\n\t\t} else {\n\t\t\t\\Yii::$app->SessionCheck->adminlogout (); // Redirecting to home page if session destroyed\n\t\t\t\n\t\t\treturn $this->goHome ();\n\t\t}\n\t}",
"public function editAction() {}",
"public function showEdit()\n {\n\n }",
"public function editAction()\n {\n parent::editAction();\n $this->_fillMappingsArray();\n $this->_fillAvailableProperties();\n }",
"public function companyedit() {\r\n $company = $this->model->getCompany($_GET['id']);\r\n $contragentTypes = $this->model->getContragentTypes();\r\n\r\n return $this->view('company/companyedit', array('company' => $company, 'contragentType' => $contragentTypes));\r\n }",
"public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Gc_Service_OrderShow::getOrderShow(intval($id));\n\t\n\t\t//状态\n\t\t$this->assign('ordershow_status', $this->ordershow_status);\n\t\t\n\t\t//渠道\n\t\tlist(,$ordershow_channel) = Gc_Service_OrderChannel::getAllOrderChannel();\n\t\t$ordershow_channel = Common::resetKey($ordershow_channel, 'id');\n\t\t$this->assign('ordershow_channel', $ordershow_channel);\n\t\t\t\t\n\t\t$this->assign('info', $info);\n\t}",
"public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }",
"public function onEditField()\n {\n $name = post('code');\n $selection = FieldManager::findField($name);\n return $this->makePartial('update_field_form', ['selection' => $selection]);\n }",
"public function edit($id)\n {\n //see modal controller\n }",
"public function edit($id)\n {\n //see modal controller\n }",
"public function edit($id)\n {\n //see modal controller\n }",
"function edit(){\n\t\t$arr = $this->uri->uri_to_assoc(3);\n\t\t$data['arr'] = $arr['id'];\n\t\t\n\t\t/* membuat value */\n\t\t$this->user->setID($arr['id']);\n\n\t\t/* fungsi ambil data */\n\t\t$result = $this->user->ambil_data();\n\n\t\t/* data dropdown */\n\t\t$data['role'] = role_dropdown();\n\t\t$data['result'] = $result;\n\n\t\t/* load view */\n\t\t$this->template->write_view('edit', $data);\n\t}",
"function get_pop_update($key){\r\n\t\t$data['result']\t= $this->jadwal_dokter_model->get_Detail($key);\r\n\t\t$data['poli2']\t= $this->db->query('select * from mst_poly')->result();\r\n\t\t$this->load->view('jadwal_dokter/popup_update',$data);\r\n\t}",
"public function editAction()\r\n {\r\n }",
"public function viewpopupAction()\n {\n\t\tZend_Layout::getMvcInstance()->setLayoutPath(APPLICATION_PATH.\"/layouts/scripts/popup/\");\n\t\t$id = $this->getRequest()->getParam('id');\n\t\t$callval = $this->getRequest()->getParam('call');\n\t\tif($callval == 'ajaxcall')\n\t\t$this->_helper->layout->disableLayout();\n\t $objName = 'candidatedetails';\n\t\t\n\t\t$cand_model = new Default_Model_Candidatedetails();\t\n\t\t$candidateData = $cand_model->getcandidateData($id); \n\n\t\t$form = new Default_Form_Candidatedetails(); \n\t // $form->source->setAttrib(\"readonly\", \"true\");\n\t\t\n $form->source->setAttrib(\"disabled\", \"disabled\");\n\t\t$form->referal->setAttrib(\"disabled\", \"disabled\");\n\t\t$form->vendors->setAttrib(\"disabled\", \"disabled\");\n\t\t$form->referalwebsite->setAttrib(\"disabled\", \"disabled\");\n\t\t$form->emailid->setAttrib(\"disabled\", \"disabled\");\n\t\t$form->contact_number->setAttrib(\"disabled\", \"disabled\");\n\t\t$form->skillset->setAttrib(\"disabled\", \"disabled\"); \n\n $form->submit->setLabel('Update'); \n\t\t$form->source->setValue($candidateData['source']);\n\t\n\t\tif($candidateData['source']==\"Website\" )\n\t\t{\n\t\t\t$form->referalwebsite->setValue($candidateData['source_val']);\n\t\t}\n\t\tif($candidateData['source']==\"Referal\" )\n\t\t{\n\t\t\t$form->referal->setValue($candidateData['source_val']);\n\t\t}\n\t\t\tif($candidateData['source']==\"Vendor\" )\n\t\t{\n\t\t\t$vendorsmodel= new Default_Model_Vendors();\n\t\t\t$vendorsdataArr=$vendorsmodel->getVendorsList();\n\t\t\t$req_options = array();\n\t\t\tforeach($vendorsdataArr as $vendorsdata){\n\t\t\t\t$form->vendors->addMultiOption($vendorsdata['id'],utf8_encode($vendorsdata['name']));\n\t\t\t}\n\t\t\t\n\t\t\t$form->vendors->setValue($candidateData['source_val']);\n\t\t}\n\t\t$cdata = array();\n\t $cdata['selected_option'] = \"candidatedetails\"; \n\t\t$this->view->cdata = $cdata;\n $form->populate($candidateData);\t\t\n\t\t$this->view->id = $id;\n\t\t$this->view->data = $candidateData;\n\t\t$this->view->form = $form;\n\t\tif($this->getRequest()->getPost())\n\t\t {\n\t\t\t \n\t\t if($form->isValid($this->_request->getPost()))\n { \n\t\t\t$candidate_firstname = $this->_getParam('candidate_firstname',null);\n $candidate_lastname = $this->_getParam('candidate_lastname',null);\n $candidate_name = $candidate_firstname.' '.$candidate_lastname;\n\t\t\t\n\t\t\t$data =array(\n \t'candidate_firstname' => trim($candidate_firstname),\n\t\t\t\t\t'candidate_lastname' => trim($candidate_lastname),\n 'candidate_name' => trim($candidate_name),\n 'modifieddate' => gmdate(\"Y-m-d H:i:s\"),\n );\n\t\t\t\t\n\t\t\t$where = \"id = \".$id;\n\t\t\t$result = $cand_model->SaveorUpdateCandidateData($data, $where);\n\t\t\t if(isset($id))\n {\n\t\t\t\t\t$candData = $cand_model->getSelectedCandidatesDetails();\n }\n else $candData = array();\n $opt ='';\n if(count($candData)>0)\n {\n foreach($candData as $record)\n {\n\t\t\t\t\t\n \t$opt .= sapp_Global::selectOptionBuilder($record['id'], $record['candidate_name']);\n }\n }\n\t\t\t\t$this->view->candidateid = $id ;\n\t\t\t\t$this->view->candData = $opt; \n $this->view->eventact = 'updated';\n $close = 'close';\n $this->view->popup=$close;\n $this->view->controllername =$objName;\n\t\t\t\t$this->view->candidatename =trim($candidate_name);\n\t\t\t} \n\t\t\telse\n\t\t\t{\n\t\t\t\n $messages = $form->getMessages();\n foreach ($messages as $key => $val)\n {\n foreach($val as $key2 => $val2)\n {\n $msgarray[$key] = $val2;\n break;\n }\n }\n\t\t\t\t$this->view->msgarray = $msgarray;\n\t\t\n\t\t\t}\n\t\t }\n }",
"function lb_show_edit_page_action() {\n\tlb_show_templates(\n\t\tarray(\n\t\t\t'name' => 'edit',\n\t\t\t'this_cafe' => lb_get_this_cafe_from_cafe( $_GET['edit-id'] ),\n\t\t)\n\t);\n}",
"public function edit( )\r\n {\r\n //\r\n }",
"public function getEdit()\n\t{\n\t}",
"public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Browser_Service_Recsite::getRecsite(intval($id));\t\t\n\t\t$this->assign('info', $info);\n\t\t$this->assign('models', $this->models);\n\t\t$this->assign('types', $this->types);\n\t}",
"public function actionEdit()\n\t{\n\t\t$field = $this->_getFieldOrError($this->_input->filterSingle('field_id', XenForo_Input::STRING));\n\t\treturn $this->_getFieldAddEditResponse($field);\n\t}",
"public function actionEdit()\n {\n $model = new Curd();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirectAddon(['view', 'id' => $model->id]);\n } else {\n return $this->renderAddon('edit', [\n 'model' => $model,\n ]);\n }\n }",
"public function modifyView() {\n $this->object = $this->object->readObject($this->id);\n $uiObjectName = $this->type.'_Ui';\n $uiObject = new $uiObjectName($this->object);\n $values = array_merge($this->object->valuesArray(), $this->values);\n return $uiObject->renderForm(array_merge(\n array('values'=>$values,\n 'action'=>url($this->type.'/modify', true),\n 'class'=>'formAdmin formAdminModify'),\n array('submit'=>array('save'=>__('save'),\n 'saveCheck'=>__('saveCheck')))));\n }",
"function edit($actionValue) \n\t{\n // on the action being rendered\n $this->viewData['navigationPath'] = $this->getNavigationPath('users');\n $this->viewData['editrecord']=UserModel::Create()->SelectUser($actionValue);\n // Render the action with template\n $this->renderWithTemplate('users/edit', 'AdminPageBaseTemplate');\n }",
"public function dialogEditRegionAction()\n {\n $this->editRegionActionPrepare();\n return $this->render($this->findTemplatePath('dialog.html'), []);\n }",
"public function edit($id)\n {\n $department = Department::findOrFail($id);\n $this->department_id = $id;\n $this->name = $department->name;\n \n //$this->updateMode = true;\n $this->openModal(); \n }",
"public function modalContent() {\n\n $fields = array( __( 'Template Rule Settings', WPXDEFLECTOREXTENSIONTEMPLATE_TEXTDOMAIN ) => array() );\n $sKey = key( $fields );\n\n //------------------------------------------------------------------\n // GENERIC PARAM\n //------------------------------------------------------------------\n\n $helpContent = $this->helpContent( __( 'Choose the value of this generic param.', WPXDEFLECTOREXTENSIONTEMPLATE_TEXTDOMAIN ),\n __( 'Choose the value of this generic param. It is set only for process flowing, and it is not used anywhere in your WordPress environment.', WPXDEFLECTOREXTENSIONTEMPLATE_TEXTDOMAIN ) );\n\n $fields[$sKey][] = array(\n array(\n 'type' => WPDKUIControlType::CUSTOM,\n 'content' => $helpContent\n )\n );\n\n $fields[$sKey][] = array(\n array(\n 'type' => WPDKUIControlType::TEXT,\n 'name' => $this->_model->id() . '-generic-param',\n 'value' => $this->_model->genericParam(),\n 'label' => array(\n 'value' => __( 'Generic Param', WPXDEFLECTOREXTENSIONTEMPLATE_TEXTDOMAIN ),\n 'data' => array( 'placement' => 'right' )\n ),\n 'size' => 24,\n 'title' => __( 'Enter the value of this generic param. It is set only for process flowing, and it is not used anywhere in your WordPress environment.', WPXDEFLECTOREXTENSIONTEMPLATE_TEXTDOMAIN )\n )\n );\n\n $layout = new WPDKUIControlsLayout( $fields );\n\n // Build output buffer\n $outputBuffer = '<form name=\"' . $this->_model->id() . '-form\" method=\"POST\" action=\"\">' .\n $layout->html() .\n '</form>';\n\n return $outputBuffer;\n\n }",
"public function edit()\n\t{\n\t\t//\n\t}"
] |
[
"0.64466333",
"0.63645077",
"0.6300556",
"0.6224807",
"0.6210382",
"0.61806625",
"0.6156717",
"0.61417705",
"0.6055721",
"0.6030681",
"0.5950852",
"0.59486187",
"0.59486187",
"0.59486187",
"0.5940889",
"0.59233683",
"0.58972955",
"0.58919644",
"0.5890764",
"0.58903867",
"0.5882828",
"0.588137",
"0.5879609",
"0.5873289",
"0.58480906",
"0.58421934",
"0.58274186",
"0.58249414",
"0.5784359",
"0.5780629"
] |
0.7606385
|
0
|
Action for updating lookupoptions
|
public function actionUpdatelookupoptions() {
if (\Yii::$app->SessionCheck->isLogged () == true) // checking logged session
{
$post = \Yii::$app->request->post ();
if (! empty ( $post )) { // checking the values
$value_name = $post ['TblAcaLookupOptions'] ['lookup_value']; // assigining them to variables
$lookup_id = $post ['lookupid'];
$code_id = $post ['codeid'];
if (! empty ( $code_id )) {
$transaction = \Yii::$app->db->beginTransaction (); // begining the transaction
try {
$model_lookup = TblAcaLookupOptions::lookupuniquedetails ( $lookup_id ); // Retriving Lookupoptions details for particular id
$model_findoption = TblAcaLookupOptions::lookupfindoption ( $value_name ,$code_id );
if ($value_name != $model_lookup->lookup_value) { // Checking for unique
if (! empty ( $model_findoption )) {
throw new Exception ( 'lookup value already exist.' ); // throw a exception
} else {
$model_lookup->lookup_value = strip_tags ( $value_name ); // assiging the values to model
}
} else {
$model_lookup->lookup_value = strip_tags ( $value_name ); // assiging the values to model
}
if ($model_lookup->validate () && $model_lookup->save ()) // validating model and saving it(server side validation)
{
echo 'success';
$transaction->commit (); // commiting the transaction
} else {
echo 'fail';
}
} catch ( Exception $e ) { // catching the exception
$msg = $e->getMessage ();
\Yii::$app->session->setFlash ( 'error', $msg );
$transaction->rollback (); //if exception occurs transaction rollbacks
return $this->redirect ( array (
'/admin/masterdata/lookupoptions' // redirecting to main grid screen
) );
}
} else {
echo 'fail'; // sending response to ajax
}
} else {
echo 'fail'; // sending response to ajax
}
} else {
\Yii::$app->SessionCheck->adminlogout (); // Redirecting to home page if session destroyed
return $this->goHome ();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function actionEditlookupoptions() {\n\t\tif (\\Yii::$app->SessionCheck->isLogged () == true) \t\t// checking logged session\n\t\t{\n\t\t\t\n\t\t\t$model_codemaster = new TblAcaCodeMaster (); // initialising models\n\t\t\t$model_lookupoptions_modal = new TblAcaLookupOptions ();\n\t\t\t\n\t\t\t$post = \\Yii::$app->request->post ();\n\t\t\tif (! empty ( $post )) { // getting the values through post\n\t\t\t\t$id = $post ['id'];\n\t\t\t\t\n\t\t\t\t$model_lookupoptions = TblAcaLookupOptions::editlookupoptionsalldetails ( $id ); // Retriving Lookupoptions details for particular id\n\t\t\t\t\n\t\t\t\t$lookup_id = $model_lookupoptions->lookup_id; // assigning values to model\n\t\t\t\t$code_id = $model_lookupoptions->code_id;\n\t\t\t\t$lookup_value = $model_lookupoptions->lookup_value;\n\t\t\t\t$lookup_element = $model_lookupoptions ['code']->lookup_code;\n\t\t\t\t\n\t\t\t\t$arrEditvalues = array (\n\t\t\t\t\t\t\"lookup_value\" => $lookup_value, // preparing array to send in response for ajax\n\t\t\t\t\t\t\"lookup_element\" => $lookup_element,\n\t\t\t\t\t\t\"lookup_id\" => $lookup_id,\n\t\t\t\t\t\t\"code_id\" => $code_id \n\t\t\t\t);\n\t\t\t\t\n\t\t\t\techo json_encode ( $arrEditvalues ); // sending as a object\n\t\t\t}\n\t\t} else {\n\t\t\t\\Yii::$app->SessionCheck->adminlogout (); // Redirecting to home page if session destroyed\n\t\t\t\n\t\t\treturn $this->goHome ();\n\t\t}\n\t}",
"public function actionLookupoptions() {\n\t\t\\Yii::$app->view->title = 'ACA Reporting Service | Lookup Options';\n\t\t$this->layout = 'main';\n\t\t$session = \\Yii::$app->session;\n\t\t$admin_permissions = $session ['admin_permissions'];\n\t\tif (\\Yii::$app->SessionCheck->isLogged () == true && in_array(\"7\", $admin_permissions)) \t\t// checking logged session\n\t\t{\n\t\t/*\tif(\\Yii::$app->Permission->CheckAdminactionpermission ( '7' ) == true)\n {*/\n\t\t\t$model_lookupoptions = TblAcaLookupOptions::lookupoptionsalldetails (); // Retriving Lookupoptions details\n\t\t\t$model_codemaster = new TblAcaCodeMaster (); // initialising model TblAcaCodeMaster\n\t\t\t$model_lookupoptions_modal = new TblAcaLookupOptions (); // initialising model TblAcaLookupOptions\n\t\t\t\n\t\t\t$this->layout = 'main'; // rendering the layout\n\t\t\treturn $this->render ( 'lookupoptions', [ // Rendering to index view\n\t\t\t\t\t'model' => $model_lookupoptions,\n\t\t\t\t\t'model_codemaster' => $model_codemaster,\n\t\t\t\t\t'model_lookupoptions_modal' => $model_lookupoptions_modal \n\t\t\t] );\n\t\t\t\n\t\t/*\t}else{\n\t\t\t\t\t\\Yii::$app->session->setFlash ( 'error', 'Permission denied' );\n\t\t\t\t\t\t\treturn $this->redirect ( array (\n\t\t\t\t\t\t\t\t\t'/admin' \n\t\t\t\t\t\t\t) ); \n\t\t\t\t }*/\n\t\t\t\t \n\t\t} else {\n\t\t\t\\Yii::$app->SessionCheck->adminlogout (); // Redirecting to home page if session destroyed\n\t\t\t\n\t\t\treturn $this->goHome ();\n\t\t}\n\t}",
"public function actionAddlookupoptions() {\n\t\t// rendering the main layout\n\t\t$this->layout = 'main';\n\t\t\n\t\tif (\\Yii::$app->SessionCheck->isLogged () == true) \t\t// checking logged session\n\t\t{\n\t\t\t\n\t\t\t$lookup_options = \\Yii::$app->request->post ();\n\t\t\t\n\t\t\t\n\t\t\t$model_lookupoptions = new TblAcaLookupOptions (); //initialising the model\n\t\t\t\n\t\t\t\n\t\t\t$session = \\Yii::$app->session; // collecting variables from session\n\t\t\t$user_id = $session ['admin_user_id'];\n\t\t\t\n\t\t\t// begining the transaction\n\t\t\t$transaction = \\Yii::$app->db->beginTransaction (); // begining the transaction\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tif ($model_lookupoptions->load ( \\Yii::$app->request->post () )) {\n\t\t\t\t\t\n\t\t\t\t\t$lookup_options = \\Yii::$app->request->post (); // putting the post values in a variable\n\t\t\t\t\t$code_id = $lookup_options ['TblAcaLookupOptions'] ['code_id'];\n\t\t\t\t\t$optionString = $lookup_options ['TblAcaLookupOptions'] ['lookup_value'];\n\t\t\t\t\t$arrOptions = explode ( ',', $optionString ); // making string to array\n\t\t\t\t\t\n\t\t\t\t\t$x = 0;\n\t\t\t\t\t$erroroptions = '';\n\t\t\t\t\tforeach ( $arrOptions as $key => $value ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$model_findoption = TblAcaLookupOptions::lookupfindoption ( $value , $code_id); // checking for unique\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (! empty ( $model_findoption )) {\n\t\t\t\t\t\t\tthrow new Exception ( 'Lookup option already exists.' ); // if duplicate entry throws a exception\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// assigning values to model\n\t\t\t\t\t\t\t$model_lookupoptions->lookup_value = $value;\n\t\t\t\t\t\t\t$model_lookupoptions->code_id = $code_id;\n\t\t\t\t\t\t\t$model_lookupoptions->lookup_status = 1;\n\t\t\t\t\t\t\t$model_lookupoptions->created_by = $user_id;\n\t\t\t\t\t\t\t$model_lookupoptions->created_date = date ( 'Y-m-d H:i:s' );\n\t\t\t\t\t\t\t$model_lookupoptions->modified_date = date ( 'Y-m-d H:i:s' );\n\t\t\t\t\t\t\t$model_lookupoptions->lookup_id = NULL;\n\t\t\t\t\t\t\t$model_lookupoptions->isNewRecord = TRUE;\n\t\t\t\t\t\t\tif ($model_lookupoptions->validate () && $model_lookupoptions->save ()) { // validating and saving for each record\n\t\t\t\t\t\t\t\t$x ++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// validating the\n\t\t\t\t\tif ($x > 0) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$transaction->commit (); // commit the transaction\n\t\t\t\t\t\t\n\t\t\t\t\t\t\\Yii::$app->session->setFlash ( 'success', 'Lookup option added successfully' );\n\t\t\t\t\t\treturn $this->redirect ( array ( // redirecting with success message\n\t\t\t\t\t\t\t\t'/admin/masterdata/lookupoptions' \n\t\t\t\t\t\t) );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn $this->redirect ( array (\n\t\t\t\t\t\t\t\t'/admin/masterdata/lookupoptions' \n\t\t\t\t\t\t) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch ( Exception $e ) { // display error messages if exception occurs\n\t\t\t\t\n\t\t\t\t$msg = $e->getMessage ();\n\t\t\t\t\\Yii::$app->session->setFlash ( 'error', $msg );\n\t\t\t\t\n\t\t\t\t$transaction->rollback (); //if exception occurs transaction rollbacks\n\t\t\t\t\n\t\t\t\treturn $this->redirect ( array (\n\t\t\t\t\t\t'/admin/masterdata/lookupoptions' \n\t\t\t\t) );\n\t\t\t}\n\t\t\t\n\t\t\treturn $this->render ( 'lookupoptions', [ \n\t\t\t\t\t'$model_lookupoptions' => $model_lookupoptions \n\t\t\t] );\n\t\t} else {\n\t\t\t\\Yii::$app->SessionCheck->adminlogout (); // if session destroyed user gets logout\n\t\t\t\n\t\t\treturn $this->goHome ();\n\t\t}\n\t}",
"public function refreshActionLookups()\n {\n //\n }",
"public function actionEditSearchSettings()\n\t{\n\t\t$variables = array();\n\t\t$variables['specialties'] = craft()->apiHealthcare_specialties->getAll();\n\t\t$variables['title'] = 'Edit Specialty Search Options';\n\n\t\t$this->renderTemplate('apihealthcare/specialties/_editSearchSettings', $variables);\n\t}",
"public function options_update() {\n\t\tregister_setting( $this->plugin_name, $this->plugin_name, array($this, 'validate', 'default' => array( \"url_nerd_instance\" => \"\", \"category_weight\" => \"0.04\", \"entity_weight\" => \"0.7\" ) ) );\n\t}",
"public function actionDeletelookupoptions() {\n\t\tif (\\Yii::$app->SessionCheck->isLogged () == true) \t\t// checking logged session\n\t\t{\n\t\t\t$post = \\Yii::$app->request->post ();\n\t\t\t\n\t\t\tif (! empty ( $post ['id'] )) {\n\t\t\t\t\n\t\t\t\t$id = $post ['id'];\n\t\t\t\t\n\t\t\t\t$transaction = \\Yii::$app->db->beginTransaction (); // begining the transaction\n\t\t\t\ttry {\n\t\t\t\t\t$model = TblAcaLookupOptions::lookupuniquedetails ( $id ); // checking for particular id\n\t\t\t\t\tif (! empty ( $id )) {\n\t\t\t\t\t\t$modelfindsectionid = TblAcaLookupOptions::lookupfindsectionid ( $id ); // finding the usage of option\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (empty ( $modelfindsectionid )) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(TblAcaLookupOptions::findOne ( $id )->delete ()){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\techo 'success'; // sending response to ajax\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$transaction->commit (); // commit the transaction\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} // model query for deleting option\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} \n\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo 'fail'; // sending response to ajax\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch ( Exception $e ) { // catching the exception\n\t\t\t\t\t\n\t\t\t\t\t$msg = $e->getMessage ();\n\t\t\t\t\t\\Yii::$app->session->setFlash ( 'error', $msg );\n\t\t\t\t\t\n\t\t\t\t\t$transaction->rollback (); //if exception occurs transaction rollbacks\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t\\Yii::$app->SessionCheck->adminlogout (); // redirects if session expired\n\t\t\t\n\t\t\treturn $this->goHome ();\n\t\t}\n\t}",
"public function updateOptions(array $options);",
"public function lookups()\n {\n }",
"public function refreshNameLookups()\n {\n //\n }",
"public function editStateAccountLookup($lookup, $stateID) {\n\t\t// Build query, prep, and bind\n\t\t$sql = \"UPDATE states SET has_lookup = :lookup WHERE id = :stateID \";\n\t\t$statement = $this->PDODB->prepare($sql);\n\t\t$statement->bindValue(\":lookup\", $lookup);\n\t\t$statement->bindValue(\":stateID\", $stateID);\n\n\t\t// Execute the query\n\t\t$statement->execute();\n\t}",
"public function updateOptionsWithPost() {\n if (isset($_POST[$this->selectedProviderOptName])) {\n $selected = (string)$_POST[$this->selectedProviderOptName];\n $this->setSelectedProvider($selected);\n }\n if (isset($_POST[$this->updateUrlOverrideOptName])) {\n $url = (string)$_POST[$this->updateUrlOverrideOptName];\n $this->setUpdateUrlOverride($url);\n }\n }",
"public function editAction()\n {\n parent::editAction();\n $this->_fillMappingsArray();\n $this->_fillAvailableProperties();\n }",
"function SetupLookupFilters($fld) {\n\t\tglobal $gsLanguage;\n\t\tswitch ($fld->FldVar) {\n\t\t}\n\t}",
"public function maybe_update_api_urls_options_names() {\n $current_version = get_option( 'laterpay_version' );\n if ( version_compare( $current_version, '0.9.11', '<' ) ) {\n return;\n }\n\n $old_to_new_option_pair_array = array(\n 'laterpay_api_sandbox_url' => 'laterpay_sandbox_backend_api_url',\n 'laterpay_api_sandbox_web_url' => 'laterpay_sandbox_dialog_api_url',\n 'laterpay_api_live_url' => 'laterpay_live_backend_api_url',\n 'laterpay_api_live_web_url' => 'laterpay_live_dialog_api_url',\n );\n\n foreach ( $old_to_new_option_pair_array as $old_option_name => $new_option_name ) {\n $old_option_value = get_option( $old_option_name );\n\n if ( $old_option_value !== false ) {\n delete_option( $old_option_name );\n add_option( $new_option_name, $old_option_value );\n }\n }\n }",
"public function lookup($ids, $options = []);",
"public static function action_updated_option( $option ) {\n\t\tif ( ! function_exists( 'get_registered_settings' ) ) {\n\t\t\treturn;\n\t\t}\n\t\t$settings = get_registered_settings();\n\t\tif ( empty( $settings[ $option ] ) || empty( $settings[ $option ]['show_in_rest'] ) ) {\n\t\t\treturn;\n\t\t}\n\t\t$rest_name = ! empty( $settings[ $option ]['show_in_rest']['name'] ) ? $settings[ $option ]['show_in_rest']['name'] : $option;\n\t\tpantheon_wp_clear_edge_keys( array( 'rest-setting-' . $rest_name ) );\n\t}",
"public function testOptionsLookup() {\n $json = <<<'jsonend'\n{\n \"source\": \"static\",\n \"query\": \"queryobjectid\",\n \"parameters\": [\"objid.1\", \"objid.2\"],\n \"list\": [\n {\n \"value\": \"a value\",\n \"label\": \"label or language key\"\n }\n ]\n}\njsonend;\n $config = json_decode($json);\n $this->assertTrue(false != $config, 'JSON error!');\n $obj = new Population();\n $this->assertTrue($obj->configure($config, true));\n }",
"function wv_update_plugin_action_info($key, $value) {\n\n //first call all the options in database.\n $allRecord = get_option('plugin_key_actions');\n $allRecord[$key] = $value;\n //update the record.\n update_option('plugin_key_actions', $allRecord);\n }",
"public function lookup($lookup)\n {\n $results = $this->attributeRepository->getLookUpOptions($lookup, request()->input('query'));\n\n return response()->json($results);\n }",
"static function update_options($options){\n\t \tupdate_option('link_rewriter_options', $options);\n\t }",
"private function resolveOptionReferences()\n {\n $app = Bootstrap::getApplication();\n $resolver = $app['resolver'];\n $settings = $app['settings'];\n\n $options = [];\n if (isset($settings['references']['posts']['options'])) {\n $options = $settings['references']['posts']['options'];\n }\n\n // Ask any extensions to add option references via filter\n $options = apply_filters('wp-bootstrap_option_post_references', $options);\n\n if (is_array($options)) {\n foreach ($options as $value) {\n if (is_string($value)) {\n $this->optionPostReferenceNames[] = $value;\n } elseif (is_object($value)) {\n $arr = (array) $value;\n $key = key($arr);\n $this->optionPostReferenceNames[$key] = $arr[$key];\n } elseif (is_array($value)) {\n $key = key($value);\n $this->optionPostReferenceNames[$key] = $value[$key];\n }\n }\n }\n $resolver->resolveOptionReferences($this->optionPostReferenceNames, 'post');\n\n $options = [];\n if (isset($settings['references']['terms']['options'])) {\n $options = $settings['references']['terms']['options'];\n }\n // Ask any extensions to add option references via filter\n $options = apply_filters('wp-bootstrap_option_term_references', $options);\n\n if (is_array($options)) {\n foreach ($options as $value) {\n if (is_string($value)) {\n $this->optionTermReferenceNames[] = $value;\n } elseif (is_object($value)) {\n $arr = (array) $value;\n $key = key($arr);\n $this->optionTermReferenceNames[$key] = $arr[$key];\n } elseif (is_array($value)) {\n $key = key($value);\n $this->optionTermReferenceNames[$key] = $value[$key];\n }\n }\n }\n $resolver->resolveOptionReferences($this->optionTermReferenceNames, 'term');\n }",
"function SetupLookupFilters($fld) {\n\t\tglobal $grLanguage;\n\t\tswitch ($fld->FldVar) {\n\t\tcase \"x_MainGroup\":\n\t\t\t$fld->LookupFilters = array(\"d\" => \"DB\", \"f0\" => '`MainGroup` = {filter_value}', \"t0\" => \"200\", \"fn0\" => \"\", \"dlm\" => ewr_Encrypt($fld->FldDelimiter), \"af\" => json_encode($fld->AdvancedFilters));\n\t\t$sWhereWrk = \"\";\n\t\t$fld->LookupFilters += array(\n\t\t\t\"select\" => \"SELECT DISTINCT `MainGroup`, `MainGroup` AS `DispFld`, '' AS `DispFld2`, '' AS `DispFld3`, '' AS `DispFld4` FROM `t13_mutasi`\",\n\t\t\t\"where\" => $sWhereWrk,\n\t\t\t\"orderby\" => \"`MainGroup` ASC\"\n\t\t);\n\t\t$this->Lookup_Selecting($fld, $fld->LookupFilters[\"where\"]); // Call Lookup selecting\n\t\t$fld->LookupFilters[\"s\"] = ewr_BuildReportSql($fld->LookupFilters[\"select\"], $fld->LookupFilters[\"where\"], \"\", \"\", $fld->LookupFilters[\"orderby\"], \"\", \"\");\n\t\t\tbreak;\n\t\tcase \"x_SubGroup\":\n\t\t\t$fld->LookupFilters = array(\"d\" => \"DB\", \"f0\" => '`SubGroup` = {filter_value}', \"t0\" => \"200\", \"fn0\" => \"\", \"dlm\" => ewr_Encrypt($fld->FldDelimiter), \"f1\" => '`MainGroup` = {filter_value}', \"t1\" => \"200\", \"fn1\" => \"\", \"af\" => json_encode($fld->AdvancedFilters));\n\t\t$sWhereWrk = \"{filter}\";\n\t\t$fld->LookupFilters += array(\n\t\t\t\"select\" => \"SELECT DISTINCT `SubGroup`, `SubGroup` AS `DispFld`, '' AS `DispFld2`, '' AS `DispFld3`, '' AS `DispFld4` FROM `t13_mutasi`\",\n\t\t\t\"where\" => $sWhereWrk,\n\t\t\t\"orderby\" => \"`SubGroup` ASC\"\n\t\t);\n\t\t$this->Lookup_Selecting($fld, $fld->LookupFilters[\"where\"]); // Call Lookup selecting\n\t\t$fld->LookupFilters[\"s\"] = ewr_BuildReportSql($fld->LookupFilters[\"select\"], $fld->LookupFilters[\"where\"], \"\", \"\", $fld->LookupFilters[\"orderby\"], \"\", \"\");\n\t\t\tbreak;\n\t\tcase \"x_Article\":\n\t\t\t$fld->LookupFilters = array(\"d\" => \"DB\", \"f0\" => '`Article` = {filter_value}', \"t0\" => \"200\", \"fn0\" => \"\", \"dlm\" => ewr_Encrypt($fld->FldDelimiter), \"f1\" => '`MainGroup` = {filter_value}', \"t1\" => \"200\", \"fn1\" => \"\", \"f2\" => '`SubGroup` = {filter_value}', \"t2\" => \"200\", \"fn2\" => \"\", \"af\" => json_encode($fld->AdvancedFilters));\n\t\t$sWhereWrk = \"{filter}\";\n\t\t$fld->LookupFilters += array(\n\t\t\t\"select\" => \"SELECT DISTINCT `Article`, `Article` AS `DispFld`, '' AS `DispFld2`, '' AS `DispFld3`, '' AS `DispFld4` FROM `t13_mutasi`\",\n\t\t\t\"where\" => $sWhereWrk,\n\t\t\t\"orderby\" => \"`Article` ASC\"\n\t\t);\n\t\t$this->Lookup_Selecting($fld, $fld->LookupFilters[\"where\"]); // Call Lookup selecting\n\t\t$fld->LookupFilters[\"s\"] = ewr_BuildReportSql($fld->LookupFilters[\"select\"], $fld->LookupFilters[\"where\"], \"\", \"\", $fld->LookupFilters[\"orderby\"], \"\", \"\");\n\t\t\tbreak;\n\t\t}\n\t}",
"function updateOption($caption,$value,$type,$db) {\r\n//\t$res=mysql_query($sql,$db);\r\n\r\n}",
"function cjpopups_update_option($option_name, $option_value){\n\tglobal $wpdb;\n\t$options_table = cjpopups_item_info('options_table');\n\tif(is_array($option_value)){\n\t\t$option_value = serialize($option_value);\n\t}else{\n\t\t$option_value = $option_value;\n\t}\n\t$update_option_data = array(\n\t\t'option_name' => $option_name,\n\t\t'option_value' => $option_value,\n\t);\n\t$option_info = $wpdb->get_row(\"SELECT * FROM $options_table WHERE option_name = '{$option_name}'\");\n\tif(!is_null($option_info)){\n\t\tcjpopups_update($options_table, $update_option_data, 'option_id', $option_info->option_id);\n\t}\n}",
"function add_option_update_handler($option_group, $option_name, $sanitize_callback = '')\n {\n }",
"public function actionAddlookupname() {\n\t\t$this->layout = 'main';\n\t\t\n\t\tif (\\Yii::$app->SessionCheck->isLogged () == true) \t\t// checking logged session\n\t\t{\n\t\t\t$session = \\Yii::$app->session; // collecting variables from session\n\t\t\t$user_id = $session ['admin_user_id'];\n\t\t\t$lookup_options = \\Yii::$app->request->post ();\n\t\t\t\n\t\t\t$model_codemaster = new TblAcaCodeMaster ();\n\t\t\t\n\t\t\t$transaction = \\Yii::$app->db->beginTransaction (); // begining the transaction\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tif ($model_codemaster->load ( \\Yii::$app->request->post () )) {\n\t\t\t\t\t\n\t\t\t\t\t$lookup_name = \\Yii::$app->request->post ();\n\t\t\t\t\t\n\t\t\t\t\t$lookup_code = $lookup_name ['TblAcaCodeMaster'] ['lookup_code'];\n\t\t\t\t\t$model_findcode = TblAcaCodeMaster::codemasterfindcode ( $lookup_code );\n\t\t\t\t\t\n\t\t\t\t\tif (! empty ( $model_findcode )) \t\t\t\t\t// checking for unique lookup code\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new Exception ( 'Lookup name already exist.' ); // throws a exception\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$model_codemaster->attributes = $lookup_name ['TblAcaCodeMaster'];\n\t\t\t\t\t\t$model_codemaster->code_type = 1;\n\t\t\t\t\t\t$model_codemaster->created_by = $user_id;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ($model_codemaster->validate () && $model_codemaster->save ()) { // model validation happens\n\t\t\t\t\t\t\n\t\t\t\t\t\t$transaction->commit (); // commit the transaction\n\t\t\t\t\t\t\n\t\t\t\t\t\t\\Yii::$app->session->setFlash ( 'success', 'Lookup Name added successfully' );\n\t\t\t\t\t\treturn $this->redirect ( array ( // if added redirecting with success msg\n\t\t\t\t\t\t\t\t'/admin/masterdata/lookupoptions' \n\t\t\t\t\t\t) );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\\Yii::$app->session->setFlash ( 'error', 'lookup name cannot be added' );\n\t\t\t\t\t\treturn $this->redirect ( array ( // if not added redirecting with success msg\n\t\t\t\t\t\t\t\t'/admin/masterdata/lookupoptions' \n\t\t\t\t\t\t) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch ( Exception $e ) { // any exceptions catch throws error msg\n\t\t\t\t\n\t\t\t\t$msg = $e->getMessage ();\n\t\t\t\t\\Yii::$app->session->setFlash ( 'error', $msg );\n\t\t\t\t\n\t\t\t\t$transaction->rollback (); //if exception occurs transaction rollbacks\n\t\t\t\t\n\t\t\t\treturn $this->redirect ( array (\n\t\t\t\t\t\t'/admin/masterdata/lookupoptions' // any exception redirecting with error msg\n\t\t\t\t\t\t\t\t) );\n\t\t\t}\n\t\t\t\n\t\t\treturn $this->redirect ( array (\n\t\t\t\t\t'/admin/masterdata/lookupoptions' \n\t\t\t) );\n\t\t} else {\n\t\t\t\\Yii::$app->SessionCheck->adminlogout (); // Redirecting to login page if session destroyed\n\t\t\t\n\t\t\treturn $this->goHome ();\n\t\t}\n\t}",
"public function getLookupMode() {}",
"public function setLookupTable($lookupTable)\n\t{\n\t\t$this->lookupTable = $lookupTable;\n\t}",
"protected function setupUpdateOperation()\n {\n $plugin = $this->crud->getEntryWithLocale($this->crud->getCurrentEntryId());\n\n $fields = $plugin->options;\n\n CRUD::addField(['name' => 'fields', 'type' => 'hidden', 'value' => collect($fields)->implode('name', ',')]);\n\n foreach ($fields as $field) {\n CRUD::addField($field);\n }\n }"
] |
[
"0.68228805",
"0.6483781",
"0.63622063",
"0.62618136",
"0.56918234",
"0.5606685",
"0.5567346",
"0.55305225",
"0.54829234",
"0.5475695",
"0.54580873",
"0.5429872",
"0.53855777",
"0.5370419",
"0.5335826",
"0.5328852",
"0.5298619",
"0.5294152",
"0.52822113",
"0.5269174",
"0.5234885",
"0.52043813",
"0.51546",
"0.51525164",
"0.51511776",
"0.51426715",
"0.51401746",
"0.5125682",
"0.512318",
"0.50971097"
] |
0.7089911
|
0
|
Action for activate or deactivate lookup option
|
public function actionLookupstatusactivate() {
if (\Yii::$app->SessionCheck->isLogged () == true) // checking logged session
{
$post = \Yii::$app->request->post ();
if (! empty ( $post )) { // checking values
$id = $post ['id'];
$is_active = $post ['is_active'];
$transaction = \Yii::$app->db->beginTransaction (); // begining the transaction
try {
$model = TblAcaLookupOptions::lookupuniquedetails ( $id ); // checking for unique details
if ($is_active == 1) {
$model->lookup_status = 2;
} elseif ($is_active == 2) {
$model->lookup_status = 1;
}
if ($model->save () && $model->validate ()) // model saving and validating
{
echo 'success';
$transaction->commit (); // commit the transaction
} else {
echo 'fail'; // sending response to ajax
}
} catch ( Exception $e ) { // catching block for throwing exception
$msg = $e->getMessage ();
\Yii::$app->session->setFlash ( 'error', $msg );
$transaction->rollback (); //if exception occurs transaction rollbacks
}
} else {
echo 'fail'; // sending response to ajax
}
} else {
\Yii::$app->SessionCheck->adminlogout (); // user logout if session expires
return $this->goHome ();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function actionLookupoptions() {\n\t\t\\Yii::$app->view->title = 'ACA Reporting Service | Lookup Options';\n\t\t$this->layout = 'main';\n\t\t$session = \\Yii::$app->session;\n\t\t$admin_permissions = $session ['admin_permissions'];\n\t\tif (\\Yii::$app->SessionCheck->isLogged () == true && in_array(\"7\", $admin_permissions)) \t\t// checking logged session\n\t\t{\n\t\t/*\tif(\\Yii::$app->Permission->CheckAdminactionpermission ( '7' ) == true)\n {*/\n\t\t\t$model_lookupoptions = TblAcaLookupOptions::lookupoptionsalldetails (); // Retriving Lookupoptions details\n\t\t\t$model_codemaster = new TblAcaCodeMaster (); // initialising model TblAcaCodeMaster\n\t\t\t$model_lookupoptions_modal = new TblAcaLookupOptions (); // initialising model TblAcaLookupOptions\n\t\t\t\n\t\t\t$this->layout = 'main'; // rendering the layout\n\t\t\treturn $this->render ( 'lookupoptions', [ // Rendering to index view\n\t\t\t\t\t'model' => $model_lookupoptions,\n\t\t\t\t\t'model_codemaster' => $model_codemaster,\n\t\t\t\t\t'model_lookupoptions_modal' => $model_lookupoptions_modal \n\t\t\t] );\n\t\t\t\n\t\t/*\t}else{\n\t\t\t\t\t\\Yii::$app->session->setFlash ( 'error', 'Permission denied' );\n\t\t\t\t\t\t\treturn $this->redirect ( array (\n\t\t\t\t\t\t\t\t\t'/admin' \n\t\t\t\t\t\t\t) ); \n\t\t\t\t }*/\n\t\t\t\t \n\t\t} else {\n\t\t\t\\Yii::$app->SessionCheck->adminlogout (); // Redirecting to home page if session destroyed\n\t\t\t\n\t\t\treturn $this->goHome ();\n\t\t}\n\t}",
"public function actionUpdatelookupoptions() {\n\t\tif (\\Yii::$app->SessionCheck->isLogged () == true) \t\t// checking logged session\n\t\t{\n\t\t\t\n\t\t\t$post = \\Yii::$app->request->post ();\n\t\t\tif (! empty ( $post )) { // checking the values\n\t\t\t\t$value_name = $post ['TblAcaLookupOptions'] ['lookup_value']; // assigining them to variables\n\t\t\t\t$lookup_id = $post ['lookupid'];\n\t\t\t\t$code_id = $post ['codeid'];\n\t\t\t\t\n\t\t\t\tif (! empty ( $code_id )) {\n\t\t\t\t\t\n\t\t\t\t\t$transaction = \\Yii::$app->db->beginTransaction (); // begining the transaction\n\t\t\t\t\ttry {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$model_lookup = TblAcaLookupOptions::lookupuniquedetails ( $lookup_id ); // Retriving Lookupoptions details for particular id\n\t\t\t\t\t\t$model_findoption = TblAcaLookupOptions::lookupfindoption ( $value_name ,$code_id );\n\t\t\t\t\t\tif ($value_name != $model_lookup->lookup_value) { // Checking for unique\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (! empty ( $model_findoption )) {\n\t\t\t\t\t\t\t\tthrow new Exception ( 'lookup value already exist.' ); // throw a exception\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$model_lookup->lookup_value = strip_tags ( $value_name ); // assiging the values to model\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$model_lookup->lookup_value = strip_tags ( $value_name ); // assiging the values to model\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($model_lookup->validate () && $model_lookup->save ()) \t\t\t\t\t\t// validating model and saving it(server side validation)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo 'success';\n\t\t\t\t\t\t\t$transaction->commit (); // commiting the transaction\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo 'fail';\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch ( Exception $e ) { // catching the exception\n\t\t\t\t\t\t\n\t\t\t\t\t\t$msg = $e->getMessage ();\n\t\t\t\t\t\t\\Yii::$app->session->setFlash ( 'error', $msg );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$transaction->rollback (); //if exception occurs transaction rollbacks\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn $this->redirect ( array (\n\t\t\t\t\t\t\t\t'/admin/masterdata/lookupoptions' // redirecting to main grid screen\n\t\t\t\t\t\t\t\t\t\t\t\t) );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\techo 'fail'; // sending response to ajax\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\techo 'fail'; // sending response to ajax\n\t\t\t}\n\t\t} else {\n\t\t\t\\Yii::$app->SessionCheck->adminlogout (); // Redirecting to home page if session destroyed\n\t\t\t\n\t\t\treturn $this->goHome ();\n\t\t}\n\t}",
"public function getLookupMode() {}",
"public function actionEditlookupoptions() {\n\t\tif (\\Yii::$app->SessionCheck->isLogged () == true) \t\t// checking logged session\n\t\t{\n\t\t\t\n\t\t\t$model_codemaster = new TblAcaCodeMaster (); // initialising models\n\t\t\t$model_lookupoptions_modal = new TblAcaLookupOptions ();\n\t\t\t\n\t\t\t$post = \\Yii::$app->request->post ();\n\t\t\tif (! empty ( $post )) { // getting the values through post\n\t\t\t\t$id = $post ['id'];\n\t\t\t\t\n\t\t\t\t$model_lookupoptions = TblAcaLookupOptions::editlookupoptionsalldetails ( $id ); // Retriving Lookupoptions details for particular id\n\t\t\t\t\n\t\t\t\t$lookup_id = $model_lookupoptions->lookup_id; // assigning values to model\n\t\t\t\t$code_id = $model_lookupoptions->code_id;\n\t\t\t\t$lookup_value = $model_lookupoptions->lookup_value;\n\t\t\t\t$lookup_element = $model_lookupoptions ['code']->lookup_code;\n\t\t\t\t\n\t\t\t\t$arrEditvalues = array (\n\t\t\t\t\t\t\"lookup_value\" => $lookup_value, // preparing array to send in response for ajax\n\t\t\t\t\t\t\"lookup_element\" => $lookup_element,\n\t\t\t\t\t\t\"lookup_id\" => $lookup_id,\n\t\t\t\t\t\t\"code_id\" => $code_id \n\t\t\t\t);\n\t\t\t\t\n\t\t\t\techo json_encode ( $arrEditvalues ); // sending as a object\n\t\t\t}\n\t\t} else {\n\t\t\t\\Yii::$app->SessionCheck->adminlogout (); // Redirecting to home page if session destroyed\n\t\t\t\n\t\t\treturn $this->goHome ();\n\t\t}\n\t}",
"function cg_activate() {\n\tadd_option('cg-option_3', 'any_value');\n}",
"public function plugin_activate() {\r\n\t\tupdate_option( $this->options_name, $this->options);\r\n\t}",
"public function actionAddlookupoptions() {\n\t\t// rendering the main layout\n\t\t$this->layout = 'main';\n\t\t\n\t\tif (\\Yii::$app->SessionCheck->isLogged () == true) \t\t// checking logged session\n\t\t{\n\t\t\t\n\t\t\t$lookup_options = \\Yii::$app->request->post ();\n\t\t\t\n\t\t\t\n\t\t\t$model_lookupoptions = new TblAcaLookupOptions (); //initialising the model\n\t\t\t\n\t\t\t\n\t\t\t$session = \\Yii::$app->session; // collecting variables from session\n\t\t\t$user_id = $session ['admin_user_id'];\n\t\t\t\n\t\t\t// begining the transaction\n\t\t\t$transaction = \\Yii::$app->db->beginTransaction (); // begining the transaction\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tif ($model_lookupoptions->load ( \\Yii::$app->request->post () )) {\n\t\t\t\t\t\n\t\t\t\t\t$lookup_options = \\Yii::$app->request->post (); // putting the post values in a variable\n\t\t\t\t\t$code_id = $lookup_options ['TblAcaLookupOptions'] ['code_id'];\n\t\t\t\t\t$optionString = $lookup_options ['TblAcaLookupOptions'] ['lookup_value'];\n\t\t\t\t\t$arrOptions = explode ( ',', $optionString ); // making string to array\n\t\t\t\t\t\n\t\t\t\t\t$x = 0;\n\t\t\t\t\t$erroroptions = '';\n\t\t\t\t\tforeach ( $arrOptions as $key => $value ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$model_findoption = TblAcaLookupOptions::lookupfindoption ( $value , $code_id); // checking for unique\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (! empty ( $model_findoption )) {\n\t\t\t\t\t\t\tthrow new Exception ( 'Lookup option already exists.' ); // if duplicate entry throws a exception\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// assigning values to model\n\t\t\t\t\t\t\t$model_lookupoptions->lookup_value = $value;\n\t\t\t\t\t\t\t$model_lookupoptions->code_id = $code_id;\n\t\t\t\t\t\t\t$model_lookupoptions->lookup_status = 1;\n\t\t\t\t\t\t\t$model_lookupoptions->created_by = $user_id;\n\t\t\t\t\t\t\t$model_lookupoptions->created_date = date ( 'Y-m-d H:i:s' );\n\t\t\t\t\t\t\t$model_lookupoptions->modified_date = date ( 'Y-m-d H:i:s' );\n\t\t\t\t\t\t\t$model_lookupoptions->lookup_id = NULL;\n\t\t\t\t\t\t\t$model_lookupoptions->isNewRecord = TRUE;\n\t\t\t\t\t\t\tif ($model_lookupoptions->validate () && $model_lookupoptions->save ()) { // validating and saving for each record\n\t\t\t\t\t\t\t\t$x ++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// validating the\n\t\t\t\t\tif ($x > 0) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$transaction->commit (); // commit the transaction\n\t\t\t\t\t\t\n\t\t\t\t\t\t\\Yii::$app->session->setFlash ( 'success', 'Lookup option added successfully' );\n\t\t\t\t\t\treturn $this->redirect ( array ( // redirecting with success message\n\t\t\t\t\t\t\t\t'/admin/masterdata/lookupoptions' \n\t\t\t\t\t\t) );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn $this->redirect ( array (\n\t\t\t\t\t\t\t\t'/admin/masterdata/lookupoptions' \n\t\t\t\t\t\t) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch ( Exception $e ) { // display error messages if exception occurs\n\t\t\t\t\n\t\t\t\t$msg = $e->getMessage ();\n\t\t\t\t\\Yii::$app->session->setFlash ( 'error', $msg );\n\t\t\t\t\n\t\t\t\t$transaction->rollback (); //if exception occurs transaction rollbacks\n\t\t\t\t\n\t\t\t\treturn $this->redirect ( array (\n\t\t\t\t\t\t'/admin/masterdata/lookupoptions' \n\t\t\t\t) );\n\t\t\t}\n\t\t\t\n\t\t\treturn $this->render ( 'lookupoptions', [ \n\t\t\t\t\t'$model_lookupoptions' => $model_lookupoptions \n\t\t\t] );\n\t\t} else {\n\t\t\t\\Yii::$app->SessionCheck->adminlogout (); // if session destroyed user gets logout\n\t\t\t\n\t\t\treturn $this->goHome ();\n\t\t}\n\t}",
"public function editStateAccountLookup($lookup, $stateID) {\n\t\t// Build query, prep, and bind\n\t\t$sql = \"UPDATE states SET has_lookup = :lookup WHERE id = :stateID \";\n\t\t$statement = $this->PDODB->prepare($sql);\n\t\t$statement->bindValue(\":lookup\", $lookup);\n\t\t$statement->bindValue(\":stateID\", $stateID);\n\n\t\t// Execute the query\n\t\t$statement->execute();\n\t}",
"public static function activate ()\n\t{\n\t\t// Create or update options\n\t\tself::generate_options ();\n\t}",
"function activate() {\n\t\t\tadd_option('h2utp_options', json_encode($this->options));\n\t\t}",
"public function deactivateAction()\n {\n $this->deactivateParameters = $this->deactivateParameters + $this->_deactivateExtraParameters;\n\n parent::deactivateAction();\n }",
"function scl_activate()\n{\n //\n}",
"public function refreshActionLookups()\n {\n //\n }",
"public function actionDeletelookupoptions() {\n\t\tif (\\Yii::$app->SessionCheck->isLogged () == true) \t\t// checking logged session\n\t\t{\n\t\t\t$post = \\Yii::$app->request->post ();\n\t\t\t\n\t\t\tif (! empty ( $post ['id'] )) {\n\t\t\t\t\n\t\t\t\t$id = $post ['id'];\n\t\t\t\t\n\t\t\t\t$transaction = \\Yii::$app->db->beginTransaction (); // begining the transaction\n\t\t\t\ttry {\n\t\t\t\t\t$model = TblAcaLookupOptions::lookupuniquedetails ( $id ); // checking for particular id\n\t\t\t\t\tif (! empty ( $id )) {\n\t\t\t\t\t\t$modelfindsectionid = TblAcaLookupOptions::lookupfindsectionid ( $id ); // finding the usage of option\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (empty ( $modelfindsectionid )) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(TblAcaLookupOptions::findOne ( $id )->delete ()){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\techo 'success'; // sending response to ajax\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$transaction->commit (); // commit the transaction\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} // model query for deleting option\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} \n\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo 'fail'; // sending response to ajax\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch ( Exception $e ) { // catching the exception\n\t\t\t\t\t\n\t\t\t\t\t$msg = $e->getMessage ();\n\t\t\t\t\t\\Yii::$app->session->setFlash ( 'error', $msg );\n\t\t\t\t\t\n\t\t\t\t\t$transaction->rollback (); //if exception occurs transaction rollbacks\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t\\Yii::$app->SessionCheck->adminlogout (); // redirects if session expired\n\t\t\t\n\t\t\treturn $this->goHome ();\n\t\t}\n\t}",
"static function onActivate() {\n $options = get_option(self::$optionsKey);\n if (!is_null($options)) {\n // write default options into database\n $options = array();\n $options['allowedTags'] = self::$allowedTags;\n $options['remoteStoreUrl'] = self::$remoteStoreUrl;\n $options['rteWebpackage'] = self::$rteWebpackage;\n add_option(self::$optionsKey, $options);\n }\n }",
"public function lookup($lookup)\n {\n $results = $this->attributeRepository->getLookUpOptions($lookup, request()->input('query'));\n\n return response()->json($results);\n }",
"public function actionExpert_index() {\n $res = ServiceRegion::model()->getCityList();\n $option = '<option value=\"' . QG_BRANCH_ID . '\">全国</option>';\n foreach ($res as $val) {\n $option .= '<option value=\"' . $val['region_id'] . '\">' . $val['region_name'] . '</option>';\n }\n $this->render('expert_index', array('provice_option' => $option));\n }",
"public static function activate() {\n //delete_option( 'ptb_plugin_options' );\n }",
"function deactivate(){\n\n\t\t//update_option( WPC_OPTIONS, array() );\n\t\t//update_option( WPC_OPTIONS_COMMENTS, array() );\n\t\t//update_option( WPC_OPTIONS_LIKE_BUTTON, array() );\n\n\t}",
"function activate() {\r\r\n }",
"public function activate()\n {\n $this->find('css', '.filter-criteria-selector span.caret')->click();\n }",
"public function activate();",
"public function activate();",
"public function actionToggle()\n\t{\n\t\t$input = $this->filter([\n\t\t\t'default_group_id' => 'int',\n\t\t\t'default_group_id_original' => 'int'\n\t\t]);\n\t\tif ($input['default_group_id'] != $input['default_group_id_original'])\n\t\t{\n\t\t\tif($input['default_group_id']){\n\t\t\t\t$group = $this->assertNavigationGroupExists($input['default_group_id']);\n\t\t\t}\n\t\t\t$this->repository('XF:Option')->updateOptions(['rdanDefaultGroupId' => $input['default_group_id']]);\n\t\t}\n\n\t\treturn $this->redirect($this->buildLink('rdan-groups'));\n\t}",
"public function setup_selected() {\n\t}",
"function action() {\n $actions = Config::get('actionlist.settollbetweenlocations.function');\n $this->runFunc($actions);\n }",
"function activateCheck( $action_name ) {\n switch ( $action_name ) {\n case ONAPP_ACTIVATE_GETLIST:\n case ONAPP_ACTIVATE_SAVE:\n case ONAPP_ACTIVATE_DELETE:\n exit( 'Call to undefined method ' . __CLASS__ . '::' . $action_name . '()' );\n break;\n }\n }",
"public function activateCorrectMenuEntry()\n {\n $runtimeManager = $this->framework->getRuntimeManager();\n \n // Execute the pre search correct menu entry event.\n $runtimeManager->executeEvent('\\\\Zepi\\\\Web\\\\General\\\\Event\\\\MenuManager\\\\RegisterAdditionalMenuEntries');\n \n // Search the correct menu entry, if no menu entry is set\n if ($this->activeMenuEntry == null) {\n $menuEntry = $this->searchCorrectMenuEntry();\n \n if ($menuEntry !== false) {\n $this->activeMenuEntry = $menuEntry;\n }\n }\n \n // Execute the post search correct menu entry event\n $runtimeManager->executeEvent('\\\\Zepi\\\\Web\\\\General\\\\Event\\\\MenuManager\\\\PostSearchCorrectMenuEntry');\n\n // Activate the menu entry\n if ($this->activeMenuEntry !== null) {\n $this->activeMenuEntry->setActive(true);\n }\n }",
"function phorum_mod_google_maps_cc_menu_options_hook()\n{\n global $PHORUM;\n\n // Generate the required template data for the control panel menu button.\n if ($PHORUM[\"DATA\"][\"PROFILE\"][\"PANEL\"] == 'location')\n $PHORUM[\"DATA\"][\"LOCATION_PANEL_ACTIVE\"] = TRUE;\n $PHORUM[\"DATA\"][\"URL\"][\"CC_LOCATION\"] =\n phorum_get_url(PHORUM_CONTROLCENTER_URL, \"panel=location\");\n\n // Show the menu button.\n include phorum_get_template('google_maps::cc_menu_item');\n}",
"public function action() {\r\n parent::action();\r\n switch (SQ_Classes_Tools::getValue('action')) {\r\n case 'sq_settingsseo_option':\r\n SQ_Classes_Tools::setHeader('json');\r\n\r\n if (!current_user_can('manage_options')) {\r\n echo json_encode(array('error' => __(\"You don't have enough pemission to activate this feature\", _SQ_PLUGIN_NAME_)));\r\n exit();\r\n }\r\n\r\n $option = SQ_Classes_Tools::getValue('option');\r\n $value = (int)SQ_Classes_Tools::getValue('value');\r\n SQ_Classes_Tools::saveOptions($option, $value);\r\n\r\n echo json_encode(array('saved' => true));\r\n exit();\r\n case 'sq_settingsseo_update':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n if (!SQ_Classes_Tools::getIsset('sq_use')) {\r\n return;\r\n }\r\n SQ_Classes_Tools::saveOptions('sq_use', (int)SQ_Classes_Tools::getValue('sq_use'));\r\n SQ_Classes_Tools::saveOptions('sq_auto_title', (int)SQ_Classes_Tools::getValue('sq_auto_title'));\r\n SQ_Classes_Tools::saveOptions('sq_auto_description', (int)SQ_Classes_Tools::getValue('sq_auto_description'));\r\n SQ_Classes_Tools::saveOptions('sq_auto_keywords', (int)SQ_Classes_Tools::getValue('sq_auto_keywords'));\r\n SQ_Classes_Tools::saveOptions('sq_keywordtag', (int)SQ_Classes_Tools::getValue('sq_keywordtag'));\r\n\r\n SQ_Classes_Tools::saveOptions('sq_auto_canonical', (int)SQ_Classes_Tools::getValue('sq_auto_canonical'));\r\n SQ_Classes_Tools::saveOptions('sq_auto_noindex', (int)SQ_Classes_Tools::getValue('sq_auto_noindex'));\r\n\r\n SQ_Classes_Tools::saveOptions('sq_auto_amp', (int)SQ_Classes_Tools::getValue('sq_auto_amp'));\r\n\r\n SQ_Classes_Tools::saveOptions('sq_auto_meta', (int)SQ_Classes_Tools::getValue('sq_auto_meta'));\r\n SQ_Classes_Tools::saveOptions('sq_auto_favicon', (int)SQ_Classes_Tools::getValue('sq_auto_favicon'));\r\n\r\n ///////////////////////////////////////////\r\n /////////////////////////////SOCIAL OPTION\r\n SQ_Classes_Tools::saveOptions('sq_auto_facebook', (int)SQ_Classes_Tools::getValue('sq_auto_facebook'));\r\n SQ_Classes_Tools::saveOptions('sq_auto_twitter', (int)SQ_Classes_Tools::getValue('sq_auto_twitter'));\r\n SQ_Classes_Tools::saveOptions('sq_og_locale', SQ_Classes_Tools::getValue('sq_og_locale'));\r\n\r\n $socials = array_merge(SQ_Classes_Tools::getOption('socials'), SQ_Classes_Tools::getValue('sq_socials', array()));\r\n\r\n if (isset($socials['twitter_site'])) $socials['twitter_site'] = $this->model->checkTwitterAccount($socials['twitter_site']);\r\n if (isset($socials['twitter_site'])) $socials['twitter'] = $this->model->checkTwitterAccountName($socials['twitter_site']);\r\n if (isset($socials['facebook_site'])) $socials['facebook_site'] = $this->model->checkFacebookAccount($socials['facebook_site']);\r\n if (isset($socials['google_plus_url'])) $socials['google_plus_url'] = $this->model->checkGoogleAccount($socials['google_plus_url']);\r\n if (isset($socials['pinterest_url'])) $socials['pinterest_url'] = $this->model->checkPinterestAccount($socials['pinterest_url']);\r\n if (isset($socials['instagram_url'])) $socials['instagram_url'] = $this->model->checkInstagramAccount($socials['instagram_url']);\r\n if (isset($socials['linkedin_url'])) $socials['linkedin_url'] = $this->model->checkLinkeinAccount($socials['linkedin_url']);\r\n if (isset($socials['myspace_url'])) $socials['myspace_url'] = $this->model->checkMySpaceAccount($socials['myspace_url']);\r\n if (isset($socials['youtube_url'])) $socials['youtube_url'] = $this->model->checkYoutubeAccount($socials['youtube_url']);\r\n\r\n $fb_admins = SQ_Classes_Tools::getValue('sq_fb_admins', array());\r\n $socials['fb_admins'] = array();\r\n if (!empty($fb_admins)) {\r\n $fb_admins = array_unique($fb_admins);\r\n foreach ($fb_admins as $index => $value) {\r\n if (isset($value) && $value == '') {\r\n unset($socials['fb_admins'][$index]);\r\n } else {\r\n $socials['fb_admins'][$index]['id'] = $this->model->checkFavebookAdminCode($value);\r\n }\r\n }\r\n }\r\n\r\n //get the facebook app id for sharing\r\n if (SQ_Classes_Tools::getIsset('sq_fbadminapp')) $socials['fbadminapp'] = SQ_Classes_Tools::getValue('sq_fbadminapp');\r\n if (SQ_Classes_Tools::getIsset('twitter_card_type')) $socials['twitter_card_type'] = SQ_Classes_Tools::getValue('twitter_card_type');\r\n\r\n\r\n SQ_Classes_Tools::saveOptions(\"socials\", $socials);\r\n\r\n ///////////////////////////////////////////\r\n /////////////////////////////FIRST PAGE OPTIMIZATION\r\n if ($pageId = get_option('page_on_front')) {\r\n $sq_hash = md5($pageId);\r\n } elseif ($post_id = get_option('page_for_posts')) {\r\n $sq_hash = md5($pageId);\r\n } else {\r\n $sq_hash = md5('wp_homepage');\r\n }\r\n\r\n if ($sq_hash <> '') {\r\n $url = home_url();\r\n $sq = SQ_Classes_ObjController::getClass('SQ_Models_Frontend')->getSqSeo($sq_hash);\r\n\r\n $sq->doseo = 1;\r\n $sq->title = urldecode(SQ_Classes_Tools::getValue('sq_fp_title', false));\r\n $sq->description = urldecode(SQ_Classes_Tools::getValue('sq_fp_description', false));\r\n $sq->keywords = SQ_Classes_Tools::getValue('sq_fp_keywords', false);\r\n $sq->og_media = SQ_Classes_Tools::getValue('sq_fp_ogimage', false);\r\n\r\n $this->model->db_insert(\r\n $url,\r\n $sq_hash,\r\n (int)$pageId,\r\n maybe_serialize($sq->toArray()),\r\n gmdate('Y-m-d H:i:s')\r\n );\r\n }\r\n\r\n ///////////////////////////////////////////\r\n /////////////////////////////SITEMAP OPTION\r\n SQ_Classes_Tools::saveOptions('sq_auto_sitemap', (int)SQ_Classes_Tools::getValue('sq_auto_sitemap'));\r\n SQ_Classes_Tools::saveOptions('sq_auto_feed', (int)SQ_Classes_Tools::getValue('sq_auto_feed'));\r\n SQ_Classes_Tools::saveOptions('sq_sitemap_frequency', SQ_Classes_Tools::getValue('sq_sitemap_frequency'));\r\n SQ_Classes_Tools::saveOptions('sq_sitemap_ping', (int)SQ_Classes_Tools::getValue('sq_sitemap_ping'));\r\n SQ_Classes_Tools::saveOptions('sq_sitemap_perpage', (int)SQ_Classes_Tools::getValue('sq_sitemap_perpage'));\r\n\r\n\r\n foreach (SQ_Classes_Tools::$options['sq_sitemap'] as $key => $value) {\r\n if ($key == 'sitemap') {\r\n continue;\r\n }\r\n SQ_Classes_Tools::$options['sq_sitemap'][$key][1] = 0;\r\n if ($key == 'sitemap-product' && !$this->model->isEcommerce()) {\r\n SQ_Classes_Tools::$options['sq_sitemap'][$key][1] = 2;\r\n }\r\n }\r\n if (SQ_Classes_Tools::getIsset('sq_sitemap')) {\r\n foreach (SQ_Classes_Tools::getValue('sq_sitemap') as $key) {\r\n if (isset(SQ_Classes_Tools::$options['sq_sitemap'][$key][1])) {\r\n SQ_Classes_Tools::$options['sq_sitemap'][$key][1] = 1;\r\n }\r\n }\r\n }\r\n\r\n foreach (SQ_Classes_Tools::$options['sq_sitemap_show'] as $key => $value) {\r\n SQ_Classes_Tools::$options['sq_sitemap_show'][$key] = 0;\r\n }\r\n if (SQ_Classes_Tools::getIsset('sq_sitemap_show')) {\r\n foreach (SQ_Classes_Tools::getValue('sq_sitemap_show') as $key) {\r\n if (isset(SQ_Classes_Tools::$options['sq_sitemap_show'][$key])) {\r\n SQ_Classes_Tools::$options['sq_sitemap_show'][$key] = 1;\r\n }\r\n }\r\n }\r\n\r\n ///////////////////////////////////////////\r\n ///////SAVE THE CODE\r\n $codes = array_merge(SQ_Classes_Tools::getOption('codes'), SQ_Classes_Tools::getValue('sq_codes', array()));\r\n\r\n if (!empty($codes)) {\r\n //if (isset($codes['facebook_pixel'])) $codes['facebook_pixel'] = $codes['facebook_pixel'];\r\n if (isset($codes['google_analytics'])) $codes['google_analytics'] = $this->model->checkGoogleAnalyticsCode($codes['google_analytics']);\r\n if (isset($codes['pinterest_verify'])) $codes['pinterest_verify'] = $this->model->checkPinterestCode($codes['pinterest_verify']);\r\n if (isset($codes['google_wt'])) $codes['google_wt'] = $this->model->checkGoogleWTCode($codes['google_wt']);\r\n if (isset($codes['bing_wt'])) $codes['bing_wt'] = $this->model->checkBingWTCode($codes['bing_wt']);\r\n if (isset($codes['alexa_verify'])) $codes['alexa_verify'] = $this->model->checkBingWTCode($codes['alexa_verify']);\r\n\r\n SQ_Classes_Tools::saveOptions(\"codes\", $codes);\r\n }\r\n\r\n\r\n ///////////////////////////////////////////JSONLD\r\n SQ_Classes_Tools::saveOptions('sq_auto_jsonld', (int)SQ_Classes_Tools::getValue('sq_auto_jsonld'));\r\n if (SQ_Classes_Tools::getIsset('sq_jsonld_type') && isset(SQ_Classes_Tools::$options['sq_jsonld'][SQ_Classes_Tools::getValue('sq_jsonld_type')])) {\r\n\r\n foreach (SQ_Classes_Tools::$options['sq_jsonld'][SQ_Classes_Tools::getValue('sq_jsonld_type')] as $key => $value) {\r\n if (isset(SQ_Classes_Tools::$options['sq_jsonld'][SQ_Classes_Tools::getValue('sq_jsonld_type')][$key])) {\r\n SQ_Classes_Tools::$options['sq_jsonld'][SQ_Classes_Tools::getValue('sq_jsonld_type')][$key] = SQ_Classes_Tools::getValue('sq_jsonld_' . $key);\r\n }\r\n }\r\n if (isset(SQ_Classes_Tools::$options['sq_jsonld'][SQ_Classes_Tools::getValue('sq_jsonld_type')]['telephone']) &&\r\n SQ_Classes_Tools::$options['sq_jsonld'][SQ_Classes_Tools::getValue('sq_jsonld_type')]['telephone'] <> ''\r\n ) {\r\n SQ_Classes_Tools::$options['sq_jsonld'][SQ_Classes_Tools::getValue('sq_jsonld_type')]['telephone'] = '+' . SQ_Classes_Tools::$options['sq_jsonld'][SQ_Classes_Tools::getValue('sq_jsonld_type')]['telephone'];\r\n }\r\n }\r\n SQ_Classes_Tools::saveOptions('sq_jsonld_type', SQ_Classes_Tools::getValue('sq_jsonld_type'));\r\n\r\n ///////////////////////////////////////////\r\n /////////////////////////////FAVICON OPTION\r\n\r\n /* if there is an icon to upload */\r\n if (!empty($_FILES['favicon'])) {\r\n\r\n $return = $this->model->addFavicon($_FILES['favicon']);\r\n if ($return['favicon'] <> '') {\r\n SQ_Classes_Tools::saveOptions('favicon', strtolower(basename($return['favicon'])));\r\n }\r\n if ($return['message'] <> '') {\r\n define('SQ_MESSAGE_FAVICON', $return['message']);\r\n SQ_Classes_Error::setError(SQ_MESSAGE_FAVICON . \" <br /> \");\r\n }\r\n }\r\n\r\n //Save the api settings for tutorial\r\n SQ_Classes_Action::apiSaveSettings();\r\n\r\n if (SQ_Classes_Tools::isAjax()) {\r\n SQ_Classes_Tools::setHeader('json');\r\n echo json_encode(array('saved' => true));\r\n exit();\r\n } else {\r\n //Update the rewrite rules with the new options\r\n add_filter('rewrite_rules_array', array($this, 'rewrite_rules'), 999, 1);\r\n //Flush the rewrite with the new favicon and sitemap\r\n flush_rewrite_rules();\r\n //empty the cache on settings changed\r\n SQ_Classes_Tools::emptyCache();\r\n\r\n }\r\n break;\r\n case 'sq_setstickysla':\r\n SQ_Classes_Tools::saveUserMeta('sq_auto_sticky', (int)SQ_Classes_Tools::getValue('sq_auto_sticky'));\r\n\r\n break;\r\n case 'sq_checkissues':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n SQ_Classes_Tools::saveOptions('sq_checkedissues', 1);\r\n\r\n //Save the api settings for tutorial\r\n SQ_Classes_Action::apiSaveSettings();\r\n\r\n /* Load the error class */\r\n SQ_Classes_Tools::checkErrorSettings();\r\n\r\n break;\r\n case 'sq_fixautoseo':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n SQ_Classes_Tools::saveOptions('sq_use', 1);\r\n\r\n //Save the api settings for tutorial\r\n SQ_Classes_Action::apiSaveSettings();\r\n\r\n break;\r\n case 'sq_fixprivate':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n update_option('blog_public', 1);\r\n\r\n //Save the api settings for tutorial\r\n SQ_Classes_Action::apiSaveSettings();\r\n\r\n break;\r\n case 'sq_fixcomments':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n update_option('comments_notify', 1);\r\n\r\n //Save the api settings for tutorial\r\n SQ_Classes_Action::apiSaveSettings();\r\n\r\n break;\r\n case 'sq_fixpermalink':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n $GLOBALS['wp_rewrite'] = new WP_Rewrite();\r\n global $wp_rewrite;\r\n $permalink_structure = ((get_option('permalink_structure') <> '') ? get_option('permalink_structure') : '/') . \"%postname%/\";\r\n $wp_rewrite->set_permalink_structure($permalink_structure);\r\n $permalink_structure = get_option('permalink_structure');\r\n\r\n flush_rewrite_rules();\r\n break;\r\n case 'sq_fix_ogduplicate':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n SQ_Classes_Tools::saveOptions('sq_auto_facebook', 0);\r\n\r\n //Save the api settings for tutorial\r\n SQ_Classes_Action::apiSaveSettings();\r\n\r\n break;\r\n case 'sq_fix_tcduplicate':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n SQ_Classes_Tools::saveOptions('sq_auto_twitter', 0);\r\n\r\n //Save the api settings for tutorial\r\n SQ_Classes_Action::apiSaveSettings();\r\n\r\n break;\r\n case 'sq_fix_titleduplicate':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n SQ_Classes_Tools::saveOptions('sq_auto_title', 0);\r\n\r\n //Save the api settings for tutorial\r\n SQ_Classes_Action::apiSaveSettings();\r\n\r\n break;\r\n case 'sq_fix_descduplicate':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n SQ_Classes_Tools::saveOptions('sq_auto_description', 0);\r\n\r\n //Save the api settings for tutorial\r\n SQ_Classes_Action::apiSaveSettings();\r\n\r\n break;\r\n case 'sq_active_help' :\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n SQ_Classes_Tools::saveOptions('active_help', SQ_Classes_Tools::getValue('active_help'));\r\n break;\r\n case 'sq_warnings_off':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n SQ_Classes_Tools::saveOptions('ignore_warn', 1);\r\n break;\r\n case 'sq_copyright_agreement':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n SQ_Classes_Tools::saveOptions('sq_copyright_agreement', 1);\r\n break;\r\n case 'sq_get_snippet':\r\n\r\n if (SQ_Classes_Tools::getValue('url') <> '') {\r\n $url = SQ_Classes_Tools::getValue('url');\r\n } else {\r\n $url = get_bloginfo('url');\r\n }\r\n $snippet = SQ_Classes_Tools::getSnippet($url);\r\n\r\n SQ_Classes_Tools::setHeader('json');\r\n echo json_encode($snippet);\r\n exit();\r\n case 'sq_backup':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n SQ_Classes_Tools::setHeader('text');\r\n header(\"Content-Disposition: attachment; filename=squirrly-settings-\" . gmdate('Y-m-d') . \".txt\");\r\n\r\n if (function_exists('base64_encode')) {\r\n echo base64_encode(json_encode(SQ_Classes_Tools::$options));\r\n } else {\r\n echo json_encode(SQ_Classes_Tools::$options);\r\n }\r\n exit();\r\n break;\r\n case 'sq_restore':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n if (!empty($_FILES['sq_options']) && $_FILES['sq_options']['tmp_name'] <> '') {\r\n $fp = fopen($_FILES['sq_options']['tmp_name'], 'rb');\r\n $options = '';\r\n while (($line = fgets($fp)) !== false) {\r\n $options .= $line;\r\n }\r\n try {\r\n if (function_exists('base64_encode') && base64_decode($options) <> '') {\r\n $options = @base64_decode($options);\r\n }\r\n $options = json_decode($options, true);\r\n if (is_array($options) && isset($options['sq_api'])) {\r\n if (SQ_Classes_Tools::getOption('sq_api') <> '') {\r\n $options['sq_api'] = SQ_Classes_Tools::getOption('sq_api');\r\n }\r\n SQ_Classes_Tools::$options = $options;\r\n SQ_Classes_Tools::saveOptions();\r\n\r\n //Check if there is an old backup from Squirrly\r\n SQ_Classes_Tools::getOptions();\r\n SQ_Classes_Tools::checkUpgrade();\r\n\r\n //Update the rewrite rules with the new options\r\n add_filter('rewrite_rules_array', array($this, 'rewrite_rules'), 999, 1);\r\n //Flush the rewrite with the new favicon and sitemap\r\n flush_rewrite_rules();\r\n\r\n SQ_Classes_Error::setError(__('Great! The backup is restored.', _SQ_PLUGIN_NAME_) . \" <br /> \", 'success');\r\n } else {\r\n SQ_Classes_Error::setError(__('Error! The backup is not valid.', _SQ_PLUGIN_NAME_) . \" <br /> \");\r\n }\r\n } catch (Exception $e) {\r\n SQ_Classes_Error::setError(__('Error! The backup is not valid.', _SQ_PLUGIN_NAME_) . \" <br /> \");\r\n }\r\n } else {\r\n SQ_Classes_Error::setError(__('Error! You have to enter a previous saved backup file.', _SQ_PLUGIN_NAME_) . \" <br /> \");\r\n }\r\n break;\r\n case 'sq_backup_sql':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n header('Content-Type: application/octet-stream');\r\n header(\"Content-Transfer-Encoding: Binary\");\r\n header(\"Content-Disposition: attachment; filename=squirrly-seo-\" . gmdate('Y-m-d') . \".sql\");\r\n\r\n if (function_exists('base64_encode')) {\r\n echo base64_encode($this->model->createTableBackup());\r\n } else {\r\n echo $this->model->createTableBackup();\r\n }\r\n exit();\r\n break;\r\n case 'sq_restore_sql':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n if (!empty($_FILES['sq_sql']) && $_FILES['sq_sql']['tmp_name'] <> '') {\r\n $fp = fopen($_FILES['sq_sql']['tmp_name'], 'rb');\r\n $sql_file = '';\r\n while (($line = fgets($fp)) !== false) {\r\n $sql_file .= $line;\r\n }\r\n\r\n if (function_exists('base64_encode')) {\r\n $sql_file = @base64_decode($sql_file);\r\n }\r\n\r\n if ($sql_file <> '' && strpos($sql_file, 'CREATE TABLE IF NOT EXISTS') !== false) {\r\n try {\r\n $queries = explode(\";\\n\", $sql_file);\r\n $this->model->executeSql($queries);\r\n SQ_Classes_Error::setError(__('Great! The SEO backup is restored.', _SQ_PLUGIN_NAME_) . \" <br /> \", 'success');\r\n\r\n } catch (Exception $e) {\r\n SQ_Classes_Error::setError(__('Error! The backup is not valid.', _SQ_PLUGIN_NAME_) . \" <br /> \");\r\n }\r\n } else {\r\n SQ_Classes_Error::setError(__('Error! The backup is not valid.', _SQ_PLUGIN_NAME_) . \" <br /> \");\r\n }\r\n } else {\r\n SQ_Classes_Error::setError(__('Error! You have to enter a previous saved backup file.', _SQ_PLUGIN_NAME_) . \" <br /> \");\r\n }\r\n break;\r\n case 'sq_dataupgrade':\r\n //Check if there is an old backup from Squirrly\r\n SQ_Classes_Tools::getOptions();\r\n SQ_Classes_Tools::checkUpgrade();\r\n SQ_Classes_Error::setError(__('Great! Squirrly Data Settings is up to date now.', _SQ_PLUGIN_NAME_) . \" <br /> \", 'success');\r\n\r\n break;\r\n case 'sq_resetsettings':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n SQ_Classes_Tools::$options = SQ_Classes_Tools::getOptions('reset');\r\n SQ_Classes_Tools::saveOptions();\r\n break;\r\n }\r\n }"
] |
[
"0.62646776",
"0.5999946",
"0.5818195",
"0.5711468",
"0.5644257",
"0.56319475",
"0.5610675",
"0.55713356",
"0.54431903",
"0.53320426",
"0.53276163",
"0.52626",
"0.5255603",
"0.52339363",
"0.51996464",
"0.51819324",
"0.5101014",
"0.5099653",
"0.509736",
"0.50416535",
"0.5019242",
"0.5001906",
"0.5001906",
"0.49590877",
"0.49583334",
"0.4953586",
"0.49514323",
"0.4946456",
"0.4935386",
"0.4929124"
] |
0.6678272
|
0
|
Action for deletion of lookup option
|
public function actionDeletelookupoptions() {
if (\Yii::$app->SessionCheck->isLogged () == true) // checking logged session
{
$post = \Yii::$app->request->post ();
if (! empty ( $post ['id'] )) {
$id = $post ['id'];
$transaction = \Yii::$app->db->beginTransaction (); // begining the transaction
try {
$model = TblAcaLookupOptions::lookupuniquedetails ( $id ); // checking for particular id
if (! empty ( $id )) {
$modelfindsectionid = TblAcaLookupOptions::lookupfindsectionid ( $id ); // finding the usage of option
if (empty ( $modelfindsectionid )) {
if(TblAcaLookupOptions::findOne ( $id )->delete ()){
echo 'success'; // sending response to ajax
$transaction->commit (); // commit the transaction
} // model query for deleting option
}
else {
echo 'fail'; // sending response to ajax
}
}
} catch ( Exception $e ) { // catching the exception
$msg = $e->getMessage ();
\Yii::$app->session->setFlash ( 'error', $msg );
$transaction->rollback (); //if exception occurs transaction rollbacks
}
}
} else {
\Yii::$app->SessionCheck->adminlogout (); // redirects if session expired
return $this->goHome ();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function delete( $option );",
"function delete_option($option)\n {\n }",
"public function delete()\n {\n delete_option($this->optionName);\n }",
"public function drop ()\n {\n //delete the records of the lookup value\n $records = LookupValue::where('lookup_type_id', 1)->get();\n foreach ( $records as $record )\n $record->forceDelete();\n\n //delete the lookup definition itself\n $record = LookupType::find(1);\n $record->forceDelete();\n }",
"function driver_delete($keyword, $option = array());",
"function delete_site_option($option)\n {\n }",
"public function undeleteAction(){\n\t}",
"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}",
"function wpjsfsp_delete_option( $key = '' ) {\n\treturn \\WPJSFSP\\Options::delete( $key );\n}",
"public function actionRemove()\n {\n $delete_record = new DeleteRecord();\n $result = Yii::$app->request->post('selection');\n\n if (!$delete_record->isOkPermission(ACTION_DELETE)\n || !$delete_record->isOkSelection($result)\n ) {\n return $this->redirect([ACTION_INDEX]);\n }\n\n $nro_selections = sizeof($result);\n $status = [];\n for ($counter = 0; $counter < $nro_selections; $counter++) {\n try {\n $primary_key = $result[$counter];\n $model = Permission::findOne($primary_key);\n $item = $delete_record->remove($model, 0);\n $status[$item] .= $primary_key . ',';\n } catch (Exception $exception) {\n $bitacora = new Bitacora();\n $bitacora->registerAndFlash(\n $exception,\n 'actionRemove',\n MSG_ERROR\n );\n }\n }\n\n $delete_record->summaryDisplay($status);\n return $this->redirect([ACTION_INDEX]);\n }",
"public function delete()\n\t{\n\t\t$selection = $this->input->post('selection');\n\t\t$ignore = implode('|', array_diff($this->ignore_list, $selection));\n\t\t$this->member->ignore_list = $ignore;\n\t\t$this->member->save();\n\n\t\tee()->functions->redirect(ee('CP/URL')->make($this->index_url, $this->query_string));\n\t}",
"function delete_blog_option($id, $option)\n {\n }",
"function _delete_option_fresh_site()\n {\n }",
"function hello_world_remove() {\ndelete_option('ernaehrungsnews_anzahl');\ndelete_option('ernaehrungsnews_trimmer');\ndelete_option('ernaehrungsnews_kategorieId');\n\n}",
"public function delete()\n {\n return delete_option($this->hash);\n }",
"function delete_option($name)\n{\n $db = get_db();\n $sql = \"DELETE FROM {$db->Option} WHERE `name` = ?\";\n $db->query($sql, array($name));\n\n // Update the options cache.\n $bootstrap = Zend_Registry::get('bootstrap');\n $options = $bootstrap->getResource('Options');\n if (isset($options[$name])) {\n unset($options[$name]);\n }\n $bootstrap->getContainer()->options = $options;\n}",
"private function actionListDelete() {\n $put_vars = $this->actionListPutConvert();\n $this->loadModel($put_vars['id'])->delete();\n }",
"public function DELETE() {\n\t\t$this->scriptForceHint('DELETE');\n\t}",
"function delete_network_option($network_id, $option)\n {\n }",
"public function remove_option($option)\n {\n }",
"function delete(){\n global $wpdb;\n global $DOPBSP;\n \n $id = $_POST['id'];\n \n $select_option = $wpdb->get_row($wpdb->prepare('SELECT * FROM '.$DOPBSP->tables->forms_fields_options.' WHERE id=%d',\n $id));\n $wpdb->delete($DOPBSP->tables->forms_fields_options, array('id' => $id));\n \n echo $select_option->field_id;\n \n die();\n }",
"public function actionDelete() {}",
"public function actionDelete() {}",
"public function deleteAction() {\n\t\tif(!isset($this->params['cancel'])) {\n\n\t\t\t// XXX: Maybe do some hook call validation here?\n\n\t\t\t// auto call the hooks for this module/action\n\t\t\tAPI::callHooks(self::$module, $this->action, 'controller', $this);\n\n\t\t\t// delete an entry\n\t\t\t$host = $this->_model->delete();\n\t\t}\n\t\tAPI::redirect(API::printUrl($this->_redirect));\n\t}",
"public function removeOption($name);",
"function action_remove() {\n\t\t\t$data = UTIL::get_post('data');\n\t\t\t$id = (int)$data['rem_id'];\n\t\t\t$table = $data['rem_table'];\n\t\t\t\n\t\t\t$choosen = $this->SESS->get('objbrowser', 'choosen');\n\t\t\tunset($choosen[$table][$id]);\n\t\t\tif (count($choosen[$table]) == 0) unset($choosen[$table]);\n\t\t\t\n\t\t\t$this->SESS->set('objbrowser', 'choosen', $choosen);\n\t\t}",
"function alm_filters_deleted(){\n\t \tif(isset($_GET['delete_filter'])) {\n\t\t\t\t$deleted_filter = $_GET['delete_filter'];\n\t\t\t\t// Confirm option exists\n\t\t\t\t$is_delete = get_option(ALM_FILTERS_PREFIX .$_GET['delete_filter']);\n\t\t\t\tif(!empty($is_delete)){\n\t\t\t\t\tdelete_option(ALM_FILTERS_PREFIX .$_GET['delete_filter']);\n\t\t\t\t\t$message = '<strong>'. $deleted_filter .'</strong> '. __('filter was successfully deleted', 'ajax-load-more-filters');\n\t\t\t\t\t$this->alm_filters_add_admin_notice($message, 'ajax-load-more-filters');\n\t\t\t\t}\n\t\t\t}\n \t}",
"public function annimalDelAction()\n {\n }",
"public function uninstall() {\n\t\tdelete_option( $this->options_key );\n\t}",
"function access_scheme_form_delete_submit($form, &$form_state) {\n if (isset($_GET['destination'])) {\n drupal_get_destination();\n unset($_GET['destination']);\n }\n $scheme = $form_state['scheme'];\n $form_state['redirect'] = 'admin/structure/access/' . str_replace('_', '-', $scheme->machine_name) . '/delete';\n}"
] |
[
"0.67700034",
"0.6745967",
"0.67307496",
"0.65679526",
"0.6476264",
"0.64708894",
"0.6441353",
"0.6374537",
"0.6294705",
"0.6240748",
"0.6233757",
"0.6201165",
"0.61434513",
"0.6131297",
"0.6121849",
"0.6109251",
"0.6103933",
"0.60822314",
"0.6051135",
"0.6021446",
"0.6011662",
"0.60085297",
"0.60085297",
"0.5997423",
"0.59843874",
"0.59824926",
"0.5951888",
"0.59209967",
"0.5920233",
"0.58944494"
] |
0.7822394
|
0
|
Action for adding lookup option
|
public function actionAddlookupoptions() {
// rendering the main layout
$this->layout = 'main';
if (\Yii::$app->SessionCheck->isLogged () == true) // checking logged session
{
$lookup_options = \Yii::$app->request->post ();
$model_lookupoptions = new TblAcaLookupOptions (); //initialising the model
$session = \Yii::$app->session; // collecting variables from session
$user_id = $session ['admin_user_id'];
// begining the transaction
$transaction = \Yii::$app->db->beginTransaction (); // begining the transaction
try {
if ($model_lookupoptions->load ( \Yii::$app->request->post () )) {
$lookup_options = \Yii::$app->request->post (); // putting the post values in a variable
$code_id = $lookup_options ['TblAcaLookupOptions'] ['code_id'];
$optionString = $lookup_options ['TblAcaLookupOptions'] ['lookup_value'];
$arrOptions = explode ( ',', $optionString ); // making string to array
$x = 0;
$erroroptions = '';
foreach ( $arrOptions as $key => $value ) {
$model_findoption = TblAcaLookupOptions::lookupfindoption ( $value , $code_id); // checking for unique
if (! empty ( $model_findoption )) {
throw new Exception ( 'Lookup option already exists.' ); // if duplicate entry throws a exception
} else {
// assigning values to model
$model_lookupoptions->lookup_value = $value;
$model_lookupoptions->code_id = $code_id;
$model_lookupoptions->lookup_status = 1;
$model_lookupoptions->created_by = $user_id;
$model_lookupoptions->created_date = date ( 'Y-m-d H:i:s' );
$model_lookupoptions->modified_date = date ( 'Y-m-d H:i:s' );
$model_lookupoptions->lookup_id = NULL;
$model_lookupoptions->isNewRecord = TRUE;
if ($model_lookupoptions->validate () && $model_lookupoptions->save ()) { // validating and saving for each record
$x ++;
}
}
}
// validating the
if ($x > 0) {
$transaction->commit (); // commit the transaction
\Yii::$app->session->setFlash ( 'success', 'Lookup option added successfully' );
return $this->redirect ( array ( // redirecting with success message
'/admin/masterdata/lookupoptions'
) );
} else {
return $this->redirect ( array (
'/admin/masterdata/lookupoptions'
) );
}
}
} catch ( Exception $e ) { // display error messages if exception occurs
$msg = $e->getMessage ();
\Yii::$app->session->setFlash ( 'error', $msg );
$transaction->rollback (); //if exception occurs transaction rollbacks
return $this->redirect ( array (
'/admin/masterdata/lookupoptions'
) );
}
return $this->render ( 'lookupoptions', [
'$model_lookupoptions' => $model_lookupoptions
] );
} else {
\Yii::$app->SessionCheck->adminlogout (); // if session destroyed user gets logout
return $this->goHome ();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function actionLookupoptions() {\n\t\t\\Yii::$app->view->title = 'ACA Reporting Service | Lookup Options';\n\t\t$this->layout = 'main';\n\t\t$session = \\Yii::$app->session;\n\t\t$admin_permissions = $session ['admin_permissions'];\n\t\tif (\\Yii::$app->SessionCheck->isLogged () == true && in_array(\"7\", $admin_permissions)) \t\t// checking logged session\n\t\t{\n\t\t/*\tif(\\Yii::$app->Permission->CheckAdminactionpermission ( '7' ) == true)\n {*/\n\t\t\t$model_lookupoptions = TblAcaLookupOptions::lookupoptionsalldetails (); // Retriving Lookupoptions details\n\t\t\t$model_codemaster = new TblAcaCodeMaster (); // initialising model TblAcaCodeMaster\n\t\t\t$model_lookupoptions_modal = new TblAcaLookupOptions (); // initialising model TblAcaLookupOptions\n\t\t\t\n\t\t\t$this->layout = 'main'; // rendering the layout\n\t\t\treturn $this->render ( 'lookupoptions', [ // Rendering to index view\n\t\t\t\t\t'model' => $model_lookupoptions,\n\t\t\t\t\t'model_codemaster' => $model_codemaster,\n\t\t\t\t\t'model_lookupoptions_modal' => $model_lookupoptions_modal \n\t\t\t] );\n\t\t\t\n\t\t/*\t}else{\n\t\t\t\t\t\\Yii::$app->session->setFlash ( 'error', 'Permission denied' );\n\t\t\t\t\t\t\treturn $this->redirect ( array (\n\t\t\t\t\t\t\t\t\t'/admin' \n\t\t\t\t\t\t\t) ); \n\t\t\t\t }*/\n\t\t\t\t \n\t\t} else {\n\t\t\t\\Yii::$app->SessionCheck->adminlogout (); // Redirecting to home page if session destroyed\n\t\t\t\n\t\t\treturn $this->goHome ();\n\t\t}\n\t}",
"public function getLookupMode() {}",
"public function actionAddlookupname() {\n\t\t$this->layout = 'main';\n\t\t\n\t\tif (\\Yii::$app->SessionCheck->isLogged () == true) \t\t// checking logged session\n\t\t{\n\t\t\t$session = \\Yii::$app->session; // collecting variables from session\n\t\t\t$user_id = $session ['admin_user_id'];\n\t\t\t$lookup_options = \\Yii::$app->request->post ();\n\t\t\t\n\t\t\t$model_codemaster = new TblAcaCodeMaster ();\n\t\t\t\n\t\t\t$transaction = \\Yii::$app->db->beginTransaction (); // begining the transaction\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tif ($model_codemaster->load ( \\Yii::$app->request->post () )) {\n\t\t\t\t\t\n\t\t\t\t\t$lookup_name = \\Yii::$app->request->post ();\n\t\t\t\t\t\n\t\t\t\t\t$lookup_code = $lookup_name ['TblAcaCodeMaster'] ['lookup_code'];\n\t\t\t\t\t$model_findcode = TblAcaCodeMaster::codemasterfindcode ( $lookup_code );\n\t\t\t\t\t\n\t\t\t\t\tif (! empty ( $model_findcode )) \t\t\t\t\t// checking for unique lookup code\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new Exception ( 'Lookup name already exist.' ); // throws a exception\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$model_codemaster->attributes = $lookup_name ['TblAcaCodeMaster'];\n\t\t\t\t\t\t$model_codemaster->code_type = 1;\n\t\t\t\t\t\t$model_codemaster->created_by = $user_id;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ($model_codemaster->validate () && $model_codemaster->save ()) { // model validation happens\n\t\t\t\t\t\t\n\t\t\t\t\t\t$transaction->commit (); // commit the transaction\n\t\t\t\t\t\t\n\t\t\t\t\t\t\\Yii::$app->session->setFlash ( 'success', 'Lookup Name added successfully' );\n\t\t\t\t\t\treturn $this->redirect ( array ( // if added redirecting with success msg\n\t\t\t\t\t\t\t\t'/admin/masterdata/lookupoptions' \n\t\t\t\t\t\t) );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\\Yii::$app->session->setFlash ( 'error', 'lookup name cannot be added' );\n\t\t\t\t\t\treturn $this->redirect ( array ( // if not added redirecting with success msg\n\t\t\t\t\t\t\t\t'/admin/masterdata/lookupoptions' \n\t\t\t\t\t\t) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch ( Exception $e ) { // any exceptions catch throws error msg\n\t\t\t\t\n\t\t\t\t$msg = $e->getMessage ();\n\t\t\t\t\\Yii::$app->session->setFlash ( 'error', $msg );\n\t\t\t\t\n\t\t\t\t$transaction->rollback (); //if exception occurs transaction rollbacks\n\t\t\t\t\n\t\t\t\treturn $this->redirect ( array (\n\t\t\t\t\t\t'/admin/masterdata/lookupoptions' // any exception redirecting with error msg\n\t\t\t\t\t\t\t\t) );\n\t\t\t}\n\t\t\t\n\t\t\treturn $this->redirect ( array (\n\t\t\t\t\t'/admin/masterdata/lookupoptions' \n\t\t\t) );\n\t\t} else {\n\t\t\t\\Yii::$app->SessionCheck->adminlogout (); // Redirecting to login page if session destroyed\n\t\t\t\n\t\t\treturn $this->goHome ();\n\t\t}\n\t}",
"public function actionUpdatelookupoptions() {\n\t\tif (\\Yii::$app->SessionCheck->isLogged () == true) \t\t// checking logged session\n\t\t{\n\t\t\t\n\t\t\t$post = \\Yii::$app->request->post ();\n\t\t\tif (! empty ( $post )) { // checking the values\n\t\t\t\t$value_name = $post ['TblAcaLookupOptions'] ['lookup_value']; // assigining them to variables\n\t\t\t\t$lookup_id = $post ['lookupid'];\n\t\t\t\t$code_id = $post ['codeid'];\n\t\t\t\t\n\t\t\t\tif (! empty ( $code_id )) {\n\t\t\t\t\t\n\t\t\t\t\t$transaction = \\Yii::$app->db->beginTransaction (); // begining the transaction\n\t\t\t\t\ttry {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$model_lookup = TblAcaLookupOptions::lookupuniquedetails ( $lookup_id ); // Retriving Lookupoptions details for particular id\n\t\t\t\t\t\t$model_findoption = TblAcaLookupOptions::lookupfindoption ( $value_name ,$code_id );\n\t\t\t\t\t\tif ($value_name != $model_lookup->lookup_value) { // Checking for unique\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (! empty ( $model_findoption )) {\n\t\t\t\t\t\t\t\tthrow new Exception ( 'lookup value already exist.' ); // throw a exception\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$model_lookup->lookup_value = strip_tags ( $value_name ); // assiging the values to model\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$model_lookup->lookup_value = strip_tags ( $value_name ); // assiging the values to model\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($model_lookup->validate () && $model_lookup->save ()) \t\t\t\t\t\t// validating model and saving it(server side validation)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo 'success';\n\t\t\t\t\t\t\t$transaction->commit (); // commiting the transaction\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo 'fail';\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch ( Exception $e ) { // catching the exception\n\t\t\t\t\t\t\n\t\t\t\t\t\t$msg = $e->getMessage ();\n\t\t\t\t\t\t\\Yii::$app->session->setFlash ( 'error', $msg );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$transaction->rollback (); //if exception occurs transaction rollbacks\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn $this->redirect ( array (\n\t\t\t\t\t\t\t\t'/admin/masterdata/lookupoptions' // redirecting to main grid screen\n\t\t\t\t\t\t\t\t\t\t\t\t) );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\techo 'fail'; // sending response to ajax\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\techo 'fail'; // sending response to ajax\n\t\t\t}\n\t\t} else {\n\t\t\t\\Yii::$app->SessionCheck->adminlogout (); // Redirecting to home page if session destroyed\n\t\t\t\n\t\t\treturn $this->goHome ();\n\t\t}\n\t}",
"public function lookup($lookup)\n {\n $results = $this->attributeRepository->getLookUpOptions($lookup, request()->input('query'));\n\n return response()->json($results);\n }",
"function SetupLookupFilters($fld) {\n\t\tglobal $gsLanguage;\n\t\tswitch ($fld->FldVar) {\n\t\t}\n\t}",
"public function lookups()\n {\n }",
"public function getLookupField() {}",
"public function lookup($ids, $options = []);",
"public function actionEditlookupoptions() {\n\t\tif (\\Yii::$app->SessionCheck->isLogged () == true) \t\t// checking logged session\n\t\t{\n\t\t\t\n\t\t\t$model_codemaster = new TblAcaCodeMaster (); // initialising models\n\t\t\t$model_lookupoptions_modal = new TblAcaLookupOptions ();\n\t\t\t\n\t\t\t$post = \\Yii::$app->request->post ();\n\t\t\tif (! empty ( $post )) { // getting the values through post\n\t\t\t\t$id = $post ['id'];\n\t\t\t\t\n\t\t\t\t$model_lookupoptions = TblAcaLookupOptions::editlookupoptionsalldetails ( $id ); // Retriving Lookupoptions details for particular id\n\t\t\t\t\n\t\t\t\t$lookup_id = $model_lookupoptions->lookup_id; // assigning values to model\n\t\t\t\t$code_id = $model_lookupoptions->code_id;\n\t\t\t\t$lookup_value = $model_lookupoptions->lookup_value;\n\t\t\t\t$lookup_element = $model_lookupoptions ['code']->lookup_code;\n\t\t\t\t\n\t\t\t\t$arrEditvalues = array (\n\t\t\t\t\t\t\"lookup_value\" => $lookup_value, // preparing array to send in response for ajax\n\t\t\t\t\t\t\"lookup_element\" => $lookup_element,\n\t\t\t\t\t\t\"lookup_id\" => $lookup_id,\n\t\t\t\t\t\t\"code_id\" => $code_id \n\t\t\t\t);\n\t\t\t\t\n\t\t\t\techo json_encode ( $arrEditvalues ); // sending as a object\n\t\t\t}\n\t\t} else {\n\t\t\t\\Yii::$app->SessionCheck->adminlogout (); // Redirecting to home page if session destroyed\n\t\t\t\n\t\t\treturn $this->goHome ();\n\t\t}\n\t}",
"public function testOptionsLookup() {\n $json = <<<'jsonend'\n{\n \"source\": \"static\",\n \"query\": \"queryobjectid\",\n \"parameters\": [\"objid.1\", \"objid.2\"],\n \"list\": [\n {\n \"value\": \"a value\",\n \"label\": \"label or language key\"\n }\n ]\n}\njsonend;\n $config = json_decode($json);\n $this->assertTrue(false != $config, 'JSON error!');\n $obj = new Population();\n $this->assertTrue($obj->configure($config, true));\n }",
"public function addAction()\n {\n parent::addAction();\n $this->_fillMappingsArray();\n $this->_fillAvailableProperties();\n }",
"function SetupLookupFilters($fld, $pageId = null) {\n\t\tglobal $gsLanguage;\n\t\t$pageId = $pageId ?: $this->PageID;\n\t\tif ($pageId == \"list\") {\n\t\t\tswitch ($fld->FldVar) {\n\t\t\t}\n\t\t} elseif ($pageId == \"extbs\") {\n\t\t\tswitch ($fld->FldVar) {\n\t\t\t}\n\t\t}\n\t}",
"function SetupLookupFilters($fld, $pageId = null) {\n\t\tglobal $gsLanguage;\n\t\t$pageId = $pageId ?: $this->PageID;\n\t\tif ($pageId == \"list\") {\n\t\t\tswitch ($fld->FldVar) {\n\t\t\t}\n\t\t} elseif ($pageId == \"extbs\") {\n\t\t\tswitch ($fld->FldVar) {\n\t\t\t}\n\t\t}\n\t}",
"function SetupLookupFilters($fld, $pageId = null) {\r\n\t\tglobal $gsLanguage;\r\n\t\t$pageId = $pageId ?: $this->PageID;\r\n\t\tswitch ($fld->FldVar) {\r\n\t\t}\r\n\t}",
"function SetupLookupFilters($fld, $pageId = null) {\n\t\tglobal $gsLanguage;\n\t\t$pageId = $pageId ?: $this->PageID;\n\t\tswitch ($fld->FldVar) {\n\t\t}\n\t}",
"function SetupLookupFilters($fld, $pageId = null) {\n\t\tglobal $gsLanguage;\n\t\t$pageId = $pageId ?: $this->PageID;\n\t\tswitch ($fld->FldVar) {\n\t\t}\n\t}",
"function SetupLookupFilters($fld, $pageId = null) {\n\t\tglobal $gsLanguage;\n\t\t$pageId = $pageId ?: $this->PageID;\n\t\tswitch ($fld->FldVar) {\n\t\t}\n\t}",
"function SetupLookupFilters($fld, $pageId = null) {\n\t\tglobal $gsLanguage;\n\t\t$pageId = $pageId ?: $this->PageID;\n\t\tswitch ($fld->FldVar) {\n\t\t}\n\t}",
"function SetupLookupFilters($fld, $pageId = null) {\n\t\tglobal $gsLanguage;\n\t\t$pageId = $pageId ?: $this->PageID;\n\t\tswitch ($fld->FldVar) {\n\t\t}\n\t}",
"function SetupLookupFilters($fld, $pageId = null) {\n\t\tglobal $gsLanguage;\n\t\t$pageId = $pageId ?: $this->PageID;\n\t\tswitch ($fld->FldVar) {\n\t\t}\n\t}",
"function SetupLookupFilters($fld, $pageId = null) {\n\t\tglobal $gsLanguage;\n\t\t$pageId = $pageId ?: $this->PageID;\n\t\tswitch ($fld->FldVar) {\n\t\t}\n\t}",
"function SetupLookupFilters($fld, $pageId = null) {\n\t\tglobal $gsLanguage;\n\t\t$pageId = $pageId ?: $this->PageID;\n\t\tswitch ($fld->FldVar) {\n\t\t}\n\t}",
"function SetupLookupFilters($fld, $pageId = null) {\n\t\tglobal $gsLanguage;\n\t\t$pageId = $pageId ?: $this->PageID;\n\t\tswitch ($fld->FldVar) {\n\t\t}\n\t}",
"function SetupLookupFilters($fld, $pageId = null) {\n\t\tglobal $gsLanguage;\n\t\t$pageId = $pageId ?: $this->PageID;\n\t\tswitch ($fld->FldVar) {\n\t\t}\n\t}",
"public function refreshActionLookups()\n {\n //\n }",
"function SetupLookupFilters($fld) {\n\t\tglobal $grLanguage;\n\t\tswitch ($fld->FldVar) {\n\t\tcase \"x_MainGroup\":\n\t\t\t$fld->LookupFilters = array(\"d\" => \"DB\", \"f0\" => '`MainGroup` = {filter_value}', \"t0\" => \"200\", \"fn0\" => \"\", \"dlm\" => ewr_Encrypt($fld->FldDelimiter), \"af\" => json_encode($fld->AdvancedFilters));\n\t\t$sWhereWrk = \"\";\n\t\t$fld->LookupFilters += array(\n\t\t\t\"select\" => \"SELECT DISTINCT `MainGroup`, `MainGroup` AS `DispFld`, '' AS `DispFld2`, '' AS `DispFld3`, '' AS `DispFld4` FROM `t13_mutasi`\",\n\t\t\t\"where\" => $sWhereWrk,\n\t\t\t\"orderby\" => \"`MainGroup` ASC\"\n\t\t);\n\t\t$this->Lookup_Selecting($fld, $fld->LookupFilters[\"where\"]); // Call Lookup selecting\n\t\t$fld->LookupFilters[\"s\"] = ewr_BuildReportSql($fld->LookupFilters[\"select\"], $fld->LookupFilters[\"where\"], \"\", \"\", $fld->LookupFilters[\"orderby\"], \"\", \"\");\n\t\t\tbreak;\n\t\tcase \"x_SubGroup\":\n\t\t\t$fld->LookupFilters = array(\"d\" => \"DB\", \"f0\" => '`SubGroup` = {filter_value}', \"t0\" => \"200\", \"fn0\" => \"\", \"dlm\" => ewr_Encrypt($fld->FldDelimiter), \"f1\" => '`MainGroup` = {filter_value}', \"t1\" => \"200\", \"fn1\" => \"\", \"af\" => json_encode($fld->AdvancedFilters));\n\t\t$sWhereWrk = \"{filter}\";\n\t\t$fld->LookupFilters += array(\n\t\t\t\"select\" => \"SELECT DISTINCT `SubGroup`, `SubGroup` AS `DispFld`, '' AS `DispFld2`, '' AS `DispFld3`, '' AS `DispFld4` FROM `t13_mutasi`\",\n\t\t\t\"where\" => $sWhereWrk,\n\t\t\t\"orderby\" => \"`SubGroup` ASC\"\n\t\t);\n\t\t$this->Lookup_Selecting($fld, $fld->LookupFilters[\"where\"]); // Call Lookup selecting\n\t\t$fld->LookupFilters[\"s\"] = ewr_BuildReportSql($fld->LookupFilters[\"select\"], $fld->LookupFilters[\"where\"], \"\", \"\", $fld->LookupFilters[\"orderby\"], \"\", \"\");\n\t\t\tbreak;\n\t\tcase \"x_Article\":\n\t\t\t$fld->LookupFilters = array(\"d\" => \"DB\", \"f0\" => '`Article` = {filter_value}', \"t0\" => \"200\", \"fn0\" => \"\", \"dlm\" => ewr_Encrypt($fld->FldDelimiter), \"f1\" => '`MainGroup` = {filter_value}', \"t1\" => \"200\", \"fn1\" => \"\", \"f2\" => '`SubGroup` = {filter_value}', \"t2\" => \"200\", \"fn2\" => \"\", \"af\" => json_encode($fld->AdvancedFilters));\n\t\t$sWhereWrk = \"{filter}\";\n\t\t$fld->LookupFilters += array(\n\t\t\t\"select\" => \"SELECT DISTINCT `Article`, `Article` AS `DispFld`, '' AS `DispFld2`, '' AS `DispFld3`, '' AS `DispFld4` FROM `t13_mutasi`\",\n\t\t\t\"where\" => $sWhereWrk,\n\t\t\t\"orderby\" => \"`Article` ASC\"\n\t\t);\n\t\t$this->Lookup_Selecting($fld, $fld->LookupFilters[\"where\"]); // Call Lookup selecting\n\t\t$fld->LookupFilters[\"s\"] = ewr_BuildReportSql($fld->LookupFilters[\"select\"], $fld->LookupFilters[\"where\"], \"\", \"\", $fld->LookupFilters[\"orderby\"], \"\", \"\");\n\t\t\tbreak;\n\t\t}\n\t}",
"function SetupLookupFilters($fld, $pageId = null) {\r\n\t\tglobal $gsLanguage;\r\n\t\t$pageId = $pageId ?: $this->PageID;\r\n\t\tswitch ($fld->FldVar) {\r\n\t\tcase \"x_Serie_Equipo\":\r\n\t\t\t$sSqlWrk = \"\";\r\n\t\t\t$sSqlWrk = \"SELECT `NroSerie` AS `LinkFld`, `NroSerie` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `equipos`\";\r\n\t\t\t$sWhereWrk = \"{filter}\";\r\n\t\t\t$this->Serie_Equipo->LookupFilters = array(\"dx1\" => \"`NroSerie`\");\r\n\t\t\t$fld->LookupFilters += array(\"s\" => $sSqlWrk, \"d\" => \"\", \"f0\" => \"`NroSerie` = {filter_value}\", \"t0\" => \"200\", \"fn0\" => \"\");\r\n\t\t\t$sSqlWrk = \"\";\r\n\t\t\t$this->Lookup_Selecting($this->Serie_Equipo, $sWhereWrk); // Call Lookup selecting\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\tif ($sSqlWrk <> \"\")\r\n\t\t\t\t$fld->LookupFilters[\"s\"] .= $sSqlWrk;\r\n\t\t\tbreak;\r\n\t\tcase \"x_Modelo_Net\":\r\n\t\t\t$sSqlWrk = \"\";\r\n\t\t\t$sSqlWrk = \"SELECT `Descripcion` AS `LinkFld`, `Descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `modelo`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\t$this->Modelo_Net->LookupFilters = array();\r\n\t\t\t$fld->LookupFilters += array(\"s\" => $sSqlWrk, \"d\" => \"\", \"f0\" => \"`Descripcion` = {filter_value}\", \"t0\" => \"200\", \"fn0\" => \"\");\r\n\t\t\t$sSqlWrk = \"\";\r\n\t\t\t$this->Lookup_Selecting($this->Modelo_Net, $sWhereWrk); // Call Lookup selecting\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\tif ($sSqlWrk <> \"\")\r\n\t\t\t\t$fld->LookupFilters[\"s\"] .= $sSqlWrk;\r\n\t\t\tbreak;\r\n\t\tcase \"x_Nombre_Titular\":\r\n\t\t\t$sSqlWrk = \"\";\r\n\t\t\t$sSqlWrk = \"SELECT `Apellidos_Nombres` AS `LinkFld`, `Apellidos_Nombres` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `personas`\";\r\n\t\t\t$sWhereWrk = \"{filter}\";\r\n\t\t\t$this->Nombre_Titular->LookupFilters = array(\"dx1\" => \"`Apellidos_Nombres`\");\r\n\t\t\t$fld->LookupFilters += array(\"s\" => $sSqlWrk, \"d\" => \"\", \"f0\" => \"`Apellidos_Nombres` = {filter_value}\", \"t0\" => \"201\", \"fn0\" => \"\");\r\n\t\t\t$sSqlWrk = \"\";\r\n\t\t\t$this->Lookup_Selecting($this->Nombre_Titular, $sWhereWrk); // Call Lookup selecting\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\tif ($sSqlWrk <> \"\")\r\n\t\t\t\t$fld->LookupFilters[\"s\"] .= $sSqlWrk;\r\n\t\t\tbreak;\r\n\t\tcase \"x_Nombre_Tutor\":\r\n\t\t\t$sSqlWrk = \"\";\r\n\t\t\t$sSqlWrk = \"SELECT `Apellidos_Nombres` AS `LinkFld`, `Apellidos_Nombres` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tutores`\";\r\n\t\t\t$sWhereWrk = \"{filter}\";\r\n\t\t\t$this->Nombre_Tutor->LookupFilters = array(\"dx1\" => \"`Apellidos_Nombres`\");\r\n\t\t\t$fld->LookupFilters += array(\"s\" => $sSqlWrk, \"d\" => \"\", \"f0\" => \"`Apellidos_Nombres` = {filter_value}\", \"t0\" => \"201\", \"fn0\" => \"\");\r\n\t\t\t$sSqlWrk = \"\";\r\n\t\t\t$this->Lookup_Selecting($this->Nombre_Tutor, $sWhereWrk); // Call Lookup selecting\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\tif ($sSqlWrk <> \"\")\r\n\t\t\t\t$fld->LookupFilters[\"s\"] .= $sSqlWrk;\r\n\t\t\tbreak;\r\n\t\tcase \"x_Cue_Establecimiento_Alta\":\r\n\t\t\t$sSqlWrk = \"\";\r\n\t\t\t$sSqlWrk = \"SELECT `Cue_Establecimiento` AS `LinkFld`, `Cue_Establecimiento` AS `DispFld`, `Nombre_Establecimiento` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `establecimientos_educativos_pase`\";\r\n\t\t\t$sWhereWrk = \"{filter}\";\r\n\t\t\t$this->Cue_Establecimiento_Alta->LookupFilters = array(\"dx1\" => \"`Cue_Establecimiento`\", \"dx2\" => \"`Nombre_Establecimiento`\");\r\n\t\t\t$fld->LookupFilters += array(\"s\" => $sSqlWrk, \"d\" => \"\", \"f0\" => \"`Cue_Establecimiento` = {filter_value}\", \"t0\" => \"3\", \"fn0\" => \"\");\r\n\t\t\t$sSqlWrk = \"\";\r\n\t\t\t$this->Lookup_Selecting($this->Cue_Establecimiento_Alta, $sWhereWrk); // Call Lookup selecting\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\tif ($sSqlWrk <> \"\")\r\n\t\t\t\t$fld->LookupFilters[\"s\"] .= $sSqlWrk;\r\n\t\t\tbreak;\r\n\t\tcase \"x_Dpto_Esc_alta\":\r\n\t\t\t$sSqlWrk = \"\";\r\n\t\t\t$sSqlWrk = \"SELECT `Nombre` AS `LinkFld`, `Nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `departamento`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\t$this->Dpto_Esc_alta->LookupFilters = array();\r\n\t\t\t$fld->LookupFilters += array(\"s\" => $sSqlWrk, \"d\" => \"\", \"f0\" => \"`Nombre` = {filter_value}\", \"t0\" => \"200\", \"fn0\" => \"\");\r\n\t\t\t$sSqlWrk = \"\";\r\n\t\t\t$this->Lookup_Selecting($this->Dpto_Esc_alta, $sWhereWrk); // Call Lookup selecting\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\tif ($sSqlWrk <> \"\")\r\n\t\t\t\t$fld->LookupFilters[\"s\"] .= $sSqlWrk;\r\n\t\t\tbreak;\r\n\t\tcase \"x_Localidad_Esc_Alta\":\r\n\t\t\t$sSqlWrk = \"\";\r\n\t\t\t$sSqlWrk = \"SELECT `Nombre` AS `LinkFld`, `Nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `localidades`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\t$this->Localidad_Esc_Alta->LookupFilters = array();\r\n\t\t\t$fld->LookupFilters += array(\"s\" => $sSqlWrk, \"d\" => \"\", \"f0\" => \"`Nombre` = {filter_value}\", \"t0\" => \"200\", \"fn0\" => \"\");\r\n\t\t\t$sSqlWrk = \"\";\r\n\t\t\t$this->Lookup_Selecting($this->Localidad_Esc_Alta, $sWhereWrk); // Call Lookup selecting\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\tif ($sSqlWrk <> \"\")\r\n\t\t\t\t$fld->LookupFilters[\"s\"] .= $sSqlWrk;\r\n\t\t\tbreak;\r\n\t\tcase \"x_Cue_Establecimiento_Baja\":\r\n\t\t\t$sSqlWrk = \"\";\r\n\t\t\t$sSqlWrk = \"SELECT `Cue_Establecimiento` AS `LinkFld`, `Cue_Establecimiento` AS `DispFld`, `Nombre_Establecimiento` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `establecimientos_educativos_pase`\";\r\n\t\t\t$sWhereWrk = \"{filter}\";\r\n\t\t\t$this->Cue_Establecimiento_Baja->LookupFilters = array(\"dx1\" => \"`Cue_Establecimiento`\", \"dx2\" => \"`Nombre_Establecimiento`\");\r\n\t\t\t$fld->LookupFilters += array(\"s\" => $sSqlWrk, \"d\" => \"\", \"f0\" => \"`Cue_Establecimiento` = {filter_value}\", \"t0\" => \"3\", \"fn0\" => \"\");\r\n\t\t\t$sSqlWrk = \"\";\r\n\t\t\t$this->Lookup_Selecting($this->Cue_Establecimiento_Baja, $sWhereWrk); // Call Lookup selecting\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\tif ($sSqlWrk <> \"\")\r\n\t\t\t\t$fld->LookupFilters[\"s\"] .= $sSqlWrk;\r\n\t\t\tbreak;\r\n\t\tcase \"x_Dpto_Esc_Baja\":\r\n\t\t\t$sSqlWrk = \"\";\r\n\t\t\t$sSqlWrk = \"SELECT `Nombre` AS `LinkFld`, `Nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `departamento`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\t$this->Dpto_Esc_Baja->LookupFilters = array();\r\n\t\t\t$fld->LookupFilters += array(\"s\" => $sSqlWrk, \"d\" => \"\", \"f0\" => \"`Nombre` = {filter_value}\", \"t0\" => \"200\", \"fn0\" => \"\");\r\n\t\t\t$sSqlWrk = \"\";\r\n\t\t\t$this->Lookup_Selecting($this->Dpto_Esc_Baja, $sWhereWrk); // Call Lookup selecting\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\tif ($sSqlWrk <> \"\")\r\n\t\t\t\t$fld->LookupFilters[\"s\"] .= $sSqlWrk;\r\n\t\t\tbreak;\r\n\t\tcase \"x_Localidad_Esc_Baja\":\r\n\t\t\t$sSqlWrk = \"\";\r\n\t\t\t$sSqlWrk = \"SELECT `Nombre` AS `LinkFld`, `Nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `localidades`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\t$this->Localidad_Esc_Baja->LookupFilters = array();\r\n\t\t\t$fld->LookupFilters += array(\"s\" => $sSqlWrk, \"d\" => \"\", \"f0\" => \"`Nombre` = {filter_value}\", \"t0\" => \"200\", \"fn0\" => \"\");\r\n\t\t\t$sSqlWrk = \"\";\r\n\t\t\t$this->Lookup_Selecting($this->Localidad_Esc_Baja, $sWhereWrk); // Call Lookup selecting\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\tif ($sSqlWrk <> \"\")\r\n\t\t\t\t$fld->LookupFilters[\"s\"] .= $sSqlWrk;\r\n\t\t\tbreak;\r\n\t\tcase \"x_Id_Estado_Pase\":\r\n\t\t\t$sSqlWrk = \"\";\r\n\t\t\t$sSqlWrk = \"SELECT `Id_Estado_Pase` AS `LinkFld`, `Descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `estado_pase`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\t$this->Id_Estado_Pase->LookupFilters = array();\r\n\t\t\t$fld->LookupFilters += array(\"s\" => $sSqlWrk, \"d\" => \"\", \"f0\" => \"`Id_Estado_Pase` = {filter_value}\", \"t0\" => \"3\", \"fn0\" => \"\");\r\n\t\t\t$sSqlWrk = \"\";\r\n\t\t\t$this->Lookup_Selecting($this->Id_Estado_Pase, $sWhereWrk); // Call Lookup selecting\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\tif ($sSqlWrk <> \"\")\r\n\t\t\t\t$fld->LookupFilters[\"s\"] .= $sSqlWrk;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}",
"public function setName(string $name): ISearchOption;",
"public function __construct(LookupService $lookupService) {\r\n\t $this->lookupService = $lookupService; \t\r\n\t}"
] |
[
"0.62507385",
"0.6035165",
"0.60198003",
"0.59653085",
"0.5879435",
"0.58696634",
"0.58299756",
"0.57328725",
"0.564802",
"0.56427795",
"0.54925877",
"0.5441596",
"0.53523964",
"0.53523964",
"0.534071",
"0.5307569",
"0.5307569",
"0.5307569",
"0.5307569",
"0.5307569",
"0.5307569",
"0.5307569",
"0.5307569",
"0.5307569",
"0.5307569",
"0.53011435",
"0.5295087",
"0.5273968",
"0.5220558",
"0.52186286"
] |
0.6627951
|
0
|
Action for adding lookup name
|
public function actionAddlookupname() {
$this->layout = 'main';
if (\Yii::$app->SessionCheck->isLogged () == true) // checking logged session
{
$session = \Yii::$app->session; // collecting variables from session
$user_id = $session ['admin_user_id'];
$lookup_options = \Yii::$app->request->post ();
$model_codemaster = new TblAcaCodeMaster ();
$transaction = \Yii::$app->db->beginTransaction (); // begining the transaction
try {
if ($model_codemaster->load ( \Yii::$app->request->post () )) {
$lookup_name = \Yii::$app->request->post ();
$lookup_code = $lookup_name ['TblAcaCodeMaster'] ['lookup_code'];
$model_findcode = TblAcaCodeMaster::codemasterfindcode ( $lookup_code );
if (! empty ( $model_findcode )) // checking for unique lookup code
{
throw new Exception ( 'Lookup name already exist.' ); // throws a exception
} else {
$model_codemaster->attributes = $lookup_name ['TblAcaCodeMaster'];
$model_codemaster->code_type = 1;
$model_codemaster->created_by = $user_id;
}
if ($model_codemaster->validate () && $model_codemaster->save ()) { // model validation happens
$transaction->commit (); // commit the transaction
\Yii::$app->session->setFlash ( 'success', 'Lookup Name added successfully' );
return $this->redirect ( array ( // if added redirecting with success msg
'/admin/masterdata/lookupoptions'
) );
} else {
\Yii::$app->session->setFlash ( 'error', 'lookup name cannot be added' );
return $this->redirect ( array ( // if not added redirecting with success msg
'/admin/masterdata/lookupoptions'
) );
}
}
} catch ( Exception $e ) { // any exceptions catch throws error msg
$msg = $e->getMessage ();
\Yii::$app->session->setFlash ( 'error', $msg );
$transaction->rollback (); //if exception occurs transaction rollbacks
return $this->redirect ( array (
'/admin/masterdata/lookupoptions' // any exception redirecting with error msg
) );
}
return $this->redirect ( array (
'/admin/masterdata/lookupoptions'
) );
} else {
\Yii::$app->SessionCheck->adminlogout (); // Redirecting to login page if session destroyed
return $this->goHome ();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function refreshNameLookups()\n {\n //\n }",
"public function resolveName();",
"public function lookups()\n {\n }",
"public function forName();",
"protected function resolveActionMethodName() {}",
"public function car_lookup($car_name)\n {\n \n }",
"public function refreshActionLookups()\n {\n //\n }",
"abstract public function lookupWord($word);",
"public function getLookupField() {}",
"function map_action($action) {\n return $action . '_action';\n }",
"public function lookup($serviceName, array $args = array());",
"protected function _lookup($type, $src) {}",
"abstract protected function setMainActionName();",
"public function get_lookup(/* ... */)\n {\n return sprintf(\n \"`%s` ILIKE %s\",\n $this->_field->get_db_field_name(),\n $this->_key\n );\n }",
"public function get_lookup(/* ... */)\n {\n throw new \\RuntimeException('Method not implemented');\n }",
"public function lookup($src) {}",
"public function lookup($src) {}",
"public function addAction()\n {\n parent::addAction();\n $this->_fillMappingsArray();\n $this->_fillAvailableProperties();\n }",
"abstract public function routeName();",
"function addAction($name, $action){\n\t\t$this->actions[$name] =& $action;\n\t}",
"public function getActionName();",
"public function getActionName();",
"public function lookup($name) {\n return $this->_handler->lookup($name);\n }",
"public function lookup($src);",
"function changeIdentifier($hookName, $params) {\n\t\t$record =& $params[0];\n\t\t$row = $params[1];\n\t\t\n\t\t$journalDao =& DAORegistry::getDAO('JournalDAO');\n\t\t$journal = $journalDao->getJournal($row['journal_id']);\n\t\t$openAIREDao =& DAORegistry::getDAO('OpenAIREDAO');\n\t\tif ($openAIREDao->isOpenAIREArticle($row['article_id'])) {\n\t\t\t$record->sets[] = $journal->getPath() . ':ec_fundedresources';\n\t\t}\t\n\t\treturn false;\t\n\t}",
"public function add($name);",
"public function getActionName(){ }",
"function Build_lookup_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('Build.lookup_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function afterFind() {\n\t\tparent::afterFind();\n\t\t\n\t\tif(isset(Yii::app()->params->admin)) {\n\t\t\t$admin=Yii::app()->params->admin;\n\t\t\tif(!empty($admin->contactNameFormat)) {\n\t\t\t\t$str = $admin->contactNameFormat;\n\t\t\t\t$str = str_replace('firstName',$this->firstName,$str);\n\t\t\t\t$str = str_replace('lastName',$this->lastName,$str);\n\t\t\t} else {\n\t\t\t\t$str = $this->firstName.' '.$this->lastName;\n\t\t\t}\n\t\t\tif($admin->properCaseNames)\n\t\t\t\t$str = $this->ucwords_specific($str,array('-',\"'\",'.'),'UTF-8');\n\t\t\t\n\t\t\t$this->name = $str;\n\t\t}\n\t}",
"public static function addURL($urlname,$controller,$action) {\n\t\tself::$url[$urlname] = array(\"controller\" => $controller, \"action\" => $action);\n\t}"
] |
[
"0.6104693",
"0.60034215",
"0.594364",
"0.5837445",
"0.5707182",
"0.5692173",
"0.5675485",
"0.5630951",
"0.56102884",
"0.5476815",
"0.545445",
"0.54525024",
"0.5434364",
"0.54272175",
"0.54054123",
"0.5400801",
"0.5400801",
"0.5392201",
"0.537342",
"0.5341836",
"0.5292736",
"0.5292736",
"0.52820784",
"0.52778566",
"0.52637047",
"0.52604777",
"0.52259994",
"0.5204323",
"0.5164632",
"0.5157125"
] |
0.6443632
|
0
|
Action for rendering account settings in the grid
|
public function actionAccountsettings() {
\Yii::$app->view->title = 'ACA Reporting Service | Account Settings';
$this->layout = 'main';
$session = \Yii::$app->session;
$admin_permissions = $session ['admin_permissions'];
if (\Yii::$app->SessionCheck->isLogged () == true && in_array("8", $admin_permissions)) // checking logged session
{
/*if(\Yii::$app->Permission->CheckAdminactionpermission ( '8' ) == true)
{*/
$model_settings=TblAcaGlobalSettings::Findemailsettings(); //getting data
if(!empty($model_settings)){
$name=$model_settings->name; //assigning data to variable
$value=$model_settings->value;
$setting_id=$model_settings->setting_id;
}else{
$name=''; //assigning data to variable
$value='no data available';
$setting_id='';
}
return $this->render('accountsettings' //render the values to screen
,['name'=>$name,
'value'=>$value,
'setting_id'=>$setting_id]);
/* }else{
\Yii::$app->session->setFlash ( 'error', 'Permission denied' );
return $this->redirect ( array (
'/admin'
) );
}*/
} else {
\Yii::$app->SessionCheck->adminlogout (); // Redirecting to login page if session destroyed
return $this->goHome ();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function accountSettings() {\n\t\t//assign public class values to function variable\n\t\t$data = $this->data;\n\t\t$data['common_data'] = $this->common_data;\n\t\t$data['page'] = 'change_password';\n\t\t$data['pageName'] = 'Change Password';\n\t\tif($data['common_data']['user_data']['role'] == INACTIVE_STATUS_ID){\n\t\t\theader(\"Location: \".ROUTE_PROFILE);\n\t\t\tdie();\n\t\t}\n\t\t$data['tutor_details'] = $this->profile_model->getTutorDetailsById($data['common_data']['user_id']);\n\t\t//Getting all payment details\n\t\t$data['payment_details'] = $this->payment_model->getPaymentDetailsById($data['common_data']['user_id']);\n\t\t$data['tutor_badges'] = $this->user_model->getTutorBadges($data['common_data']['user_id']);\n\t\t$data['badges'] = $this->user_model->getBadges();\n\n\t\t$template['body_content'] = $this->load->view('frontend/profile/account-settings', $data, true);\t\n\t\t$this->load->view('frontend/layouts/template', $template, false);\n\t}",
"public function render_settings_page()\n {\n }",
"public function actionSettings(){\n $user = Users::findOne(\\Yii::$app->user->getId());\n return $this->render('settings', ['user'=>$user]);\n }",
"public function __invoke()\n {\n $account = Auth::user();\n\n return $this->getView('settings', compact('account'));\n }",
"public function render_settings_page() {\n\t\tinclude( get_inc_dir() . '/templates/admin-settings.php' );\n\t}",
"public function settings_page() { ?>\n\n <div class=\"wrap\">\n <?php $this->settings_api->settings_html(); ?>\n </div><?php\n }",
"function companysettings() {\n $this->auth(COMP_ADM_LEVEL);\n $company_id = $this->uri->segment(3);\n $data['company_id'] = $company_id;\n $data['records'] = $this->m_company_settings->getByCompanyId($company_id);\n $this->load->view('admin/company_admin/v_settings', $data);\n }",
"function settings() \n {\n $api = new Module_UserManagement_API();\n $view = Core_View::factory('usersettings');\n\n $user = $api->getUser();\n\n $settings = array();\n $settings[] = array(\"name\" => 'UserID',\n \"id\" => 'userid', \n \"value\" => $user['userid'], \n \"editable\" => false);\n\n $settings[] = array(\"name\" => 'Password',\n \"id\" => 'password', \n \"value\" => '********', \n \"editable\" => true);\n\n $settings[] = array(\"name\" => 'Maximum Heart Rate',\n \"id\" => 'max_heartrate', \n \"value\" => $user['max_heartrate'], \n \"editable\" => true);\n\n $settings[] = array(\"name\" => 'Resting Heart Rate',\n \"id\" => 'resting_heartrate', \n \"value\" => $user['resting_heartrate'], \n \"editable\" => true);\n\n $settings[] = array(\"name\" => 'Date of Birth',\n \"id\" => 'dob', \n \"value\" => $user['dob'], \n \"editable\" => true);\n\n $settings[] = array(\"name\" => 'Rider Weight',\n \"id\" => 'rider_weight', \n \"value\" => $user['rider_weight'], \n \"editable\" => true);\n\n $settings[] = array(\"name\" => 'Bike Weight',\n \"id\" => 'bike_weight', \n \"value\" => $user['bike_weight'], \n \"editable\" => true);\n\n $settings[] = array(\"name\" => 'Athlete',\n \"id\" => 'athlete', \n \"value\" => $user['athlete'] ? 'Yes' : 'No', \n \"editable\" => true);\n\n $settings[] = array(\"name\" => 'Coach',\n \"id\" => 'coach', \n \"value\" => $user['coach'] ? 'Yes' : 'No', \n \"editable\" => true);\n\n $view->settings = $settings;\n\n echo $view->render();\n }",
"public function initialSettingAction() {\n return $this->render(\"ClassUserBundle:Profiles:AccountSettingsContainer.html.twig\");\n }",
"public function getSettings()\n {\n $this->view('user.settings');\n }",
"public function settings_page() {\n\t\tinclude_once( dirname( __FILE__ ) . '/class-vendor-admin-settings.php' );\n\t\tVendor_Admin_Settings::output();\n\t}",
"public function bp_settings_tab_action() {\n\t\techo $this->get_instance( \\MyVideoRoomExtrasParking\\Library\\SectionTemplates::class )->account_centre_landing();\n\t}",
"public function settingsview() {\r\n $this->logger->info(\"Action Settings View \");\r\n $this->template->display('listsettings', $this->combovalue, 'settings', '');\r\n }",
"function settings_html() {\n $this->render_setting( 'label_any' );\n $this->render_setting( 'modifiers' );\n $this->render_setting( 'orderby' );\n $this->render_setting( 'count' );\n }",
"public function settings_page() {\n\t\t// Current tab.\n\t\t$tab = Template::current_tab();\n\n\t\t// Render settings header.\n\t\t$this->view( 'settings/common/header' );\n\n\t\t// Render settings page.\n\t\t$this->view( 'settings/settings', [\n\t\t\t'title' => Template::tabs()[ $tab ],\n\t\t\t'tab' => $tab,\n\t\t\t'form_url' => Template::settings_page(\n\t\t\t\t$tab,\n\t\t\t\t$this->is_network()\n\t\t\t),\n\t\t] );\n\n\t\t// Render settings footer.\n\t\t$this->view( 'settings/common/footer' );\n\t}",
"public function getSettingsHtml()\n {\n return craft()->templates->render('controlleractionfield/fieldtypes/controlleraction/settings', array(\n 'settings' => $this->getSettings(),\n 'placeholders' => $this->getPlaceholderStrings(),\n ));\n }",
"public function _settings_field_account() {\n global $zendesk_support;\n ?>\n <?php if ( ! $zendesk_support->settings['account'] ): ?>\n <strong>http://<input type=\"text\" style=\"width: 120px;\" class=\"regular-text\" id=\"zendesk_account\"\n name=\"zendesk-settings[account]\"\n value=\"<?php echo $zendesk_support->settings[\"account\"]; ?>\"/>.zendesk.com</strong> <br/>\n <span class=\"description\">Even if you have host mapping, please use your subdomain here.<br/>\n We will automatically detect if you use SSL or not.</span>\n <?php else: ?>\n http://<input type=\"text\" style=\"width: 120px; display: none;\" class=\"regular-text\" id=\"zendesk_account\"\n name=\"zendesk-settings[account]\" value=\"<?php echo $zendesk_support->settings[\"account\"]; ?>\"/>\n <strong id=\"zendesk_account_string\"><?php echo $zendesk_support->settings['account']; ?></strong>.zendesk.com<br/>\n <span class=\"description\">\n <a id=\"zendesk_account_change\" href=\"#\"><?php _e( 'Click here to change your subdomain', 'zendesk' ); ?></a>\n </span>\n <?php endif; ?>\n <?php\n }",
"public function mySettingsPage()\n {\n return view('frontEnd.usersPanel.settings');\n }",
"public function settings() {\n \n // Verify if is a team's member\n if ( $this->session->userdata( 'member' ) ) {\n redirect('user/app/dashboard');\n }\n \n // Check if the current user is admin and if session exists\n $this->check_session($this->user_role, 0);\n \n // Verify if account is confirmed\n $this->_check_unconfirmed_account();\n \n // Load Team Model\n $this->load->model('team');\n \n if ( file_exists( APPPATH . 'language/' . $this->config->item('language') . '/default_settings_lang.php') ) {\n $this->lang->load( 'default_settings', $this->config->item('language') );\n }\n \n // Get User Information\n $getdata = $this->user->get_user_info($this->user_id);\n\n // Get User's options\n $options = $this->user_meta->get_all_user_options($this->user_id);\n\n // display user data in settings page\n $this->content = array(\n 'udata' => $getdata,\n 'options' => $options\n );\n\n // Load view/user/settings.php file\n $this->body = 'user/settings';\n\n $this->user_layout();\n \n }",
"public function settings()\n {\n\n $this->data['page'] = 'settings';\n $this->data['user'] = $this->user;\n\n // get privacy settings\n\n $my_privacy = explode(',',$this->user['privacy_settings']);\n\n $this->data['settings'] = $my_privacy;\n\n $this->load->view('/dash/header',$this->data);\n $this->load->view('/dash/settings',$this->data);\n $this->load->view('/dash/footer',$this->data);\n\n }",
"private function render_settings() {\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<h1><?php esc_html_e( 'Network Mail', 'simple-smtp' ); ?></h1>\n\t\t\t<form action='edit.php?action=wpsimplesmtpms' method='post'>\t\n\t\t\t\t<?php\n\t\t\t\twp_nonce_field( 'simple-smtp-ms' );\n\t\t\t\tdo_settings_sections( 'wpsimplesmtp_smtp_ms' );\n\t\t\t\tsubmit_button();\n\t\t\t\t?>\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\t}",
"function show_settings_tab(){\n woocommerce_admin_fields($this->get_settings());\n }",
"public function settingsPage()\n\t{\n\t\t$this->setForms();\n\t\tinclude( \\GFormProtected\\Helpers::view('settings/settings') );\n\t}",
"public function managesettingsview() {\r\n $this->logger->info(\"Action Manage Settings View \");\r\n $this->template->display('displaylistsettings', $this->combovalue, 'settings', '', '');\r\n }",
"public function options_page() {\n\t\t$this->render_settings();\n\t}",
"public function show_settings() {\n\n\t\twoocommerce_admin_fields( $this->get_settings() );\n\t}",
"public function index() {\n\n\t\t$this->Crud->addListener('SettingsSubSection', 'SettingsSubSection');\n\n\t\t$this->set('title_for_layout', __('Visualisation Settings'));\n\t\t$this->set('subtitle_for_layout', __('Use visualisations to control what is displayed to the logged user. By default they are enabled, meaning users will only see items that relate to them.'));\n\t\t\n\t\t$this->Crud->on('beforePaginate', array($this, '_beforePaginate'));\n\t\t$this->Crud->execute();\n\t}",
"public function settings()\n\t{\n\t\t$this->data['admins'] = User::whereHas('UserTypes',function($q){\n\t\t\t$q->where('name','Admin');\n\t\t})->get();\n\t\treturn $this->renderView('admin.admins.index');\n\t}",
"public function settings_screen() {\n\t\tglobal ${class_name};\n\t\tdo_action( ${class_name}->token . '_before_settings' );\n\t\tdo_action( $this->token . '_before_settings' );\n\t\tsettings_fields( $this->token );\n\t\tdo_settings_sections( $this->token );\n\t\tdo_action( $this->token . '_after_settings' );\n\t\tdo_action( ${class_name}->token . '_after_settings' );\n\t\tsubmit_button();\n\t}",
"public function actionSettingsIndexTemplate()\n\t{\n\t\t$settingsModel = new SproutForms_SettingsModel;\n\n\t\t$settings = craft()->db->createCommand()\n\t\t\t->select('settings')\n\t\t\t->from('plugins')\n\t\t\t->where('class=:class', array(':class'=> 'SproutForms'))\n\t\t\t->queryScalar();\n\n\t\t$settings = JsonHelper::decode($settings);\n\t\t$settingsModel->setAttributes($settings);\n\n\t\t$variables['settings'] = $settingsModel;\n\n\t\t// Load our template\n\t\t$this->renderTemplate('sproutforms/settings', $variables);\n\n\t}"
] |
[
"0.7329479",
"0.69178987",
"0.68117756",
"0.67552465",
"0.6635608",
"0.65705246",
"0.65612024",
"0.6526133",
"0.64953303",
"0.6494386",
"0.64513487",
"0.6393307",
"0.63841826",
"0.6339852",
"0.63394666",
"0.63175666",
"0.6250877",
"0.62309754",
"0.62214327",
"0.6189551",
"0.61894906",
"0.61465037",
"0.6141256",
"0.6137434",
"0.6108469",
"0.6101103",
"0.61008596",
"0.60951895",
"0.60862005",
"0.608448"
] |
0.74470586
|
0
|
Action for updating element label
|
public function actionUpdateelementlabel() {
if (\Yii::$app->SessionCheck->isLogged () == true) // checking logged session
{
$post = \Yii::$app->request->post ();
$id = $post ['id'];
$elementid = $post ['elementid'];
if (! empty ( $id )) {
$transaction = \Yii::$app->db->beginTransaction (); // begining the transaction
try {
$model = TblAcaElementMaster::Elementuniquedetails ( $id );
$model->element_label = strip_tags ( $elementid );
if ($model->save () && $model->validate ()) {
echo 'success'; // sending response to ajax
$transaction->commit (); // commit the transaction
} else {
echo 'fail'; // sending response to ajax
}
} catch ( Exception $e ) { // catching the exception
$msg = $e->getMessage ();
\Yii::$app->session->setFlash ( 'error', $msg );
$transaction->rollback (); //if exception occurs transaction rollbacks
}
} else {
echo 'fail'; // sending response to ajax
}
} else {
\Yii::$app->SessionCheck->adminlogout (); // Redirecting to login page if session destroyed
return $this->goHome ();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function setLabel();",
"public function setLabel() {\n }",
"public function setLabel($newLabel);",
"public function ajax_edit_label($new_label) { \n }",
"function setLabel($value){\r\n\t\t$this->label = $value;\r\n\t}",
"protected function getActionLabel() {}",
"public function updated(Label $label)\n {\n //\n }",
"public function label() { }",
"public function autoLabelNeeded();",
"protected\n\tfunction getLabel()\n\t{\n\t\tPluginHelper::importPlugin(\"jevents\");\n\t\t$id = $this->id;\n\t\tif (version_compare(JVERSION, '3.3.0', '<'))\n\t\t{\n\t\t\t$res = Factory::getApplication()->triggerEvent('onEditMenuItem', array(&$this->data, &$this->value, $this->type, $this->name, $this->id, $this->form));\n\t\t}\n\t\tif (isset($this->data[$id]))\n\t\t{\n\t\t\t$this->element['label'] = $this->data[$id]->label;\n\t\t\t$this->description = $this->data[$id]->description;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->element['label'] = \"\";\n\t\t\t$this->description = \"\";\n\t\t}\n\n\t\treturn parent::getLabel();\n\n\t}",
"public function getLabel()\n {\n }",
"public function getLabel()\n {\n }",
"abstract function add_label();",
"public function label()\n {\n\n }",
"public function getLabel() {}",
"public function getLabel() {}",
"public function getLabel() {\n\t}",
"public function label();",
"public function label();",
"public function label();",
"public function label();",
"public function label();",
"public function label();",
"public function label();",
"public function label();",
"public function setLabel($label);",
"public function setLabel($label);",
"public function setLabel($label);",
"public function setLabel($label);",
"public abstract function label();"
] |
[
"0.6971502",
"0.68980724",
"0.6877959",
"0.67487746",
"0.6745942",
"0.66895103",
"0.6687835",
"0.65699756",
"0.6501189",
"0.64428407",
"0.641797",
"0.641797",
"0.6371629",
"0.6347407",
"0.63402",
"0.63402",
"0.63252085",
"0.63045657",
"0.63045657",
"0.63045657",
"0.63045657",
"0.63045657",
"0.63045657",
"0.63045657",
"0.63045657",
"0.6212917",
"0.6212917",
"0.6212917",
"0.6212917",
"0.6211855"
] |
0.69858074
|
0
|
Action for adding brand details
|
public function actionAddbrand() {
\Yii::$app->view->title = 'ACA Reporting Service | Add Brand';
$this->layout = 'main';
$session = \Yii::$app->session;
$admin_permissions = $session ['admin_permissions'];
if (\Yii::$app->SessionCheck->isLogged () == true && in_array("6", $admin_permissions)) // checking logged session
{
$logged_user_id = $session ['admin_user_id']; // collecting variables from session
$model_acabrands = new TblAcaBrands ();
$model_acabrands->scenario = 'save'; // model scenario for validating
$transaction = \Yii::$app->db->beginTransaction (); // begining the transaction
try {
if ($model_acabrands->load ( \Yii::$app->request->post () )) {
$brand_details = \Yii::$app->request->post ();
$name = $brand_details ['TblAcaBrands'] ['brand_name'];
$checkmodel = TblAcaBrands::Checkbrandname ( $name ); // checking for particular brand name
if (empty ( $checkmodel )) {
$model_acabrands->attributes = $brand_details ['TblAcaBrands'];
$model_acabrands->created_date = date ( 'Y-m-d H:i:s' );
$model_acabrands->modified_date = date ( 'Y-m-d H:i:s' );
$model_acabrands->created_by = $logged_user_id;
$model_acabrands->is_deleted = 1;
$image = UploadedFile::getInstance ( $model_acabrands, 'brand_logo' ); // getting instance of a uploaded file
$rnd = rand ( 0, 99999 );
if ($image) {
$ext = explode ( ".", $image->name );
$model_acabrands->brand_logo = $ext [0] . '_1_' . $rnd . '.' . $ext [1];
$path = \Yii::$app->basePath . '/Images/profile_image/brand_logo/' . $model_acabrands->brand_logo;
}
if ($model_acabrands->save () && $model_acabrands->validate ()) { // model validated(server side validation)
if ($image) {
$image->saveAs ( $path );
chmod ( $path, 0755 );
}
$transaction->commit (); // commit the transaction
\Yii::$app->session->setFlash ( 'success', 'Brand added successfully' );
return $this->redirect ( array (
'/admin/masterdata' // redirecting to grid if brand is added
) );
} else {
return $this->render ( 'addbrand', [ // render the array to addbrand view file
'model' => $model_acabrands
] );
}
} else {
$model_acabrands->addError ( 'brand_name', 'Brand name address is already exist.' ); // model adding error
}
}
} catch ( Exception $e ) { // any exceptions catch throws error msg
$msg = $e->getMessage ();
\Yii::$app->session->setFlash ( 'error', $msg );
$transaction->rollback (); //if exception occurs transaction rollbacks
}
return $this->render ( 'addbrand', [ // render the array to addbrand view file
'model' => $model_acabrands
] );
} else {
\Yii::$app->SessionCheck->adminlogout (); // Redirecting to login page if session destroyed
return $this->goHome ();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function add_brand() {\n\t\t$values=array(\"brand_name\"=>$_POST['brand_name'],\"description\"=>$_POST['description']);\n\t\tif($this->insert(\"brands\",$values)) {\n\t\t\t$result=$this->runQuery('getAll','select max(id) as id from brands');\n\t\t\techo json_encode($result);\n\t\t}\n\t\telse\n\t\t\techo 'Error while inserting';\n\t}",
"public function addBrand(){\n return view('merchant.brand.addbrand');\n }",
"public function create(){\n config(['global.icon_content_title' => 'icon-bookmark']);\n config(['global.text_content_title' => 'Add new brand']);\n\n //set submit route\n config(['global.submit_link' => 'store.vehicle_brand']);\n //set index route\n config(['global.index_link' => '/vehicle-brands']);\n\n return view('vehicle.brand.create');\n }",
"public function create()\n {\n return view('admin.brand.add_brand');\n }",
"function addBrand($brand)\n {\n $GLOBALS['DB']->exec(\"INSERT INTO stores_brands (store_id, brand_id) VALUES (\n {$this->getId()},\n {$brand->getId()}\n );\");\n }",
"public function actionCreate()\n {\n $model = new Brand();\n\n if (Yii::$app->request->isAjax && $model->load(Yii::$app->request->post())) {\n Yii::$app->response->format = Response::FORMAT_JSON;\n return ActiveForm::validate($model);\n }\n\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n if ($model->productBrandId) {\n $brandModel = ProductBrand::findOne(['id' => $model->productBrandId]);\n if ($brandModel) {\n $brandModel->setScenario(ProductBrand::SCENARIO_SET_BRAND);\n $brandModel->brandId = $model->id;\n $brandModel->save();\n }\n }\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"function add_brand_act(){\n $data['brand'] = $this->m_rental->get_data('car_brand')->result();\n \n $brand_id = $this->input->post('brand_id');\n $brand_desc = $this->input->post('brand_desc');\n $brand_status = $this->input->post('brand_status');\n\n $this->form_validation->set_rules('brand_desc','Brand','required');\n $this->form_validation->set_rules('brand_status','Status','required');\n \n if($this->form_validation->run() != false){\n $data = array(\n 'brand_id' => $brand_id ,\n 'brand_desc' => $brand_desc ,\n 'brand_status ' => $brand_status\n );\n\n $this->m_rental->insert_data($data, 'car_brand');\n redirect(base_url().'home/add_car_act');\n } else { \n $this->load->view('header');\n $this->load->view('admin/add_brand',$data);\n $this->load->view('footer');\n } \n }",
"public function create()\n {\n return view('data_brand.addBrand');\n }",
"public function createAction()\n {\n $entity = $this->get('mqm_brand.brand_manager')->createBrand();\n $form = $this->createForm(new BrandType(), $entity);\n $request = $this->getRequest();\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $this->get('mqm_brand.brand_manager')->saveBrand($entity);\n\n return $this->redirect($this->generateUrl('TKShopBackendBrandsShowAll'));\n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }",
"public function create()\n {\n $listBrand=Brand::all();\n return view('admin.brand.add',compact('listBrand'));\n }",
"public function actionEditbrand() {\n\t\t\\Yii::$app->view->title = 'ACA Reporting Service | Edit Brand';\n\t\t$this->layout = 'main';\n\t\t$session = \\Yii::$app->session;\n\t\t$admin_permissions = $session ['admin_permissions'];\n\t\tif (\\Yii::$app->SessionCheck->isLogged () == true && in_array(\"6\", $admin_permissions)) \t\t// checking logged session\n\t\t{\n\t\t\t$logged_user_id = $session ['admin_user_id']; // collecting variables from session\n\t\t\t$get = \\Yii::$app->request->get ();\n\t\t\t$id = $get ['id'];\n\t\t\t$encrypt_component = new EncryptDecryptComponent ();\n\t\t\t$id = $encrypt_component->decryptUser ( $id ); // decrypting id\n\t\t\tif (! empty ( $id )) {\n\t\t\t\t\n\t\t\t\t$model_acabrands = TblAcaBrands::Branduniquedetails ( $id );\n\t\t\t\t$old_image = $model_acabrands ['brand_logo'];\n\t\t\t\t$old_brandname = $model_acabrands ['brand_name'];\n\t\t\t\t$transaction = \\Yii::$app->db->beginTransaction (); // begining the transaction\n\t\t\t\ttry {\n\t\t\t\t\tif ($model_acabrands->load ( \\Yii::$app->request->post () )) {\n\t\t\t\t\t\t$brand_details = \\Yii::$app->request->post ();\n\t\t\t\t\t\t$name = $brand_details ['TblAcaBrands'] ['brand_name'];\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($old_brandname == $name) { // checking for particular brand name\n\t\t\t\t\t\t\t$checkmodel = '';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$checkmodel = TblAcaBrands::Checkbrandname ( $name );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (empty ( $checkmodel )) { // adding brand if brand name is not exist\n\t\t\t\t\t\t\t$model_acabrands->attributes = $brand_details ['TblAcaBrands'];\n\t\t\t\t\t\t\t$model_acabrands->support_email = $brand_details ['TblAcaBrands'] ['support_email'];\n\t\t\t\t\t\t\t$model_acabrands->support_number = $brand_details ['TblAcaBrands'] ['support_number'];\n\t\t\t\t\t\t\t$model_acabrands->modified_date = date ( 'Y-m-d H:i:s' );\n\t\t\t\t\t\t\t$model_acabrands->modified_by = $logged_user_id;\n\t\t\t\t\t\t\t$model_acabrands->is_deleted = 1;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$image = UploadedFile::getInstance ( $model_acabrands, 'brand_logo' ); // getting instance of a uploaded file\n\t\t\t\t\t\t\t$rnd = rand ( 0, 99999 );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (! empty ( $image )) { // checking for image\n\t\t\t\t\t\t\t\t$ext = explode ( \".\", $image->name );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$model_acabrands->brand_logo = $ext [0] . '_1_' . $rnd . '.' . $ext [1];\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$path = \\Yii::$app->basePath . '/Images/profile_image/brand_logo/' . $model_acabrands->brand_logo;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$model_acabrands->brand_logo = $old_image;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($model_acabrands->save () && $model_acabrands->validate ()) { // model validated(server side validation)\n\t\t\t\t\t\t\t\tif (! empty ( $image )) { // saving path for image\n\t\t\t\t\t\t\t\t\t$image->saveAs ( $path );\n\t\t\t\t\t\t\t\t\tchmod ( $path, 0755 );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$transaction->commit (); // commit the transaction\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\\Yii::$app->session->setFlash ( 'success', 'Brand updated successfully' );\n\t\t\t\t\t\t\t\treturn $this->redirect ( array ( // redirecting to grid if brand is updated\n\t\t\t\t\t\t\t\t\t\t'/admin/masterdata' \n\t\t\t\t\t\t\t\t) );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\treturn $this->render ( 'editbrand', [ // render the array to editbrand view file\n\t\t\t\t\t\t\t\t\t\t'model' => $model_acabrands \n\t\t\t\t\t\t\t\t] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$model_acabrands->addError ( 'brand_name', 'Brand name is already exist.' ); // model adding error\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch ( Exception $e ) { // any exceptions catch throws error msg\n\t\t\t\t\t\n\t\t\t\t\t$msg = $e->getMessage ();\n\t\t\t\t\t\\Yii::$app->session->setFlash ( 'error', $msg );\n\t\t\t\t\t\n\t\t\t\t\t$transaction->rollback (); //if exception occurs transaction rollbacks\n\t\t\t\t}\n\t\t\t\treturn $this->render ( 'editbrand', [ // render the array to editbrand view file\n\t\t\t\t\t\t'model' => $model_acabrands \n\t\t\t\t] );\n\t\t\t}\n\t\t} else {\n\t\t\t\\Yii::$app->SessionCheck->adminlogout (); // Redirecting to login page if session destroyed\n\t\t\t\n\t\t\treturn $this->goHome ();\n\t\t}\n\t}",
"public function admin_add_brand(){\n\t\t\n\t\tif($this->request->isPost() && @$_POST['modeval'] == \"\")\n\t\t{\n\t\t\t$this->autoRender = false;\n\t\t//pr($this->request->data);\n\t\t//die;\n\t\t$type = array('image/jpeg', 'image/jpg', 'image/gif', 'image/png', 'image/pjpeg','images/x-png','image/PNG');\n\t\t//die;\n\t\t\t$data = array();\n\t\t\t$data['brand_name'] = $this->data['Brand']['brand_name'];\n\t\t\t$data['brand_image'] = $this->request->data['Brand']['brand_image']['name'];\n\t\t\t$this->Brand->set($data);\n\t\t\t\n\t\t\tif($this->Brand->brandValidation()){\n\t\t\t\tif(in_array($this->request->data['Brand']['brand_image']['type'],$type)){\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$data['brand_name'] = $this->data['Brand']['brand_name'];\n\t\t\t\t\n\t\t\t\t\t//$data['brand_image']=\"images/\".$this->request->data['Brand']['file']['name'];\n\t\t\t\t\t$data['brand_image']=\"images/\".time().\"_\".$this->request->data['Brand']['brand_image']['name'];\n\t\t\t\t\t$Brand = $this->Brand->save($data);\n\t\t\t\t\t\n\t\t\t\t\t//echo json_encode($Brand);\n\t\t\t\t\tif($Brand){\n\t\t\t\t\t move_uploaded_file($this->request->data['Brand']['brand_image']['tmp_name'], WWW_ROOT . 'images/'.time().\"_\" .$this->request->data['Brand']['brand_image']['name']);\n\t\t\t\t\t\techo json_encode(array(\"status\"=>\"success\",\"message\"=>\"your Brand is successfully added!\",\"data\"=>$Brand));\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t\techo json_encode(array(\"status\"=>\"error\",\"message\"=>\"Please upload image type!\"));\n\t\t\t\t\t}\n\t\t\t}else{\n\t\t\t\techo json_encode(array(\"status\"=>\"error\",\"message\"=>$this->Brand->validationErrors));\n\t\t\t}\n\t\t\n\t\t\n\t}\n\t\n\t\tif($this->request->isPost() && $_POST['modeval'] == \"delete\")\n\t\t{\n\t\t\t$model = \"Brand\";\n\t\t\tforeach($_POST['BrandIds'] as $ids)\n\t\t\t{\n\t\t\t\t$id = $ids;\n\t\t\t\t$this->$model->id = $id;\n\t\t\t\t\n\t\t\t\t$ret = $this->$model->beforeDelete();\n\t\t\t\t$this->$model->create();\n\t\t\t\tif($ret==1){\t\t\t\n\t\t\t\t\t$this->$model->deleteAll(array($model.'.id'=>$id));\n\t\t\t\t\t$this->set('success', 1);\n\t\t\t\t}else{\n\t\t\t\t\t$this->set('error', 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$limit = $this->limit;\n\t\t$Brand=$this->Brand->find('all');\n\t\t$count = count($Brand);\n\t\t$this->set('Brand',$Brand);\n\t\t$this->paginate = array('limit'=>$limit, 'order'=>array('id'=>'DESC'));\t\t\n\t\t$Brand= $this->Paginator->paginate('Brand');\n\t\t\n\t\tif(isset($this->params->params['named']['page'])){\n\t\t\t$this->set('pages', $this->params->params['named']['page']);\n\t\t}else{\n\t\t\t$this->set('pages', 1);\n\t\t}\n\t\t\n\t\t$this->set('srNo',(isset($this->params->params['named']['page'])? ($this->params->params['named']['page']-1)*$limit:'0'));\n\t\t$this->set('Brand', $Brand);\n\t\t$this->set('limit', $limit);\n\t\t$this->set('count', $count);\n\t\t\n\t\t\n\n\t}",
"function addBrand($Brand){\r\n\r\n $this->app->log->info(__CLASS__ . '::' . __METHOD__);\r\n $this->app->log->info('Brand : '.$this->dumpRet($Brand));\r\n $dao = new \\PNORD\\Model\\BrandDAO($this->app); \r\n return $dao->addBrand($Brand); \r\n\r\n }",
"public function admin_save_brandname(){\n\t\t$this->autoRender = false;\n\t\tif($this->request->isPost()){\n\t\t\t$type = array('image/jpeg', 'image/jpg', 'image/gif', 'image/png', 'image/pjpeg','images/x-png','image/PNG');\n\t\t\t//$this->Brand->set($this->data);\n\t\t\t$data = array();\n\t\t\t$data['id'] = $this->data['Brand']['id'];\n\t\t\t$data['brand_name'] = $this->data['Brand']['brand_name'];\n\t\t\tif(isset($this->request->data['Brand']['brand_image']['name']))\n\t\t\t $data['brand_image'] = $this->request->data['Brand']['brand_image']['name'];\n\t\t\t\n\t\t\t$this->Brand->set($data);\n\t\t\tif($this->Brand->brandValidation()){\n\t\t\t\tif(isset($this->request->data['Brand']['brand_image']['type'])){\n\t\t\t\t\tif(in_array($this->request->data['Brand']['brand_image']['type'],$type)){\n\t\t\t\t\t\t$data['id'] = $this->data['Brand']['id'];\n\t\t\t\t\t\t$data['brand_name'] = $this->data['Brand']['brand_name'];\n\t\t\t\t\t\t$fileName = \"images/\".time().\"_\".$this->request->data['Brand']['brand_image']['name'];\n\t\t\t\t\t\t$data['brand_image'] = $fileName;\n\t\t\t\t\t\t$brandRes = $this->Brand->save($data);\n\t\t\t\t\t\t move_uploaded_file($this->request->data['Brand']['brand_image']['tmp_name'], WWW_ROOT . $fileName);\n\t\t\t\t\t\techo json_encode(array(\"status\"=>\"success\",\"message\"=>\"Your Brand is successfully edited!\",\"data\"=>$brandRes));\n\t\t\t\t\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo json_encode(array(\"status\"=>\"error\",\"message\"=>\"Please upload image type!\"));\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$brandRes = $this->Brand->save($data);\n\t\t\t\t\techo json_encode(array(\"status\"=>\"success\",\"message\"=>\"Your Brand is successfully edited!\",\"data\"=>$brandRes));\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\techo json_encode(array(\"status\"=>\"error\",\"message\"=>$this->Brand->validationErrors));\n\t\t\t}\n\t\t}\n\t}",
"public function addBrand(Request $request)\n {\n $brand = new Brand();\n // Slugify initialisation to create the slug data using the name\n $slugify = new Slugify();\n // Form creation\n $addForm = $this->createForm(BrandType::class, $brand);\n // Request handling to check if the form has been submitted\n $addForm->handleRequest($request);\n if ($addForm->isSubmitted() && $addForm->isValid()) {\n $brand->setSlug($slugify->slugify($brand->getName()));\n // Persistence in database \n $manager = $this->getDoctrine()->getManager();\n $manager->persist($brand);\n $manager->flush();\n // Adding a flash message to inform the user\n $this->addFlash('success', \"Votre marque {$brand->getName()} a bien été ajoutée\");\n return $this->redirectToRoute('brand_index');\n }\n return $this->render('brand/add.html.twig', [\n 'addForm' => $addForm->createView(),\n ]);\n }",
"public function create()\n {\n return view('admin.brand.create');\n }",
"public function create()\n {\n return view('back.Brand.create');\n }",
"public function addBrand($brandName){\n\t\t\t \t$brandName = $this->fm->validation($brandName);\n\t\t\t \t$brandName = mysqli_real_escape_string($this->db->link,$brandName);\n\n\t\t\t \tif (empty($brandName)) {\n\t\t\t \t\t$emperrmsg = \"<span class='error'>Filed must not be empty !!</span>\";\n\t\t \t\t\treturn $emperrmsg;\n\t\t\t \t}else {\n\t\t\t \t\t$query = \"INSERT INTO tbl_brand(brandName) VALUES('$brandName')\";\n\t\t\t \t\t$result = $this->db->insert($query);\n\t\t\t \t\tif ($result) {\n\t\t\t \t\t\t$successmsg = \"<span class='successs'>Brand Added Successfully !!</span>\";\n\t\t \t\t\t\treturn $successmsg;\n\t\t\t \t\t}else {\n\t\t\t \t\t\t$errormsg = \"<span class='error'>Something went wrong !!</span>\";\n\t\t \t\t\t\treturn $errormsg;\n\t\t\t \t\t}\n\t\t\t\t\t}\n\t\t\t }",
"public function manage_brand($brand_id='')\n\t{\n\t\t$data['brand_details']='';\n\t\tif($brand_id)\n\t\t{\n\t\t\t$data['brand_details']=$this->ref_brand->get($brand_id);\n\t\t\t$data['brand_images']=$this->lnk_brands_to_docs->get_brand_images($brand_id);\n\t\t}\n\t\t$data['page']='Manage brand';\n\t\t$view = 'admin/collection/brands/admin_manage_brand_view';\n\t\techo Modules::run('template/admin_template', $view, $data);\n\t}",
"public function newAction()\n {\n $entity = $this->get('mqm_brand.brand_manager')->createBrand();\n $form = $this->createForm(new BrandType(), $entity);\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }",
"public function create()\n {\n $this->data['brand'] = null;\n\n\t\treturn view('admin.brands.form', $this->data);\n }",
"function add_brand($params) {\n $this->db->insert('brands', $params);\n return $this->db->insert_id();\n }",
"public function create()\n {\n if (! Gate::allows('tire_brand_create')) {\n return abort(401);\n }\n return view('tire_brands.create');\n }",
"public function create()\n {\n return view('backend.pages.brand.create');\n }",
"public function create()\n {\n $item = new Brand();\n // $brandsList = Brand::all();\n\n return view('shop.admin.brands.edit', compact(\n 'item'\n ));\n\n }",
"public function store(CreateBrandsRequest $request)\n {\n $data = $request->all();\n if($request->slug == ''){\n $slug = $data['name'];\n $clean_slug = str_replace(\"&\", \"and\", strtolower($slug));\n $data['slug'] = Str::slug($clean_slug);\n }\n $brand = Brand::create($data);\n\n return redirect()->route('gjadmin.brands.index');\n }",
"function addBrand($name, $supplier_id)\n {\n// if ($supplierFind)\n// $supplier = $supplierFind['supplier_id'];\n// else {\n// $newSupplier = $this->insert(\"INSERT INTO `suppliers`(`name`)\n// VALUES ('$supplier')\");\n// $supplier = $newSupplier;\n// }\n\n return $this->insert(\"\n INSERT INTO `brands`(`name`, `supplier_id`)\n VALUES ('$name', $supplier_id)\");\n }",
"public function create()\n {\n $brands = CarBrand::all();\n\n\n return view('brand.create',compact('brands'));\n }",
"public function store(saveBrand $request)\n {\n // $validator = Validator::make($request->all(), [\n // 'brand_name' => 'required',\n // 'brand_desc' => 'required',\n // 'brand_image' =>'required',\n // 'brand_status'=> 'required',\n // ]);\n // if ($validator->fails()) {\n // return response()->json(['error' => $validator->errors()], 404);\n // }\n $brands = brand_product::create([\n 'brand_name' => $request->brand_name,\n 'brand_desc' => $request->brand_desc,\n 'brand_image' => $request->brand_image,\n 'brand_status' => $request->brand_status,\n ]);\n return response()->json([\n 'code' => 201,\n 'data' => $brands,\n ], 201);\n }",
"public function addJsonBrand()\n {\n $request = Request::createFromGlobals();\n $response = new JsonResponse();\n $content = $request->getContent();\n $errorContent = \"\";\n try {\n $brand = Brand::createFromJson($content);\n $exists = Brand::where(\"name\", \"=\", $brand->name)->first();\n if (!$exists) {\n $brand->save();\n $response->setStatusCode(201);\n $response->setContent($brand->jsonify());\n return $response->send();\n } else {\n $errorContent = \"Couldn't create brand. Name already exists.\";\n }\n } catch (\\Exception $e) {\n $errorContent = \"Error creating brand: \" . $e->getMessage();\n }\n $response->setContent(json_encode(array(\"error\" => $errorContent)));\n $response->setStatusCode(400);\n return $response->send();\n }"
] |
[
"0.75530785",
"0.72494304",
"0.71864915",
"0.71663606",
"0.7099125",
"0.70506537",
"0.70309633",
"0.70078987",
"0.6997177",
"0.6965964",
"0.6939739",
"0.690739",
"0.68616706",
"0.68568295",
"0.68412524",
"0.67978287",
"0.6781842",
"0.67607415",
"0.6753518",
"0.6735256",
"0.6679783",
"0.66695195",
"0.66620773",
"0.6656064",
"0.6646233",
"0.66152406",
"0.6613963",
"0.6612702",
"0.6581844",
"0.6581648"
] |
0.7623539
|
0
|
Action for updating brand details
|
public function actionEditbrand() {
\Yii::$app->view->title = 'ACA Reporting Service | Edit Brand';
$this->layout = 'main';
$session = \Yii::$app->session;
$admin_permissions = $session ['admin_permissions'];
if (\Yii::$app->SessionCheck->isLogged () == true && in_array("6", $admin_permissions)) // checking logged session
{
$logged_user_id = $session ['admin_user_id']; // collecting variables from session
$get = \Yii::$app->request->get ();
$id = $get ['id'];
$encrypt_component = new EncryptDecryptComponent ();
$id = $encrypt_component->decryptUser ( $id ); // decrypting id
if (! empty ( $id )) {
$model_acabrands = TblAcaBrands::Branduniquedetails ( $id );
$old_image = $model_acabrands ['brand_logo'];
$old_brandname = $model_acabrands ['brand_name'];
$transaction = \Yii::$app->db->beginTransaction (); // begining the transaction
try {
if ($model_acabrands->load ( \Yii::$app->request->post () )) {
$brand_details = \Yii::$app->request->post ();
$name = $brand_details ['TblAcaBrands'] ['brand_name'];
if ($old_brandname == $name) { // checking for particular brand name
$checkmodel = '';
} else {
$checkmodel = TblAcaBrands::Checkbrandname ( $name );
}
if (empty ( $checkmodel )) { // adding brand if brand name is not exist
$model_acabrands->attributes = $brand_details ['TblAcaBrands'];
$model_acabrands->support_email = $brand_details ['TblAcaBrands'] ['support_email'];
$model_acabrands->support_number = $brand_details ['TblAcaBrands'] ['support_number'];
$model_acabrands->modified_date = date ( 'Y-m-d H:i:s' );
$model_acabrands->modified_by = $logged_user_id;
$model_acabrands->is_deleted = 1;
$image = UploadedFile::getInstance ( $model_acabrands, 'brand_logo' ); // getting instance of a uploaded file
$rnd = rand ( 0, 99999 );
if (! empty ( $image )) { // checking for image
$ext = explode ( ".", $image->name );
$model_acabrands->brand_logo = $ext [0] . '_1_' . $rnd . '.' . $ext [1];
$path = \Yii::$app->basePath . '/Images/profile_image/brand_logo/' . $model_acabrands->brand_logo;
} else {
$model_acabrands->brand_logo = $old_image;
}
if ($model_acabrands->save () && $model_acabrands->validate ()) { // model validated(server side validation)
if (! empty ( $image )) { // saving path for image
$image->saveAs ( $path );
chmod ( $path, 0755 );
}
$transaction->commit (); // commit the transaction
\Yii::$app->session->setFlash ( 'success', 'Brand updated successfully' );
return $this->redirect ( array ( // redirecting to grid if brand is updated
'/admin/masterdata'
) );
} else {
return $this->render ( 'editbrand', [ // render the array to editbrand view file
'model' => $model_acabrands
] );
}
} else {
$model_acabrands->addError ( 'brand_name', 'Brand name is already exist.' ); // model adding error
}
}
} catch ( Exception $e ) { // any exceptions catch throws error msg
$msg = $e->getMessage ();
\Yii::$app->session->setFlash ( 'error', $msg );
$transaction->rollback (); //if exception occurs transaction rollbacks
}
return $this->render ( 'editbrand', [ // render the array to editbrand view file
'model' => $model_acabrands
] );
}
} else {
\Yii::$app->SessionCheck->adminlogout (); // Redirecting to login page if session destroyed
return $this->goHome ();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function update_brand() {\n\t\t$values=array(\"brand_name\"=>$_POST['brand_name'],\"description\"=>$_POST['description']);\n\t\t$where =array(\"id\"=>$_POST['brand_id']);\n\t\tif($this->update(\"brands\",$values,$where)) {\t\t\t\n\t\t\techo true;\n\t\t}\n\t\telse\n\t\t\techo 'Error while updating';\n\t}",
"public function testUpdateBrandUsingPUT()\n {\n }",
"public function edit(Brand $brand)\n {\n //\n }",
"public function edit(Brand $brand)\n {\n //\n }",
"public function edit(Brand $brand)\n {\n //\n }",
"public function edit(Brand $brand)\n {\n //\n }",
"public function editfnlBrand(Request $request)\n {\n $this->validate($request, [\n 'id'=> 'required',\n 'name' => 'required',\n ]);\n \n $id=$request->id;\n $accout = Brand::where(\"id\",$id)->get()->first();\n\n $accout->name = $request->name;\n\n $accout->updated_by = $request->user()->id;\n $datasaved=$accout->save();\n\n $updateproduct=Product::where('brandid',$id)->update(['brandname'=>$request->name]);\n \n\n return response()->json([\n 'message' => 'Menue created successfully'\n ], 200);\n }",
"public function admin_edit_brand($id = null){\n\t\tif($this->request->isPost()){\n\t\t\t$id = $this->data['id'];\n\t\t\t$name = $this->Brand->findById($id);\n\t\t\t//pr($name); die;\n\t\t\t$this->set('brand_name',$name['Brand']['brand_name']);\n\t\t\t$this->set('brand_image',$name['Brand']['brand_image']);\n\t\t\t$this->set('id',$id);\n\t\t}\n\t\n\t}",
"public function update(Request $request, Brand $brand)\n {\n //\n }",
"public function update(Request $request, Brand $brand)\n {\n //\n }",
"function updateBrand($Brand){\r\n\r\n $this->app->log->info(__CLASS__ . '::' . __METHOD__);\r\n // $this->app->log->info('Brand : '.$this->dumpRet($Brand));\r\n $dao = new \\PNORD\\Model\\BrandDAO($this->app); \r\n return $dao->updateBrand($Brand); \r\n\r\n }",
"function doUpdateBrand(Request $req)\n {\n //mencari id di tabel brand yang idnya sama dengan yang diterima\n $temp = Brands::find($req->id);\n $temp->brandName = $req->brandName;\n $temp->save(); //save data yang sudah diupdate\n return redirect('/');\n }",
"function updateBrandDetail($id)\n {\n //mencari brand yang idnya sama dengan diterima\n $brand = Brands::find($id);\n return view('updateBrandDetail')->with('brand',$brand);\n }",
"public function update($id){\n config(['global.icon_content_title' => 'icon-bookmark']);\n config(['global.text_content_title' => 'Edit Brand']);\n\n //set submit route\n config(['global.submit_link' => 'save_update.vehicle_brand']);\n //set index route\n config(['global.index_link' => '/vehicle-brands']);\n\n $master=VehicleBrandModel::where('id',$id)->first();\n return view('vehicle.brand.update')->with('master',$master);\n }",
"function update_brand($id, $params) {\n $this->db->where('id', $id);\n return $this->db->update('brands', $params);\n }",
"public function updated(Brand $brand)\n {\n session()->flash('success','برند '.$brand->title .' با موفقیت ویرایش شد.');\n }",
"public function update(Request $request, $brand_id)\n {\n echo $brand_id;\n $data=array();\n $data['brand_name']=$request->brand_name;\n $data['brand_description']=$request->brand_description;\n $data['publication_status']=$request->publication_status;\n \n DB::table('tbl_brand')\n ->where('brand_id',$brand_id)\n ->update($data);\n\n Session::put('message','Brand Updated Successfully !!');\n return Redirect::to('/all_brands');\n }",
"public function manage_brand($brand_id='')\n\t{\n\t\t$data['brand_details']='';\n\t\tif($brand_id)\n\t\t{\n\t\t\t$data['brand_details']=$this->ref_brand->get($brand_id);\n\t\t\t$data['brand_images']=$this->lnk_brands_to_docs->get_brand_images($brand_id);\n\t\t}\n\t\t$data['page']='Manage brand';\n\t\t$view = 'admin/collection/brands/admin_manage_brand_view';\n\t\techo Modules::run('template/admin_template', $view, $data);\n\t}",
"public function admin_save_brandname(){\n\t\t$this->autoRender = false;\n\t\tif($this->request->isPost()){\n\t\t\t$type = array('image/jpeg', 'image/jpg', 'image/gif', 'image/png', 'image/pjpeg','images/x-png','image/PNG');\n\t\t\t//$this->Brand->set($this->data);\n\t\t\t$data = array();\n\t\t\t$data['id'] = $this->data['Brand']['id'];\n\t\t\t$data['brand_name'] = $this->data['Brand']['brand_name'];\n\t\t\tif(isset($this->request->data['Brand']['brand_image']['name']))\n\t\t\t $data['brand_image'] = $this->request->data['Brand']['brand_image']['name'];\n\t\t\t\n\t\t\t$this->Brand->set($data);\n\t\t\tif($this->Brand->brandValidation()){\n\t\t\t\tif(isset($this->request->data['Brand']['brand_image']['type'])){\n\t\t\t\t\tif(in_array($this->request->data['Brand']['brand_image']['type'],$type)){\n\t\t\t\t\t\t$data['id'] = $this->data['Brand']['id'];\n\t\t\t\t\t\t$data['brand_name'] = $this->data['Brand']['brand_name'];\n\t\t\t\t\t\t$fileName = \"images/\".time().\"_\".$this->request->data['Brand']['brand_image']['name'];\n\t\t\t\t\t\t$data['brand_image'] = $fileName;\n\t\t\t\t\t\t$brandRes = $this->Brand->save($data);\n\t\t\t\t\t\t move_uploaded_file($this->request->data['Brand']['brand_image']['tmp_name'], WWW_ROOT . $fileName);\n\t\t\t\t\t\techo json_encode(array(\"status\"=>\"success\",\"message\"=>\"Your Brand is successfully edited!\",\"data\"=>$brandRes));\n\t\t\t\t\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo json_encode(array(\"status\"=>\"error\",\"message\"=>\"Please upload image type!\"));\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$brandRes = $this->Brand->save($data);\n\t\t\t\t\techo json_encode(array(\"status\"=>\"success\",\"message\"=>\"Your Brand is successfully edited!\",\"data\"=>$brandRes));\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\techo json_encode(array(\"status\"=>\"error\",\"message\"=>$this->Brand->validationErrors));\n\t\t\t}\n\t\t}\n\t}",
"public function update(Request $request, Brand $brand)\n {\n $this->validateWith([\n 'name' => 'required',\n 'status' => 'required',\n 'image' => 'image|required'\n ]);\n\n // $brand = Brand::where('brandId', $id)\n // ->update(['brandName'=> $request->name, 'slug' => str_slug($request->name), 'status'=> $request->status]);\n\n // $brands = Brand::latest()->get();\n \n $fileurl = $brand->image;\n if ( $featured = $request->file('image') ) {\n $filename = 'featured-' . str_slug( $request->name ) . '-' . str_random(10) . '.' . $featured->getClientOriginalExtension();\n\n try {\n if ( file_exists($brand->image) ) {\n unlink( $brand->image );\n } \n } catch (Exception $e) {\n \n }\n Image::make($featured)->resize(250,270)->save('uploads/brands/'. $filename);\n\n $fileurl = 'uploads/brands/' . $filename; \n }\n\n\n $brand->brandName = $request->name;\n $brand->slug = str_slug($request->name);\n $brand->image = $fileurl;\n $brand->status = $request->status;\n // $category->theme_no = $request->theme_no;\n $brand->save();\n\n\n Session::flash('success', 'Succesfully Updated a Brand.');\n return redirect()->back();\n // return view('brands.index')->with('brands', $brands);\n }",
"public function update(BrandRequest $request, $id)\n {\n if(Session::get('cus_id')==1){\n $brand = Brand::findOrfail($id);\n $brand->name = $request->name;\n $brand->description = $request->description;\n\n $brand->update();\n return back()->with('success','Data saved successfully!');\n }\n return redirect('login')->with('error','This page is for administrators! You need to log in to continue');\n }",
"public function update(Request $request)\n {\n Brand::where('slug',$request->slug)->update([\n 'brand_name'=>$request->brand_name,\n 'slug'=> Str::slug($request->brand_name),\n 'br_description'=>$request->brand_description\n ]);\n\n toast('Brand update successfully','success')->padding('10px')->width('270px')->timerProgressBar()->hideCloseButton();\n\n return redirect()->back();\n }",
"public function actionUpdate($id, $page)\n {\n if (\\Yii::$app->user->can('updateBrand')) {\n\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post())) {\n // 2019-03-05 : Try to catch any DBMS constraint violation\n try{\n if ($model->update() !== false) {\n // 2018-10-30 : Records the brand update operation.\n Yii::info('[The user has updated the brand record with ID='.$model->id.']', 'cttwapp_user');\n Yii::$app->session->setFlash('success', Yii::t('app', 'El registro se ha actualizado exitosamente').'.');\n return $this->redirect(['view', 'id' => $model->id, 'page' => $page]);\n }\n else{\n // 2018-05-07 : An error occurred in the data capture. A flash message is issued.\n Yii::$app->session->setFlash('warning', Yii::t('app', 'Por favor atienda las siguientes consideraciones antes de proceder a registrar la información').'.');\n return $this->render('update_brand', ['model' => $model, 'page' => $page]);\n }\n }catch (Exception $e) {\n // 2019-03-06 : The next statement is used to display the current error reported by SQLSTATUS : nl2br($e->errorInfo[0].' '.$e->errorInfo[2])\n // The error info provided by a PDO exception. This is the same as returned by PDO::errorInfo.\n switch ($e->errorInfo[0]){\n case '23503' :\n Yii::info('[SQLState: 23503 - Foreign key violation at the brand record with ID='.$id.']', 'cttwapp_user');\n Yii::$app->session->setFlash('error', Yii::t('app', 'Es imposible ejecutar la acción de Actualizar o Eliminar sobre este registro, debido a una violación de llave foránea. Este registro forma parte de una referencia en otra entidad').'.');\n break;\n case '42501' :\n Yii::info('[SQLState: 42501 - Insufficient privileges at the brand table]', 'cttwapp_user');\n Yii::$app->session->setFlash('error', Yii::t('app', 'Es imposible ejecutar la acción de Actualizar o Eliminar sobre este registro, debido a no contar con los suficientes privilegios').'.');\n break;\n default :\n Yii::info('[SQLState: '.$e->errorInfo[0], 'cttwapp_user');\n }\n return $this->redirect(['brand/index', 'page' => $page, 'hash' => '0']);\n }\n }\n\n Yii::info('[The user gets access to update a brand record]', 'cttwapp_user');\n return $this->render('update_brand', ['model' => $model, 'page' => $page]);\n }\n else {\n // 2018-07-27 : If the user is a guest, then sends an error message to him. Otherwise it sends a warning message.\n if (Yii::$app->user->getIsGuest()) {\n Yii::$app->session->setFlash('error', Yii::t('app', 'Usted esta tratando de ingresar al sistema de forma no autorizada. Por favor, primero autentifique su acceso').'.');\n Yii::error('[Access denied to update a brand record]', 'cttwapp_user');\n return $this->redirect(['site/index', 'hash' => '0']);\n }\n Yii::$app->session->setFlash('warning', Yii::t('app', 'Su perfil de acceso no le autoriza a utilizar esta acción. Por favor contacte al administrador del sistema para mayores detalles').'.');\n Yii::warning('[Unauthorized access profile to update a brand record]', 'cttwapp_user');\n return $this->redirect(['brand/index', 'page' => $page, 'hash' => '0']);\n }\n }",
"public function edit($brand_id)\n {\n $brand_info=DB::table('tbl_brand')\n ->where('brand_id',$brand_id)\n ->first();\n \n $brand_info=view('admin.brand.edit_brand')\n ->with('brand_info',$brand_info);\n\n return view('admin_layout')->\n with('admin.brand.edit_brand',$brand_info);\n }",
"function edit_brand($brand_id) {\n $result = $this->db->where('brand_id', $brand_id)\n ->get('brands');\n return $result->result();\n }",
"public function update(BrandRequest $request, $id)\n {\n $editBrand = Productbrand::find($id);\n $editBrand->update($request->all());\n if ($editBrand) {\n return redirect()->route('brands.index');\n }\n return redirect()->route('brands.edit');\n }",
"public function updateBrand($brandName, $brandeditid){\n\t\t\t \t$brandName = $this->fm->validation($brandName);\n\t\t\t \t$brandName = mysqli_real_escape_string($this->db->link,$brandName);\n\t\t\t \t$brandeditid = mysqli_real_escape_string($this->db->link,$brandeditid);\n\t\t\t \tif (empty($brandName)) {\n\t\t\t \t\t$emperrmsg = \"<span class='error'>Filed must not be empty !!</span>\";\n\t\t \t\t\treturn $emperrmsg;\n\t\t\t \t}else {\n\t\t\t \t\t$query = \"UPDATE tbl_brand \n\t\t\t \t\t\t\t SET\n\t\t\t \t\t\t\t brandName = '$brandName' \n\t\t\t \t\t\t\t WHERE brandId = '$brandeditid'\";\n\t\t\t \t\t$result = $this->db->update($query);\n\t\t\t \t\tif ($result) {\n\t\t\t \t\t\t$successmsg = \"<span class='successs'>Brand Update Successfully !!</span>\";\n\t\t \t\t\t\treturn $successmsg;\n\t\t\t \t\t}else {\n\t\t\t \t\t\t$errormsg = \"<span class='error'>Something went wrong !!</span>\";\n\t\t \t\t\t\treturn $errormsg;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t }",
"public function actionAddbrand() {\n\t\t\\Yii::$app->view->title = 'ACA Reporting Service | Add Brand';\n\t\t$this->layout = 'main';\n\t\t$session = \\Yii::$app->session;\n\t\t$admin_permissions = $session ['admin_permissions'];\n\t\tif (\\Yii::$app->SessionCheck->isLogged () == true && in_array(\"6\", $admin_permissions)) \t\t// checking logged session\n\t\t{\n\t\t\t\n\t\t\t$logged_user_id = $session ['admin_user_id']; // collecting variables from session\n\t\t\t$model_acabrands = new TblAcaBrands ();\n\t\t\t$model_acabrands->scenario = 'save'; // model scenario for validating\n\t\t\t\n\t\t\t$transaction = \\Yii::$app->db->beginTransaction (); // begining the transaction\n\t\t\ttry {\n\t\t\t\tif ($model_acabrands->load ( \\Yii::$app->request->post () )) {\n\t\t\t\t\t\n\t\t\t\t\t$brand_details = \\Yii::$app->request->post ();\n\t\t\t\t\t$name = $brand_details ['TblAcaBrands'] ['brand_name'];\n\t\t\t\t\t\n\t\t\t\t\t$checkmodel = TblAcaBrands::Checkbrandname ( $name ); // checking for particular brand name\n\t\t\t\t\t\n\t\t\t\t\tif (empty ( $checkmodel )) {\n\t\t\t\t\t\t$model_acabrands->attributes = $brand_details ['TblAcaBrands'];\n\t\t\t\t\t\t$model_acabrands->created_date = date ( 'Y-m-d H:i:s' );\n\t\t\t\t\t\t$model_acabrands->modified_date = date ( 'Y-m-d H:i:s' );\n\t\t\t\t\t\t$model_acabrands->created_by = $logged_user_id;\n\t\t\t\t\t\t$model_acabrands->is_deleted = 1;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$image = UploadedFile::getInstance ( $model_acabrands, 'brand_logo' ); // getting instance of a uploaded file\n\t\t\t\t\t\t$rnd = rand ( 0, 99999 );\n\t\t\t\t\t\tif ($image) {\n\t\t\t\t\t\t\t$ext = explode ( \".\", $image->name );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$model_acabrands->brand_logo = $ext [0] . '_1_' . $rnd . '.' . $ext [1];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$path = \\Yii::$app->basePath . '/Images/profile_image/brand_logo/' . $model_acabrands->brand_logo;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($model_acabrands->save () && $model_acabrands->validate ()) { // model validated(server side validation)\n\t\t\t\t\t\t\tif ($image) {\n\t\t\t\t\t\t\t\t$image->saveAs ( $path );\n\t\t\t\t\t\t\t\tchmod ( $path, 0755 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$transaction->commit (); // commit the transaction\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\\Yii::$app->session->setFlash ( 'success', 'Brand added successfully' );\n\t\t\t\t\t\t\treturn $this->redirect ( array (\n\t\t\t\t\t\t\t\t\t'/admin/masterdata' // redirecting to grid if brand is added\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\treturn $this->render ( 'addbrand', [ // render the array to addbrand view file\n\t\t\t\t\t\t\t\t\t'model' => $model_acabrands \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$model_acabrands->addError ( 'brand_name', 'Brand name address is already exist.' ); // model adding error\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch ( Exception $e ) { // any exceptions catch throws error msg\n\t\t\t\t\n\t\t\t\t$msg = $e->getMessage ();\n\t\t\t\t\\Yii::$app->session->setFlash ( 'error', $msg );\n\t\t\t\t\n\t\t\t\t$transaction->rollback (); //if exception occurs transaction rollbacks\n\t\t\t}\n\t\t\treturn $this->render ( 'addbrand', [ // render the array to addbrand view file\n\t\t\t\t\t'model' => $model_acabrands \n\t\t\t] );\n\t\t} else {\n\t\t\t\\Yii::$app->SessionCheck->adminlogout (); // Redirecting to login page if session destroyed\n\t\t\t\n\t\t\treturn $this->goHome ();\n\t\t}\n\t}",
"public function update(updateBrand $request, $id)\n {\n $brand = brand_product::findOrFail($id);\n $brand->update($request->all());\n return response()->json([\n 'code' => 200,\n 'data' => 'Cap nhat thanh cong',\n ]);\n\n }",
"public function test_update_brands()\n {\n $carBrand = CarBrand::create([\n 'name' => 'NewAwesomeBrand'\n ]);\n\n $response = $this->patch('/api/brands/' . $carBrand->id, [\n 'name' => 'NewAwesomeBrandUpdated',\n ], $this->defaultHeaders);\n\n $response->assertStatus(200);\n\n $carBrandExists = CarBrand::where('name', 'NewAwesomeBrandUpdated')\n ->exists();\n\n $this->assertTrue($carBrandExists);\n\n CarBrand::where('name', 'NewAwesomeBrandUpdated')\n ->delete();\n }"
] |
[
"0.78443676",
"0.7588533",
"0.73884463",
"0.73884463",
"0.73884463",
"0.73884463",
"0.734464",
"0.73397815",
"0.7250031",
"0.7250031",
"0.7248286",
"0.70324576",
"0.69811016",
"0.6925662",
"0.68827695",
"0.68514496",
"0.6832055",
"0.6818557",
"0.67848754",
"0.6773939",
"0.67344564",
"0.67313135",
"0.6580443",
"0.65765303",
"0.65713674",
"0.6553365",
"0.6552712",
"0.65217453",
"0.6521343",
"0.6517012"
] |
0.77484417
|
1
|
Action for activate/deactive brand
|
public function actionBrandactivate() {
if (\Yii::$app->SessionCheck->isLogged () == true) // checking logged session
{
$post = \Yii::$app->request->post (); // getting values by post method
$id = $post ['id'];
$is_active = $post ['is_active'];
$transaction = \Yii::$app->db->beginTransaction (); // begining the transaction
try {
$model = TblAcaBrands::Branduniquedetails ( $id ); // Retriving the values of particular brand
if ($is_active == 1) {
$model->brand_status = 2;
} elseif ($is_active == 2) {
$model->brand_status = 1;
}
if ($model->save () && $model->validate ()) // model validated(server side validation)
{
echo 'success';
$transaction->commit (); // commit the transaction
} else {
echo 'fail'; // sending response to ajax
}
} catch ( Exception $e ) { // any exceptions throws error msg
$msg = $e->getMessage ();
\Yii::$app->session->setFlash ( 'error', $msg );
$transaction->rollback (); //if exception occurs transaction rollbacks
}
} else {
\Yii::$app->SessionCheck->adminlogout (); // Redirecting to login page if session destroyed
return $this->goHome ();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function admin_activate_vendor($is_active = null,$cat_id = null,$model_name = null){\n\t\t\n\t\t$this->layout = \"\";\n\t\t$this->autoRender = false;\n\t\t$cat_id = DECRYPT_DATA($cat_id);\n\t\tif(isset($is_active) && isset($cat_id) && isset($model_name)){\n\t\t\t\n\t\t\tif($is_active == 0){//Activate Status\n\t\t\t $this->$model_name->updateAll(array(\"$model_name.is_active\"=>\"'1'\"),array(\"$model_name.id\"=>$cat_id));\n\t\t\t $this->Session->setFlash(RECORD_ACTIVATED, 'message/green');\n\t\t\t}\n\t\t\telse if($is_active == 1){//Inactivate Status\n\t\t\t $this->$model_name->updateAll(array(\"$model_name.is_active\"=>\"'0'\"),array(\"$model_name.id\"=>$cat_id));\n\t\t\t $this->Session->setFlash(RECORD_DEACTIVATED, 'message/green');\n\t\t\t}\n\t\t}\n\t\t$this->redirect($this->referer());exit();\t\n\t}",
"public function actionEditbrand() {\n\t\t\\Yii::$app->view->title = 'ACA Reporting Service | Edit Brand';\n\t\t$this->layout = 'main';\n\t\t$session = \\Yii::$app->session;\n\t\t$admin_permissions = $session ['admin_permissions'];\n\t\tif (\\Yii::$app->SessionCheck->isLogged () == true && in_array(\"6\", $admin_permissions)) \t\t// checking logged session\n\t\t{\n\t\t\t$logged_user_id = $session ['admin_user_id']; // collecting variables from session\n\t\t\t$get = \\Yii::$app->request->get ();\n\t\t\t$id = $get ['id'];\n\t\t\t$encrypt_component = new EncryptDecryptComponent ();\n\t\t\t$id = $encrypt_component->decryptUser ( $id ); // decrypting id\n\t\t\tif (! empty ( $id )) {\n\t\t\t\t\n\t\t\t\t$model_acabrands = TblAcaBrands::Branduniquedetails ( $id );\n\t\t\t\t$old_image = $model_acabrands ['brand_logo'];\n\t\t\t\t$old_brandname = $model_acabrands ['brand_name'];\n\t\t\t\t$transaction = \\Yii::$app->db->beginTransaction (); // begining the transaction\n\t\t\t\ttry {\n\t\t\t\t\tif ($model_acabrands->load ( \\Yii::$app->request->post () )) {\n\t\t\t\t\t\t$brand_details = \\Yii::$app->request->post ();\n\t\t\t\t\t\t$name = $brand_details ['TblAcaBrands'] ['brand_name'];\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($old_brandname == $name) { // checking for particular brand name\n\t\t\t\t\t\t\t$checkmodel = '';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$checkmodel = TblAcaBrands::Checkbrandname ( $name );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (empty ( $checkmodel )) { // adding brand if brand name is not exist\n\t\t\t\t\t\t\t$model_acabrands->attributes = $brand_details ['TblAcaBrands'];\n\t\t\t\t\t\t\t$model_acabrands->support_email = $brand_details ['TblAcaBrands'] ['support_email'];\n\t\t\t\t\t\t\t$model_acabrands->support_number = $brand_details ['TblAcaBrands'] ['support_number'];\n\t\t\t\t\t\t\t$model_acabrands->modified_date = date ( 'Y-m-d H:i:s' );\n\t\t\t\t\t\t\t$model_acabrands->modified_by = $logged_user_id;\n\t\t\t\t\t\t\t$model_acabrands->is_deleted = 1;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$image = UploadedFile::getInstance ( $model_acabrands, 'brand_logo' ); // getting instance of a uploaded file\n\t\t\t\t\t\t\t$rnd = rand ( 0, 99999 );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (! empty ( $image )) { // checking for image\n\t\t\t\t\t\t\t\t$ext = explode ( \".\", $image->name );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$model_acabrands->brand_logo = $ext [0] . '_1_' . $rnd . '.' . $ext [1];\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$path = \\Yii::$app->basePath . '/Images/profile_image/brand_logo/' . $model_acabrands->brand_logo;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$model_acabrands->brand_logo = $old_image;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($model_acabrands->save () && $model_acabrands->validate ()) { // model validated(server side validation)\n\t\t\t\t\t\t\t\tif (! empty ( $image )) { // saving path for image\n\t\t\t\t\t\t\t\t\t$image->saveAs ( $path );\n\t\t\t\t\t\t\t\t\tchmod ( $path, 0755 );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$transaction->commit (); // commit the transaction\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\\Yii::$app->session->setFlash ( 'success', 'Brand updated successfully' );\n\t\t\t\t\t\t\t\treturn $this->redirect ( array ( // redirecting to grid if brand is updated\n\t\t\t\t\t\t\t\t\t\t'/admin/masterdata' \n\t\t\t\t\t\t\t\t) );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\treturn $this->render ( 'editbrand', [ // render the array to editbrand view file\n\t\t\t\t\t\t\t\t\t\t'model' => $model_acabrands \n\t\t\t\t\t\t\t\t] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$model_acabrands->addError ( 'brand_name', 'Brand name is already exist.' ); // model adding error\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch ( Exception $e ) { // any exceptions catch throws error msg\n\t\t\t\t\t\n\t\t\t\t\t$msg = $e->getMessage ();\n\t\t\t\t\t\\Yii::$app->session->setFlash ( 'error', $msg );\n\t\t\t\t\t\n\t\t\t\t\t$transaction->rollback (); //if exception occurs transaction rollbacks\n\t\t\t\t}\n\t\t\t\treturn $this->render ( 'editbrand', [ // render the array to editbrand view file\n\t\t\t\t\t\t'model' => $model_acabrands \n\t\t\t\t] );\n\t\t\t}\n\t\t} else {\n\t\t\t\\Yii::$app->SessionCheck->adminlogout (); // Redirecting to login page if session destroyed\n\t\t\t\n\t\t\treturn $this->goHome ();\n\t\t}\n\t}",
"public function active(Request $request, Brand $brand)\n {\n $brand->active = !($brand->active);\n $brand->save();\n return redirect()->route('brands.index')->with('status', trans('Updated Successfully'));\n }",
"public function activate();",
"public function activate();",
"function activate() {\r\r\n }",
"function activate() {\n }",
"public function actionAddbrand() {\n\t\t\\Yii::$app->view->title = 'ACA Reporting Service | Add Brand';\n\t\t$this->layout = 'main';\n\t\t$session = \\Yii::$app->session;\n\t\t$admin_permissions = $session ['admin_permissions'];\n\t\tif (\\Yii::$app->SessionCheck->isLogged () == true && in_array(\"6\", $admin_permissions)) \t\t// checking logged session\n\t\t{\n\t\t\t\n\t\t\t$logged_user_id = $session ['admin_user_id']; // collecting variables from session\n\t\t\t$model_acabrands = new TblAcaBrands ();\n\t\t\t$model_acabrands->scenario = 'save'; // model scenario for validating\n\t\t\t\n\t\t\t$transaction = \\Yii::$app->db->beginTransaction (); // begining the transaction\n\t\t\ttry {\n\t\t\t\tif ($model_acabrands->load ( \\Yii::$app->request->post () )) {\n\t\t\t\t\t\n\t\t\t\t\t$brand_details = \\Yii::$app->request->post ();\n\t\t\t\t\t$name = $brand_details ['TblAcaBrands'] ['brand_name'];\n\t\t\t\t\t\n\t\t\t\t\t$checkmodel = TblAcaBrands::Checkbrandname ( $name ); // checking for particular brand name\n\t\t\t\t\t\n\t\t\t\t\tif (empty ( $checkmodel )) {\n\t\t\t\t\t\t$model_acabrands->attributes = $brand_details ['TblAcaBrands'];\n\t\t\t\t\t\t$model_acabrands->created_date = date ( 'Y-m-d H:i:s' );\n\t\t\t\t\t\t$model_acabrands->modified_date = date ( 'Y-m-d H:i:s' );\n\t\t\t\t\t\t$model_acabrands->created_by = $logged_user_id;\n\t\t\t\t\t\t$model_acabrands->is_deleted = 1;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$image = UploadedFile::getInstance ( $model_acabrands, 'brand_logo' ); // getting instance of a uploaded file\n\t\t\t\t\t\t$rnd = rand ( 0, 99999 );\n\t\t\t\t\t\tif ($image) {\n\t\t\t\t\t\t\t$ext = explode ( \".\", $image->name );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$model_acabrands->brand_logo = $ext [0] . '_1_' . $rnd . '.' . $ext [1];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$path = \\Yii::$app->basePath . '/Images/profile_image/brand_logo/' . $model_acabrands->brand_logo;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($model_acabrands->save () && $model_acabrands->validate ()) { // model validated(server side validation)\n\t\t\t\t\t\t\tif ($image) {\n\t\t\t\t\t\t\t\t$image->saveAs ( $path );\n\t\t\t\t\t\t\t\tchmod ( $path, 0755 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$transaction->commit (); // commit the transaction\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\\Yii::$app->session->setFlash ( 'success', 'Brand added successfully' );\n\t\t\t\t\t\t\treturn $this->redirect ( array (\n\t\t\t\t\t\t\t\t\t'/admin/masterdata' // redirecting to grid if brand is added\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\treturn $this->render ( 'addbrand', [ // render the array to addbrand view file\n\t\t\t\t\t\t\t\t\t'model' => $model_acabrands \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$model_acabrands->addError ( 'brand_name', 'Brand name address is already exist.' ); // model adding error\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch ( Exception $e ) { // any exceptions catch throws error msg\n\t\t\t\t\n\t\t\t\t$msg = $e->getMessage ();\n\t\t\t\t\\Yii::$app->session->setFlash ( 'error', $msg );\n\t\t\t\t\n\t\t\t\t$transaction->rollback (); //if exception occurs transaction rollbacks\n\t\t\t}\n\t\t\treturn $this->render ( 'addbrand', [ // render the array to addbrand view file\n\t\t\t\t\t'model' => $model_acabrands \n\t\t\t] );\n\t\t} else {\n\t\t\t\\Yii::$app->SessionCheck->adminlogout (); // Redirecting to login page if session destroyed\n\t\t\t\n\t\t\treturn $this->goHome ();\n\t\t}\n\t}",
"public function bannerAction()\n {\n $brand = $this->route['brand'];\n $category = $this->route['category'];\n $vars['products'] = $this->model->getProductsByCategoryAndBrand($category,$brand);\n $this->view->render('Riding Gear', $vars);\n }",
"public function getBrandurl(){ \n\t\treturn Mage::helper('brand')->brandUrl();\n\t}",
"public function activate() {\n\t\t\n\t}",
"private static function single_activate() {\n\t\t// @TODO: Define activation functionality here\n\t}",
"private static function single_activate() {\n\t\t// @TODO: Define activation functionality here\n\t}",
"static function handle_activate()\n\t{\n\t\tself::handle_multi_site( 'activate' );\n\t}",
"public function activate() {\n\n }",
"public function activate() {\n\n }",
"public function activate() {\n\n }",
"function scl_activate()\n{\n //\n}",
"public function activate() {\n\t\t// TODO define activation functionality here\n\t}",
"function edd_per_product_button_activation() {\n\t/* Activation functions here */\n}",
"public static function activate(){\n }",
"public function actionActivate()\n {\n $username = $this->prompt(Console::convertEncoding(Yii::t('app', 'Username')) . ':', [\n 'required' => true\n ]);\n $model = $this->findModel($username);\n $model->status = User::STATUS_ACTIVE;\n $model->removeEmailConfirmToken();\n $this->log($model->save());\n }",
"public function setActive() {}",
"public function actionIndex()\n {\n if (\\Yii::$app->user->can('listBrand')) {\n // 2018-10-30 : Records the access to Brand module.\n Yii::info('[The user get access to the Brand Module]', 'cttwapp_user');\n\n $searchModel = new BrandSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index_brand', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'qryParams' => Yii::$app->request->queryParams, // 2018-05-08 : This parameter is send to index_brand.php view for test if 'BrandSearch'\n ]);\n }\n else {\n // 2018-07-26 : If the user is a guest, then sends an error message to him. Otherwise it sends a warning message.\n if (Yii::$app->user->getIsGuest()) {\n Yii::$app->session->setFlash('error', Yii::t('app', 'Usted esta tratando de ingresar al sistema de forma no autorizada. Por favor, primero autentifique su acceso').'.');\n Yii::error('[Access denied to the Brand Module]', 'cttwapp_user');\n }\n else {\n Yii::$app->session->setFlash('warning', Yii::t('app', 'Su perfil de acceso no le autoriza a utilizar esta acción. Por favor contacte al administrador del sistema para mayores detalles').'.');\n Yii::warning('[Unauthorized access profile to the Brand Module]', 'cttwapp_user');\n }\n }\n return $this->redirect(['site/index', 'hash' => '0']);\n }",
"public function activateAction()\n {\n $process = User::activate($this->route_params['token']);\n\n if($process){\n Flash::addMessage('Account activated successfully','success');\n $this->redirect('/Login/index');\n }else{\n Flash::addMessage('Oops! Can\\'t activate your account. Activation link is too old or wrong.','danger');\n $this->redirect('/register/activation');\n }\n\n\n }",
"public function show(brand $brand)\n {\n //\n }",
"public function actionDeletebrand() {\n\t\tif (\\Yii::$app->SessionCheck->isLogged () == true) \t\t// checking logged session\n\t\t{\n\t\t\t\n\t\t\t$post = \\Yii::$app->request->post (); // getting values by post method\n\t\t\t$id = $post ['id'];\n\t\t\tif (! empty ( $id )) {\n\t\t\t\t$model_client = new TblAcaClients (); // initialising model tblacaclients\n\t\t\t\t$transaction = \\Yii::$app->db->beginTransaction (); // begining the transaction\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\t$model = TblAcaBrands::Branduniquedetails ( $id ); // Retriving the values of particular brand\n\t\t\t\t\t\n\t\t\t\t\t$check_brand = $model_client->findBybrandId ( $id ); // Retriving the values of particular brand which is used\n\t\t\t\t\tif (empty ( $check_brand )) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$model->is_deleted = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($model->save () && $model->validate ()) \t\t\t\t\t\t// model validated(server side validation)\n\t\t\t\t\t\t\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo 'success'; // sending response to ajax\n\t\t\t\t\t\t\t$transaction->commit (); // commit the transaction\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo 'Some error occurred';\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo 'Brand cannot be deleted as it is already associated to a client.';\n\t\t\t\t\t}\n\t\t\t\t} catch ( Exception $e ) { // any exceptions throws error msg\n\t\t\t\t\t\n\t\t\t\t\t$msg = $e->getMessage ();\n\t\t\t\t\t\\Yii::$app->session->setFlash ( 'error', $msg );\n\t\t\t\t\t \n\t\t\t\t\t$transaction->rollback (); //if exception occurs transaction rollbacks\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\techo 'fail'; // sending response to ajax\n\t\t\t}\n\t\t} else {\n\t\t\t\\Yii::$app->SessionCheck->adminlogout (); // Redirecting to login page if session destroyed\n\t\t\t\n\t\t\treturn $this->goHome ();\n\t\t}\n\t}",
"public function show(Brand $brand)\n {\n //\n }",
"public function show(Brand $brand)\n {\n //\n }",
"public function show(Brand $brand)\n {\n //\n }"
] |
[
"0.6455637",
"0.6339724",
"0.61912173",
"0.6053457",
"0.6053457",
"0.60379255",
"0.6013419",
"0.5902243",
"0.57814103",
"0.5774343",
"0.5738273",
"0.5713625",
"0.5713625",
"0.5674499",
"0.5653762",
"0.5653762",
"0.5653762",
"0.5633953",
"0.56049675",
"0.5602111",
"0.55805314",
"0.55795276",
"0.5579398",
"0.55773944",
"0.5529282",
"0.5527545",
"0.5526846",
"0.55073375",
"0.55073375",
"0.55073375"
] |
0.7527038
|
0
|
TODO: Implement getIdentifier() method.
|
public function getIdentifier()
{
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function getIdentifier() {}",
"public function getIdentifier() {}",
"public function getIdentifier() {}",
"public function getIdentifier() {}",
"public function getIdentifier() {}",
"public function getIdentifier() {}",
"public function getIdentifier() {}",
"public function getIdentifier() {}",
"abstract public function getIdentifier();",
"public function getIdentifier();",
"public function getIdentifier();",
"public function getIdentifier();",
"public function getIdentifier();",
"public function getIdentifier();",
"public function getIdentifier();",
"public function getIdentifier();",
"public function getIdentifier();",
"public function getIdentifier();",
"public function getIdentifier()\n {\n // TODO: Implement getIdentifier() method.\n }",
"public abstract function getIdentifier();",
"public function getIdentifier(): mixed;",
"public function getIdentifier(): string;",
"public function getIdentifier(): string;",
"function getIdentifier() ;",
"function getIdentifier() ;",
"function getIdentifier() ;",
"function getIdentifier();",
"function getIdentifier();",
"function getIdentifier()\n {\n return $this->identifier;\n }",
"function getIdentifier()\n {\n return $this->_identifier;\n }"
] |
[
"0.88087046",
"0.88087046",
"0.88087046",
"0.88087046",
"0.88087046",
"0.8808155",
"0.8807852",
"0.8807852",
"0.8738553",
"0.8566441",
"0.8566441",
"0.8566441",
"0.8566441",
"0.8566441",
"0.8566441",
"0.8566441",
"0.8566441",
"0.8566441",
"0.8564639",
"0.85609245",
"0.8468062",
"0.844972",
"0.844972",
"0.830927",
"0.830927",
"0.8308066",
"0.8307376",
"0.8307376",
"0.8120827",
"0.8081113"
] |
0.88241047
|
0
|
TODO: Implement setIsActive() method.
|
public function setIsActive($isActive)
{
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function setActive() {}",
"public function setIsActive( bool $isActive ): void;",
"public function setIsActive($isActive);",
"public function setActive()\r\n {\r\n $this->active = true;\r\n }",
"abstract public function isActive();",
"public function getIsActive() {}",
"public function isActive() {}",
"public function isActive() {}",
"public function isActive() {}",
"public function isActive() {}",
"public function isActive() {}",
"public function isActive() {}",
"public function isActive()\n {\n }",
"public function getIsActive(): bool;",
"public function getIsActive(): bool;",
"public function getIsActive(): bool;",
"public function isActive();",
"public function isActive();",
"public function isActive();",
"public function isActive();",
"public function setActive()\n\t\t{\n\t\t\t$this->_state = 1;\n\t\t}",
"public function setActive()\n {\n $this->update(['status' => static::STATUS_ACTIVE]);\n }",
"function getIsActive() ;",
"public function setActive($value);",
"public function getIsActive();",
"public function getIsActive() {\r\n\t return $this->_isActive;\r\n\t}",
"public function getIsActive()\n\t{\n\t\treturn $this->isActive; \n\n\t}",
"function getActive() {return $this->_active;}",
"public function setIsActive(bool $isActive)\n\t{\n\t\t$this->isActive=$isActive; \n\t\t$this->keyModified['is_active'] = 1; \n\n\t}",
"public function getIsActive()\n {\n return $this->isActive;\n }"
] |
[
"0.76345026",
"0.7428295",
"0.7342884",
"0.7253996",
"0.7046562",
"0.7044228",
"0.7021934",
"0.7021934",
"0.70210636",
"0.70210636",
"0.70210636",
"0.70210636",
"0.70120335",
"0.69556004",
"0.69556004",
"0.69556004",
"0.6950797",
"0.6950797",
"0.6950797",
"0.6950797",
"0.6930883",
"0.6910262",
"0.6910176",
"0.6850871",
"0.6846749",
"0.6845246",
"0.6842504",
"0.67698807",
"0.66647327",
"0.665836"
] |
0.76040566
|
1
|
TODO: Implement getBadge() method.
|
public function getBadge()
{
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function getBadgeColor()\n {\n }",
"public function getBadgeValue()\n {\n return null;\n }",
"public function getBadges();",
"protected function get__badge()\n\t{\n\t\tif ( $this->deleteOrMoveQueued() === TRUE )\n\t\t{\n\t\t\treturn array(\n\t\t\t\t0\t=> 'ipsBadge ipsBadge_intermediary',\n\t\t\t\t1\t=> 'node_move_delete_queued',\n\t\t\t);\n\t\t}\n\t\t\n\t\treturn NULL;\n\t}",
"public function statusBadge() {\n return \"<label class='badge badge-{$this->status->css_class}'> • {$this->status->name}</label>\";\n }",
"public function getStatusBadgeAttribute()\n {\n return '<span class=\"badge bg-'.self::COLOR_STATUS[$this->status].'\">'.self::LABEL_STATUS[$this->status].'</span>';\n }",
"public function getBadgeValue()\n {\n return $this->auth->loggedIn() ? $this->auth->id() : null;\n }",
"public function get_badges() {\n\n\t\t\treturn array(\n\t\t\t\t'ecommerce' => array(\n\t\t\t\t\t'label' => 'E-Commerce',\n\t\t\t\t\t'admin' => array( $this, '_register_ecommerce_control' ),\n\t\t\t\t\t'public' => array( $this, 'is_ecommerce' ),\n\t\t\t\t),\n\t\t\t\t'featured' => array(\n\t\t\t\t\t'label' => 'Featured',\n\t\t\t\t\t'admin' => array( $this, '_register_featured_control' ),\n\t\t\t\t\t'public' => array( $this, 'is_featured' ),\n\t\t\t\t),\n\t\t\t\t'bestseller' => array(\n\t\t\t\t\t'label' => 'Bestseller',\n\t\t\t\t\t'admin' => false,\n\t\t\t\t\t'public' => array( $this, 'is_bestseller' ),\n\t\t\t\t),\n\t\t\t\t'new' => array(\n\t\t\t\t\t'label' => 'New',\n\t\t\t\t\t'admin' => false,\n\t\t\t\t\t'public' => array( $this, 'is_new' ),\n\t\t\t\t),\n\t\t\t);\n\n\t\t}",
"public function getFunctionBadgeNumber();",
"public function getBestBadge1()\n\t{\n\t\treturn $this->best_badge_1;\n\t}",
"public function get_badge($id)\r\n {\r\n global $db;\r\n $badges = db::get_array(\"badges\", array(\"id\" => $id));\r\n if (count($badges) > 0) {\r\n return $badges[0];\r\n } else {\r\n return array();\r\n }\r\n }",
"function displayApprovedBadge() {\n return $this->is_on_behalf ? $this->approvedBadge() : '';\n }",
"public function approvedBadge() {\n\n if($this->is_approved) {\n $css_class = 'success';\n $text = 'Approved';\n } else {\n $css_class = 'danger';\n $text = 'Unapproved';\n }\n\n return \"<label class='badge badge-{$css_class}'> • {$text}</label>\";\n }",
"public function setBadge($iBadge) {\n\t\t$this->setValueByKeyPath('aps.badge', (int)$iBadge);\n\t\treturn $this;\n\t}",
"public function get_badges_list() {\n return [\n -2 => 'locked-badge-image', -1 => 'failed-badge-image', 0 => 'unlocked-badge-image', 1 => 'easiest-badge-image',\n 2 => 'middle-badge-image', 3 => 'hardest-badge-image'\n ];\n }",
"public function GetBadges()\n {\n $this->setApiDetails(__FUNCTION__, 'v0001');\n\n // Set up the arguments\n $arguments = ['steamId' => $this->steamId];\n\n // Get the client\n $client = $this->getServiceResponse($arguments);\n\n return $client;\n }",
"protected function listBadges()\n\t{\n\t\t$badges = array(\n\t\t\t\tself::BADGES_DEFAULT,\n\t\t\t\tself::BADGES_SUCCESS,\n\t\t\t\tself::BADGES_WARNING,\n\t\t\t\tself::BADGES_IMPORTANT,\n\t\t\t\tself::BADGES_INFO,\n\t\t\t\tself::BADGES_INVERSE,\n\t\t);\t\t\n\t\treturn $badges;\n\t\t\n\t}",
"public static function countBadge()\n {\n return false;\n }",
"public function get_total_badges() {\n\t\t\treturn $this->total_badges;\n\t\t}",
"public function getBestBadge2()\n\t{\n\t\treturn $this->best_badge_2;\n\t}",
"function badge_stats() {\n\n\t\t/*\n\t\targuments:\n\t\t\tnone\n\n\t\treturns:\n\t\n\t\tReturn:\n\t\t\tif successful:\n\t\t\t{\n\t\t\t\t{\n\t\t\t\t\tbadge_id: the badge id\n\t\t\t\t\tbadge_name: the name of the badge\n\t\t\t\t\tqty: how many people have this badge\n\t\t\t\t},\n\t\t\t\t..\n\t\t\t\t..\n\t\t\t}\n\n\t\t\tif error:\n\t\t\t{\n\t\t\t\terror_code: The error code\n\t\t\t\terror_msg: The error message\n\t\t\t}\n\t\t*/\n\n\t\tglobal $dbh;\n\n\t\t// Iterate through each badge and retrieve stats for that badge\n\t\t// Iterate through each action type and determine stats for each action type\n\t\t$badges = array();\n\n\t\t$sql = 'SELECT\n\t\t\tbadge_id,\n\t\t\tbadge_name,\n\t\t\t(\n\t\t\t\tSELECT\n\t\t\t\tcount(*)\n\t\t\t\tFROM ' . CORE_DB . '.users_info\n\t\t\t\tWHERE ' . CORE_DB . '.users_info.badge_id = ' . CORE_DB . '.badges.badge_id\n\t\t\t) AS badge_qty\n\t\t\tFROM ' . CORE_DB . '.badges\n\t\t\tORDER BY badge_name ASC\n\t\t\t';\n\n\t\t$sth = $dbh->prepare($sql);\n\t\t$sth->execute();\n\n\t\twhile($row = $sth->fetch()) {\n\n\t\t\tarray_push($badges, Core::remove_numeric_keys($row));\n\n\t\t}\n\n\t\t$badges = Core::multi_sort($badges, 'badge_qty', 'desc');\n\n\t\treturn $badges;\n\n\t}",
"private function parseBadges()\n\t{\n\t\t/**\n\t\t * Obtener las placas seleccionadas\n\t\t */\n\t\t$badges = $this->habbo->badges;\n\n\t\t/**\n\t\t * Convertirlas a entidad\n\t\t */\n\t\tforeach( $badges as $badge )\n\t\t\t$this->addBadge( new Badge( $badge ) );\n\t}",
"public function Badges() {\n\t\t\n\t\tif (!empty($this->profil)) {\n\t\t\t\n\t\t\t$arrayBadges = array();\n\t\t\n\t\t\tforeach ($this->profil['user']['topBadges'] as $topbadge) {\n\t\t\t\t\n\t\t\t\t$data = new ArrayData(array(\n\t\t\t\t\t\t\t\t'imageURL75px' => $topbadge['image75px'],\n\t\t\t\t\t\t\t\t'marketingDescription' => $topbadge['marketingDescription']\n\t\t\t\t\t\t\t));\n\t\t\t\t\n\t\t\t\tarray_push($arrayBadges, $data);\n\t\t\t}\n\t\t\t\n\t\t\treturn new ArrayList($arrayBadges);\n\t\t}\n\t}",
"function cloudfw_wc_badge( $location = '' ) {\n\tglobal $post, $product;\n\n\t$badge = ''; \n\tif ( ! $product->is_in_stock() ) {\n\t\t$badge = '<span class=\"out-of-stock-badge\">'. cloudfw_translate( 'wc.loop.badge.out_of_stock' ) .'</span>';\n\t} elseif ( $product->price === '0' || $product->price === 0 ) {\n\t\t$badge = '<span class=\"free-badge\">'. cloudfw_translate( 'wc.loop.badge.free' ) .'</span>';\n\t} elseif ($product->is_on_sale()) {\n\t\t$badge = apply_filters('woocommerce_sale_flash', '<span class=\"onsale\">'. cloudfw_translate( 'wc.loop.badge.sale' ) .'</span>', $post, $product);\n\t}\n\n\tif ( !empty( $badge ) ) {\n\t\tif ( $location == 'loop' ) {\n\t\t\t$badge = '<span class=\"ui--wc-badge\">'. $badge .'</span>';\n\t\t}\n\t}\n\n\treturn $badge;\n\n}",
"public function get_icon() {\n return 'eicon-heading apr-badge';\n }",
"public function getBadgesToBeIssued() {\n\t\treturn $this->userBadges;\n\t}",
"public static function getInstance($id = 0)\n {\n if (empty(self::$instances[$id])) {\n $item = new GamificationBadge($id);\n self::$instances[$id] = $item;\n }\n\n return self::$instances[$id];\n }",
"public function getUserBadges($user);",
"public function getBadgeOptions()\r\n {\r\n if ($this->getChatHelper()->getWindowTheme() != 'simple') {\r\n return null;\r\n }\r\n $out = array();\r\n\r\n if (strlen($this->getChatHelper()->getBadgeLayout()) > 0) {\r\n $out[] = \"\\$zopim.livechat.badge.setLayout('\" . $this->getChatHelper()->getBadgeLayout() . \"')\";\r\n }\r\n\r\n if (strlen($this->getChatHelper()->getBadgeText()) > 0) {\r\n $out[] = \"\\$zopim.livechat.badge.setText('\" . $this->jsQuoteEscape($this->getChatHelper()->getBadgeText()) . \"')\";\r\n }\r\n\r\n if (strlen($this->getChatHelper()->getBadgeImage()) > 0) {\r\n $out[] = \"\\$zopim.livechat.badge.setImage('\" . Mage::getBaseUrl('media') . 'chat/' . $this->getChatHelper()->getBadgeImage() . \"')\";\r\n }\r\n\r\n if (!$this->getChatHelper()->getButtonHideOffline()) {\r\n if ($this->getChatHelper()->getBadgeShow() == 'hide') {\r\n $out[] = \"\\$zopim.livechat.badge.hide()\";\r\n } else {\r\n $out[] = \"\\$zopim.livechat.badge.show()\";\r\n }\r\n }\r\n\r\n if (!empty($out)) {\r\n return implode(';' . \"\\n\", $out). ';' . \"\\n\";\r\n }\r\n return null;\r\n }",
"public function get_badge_html( $badge = '', $depth = 0 ) {\n\n\t\t\tif ( 0 < $depth ) {\n\t\t\t\t$is_hidden = ava_menu_option_page()->get_option( 'ava-menu-sub-badge-hide', 'false' );\n\t\t\t} else {\n\t\t\t\t$is_hidden = ava_menu_option_page()->get_option( 'ava-menu-top-badge-hide', 'false' );\n\t\t\t}\n\n\t\t\t$hide_on_mobile = ( 'true' === $is_hidden ) ? ' ava-hide-mobile' : '';\n\n\t\t\t$format = apply_filters(\n\t\t\t\t'ava-menu/tools/badge-format',\n\t\t\t\t'<small class=\"ava-menu-badge%2$s\"><span class=\"ava-menu-badge__inner\">%1$s</span></small>',\n\t\t\t\t$badge,\n\t\t\t\t$depth\n\t\t\t);\n\t\t\treturn sprintf( $format, esc_attr( $badge ), $hide_on_mobile );\n\t\t}"
] |
[
"0.7571664",
"0.7523396",
"0.73034054",
"0.71674955",
"0.6880115",
"0.6840274",
"0.6779408",
"0.67356974",
"0.66192234",
"0.6560849",
"0.65526426",
"0.65316695",
"0.65126675",
"0.6394138",
"0.63499147",
"0.6328559",
"0.63219804",
"0.62816846",
"0.6273145",
"0.62507",
"0.61912054",
"0.61591333",
"0.6142715",
"0.6107342",
"0.61018056",
"0.60960215",
"0.6091996",
"0.6085022",
"0.6039066",
"0.5991032"
] |
0.90734214
|
0
|
TODO: Implement getBadgeColor() method.
|
public function getBadgeColor()
{
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function getBadge()\n {\n }",
"public function getStatusBadgeAttribute()\n {\n return '<span class=\"badge bg-'.self::COLOR_STATUS[$this->status].'\">'.self::LABEL_STATUS[$this->status].'</span>';\n }",
"public function get_badges() {\n\n\t\t\treturn array(\n\t\t\t\t'ecommerce' => array(\n\t\t\t\t\t'label' => 'E-Commerce',\n\t\t\t\t\t'admin' => array( $this, '_register_ecommerce_control' ),\n\t\t\t\t\t'public' => array( $this, 'is_ecommerce' ),\n\t\t\t\t),\n\t\t\t\t'featured' => array(\n\t\t\t\t\t'label' => 'Featured',\n\t\t\t\t\t'admin' => array( $this, '_register_featured_control' ),\n\t\t\t\t\t'public' => array( $this, 'is_featured' ),\n\t\t\t\t),\n\t\t\t\t'bestseller' => array(\n\t\t\t\t\t'label' => 'Bestseller',\n\t\t\t\t\t'admin' => false,\n\t\t\t\t\t'public' => array( $this, 'is_bestseller' ),\n\t\t\t\t),\n\t\t\t\t'new' => array(\n\t\t\t\t\t'label' => 'New',\n\t\t\t\t\t'admin' => false,\n\t\t\t\t\t'public' => array( $this, 'is_new' ),\n\t\t\t\t),\n\t\t\t);\n\n\t\t}",
"public function getBadges();",
"public function statusBadge() {\n return \"<label class='badge badge-{$this->status->css_class}'> • {$this->status->name}</label>\";\n }",
"public function getBadgeValue()\n {\n return null;\n }",
"public function get_badges_list() {\n return [\n -2 => 'locked-badge-image', -1 => 'failed-badge-image', 0 => 'unlocked-badge-image', 1 => 'easiest-badge-image',\n 2 => 'middle-badge-image', 3 => 'hardest-badge-image'\n ];\n }",
"protected function listBadges()\n\t{\n\t\t$badges = array(\n\t\t\t\tself::BADGES_DEFAULT,\n\t\t\t\tself::BADGES_SUCCESS,\n\t\t\t\tself::BADGES_WARNING,\n\t\t\t\tself::BADGES_IMPORTANT,\n\t\t\t\tself::BADGES_INFO,\n\t\t\t\tself::BADGES_INVERSE,\n\t\t);\t\t\n\t\treturn $badges;\n\t\t\n\t}",
"protected function get__badge()\n\t{\n\t\tif ( $this->deleteOrMoveQueued() === TRUE )\n\t\t{\n\t\t\treturn array(\n\t\t\t\t0\t=> 'ipsBadge ipsBadge_intermediary',\n\t\t\t\t1\t=> 'node_move_delete_queued',\n\t\t\t);\n\t\t}\n\t\t\n\t\treturn NULL;\n\t}",
"public function approvedBadge() {\n\n if($this->is_approved) {\n $css_class = 'success';\n $text = 'Approved';\n } else {\n $css_class = 'danger';\n $text = 'Unapproved';\n }\n\n return \"<label class='badge badge-{$css_class}'> • {$text}</label>\";\n }",
"public function getBadgeValue()\n {\n return $this->auth->loggedIn() ? $this->auth->id() : null;\n }",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function getBadgeOptions()\r\n {\r\n if ($this->getChatHelper()->getWindowTheme() != 'simple') {\r\n return null;\r\n }\r\n $out = array();\r\n\r\n if (strlen($this->getChatHelper()->getBadgeLayout()) > 0) {\r\n $out[] = \"\\$zopim.livechat.badge.setLayout('\" . $this->getChatHelper()->getBadgeLayout() . \"')\";\r\n }\r\n\r\n if (strlen($this->getChatHelper()->getBadgeText()) > 0) {\r\n $out[] = \"\\$zopim.livechat.badge.setText('\" . $this->jsQuoteEscape($this->getChatHelper()->getBadgeText()) . \"')\";\r\n }\r\n\r\n if (strlen($this->getChatHelper()->getBadgeImage()) > 0) {\r\n $out[] = \"\\$zopim.livechat.badge.setImage('\" . Mage::getBaseUrl('media') . 'chat/' . $this->getChatHelper()->getBadgeImage() . \"')\";\r\n }\r\n\r\n if (!$this->getChatHelper()->getButtonHideOffline()) {\r\n if ($this->getChatHelper()->getBadgeShow() == 'hide') {\r\n $out[] = \"\\$zopim.livechat.badge.hide()\";\r\n } else {\r\n $out[] = \"\\$zopim.livechat.badge.show()\";\r\n }\r\n }\r\n\r\n if (!empty($out)) {\r\n return implode(';' . \"\\n\", $out). ';' . \"\\n\";\r\n }\r\n return null;\r\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"private function parseBadges()\n\t{\n\t\t/**\n\t\t * Obtener las placas seleccionadas\n\t\t */\n\t\t$badges = $this->habbo->badges;\n\n\t\t/**\n\t\t * Convertirlas a entidad\n\t\t */\n\t\tforeach( $badges as $badge )\n\t\t\t$this->addBadge( new Badge( $badge ) );\n\t}",
"function getColor() { return $this->_color; }",
"public function getBackgroundColor() {}",
"public function getBackgroundColor() {}",
"public function getBackgroundColor() {}",
"public function get_icon() {\n return 'eicon-heading apr-badge';\n }",
"public function getColor() {}",
"public function getColor() {}",
"function displayApprovedBadge() {\n return $this->is_on_behalf ? $this->approvedBadge() : '';\n }",
"public function getColor() {\n\t}",
"public function getYellow()\n {\n return $this->yellow;\n }",
"public function getIsDisabledBadgeAttribute()\n {\n return $this->is_disabled ? '<span class=\"badge bg-red\">disabled</span>' : '<span class=\"badge bg-green\">active</span>';\n }",
"public function get_badge($id)\r\n {\r\n global $db;\r\n $badges = db::get_array(\"badges\", array(\"id\" => $id));\r\n if (count($badges) > 0) {\r\n return $badges[0];\r\n } else {\r\n return array();\r\n }\r\n }",
"public function getColor()\n {\n }",
"public function getInteriorColor() {}"
] |
[
"0.79129064",
"0.68859124",
"0.68401283",
"0.6825275",
"0.6744115",
"0.67004526",
"0.6519269",
"0.64169157",
"0.6401047",
"0.6200286",
"0.61288583",
"0.6125126",
"0.610738",
"0.60991293",
"0.60991293",
"0.60946834",
"0.6077865",
"0.6060547",
"0.60602546",
"0.60602546",
"0.6013648",
"0.60053337",
"0.60053337",
"0.5977659",
"0.59475785",
"0.59450585",
"0.59395635",
"0.5862816",
"0.585681",
"0.58359617"
] |
0.9142314
|
0
|
TODO: Implement getActiveChild() method.
|
public function getActiveChild()
{
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function getHasActiveChild(): bool\n {\n return $this->hasActiveChild;\n }",
"public function isCurrentChild(): bool;",
"public function getChild()\n {\n return $this->child;\n }",
"public function getPChild()\n {\n return $this->p_child;\n }",
"abstract protected function getCurrentChildren(): array ;",
"public function getFChild()\n {\n return $this->f_child;\n }",
"public function getParentActive()\n {\n return $this->_parentActive;\n }",
"public function get_child($child_id)\n {\n }",
"public function getCurrent()\n {\n if ($this->currentCache !== null) {\n return $this->currentCache;\n }\n /* @var $active MenuItem */\n $active = null;\n do {\n /* @var MenuItem[] $children */\n $children = $this->getChildren($active);\n $foundActiveChild = false;\n foreach ($children as $child) {\n if ($child->getActive()) {\n $foundActiveChild = true;\n $active = $child;\n\n break;\n }\n }\n } while ($foundActiveChild);\n $this->currentCache = $active;\n\n return $active;\n }",
"public function getCurrentChildAdmin(): ?self;",
"public function getActiveChildren()\n {\n if ($this->_activeChildren !== null) {\n return $this->_activeChildren;\n }\n\n $children = [];\n $item = null;\n $skip = 0;\n foreach ($this->children()->all() as $value) {\n if ($value->depth == $this->depth + 1) {\n if ($item !== null && $item->active && $item->activeProductCount > 0) {\n $children[] = $item;\n }\n $item = $value;\n }\n if (!$value->active) {\n $skip = $value->rgt;\n }\n if ($value->rgt <= $skip) {\n continue;\n }\n $item->activeProductCount += $value->activeProductCount;\n }\n if ($item !== null && $item->active && $item->activeProductCount > 0) {\n $children[] = $item;\n }\n\n return $this->_activeChildren = $children;\n }",
"public function isChildSupported();",
"function getActive() { return $this->_active; }",
"protected function retrieveParent()\n {\n }",
"public function isChild(): bool;",
"public function isChildOnly();",
"function getActive() {return $this->_active;}",
"function getActive() {\n\t\treturn $this->_Active;\n\t}",
"public function hasActiveChildren()\n {\n $hasActiveItem = $this->childContainer->hasActiveItem();\n\n if (!$hasActiveItem) {\n $items = $this->childContainer->getItems();\n foreach ($items as $item) {\n $hasActiveItem = $hasActiveItem || $item->hasActiveChildren();\n }\n }\n\n return $hasActiveItem;\n }",
"public function get_active_instance() { \n\n\n\t}",
"public function getChildren () {\n return $this->current ();\n }",
"public function getChildren() {}",
"public function getChildren() {}",
"public function getChildren() {}",
"public function getHasChild()\n {\n $sql = \"SELECT * FROM \" . TB_USAGE . \" WHERE parent_id = \" . $this->db->sqltext($this->mix_id);\n $this->db->query($sql);\n if ($this->db->num_rows() > 0) {\n $this->hasChild = true;\n } else {\n $this->hasChild = false;\n }\n\n return $this->hasChild;\n }",
"public function getGrandParent();",
"public function getChildren()\n {\n }",
"public function getChildren()\n {\n }",
"public function __invoke()\n {\n return $this->getParent();\n }",
"public function getActive() {\n\t\treturn $this->active;\n\t}"
] |
[
"0.6824239",
"0.66014844",
"0.64871466",
"0.62693363",
"0.626693",
"0.61808395",
"0.61733156",
"0.60367775",
"0.60287714",
"0.59760743",
"0.5906084",
"0.5886106",
"0.5780376",
"0.57338274",
"0.5637966",
"0.5634235",
"0.5627947",
"0.56251514",
"0.560544",
"0.56040114",
"0.55878687",
"0.5565639",
"0.5565639",
"0.5565639",
"0.5548227",
"0.553926",
"0.5506717",
"0.5506717",
"0.5473561",
"0.54726225"
] |
0.91418356
|
0
|
Mutator sets email to lowercase
|
public function setEmailAttribute($value) {
$this->attributes['email'] = strtolower($value);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function setEmailAttribute($value)\n {\n $this->attributes['email'] = strtolower($value);\n }",
"public function setEmailAttribute($email)\n {\n $this->attributes['email'] = strtolower($email);\n }",
"public function setEmailAttribute($email)\n {\n $this->attributes['email'] = strtolower(trim($email));\n }",
"public function setEmailAttribute($value)\n {\n $this->attributes['email'] = mb_strtolower($value);\n }",
"public function setUsernameToEmail()\n {\n $this->username = $this->email;\n $this->usernameCanonical = $this->emailCanonical;\n }",
"public function setEmailAttribute(string $value): void\n {\n $this->attributes[self::EMAIL] = \\strtolower($value);\n }",
"function changeemail($member,$oldemail,$newemail) {\n\t\n}",
"public function setEmail($newEmail){\n\t}",
"public function setEmailToName($value) { $this->_emailToName = $value; }",
"public function setEmailAttribute($value)\n {\n if (!empty($value)) {\n $this->attributes['email'] = $this->mayaEncrypt($value);\n }\n }",
"private function setEmail()\n {\n\t if ( empty( $_POST['email'] ) ) {\n\t\t\t$this->data['error']['email'] = 'Please provide a valid email address.';\n $this->error = true;\n return;\n }\n \n $e = trim( $_POST['email'] );\n \n\t\tif ( ! filter_var( $e, FILTER_VALIDATE_EMAIL ) ) {\n\t\t\t$this->data['error']['email'] = 'Please provide a valid email address.';\n $this->error = true;\n return;\n\t\t}\n \n\t\t$this->data['email'] = $e;\n }",
"public function setEmail($newEmail) {\n //first, trim the input of excess whitespace\n $newEmail = trim($newEmail);\n \n //second, sanitize the email of all invalid email characters\n $newEmail = filter_var($newEmail, FILTER_SANITIZE_EMAIL);\n \n //finally, bring the email out of quarantine\n $this->email = $newEmail;\n }",
"function set_email($email) {\n if (is_string($email) == false)\n throw new Exception('type error!');\n\n $email = strtolower($email);\n $len = strlen($email);\n \n if ($len == 0)\n throw new Exception(\"email cannot be empty\");\n if (preg_match(\"/[^a-z_.0-9-@]+/\", $email))\n throw new Exception(\"email has some not allowed characters.\");\n if (!filter_var($email, FILTER_VALIDATE_EMAIL))\n throw new Exception(\"email is not valid\");\n if ($len > 30)\n throw new Exception(\"email cannot be more than 30 characters\");\n\n $this->email = $email;\n }",
"public function setEmailFromName($value) { $this->_emailFromName = $value; }",
"public function setEmail($email) {\n if (!$this->username) {\n $this->username = $email;\n }\n return parent::setEmail($email);\n }",
"public function resetOriginalEmail() : void;",
"public function setEmail($email);",
"public function setEmail($email);",
"public function setEmail($email);",
"function setSenderEmail($email) {\n $parts = $this->_parseEmail($email);\n $this->from_user = $parts[0];\n $this->from_domain = $parts[1];\n }",
"public function setEmail(?CustomerTextFilter $email): void\n {\n $this->email = $email;\n }",
"public function setEmail(?string $email): void;",
"public function setEmail(?string $email): void;",
"function login_function_change() {\n add_filter( 'gettext', 'username_change', 20, 3 );\n function username_change( $translated_text, $text, $domain ) {\n if ($text === 'Username or Email Address'){\n $translated_text = 'Email Address';\n }\n return $translated_text;\n }\n}",
"public function setEmailAddress($email);",
"function set_email_name( $name )\n\t{\n\t\tif( $donate_name = DN_Settings::instance()->email->get( 'from_name' ) )\n\t\t{\n\t\t\treturn sanitize_title( $donate_name );\n\t\t}\n\t\treturn $name;\n\t}",
"function email($email)\n {\n if (!is_valid_email($email))\n return false;\n\n if ($email != $this->email)\n $this->update['email'] = $email;\n\n $this->email = $email;\n\n return true;\n }",
"function sEmail( $email )\r\n\t\t{\r\n\t\t return filter_var( $email, FILTER_SANITIZE_EMAIL );\r\n\t\t \r\n\t\t}",
"public function setEmail($email)\n\n{\n\n$this->email = $email;\n\n}",
"public function changeEmail($newValue){\n\n $this->email = $newValue;\n $this ->save();\n\n }"
] |
[
"0.7435799",
"0.742241",
"0.73625624",
"0.72930616",
"0.6711926",
"0.66656196",
"0.66567874",
"0.60853136",
"0.6013444",
"0.5986682",
"0.59845674",
"0.59580195",
"0.59559524",
"0.594032",
"0.59237707",
"0.59211034",
"0.5914871",
"0.5914871",
"0.5914871",
"0.5913886",
"0.5910338",
"0.5896291",
"0.5896291",
"0.58924216",
"0.5876914",
"0.58553654",
"0.58515286",
"0.58132476",
"0.58131623",
"0.58118075"
] |
0.7638533
|
0
|
Return the handle used to identify his credentials.
|
public function userHandle(): string;
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function get_handle();",
"public function getProfileHandle(): string {\n\t\treturn ($this->profileHandle);\n\t}",
"public function getHandle()\n {\n return $this->getInternalId();\n }",
"public function get_handle(): string {\n\t\treturn $this->handle;\n\t}",
"public function getCredentials()\n {\n return $this->provider . '_' . $this->oAuthId;\n }",
"public function getHandle()\n {\n return $this->handle;\n }",
"public function getHandle()\n {\n return $this->handle;\n }",
"public function getHandle()\n {\n return $this->handle;\n }",
"public function getHandle()\n {\n return $this->handle;\n }",
"public function credential()\n {\n return $this->credentials();\n }",
"public static function getFromCredentialUserHandle(string $handle): ?WebAuthnAuthenticatable;",
"function getHandle();",
"public function getCredential(): string\n {\n return $this->credential;\n }",
"public function CredentialsID()\n\t{\n\t\treturn $this->CredentialsID;\n\t}",
"public function getHandle()\n\t\t{\n\t\t\treturn $this->handle;\n\t\t}",
"public function getCredential()\r\n {\r\n return $this->credential;\r\n }",
"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}",
"public function getAuthIdentifier() {\n return $this->username;\n }",
"public function getCredential();",
"public function httpUser()\n\t{\n\t\treturn $this->server('PHP_AUTH_USER');\n\t}",
"public function getAuthIdentifier();",
"public function getAuthIdentifier()\n {\n return $this->{self::getAuthIdentifierName()};\n }",
"public function getUserCredential()\n {\n return $this->userCredentials;\n }",
"public function getAuthIdentifier() {\n return $this->id_user;\n }",
"public function getAuthIdentifier()\n {\n \treturn $this->id;\n }",
"function getUserIdentifier()\n\t{\n\t\tif ($this->serverType == \"activedirectory\") {\n\t\t\treturn $this->attr_sambalogin;\n\t\t} else {\n\t\t\treturn $this->attr_login;\n\t\t}\n\t}",
"public function getProfileAtHandle() : string {\n\t\treturn $this->profileAtHandle;\n\t}",
"public function handle(){\n return $this->_handle;\n }",
"public function getUserIdentifier(): string\n {\n return (string) $this->login;\n }",
"public function getAuthIdentifier(){\n return $this->id;\n }"
] |
[
"0.6683462",
"0.6659664",
"0.6657953",
"0.65587837",
"0.6510696",
"0.637992",
"0.637992",
"0.637992",
"0.637992",
"0.63534015",
"0.6323826",
"0.6274851",
"0.62439513",
"0.6182184",
"0.6160947",
"0.61565393",
"0.61180156",
"0.60920537",
"0.60891426",
"0.6073596",
"0.6048137",
"0.60376424",
"0.60064346",
"0.5976664",
"0.5959788",
"0.59540683",
"0.59388506",
"0.588503",
"0.587979",
"0.58508134"
] |
0.69811344
|
0
|
Return a list of "blacklisted" credentials for attestation.
|
public function attestationExcludedCredentials(): array;
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function blacklists()\n {\n return $this->morphMany(JwtBlacklist::class, 'authenticable');\n }",
"public function getBlacklist()\n {\n return $this->blacklist;\n }",
"public function getBlacklist()\n {\n return $this->blacklist;\n }",
"public function getBlacklist()\n {\n return $this->blacklist;\n }",
"public function blacklist()\n {\n return $this['blacklist'];\n }",
"public static function hidden()\n {\n return [\n 'password'\n ];\n }",
"public static function getUnauthorizedUserList()\n {\n $result;\n $userList = array();\n $conn = new MySqlConnect();\n\n $result = $conn -> executeQueryResult(\"SELECT email FROM users WHERE isValidated = 0\");\n if (isset($result))\n {\n // use mysql_fetch_array($result, MYSQL_ASSOC) to access the result object\n while ($row = mysql_fetch_array($result, MYSQL_ASSOC))\n {\n // access the password value in the db\n $userList = array_push($row['email']);\n }\n }\n\n $conn -> freeConnection();\n return $userList;\n }",
"public function getBannedAccountsList() {\n\t\t$result = $this->db->queryFetch(\"SELECT \"._CLMN_MEMBID_.\", \"._CLMN_USERNM_.\", \"._CLMN_EMAIL_.\" FROM \"._TBL_MI_.\" WHERE \"._CLMN_BLOCCODE_.\" = 1 ORDER BY \"._CLMN_MEMBID_.\" ASC\");\n\t\tif(!is_array($result)) return;\n\t\treturn $result;\n\t}",
"public function getChatBlacklist()\n {\n return $this->get(self::_CHAT_BLACKLIST);\n }",
"function getBlackList() {\n\t\treturn $this->_blackList;\n\t}",
"private function getAllowedBypassUsernames(): array\n {\n $allowedUsernames = $this->scopeConfigInterface->getValue(self::XML_PATH_ALLOWED_BYPASS_USERNAMES);\n if (empty($allowedUsernames)) {\n $allowedUsernames = [];\n }\n return $allowedUsernames;\n }",
"public static function getBlackList()\n {\n\n $list = file(self::$blackListFile);\n $listData = array();\n foreach ($list as $value) {\n $listData[] = trim($value);\n }\n return $listData;\n }",
"function getBlacklist() {\n $entry_rs = $this->SHARED_DB->get_results(\n \"SELECT id AS blacklist_id, first_name, last_name, email, notes FROM hbo_blacklist\n ORDER BY blacklist_id, last_name, first_name, email\");\n\n if ( $this->SHARED_DB->last_error ) {\n throw new DatabaseException( $this->SHARED_DB->last_error );\n }\n\n $alias_rs = $this->SHARED_DB->get_results(\n \"SELECT id AS alias_id, blacklist_id, first_name, last_name, email\n FROM hbo_blacklist_alias WHERE deleted_date IS NULL\");\n\n if ( $this->SHARED_DB->last_error ) {\n throw new DatabaseException( $this->SHARED_DB->last_error );\n }\n\n $mugshot_rs = $this->SHARED_DB->get_results(\n \"SELECT id AS mugshot_id, blacklist_id, filename\n FROM hbo_blacklist_mugshot WHERE deleted_date IS NULL\");\n\n if ( $this->SHARED_DB->last_error ) {\n throw new DatabaseException($this->SHARED_DB->last_error);\n }\n\n $blacklist = array();\n foreach ( $entry_rs as $record ) {\n $entry = new BlacklistEntry( $record->blacklist_id, $record->first_name, $record->last_name, $record->email, $record->notes );\n foreach ( $alias_rs as $alias ) {\n if ( $alias->blacklist_id == $record->blacklist_id ) {\n $entry->add_alias( $alias );\n }\n }\n foreach ( $mugshot_rs as $mugshot ) {\n if ( $mugshot->blacklist_id == $record->blacklist_id ) {\n $entry->add_mugshot( $mugshot );\n }\n }\n $blacklist[] = $entry;\n }\n return $blacklist;\n }",
"public function seenPasswordProvider()\n {\n return [\n ['123456'],\n ['password'],\n ['123456789'],\n ['12345678'],\n ['12345'],\n ];\n }",
"function getWhiteList() {\n\t\treturn $this->_whiteList;\n\t}",
"public function getItemWhiteList() {}",
"public static function getFieldBlacklist()\n {\n $fieldBlacklist = array();\n if ( eZINI::instance( 'ocopendata.ini' )->hasVariable( 'ContentSettings', 'IdentifierBlackListForExternal' ) )\n {\n $fieldBlacklist = array_fill_keys(\n eZINI::instance( 'ocopendata.ini' )->variable( 'ContentSettings', 'IdentifierBlackListForExternal' ),\n true\n );\n }\n return $fieldBlacklist;\n }",
"public function getWhitelist()\r\n {\r\n return $this->whitelist;\r\n }",
"public function getBlacklist()\n {\n if (isset($this->raw->blacklist)) {\n $blacklist = (array) $this->raw->blacklist;\n\n array_walk(\n $blacklist,\n function (&$file) {\n $file = Path::canonical($file);\n }\n );\n\n return $blacklist;\n }\n\n return array();\n }",
"public function getUsers()\n {\n if (!is_null($this->db)) {\n $users = $this->db->getUsers();\n foreach ($users as $user) {\n $this->users[$user->name] = $user->password;\n }\n }\n return array_map(function($v) {\n return \"hidden\";\n }, $this->users);\n }",
"private function getDisallowedFunding(): array\n {\n $disallowedFunding = $this->config->getValue('disable_funding_options');\n return $disallowedFunding ? explode(',', $disallowedFunding) : [];\n }",
"public function getStatusBlacklist()\n {\n return $this->status_blacklist;\n }",
"private static function notAllowed() : array\n\t{\n\t\t$return = [];\n\n\t\t$aeSettings = \\MarkNotes\\Settings::getInstance();\n\n\t\t$return['count'] = 0;\n\t\t$return['status'] = 0;\n\t\t$return['message'] = $aeSettings->getText('not_authenticated');\n\n\t\t/*<!-- build:debug -->*/\n\t\tif ($aeSettings->getDebugMode()) {\n\t\t\t$return['debug'] = 'The show_login settings is set to ' .\n\t\t\t\t'1 and the user isn\\'t yet connected. In that case, ' .\n\t\t\t\t'the list of files should be keept hidden';\n\t\t}\n\t\t/*<!-- endbuild -->*/\n\n\t\treturn $return;\n\t}",
"public function getWhitelist()\n {\n return $this->whitelist;\n }",
"public function blacklistedTokens() {\n return $this->hasMany(\"Marcosricardoss\\Restful\\Model\\BlacklistedToken\", 'user_id');\n }",
"public function findExcludedUsers(): array\n {\n $statement = $this->db->query(\n $this->translateDbName(\n \"SELECT c.`contact_alias`\n FROM `:db`.`password_expiration_excluded_users` peeu\n INNER JOIN `:db`.`provider_configuration` pc ON pc.`id` = peeu.`provider_configuration_id`\n AND pc.`name` = 'local'\n INNER JOIN `:db`.`contact` c ON c.`contact_id` = peeu.`user_id`\n AND c.`contact_register` = 1\"\n )\n );\n\n $excludedUsers = [];\n if ($statement !== false && $rows = $statement->fetchAll(\\PDO::FETCH_ASSOC)) {\n $excludedUsers = $rows;\n }\n\n return $excludedUsers;\n }",
"public function clientList()\n\t{\n\t\treturn $this->client()->latest()\n\t\t\t->where('password_client', true)\n\t\t\t->where('revoked', false)->get()\n\t\t\t->makeVisible('secret');\n\t}",
"public static function getClassBlacklist()\n {\n $classBlacklist = array();\n if ( eZINI::instance( 'ocopendata.ini' )->hasVariable( 'ContentSettings', 'ClassIdentifierBlackListForExternal' ) )\n {\n $classBlacklist = array_fill_keys(\n eZINI::instance( 'ocopendata.ini' )->variable( 'ContentSettings', 'ClassIdentifierBlackListForExternal' ),\n true\n );\n }\n return $classBlacklist;\n }",
"function readBlacklist(){\n\t\t$dirs=array();\n\t\t// Blacklist laden und abarbeiten\n\t\t$blacklist_file\t=\t$this->config[\"blacklist\"];\n\t\t\n\t\t$blacklist_fh\t=\tfopen($blacklist_file, \"r\");\n\t\tif (! $blacklist_fh) {\n\t \tthrow new Exception(\"Could not open the file!\".$blacklist_file);\n\t }\n\t\t\n\t\twhile ($zeile = fgets($blacklist_fh, 4096))\n\t\t\t{\n\t\t\t\t$dirs[]=trim($zeile);\n\t\t\t}\n\t\tfclose ($blacklist_fh);\n\t\treturn $dirs;\n\t}",
"function getBlackListFromRequest() {\n\t\t$_blackList = array();\n\n\t\tif (isset($_REQUEST['blackListEditControl'])){\n\t\t\t$i = 0;\n\t\t\twhile (true){\n\t\t\t\tif(isset($_REQUEST[$_REQUEST['blackListEditControl'] . '_variant0_' . $_REQUEST['blackListEditControl'] . '_item' . $i])){\n\t\t\t\t\t$_blackList[] = $_REQUEST[$_REQUEST['blackListEditControl'] . '_variant0_' . $_REQUEST['blackListEditControl'] . '_item' . $i];\n\t\t\t\t\t$i++;\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn weConvertToIds($_blackList, CUSTOMER_TABLE);\n\t}"
] |
[
"0.6589323",
"0.6463986",
"0.6436926",
"0.6436926",
"0.60913545",
"0.60621804",
"0.6048326",
"0.6003649",
"0.59934455",
"0.5990769",
"0.59893215",
"0.59109175",
"0.5902204",
"0.5834876",
"0.5828637",
"0.5766147",
"0.57602733",
"0.572708",
"0.5723637",
"0.5716514",
"0.5692593",
"0.5684555",
"0.56793904",
"0.566352",
"0.5600566",
"0.5585992",
"0.55832887",
"0.5570522",
"0.5555729",
"0.5535604"
] |
0.7236881
|
0
|
Checks if a given credential exists.
|
public function hasCredential(string $id): bool;
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private static function has_credentials() {\r\n\t\t\t$credentials = self::get_credentials();\r\n\r\n\t\t\treturn is_array($credentials)\r\n\t\t\t\t\t&& isset($credentials['api-key'])\r\n\t\t\t\t\t&& isset($credentials['email'])\r\n\t\t\t\t\t&& isset($credentials['id'])\r\n\t\t\t\t\t&& !empty($credentials['api-key'])\r\n\t\t\t\t\t&& !empty($credentials['email'])\r\n\t\t\t\t\t&& !empty($credentials['id']);\r\n\t\t}",
"function existeCredito($credito){\n\t\t$existentes\t\t= $this->getContarDoctos(iDE_CREDITO, false, $credito);\n\t\treturn\t\t($existentes == 0 ) ? false : true;\n\t}",
"public static function checkCredentials()\n {\n if (null === self::username() || null === self::password()) {\n echo self::errorMessage();\n die(1);\n }\n\n return true;\n }",
"function existeCredito($credito){\n\t\t//$socio\t\t= $this->mCodigo;\n\t\t$existentes\t= 0;\n\t\t\t$sql\t\t= \"SELECT COUNT(numero_solicitud) AS 'n' FROM creditos_solicitud WHERE numero_solicitud = $credito \";\n\t\t\t$existentes\t= mifila($sql, \"n\");\n\n\t\treturn\t\t($existentes == 0 ) ? false : true;\n\t}",
"public function hasCredentialEnabled(string $id): bool;",
"function getCredentialsAreValid($username, $password) {\r\n global $db;\r\n\r\n //phpAlert(\"building query string\");\r\n // Query String\r\n $query = \"SELECT * FROM system_user WHERE system_user_name = '$username';\";\r\n\r\n //phpAlert(\"query string is: \" . $query);\r\n \r\n try {\r\n $statement = $db->prepare($query);\r\n $statement->execute();\r\n $result = $statement->fetch();\r\n $statement->closeCursor();\r\n // If user doesn't exist, return false\r\n if (empty($result))\r\n return false;\r\n\r\n //phpAlert(\"Account exists, verifying password\");\r\n // Validate using password_verify()\r\n return (password_verify($password, $result['system_user_password']));\r\n } catch (PDOException $ex) {\r\n echo $ex->getMessage();\r\n exit;\r\n }\r\n}",
"public function checkCredentials($identity, $credentials)\n {\n if ($this->salt != null) {\n $sql = \"SELECT di.id\n\t\t\t\t\tFROM dlayer_identity di\n\t\t\t\t\tWHERE di.identity = :identity\n\t\t\t\t\tAND di.credentials = :credentials\n\t\t\t\t\tAND logged_in = 0\n\t\t\t\t\tAND enabled = 1\n\t\t\t\t\tLIMIT 1\";\n $stmt = $this->_db->prepare($sql);\n $stmt->bindValue(':identity', $identity, PDO::PARAM_STR);\n $stmt->bindValue(':credentials',\n $this->hashedCredentials($credentials), PDO::PARAM_STR);\n $stmt->execute();\n\n $result = $stmt->fetch();\n\n if ($result != false) {\n $this->identity_id = $result['id'];\n\n return true;\n } else {\n return false;\n }\n } else {\n throw new Exception('Salt not set in authentication model');\n }\n }",
"public function hasCredentials($store=null)\n {\n return ($this->hasAccountUser($store) && $this->hasAccountSignature($store));\n }",
"public function hasCredential($credential, $useAnd = true)\r\n {\r\n if (empty($credential))\r\n {\r\n return true;\r\n }\r\n\r\n if (!$this->getGuardUser())\r\n {\r\n return false;\r\n }\r\n\r\n if ($this->getGuardUser()->getIsSuperAdmin())\r\n {\r\n return true;\r\n }\r\n\r\n return parent::hasCredential($credential, $useAnd);\r\n }",
"function getCredentialsAreValid($username, $passwordHash) {\r\n global $db;\r\n\r\n // Query String\r\n $query = \"\r\n SELECT *\r\n FROM user\r\n WHERE user_name = :username\";\r\n\r\n try {\r\n $statement = $db->prepare($query);\r\n $statement->bindValue(':username', $username);\r\n $statement->execute();\r\n $result = $statement->fetch();\r\n $statement->closeCursor();\r\n // If user doesn't exist, return false\r\n if (empty($result))\r\n return false;\r\n\r\n return ($result['password'] == $passwordHash);\r\n } catch (PDOException $ex) {\r\n echo $ex->getMessage();\r\n exit;\r\n }\r\n}",
"public function hasCredential($credential, $useAnd = true) {\n if (empty($credential)) {\n return true;\n }\n\n if (!$this->getGuardUser()) {\n return false;\n }\n\n if ($this->getGuardUser()->getIsSuperAdmin()) {\n return true;\n }\n\n return parent::hasCredential($credential, $useAnd);\n }",
"private function checkCredentials(array $args = []): bool\n {\n if (empty($args['credentials'])) {\n throw new VisacheckException('You did not provide the Visacheck client credentials in the configuration.', $args);\n }\n $id = data_get($args, 'credentials.id', null);\n $secret = data_get($args, 'credentials.secret', null);\n if (empty($id)) {\n throw new VisacheckException('The client \"id\" key is absent in the credentials configuration.', $args);\n }\n if (empty($secret)) {\n throw new VisacheckException('The client \"secret\" key is absent in the credentials configuration.', $args);\n }\n return true;\n }",
"public function has(string $credentialId): bool\n {\n return $this->findOneByCredentialId($credentialId) !== null;\n }",
"protected function isAccountExist()\n {\n $sessionId = \\Session::getId();\n $account = Account::where('session_id', $sessionId)->first();\n if (!$account) return false;\n\n return true;\n }",
"public function checkCredentials(string $email, string $password):bool;",
"public function canManageCredentials()\n {\n return true;\n }",
"public function findByCredentials($username, $password){\n $db = database::getInstance();\n if($db === null){\n header('Location: /500');\n die;\n }\n\n try{\n $password = hash('sha512', $password); //Hash the password\n\n $stmt = $db->connection->prepare('SELECT id FROM '.static::$table.' WHERE username = :username AND password = :password LIMIT 1;');\n $stmt->bindParam('username', $username);\n $stmt->bindParam('password', $password);\n $stmt->execute();\n\n if($stmt->rowCount()==1){\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n $this->load($row['id']); //Load the found object\n return true;\n } else {\n return false;\n }\n }catch (PDOException $e){\n database::logAndDestroy($e);\n }\n }",
"private static function get_credentials($credential_key = null) {\r\n\t\t\t$credentials = self::get_settings('credentials');\r\n\r\n\t\t\treturn empty($credentials) ? false :\r\n\t\t\t\t\t\t(is_null($credential_key) ? $credentials :\r\n\t\t\t\t\t\t\t(isset($credentials[$credential_key]) ? $credentials[$credential_key] : false));\r\n\t\t}",
"public function attempt(Credentials $credentials): bool\n {\n }",
"private function _validateCredentials($credentials){\n if(empty($credentials->username) || empty($credentials->password)) return false;\n $admin = $this->_getPassword($credentials->username);\n if(empty($admin)) return false;\n $decodedPassword = $this->encryption->decrypt($admin->password);\n return $credentials->password == $decodedPassword;\n }",
"public static function exists($login);",
"public function isExist() {\n\t\tif (!empty($this->enCryptKey) && !empty($this->deCryptKey) && !empty($this->certKey)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"function has_account()\n{\n return file_exists(DEFAULT_ACCOUNTFILE);\n}",
"public function hasPwIsExist(){\n return $this->_has(2);\n }",
"public function checkUserExist($account){\n $query = \"select * from members where account=\\\"$account\\\"\";\n $result = $this->dbh->query($query);\n if($result->rowCount() > 0){\n return true;\n }\n return false;\n }",
"public function checkCredentials( $username, $password ){\n $mysqli = $this->connect();\n\n //real_escape_string to prevent sql injection\n $username = $mysqli->real_escape_string( $username );\n $password = $mysqli->real_escape_string( $password );\n\n //hashing the 'password' value\n $password = hash( 'sha512', $password );\n\n $query = 'SELECT * FROM tbl_users \n\t\t\t\t\t WHERE email = \"'. $username .'\" \n\t\t\t\t\t\tAND password = \"'. $password .'\"';\n $result = $mysqli->query($query);\n\n //if I get a result it means the credentials are right.\n if( $result->num_rows === 1 ){\n $this->message = $result;\n $this->username = $username;\n $this->status = True;\n }else{\n $this->status = False;\n }\n }",
"public function checkCredentials($credentials, UserInterface $user): bool\n {\n // Credentials have already been checked in getUser method\n return true;\n }",
"public function exist()\n {\n return ( !! ldap_get_name($this->username));\n }",
"function userExists($username) {\r\n\t\treturn username_exists($username);\r\n\t}",
"public function check($credentials, array $options = array()) {\n $conditions = $this->_filters($credentials->data);\n $options += $this->_config;\n\n /*\n try {\n if (!$this->openId->mode) {\n if(isset($_POST[$this->_field])) {\n $this->openId->identity = $_POST[$this->_field];\n\n # The following two lines request email, full name, and a nickname\n # from the provider. Remove them if you don't need that data.\n $this->openId->required = array('contact/email');\n $this->openId->optional = array('namePerson', 'namePerson/friendly');\n header('Location: ' . $this->openId->authUrl());\n }\n } elseif ($this->openId->mode == 'cancel') {\n return false;\n } elseif ($this->openId->validate()) {\n return true;\n //echo 'User ' . ($this->openId->validate() ? $this->openId->identity . ' has ' : 'has not ') . 'logged in.';\n //print_r($this->openId->getAttributes());\n }\n } catch(ErrorException $e) {\n echo $e->getMessage();\n return false;\n }\n */\n\n return false;\n }"
] |
[
"0.6704326",
"0.6484532",
"0.63837886",
"0.63524604",
"0.6249707",
"0.6129479",
"0.6128799",
"0.6089175",
"0.60852945",
"0.6075823",
"0.598685",
"0.58062375",
"0.5749391",
"0.57311356",
"0.57116455",
"0.56575996",
"0.56350815",
"0.5615225",
"0.5584533",
"0.5579342",
"0.55787474",
"0.5559867",
"0.55548906",
"0.5549808",
"0.5544483",
"0.55173737",
"0.55057865",
"0.55012465",
"0.54983485",
"0.54873234"
] |
0.6710675
|
0
|
Removes a credential previously registered.
|
public function removeCredential($id): void;
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function eraseCredentials() {}",
"public function eraseCredentials()\n {}",
"public function eraseCredentials()\r\n {}",
"public function eraseCredentials() {\n }",
"public function eraseCredentials() {\n }",
"public function eraseCredentials() {\n }",
"public function eraseCredentials()\n {\n }",
"public function eraseCredentials()\n {\n // TODO: Implement eraseCredentials() method.\n }",
"public function eraseCredentials()\r\n {\r\n }",
"public function eraseCredentials()\n {\n }",
"public function eraseCredentials()\n {\n }",
"public function eraseCredentials()\n {\n }",
"public function eraseCredentials()\n {\n }",
"public function eraseCredentials()\n {\n }",
"public function eraseCredentials()\n {\n }",
"public function eraseCredentials()\n {\n }",
"public function eraseCredentials()\n {\n }",
"public function eraseCredentials()\n {\n }",
"public function eraseCredentials()\n {\n }",
"public function eraseCredentials()\n {\n }",
"public function eraseCredentials()\n {\n }",
"public function eraseCredentials()\n {\n }",
"public function eraseCredentials()\n {\n }",
"public function eraseCredentials()\n {\n }",
"public function eraseCredentials()\n {\n }",
"public function eraseCredentials()\n {\n }",
"public function eraseCredentials()\n {\n }",
"public function eraseCredentials()\n {\n }",
"public function eraseCredentials()\n {\n }",
"public function eraseCredentials()\n {\n }"
] |
[
"0.70132595",
"0.6885312",
"0.68665123",
"0.68057185",
"0.68057185",
"0.68057185",
"0.6775754",
"0.6723202",
"0.66925675",
"0.66799235",
"0.66799235",
"0.66799235",
"0.66799235",
"0.66799235",
"0.66799235",
"0.66799235",
"0.66799235",
"0.66799235",
"0.66799235",
"0.66799235",
"0.66799235",
"0.66799235",
"0.66799235",
"0.66799235",
"0.66799235",
"0.66799235",
"0.66799235",
"0.66799235",
"0.66799235",
"0.66799235"
] |
0.71632284
|
0
|
Checks if a given credential exists and is enabled.
|
public function hasCredentialEnabled(string $id): bool;
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function hasCredential($credential, $useAnd = true)\r\n {\r\n if (empty($credential))\r\n {\r\n return true;\r\n }\r\n\r\n if (!$this->getGuardUser())\r\n {\r\n return false;\r\n }\r\n\r\n if ($this->getGuardUser()->getIsSuperAdmin())\r\n {\r\n return true;\r\n }\r\n\r\n return parent::hasCredential($credential, $useAnd);\r\n }",
"public function canManageCredentials()\n {\n return true;\n }",
"public function hasCredential($credential, $useAnd = true) {\n if (empty($credential)) {\n return true;\n }\n\n if (!$this->getGuardUser()) {\n return false;\n }\n\n if ($this->getGuardUser()->getIsSuperAdmin()) {\n return true;\n }\n\n return parent::hasCredential($credential, $useAnd);\n }",
"private static function has_credentials() {\r\n\t\t\t$credentials = self::get_credentials();\r\n\r\n\t\t\treturn is_array($credentials)\r\n\t\t\t\t\t&& isset($credentials['api-key'])\r\n\t\t\t\t\t&& isset($credentials['email'])\r\n\t\t\t\t\t&& isset($credentials['id'])\r\n\t\t\t\t\t&& !empty($credentials['api-key'])\r\n\t\t\t\t\t&& !empty($credentials['email'])\r\n\t\t\t\t\t&& !empty($credentials['id']);\r\n\t\t}",
"public function hasCredential(string $id): bool;",
"public static function checkCredentials()\n {\n if (null === self::username() || null === self::password()) {\n echo self::errorMessage();\n die(1);\n }\n\n return true;\n }",
"function canDisplayCredentials()\n\t{\n\t\treturn env('SHOW_CREDENTIALS','false') == 'true';\n\t}",
"function existeCredito($credito){\n\t\t$existentes\t\t= $this->getContarDoctos(iDE_CREDITO, false, $credito);\n\t\treturn\t\t($existentes == 0 ) ? false : true;\n\t}",
"public function check_availability() {\n \n if ( ( $this->client_id != '' ) AND ( $this->client_secret != '' ) ) {\n \n return true;\n \n } else {\n \n return false;\n \n }\n \n }",
"public function hasCredentials($store=null)\n {\n return ($this->hasAccountUser($store) && $this->hasAccountSignature($store));\n }",
"public function analisarCredito()\n {\n return true;\n }",
"public function analisarCredito()\n {\n return true;\n }",
"public function attempt(Credentials $credentials): bool\n {\n }",
"public function analisarCredito()\n {\n return false;\n }",
"function getCredentialsAreValid($username, $password) {\r\n global $db;\r\n\r\n //phpAlert(\"building query string\");\r\n // Query String\r\n $query = \"SELECT * FROM system_user WHERE system_user_name = '$username';\";\r\n\r\n //phpAlert(\"query string is: \" . $query);\r\n \r\n try {\r\n $statement = $db->prepare($query);\r\n $statement->execute();\r\n $result = $statement->fetch();\r\n $statement->closeCursor();\r\n // If user doesn't exist, return false\r\n if (empty($result))\r\n return false;\r\n\r\n //phpAlert(\"Account exists, verifying password\");\r\n // Validate using password_verify()\r\n return (password_verify($password, $result['system_user_password']));\r\n } catch (PDOException $ex) {\r\n echo $ex->getMessage();\r\n exit;\r\n }\r\n}",
"public function has(string $credentialId): bool\n {\n return $this->findOneByCredentialId($credentialId) !== null;\n }",
"protected function checkCredentials() {\n $client = \\Drupal::service('akamai.edgegridclient');\n if ($client->isAuthorized()) {\n drupal_set_message('Authenticated to Akamai.');\n }\n else {\n drupal_set_message('Akamai authentication failed.', 'error');\n }\n }",
"public function supportsCredentials(array $credentials)\n {\n return array_keys($credentials) === array('login', 'password');\n }",
"public function isEnabled() {\n return ($this->auth_type != \"0\");\n }",
"public function checkCredentials($identity, $credentials)\n {\n if ($this->salt != null) {\n $sql = \"SELECT di.id\n\t\t\t\t\tFROM dlayer_identity di\n\t\t\t\t\tWHERE di.identity = :identity\n\t\t\t\t\tAND di.credentials = :credentials\n\t\t\t\t\tAND logged_in = 0\n\t\t\t\t\tAND enabled = 1\n\t\t\t\t\tLIMIT 1\";\n $stmt = $this->_db->prepare($sql);\n $stmt->bindValue(':identity', $identity, PDO::PARAM_STR);\n $stmt->bindValue(':credentials',\n $this->hashedCredentials($credentials), PDO::PARAM_STR);\n $stmt->execute();\n\n $result = $stmt->fetch();\n\n if ($result != false) {\n $this->identity_id = $result['id'];\n\n return true;\n } else {\n return false;\n }\n } else {\n throw new Exception('Salt not set in authentication model');\n }\n }",
"function existeCredito($credito){\n\t\t//$socio\t\t= $this->mCodigo;\n\t\t$existentes\t= 0;\n\t\t\t$sql\t\t= \"SELECT COUNT(numero_solicitud) AS 'n' FROM creditos_solicitud WHERE numero_solicitud = $credito \";\n\t\t\t$existentes\t= mifila($sql, \"n\");\n\n\t\treturn\t\t($existentes == 0 ) ? false : true;\n\t}",
"function getCredentialsAreValid($username, $passwordHash) {\r\n global $db;\r\n\r\n // Query String\r\n $query = \"\r\n SELECT *\r\n FROM user\r\n WHERE user_name = :username\";\r\n\r\n try {\r\n $statement = $db->prepare($query);\r\n $statement->bindValue(':username', $username);\r\n $statement->execute();\r\n $result = $statement->fetch();\r\n $statement->closeCursor();\r\n // If user doesn't exist, return false\r\n if (empty($result))\r\n return false;\r\n\r\n return ($result['password'] == $passwordHash);\r\n } catch (PDOException $ex) {\r\n echo $ex->getMessage();\r\n exit;\r\n }\r\n}",
"public function checkCredentials(string $email, string $password):bool;",
"public function check($credentials, array $options = array()) {\n $conditions = $this->_filters($credentials->data);\n $options += $this->_config;\n\n /*\n try {\n if (!$this->openId->mode) {\n if(isset($_POST[$this->_field])) {\n $this->openId->identity = $_POST[$this->_field];\n\n # The following two lines request email, full name, and a nickname\n # from the provider. Remove them if you don't need that data.\n $this->openId->required = array('contact/email');\n $this->openId->optional = array('namePerson', 'namePerson/friendly');\n header('Location: ' . $this->openId->authUrl());\n }\n } elseif ($this->openId->mode == 'cancel') {\n return false;\n } elseif ($this->openId->validate()) {\n return true;\n //echo 'User ' . ($this->openId->validate() ? $this->openId->identity . ' has ' : 'has not ') . 'logged in.';\n //print_r($this->openId->getAttributes());\n }\n } catch(ErrorException $e) {\n echo $e->getMessage();\n return false;\n }\n */\n\n return false;\n }",
"protected function isServiceAvailable()\n {\n return (boolean) $this->extConfig['providers'][strtolower($this->provider)]['enabled'];\n }",
"public function check()\n {\n if($this->user_provider->retrieveById($this->user_provider->getAuthIdentifier()))\n return true;\n\n return false;\n }",
"public function checkCredentials($credentials, UserInterface $user): bool\n {\n // Credentials have already been checked in getUser method\n return true;\n }",
"public function shouldAllowCredentials(): bool {\n return $this->configuration['allow_credentials'];\n }",
"function has_account()\n{\n return file_exists(DEFAULT_ACCOUNTFILE);\n}",
"public function isAuthorized(){\n\t\t// Check that username is not empty and exists\n\t\t;return ($username = $_SERVER['PHP_AUTH_USER']) && array_key_exists($username, $this->users_pwds)\n\t\t// Check passord validity\n\t\t&& $this->users_pwds[$username] === $_SERVER['PHP_AUTH_PW']\n\t\t;\n\t}"
] |
[
"0.6538329",
"0.64425474",
"0.644016",
"0.63510704",
"0.63463235",
"0.603827",
"0.59915596",
"0.5912804",
"0.5869477",
"0.5808228",
"0.5798281",
"0.5798281",
"0.57705164",
"0.5752862",
"0.5729313",
"0.5693539",
"0.5671267",
"0.5668858",
"0.5667361",
"0.5664522",
"0.56084627",
"0.56073374",
"0.560692",
"0.5584587",
"0.55605847",
"0.55189633",
"0.55097413",
"0.5472168",
"0.54569685",
"0.5451331"
] |
0.717114
|
0
|
Enable the credential for authentication.
|
public function enableCredential($id): void;
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function setAuthentication($credential);",
"public function enableTwoFactorAuth(): void\n {\n $this->twoFactorAuth->enabled_at = now();\n\n if (config('laraguard.recovery.enabled')) {\n $this->generateRecoveryCodes();\n }\n\n $this->twoFactorAuth->save();\n\n event(new Events\\TwoFactorEnabled($this));\n }",
"public function setCredential($credential);",
"public function enable()\n {\n $this->enabled = true;\n }",
"public function authenticateCredential()\n {\n $sessionToken = $this->login();\n $this->credential->setSessionToken($sessionToken);\n }",
"public function enable() {}",
"public function enable();",
"public function enable();",
"public function setAccessControlAllowCredentials(): void\n {\n $this->allowCredentials = \"true\";\n }",
"public static function enable()\n {\n self::$_enabled = TRUE;\n }",
"public static function enable(): void\n {\n static::$_enabled = true;\n }",
"public static function enable() {\n\t\tself::$enabled = true;\n\t}",
"public static function enable(){\n self::$enabled = true; \n self::$disabled=false;\n }",
"public function enable()\n {\n add_settings_field(\n 'enable',\n apply_filters($this->plugin_name . 'label-enable', esc_html__('Enable', $this->plugin_name)),\n [$this->builder, 'checkbox'],\n $this->plugin_name,\n $this->plugin_name . '-general',\n [\n 'description' => 'Serve ' . get_site_url() . '/.well-known/security.txt on your WordPress site.',\n 'id' => 'enable',\n 'value' => isset($this->options['enable']) ? $this->options['enable'] : false,\n ]\n );\n }",
"public static function enable(): void\n {\n self::$isEnabled = true;\n }",
"public function enable() {\n\t\t$this->update(FALSE);\n\t}",
"private function authenticate()\n {\n self::assertValidAuthType();\n\n $this->client\n ->getEmitter()\n ->attach(new $this->authenticators[$this->authType]($this));\n }",
"public function setBasicAuth()\n {\n $auth = $this->auth;\n\n if (null !== $auth['user']) {\n $this->mink->getSession()->setBasicAuth(\n $auth['user'],\n $auth['password']\n );\n }\n }",
"public function enable()\r\n {\r\n $this->enabled = true;\r\n\r\n if (!$this->booted) {\r\n $this->boot();\r\n }\r\n }",
"public function enable()\n\t{\n\t\t$this->disabled_at = null;\n\t\t$this->disabled_by_user_id = null;\n\t\t$this->save();\n\t}",
"public function enable($enable) {\n\t\tself::$isEnable = $bool;\n\t}",
"public function setAuthenticated();",
"public function enableLocked()\n\t{\n\t\t$this->_locked = true;\n\t}",
"public function enable()\n {\n $this->_access(\"put\");\n $status = $this->Assets_model->enable($this->input->post());\n\n $this->_returnAjax($status);\n }",
"public function authenticate(ICredential $credential);",
"public function use_authentication()\n {\n }",
"public function enable($site_env, $username, $password)\n {\n $env = $this->getEnv($site_env);\n\n $this->processWorkflow($env->getLock()->enable(['username' => $username, 'password' => $password,]));\n $this->log()->notice(\n '{site}.{env} has been locked.',\n [\n 'site' => $this->getSiteById($site_env)->getName(),\n 'env' => $env->getName(),\n ]\n );\n }",
"public function enable( $name );",
"public function enableTwoFactorAuth(EnableTwoFactorRequest $request)\n {\n if (Authy::isEnabled($this->theUser)) {\n return redirect()->route('user.edit', $this->theUser->id)\n ->withErrors(trans('app.2fa_already_enabled'));\n }\n\n $this->theUser->setAuthPhoneInformation($request->country_code, $request->phone_number);\n\n Authy::register($this->theUser);\n\n $this->theUser->save();\n\n event(new TwoFactorEnabled);\n\n return redirect()->route('profile')\n ->withSuccess(trans('app.2fa_enabled'));\n }",
"public function analisarCredito()\n {\n return true;\n }"
] |
[
"0.67225397",
"0.6499089",
"0.64015675",
"0.6358603",
"0.6238371",
"0.6220098",
"0.62019885",
"0.62019885",
"0.6193641",
"0.6193102",
"0.6183729",
"0.6096849",
"0.60886204",
"0.6077901",
"0.60628366",
"0.6029517",
"0.5980067",
"0.5910295",
"0.5907464",
"0.5867643",
"0.5800461",
"0.5736712",
"0.57280743",
"0.57207745",
"0.56565195",
"0.56265557",
"0.5598955",
"0.5596285",
"0.5586892",
"0.5575516"
] |
0.70088816
|
0
|
Disable the credential for authentication.
|
public function disableCredential($id): void;
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function disableTwoFactorAuth(): void\n {\n $this->twoFactorAuth->flushAuth()->delete();\n\n event(new Events\\TwoFactorDisabled($this));\n }",
"public function eraseCredentials()\n {\n $this->plainPasword = null;\n }",
"public function disableAllCredentials($except = null): void;",
"function disableAuth($value = true){\n\t\t$GLOBALS['amfphp']['disableAuth'] = $value;\n\t}",
"public function disable();",
"public function eraseCredentials()\n {\n $this->setPlainPassword(null);\n }",
"public function eraseCredentials()\n {\n $this->setPlainPassword(null);\n }",
"public function eraseCredentials()\n {\n $this->setPlainPassword(null);\n }",
"public function disable() {}",
"public function eraseCredentials()\n {\n // do nothing\n }",
"public function eraseCredentials()\n {\n $this->plainPassword = null;\n }",
"public function eraseCredentials()\n {\n $this->plainPassword = null;\n }",
"public function eraseCredentials()\n {\n $this->plainPassword = null;\n }",
"public function eraseCredentials()\n {\n $this->plainPassword = null;\n }",
"public function eraseCredentials()\n {\n $this->plainPassword = null;\n }",
"public function eraseCredentials()\n {\n $this->plainPassword = null;\n }",
"public function eraseCredentials()\n {\n $this->plainPassword = null;\n }",
"public function eraseCredentials()\n {\n $this->plainPassword = null;\n }",
"public function eraseCredentials()\n {\n $this->plainPassword = null;\n }",
"public function eraseCredentials()\n {\n \n }",
"public function eraseCredentials()\n {\n // if you had a plainPassword property, you'd nullify it here\n // $this->plainPassword = null;\n }",
"public function eraseCredentials()\n {\n // if you had a plainPassword property, you'd nullify it here\n // $this->plainPassword = null;\n }",
"public function eraseCredentials()\r\n {}",
"public function eraseCredentials()\n {\n $this->password = null;\n }",
"public function disable()\n {\n $this->enabled = false;\n }",
"public static function disabled(): NoAuth\n {\n return new NoAuth();\n }",
"public function eraseCredentials()\n {\n // if you had a plainPassword property, you'd nullify it here\n\n $this->plainPassword = null;\n }",
"public function eraseCredentials() {}",
"public function eraseCredentials() {\n }",
"public function eraseCredentials() {\n }"
] |
[
"0.710554",
"0.68567115",
"0.68101025",
"0.67965436",
"0.6655941",
"0.66355264",
"0.66355264",
"0.66355264",
"0.6625967",
"0.6602859",
"0.65797526",
"0.65797526",
"0.65797526",
"0.65797526",
"0.65797526",
"0.65797526",
"0.65797526",
"0.65797526",
"0.65797526",
"0.6564896",
"0.65569216",
"0.65569216",
"0.653517",
"0.653486",
"0.6533266",
"0.6530221",
"0.6528658",
"0.65170574",
"0.6500405",
"0.6500405"
] |
0.7377107
|
0
|
Disables all credentials for the user.
|
public function disableAllCredentials($except = null): void;
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function eraseCredentials()\n {\n // does nothing; nothing sensitive is stored, even temporary\n }",
"public function eraseCredentials()\n {\n $this->setPlainPassword(null);\n }",
"public function eraseCredentials()\n {\n $this->setPlainPassword(null);\n }",
"public function eraseCredentials()\n {\n $this->setPlainPassword(null);\n }",
"public function eraseCredentials() {\n // TODO: Implement eraseCredentials() method.\n }",
"public function eraseCredentials()\n {\n // do nothing\n }",
"public function eraseCredentials()\n {\n return;\n }",
"public function eraseCredentials()\n {\n return;\n }",
"public function eraseCredentials() {}",
"public function eraseCredentials(): void\n {\n $this->password = '';\n }",
"public function eraseCredentials()\n {\n // TODO: Implement eraseCredentials() method.\n }",
"public function eraseCredentials()\n {\n // TODO: Implement eraseCredentials() method.\n }",
"public function eraseCredentials()\n {\n // TODO: Implement eraseCredentials() method.\n }",
"public function eraseCredentials()\n {\n // TODO: Implement eraseCredentials() method.\n }",
"public function eraseCredentials()\n {\n // TODO: Implement eraseCredentials() method.\n }",
"public function eraseCredentials()\n {\n // TODO: Implement eraseCredentials() method.\n }",
"public function eraseCredentials()\n {\n // TODO: Implement eraseCredentials() method.\n }",
"public function eraseCredentials()\n {\n // TODO: Implement eraseCredentials() method.\n }",
"public function eraseCredentials()\n {\n // TODO: Implement eraseCredentials() method.\n }",
"public function eraseCredentials()\n {\n // TODO: Implement eraseCredentials() method.\n }",
"public function eraseCredentials()\n {\n // TODO: Implement eraseCredentials() method.\n }",
"public function eraseCredentials()\n {\n // TODO: Implement eraseCredentials() method.\n }",
"public function eraseCredentials()\n {\n // TODO: Implement eraseCredentials() method.\n }",
"public function eraseCredentials()\n {\n // TODO: Implement eraseCredentials() method.\n }",
"public function eraseCredentials()\n {\n // TODO: Implement eraseCredentials() method.\n }",
"public function eraseCredentials()\n {\n // TODO: Implement eraseCredentials() method.\n }",
"public function eraseCredentials()\n {\n // TODO: Implement eraseCredentials() method.\n }",
"public function eraseCredentials()\n {\n // TODO: Implement eraseCredentials() method.\n }",
"public function eraseCredentials()\n {\n // TODO: Implement eraseCredentials() method.\n }",
"public function eraseCredentials()\n {\n // TODO: Implement eraseCredentials() method.\n }"
] |
[
"0.70127445",
"0.6964348",
"0.6964348",
"0.6964348",
"0.69349086",
"0.6931882",
"0.688945",
"0.688945",
"0.6881182",
"0.6861995",
"0.6844219",
"0.6844219",
"0.6844219",
"0.6844219",
"0.6844219",
"0.6844219",
"0.6844219",
"0.6844219",
"0.6844219",
"0.6844219",
"0.6844219",
"0.6844219",
"0.6844219",
"0.6844219",
"0.6844219",
"0.6844219",
"0.6844219",
"0.6844219",
"0.6844219",
"0.6844219"
] |
0.7320857
|
0
|
Returns all credentials descriptors of the user.
|
public function allCredentialDescriptors(): array;
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function getCredentials()\n {\n return $this->hasMany(Credential::className(), ['id' => 'credential_id'])\n ->viaTable('{{%content_providers_credentials}}', ['content_provider_id' => 'id']);\n }",
"public function getCredentials() {\r\n\t\t\r\n\t\treturn $this->_credentials;\r\n\t\t\r\n\t}",
"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 }",
"protected function getCredentials(): array\n {\n return [\n 'auth_corpid' => $this->authCorpid,\n 'permanent_code' => $this->permanentCode,\n ];\n }",
"protected function getCredentials(): array\n {\n return [\n 'suite_id' => $this->app['config']['suite_id'],\n 'suite_secret' => $this->app['config']['suite_secret'],\n 'suite_ticket' => $this->app['suite_ticket']->getTicket(),\n ];\n }",
"function GetCrediteds()\n\t{\n\t\t$result = $this->sendRequest(\"GetCrediteds\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}",
"public function getCredentials() {\n\t\treturn $this->_credentials;\n\t}",
"public function getCredentials()\n\t{\n\t\treturn $this->credentials;\n\t}",
"public static function\tDescriptors()\n {\n $accesses = array(\"Default\" => array(\"Public\" => self::TypePublic));\n\n if (Cache::Exist(\"user\") == false)\n\treturn $accesses;\n\n $user = Cache::Get(\"user\");\n\n $accesses[\"Default\"][\"Private\"] = $user->id;\n\n foreach (self::$entities as $entity)\n\t{\n\t // XXX[we could perform theses operations in parallel to speed up the process]\n\t $access = call_user_func($entity . \"::Access\", $user->id);\n\n\t if (empty($access) == true)\n\t continue;\n\n\t $accesses[$entity] = array();\n\n\t foreach ($access as $object)\n\t $accesses[$entity][$object[\"name\"]] = $object[\"id\"];\n\t}\n\n return $accesses;\n }",
"protected function getCredentials()\n {\n $user = $this->options[\"USER\"];\n $password = $this->options[\"PASS\"];\n // 1BIS : encoded?\n if ($user == \"\" && isSet($this->options[\"ENCODED_CREDENTIALS\"])) {\n list($user,$password) = AJXP_Safe::getCredentialsFromEncodedString($this->options[\"ENCODED_CREDENTIALS\"]);\n }\n // 2. Try from session\n if ($user==\"\" && isSet($this->options[\"USE_SESSION_CREDENTIALS\"]) ) {\n $safeCred = AJXP_Safe::loadCredentials();\n if ($safeCred !== false) {\n $user = $safeCred[\"user\"];\n $password = $safeCred[\"password\"];\n } else {\n throw new Exception(\"Session credential are empty! Did you forget to check the Set Session Credential in the Authentication configuration panel?\");\n }\n }\n return array($user, $password);\n }",
"public function getCredentials()\n { return $this->get('credentials'); }",
"function get_object_credentials() {\n\t\treturn array(\n\t\t\t'host' => $this->host,\n\t\t\t'port' => $this->port,\n\t\t\t'dbname' => $this->dbName,\n\t\t\t'user' => $this->user,\n\t\t\t'password' => $this->passwd\n\t\t);\n\t}",
"protected function credentials() : array\n {\n return array_combine(\n ['cellphone', 'email', 'password'],\n [$this->login, $this->login, $this->password]\n );\n }",
"public function getCredentials()\n {\n return $this->credentials;\n }",
"public function getCredentials()\n {\n return $this->credentials;\n }",
"public function SelectCredencials() {\n \n $query = $this->conection->query(\"SELECT nuser,npass,ip FROM Admin\");\n $result = array();\n while ($rst = $this->conection->result($query)) {\n\n $temp=null;\n $user = $rst[\"nuser\"]; \n $pass = $rst[\"npass\"]; \n $ip = $rst[\"ip\"]; \n $temp=new Admin($user, $pass, $ip);\n \n array_push($result, $temp);\n }\n \n $this->conection->free($query);\n return $result;\n\n \n }",
"public function UserOptions() {\n return $this->connection->query_direct('DBCC UserOptions')->fetchAllKeyed();\n }",
"abstract public function getCredentials();",
"public function getCredentialsInformation()\n {\n $email = $this->getConfigData('email');\n $token = $this->getConfigData('token');\n $credentials = new PagSeguroAccountCredentials($email, $token);\n\n return $credentials;\n }",
"public function credential()\n {\n return $this->credentials();\n }",
"public function getCredentials()\n {\n $credentials = parent::getCredentials();\n\n unset($credentials['password']);\n\n return $credentials;\n }",
"public function getUserCredential()\n {\n return $this->userCredentials;\n }",
"public function getUsers()\n {\n if (!is_null($this->db)) {\n $users = $this->db->getUsers();\n foreach ($users as $user) {\n $this->users[$user->name] = $user->password;\n }\n }\n return array_map(function($v) {\n return \"hidden\";\n }, $this->users);\n }",
"static public function getcredencial() {\n try {\n $sql = 'SELECT credencial.id, credencial.nombre FROM credencial';\n return dataBaseClass::getInstance()->query($sql)->fetchAll(PDO::FETCH_ASSOC);\n } catch (PDOException $e) {\n return $e;\n }\n }",
"public function getCredentials()\n {\n return $this->provider . '_' . $this->oAuthId;\n }",
"function exchange_get_user_caps() {\n\treturn array(\n\t\t'list_users',\n\t\t'edit_users',\n\t\t'create_users',\n\t\t'add_users',\n\t\t'remove_users',\n\t\t'promote_users',\n\t);\n}",
"public static function listKeys()\n {\n $return = parent::listKeys();\n $return['enumAuthType']['options'] = array('basicauth' => 'basicauth');\n $return['username']['required'] = 'user';\n $return['password']['required'] = 'user';\n $return['password']['input_type'] = 'password';\n return $return;\n }",
"static public function getUsuario_credencial() {\n try {\n $sql = 'SELECT usuario_credencial.id, usuario_credencial.usuario_id, usuario_credencial.credencial_id FROM usuario_credencial';\n return dataBaseClass::getInstance()->query($sql)->fetchAll(PDO::FETCH_ASSOC);\n } catch (PDOException $e) {\n return $e;\n }\n }",
"public function user(): array\n {\n return getApp()->security()->user();\n }",
"public function getCredentials() {\n\t\t\n\t\treturn $this->_getResponse(self::URL_USERS_VERIFY_CREDENTIALS, $this->_query);\n\t}"
] |
[
"0.66652566",
"0.62546265",
"0.6241867",
"0.6180518",
"0.61682355",
"0.61492544",
"0.6113596",
"0.6103205",
"0.6066928",
"0.6047795",
"0.6044413",
"0.6034386",
"0.60199994",
"0.60139894",
"0.60139894",
"0.5990609",
"0.5980225",
"0.5883333",
"0.58337873",
"0.5817381",
"0.5801315",
"0.5725033",
"0.571285",
"0.56894773",
"0.5672139",
"0.5650084",
"0.56150544",
"0.5595724",
"0.5571818",
"0.5548143"
] |
0.80232084
|
0
|
Returns an WebAuthnAuthenticatable user from a given Credential ID.
|
public static function getFromCredentialId(string $id): ?WebAuthnAuthenticatable;
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function retrieveWebAuthnCredential($id)\n {\n return $this->start()->uri(\"/api/webauthn\")\n ->urlSegment($id)\n ->get()\n ->go();\n }",
"public static function getFromCredentialUserHandle(string $handle): ?WebAuthnAuthenticatable;",
"public function retrieveByCredentials(array $credentials)\n {\n if (isset($credentials['user_code'])) {\n return User::where(['user_code' => $credentials['user_code']])->first();\n }\n\n if (isset($credentials['email'])) {\n $externalUser = ExternalUser::where(['email' => $credentials['email']])->first();\n if ($externalUser !== null) {\n return $externalUser->user;\n }\n }\n\n if (isset($credentials['jwt_token'])) {\n try {\n $decoded = JWT::decode($credentials['jwt_token'], $this->websiteToken, ['HS256']);\n $user = User::where(['user_code' => $decoded->lidnr])->first();\n if ($user === null) {\n // First login for user, create one\n $user = User::create([\n 'user_code' => $decoded->lidnr,\n 'type' => User::TYPE_GEWIS,\n ]);\n }\n return $user;\n } catch (\\UnexpectedValueException $e) {\n return null;\n }\n }\n\n return null;\n }",
"public function get_user_by_credentials($credentials) {\n $stmt = $this->pdo->prepare('SELECT id, user_name, email_address, password, remember_me_until \n FROM users WHERE user_name = :user_name OR email_address = :email_address;');\n $stmt->execute([\n 'user_name' => $credentials,\n 'email_address' => $credentials\n ]);\n $user = $stmt->fetch();\n return $user;\n }",
"public function getUserById($id)\n {\n return $this->repository->getUserById($id);\n }",
"public function retrieveWebAuthnCredentialsForUser($userId)\n {\n return $this->start()->uri(\"/api/webauthn\")\n ->urlParameter(\"userId\", $userId)\n ->get()\n ->go();\n }",
"public function getUser($id)\n {\n return $this->userRepository->getUser($id);\n }",
"public static function getUserObjectFromId($id){\n $pdo = static::getDB();\n\n $sql = \"select * from users where user_id = :id\";\n\n $result = $pdo->prepare($sql);\n \n $result->execute([$id]);\n\n $user_array = $result->fetch(); \n\n if($user_array){\n if($user_array['USER_ROLE'] == Trader::ROLE_TRADER){\n return static::getTraderObjectFromEmail($user_array['EMAIL']);\n }\n return new User($user_array);\n }\n return false;\n }",
"public function retrieveByCredentials(array $credentials)\n\t{\n\t\tif (! $user = $credentials[$this->getUsernameField()]) {\n\t\t\tthrow new \\InvalidArgumentException('\"'.$this->getUsernameField().'\" field is missing');\n\t\t}\n\n\t\t$query = $this->createModel()->newQuery();\n\n\t\tforeach ($credentials as $key => $value)\n\t\t{\n\t\t\tif ( ! str_contains($key, 'password')) $query->where($key, $value);\n\t\t}\n\n\t\t$model = $query->first();\n\t\tif($model) {\n\t\t\treturn $this->getUserFromLDAP($model);\n\t\t}\n\n\t\treturn null;\n\t}",
"public function getUser($id) {\n\n $userDAO = new UserDAO();\n $response = $userDAO->findUser($id);\n \n return new User($response->ID, $response->EMAIL, $response->PASSWORD, $response->FIRSTNAME, $response->LASTNAME, $response->RIGHTS,\n $response->ROLE, $response->OBJECTIVE, $response->EDUCATION_1, $response->EDUCATION_2, \n $response->EDUCATION_3, $response->SKILLS, $response->EXPERIENCE_1, $response->EXPERIENCE_2, $response->EXPERIENCE_3,\n $response->REFERENCES, $response->DATE);\n \n\n }",
"public function user($id) {\n\n if (!isset($this->account_details['access_token'])) {\n throw new GoCardless_ClientException('Access token missing');\n }\n\n return GoCardless_User::find_with_client($this, $id);\n\n }",
"public function retrieveByCredentials(array $credentials)\n {\n return new User($credentials);\n }",
"static function get_user_by_id($id) {\n return new User($id);\n }",
"public static function getUserById($id)\n\t{\n\t\t$user = self::where('ID',$id)->first();\n\t\treturn $user;\n\t}",
"public function userAuthByAuthID($id=NULL) {\n\t\t$authManager = new UserAuthManager();\n\t\treturn $this->userauth($authManager->getUserIDFromAuthID($id));\n\t}",
"function get_user_by_service($service, $credential){\n\tglobal $wpdb;\n\tswitch($service){\n\t\tcase 'facebook':\n\t\t\t$user_id = $wpdb->get_var($wpdb->prepare(\"SELECT user_id FROM {$wpdb->usermeta} WHERE meta_key = 'wpg_facebook_id' AND meta_value = %s\", $credential));\n\t\t\tif($user_id){\n\t\t\t\treturn new WP_User($user_id);\n\t\t\t}else{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn null;\n\t\t\tbreak;\n\t}\n}",
"public function getUser($id)\n {\n return $this->dbService->getById($id, $this->userClass);\n }",
"function get_user($user_id)\n\t{\n\t\t$ci =& get_instance();\n\t\treturn $ci->auth_model->get_user($user_id);\n\t}",
"function get_user($user_id)\n\t{\n\t\t$ci =& get_instance();\n\t\treturn $ci->auth_model->get_user($user_id);\n\t}",
"static function findByIdnumber($idnumber) {\n\n $result = get_record('block_courseprefs_users', 'idnumber', $idnumber);\n\n if (!$result) {\n return null;\n }\n\n return new CoursePrefsUser($result->username, $result->firstname, $result->lastname,\n $result->idnumber, $result->year, $result->college, $result->reg_status, \n $result->classification, $result->keypadid, $result->ferpa, \n $result->degree_candidacy, $result->anonymous, $result->format, \n $result->numsections, $result->hidden, $result->cr_delete, $result->id, \n $result->update_flag, $result->moodleid);\n }",
"public function find(int $credentialId): Credential\n {\n $data = $this->fetchDataFromJson('credentials');\n if (! isset($data->$credentialId)) {\n throw new DomainRecordNotFoundException(\"Credential {$credentialId} not found\");\n }\n\n $data = $data->$credentialId;\n\n return new Credential($credentialId, $data->name, $data->value);\n }",
"public static function get_user($user_id);",
"public static function getGoogleUser(OAuthCredentialsDto $authDto)\n {\n $config = OhGooConfig::getInstance();\n try {\n $data = [\n 'headers' => [\n 'Authorization' => sprintf('Bearer %s', $authDto->getAccessToken())\n ]\n ];\n\n $client = new Client();\n $response = $client->request('GET', 'https://www.googleapis.com/oauth2/v2/userinfo', $data);\n $body = $response->getBody();\n\n if ($response->getStatusCode() !== 200) {\n if ($config->hasLogger()) {\n $config->getLogger()->addError(\n sprintf(\n '%s::%s: Invalid response code, expected \"200\" received \"%s\"',\n __CLASS__,\n __METHOD__,\n $response->getStatusCode()\n )\n );\n }\n return false;\n }\n $decoded = json_decode($body->__toString(), true);\n if (!$decoded) {\n if ($config->hasLogger()) {\n $config->getLogger()->addError(\n sprintf(\n '%s::%s: Unable to decode JSON from response.',\n __CLASS__,\n __METHOD__\n )\n );\n }\n return false;\n }\n\n $requiredKeys = ['id', 'email', 'verified_email', 'given_name', 'family_name', 'locale', 'picture'];\n foreach ($requiredKeys as $requiredKey) {\n if (!array_key_exists($requiredKey, $decoded)) {\n if ($config->hasLogger()) {\n $config->getLogger()->addError(\n sprintf(\n '%s::%s: Missing required key of \"%s\".',\n __CLASS__,\n __METHOD__,\n $requiredKey\n )\n );\n }\n return false;\n }\n }\n\n $dto = new GoogleUserDto();\n $dto->setId($decoded['id']);\n $dto->setEmail($decoded['email']);\n $dto->setEmailVerified($decoded['verified_email']);\n $dto->setFirstName($decoded['given_name']);\n $dto->setLastName($decoded['family_name']);\n $dto->setLocale($decoded['locale']);\n $dto->setProfilePictureUrl($decoded['picture']);\n\n return $dto;\n\n } catch (Exception $e) {\n if ($config->hasLogger()) {\n $config->getLogger()->addCritical($e->getMessage());\n }\n return false;\n }\n }",
"public static function getUser($id)\n {\n $user = DB::table('users')->join('auth_levels', 'users.auth_id', '=', 'auth_levels.auth_id')\n ->select('users.*', 'auth_levels.auth_name')\n ->where('users.id', '=', $id)\n ->first();\n return $user;\n }",
"public function getUser($id) {\n return $this->getEntityManager()\n ->getRepository('Alt68\\Entities\\User')\n ->findOneBy(array(\n 'id' => $id));\n }",
"public function getUserById($id)\n {\n return $this->getManagement()->users->get($id);\n }",
"public function get_user( $id ) {\n $u = $this->call( 'userGet', [\n 'userId' => $id ] );\n\n return $u ? $u->user : false;\n }",
"public static function getUser(int $id)\n {\n $sql = \"SELECT * FROM `user` WHERE id = :id\";\n\n $db = new DB();\n $connectionDB = $db->getConnection();\n $result = $connectionDB->prepare($sql);\n $result->bindParam(\":id\", $id, PDO::PARAM_INT);\n $result->execute();\n $result->setFetchMode(PDO::FETCH_ASSOC);\n $result = $result->fetch();\n\n $user = null;\n if ($result) {\n $user = new User(\n $result['login'],\n $result['password'],\n $result['first_name'],\n $result['second_name'],\n $result['sex'],\n $result['date_of_birth']\n );\n\n $user->id = $id;\n $user->role = $result['role'];\n $user->created_at = $result['created_at'];\n $user->updated_at = $result['updated_at'];\n }\n return $user;\n }",
"public function getUser($id)\r\n {\r\n $userRepository = $this->entityManager->getRepository(User::class);\r\n $user = $userRepository->find($id);\r\n\r\n return $user;\r\n }",
"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 }"
] |
[
"0.7048084",
"0.6344268",
"0.6289598",
"0.6253331",
"0.59592336",
"0.5884417",
"0.5797165",
"0.5783987",
"0.5779717",
"0.5720149",
"0.569542",
"0.56669164",
"0.5662899",
"0.5636796",
"0.55985653",
"0.5596667",
"0.55923116",
"0.5589121",
"0.5589121",
"0.55790937",
"0.5563892",
"0.555669",
"0.55491143",
"0.55464906",
"0.5543518",
"0.55409205",
"0.5540485",
"0.552152",
"0.55128163",
"0.5496367"
] |
0.71086943
|
0
|
Returns a WebAuthAuthenticatable user from a given User Handle.
|
public static function getFromCredentialUserHandle(string $handle): ?WebAuthnAuthenticatable;
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"protected function getUser(): LightWebsiteUser\n {\n /**\n * @var $um LightUserManagerService\n */\n $um = $this->getContainer()->get(\"user_manager\");\n return $um->getUser();\n }",
"function authenticate($user, $username, $password) {\n $user = $this->check_remote_user();\n\n if (! is_wp_error($user)) {\n $user = new WP_User($user->ID);\n }\n\n return $user;\n }",
"protected function getValidWebsiteUser(): LightWebsiteUser\n {\n /**\n * @var $um LightUserManagerService\n */\n $um = $this->getContainer()->get(\"user_manager\");\n return $um->getValidWebsiteUser();\n }",
"public function getAuthenticatedUser()\n {\n // get the web-user\n $user = Auth::guard()->user();\n\n // get the api-user\n if(!isset($user) && $user == null) {\n $user = Auth::guard('api')->user();\n }\n return $user;\n }",
"public function getUser() {\n\t\treturn User::newFromName( $this->params['user'], false );\n\t}",
"public function getUser()\n {\n $attributes = $this->getUserAttributes();\n\n // Try to load user by ldap id attribute\n if ($this->idAttribute !== null && isset($attributes['authclient_id'])) {\n $user = User::findOne(['authclient_id' => $attributes['authclient_id'], 'auth_mode' => $this->getId()]);\n if ($user !== null) {\n return $user;\n }\n }\n\n return $this->getUserAuto();\n }",
"protected function authenticateUser()\n {\n $inviteCode = \\Yii::$app->request->get('invite');\n\n /**\n * @var $user User\n */\n $user = null;\n\n if (is_string($inviteCode)) {\n $user = User::getUserFromInviteCode($inviteCode);\n }\n\n if ($user === null) {\n /*\n * If invite code is not recognized, fail over to normal login\n */\n\n /** @var AuthnInterface $auth */\n $auth = \\Yii::$app->auth;\n /** @var AuthUser $authUser */\n $authUser = $auth->login($this->getReturnTo(), \\Yii::$app->request);\n\n /*\n * Get local user instance or create one.\n * Use employeeId since username or email could change.\n */\n $user = User::findOrCreate(null, null, $authUser->employeeId);\n }\n\n return $user;\n }",
"public function user() : Authenticatable|null\n {\n // All routes that need to be authenticated should use AttachBroker middleware\n // Otherwise need a workaround with exception on pages, that not uses this middleware\n //\n if(is_null($this->user) && !$this->broker->isAttached()) {\n return null;\n }\n\n if (! is_null($this->user)) {\n return $this->user;\n }\n\n if ($payload = $this->broker->profile($this->request)) {\n $this->user = $this->loginFromPayload($payload);\n }\n\n return $this->user;\n }",
"private function loadWebUser(User $webUser): User\n {\n //$adUser = ADUsers::getApplicationScopeUser($webUser->getUsername());\n $allPrivilegeLevels = PrivilegeLevelDatabase::getAllPrivilegeLevels();\n /* @var $privilegeLevel PrivilegeLevel */\n foreach ($allPrivilegeLevels as $privilegeLevel) {\n //var_dump(ADUsers::isUserInGroup($webUser->username, $privilegeLevel->getAdGroup()));\n if (ADUsers::isUserInGroup($webUser->username, $privilegeLevel->getAdGroup())) {\n $webUser->addPrivilegeLevel($privilegeLevel);\n if ($privilegeLevel->getSuperAdmin()) {\n $webUser->setSuperUser(true);\n return $webUser;\n }\n }\n }\n\n // var_dump($webUser);\n return $webUser;\n }",
"public function user()\n {\n\n //Check if the user exists\n if (! is_null($this->user)) {\n return $this->user;\n }\n\n //Retrieve token from request and authenticate\n return $this->getTokenForRequest();\n }",
"public function wrapAuthenticate()\n {\n $username = (getenv('WRAP_USERID') == '') ? getenv('REDIRECT_WRAP_USERID') : getenv('WRAP_USERID');\n\n if ($username == '') {\n $username = getenv('REDIRECT_WRAP_USERID');\n }\n\n if ($username == '') {\n setrawcookie('WRAP_REFERER', $this->_getUrl(), 0, '/', '.ncsu.edu');\n header('location:https://webauth.ncsu.edu/wrap-bin/was16.cgi');\n die();\n }\n\n // Create new users automatically, if configured\n $user = get_userdatabylogin($username);\n if (!$user) {\n if (isset($this->_options['autoCreateUser']) && (bool)$this->_options['autoCreateUser']) {\n $user = $this->_createUser($username);\n }\n else {\n die(\"User $username does not exist in the WordPress database\");\n }\n }\n\n return $user;\n }",
"public function user()\n {\n $user = $this->authService->user();\n if(class_exists($this->userResourceClass)) {\n $this->userResourceClass::withoutWrapping();\n return new $this->userResourceClass($user);\n }\n return $user;\n }",
"public function getUser() : object\n {\n $user = new User();\n $user->setDb($this->db);\n $user->find(\"id\", $this->username);\n\n return $user;\n }",
"public function getAuthenticatedUser()\n {\n return JWTAuth::parseToken()->authenticate();\n }",
"private function _getUser($principalUri) {\n\n\t\t$username = basename($principalUri);\n\n\t\treturn \\GO\\Base\\Model\\User::model()->findSingleByAttribute('username', $username);\n\t}",
"public function getValidWebsiteUser(): LightWebsiteUser\n {\n $user = $this->getUser();\n\n if (false === $user->isValid()) {\n throw new LightUserManagerException(\"The user is not valid.\");\n }\n if (false === $user instanceof LightWebsiteUser) {\n throw new LightUserManagerException(\"The user is not an instance of LightWebsiteUser.\");\n }\n return $user;\n }",
"public function user()\n {\n $this->checkTimeouts();\n\n if (! $this->session->has('socialite_token')) return null;\n if ($this->session->has('google_guard_user')) return $this->session->get('google_guard_user');\n\n try {\n $user = Socialite::driver('google')->userFromToken($this->session->get('socialite_token'));\n } catch (\\Exception $e) {\n }\n\n if (! isset($user) || ! $user) return $this->flushSession();\n\n $userModel = $this->hydrateUserModel($user);\n $this->session->put('google_guard_user', $userModel);\n\n return $userModel;\n }",
"function getUserInstance( &$user ) {\n return new AuthPluginUser( $user );\n }",
"public static function user()\n {\n if(static::$_auth_user) {\n return static::$_auth_user;\n }\n\n #Check for authenticated session\n $auth_id = Session::get(static::$_auth_name);\n $instance = static::getConfig('instance');\n\n if($auth_id) {\n static::$_auth_user = new $instance($auth_id);\n return static::$_auth_user;\n }\n\n #Check for user auto log cookie\n $cookie_token = Cookie::get(static::$_auth_name);\n\n if($cookie_token) {\n $user_id = static::validateAuthCookieToken($cookie_token);\n\n if(!$user_id) {\n static::logout();\n return false;\n }\n\n static::$_auth_user = new $instance($user_id);\n #update cookie\n static::setUserCookieToken($user_id);\n return static::$_auth_user;\n }\n\n return false;\n }",
"public function get_user($user = 0) \n\t{\n\t\t// if no user passed, get current user from session\t\n\t\tif ( (intval($user) === 0) AND ($this->logged_in())) \n\t\t{\n\t\t\treturn $this->session->get($this->config['session_key']);\n\t\t} \n\n\t\t// if user ID was passed, try to load user from database\t \n\t\tif (intval($user) !== 0)\n\t\t{\t\n\t\t\t$user_model = new Auth_Users_Model(intval($user));\n\t\t\tif ($user_model->loaded()) \n\t\t\t{\n\t\t\t\t$simple_user = new Simple_User;\n\t\t\t\t$simple_user->set_user($user_model->as_array()); \n\t\t\t\t$user_model->load_roles(); \n\t\t\t\t$simple_user->set_roles($user_model->roles); \n\t\t\t\treturn $simple_user;\n\t\t\t}\n\t\t}\n\n\t\treturn FALSE; \n\t}",
"public function authForUser( $user ){ return $user->authForDB( $this ); }",
"public function getUserWithUsername($username);",
"public function getUserInstance()\n {\n $entity = null;\n\n if ($this instanceof \\User) {\n $entity = $this;\n } elseif ($this instanceof \\PortalUser) {\n $this->setPortalId();\n $entity = $this->getRelated('User');\n } else {\n $entity = $this->getPortalUser()->getRelated('User');\n }\n\n $this->checkJoin($this, $entity);\n\n return $entity;\n }",
"public function user($username = NULL)\n {\n $username || $username = $this->CI->session->userdata('username');\n $user = $this->CI->Auth_Model->user($username);\n return (object)$user;\n }",
"public function getAuthenticatedUser()\n {\n try {\n if ( !$user = JWTAuth::parseToken()->authenticate() ) {\n return response()->json(['user_not_found'], 404);\n }\n } catch ( TokenExpiredException $e ) {\n return response()->json(['token_expired'], $e->getStatusCode());\n } catch ( TokenInvalidException $e ) {\n return response()->json(['token_invalid'], $e->getStatusCode());\n } catch ( JWTException $e ) {\n return response()->json(['token_absent'], $e->getStatusCode());\n }\n\n // The token is valid and we have found the user via the sub claim\n return $user;\n }",
"public function retrieveByCredentials(array $credentials)\n {\n if (isset($credentials['user_code'])) {\n return User::where(['user_code' => $credentials['user_code']])->first();\n }\n\n if (isset($credentials['email'])) {\n $externalUser = ExternalUser::where(['email' => $credentials['email']])->first();\n if ($externalUser !== null) {\n return $externalUser->user;\n }\n }\n\n if (isset($credentials['jwt_token'])) {\n try {\n $decoded = JWT::decode($credentials['jwt_token'], $this->websiteToken, ['HS256']);\n $user = User::where(['user_code' => $decoded->lidnr])->first();\n if ($user === null) {\n // First login for user, create one\n $user = User::create([\n 'user_code' => $decoded->lidnr,\n 'type' => User::TYPE_GEWIS,\n ]);\n }\n return $user;\n } catch (\\UnexpectedValueException $e) {\n return null;\n }\n }\n\n return null;\n }",
"private function getUser()\r\n {\r\n $UserId = -1;\r\n isset($_POST['UserId']) && intval($_POST['UserId']) > 0 ? $UserId = intval($_POST['UserId']) : $UserId = -1;\r\n $User = new User ($UserId);\r\n return $User;\r\n }",
"public function getAuthenticatedUser()\n\t{\n\t\t$user = Auth::user();\n\t\t$user->merchant;\n\n\t\treturn $user;\n\t}",
"public function user()\n\t{\n\t\tif (is_null($this->user) and $this->session->has(static::$key))\n\t\t{\n\t\t\t$this->user = call_user_func(Config::get('auth.by_id'), $this->session->get(static::$key));\n\t\t}\n\n\t\treturn $this->user;\n\t}",
"public function getAuthenticatedUser()\n {\n $token = JWTAuth::getToken();\n if (!$token)\n return false;\n\n try {\n $user = JWTAuth::parseToken()->authenticate();\n if (!$user) {\n return response()->json(['user_not_found'], 404);\n }\n\n } catch (Tymon\\JWTAuth\\Exceptions\\TokenExpiredException $e) {\n\n return response()->json(['token_expired'], $e->getStatusCode());\n\n } catch (Tymon\\JWTAuth\\Exceptions\\TokenInvalidException $e) {\n\n return response()->json(['token_invalid'], $e->getStatusCode());\n\n } catch (Tymon\\JWTAuth\\Exceptions\\JWTException $e) {\n\n return response()->json(['token_absent'], $e->getStatusCode());\n\n }\n\n // the token is valid and we have found the user via the sub claim\n return $user;\n }"
] |
[
"0.6403517",
"0.63244134",
"0.62264055",
"0.62149656",
"0.61722314",
"0.6092895",
"0.608032",
"0.60663587",
"0.6037853",
"0.60039127",
"0.60034364",
"0.59950453",
"0.5990931",
"0.59784555",
"0.5975006",
"0.59730726",
"0.5954003",
"0.59531105",
"0.59379995",
"0.59311277",
"0.5920863",
"0.5915873",
"0.5899421",
"0.5895164",
"0.5886226",
"0.5875049",
"0.58720374",
"0.5868761",
"0.5867029",
"0.5852772"
] |
0.76987237
|
0
|
Polymorphic relation to users table
|
public function user()
{
return $this->morphOne(User::class, 'userable');
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function user(): MorphTo\n {\n return $this->morphTo('user', 'user_type', 'user_id', 'id');\n }",
"public function userType(){\n return $this->belongsTo('App\\Models\\MasterRecords\\UserType');\n }",
"public function userType() {\n // hasOne('Model', 'id column of foreign key', 'local column with foreign key')\n return $this->hasOne('UserType', 'id', 'type');\n }",
"public function users()\n {\n return $this->morphMany(User::class, 'userable');\n }",
"public function binType()\n\t{\n\t\treturn $this->belongsTo('App\\User');\n\t}",
"abstract protected function isSocialUser($type);",
"public function userable()\n {\n return $this->morphTo();\n }",
"public function userable()\n {\n return $this->morphTo();\n }",
"public function user()\n {\n return $this->morphTo();\n }",
"public function getMorphClass()\n {\n return User::class;\n }",
"public function getMorphClass()\n {\n return User::class;\n }",
"public function users()\n {\n return $this->belongsToMany(User::class)->withPivot('user_type');\n }",
"public function user(): BelongsTo;",
"public function morph()\n {\n $this->morphTable('users', array(\n 'columns' => array(\n new Column(\n 'user_id',\n array(\n 'type' => Column::TYPE_INTEGER,\n 'unsigned' => true,\n 'notNull' => true,\n 'autoIncrement' => true,\n 'size' => 10,\n 'first' => true\n )\n ),\n new Column(\n 'user_name',\n array(\n 'type' => Column::TYPE_VARCHAR,\n 'notNull' => true,\n 'size' => 255,\n 'after' => 'user_id'\n )\n ),\n new Column(\n 'user_email',\n array(\n 'type' => Column::TYPE_VARCHAR,\n 'notNull' => true,\n 'size' => 255,\n 'after' => 'user_name'\n )\n ),\n new Column(\n 'user_password',\n array(\n 'type' => Column::TYPE_VARCHAR,\n 'notNull' => true,\n 'size' => 255,\n 'after' => 'user_email'\n )\n ),\n new Column(\n 'user_active',\n array(\n 'type' => Column::TYPE_INTEGER,\n 'default' => '0',\n 'unsigned' => true,\n 'notNull' => true,\n 'size' => 3,\n 'after' => 'user_password'\n )\n ),\n new Column(\n 'user_created',\n array(\n 'type' => Column::TYPE_INTEGER,\n 'unsigned' => true,\n 'notNull' => true,\n 'size' => 10,\n 'after' => 'user_active'\n )\n )\n ),\n 'indexes' => array(\n new Index('PRIMARY', array('user_id')),\n new Index('user_name', array('user_name')),\n new Index('user_email', array('user_email')),\n new Index('user_active', array('user_active'))\n ),\n 'options' => array(\n 'TABLE_TYPE' => 'BASE TABLE',\n 'AUTO_INCREMENT' => '2',\n 'ENGINE' => 'InnoDB',\n 'TABLE_COLLATION' => 'utf8_unicode_ci'\n ),\n )\n );\n }",
"public function users()\n {\n return $this->morphToMany('App\\User', 'userOwnable', 'HoldMyBeer_UserOwnable', 'userOwnableId', 'userId');\n }",
"public function oneToManyRelationPolymorphic(Request $request){\n $userData = User::all();\n\n \n return view('pages.one_to_many_polymorphic', compact('userData'));\n }",
"public function attendingUsers(){\n return $this->morphToMany('App\\Models\\User', 'attendable','attendances');\n }",
"public function users(): MorphToMany\n {\n return $this->morphedByMany(\n getModelForGuard($this->attributes['guard_name']),\n 'model',\n config('acl.table_names.model_has_permissions'),\n 'permission_id',\n 'model_id'\n );\n }",
"protected function users() {\n return $this->hasMany('Reportr\\Entities\\User');\n }",
"public function user()\n {\n \treturn $this->hasMany('App\\User');\n }",
"protected function setUser($user, $type) {\n\t\t$id = 0;\n\t\tif($user === true) $user = $this->wire('user');\n\t\tif(is_object($user)) {\n\t\t\tif($user instanceof NullPage) {\n\t\t\t\t$id = 0;\n\t\t\t} else if($user instanceof User) {\n\t\t\t\t$id = $user->isGuest() ? 0 : $user->id;\n\t\t\t}\n\t\t} else if(is_int($user)) {\n\t\t\t$id = $user;\n\t\t} else if(ctype_digit($user)) {\n\t\t\t$id = (int) $user;\n\t\t} else if(is_string($user)) {\n\t\t\t$name = $this->wire('sanitizer')->pageName($user);\n\t\t\t$user = $name ? $this->wire('users')->get(\"name=$name\") : null; \n\t\t\t$id = $user && $user->id ? $user->id : 0;\n\t\t}\n\t\tif($id < 0) $id = 0;\n\t\tif(strpos($type, 'created') === 0) {\n\t\t\t$this->_createdUser = ($id && $user instanceof User ? $user : null);\n\t\t\tparent::set('created_users_id', $id); \n\t\t} else if(strpos($type, 'modified') === 0) {\n\t\t\t$this->_modifiedUser = ($id && $user instanceof User ? $user : null);\n\t\t\tparent::set('modified_users_id', $id); \n\t\t}\n\t}",
"public function users(): MorphToMany\n {\n return $this->morphedByMany(\n getModelForGuard($this->attributes['guard_name']),\n 'model',\n config('permission.table_names.model_has_permissions'),\n 'rbac_permission_id',\n 'model_id'\n );\n }",
"function wporphanageex_adopt_all_orphans() {\n\tforeach ( wporphanageex_get_all_users() as $user_id ) {\n\t\t$user = new WP_User( $user_id );\n\t\tif ( ! user_can( $user_id, 'read' ) ) {\n\t\t\t$user->set_role( wporphanageex_search_user_role( $user_id ) );\n\t\t}\n\t}\n}",
"public function user_R(){\n $this->belongsTo('App\\User');\n }",
"public function getType()\n {\n return \"user\";\n }",
"public function profile()\n {\n return $this->morphOne('App\\Profile', 'profileable');\n }",
"public function getTypeUsers(){\n $query = \"SELECT * FROM rol\";\n return $this->consulta($query);\n }",
"abstract public function user();",
"public function user()\n {\n return $this->belongsTo(UserProxy::modelClass());\n }",
"protected function get_meta_type() {\n\t\treturn 'user';\n\t}"
] |
[
"0.6455275",
"0.61788356",
"0.6118695",
"0.6096511",
"0.6078935",
"0.6046051",
"0.6002257",
"0.6002257",
"0.586724",
"0.58559626",
"0.58559626",
"0.58007133",
"0.5725921",
"0.56856215",
"0.5599373",
"0.5537683",
"0.5521351",
"0.54702306",
"0.54526806",
"0.54505444",
"0.54465634",
"0.54452205",
"0.5420247",
"0.5411708",
"0.53813976",
"0.5367094",
"0.5353343",
"0.5341503",
"0.5330465",
"0.53261435"
] |
0.62898743
|
1
|
Comma separated name (Last, First Middle)
|
public function getCommaNameAttribute()
{
return $this->last.', '.$this->first.' '.$this->middle;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function get_full_name($first, $last) {\n return implode(' ', array_filter(array($first, $last)));\n}",
"public function get_first_n_last_names()\t{\n\t\tif (strlen($this->last_name) == 0) {\n\t\t\treturn $this->first_name;\n\t\t}\n\t\treturn $this->first_name . ' ' . $this->last_name;\n\t}",
"function formatName(array $name)\r\n {\r\n return $name['last_name'] . ' ' . preg_replace('/\\b([A-Z]).*?(?:\\s|$)+/','$1',$name['first_name']);\r\n }",
"public function stringSingleAuthor($input)\n {\n $lastname = '';\n $stringnotlast = '';\n $splitcomma = explode(\",\", $input);\n $kira = count($splitcomma);\n if ($kira == 2) {\n $lastname = trim($splitcomma[0]);\n // echo $splitcomma[1];\n $split = explode(\" \", trim($splitcomma[1]));\n $total2 = count($split);\n // echo $total2;\n $stringnotlast = \"\";\n for ($x = 1; $x <= $total2; $x ++) {\n // echo $input.\">>\".$x.\"---\";\n $notlast = $split[$x - 1];\n if ($notlast) {\n $stringnotlast .= substr($notlast, 0, 1) . \". \";\n } else {\n $stringnotlast .= \"\";\n }\n }\n } else if ($kira == 1) {\n $split = explode(\" \", $input); // by space\n $total = count($split);\n // echo $total;\n if ($total == 1) {\n $lastname = $input;\n $stringnotlast = \"\";\n } else {\n $lastcount = $total - 1;\n $stringnotlast = \"\";\n for ($x = 1; $x <= $lastcount; $x ++) {\n if ($x == $lastcount) {\n $t = \".\";\n } else {\n $t = \". \";\n }\n $notlast = $split[$x - 1];\n $stringnotlast .= ucfirst(substr($notlast, 0, 1)) . $t;\n }\n $lastname = $split[$lastcount];\n }\n }\n\n return array(\n $lastname,\n $stringnotlast\n );\n }",
"function funcs_getNames($name,$bothnames = true){\n\t$last = ucwords(preg_replace('/^(.+), .+/','\\\\1',$name));\n\t$first = ucwords(preg_replace('/^.+, (.+)/','\\\\1',$name));\n\tif ($bothnames){\n\t\treturn array($first,$last);\n\t}else{\n\t\treturn $first;\n\t}\n}",
"public function fullName(){\n\t\treturn $this->first.' '.$this->last;\n\t}",
"public function name() {\r\n $name = $this->first_name . ' ' . $this->last_name;\r\n return $name;\r\n }",
"public static function explode_name($sep=' ',$name=null) {\n\t$name=preg_replace('/['.$sep.']{2,}/',' ',$name);\n\tlist($firstname)=explode($sep,$name);\n\t$firstname=trim($firstname);\n\t$lastname=trim(substr($name,strlen($firstname)+1));\n\treturn array($firstname,$lastname);\n}",
"function parseName($value){\n $name=explode(' ',$value);\n $genName=\"\";\n $len= count($name);\n if($len > 0){\n for($i=0;$i<$len;$i++){\n if(trim($name[$i])!=\"\"){\n if($genName!=\"\"){\n $genName =$genName .\" \".$name[$i];\n }\n else{\n $genName =$name[$i];\n } \n }\n }\n }\n if($genName!=\"\"){\n $genName=\" OR CONCAT(TRIM(s.firstName),' ',TRIM(s.lastName)) LIKE '\".$genName.\"%'\";\n } \n \n return $genName;\n}",
"function parseName($value){\n $name=explode(' ',$value);\n $genName=\"\";\n $len= count($name);\n if($len > 0){\n for($i=0;$i<$len;$i++){\n if(trim($name[$i])!=\"\"){\n if($genName!=\"\"){\n $genName =$genName .\" \".$name[$i];\n }\n else{\n $genName =$name[$i];\n } \n }\n }\n }\n if($genName!=\"\"){\n $genName=\" OR CONCAT(TRIM(s.firstName),' ',TRIM(s.lastName)) LIKE '\".$genName.\"%'\";\n } \n \n return $genName;\n}",
"function parseName($value){\n $name=explode(' ',$value);\n $genName=\"\";\n $len= count($name);\n if($len > 0){\n for($i=0;$i<$len;$i++){\n if(trim($name[$i])!=\"\"){\n if($genName!=\"\"){\n $genName =$genName .\" \".$name[$i];\n }\n else{\n $genName =$name[$i];\n } \n }\n }\n }\n if($genName!=\"\"){\n $genName=\" OR CONCAT(TRIM(s.firstName),' ',TRIM(s.lastName)) LIKE '\".$genName.\"%'\";\n } \n \n return $genName;\n}",
"function normaliseNames($names) { //{{{\n $normalised = array();\n $maxNames = 3;\n \n $n = 0;\n foreach ($names as $i => $name) {\n // skip names after third\n if (++ $n > $maxNames) {\n continue;\n }\n \n // split name into surname and forenames and split up forenames\n list ($surname, $forenames) = explode(', ', $name, 2);\n $forenames = explode(' ', $forenames);\n $fullname = '';\n \n // check that first letter of forename is uppercase\n foreach ($forenames as $fn) {\n $i = substr($fn, 0, 1);\n // add to full name as initial\n if (IntlChar::isupper($i)) {\n $fullname .= sprintf('%s. ', $i);\n }\n }\n \n // add surname and add to normalised\n $fullname .= $surname;\n $normalised[] = $fullname;\n }\n \n // join names\n $presentation = implode(', ', $normalised);\n \n // check whether to add et al\n if ($n > $maxNames) {\n $presentation .= ' et al';\n }\n \n return $presentation;\n}",
"public function getMiddleNames ();",
"protected function _getLastname($name)\n {\n if(is_null($name)){\n return \"sds\";\n }\n $_name = explode(\" \", $name);\n unset($_name[0]);\n return implode(\" \", $_name);\n }",
"public function getName()\n {\n $result = null;\n if (isset($this->userInfo['first_name']) && isset($this->userInfo['last_name'])) {\n $result = $this->userInfo['first_name'] . ' ' . $this->userInfo['last_name'];\n } elseif (isset($this->userInfo['first_name']) && !isset($this->userInfo['last_name'])) {\n $result = $this->userInfo['first_name'];\n } elseif (!isset($this->userInfo['first_name']) && isset($this->userInfo['last_name'])) {\n $result = $this->userInfo['last_name'];\n }\n return $result;\n }",
"private function make_full_name() {\n return $this->firstname . \" \" . $this->infix . \" \" . $this->lastname;\n }",
"public function getLastname() {}",
"function humanizedList($array, $alpha = false) {\n\t$lastName = array_pop($array);\n\t$array[] = \"and $lastName\";\n \t$implodedString = implode(', ', $array);\n return $implodedString;\n}",
"public function fullName()\n {\n if (isset($this->last_name)) {\n return $this->first_name . ' ' . $this->last_name;\n } else {\n return $this->first_name;\n }\n }",
"public function getLastname(): string;",
"function nameAndSurname() {\n return $this->NAME . ' ' . $this->SURNAME;\n }",
"public function getName()\n {\n return trim(\"$this->FirstName $this->Surname\");\n }",
"public function name()\n {\n return $this->first_name .' ' .$this->last_name;\n }",
"function getFullName()\r\n\t{\r\n\t\treturn $this->getFirstName() . \" \" . $this->getLastName();\r\n\t}",
"function split_name($name) {\n $parts = array();\n \n while ( strlen( trim($name)) > 0 ) {\n $name = trim($name);\n $string = preg_replace('#.*\\s([\\w-]*)$#', '$1', $name);\n $parts[] = $string;\n $name = trim( preg_replace('#'.$string.'#', '', $name ) );\n }\n \n if (empty($parts)) {\n return false;\n }\n \n $parts = array_reverse($parts);\n $name = array();\n $name['first_name'] = $parts[0];\n $name['middle_name'] = (isset($parts[2])) ? $parts[1] : '';\n $name['last_name'] = (isset($parts[2])) ? $parts[2] : ( isset($parts[1]) ? $parts[1] : '');\n \n return $name;\n }",
"public function getLastName();",
"public function fullName()\n\t{\n\t\treturn trim(\"{$this->first_name} {$this->last_name}\");\n\t}",
"public function getFullNameAttribute(): string\n\t{\n\t\treturn implode_not_empty(' ', [$this->name, $this->last_name]);\n\t}",
"public function name() {\n if ($this->first_name && $this->last_name) {\n return $this->first_name.' '.$this->last_name;\n }\n\n if ($this->first_name) {\n return $this->first_name;\n }\n\n return false;\n }",
"public function getInitial()\n {\n return ucwords(trim($this->first_name . ' ' . substr($this->last_name, 0, 1)));\n }"
] |
[
"0.68251103",
"0.6794494",
"0.6626644",
"0.6605874",
"0.6478995",
"0.64415807",
"0.6429857",
"0.6338929",
"0.6329359",
"0.6329359",
"0.6329359",
"0.63145345",
"0.6300332",
"0.6278927",
"0.6268608",
"0.62127936",
"0.61977357",
"0.6189676",
"0.61319995",
"0.61176443",
"0.6113987",
"0.6098571",
"0.60962576",
"0.6087565",
"0.6073486",
"0.60729486",
"0.6071016",
"0.60598093",
"0.605957",
"0.605179"
] |
0.7601017
|
0
|
return the VIEW to report a post you can also report a thread.
|
public function post($post_id)
{
if (ForumPosts::exist($post_id) && ForumPosts::post($post_id)->user_id !== Auth::id()) {
if (!UserReport::is_reported(Auth::id(), $post_id, 'post')) {
return view('report', [
'type' => 'report',
'section' => 'post',
'ppid' => $post_id,
]);
}
return view('report', ['type' => 'after']);
}
return view('report', ['type' => 'error']);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function thirdReport()\n {\n return view('reported-post');\n }",
"static public function get_view($post = null){\n global $wpdb;\n $post = get_post($post);\n $user_http_x_forwarded_for = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : null;\n $user_remote_addr = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : null;\n $views_table_name = self::get_views_table_name();\n $user_view = $wpdb->get_row(\n \"SELECT * FROM $views_table_name\n WHERE post_id = '$post->ID' AND\n (\n ( user_remote_addr IS NOT NULL AND user_remote_addr = '$user_remote_addr')\n OR\n (user_http_x_forwarded_for IS NOT NULL AND user_http_x_forwarded_for = '$user_http_x_forwarded_for')\n )\"\n );\n return $user_view;\n }",
"public function view() {\n if($this->request->args[0]){\n //Get single record from the database where post id matches the URL\n $myPost = MyPosts::first($this->request->args[0]);\n //Send the retrieved post data to the view\n if($myPost)\n {\n return compact('myPost');\n }\n }\n //since no post id was specified, redirect to the index page\n $this->redirect(array('MyPosts::index'));\n }",
"public function examroutine()\n {\n $routine = Post::where('key', 'routine')->get();\n return view('backends.examroutine')->with('routine', $routine);\n }",
"public function display($post);",
"public function view(User $user, Post $post);",
"public function advisor_post() {\n return view('Advisor.advisorpost')->with('update_post',null);\n }",
"public function _report_view()\n\t{\n\t\t$incident_id = Event::$data;\n\t\tif ($incident_id)\n\t\t{\n\t\t\t$actionable = ORM::factory('actionable')\n\t\t\t\t->where('incident_id', $incident_id)\n\t\t\t\t->find();\n\t\t\tif ($actionable->loaded)\n\t\t\t{\n\t\t\t\tif ($actionable->actionable)\n\t\t\t\t{\n\t\t\t\t\t$report = View::factory('actionable_report');\n\t\t\t\t\t$report->actionable = $actionable->actionable;\n\t\t\t\t\t$report->action_taken = $actionable->action_taken;\n\t\t\t\t\t$report->action_summary = $actionable->action_summary;\n\t\t\t\t\t$report->action_date = $actionable->action_date;\n\t\t\t\t\t$report->resolution_summary = $actionable->resolution_summary;\n\t\t\t\t\t$report->resolution_date = $actionable->resolution_date;\n\t\t\t\t\t$report->render(TRUE);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function report(){\n return view('matches.report_match');\n\t}",
"public function view($postID)\n\t{\n\t\tif(!$this->setPost($postID))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$rsp = new Response();\n\n\t\t$profileID = Session::read(\"profileID\");\n\n\t\tif(!$this->postViewModel->view($profileID, $postID))\n\t\t{\n\t\t\t$rsp->setFailure(400, \"post not set as viewed\")\n ->send();\n\n return;\n }\n\n $rsp->setSuccess(200, \"post viewed\")\n ->send();\n\t}",
"public function showPost()\n {\n // This is showPost for laravel 5.3\n // Auth is done in Foundation\\Http\\Middleware\\AuthenticateApp\n\n $router = Mrcore::router();\n if (!isset($router)) {\n abort(404);\n }\n if ($router->responseCode == 404) {\n abort(404);\n }\n if ($router->responseCode == 301) {\n return redirect($router->responseRedirect);\n }\n $post = Mrcore::post()->prepare(!Request::ajax());\n\n // Show Post View\n $content = View::make('post.show', compact(\n 'post', 'container'\n ));\n\n if (Layout::modeIs('raw') && strtolower($post->format->constant) == 'text') {\n // Raw mode with text format, force return to text/plain\n // or else it shows as text/html\n $response = Response::make($content, 200);\n $response->header('Content-Type', 'text/plain');\n return $response;\n } else {\n return $content;\n }\n }",
"function getURLView(){return \"/report/\".$this->getId();}",
"public function _report_view()\n\t{\n\t\t$incident_id = Event::$data;\n\t\tif ($incident_id)\n\t\t{\n\t\t\t$actionable = ORM::factory('actionable')\n\t\t\t\t->where('incident_id', $incident_id)\n\t\t\t\t->find();\n\t\t\tif ($actionable->loaded)\n\t\t\t{\n\t\t\t\tif ($actionable->actionable)\n\t\t\t\t{\n\t\t\t\t\t$report = View::factory('actionable_report');\n\t\t\t\t\t$report->actionable = $actionable->actionable;\n\t\t\t\t\t$report->action_taken = $actionable->action_taken;\n\t\t\t\t\t$report->action_summary = $actionable->action_summary;\n\t\t\t\t\t$report->render(TRUE);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function show($id)\n {\n $result = Forumpost::where('id',$id)\n ->where('status','<>','pending')\n ->where('dtime',null)\n ->first();\n\n $post = $this->formatPost($result);\n\n $user = Auth::user();\n\n $data = [];\n\n $data['post'] = $post;\n\n if(($user->type == 'user' || $user->type == 'publisher') && $user->username != $post['username'])\n {\n $report = ['','','',''];\n\n $repres = Postreport::where('postid',$id)\n ->where('reporter',$user->username)\n ->first();\n if($repres)\n {\n if($repres->reporttype == 'spam')\n $report[0] = 'fas fa-check-circle';\n elseif($repres->reporttype == 'duplicate')\n $report[1] = 'fas fa-check-circle';\n elseif($repres->reporttype == 'wrongcategory')\n $report[2] = 'fas fa-check-circle';\n elseif($repres->reporttype == 'other')\n $report[3] = 'fas fa-check-circle';\n }\n\n $data['report'] = $report;\n\n $myreact = Postreact::where('postid',$post['id'])\n ->where('username',$user->username)\n ->exists();\n if($myreact)\n {\n $data['myreact'] = true;\n }\n }\n else if($user->username == $post['username'])\n {\n $delreq = '';\n if(Postdelreq::where('postid',$id)->exists())\n {\n $delreq = \"<i class='fas fa-check-circle'></i>\";\n }\n\n $data['delreq'] = $delreq;\n }\n\n $result->viewcount = $result->viewcount + 1;\n $result->save();\n\n return view('forum.post.postpage')->with($data);\n }",
"public function view()\n {\n return $this->view;\n }",
"public function view()\n {\n return $this->view;\n }",
"public function showPost_51()\n {\n // This is showPost for laravel 5.1\n\n // Redirect router results here\n $router = Mrcore::router();\n if (isset($router)) {\n if ($router->responseCode == 404) {\n return Response::notFound();\n } elseif ($router->responseCode == 401) {\n return Response::denied();\n } elseif ($router->responseCode == 301) {\n // Redirect to proper url\n $url = $router->responseRedirect;\n return Redirect::to($url);\n }\n }\n\n // Gets post, parse + globals\n // If ajax, do NOT include globals\n $post = Mrcore::post()->prepare(!Request::ajax());\n\n // If post is a workbench and we get to this point then\n // The custom workbench route was not found, meaning we\n // want to return 404 for this url\n #if ($post->workbench) {\n # return Response::notFound();\n #}\n\n # Set bootstrap container based on post type\n if ($post->type->constant == 'app') {\n // Apps have no container (full screen), all others are system default\n Layout::container(false);\n }\n\n // Show Post View\n $content = View::make('post.show', compact(\n 'post', 'container'\n ));\n\n if (Layout::modeIs('raw') && strtolower($post->format->constant) == 'text') {\n // Raw mode with text format, force return to text/plain\n // or else it shows as text/html\n $response = Response::make($content, 200);\n $response->header('Content-Type', 'text/plain');\n return $response;\n } else {\n return $content;\n }\n }",
"public function show(Post $post): View\n {\n //\n }",
"public function getPostReport()\n {\n return post_report::all();\n }",
"function getView() {\r\n return $this->view;\r\n }",
"protected function get_template() {\n\t\treturn 'post';\n\t}",
"public function post()\n {\n $postId = $this->request->getParameter(\"id\"); /* le parametre disparait lors de l'annonce de \"public function post($postId)\". On l'annonce\n du coup en début de la méthode en faisant appel à la méthode getParameter de la class Request */\n $post = $this->post->getPost($postId); // va chercher la méthode GetPost($postId) dans le Model Post.php l.33\n $this->buildView(array('post' => $post));\n }",
"public function index()\n {\n $reports = Report::whereType('post')\n ->with('type', 'member', 'reportable', 'reportable.media')\n ->orderBy('created_at', 'DESC')\n ->paginate(20);\n\n return view('dashboard.report.index', compact('reports'));\n }",
"public function verifyViewPost($user,$post) : Array\n {\n $views = Log::select('created_at')\n ->whereRaw('action LIKE \"VIEW_POST%\" ')\n ->where('value',$post)\n ->where('user_id',$user)\n ->get();\n\n return [@$views->count(), @$views[0]->created_at];\n }",
"public function getPost(TextPost $post){\n if(Auth::user()->can('view', $post)) {\n $comments = $post->comments;\n return view('text.post', ['post' => $post, 'comments' => $comments]);\n }\n return redirect('subscription');\n }",
"public function index()\n {\n // Return log data.\n return view('admin.submission_log', [\n 'config' => $this->configData,\n 'adminSections' => $this->adminSections,\n 'logData' => $this->logData\n ]);\n }",
"public function onPostShowing(Post $post)\n {\n $is_viewed_already=(bool) View::where('user_id', \\Auth::id())\n ->where('post_id', $this->id)\n ->first();\n\n $user = auth()->user();\n if($is_viewed_already == false){\n \\Auth::user()->views()->attach($post->id);\n }\n \n /* $unreadNotifications = $user->unreadNotifications;\n foreach ($unreadNotifications as $notifications) {\n $comment = $notifications->data;\n if ($comment['commentable_type'] == 'App\\Post' && $comment['commentable_id'] == $post->id) {\n $notifications->markAsRead();\n }\n }*/\n }",
"public function reportPost(Request $request){\n $report = new ReportPostTopicModel();\n $report->user_id = Auth::user()->id;\n $report->content = $request->reason;\n $report->post_id = $request->post_id;\n $report->save();\n return Response()->json(array('ok'=>$request->all()));\n }",
"public function render(Tx_Dialog_Domain_Model_Post $post = NULL, Tx_Dialog_Domain_Model_Thread $thread = NULL, Tx_Dialog_Domain_Model_Discussion $discussion = NULL) {\n\t\tif (!$post && !$thread && !$discussion) {\n\t\t\tthrow new Exception('The \"isNew\" ViewHelper requires at least one of post, thread or discussion arguments present. None were found.', 1356715073);\n\t\t}\n\t\t$key = 'tx_dialog_discussion_recency';\n\t\t$storage = isset($_SESSION[$key]) ? $_SESSION[$key] : array('timestamp' => time(), 'posts' => array());\n\t\t$isContainedInStorage = FALSE;\n\t\t$dateTime = NULL;\n\t\tif ($post) {\n\t\t\t$dateTime = $post->getCrdate();\n\t\t\t$postUid = $post->getUid();\n\t\t\t$isContainedInStorage = in_array($postUid, $storage['posts']);\n\t\t\tif (!$isContainedInStorage) {\n\t\t\t\tif (!isset($_SESSION[$key]['posts'])) {\n\t\t\t\t\t$_SESSION[$key]['posts'] = array();\n\t\t\t\t}\n\t\t\t\tarray_push($_SESSION[$key]['posts'], $postUid);\n\t\t\t}\n\t\t} elseif ($thread) {\n\t\t\t$dateTime = $thread->getLastActivity();\n\t\t} elseif ($discussion) {\n\t\t\t$dateTime = $discussion->getLastActivity();\n\t\t}\n\t\tif ($dateTime) {\n\t\t\t$timestamp = $dateTime->getTimestamp();\n\t\t} else {\n\t\t\t\t// note: this case causes no Post, Thread or Discusssion to be marked as \"new\"\n\t\t\t\t// because it was impossible to retrieve a proper DateTime indicating last change.\n\t\t\t$timestamp = 0;\n\t\t}\n\t\t$isMoreRecentThanLastVisit = ($timestamp > $storage['timestamp']);\n\t\tif (!$isContainedInStorage && $isMoreRecentThanLastVisit) {\n\t\t\treturn $this->renderThenChild();\n\t\t}\n\t\treturn $this->renderElseChild();\n\t}",
"public function viewPostById($post) {\n $db = $this->dbConnect();\n $req = $db->prepare('SELECT id, title, content, DATE_FORMAT(creation_date, \\'%d/%m/%Y à %Hh%imin%ss\\') AS creation_date_fr FROM posts WHERE id = ?');\n $req->execute(array($post->getId()));\n\n $postById = $req->fetch();\n\n return $postById;\n }"
] |
[
"0.6826172",
"0.63730234",
"0.6127447",
"0.60640657",
"0.6034372",
"0.5961272",
"0.5952625",
"0.58721185",
"0.58467454",
"0.58432734",
"0.5816658",
"0.57991207",
"0.57950747",
"0.578382",
"0.5782033",
"0.5782033",
"0.576473",
"0.5747982",
"0.57170206",
"0.5684312",
"0.5683756",
"0.5679006",
"0.56669164",
"0.56595284",
"0.5650621",
"0.5649393",
"0.56452835",
"0.5630483",
"0.562608",
"0.5623935"
] |
0.6417012
|
1
|
Distance to an another position
|
function distanceTo(Position $pos) {
return abs($this->x - $pos->x) + abs($this->y - $pos->y);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function getDistance();",
"function getDistance($coord1,$coord2) {\r\n\t$x=($coord1['x']-$coord2['x'])*($coord1['x']-$coord2['x']);\r\n\t$y=($coord1['y']-$coord2['y'])*($coord1['y']-$coord2['y']);\r\n\treturn sqrt($x+$y);\r\n}",
"function calculateDistance($first, $second)\r\n{\r\n return abs($first - $second);\r\n}",
"public function calculateDistance(Point $from, Point $to): float;",
"function getDistance() {\n\t\treturn $this->dist2loc;\n\t}",
"function distance($v1, $v2)\r\n{\r\n return sqrt(pow(($v1[0]-$v2[0]),2)+pow(($v1[1]-$v2[1]),2));//計算座標2點的距離\r\n}",
"public function getDistance(IPoint $point2): float;",
"public function getDistance()\n {\n return $this->distance;\n }",
"function distance($lat1,$lon1,$lat2,$lon2){\n $delta_lat = $lat2-$lat1;\n $delta_lon = $lon2-$lon1;\n return (($delta_lat * $delta_lat) + ($delta_lon * $delta_lon));\n}",
"public function getDistance() {\n\t\treturn $this->distance;\n\t}",
"public function calculateDistance()\n {\n echo 'distance is 3km.',\"\\n\";\n }",
"public function getDistance(): Distance\n {\n return $this->distance;\n }",
"public function getDistance() {\n\t\treturn $this->_distance;\n\t}",
"public function getDistance() {\n\t\treturn $this->aDistances;\n\t}",
"public static function distance ($x1, $y1, $x2, $y2)\n {\n return abs($x2 - $x1) + abs($y2 - $y1);\n }",
"function distance($point1, $point2) {\n\t\t$lat1 = $point1[0];\n\t\t$long1 = $point1[1];\n\n\t\t$lat2 = $point2[0];\n\t\t$long2 = $point2[1];\n\n\t\t$deltaLat = $this -> toRadians($lat2 - $lat1);\n\t\t$deltaLon = $this -> toRadians($long2 - $long1);\n\n\t\t$a = sin($deltaLat / 2) * sin($deltaLat / 2) + cos($this -> toRadians($lat1)) * cos($this -> toRadians($lat2)) * sin($deltaLon / 2) * sin($deltaLon / 2);\n\n\t\t$c = 2 * asin(sqrt($a));\n\n\t\treturn $this -> EARTH_RADIUS * $c;\n\t}",
"function compare_distance($a, $b) {\n return $a['distance'] - $b['distance'];\n }",
"function distance($lat1, $lon1, $lat2, $lon2)\n{\n if (($lat1 == $lat2) && ($lon1 == $lon2)) {\n return 0;\n } else {\n $theta = $lon1 - $lon2;\n $dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta));\n $dist = acos($dist);\n $dist = rad2deg($dist) * 60 * 1.853159616;\n return $dist;\n }\n}",
"public function getTotalDistance(){\n return $this->totalDistance;\n }",
"public function distance($other_loc) {\r\n if ($this->city == false || $other_loc->city == false) {\r\n return false;\r\n }\r\n $origin = ($this->address ? str_replace(' ', '+', $this->address) : '') . '+' . $this->city . '+' . $this->state;\r\n $destination = ($other_loc->address ? str_replace(' ', '+', $other_loc->address) : '') . '+' . $other_loc->city . '+' . $other_loc->state;\r\n $url = \"https://maps.googleapis.com/maps/api/distancematrix/json?units=imperial&origins=$origin&destinations=$destination&key={$GLOBALS['google_maps_key']}\";\r\n $curl_handle = curl_init();\r\n curl_setopt( $curl_handle, CURLOPT_URL, $url );\r\n curl_setopt( $curl_handle, CURLOPT_RETURNTRANSFER, true );\r\n $distance_info = json_decode(curl_exec( $curl_handle ), true);\r\n curl_close( $curl_handle );\r\n if (!isset($distance_info['rows'][0]['elements'][0]['distance'])) {\r\n return false;\r\n }\r\n return [\r\n 'time' => $distance_info['rows'][0]['elements'][0]['duration'],\r\n 'length' => $distance_info['rows'][0]['elements'][0]['distance']\r\n ];\r\n }",
"public function distance(): int\n {\n return round($this->getData('DistanceMetersAsTheCrowFlies'), 0);\n }",
"public function calculateDistanceBetween(string $address1, string $address2)\n {\n }",
"function nodeDist($node1, $node2){\n $n1 = getNode($node1);\n $n2 = getNode($node2);\n return 3*distance($n1['lat'],$n1['lon'],$n2['lat'],$n2['lon']);\n}",
"function distance($latlon1, $latlon2) {\n\t$angle = acos(sin(deg2rad($latlon1[0])) * sin(deg2rad($latlon2[0])) + cos(deg2rad($latlon1[0])) * cos(deg2rad($latlon2[0])) * cos(deg2rad($latlon1[1] - $latlon2[1])));\n\t$earthradius_km = 6372.8;\n\treturn $earthradius_km * $angle;\n}",
"function distance(\n $latitudeFrom, $longitudeFrom, $latitudeTo, $longitudeTo, $earthRadius = 6371000)\n{\n $latFrom = deg2rad($latitudeFrom);\n $lonFrom = deg2rad($longitudeFrom);\n $latTo = deg2rad($latitudeTo);\n $lonTo = deg2rad($longitudeTo);\n\n $latDelta = $latTo - $latFrom;\n $lonDelta = $lonTo - $lonFrom;\n\n $angle = 2 * asin(sqrt(pow(sin($latDelta / 2), 2) +\n cos($latFrom) * cos($latTo) * pow(sin($lonDelta / 2), 2)));\n return $angle * $earthRadius;\n}",
"public static function diffDistance($from, $to)\n\t{\n $distance = new Distance();\n $distance->setUnit('m');\n $distance->setFormula('haversine');\n return $dist = $distance->between($from['lat'],$from['long'], $to['lat'],$to['long']);\n\t}",
"function getDistance($lat1, $lon1, $lat2, $lon2) {\n if(!$lat1 || !$lat2 || !$lon1 || !$lon2){\n return NULL;\n }\n\n if (($lat1 == $lat2) && ($lon1 == $lon2)) {\n return 0;\n }\n else {\n $theta = $lon1 - $lon2;\n $dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta));\n $dist = acos($dist);\n $dist = rad2deg($dist);\n $miles = $dist * 60 * 1.1515;\n\n return ($miles * 1.609344);\n }\n }",
"function getDistance2pts($coord1, $coord2){\n\t$r = 6366;\n\n\t$coord1[0] = deg2rad($coord1[0]);\n\t$coord1[1] = deg2rad($coord1[1]);\n\t$coord2[0] = deg2rad($coord2[0]);\n\t$coord2[1] = deg2rad($coord2[1]);\n\t\n\t$ds= acos(sin($coord1[0])*sin($coord2[0])+cos($coord1[0])*cos($coord2[0])*cos($coord1[1]-$coord2[1]));\n\t\n\t$dpr = $ds * $r;\n\t\n\treturn $dpr * 0.54;\t// return une distance en nm\t\n}",
"public function calculateDistance(Point $a, Point $b)\n\t{\n\t\t$R = 6371; // km\n\t\t$dLat = deg2rad(abs($b->getLatitude() - $a->getLatitude()));\n\t\t$dLon = deg2rad(abs($b->getLongitude() - $a->getLongitude()));\n\t\t$lat1 = deg2rad($a->getLatitude());\n\t\t$lat2 = deg2rad($b->getLatitude());\n\n\t\t$a = sin($dLat / 2) * sin($dLat / 2)\n\t\t\t+ sin($dLon / 2) * sin($dLon / 2) * cos($lat1) * cos($lat2);\n\t\t$c = 2 * atan2(sqrt($a), sqrt(1 - $a));\n\n\t\treturn $R * $c;\n\t}",
"function dist(float $lat1, float $lon1, float $lat2, float $lon2): float\n{\n $R = 6371e3; // earth radius, metres\n\n // convert degrees to radians\n $lat1 = ($lat1 / 180) * M_PI;\n $lat2 = ($lat2 / 180) * M_PI;\n $lon1 = ($lon1 / 180) * M_PI;\n $lon2 = ($lon2 / 180) * M_PI;\n // caclulate differences between latitude and longitude\n $dlat = $lat2 - $lat1;\n $dlon = $lon2 - $lon1;\n\n // Haversine distance formula\n $a = sin($dlat / 2) * sin($dlat / 2)\n + cos($lat1) * cos($lat2)\n * sin($dlon / 2) * sin($dlon / 2);\n\n $c = 2 * atan2(sqrt($a), sqrt(1 - $a));\n return $R * $c;\n}"
] |
[
"0.75921154",
"0.7190894",
"0.7172376",
"0.6971538",
"0.69196606",
"0.6882421",
"0.68094116",
"0.670221",
"0.6689049",
"0.6645161",
"0.6620329",
"0.6596478",
"0.65443766",
"0.6308297",
"0.6282633",
"0.6189706",
"0.6149974",
"0.6125736",
"0.6106668",
"0.608551",
"0.6046752",
"0.60439134",
"0.60411215",
"0.60307455",
"0.59278506",
"0.5904162",
"0.5897473",
"0.58784014",
"0.5877728",
"0.5873642"
] |
0.72259396
|
1
|
Get Title Languages for current vacancy
|
public function getLanguagesTitleForVacancy() {
return $this->descriptions->map(function($entity){
return $entity->getLanguage()->getTitle();
});
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function languages();",
"public function getLanguages() {}",
"public function getLanguages();",
"protected function getLanguages() {}",
"public function getLanguageList();",
"public function getSiteLanguages();",
"public function getMultilingual();",
"public function getTitlesForVacancy() {\n return $this->descriptions->map(function($entity){\n return $entity->getVacancyTitle(); \n });\n }",
"function getCVocabularyNames() {\n\t global $sotfVars;\n\t // avail langs are stored in sotf_vars and updated by install.php\n\t // roles\n\t $langs = explode(',', $sotfVars->get('roles_langs', 'eng'));\n\t foreach($langs as $l) {\n\t\t$retval[] = array(\"roles\",\"\",$l);\n\t }\n\t // genres\n\t $langs = explode(',', $sotfVars->get('genres_langs', 'eng'));\n\t foreach($langs as $l) {\n\t\t$retval[] = array(\"genres\",\"\",$l);\n\t }\n\t // subject trees\n\t $trees = $this->listTrees();\n\t foreach($trees as $t) {\n\t\t$langs = explode(',', $t['languages']);\n\t\tforeach($langs as $l) {\n\t\t $retval[] = array(\"topics\", $t['tree_id'], $l);\n\t\t}\n\t }\n\t return $retval;\n }",
"public function get_desired_languages();",
"protected function getPreviewLanguages() {}",
"public function ShowsInLanguages()\n\t{\t$speaks = array();\n\t\t$sql = 'SELECT lang FROM homebanner_speak WHERE hbid=' . (int)$this->id;\n\t\tif ($result = $this->db->Query($sql))\n\t\t{\twhile ($row = $this->db->FetchArray($result))\n\t\t\t{\t$speaks[$row['lang']] = $row['lang'];\n\t\t\t}\n\t\t}\n\t\treturn $speaks;\n\t}",
"public function getAvailableLanguages() {}",
"public function getSystemLanguages() {}",
"public function getTitle() {\n\t\treturn WCF::getLanguage()->get($this->languageName);\n\t}",
"public function getSystemLanguages() {}",
"public function actionLanguages() {\n return Lang::getList();\n }",
"public function getLang();",
"function getAll()\r\n\t\t{\r\n\t\t\treturn $this->lang;\r\n\t\t}",
"function getSiteLanguages() {\n global $dbAccess;\n $this->db = $dbAccess;\n $data = $this->db->SimpleQuery(\"SELECT * FROM \" . TBL_LANGUAGES . \" WHERE status='1' ORDER BY language_name\");\n\n return $data;\n }",
"function languages()\n {\n $defaults = array('en');\n $langs = array();\n\n // get aspell dictionaries\n exec('aspell dump dicts', $dicts);\n if (!empty($dicts)) {\n $seen = array();\n foreach ($dicts as $lang) {\n $lang = preg_replace('/-.*$/', '', $lang);\n $langc = strlen($lang) == 2 ? $lang.'_'.strtoupper($lang) : $lang;\n if (!$seen[$langc]++)\n $langs[] = $lang;\n }\n $langs = array_unique($langs);\n }\n else {\n $langs = $defaults;\n }\n\n return $langs;\n }",
"public function titleQuery() {\n $titles = [];\n\n $groupContent = $this->groupContentStorage->loadMultiple($this->value);\n foreach ($groupContent as $content) {\n $titles[] = $content->label();\n }\n return $titles;\n }",
"public function showLanguages(){\n\n \t\t\n \t\t$q = \"SELECT * FROM languages\";\n\n \t\t$result = $this->connection->query($q);\n\n \t\treturn $result;\n\n \t}",
"public function getLanguages()\n\t{\n\t\treturn LanguageHelper::getContentLanguages(array(0,1));\n\t}",
"function redes_get_languages() {\n $result = [];\n $languages = db_select('languages', 'lan')\n ->fields('lan', ['language', 'name'])\n ->execute()\n ->fetchAll();\n if(isset($languages) && !empty($languages)){\n foreach ($languages as $lang) {\n $result[$lang->language] = $lang->name;\n }\n }//end if\n return $result;\n}",
"private function getAllLangs()\n\t{\n\t\t$options = array();\n\t\t$sql = \"SELECT * FROM \" . $this->db->prefix . \"site_languages WHERE is_online = 1\";\n\t\t$result = $this->db->query($sql);\n\t\t$available_languages = array();\n\t\twhile($row = $this->db->fetchToRow($result)){\n\t\t\t$available_languages[] = $row[ 'lang' ];\n\t\t\t$options[ $row[ 'lang' ] ][ 'lang' ] = $row[ 'lang' ];\n\t\t\t$options[ $row[ 'lang' ] ][ 'language' ] = ucfirst($row[ 'language' ]);\n\t\t}\n\t\t$this->language_options = $options;\n\n\t\treturn $available_languages;\n\t}",
"public function getLanguage() {}",
"public static function languages()\n {\n return self::first()->languages;\n }",
"public static function getSystemLanguages() {}",
"public function getBackOfficeLanguage();"
] |
[
"0.69891274",
"0.6904798",
"0.68837225",
"0.68505496",
"0.6721205",
"0.67166746",
"0.6642398",
"0.6542353",
"0.6533432",
"0.6490804",
"0.6447674",
"0.6447553",
"0.64272714",
"0.64185095",
"0.6417415",
"0.6417322",
"0.64150226",
"0.62591887",
"0.62566364",
"0.6210475",
"0.61953574",
"0.6188347",
"0.61869293",
"0.61708486",
"0.61614925",
"0.6148257",
"0.6148107",
"0.613637",
"0.6083797",
"0.60822713"
] |
0.8161284
|
0
|
Get all vacancies match the filter
|
public function getVacanciesAll(\Doctrine\ORM\EntityManager $em, $filter = array()) {
$idLanguage = $this->getConfig()->language_default;
$qb = $em->createQueryBuilder();
$qb->select('d, v')
->from('Application\Entity\Descriptions', 'd')
->join('d.vacancies', 'v')
->where('v.enabled = 1')
;
if(!empty($filter['lang'])) {
$qb->andWhere($qb->expr()->orX(
'd.languageId = ?1', 'd.languageId = ?2'
))
->setParameter(1, (int) $filter['lang'])
->setParameter(2, $idLanguage)
;
}
if(!empty($filter['dep'])) {
$qb->join('v.departmentsDepartment', 'dep')
->andWhere('dep.departmentId IN (?3)')
->setParameter(3, $filter['dep'])
;
}
$qb->orderBy('d.languageId', 'DESC')
->addOrderBy('v.vacancyId', 'DESC')
;
$query = $qb->getQuery();
$query->useResultCache(TRUE);
$result = array();
foreach ($query->getArrayResult() as $item) {
if (!array_key_exists($item['vacancies']['vacancyId'], $result)) {
$result[$item['vacancies']['vacancyId']] = $item;
}
}
return $result;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function cicleinscription_get_vacancies_remaning(){\n\t\n}",
"public function index(): AnonymousResourceCollection\n {\n $vacancies = QueryBuilder::for(Vacancy::class)\n ->when(request('category_id','')!= '', function ($query){$query->where('category_id',request('category_id'));})\n ->when(request('job_type_id','')!= '', function ($query){$query->where('job_type_id',request('job_type_id'));})\n ->when(request('district_id','')!= '', function ($query){$query->where('district_id',request('district_id'));})\n ->with(['category', 'district', 'cities', 'jobs', 'files'])\n ->orderBy('id', 'desc')\n ->where( 'is_approved', 1)\n ->paginate(10);\n return DataResource::collection($vacancies);\n }",
"public function getApproved(Filter $filter): Collection;",
"public function getVacations()\n {\n return $this->hasMany(Vacation::className(), ['id' => 'id']);\n }",
"public function getVacancyResult() {\n return $this->response->vacancies;\n }",
"public function show(Vacancies $vacancies)\n {\n \n }",
"public static function FilterByStatus() {\n\t\t\t\n\t\t\t$sql = \"SELECT Code,Status FROM employees\";\n\t\t\t$statement = Database::$db->prepare($sql);\n\t\t\t$statement->execute();\n\t\t\t$employees1 = [];\n\t\t\twhile($row = $statement->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t\t$employees1[] = new Employee($row['Code']);\n\t\t\t}\n\t\t\treturn $employees1;\n\t\t}",
"public static function FilterByActivity() {\n\t\t\t\n\t\t\t$sql = \"SELECT Code,Title FROM employees\";\n\t\t\t$statement = Database::$db->prepare($sql);\n\t\t\t$statement->execute();\n\t\t\t$employees1 = [];\n\t\t\twhile($row = $statement->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t\t$employees1[] = new Employee($row['Code']);\n\t\t\t}\n\t\t\treturn $employees1;\n\t\t}",
"public function getVacancyResult() {\n return $this->response->items;\n }",
"public function getDepartnetsForVacancies(\\Doctrine\\ORM\\EntityManager $em) {\n $qb = $em->createQueryBuilder();\n $qb->select('d')\n ->from('Application\\Entity\\Departments', 'd')\n ->join('d.vacanciesVacancy', 'v')\n ->groupBy('d.departmentId')\n ;\n $query = $qb->getQuery();\n $query->useResultCache(TRUE);\n return $query->getArrayResult();\n }",
"public function vacunas_aplicarFiltrosVacunas($fechaInicial, $fechaFinal, $fechaInicialProximo, $fechaFinalProximo, $idVacuna, $idPropietario, $paciente){\n \t\n\t\t\t$resultado = array();\n\t\t\t$adicionQuery = \"WHERE 1 \";\n\t\t\t\n\t\t\tif($idVacuna != '0'){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND V.idVacuna = '$idVacuna' \";\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif($fechaInicial != \"\" AND $fechaFinal != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND ( V.fecha BETWEEN '$fechaInicial' AND '$fechaFinal')\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($fechaInicialProximo != \"\" AND $fechaFinalProximo != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND ( V.fechaProximoDesparasitante BETWEEN '$fechaInicialProximo' AND '$fechaFinalProximo')\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\n\t\t\tif($idPropietario != \"0\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND P.idPropietario = '$idPropietario' \";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($paciente != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND V.idMascota = '$paciente' \";\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\t$query = \" SELECT \n\t\t\t\t\t\t V.idMascotaVacunas,\n\t\t\t\t\t\t V.fecha,\n\t\t\t\t\t\t DATE_FORMAT(V.hora, '%H:%i') as hora,\n\t\t\t\t\t\t V.fechaProximaVacuna,\n\t\t\t\t\t\t V.observaciones,\n\t\t\t\t\t\t V.idVacuna,\n\t\t\t\t\t\t VV.nombre as nombreVacuna,\n\t\t\t\t\t\t M.nombre AS nombreMascota,\n\t\t\t\t\t\t M.sexo AS sexoMascota,\n\t\t\t\t\t\t P.identificacion AS identificacionPropietario,\n\t\t\t\t\t\t P.nombre AS nombrePropietario,\n\t\t\t\t\t\t P.apellido AS apellidoPropietario,\n\t\t\t\t\t\t P.telefono\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t tb_mascotas_vacunas AS V\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_mascotas AS M ON V.idMascota = M.idMascota\n\t\t\t\t\t\t \tINNER JOIN\n\t\t\t\t\t\t tb_vacunas AS VV ON V.idVacuna = VV.idVacuna\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_propietarios AS P ON P.idPropietario = M.idPropietario\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t\".$adicionQuery.\"\n\t\t\t\t\t\t\n\t\t\t\t\t\tGROUP BY (V.idMascotaVacunas)\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tORDER BY (V.idMascotaVacunas) DESC; \";\n\t\t\t\t\t\n\t\t\t$conexion = parent::conexionCliente();\n\t\t\t\n\t\t\tif($res = $conexion->query($query)){\n\t \n\t /* obtener un array asociativo */\n\t while ($filas = $res->fetch_assoc()) {\n\t $resultado[] = $filas;\n\t }\n\t \n\t /* liberar el conjunto de resultados */\n\t $res->free();\n\t \n\t }\n\t\n\t return $resultado;\n\t\t\t\n\t\t\t\n }",
"public function index()\n\t{\n\t\treturn $this->vacationRepository->all();\n\t}",
"private function Venues()\n\t{\t$venues = array();\n\t\t$where = array();\n\t\t\n\t\tif ($filter = $this->SQLSafe($this->filter))\n\t\t{\t$where[] = '(vname LIKE \"%' . $filter . '%\" OR vcity LIKE \"%' . $filter . '%\" OR vaddress LIKE \"%' . $filter . '%\")';\n\t\t}\n\t\t\n\t\t$sql = 'SELECT * FROM coursevenues';\n\t\tif ($where)\n\t\t{\t$sql .= ' WHERE ' . implode(' AND ', $where);\n\t\t}\n\t\t$sql .= ' ORDER BY vname ASC';\n\t\tif ($result = $this->db->Query($sql))\n\t\t{\twhile ($row = $this->db->FetchArray($result))\n\t\t\t{\t$venues[] = $row;\n\t\t\t}\n\t\t} else echo '<p>', $sql, ': ', $this->db->Error(), '</p>';\n\t\t\n\t\treturn $venues;\t\n\t}",
"public function getAllActive()\n {\n\n $qb = $this->createQueryBuilder('u')->select('u')\n ->andWhere('u.isDeleted =:is_deleted')\n ->andWhere('u.status =:status')\n ->setParameters(array(\n 'is_deleted' => false,\n 'status' => $this->sm->active()\n ));\n $qb->orderBy('u.company', 'DESC');\n return $qb->getQuery()->getResult();\n }",
"function getVacationData($pid) {\n $vacation_fields = array('user_id',\n 'start_date_1', 'end_date_1', 'start_date_2', 'end_date_2', 'start_date_3', 'end_date_3',\n 'ill_start_date_1', 'ill_end_date_1', 'ill_start_date_2', 'ill_end_date_2', 'ill_start_date_3', 'ill_end_date_3',\n 'future_start_1', 'future_end_1', 'future_start_2', 'future_end_2', 'future_start_3', 'future_end_3');\n $v = REDCap::getData($pid, 'json',null, $vacation_fields);\n $vacation_data = json_decode($v, true);\n\n //separate out vacation / illness / future vacation into separate arrays\n $exclude_days = array();\n foreach ($vacation_data as $key => $val) {\n\n $exclude_days[$val['user_id']]['vacation'][$val['start_date_1']] = $val['end_date_1'];\n $exclude_days[$val['user_id']]['vacation'][$val['start_date_2']] = $val['end_date_2'];\n $exclude_days[$val['user_id']]['vacation'][$val['start_date_3']] = $val['end_date_3'];\n\n $exclude_days[$val['user_id']]['illness'][$val['ill_start_date_1']] = $val['ill_end_date_1'];\n $exclude_days[$val['user_id']]['illness'][$val['ill_start_date_2']] = $val['ill_end_date_2'];\n $exclude_days[$val['user_id']]['illness'][$val['ill_start_date_3']] = $val['ill_end_date_3'];\n\n $exclude_days[$val['user_id']]['future'][$val['future_start_1']] = $val['future_end_1'];\n $exclude_days[$val['user_id']]['future'][$val['future_start_2']] = $val['future_end_2'];\n $exclude_days[$val['user_id']]['future'][$val['future_start_3']] = $val['future_end_3'];\n }\n\n return $exclude_days;\n\n }",
"public function getActives(): self\n {\n return $this->filterByTypes([\n TimeSlot::BUSY_TYPE, TimeSlot::CANDIDATE_TYPE\n ]);\n }",
"public function findAllActive() {}",
"public function getAppointments()\n {\n $search['office'] = (auth()->user()->offices->count()) ? auth()->user()->offices->first()->id : '';\n\n $search['date1'] = isset($search['date1']) ? Carbon::parse($search['date1']) : '';\n $search['date2'] = isset($search['date2']) ? Carbon::parse($search['date2']) : '';\n \n $appointments = $this->appointmentRepo->findAllByDoctorWithoutPagination(request('medic'),$search);\n\n return $appointments;\n \n }",
"function get_all(){\n $where = \"reservation_status <> 'Pending'\";\n $reservations = where( 'reservations', $where );\n\n echo json_encode( $reservations );\n exit;\n}",
"public function allActive()\n {\n return Guests::where(array('is_active' => 1))->get();\n }",
"public function getAllActive() {}",
"public function airportList(Request $request)\n {\n if ($request->has('code')) {\n \t\t\t$airports = Airport::where('code', '!=', $request['code'])->get();\n \t\t\treturn $airports;\n\n\t\t}\n $airports = Airport::all();\n\n return $airports;\n }",
"public function filter(Request $request)\n {\n $data['status'] = $request->query('status');\n $data['validated'] = $request->query('validated');\n return $this->legalEntityRepository->getAllEntities($data);\n \n }",
"function getAllActiveVirtualAccounts()\n\t{\n\t\t// first Fetch all virtual accounts from Razorpay as a collection\n\t\t$virtualAccounts = $this->getAllVirtualAccounts()->items;\n\t\t\t// remove all closed accounts from the returned object $virtualAccounts\n\t\tforeach ($virtualAccounts as $key => $va)\n\t\t\t{\n\t\t\t\tif($va->status == \"closed\")\n\t\t\t\t\t{\n\t\t\t\t\tunset($virtualAccounts[$key]);\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tunset($va); // break reference of previous foreach\n\n\n\t\treturn $virtualAccounts;\n\t}",
"public function showAllActive()\n {\n return $this->processQuery($this->buildQuery());\n }",
"public function vacantes()\n {\n return $this->hasMany('App\\BolsaEmpleo\\Vacante', 'puesto_id', 'id');\n }",
"public function allActive()\n {\n return IncomeTypes::where(array('is_active' => 1))->get();\n }",
"public function index(Request $request)\n {\n\n\n $busType = $request->validate([\n 'type'=>\"required\"\n ]);\n $cities = [];\n\n\n $travelFrom = [];\n $vehicles = BusType::where('vehicle_type',$busType)->get();\n\n foreach ($vehicles as $vehicle)\n {\n $travel = Travel::where('busType_id',$vehicle->id)\n ->pluck('startCityId');\n\n\n\n array_push($travelFrom,$travel);\n\n\n }\n\n foreach ($travelFrom as $travel)\n {\n if($this->dataExists($cities ,City::find($travel))){\n\n }\n else{\n array_push($cities,City::find($travel));\n }\n\n //array_push($cities,City::find($travel));\n }\n\n return $cities;\n\n\n }",
"public function filterAction(Request $request) {\n $year = $request->query->get('year');\n $month = $request->query->get('month');\n\n $em = $this->getDoctrine()->getManager();\n $repo = $em->getRepository('AppBundle:Data');\n if(!empty($month)){ \n $datas = $repo->findBy(array('year' => $year, 'month' => $month));\n \n } else {\n $datas = $repo->findBy(array('year' => $year));\n }\n\n return compact('datas','year', 'month');\n\n }",
"public function getInactiveApplicants()\n {\n $builder = $this->createQueryBuilder('a');\n $subQueryBuilder = $this->_em->createQueryBuilder();\n $subQuery = $subQueryBuilder\n ->select('1')\n ->from('MentorshipMasterBundle:Application', 'apl')\n ->where($subQueryBuilder->expr()->isNull('apl.finishedAt'))\n ->andWhere(\n $subQueryBuilder->expr()->eq('apl.applicant', 'a')\n )->getDQL();\n $query = $this\n ->createQueryBuilder('a')\n ->distinct()\n ->where('a.isActive = FALSE')\n ->andWhere(\n $builder->expr()->not(\n $builder->expr()->exists($subQuery)\n )\n )\n ->getQuery();\n $cacheId = self::getCacheId(self::CACHE_ID_INACTIVE_APPLICANTS_SET);\n $query->useResultCache(true, 3600, $cacheId);\n return $query->getResult();\n }"
] |
[
"0.6192324",
"0.6116551",
"0.60236144",
"0.5997058",
"0.59387046",
"0.59367675",
"0.5707235",
"0.5685022",
"0.56358105",
"0.5589642",
"0.5486332",
"0.54125243",
"0.5389713",
"0.5377023",
"0.5342239",
"0.5330883",
"0.53259116",
"0.53088015",
"0.5258268",
"0.51843154",
"0.5181003",
"0.51792794",
"0.5177887",
"0.51517713",
"0.51517045",
"0.51432616",
"0.51424426",
"0.51333547",
"0.51263034",
"0.5116472"
] |
0.62962025
|
0
|
Get all departments for vacancies
|
public function getDepartnetsForVacancies(\Doctrine\ORM\EntityManager $em) {
$qb = $em->createQueryBuilder();
$qb->select('d')
->from('Application\Entity\Departments', 'd')
->join('d.vacanciesVacancy', 'v')
->groupBy('d.departmentId')
;
$query = $qb->getQuery();
$query->useResultCache(TRUE);
return $query->getArrayResult();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function getAllDepartments() {\r\n $data = new \\Cars\\Data\\Common($this->app);\r\n return $data->getAllDepartments();\r\n }",
"function GetDepartments()\n\t{\n\t\t$result = $this->sendRequest(\"GetDepartments\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}",
"public static function all() {\n $departments = array();\n \n $rows = DB::query('SELECT * FROM Department');\n \n foreach ($rows as $row) {\n $departments[] = self::create_department($row);\n }\n \n return $departments;\n }",
"public function getdepartments(Request $request){\n $departments = Department::where('departmentable_id', intval($request->input('office_id')))->whereNull('deleted_at')->get();\n return response()->json(array('status' => true, 'data' => $departments));\n }",
"public function departments()\r\n {\r\n return new QueryForDepartments();\r\n }",
"public function ListDepartments(){\n\t\t$query = \"SELECT code, label, division, sortOrder FROM [DEPARTMENTS TABLE] ORDER BY sortOrder ASC\";\n\t\treturn array(\"results\" => $this->SelectQueryHelper($query));\n\t}",
"private function getDepartments(): array\n {\n try {\n /** @var Departments[] $departments */\n $departments = $this->getDoctrine()\n ->getRepository(Departments::class)\n ->findAll();\n }\n catch(\\Exception $ex) {\n return [];\n }\n\n return $departments;\n }",
"public function getAllAvailableDepartments(){\n if( in_array('Admin', $this->getCurrentRoles()) ){\n // User is admin; get all Departments\n return $this->getAllDepartmentInfo();\n }\n else{\n // Non-admin user; just get their primary department\n return array(\n $this->getDepartmentInfo()\n );\n }\n }",
"public function departments(){\n \t$departments = Department::all();\n\n \treturn view('departments.departments')->with('departments', $departments);\n }",
"public function getDepartmentList() {\n return $this->_get(2);\n }",
"function getTicketDepartments()\r\n\t{\r\n\t\treturn $this->call_API('getTicketDepartments');\r\n\t}",
"public static function getDepartmentsList(){\n $cont = new RestController();\n\n $result = $cont->getRequest('ProductDepartments');\n\n $departments = [];\n\n if($result instanceof View){\n return $departments;\n }\n\n foreach($result->value as $dep){\n $departments[$dep->Id]=$dep->Name;\n }\n\n return $departments;\n\n }",
"public function departments()\n {\n $departments = Departments::where('status', 'active')->orderBy('idx')->get();\n foreach ($departments as $dept) {\n $subdepartment = Departments::where('department_id', $dept->subdepartment_id)->get();\n $dept['subdepartments'] = $subdepartment;\n }\n\n return view('setup.department.departments', compact('departments', 'subdepartment'));\n }",
"public function GetAllDepartments()\r\n\t{\t\r\n\t\t$WhereCondition = \"\";\r\n\t\t$query = $this->db->query(\" \t\r\n\t\t\t\t\t\t\t\t\tSELECT * FROM `tbl_user_department`\r\n\t\t\t\t\t\t\t\t\");\r\n\t\t$result = $query->result_array();\t\t\t\r\n\t\treturn $result;\r\n\t}",
"public function getDepartment() {\n return response()->json([\n 'success' => true,\n 'statusCode' => 200,\n 'message' => 'Successfully retrieved clearances departments',\n 'data' => Department::all()]);\n }",
"public function getAllDepartmentInfo(){\n $LOG = Logger::getLogger(__CLASS__ . '.' . __FUNCTION__);\n\n $dao = new LabInspectionSummaryReportDAO();\n $min_year = $this->getMinimumReportYear();\n $departments = $dao->getDepartmentDetails(null, $min_year);\n\n return $departments;\n }",
"public function getDepartments() {\n //but if none, get from db\n if(null==$this->departments){\n $mapper=new Application_Model_DirectoryDepartmentMapper();\n $departments=$mapper->fetchAll();\n $options=array();\n foreach($departments as $department){\n $options[]=$department->getName();\n }\n $this->departments=$options;\n }\n return $this->departments;\n }",
"function getdepartments() {\n\t\t// import department db\n\t\tApp::import('Model','Department');\n\t\t$this->Department = & new Department();\n\t\t# fetch list of active departments \n\t\t$departments_list = $this->Department->find('list',array('conditions'=>array('Department.status'=>'1'),'fields'=>array('id','name'),'limit'=>10,'order'=>array('Department.id')));\n\t\treturn $departments_list;\n\t}",
"public function getDepartamentosTodos(){\n\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\t$consulta=\"SELECT * FROM departamentos\";\n\t\t\t\t\n\n\t\t\t\t$query=$this->db->preparar($consulta);\n\t\t\t\t$query->execute();\n\t\t\t\t\n\t\t\t\t$tClientes = $query->fetchAll();\n\t\t\t\t\n\t\t\t\t//obtiene todas las tuplas de la tabla clientes\n\t\t\t\t//y devuelve el array $tClientes\n\n\t\t\t} catch (Exception $e) {\n\t\t\t\techo \"Se ha producido un errro\";\n\t\t\t\t\n\t\t\t}\n\n\t\t\t$tablaClientes=array(); //inicializamos la tabla de salida\n\t\t\tforeach ($tClientes as $fila) {\n\t\t\t\t$c=new Departamento($fila[0], $fila[1], \n\t\t\t\t\t$fila[2], $fila[3]);\n\t\t\t\tarray_push($tablaClientes, $c);\n\t\t\t}\n\t\t\treturn $tablaClientes;\n\t\t}",
"public function getDepartments(){\r\n $sql=\"SELECT * FROM departments\";\r\n $query=$this->db->query($sql);\r\n return $query->result_array();\r\n }",
"public function departments() {\n return $this->hasMany('Department')->orderBy('name');\n }",
"public function index()\n {\n $departamentos = Department::all();\n return $this->showAll($departamentos);\n }",
"public function index()\n {\n return Departments::all();\n }",
"public function allDepartment(){\n\n $all_department=$this->settings->all_departmentasc();\n return response()->json([\n 'all_department' => $all_department,\n ], $this->successStatus);\n\n }",
"public function getVacations()\n {\n return $this->hasMany(Vacation::className(), ['id' => 'id']);\n }",
"public function listofDepartments()\n {\n return view('Admin.ShowallDepartments');\n //.blade\n }",
"public function index()\n {\n $departments = Department::with('office.organisation')\n ->where('status','Active')\n ->orderBy('id','DESC')\n ->paginate(6);\n\n $organisations = Organisation::where('status','Active')\n ->orderBy('organisation','ASC')\n ->get();\n\n return view('admin/department/departments',compact('departments','organisations'));\n }",
"public function departments()\n {\n $this->authCheck();\n\n $departmentData = DB::table('departments')\n ->get();\n \n $departments=view('admin.department_list')\n ->with('departmentData',$departmentData);\n\n return view('admin.master')\n ->with('main_content',$departments);\n }",
"public function index()\n {\n $departments = Department::orderBy('created_at', 'asc')->paginate();\n\n return response()->json($departments, 200);\n }",
"public function get_jamf_departments()\n {\n $obj = new View();\n $jamf = new Jamf_model;\n $obj->view('json', array('msg' => $jamf->get_jamf_departments()));\n }"
] |
[
"0.77074635",
"0.7057484",
"0.7027867",
"0.6891694",
"0.6865196",
"0.6762811",
"0.6744287",
"0.67432046",
"0.6726668",
"0.67111456",
"0.66859394",
"0.6638404",
"0.6631483",
"0.6618233",
"0.6570158",
"0.6567105",
"0.65487283",
"0.65324783",
"0.648142",
"0.6460552",
"0.64278287",
"0.63938487",
"0.63795465",
"0.63647807",
"0.63490486",
"0.6335635",
"0.62573886",
"0.6250106",
"0.6228906",
"0.6225983"
] |
0.7208532
|
1
|
Incluir fotos no slide das paginas de projeto
|
function slideProjeto($categoria, $pasta, $quantidadeFotos){
$qtd = $quantidadeFotos;
for($i = 1; $i <= $qtd; $i++): ?>
<li><img src="imagens/fotos/<?=$categoria?>/<?=$pasta?>/<?=$i?>.jpg"/></li>
<?php endfor;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function excluir_imagem_publicacao(){\n\t\t\n\t\t// tabela\n\t\t$tabela = TABELA_IMAGENS_ALBUM;\n\t\t\n\t\t// id\n\t\t$id = remove_html($_REQUEST['id']);\n\t\t\n\t\t// valida id e usuario administrador\n\t\tif($id == null or retorne_usuario_administrador() == false){\n\t\t\t\n\t\t\t// retorno nulo\n\t\t\treturn null;\n\t\t\t\n\t\t};\n\t\t\n\t\t// query\n\t\t$query[0] = \"select *from $tabela where id='$id';\";\n\t\t$query[1] = \"delete from $tabela where id='$id';\";\n\t\t\n\t\t// dados\n\t\t$dados = retorne_dados_query($query[0]);\n\t\t\n\t// pasta de usuario\n\t$pasta_usuario = retorne_pasta_usuario($dados['idusuario'], 2, true);\n\t\n\t// separa os dados\n\t$url_imagem = $pasta_usuario.basename($dados['url_imagem']);\n\t$url_imagem_miniatura = $pasta_usuario.basename($dados['url_imagem_miniatura']);\n\t\n\t// excluindo arquivo\n\texclui_arquivo_unico($url_imagem);\n\texclui_arquivo_unico($url_imagem_miniatura);\n\t\n\t// comando executa\n\tcomando_executa($query[1]);\n\t\n\t}",
"public function presentation_images()\n\t\t{\n\t\t\t$this->is_login();\n\t\t\t$this->load->model('presentation_images_model', 'pim');\n\t\t\t$data['presentation_images'] = $this->pim->get_all();\n $data['presentation_act'] = $this->pim->get_link();\n\t\t\t$this->load->view('presentation_images-admin', $data);\n\t\t}",
"function carouf_show($limit = 10){\n\n wp_enqueue_script(\"jquery\", plugins_url(\"/carouF/js/jquery.js\"), null, \"3.4.1\", true);\n wp_enqueue_script(\"caroufredsel\", plugins_url(\"/carouF/js/jquery.carouFredSel-6.2.1.js\"), null, \"5.6.4\", true);\n\n add_action(\"wp_footer\", \"carrousel_script\", 30);\n\n $carrousel = new WP_Query(\"post_type='slide&post_per_page=$limit\");\n ?>\n <div id=\"Mon-carrousel\">\n <?php\n while ($carrousel->have_posts()){\n $carrousel->the_post();\n global $post;\n the_post_thumbnail(\"Caroussel\", array(\"style\" => \"width:1000px !important\"));\n }\n ?>\n </div>\n <?php\n}",
"public function imagenes() {\n return $imagenes = ImagenesProducto::where('fk_producto',$this->codigo) -> orderBy('featured','desc') -> get(); //para mostrar las imagenes ordenadas por las destacada\n }",
"static function add_slides_small_post_older(): void {\r\n self::add_acf_inner_field(self::slides_small, self::slides_small_post_older, [\r\n 'label' => 'Article (older included)',\r\n 'post_type' => [\r\n 0 => 'post',\r\n ],\r\n 'taxonomy' => [],\r\n 'allow_null' => 0,\r\n 'multiple' => 0,\r\n 'return_format' => 'object',\r\n 'ui' => 1,\r\n 'type' => 'post_object',\r\n 'instructions' => '',\r\n 'required' => 1,\r\n 'conditional_logic' => [\r\n [\r\n [\r\n 'field' => self::qualify_field(self::recent_only),\r\n 'operator' => '!=',\r\n 'value' => '1',\r\n ],\r\n ],\r\n ],\r\n 'wrapper' => [\r\n 'width' => '80',\r\n 'class' => '',\r\n 'id' => '',\r\n ],\r\n ]);\r\n }",
"static function add_slides_small_post(): void {\r\n self::add_acf_inner_field(self::slides_small, self::slides_small_post, [\r\n 'label' => 'Article (recent only)',\r\n 'post_type' => [\r\n 0 => 'post',\r\n ],\r\n 'taxonomy' => [],\r\n 'allow_null' => 0,\r\n 'multiple' => 0,\r\n 'return_format' => 'object',\r\n 'ui' => 1,\r\n 'type' => 'post_object',\r\n 'instructions' => '',\r\n 'required' => 1,\r\n 'conditional_logic' => [\r\n [\r\n [\r\n 'field' => self::qualify_field(self::recent_only),\r\n 'operator' => '==',\r\n 'value' => '1',\r\n ],\r\n ],\r\n ],\r\n 'wrapper' => [\r\n 'width' => '80',\r\n 'class' => '',\r\n 'id' => '',\r\n ],\r\n ]);\r\n }",
"function mobile_kiosk_show_add_slide() {\n\t// Get all available slides\n\t$args = array(\n\t\t'post_type' => 'kioskslide',\n\t\t'posts_per_page' => -1,\n\t\t'meta_query' => array(\n\t\t\t'relation' => 'OR',\n\t\t\tarray(\n\t\t\t\t'key' => 'gallery_id',\n\t\t\t\t'value' => FALSE,\n\t\t\t\t'type' => 'BOOLEAN'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'key' => 'gallery_id',\n\t\t\t\t'compare' => 'NOT EXISTS'\n\t\t\t),\n\t\t)\t\n\t);\n\t$query = new WP_Query($args);\n\t$slides = $query->posts;\n\t\n\t// Get our template\n\tob_start();\n\tinclude('add_slide.php');\n\t$template .= ob_get_contents();\n\tob_end_clean();\n\t\n\techo $template;\n\texit;\n}",
"static function add_slides_small(): void {\r\n self::add_acf_inner_field(self::slides, self::slides_small, [\r\n 'label' => 'Small articles',\r\n 'type' => 'repeater',\r\n 'instructions' => '',\r\n 'required' => 1,\r\n 'conditional_logic' => 0,\r\n 'wrapper' => [\r\n 'width' => '',\r\n 'class' => '',\r\n 'id' => '',\r\n ],\r\n 'collapsed' => self::qualify_field(self::slides_small_post),\r\n 'min' => 3,\r\n 'max' => 3,\r\n 'layout' => 'row',\r\n 'button_label' => 'Add article',\r\n 'sub_fields' => [],\r\n ]);\r\n }",
"function company_photos()\n\t\t{\n\t\t\t$type = $this->uri->segment(5);\n\t\t\t$data = $this->photo->company_photos();\n\t\t\t$this->directPageDetails(\"gallery_company/list_photo_company\",\"\",$data);\n\t\t}",
"public function create()\n {\n if(Gate::denies('slides-create')){\n abort(403,\"Não autorizado!\");\n }\n\n if(Slide::where('deleted','=','N')->count()){\n $imagensSlide = Slide::where('deleted','=','N')->get();\n }else{\n $imagensSlide = null;\n }\n \n $imagens = Imagem::where('deleted','=','N')->orderBy('id','DESC')->paginate(10);\n \n return view('painel.slides.imagens',compact('imagens','imagensSlide'));\n }",
"public function listImages($page = 1){\n if($page<1) $page = 1;\n $dir = public_path().'/images/';\n $filesInPublicFolder = scandir($dir);\n // izbacivanje assets foldera, .. i .drugih sa ignore liste\n $ignoreFiles = ['assets', '.', '..', 'pig.png', 'placeholder.png', 'logo.png', 'index.php'];\n foreach ($ignoreFiles as $toIgnore) {\n if (($key = array_search($toIgnore, $filesInPublicFolder)) !== false) {\n array_splice($filesInPublicFolder, $key, 1);\n }\n }\n\n $imagesOnPage['inImagesTable'] = $imagesOnPage['notInImagesTable'] = [];\n for($i=($page-1)*10; $i<($page*10); $i++){\n if(isset($filesInPublicFolder[$i])){\n $isInImagesTable = Image::where('name', $filesInPublicFolder[$i])->first()? \"inImagesTable\" : \"notInImagesTable\";\n $imagesOnPage[$isInImagesTable][] = $filesInPublicFolder[$i];\n }\n }\n // dd($imagesOnPage);\n $pages = intdiv(count($filesInPublicFolder),10) + 1;\n return view('admin.business.listImgs', compact('pages', 'imagesOnPage', 'page'));\n }",
"function wpbm_slider_images(){\n global $wpdb;\n include( 'inc/admin/wpbm-slider-image.php' );\n die();\n }",
"function wpsp_tour_slideshow() {\n\tglobal $post;\n\n\t$photos = explode( ',', get_post_meta( $post->ID, 'wpsp_tour_slideshow', true ) );\n\n\tif ( $photos[0] != '' ) { ?>\n\t\t<script type=\"text/javascript\">\n jQuery(document).ready(function($){\n $('#slides').superslides({\n \tplay: 5000,\n\t\t\t\t animation_speed: 600,\n\t\t\t\t animation_easing: 'swing',\n\t\t\t\t animation: 'slide',\n\t\t\t inherit_width_from: '.site-slider',\n\t\t\t inherit_height_from: '.site-slider'\n\t\t\t });\n }); \n </script>\n\t<?php\n\t\techo '<div class=\"site-slider\">';\n\t\techo '<div id=\"slides\">';\n echo '<ul class=\"slides-container\">';\n foreach ( $photos as $photo ) : \n echo '<li>' . wp_get_attachment_image( $photo, 'post-slide' ) . '</li>';\n \tendforeach;\n echo '</ul>';\n echo '<nav class=\"slides-navigation\">';\n\t echo '<a href=\"#\" class=\"next\"><i class=\"fa fa-chevron-right\"></i></a>';\n\t echo '<a href=\"#\" class=\"prev\"><i class=\"fa fa-chevron-left\"></i></a>';\n\t echo '</nav>';\n\t\techo ' </div> <!-- #slides -->';\n echo '</div> <!-- .site-slider -->';\n\t}\n}",
"function getImagesDam($limitImages=0) {\n # echo t3lib_div::view_array($images);\n \n // get all the files\n $images = tx_dam_db::getReferencedFiles('tt_content',$this->cObj->data['uid'],'rgsmoothgallery','tx_dam_mm_ref');\n\n // randomise and limit image items returned from images array\n // also useful to limit items in array to 1 item for use when no javascript in browser\n // if $limitImages=0 then this if statement is bypassed and all images in images array returned for processing\n if ($limitImages>0) {\n $test = ($images['files']);\n $test = $this->getSlicedRandomArray($test,0,$limitImages);\n $images['files'] = $test;\n }\n # echo t3lib_div::view_array($images['files']); \n \t $content.=$this->beginGallery($this->cObj->data['uid'],$limitImages);\n \t \n \t // add image\n foreach ($images['files'] as $key=>$path) { \n // get data from the single image\n $fields = 'title,description';\n $tables = 'tx_dam';\n $temp_where='uid = '.$key;\n $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields, $tables, $temp_where);\n $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);\n\n // add element to slideshow\n $content.=$this->addImage(\n\t\t\t $path,\n $row['title'], \n $row['description'], \n $this->config['showThumbs'],\n $this->config['showLightbox'],\n $path,\n $limitImages\n );\n }\n \n $content.=$this->endGallery();\n return $content;\n }",
"public function getPhotos();",
"public function media_upload_picasa_list_content()\n\t{\n\t\t$items_per_page = 20;\n\n\t\t$user_feed = $this->api->get_user_feed();\n\t\t$albums = ($user_feed->entry ? $user_feed->entry : array());\n\n\t\t// get current album\n\t\t$current_album = (isset($_GET['album']) ? $_GET['album'] : 'all');\n\n\t\t// get current page\n\t\t$paged = (isset($_GET['paged']) ? $_GET['paged'] : 1);\n\n\t\t// get photos\n\t\tif(isset($_GET['picasa_search_query']))\n\t\t{\n\t\t\t$query = $_GET['picasa_search_query'];\n\t\t\t$photos_feed = $this->api->search_photos($query);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$photos_feed = $this->api->get_photos($current_album);\n\t\t}\n\n\t\t$photos = $photos_feed->entry;\n\n\t\t// set album options\n\t\t$album_options = array('all' => 'All Albums');\n\t\tforeach($albums as $album)\n\t\t\t$album_options[(string)$album->gphotoId] = $album->getTitle()->text;\n\n\t\t$num_pages = ceil(count($photos) / $items_per_page);\n\n\t\t// start and end of current page\n\t\t$start = ($paged - 1) * $items_per_page;\n\t\t$end = min(count($photos), $start + $items_per_page);\n\n\t\t$this->media_upload_content_tabs();\n\n\t\t?>\n\t\t<form id=\"filter\" method=\"get\" action=\"\">\n\t\t\t<p class=\"search-box\">\n\t\t\t\t<input type=\"hidden\" name=\"type\" value=\"picasa\" />\n\t\t\t\t<input type=\"hidden\" name=\"tab\" value=\"picasa_list\" />\n\t\t\t\t<input id=\"media-search-input\" type=\"text\" value=\"<?php echo $query; ?>\" placeholder=\"Search Photos\" name=\"picasa_search_query\" />\n\t\t\t\t<input class=\"button\" type=\"submit\" value=\"Search Photos\" />\n\t\t\t</p>\n\n\t\t <select name=\"album\">\n\t\t <?php foreach($album_options as $id => $title): ?>\n\t\t\t\t<option value=\"<?php echo $id ?>\" <?php echo selected($id, $current_album); ?>><?php echo $title; ?></option>\n\t\t\t\t<?php endforeach; ?>\n\t\t\t</select>\n\n\t\t\t<input class=\"button\" type=\"submit\" value=\"Filter\" />\n\n\t\t\t<div class=\"tablenav\">\n\t\t\t\t<div class=\"tablenav-pages\">\n\n\t\t\t\t\t<?php if($paged > 1): ?>\n\t\t\t\t\t<a class=\"page-numbers\" href=\"<?php echo add_query_arg(array('paged' => $paged - 1)); ?>\">«</a>\n\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t<?php for($page = max(1, $paged - 3); $page < $paged; $page++): ?>\n\t\t\t\t\t<a class=\"page-numbers\" href=\"<?php echo add_query_arg(array('paged' => $page)); ?>\"><?php echo $page; ?></a>\n\t\t\t\t\t<?php endfor; ?>\n\n\t\t\t\t\t<a class=\"current page-numbers\" href=\"<?php echo add_query_arg(array('paged' => $paged)); ?>\"><?php echo $page; ?></a>\n\n\t\t\t\t\t<?php for($page = $paged + 1; $page < min($paged + 3, $num_pages + 1); $page++): ?>\n\t\t\t\t\t<a class=\"page-numbers\"\t href=\"<?php echo add_query_arg(array('paged' => $page )); ?>\"><?php echo $page; ?></a>\n\t\t\t\t\t<?php endfor; ?>\n\n\t\t\t\t\t<?php if($paged < $num_pages): ?>\n\t\t\t\t\t<a class=\"page-numbers\" href=\"<?php echo add_query_arg(array('paged' => $paged + 1)); ?>\">»</a>\n\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t</div><!-- .tablenav-pages -->\n\t\t\t</div><!-- .tablenav -->\n\n\n\t\t</form>\n\n\t\t<div id=\"media-items\" class=\"picasa\">\n\n\t\t\t<?php\n\t\t\tfor($photo_index = $start; $photo_index < $end; $photo_index++):\n\t\t\t\t$photo = $photos[$photo_index];\n\n\t\t\t $media = $photo->getMediaGroup();\n\t\t\t\t$thumbnails = $media->getThumbnail();\n\n\t\t\t\t$thumbs = array();\n\t\t\t\t$thumb_sizes = array('small', 'medium', 'large');\n\t\t\t\tforeach($thumbnails as $i => $thumb)\n\t\t\t\t{\n\t\t\t\t\t$thumbs[$thumb_sizes[$i]] = array('url' => $thumb->getUrl(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'width' => $thumb->getWidth(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'height' => $thumb->getHeight());\n\t\t\t\t}\n\n\t\t\t?>\n\n\t\t\t<div class=\"media-item\">\n\t\t\t\t<img src=\"<?php echo $thumbs['small']['url']; ?>\"\n\t\t\t\t\t\t width=\"<?php echo $thumbs['small']['width']; ?>\"\n\t\t\t\t\t\t height=\"<?php echo $thumbs['small']['height']; ?>\"\n\t\t\t\t\t\t style=\"float: left; padding: 4px;\"\n\t\t\t\t\t\t />\n\t\t\t\t\t\n\t\t\t\t<div class=\"filename\">\n\t\t\t\t\t<?php echo $photo->getTitle(); ?>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"insert-options\">\n\n\t\t\t\t\t<form action=\"\" method=\"post\">\n\t\t\t\t\t\t<p class=\"link-url\">\n\t\t\t\t\t\t\t<label for=\"link_url\">Link URL</label>\n\t\t\t\t\t\t\t<input type=\"text\" name=\"link_url\" />\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<p class=\"alignment\">\n\t\t\t\t\t\t\t<label for=\"alignment\">Alignment</label>\n\t\t\t\t\t\t\t<span class=\"alignment-options\">\n\t\t\t\t\t\t\t\t<input type=\"radio\" value=\"none\" name=\"alignment\" checked=\"checked\"><label>None</label>\n\t\t\t\t\t\t\t\t<input type=\"radio\" value=\"left\" name=\"alignment\"><label>Left</label>\n\t\t\t\t\t\t\t\t<input type=\"radio\" value=\"center\" name=\"alignment\"><label>Center</label>\n\t\t\t\t\t\t\t\t<input type=\"radio\" value=\"right\" name=\"alignment\"><label>Right</label>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t<div class=\"size\">\n\t\t\t\t\t\t\t<label for=\"size\">Size</label>\n\t\t\t\t\t\t\t<div class=\"size-options\">\n\t\t\t\t\t\t\t\t<?php foreach($thumbs as $size => $thumb): ?>\n\t\t\t\t\t\t\t\t<input type=\"radio\" value=\"<?php echo $size; ?>\" name=\"size\">\n\t\t\t\t\t\t\t\t<label><?php echo ucwords($size); ?> Thumbnails (<?php echo $thumb['width']; ?> x <?php echo $thumb['height']; ?>)</label><br />\n\t\t\t\t\t\t\t\t<?php endforeach; ?>\n\t\t\t\t\t\t\t\t<input type=\"radio\" value=\"full\" name=\"size\" checked=\"checked\">\n\t\t\t\t\t\t\t\t<label>Full (<?php echo $photo->getGphotoWidth(); ?> x <?php echo $photo->getGphotoHeight(); ?>)</label><br />\n\t\t\t\t\t\t\t</div><!-- .size-options -->\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<input type=\"hidden\" value=\"<?php echo $photo->getId()->getText(); ?>\" name=\"photo_id\" />\n\t\t\t\t\t\t\t<input type=\"submit\" class=\"button-secondary\" value=\"Insert\" name=\"picasa_embed\" />\n\t\t\t\t\t\t</p>\n\n\t\t\t\t\t</form>\n\n\t\t\t\t</div><!-- .insert-options-->\n\t\t\t</div><!-- .media-item -->\n\n\t\t\t<?php endfor; ?>\n\n\t\t</div><!-- #media-items -->\n\t\t<?php\n\t}",
"static function add_slides_big_post_older(): void {\r\n self::add_acf_inner_field(self::slides, self::slides_big_post_older, [\r\n 'label' => 'Big article (older included)',\r\n 'post_type' => [\r\n 0 => 'post',\r\n ],\r\n 'taxonomy' => [],\r\n 'allow_null' => 0,\r\n 'multiple' => 0,\r\n 'return_format' => 'object',\r\n 'ui' => 1,\r\n 'type' => 'post_object',\r\n 'instructions' => '',\r\n 'required' => 1,\r\n 'conditional_logic' => [\r\n [\r\n [\r\n 'field' => self::qualify_field(self::recent_only),\r\n 'operator' => '!=',\r\n 'value' => '1',\r\n ],\r\n ],\r\n ],\r\n 'wrapper' => [\r\n 'width' => '80',\r\n 'class' => '',\r\n 'id' => '',\r\n ],\r\n ]);\r\n }",
"function civ_slider(){\n // to use in the WP_Query loop\n global $wpdb;\n $table_name = $wpdb->prefix . 'civ_slider';\n $slides = $wpdb->get_results( \"select * from $table_name order by img_order asc\", 'object');\n\n $f_slide = array();\n $num_slides = count($slides);\n\n foreach ($slides as $slide) {\n array_push($f_slide, $slide->post_id);\n }\n$args = array('post_type' => 'post',\n 'post__in' => $f_slide,\n 'orderby' => 'post__in',\n 'ignore_sticky_posts' => '1'\n);\n\n $slider = new WP_Query($args);\n\n\n while ( $slider->have_posts() ) :\n $slider->the_post(); ?> \n<?php \n //Get the Thumbnail URL\n $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), /*array( 720,405 ),*/ false, '' );\n ?>\n <div class=\"slide\" style=\"background-image:url('<?php echo $src[0]; ?>');\">\n <h2>\n <a href=\"<?php the_permalink(); ?>\">\n <?php the_title(); ?>\n </a>\n </h2>\n <span><?php the_excerpt(); ?></span>\n </div>\n <?php endwhile;\n $wpdb->flush();\nwp_reset_postdata();\n}",
"function get_pages_images_list() {\n\t$files = scandir(BASEPATH . \"/../public/images/pages\");\n\tarray_shift($files); // remove \".\"\n\tarray_shift($files); // remove \"..\"\n\treturn $files;\n}",
"public function index() {\n $images = Gallery::all();\n // $images = Gallery::all();\n require_once('views/gallery/index.php');\n }",
"public function photoIndex()\n {\n return redirect(PREFIX . '/multicms/pages/gallery');\n }",
"function presentarImagenesPublicacion($idPP)\r\n {\r\n $id=$idPP;\r\n $directory=('upload/');\r\n $dirint = dir($directory);\r\n if ($idPP == null) {\r\n $id = $this->ultimoId();\r\n }\r\n\r\n while(($archivo = $dirint->read()) !== false)\r\n {\r\n $str = $archivo;\r\n $caracteres = preg_split('/_/', $str, -1, PREG_SPLIT_NO_EMPTY);\r\n // var_dump($caracteres);\r\n // $items = (string)$id;\r\n // var_dump($items);\r\n if ($caracteres['0'] === $id){\r\n $imagen = $id.'_'.$caracteres['1'];\r\n // var_dump($imagen);\r\n echo '<div class=\"col-md-6\" style=\"width:20%;\"><img src=\"/inmobiitla/upload/'.$imagen.'\" class=\"img-responsive img-thumbnail\" /></div>'.\"\\n\";\r\n }\r\n }\r\n $dirint->close();\r\n }",
"static function add_slides(): void {\r\n self::add_acf_field(self::slides, [\r\n 'label' => 'Slides',\r\n 'min' => 1,\r\n 'max' => 4,\r\n 'layout' => 'row',\r\n 'collapsed' => '',\r\n 'type' => 'repeater',\r\n 'instructions' => 'These are the slides on the front page. These will only display if the slider is set to Medium Big Grid Slide. You can choose one or two slides.',\r\n 'required' => 1,\r\n 'conditional_logic' => 0,\r\n 'button_label' => 'Add slide',\r\n 'wrapper' => [\r\n 'width' => '',\r\n 'class' => '',\r\n 'id' => '',\r\n ],\r\n ]);\r\n }",
"public function getPicturesInSlider(): PictureCollection;",
"public function index()\n {\n $slides = $this->Slides->find('all')\n ->order(['Slides.sorting' => 'ASC'])\n ;\n $this->set(['enable_fancy_box' => true]);\n $this->set('slides', $this->paginate($slides));\n $this->set('_serialize', ['slides']);\n }",
"private static function toDelete(){\n $filesNotToDelete = [];\n $dir = public_path().'/images/';\n $filesInPublicFolder = scandir($dir);\n\n // izbacivanje assets foldera, .. i .\n $ignoreFiles = ['assets', '.', '..', 'pig.png', 'placeholder.png', 'logo.png', 'index.php'];\n foreach ($ignoreFiles as $toIgnore) {\n if (($key = array_search($toIgnore, $filesInPublicFolder)) !== false) {\n unset($filesInPublicFolder[$key]);\n }\n }\n // dd($filesInPublicFolder);\n $images = [];\n $collectionsOfObjectsWithImages = [Product::all(), ProductGroup::all(), Manufacturer::all(),\n Suggestion::all(), ImageSuggestion::all(), MainAd::all(),SecondAd::all()];\n\n foreach ($collectionsOfObjectsWithImages as $collection) {\n foreach ($collection as $object) {\n if($object->images->count()){\n foreach ($object->images as $image) {\n $images[] = $image->name;\n }\n }\n }\n }\n\n // dd($images);\n // dd(array_diff($filesInPublicFolder, $images));\n // dd($filesNotToDelete, $filesInPublicFolder);\n return $toDelete = array_diff($filesInPublicFolder, $images); //za fju array_dif vazan je redoslijed argumenata\n\n }",
"function get_post_galleries_images($post = 0)\n {\n }",
"function ve_get_360_photo_section() {\n\tif (is_singular('companies')) {\n\t\tif (have_rows('company_threesixty_photos_repeater')){\n\t\t\t?>\n\t\t\t<div class=\"full-width threesixty-photos-section black-bg\">\n\t\t\t\t<?php ve_get_360_photos(); ?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t} elseif (is_singular('group_of_companies')) {\n\t\tif (have_rows('group_of_companies_threesixty_photos_repeater')) {\n\t\t\t?>\n\t\t\t<div class=\"full-width threesixty-photos-section black-bg\">\n\t\t\t\t<?php ve_get_360_photos(); ?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t}\n}",
"public function gallery_albums()\n {\n $lang = $this->data['lang'];\n $user_id = $this->user_id;\n\n $this->data['page'] = 'gallery' ;\n $this->data['gallery_albums'] = $this->home_m->get_data('gallery_albums')->result_array();\n\n $body = 'gallery_albums' ;\n\n $this->load_pages($body,$this->data);\n }",
"function sb_slideshow_upload() {\n\tglobal $sb_slideshow_interface, $sb_slideshow_slides;\n\n\t// create slide array for newest attachment\n\t$index = sb_slideshow_slides( $sb_slideshow_interface['mysql_select'] . ' ORDER BY post_date DESC LIMIT 1' );\n\n\tob_start();\n\tsb_slideshow_sortable_item( $index[0] );\n\t$html = ob_get_clean();\n\n\tdie( json_encode( array(\n\t\t'object' \t=> json_encode( $sb_slideshow_slides[$index[0]]['attachment'] ),\n\t\t'html' \t=> $html ) ) );\n}"
] |
[
"0.5896013",
"0.57078487",
"0.5593266",
"0.5549472",
"0.5548818",
"0.5547762",
"0.5532901",
"0.55159295",
"0.54875404",
"0.54735565",
"0.5446008",
"0.54429",
"0.54265714",
"0.5416376",
"0.5329137",
"0.5305849",
"0.5292612",
"0.52799433",
"0.52779436",
"0.5274087",
"0.5262555",
"0.52592534",
"0.52568394",
"0.5254716",
"0.5253624",
"0.52508557",
"0.52432835",
"0.5235449",
"0.5224883",
"0.52152634"
] |
0.6071246
|
0
|
Incluir arquivo javaScript na pagina
|
function incluirJS($arquivo){ ?>
<script src="js/<?=$arquivo?>.js" type="text/javascript"></script>
<?php }
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"protected function addJavaScript() {\n\t\t$extensionConfiguration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['contagged']);\n\t\t$javaScriptPathAndFilename = $extensionConfiguration['javaScriptPathAndFilename'];\n\t\tif (is_string($javaScriptPathAndFilename) && $javaScriptPathAndFilename !== '') {\n\t\t\t$GLOBALS['TSFE']->additionalHeaderData['contagged'] .= '<script src=\"' . $javaScriptPathAndFilename . '\" type=\"text/javascript\"></script>';\n\t\t}\n\t}",
"public static function inclureJS() {\r\n \r\n foreach (Page::getInstance()->script as $link) {\r\n \r\n ?>\r\n <script type=\"text/javascript\" src=\"<?php echo $link; ?>\" ></script>\r\n <?php\r\n \r\n }\r\n }",
"protected function addJS() {\n foreach ($this->js_files as $js_file) {\n $this->header.=\"<script type='text/javascript' src='\" . __ASSETS_PATH . \"/\" . $js_file . \"'></script> \\n\";\n }\n }",
"private function includeJavaScript() {\n\t\t$GLOBALS['TSFE']->additionalHeaderData[$this->prefixId]\n\t\t\t= '<script type=\"text/javascript\" ' .\n\t\t\t'src=\"' . $this->getExtensionPath() .\n\t\t\t'pi1/tx_explanationbox_pi1.js\">' .\n\t\t\t'</script>';\n\n\t\tif ($this->hasConfValueString('mooTools')) {\n\t\t\t$GLOBALS['TSFE']->additionalHeaderData[$this->prefixId . '_moo']\n\t\t\t\t= '<script type=\"text/javascript\" ' .\n\t\t\t\t'src=\"' . $this->getExtensionPath() .\n\t\t\t\t$this->getConfValueString('mooTools') . '\">' .\n\t\t\t\t'</script>';\n\t\t}\n\t}",
"function export_add_js()\n {\n }",
"function ft_hook_add_js_file() {}",
"function fresh_text_add_js()\n\t{\n\t\techo '<script>';\n\t\techo require_once 'replacement.php';\n\t\techo '</script>';\n\t}",
"public function sharethis_include_js();",
"protected function loadJavascript() {}",
"public function script() {\r\n\t\tif ($this->scriptable === true || $this->scriptable === 'true') {\r\n\t\t\t$page = pzk_page();\r\n\t\t\tif ($page) {\r\n\t\t\t\t$page->addJsInst($this->toArray());\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public function JS($file,$hook=''){\n \n $file=$this->getFileName($file);\n \n $incl=pinJavaScriptLinkInclusion::make($file,$hook)->file($file);\n pinIncluder::i()->add($incl);\n return $incl; \n }",
"public function includeJS()\r\n\t\t{\r\n\t\t\techo $this->js;\r\n\t\t}",
"public function javascript() {\r\n\t\tif ($this->scriptable === true || $this->scriptable === 'true') {\r\n\t\t\t\r\n\t\t\tif(@$this->scriptTo) {\r\n\t\t\t\t$element = pzk_element($this->scriptTo);\r\n\t\t\t\tif($element) {\r\n\t\t\t\t\t$element->append(pzk_parse('<html.js src=\"'.BASE_URL.'/js/'.implode('/', $this->fullNames).'.js\" />'));\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$page =pzk_page();\r\n\t\t\t\tif ($page) {\r\n\t\t\t\t\t$page->addObjJs($this->tagName);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif ($this->jsLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.js src=\"'.BASE_REQUEST.'/default/skin/'.pzk_app()->name.'/js/'.$this->jsLink.'.js\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page())\r\n\t\t\t\t\t$page->addObjCss($this->cssLink);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tif ($this->jsExternalLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.js src=\"'.$this->jsExternalLink.'\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page()) {\r\n\t\t\t\t\t$page->addExternalCss($this->jsExternalLink);\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}",
"protected function doConcatenateJavaScript() {}",
"private function addJS()\n {\n Filters::add('scripts', array($this, 'renderRevisionsJS'));\n }",
"public function js_includes()\n {\n }",
"protected function loadJavaScripts() {}",
"protected function getSubJsFile(): void\n {\n preg_match_all(self::REGEX_JS_INCLUDE_FORMAT, $this->sContents, $aHit, PREG_PATTERN_ORDER);\n\n for ($i = 0, $iCountHit = count($aHit[0]); $i < $iCountHit; $i++) {\n $this->sContents = str_replace($aHit[0][$i], '', $this->sContents);\n $this->sContents .= File::EOL . $this->oFile->getUrlContents($aHit[1][$i] . $aHit[2][$i]);\n }\n }",
"public function indikatorjsAction(){\n\t\theader('content-type : text/javascript');\n\t\t$this->render('indikatorjs');\n }",
"public function print_js() {\n\t\tglobal $BASE_SCRIPT_ADDED;\n\t\t$this->form->js_files []= 'file.js';\n\t\t$script = '<script type=\"text/javascript\">var file_uploader_'.$this->name().' = new file_uploader(\"'.$this->name().'\", '.$this->maxFiles.', \"'.$this->rel.'\", \"'.$this->target.'\");';\n\t\tforeach ($this->previousFiles as $id => $IN) {\n\t\t\t$script .= \"\\n\".'file_uploader_'.$this->name().'.add_existing_file(\"'.$IN->filename.'\", \"'.$this->uploadDir.$IN->filename.'\", \"'.$IN->id.'\");';\n\t\t}\n\t\t$script .= '</script>';\n\t\treturn $script;\n\t}",
"public function insert_inline_scripts() {\n }",
"public function insert_inline_scripts() {\n }",
"public function insert_inline_scripts() {\n }",
"public function addJSFile($filePath) {\n $this->addToHead(\"<script src=\\\"\" . $filePath . \"\\\"></script>\", Page::BOTTOM);\n }",
"function js($arquivo);",
"static function include_scripts(){\n\t\t//self::include_css();\n\t\tself::include_js();\n\t}",
"function addJSFiles()\n\t{\n\t\t\t\t$this->getContainer()->AddJSFile(\"include/zoombox/zoombox.js\");\n\t\t$this->getJSControl();\t\n\t}",
"protected function generateJavascript() {}",
"protected function generateJavascript() {}",
"protected function addAdditionalScript() {\necho <<< HTML\n <script src=\"scripts/ajax.js\"></script>\n <link rel=\"stylesheet\" type=\"text/css\" href=\"styles/customer.css\">\nHTML; \n }"
] |
[
"0.74303275",
"0.7398945",
"0.70499206",
"0.69829017",
"0.6958033",
"0.68783486",
"0.6863373",
"0.6846819",
"0.6808866",
"0.6783875",
"0.6678652",
"0.6663508",
"0.6625974",
"0.6605132",
"0.65851456",
"0.6582547",
"0.65821207",
"0.6538476",
"0.64970714",
"0.64888173",
"0.6422474",
"0.6422474",
"0.6422474",
"0.64048725",
"0.6376285",
"0.63659286",
"0.63653237",
"0.6359011",
"0.635722",
"0.63525957"
] |
0.79745203
|
0
|
Incluir arquivo CSS na pagina
|
function incluirCSS($arquivo){ ?>
<link href="css/<?=$arquivo?>.css" rel="stylesheet" type="text/css"/>
<?php }
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"protected function addCSS() {\n foreach ($this->css_files as $css_file) {\n $this->header.=\"<link rel='stylesheet' href='\" . __ASSETS_PATH . \"/\" . $css_file . \"'/> \\n\";\n }\n }",
"public function css() {\r\n\t\tif ($this->cssLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.css src=\"'.BASE_REQUEST.'/default/skin/'.pzk_app()->name.'/css/'.$this->cssLink.'.css\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page())\r\n\t\t\t\t\t$page->addObjCss($this->cssLink);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tif ($this->cssExternalLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.css src=\"'.$this->cssExternalLink.'\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page()) {\r\n\t\t\t\t\t$page->addExternalCss($this->cssExternalLink);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}",
"private function addCSS()\n {\n Filters::add('head', array($this, 'renderRevisionsCSS'));\n }",
"public static function enteteCSS() {\r\n foreach (Page::getInstance()->css as $link) {\r\n ?>\r\n <link type=\"text/css\" rel=\"stylesheet\" href=\"<?php echo $link; ?>\" />\r\n <?php\r\n }\r\n }",
"public function mm_default_css() {\n $default_css = CSS_DIR . DEFAULT_CSS;\n $new_css = CSS_DIR . CUSTOM_CSS;\n ob_start();\n @include( $default_css );\n $css = ob_get_contents();\n ob_end_clean();\n \n $css = stripslashes ( $css );\n \n update_option('mm_gallery_css', $css);\n file_put_contents($new_css, $css); \n }",
"function add_css() \n {\n if( $this->options['use-css-file'] ) {\n wp_register_style( 'bbquotations-style' , $this->plugin_url . 'bbquotations-style.css');\n wp_enqueue_style( 'bbquotations-style' );\n } \n }",
"function css( $params ){\n\t\n\t\tglobal $mainframe;\n\t\t\n\t\t$document =& JFactory::getDocument();\n\t\t\n\t\t$cssFile = 'ja_contentslide.css';\n\t\n\t\tif( file_exists(JPATH_SITE.DS.'templates'.DS.$mainframe->getTemplate().DS.'css'.DS.$cssFile) ) {\n\t\t\t$document->addStyleSheet( JURI::base().'templates/'.$mainframe->getTemplate().'/css/'.$cssFile );\n\t\t} else { \n\t\t\t$document->addStyleSheet( JURI::base().'modules/mod_ja_contentslide/assets/css/'.$cssFile );\n\t\t}\n\t}",
"protected function loadCss() {}",
"public function css_includes()\n {\n }",
"private function load_css () {\n $buffer = '';\n if (count($this->css_files)) {\n foreach ($this->css_files as $file) {\n $file = explode('/', $file);\n // TODO: use $this->config->item('modules_locations') for modules path\n $file = 'application/modules/'.$file[0].'/views/'.$this->get_skin().'/skin/'.implode('/',array_slice($file, 1));\n $buffer .= \"\\n\".'<link rel=\"stylesheet\" href=\"'.base_url($file).'\">';\n }\n return $buffer.\"\\n\";\n } else {\n return \"\\n\";\n }\n }",
"function addCSSFiles()\n\t{\n\t\t$this->getContainer()->AddCSSFile(\"include/zoombox/zoombox.css\");\n\t}",
"function ft_hook_add_css() {}",
"protected function doConcatenateCss() {}",
"private function _addCss() {\r\n JHtml::styleSheet( Sh404sefHelperGeneral::getComponentUrl() . '/assets/css/list.css');\r\n }",
"protected function generateCSS() {}",
"function loadCSS() {\n\t\t$first = true;\n\t\t$cssPart = '';\n\t\tforeach( $this->conf->css->file as $file ) {\n\t\t\tif( ! $first ) {\n\t\t\t\t$cssPart .= chr( 9 );\n\t\t\t}\n\t\t\t$cssPart .= '<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"';\n\t\t\t$cssPart .= $this->conf->path->baseUrl . $this->conf->path->css . $file;\n\t\t\t$cssPart .= '\" />' . chr( 10 );\n\t\t\t$first = false;\n\t\t}\n\t\t\n\t\tif( count( $this->additionalCSS ) >= 1 ) {\n\t\t\tforeach( $this->additionalCSS as $key => $value ) {\n\t\t\t\t$cssPart .= '<style type=\"text/css\">' . chr( 10 );\n\t\t\t\t$cssPart .= $value . chr( 10 );\n\t\t\t\t$cssPart .= '</style>' . chr( 10 );\n\t\t\t}\n\t\t\n\t\t}\n\t\treturn $cssPart;\n\t}",
"public function CSS($file,$hook=''){\n \n $file=$this->getFileName($file);\n $incl=pinCSSLinkInclusion::make($file,$hook)->file($file);\n pinIncluder::i()->add($incl);\n return $incl; \n }",
"function css($arquivo);",
"function add_css() {\n // È possibile aggiungere un file css presente nella cartella del tema\n wp_register_style('normalize', get_template_directory_uri() . '/vendor/normalize/normalize.css', array(), null, 'all');\n wp_enqueue_style('normalize');\n wp_register_style('main', get_template_directory_uri() . '/css/main.css', array('normalize'), null, 'all');\n wp_enqueue_style('main');\n\n // È possibile anche aggiungere un url remoto (es. Google Fonts)\n // wp_register_style('webfont', 'https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,500,600,700,800,900', array(), null, 'all');\n // wp_enqueue_style('webfont');\n\n // Inoltre è possibile aggiungere un css solo se una determinata condizione è vera\n // In questo esempio aggiungiamo il file home.css solo se ci troviamo sulla pagina di home\n // if(is_home()) {\n // wp_register_style('home', get_template_directory_uri() . '/css/home.css', array(), null, 'all');\n // wp_enqueue_style('home');\n // }\n}",
"function css_add(){\n\t\t\tif($_GET['csv']==true) : \t\t\t\n\t\t\t\t$url = dirname(__FILE__) ;\n\t\t\t\tpreg_match('/\\/wp-content.+$/',$url,$c);\n\t\t\t\t$link = get_option('home').$c[0].'/css/style.css';\t\t\t\t\t\n\t\t\t\techo \"<link rel='stylesheet' href='$link' media='all' type='text/css' />\" ;\n\t\t\tendif;\n\t\t\t\n\t\t}",
"public function formatCSS() {\n echo $this->head;\n echo \"<link rel='stylesheet' href='desktop.css'>\";\n }",
"public function kiwip_stylesheet_add_file(){\n\t\t//register\n\t\tforeach($this->stylesheet as $key){\n\t\t\twp_register_style('kiwip_shortcode-css-'.$key['stylesheetId'], $key['stylesheetURL']);\n\t\t}\n\t\t\n\t\t//load\n\t\tforeach($this->stylesheet as $eky){\n\t\t\twp_enqueue_style('kiwip_shortcode-css-'.$key['stylesheetId']);\n\t\t}\t\t\n\n\t\t// $this->debug($this->stylesheet); die();\n\t}",
"public function include_css($env) {\n global $CFG;\n $css = '';\n $cssurl = $CFG->dirroot . '/course/format/ludimoodle/motivators/' . $this->get_short_name() . '/styles.css';\n\n // We can't require css like this in format because <head> is already closed\n //$page = $env->get_page();\n //$page->requires->css($cssurl);\n\n // if css is not already in page\n if (file_exists($cssurl) && (!in_array($cssurl, $env->cssinitdata))) {\n // mark that this css is in page\n $env->cssinitdata[] = $cssurl;\n $css = '<style>' . file_get_contents($cssurl) . '</style>';\n }\n return $css;\n }",
"function ct_include_style () {\n\tif ( !is_admin() ) {\n\t\twp_enqueue_style( 'christatimmer', get_stylesheet_uri() );\n\t}\n}",
"public function insert_inline_css() {\n }",
"public function insert_inline_css() {\n }",
"public function insert_inline_css() {\n }",
"public function insert_inline_css() {\n }",
"public function insert_inline_css() {\n }",
"function add_style($name, $file)\n{\n\tglobal $styles_included;\n\t$styles_included[$name] = \"<link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"\".site_url.$file.\"\\\"/>\\n\";\n}"
] |
[
"0.775179",
"0.7349731",
"0.72820145",
"0.7212796",
"0.7077214",
"0.70146894",
"0.69724935",
"0.6960971",
"0.69566077",
"0.69251454",
"0.6911939",
"0.6879662",
"0.6844397",
"0.6841192",
"0.6840535",
"0.6834471",
"0.6827155",
"0.6818361",
"0.68057215",
"0.67879665",
"0.6727807",
"0.67188185",
"0.66700757",
"0.6667905",
"0.6661273",
"0.6661273",
"0.6661273",
"0.6661273",
"0.6661273",
"0.6629659"
] |
0.8212799
|
0
|
Collection of barangays under this sub municipality.
|
public function barangays()
{
return $this->morphMany(Barangay::class, 'geographic');
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function getCapeAgulhasSubs($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT s.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM suburbs s\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON s.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '112'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$suburbs = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t\t$suburb->setMunicipality($municipality);\n\t\t\t\t\t\t$suburb->setSuburbCode($row['suburb_code']);\n\t\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t\t$suburb->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$suburb->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$suburb->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\tarray_push($suburbs, $suburb);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $suburbs;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}",
"public function getBeaufortWestSubs($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT s.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM suburbs s\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON s.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '101'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$suburbs = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t\t$suburb->setMunicipality($municipality);\n\t\t\t\t\t\t$suburb->setSuburbCode($row['suburb_code']);\n\t\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t\t$suburb->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$suburb->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$suburb->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\tarray_push($suburbs, $suburb);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $suburbs;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}",
"public function getSaldanhaBaySubs($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT s.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM suburbs s\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON s.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '119'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$suburbs = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t\t$suburb->setMunicipality($municipality);\n\t\t\t\t\t\t$suburb->setSuburbCode($row['suburb_code']);\n\t\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t\t$suburb->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$suburb->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$suburb->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\tarray_push($suburbs, $suburb);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $suburbs;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}",
"public function getMosselBaySubs($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT s.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM suburbs s\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON s.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '103'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$suburbs = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t\t$suburb->setMunicipality($municipality);\n\t\t\t\t\t\t$suburb->setSuburbCode($row['suburb_code']);\n\t\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t\t$suburb->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$suburb->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$suburb->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\tarray_push($suburbs, $suburb);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $suburbs;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}",
"public function getBitouSubs($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT s.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM suburbs s\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON s.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '107'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$suburbs = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t\t$suburb->setMunicipality($municipality);\n\t\t\t\t\t\t$suburb->setSuburbCode($row['suburb_code']);\n\t\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t\t$suburb->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$suburb->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$suburb->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\tarray_push($suburbs, $suburb);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $suburbs;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}",
"public function getBergrivierSubs($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT s.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM suburbs s\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON s.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '116'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$suburbs = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t\t$suburb->setMunicipality($municipality);\n\t\t\t\t\t\t$suburb->setSuburbCode($row['suburb_code']);\n\t\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t\t$suburb->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$suburb->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$suburb->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\tarray_push($suburbs, $suburb);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $suburbs;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}",
"public function getBreedeValleySubs($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT s.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM suburbs s\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON s.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '97'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$suburbs = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t\t$suburb->setMunicipality($municipality);\n\t\t\t\t\t\t$suburb->setSuburbCode($row['suburb_code']);\n\t\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t\t$suburb->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$suburb->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$suburb->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\tarray_push($suburbs, $suburb);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $suburbs;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}",
"public function getKannalandSubs($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT s.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM suburbs s\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON s.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '110'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$suburbs = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t\t$suburb->setMunicipality($municipality);\n\t\t\t\t\t\t$suburb->setSuburbCode($row['suburb_code']);\n\t\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t\t$suburb->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$suburb->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$suburb->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\tarray_push($suburbs, $suburb);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $suburbs;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}",
"public function getCapeTownSubs($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT s.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM suburbs s\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON s.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '96'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$suburbs = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t\t$suburb->setMunicipality($municipality);\n\t\t\t\t\t\t$suburb->setSuburbCode($row['suburb_code']);\n\t\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t\t$suburb->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$suburb->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$suburb->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\tarray_push($suburbs, $suburb);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $suburbs;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}",
"public function getWitzenbergSubs($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT s.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM suburbs s\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON s.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '100'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$suburbs = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t\t$suburb->setMunicipality($municipality);\n\t\t\t\t\t\t$suburb->setSuburbCode($row['suburb_code']);\n\t\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t\t$suburb->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$suburb->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$suburb->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\tarray_push($suburbs, $suburb);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $suburbs;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}",
"public function getTheewaterskloofSubs($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT s.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM suburbs s\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON s.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '115'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$suburbs = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t\t$suburb->setMunicipality($municipality);\n\t\t\t\t\t\t$suburb->setSuburbCode($row['suburb_code']);\n\t\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t\t$suburb->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$suburb->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$suburb->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\tarray_push($suburbs, $suburb);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $suburbs;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}",
"public function getPrinceAlbertSubs($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT s.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM suburbs s\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON s.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '106'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$suburbs = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t\t$suburb->setMunicipality($municipality);\n\t\t\t\t\t\t$suburb->setSuburbCode($row['suburb_code']);\n\t\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t\t$suburb->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$suburb->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$suburb->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\tarray_push($suburbs, $suburb);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $suburbs;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}",
"public function getKnysnaSubs($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT s.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM suburbs s\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON s.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '111'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$suburbs = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t\t$suburb->setMunicipality($municipality);\n\t\t\t\t\t\t$suburb->setSuburbCode($row['suburb_code']);\n\t\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t\t$suburb->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$suburb->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$suburb->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\tarray_push($suburbs, $suburb);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $suburbs;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}",
"public function getStellenboschSubs($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT s.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM suburbs s\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON s.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '99'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$suburbs = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t\t$suburb->setMunicipality($municipality);\n\t\t\t\t\t\t$suburb->setSuburbCode($row['suburb_code']);\n\t\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t\t$suburb->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$suburb->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$suburb->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\tarray_push($suburbs, $suburb);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $suburbs;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}",
"public function getOudtshoornSubs($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT s.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM suburbs s\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON s.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '102'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$suburbs = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t\t$suburb->setMunicipality($municipality);\n\t\t\t\t\t\t$suburb->setSuburbCode($row['suburb_code']);\n\t\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t\t$suburb->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$suburb->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$suburb->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\tarray_push($suburbs, $suburb);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $suburbs;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}",
"public function getLaingsburgSubs($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT s.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM suburbs s\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON s.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '105'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$suburbs = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t\t$suburb->setMunicipality($municipality);\n\t\t\t\t\t\t$suburb->setSuburbCode($row['suburb_code']);\n\t\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t\t$suburb->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$suburb->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$suburb->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\tarray_push($suburbs, $suburb);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $suburbs;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}",
"public function getCederbergSubs($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT s.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM suburbs s\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON s.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '117'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$suburbs = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t\t$suburb->setMunicipality($municipality);\n\t\t\t\t\t\t$suburb->setSuburbCode($row['suburb_code']);\n\t\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t\t$suburb->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$suburb->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$suburb->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\tarray_push($suburbs, $suburb);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $suburbs;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}",
"public function getLangebergSubs($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT s.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM suburbs s\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON s.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '104'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$suburbs = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t\t$suburb->setMunicipality($municipality);\n\t\t\t\t\t\t$suburb->setSuburbCode($row['suburb_code']);\n\t\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t\t$suburb->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$suburb->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$suburb->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\tarray_push($suburbs, $suburb);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $suburbs;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}",
"public function getMatzikamaSubs($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT s.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM suburbs s\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON s.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '118'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$suburbs = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t\t$suburb->setMunicipality($municipality);\n\t\t\t\t\t\t$suburb->setSuburbCode($row['suburb_code']);\n\t\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t\t$suburb->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$suburb->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$suburb->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\tarray_push($suburbs, $suburb);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $suburbs;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}",
"public function barang()\n {\n return $this->hasMany('Kawani\\Barang');\n }",
"public function getSwartlandSubs($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT s.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM suburbs s\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON s.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '120'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$suburbs = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t\t$suburb->setMunicipality($municipality);\n\t\t\t\t\t\t$suburb->setSuburbCode($row['suburb_code']);\n\t\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t\t$suburb->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$suburb->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$suburb->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\tarray_push($suburbs, $suburb);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $suburbs;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}",
"public function business( ) {\n return $this->hasMany('App\\Http\\Models\\Business', 'industry_id', 'id');\n }",
"public function getGeorgeSubs($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT s.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM suburbs s\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON s.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '108'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$suburbs = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t\t$suburb->setMunicipality($municipality);\n\t\t\t\t\t\t$suburb->setSuburbCode($row['suburb_code']);\n\t\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t\t$suburb->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$suburb->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$suburb->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\tarray_push($suburbs, $suburb);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $suburbs;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}",
"public function getSwellendamSubs($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT s.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM suburbs s\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON s.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '114'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$suburbs = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t\t$suburb->setMunicipality($municipality);\n\t\t\t\t\t\t$suburb->setSuburbCode($row['suburb_code']);\n\t\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t\t$suburb->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$suburb->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$suburb->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\tarray_push($suburbs, $suburb);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $suburbs;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}",
"public function bairros() {\n return $this->belongsToMany(Bairro::class, 'bairros', 'vizinho_id', 'bairro_id');\n }",
"public function getOverstrandSubs($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT s.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM suburbs s\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON s.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '113'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$suburbs = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t\t$suburb->setMunicipality($municipality);\n\t\t\t\t\t\t$suburb->setSuburbCode($row['suburb_code']);\n\t\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t\t$suburb->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$suburb->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$suburb->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\tarray_push($suburbs, $suburb);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $suburbs;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}",
"function getAllBands() {\n return $this->Band->getAllBands();\n }",
"public function business( ) {\n return $this->hasMany('App\\Http\\Models\\Business', 'town_id', 'id');\n }",
"public function getHessequaSubs($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT s.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM suburbs s\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON s.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '109'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$suburbs = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t\t$suburb->setMunicipality($municipality);\n\t\t\t\t\t\t$suburb->setSuburbCode($row['suburb_code']);\n\t\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t\t$suburb->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$suburb->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$suburb->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\tarray_push($suburbs, $suburb);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $suburbs;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}",
"public function getDrakensteinSubs($municipality_id){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT s.*, m.municipality_name, m.municipality_code, \n\t\t\t\t\t\t m.municipality_id FROM suburbs s\n\t\t\t\t\t\t LEFT JOIN municipalities m\n\t\t\t\t\t\t ON s.municipality_id = m.municipality_id\n\t\t\t\t\t\t WHERE m.municipality_id = '$municipality_id'\n\t\t\t\t\t\t AND m.municipality_id = '98'\";\n\t\t\t\t$result = $this->conn->query($query);\n\t\t\t\t$suburbs = array();\n\t\t\t\t\tforeach($result as $row){\n\t\t\t\t\t\t//create municipality object\n\t\t\t\t\t\t$municipality = new Municipality();\n\t\t\t\t\t\t$municipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t\t$municipality->setMunicipalityCode($row['municipality_code']);\n\t\t\t\t\t\t$municipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create city object\n\t\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t\t$suburb->setMunicipality($municipality);\n\t\t\t\t\t\t$suburb->setSuburbCode($row['suburb_code']);\n\t\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t\t$suburb->setTotalPropertyForSale($row['total_property_forsale']);\n\t\t\t\t\t\t$suburb->setTotalPropertyToRent($row['total_property_torent']);\n\t\t\t\t\t\t$suburb->setTotalPropertyOnShow($row['total_property_onshow']);\n\t\t\t\t\t\t\n\t\t\t\t\t\tarray_push($suburbs, $suburb);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $suburbs;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}"
] |
[
"0.6483167",
"0.6466496",
"0.6435651",
"0.63979495",
"0.6276596",
"0.62761515",
"0.6237022",
"0.6182817",
"0.6075157",
"0.60200554",
"0.6011581",
"0.59736764",
"0.5968806",
"0.595361",
"0.5946281",
"0.593566",
"0.5825023",
"0.5803349",
"0.5773076",
"0.57726103",
"0.57374084",
"0.57260966",
"0.57195437",
"0.5709129",
"0.56860036",
"0.56809956",
"0.5674778",
"0.5609678",
"0.5599093",
"0.5542867"
] |
0.74584943
|
0
|
Get mass payment instruction collection resource.
|
public function massPayment(): Collection\MassPayment
{
return $this->client->resource('Collection.MassPayment', $this->getVersion());
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function instructions()\n {\n return $this->hasMany('App\\Instruction');\n }",
"public function collectionAction()\n {\n $parameters = $this->getRequest()->getParams();\n $szOrderID = $parameters['OrderID'];\n $szCrossReference = $parameters['CrossReference'];\n \n $order = Mage::getModel('sales/order')->loadByIncrementId((int)$szOrderID);\n $payment = $order->getPayment();\n \n $result = Mage::getModel('paymentsensegateway/direct')->pysCollection($payment, $szOrderID, $szCrossReference);\n \n return $this->getResponse()->setBody($result);\n }",
"public function instructions()\n {\n $payloads = [\n 'code' => $this->channelCode,\n ];\n\n return $this->request('get', 'payment/instruction', $payloads);\n }",
"public function listsInstructionget()\r\n {\r\n $response = Instruction::all();\r\n return response()->json($response,200);\r\n }",
"public function getInvitationCollection() {\n\t\tif (!$this->hasInvitationCollection()) {\n\t\t\t/** @var Df_Invitation_Model_Resource_Invitation_Collection $collection */\n\t\t\t$collection = Df_Invitation_Model_Invitation::c();\n\t\t\t$collection->addOrder('invitation_id', Varien_Data_Collection::SORT_ORDER_DESC);\n\t\t\t$collection->loadByCustomerId(rm_session_customer()->getCustomerId());\n\t\t\t$this\n\t\t\t\t->setData(\n\t\t\t\t\t'invitation_collection'\n\t\t\t\t\t,$collection\n\t\t\t\t)\n\t\t\t;\n\t\t}\n\t\treturn $this->_getData('invitation_collection');\n\t}",
"public function index()\n {\n $invpisums = InvPiSum::getAllInvPiSum();\n return InvPiSumResource::collection($invpisums);\n }",
"public function getRmaCollection()\n {\n $id = $this->getRequest()->getParam('id');\n return $this->requestFactory->create()->load($id);\n }",
"public function memberIcons()\n {\n return $this->hasMany('App\\Models\\MemberIcons');\n }",
"public function index()\n {\n $pending_payments = PendingPayment::latest()->get();\n return PendingPaymentResource::collection($pending_payments);\n }",
"public function getInstructions()\n {\n return $this->_instructions;\n }",
"public function get()\n {\n return \"/V1/creditmemos\";\n }",
"public function getDisclosure()\n {\n return $this->hasOne(MsDisclosure::className(), ['id' => 'disclosure_id']);\n }",
"public function getInstructions()\n {\n return $this->instructions;\n }",
"public function Icon()\n {\n return $this->hasOne('App\\Icons', 'id', 'icon_id');\n }",
"public function creditcard()\n {\n return $this->hasMany('App\\Models\\Invoice');\n }",
"public function getICMS()\n {\n return $this->iCMS;\n }",
"protected function getNotification_MethodCollectionService()\n {\n $this->services['notification.method_collection'] = $instance = new \\phpbb\\di\\service_collection($this);\n\n $instance->add('notification.method.board');\n $instance->add('notification.method.email');\n $instance->add('notification.method.jabber');\n\n return $instance;\n }",
"public function inscripciones(){\n return $this->hasMany('App\\Models\\Inscripcion');\n }",
"public function items()\n {\n return $this->hasMany(InvoiceItem::class, ['InvoiceAuto', 'InvoiceNumber'], ['InvoiceAuto', 'InvoiceNumber']);\n }",
"public function collection()\n {\n $list = Expenditure::all();\n\n// dd($list);\n\n return $list;\n }",
"function _getInstalmentCharge($method) {\r\n\treturn $method->hellaspay_instalments_charge;\r\n }",
"function getInstruction($id){\n\t\t\t$str_query=\"SELECT instruction FROM cuisine_instruction WHERE recipe_id='$id'\";\n\t\t\treturn $this->query($str_query);\n\t\t}",
"public function getInstruction()\n {\n return $this->instruction;\n }",
"protected function getExportCollection()\n {\n // crea connessione mongodb\n $connectionString = 'mongodb://' . \n $this->mongoParam['username'] . ':' . $this->mongoParam['password'] . '@' .\n $this->mongoParam['server'] . '/' . $this->mongoParam['db'];\n $connection = new MongoClient($connectionString);\n // apre la collection\n $collection = $connection->selectCollection($this->mongoParam['db'], ChunkExportHandler::EXPORT_COLLECTION);\n \n return $collection;\n }",
"public function get_in12_requests()\n\t{\n\t return $this->db->select('request_cid,request_acc_number,request_summ,request_quote,request_id,request_comment,request_type,request_wallet')\n\t\t->from('pamm_requests')\n\t\t->where('request_status', '0')\n\t\t->where('request_urgent', '0')\n\t\t->where(\"request_type IN ('1','2')\")\n\t\t->order_by('request_type', 'ASC')\t\n\t\t->get()->result();\n\n\t}",
"public function getCollection();",
"public function getCollection();",
"public function getCollection();",
"public function getCollection();",
"public function getPaymentRequest()\n {\n $my_groups_id = Group::where('user_id',auth()->user()->id)->pluck('id');\n $requests_collection = BankTransferRequirement::whereIn('group_id', $my_groups_id);\n\n $requests_count = $requests_collection->count();\n $requests = $requests_collection->orderBy('created_at', 'DESC')->get();\n\n return response()->json([\n 'items' => $requests,\n 'message' => __('messages.fetch_data_msg'),\n 'status' => true\n ]);\n\n }"
] |
[
"0.53636783",
"0.49809328",
"0.49216893",
"0.4903647",
"0.48301238",
"0.47805732",
"0.46769577",
"0.46471086",
"0.46307573",
"0.4621992",
"0.4603182",
"0.4581799",
"0.45389763",
"0.45148045",
"0.44599274",
"0.44469136",
"0.44396597",
"0.44358915",
"0.44284463",
"0.4417286",
"0.44141933",
"0.4404705",
"0.4391604",
"0.43820956",
"0.43790326",
"0.43704635",
"0.43704635",
"0.43704635",
"0.43704635",
"0.43612534"
] |
0.6598977
|
0
|
Check if the job has been added from outside of Disqontrol Jobs added from the outside don't have time information job creation time and job lifetime.
|
private function jobHasBeenAddedFromOutside(JobInterface $job)
{
$jobHasNoLifetime = empty($job->getJobLifetime());
$jobHasNoCreationTime = empty($job->getCreationTime());
return ($jobHasNoLifetime && $jobHasNoCreationTime);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function hasJob(): bool;",
"private function check()\n {\n foreach ($this->scheduler->getQueuedJobs() as $job) {\n if ($job->isDue(new DateTime()) === true) {\n\n $this->executeIfNotOverlapped($job);\n }\n }\n }",
"public function hasLastTime(){\n return $this->_has(18);\n }",
"public function hasCreatetime(){\n return $this->_has(1);\n }",
"function tripal_jobs_check_running () {\n // iterate through each job that has not ended\n // and see if it is still running. If it is not\n // running but does not have an end_time then\n // set the end time and set the status to 'Error'\n $sql = \"SELECT * FROM {tripal_jobs} TJ \".\n \"WHERE TJ.end_time IS NULL and NOT TJ.start_time IS NULL \";\n $jobs = db_query($sql);\n while($job = db_fetch_object($jobs)){\n if($job->pid and posix_kill($job->pid, 0)) {\n // the job is still running so let it go\n\t\t // we return 1 to indicate that a job is running\n\t\t print \"Job is still running (pid $job->pid)\\n\";\n\t\t return 1;\n } else {\n\t // the job is not running so terminate it\n\t $record = new stdClass();\n $record->job_id = $job->job_id;\n\t $record->end_time = time();\n $record->status = 'Error';\n\t $record->error_msg = 'Job has terminated unexpectedly.';\n drupal_write_record('tripal_jobs',$record,'job_id');\n\t }\n }\n // return 1 to indicate that no jobs are currently running.\n return 0;\n}",
"public static function is_in_progress(): bool {\n return Simply_Static\\Options::instance()->get('archive_start_time')\n && !Simply_Static\\Options::instance()->get('archive_end_time');\n }",
"private function checkEventDateNotDue(){\n $event = Event::find($this->id);\n $now = Carbon::now();\n \n $startTime = Carbon::createFromFormat('Y-m-d H:i:s', $event->start_time);\n return $startTime->gt($now);\n }",
"public function checkTimeEnd(): bool;",
"public function hasTime(){\n return $this->_has(3);\n }",
"public function hasEndtime(){\n return $this->_has(8);\n }",
"public function hasCTime(){\n return $this->_has(6);\n }",
"public function hasLocalEndTime(){\n return $this->_has(5);\n }",
"public function needUpdate()\n\t{\n\t\treturn ($this->getLastUpdate() == null || time() - $this->getLastUpdate()->format('U') > 1 * 60);\n\t}",
"private function check_meet_creation_limit()\n {\n $recent_shackmeet_count = count($this->load_recent_shackmeet_count());\n \n return $recent_shackmeet_count < 2;\n }",
"public function hasLocalStartTime(){\n return $this->_has(4);\n }",
"public function checkTimestamps()\n {\n return false;\n }",
"public function hasJobs()\n {\n if($this->numJobs() > 0)\n {\n return true;\n }\n return false;\n }",
"public function hasTimeLimitReached(): bool;",
"public function hasThreadTs(): bool\n {\n return ! empty($this->threadTS);\n }",
"public function hasRelivetime(){\n return $this->_has(3);\n }",
"public function hasTimeEvents(){\n return $this->_has(8);\n }",
"public function hasLockTime()\n {\n return $this->lock_time !== null;\n }",
"static function isExistsIncompleteJobOfType( $jobName ) {\n global $wpdb;\n $resultset = $wpdb->get_results($wpdb->prepare(\n \"SELECT job_id\n FROM wp_lh_jobs\n WHERE classname = %s \n AND status IN ( %s, %s )\", $jobName, self::STATUS_SUBMITTED, self::STATUS_PROCESSING ));\n\n return ! empty( $resultset ); \n }",
"public static function record_still_alive() {\n\t\n\t\tglobal $updraftplus;\n\t\n\t\t// Update the record of maximum detected runtime on each run\n\t\t$time_passed = $updraftplus->jobdata_get('run_times');\n\t\tif (!is_array($time_passed)) $time_passed = array();\n\n\t\t$time_this_run = microtime(true)-$updraftplus->opened_log_time;\n\t\t$time_passed[$updraftplus->current_resumption] = $time_this_run;\n\t\t$updraftplus->jobdata_set('run_times', $time_passed);\n\n\t\t$resume_interval = $updraftplus->jobdata_get('resume_interval');\n\t\tif ($time_this_run + 30 > $resume_interval) {\n\t\t\t$new_interval = ceil($time_this_run + 30);\n\t\t\tset_site_transient('updraft_initial_resume_interval', (int) $new_interval, 8*86400);\n\t\t\t$updraftplus->log(\"The time we have been running (\".round($time_this_run, 1).\") is approaching the resumption interval ($resume_interval) - increasing resumption interval to $new_interval\");\n\t\t\t$updraftplus->jobdata_set('resume_interval', $new_interval);\n\t\t}\n\n\t}",
"public function hasTime(){\n return $this->_has(6);\n }",
"public function wasLockTimeout() {\n\t\treturn false;\n\t}",
"private function checkIfTimeLeft()\r\n {\r\n if($this->expireDateTime < strtotime(\"now\"))\r\n {\r\n generic::successEncDisplay(\"Emails have been sent out, however, there are a number of emails to be sent, and the server run out of time.\");\r\n return false;\r\n }\r\n\r\n return true;\r\n }",
"public function isInProgress()\n {\n $currentTime = time();\n\n if (strtotime($this->eventdatetime->starttime) > $currentTime) {\n //It has not started yet.\n return false;\n }\n\n if (strtotime($this->eventdatetime->endtime) < $currentTime) {\n //It already finished.\n return false;\n }\n\n return false;\n }",
"public function hasLogintime(){\n return $this->_has(2);\n }",
"public function hasTime() {\n\n return $this->getDateType()!==DateTime::DATE;\n\n }"
] |
[
"0.61265385",
"0.6123369",
"0.602875",
"0.5927492",
"0.5835899",
"0.5820667",
"0.57265776",
"0.56950593",
"0.5676883",
"0.56639373",
"0.5655669",
"0.56393445",
"0.56380486",
"0.5618106",
"0.5614056",
"0.560991",
"0.56070477",
"0.5583603",
"0.5563151",
"0.5551918",
"0.5550474",
"0.5541618",
"0.55221266",
"0.55207247",
"0.5520676",
"0.5510213",
"0.55053747",
"0.5487439",
"0.54868376",
"0.5446568"
] |
0.6895008
|
0
|
Add missing job lifetime and job creation time If the job has been added through other means than the Disqontrol producer, it is missing time metadata. Add it here. This is a mirror of the process in the producer
|
private function addMissingJobTimeData(JobInterface $job)
{
$queue = $job->getQueue();
$jobLifetime = $this->config->getJobLifetime($queue);
$creationTime = time();
$job->setCreationTime($creationTime);
$job->setJobLifetime($jobLifetime);
$this->logger->debug(
Msg::addedJobTimeData($job->getId(), $creationTime, $jobLifetime, $job->getOriginalId())
);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function addNewJobOpo()\n {\n }",
"function efi_create_job($job_id, $extra_job_data = array()){\n \n global $order_date, $delivery_date, $debug;\n \n $base_job_data['job']=$job_id;\n $base_job_data['customer']='SINALITE';\n $base_job_data['description']='SINALITE PRESSRUN '.$job_id;\n $base_job_data['description2']='Generated by OLP';\n $base_job_data['jobType']=5013;\n $base_job_data['adminStatus']='O';\n $base_job_data['shipVia']=1;\n $base_job_data['terms']=1;\n $base_job_data['dateSetup']=$order_date;\n $base_job_data['timeSetUp']=$order_date;\n $base_job_data['poNum']= 'SL'.$job_id;\n $base_job_data['promiseDate']=$delivery_date;\n $base_job_data['promiseTime']=$delivery_date;\n $base_job_data['scheduledShipDate']=$delivery_date;\n $base_job_data['priceList']=1;\n $base_job_data['oversMethod']=1;\n $base_job_data['shipInNameOf']=1;\n //$job_data['numbersGuaranteed']=\n //$job_data['convertingToJob']=\n //$job_data['paceConnectOrderID']=1260;\n //$job_data['paceConnectUserId']=65;\n $base_job_data['comboJobPercentageCalculationType']=1;\n //$base_job_data['altCurrency']=\"USD\";\n //$base_job_data['altCurrencyRate']=1.14159;\n //$base_job_data['comboTotal']=10000;\n //$base_job_data['totalPriceAllParts']=215000.000000;\n $base_job_data['readyToSchedule']=1;\n \n // CAUTION duplicate keys in $extra_job_data will overwrite $base_job_data\n $job_data = array_merge($base_job_data, $extra_job_data);\n\n //there could be more, added from the function args\n \n $job = new CreateObjectHelper();\n\n try \n {\n $new_job = $job->createObject('job', $job_data, 'createJob');\n if($debug){\n show_all($new_job);\n }\n return true; \n }\n catch (Exception $exc) \n {\n //probably job exists\n return $exc->getMessage();\n }\n}",
"function rlip_schedule_add_job($data) {\n global $DB, $USER;\n\n //calculate the next run time, for use in both records\n $nextruntime = (int)(time() + rlip_schedule_period_minutes($data['period']) * 60);\n\n $userid = isset($data['userid']) ? $data['userid'] : $USER->id;\n $data['timemodified'] = time();\n if (isset($data['submitbutton'])) { // formslib!\n unset($data['submitbutton']);\n }\n $ipjob = new stdClass;\n $ipjob->userid = $userid;\n $ipjob->plugin = $data['plugin'];\n $ipjob->config = serialize($data);\n\n //store as a redundant copy in order to prevent elis task strangeness\n $ipjob->nextruntime = $nextruntime;\n\n if (!empty($data['id'])) {\n $ipjob->id = $data['id'];\n $DB->update_record(RLIP_SCHEDULE_TABLE, $ipjob);\n // Must delete any existing task records for the old schedule\n $taskname = 'ipjob_'. $ipjob->id;\n $DB->delete_records('elis_scheduled_tasks', array('taskname' => $taskname));\n } else {\n $ipjob->id = $DB->insert_record(RLIP_SCHEDULE_TABLE, $ipjob);\n }\n\n $task = new stdClass;\n $task->plugin = 'block_rlip';\n $task->taskname = 'ipjob_'. $ipjob->id;\n $task->callfile = '/blocks/rlip/lib.php';\n $task->callfunction = serialize('run_ipjob'); // TBD\n $task->lastruntime = 0;\n $task->blocking = 0;\n $task->minute = 0;\n $task->hour = 0;\n $task->day = '*';\n $task->month = '*';\n $task->dayofweek = '*';\n $task->timezone = 0;\n $task->enddate = null;\n $task->runsremaining = null;\n $task->nextruntime = $nextruntime;\n return $DB->insert_record('elis_scheduled_tasks', $task);\n}",
"protected function addJobToPersistentQueue($jobName, $data, $priority = 0, QueueControl $parent = null, array $metadata = array())\n {\n\n //Verify job has not been added to persistent queue\n\n $payloadSerialized = serialize($data);\n\n $md5 = md5($payloadSerialized.$jobName);\n\n $queueJob = $this->entityManager->getRepository('MmoreramerinoGearmanBundle:QueueControl')->findOneByHash($md5);\n\n //Assumes A failure from the begining... I am the pesismist type of programmer :-P\n $result = array('action' => self::ACTION_FAILED );\n\n if (!$queueJob) {\n $queueStatus = $this->getQueueStatusReference(self::STATUS_NEW);\n $queueJob = new QueueControl();\n $queueJob->setFunctionName($jobName);\n $queueJob->setPriority($priority);\n $queueJob->setHash($md5);\n $queueJob->setData($data);\n $queueJob->setQueueStatus($queueStatus);\n\n foreach ($this->expectedMetadata as $property) {\n if (isset($metadata[$property])) {\n $queueJob->setField($property, $metadata[$property]);\n }\n }\n }\n\n if ($parent !== null && $queueJob->getParent() === null ) {\n $queueJob->setParent($parent);\n $parent->addChild($queueJob);\n $this->entityManager->persist($parent);\n\n }\n //If parent exists, set it to waiting state. Since doctrine takes care of changes,\n //A transaction maybe?\n try {\n\n\n $this->entityManager->persist($queueJob);\n $this->entityManager->flush();\n\n } catch (\\Exception $e) {\n //Fire Events\n throw new $e;\n\n }\n\n return $queueJob;\n\n }",
"public function created(Job $job)\n {\n //\n }",
"public function testComDayCqDamCoreImplMissingMetadataNotificationJob()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.day.cq.dam.core.impl.MissingMetadataNotificationJob';\n\n $crawler = $client->request('POST', $path);\n }",
"public function populateTimestamp()\n {\n $this->exists = true;\n $this->timestamp = 1;\n }",
"public function getNextQueuedJob() {\n \t}",
"function PKG_addJob($client,$packageName,$priority,$params)\n{\n\tPKG_addStatusJob($client,$packageName,$priority,$params,\"waiting\");\n}",
"public function __construct()\n {\n $this->job_class = OpportunityDetachedNotificationJob::class;\n $this->queue = ['QueueName' => config('queue.queue_lanes.OpportunityDetachedNotification', false)];\n parent::__construct();\n }",
"public function addNormalJobToPersistentQueue($jobName, $data, QueueControl $parent = null, array $metadata = array())\n {\n return $this->addJobToPersistentQueue($jobName, $data, self::PRIORITY_NORMAL, $parent, $metadata);\n }",
"public function pushOn($queue, $job, $data = '');",
"public function testQueueBuilding()\n {\n\n $contract = $this->getScenarioContract();\n $collection = $this->getScenarioCollection();\n\n $probFactory = new \\CsCannon\\MetadataProbeFactory();\n\n $probFactory->populateLocal();\n $probe = $probFactory->getOrCreate($collection,$contract,'null');\n\n\n $this->assertInstanceOf(\\CsCannon\\MetadataProbe::class,$probe,'Could not laod prob');\n\n\n $erc721_3 = \\CsCannon\\Blockchains\\Ethereum\\Interfaces\\ERC721::init(3);\n $erc721_4 = \\CsCannon\\Blockchains\\Ethereum\\Interfaces\\ERC721::init(4);\n $erc721_1 = \\CsCannon\\Blockchains\\Ethereum\\Interfaces\\ERC721::init(1); //this should exist already\n\n $probe->queue($erc721_3);\n\n // $probe->queue($erc721_3,$erc721_4,$erc721_1);\n while($probe->executeQueue()) {\n\n sleep(1);\n\n\n }\n\n\n }",
"public function initialize()\n\t{\n\t // attributes\n\t\t$this->setName('batch_job_lock');\n\t\t$this->setPhpName('BatchJobLock');\n\t\t$this->setClassname('BatchJobLock');\n\t\t$this->setPackage('Core');\n\t\t$this->setUseIdGenerator(false);\n\t\t// columns\n\t\t$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);\n\t\t$this->addColumn('JOB_TYPE', 'JobType', 'INTEGER', false, null, null);\n\t\t$this->addColumn('JOB_SUB_TYPE', 'JobSubType', 'INTEGER', false, null, null);\n\t\t$this->addColumn('OBJECT_ID', 'ObjectId', 'VARCHAR', false, 20, '');\n\t\t$this->addColumn('OBJECT_TYPE', 'ObjectType', 'INTEGER', false, null, null);\n\t\t$this->addColumn('ESTIMATED_EFFORT', 'EstimatedEffort', 'BIGINT', false, null, null);\n\t\t$this->addColumn('STATUS', 'Status', 'INTEGER', false, null, null);\n\t\t$this->addColumn('START_AT', 'StartAt', 'TIMESTAMP', false, null, null);\n\t\t$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);\n\t\t$this->addColumn('PRIORITY', 'Priority', 'TINYINT', false, null, null);\n\t\t$this->addColumn('URGENCY', 'Urgency', 'TINYINT', false, null, null);\n\t\t$this->addColumn('ENTRY_ID', 'EntryId', 'VARCHAR', false, 20, '');\n\t\t$this->addColumn('PARTNER_ID', 'PartnerId', 'INTEGER', false, null, 0);\n\t\t$this->addColumn('SCHEDULER_ID', 'SchedulerId', 'INTEGER', false, null, null);\n\t\t$this->addColumn('WORKER_ID', 'WorkerId', 'INTEGER', false, null, null);\n\t\t$this->addColumn('BATCH_INDEX', 'BatchIndex', 'INTEGER', false, null, null);\n\t\t$this->addColumn('EXPIRATION', 'Expiration', 'TIMESTAMP', false, null, null);\n\t\t$this->addColumn('EXECUTION_ATTEMPTS', 'ExecutionAttempts', 'TINYINT', false, null, null);\n\t\t$this->addColumn('VERSION', 'Version', 'INTEGER', false, null, null);\n\t\t$this->addColumn('DC', 'Dc', 'INTEGER', false, null, null);\n\t\t$this->addForeignKey('BATCH_JOB_ID', 'BatchJobId', 'INTEGER', 'batch_job_sep', 'ID', false, null, null);\n\t\t$this->addColumn('CUSTOM_DATA', 'CustomData', 'LONGVARCHAR', false, null, null);\n\t\t// validators\n\t}",
"public function scheduleDelayedJob(array $data) {\n\t\t$this->redis->zAdd('lolli:gaw:mainQueue', $data['time'], json_encode($data));\n\t}",
"public function testReserveQueueJob()\n {\n $queueJobTest1 = new TestQueueJob('price', 'ShopwarePriceImport');\n\n $this->queue->enqueue($queueJobTest1);\n $result = $this->queue->reserve();\n\n $this->assertInstanceOf(Job::class, $result);\n $this->assertTrue($result->isReserved(Queue::EXPIRATION_TIME));\n $this->assertCount(1, $this->queueStorage->queue);\n }",
"public function laterOn($queue, $delay, $job, $data = '');",
"public function add() {\n $this->out('CakePHP Queue Example task.');\n $this->hr();\n $this->out('This is a very simple example of a QueueTask.');\n $this->out('I will now add an example Job into the Queue.');\n $this->out('This job will only produce some console output on the worker that it runs on.');\n $this->out(' ');\n $this->out('To run a Worker use:');\n $this->out('\tbin/cake queue runworker');\n $this->out(' ');\n $this->out('You can find the sourcecode of this task in: ');\n $this->out(__FILE__);\n $this->out(' ');\n\n //$options = getopt('',['id:']);\n /*\n * Adding a task of type 'example' with no additionally passed data\n */\n //if ($this->QueuedJobs->createJob('RemittanceApi', ['id'=>4033, 'batch_id'=>'58e44de0f33a7'])) {\n if ($this->QueuedJobs->createJob('RemittanceApi', null)) {\n $this->out('OK, job created, now run the worker');\n } else {\n $this->err('Could not create Job');\n }\n }",
"public function testJobGetAllJobsLifetimeStatistics()\n {\n\n }",
"public function initJob(): void\n {\n mkdir($this->jobDirectory, 0777, true);\n $this->storeJobStatus('configuration', $this->config);\n }",
"public function lockJob() {\n \t\t//structure id,jobId,serverId (job id is unique entry)\n\n \t}",
"public function testReservingReservedQueueJob()\n {\n $queueJobTest1 = new TestQueueJob('price', 'ShopwarePriceImport');\n $queueJobTest2 = new TestQueueJob('product', 'ShopwareProductExport');\n\n $this->queue->enqueue($queueJobTest1);\n $this->queue->enqueue($queueJobTest2);\n $this->queue->reserve();\n $result = $this->queue->reserve();\n\n $this->assertNull($result);\n $this->assertCount(2, $this->queueStorage->queue);\n }",
"static function addDailyScheduledJob( $classname, $params, $time ) {\n global $wpdb;\n if (false === $wpdb->insert(\"job_scheduler\", \n array( 'classname' => $classname, \n 'repeat_daily_at' => $time,\n 'active_yn' => 'Y' ), \n array( '%s', '%s', '%s' ))) {\n error_log($wpdb->last_error.\" executing sql: \".$wpdb->last_query);\n throw new DatabaseException( $wpdb->last_error );\n }\n\n $jobId = $wpdb->insert_id;\n foreach( $params as $jobParamKey => $jobParamValue ) {\n if (false === $wpdb->insert(\"job_scheduler_param\", \n array( 'job_id' => $jobId, 'name' => $jobParamKey, 'value' => $jobParamValue ), \n array( '%d', '%s', '%s' ))) {\n error_log($wpdb->last_error.\" executing sql: \".$wpdb->last_query);\n throw new DatabaseException( $wpdb->last_error );\n }\n }\n return $jobId;\n }",
"public function addHighJobToPersistentQueue($jobName, $data, QueueControl $parent = null, array $metadata = array())\n {\n return $this->addJobToPersistentQueue($jobName, $data, self::PRIORITY_HIGH, $parent, $metadata);\n }",
"public function addQueueLog($pid,$action_description,$cron_send_email_on,$cron_send_email_on_field,$cron_repeat_for,$cron_queue_expiration_date,$cron_queue_expiration_date_field){\n #Add logs\n $scheduled_email = \"\";\n if($cron_send_email_on == \"now\"){\n $scheduled_email = \"Send \".$cron_send_email_on.\"\";\n }else if($cron_send_email_on == \"date\"){\n $scheduled_email = \"Send on \".$cron_send_email_on;\n }else if($cron_send_email_on == \"calc\"){\n $scheduled_email = \"Send on condition\";\n }\n if($cron_send_email_on_field != \"\"){\n $scheduled_email .= \": \".$cron_send_email_on_field.\"\";\n }\n $never = false;\n if ($cron_repeat_for != \"\" && $cron_repeat_for != \"0\") {\n if($cron_repeat_for == 1){\n $scheduled_email .= \"<br><br>Repeat every day\";\n }else{\n $scheduled_email .= \"<br><br>Repeat every \" . $cron_repeat_for . \" days\";\n }\n }\n if ($cron_queue_expiration_date != \"\" && $cron_queue_expiration_date != null) {\n $scheduled_email .= \" \";\n if ($cron_queue_expiration_date == \"cond\") {\n $scheduled_email .= \"<br><br>Expires on condition: \";\n }else if ($cron_queue_expiration_date == \"date\") {\n $scheduled_email .= \"<br><br> Expires on: \";\n } else {\n $scheduled_email .= \"<br><br><b>Never</b> Expires\";\n $never = true;\n }\n }\n if ($cron_queue_expiration_date_field != \"\" && !$never) {\n $scheduled_email .= $cron_queue_expiration_date_field . \"\";\n }\n\n $changes_made = $scheduled_email;\n \\REDCap::logEvent($action_description,$changes_made,null,null,null,$pid);\n }",
"public function ensurePublishJob()\n {\n // Can't clear a job while it's in the process of being completed.\n if ($this->owner->getIsPublishJobRunning()) {\n return;\n }\n\n if (!$this->owner->checkAddPermission()) {\n return;\n }\n\n $now = DBDatetime::now()->getTimestamp();\n // New desired date (if set).\n $desiredPublishTime = $this->owner->dbObject('DesiredPublishDate')->getTimestamp();\n $desiredUnPublishTime = $this->owner->dbObject('DesiredUnPublishDate')->getTimestamp();\n // Existing publish and un-publish date (if set).\n $publishTime = $this->owner->dbObject('PublishOnDate')->getTimestamp();\n $unPublishTime = $this->owner->dbObject('UnPublishOnDate')->getTimestamp();\n\n // If there is no PublishOnDate set, make sure we remove any existing Jobs.\n if (!$publishTime) {\n $this->clearPublishJob();\n }\n\n // If there is no desired publish time set, then there is nothing for us to change.\n if (!$desiredPublishTime) {\n return;\n }\n\n // You might have some additional requirements for allowing a PublishJob to be created.\n /** @var array|bool[] $canHavePublishJob */\n $canHavePublishJob = $this->owner->invokeWithExtensions('publishJobCanBeQueued');\n // One or more extensions said that this Object cannot have a PublishJob.\n if (in_array(false, $canHavePublishJob)) {\n return;\n }\n\n // The desired publish date is set after the desired un-publish date, and you require sequential dates.\n if ($this->owner->config()->get('enforce_sequential_dates')\n && $desiredUnPublishTime\n && $desiredPublishTime > $desiredUnPublishTime\n ) {\n return;\n }\n\n // The desired publish date is set after the active un-publish date, and you require sequential dates.\n if ($this->owner->config()->get('enforce_sequential_dates')\n && $unPublishTime\n && $desiredPublishTime > $unPublishTime\n ) {\n return;\n }\n\n // Check if there is a prior Publish Job.\n if ((int) $this->owner->PublishJobID !== 0) {\n $job = $this->owner->PublishJob();\n\n // If it's the same Publish Job, leave it be.\n if ($job\n && $job->exists()\n && DBDatetime::create()->setValue($job->StartAfter)->getTimestamp() === $desiredPublishTime\n ) {\n // Make sure our PublishOnDate is up to date.\n $this->updatePublishOnDate();\n\n return;\n }\n\n // Remove the old Publish Job.\n $this->owner->clearPublishJob();\n }\n\n $options = [];\n\n // If you have some extra options that you would like to pass to your Job, add them here.\n $this->owner->invokeWithExtensions('updatePublishTargetJobOptions', $options);\n\n // Do you want to use a different queue? You can define it at a DataObject level using this config. Your options\n // are: 1 (immediate), 2 (queued), 3 (large). See QueuedJob constants. Default is 2 (queued).\n $queueID = (int) $this->owner->config()->get('publish_target_job_queue_id');\n\n // Make sure the value set is valid, if it isn't, set back to default.\n if ($queueID === 0) {\n $queueID = null;\n }\n\n // Create a new job with the specified schedule. If publish time is in the past, run the Job immediately.\n // @todo There is a PR on QueuedJobs to use injectable. Should update this once that goes through.\n $jobTime = $desiredPublishTime > $now ? date('Y-m-d H:i:s', $desiredPublishTime) : null;\n $job = new PublishTargetJob($this->owner, $options);\n $this->owner->PublishJobID = Injector::inst()->get(QueuedJobService::class)\n ->queueJob($job, $jobTime, null, $queueID);\n\n // Make sure our PublishOnDate is up to date.\n $this->updatePublishOnDate();\n }",
"abstract public function makeJob();",
"abstract public function makeJob();",
"public function addJob($key, Job $value)\n {\n return parent::add($key, $value);\n }",
"public function recordJournalingStart();"
] |
[
"0.5874477",
"0.56350803",
"0.51359785",
"0.49857968",
"0.4972323",
"0.4966535",
"0.49646258",
"0.49221537",
"0.49197546",
"0.49111012",
"0.4904061",
"0.49034908",
"0.4859165",
"0.48370486",
"0.48364788",
"0.48303425",
"0.48259753",
"0.47437996",
"0.46861944",
"0.46843502",
"0.46399072",
"0.46313715",
"0.4628877",
"0.46156788",
"0.4614714",
"0.46123853",
"0.4588516",
"0.4588516",
"0.45750993",
"0.45698994"
] |
0.6223408
|
0
|
Get create form fields.
|
protected function getCreateFormFields()
{
return $this->formFields();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function getCreateFields()\n {\n\n return array\n (\n 'wbfsys_entity_tag' => array\n (\n 'vid',\n 'id_entity',\n 'id_tag',\n 'm_version',\n ),\n 'embed_tag' => array\n (\n 'name',\n 'access_key',\n 'id_lang',\n 'm_parent',\n 'description',\n ),\n 'wbfsys_tag' => array\n (\n 'name',\n 'access_key',\n 'id_lang',\n 'm_parent',\n 'description',\n ),\n\n );\n\n }",
"protected function createFormFields() {\n\t}",
"public function getFormFields()\n {\n return $this->form->getFields();\n }",
"public function getCreateFields()\n {\n\n return array\n (\n 'wbfsys_message_sendway' => array\n (\n 'id_message',\n 'id_repository',\n 'm_version',\n ),\n 'wbfsys_message_repository' => array\n (\n 'm_version',\n ),\n\n );\n\n }",
"public function getFields()\n {\n return $this->getForm()->getFields();\n }",
"public static function form_fields(){\n\n \treturn [\n [\n \t'id'=> 'description',\n \t'name'=> 'description', \n \t'desc'=> 'Description', \n \t'val'=>\tnull, \n \t'type'=> 'text',\n \t'maxlength'=> 255,\n \t'required'=> 'required',\n ],\n\n [\n \t'id'=> 'rate',\n \t'name'=> 'rate', \n \t'desc'=> 'Discount Rate', \n \t'val'=>\tnull, \n \t'type'=> 'number',\n \t'min'=> 0,\n \t'max'=> 100,\n \t'step'=> '0.01',\n \t'required'=> 'required',\n ],\n\n [\n \t'id'=> 'stat',\n \t'name'=> 'stat', \n \t'desc'=> 'isActive', \n \t'val'=>1, \n \t'type'=> 'checkbox',\n ],\n ];\n\n }",
"public function fields() {\n\t\tif( !$this->fields ) {\n\t\t\t$this->fields = new Form/Fields( $this->id );\n\t\t}//end if\n\t\treturn $this->fields;\n\t}",
"public function retrieveFormFields()\n {\n return $this->start()->uri(\"/api/form/field\")\n ->get()\n ->go();\n }",
"public function getFormFields() {\n $fields = array(\n 'shapes[]' => array(\n 'type' => 'select',\n 'multiplicate' => '5',\n 'values' => array(\n '-' => '-',\n 'cube' => 'cube',\n 'round' => 'round',\n )\n ),\n 'width[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Width'\n ),\n 'higth[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Higth'\n ),\n 'x_position[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'X position'\n ),\n 'y_position[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Y position'\n ),\n 'red[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Color red',\n ),\n 'green[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Color green',\n ),\n 'blue[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Color blue',\n ),\n 'size[]' => array(\n 'type' => 'text',\n 'multiplicate' => '1',\n 'label' => 'Size holst'\n ),\n 'enable[]' => array(\n 'type' => 'checkbox',\n 'multiplicate' => '5',\n 'label' => 'enable'\n )\n );\n return $fields;\n }",
"protected function fields()\n\t{\n\t\treturn array(\n\t\t\t# type will default to string, will be rendered as a normal text input\n\t\t\t'name' => array(\n\t\t\t\t'required' => true, # client is required to fill in this field\n\t\t\t),\n\n\t\t\t# use default submit button\n\t\t\t'submit' => true,\n\t\t);\n\t}",
"public function fieldCreate()\n\t{\n\t\t$fields=array();\n\t\tforeach($this->getTable()->result_array() as $row)\n\t\t{\n\t\t\tif($row['Extra']!=='auto_increment')\n\t\t\t{\n\t\t\t\t$fields[]=array(\n\t\t\t\t\t'field'=>$row['Field'],\n\t\t\t\t\t'max_length'=>preg_match('/varchar/',$row['Type']) ? (preg_replace('/[A-Za-z()]/','',$row['Type'])!=='' ? '\\'maxlength\\'=>'.preg_replace('/[A-Za-z()]/','',$row['Type']).',' : false) : false,\n\t\t\t\t\t'type'=>preg_match('/text/',$row['Type']) ? 'Area' : 'Field',\n\t\t\t\t\t'required'=>$row['Null']=='NO' ? true : false,\n\t\t\t\t\t'input'=>preg_match('/^(password|pass|passwd|passcode)$/i',$row['Field']) ? 'password' : 'text',\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn $fields;\n\t}",
"public static function fields()\n {\n return [\n 'name' => 'text',\n 'lastname' => 'text',\n 'password' => 'password',\n 'email' => 'email',\n 'github_username' => 'text',\n ];\n }",
"protected function getFormFields()\n {\n $fields = parent::getFormFields();\n\n $identity_field = TextField::create(\n UsernameOrEmailAuthenticator::IDENTITY,\n _t('AuthUsernameOrEmail.UsernameOrEmail', 'Username or Email')\n );\n\n if (!Security::config()->remember_username) {\n // Some browsers won't respect this attribute unless it's added to the form\n $this->setAttribute('autocomplete', 'off');\n $identity_field->setAttribute('autocomplete', 'off');\n }\n\n $fields->replaceField(\"Email\", $identity_field);\n\n return $fields;\n }",
"public function form_fields() {\n\t\treturn apply_filters( \"appthemes_{$this->box_id}_metabox_fields\", $this->form() );\n\t}",
"public function createFields()\n\t{\n\t\t$this->_formFields = $this->createModelFormFields();\n\t\treturn $this;\n\t}",
"public function getFormCustomFields(){\n\t}",
"public function getUsableFormFields()\n {\n $fields = array();\n\n // Get all form fields which can be used for MailChimp values\n $objFields = Database::getInstance()->prepare(\"SELECT id,name,label FROM tl_form_field WHERE pid=? AND (type=? OR type=? OR type=? OR type=? OR type=?) ORDER BY name ASC\")\n ->execute(Input::get('id'), 'text', 'hidden', 'select', 'radio', 'checkbox');\n\n $fields[] = '-';\n while ($objFields->next())\n {\n $k = $objFields->name;\n $v = $objFields->label;\n $v = strlen($v) ? $v.' ['.$k.']' : $k;\n $fields[$k] =$v;\n }\n\n return $fields;\n }",
"public function fields()\n {\n return [\n Text::make('Name')\n ->value($this->model->name),\n ];\n }",
"public static function getFields() {\n return array(\n new TextField( array(\n 'name' => 'name',\n 'public' => array(\n 'title' => 'Title',\n 'description' => 'The name of the link that the\n element will describe',\n ),\n ) ),\n new TextField( array(\n 'name' => 'blurb',\n 'public' => array(\n 'title' => 'Blurb',\n 'description' => 'Short blurb that can be displayed about\n the nature of the link',\n ),\n ) ),\n new TextField( array(\n 'name' => 'image',\n 'public' => array(\n 'title' => 'Image',\n 'description' => 'The image to be dispalyed on the front.',\n ),\n ) ),\n new TextField( array(\n 'name' => 'link',\n 'public' => array(\n 'title' => 'Link',\n 'description' => 'The actual link clicking the element will\n result in.',\n ),\n ) ),\n );\n }",
"abstract public function get_gateway_form_fields();",
"public static function get_input_fields()\n {\n }",
"public static function get_input_fields()\n {\n }",
"public static function get_input_fields()\n {\n }",
"public static function get_input_fields()\n {\n }",
"public static function get_input_fields()\n {\n }",
"public static function get_input_fields()\n {\n }",
"public static function get_input_fields()\n {\n }",
"public static function get_input_fields()\n {\n }",
"public static function get_input_fields()\n {\n }",
"public static function get_input_fields()\n {\n }"
] |
[
"0.75108725",
"0.74347126",
"0.72899127",
"0.7238101",
"0.7129017",
"0.7128154",
"0.7023463",
"0.6957999",
"0.69344246",
"0.6930902",
"0.6880888",
"0.6844116",
"0.6770799",
"0.6752338",
"0.66781586",
"0.6646724",
"0.6619949",
"0.65806776",
"0.6574042",
"0.65719306",
"0.6561062",
"0.6561062",
"0.6561062",
"0.6561062",
"0.6561062",
"0.6561062",
"0.6561062",
"0.6561062",
"0.6561062",
"0.6561062"
] |
0.9069308
|
0
|
This override is needed because in the loadModules method Magento prevents local.xml overwriting that is exactly what we have to do. So we need to reoverride base configuration after the loadMoudles.
|
public function loadModules()
{
parent::loadModules();
$this->extend($this->_configOverrideModel->getBaseOverride());
return $this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private function loadModuleXml() \n\t{\n\n\t\t// load in config.xml to simplexml parser\n\t\tparent::$base_xml = simplexml_load_file(parent::$app_etc_module_path);\n\n\t}",
"abstract protected function loadConfig();",
"public function loadConfig()\n {\n $this->setGlobalStoreOfShopNumber($this->getShopNumber());\n $this->loadArray($this->toArray());\n $this->setExportTmpAndLogSettings();\n }",
"public function load_config() {\n if (!isset($this->config)) {\n $name = $this->get_name();\n $this->config = get_config(\"local_$name\");\n }\n }",
"public function loadBase()\n {\n $etcDir = $this->getOptions()->getEtcDir();\n $files = glob($etcDir.DS.'*.xml');\n $this->loadFile(current($files));\n\n while ($file = next($files)) {\n $merge = clone $this->_prototype;\n $merge->loadFile($file);\n $this->extend($merge);\n }\n\n if (in_array($etcDir.DS.'local.xml', $files)) {\n $this->_isLocalConfigLoaded = true;\n }\n\n return $this;\n }",
"public function onExtLocalConfLoaded(): void\n {\n $this->applyMeta();\n $this->provideTableClassNameMap();\n }",
"protected function _initModules()\n {\n $this->_config->setNode('global/models/ecocode_profiler/class', 'Ecocode_Profiler_Model');\n $this->_config->setNode('global/helpers/ecocode_profiler/class', 'Ecocode_Profiler_Helper');\n if (!$this->_config->loadModulesCache()) {\n $this->_config->loadModules();\n if ($this->_config->isLocalConfigLoaded() && !$this->_shouldSkipProcessModulesUpdates()) {\n Varien_Profiler::start('mage::app::init::apply_db_schema_updates');\n Mage_Core_Model_Resource_Setup::applyAllUpdates();\n Varien_Profiler::stop('mage::app::init::apply_db_schema_updates');\n }\n /* start */\n /* load development.xml for all modules if present */\n $this->_config->loadModulesConfiguration(['development.xml'], $this->_config);\n /* end */\n $this->_config->loadDb();\n $this->enableSymlinks();\n $this->_config->saveCache();\n }\n return $this;\n }",
"public function loadConfigs()\n {\n self::$country_configs = self::getCountryConfigs();\n $configs = new parent();\n self::$categories = $configs->getCategories();\n self::$site_data = self::get_site_data();\n self::$payments_name = self::setPaymentGateway();\n }",
"private function _processModuleDefaults()\n\t{\n\t\t$new_local_defaults = array();\n\t\t\n\t\t//local default file\n\t\t$local_default_module_file = DIR_SECURE_INI.'/site_module_local_defaults.ini';\n\t\t\n\t\t//load the site ini file\n\t if(is_file(DIR_SECURE_INI.'/site_module_config.ini'))\n\t {\n\t \t$a_site_module_config = parse_ini_file(DIR_SECURE_INI.'/site_module_config.ini',true); \n\t } elseif (is_file(DIR_IOW_APP_INI.'/site_module_config.ini')) {\n\t \t$a_site_module_config = parse_ini_file(DIR_IOW_APP_INI.'/site_module_config.ini',true); \n\t } else {\n\t \t$msg = 'The INI file site_module_config can not be found anywhere!';\n\t \tthrow new \\RuntimeException($msg); \n\t }\n\t \n\t //load the local defaults that overwrite the preset defaults\n \tif(is_file($local_default_module_file))\n\t {\n\t \t$local_defaults = parse_ini_file($local_default_module_file,true);\n\t \t\n\t \tforeach($local_defaults as $local_name => $local_info)\n\t \t{\n\t\t \t$overwrite_defaults[$local_name] = $local_info;\n\t \t}\n\t }\n\t \n\t //key sort \n\t ksort($a_site_module_config);\n\t \n\t foreach($_POST as $key => $value)\n\t {\n\t\t $posted[$key] = $value;\n\t }\n\t \n\t //load the system defaults for each module\n \tforeach ($a_site_module_config as $moduleName => $info)\n \t{\n\t\t\t//DIR_IOW_MODULES\n\t\t\tif(is_file(DIR_MODULES.'/'.$moduleName.'/defaults.ini')) {\n\t\t\t\t//DIR_IOW_MODULES\n\t\t \t$module_defaults = parse_ini_file(DIR_MODULES.'/'.$moduleName.'/defaults.ini',true);\n\t\t \t\n\t\t \tforeach($module_defaults as $default_name => $default_info)\n\t\t \t{\n\t\t\t \t$all_defaults[$default_name] = $default_info['default'];\n\t\t\t \t\n\t\t\t \tif(isset($posted[$default_name]) && $posted[$default_name] != $all_defaults[$default_name] )\n\t\t\t \t{\n\t\t\t\t \t$new_local_defaults[$default_name] = $posted[$default_name];\n\t\t\t \t} else {\n\t\t\t\t \t$new_local_defaults[$default_name] = $all_defaults[$default_name];\n\t\t\t \t}\n\t\t \t} \n\t\t } \n\t }\n\t \n\t $this->_iniProcess = new \\core\\app\\classes\\ini\\write_ini();\n\t \n\t if(!$this->_iniProcess->write_php_ini($new_local_defaults, $local_default_module_file))\n\t\t{\n\t\t\t$this->_content_a['error_a']['ERROR - DEFAULT MODOULE'] = \"There was a problem with the site config file {$local_default_module_file}\";\n\t\t}\n\n\t\treturn;\n\t}",
"protected static function loadSingleExtLocalconfFiles() {}",
"function load_default_options() {\n foreach ($this->modules as $name => $data) {\n $this->modules->$name->options = new stdClass();\n $saved_options = get_option($this->clientele_prefix . $name . '_options');\n if ($saved_options) {\n $this->modules->$name->options = (object) array_merge((array) $this->modules->$name->options, (array) $saved_options);\n }\n foreach ($data->default_options as $default_key => $default_value) {\n if (!isset($this->modules->$name->options->$default_key)) {\n $this->modules->$name->options->$default_key = $default_value;\n }\n }\n $this->$name->module = $this->modules->$name;\n }\n do_action('clientele_default_options_loaded');\n // Initialise modules if enabled.\n foreach ($this->modules as $name => $data) {\n if ($data->options->enabled == 'on') {\n if (method_exists($this->$name, 'init')) {\n $this->$name->init();\n }\n }\n }\n do_action('clientele_initialised');\n }",
"public function getModuleConfig() {\n $this->data['config_value'] = array_merge($this->helper_setting->getSetting($this->module_code),$this->helper_setting->getSetting('module_'.$this->module_code));\n }",
"abstract protected function loadConfiguration($name);",
"protected function _config(){\n parent::_config();\n Raxan::loadLangFile(\"info-module\");\n $this->mnuItem = \"RQHIST\";\n }",
"function __construct() {\n parent::__construct();\n array_push($this->_config_paths, APPPATH.'custom/');\n }",
"private function loadConfig()\n {\n $this->category->config = [];\n $this->loadMeta('admins', 'array');\n $this->loadMeta('members', 'array');\n $this->loadMeta('template');\n $this->loadMeta('category', 'array');\n //$this->loadMetaCategory();\n $this->loadInitScript();\n }",
"public function init() {\n //TODO override and put config intialization code here\n }",
"public function applyUpdates()\n {\n if (!Mage::isInstalled()) {\n $modules = Mage::getConfig()->getNode('modules')->children();\n $myModule = substr(__CLASS__, 0, strpos(__CLASS__, '_Model'));\n foreach ($modules as $moduleName => $moduleNode) {\n if ($moduleName != $myModule) {\n Mage::getConfig()->addAllowedModules($moduleName);\n }\n }\n Mage::getConfig()->reinit();\n\n return $this;\n }\n\n return parent::applyUpdates();\n }",
"protected function afterConfigurationSet()\n {\n }",
"public function populateLocalConfiguration() {}",
"protected function getExtbaseConfiguration() {}",
"private function reconfigure() {\n\t\t$global = JConfig::getInstance();\n\t\tforeach ($global as $key => $value) {\n\t\t\tif (array_key_exists($key, $this->config)) {\n\t\t\t\t$this->config[$key] = $value;\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tif (class_exists('JPConfig')) {\n\t\t\t\t$this->config = array_merge($this->config, JPConfig::getData());\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\t// class JPConfig doesn't exist\n\t\t}\n\t}",
"protected function addToConfig()\n {\n $path = $this->getConfigPath();\n $config = require($path);\n if (isset($config[$this->moduleId])) {\n if (\\Yii::$app->controller->confirm('Rewrite exist config?')) {\n $config[$this->moduleId] = $this->getConfigArray();\n echo 'Module config was rewrote' . PHP_EOL;\n }\n } else {\n $config[$this->moduleId] = $this->getConfigArray();\n }\n\n\n $this->writeArrayToFile($this->getConfigPath(), $config);\n }",
"public function _construct()\r\n {\r\n $this->moduleHelper->setModuleName(self::MODULE_NAME_CONFIG_PATH);\r\n }",
"abstract protected function _updateConfiguration();",
"protected function _initConfig()\n {\n parent::_initConfig();\n $this->_mergeConfig(array(\n 'get_descriptions' => false, // true to get descriptions for text sections\n ));\n }",
"protected function _load_config()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n try {\n $config_file = new Configuration_File(self::FILE_CONFIG);\n $rawdata = $config_file->load();\n } catch (File_Not_Found_Exception $e) {\n // Not fatal, set defaults below\n } catch (Engine_Exception $e) {\n throw new Engine_Exception($e->get_message(), CLEAROS_WARNING);\n }\n\n if (isset($rawdata['allow_shell']) && preg_match(\"/(true|1)/i\", $rawdata['allow_shell']))\n $this->config['allow_shell'] = TRUE;\n else\n $this->config['allow_shell'] = FALSE;\n\n if (isset($rawdata['theme_mode']) && !empty($rawdata['theme_mode']))\n $this->config['theme_mode'] = $rawdata['theme_mode'];\n else\n $this->config['theme_mode'] = 'normal';\n\n if (isset($rawdata['theme']) && !empty($rawdata['theme']))\n $this->config['theme'] = $rawdata['theme'];\n else\n $this->config['theme'] = 'default';\n\n $this->is_loaded = TRUE;\n }",
"public function load_config() {\n if (!isset($this->config)) {\n $settingspluginname = 'assessmentsettings';\n $this->config = get_config(\"local_$settingspluginname\");\n }\n }",
"private function loadConfigXml($parent) {\n\t\t$file = $parent->getParent()->getPath('extension_administrator') .\n\t\t\t\t'/config.xml';\n\t\t$defaults = $this->parseConfigFile($file);\n\t\tif ($defaults === '{}') {\n\t\t\treturn;\n\t\t}\n\n\t\t$manifest = $parent->getParent()->getManifest();\n\t\t$type = $manifest->attributes()->type;\n\n\t\ttry {\n\t\t\t$db = JFactory::getDBO();\n\t\t\t$query = $db->getQuery(true)->select($db->quoteName(array (\n\t\t\t\t\t'extension_id', 'params' )))->from($db->quoteName('#__extensions'))->where($db->quoteName('type') .\n\t\t\t\t\t' = ' . $db->quote($type))->where($db->quoteName('element') .\n\t\t\t\t\t' = ' . $db->quote($parent->getElement()))->where($db->quoteName('name') .\n\t\t\t\t\t' = ' . $db->quote($parent->getName()));\n\t\t\t$db->setQuery($query);\n\t\t\t$row = $db->loadObject();\n\t\t\tif (! isset($row)) {\n\t\t\t\t$this->enqueueMessage(JText::_('COM_CLM_TURNIER_ERROR_CONFIG_LOAD'), 'warning');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$params = json_decode($row->params, true);\n\t\t\tif (json_last_error() == JSON_ERROR_NONE && is_array($params)) {\n\t\t\t\t$result = array_merge(json_decode($defaults, true), $params);\n\t\t\t\t$defaults = json_encode($result);\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\t$this->enqueueMessage($e->getMessage(), 'warning');\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\t$query = $db->getQuery(true);\n\t\t\t$query->update($db->quoteName('#__extensions'));\n\t\t\t$query->set($db->quoteName('params') . ' = ' . $db->quote($defaults));\n\t\t\t$query->where($db->quoteName('extension_id') . ' = ' .\n\t\t\t\t\t$db->quote($row->extension_id));\n\n\t\t\t$db->setQuery($query);\n\t\t\t$db->execute();\n\t\t} catch (Exception $e) {\n\t\t\t$this->enqueueMessage($e->getMessage(), 'warning');\n\t\t}\n\t}",
"private function loadConfig() {\n $config = array();\n\n $this->config = $config;\n if (file_exists(__DIR__ . '/../config.php')) {\n require_once(__DIR__. '/../config.php');\n $this->config = array_merge($this->config, $config);\n //TODO check for required config entries\n } else {\n //TODO handle this nicer\n $this->fatalErr('NO_CFG', 'Unable to load config file');\n }\n\n if (array_key_exists('THEME', $this->config)) {\n $this->pageLoader->setTheme($this->config['THEME']);\n }\n }"
] |
[
"0.6833895",
"0.6389369",
"0.63528216",
"0.62240493",
"0.617715",
"0.6120419",
"0.6119185",
"0.6012855",
"0.60116833",
"0.6001641",
"0.5972661",
"0.5967771",
"0.5940282",
"0.592467",
"0.58885604",
"0.587562",
"0.586474",
"0.5863512",
"0.58290154",
"0.5825466",
"0.58187",
"0.58120793",
"0.57625115",
"0.57554525",
"0.5721164",
"0.5714864",
"0.5667448",
"0.56574506",
"0.5635142",
"0.5634072"
] |
0.68565696
|
0
|
Creates the factory object of the given class with given arguments
|
public function createFromClass($class, array $args = []);
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function create(string $class);",
"protected function createObject($class, ...$args) {\n\t\treturn new $class(...$args);\n\t}",
"public function create(string $className, array $args = []);",
"public function make(array $arguments = []): object\n {\n $instance = $this->getInstance();\n\n if ($instance === null) {\n if ($this->factoryIsResolver()) {\n array_unshift($arguments, $this->className);\n }\n \n $instance = ($this->factory)(...$arguments);\n \n if ($this->isSingleton()) {\n $this->instance = $instance;\n }\n }\n\n return $instance;\n }",
"public function create($className, array $args = []);",
"public static function factory($flags = null, $class_name = null) {}",
"public static function factory($flags = null, $class_name = null) {}",
"public function create($classname, array $args = []);",
"public function & create($class) {\n\t\t# Add namepsace to class\n\t\t$objectFactoryClass = $this->getFactoryClassName($this->getFactoryClass($class));\n\t\t# Creating Factory object\n\t\t$objectFactory = new $objectFactoryClass();\n\t\t# Creating orignal object\n\t\t$object = $objectFactory->getInstance($this);\n\t\t# Returning object\n\t\treturn $object;\n\t}",
"function create($class, array $attributes = [])\n{\n return factory($class)->create($attributes);\n}",
"public function create($classname, array $args = [])\r\n {\r\n $di = [];//@todo get all di from a config\r\n $classname = ltrim($classname, '\\\\');\r\n return $this->factory->create($classname, $args);\r\n }",
"public function create($class, $args = array()) {\n\n\t\t// load class\n\t\t$this->app->loader->register($class, 'classes:'.strtolower($class).'.php');\n\n\t\t// use reflection or new for object creation\n\t\tif (count($args) > 0) {\n\t\t\t$reflection = new ReflectionClass($class);\n\t\t\t$object = $reflection->newInstanceArgs($args);\n\t\t} else {\n\t\t\t$object = new $class();\n\t\t}\n\t\t\n\t\t// add reference to related app instance\n\t\tif (property_exists($object, 'app')) {\n\t\t\t$object->app = $this->app;\n\t\t}\n\t\t\n\t\treturn $object;\n\t}",
"public function newInstance()\n {\n return $this->newInstanceArgs(func_get_args());\n }",
"public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }",
"protected final static function createInstance($className, $arguments){\n\t\t// Some optimizations\n\t\tif (count($arguments) == 1) {\n\t\t\treturn new $className($arguments[0]);\n\t\t}\n\t\telse if (count($arguments) == 2) {\n\t\t\treturn new $className($arguments[0], $arguments[1]);\n\t\t}\n\t\telse if (count($arguments) == 3) {\n\t\t\treturn new $className($arguments[0], $arguments[1], $arguments[2]);\n\t\t}\n\t\telse if (count($arguments) == 4) {\n\t\t\treturn new $className($arguments[0], $arguments[1], $arguments[2], $arguments[3]);\n\t\t}\n\t\telse if (count($arguments) == 5) {\n\t\t\treturn new $className($arguments[0], $arguments[1], $arguments[2], $arguments[3], $arguments[4]);\n\t\t}\n\t\t\n\t\t// For any constructor with more arguments we use eval.\n\t\t$args = array();\n\t\tfor ($i = 0; $i < count($arguments); $i++) {\n\t\t\t$args[] = '$arguments[' . $i . ']';\n\t\t}\n\t\t$instance = null;\n\t\teval('$instance = new ' . $className . '(' . implode(',', $args) . ');');\n\t\treturn $instance;\n\t}",
"public function getInstance(/* ... */)\n {\n $reflection = new ReflectionClass($this->getClass());\n return $reflection->newInstanceArgs(func_get_args());\n }",
"public static function make(...$arguments)\n {\n return new static(...$arguments);\n }",
"public static function make(...$arguments)\n {\n return new static(...$arguments);\n }",
"public static function make(...$arguments)\n {\n return new static(...$arguments);\n }",
"function create($class, $attributes = [], $amount = null)\n{\n return factory($class, $amount)->create($attributes);\n}",
"public abstract function createInstance($parameters);",
"public static function create(...$args)\n {\n // Class to create should be the calling class\n $class = get_called_class();\n return Injector::inst()->createWithArgs($class, $args);\n }",
"public static function factory (string $name, ?array $args = null) \n {\n \n $obj=null;\n \n $reflection_class = new \\ReflectionClass($name);\n\n if ($reflection_class->isInstantiable()) { // si la classe est instanciable\n\n $constructor = $reflection_class->getConstructor(); // Recupere constructor\n\n if (!\\is_null($constructor)) { // si il y a un constructeur\n\n $params = $constructor->getParameters();\n \n if (count($params) <= 0) { // Aucun parametre au constructeur\n $obj = $reflection_class->newInstance();\n } else { \n // si il ya des parametres au constructeur\n if ($args!==null) { // Si $args n'est pas null\n $obj = $reflection_class->newInstanceArgs($args);\n } else {\n $tabsParams = [];\n \n foreach ($params as $param) {\n if ($param->getClass()) {\n $tabsParams[] = self::factory($param->getClass()->getName());\n } else {\n\n if($param->isDefaultValueAvailable()){\n $tabsParams[] = $param->getDefaultValue();\n } \n }\n }\n \n $obj = $reflection_class->newInstanceArgs($tabsParams);\n \n }\n }\n } else { // si il n'ya aucun constructor\n $obj = $reflection_class->newInstance();\n }\n } else {\n throw new \\ReflectionException(\"Impossible d'instancier la classe \" . $name, 1);\n }\n return $obj;\n\n }",
"static public function createFactory(array $inputs)\n\t{\n\t\t$registries = [];\n\t\tforeach($inputs as $input)\n\t\t{\n\t\t\t$registries[static::factoryType($input['identifier'], $input['type'])] = $input['class'];\n\t\t}\n\t\t\n\t\treturn new Factory($registries);\t\n\t}",
"private function makeObject($className, array $arguments = [])\n {\n try {\n $reflection = new \\ReflectionClass($className);\n $reflectionMethod = new \\ReflectionMethod($className, '__construct');\n\n if ($reflectionMethod->getNumberOfParameters() === 0) {\n return new $className;\n } else {\n return $reflection->newInstanceArgs($arguments);\n }\n } catch (Exception $e) {\n return false;\n }\n }",
"public function create($class, array $arguments = [])\n {\n if(substr($class, 0, 1) !== '\\\\') {\n $class = self::DEFAULT_CLASS_PATH . $class;\n }\n\n if(!class_exists($class, true)) {\n throw new Exceptions\\FactoryClassNotFound(\"$class not found\");\n }\n\n /**\n * @var Action $obj\n */\n $obj = $this->diContainer->make($class);\n\n if($obj instanceof Action) {\n return $obj->setActionArgs($arguments);\n }\n\n throw new Exceptions\\FactoryClassNotValid(\"$class does not implement \\\\MF\\\\Dbwatcher\\\\Actions\\\\Action\");\n }",
"public static function factory($className = __CLASS__)\n {\n return parent::factory($className);\n }",
"public function newInstance();",
"public function newInstance();",
"function new_instance($class)\n {\n }"
] |
[
"0.7731587",
"0.76345146",
"0.7575161",
"0.7549142",
"0.75286883",
"0.750344",
"0.750344",
"0.74800956",
"0.739075",
"0.7376037",
"0.7374825",
"0.7305278",
"0.72882044",
"0.7189193",
"0.7155901",
"0.7145389",
"0.71390975",
"0.71390975",
"0.71390975",
"0.7124404",
"0.71204257",
"0.71115106",
"0.70732063",
"0.70229894",
"0.70018363",
"0.69992214",
"0.69690883",
"0.69677895",
"0.69677895",
"0.6907041"
] |
0.8130178
|
0
|
Get interface that all created classes by factory should implement
|
public function getInterface();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function getObjectFactory(): ObjectFactoryInterface;",
"public function getFactory() {}",
"public function getFactory(): Factory;",
"protected static function getInterfaceFromProperty()\n {\n if (static::$globalInterface === null) {\n\n throw new PelasticLogicException(\"You should set an interface for a factory class to make it able create its implementation\");\n\n }\n\n return static::$globalInterface;\n }",
"public function testImplementsFactoryInterface(): void\n {\n $factory = new PsrHandlerFactory();\n\n $this->assertInstanceOf(FactoryInterface::class, $factory);\n }",
"public function create()/*# : CreateInterface */;",
"abstract protected function interface();",
"public static function factory()\r\n {\r\n return parent::factory(__CLASS__);\r\n }",
"public function getInterfaces() {}",
"private function getInterface() {\n return App::make(WeatherInterface::class);\n }",
"public function testImplementsInterface()\n {\n $target = new EmployeesFieldsetFactory();\n\n $this->assertInstanceOf('\\Zend\\ServiceManager\\Factory\\FactoryInterface', $target);\n }",
"public function getInterface() {\n\t\t\treturn $this->implements;\t\n\t\t}",
"function isPartOfFactoryDefault() ;",
"protected static function newFactory()\n {\n //\n }",
"public static function i(): ServicesFactory\n {\n return parent::getInstance();\n }",
"protected function getClassInfoFactory() {}",
"protected function createInterface()\n {\n $classNameService = $this->argument('name');\n\n\n $this->call('make:service_interface', [\n 'name' => \"{$classNameService}Interface\",\n ]);\n }",
"public function getFactory()\n {\n return new Factory();\n }",
"static public function getInterfaces();",
"abstract protected function concreteCreate(): DomainObjectInterface;",
"public function testImplementsFactoryInterface(): void\r\n {\r\n $factory = new ContainerFactory();\r\n\r\n $this->assertInstanceOf(FactoryInterface::class, $factory);\r\n }",
"protected function getClassImplementations()\n {\n }",
"function factoryDefault();",
"public function getFactory()\n {\n return $this->_factory;\n }",
"public function readyForInterface() {}",
"public function getFactory()\n {\n return $this->factory;\n }",
"public function getFactory()\n {\n return $this->factory;\n }",
"public function getFactory()\n {\n return $this->factory;\n }",
"public function getFactory()\n {\n return $this->factory;\n }",
"public function getFactory()\n {\n return $this->factory;\n }"
] |
[
"0.71153337",
"0.6995921",
"0.688934",
"0.6568226",
"0.6554513",
"0.65373015",
"0.6506254",
"0.6420271",
"0.63700867",
"0.63129616",
"0.62935084",
"0.6236743",
"0.61781365",
"0.61667395",
"0.6165725",
"0.6145876",
"0.6145718",
"0.6133944",
"0.60848826",
"0.60780394",
"0.6007409",
"0.5990885",
"0.59904146",
"0.59672886",
"0.59432214",
"0.5941534",
"0.5941534",
"0.5941534",
"0.5941534",
"0.5941534"
] |
0.722226
|
0
|
Funcion que consulta los estudiantes en prueba academica
|
function consultarEstudiantesPruebaAcademica(){
$cadena_sql=$this->cadena_sql("estudiantesPruebaAcademica", $this->codProyecto);
$estudiantes_prueba=$this->funcionGeneral->ejecutarSQL($this->configuracion, $this->accesoGestion, $cadena_sql,"busqueda" );
return $estudiantes_prueba;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function get_listado_estactual($filtro=array())\n\t{ \n $concat='';\n if (isset($filtro['anio']['valor'])) {\n \t$udia=dt_mocovi_periodo_presupuestario::ultimo_dia_periodo_anio($filtro['anio']['valor']);\n $pdia=dt_mocovi_periodo_presupuestario::primer_dia_periodo_anio($filtro['anio']['valor']);\n\t\t} \n //que sea una designacion correspondiente al periodo seleccionado o anulada dentro del periodo \n $where=\" WHERE ((a.desde <= '\".$udia.\"' and (a.hasta >= '\".$pdia.\"' or a.hasta is null)) or (a.desde='\".$pdia.\"' and a.hasta is not null and a.hasta<a.desde))\";\n $where2=\" WHERE 1=1 \";//es para filtrar por estado. Lo hago al final de todo\n if (isset($filtro['uni_acad'])) {\n $concat=quote($filtro['uni_acad']['valor']);\n switch ($filtro['uni_acad']['condicion']) {\n case 'es_igual_a': $where.= \" AND a.uni_acad = \".quote($filtro['uni_acad']['valor']);break;\n case 'es_distinto_de': $where.= \" AND a.uni_acad <> \".quote($filtro['uni_acad']['valor']);break;\n }\n }\n //si el usuario esta asociado a un perfil de datos le aplica igual a su UA\n $con=\"select sigla from unidad_acad \";\n $con = toba::perfil_de_datos()->filtrar($con);\n $resul=toba::db('designa')->consultar($con);\n if(count($resul)<=1){//es usuario de una unidad academica\n $where.=\" and a.uni_acad = \".quote($resul[0]['sigla']);\n $concat=quote($resul[0]['sigla']);//para hacer el update de baja\n }\n if (isset($filtro['iddepto'])) {\n switch ($filtro['iddepto']['condicion']) {\n case 'es_igual_a': $where.= \" AND iddepto =\" .$filtro['iddepto']['valor'];break;\n case 'es_distinto_de': $where.= \" AND iddepto <>\" .$filtro['iddepto']['valor'];break;\n }\n }\n if (isset($filtro['por_permuta'])) {\n switch ($filtro['por_permuta']['condicion']) {\n case 'es_igual_a': $where.= \" AND a.por_permuta =\" .$filtro['por_permuta']['valor'];break;\n case 'es_distinto_de': $where.= \" AND a.por_permuta <>\" .$filtro['por_permuta']['valor'];break;\n }\n }\n if (isset($filtro['carac']['valor'])) {\n switch ($filtro['carac']['valor']) {\n case 'R':$c=\"'Regular'\";break;\n case 'O':$c=\"'Otro'\";break;\n case 'I':$c=\"'Interino'\";break;\n case 'S':$c=\"'Suplente'\";break;\n default:\n break;\n }\n switch ($filtro['carac']['condicion']) {\n case 'es_igual_a': $where.= \" AND a.carac=\".$c;break;\n case 'es_distinto_de': $where.= \" AND a.carac<>\".$c;break;\n }\t\n }\n if (isset($filtro['estado'])) {\n switch ($filtro['estado']['condicion']) {\n case 'es_igual_a': $where2.= \" and est like '\".$filtro['estado']['valor'].\"%'\";break;\n case 'es_distinto_de': $where2.= \" and est not like '\".$filtro['estado']['valor'].\"%'\";break;\n }\n }\n if (isset($filtro['legajo'])) {\n switch ($filtro['legajo']['condicion']) {\n case 'es_igual_a': $where.= \" and legajo = \".$filtro['legajo']['valor'];break;\n case 'es_mayor_que': $where.= \" and legajo > \".$filtro['legajo']['valor'];break;\n case 'es_mayor_igual_que': $where.= \" and legajo >= \".$filtro['legajo']['valor'];break;\n case 'es_menor_que': $where.= \" and legajo < \".$filtro['legajo']['valor'];break;\n case 'es_menor_igual_que': $where.= \" and legajo <= \".$filtro['legajo']['valor'];break;\n case 'es_distinto_de': $where.= \" and legajo <> \".$filtro['legajo']['valor'];break;\n case 'entre': $where.= \" and legajo >= \".$filtro['legajo']['valor']['desde'].\" and legajo <=\".$filtro['legajo']['valor']['hasta'];break;\n }\n } \n if (isset($filtro['docente_nombre'])) {\n switch ($filtro['docente_nombre']['condicion']) {\n case 'contiene': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) like LOWER('%\".$filtro['docente_nombre']['valor'].\"%')\";break;\n case 'no_contiene': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) not like LOWER('\".$filtro['docente_nombre']['valor'].\"')\";break;\n case 'comienza_con': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) like LOWER('\".$filtro['docente_nombre']['valor'].\"%')\";break;\n case 'termina_con': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) like LOWER('%\".$filtro['docente_nombre']['valor'].\"')\";break;\n case 'es_igual': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) == LOWER('\".$filtro['docente_nombre']['valor'].\"')\";break;\n case 'es_distinto': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) <> LOWER('\".$filtro['docente_nombre']['valor'].\"')\";break;\n }\n } \n if (isset($filtro['programa'])) {\n $sql=\"select * from mocovi_programa where id_programa=\".$filtro['programa']['valor'];\n $resul=toba::db('designa')->consultar($sql);\n switch ($filtro['programa']['condicion']) {\n case 'es_igual_a': $where.= \" AND programa =\".quote($resul[0]['nombre']);break;\n case 'es_distinto_de': $where.= \" AND programa <>\".quote($resul[0]['nombre']);break;\n }\n } \n if (isset($filtro['tipo_desig'])) {\n switch ($filtro['tipo_desig']['condicion']) {\n case 'es_igual_a': $where.=\" AND a.tipo_desig=\".$filtro['tipo_desig']['valor'];break;\n case 'es_distinto_de': $where.=\" AND a.tipo_desig <>\".$filtro['tipo_desig']['valor'];break;\n }\n }\n if (isset($filtro['anulada'])) {\n switch ($filtro['anulada']['valor']) {\n case '0': $where.=\" AND not (a.hasta is not null and a.hasta<a.desde)\";break;\n case '1': $where.=\" AND a.hasta is not null and a.hasta<a.desde \";break;\n }\n } \n if (isset($filtro['cat_estat'])) {\n switch ($filtro['cat_estat']['condicion']) {\n case 'es_igual_a': $where2.= \" and cat_estat=\".quote($filtro['cat_estat']['valor']);break;\n case 'es_distinto_de': $where2.= \" and cat_estat <>\".quote($filtro['cat_estat']['valor']);break;\n }\n }\n if (isset($filtro['dedic'])) {\n switch ($filtro['dedic']['condicion']) {\n case 'es_igual_a': $where2.= \" and dedic=\".$filtro['dedic']['valor'];break;\n case 'es_distinto_de': $where2.= \" and dedic<>\".$filtro['dedic']['valor'];break;\n }\n } \n //me aseguro de colocar en estado B todas las designaciones que tienen baja\n if($concat!=''){ \n $sql2=\" update designacion a set estado ='B' \"\n . \" where estado<>'B' and a.uni_acad=\".$concat\n .\" and exists (select * from novedad b\n where a.id_designacion=b.id_designacion \n and (b.tipo_nov=1 or b.tipo_nov=4))\";\n }\n \n //designaciones sin licencia UNION designaciones c/licencia sin norma UNION designaciones c/licencia c norma UNION reservas\n $sql=$this->armar_consulta($pdia,$udia,$filtro['anio']['valor']);\n\t\t//si el estado de la designacion es B entonces le pone estado B, si es <>B se fija si tiene licencia sin goce o cese\n// $sql= \"select id_designacion,docente_nombre,legajo,nro_cargo,anio_acad,desde,hasta,cat_mapuche,cat_mapuche_nombre,cat_estat,dedic,carac,check_presup,id_departamento,id_area,id_orientacion,uni_acad,emite_norma,nro_norma,tipo_norma,nro_540,observaciones,estado,porc,dias_lic,programa,costo_vale as costo,est,expediente,nro from(\"\n// . \"select sub2.*,case when t_no.tipo_nov in (1,4) then 'B('||coalesce(t_no.tipo_norma,'')||':'||coalesce(t_no.norma_legal,'')||')' else case when t_no.tipo_nov in (2,5) then 'L('||t_no.tipo_norma||':'||t_no.norma_legal||')' else sub2.estado end end as est,t_i.expediente,case when d.tipo_desig=2 then costo_reserva(d.id_designacion,costo,\".$filtro['anio']['valor'].\") else costo end as costo_vale \"\n// . \" ,case when t_nor.id_norma is null then '' else case when t_nor.link is not null or t_nor.link <>'' then '<a href='||chr(39)||t_nor.link||chr(39)|| ' target='||chr(39)||'_blank'||chr(39)||'>'||t_nor.nro_norma||'</a>' else cast(t_nor.nro_norma as text) end end as nro \"\n// . \"from (\"\n// .\"select sub.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, sub.desde, sub.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,sub.emite_norma, sub.nro_norma,sub.tipo_norma,nro_540,sub.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,costo,max(t_no.id_novedad) as id_novedad from (\"\n// .\"select distinct b.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, b.desde, b.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,emite_norma, b.nro_norma,b.tipo_norma,nro_540,b.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,case when (dias_des-dias_lic)>=0 then ((dias_des-dias_lic)*costo_diario*porc/100) else 0 end as costo\"\n// .\" from (\"\n// .\" select a.id_designacion,a.docente_nombre,a.legajo,a.nro_cargo,a.anio_acad, a.desde, a.hasta,a.cat_mapuche, a.cat_mapuche_nombre,a.cat_estat,a.dedic,a.carac,b.a.id_departamento, a.id_area,a.id_orientacion, a.uni_acad, a.emite_norma, a.nro_norma,a.tipo_norma,a.nro_540,a.observaciones,a.estado,programa,porc,a.costo_diario,check_presup,licencia,a.dias_des,a.dias_lic\".\n// \" from (\".$sql.\") a\"\n// .$where \n// .\") b \"\n// . \" )sub\"\n// . \" LEFT OUTER JOIN novedad t_no ON (sub.id_designacion=t_no.id_designacion and t_no.desde<='\".$udia.\"' and (t_no.hasta is null or t_no.hasta>='\".$pdia.\"' ))\"\n// . \" GROUP BY sub.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, sub.desde,sub.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,sub.emite_norma, sub.nro_norma,sub.tipo_norma,nro_540,sub.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,costo\" \n// . \")sub2\"//obtengo el id_novedad maximo\n// . \" LEFT OUTER JOIN novedad t_no on (t_no.id_novedad=sub2.id_novedad)\"//con el id_novedad maximo obtengo la novedad que predomina\n// .\" LEFT JOIN impresion_540 t_i ON (nro_540=t_i.id)\"//para agregar el expediente \n// .\" LEFT OUTER JOIN designacion d ON (sub2.id_designacion=d.id_designacion)\"//como no tengo el id de la norma tengo que volver a hacer join\n// .\" LEFT OUTER JOIN norma t_nor ON (d.id_norma=t_nor.id_norma)\"\n// . \")sub3\"\n// .$where2\n// . \" order by docente_nombre,desde\"; \n $sql= \"select id_designacion,docente_nombre,legajo,nro_cargo,anio_acad,desde,hasta,cat_mapuche,cat_mapuche_nombre,cat_estat,dedic,carac,check_presup,id_departamento,id_area,id_orientacion,uni_acad,emite_norma,nro_norma,tipo_norma,nro_540,tkd,observaciones,estado,porc,dias_lic,programa,costo_vale as costo,est,expediente,nro from(\"\n . \"select sub2.*,sub2.nro_540||'/'||t_i.anio as tkd,case when t_no.tipo_nov in (1,4) then 'B('||coalesce(t_no.tipo_norma,'')||':'||coalesce(t_no.norma_legal,'')||')' else case when t_no.tipo_nov in (2,5) then 'L('||t_no.tipo_norma||':'||t_no.norma_legal||')' else sub2.estado end end as est,t_i.expediente,case when d.tipo_desig=2 then costo_reserva(d.id_designacion,costo,\".$filtro['anio']['valor'].\") else costo end as costo_vale \"\n . \" ,case when t_nor.id_norma is null then '' else case when t_nor.link is not null or t_nor.link <>'' then '<a href='||chr(39)||t_nor.link||chr(39)|| ' target='||chr(39)||'_blank'||chr(39)||'>'||t_nor.nro_norma||'</a>' else cast(t_nor.nro_norma as text) end end as nro \"\n . \"from (\"\n .\"select sub.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, sub.desde, sub.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,sub.emite_norma, sub.nro_norma,sub.tipo_norma,nro_540,sub.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,costo,max(t_no.id_novedad) as id_novedad from (\"\n .\"select distinct b.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, b.desde, b.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,emite_norma, b.nro_norma,b.tipo_norma,nro_540,b.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,case when (dias_des-dias_lic)>=0 then ((dias_des-dias_lic)*costo_diario*porc/100) else 0 end as costo\"\n .\" from (\"\n .\" select a.id_designacion,a.por_permuta,a.docente_nombre,a.legajo,a.nro_cargo,a.anio_acad, a.desde, a.hasta,a.cat_mapuche, a.cat_mapuche_nombre,a.cat_estat,a.dedic,a.carac,t.iddepto,a.id_departamento, a.id_area,a.id_orientacion, a.uni_acad, a.emite_norma, a.nro_norma,a.tipo_norma,a.nro_540,a.observaciones,a.estado,programa,porc,a.costo_diario,a.check_presup,licencia,a.dias_des,a.dias_lic\".\n \" from (\".$sql.\") a\"\n . \" INNER JOIN designacion d ON (a.id_designacion=d.id_designacion)\"\n . \" LEFT OUTER JOIN departamento t ON (t.iddepto=d.id_departamento)\"\n .$where \n .\") b \"\n . \" )sub\"\n . \" LEFT OUTER JOIN novedad t_no ON (sub.id_designacion=t_no.id_designacion and t_no.desde<='\".$udia.\"' and (t_no.hasta is null or t_no.hasta>='\".$pdia.\"' ))\"\n . \" GROUP BY sub.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, sub.desde,sub.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,sub.emite_norma, sub.nro_norma,sub.tipo_norma,nro_540,sub.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,costo\" \n . \")sub2\"//obtengo el id_novedad maximo\n . \" LEFT OUTER JOIN novedad t_no on (t_no.id_novedad=sub2.id_novedad)\"//con el id_novedad maximo obtengo la novedad que predomina\n .\" LEFT JOIN impresion_540 t_i ON (nro_540=t_i.id)\"//para agregar el expediente \n .\" LEFT OUTER JOIN designacion d ON (sub2.id_designacion=d.id_designacion)\"//como no tengo el id de la norma tengo que volver a hacer join\n .\" LEFT OUTER JOIN norma t_nor ON (d.id_norma=t_nor.id_norma)\"\n . \")sub3\"\n .$where2\n . \" order by docente_nombre,desde\"; \n return toba::db('designa')->consultar($sql);\n\t}",
"function pegaEstados()\n {\n $lista_estados = array(\n 'ac' => 'Acre',\n 'al' => 'Alagoas',\n 'ap' => 'Amapá',\n 'am' => 'Amazonas',\n 'ba' => 'Bahia',\n 'ce' => 'Ceará',\n 'df' => 'Distrito Federal',\n 'es' => 'Espirito Santo',\n 'go' => 'Goiás',\n 'ma' => 'Maranhão',\n 'ms' => 'Mato Grosso do Sul',\n 'mt' => 'Mato Grosso',\n 'mg' => 'Minas Gerais',\n 'pa' => 'Pará',\n 'pb' => 'Paraíba',\n 'pr' => 'Paraná',\n 'pe' => 'Pernanbuco',\n 'pi' => 'Piauí',\n 'rj' => 'Rio de Janeiro',\n 'rn' => 'Rio Grande do Norte',\n 'rs' => 'Rio Grande do Sul',\n 'ro' => 'Rondônia',\n 'rr' => 'Roraima',\n 'sc' => 'Santa Catarina',\n 'sp' => 'São Paulo',\n 'se' => 'Sergipe',\n 'to' => 'Tocantis'\n );\n\n\n return $lista_estados;\n }",
"public function consultarEstudianteGraduarse() {\n $estudiantes = array();\n $sql = \"SELECT DISTINCT\n\t\t\tE.codigoestudiante,\n\t\t\tCONCAT(\n\t\t\t\tEG.nombresestudiantegeneral,\n\t\t\t\t' ',\n\t\t\t\tEG.apellidosestudiantegeneral\n\t\t\t) AS Nombre,\n\t\t\tC.nombrecarrera,\n\t\t\tC.codigocarrera,\n\t\t\tS.nombresituacioncarreraestudiante, S.codigosituacioncarreraestudiante, PR.semestreprematricula, U.usuario, \n\t\t\tF.codigofacultad, F.nombrefacultad, FG.FechaGrado, FG.FechaMaximaCumplimiento\t\t\n\t\tFROM\n\t\t\testudiantegeneral EG\n\t\tINNER JOIN estudiante E ON (\n\t\t\tE.idestudiantegeneral = EG.idestudiantegeneral\n\t\t)\n\t\tINNER JOIN usuario U ON (U.numerodocumento = EG.numerodocumento )\n\t\tINNER JOIN carrera C ON (\n\t\t\tC.codigocarrera = E.codigocarrera \n\t\t)\n\t\tINNER JOIN facultad F ON (\n\t\t\tF.codigofacultad = C.codigofacultad\n\t\t)\n\t\tINNER JOIN prematricula PR ON (\n\t\t\tPR.codigoestudiante = E.codigoestudiante\n\t\t)\n\t\tINNER JOIN detalleprematricula DP ON (\n\t\t\tDP.idprematricula = PR.idprematricula\n\t\t)\n\t\tINNER JOIN planestudio P ON (\n\t\t\tP.codigocarrera = C.codigocarrera\n\t\t)\n\t\tINNER JOIN planestudioestudiante PE ON (\n\t\t\tPE.idplanestudio = P.idplanestudio\n\t\t\tAND PE.codigoestudiante = E.codigoestudiante AND PE.codigoestadoplanestudioestudiante != 200\n\t\t)\n\t\tINNER JOIN situacioncarreraestudiante S ON (\n\t\t\tS.codigosituacioncarreraestudiante = E.codigosituacioncarreraestudiante\n\t\t)\n\t\tINNER JOIN FechaGrado FG ON ( FG.CarreraId = C.codigocarrera )\n\t\tWHERE\n\t\t\tS.codigosituacioncarreraestudiante NOT IN (100,101,102,103,109,400,104)\n\t\tAND DP.codigoestadodetalleprematricula = 30\n\t\tAND PR.semestreprematricula = P.cantidadsemestresplanestudio AND E.semestre = P.cantidadsemestresplanestudio\n\t\tAND C.codigomodalidadacademica IN (200,300) AND C.fechavencimientocarrera > NOW()\n\t\tAND PR.codigoperiodo = ( SELECT MAX(codigoperiodo) FROM periodo WHERE codigoestadoperiodo = 1 )\n\t\tAND FG.CodigoPeriodo = ( SELECT MAX(codigoperiodo) FROM periodo WHERE codigoestadoperiodo = 1 )\n\t\tAND E.codigoestudiante NOT IN (\n\t\t\tSELECT\n\t\t\t\tR.codigoestudiante\n\t\t\tFROM\n\t\t\t\tregistrograduado R\n\t\t\tWHERE\n\t\t\t\tR.codigoestudiante = E.codigoestudiante\n\t\t\tAND R.codigoestado = 100\n\t\t\tUNION\n\t\t\t\tSELECT\n\t\t\t\t\tRG.EstudianteId\n\t\t\t\tFROM\n\t\t\t\t\tRegistroGrado RG\n\t\t\t\tWHERE\n\t\t\t\t\tRG.EstudianteId = E.codigoestudiante\n\t\t\t\tAND RG.CodigoEstado = 100\n\t\t)\n\t\tGROUP BY\n\t\t\tE.codigoestudiante\n\t\tORDER BY C.codigocarrera\";\n\n $this->persistencia->crearSentenciaSQL($sql);\n $this->persistencia->ejecutarConsulta();\n while ($this->persistencia->getNext()) {\n $estudiante = new Estudiante($this->persistencia);\n $estudiante->setCodigoEstudiante($this->persistencia->getParametro(\"codigoestudiante\"));\n $estudiante->setNombreEstudiante($this->persistencia->getParametro(\"Nombre\"));\n $estudiante->setSemestre($this->persistencia->getParametro(\"semestreprematricula\"));\n\n $fechaGrado = new FechaGrado(null);\n $fechaGrado->setFechaGraduacion($this->persistencia->getParametro(\"FechaGrado\"));\n $fechaGrado->setFechaMaxima($this->persistencia->getParametro(\"FechaMaximaCumplimiento\"));\n\n $carrera = new Carrera(null);\n $facultad = new Facultad(null);\n\n $facultad->setCodigoFacultad($this->persistencia->getParametro(\"codigofacultad\"));\n $facultad->setNombreFacultad($this->persistencia->getParametro(\"nombrefacultad\"));\n $carrera->setFacultad($facultad);\n $carrera->setNombreCarrera($this->persistencia->getParametro(\"nombrecarrera\"));\n $carrera->setCodigoCarrera($this->persistencia->getParametro(\"codigocarrera\"));\n $fechaGrado->setCarrera($carrera);\n $estudiante->setFechaGrado($fechaGrado);\n\n $situacionCarreraEstudiante = new SituacionCarreraEstudiante(null);\n $situacionCarreraEstudiante->setCodigoSituacion($this->persistencia->getParametro(\"codigosituacioncarreraestudiante\"));\n $situacionCarreraEstudiante->setNombreSituacion($this->persistencia->getParametro(\"nombresituacioncarreraestudiante\"));\n\n $estudiante->setSituacionCarreraEstudiante($situacionCarreraEstudiante);\n\n $usuario = new Usuario(null);\n $usuario->setUser($this->persistencia->getParametro(\"usuario\"));\n\n $estudiante->setUsuarioEstudiante($usuario);\n $estudiantes[count($estudiantes)] = $estudiante;\n }\n $this->persistencia->freeResult();\n\n return $estudiantes;\n }",
"function obtener_facultades (){\n \n //$nombre_usuario=toba::usuario()->get_nombre();\n //$sql=\"SELECT t_s.sigla FROM sede t_s, administrador t_a WHERE t_a.nombre_usuario=$nombre_usuario AND t_s.id_sede=t_a.id_sede\";\n //$sql=\"SELECT t_ua.sigla, t_ua.descripcion FROM unidad_academica t_ua, sede t_s JOIN administrador t_a ON (t_a.nombre_usuario=$nombre_usuario) JOIN (t_a.id_sede=t_s.id_sede) WHERE t_s.sigla=t_ua.id_sede\";\n $sql=\"SELECT sigla, descripcion FROM unidad_academica WHERE sigla <> 'RECT'\";\n return toba::db('gestion_aulas')->consultar($sql);\n \n }",
"public function consultar($filtro, $codigoModalidadAcademica = NULL) {\n $estudiantes = array();\n\n /* Modified Diego Rivera <[email protected]>\n * Se añade filtor 105(Admitido que no Ingreso) en S.codigosituacioncarreraestudiante NOT IN (100, 101, 102, 103, 108, 109, 112, 302, 400 ) \n * Since October 5,2017\n */\n $sql = \"\n SELECT DISTINCT\n P.idplanestudio,\n EG.idestudiantegeneral,\n E.codigoestudiante,\n CONCAT( EG.apellidosestudiantegeneral, ' ', EG.nombresestudiantegeneral ) AS Nombre,\n C.nombrecarrera,\n PR.semestreprematricula,\n PR.codigoestadoprematricula,\n C.codigocarrera,\n FG.FechaMaximaCumplimiento,\n MAX( PR.codigoperiodo ) AS codigoperiodo,\n FG.FechaGradoId,\n EG.EstadoActualizaDato,\n E.codigosituacioncarreraestudiante,\n FG.TipoGradoId \n FROM\n estudiantegeneral EG\n INNER JOIN estudiante E ON ( E.idestudiantegeneral = EG.idestudiantegeneral )\n INNER JOIN carrera C ON ( C.codigocarrera = E.codigocarrera )\n INNER JOIN facultad F ON ( F.codigofacultad = C.codigofacultad )\n LEFT JOIN prematricula PR ON ( PR.codigoestudiante = E.codigoestudiante )\n LEFT JOIN detalleprematricula DP ON ( DP.idprematricula = PR.idprematricula )\n INNER JOIN planestudio P ON ( P.codigocarrera = C.codigocarrera )\n INNER JOIN planestudioestudiante PE ON ( PE.idplanestudio = P.idplanestudio AND PE.codigoestudiante = E.codigoestudiante AND PE.codigoestadoplanestudioestudiante != 200 )\n INNER JOIN situacioncarreraestudiante S ON ( S.codigosituacioncarreraestudiante = E.codigosituacioncarreraestudiante )\n INNER JOIN FechaGrado FG ON ( FG.CarreraId = C.codigocarrera ) \n WHERE\n S.codigosituacioncarreraestudiante NOT IN ( 100, 101, 102, 103, 108, 109, 112, 302, 400, 105 ) \n AND (\n PR.semestreprematricula BETWEEN ( IF ( C.codigocarrera = 1186, P.cantidadsemestresplanestudio - 9, P.cantidadsemestresplanestudio - 3 ) ) \n AND P.cantidadsemestresplanestudio \n OR E.semestre = P.cantidadsemestresplanestudio \n ) \";\n\n if (empty($codigoModalidadAcademica) || $codigoModalidadAcademica == 200 || $codigoModalidadAcademica == 800) {\n $sql .= \" AND ( DP.codigoestadodetalleprematricula IN (10,30,20) OR DP.codigoestadodetalleprematricula IS NULL )\";\n }\n $sql .= $filtro;\n $sql .= \" AND E.codigoestudiante NOT IN ( \n SELECT\n R.codigoestudiante\n FROM \n registrograduado R\n WHERE\n R.codigoestudiante = E.codigoestudiante AND R.codigoestado = 100\n UNION\n SELECT \n RG.EstudianteId\n FROM \n RegistroGrado RG\n WHERE\n RG.EstudianteId = E.codigoestudiante AND RG.CodigoEstado = 100\";\n \n if (isset($_POST[\"cmbTipoGrado\"]) && $_POST[\"cmbTipoGrado\"] == 1) {\n $sql .= \" UNION\n SELECT\n DC.EstudianteId\n FROM\n DetalleAcuerdoActa DC\n INNER JOIN AcuerdoActa AC ON ( AC.AcuerdoActaId = DC.AcuerdoActaId )\n INNER JOIN FechaGrado FGR ON (FGR.FechaGradoId = AC.FechaGradoId )\n WHERE\n DC.EstudianteId = E.codigoestudiante AND FGR.TipoGradoId = 2 AND DC.CodigoEstado = 100\";\n }\n if (isset($_POST[\"cmbTipoGrado\"]) && $_POST[\"cmbTipoGrado\"] == 2) {\n $sql .= \" UNION\n SELECT\n DC.EstudianteId\n FROM\n DetalleAcuerdoActa DC\n INNER JOIN AcuerdoActa AC ON (\n AC.AcuerdoActaId = DC.AcuerdoActaId\n )\n INNER JOIN FechaGrado FGR ON (FGR.FechaGradoId = AC.FechaGradoId )\n WHERE\n DC.EstudianteId = E.codigoestudiante\n AND FGR.TipoGradoId = 1\n AND DC.CodigoEstado = 100\";\n }\n $sql .= \")\n GROUP BY E.codigoestudiante\n ORDER BY EG.apellidosestudiantegeneral ASC\";\n \n $this->persistencia->crearSentenciaSQL($sql);\n $this->persistencia->ejecutarConsulta();\n while ($this->persistencia->getNext()) {\n \n $estudiante = new Estudiante($this->persistencia);\n $estudiante->setIdEstudiante($this->persistencia->getParametro(\"idestudiantegeneral\"));\n $estudiante->setCodigoEstudiante($this->persistencia->getParametro(\"codigoestudiante\"));\n $estudiante->setNombreEstudiante($this->persistencia->getParametro(\"Nombre\"));\n $estudiante->setEstadoActualizaDato($this->persistencia->getParametro(\"EstadoActualizaDato\"));\n\n $situacionCarreraEstudiante = new SituacionCarreraEstudiante(null);\n $situacionCarreraEstudiante->setCodigoSituacion($this->persistencia->getParametro(\"codigosituacioncarreraestudiante\"));\n\n $fechaGrado = new FechaGrado(null);\n $fechaGrado->setIdFechaGrado($this->persistencia->getParametro(\"FechaGradoId\"));\n $fechaGrado->setFechaMaxima($this->persistencia->getParametro(\"FechaMaximaCumplimiento\"));\n\n $tipoGrado = new TipoGrado(null);\n $tipoGrado->setIdTipoGrado($this->persistencia->getParametro(\"TipoGradoId\"));\n\n $carrera = new Carrera(null);\n $carrera->setCodigoCarrera($this->persistencia->getParametro(\"codigocarrera\"));\n $carrera->setNombreCarrera($this->persistencia->getParametro(\"nombrecarrera\"));\n\n $fechaGrado->setCarrera($carrera);\n $fechaGrado->setTipoGrado($tipoGrado);\n\n $estudiante->setFechaGrado($fechaGrado);\n $estudiante->setSituacionCarreraEstudiante($situacionCarreraEstudiante);\n\n $preMatricula = new PreMatricula(null);\n $preMatricula->setSemestrePreMatricula($this->persistencia->getParametro(\"semestreprematricula\"));\n\n $periodo = new Periodo(null);\n $periodo->setCodigo($this->persistencia->getParametro(\"codigoperiodo\"));\n $preMatricula->setPeriodo($periodo);\n\n $estudiante->setPreMatricula($preMatricula);\n $estudiantes[count($estudiantes)] = $estudiante;\n }\n $this->persistencia->freeResult();\n\n return $estudiantes;\n }",
"function consultarEstudiantesSinPrueba(){\n $cadena_sql=$this->cadena_sql(\"estudiantesSinPrueba\",$this->codProyecto);\n $estudiantes=$this->funcionGeneral->ejecutarSQL($this->configuracion, $this->accesoGestion, $cadena_sql,\"busqueda\" );\n return $estudiantes;\n }",
"public function buscarEstudianteActa() {\n\n $sql = \"SELECT\n D.tipodocumento, D.nombrecortodocumento, EG.numerodocumento, EG.idestudiantegeneral,\n EG.nombresestudiantegeneral, EG.apellidosestudiantegeneral, EG.expedidodocumento, C.codigocarrera\n FROM \n estudiantegeneral EG\n INNER JOIN estudiante E ON ( E.idestudiantegeneral = EG.idestudiantegeneral )\n INNER JOIN documento D ON ( D.tipodocumento = EG.tipodocumento )\n INNER JOIN carrera C ON ( C.codigocarrera = E.codigocarrera )\n WHERE \n E.codigoestudiante = ?\n AND E.codigoestudiante NOT IN ( \n SELECT \n DC.EstudianteId\n FROM \n DetalleAcuerdoActa DC\n WHERE \n CodigoEstado = 100)\";\n\n $this->persistencia->crearSentenciaSQL($sql);\n $this->persistencia->setParametro(0, $this->getCodigoEstudiante(), false);\n\n $this->persistencia->ejecutarConsulta();\n if ($this->persistencia->getNext()) {\n $this->setIdEstudiante($this->persistencia->getParametro(\"idestudiantegeneral\"));\n $this->setNumeroDocumento($this->persistencia->getParametro(\"numerodocumento\"));\n $this->setNombreEstudiante($this->persistencia->getParametro(\"nombresestudiantegeneral\"));\n $this->setApellidoEstudiante($this->persistencia->getParametro(\"apellidosestudiantegeneral\"));\n $this->setExpedicion($this->persistencia->getParametro(\"expedidodocumento\"));\n\n $tipoDocumento = new TipoDocumento(null);\n $tipoDocumento->setIniciales($this->persistencia->getParametro(\"tipodocumento\"));\n $tipoDocumento->setDescripcion($this->persistencia->getParametro(\"nombrecortodocumento\"));\n\n $fechaGrado = new FechaGrado(null);\n $carrera = new Carrera(null);\n\n $carrera->setCodigoCarrera($this->persistencia->getParametro(\"codigocarrera\"));\n $fechaGrado->setCarrera($carrera);\n $this->setTipoDocumento($tipoDocumento);\n $this->setFechaGrado($fechaGrado);\n }\n\n $this->persistencia->freeResult();\n }",
"function get_periodos_activos (){\n \n $fecha=date('Y-m-d');\n $anio_lectivo=date('Y');\n \n $sql_1=\"SELECT t_p.id_periodo,\n t_c.numero || ' ' || 'CUATRIMESTRE' as descripcion \n FROM periodo t_p \n JOIN cuatrimestre t_c ON (t_p.id_periodo=t_c.id_periodo AND t_p.anio_lectivo=$anio_lectivo\n AND (('$fecha' <= t_p.fecha_inicio) OR ('$fecha' BETWEEN t_p.fecha_inicio AND t_p.fecha_fin)))\";\n $cuatrimestre=toba::db('gestion_aulas')->consultar($sql_1);\n \n $sql_2=\"SELECT t_p.id_periodo,\n 'TURNO DE EXAMEN' || ' ' || t_ef.turno || ' ' || t_ef.numero || ' ' || 'LLAMADO' as descripcion\n FROM periodo t_p \n JOIN examen_final t_ef ON (t_p.id_periodo=t_ef.id_periodo AND t_p.anio_lectivo=$anio_lectivo\n AND (('$fecha' <= t_p.fecha_inicio) OR ('$fecha' BETWEEN t_p.fecha_inicio AND t_p.fecha_fin)))\";\n $examen_final=toba::db('gestion_aulas')->consultar($sql_2);\n \n $sql_3=\"SELECT t_p.id_periodo,\n 'CURSO DE INGRESO' || ' ' || t_ci.facultad || ' ' || t_ci.nombre as descripcion\n FROM periodo t_p \n JOIN curso_ingreso t_ci ON (t_p.id_periodo=t_ci.id_periodo AND t_p.anio_lectivo=$anio_lectivo\n AND (('$fecha' <= t_p.fecha_inicio) OR ('$fecha' BETWEEN t_p.fecha_inicio AND t_p.fecha_fin)) )\";\n $curso_ingreso=toba::db('gestion_aulas')->consultar($sql_3);\n \n $this->unificar_periodos(&$cuatrimestre, $examen_final);\n \n $this->unificar_periodos(&$cuatrimestre, $curso_ingreso);\n \n return $cuatrimestre; \n \n }",
"function get_listado($anio_lectivo)\n\t{\n\t\t$sql_1 = \"(SELECT t_p.id_periodo,\n t_p.fecha_inicio,\n t_p.fecha_fin,\n\t\t\t t_p.anio_lectivo,\n t_c.numero,\n '----' as turno,\n 'Cuatrimestre' as tipo_periodo\n FROM periodo as t_p\n JOIN cuatrimestre t_c ON (t_p.id_periodo=t_c.id_periodo AND t_p.anio_lectivo=$anio_lectivo))\n \n \";\n \n $cuatrimestre=toba::db('gestion_aulas')->consultar($sql_1);\n \n $sql_2=\" \n (SELECT t_p.id_periodo,\n t_p.fecha_inicio,\n t_p.fecha_fin,\n t_p.anio_lectivo,\n t_ef.turno,\n t_ef.numero,\n 'Examen Final' as tipo_periodo\n FROM periodo t_p \n JOIN examen_final t_ef ON (t_p.id_periodo=t_ef.id_periodo AND t_p.anio_lectivo=$anio_lectivo))\";\n \n $examen_final=toba::db('gestion_aulas')->consultar($sql_2);\n \n $sql_3=\"(SELECT t_p.id_periodo,\n t_p.fecha_inicio,\n t_p.fecha_fin,\n t_p.anio_lectivo,\n 'Curso de Ingreso' as tipo_periodo,\n '----' as numero,\n t_ci.facultad as turno\n FROM periodo t_p \n JOIN curso_ingreso t_ci ON (t_p.id_periodo=t_ci.id_periodo AND t_p.anio_lectivo=$anio_lectivo)\n )\";\n \n $curso_ingreso=toba::db('gestion_aulas')->consultar($sql_3);\n \n $this->unificar_periodos(&$cuatrimestre, $examen_final);\n \n $this->unificar_periodos(&$cuatrimestre, $curso_ingreso);\n \n return $cuatrimestre;\n \n }",
"public function getAsistencias(){\n\t\t$filasPagina = 10;//registros mostrados por página\n\n\t\tif(isset($_GET['pagina'])){//si le pasamos el valor \"pagina\" de la url (si el usuario da click en la paginación)\n\t\t\t\tif($_GET['pagina']==1){\n\t\t\t\t$pagina=1; \n\t\t\t\theader(\"Location: principal.php?c=controlador&a=muestraAsistencias\");\n\t\t\t\t}else{\n\t\t\t\t\t$pagina=$_GET['pagina'];//índice que indica página actual\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$pagina=1;//índice que indica página actual\n\t\t\t}\n\n\t\t\t$empezarDesde = ($pagina-1) * $filasPagina;\n\n\t\t\t$sql = \" SELECT * FROM asistencia \";\n\n\t\t\t$resultado = $this->db->query($sql);\n\n\t\t\t$resultado->execute(array());\n\n\t\t\t$numFilas = $resultado->rowCount();//número de registos totales de la consulta\n\n\t\t\t//ceil — Redondear fracciones hacia arriba\n\t\t\t$totalPaginas = ceil($numFilas / $filasPagina);//calcula cuántas páginas serán en total para mostrar todos los registros\n\n\t\t\t$resultado->closeCursor();\n\n\t\t//------------------------- Consulta para mostrar los resultados ---------------------------\n\n\t\t\t$sql_limite = \" SELECT * FROM asistencia LIMIT $empezarDesde , $filasPagina \";\n\n\t\t\t$resultado = $this->db->query($sql_limite);//ejecutando la consulta con la conexión establecida\n\n\t\t\twhile($row = $resultado->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t$this->objeto[] = $row;//llenando array con valores de la consulta\n\t\t\t}\n\n\t\treturn $this->objeto;\n\t}",
"public function obtenerViajesplusAbonados();",
"function grafico_1( $desde, $hasta, $ua ){\n\t$query = \"select nested.id_cliente, noticiasactor.id_actor, nested.tema from \"\n\t. \"( select procesados.* from ( select noticiascliente.* from noticiascliente inner join proceso on noticiascliente.id_noticia = proceso.id_noticia where noticiascliente.id_cliente = \" . $ua . \" ) procesados \"\n\t. \"inner join noticia on noticia.id = procesados.id_noticia where noticia.fecha between '\" . $desde . \" 00:00:01' and '\" . $hasta . \" 23:59:59') nested \"\n\t. \"inner join noticiasactor on nested.id_noticia = noticiasactor.id_noticia order by id_actor asc \";\n\t$main = R::getAll($query);\n\t// obtengo el nombre de la unidad de analisis\n\t$ua_nombre = R::findOne(\"cliente\",\"id LIKE ?\",[$ua])['nombre'];\n\t// obtengo los nombres de todos los actores, para cruzar\n\t$actores_nombres = R::findOne(\"actor\",\"id LIKE ?\",[4]) ;\n\t//var_dump($actores_nombres['nombre'] . \" \" . $actores_nombres['apellido']);\n\n\t$tabla = [];\n\t$temas = [];\n\t$i = -1;\n\t// reemplazo actores por nombres y temas\n\tforeach($main as $k=>$v){\n\t\t$actores_nombres = R::findOne(\"actor\",\"id LIKE ?\",[ $v['id_actor'] ]);\n\t\t$main[$k]['id_cliente'] = $ua_nombre;\n\t\t// $main[$k]['id_actor'] = $actores_nombres['nombre'] . \" \" . $actores_nombres['apellido'];\n\t\t$main[$k]['id_actor'] = $v['id_actor'];\n\t\t$main[$k]['nombre'] = $actores_nombres['nombre'] . \" \" . $actores_nombres['apellido'];\n\t\t$id_tema = get_string_between($main[$k]['tema'],\"frm_tema_\",\"\\\"\");\n\t\t$tema = R::findOne(\"attr_temas\",\"id LIKE ?\",[$id_tema])['nombre'];\n\t\tif( is_null( $tema ) ) $tema = 'TEMA NO ASIGNADO';\n\t\t$main[$k]['tema'] = $tema;\n\t\t\n\t\t// if(array_search( [ $main[$k]['id_actor'],$tema], $tabla ) ) echo \"repetido\";\n\t\t// chequeo si ya existe alguno con este actor y tema, si es asi, sumo uno\n\t\t// TODO - FIXME : deberia ser mas eficiente, busqueda por dos valores\n\t\t$iter = true;\n\t\tforeach($tabla as $ka=>$va){\n\t\t\t// if($va['actor'] == $main[$k]['id_actor'] && $va['tema'] == $tema){\n\t\t\tif($va['actor'] == $main[$k]['nombre'] && $va['tema'] == $tema){\n\t\t\t\t$tabla[$ka]['cantidad'] += 1;\n\t\t\t\t$iter = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif($iter){\n\t\t\t$tabla[ ++$i ] = [ \n\t\t\t\t'unidad_analisis' => $ua_nombre,\n\t\t\t\t'actor' => $main[$k]['nombre'],\n\t\t\t\t'id_actor' => $main[$k]['id_actor'],\n\t\t\t\t'tema' => $tema,\n\t\t\t\t'cantidad' => 1\n\t\t\t\t];\n\t\t\t}\n\t\t// agrego los temas que van apareciendo en la tabla temas\n\t\t// UTIL para poder hacer el CRC32 por la cantidad de colores\n\t\tif(!in_array($tema,$temas)) $temas[] = $tema;\n\t}\n\t// la agrupacion de repetidos es por aca, por que repite y cuenta temas de igual id\n\n\t// en el grafico, los hijos, son arreglos de objetos, hago una conversion tabla -> objeto\n\t$objeto = new StdClass(); // objeto vacio\n\t$objeto->name = 'Actores';\n\t$objeto->rank = 0;\n\t$objeto->weight = 1;\n\t$objeto->id = 1;\n\t$objeto->children = [];\n\tforeach($tabla as $k=>$v){\n\t\t// me fijo si el actor existe, ineficiente pero por ahora\n\t\t$NoExiste = true;\n\t\tforeach($objeto->children as $ka=>$va){\n\t\t\t// si existe actor, le inserto el tema\n\t\t\tif($va->name == $v['actor']){\n\t\t\t\t$in = new StdClass();\n\t\t\t\t// $in->name = $v['tema'] . \" (\" . $v['cantidad'] . \") \" ; // lo construye JS\n\t\t\t\t$in->name = \"\";\n\t\t\t\t$in->tema = array_search($v['tema'],$temas);\n\t\t\t\t$in->tema_cantidad = $v['cantidad'];\n\t\t\t\t$in->rank = intval($v['cantidad']); // el tamaño del objeto \n\t\t\t\t$in->weight = 0; // lo asigna JS\n\t\t\t\t$in->id = $k;\n\t\t\t\t$in->children = [];\n\t\t\t\t$objeto->children[$ka]->children[] = $in;\n\t\t\t\t$objeto->children[$ka]->cantidad_temas = count($objeto->children[$ka]->children);\t\n\t\t\t\t$objeto->children[$ka]->rank = count($objeto->children[$ka]->children);\n\t\t\t\t$NoExiste = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif($NoExiste){\n\t\t\t$in = new StdClass();\n\t\t\t$in->name = $v['actor'];\n\t\t\t$in->rank = 1;\n\t\t\t$in->weight = 0; // lo asigna JS\n\t\t\t$in->id = $k;\n\t\t\t//$in->id = $v['id_actor'];\n\t\t\t$in->id_actor = $v['id_actor'];\n\t\t\t\t$t_in = new StdClass();\n\t\t\t\t// $t_in->name = $v['tema'] . \" (\" . $v['cantidad'] . \") \" ; // lo construye JS\n\t\t\t\t$t_in-> name = \"\";\n\t\t\t\t$t_in->tema = array_search($v['tema'],$temas);\n\t\t\t\t$t_in->tema_cantidad = $v['cantidad'];\n\t\t\t\t$t_in->rank = intval($v['cantidad']); // el tamaño del objeto \n\t\t\t\t$t_in->weight = 0; // lo asigna JS\n\t\t\t\t$t_in->id = $k;\n\t\t\t\t$t_in->children = [];\n\t\t\t$in->children = [ $t_in ];\n\t\t\t$objeto->children[] = $in;\n\t\t}\n\t}\n\treturn [\n\t\t'tabla' => $tabla,\n\t\t'grafico' => $objeto,\n\t\t'temas' => $temas\n\t\t];\n}",
"public function buscarEstudianteAcuerdo() {\n\n $sql = \"SELECT \n D.tipodocumento, D.nombrecortodocumento, EG.numerodocumento, EG.idestudiantegeneral,\n EG.nombresestudiantegeneral, EG.apellidosestudiantegeneral, EG.expedidodocumento, C.codigocarrera\n FROM \n estudiantegeneral EG\n INNER JOIN estudiante E ON ( E.idestudiantegeneral = EG.idestudiantegeneral )\n INNER JOIN documento D ON ( D.tipodocumento = EG.tipodocumento )\n INNER JOIN carrera C ON ( C.codigocarrera = E.codigocarrera )\n INNER JOIN FechaGrado FG ON ( FG.CarreraId = C.codigocarrera )\n INNER JOIN AcuerdoActa A ON ( A.FechaGradoId = FG.FechaGradoId )\n INNER JOIN DetalleAcuerdoActa DAC ON ( DAC.AcuerdoActaId = A.AcuerdoActaId AND E.codigoestudiante = DAC.EstudianteId )\n WHERE\n E.codigoestudiante = ?\n AND D.CodigoEstado = 100\n AND DAC.EstadoAcuerdo = 0\n AND DAC.CodigoEstado = 100\";\n\n $this->persistencia->crearSentenciaSQL($sql);\n $this->persistencia->setParametro(0, $this->getCodigoEstudiante(), false);\n $this->persistencia->ejecutarConsulta();\n if ($this->persistencia->getNext()) {\n $this->setIdEstudiante($this->persistencia->getParametro(\"idestudiantegeneral\"));\n $this->setNumeroDocumento($this->persistencia->getParametro(\"numerodocumento\"));\n $this->setNombreEstudiante($this->persistencia->getParametro(\"nombresestudiantegeneral\"));\n $this->setApellidoEstudiante($this->persistencia->getParametro(\"apellidosestudiantegeneral\"));\n $this->setExpedicion($this->persistencia->getParametro(\"expedidodocumento\"));\n\n $tipoDocumento = new TipoDocumento(null);\n $tipoDocumento->setIniciales($this->persistencia->getParametro(\"tipodocumento\"));\n $tipoDocumento->setDescripcion($this->persistencia->getParametro(\"nombrecortodocumento\"));\n\n $fechaGrado = new FechaGrado(null);\n\n $carrera = new Carrera(null);\n $carrera->setCodigoCarrera($this->persistencia->getParametro(\"codigocarrera\"));\n\n $fechaGrado->setCarrera($carrera);\n\n $this->setTipoDocumento($tipoDocumento);\n\n $this->setFechaGrado($fechaGrado);\n }\n\n $this->persistencia->freeResult();\n }",
"function grafico_1_2( $desde, $hasta, $ua ){\n\t// aclarar al cliente que debe setear campos bien definidos y NO PERMITIR AMBIGUEDADES\n\t\n\t$query = \"select actor.nombre, actor.apellido, actor.id_campo, count(noticiasactor.id_actor) as cantidad from noticiascliente \"\n\t\t. \"inner join noticiasactor on noticiascliente.id_noticia = noticiasactor.id_noticia \"\n\t\t. \"inner join noticias on noticiasactor.id_noticia = noticias.id \"\n\t\t. \"inner join actor on noticiasactor.id_actor = actor.id \"\n\t\t. \"where \"\n\t\t\t. \"noticiascliente.id_cliente = \" . $ua . \" and \"\n\t\t\t. \"noticiascliente.elim = 0 and \"\n\t\t\t. \"noticias.fecha between '\" . $desde . \" 00:00:01' and '\" . $hasta . \" 23:59:59' \"\n\t\t\t// SOLO QUIENES TIENEN 3 Y 4 COMO CAMPO\n\t\t\t. \" and ( actor.id_campo like '%3%' or actor.id_campo like '%4%' ) \"\n\t\t. \"group by noticiasactor.id_actor order by cantidad desc\";\n\t$main = R::getAll($query);\n\t$ua_nombre = R::findOne(\"cliente\",\"id LIKE ?\",[$ua])['nombre'];\n\n\t// var_dump($main);\n\t$tabla = [];\n\t// unidad de analisis, campo, actor, cantidad de menciones\n\t$i = -1;\n\tforeach($main as $k=>$v){\n\t\t// por ahora solo considero los dos posibles campos\n\t\t$tabla[ ++$i ] = [\n\t\t\t'ua' => $ua_nombre,\n\t\t\t'campo' => ( strpos( $v['id_campo'], '3' ) !== false ) ? 'oposicion' : 'oficialismo',\n\t\t\t'actor' => $v['apellido'] . ' ' . $v['nombre'],\n\t\t\t'cantidad' => $v['cantidad']\n\t\t\t];\n\t}\n\t// var_dump($tabla);\n\t\n\t// grafico\n\t$oficialismo = new StdClass(); // objeto vacio\n\t$oficialismo->name = 'Oficialismo';\n\t$oficialismo->rank = 0;\n\t$oficialismo->weight = 'Yellow';\n\t$oficialismo->id = 1;\n\t$oficialismo->children = [];\n\t\n\t$oposicion = new StdClass(); // objeto vacio\n\t$oposicion->name = 'Oposicion';\n\t$oposicion->rank = 0;\n\t$oposicion->weight = 'LightBlue';\n\t$oposicion->id = 1;\n\t$oposicion->children = [];\n\t\n\t$objeto = new StdClass(); // objeto vacio\n\t$objeto->name = 'Campos';\n\t$objeto->rank = 0;\n\t$objeto->weight = 'Gray';\n\t$objeto->id = 1;\n\t$objeto->children = [ $oficialismo, $oposicion ];\n\t\n\t$i_of = 0;\n\t$i_op = 0;\n\t\n\tforeach($tabla as $v){\n\t\t$sub = new StdClass(); // objeto vacio\n\t\t$sub->name = $v['actor'] . ' (' . $v['cantidad'] . ')';\n\t\t$sub->rank = $v['cantidad'];\n\t\t// $sub->weight = 0;\n\t\t$sub->cantidad = $v['cantidad'];\n\t\t$sub->id = 1;\n\t\t$sub->children = [ ];\n\t\tif($v['campo'] == 'oposicion'){\n\t\t\t$i_op += 1;\n\t\t\t$sub->weight = 'Blue';\n\t\t\t$oposicion->children[] = $sub;\n\t\t}\n\t\telse{ \n\t\t\t$i_of += 1;\n\t\t\t$sub->weight = 'White';\n\t\t\t$oficialismo->children[] = $sub;\n\t\t}\n\t}\n\t\n\t$oposicion->rank = $i_op;\n\t$oficialismo->rank = $i_of;\n\t\n\treturn [\n\t\t'tabla' => $tabla,\n\t\t'grafico' => $objeto\n\t\t// ,'temas' => $temas\n\t\t];\n\t\n}",
"function consultarEstudiantes($codProyecto) {\r\n $variables=array('codProyecto'=>$codProyecto,\r\n 'ano'=> $this->ano,\r\n 'periodo'=> $this->periodo);\r\n $cadena_sql=$this->sql->cadena_sql(\"consultarEstudiantes\",$variables);\r\n $resultado=$this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql,\"busqueda\");\r\n return $resultado;\r\n }",
"function historial(){\n\n\t\t//Instanciamos y nos conectamos a la bd\n\t\t$Conexion = floopets_BD::Connect();\n\t\t$Conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t//Crear el query que vamos a realizar\n\t\t$consulta = \"SELECT tipo_denuncia.*,denuncia.* FROM denuncia INNER JOIN tipo_denuncia ON denuncia.td_cod_tipo_denuncia=tipo_denuncia.td_cod_tipo_denuncia WHERE denuncia.de_estado='tomado'\";\n\t\t$query = $Conexion->prepare($consulta);\n\t\t$query->execute();\n\t\t//Devolvemos el resultado en un arreglo\n\t\t//Fetch: es el resultado que arroja la consulta en forma de un vector o matriz segun sea el caso\n\t\t//Para consultar donde arroja mas de un dato el fatch debe ir acompañado con la palabra ALL\n\t\t$resultado = $query->fetchALL(PDO::FETCH_BOTH);\n\t\treturn $resultado;\n\t\tfloopets_BD::Disconnect();\n\t}",
"function getEstadisticaPorDia() {\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\t\tglobal $dias_semana;\n\t\tglobal $usr;\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(($this->extra[\"imprimir\"])?REP_PATH_PRINTTEMPLATES:REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'rendimiento_por_dia.tpl');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TITULO_HORARIOS', 'bloque_titulo_horarios');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_DIA', 'es_primero_dia');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_PASOS', 'lista_pasos');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TABLA', 'bloque_tabla');\n\n\n\t\t$T->setVar('__item_orden', $this->extra[\"item_orden\"]);\n\n\t\t$horarios = array($usr->getHorario($this->horario_id));\n\t\tif ($this->horario_id != 0) {\n\t\t\t$horarios[] = $usr->getHorario(0);\n\t\t}\n\n\t\t$orden = 1;\n\t\t$T->setVar('bloque_titulo_horarios', '');\n\t\tforeach ($horarios as $horario) {\n\n\t\t\t/* OBTENER LOS DATOS Y PARSEARLO */\n\t\t\t$sql = \"SELECT * FROM reporte.rendimiento_resumen_global_pordiasemana(\".\n\t\t\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\t\t\tpg_escape_string($this->objetivo_id).\", \".\n\t\t\t\t\tpg_escape_string($horario->horario_id).\",' \".\n\t\t\t\t\tpg_escape_string($this->timestamp->getInicioPeriodo()).\"', '\".\n\t\t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"')\";\n\t\t\t$res =& $mdb2->query($sql);\n\t\t\tif (MDB2::isError($res)) {\n\t\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t$row = $res->fetchRow();\n\t\t\t$dom = new DomDocument();\n\t\t\t$dom->preserveWhiteSpace = false;\n\t\t\t$dom->loadXML($row[\"rendimiento_resumen_global_pordiasemana\"]);\n\t\t\t$xpath = new DOMXpath($dom);\n\t\t\tunset($row[\"rendimiento_resumen_global_pordiasemana\"]);\n\n\t\t\t/* SI NO HAY DATOS MOSTRAR MENSAJE */\n\t\t\tif ($xpath->query('//detalle[@paso_orden]/estadisticas/estadistica')->length == 0) {\n\t\t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$conf_objetivo = $xpath->query('/atentus/resultados/propiedades/objetivos/objetivo')->item(0);\n\t\t\t$conf_pasos = $xpath->query(\"paso[@visible=1]\", $conf_objetivo);\n\n\t\t\tif(count($horarios) > 1) {\n\t\t\t\t$T->setVar('__item_horario', $this->extra[\"item_orden\"]);\n\t\t\t\t$T->setVar('__horario_orden', $orden);\n\t\t\t\t$T->setVar('__horario_nombre',$horario->nombre);\n\t\t\t\t$T->parse('bloque_titulo_horarios', 'BLOQUE_TITULO_HORARIOS', false);\n\t\t\t}\n\n\t\t\t$T->setVar('__objetivo_nombre', $conf_objetivo->getAttribute('nombre'));\n\n\t\t\t$linea = 1;\n\t\t\t$T->setVar('lista_pasos', '');\n\t\t\tforeach($dias_semana as $dia_id => $dia_nombre){\n\t\t\t\t$primero = true;\n\n\t\t\t\t/* LISTA DE PASOS */\n\t\t\t\tforeach ($conf_pasos as $conf_paso) {\n\t\t\t\t\t$tag_dato = $xpath->query('//detalle[@dia_id='.(($dia_id == 7)?0:$dia_id).']/detalles/detalle[@paso_orden='.$conf_paso->getAttribute('paso_orden').']/estadisticas/estadistica')->item(0);\n\n\t\t\t\t\t$T->setVar('__print_class', ($linea % 2 == 0)?\"celdaIteracion2\":\"celdaIteracion1\");\n\t\t\t\t\t$T->setVar('__class', ($linea % 2 == 0)?\"celdanegra15\":\"celdanegra10\");\n\n\t\t\t\t\t$T->setVar('es_primero_dia', '');\n\t\t\t\t\tif ($primero) {\n\t\t\t\t\t\t$T->setVar('__dia_nombre', $dia_nombre);\n\t\t\t\t\t\t$T->setVar('__dia_rowspan', $conf_pasos->length);\n\t\t\t\t\t\t$T->parse('es_primero_dia', 'ES_PRIMERO_DIA', false);\n\t\t\t\t\t}\n\t\t\t\t\t$T->setVar('__paso_nombre', $conf_paso->getAttribute('nombre'));\n\t\t\t\t\t$T->setVar('__paso_minimo', number_format(($tag_dato == null)?0:$tag_dato->getAttribute('tiempo_min'), 3, ',', ''));\n\t\t\t\t\t$T->setVar('__paso_maximo', number_format(($tag_dato == null)?0:$tag_dato->getAttribute('tiempo_max'), 3, ',', ''));\n\t\t\t\t\t$T->setVar('__paso_promedio', number_format(($tag_dato == null)?0:$tag_dato->getAttribute('tiempo_prom'), 3, ',', ''));\n\t\t\t\t\t$T->parse('lista_pasos', 'LISTA_PASOS', true);\n\t\t\t\t\t$primero = false;\n\t\t\t\t\t$linea++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$T->parse('bloque_tabla', 'BLOQUE_TABLA', true);\n\t\t\t$orden++;\n\t\t}\n\t\t$this->tiempo_expiracion = (strtotime($xpath->query(\"//fecha_expiracion\")->item(0)->nodeValue) - strtotime($xpath->query(\"//fecha\")->item(0)->nodeValue));\n\t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n\t}",
"public function buscarEstudiante() {\n\n $sql = \"SELECT D.tipodocumento, D.nombrecortodocumento, E.codigocarrera,\n EG.numerodocumento, EG.idestudiantegeneral, EG.nombresestudiantegeneral, \n EG.apellidosestudiantegeneral, EG.expedidodocumento, EG.codigogenero, \n EG.ciudadresidenciaestudiantegeneral, EG.fechanacimientoestudiantegeneral, EG.direccionresidenciaestudiantegeneral, \n EG.telefonoresidenciaestudiantegeneral, EG.emailestudiantegeneral, D.nombredocumento\n\t\tFROM \n estudiantegeneral EG\n\t\tINNER JOIN estudiante E ON ( E.idestudiantegeneral = EG.idestudiantegeneral )\n\t\tINNER JOIN documento D ON ( D.tipodocumento = EG.tipodocumento )\n\t\tWHERE\n E.codigoestudiante = ? \";\n /* FIN MODIFICACION */\n\n $this->persistencia->crearSentenciaSQL($sql);\n $this->persistencia->setParametro(0, $this->getCodigoEstudiante(), false);\n\n $this->persistencia->ejecutarConsulta();\n if ($this->persistencia->getNext()) {\n $this->setIdEstudiante($this->persistencia->getParametro(\"idestudiantegeneral\"));\n $this->setNumeroDocumento($this->persistencia->getParametro(\"numerodocumento\"));\n $this->setNombreEstudiante($this->persistencia->getParametro(\"nombresestudiantegeneral\"));\n $this->setApellidoEstudiante($this->persistencia->getParametro(\"apellidosestudiantegeneral\"));\n $this->setExpedicion($this->persistencia->getParametro(\"expedidodocumento\"));\n $this->setFechaNacimiento($this->persistencia->getParametro(\"fechanacimientoestudiantegeneral\"));\n $this->setDireccion($this->persistencia->getParametro(\"direccionresidenciaestudiantegeneral\"));\n $this->setTelefono($this->persistencia->getParametro(\"telefonoresidenciaestudiantegeneral\"));\n $this->setEmail($this->persistencia->getParametro(\"emailestudiantegeneral\"));\n\n $carrera = new Carrera(null);\n $carrera->setCodigoCarrera($this->persistencia->getParametro(\"codigocarrera\"));\n $this->setCarrera($carrera);\n\n\n $tipoDocumento = new TipoDocumento(null);\n $tipoDocumento->setIniciales($this->persistencia->getParametro(\"tipodocumento\"));\n $tipoDocumento->setDescripcion($this->persistencia->getParametro(\"nombrecortodocumento\"));\n $tipoDocumento->setNombreDocumento($this->persistencia->getParametro(\"nombredocumento\"));\n\n $genero = new Genero(null);\n $genero->setCodigo($this->persistencia->getParametro(\"codigogenero\"));\n\n $ciudad = new Ciudad(null);\n $ciudad->setId($this->persistencia->getParametro(\"ciudadresidenciaestudiantegeneral\"));\n\n $this->setCiudad($ciudad);\n $this->setGenero($genero);\n $this->setTipoDocumento($tipoDocumento);\n }\n\n $this->persistencia->freeResult();\n }",
"public function get_resumen_ventas_cobros($fecha,$sucursal){\n\t$conectar= parent::conexion();\n\tparent::set_names(); \n\t$fecha_corte = $fecha.\"%\";\n\t$sql=\"select * from corte_diario where fecha_ingreso like ? and (sucursal_venta=? or sucursal_cobro=?);\";\n\t$sql=$conectar->prepare($sql);\n\t$sql->bindValue(1,$fecha_corte);\n\t$sql->bindValue(2,$sucursal);\n\t$sql->bindValue(3,$sucursal);\n\t$sql->execute();\n\treturn $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n}",
"function consultarFacultades() {\r\n $cadena_sql=$this->sql->cadena_sql(\"datos_facultades\",\"\");\r\n $resultado=$this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql,\"busqueda\");\r\n return $resultado;\r\n }",
"function getAportacionesSociales(){ $D\t= $this->getDatosAportaciones(); return $D[\"aportaciones\"]; \t}",
"public function all_desde($desde, $hasta, $codserie = FALSE, $codagente = FALSE, $codcliente = FALSE, $estado = FALSE, $codpago = FALSE, $codalmacen = FALSE)\n {\n $faclist = array();\n $sql = \"SELECT * FROM \".$this->table_name.\" WHERE fecha >= \".$this->var2str($desde).\" AND fecha <= \".$this->var2str($hasta);\n if($codserie)\n {\n if ($codserie==\"AXIXFY\"){\n $sql .= \" AND codserie IN ('A','XI','XF','Y','G','H','J','K')\";\n } else if ($codserie==\"FFBFC\"){\n $sql .= \" AND codserie IN ('F','FC','FB')\";\n } else if ($codserie==\"ACDEXIXFY\"){\n $sql .= \" AND codserie IN ('A','XI','XF','Y','C','D','E')\";\n } else {\n $sql .= \" AND codserie = \".$this->var2str($codserie);\n } \n }\n if($codagente)\n {\n $sql .= \" AND codagente = \".$this->var2str($codagente);\n }\n if($codcliente)\n {\n $sql .= \" AND codcliente = \".$this->var2str($codcliente);\n }\n if($estado)\n {\n if($estado == 'pagada')\n {\n $sql .= \" AND pagada\";\n }\n else\n {\n $sql .= \" AND pagada = false\";\n }\n }\n $sql .= \" ORDER BY fecha ASC, codigo ASC;\";\n //var_dump($sql); exit;\n $data = $this->db->select($sql);\n if($data)\n {\n foreach($data as $f)\n {\n $faclist[] = new \\factura_cliente($f);\n }\n }\n\n return $faclist;\n }",
"public function getLesAcademies(){\r\n\t\t//$tab= array(1=>\"Créteil\",2=>\"Paris\",3=>\"Versailles\");\r\n\r\n\t\t$sql = 'SELECT * FROM academie';\r\n\t\t$stmt = self::$monPdo->prepare($sql);\r\n\t\t$stmt->execute();\r\n\t\t$tab = $stmt->fetchAll();\r\n\t\treturn $tab;\r\n\t}",
"public function getEtapasNaEscola() {\n\n $aEtapas = array();\n $oDaoCensoEtapas = db_utils::getDao(\"censoetapamodal\");\n $sCamposEtapasNaEscola = \"ed273_i_sequencia as codigo, \";\n $sCamposEtapasNaEscola .= \"ed273_i_codigo as codigo_Seq, \";\n $sCamposEtapasNaEscola .= \"ed273_i_modalidade as modalidade, \";\n $sCamposEtapasNaEscola .= \"ed273_c_etapa \";\n\n $sSqlEtapaModal = $oDaoCensoEtapas->sql_query(\"\", $sCamposEtapasNaEscola, \"ed273_i_sequencia\", \"\");\n $rsEtapaNaEscola = $oDaoCensoEtapas->sql_record($sSqlEtapaModal);\n $aEtapas = db_utils::getCollectionByRecord($rsEtapaNaEscola);\n $oDaoMatricula = db_utils::getDao(\"matricula\");\n foreach ($aEtapas as $oEtapa) {\n\n $sCamposModalidade = \" serie.ed11_i_codcenso as codigoetapa\";\n $oEtapa->etapa_na_escola = '0';\n $sWhereModalidade = \" turma.ed57_i_escola = {$this->iCodigoEscola} \";\n $sWhereModalidade .= \" AND calendario.ed52_i_ano = {$this->iAnoCenso}\";\n $sWhereModalidade .= \" AND ed60_c_situacao = 'MATRICULADO' \";\n $sWhereModalidade .= \" AND serie.ed11_i_codcenso in ({$oEtapa->ed273_c_etapa}) \";\n $sWhereModalidade .= \" AND ensino.ed10_i_tipoensino = {$oEtapa->modalidade}\";\n $sWhereModalidade .= \" AND ed60_d_datamatricula <= '{$this->dtBaseCenso}'\";\n $sSqlModalidade = $oDaoMatricula->sql_query(\"\", $sCamposModalidade, \"\", $sWhereModalidade);\n\n $rsModalidades = $oDaoMatricula->sql_record($sSqlModalidade);\n if ($oDaoMatricula->numrows > 0) {\n $oEtapa->etapa_na_escola = 1;\n }\n }\n return $aEtapas;\n }",
"function consultarTurnosSemana($fechaInicio, $fechaFin) {\n\t\n\t//Armar consulta\n\tif(isset($_POST['patologias'])) {\n\t\t$consultaTurnos = \"SELECT COUNT(ID_TURNO) as cantidad, FECHA_TURNO, HORA_TURNO, PATOLOGIA.DESCRIPCION as patologia FROM TURNOS JOIN TIPO_SESION\";\n\t\t$consultaTurnos.= \" ON ID_TIPO_SESION = RELA_TIPO_SESION JOIN ESTADO_TURNO ON ID_ESTADO_TURNO = RELA_ESTADO_TURNO JOIN PATOLOGIA \";\n\t\t$consultaTurnos.= \"ON ID_PATOLOGIA = RELA_PATOLOGIA GROUP BY HORA_TURNO, FECHA_TURNO, PATOLOGIA.DESCRIPCION, ESTADO_TURNO \";\n\t\t$consultaTurnos.= \"HAVING FECHA_TURNO >= '\".$fechaInicio.\"' AND FECHA_TURNO <= '\".$fechaFin.\"' AND ESTADO_TURNO = 'Pendiente' AND PATOLOGIA.DESCRIPCION LIKE '\".$_POST['patologias'].\"'\"; \n\t} else {\n\t\t$consultaTurnos=\"SELECT COUNT(ID_TURNO) as cantidad, FECHA_TURNO, HORA_TURNO FROM TURNOS JOIN TIPO_SESION ON ID_TIPO_SESION = \";\n\t\t$consultaTurnos.=\"RELA_TIPO_SESION JOIN ESTADO_TURNO ON ID_ESTADO_TURNO = RELA_ESTADO_TURNO JOIN PATOLOGIA ON ID_PATOLOGIA = RELA_PATOLOGIA\";\n\t\t$consultaTurnos.=\" GROUP BY HORA_TURNO, FECHA_TURNO, ESTADO_TURNO HAVING FECHA_TURNO >= '\".$fechaInicio.\"' AND FECHA_TURNO <= '\".$fechaFin.\"' AND ESTADO_TURNO = 'Pendiente'\";\n\t}\n\t//Realizar Consulta\n\treturn consulta($consultaTurnos);\n}",
"function idiomas_disponibles($id_palabra,$estado) {\n\t\n\t\tif ($estado==0) { $sql_estado='AND traducciones.estado = 0'; }\n\t\telseif ($estado==1) { $sql_estado='AND traducciones.estado = 1'; }\n\t\telseif ($estado==2) { $sql_estado='AND traducciones.estado = 2'; }\n\t\telse { $sql_estado=''; } \n\t\t$query = \"SELECT \n\t\ttraducciones.estado,traducciones.id_palabra,traducciones.id_idioma,\n\t\tidiomas.id_idioma,idiomas.idioma \n\t\tFROM traducciones, idiomas\n\t\tWHERE traducciones.id_palabra = '$id_palabra'\n\t\tAND traducciones.id_idioma = idiomas.id_idioma\n\t\t$sql_estado\n\t\tGROUP BY idiomas.id_idioma\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\tmysql_close($connection);\n\t\treturn $result;\n\t}",
"function getEstadisticaDetallado() {\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\t\tglobal $usr;\n\n\t\t# Variables para eventos especiales marcados por el cliente codigo 9.\n\t\t$event = new Event;\n\t\t$usr = new Usuario($current_usuario_id);\n\t\t$usr->__Usuario();\n\t\t$graficoSvg = new GraficoSVG();\n\n\n\t\t$timeZoneId = $usr->zona_horaria_id;\n\t\t$arrTime = Utiles::getNameZoneHor($timeZoneId); \t\t\n\t\t$timeZone = $arrTime[$timeZoneId];\n\t\t$tieneEvento = 'false';\n\t\t$arrayDateStart = array();\t\t\n\t\t$nameFunction = 'EstadisticaDet';\n\t\t$data = null;\n\t\t$ids = null;\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(($this->extra[\"imprimir\"])?REP_PATH_PRINTTEMPLATES:REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'comparativo_resumen.tpl');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TITULO_HORARIOS', 'bloque_titulo_horarios');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_MONITOR', 'es_primero_monitor');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_TOTAL', 'es_primero_total');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_PASOS', 'lista_pasos');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TABLA', 'bloque_tabla');\n\n\t\t$T->setVar('__item_orden', $this->extra[\"item_orden\"]);\n\t\t# Variables para mantenimiento.\n\t\t$T->setVar('__path_jquery_ui', REP_PATH_JQUERY_UI);\n\t\n\t\t$horarios = array($usr->getHorario($this->horario_id));\n\t\tif ($this->horario_id != 0) {\n\t\t\t$horarios[] = $usr->getHorario(0);\n\t\t}\n\n\t\t$orden = 1;\n\t\t$T->setVar('bloque_titulo_horarios', '');\n\t\tforeach ($horarios as $horario) {\n\n\t\t\t/* OBTENER LOS DATOS Y PARSEARLO */\n\t\t\t$sql = \"SELECT * FROM reporte.comparativo_resumen_parcial(\".\n\t\t\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\t\t\tpg_escape_string($this->objetivo_id).\", \".\n\t\t\t\t\tpg_escape_string($horario->horario_id).\",' \".\n\t\t\t\t\tpg_escape_string($this->timestamp->getInicioPeriodo()).\"', '\".\n\t\t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"')\";\n\t\t\t$res =& $mdb2->query($sql);\n// \t\t\tprint($sql);\n\t\t\tif (MDB2::isError($res)) {\n\t\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t$row = $res->fetchRow();\n\t\t\t$dom = new DomDocument();\n\t\t\t$dom->preserveWhiteSpace = false;\n\t\t\t$dom->loadXML($row[\"comparativo_resumen_parcial\"]);\n\t\t\t$xpath = new DOMXpath($dom);\n\t\t\tunset($row[\"comparativo_resumen_parcial\"]);\n\n\t\t\tif ($xpath->query('//detalle[@paso_orden]/estadisticas/estadistica')->length == 0) {\n\t\t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$conf_objetivo = $xpath->query('/atentus/resultados/propiedades/objetivos/objetivo')->item(0);\n\t\t\t$conf_pasos = $xpath->query(\"paso[@visible=1]\", $conf_objetivo);\n\t\t\t$conf_nodos = $xpath->query('//nodos/nodo');\n\n\t\t\tif(count($horarios) > 1) {\n\t\t\t\t$T->setVar('__item_horario', $this->extra[\"item_orden\"]);\n\t\t\t\t$T->setVar('__horario_orden', $orden);\n\t\t\t\t$T->setVar('__horario_nombre',$horario->nombre);\n\t\t\t\t$T->parse('bloque_titulo_horarios', 'BLOQUE_TITULO_HORARIOS', false);\n\t\t\t}\n\n\t\t\t\n\t\t\t# Obtención de los eventos especiales marcados por el cliente\n\t\t\tforeach ($xpath->query(\"/atentus/resultados/detalles_marcado/detalle/marcado\") as $tag_marcado) {\n\t\t\t$ids = $ids.','.$tag_marcado->getAttribute('mantenimiento_id');\n\t\t\t$marcado = true;\n\t\t\t}\t\t\n\t\t\t\n\t\t\t# Verifica que exista marcado evento cliente.\n\t\t\tif ($marcado == true) {\n\n\t\t\t\t$dataMant = $event->getData(substr($ids, 1), $timeZone);\n\t\t\t\t$character = array(\"{\", \"}\");\n\t\t\t\t$objetives = explode(',',str_replace($character,\"\",($dataMant[0]['objetivo_id'])));\n\t\t\t\t$tieneEvento = 'true';\n\t\t\t\t$encode = json_encode($dataMant);\n\t\t\t\t$nodoId = (string)0;\n\t\t\t\t$T->setVar('__tiene_evento', $tieneEvento);\n\t\t\t\t$T->setVar('__name', $nameFunction);\n\n\t\t\t}\n\n\t\t\t/* LISTA DE MONITORES */\n\t\t\t$linea = 1;\n\t\t\t$T->setVar('lista_pasos', '');\n\t\t\tforeach($conf_nodos as $conf_nodo) {\n\t\t\t\t$primero = true;\n\t\t\t\t$tag_nodo = $xpath->query('//detalle[@nodo_id='.$conf_nodo->getAttribute('nodo_id').']/estadisticas/estadistica')->item(0);\n\n\t\t\t\t/* LISTA DE PASOS */\n\t\t\t\tforeach($conf_pasos as $conf_paso) {\n\t\t\t\t\t$tag_dato = $xpath->query('//detalle[@nodo_id='.$conf_nodo->getAttribute('nodo_id').']/detalles/detalle[@paso_orden='.$conf_paso->getAttribute('paso_orden').']/estadisticas/estadistica')->item(0);\n\t\t\t\t\tif($tag_dato != null) {\n\t\t\t\t\t\t$T->setVar('__print_class', ($linea % 2 == 0)?\"celdaIteracion2\":\"celdaIteracion1\");\n\t\t\t\t\t\t$T->setVar('__class', ($linea % 2 == 0)?\"celdanegra15\":\"celdanegra10\");\n\n\t\t\t\t\t\t$T->setVar('es_primero_monitor', '');\n\t\t\t\t\t\t$T->setVar('es_primero_total', '');\n\t\t\t\t\t\tif ($primero) {\n\t\t\t\t\t\t\t$T->setVar('__monitor_nombre', $conf_nodo->getAttribute('nombre'));\n\t\t\t\t\t\t\t$T->setVar('__monitor_rowspan', $conf_pasos->length);\n\t\t\t\t\t\t\t$T->setVar('__monitor_total_monitoreo', $tag_nodo->getAttribute('cantidad'));\n\t\t\t\t\t\t\t$T->parse('es_primero_monitor', 'ES_PRIMERO_MONITOR', false);\n\t\t\t\t\t\t\t$T->parse('es_primero_total', 'ES_PRIMERO_TOTAL', false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$T->setVar('__paso_nombre', $conf_paso->getAttribute(\"nombre\"));\n\t\t\t\t\t\t$T->setVar('__paso_minimo', number_format($tag_dato->getAttribute('tiempo_min'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_maximo', number_format($tag_dato->getAttribute('tiempo_max'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_promedio', number_format($tag_dato->getAttribute('tiempo_prom'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_uptime', number_format($tag_dato->getAttribute('uptime'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_downtime', number_format($tag_dato->getAttribute('downtime'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_no_monitoreo', number_format($tag_dato->getAttribute('sin_monitoreo'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_evento_especial', number_format($tag_dato->getAttribute('marcado_cliente'), 3, ',', ''));\n\n\t\t\t\t\t\t$T->parse('lista_pasos', 'LISTA_PASOS', true);\n\t\t\t\t\t\t$primero = false;\n\t\t\t\t\t\t$linea++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$T->parse('bloque_tabla', 'BLOQUE_TABLA', true);\n\t\t\t$orden++;\n\t\t}\n\t\t$this->tiempo_expiracion = (strtotime($xpath->query(\"//fecha_expiracion\")->item(0)->nodeValue) - strtotime($xpath->query(\"//fecha\")->item(0)->nodeValue));\n\t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n\n\t\t# Agrega el acordeon cuando existan eventos.\n\t\tif (count($dataMant)>0){\n\t\t\t$this->resultado.= $graficoSvg->getAccordion($encode,$nameFunction);\n\t\t}\n\t\treturn $this->resultado;\n\t}",
"function consultarEstudiantesParaHomologacion($cod_proyecto){\n $cadena_sql = $this->sql->cadena_sql(\"consultarEstudiantesProyecto\",$cod_proyecto);\n return $resultadoEspacio = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\n }",
"function buscarEstudiantesNivelados($estudiantes,$estudiantes_clasificados){\n \n $k=0;\n\tunset ($this->notas);\n $this->notas = $this->obtenerNotas();\n if(count($estudiantes)>0)\n {\n foreach ($estudiantes as $key => $estudiante) {\n //buscamos las notas\n $reprobados = 0;\n $notas_estudiante = array();\n $notas_estudiante = $this->obtenerNotasEstudiante($estudiante['COD_ESTUDIANTE']);\n $reprobados = $this->verificarReprobados($notas_estudiante);\n unset($notas_estudiante);\n if($reprobados==0){\n $resultado = array( 'COD_ESTUDIANTE'=>$estudiante['COD_ESTUDIANTE'],\n 'COD_PROYECTO'=>$estudiante['COD_PROYECTO'],\n 'CLASIFICACION'=>'1',\n 'TIPO'=>$estudiante['TIPO']\n );\n $estudiantes_clasificados[] = $resultado;\n unset($estudiantes[$key]);\n }\n }\n }\n $resultado = array( 'ESTUDIANTES'=>$estudiantes,\n 'CLASIFICADOS'=>$estudiantes_clasificados);\n return $resultado;\n }",
"public function busquedaEstudianteplanificacion() {\n $con = \\Yii::$app->db_academico;\n $estado = 1;\n \n $sql = \"SELECT est.per_id as id, concat(/*est.per_id, ' - ',*/ pers.per_cedula, ' - ', \n ifnull(pers.per_pri_nombre, ' ') ,' ', \n ifnull(pers.per_pri_apellido,' ')) as name\n FROM db_academico.estudiante est\n JOIN db_asgard.persona pers ON pers.per_id = est.per_id\n WHERE pers.per_estado = :estado AND\n pers.per_estado_logico = :estado AND\n est.est_estado = :estado AND\n est.est_estado_logico = :estado;\";\n\n $comando = $con->createCommand($sql);\n $comando->bindParam(\":estado\", $estado, \\PDO::PARAM_STR);\n $resultData = $comando->queryAll();\n return $resultData;\n }"
] |
[
"0.6935001",
"0.67978567",
"0.678473",
"0.67609274",
"0.6749522",
"0.66358376",
"0.65148747",
"0.6513014",
"0.64673316",
"0.6460201",
"0.6417797",
"0.6417613",
"0.6393387",
"0.6343176",
"0.6280531",
"0.6279956",
"0.62499994",
"0.6243959",
"0.624313",
"0.62290853",
"0.6222548",
"0.62132615",
"0.6211713",
"0.6208241",
"0.6170664",
"0.61696434",
"0.616446",
"0.6157812",
"0.61504424",
"0.6147641"
] |
0.7240002
|
0
|
Funcion que consulta los estudiantes que no estan en prueba academica
|
function consultarEstudiantesSinPrueba(){
$cadena_sql=$this->cadena_sql("estudiantesSinPrueba",$this->codProyecto);
$estudiantes=$this->funcionGeneral->ejecutarSQL($this->configuracion, $this->accesoGestion, $cadena_sql,"busqueda" );
return $estudiantes;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function consultarEstudiantesPruebaAcademica(){\n $cadena_sql=$this->cadena_sql(\"estudiantesPruebaAcademica\", $this->codProyecto);\n $estudiantes_prueba=$this->funcionGeneral->ejecutarSQL($this->configuracion, $this->accesoGestion, $cadena_sql,\"busqueda\" );\n return $estudiantes_prueba;\n }",
"function no_acta_inicio(){\n $sql = \n \"SELECT\n c.Numero,\n c.Objeto,\n t.Nombre AS Contratista,\n c.Fecha_Inicial,\n c.Fecha_Vencimiento,\n c.Valor_Inicial,\n e.Estado \n FROM\n contratos AS c\n INNER JOIN tbl_terceros AS t ON c.Fk_Id_Terceros = t.Pk_Id_Terceros\n INNER JOIN tbl_estados AS e ON c.Fk_Id_Estado = e.Pk_Id_Estado \n WHERE\n c.Acta_Inicio IS FALSE \n AND e.Pk_Id_Estado <> 2 \n AND c.Fk_Id_Proyecto = {$this->session->userdata('Fk_Id_Proyecto')}\n ORDER BY\n Numero ASC\";\n \n //Se retorna la consulta\n return $this->db->query($sql)->result();\n }",
"function FacturasAbiertas() {\n $sql = \"SELECT COUNT(*) count FROM \".self::$table.\" WHERE estado='Abierta'\";\n return DBManager::count($sql);\n }",
"function get_no_autoevaluados() {\n // obtiene la evaluacion activa \n $id_evaluacion = $this->get_evaluacion();\n \n // obtiene a los usuarios evaluados\n\t\t$usrs = array();\n\t\t$u = $this->get_autoevaluados();\n\t\tif( $u->num_rows() > 0 ) {\n\t\t\t$i = 0;\n\t\t\tforeach( $u->result() as $row ) {\n\t\t\t\t$usrs[$i] = $row->IdUsuario;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\t$this->db->group_by( 'ab_usuarios.IdUsuario' );\n\t\tif( $usrs ) {\n\t\t\t$this->db->where_not_in( 'ab_usuarios.IdUsuario', $usrs );\n\t\t}\n \n\t\t$condicion = array(\n\t\t\t'ab_usuarios.IdArea' => $this->session->userdata('id_area'),\n\t\t\t'ab_usuarios.Estado'\t\t\t\t\t\t\t\t\t => 1 \n\t\t);\n\t\t$consulta = $this->db->get_where( 'ab_usuarios', $condicion ); \n\t\treturn $consulta;\n\t}",
"function consultarNotasDefinitivas() {\r\n \r\n $cadena_sql = $this->sql->cadena_sql(\"consultarEspaciosCursados\", $this->datosEstudiante['CODIGO']);\r\n $resultado = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\"); \r\n \r\n return $resultado;\r\n \r\n }",
"function buscarEspaciosReprobados($notaAprobatoria) {\r\n \r\n $reprobados=isset($reprobados)?$reprobados:'';\r\n $espacios=isset($reprobados)?$reprobados:'';\r\n \r\n if (is_array($this->espaciosCursados)){\r\n foreach ($this->espaciosCursados as $value) {\r\n if (isset($value['NOTA'])&&($value['NOTA']<$notaAprobatoria||$value['CODIGO_OBSERVACION']==20||$value['CODIGO_OBSERVACION']==23||$value['CODIGO_OBSERVACION']==25)){\r\n if ($value['CODIGO_OBSERVACION']==19||$value['CODIGO_OBSERVACION']==22||$value['CODIGO_OBSERVACION']==24)\r\n {\r\n }else\r\n {\r\n $espacios[]=$value['CODIGO'];\r\n }\r\n }\r\n }\r\n if(is_array($espacios)){\r\n \r\n $espacios= array_unique($espacios);\r\n if($this->datosEstudiante['IND_CRED']=='S'){\r\n \r\n foreach ($espacios as $key => $espacio) {\r\n foreach ($this->espaciosCursados as $cursado) {\r\n if($espacio==$cursado['CODIGO']){\r\n $reprobados[$key]['CODIGO']=$cursado['CODIGO'];\r\n $reprobados[$key]['CREDITOS']=(isset($cursado['CREDITOS'])?$cursado['CREDITOS']:0);\r\n }\r\n }\r\n\r\n }\r\n }else{\r\n $reprobados=$espacios;\r\n }\r\n return $reprobados; \r\n \r\n }else{\r\n return 0; \r\n }\r\n \r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n }",
"function get_listado_estactual($filtro=array())\n\t{ \n $concat='';\n if (isset($filtro['anio']['valor'])) {\n \t$udia=dt_mocovi_periodo_presupuestario::ultimo_dia_periodo_anio($filtro['anio']['valor']);\n $pdia=dt_mocovi_periodo_presupuestario::primer_dia_periodo_anio($filtro['anio']['valor']);\n\t\t} \n //que sea una designacion correspondiente al periodo seleccionado o anulada dentro del periodo \n $where=\" WHERE ((a.desde <= '\".$udia.\"' and (a.hasta >= '\".$pdia.\"' or a.hasta is null)) or (a.desde='\".$pdia.\"' and a.hasta is not null and a.hasta<a.desde))\";\n $where2=\" WHERE 1=1 \";//es para filtrar por estado. Lo hago al final de todo\n if (isset($filtro['uni_acad'])) {\n $concat=quote($filtro['uni_acad']['valor']);\n switch ($filtro['uni_acad']['condicion']) {\n case 'es_igual_a': $where.= \" AND a.uni_acad = \".quote($filtro['uni_acad']['valor']);break;\n case 'es_distinto_de': $where.= \" AND a.uni_acad <> \".quote($filtro['uni_acad']['valor']);break;\n }\n }\n //si el usuario esta asociado a un perfil de datos le aplica igual a su UA\n $con=\"select sigla from unidad_acad \";\n $con = toba::perfil_de_datos()->filtrar($con);\n $resul=toba::db('designa')->consultar($con);\n if(count($resul)<=1){//es usuario de una unidad academica\n $where.=\" and a.uni_acad = \".quote($resul[0]['sigla']);\n $concat=quote($resul[0]['sigla']);//para hacer el update de baja\n }\n if (isset($filtro['iddepto'])) {\n switch ($filtro['iddepto']['condicion']) {\n case 'es_igual_a': $where.= \" AND iddepto =\" .$filtro['iddepto']['valor'];break;\n case 'es_distinto_de': $where.= \" AND iddepto <>\" .$filtro['iddepto']['valor'];break;\n }\n }\n if (isset($filtro['por_permuta'])) {\n switch ($filtro['por_permuta']['condicion']) {\n case 'es_igual_a': $where.= \" AND a.por_permuta =\" .$filtro['por_permuta']['valor'];break;\n case 'es_distinto_de': $where.= \" AND a.por_permuta <>\" .$filtro['por_permuta']['valor'];break;\n }\n }\n if (isset($filtro['carac']['valor'])) {\n switch ($filtro['carac']['valor']) {\n case 'R':$c=\"'Regular'\";break;\n case 'O':$c=\"'Otro'\";break;\n case 'I':$c=\"'Interino'\";break;\n case 'S':$c=\"'Suplente'\";break;\n default:\n break;\n }\n switch ($filtro['carac']['condicion']) {\n case 'es_igual_a': $where.= \" AND a.carac=\".$c;break;\n case 'es_distinto_de': $where.= \" AND a.carac<>\".$c;break;\n }\t\n }\n if (isset($filtro['estado'])) {\n switch ($filtro['estado']['condicion']) {\n case 'es_igual_a': $where2.= \" and est like '\".$filtro['estado']['valor'].\"%'\";break;\n case 'es_distinto_de': $where2.= \" and est not like '\".$filtro['estado']['valor'].\"%'\";break;\n }\n }\n if (isset($filtro['legajo'])) {\n switch ($filtro['legajo']['condicion']) {\n case 'es_igual_a': $where.= \" and legajo = \".$filtro['legajo']['valor'];break;\n case 'es_mayor_que': $where.= \" and legajo > \".$filtro['legajo']['valor'];break;\n case 'es_mayor_igual_que': $where.= \" and legajo >= \".$filtro['legajo']['valor'];break;\n case 'es_menor_que': $where.= \" and legajo < \".$filtro['legajo']['valor'];break;\n case 'es_menor_igual_que': $where.= \" and legajo <= \".$filtro['legajo']['valor'];break;\n case 'es_distinto_de': $where.= \" and legajo <> \".$filtro['legajo']['valor'];break;\n case 'entre': $where.= \" and legajo >= \".$filtro['legajo']['valor']['desde'].\" and legajo <=\".$filtro['legajo']['valor']['hasta'];break;\n }\n } \n if (isset($filtro['docente_nombre'])) {\n switch ($filtro['docente_nombre']['condicion']) {\n case 'contiene': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) like LOWER('%\".$filtro['docente_nombre']['valor'].\"%')\";break;\n case 'no_contiene': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) not like LOWER('\".$filtro['docente_nombre']['valor'].\"')\";break;\n case 'comienza_con': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) like LOWER('\".$filtro['docente_nombre']['valor'].\"%')\";break;\n case 'termina_con': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) like LOWER('%\".$filtro['docente_nombre']['valor'].\"')\";break;\n case 'es_igual': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) == LOWER('\".$filtro['docente_nombre']['valor'].\"')\";break;\n case 'es_distinto': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) <> LOWER('\".$filtro['docente_nombre']['valor'].\"')\";break;\n }\n } \n if (isset($filtro['programa'])) {\n $sql=\"select * from mocovi_programa where id_programa=\".$filtro['programa']['valor'];\n $resul=toba::db('designa')->consultar($sql);\n switch ($filtro['programa']['condicion']) {\n case 'es_igual_a': $where.= \" AND programa =\".quote($resul[0]['nombre']);break;\n case 'es_distinto_de': $where.= \" AND programa <>\".quote($resul[0]['nombre']);break;\n }\n } \n if (isset($filtro['tipo_desig'])) {\n switch ($filtro['tipo_desig']['condicion']) {\n case 'es_igual_a': $where.=\" AND a.tipo_desig=\".$filtro['tipo_desig']['valor'];break;\n case 'es_distinto_de': $where.=\" AND a.tipo_desig <>\".$filtro['tipo_desig']['valor'];break;\n }\n }\n if (isset($filtro['anulada'])) {\n switch ($filtro['anulada']['valor']) {\n case '0': $where.=\" AND not (a.hasta is not null and a.hasta<a.desde)\";break;\n case '1': $where.=\" AND a.hasta is not null and a.hasta<a.desde \";break;\n }\n } \n if (isset($filtro['cat_estat'])) {\n switch ($filtro['cat_estat']['condicion']) {\n case 'es_igual_a': $where2.= \" and cat_estat=\".quote($filtro['cat_estat']['valor']);break;\n case 'es_distinto_de': $where2.= \" and cat_estat <>\".quote($filtro['cat_estat']['valor']);break;\n }\n }\n if (isset($filtro['dedic'])) {\n switch ($filtro['dedic']['condicion']) {\n case 'es_igual_a': $where2.= \" and dedic=\".$filtro['dedic']['valor'];break;\n case 'es_distinto_de': $where2.= \" and dedic<>\".$filtro['dedic']['valor'];break;\n }\n } \n //me aseguro de colocar en estado B todas las designaciones que tienen baja\n if($concat!=''){ \n $sql2=\" update designacion a set estado ='B' \"\n . \" where estado<>'B' and a.uni_acad=\".$concat\n .\" and exists (select * from novedad b\n where a.id_designacion=b.id_designacion \n and (b.tipo_nov=1 or b.tipo_nov=4))\";\n }\n \n //designaciones sin licencia UNION designaciones c/licencia sin norma UNION designaciones c/licencia c norma UNION reservas\n $sql=$this->armar_consulta($pdia,$udia,$filtro['anio']['valor']);\n\t\t//si el estado de la designacion es B entonces le pone estado B, si es <>B se fija si tiene licencia sin goce o cese\n// $sql= \"select id_designacion,docente_nombre,legajo,nro_cargo,anio_acad,desde,hasta,cat_mapuche,cat_mapuche_nombre,cat_estat,dedic,carac,check_presup,id_departamento,id_area,id_orientacion,uni_acad,emite_norma,nro_norma,tipo_norma,nro_540,observaciones,estado,porc,dias_lic,programa,costo_vale as costo,est,expediente,nro from(\"\n// . \"select sub2.*,case when t_no.tipo_nov in (1,4) then 'B('||coalesce(t_no.tipo_norma,'')||':'||coalesce(t_no.norma_legal,'')||')' else case when t_no.tipo_nov in (2,5) then 'L('||t_no.tipo_norma||':'||t_no.norma_legal||')' else sub2.estado end end as est,t_i.expediente,case when d.tipo_desig=2 then costo_reserva(d.id_designacion,costo,\".$filtro['anio']['valor'].\") else costo end as costo_vale \"\n// . \" ,case when t_nor.id_norma is null then '' else case when t_nor.link is not null or t_nor.link <>'' then '<a href='||chr(39)||t_nor.link||chr(39)|| ' target='||chr(39)||'_blank'||chr(39)||'>'||t_nor.nro_norma||'</a>' else cast(t_nor.nro_norma as text) end end as nro \"\n// . \"from (\"\n// .\"select sub.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, sub.desde, sub.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,sub.emite_norma, sub.nro_norma,sub.tipo_norma,nro_540,sub.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,costo,max(t_no.id_novedad) as id_novedad from (\"\n// .\"select distinct b.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, b.desde, b.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,emite_norma, b.nro_norma,b.tipo_norma,nro_540,b.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,case when (dias_des-dias_lic)>=0 then ((dias_des-dias_lic)*costo_diario*porc/100) else 0 end as costo\"\n// .\" from (\"\n// .\" select a.id_designacion,a.docente_nombre,a.legajo,a.nro_cargo,a.anio_acad, a.desde, a.hasta,a.cat_mapuche, a.cat_mapuche_nombre,a.cat_estat,a.dedic,a.carac,b.a.id_departamento, a.id_area,a.id_orientacion, a.uni_acad, a.emite_norma, a.nro_norma,a.tipo_norma,a.nro_540,a.observaciones,a.estado,programa,porc,a.costo_diario,check_presup,licencia,a.dias_des,a.dias_lic\".\n// \" from (\".$sql.\") a\"\n// .$where \n// .\") b \"\n// . \" )sub\"\n// . \" LEFT OUTER JOIN novedad t_no ON (sub.id_designacion=t_no.id_designacion and t_no.desde<='\".$udia.\"' and (t_no.hasta is null or t_no.hasta>='\".$pdia.\"' ))\"\n// . \" GROUP BY sub.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, sub.desde,sub.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,sub.emite_norma, sub.nro_norma,sub.tipo_norma,nro_540,sub.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,costo\" \n// . \")sub2\"//obtengo el id_novedad maximo\n// . \" LEFT OUTER JOIN novedad t_no on (t_no.id_novedad=sub2.id_novedad)\"//con el id_novedad maximo obtengo la novedad que predomina\n// .\" LEFT JOIN impresion_540 t_i ON (nro_540=t_i.id)\"//para agregar el expediente \n// .\" LEFT OUTER JOIN designacion d ON (sub2.id_designacion=d.id_designacion)\"//como no tengo el id de la norma tengo que volver a hacer join\n// .\" LEFT OUTER JOIN norma t_nor ON (d.id_norma=t_nor.id_norma)\"\n// . \")sub3\"\n// .$where2\n// . \" order by docente_nombre,desde\"; \n $sql= \"select id_designacion,docente_nombre,legajo,nro_cargo,anio_acad,desde,hasta,cat_mapuche,cat_mapuche_nombre,cat_estat,dedic,carac,check_presup,id_departamento,id_area,id_orientacion,uni_acad,emite_norma,nro_norma,tipo_norma,nro_540,tkd,observaciones,estado,porc,dias_lic,programa,costo_vale as costo,est,expediente,nro from(\"\n . \"select sub2.*,sub2.nro_540||'/'||t_i.anio as tkd,case when t_no.tipo_nov in (1,4) then 'B('||coalesce(t_no.tipo_norma,'')||':'||coalesce(t_no.norma_legal,'')||')' else case when t_no.tipo_nov in (2,5) then 'L('||t_no.tipo_norma||':'||t_no.norma_legal||')' else sub2.estado end end as est,t_i.expediente,case when d.tipo_desig=2 then costo_reserva(d.id_designacion,costo,\".$filtro['anio']['valor'].\") else costo end as costo_vale \"\n . \" ,case when t_nor.id_norma is null then '' else case when t_nor.link is not null or t_nor.link <>'' then '<a href='||chr(39)||t_nor.link||chr(39)|| ' target='||chr(39)||'_blank'||chr(39)||'>'||t_nor.nro_norma||'</a>' else cast(t_nor.nro_norma as text) end end as nro \"\n . \"from (\"\n .\"select sub.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, sub.desde, sub.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,sub.emite_norma, sub.nro_norma,sub.tipo_norma,nro_540,sub.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,costo,max(t_no.id_novedad) as id_novedad from (\"\n .\"select distinct b.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, b.desde, b.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,emite_norma, b.nro_norma,b.tipo_norma,nro_540,b.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,case when (dias_des-dias_lic)>=0 then ((dias_des-dias_lic)*costo_diario*porc/100) else 0 end as costo\"\n .\" from (\"\n .\" select a.id_designacion,a.por_permuta,a.docente_nombre,a.legajo,a.nro_cargo,a.anio_acad, a.desde, a.hasta,a.cat_mapuche, a.cat_mapuche_nombre,a.cat_estat,a.dedic,a.carac,t.iddepto,a.id_departamento, a.id_area,a.id_orientacion, a.uni_acad, a.emite_norma, a.nro_norma,a.tipo_norma,a.nro_540,a.observaciones,a.estado,programa,porc,a.costo_diario,a.check_presup,licencia,a.dias_des,a.dias_lic\".\n \" from (\".$sql.\") a\"\n . \" INNER JOIN designacion d ON (a.id_designacion=d.id_designacion)\"\n . \" LEFT OUTER JOIN departamento t ON (t.iddepto=d.id_departamento)\"\n .$where \n .\") b \"\n . \" )sub\"\n . \" LEFT OUTER JOIN novedad t_no ON (sub.id_designacion=t_no.id_designacion and t_no.desde<='\".$udia.\"' and (t_no.hasta is null or t_no.hasta>='\".$pdia.\"' ))\"\n . \" GROUP BY sub.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, sub.desde,sub.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,sub.emite_norma, sub.nro_norma,sub.tipo_norma,nro_540,sub.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,costo\" \n . \")sub2\"//obtengo el id_novedad maximo\n . \" LEFT OUTER JOIN novedad t_no on (t_no.id_novedad=sub2.id_novedad)\"//con el id_novedad maximo obtengo la novedad que predomina\n .\" LEFT JOIN impresion_540 t_i ON (nro_540=t_i.id)\"//para agregar el expediente \n .\" LEFT OUTER JOIN designacion d ON (sub2.id_designacion=d.id_designacion)\"//como no tengo el id de la norma tengo que volver a hacer join\n .\" LEFT OUTER JOIN norma t_nor ON (d.id_norma=t_nor.id_norma)\"\n . \")sub3\"\n .$where2\n . \" order by docente_nombre,desde\"; \n return toba::db('designa')->consultar($sql);\n\t}",
"function obtenerNotasEstudiante($codigo_estudiante){\n $notas_estudiante=array();\n if(count($this->notas>0)&&!empty($this->notas))\n {\n foreach ($this->notas as $key => $row) {\n if($row['COD_ESTUDIANTE']==$codigo_estudiante){\n $notas_estudiante[]=$row;\n unset($this->notas[$key]);\n }\n }\n }\n return $notas_estudiante;\n }",
"public function contar()\n {\n $sql=\"select count(*) as estudiantes from estudiante\";\n $conteo=$this->conec->query($sql);\n if($conteo)\n {\n return $conteo->fetch_all(MYSQLI_ASSOC);; \n }\n else\n {\n return false;\n }\n }",
"function buscarEstudiantesNivelados($estudiantes,$estudiantes_clasificados){\n \n $k=0;\n\tunset ($this->notas);\n $this->notas = $this->obtenerNotas();\n if(count($estudiantes)>0)\n {\n foreach ($estudiantes as $key => $estudiante) {\n //buscamos las notas\n $reprobados = 0;\n $notas_estudiante = array();\n $notas_estudiante = $this->obtenerNotasEstudiante($estudiante['COD_ESTUDIANTE']);\n $reprobados = $this->verificarReprobados($notas_estudiante);\n unset($notas_estudiante);\n if($reprobados==0){\n $resultado = array( 'COD_ESTUDIANTE'=>$estudiante['COD_ESTUDIANTE'],\n 'COD_PROYECTO'=>$estudiante['COD_PROYECTO'],\n 'CLASIFICACION'=>'1',\n 'TIPO'=>$estudiante['TIPO']\n );\n $estudiantes_clasificados[] = $resultado;\n unset($estudiantes[$key]);\n }\n }\n }\n $resultado = array( 'ESTUDIANTES'=>$estudiantes,\n 'CLASIFICADOS'=>$estudiantes_clasificados);\n return $resultado;\n }",
"function verificarReprobados($notas_estudiante){\n $reprobados = 0;\n if(count($notas_estudiante)>0){\n foreach ($notas_estudiante as $key => $estudiantes) {\n if ((isset($estudiantes['NOTA'])?$estudiantes['NOTA']:0)<30 || $estudiantes['OBSERVACION']==20 || $estudiantes['OBSERVACION']==23 || $estudiantes['OBSERVACION']==25){\n $reprobados=1;\n break;\n }\n }\n }\n return $reprobados;\n }",
"public function check_estado($id_persona,$id_materia){\r\n $this->db->where(array('id_persona'=>$id_persona,'id_materia'=>$id_materia));\r\n $this->db->where_not_in('inscripcion_materia.id_estado_final',array(1,4));\r\n return $this->db->get('inscripcion_materia')->row_array();\r\n }",
"function obtener_facultades (){\n \n //$nombre_usuario=toba::usuario()->get_nombre();\n //$sql=\"SELECT t_s.sigla FROM sede t_s, administrador t_a WHERE t_a.nombre_usuario=$nombre_usuario AND t_s.id_sede=t_a.id_sede\";\n //$sql=\"SELECT t_ua.sigla, t_ua.descripcion FROM unidad_academica t_ua, sede t_s JOIN administrador t_a ON (t_a.nombre_usuario=$nombre_usuario) JOIN (t_a.id_sede=t_s.id_sede) WHERE t_s.sigla=t_ua.id_sede\";\n $sql=\"SELECT sigla, descripcion FROM unidad_academica WHERE sigla <> 'RECT'\";\n return toba::db('gestion_aulas')->consultar($sql);\n \n }",
"public function obtenerViajesplusAbonados();",
"public function consultarEstudianteNotificarFacultad($codigoFacultad, $codigoCarrera) {\n $estudiantes = array();\n $sql = \"SELECT DISTINCT\n E.codigoestudiante,\n CONCAT(\n EG.nombresestudiantegeneral,\n ' ',\n EG.apellidosestudiantegeneral\n ) AS Nombre,\n EG.numerodocumento,\n C.nombrecarrera,\n F.nombrefacultad,\n EG.expedidodocumento, FG.FechaGrado, FG.FechaMaximaCumplimiento\n FROM\n estudiantegeneral EG\n INNER JOIN estudiante E ON (\n E.idestudiantegeneral = EG.idestudiantegeneral\n )\n INNER JOIN usuario U ON (U.numerodocumento = EG.numerodocumento )\n INNER JOIN carrera C ON (\n C.codigocarrera = E.codigocarrera \n )\n INNER JOIN facultad F ON (\n F.codigofacultad = C.codigofacultad\n )\n INNER JOIN prematricula PR ON (\n PR.codigoestudiante = E.codigoestudiante\n )\n INNER JOIN detalleprematricula DP ON (\n DP.idprematricula = PR.idprematricula\n )\n INNER JOIN planestudio P ON (\n P.codigocarrera = C.codigocarrera\n )\n INNER JOIN planestudioestudiante PE ON (\n PE.idplanestudio = P.idplanestudio\n AND PE.codigoestudiante = E.codigoestudiante AND PE.codigoestadoplanestudioestudiante != 200\n )\n INNER JOIN situacioncarreraestudiante S ON (\n S.codigosituacioncarreraestudiante = E.codigosituacioncarreraestudiante\n )\n INNER JOIN FechaGrado FG ON ( FG.CarreraId = C.codigocarrera )\n WHERE\n S.codigosituacioncarreraestudiante NOT IN (100,101,102,103,109,400,104)\n AND DP.codigoestadodetalleprematricula = 30\n AND PR.semestreprematricula = P.cantidadsemestresplanestudio AND E.semestre = P.cantidadsemestresplanestudio\n AND C.codigomodalidadacademica IN (200,300) AND C.fechavencimientocarrera > NOW() \n AND PR.codigoperiodo = ( SELECT MAX(codigoperiodo) FROM periodo WHERE codigoestadoperiodo = 1 )\n AND FG.CodigoPeriodo = ( SELECT MAX(codigoperiodo) FROM periodo WHERE codigoestadoperiodo = 1 )\n AND F.codigofacultad = ?\n AND C.codigocarrera = ?\n GROUP BY\n E.codigoestudiante\n ORDER BY C.codigocarrera\";\n\n $this->persistencia->crearSentenciaSQL($sql);\n $this->persistencia->setParametro(0, $codigoFacultad, false);\n $this->persistencia->setParametro(1, $codigoCarrera, false);\n $this->persistencia->ejecutarConsulta();\n while ($this->persistencia->getNext()) {\n $estudiante = new Estudiante($this->persistencia);\n $estudiante->setCodigoEstudiante($this->persistencia->getParametro(\"codigoestudiante\"));\n $estudiante->setNombreEstudiante($this->persistencia->getParametro(\"Nombre\"));\n $estudiante->setNumeroDocumento($this->persistencia->getParametro(\"numerodocumento\"));\n $estudiante->setExpedicion($this->persistencia->getParametro(\"expedidodocumento\"));\n\n $fechaGrado = new FechaGrado(null);\n $fechaGrado->setFechaGraduacion($this->persistencia->getParametro(\"FechaGrado\"));\n $fechaGrado->setFechaMaxima($this->persistencia->getParametro(\"FechaMaximaCumplimiento\"));\n\n $carrera = new Carrera(null);\n\n $facultad = new Facultad(null);\n $facultad->setNombreFacultad($this->persistencia->getParametro(\"nombrefacultad\"));\n\n $carrera->setFacultad($facultad);\n\n $carrera->setNombreCarrera($this->persistencia->getParametro(\"nombrecarrera\"));\n\n $fechaGrado->setCarrera($carrera);\n\n $estudiante->setFechaGrado($fechaGrado);\n\n $estudiantes[count($estudiantes)] = $estudiante;\n }\n $this->persistencia->freeResult();\n\n return $estudiantes;\n }",
"public function findPagoDetalleActividadEconomica()\r\n\t\t{\r\n\t\t\t$codigoPresupuestario = self::getCodigoPresupuestarioActividadEconomica();\r\n\r\n\t\t\t$registers = [];\r\n\t\t\t// Pagos con periodos mayores a cero\r\n\t\t\t$registers = self::findPagoDetallePeriodoMayorCero($codigoPresupuestario, [1]);\r\n\t\t\tif ( !self::guardarConsultaRecaudacion($registers) ) {\r\n\t\t\t\tself::errorCargarData(Yii::t('backend', 'Actividad Economica periodo mayores a cero'));\r\n\t\t\t}\r\n\r\n\t\t\t$registers = [];\r\n\t\t\t// Pagos con periodos iguales a cero\r\n\t\t\t$registers = self::findPagoDetallePeriodoIgualCero($codigoPresupuestario, [1]);\r\n\t\t\tif ( !self::guardarConsultaRecaudacion($registers) ) {\r\n\t\t\t\tself::errorCargarData(Yii::t('backend', 'Actividad Economica periodo iguales a cero'));\r\n\t\t\t}\r\n\r\n\t\t}",
"public function consultar($filtro, $codigoModalidadAcademica = NULL) {\n $estudiantes = array();\n\n /* Modified Diego Rivera <[email protected]>\n * Se añade filtor 105(Admitido que no Ingreso) en S.codigosituacioncarreraestudiante NOT IN (100, 101, 102, 103, 108, 109, 112, 302, 400 ) \n * Since October 5,2017\n */\n $sql = \"\n SELECT DISTINCT\n P.idplanestudio,\n EG.idestudiantegeneral,\n E.codigoestudiante,\n CONCAT( EG.apellidosestudiantegeneral, ' ', EG.nombresestudiantegeneral ) AS Nombre,\n C.nombrecarrera,\n PR.semestreprematricula,\n PR.codigoestadoprematricula,\n C.codigocarrera,\n FG.FechaMaximaCumplimiento,\n MAX( PR.codigoperiodo ) AS codigoperiodo,\n FG.FechaGradoId,\n EG.EstadoActualizaDato,\n E.codigosituacioncarreraestudiante,\n FG.TipoGradoId \n FROM\n estudiantegeneral EG\n INNER JOIN estudiante E ON ( E.idestudiantegeneral = EG.idestudiantegeneral )\n INNER JOIN carrera C ON ( C.codigocarrera = E.codigocarrera )\n INNER JOIN facultad F ON ( F.codigofacultad = C.codigofacultad )\n LEFT JOIN prematricula PR ON ( PR.codigoestudiante = E.codigoestudiante )\n LEFT JOIN detalleprematricula DP ON ( DP.idprematricula = PR.idprematricula )\n INNER JOIN planestudio P ON ( P.codigocarrera = C.codigocarrera )\n INNER JOIN planestudioestudiante PE ON ( PE.idplanestudio = P.idplanestudio AND PE.codigoestudiante = E.codigoestudiante AND PE.codigoestadoplanestudioestudiante != 200 )\n INNER JOIN situacioncarreraestudiante S ON ( S.codigosituacioncarreraestudiante = E.codigosituacioncarreraestudiante )\n INNER JOIN FechaGrado FG ON ( FG.CarreraId = C.codigocarrera ) \n WHERE\n S.codigosituacioncarreraestudiante NOT IN ( 100, 101, 102, 103, 108, 109, 112, 302, 400, 105 ) \n AND (\n PR.semestreprematricula BETWEEN ( IF ( C.codigocarrera = 1186, P.cantidadsemestresplanestudio - 9, P.cantidadsemestresplanestudio - 3 ) ) \n AND P.cantidadsemestresplanestudio \n OR E.semestre = P.cantidadsemestresplanestudio \n ) \";\n\n if (empty($codigoModalidadAcademica) || $codigoModalidadAcademica == 200 || $codigoModalidadAcademica == 800) {\n $sql .= \" AND ( DP.codigoestadodetalleprematricula IN (10,30,20) OR DP.codigoestadodetalleprematricula IS NULL )\";\n }\n $sql .= $filtro;\n $sql .= \" AND E.codigoestudiante NOT IN ( \n SELECT\n R.codigoestudiante\n FROM \n registrograduado R\n WHERE\n R.codigoestudiante = E.codigoestudiante AND R.codigoestado = 100\n UNION\n SELECT \n RG.EstudianteId\n FROM \n RegistroGrado RG\n WHERE\n RG.EstudianteId = E.codigoestudiante AND RG.CodigoEstado = 100\";\n \n if (isset($_POST[\"cmbTipoGrado\"]) && $_POST[\"cmbTipoGrado\"] == 1) {\n $sql .= \" UNION\n SELECT\n DC.EstudianteId\n FROM\n DetalleAcuerdoActa DC\n INNER JOIN AcuerdoActa AC ON ( AC.AcuerdoActaId = DC.AcuerdoActaId )\n INNER JOIN FechaGrado FGR ON (FGR.FechaGradoId = AC.FechaGradoId )\n WHERE\n DC.EstudianteId = E.codigoestudiante AND FGR.TipoGradoId = 2 AND DC.CodigoEstado = 100\";\n }\n if (isset($_POST[\"cmbTipoGrado\"]) && $_POST[\"cmbTipoGrado\"] == 2) {\n $sql .= \" UNION\n SELECT\n DC.EstudianteId\n FROM\n DetalleAcuerdoActa DC\n INNER JOIN AcuerdoActa AC ON (\n AC.AcuerdoActaId = DC.AcuerdoActaId\n )\n INNER JOIN FechaGrado FGR ON (FGR.FechaGradoId = AC.FechaGradoId )\n WHERE\n DC.EstudianteId = E.codigoestudiante\n AND FGR.TipoGradoId = 1\n AND DC.CodigoEstado = 100\";\n }\n $sql .= \")\n GROUP BY E.codigoestudiante\n ORDER BY EG.apellidosestudiantegeneral ASC\";\n \n $this->persistencia->crearSentenciaSQL($sql);\n $this->persistencia->ejecutarConsulta();\n while ($this->persistencia->getNext()) {\n \n $estudiante = new Estudiante($this->persistencia);\n $estudiante->setIdEstudiante($this->persistencia->getParametro(\"idestudiantegeneral\"));\n $estudiante->setCodigoEstudiante($this->persistencia->getParametro(\"codigoestudiante\"));\n $estudiante->setNombreEstudiante($this->persistencia->getParametro(\"Nombre\"));\n $estudiante->setEstadoActualizaDato($this->persistencia->getParametro(\"EstadoActualizaDato\"));\n\n $situacionCarreraEstudiante = new SituacionCarreraEstudiante(null);\n $situacionCarreraEstudiante->setCodigoSituacion($this->persistencia->getParametro(\"codigosituacioncarreraestudiante\"));\n\n $fechaGrado = new FechaGrado(null);\n $fechaGrado->setIdFechaGrado($this->persistencia->getParametro(\"FechaGradoId\"));\n $fechaGrado->setFechaMaxima($this->persistencia->getParametro(\"FechaMaximaCumplimiento\"));\n\n $tipoGrado = new TipoGrado(null);\n $tipoGrado->setIdTipoGrado($this->persistencia->getParametro(\"TipoGradoId\"));\n\n $carrera = new Carrera(null);\n $carrera->setCodigoCarrera($this->persistencia->getParametro(\"codigocarrera\"));\n $carrera->setNombreCarrera($this->persistencia->getParametro(\"nombrecarrera\"));\n\n $fechaGrado->setCarrera($carrera);\n $fechaGrado->setTipoGrado($tipoGrado);\n\n $estudiante->setFechaGrado($fechaGrado);\n $estudiante->setSituacionCarreraEstudiante($situacionCarreraEstudiante);\n\n $preMatricula = new PreMatricula(null);\n $preMatricula->setSemestrePreMatricula($this->persistencia->getParametro(\"semestreprematricula\"));\n\n $periodo = new Periodo(null);\n $periodo->setCodigo($this->persistencia->getParametro(\"codigoperiodo\"));\n $preMatricula->setPeriodo($periodo);\n\n $estudiante->setPreMatricula($preMatricula);\n $estudiantes[count($estudiantes)] = $estudiante;\n }\n $this->persistencia->freeResult();\n\n return $estudiantes;\n }",
"function solo_positivi() {\r\n $query = \"SELECT s.NomeStudente AS nome, s.CognomeStudente AS cognome FROM Studente s WHERE s.id_studente NOT IN (SELECT st.id_studente FROM Sudente st INNER JOIN Voto v ON st.id_studente = v.id_studente WHERE v.Voto < 6 GROUP BY id_studente\");\r\n $risultato = $conn -> query($query);\r\n\r\n return $risultato;\r\n }",
"function contarReprobados($espacios_por_cursar){\n $cantidad=0;\n if(count($espacios_por_cursar)>0){\n foreach ($espacios_por_cursar as $key => $espacio) {\n if($espacio['REPROBADO']==1){\n $cantidad++;\n \t }\n }\n }\n return $cantidad; \n }",
"function contarPruebasAcuerdo2009007($reglamentoEstudiante){\r\n if(is_array($reglamentoEstudiante)){\r\n $veces=0;\r\n foreach ($reglamentoEstudiante as $reglamento) {\r\n $anioperiodo=$reglamento['REG_ANO'].$reglamento['REG_PER'];\r\n if($reglamento['REG_REGLAMENTO']=='S' && $anioperiodo!=20101 && $anioperiodo!=20111 ){\r\n $veces++;\r\n }\r\n }\r\n }else{\r\n $veces='';\r\n }\r\n return $veces;\r\n }",
"function obter_todas_noticias_ativas() {\n $this->db->where(array(\"status_noticia\"=>1));\n $this->db->order_by(\"data_noticia\", \"desc\");\n return $this->db->get('noticia');\n }",
"function obtener_aulas_x (){\n //Hay que tener en cuenta el usuario que se loguea\n// $nombre_usuario=toba::usuario()->get_id();\n// $sql=\"SElECT t_a.nombre, t_a.id_aula \n// FROM aula t_a \n// JOIN administrador t_admin ON (t_a.id_sede=t_admin.id_sede)\n// WHERE t_admin.nombre_usuario='$nombre_usuario'\";\n $sql=\"SELECT nombre, id_aula FROM aula WHERE (NOT eliminada)\";\n return toba::db('gestion_aulas')->consultar($sql);\n \n }",
"function voti_negativi() {\r\n $query = \"SELECT s.NomeStudente AS nome, s.CognomeStudente AS cognome FROM Sudente s INNER JOIN Voto v ON s.id_studente = v.id_studente WHERE v.Voto < 6 GROUP BY NomeStudente, CognomeStudente\";\r\n $risultato = $conn -> query($query);\r\n\r\n return $risultato;\r\n }",
"function get_periodos_activos (){\n \n $fecha=date('Y-m-d');\n $anio_lectivo=date('Y');\n \n $sql_1=\"SELECT t_p.id_periodo,\n t_c.numero || ' ' || 'CUATRIMESTRE' as descripcion \n FROM periodo t_p \n JOIN cuatrimestre t_c ON (t_p.id_periodo=t_c.id_periodo AND t_p.anio_lectivo=$anio_lectivo\n AND (('$fecha' <= t_p.fecha_inicio) OR ('$fecha' BETWEEN t_p.fecha_inicio AND t_p.fecha_fin)))\";\n $cuatrimestre=toba::db('gestion_aulas')->consultar($sql_1);\n \n $sql_2=\"SELECT t_p.id_periodo,\n 'TURNO DE EXAMEN' || ' ' || t_ef.turno || ' ' || t_ef.numero || ' ' || 'LLAMADO' as descripcion\n FROM periodo t_p \n JOIN examen_final t_ef ON (t_p.id_periodo=t_ef.id_periodo AND t_p.anio_lectivo=$anio_lectivo\n AND (('$fecha' <= t_p.fecha_inicio) OR ('$fecha' BETWEEN t_p.fecha_inicio AND t_p.fecha_fin)))\";\n $examen_final=toba::db('gestion_aulas')->consultar($sql_2);\n \n $sql_3=\"SELECT t_p.id_periodo,\n 'CURSO DE INGRESO' || ' ' || t_ci.facultad || ' ' || t_ci.nombre as descripcion\n FROM periodo t_p \n JOIN curso_ingreso t_ci ON (t_p.id_periodo=t_ci.id_periodo AND t_p.anio_lectivo=$anio_lectivo\n AND (('$fecha' <= t_p.fecha_inicio) OR ('$fecha' BETWEEN t_p.fecha_inicio AND t_p.fecha_fin)) )\";\n $curso_ingreso=toba::db('gestion_aulas')->consultar($sql_3);\n \n $this->unificar_periodos(&$cuatrimestre, $examen_final);\n \n $this->unificar_periodos(&$cuatrimestre, $curso_ingreso);\n \n return $cuatrimestre; \n \n }",
"public function anioLectivoSiguiente(){\n $fecha= date('d/m/Y');\n $fecha=Carbon::createFromFormat('d/m/Y', date('d/m/Y'));\n $fecha->addYear();\n //$fecha->addYear();\n\n $fechaBuscar=substr($fecha, 0,-15);//$fecha_de_creacion.slice(0,-6);\n $fechaBuscar=(int)$fechaBuscar;\n $anio=Anio::where('año',$fechaBuscar)->select('id')->get()->toArray();\n\n if($anio!=null){\n $var=\"Existe\";\n return $var;\n }else{\n $var=\"NoExiste\";\n return $var;\n }\n }",
"public function colaboradores_sem_competencia(){\n //where ((B.data_inserida-'$data') && (C.data_inserida-'$data') )>tempo_sem_atualizar\n return $this->db->query(\"select * from colaboradores A where not exists (select * from competencias_colaboradores B where A.ID_colaborador=B.colaboradores_id_colaborador) and status_colaborador=0\");\n }",
"function buscarEspaciosVistos(){\r\n $i=0;\r\n $espacios_vistos=isset($espacios_vistos)?$espacios_vistos:'';\r\n $espacios=isset($reprobados)?$reprobados:'';\r\n \r\n if(is_array($this->espaciosCursados)){\r\n foreach ($this->espaciosCursados as $espacio) {\r\n $espacios[$i]=$espacio[0];\r\n $i++;\r\n }\r\n }\r\n \r\n if(is_array($espacios)){\r\n $espacios= array_unique($espacios);\r\n if($this->datosEstudiante['IND_CRED']=='S'){\r\n foreach ($espacios as $key => $espacio) {\r\n foreach ($this->espaciosCursados as $cursado) {\r\n if($espacio==$cursado['CODIGO']){\r\n $espacios_vistos[$key]['CODIGO']=$cursado['CODIGO'];\r\n $espacios_vistos[$key]['CREDITOS']=(isset($cursado['CREDITOS'])?$cursado['CREDITOS']:0);\r\n }\r\n }\r\n }\r\n }else{\r\n $espacios_vistos=$espacios;\r\n }\r\n \r\n }\r\n return $espacios_vistos;\r\n }",
"public function compensablesdisponibles($cuadrante){\n $empleados = $cuadrante->empleados;\n #ver si los empleados tienes compensables pendientes.\n\n //TO DO: el objetivo sera llegar a un array con key el código de empleado y value el primer día compensable (mas adelante habrá que hacer que salgan todos los días compensables y que se pueda elegir)\n $compensablesdisponibles = [];\n\n // $compensablesdisponibles = DB::table('compensables')\n // ->join()\n\n}",
"function pegaEstados()\n {\n $lista_estados = array(\n 'ac' => 'Acre',\n 'al' => 'Alagoas',\n 'ap' => 'Amapá',\n 'am' => 'Amazonas',\n 'ba' => 'Bahia',\n 'ce' => 'Ceará',\n 'df' => 'Distrito Federal',\n 'es' => 'Espirito Santo',\n 'go' => 'Goiás',\n 'ma' => 'Maranhão',\n 'ms' => 'Mato Grosso do Sul',\n 'mt' => 'Mato Grosso',\n 'mg' => 'Minas Gerais',\n 'pa' => 'Pará',\n 'pb' => 'Paraíba',\n 'pr' => 'Paraná',\n 'pe' => 'Pernanbuco',\n 'pi' => 'Piauí',\n 'rj' => 'Rio de Janeiro',\n 'rn' => 'Rio Grande do Norte',\n 'rs' => 'Rio Grande do Sul',\n 'ro' => 'Rondônia',\n 'rr' => 'Roraima',\n 'sc' => 'Santa Catarina',\n 'sp' => 'São Paulo',\n 'se' => 'Sergipe',\n 'to' => 'Tocantis'\n );\n\n\n return $lista_estados;\n }",
"function buscarEspaciosAprobados($notaAprobatoria){\r\n $aprobados=array();\r\n if(is_array($this->espaciosCursados))\r\n {\r\n foreach ($this->espaciosCursados as $value1)\r\n {\r\n if ((isset($value1['NOTA'])&&$value1['NOTA']>=$notaAprobatoria)||(isset($value1['CODIGO_OBSERVACION'])?$value1['CODIGO_OBSERVACION']:'')==19||(isset($value1['CODIGO_OBSERVACION'])?$value1['CODIGO_OBSERVACION']:'')==22||(isset($value1['CODIGO_OBSERVACION'])?$value1['CODIGO_OBSERVACION']:'')==24)\r\n {\r\n $aprobados[]=array('CODIGO'=>$value1['CODIGO'],'NIVEL'=>(isset($value1['NIVEL'])?$value1['NIVEL']:''),'CREDITOS'=>(isset($value1['CREDITOS'])?$value1['CREDITOS']:''));\r\n }\r\n }\r\n\r\n }else\r\n {\r\n $aprobados='';\r\n }\r\n return $aprobados;\r\n }"
] |
[
"0.64883655",
"0.63346136",
"0.62909114",
"0.62624717",
"0.61872476",
"0.6154388",
"0.60931987",
"0.60706735",
"0.60426354",
"0.601779",
"0.6014875",
"0.59697086",
"0.5903829",
"0.588561",
"0.58854324",
"0.58634377",
"0.58628917",
"0.5834981",
"0.5832171",
"0.5825592",
"0.57783264",
"0.5756612",
"0.57535964",
"0.57435024",
"0.57324135",
"0.57187885",
"0.5707164",
"0.56963193",
"0.5694923",
"0.56798834"
] |
0.6360062
|
1
|
Funcion que busca en un arreglo de espacios los reprobados y retorna la cantidad total de reprobados
|
function contarReprobados($espacios_por_cursar){
$cantidad=0;
if(count($espacios_por_cursar)>0){
foreach ($espacios_por_cursar as $key => $espacio) {
if($espacio['REPROBADO']==1){
$cantidad++;
}
}
}
return $cantidad;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function reprocesos($anho, $mes, $razon_reproceso)\r\n\t{\r\n\t\t$dia = date('d');\r\n\t\t$total_t = 0;\r\n\t\t$total_tr = 0;\r\n\t\t$total_tt = 0;\r\n\t\t$pedidos = array();\r\n\t\tif($mes == 'anual')\r\n\t\t{\r\n\t\t\t$fecha1 = $anho.'-01-01';\r\n\t\t\t$fecha2 = $anho.'-12-01';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$fecha1 = $anho.'-'.$mes.'-01';\r\n\t\t\t$fecha2 = $anho.'-'.$mes.'-31';\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t$SQL = '';\r\n\t\t$tabla = '';\r\n\t\t\r\n\t\tif(strtotime('2013-06-20') < strtotime($anho.'-'.$mes.'-'.$dia))\r\n\t\t{\r\n\t\t\tif('todos' != $razon_reproceso)\r\n\t\t\t{\r\n\t\t\t\t$tabla = ' ,reproceso_detalle reproc ';\r\n\t\t\t\t$SQL .= 'and ped.id_repro_deta = reproc.id_repro_deta';\r\n\t\t\t\t$SQL .= ' and reproc.id_repro_deta = \"'.$razon_reproceso.'\"';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//Buscar clientes que poseen reprocesos\r\n\t\t$Consulta = '\r\n\t\t\t\t\t\t\tselect distinct proc.id_cliente, codigo_cliente\r\n\t\t\t\t\t\t\tfrom procesos proc, pedido ped, cliente cli '.$tabla.'\r\n\t\t\t\t\t\t\twhere proc.id_proceso = ped.id_proceso\r\n\t\t\t\t\t\t\t\tand cli.id_cliente = proc.id_cliente\r\n\t\t\t\t\t\t\t\tand ped.fecha_entrega >= \"'.$fecha1.'\"\r\n\t\t\t\t\t\t\t\tand ped.fecha_entrega <= \"'.$fecha2.'\"\r\n\t\t\t\t\t\t\t\tand ped.id_tipo_trabajo = \"4\"\r\n\t\t\t\t\t\t\t\t'.$SQL.'\r\n\t\t\t\t\t\t\t\tand cli.id_grupo = \"'.$this->session->userdata('id_grupo').'\"\r\n\t\t\t\t\t\t\torder by id_cliente\r\n\t\t\t\t\t\t\t';\r\n\t\t\r\n\t\t$Resultado= $this->db->query($Consulta);\r\n\t\t$Info = $Resultado->result_array();\r\n\t\t\r\n\t\tforeach($Info as $Datos)\r\n\t\t{\r\n\t\t\t$pedidos[$Datos['id_cliente']]['id_cliente'] = $Datos['id_cliente'];\r\n\t\t\t$pedidos[$Datos['id_cliente']]['codigo_cliente'] = $Datos['codigo_cliente'];\r\n\r\n\t\t\t//Buscar reprocesos por cliente\r\n\t\t\t$Consulta2 = '\r\n\t\t\t\t\t\t\t\t\tselect count(id_cliente) as total\r\n\t\t\t\t\t\t\t\t\tfrom procesos proc, pedido ped '.$tabla.'\r\n\t\t\t\t\t\t\t\t\twhere proc.id_proceso = ped.id_proceso\r\n\t\t\t\t\t\t\t\t\tand ped.fecha_entrega >= \"'.$fecha1.'\"\r\n\t\t\t\t\t\t\t\t\tand ped.fecha_entrega <= \"'.$fecha2.'\"\r\n\t\t\t\t\t\t\t\t\tand ped.id_tipo_trabajo = \"4\"\r\n\t\t\t\t\t\t\t\t\t'.$SQL.'\r\n\t\t\t\t\t\t\t\t\tand id_cliente = \"'.$Datos['id_cliente'].'\"\r\n\t\t\t\t\t\t\t\t\torder by id_cliente';\r\n\t\t\t\r\n\t\t\t$Resultado2 = $this->db->query($Consulta2);\r\n\t\t\t$Info2 = $Resultado2->result_array();\r\n\t\t\tforeach($Info2 as $Datos2)\r\n\t\t\t{\r\n\t\t\t\t$total_r = $Datos2[\"total\"];\r\n\t\t\t\t$total_tt += $total_r;\r\n\t\t\t\t$pedidos[$Datos['id_cliente']]['total_reprocesos'] = $total_r;\r\n\t\t\t\t$pedidos[$Datos['id_cliente']]['num_reprocesos'] = $total_tt;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Total pedidos del cliente en el rango de fecha\r\n\t\t\t$Consulta3 = 'select count(id_cliente) as total_a\r\n\t\t\t\t\t\t\t\t\tfrom procesos proc, pedido ped\r\n\t\t\t\t\t\t\t\t\twhere proc.id_proceso = ped.id_proceso\r\n\t\t\t\t\t\t\t\t\tand ped.fecha_entrega >= \"'.$fecha1.'\"\r\n\t\t\t\t\t\t\t\t\tand ped.fecha_entrega <= \"'.$fecha2.'\"\r\n\t\t\t\t\t\t\t\t\tand id_cliente = \"'.$Datos['id_cliente'].'\"\r\n\t\t\t\t\t\t\t\t\torder by id_cliente';\r\n\t\t\t\r\n\t\t\t$Resultado3 = $this->db->query($Consulta3);\r\n\t\t\t$Info3 = $Resultado3->result_array();\r\n\t\t\tforeach($Info3 as $Datos3)\r\n\t\t\t{\r\n\t\t\t\t$total_t = $Datos3[\"total_a\"];\r\n\t\t\t\t$total_tr = $total_tr + $total_t;\r\n\t\t\t\t$porc = ($total_r * 100) / $total_t;\r\n\t\t\t\t$porc = round($porc * 100) / 100;\r\n\t\t\t\t$pedidos[$Datos['id_cliente']]['total_pedidos'] = $total_t;\r\n\t\t\t\t$pedidos[$Datos['id_cliente']]['porcentaje'] = $porc;\r\n\t\t\t\t$pedidos[$Datos['id_cliente']]['total_trabajos'] = $total_tr;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $pedidos;\r\n\t}",
"function verificarReprobados($notas_estudiante){\n $reprobados = 0;\n if(count($notas_estudiante)>0){\n foreach ($notas_estudiante as $key => $estudiantes) {\n if ((isset($estudiantes['NOTA'])?$estudiantes['NOTA']:0)<30 || $estudiantes['OBSERVACION']==20 || $estudiantes['OBSERVACION']==23 || $estudiantes['OBSERVACION']==25){\n $reprobados=1;\n break;\n }\n }\n }\n return $reprobados;\n }",
"public function getTotalSubeixoRodovias(){\n\t\t$total = 0;\n\t\t$i=0;\n\t\twhile($i<count($this->result)){\n\t\t\tif($this->result[$i]->idn_digs == 1000)\n\t\t\t\t$total++;\n\t\t\t$i++;\n\t\t}\n\t\treturn $total;\n\t}",
"function ProjetosRealizados() {\n\n $count = 0;\n $conexao = new classeConexao();\n\n //selecionando id dos projetos\n $projetos = $conexao::fetch(\"SELECT id FROM tb_projetos\");\n\n foreach ($projetos as $projeto) {\n\n //Qtd tarefas a fazer\n $tarefasFazer = $conexao::fetchuniq(\"SELECT COUNT(id) as qtd FROM tb_tarefas WHERE tb_tarefas_status=0 AND tb_tarefas_projeto = \".$projeto['id']);\n\n //Qtd tarefas feitas\n $tarefasFeitas = $conexao::fetchuniq(\"SELECT COUNT(id) as qtd FROM tb_tarefas WHERE tb_tarefas_status=1 AND tb_tarefas_projeto = \".$projeto['id']);\n\n //Porcentagem\n if(($tarefasFeitas['qtd'] + $tarefasFazer['qtd']) == 0){\n $qtd1 = 1;\n }else{\n $qtd1 = ($tarefasFeitas['qtd'] + $tarefasFazer['qtd']);\n }\n\n $porcentagem = ($tarefasFeitas['qtd'] * 100) / ($qtd1);\n\n if($porcentagem==100) {\n $count++;\n }\n }\n\n return $count;\n}",
"function calcular_promedio($materias) {\n $sum_notas_uv = 0;\n $sum_uv = 0;\n $resultado = 0;\n\n foreach($materias as $clave => $valor) {\n for ($i=0; $i < count($valor); $i++) { \n $nota = $valor[1];\n $uv = $valor[2];\n\n $sum_notas_uv += $nota * $uv;\n $sum_uv += $uv;\n }\n }\n\n // validar que $sum_uv != 0\n\n $resultado = $sum_notas_uv / $sum_uv;\n return round($resultado, 0);\n}",
"function contarPruebasAcuerdo1993027($reglamentoEstudiante){\r\n if(is_array($reglamentoEstudiante)){\r\n $veces=0;\r\n foreach ($reglamentoEstudiante as $reglamento) {\r\n if($reglamento['REG_REGLAMENTO']=='S'){\r\n $veces++;\r\n }\r\n }\r\n }else{\r\n $veces='';\r\n }\r\n return $veces;\r\n }",
"function contarPruebasAcuerdo2011004($reglamentoEstudiante){\r\n if(is_array($reglamentoEstudiante)){\r\n $veces=0;\r\n foreach ($reglamentoEstudiante as $reglamento) {\r\n $anioperiodo=$reglamento['REG_ANO'].$reglamento['REG_PER'];\r\n if($reglamento['REG_REGLAMENTO']=='S' && $anioperiodo>=20113){\r\n $veces++;\r\n }\r\n }\r\n }else{\r\n $veces='';\r\n }\r\n return $veces;\r\n }",
"function getCantidadTarjetas(){\n\t\t$cantidad=0;\n\t\tforeach($this->objetos_tarjetas as $tarjetas)\n\t\t\tif($tarjetas != NULL)\t\n\t\t\t\t$cantidad++;\n\t\treturn\t$cantidad;\n\t}",
"public function getTotalPracRechazadas() {\n return $this->totalPracRechazadas;\n }",
"public function resumo() {\n $resultado = array(\n 'matriz' => $this->getTabuleiro(),\n 'dimensao' => $this->dimensao, \n 'palavras' => $this->quantidadePalavras,\n 'inseridos' => 0,\n 'falhas' => 0);\n $inseridos = 0;\n foreach ($this->palavras as $palavra) {\n array_push($resultado, $palavra->resumo());\n if ($palavra->direcao != INDEFINIDO) {\n $inseridos++;\n }\n }\n $resultado['inseridos'] = $inseridos;\n $resultado['falhas'] = $resultado['palavras'] - $inseridos;\n return $resultado;\n }",
"public function get_recogidas_quantity($array_filtros=NULL) {\n /* Terminales que asignaron a la incidencia pero no se usaron*/\n $sql=\"SELECT m.id_incidencia,i.id_pds, d.* ,'Se asigno pero no se uso' as descripcion\n FROM material_incidencias m\n INNER JOIN devices_almacen a ON a.id_devices_almacen=m.id_devices_almacen AND a.status='Transito'\n INNER JOIN incidencias i ON i.id_incidencia=m.id_incidencia AND i.status='Pendiente recogida'\n INNER JOIN device d ON d.id_device=a.id_device\n UNION\n SELECT i.id_incidencia,i.id_pds,d.*,'genero la incidencia' as descripcion\n FROM devices_almacen a\n INNER JOIN incidencias i ON i.id_incidencia = a.id_incidencia AND a.status='Transito' AND i.status='Pendiente recogida'\n INNER JOIN device d ON d.id_device=a.id_device\";\n\n return $this->db->query($sql)->num_rows();\n }",
"function ProjetosPendentes() {\n\n $count = 0;\n $conexao = new classeConexao();\n\n //selecionando id dos projetos\n $projetos = $conexao::fetch(\"SELECT id FROM tb_projetos\");\n\n foreach ($projetos as $projeto) {\n\n //Qtd tarefas a fazer\n $tarefasFazer = $conexao::fetchuniq(\"SELECT COUNT(id) as qtd FROM tb_tarefas WHERE tb_tarefas_status=0 AND tb_tarefas_projeto = \".$projeto['id']);\n\n //Qtd tarefas feitas\n $tarefasFeitas = $conexao::fetchuniq(\"SELECT COUNT(id) as qtd FROM tb_tarefas WHERE tb_tarefas_status=1 AND tb_tarefas_projeto = \".$projeto['id']);\n\n //Porcentagem\n if(($tarefasFeitas['qtd'] + $tarefasFazer['qtd']) == 0){\n $qtd3 = 1;\n }else{\n $qtd3 = ($tarefasFeitas['qtd'] + $tarefasFazer['qtd']);\n }\n $porcentagem = ($tarefasFeitas['qtd'] * 100) / ($qtd3);\n\n if($porcentagem!=100) {\n $count++;\n }\n }\n\n return $count;\n}",
"function contarPruebasAcuerdo2009007($reglamentoEstudiante){\r\n if(is_array($reglamentoEstudiante)){\r\n $veces=0;\r\n foreach ($reglamentoEstudiante as $reglamento) {\r\n $anioperiodo=$reglamento['REG_ANO'].$reglamento['REG_PER'];\r\n if($reglamento['REG_REGLAMENTO']=='S' && $anioperiodo!=20101 && $anioperiodo!=20111 ){\r\n $veces++;\r\n }\r\n }\r\n }else{\r\n $veces='';\r\n }\r\n return $veces;\r\n }",
"function contarEspaciosNivelados($cantidadMatriculas) {\r\n $creditos=0;\r\n $nivelados=array();\r\n if (is_array($this->espaciosPlan))\r\n {\r\n foreach ($this->espaciosPlan as $key => $espacio) {\r\n if ($espacio['SEMESTRE']<=$cantidadMatriculas)\r\n {\r\n $nivelados[]=$espacio;\r\n $creditos=$creditos+(isset($espacio['CREDITOS'])?$espacio['CREDITOS']:'');\r\n }\r\n }\r\n }\r\n if($this->datosEstudiante['IND_CRED']=='N')\r\n {\r\n return count($nivelados);\r\n }elseif($this->datosEstudiante['IND_CRED']=='S')\r\n {\r\n return $creditos;\r\n }else{}\r\n }",
"public function getCantidadPendienteDeFacturacion()\n {\n // 1) a items factura ( proceso pedido - factura - entrada )\n // 2) a items entrada ( proceso pedido - entrada - factura )\n // \n // Si está ligado a items entrada ...\n if ( $this->getReferenciasItemEntradaMercancias()->count() ){\n \n $cantidadFacturada = 0;\n\n /* @var $itemEntradaMercancias \\Pronit\\ComprasBundle\\Entity\\Documentos\\EntradasMercancias\\ItemEntradaMercancias */\n foreach( $this->getReferenciasItemEntradaMercancias() as $itemEntradaMercancias )\n {\n $cantidadFacturada = $cantidadFacturada + $itemEntradaMercancias->getCantidadFacturada();\n }\n\n return $this->getCantidad() - $cantidadFacturada;\n } \n }",
"function promedio_general($vector){ \n $promedio=0;\n foreach ($vector as $key => $value) {\n foreach ($value as $c => $n) {\n $promedio=$promedio+$n;\n }\n }\n return ($promedio/10);\n }",
"public function totalRegistros();",
"function calcularPrecioPedido($tipoPizza,$tamanoPizza,$masaPizza,$extrasPizza,$numeroPizzas){\r\n $precio = 0.0;\r\n //TIPO PIZZA\r\n switch ($tipoPizza) {\r\n case 'margarita':\r\n $precio = $precio + 4;\r\n break;\r\n case 'barbacoa':\r\n $precio = $precio + 4.5;\r\n break;\r\n case '4estaciones':\r\n $precio = $precio + 5;\r\n break;\r\n case '4quesos':\r\n $precio = $precio + 3.75;\r\n break;\r\n case 'carbonara':\r\n $precio = $precio + 4;\r\n break;\r\n case 'romana':\r\n $precio = $precio + 5;\r\n break;\r\n case 'mediterranea':\r\n $precio = $precio + 4.25;\r\n break;\r\n }\r\n //TAMAÑO PIZZA\r\n switch ($tamanoPizza) {\r\n case 'normal':\r\n $precio = $precio + 4;\r\n break;\r\n case 'grande':\r\n $precio = $precio + 5;\r\n break;\r\n case 'familiar':\r\n $precio = $precio + 6.5;\r\n break;\r\n }\r\n //MASA PIZZA\r\n switch ($masaPizza) {\r\n case 'fina':\r\n $precio = $precio + 2;\r\n break;\r\n case 'familiar':\r\n $precio = $precio + 2.5;\r\n break;\r\n }\r\n //EXTRAS PIZZA\r\n foreach ($extrasPizza as $key => $extras) {\r\n switch ($extras) {\r\n case 'queso':\r\n $precio += 1;\r\n break;\r\n case 'pimiento':\r\n $precio += 1;\r\n break;\r\n case 'cebolla':\r\n $precio += 1;\r\n break;\r\n case 'jamon':\r\n $precio += 1;\r\n break;\r\n case 'pollo':\r\n $precio += 1;\r\n break;\r\n }\r\n }\r\n $resultado = $precio*$numeroPizzas;\r\n return $resultado;\r\n}",
"function obtenerCantidadCupos($hora, $matriz, $tipo, $fecha) {\n\t$contador = 0;\n\tforeach($matriz as $registro=>$campo) {\n\t\tif($campo['sesion'] == $tipo && $campo['HORA_TURNO'] == $hora && $fecha == $campo['FECHA_TURNO']) {\n\t\t\t$contador+= $campo['cantidad'];\n\t\t}\n\t}\n\treturn $contador;\n}",
"function promedios_por_materia($vector){\n echo \"<hr> ############# Promedios por materia #############\";\n $calificacion1=0;\n $calificacion2=0;\n $calificacion3=0;\n $calificacion4=0;\n $calificacion5=0;\n $calificacion6=0;\n foreach ($vector as $key => $value) {\n $calificacion1=$calificacion1+$vector[$key][0];\n $calificacion2=$calificacion2+$vector[$key][1];\n $calificacion3=$calificacion3+$vector[$key][2];\n $calificacion4=$calificacion4+$vector[$key][3];\n $calificacion5=$calificacion5+$vector[$key][4];\n $calificacion6=$calificacion6+$vector[$key][5];\n }\n $prom=$calificacion1/10;\n echo \"<br> Promedio materia 1: \".$prom;\n $prom=$calificacion2/10;\n echo \"<br> Promedio materia 2: \".$prom;\n $prom=$calificacion3/10;\n echo \"<br> Promedio materia 3: \".$prom;\n $prom=$calificacion4/10;\n echo \"<br> Promedio materia 4: \".$prom;\n $prom=$calificacion5/10;\n echo \"<br> Promedio materia 5: \".$prom;\n $prom=$calificacion6/10;\n echo \"<br> Promedio materia 6: \".$prom;\n }",
"function contarCreditos($espacios){\r\n $creditos=0;\r\n if(is_array($espacios)){\r\n foreach ($espacios as $espacio) {\r\n $creditos = $creditos + $espacio['CREDITOS'];\r\n }\r\n }\r\n return $creditos;\r\n }",
"public function getSumas() {\n $aDatos = $this->getAsistentes();\n $aAsi = array();\n $aPer = array();\n $aRep = array();\n $prop = 0;\n $repr = 0;\n $vosp = 0;\n $vonp = 0;\n $vosr = 0;\n $vonr = 0;\n $cofp = 0;\n $cofr = 0;\n \n foreach ($aDatos as $aAsistente) {\n if($aAsistente[3] == 'S') {\n // Representante.\n $repr++; // Numero de respresentantes.\n $aRep[$aAsistente[1]] = $aAsistente[1]; // Para el numero de respresentantes diferentes.\n $vosr += ($aAsistente[4] == 'S') ? 1 : 0; // Representantes con voto.\n $vonr += ($aAsistente[4] == 'N') ? 1 : 0; // Representantes sin voto.\n $cofr += $aAsistente[5]; // Coeficiente fase.\n } else {\n // Propietario.\n $prop++;\n $aPer[$aAsistente[1]] = $aAsistente[1]; // Para el numero de propietarios diferentes.\n $vosp += ($aAsistente[4] == 'S') ? 1 : 0; // Propietarios con voto.\n $vonp += ($aAsistente[4] == 'N') ? 1 : 0; // Propietarios sin voto.\n $cofp += $aAsistente[5]; // Coeficiente fase.\n }\n }\n $aAsi['prop'] = array($prop, count($aPer), $vosp, $vonp, $cofp);\n $aAsi['repr'] = array($repr, count($aRep), $vosr, $vonr, $cofr);\n return $aAsi;\n }",
"function ProjetosRealizadosCliente($empresa = null) {\n\n $count = 0;\n $conexao = new classeConexao();\n\n //selecionando id dos projetos\n $projetos = $conexao::fetch(\"SELECT id FROM tb_projetos WHERE id_projetos_empresas_id = {$empresa}\");\n\n foreach ($projetos as $projeto) {\n\n //Qtd tarefas a fazer\n $tarefasFazer = $conexao::fetchuniq(\"SELECT COUNT(id) as qtd FROM tb_tarefas WHERE tb_tarefas_status=0 AND tb_tarefas_projeto = \".$projeto['id']);\n\n //Qtd tarefas feitas\n $tarefasFeitas = $conexao::fetchuniq(\"SELECT COUNT(id) as qtd FROM tb_tarefas WHERE tb_tarefas_status=1 AND tb_tarefas_projeto = \".$projeto['id']);\n\n //Porcentagem\n if(($tarefasFeitas['qtd'] + $tarefasFazer['qtd']) == 0){\n $qtd2 = 1;\n }else{\n $qtd2 = ($tarefasFeitas['qtd'] + $tarefasFazer['qtd']);\n }\n $porcentagem = ($tarefasFeitas['qtd'] * 100) / ($qtd2);\n\n if($porcentagem==100) {\n $count++;\n }\n }\n\n return $count;\n}",
"public function examenesPendientes(){\n\n\t\t$resultado = array();\n\t\t\n\t\t$query = \"SELECT count(E.idExamen) as cantidadExamenes\n\t\t\t\t\t\tFROM tb_examenes AS E \n \t\t\t\tWHERE Not E.idExamen IN (SELECT idTipoDetalle FROM tb_pago_factura_caja_detalle WHERE tipoDetalle = 'Examen' AND estado = 'Activo' )\";\n\t\t\n\t\t$conexion = parent::conexionCliente();\n\t\t\n\t\tif($res = $conexion->query($query)){\n \n /* obtener un array asociativo */\n while ($filas = $res->fetch_assoc()) {\n $resultado = $filas;\n }\n \n /* liberar el conjunto de resultados */\n $res->free();\n \n }\n\n return $resultado['cantidadExamenes'];\t\t\n\n\n\t\t\n\t}",
"function buscarEspaciosReprobados($notaAprobatoria) {\r\n \r\n $reprobados=isset($reprobados)?$reprobados:'';\r\n $espacios=isset($reprobados)?$reprobados:'';\r\n \r\n if (is_array($this->espaciosCursados)){\r\n foreach ($this->espaciosCursados as $value) {\r\n if (isset($value['NOTA'])&&($value['NOTA']<$notaAprobatoria||$value['CODIGO_OBSERVACION']==20||$value['CODIGO_OBSERVACION']==23||$value['CODIGO_OBSERVACION']==25)){\r\n if ($value['CODIGO_OBSERVACION']==19||$value['CODIGO_OBSERVACION']==22||$value['CODIGO_OBSERVACION']==24)\r\n {\r\n }else\r\n {\r\n $espacios[]=$value['CODIGO'];\r\n }\r\n }\r\n }\r\n if(is_array($espacios)){\r\n \r\n $espacios= array_unique($espacios);\r\n if($this->datosEstudiante['IND_CRED']=='S'){\r\n \r\n foreach ($espacios as $key => $espacio) {\r\n foreach ($this->espaciosCursados as $cursado) {\r\n if($espacio==$cursado['CODIGO']){\r\n $reprobados[$key]['CODIGO']=$cursado['CODIGO'];\r\n $reprobados[$key]['CREDITOS']=(isset($cursado['CREDITOS'])?$cursado['CREDITOS']:0);\r\n }\r\n }\r\n\r\n }\r\n }else{\r\n $reprobados=$espacios;\r\n }\r\n return $reprobados; \r\n \r\n }else{\r\n return 0; \r\n }\r\n \r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n }",
"public function peso_cesta(){\r\n\t\t\t$peso = 0;\r\n\t\t\tforeach ($this->listArticulos as $elArticulo){\r\n\t\t\t\t$peso+=($elArticulo->peso*$elArticulo->unidades);\r\n\t\t\t\tparent::$log->debug(\"Peso $elArticulo->articulo= $elArticulo->peso(kg) * $elArticulo->unidades(u) = \".($elArticulo->unidades*$elArticulo->peso).\" Peso acumulado de la cesta=\".$peso);\r\n\t\t\t}\r\n\t\t\treturn $peso;\r\n\t\t}",
"public function getDescuentosEnCarro($arreglo_items){\n $query_ids_prods_en_promo = $this->productos()->pluck('producto_id');\n $hay_promo = $query_ids_prods_en_promo\n ->every(function($id) use ($arreglo_items){\n return in_array($id, array_keys($arreglo_items), true);\n });\n if ($hay_promo){\n $cant_repe_promo = (int)$query_ids_prods_en_promo->map(function($id_prod) use ($arreglo_items){\n return $arreglo_items[$id_prod];\n })->min();\n $cant_repe_promo = (int)( $cant_repe_promo / $this->cantidad);\n $total_descuento = $this->getDescuentos() * $cant_repe_promo;\n return $total_descuento;\n }\n return 0;\n\n }",
"function pagoMonedas($precio){\n $pago = 0;\n \n $monedas = array_fill(0,6,0); // ind 0: 1€; ind 1: 0,50€; ind 2: 0,20€; ind 3: 0,10€; ind 4: 0,05€; ind 5: 0,01€;\n \n $vueltas = 0;\n \n while($precio != $pago){\n $vueltas ++;\n echo sprintf(\"vuelta %d - pago %f<br>\",$vueltas, $pago);\n echo sprintf(\"diferencia: %f<br>\",$precio - $pago);\n if($precio - $pago >= 1){\n $monedas[0]++;\n $pago++;\n }\n elseif($precio - $pago >= 0.5){\n $monedas[1]++;\n $pago += 0.5;\n }\n elseif($precio - $pago >= 0.2){\n $monedas[2]++;\n $pago += 0.2;\n }\n elseif($precio - $pago >= 0.1){\n $monedas[3]++;\n $pago += 0.1;\n }\n elseif($precio - $pago >= 0.05){\n $monedas[4]++;\n $pago += 0.05;\n }\n elseif($precio - $pago >= 0.01){\n $monedas[5]++;\n $pago += 0.01;\n }\n else{\n echo 'Precio no válido<br>';\n break;\n }\n \n }\n return $monedas;\n}",
"function calcularVariables($espaciosVistos,$reglamentoEstudiante,$matriculas,$semestre_ingreso,$notaAprobatoria){\r\n \r\n $num_pruebas_academicas = $this->contarPruebasAcademicas($reglamentoEstudiante);\r\n $cantidad_matriculas = count($matriculas);\r\n $num_semestres_transcurridos = $this->contarSemestresTranscurridos($semestre_ingreso);\r\n $semestre_espacio_mas_atrasado = $this->calcularSemestreEspacioMasAtrasado();\r\n $edad_ingreso = $this->calcularEdadIngreso($semestre_ingreso);\r\n $num_semestres_despues_grado = $this->contarSemestresDespuesDeGrado($semestre_ingreso);\r\n \r\n if($this->datosEstudiante['IND_CRED']=='N'){\r\n $num_aprobados = count($this->espaciosAprobados);\r\n $num_reprobados = count($this->espaciosReprobados);\r\n $num_cursados = count($espaciosVistos);\r\n $num_adelantados = $this->contarEspaciosAdelantados($cantidad_matriculas,$notaAprobatoria,$this->espaciosCursados);\r\n $num_nivelado = $this->contarEspaciosNivelados($cantidad_matriculas);\r\n }elseif($this->datosEstudiante['IND_CRED']=='S'){\r\n $num_aprobados = $this->contarCreditos($this->espaciosAprobados);\r\n $num_reprobados = $this->contarCreditos($this->espaciosReprobados);\r\n $num_cursados = $this->contarCreditos($espaciosVistos);\r\n $num_adelantados = $this->contarEspaciosAdelantados($cantidad_matriculas,$notaAprobatoria,$this->espaciosCursados);\r\n $num_nivelado = $this->contarEspaciosNivelados($cantidad_matriculas);//creditos nivelados\r\n }\r\n \r\n $variables = array(\r\n 'cantidad_aprobados' => $num_aprobados, \r\n 'cantidad_reprobados' => $num_reprobados, \r\n 'cantidad_espacios_vistos' => $num_cursados,\r\n 'cantidad_pruebas_academicas' => $num_pruebas_academicas,\r\n 'promedio_acumulado' => (isset($this->datosEstudiante['PROMEDIO'])?$this->datosEstudiante['PROMEDIO']:''),\r\n 'cantidad_matriculas' => $cantidad_matriculas,\r\n 'cantidad_semestres'=>$num_semestres_transcurridos,\r\n 'cantidad_espacios_adelantados' => $num_adelantados,\r\n 'cantidad_espacios_nivelado' => $num_nivelado,\r\n 'semestre_espacio_mas_atrasado' => $semestre_espacio_mas_atrasado,\r\n 'edad_ingreso'=> $edad_ingreso,\r\n 'cantidad_semestres_despues_grado' => $num_semestres_despues_grado\r\n );\r\n\r\n return $variables;\r\n \r\n }",
"function getNumeroDeBeneficiarios(){\n\t\t\t$benefs = 0;\n\t\t\t$sqlcreel = \"SELECT COUNT(idsocios_relaciones) AS 'beneficiarios'\n\t\t\t\t\t\t\tFROM socios_relaciones\n\t\t\t\t\t\t\tWHERE socio_relacionado=\" . $this->mCodigo . \" AND tipo_relacion=11\";\n\t\t\t$benefs = mifila($sqlcreel, \"beneficiarios\");\n\t\t\treturn $benefs;\n\t}"
] |
[
"0.60361624",
"0.6000263",
"0.5935908",
"0.5875358",
"0.58659166",
"0.583954",
"0.5802462",
"0.5755419",
"0.57160544",
"0.5695371",
"0.5688448",
"0.5687049",
"0.5673989",
"0.5643917",
"0.5635281",
"0.56350017",
"0.5600466",
"0.5599926",
"0.5599778",
"0.55997175",
"0.55586934",
"0.5547562",
"0.55468917",
"0.5536233",
"0.5535151",
"0.55229723",
"0.5509467",
"0.54643655",
"0.54445505",
"0.54344153"
] |
0.6488774
|
0
|
Funcion que busca las notas de los estudiantes y realiza la clasificacion de los estudiantes nivelados (clasificacion = 1), que no han perdido ningun EA
|
function buscarEstudiantesNivelados($estudiantes,$estudiantes_clasificados){
$k=0;
unset ($this->notas);
$this->notas = $this->obtenerNotas();
if(count($estudiantes)>0)
{
foreach ($estudiantes as $key => $estudiante) {
//buscamos las notas
$reprobados = 0;
$notas_estudiante = array();
$notas_estudiante = $this->obtenerNotasEstudiante($estudiante['COD_ESTUDIANTE']);
$reprobados = $this->verificarReprobados($notas_estudiante);
unset($notas_estudiante);
if($reprobados==0){
$resultado = array( 'COD_ESTUDIANTE'=>$estudiante['COD_ESTUDIANTE'],
'COD_PROYECTO'=>$estudiante['COD_PROYECTO'],
'CLASIFICACION'=>'1',
'TIPO'=>$estudiante['TIPO']
);
$estudiantes_clasificados[] = $resultado;
unset($estudiantes[$key]);
}
}
}
$resultado = array( 'ESTUDIANTES'=>$estudiantes,
'CLASIFICADOS'=>$estudiantes_clasificados);
return $resultado;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function ordenarEstudiantesClasificados($estudiantes_clasificados){\n // Obtener una lista de columnas\n foreach ($estudiantes_clasificados as $key => $row) {\n $nivel[$key] = $row['CLASIFICACION'];\n $codigos[$key] = $row['COD_ESTUDIANTE'];\n }\n\n // Ordenar los datos con nivel ascendente, codigos ascendente\n // Agregar $datos como el último parámetro, para ordenar por la llave común\n array_multisort($nivel, SORT_ASC, $codigos, SORT_ASC, $estudiantes_clasificados);\n \n //adicionamos ID a cada estudiante\n foreach ($estudiantes_clasificados as $key3 => $informacion){\n $estudiantes_clasificados[$key3]['ID'] = $key3+1;\n }\n return $estudiantes_clasificados;\n }",
"function buscarEstudiantesConEspaciosReprobados($estudiantes,$estudiantes_clasificados){\n if(count($estudiantes)>0){\n foreach ($estudiantes as $key => $arreglo_estudiante) {\n $cantidad_reprobados = 0;\n \n\n $espacios_por_cursar = json_decode($arreglo_estudiante['ESPACIOS_POR_CURSAR'],true);\n $cantidad_reprobados = $this->contarReprobados($espacios_por_cursar);\n switch($cantidad_reprobados){\n case 1:\n $resultado = array( 'COD_ESTUDIANTE'=>$arreglo_estudiante['COD_ESTUDIANTE'],\n 'COD_PROYECTO'=>$arreglo_estudiante['COD_PROYECTO'],\n 'CLASIFICACION'=>'4',\n 'TIPO'=>$arreglo_estudiante['TIPO']\n );\n $estudiantes_clasificados[] = $resultado;\n unset($estudiantes[$key]);\n break;\n case 2:\n $resultado = array( 'COD_ESTUDIANTE'=>$arreglo_estudiante['COD_ESTUDIANTE'],\n 'COD_PROYECTO'=>$arreglo_estudiante['COD_PROYECTO'],\n 'CLASIFICACION'=>'5',\n 'TIPO'=>$arreglo_estudiante['TIPO']\n );\n $estudiantes_clasificados[] = $resultado;\n unset($estudiantes[$key]);\n break;\n case 3:\n $resultado = array( 'COD_ESTUDIANTE'=>$arreglo_estudiante['COD_ESTUDIANTE'],\n 'COD_PROYECTO'=>$arreglo_estudiante['COD_PROYECTO'],\n 'CLASIFICACION'=>'6',\n 'TIPO'=>$arreglo_estudiante['TIPO']\n );\n $estudiantes_clasificados[] = $resultado;\n unset($estudiantes[$key]);\n break;\n default:\n if($cantidad_reprobados>3){\n $resultado = array( 'COD_ESTUDIANTE'=>$arreglo_estudiante['COD_ESTUDIANTE'],\n 'COD_PROYECTO'=>$arreglo_estudiante['COD_PROYECTO'],\n 'CLASIFICACION'=>'7',\n 'TIPO'=>$arreglo_estudiante['TIPO']\n );\n $estudiantes_clasificados[] = $resultado;\n unset($estudiantes[$key]);\n }\n break;\n\n }\n }\n }\n $resultado = array( 'ESTUDIANTES'=>$estudiantes,\n 'CLASIFICADOS'=>$estudiantes_clasificados);\n return $resultado;\n }",
"public function categoriaInactivos(){\n if($this->nolaboral->V21_M >= 1)\n {\n return 1;\n }\n if($this->nolaboral->V8_M == 1 && $this->nolaboral->V9_M == 1 && $this->nolaboral->V10_M == 1)\n {\n return 2;\n }\n if($this->caracteristicas->CH10 == 1 && $this->PP01E == 2)\n {\n return 3;\n }\n if($this->PP01E == 2)\n {\n return 4;\n }\n if($this->caracteristicas->CH06 < 6)\n {\n return 5;\n }\n if($this->discapacidad())\n {\n return 6;\n }\n\n}",
"function niveles($area){\n\t\tif ($area->cveentidad2=='0') return 1;\n\t\tif ($area->cveentidad3=='0') return 2;\n\t\tif ($area->cveentidad4=='0') return 3;\n\t\tif ($area->cveentidad5=='0') return 4;\n\t\tif ($area->cveentidad6=='0') return 5;\n\t\tif ($area->cveentidad7=='0') return 6;\n\t}",
"function buscarEstudiantesSinEspaciosReprobadosSemAnterior($estudiantes,$estudiantes_clasificados){\n if(!is_array($estudiantes_clasificados)){\n $estudiantes_clasificados= array();\n }\n if(count($estudiantes)>0)\n {\n foreach ($estudiantes as $key => $arreglo_estudiante)\n {\n $cantidad_reprobados = 0;\n $espacios_por_cursar = json_decode($arreglo_estudiante['ESPACIOS_POR_CURSAR'],true);\n $cantidad_reprobados = $this->contarReprobados($espacios_por_cursar);\n if($cantidad_reprobados==0)\n {\n $resultado = array( 'COD_ESTUDIANTE'=>$arreglo_estudiante['COD_ESTUDIANTE'],\n 'COD_PROYECTO'=>$arreglo_estudiante['COD_PROYECTO'],\n 'CLASIFICACION'=>'2',\n 'TIPO'=>$arreglo_estudiante['TIPO']\n );\n $estudiantes_clasificados[] = $resultado; \n unset($estudiantes[$key]);\n }\n }\n }\n $resultado = array( 'ESTUDIANTES'=>$estudiantes,\n 'CLASIFICADOS'=>$estudiantes_clasificados);\n return $resultado;\n }",
"function ejecutarClasificacionEstudiantes($proyecto){\n $this->codProyecto=$proyecto;\n //buscamos estudiantes en prueba academica\n $estudiantes_clasificados = $this->consultarEstudiantesPruebaAcademica();\n //buscamos estudiantes que no estan en prueba academica\n $estudiantes = $this->consultarEstudiantesSinPrueba();\n //buscamos estudiantes con 1 y 2 espacios reprobados\n $resultado = $this->buscarEstudiantesConEspaciosReprobados($estudiantes, $estudiantes_clasificados);\n $estudiantes = $resultado['ESTUDIANTES'];\n $estudiantes_clasificados = $resultado['CLASIFICADOS'];\n unset($resultado);\n //buscamos estudiantes nivelados (sin ningun espacio reprobado)\n $resultado_nivelados = $this->buscarEstudiantesNivelados($estudiantes, $estudiantes_clasificados);\n $estudiantes = $resultado_nivelados['ESTUDIANTES'];\n $estudiantes_clasificados = $resultado_nivelados['CLASIFICADOS'];\n //buscamos estudiantes que no reprobaron el semestre anterior\n $resultado_semAnterior = $this->buscarEstudiantesSinEspaciosReprobadosSemAnterior($estudiantes, $estudiantes_clasificados);\n $resultadoFinal=$this->clasificarOtrosEstudiantes($resultado_semAnterior);\n //ordenar arreglo de estudiantes clasificados\n if(is_array($resultadoFinal)&&!empty($resultadoFinal))\n {\n $estudiantes_clasificados_final= $this->ordenarEstudiantesClasificados($resultadoFinal);\n $insercion = $this->insertarEstudiantesClasificados($estudiantes_clasificados_final);\n }else\n {\n $insercion=0;\n }\n return $insercion ;\n }",
"function obtenerNotasEstudiante($codigo_estudiante){\n $notas_estudiante=array();\n if(count($this->notas>0)&&!empty($this->notas))\n {\n foreach ($this->notas as $key => $row) {\n if($row['COD_ESTUDIANTE']==$codigo_estudiante){\n $notas_estudiante[]=$row;\n unset($this->notas[$key]);\n }\n }\n }\n return $notas_estudiante;\n }",
"function buscarEspaciosReprobados($notaAprobatoria) {\r\n \r\n $reprobados=isset($reprobados)?$reprobados:'';\r\n $espacios=isset($reprobados)?$reprobados:'';\r\n \r\n if (is_array($this->espaciosCursados)){\r\n foreach ($this->espaciosCursados as $value) {\r\n if (isset($value['NOTA'])&&($value['NOTA']<$notaAprobatoria||$value['CODIGO_OBSERVACION']==20||$value['CODIGO_OBSERVACION']==23||$value['CODIGO_OBSERVACION']==25)){\r\n if ($value['CODIGO_OBSERVACION']==19||$value['CODIGO_OBSERVACION']==22||$value['CODIGO_OBSERVACION']==24)\r\n {\r\n }else\r\n {\r\n $espacios[]=$value['CODIGO'];\r\n }\r\n }\r\n }\r\n if(is_array($espacios)){\r\n \r\n $espacios= array_unique($espacios);\r\n if($this->datosEstudiante['IND_CRED']=='S'){\r\n \r\n foreach ($espacios as $key => $espacio) {\r\n foreach ($this->espaciosCursados as $cursado) {\r\n if($espacio==$cursado['CODIGO']){\r\n $reprobados[$key]['CODIGO']=$cursado['CODIGO'];\r\n $reprobados[$key]['CREDITOS']=(isset($cursado['CREDITOS'])?$cursado['CREDITOS']:0);\r\n }\r\n }\r\n\r\n }\r\n }else{\r\n $reprobados=$espacios;\r\n }\r\n return $reprobados; \r\n \r\n }else{\r\n return 0; \r\n }\r\n \r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n }",
"public function TipoNotaEnNotas($tipoNId){\n $origen=TipoNota::with(['notas',\n 'indicadores.materias_has_periodos.materias_has_niveles.niveles_has_anios.alumnos'])\n ->find($tipoNId);\n $alumnos=$origen->indicadores->materias_has_periodos->materias_has_niveles->niveles_has_anios->alumnos;\n $comparado=$origen->notas;\n $res='Se han rellenado Notas con: ';\n foreach ($alumnos as $val) {\n $encontrado=false;\n foreach ($origen->notas as $nota) {\n if ($nota->alumnos_id == $val->id) {\n $encontrado=true;\n }\n }\n if (!$encontrado) {\n $obj=new Notas;\n $obj->alumnos_id=$val->id;\n $obj->tipo_nota_id=$tipoNId;\n $obj->calificacion=0;\n $obj->save();\n $res.='; Notas ID: '.$obj->id.', Alumnos ID: '.$val->id.', TipoNota ID: '.$tipoNId.', Cal: 0';\n // Actualiza el promedio si hay modificaciones\n $alumind=new AlumInd;\n $alumind->addActProm($obj->alumnos_id,$origen->indicadores->id,'NUEVO');\n }\n }\n return $res;\n }",
"function verificarReprobados($notas_estudiante){\n $reprobados = 0;\n if(count($notas_estudiante)>0){\n foreach ($notas_estudiante as $key => $estudiantes) {\n if ((isset($estudiantes['NOTA'])?$estudiantes['NOTA']:0)<30 || $estudiantes['OBSERVACION']==20 || $estudiantes['OBSERVACION']==23 || $estudiantes['OBSERVACION']==25){\n $reprobados=1;\n break;\n }\n }\n }\n return $reprobados;\n }",
"function obter_todas_noticias_ativas() {\n $this->db->where(array(\"status_noticia\"=>1));\n $this->db->order_by(\"data_noticia\", \"desc\");\n return $this->db->get('noticia');\n }",
"function get_periodos_activos (){\n \n $fecha=date('Y-m-d');\n $anio_lectivo=date('Y');\n \n $sql_1=\"SELECT t_p.id_periodo,\n t_c.numero || ' ' || 'CUATRIMESTRE' as descripcion \n FROM periodo t_p \n JOIN cuatrimestre t_c ON (t_p.id_periodo=t_c.id_periodo AND t_p.anio_lectivo=$anio_lectivo\n AND (('$fecha' <= t_p.fecha_inicio) OR ('$fecha' BETWEEN t_p.fecha_inicio AND t_p.fecha_fin)))\";\n $cuatrimestre=toba::db('gestion_aulas')->consultar($sql_1);\n \n $sql_2=\"SELECT t_p.id_periodo,\n 'TURNO DE EXAMEN' || ' ' || t_ef.turno || ' ' || t_ef.numero || ' ' || 'LLAMADO' as descripcion\n FROM periodo t_p \n JOIN examen_final t_ef ON (t_p.id_periodo=t_ef.id_periodo AND t_p.anio_lectivo=$anio_lectivo\n AND (('$fecha' <= t_p.fecha_inicio) OR ('$fecha' BETWEEN t_p.fecha_inicio AND t_p.fecha_fin)))\";\n $examen_final=toba::db('gestion_aulas')->consultar($sql_2);\n \n $sql_3=\"SELECT t_p.id_periodo,\n 'CURSO DE INGRESO' || ' ' || t_ci.facultad || ' ' || t_ci.nombre as descripcion\n FROM periodo t_p \n JOIN curso_ingreso t_ci ON (t_p.id_periodo=t_ci.id_periodo AND t_p.anio_lectivo=$anio_lectivo\n AND (('$fecha' <= t_p.fecha_inicio) OR ('$fecha' BETWEEN t_p.fecha_inicio AND t_p.fecha_fin)) )\";\n $curso_ingreso=toba::db('gestion_aulas')->consultar($sql_3);\n \n $this->unificar_periodos(&$cuatrimestre, $examen_final);\n \n $this->unificar_periodos(&$cuatrimestre, $curso_ingreso);\n \n return $cuatrimestre; \n \n }",
"public function estado(){\n if($this->entrev_realiz == 2)\n {\n return 0;\n }\n if($this->PP01A == 1 || $this->PP01B == 1)\n {\n return 1;\n }\n if($this->PP02B == 1)\n {\n return 2;\n }\n if($this->PP01E == 1 || $this->PP01E == 2 || $this->PP02F == 2)\n {\n return 3;\n }\n if($this->caracteristicas->CH06 < 10){\n return 4;\n }\n\n }",
"public function buscarEstudianteActa() {\n\n $sql = \"SELECT\n D.tipodocumento, D.nombrecortodocumento, EG.numerodocumento, EG.idestudiantegeneral,\n EG.nombresestudiantegeneral, EG.apellidosestudiantegeneral, EG.expedidodocumento, C.codigocarrera\n FROM \n estudiantegeneral EG\n INNER JOIN estudiante E ON ( E.idestudiantegeneral = EG.idestudiantegeneral )\n INNER JOIN documento D ON ( D.tipodocumento = EG.tipodocumento )\n INNER JOIN carrera C ON ( C.codigocarrera = E.codigocarrera )\n WHERE \n E.codigoestudiante = ?\n AND E.codigoestudiante NOT IN ( \n SELECT \n DC.EstudianteId\n FROM \n DetalleAcuerdoActa DC\n WHERE \n CodigoEstado = 100)\";\n\n $this->persistencia->crearSentenciaSQL($sql);\n $this->persistencia->setParametro(0, $this->getCodigoEstudiante(), false);\n\n $this->persistencia->ejecutarConsulta();\n if ($this->persistencia->getNext()) {\n $this->setIdEstudiante($this->persistencia->getParametro(\"idestudiantegeneral\"));\n $this->setNumeroDocumento($this->persistencia->getParametro(\"numerodocumento\"));\n $this->setNombreEstudiante($this->persistencia->getParametro(\"nombresestudiantegeneral\"));\n $this->setApellidoEstudiante($this->persistencia->getParametro(\"apellidosestudiantegeneral\"));\n $this->setExpedicion($this->persistencia->getParametro(\"expedidodocumento\"));\n\n $tipoDocumento = new TipoDocumento(null);\n $tipoDocumento->setIniciales($this->persistencia->getParametro(\"tipodocumento\"));\n $tipoDocumento->setDescripcion($this->persistencia->getParametro(\"nombrecortodocumento\"));\n\n $fechaGrado = new FechaGrado(null);\n $carrera = new Carrera(null);\n\n $carrera->setCodigoCarrera($this->persistencia->getParametro(\"codigocarrera\"));\n $fechaGrado->setCarrera($carrera);\n $this->setTipoDocumento($tipoDocumento);\n $this->setFechaGrado($fechaGrado);\n }\n\n $this->persistencia->freeResult();\n }",
"protected function entidades(){\n\t\tfor($i=1; $i < 6;$i++) $niveis[$i] = \"nivel de busca {$i}\";\n\t\t$this->visualizacao->nivel = VComponente::montar(VComponente::caixaCombinacao, 'nivel', isset($_POST['nivel']) ? $_POST['nivel'] : 1 ,null,$niveis);\n\t\t$this->visualizacao->filtro = isset($_POST['filtro']) ? $_POST['filtro'] : null;\n\t\t$this->visualizacao->listagens = false;\n\t\tif(!$this->visualizacao->filtro) return;\n\t\t$d = dir(\".\");\n\t\t$negocios = new colecao();\n\t\t$controles = new colecao();\n\t\twhile (false !== ($arquivo = $d->read())) {\n\t\t\tif( is_dir($arquivo) && ($arquivo{0} !== '.') ){\n\t\t\t\tif(is_file($arquivo.'/classes/N'.ucfirst($arquivo).'.php')){\n\t\t\t\t\t$negocio = 'N'.ucfirst($arquivo);\n\t\t\t\t\t$obNegocio = new $negocio();\n\t\t\t\t\tif( $obNegocio instanceof negocioPadrao ) {\n\t\t\t\t\t\t$ordem[$arquivo] = array(\n\t\t\t\t\t\t\t'nome'=>$obNegocio->pegarInter()->pegarNome(),\n\t\t\t\t\t\t\t'caminho'=>$arquivo.'/classes/N'.ucfirst($arquivo).'.php'\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$negocios->$arquivo = $obNegocio;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$d->close();\n\t\tasort($ordem);\n\t\t$this->visualizacao->ordem = $ordem;\n\t\t$listagens = array();\n\t\tforeach($ordem as $idx => $arquivo){\n\t\t\t$obNegocio = $negocios->pegar($idx);\n\t\t\t$nome['controle'] = definicaoEntidade::controle($obNegocio, 'verPesquisa');\n\t\t\tif($this->exibirListagem($arquivo)){\n\t\t\t\t$colecao = $obNegocio->pesquisaGeral($this->pegarFiltro(),$this->pegarPagina(),isset($_POST['nivel']) ? $_POST['nivel'] : 1);\n\t\t\t\tcall_user_func_array(\"{$nome['controle']}::montarListagem\", array($this->visualizacao,$colecao,$this->pegarPagina(),$nome['controle']));\n\t\t\t\t$this->visualizacao->listagem->passarControle($nome['controle']);\n\t\t\t\tif($colecao->contarItens()){\n\t\t\t\t\t$listagens[$idx]['listagem'] = $this->visualizacao->listagem;\n\t\t\t\t\t$listagens[$idx]['ocorrencias'] = $colecao->contarItens();\n\t\t\t\t\t$listagens[$idx]['nome'] = $arquivo['nome'];\n\t\t\t\t\t$listagens[$idx]['controlePesquisa'] = $nome['controle'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tunset($this->visualizacao->listagem);\n\t\t$this->visualizacao->listagens = $listagens;\n\t}",
"function consultarNotasDefinitivas() {\r\n \r\n $cadena_sql = $this->sql->cadena_sql(\"consultarEspaciosCursados\", $this->datosEstudiante['CODIGO']);\r\n $resultado = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\"); \r\n \r\n return $resultado;\r\n \r\n }",
"public function otorgarPrestamo(){\n $fecha = date('d-m-y');\n $this->setFechaOtorgado($fecha);\n $cantidadCuotas = $this->getCantidadCuotas();\n $monto = $this->getMonto();\n $colObjCuota = array();\n for($i=0; $i<$cantidadCuotas; $i++){\n $montoCuota = $monto / $cantidadCuotas;\n $montoInteres = $this->calcularInteresPrestamo($i);\n $colObjCuota[$i] = new Cuota($i, $montoCuota, $montoInteres);\n }\n $this->setColObjCuota($colObjCuota);\n }",
"function selectNotasByAlu($id){\n\t\t$link = openDb();\n\t\t$sql = \"SELECT not_valor, not_trime, disc_nome FROM ((notas n INNER JOIN aluno a ON n.alu_id=a.alu_id) INNER JOIN disciplina ds ON ds.disc_id=n.disc_id AND a.alu_id = '$id')\";\n\t\t$query = $link->query($sql);\n\t\t\n\t\t$cont = 1;\n\t\t$x\t = 0;\n\t\t$y\t = 0;\n\t\t$retorno = array();\n\n\t\twhile ($result = mysqli_fetch_array($query)) {\n\t\t\tif ($cont==1) {\n\t\t\t\t$retorno[$x][$y]=$result['disc_nome']; //Nome da disciplina\n\t\t\t\t$y+=1;\n\t\t\t\t$retorno[$x][$y]=$result['not_valor']; //Nota do primeiro Trimestre\n\t\t\t\t$y+=1;\n\t\t\t}\n\t\t\tif ($cont==2) {\n\t\t\t\t$retorno[$x][$y]=$result['not_valor']; //Nota do segundo Trimestre\n\t\t\t\t$y+=1;\n\t\t\t}\n\t\t\tif ($cont==3) {\n\t\t\t\t$retorno[$x][$y]=$result['not_valor']; //Nota do terceiro Trimestre\n\t\t\t\t$y+=1;\n\t\t\t\t//if(!$retorno[$x][1] == NULL && !$retorno[$x][2] == NULL && !$retorno[$x][3] == NULL){\n\t\t\t\t\t$retorno[$x][$y] = arredonda(number_format(($retorno[$x][1]+$retorno[$x][2]+$retorno[$x][3])/3,1, '.', ' ')); //Média das notas\n\t\t\t\t\tif($retorno[$x][$y] == 0){ $retorno[$x][$y] = NULL; }\n\t\t\t\t/*}else{\n\t\t\t\t\t$retorno[$x][$y] = NULL;\n\t\t\t\t}*/\n\t\t\t\t$y=0;\n\t\t\t\t$x+=1;\n\t\t\t\t$cont=0;\n\t\t\t}\n\t\t\t$cont+=1; //Esquema criado para arrumar as tuplas, (Disciplinas e Notas relacionadas na mesma linha)\n\t\t}\n\t\treturn $retorno;\n\t}",
"public function dohvati_najaktuelnije_ideje()\n {\n $ideje= $this->findAll();\n usort($ideje,function ($i1,$i2)\n {\n //proveriti je l' ovo tranzitivno, idejno jeste, samo da li sam napravio gresku\n $dat1= strtotime($i1->DatumEvaluacije); \n $dat2= strtotime($i2->DatumEvaluacije); \n $danas= strtotime(date(\"Y-m-d H:i:s\"));\n if ($dat1==$dat2)\n {\n return 0;\n }\n if ($dat1>$danas)\n {\n if ($dat2<$danas)//dat2 nije aktuelno, jer je vec proslo, a d1 jeste te ide ispred\n {\n return -1;\n }\n else//oba tek treba da se dogode aktuelnije je ono sto ce pre da se dogodi\n {\n if ($dat1<$dat2)\n {\n return -1;\n }\n else\n {\n return 1;\n }\n }\n }\n else//dat1 nije aktuelno\n {\n if ($dat2>$danas)//dat2 ide ispred\n {\n return 1;\n }\n else//nijedan nije aktuelan zato zelimo da bude ispred onaj sa vecim datumom jer je on blizi sadasnjosti\n {\n if ($dat1<$dat2)\n {\n return 1;\n }\n else \n {\n return -1;\n \n }\n }\n \n }\n });\n return $ideje;\n \n }",
"function lancar_notas_aluno($id_federado){\n //pegar movimentos da faixa candidata\n $dados['aluno']= $this->coordenador->get_aluno_faixa($id_federado);\n \n \n $id_faixa = $dados['aluno']['0']['ordem']+1;\n \n $dados['movimentos'] = $this->coordenador->movimentos($id_faixa);\n $dados['ultimo_evento'] = $this->coordenador->get_ultimo_evento($id_federado);\n \n// $this->funcoes->imprimir($dados['movimentos']);\n $this->load->view('header');\n $this->load->view('/coordenador/lancar_notas_aluno',$dados);\n $this->load->view('footer');\n \n //preparar o prontuário com notas do aluno\n //inclui-lo automáticamente no evento de graduação\n \n }",
"function no_acta_inicio(){\n $sql = \n \"SELECT\n c.Numero,\n c.Objeto,\n t.Nombre AS Contratista,\n c.Fecha_Inicial,\n c.Fecha_Vencimiento,\n c.Valor_Inicial,\n e.Estado \n FROM\n contratos AS c\n INNER JOIN tbl_terceros AS t ON c.Fk_Id_Terceros = t.Pk_Id_Terceros\n INNER JOIN tbl_estados AS e ON c.Fk_Id_Estado = e.Pk_Id_Estado \n WHERE\n c.Acta_Inicio IS FALSE \n AND e.Pk_Id_Estado <> 2 \n AND c.Fk_Id_Proyecto = {$this->session->userdata('Fk_Id_Proyecto')}\n ORDER BY\n Numero ASC\";\n \n //Se retorna la consulta\n return $this->db->query($sql)->result();\n }",
"function adivinarSexo($array_A){\n $datos=new ManejoDatos();\n $arrayBD =$datos->getEstiloSexoPromedioRecinto();\n if($array_A[0]=='DIVERGENTE'){\n $estilo=4;\n }\n if($array_A[0]=='CONVERGENTE'){\n $estilo=3;\n }\n if($array_A[0]=='ACOMODADOR'){\n $estilo=2;\n }\n if($array_A[0]=='ASIMILADOR'){\n $estilo=1;\n }\n $arrayA = array( $estilo, $array_A[1],($array_A[2] == \"Paraiso\" ? 1 : 2));\n foreach ($arrayBD as $elemento) {\n if($elemento['Estilo']=='DIVERGENTE'){\n $estiloBD=4;\n }\n if($elemento['Estilo']=='CONVERGENTE'){\n $estiloBD=3;\n }\n if($elemento['Estilo']=='ACOMODADOR'){\n $estiloBD=2;\n }\n if($elemento['Estilo']=='ASIMILADOR'){\n $estiloBD=1;\n }\n $arrayB = array($estiloBD, $elemento['Promedio'], $elemento['Recinto'] == \"Paraiso\" ? 1 : 2);\n $temporal = $this->distanciaEuclidiana($arrayA, $arrayB);\n if ($temporal < $this->distancia) {\n $this->distancia = $temporal;\n $this->temporal = $elemento['Sexo'];\n }\n }\n if($this->temporal=='M'){\n $this->temporal=\"Masculino\";\n return $this->temporal;\n }\n if($this->temporal=='F'){\n $this->temporal=\"Femenino\";\n return $this->temporal;\n }\n }",
"public function contAlumNormal($anio)\n { \n //$gradosMatTercerCiclo=[];$gradosVespertino=[];$gradosCompleto=[];\n //para contar alumnas en periodo normal\n //hay q filtrar por turnos Matutino,Vespertino y Completo\n $match=['anios_id'=>$anio,'turnos_id'=>1];\n $gradosMatutino=grado::where($match)->select('categoria','grado','seccion','capacidad','turnos_id','id')->orderBy('grado')->orderBy('seccion')->get()->toArray();\n //$countMat=count($gradosMatutino);\n $arreglo_grados_inscritos_matutino=[];\n for($i=0;$i<count($gradosMatutino);$i++){\n $gradoId=$gradosMatutino[$i]['id'];\n $busqueda=matricula::where('grados_id',$gradoId)->get();\n $cont=$busqueda->count();\n $gradoSeccion=$gradosMatutino[$i]['grado'].$gradosMatutino[$i]['seccion'];\n $aux=[\"gradoSeccion\"=>$gradoSeccion,\n \"cantidad\"=>$cont,\n \"categoria\"=>$gradosMatutino[$i]['categoria'],\n \"capacidad\"=>$gradosMatutino[$i]['capacidad'],\n \"turno\"=>\"matutino\",\n ];\n array_push($arreglo_grados_inscritos_matutino,$aux);\n }\n\n \n $match=['anios_id'=>$anio,'turnos_id'=>2];\n $gradosVespertino=grado::where($match)->select('categoria','grado','seccion','capacidad','turnos_id','id')->orderBy('grado')->orderBy('seccion')->get()->toArray();\n $arreglo_grados_inscritos_vespertino=[];\n for($i=0;$i<count($gradosVespertino);$i++){\n $gradoId=$gradosVespertino[$i]['id'];\n $busqueda=matricula::where('grados_id',$gradoId)->get();\n $cont=$busqueda->count();\n $gradoSeccion=$gradosVespertino[$i]['grado'].$gradosVespertino[$i]['seccion'];\n $aux=[\"gradoSeccion\"=>$gradoSeccion,\n \"cantidad\"=>$cont,\n \"categoria\"=>$gradosVespertino[$i]['categoria'],\n \"capacidad\"=>$gradosVespertino[$i]['capacidad'],\n \"turno\"=>\"Vespertino\", \n ];\n array_push($arreglo_grados_inscritos_vespertino,$aux);\n }\n\n //$countVesp=count($gradosVespertino);\n $match=['anios_id'=>$anio,'turnos_id'=>3];\n $gradosCompleto=grado::where($match)->select('categoria','grado','seccion','capacidad','turnos_id','id')->orderBy('grado')->orderBy('seccion')->get()->toArray();\n\n $arreglo_grados_inscritos_completo=[];\n for($i=0;$i<count($gradosCompleto);$i++){\n $gradoId=$gradosCompleto[$i]['id'];\n $busqueda=matricula::where('grados_id',$gradoId)->get();\n $cont=$busqueda->count();\n $gradoSeccion=$gradosCompleto[$i]['grado'].$gradosCompleto[$i]['seccion'];\n $aux=[\"gradoSeccion\"=>$gradoSeccion,\n \"cantidad\"=>$cont,\n \"categoria\"=>$gradosCompleto[$i]['categoria'],\n \"capacidad\"=>$gradosCompleto[$i]['capacidad'],\n \"turno\"=>\"completo\",\n ];\n array_push($arreglo_grados_inscritos_completo,$aux);\n }\n\n //$countComp=count($gradosCompleto);\n //dd($gradosCompleto);\n $arreglo_de_grados=[\"gradosMatutino\"=>$arreglo_grados_inscritos_matutino,\n \"gradosVespertino\"=>$arreglo_grados_inscritos_vespertino,\n \"gradosCompleto\"=>$arreglo_grados_inscritos_completo,\n \n ];\n //dd($arreglo_de_grados);\n //dd($arreglo_grados_inscritos_matutino);\n return $arreglo_de_grados;\n //$match=[''=>];\n //$nomMat=matricula::\n\n }",
"function buscarEspaciosAprobados($notaAprobatoria){\r\n $aprobados=array();\r\n if(is_array($this->espaciosCursados))\r\n {\r\n foreach ($this->espaciosCursados as $value1)\r\n {\r\n if ((isset($value1['NOTA'])&&$value1['NOTA']>=$notaAprobatoria)||(isset($value1['CODIGO_OBSERVACION'])?$value1['CODIGO_OBSERVACION']:'')==19||(isset($value1['CODIGO_OBSERVACION'])?$value1['CODIGO_OBSERVACION']:'')==22||(isset($value1['CODIGO_OBSERVACION'])?$value1['CODIGO_OBSERVACION']:'')==24)\r\n {\r\n $aprobados[]=array('CODIGO'=>$value1['CODIGO'],'NIVEL'=>(isset($value1['NIVEL'])?$value1['NIVEL']:''),'CREDITOS'=>(isset($value1['CREDITOS'])?$value1['CREDITOS']:''));\r\n }\r\n }\r\n\r\n }else\r\n {\r\n $aprobados='';\r\n }\r\n return $aprobados;\r\n }",
"private function asientosOcupados($entradasUsu, $entradasAnon){\n \n \n \n foreach ($entradasUsu as $entU){\n \n $asiento = new Asientos();\n \n $asiento->buscarPorId($entU[\"cod_asiento\"]);\n \n $asientoOcupado[$asiento->fila][$asiento->columna] = true;\n \n }\n \n \n foreach ($entradasAnon as $entA){\n \n $asiento = new Asientos();\n \n $asiento->buscarPorId($entA[\"cod_asiento\"]);\n \n $asientoOcupado[$asiento->fila][$asiento->columna] = true;\n \n }\n \n return $asientoOcupado;\n \n }",
"public function categoriaOcupacional()\n {\n if ($this->PP05A==1 && $this->PP05D==1){\n return 1;\n }\n if ($this->PP05A==1 && ($this->PP05D==2 || $this->PP05D==3)){\n return 2;\n }\n if ($this->PP05A==3){\n return 3;\n }\n if ($this->PP05A==2 && $this->PP05B==2 && $this->PP05B1==3){\n return 4;\n }\n // #Ns./Nr.\n // (me parece que es si no se completa: pp05a=null)\n }",
"function articles_visites_semaine($nbj = '8') {\r\n\t# $nbj --> nombre de jours du tableau \r\n\t# par defaut 8 ; tableau de la semaine dans actijour_pg.php\r\n\r\n\tglobal $couleur_foncee, $couleur_claire;\r\n\r\n\t$q = sql_select(\r\n\t\t\"DATE_FORMAT(sva.date,'%d/%m') AS date_fr, \r\n\t\tCOUNT(sva.id_article) AS nbart, sv.visites, sva.date \r\n\t\tFROM spip_visites_articles sva LEFT JOIN spip_visites sv ON sva.date = sv.date \r\n\t\tWHERE sva.date > DATE_SUB(NOW(),INTERVAL $nbj DAY) \r\n\t\tGROUP BY sva.date \r\n\t\tORDER BY sva.date\"\r\n\t);\r\n\r\n\t# construit table semaine\r\n\t$semainier = array();\r\n\twhile ($row = sql_fetch($q)) {\r\n\t\t$key = strtotime($row['date']);\r\n\t\t$semainier[$key]['date_fr'] = $row['date_fr'];\r\n\t\t$semainier[$key]['nbart'] = $row['nbart'];\r\n\t\t$semainier[$key]['visites'] = $row['visites'];\r\n\t\t$i++;\r\n\t}\r\n\treset($semainier);\r\n#echo \"<pre>\"; print_r($semainier); echo \"</pre>\";\r\n\r\n\t# combler les jours sans visite\r\n\tif (count($semainier) < $nbj) {\r\n\t\tfor ($i = 0; $i < $nbj; $i++) {\r\n\t\t\tif (!array_key_exists($ante = ante_date_jour($i), $semainier)) {\r\n\t\t\t\t$semainier[$ante]['date_fr'] = ante_date_jour($i, true);\r\n\t\t\t\t$semainier[$ante]['nbart'] = '0';\r\n\t\t\t\t$semainier[$ante]['visites'] = '0';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n#echo \"2 - <pre>\"; print_r($semainier); echo \"</pre> - 2\";\r\n\tksort($semainier);\r\n\r\n\t#\r\n\t# affiche bloc stats semaine\r\n\t#\r\n\t$aff = debut_cadre_relief(\"cal-semaine.gif\", true);\r\n\t# prepa tableau\r\n\t$aff .= \"<span class='verdana3 bold'>\" . _T('actijour:huit_derniers_jours') . \"</span>\\n\"\r\n\t\t. \"<table width='100%' border='0' cellpadding='1' cellspacing='0'>\\n\"\r\n\t\t. \"<tr><td><div class='cell_huit_t' style='background-color:$couleur_foncee;'>\"\r\n\t\t. _T('actijour:jour') . \"</div>\\n\"\r\n\t\t. \"<div class='cell_huit_m'>\" . _T('actijour:nombre_art') . \"</div>\\n\"\r\n\t\t. \"<div class='cell_huit_p' style='background-color:$couleur_claire;'>\"\r\n\t\t. _T('actijour:visites') . \"</div>\\n</td>\";\r\n\r\n\t# les colonnes\r\n\t$add = 0;\r\n\tforeach ($semainier as $day => $vals) {\r\n\t\t$aff .= \"<td><div class='cell_huit_t' style='background-color:$couleur_foncee;'>\"\r\n\t\t\t. $vals['date_fr'] . \"</div>\\n\"\r\n\t\t\t. \"<div class='cell_huit_m'>\" . $vals['nbart'] . \"</div>\\n\"\r\n\t\t\t. \"<div class='cell_huit_p' style='background-color:$couleur_claire;'>\" . $vals['visites']\r\n\t\t\t. \"</div></td>\\n\";\r\n\t\t//calcul moyenne de la \"periode\"\r\n\t\t$add += $vals['visites'];\r\n\t}\r\n\t# moyenne visite semaine\r\n\t$moysem = round($add / 8);\r\n\r\n\t# derniere colonne affichage : moyenne periode\r\n\t$aff .= \"<td>\"\r\n\t\t. \"<div class='cell_huit_t'> </div>\"\r\n\t\t. \"<div class='cell_huit_m' style='background-color:$couleur_claire;'>\"\r\n\t\t. _T('actijour:moyenne_c')\r\n\t\t. \"<div class='cell_huit_p' style='background-color:$couleur_claire;'>\" . $moysem . \"</div>\"\r\n\t\t. \"</td></tr></table>\";\r\n\r\n\t$aff .= fin_cadre_relief(true);\r\n\r\n\treturn $aff;\r\n}",
"private function classementGeneral($rep)\n {\n \n $stockagePoints = array();\n foreach($rep->findAll() as $value)\n {\n $stockagePoints[] = $value->getPoints();\n }\n \n rsort($stockagePoints) ; /* on trie par ordre croissant pour obtenir le classement dans le bon ordre */\n \n $stockUser = array();\n foreach($stockagePoints as $key =>$value){\n foreach($rep->findAll() as $key2 => $value2){\n if($value2->getPoints() == $value || $key == $key2){\n if($value2->getPoints() == $value){ /* enleve doublons */ \n if(!in_array( $this->getDoctrine()->getEntityManager()->getRepository('MetinetFacebookBundle:User')->findOneById($value2->getId()),$stockUser)){\n $stockUser[] = $this->getDoctrine()->getEntityManager()->getRepository('MetinetFacebookBundle:User')->findOneById($value2->getId());\n }\n }\n }\n }\n }\n \n $stockUserTmp = array();\n foreach($stockUser as $value){\n $userInformations = array();\n $userInformations['id'] = $value->getId();\n $userInformations['points'] = $value->getPoints();\n $userInformations['averageTime'] = $value->getAverageTime();\n $stockUserTmp[] = $userInformations ;\n }\n \n $stockUserFinal = array();\n foreach($stockUserTmp as $key =>$value){\n foreach($stockUserTmp as $key2 => $value2){\n if($value['points'] == $value2['points'] && $key == ($key2+1)){ /* si points egaux */\n if($value['averageTime'] < $value2['averageTime']){ /* on teste quel utilisateur a réalisé le meilleur temps */\n $stockUserFinal[] = $this->getDoctrine()->getEntityManager()->getRepository('MetinetFacebookBundle:User')->findOneById($value['id']);\n $stockUserFinal[] = $this->getDoctrine()->getEntityManager()->getRepository('MetinetFacebookBundle:User')->findOneById($value2['id']);\n }\n elseif($value['averageTime'] > $value2['averageTime']){\n $stockUserFinal[] = $this->getDoctrine()->getEntityManager()->getRepository('MetinetFacebookBundle:User')->findOneById($value2['id']);\n $stockUserFinal[] = $this->getDoctrine()->getEntityManager()->getRepository('MetinetFacebookBundle:User')->findOneById($value['id']);\n }\n \n }\n elseif($value['points'] != $value2['points'] && $key+1 == $key2){ /* si points sont differents pas besoins de tester le temps mi par user*/\n if(!in_array($this->getDoctrine()->getEntityManager()->getRepository('MetinetFacebookBundle:User')->findOneById($value['id']),$stockUserFinal)){\n $stockUserFinal[] = $this->getDoctrine()->getEntityManager()->getRepository('MetinetFacebookBundle:User')->findOneById($value['id']);\n }\n }\n }\n }\n \n $stockUserFinal[] = end($stockUser);\n \n return $stockUserFinal ;\n \n }",
"function control_actividad($designaciones=array(),$anio){\n //print_r( $designaciones[0]['id_designacion']);\n $pdia = dt_mocovi_periodo_presupuestario::primer_dia_periodo_anio($anio);\n $udia = dt_mocovi_periodo_presupuestario::ultimo_dia_periodo_anio($anio);\n $band=true;\n $i=0;$long=count($designaciones);\n while($band and $i<$long) {\n $des=$designaciones[$i]['id_designacion'];\n $sql=\"SELECT sub.*,case when sub.tipo_desig=2 then true else case when sub.hasta is not null and sub.hasta<sub.desde then true else case when dias_des-dias_lic<2 then true else case when a.id_materia is not null then true else case when t.id_designacion is not null then true else case when i.id_docente is not null then true else case when sub2.id_designacion is not null then true else case when pe.id_designacion is not null then true else case when pe2.id_designacion is not null then true else false end end end end end end end end end as control FROM\n (SELECT distinct t_d.id_designacion,t_d.cat_mapuche,t_d.id_docente,t_d.tipo_desig,t_d.desde,t_d.hasta, \t\n sum(case when t_no.id_novedad is null then 0 else (case when (t_no.desde>'\".$udia.\"' or (t_no.hasta is not null and t_no.hasta<'\".$pdia.\"')) then 0 else (case when t_no.desde<='\".$pdia.\"' then ( case when (t_no.hasta is null or t_no.hasta>='\".$udia.\"' ) then (((cast('\".$udia.\"' as date)-cast('\".$pdia.\"' as date))+1)) else ((t_no.hasta-'\".$pdia.\"')+1) end ) else (case when (t_no.hasta is null or t_no.hasta>='\".$udia.\"' ) then ((('\".$udia.\"')-t_no.desde+1)) else ((t_no.hasta-t_no.desde+1)) end ) end )end)*t_no.porcen end) as dias_lic,\n case when t_d.desde<='\".$pdia.\"' then ( case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null ) then (((cast('\".$udia.\"' as date)-cast('\".$pdia.\"' as date))+1)) else ((t_d.hasta-'\".$pdia.\"')+1) end ) else (case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null) then ((('\".$udia.\"')-t_d.desde+1)) else ((t_d.hasta-t_d.desde+1)) end ) end as dias_des \n FROM designacion as t_d \n LEFT OUTER JOIN novedad t_no ON (t_d.id_designacion=t_no.id_designacion and t_no.tipo_nov in (2,3,5) \n and t_no.desde<='\".$udia.\"' and t_no.hasta>='\".$pdia.\"')\n where t_d.id_designacion=$des \t\t\t\t\t\n GROUP BY t_d.id_designacion,t_d.id_docente,t_d.tipo_desig,t_d.desde,t_d.hasta)sub\n left outer join asignacion_materia a on (a.id_designacion=sub.id_designacion and a.anio=$anio)\n left outer join asignacion_tutoria t on (t.id_designacion=sub.id_designacion and t.anio=$anio)\n left outer join director_dpto i on (sub.id_docente=i.id_docente and i.desde<='\".$udia.\"' and i.hasta>='\".$pdia.\"')\n\n left outer join (select d.id_docente,pi.id_designacion,d.cat_mapuche \n from integrante_interno_pi pi, designacion d\n \t\t where pi.id_designacion=d.id_designacion\n \t\t and pi.desde<='\".$udia.\"' and pi.hasta>='\".$pdia.\"')sub2 on (sub.id_docente=sub2.id_docente and sub.cat_mapuche=sub2.cat_mapuche)\n \n left outer join vinculo vin on (vin.desig=sub.id_designacion)\n left outer join integrante_interno_pi pi2 on (vin.vinc=pi2.id_designacion and pi2.desde<='\".$udia.\"' and pi2.hasta>='\".$pdia.\"')\n left outer join integrante_interno_pe pe on (sub.id_designacion=pe.id_designacion and pe.desde<='\".$udia.\"' and pe.hasta>='\".$pdia.\"')\n left outer join integrante_interno_pe pe2 on (vin.vinc=pe2.id_designacion and pe2.desde<='\".$udia.\"' and pe2.hasta>='\".$pdia.\"')\n \";\n $resul=toba::db('designa')->consultar($sql);\n if(isset($resul)){\n //$band=$resul[0]['control'];\n $salida['band']=$resul[0]['control'];\n $salida['id']=$des;\n }\n $i++;\n }\n return $salida;\n //return $band;\n }",
"public function getOpcionesEstadosPosiblesDeCambio(){\n \t//return array('planificado' => 'Planificado','parcial' => 'Realizada Parcialmente','cancelado' => 'Cancelada', 'realizado' => 'Realizada');\n \tif($this->esPlanificada()){\n\t\t\treturn array('planificado' => 'Planificado','parcial' => 'Realizada Parcialmente','cancelado' => 'Cancelada');\n\t\t}\n\t\telseif($this->esParcial()){\n\t\t\treturn array('parcial' => 'Realizada Parcialmente','atrasado' => 'Atrasado','cancelado' => 'Cancelada', 'realizado' => 'Realizada');\n\t\t}\n\t\telseif($this->esAtrasada()){\n\t\t\treturn array('parcial' => 'Realizada Parcialmente','atrasado' => 'Atrasado','cancelado' => 'Cancelada', 'realizado' => 'Realizada');\n\t\t}\n\t\telseif($this->esCancelada()){\n\t\t\treturn array('cancelado' => 'Cancelada');\n\t\t}\n\t\telseif($this->esRealizada()){\n\t\t\treturn array('realizado' => 'Realizada');\n\t\t}\n\t\treturn array('planificado' => 'Planificado','parcial' => 'Realizada Parcialmente','cancelado' => 'Cancelada', 'realizado' => 'Realizada');\n\t}"
] |
[
"0.6452714",
"0.63993686",
"0.62553406",
"0.613053",
"0.6068789",
"0.60214907",
"0.60085386",
"0.5897912",
"0.583414",
"0.582952",
"0.578202",
"0.55938625",
"0.5589037",
"0.55726117",
"0.55549204",
"0.5551226",
"0.5541603",
"0.5511701",
"0.55042166",
"0.5504125",
"0.5501868",
"0.54787934",
"0.5473131",
"0.54516566",
"0.5437403",
"0.5408223",
"0.539489",
"0.53668296",
"0.5361948",
"0.53611046"
] |
0.71408886
|
0
|
Funcion que elabora una cadena con los codigos de los estudiantes de un arreglo
|
function obtenerCadenaCodigos($estudiantes){
$cadena_codigos='';
foreach ($estudiantes as $key => $row) {
if(!$cadena_codigos){
$cadena_codigos = $row['COD_ESTUDIANTE'];
}else{
$cadena_codigos .= ",".$row['COD_ESTUDIANTE'];
}
}
return $cadena_codigos;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function porEstudiante($cod_clase, $cod_interno = null) {\n\t\t\t$estudiantes = TAsistencia::all($cod_clase);\n\t\t\tif($estudiantes == null)\n\t\t\t\treturn null;\n\t\t\t$asistencias = array();\n\t\t\tforeach ($estudiantes as $estudiante) {\n\t\t\t\t$asistencias[$estudiante['cod_interno']] = array('asiste' => $estudiante['asiste'], 'cod_motivo' => $estudiante['cod_motivo']);\n\t\t\t}\n\t\t\treturn $asistencias;\n\t\t}",
"function arrayColaEstudiantes (){\n\t\t\t$host = \"localhost\";\n\t\t\t$usuario = \"root\";\n\t\t\t$password = \"\";\n\t\t\t$BaseDatos = \"pide_turno\";\n\n\t $link=mysql_connect($host,$usuario,$password);\n\n\t\t\tmysql_select_db($BaseDatos,$link);\n\t\t\t$retorno = array();\n\t\t\t$consultaSQL = \"SELECT turnos.codigo, turnos.nombre, turnos.carrera FROM turnos WHERE turnos.estado='No atendido' ORDER BY guia;\";\n\t\t\tmysql_query(\"SET NAMES utf8\");\n\t\t\t$result = mysql_query($consultaSQL);\n\t\t\tfor($i=0;$fila= mysql_fetch_assoc($result); $i++) {\n\t\t\t\tfor($a= 0;$a<mysql_num_fields($result);$a++){\n\t\t\t\t\t$campo = mysql_field_name($result,$a);\n\t\t\t\t\t$retorno[$i][$campo] = $fila[$campo];\n\t\t\t\t}\n\t\t\t};\n\t\t\tmysql_close($link);\n\n\t\t\treturn $retorno;\n\t\t}",
"function pegaEstados()\n {\n $lista_estados = array(\n 'ac' => 'Acre',\n 'al' => 'Alagoas',\n 'ap' => 'Amapá',\n 'am' => 'Amazonas',\n 'ba' => 'Bahia',\n 'ce' => 'Ceará',\n 'df' => 'Distrito Federal',\n 'es' => 'Espirito Santo',\n 'go' => 'Goiás',\n 'ma' => 'Maranhão',\n 'ms' => 'Mato Grosso do Sul',\n 'mt' => 'Mato Grosso',\n 'mg' => 'Minas Gerais',\n 'pa' => 'Pará',\n 'pb' => 'Paraíba',\n 'pr' => 'Paraná',\n 'pe' => 'Pernanbuco',\n 'pi' => 'Piauí',\n 'rj' => 'Rio de Janeiro',\n 'rn' => 'Rio Grande do Norte',\n 'rs' => 'Rio Grande do Sul',\n 'ro' => 'Rondônia',\n 'rr' => 'Roraima',\n 'sc' => 'Santa Catarina',\n 'sp' => 'São Paulo',\n 'se' => 'Sergipe',\n 'to' => 'Tocantis'\n );\n\n\n return $lista_estados;\n }",
"function adivinarSexo($array_A){\n $datos=new ManejoDatos();\n $arrayBD =$datos->getEstiloSexoPromedioRecinto();\n if($array_A[0]=='DIVERGENTE'){\n $estilo=4;\n }\n if($array_A[0]=='CONVERGENTE'){\n $estilo=3;\n }\n if($array_A[0]=='ACOMODADOR'){\n $estilo=2;\n }\n if($array_A[0]=='ASIMILADOR'){\n $estilo=1;\n }\n $arrayA = array( $estilo, $array_A[1],($array_A[2] == \"Paraiso\" ? 1 : 2));\n foreach ($arrayBD as $elemento) {\n if($elemento['Estilo']=='DIVERGENTE'){\n $estiloBD=4;\n }\n if($elemento['Estilo']=='CONVERGENTE'){\n $estiloBD=3;\n }\n if($elemento['Estilo']=='ACOMODADOR'){\n $estiloBD=2;\n }\n if($elemento['Estilo']=='ASIMILADOR'){\n $estiloBD=1;\n }\n $arrayB = array($estiloBD, $elemento['Promedio'], $elemento['Recinto'] == \"Paraiso\" ? 1 : 2);\n $temporal = $this->distanciaEuclidiana($arrayA, $arrayB);\n if ($temporal < $this->distancia) {\n $this->distancia = $temporal;\n $this->temporal = $elemento['Sexo'];\n }\n }\n if($this->temporal=='M'){\n $this->temporal=\"Masculino\";\n return $this->temporal;\n }\n if($this->temporal=='F'){\n $this->temporal=\"Femenino\";\n return $this->temporal;\n }\n }",
"function adivinarEstilo($array_A){\n $datos=new ManejoDatos();\n $arrayBD =$datos->getEstiloSexoPromedioRecinto();\n \n $arrayA = array($array_A[2] == \"Masculino\" ? 1 : 2, $array_A[1],($array_A[0] == \"Paraiso\" ? 1 : 2)); \n \n foreach ($arrayBD as $elemento) {\n \n $arrayB = array($elemento['Sexo'] == \"M\" ? 1 : 2, $elemento['Promedio'], $elemento['Recinto'] == \"Paraiso\" ? 1 : 2);\n $temporal = $this->distanciaEuclidiana($arrayA, $arrayB);\n if ($temporal < $this->distancia) {\n $this->distancia = $temporal;\n $this->temporal = $elemento['Estilo'];\n }\n }\n \n return $this->temporal;\n \n }",
"public static function datosgrafo($escala,$numeropuntos,$fecha=null){\n\t\t$arreglo=self::getStockHistorico($escala,$numeropuntos,$fecha=null);\n\t\t$series=array();\n\t\tforeach($arreglo as $fila){\n\t\t\t//$rango[$fila[$escala]][]=$fila['codal'].'';\n\t\t\t$series[$fila[$escala]][$fila['codal']]=$fila['total'];\n\t\t}\n\t\t$almacenes= Yii::app()->db->createCommand()\n\t\t\t->select('codalm')\n\t\t\t->from('{{almacenes}}')\n\t\t\t->queryColumn();\n\t\t$seriesaux=$series;\n\t\t///POrs is se ha insertado algun almancen entre la fecha mimina y la actual\n\t\t//Toca rellenar con ceros las sere\n\t\tforeach($seriesaux as $clave=>$valor){\n\t\t\t$diferencia=array_diff(array_values($almacenes),array_keys($valor));\n\t\t\tif(count($diferencia)>0) //Si hay registro que no cotienen algun alamcen\n\t\t\t{foreach($diferencia as $clavex=>$valorx){\n\t\t\t\t\t $series[$clave][$valorx]=0; //Insertar valores cero para rellenar\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$ordenadas=array();\n\t\tforeach ($series as $clave=>$valor){\n\t\t\tforeach(array_keys($valor) as $clavex=>$cv){\n\t\t\t\t$ordenadas[]['name']=$cv;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\t//return $absisas;\n\t\t\tforeach($series as $serieclave =>$valorserie){\n\t\t\t\tforeach($valorserie as $clavealmacen=>$valorstock){\n\t\t\t\t\tforeach($ordenadas as $clave =>$arrayname_almacen){\n\t\t\t\t\t\tif($arrayname_almacen['name']==$clavealmacen){\n\t\t\t\t\t\t\t$ordenadas[$clave]['data'][]=$valorstock+0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\n\t\treturn array('absisas'=>array_map('self::uniformiza',array_keys($series)),'ordenadas'=> $ordenadas);\n\t}",
"public function getSumas() {\n $aDatos = $this->getAsistentes();\n $aAsi = array();\n $aPer = array();\n $aRep = array();\n $prop = 0;\n $repr = 0;\n $vosp = 0;\n $vonp = 0;\n $vosr = 0;\n $vonr = 0;\n $cofp = 0;\n $cofr = 0;\n \n foreach ($aDatos as $aAsistente) {\n if($aAsistente[3] == 'S') {\n // Representante.\n $repr++; // Numero de respresentantes.\n $aRep[$aAsistente[1]] = $aAsistente[1]; // Para el numero de respresentantes diferentes.\n $vosr += ($aAsistente[4] == 'S') ? 1 : 0; // Representantes con voto.\n $vonr += ($aAsistente[4] == 'N') ? 1 : 0; // Representantes sin voto.\n $cofr += $aAsistente[5]; // Coeficiente fase.\n } else {\n // Propietario.\n $prop++;\n $aPer[$aAsistente[1]] = $aAsistente[1]; // Para el numero de propietarios diferentes.\n $vosp += ($aAsistente[4] == 'S') ? 1 : 0; // Propietarios con voto.\n $vonp += ($aAsistente[4] == 'N') ? 1 : 0; // Propietarios sin voto.\n $cofp += $aAsistente[5]; // Coeficiente fase.\n }\n }\n $aAsi['prop'] = array($prop, count($aPer), $vosp, $vonp, $cofp);\n $aAsi['repr'] = array($repr, count($aRep), $vosr, $vonr, $cofr);\n return $aAsi;\n }",
"private function telaPerfilLoja()\r\n {\r\n //Carregando os anos do banco de dados\r\n $repositorio = $this->getDoctrine()->getRepository('DCPBundle:Quebra');\r\n\r\n $sql = $repositorio->createQueryBuilder('q')\r\n ->select('q.data')\r\n ->groupBy('q.data')\r\n ->getquery();\r\n\r\n $resultado = $sql->getResult();\r\n\r\n $anoGeral = array();\r\n $contAnoGeral = 0;\r\n foreach ($resultado as $data)\r\n {\r\n $anoGeral[$contAnoGeral] = $data[\"data\"]->format(\"Y\");\r\n $contAnoGeral++;\r\n }\r\n\r\n $ano = array();\r\n $contAno = 0;\r\n foreach ($anoGeral as $anoAPesquisar)\r\n {\r\n if (!in_array($anoAPesquisar, $ano))\r\n {\r\n $ano[$contAno] = $anoAPesquisar;\r\n $contAno++;\r\n }\r\n }\r\n\r\n return $ano;\r\n }",
"function buscarEstudiantesConEspaciosReprobados($estudiantes,$estudiantes_clasificados){\n if(count($estudiantes)>0){\n foreach ($estudiantes as $key => $arreglo_estudiante) {\n $cantidad_reprobados = 0;\n \n\n $espacios_por_cursar = json_decode($arreglo_estudiante['ESPACIOS_POR_CURSAR'],true);\n $cantidad_reprobados = $this->contarReprobados($espacios_por_cursar);\n switch($cantidad_reprobados){\n case 1:\n $resultado = array( 'COD_ESTUDIANTE'=>$arreglo_estudiante['COD_ESTUDIANTE'],\n 'COD_PROYECTO'=>$arreglo_estudiante['COD_PROYECTO'],\n 'CLASIFICACION'=>'4',\n 'TIPO'=>$arreglo_estudiante['TIPO']\n );\n $estudiantes_clasificados[] = $resultado;\n unset($estudiantes[$key]);\n break;\n case 2:\n $resultado = array( 'COD_ESTUDIANTE'=>$arreglo_estudiante['COD_ESTUDIANTE'],\n 'COD_PROYECTO'=>$arreglo_estudiante['COD_PROYECTO'],\n 'CLASIFICACION'=>'5',\n 'TIPO'=>$arreglo_estudiante['TIPO']\n );\n $estudiantes_clasificados[] = $resultado;\n unset($estudiantes[$key]);\n break;\n case 3:\n $resultado = array( 'COD_ESTUDIANTE'=>$arreglo_estudiante['COD_ESTUDIANTE'],\n 'COD_PROYECTO'=>$arreglo_estudiante['COD_PROYECTO'],\n 'CLASIFICACION'=>'6',\n 'TIPO'=>$arreglo_estudiante['TIPO']\n );\n $estudiantes_clasificados[] = $resultado;\n unset($estudiantes[$key]);\n break;\n default:\n if($cantidad_reprobados>3){\n $resultado = array( 'COD_ESTUDIANTE'=>$arreglo_estudiante['COD_ESTUDIANTE'],\n 'COD_PROYECTO'=>$arreglo_estudiante['COD_PROYECTO'],\n 'CLASIFICACION'=>'7',\n 'TIPO'=>$arreglo_estudiante['TIPO']\n );\n $estudiantes_clasificados[] = $resultado;\n unset($estudiantes[$key]);\n }\n break;\n\n }\n }\n }\n $resultado = array( 'ESTUDIANTES'=>$estudiantes,\n 'CLASIFICADOS'=>$estudiantes_clasificados);\n return $resultado;\n }",
"function CortesDinamicas($Periodo){\n \n \n \n $arrayP = str_split($Periodo, strlen($Periodo)-1);\n\n $year = $arrayP[0];\n $P_Ini = $arrayP[1];\n \n $C_Periodos = array();\n \n for($i=1;$i<=20;$i++){\n /***********************************************************************/\n if($i==1){//if..1\n $PeriodoView = $year.'-'.$P_Ini;\n $CodigoPeriodo = $Periodo;\n }else{\n if($P_Ini==2){////if..2\n $year = $year+1;\n $P_Ini = 1;\n $PeriodoView = $year.'-'.$P_Ini;\n $CodigoPeriodo = $year.$P_Ini;\n }else{\n if($P_Ini==1){\n $P_Ini = 2; \n }\n $PeriodoView = $year.'-'.$P_Ini;\n $CodigoPeriodo = $year.$P_Ini;\n }//if..2\n }//if..1\n \n $C_Periodos[]= $CodigoPeriodo; \n } \n \n //echo '<pre>';print_r($C_Periodos);\n return $C_Periodos;\n \n}",
"function getEstadosParqueo()\n{\n return array(\n array('codigo' => 'AVL', 'valor' => 'Disponible'),\n array('codigo' => 'OCP', 'valor' => 'Ocupado'),\n array('codigo' => 'RSV', 'valor' => 'Reservado'),\n );\n}",
"function arrayTurnosCola (){\n\t\t$host = \"localhost\";\n\t\t$usuario = \"root\";\n\t\t$password = \"\";\n\t\t$BaseDatos = \"pide_turno\";\n\n $link=mysql_connect($host,$usuario,$password);\n\n\t\tmysql_select_db($BaseDatos,$link);\n\n\t\t$consultaSQL= \"SELECT estado_programas.programa, estado_programas.Comentarios, estado_programas.turnos_atendidos, estado_programas.codigo, estado_programas.turnos_manana, estado_programas.turnos_tarde, estado_programas.segundos_espera, estado_programas.estado FROM estado_programas GROUP BY estado_programas.programa\";\n\t\t$retorno =\"\";\n\t\tmysql_query(\"SET NAMES utf8\");\n\t\t$result = mysql_query($consultaSQL);\n\t\tfor($i=0;$fila= mysql_fetch_assoc($result); $i++) {\n\t\t\tfor($a= 0;$a<mysql_num_fields($result);$a++){\n\t\t\t\t$campo = mysql_field_name($result,$a);\n\t\t\t\t$retorno[$i][$campo] = $fila[$campo];\n\t\t\t}\n\t\t};\n\t\tmysql_close($link);\n\n\t\treturn $retorno;\n\t}",
"public function getDados() {\n\n $oDadosMatricula = new stdClass();\n $iCodigoMatricula = $this->oMatricula->getCodigo();\n $iCodigoAluno = $this->oMatricula->getAluno()->getCodigoAluno();\n $iCodigoTurma = $this->oMatricula->getTurma()->getCodigo();\n $iCodigoEnsino = $this->oMatricula->getTurma()->getBaseCurricular()->getCurso()\n ->getEnsino()->getCodigo();\n $oDadosMatricula->codigo_matricula = $this->oMatricula->getMatricula();\n $oDadosMatricula->data_matricula = $this->oMatricula->getDataMatricula()->convertTo(DBDate::DATA_EN);\n $oDadosMatricula->situacao_matricula = utf8_encode($this->oMatricula->getSituacao());\n if ($this->oMatricula->getTipo() == 'R' && $this->oMatricula->getSituacao() == 'MATRICULADO') {\n $oDadosMatricula->situacao_matricula = utf8_encode(\"REMATRICULADO\");\n }\n if ($this->oMatricula->isConcluida()) {\n $oDadosMatricula->situacao_matricula .= \" (\".utf8_encode(\"CONCLUÍDA\").\")\";\n }\n $oDadosMatricula->etapa_matricula = utf8_encode($this->oMatricula->getEtapaDeOrigem()->getNome());\n $oDadosMatricula->turma_matricula = utf8_encode($this->oMatricula->getTurma()->getDescricao());\n $oDadosMatricula->turma_turno = utf8_encode($this->oMatricula->getTurma()->getTurno()->getDescricao());\n $oDadosMatricula->turma_calendario = utf8_encode($this->oMatricula->getTurma()->getCalendario()->getDescricao());\n $oDadosMatricula->turma_escola = utf8_encode($this->oMatricula->getTurma()->getEscola()->getNome());\n $oDadosMatricula->data_saida = '';\n if ($this->oMatricula->getDataEncerramento() != \"\") {\n $oDadosMatricula->data_saida = $this->oMatricula->getDataEncerramento()->convertTo(DBDate::DATA_EN);\n }\n\n\n $oDadosMatricula->periodos_etapa = $this->getPeridosEtapa();\n $oDadosMatricula->grade_aproveitamento = $this->getGradeAproveitamento();\n $oDadosMatricula->resultado_final_etapa = utf8_encode(ResultadoFinal($iCodigoMatricula,\n $iCodigoAluno,\n $iCodigoTurma,\n $this->oMatricula->getSituacao(),\n $this->oMatricula->isConcluida()?'S':'N',\n $iCodigoEnsino\n ));\n $oDadosMatricula->atividades_complementares = $this->getAtividadesComplementares();\n return $oDadosMatricula;\n }",
"function getDados($codAtividade){\n\n }",
"public function buscar_comprobante_venta_2($anio) {\n //CPC_TipoDocumento => F factura, B boleta\n //CPC_total => total de la FACTURA o BOLETA\n $sql = \" SELECT * FROM cji_comprobante c WHERE CPC_TipoOperacion='V' AND CPC_TipoDocumento='F' AND YEAR(CPC_FechaRegistro)=\" . $anio . \"\";\n //echo $sql;\n $query = $this->db->query($sql);\n if ($query->num_rows > 0) {\n foreach ($query->result() as $fila) {\n $data[] = $fila;\n }\n return $data;\n }\n return array();\n }",
"function addOcorencias($ltOcorrencia, $tpOcorrencia, $graph, &$ocorrencias){\n\tforeach ($ltOcorrencia as $key => $value) {\n\n\t\tif ($tpOcorrencia[$key][0] == 'ALF' ) {\n\n\t\t\t$resp = buscaAlf($graph, $ltOcorrencia[$key]);\n\t\t\tif ($resp != 0) {\n\t\t\t\t$ocorrencias[] = $resp;\n\t\t\t}\n\t\t}elseif ($tpOcorrencia[$key][0] == 'DATE' or $tpOcorrencia[$key][0] == 'INT') {\n\t\t\t$resp = buscaDate($graph, $ltOcorrencia[$key]);\n\t\t\tif ($resp != 0) {\n\t\t\t\t$ocorrencias[] = $resp;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif ($tpOcorrencia[$key][0] == 'INT') {\n\t\t\t$resp = buscaInt($graph, $ltOcorrencia[$key]);\n\t\t\tif ($resp != 0) {\n\t\t\t\t$ocorrencias[] = $resp;\n\t\t\t}\n\t\t}\n\t\t\n\t}\n}",
"function __procesarAsistenciaIndividual($cod_interno){\n \n\t\t\t$sql = \"SELECT * FROM \".Config::get(__CLASS__).\" WHERE cod_interno = '$cod_interno'\";\n\t\t\t$asistencias = DB::table_query($sql);\n\t\t\t$motivos = TMotivoInasistencia::motivos();\n\t\t\t$reporte = array();\n\t\t\t$reporte['asistencia'] = array_fill_keys(array('t','f'), 0);\n\t\t\t$reporte['motivos'] = array_fill_keys(array_keys($motivos), 0);\n\t\t\t$reporte['validez'] = array_fill_keys(array('t','f'), 0);\t\t\t\n\t\t\t$reporte['total'] = count($asistencias);\n\n\t\t\tforeach($asistencias as $asistencia){\n\t\t\t\t$reporte['asistencia'][$asistencia['asiste']]++;\n\t\t\t\tif($asistencia['asiste'] == 'f'){\n\t\t\t\t\t$cod_motivo = $asistencia['cod_motivo'];\n\t\t\t\t\t$reporte['motivos'][$cod_motivo]++;\n\t\t\t\t\t$reporte['validez'][$motivos[$cod_motivo]['valida']]++;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $reporte;\n\t\t}",
"public function getSumas() {\n $aVot = $this->votos;\n $aCoe = $this->coeficientes;\n \n $asis = 0; $vots = 0; $votn = 0; $pres = 0;\n $opc1 = 0; $opc2 = 0; $opc3 = 0; $opc4 = 0;\n $urb1 = 0; $urb2 = 0; $urb3 = 0; $urb4 = 0;\n $fas1 = 0; $fas2 = 0; $fas3 = 0; $fas4 = 0;\n $blo1 = 0; $blo2 = 0; $blo3 = 0; $blo4 = 0;\n \n foreach ($aVot as $apa => $aDat) {\n $asis += ($aDat[0] == 'S') ? 1 : 0;\n $vots += ($aDat[1] == 'S') ? 1 : 0;\n $votn += ($aDat[1] == 'S') ? 0 : 1;\n $pres += ($aDat[2] == 'S') ? 1 : 0;\n \n $opc1 += ($aDat[3] == 'S') ? 1 : 0;\n $opc2 += ($aDat[4] == 'S') ? 1 : 0;\n $opc3 += ($aDat[5] == 'S') ? 1 : 0;\n $opc4 += ($aDat[6] == 'S') ? 1 : 0;\n \n $urb1 += ($aDat[3] == 'S') ? $aCoe[$apa][0] : 0;\n $urb2 += ($aDat[4] == 'S') ? $aCoe[$apa][0] : 0;\n $urb3 += ($aDat[5] == 'S') ? $aCoe[$apa][0] : 0;\n $urb4 += ($aDat[6] == 'S') ? $aCoe[$apa][0] : 0;\n \n $fas1 += ($aDat[3] == 'S') ? $aCoe[$apa][1] : 0;\n $fas2 += ($aDat[4] == 'S') ? $aCoe[$apa][1] : 0;\n $fas3 += ($aDat[5] == 'S') ? $aCoe[$apa][1] : 0;\n $fas4 += ($aDat[6] == 'S') ? $aCoe[$apa][1] : 0;\n \n $blo1 += ($aDat[3] == 'S') ? $aCoe[$apa][2] : 0;\n $blo2 += ($aDat[4] == 'S') ? $aCoe[$apa][2] : 0;\n $blo3 += ($aDat[5] == 'S') ? $aCoe[$apa][2] : 0;\n $blo4 += ($aDat[6] == 'S') ? $aCoe[$apa][2] : 0;\n }\n $aSumas['asis'] = array($asis, $vots, $votn, $pres);\n $aSumas['opci'] = array($opc1, $opc2, $opc3, $opc4);\n $aSumas['urba'] = array($urb1, $urb2, $urb3, $urb4);\n $aSumas['fase'] = array($fas1, $fas2, $fas3, $fas4);\n $aSumas['bloq'] = array($blo1, $blo2, $blo3, $blo4);\n \n return $aSumas;\n }",
"function buscarEspaciosVistos(){\r\n $i=0;\r\n $espacios_vistos=isset($espacios_vistos)?$espacios_vistos:'';\r\n $espacios=isset($reprobados)?$reprobados:'';\r\n \r\n if(is_array($this->espaciosCursados)){\r\n foreach ($this->espaciosCursados as $espacio) {\r\n $espacios[$i]=$espacio[0];\r\n $i++;\r\n }\r\n }\r\n \r\n if(is_array($espacios)){\r\n $espacios= array_unique($espacios);\r\n if($this->datosEstudiante['IND_CRED']=='S'){\r\n foreach ($espacios as $key => $espacio) {\r\n foreach ($this->espaciosCursados as $cursado) {\r\n if($espacio==$cursado['CODIGO']){\r\n $espacios_vistos[$key]['CODIGO']=$cursado['CODIGO'];\r\n $espacios_vistos[$key]['CREDITOS']=(isset($cursado['CREDITOS'])?$cursado['CREDITOS']:0);\r\n }\r\n }\r\n }\r\n }else{\r\n $espacios_vistos=$espacios;\r\n }\r\n \r\n }\r\n return $espacios_vistos;\r\n }",
"function obtener_aulas ($espacios_concedidos){\n $aulas=array();\n $indice=0;\n foreach($espacios_concedidos as $clave=>$valor){\n $aula=array(); // indice => (aula, id_aula)\n $aula['aula']=$valor['aula'];\n $aula['id_aula']=$valor['id_aula'];\n //$aula=$valor['aula'];\n $existe=$this->existe($aulas, $aula);\n if(!$existe){\n $aulas[$indice]=$aula;\n $indice += 1;\n }\n }\n return $aulas;\n }",
"public function get_codigo_muestra($cod_muestra){\n $fecha = getdate();\n $dia = $fecha[\"mday\"];\n $mes = $fecha[\"mon\"];\n $año = $fecha[\"year\"];\n $año_=substr($año,2);\n \n while($datos = mysqli_fetch_array($cod_muestra)){\n $codigo_muestra = $datos['codigo_muestra'];\n }\n if($codigo_muestra!=\"\"){\n (int)$primer_digito = substr($codigo_muestra,0,4);\n $num = ((int)$primer_digito+1);\n\n $codigo_muestra = $num.\"-\".$dia.\"-\".$mes.\"-\".$año_.\"-\".$num;\n \n return ltrim($codigo_muestra);\n\n }else{\n $codigo_muestra =\"100\".\"-\".$dia.\"-\".$mes.\"-\".$año_.\"-\".\"100\";\n return $codigo_muestra;\n }\n\n }",
"public function buscarDatosDeCodigo($lote, $suc){\n $db = new My();\n $my = new My();\n $datos = array();\n $query = \"SELECT a.codigo AS Codigo,l.lote,CONCAT( a.descrip, '-', p.nombre_color) AS Descrip , s.suc, s.cantidad AS Stock, s.estado_venta,a.um AS UM,l.ancho AS Ancho,l.gramaje AS Gramaje,l.tara AS Tara,l.padre AS Padre,s.ubicacion AS U_ubic,\n l.img AS Img, l.kg_desc AS U_kg_desc,h.fecha_hora AS entDate\n\n FROM articulos a INNER JOIN lotes l ON a.codigo = l.codigo INNER JOIN stock s ON l.codigo = s.codigo AND l.lote = s.lote \n INNER JOIN pantone p ON l.pantone = p.pantone INNER JOIN historial h ON l.codigo = h.codigo AND l.lote = h.lote\n WHERE s.cantidad > 0 AND s.suc = '$suc' AND l.lote ='$lote' GROUP BY lote ORDER BY h.fecha_hora ASC LIMIT 1\";\n \n $my->Query($query);\n if($my->NextRecord()){\n $datos = $my->Record;\n if(count($datos)){\n $datos = array_map(\"utf8_encode\",$datos);\n // print_r($datos);\n \n $rem = \"SELECT CONCAT(fecha_cierre,' ',hora_cierre) AS fecha_ingreso FROM nota_remision n, nota_rem_det d WHERE n.n_nro = d.n_nro AND lote = '$lote' AND n.estado = 'Cerrada' AND n.suc_d = '$suc'\";\n \n $db->Query($rem);\n if($db->NumRows() > 0){ \n $db->NextRecord();\n $fecha_ingreso = $db->Record['fecha_ingreso'];\n $datos['entDate'] = $fecha_ingreso;\n }\n // Buscar si esta en una Remision Abierta o En Proceso\n $rem2 = \"SELECT n.n_nro, n.suc_d FROM nota_remision n, nota_rem_det d WHERE n.n_nro = d.n_nro AND lote = '$lote' AND n.estado != 'Cerrada' AND n.suc = '$suc'\";\n \n $db->Query($rem2);\n if($db->NumRows() > 0){ \n $db->NextRecord();\n $n_nro = $db->Record['n_nro'];\n $destino = $db->Record['suc_d'];\n $datos['NroRemision'] = $n_nro;\n $datos['Destino'] = $destino;\n $datos['Mensaje']=\"En Remision\";\n }else{\n $datos['Mensaje']=\"Ok\"; \n }\n \n }\n echo json_encode($datos);\n }else{\n echo '{\"Mensaje\":\"Error: Codigo no encontrado!\"}';\n } \n $my->Close();\n }",
"public function calculConge($id){\n $indispos = array();\n // array du genre 'type','mois','nb'\n $sql =\"select DATE_FORMAT(DATE,'%m') as MOIS,activite_id,SUM(TOTAL) as TOTAL\n from activitesreelles \n where activitesreelles.utilisateur_id = \".$id.\"\n and activitesreelles.activite_id = 1\n and DATE_FORMAT(DATE,'%Y') = DATE_FORMAT(NOW(),'%Y')\n group by MOIS,activite_id\";\n $results = $this->Utilisateur->query($sql);\n foreach($results as $result):\n $indispos[$result[0]['MOIS']]=$result[0]['TOTAL'];\n endforeach;\n for($i=1;$i<13;$i++){\n $mois = $i < 10 ? '0'.$i : (String)$i;\n if (!array_key_exists($mois, $indispos)) {\n $indispos[$mois]='0';\n }\n }\n return $indispos;\n }",
"public function buscar_comprobante_venta_2($anio)\n {\n //CPC_TipoDocumento => F factura, B boleta\n //CPC_total => total de la FACTURA o BOLETA\n $sql = \" SELECT * FROM cji_comprobante c WHERE CPC_TipoOperacion='V' AND CPC_TipoDocumento='F' AND YEAR(CPC_FechaRegistro)=\" . $anio . \"\";\n //echo $sql;\n $query = $this->db->query($sql);\n if ($query->num_rows > 0) {\n foreach ($query->result() as $fila) {\n $data[] = $fila;\n }\n return $data;\n }\n return array();\n }",
"function ordenarEstudiantesClasificados($estudiantes_clasificados){\n // Obtener una lista de columnas\n foreach ($estudiantes_clasificados as $key => $row) {\n $nivel[$key] = $row['CLASIFICACION'];\n $codigos[$key] = $row['COD_ESTUDIANTE'];\n }\n\n // Ordenar los datos con nivel ascendente, codigos ascendente\n // Agregar $datos como el último parámetro, para ordenar por la llave común\n array_multisort($nivel, SORT_ASC, $codigos, SORT_ASC, $estudiantes_clasificados);\n \n //adicionamos ID a cada estudiante\n foreach ($estudiantes_clasificados as $key3 => $informacion){\n $estudiantes_clasificados[$key3]['ID'] = $key3+1;\n }\n return $estudiantes_clasificados;\n }",
"function buscarEstudiantesNivelados($estudiantes,$estudiantes_clasificados){\n \n $k=0;\n\tunset ($this->notas);\n $this->notas = $this->obtenerNotas();\n if(count($estudiantes)>0)\n {\n foreach ($estudiantes as $key => $estudiante) {\n //buscamos las notas\n $reprobados = 0;\n $notas_estudiante = array();\n $notas_estudiante = $this->obtenerNotasEstudiante($estudiante['COD_ESTUDIANTE']);\n $reprobados = $this->verificarReprobados($notas_estudiante);\n unset($notas_estudiante);\n if($reprobados==0){\n $resultado = array( 'COD_ESTUDIANTE'=>$estudiante['COD_ESTUDIANTE'],\n 'COD_PROYECTO'=>$estudiante['COD_PROYECTO'],\n 'CLASIFICACION'=>'1',\n 'TIPO'=>$estudiante['TIPO']\n );\n $estudiantes_clasificados[] = $resultado;\n unset($estudiantes[$key]);\n }\n }\n }\n $resultado = array( 'ESTUDIANTES'=>$estudiantes,\n 'CLASIFICADOS'=>$estudiantes_clasificados);\n return $resultado;\n }",
"function determinaFechosVazios()\n{\n\tglobal $mTransicoes, $lAlfabeto, $fechoVazio, $lEstados, $lTokens; \t\n\n\t//Variáveis\n\t$arrayEstados = NULL; //array com as diversas transições vazias de um mesmo estado\n\t$arrayEstados2 = NULL;\t\n\t$transConcatenadas = NULL; //array com a string inteira da transição, pode ter diversas transições vazias\n\n\techo \"------------------------------------<br>\";\n\techo \"Passo 1: Fechos dos estados<br>\";\n\t\n\tfor($i = 1; $i <= sizeof($lEstados); $i++) //determina o fecho para cada estado do autômato\n\t{ \n\t\t//echo \"Fecho de \".$lEstados[$i].\":<br>\";\n\t\t//echo \" Transicoes vazias: \".$mTransicoes[$lEstados[$i]][$lAlfabeto[0]].\"<br>\";\n\t\tif($mTransicoes[$lEstados[$i]][$lAlfabeto[0]] != '-') //mtransicoes[\"q0\"][\"e\"] != \"-\" \n\t\t{\n\t\t\t//echo \" Diferente de '-'<br>\";\n\t\t\t$fechoVazio[$lEstados[$i]][] = $lEstados[$i]; //coloca ele mesmo na lista //fechoVazio[\"q0\"][0] = \"q0'\n\t\t\t$lTokens = NULL; //limpa conteúdo de $lTokens\n\t\t\ttokeniza($mTransicoes[$lEstados[$i]][$lAlfabeto[0]]); //\"tokeniza\" vai deixar em $lTokens todos os estados de transição vazia\n\t\t\t$arrayEstados = $lTokens;\t\n\t\n\t\t\tfor($j = 0; $j < sizeof($arrayEstados); $j++)\n\t\t\t{\n\t\t\t\t//echo \" arrayEstados[$j] = \".$arrayEstados[$j].\"<br>\";\t\t\t\t\n\t\t\t\t//ve se o estado está no fecho, se não estiver coloca\n\t\t\t\tif(array_search($arrayEstados[$j], $fechoVazio[$lEstados[$i]]) == NULL \t\n\t\t\t\t\t\t\t\t&& $arrayEstados[$j] != '-'\n\t\t\t\t\t\t\t\t&& $arrayEstados[$j] != $fechoVazio[$lEstados[$i]][0])\t\n\t\t\t\t{ //o teste é igual a NULL, logo não achou o estado no fecho\n\t\t\t\t\t$fechoVazio[$lEstados[$i]][sizeof($fechoVazio[$lEstados[$i]])] = $arrayEstados[$j];\n\t\t\t\t\t//echo \" 1fechoVazio[$lEstados[$i]][\".sizeof($fechoVazio[$lEstados[$i]]).\"]: \".$arrayEstados[$j].\"<br>\";\n\t\t\t\t\t//agora precisamos ver as transições vazias do arrayEstados[$j]\n\t\t\t\t\t$lTokens = NULL; //limpa conteúdo de $lTokens\n\t\t\t\t\ttokeniza($mTransicoes[$arrayEstados[$j]][$lAlfabeto[0]]); \n\t\t\t\t\t$arrayEstados2 = NULL;\n\t\t\t\t\t$arrayEstados2 = $lTokens;\n\t\t\t\t\t//echo \" \";\t\n\t\t\t\t\t//echo \"transicao: \".$arrayEstados2[0].\"<br>\";\n\t\n\t\t\t\t\tfor($k = 0; $k < sizeof($arrayEstados2); $k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(array_search($arrayEstados2[$j], $fechoVazio[$lEstados[$i]]) == NULL \n\t\t\t\t\t\t\t\t\t\t&& $arrayEstados2[$j] != '-' \n\t\t\t\t\t\t\t\t\t\t&& $arrayEstados2[$j] != $fechoVazio[$lEstados[$i]][0])\t\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t$fechoVazio[$lEstados[$i]][sizeof($fechoVazio[$lEstados[$i]])] = $arrayEstados2[$k];\n\t\t\t\t\t\t\t//echo \" 2fechoVazio[$lEstados[$i]][\".sizeof($fechoVazio[$lEstados[$i]]).\"]: \".$arrayEstados2[$j].\"<br>\";\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} \t\n\t\t}\n\t\telse //estado sem transições vazias, logo o fecho vazio é vazio\n\t\t{\n\t\t\t$fechoVazio[$lEstados[$i]][] = $lEstados[$i]; //o fecho de um estado contém ele próprio sempre\n\t\t\t//echo \" Eh vazio, coloca so ele mesmo<br>\";\n\t\t}\n\t}\t\n\n\tfor($i = 1; $i <= sizeof($lEstados); $i++) //determina o fecho para cada estado do autômato\n\t{ \n\t\tsort($fechoVazio[$lEstados[$i]]);\n\t\techo $lEstados[$i].\": \";\n\t\tfor($j = 0; $j < sizeof($fechoVazio[$lEstados[$i]]); $j++)\n\t\t{\n\t\t\techo $fechoVazio[$lEstados[$i]][$j].\".\";\n\t\t}\n\t\techo \"<br>\";\n\t}\n\n\techo \"------------------------------------<br>\";\n\treturn;\n}",
"function adivinarRecinto($array_A){\n $datos=new ManejoDatos();\n $arrayBD =$datos->getEstiloSexoPromedioRecinto();\n if($array_A[0]=='DIVERGENTE'){\n $estilo=4;\n }\n if($array_A[0]=='CONVERGENTE'){\n $estilo=3;\n }\n if($array_A[0]=='ACOMODADOR'){\n $estilo=2;\n }\n if($array_A[0]=='ASIMILADOR'){\n $estilo=1;\n }\n $arrayA = array( $estilo, $array_A[1],($array_A[2] == \"Masculino\" ? 1 : 2));\n foreach ($arrayBD as $elemento) {\n if($elemento['Estilo']=='DIVERGENTE'){\n $estiloBD=4;\n }\n if($elemento['Estilo']=='CONVERGENTE'){\n $estiloBD=3;\n }\n if($elemento['Estilo']=='ACOMODADOR'){\n $estiloBD=2;\n }\n if($elemento['Estilo']=='ASIMILADOR'){\n $estiloBD=1;\n }\n $arrayB = array($estiloBD, $elemento['Promedio'], $elemento['Sexo'] == \"M\" ? 1 : 2);\n $temporal = $this->distanciaEuclidiana($arrayA, $arrayB);\n if ($temporal < $this->distancia) {\n $this->distancia = $temporal;\n $this->temporal = $elemento['Recinto'];\n }\n }\n return $this->temporal;\n }",
"private function codIva(): array\n {\n $codigos = [];\n if ($this->ws === 'wsfe') {\n $codigos = $this->FEParamGetTiposIva();\n $codigos = array_map(function ($o) {\n return $o->Id;\n }, $codigos->IvaTipo);\n } elseif ($this->ws === 'wsmtxca') {\n /** @var array $authRequest */\n $authRequest = $this->service->authRequest;\n $codigos = (new WsParametros())->consultarAlicuotasIVA($this->service->client, $authRequest);\n $codigos = array_map(function ($o) {\n return $o->codigo;\n }, $codigos->arrayAlicuotasIVA->codigoDescripcion);\n }\n\n return $codigos;\n }",
"public function gerarDados() {\n \n if (empty($this->sDataInicial)) {\n throw new Exception(\"Data inicial nao informada!\");\n }\n \n if (empty($this->sDataFinal)) {\n throw new Exception(\"Data final não informada!\");\n }\n /**\n * Separamos a data do em ano, mes, dia\n */\n list($iAno, $iMes, $iDia) = explode(\"-\",$this->sDataFinal);\n $oInstituicao = db_stdClass::getDadosInstit(db_getsession(\"DB_instit\"));\n $sListaInstit = db_getsession(\"DB_instit\");\n $sSqlSubsidio = \"select c16_mes, \";\n $sSqlSubsidio .= \" c16_ano,\";\n $sSqlSubsidio .= \" c16_subsidiomensal,\";\n $sSqlSubsidio .= \" c16_subsidioextraordinario,\";\n $sSqlSubsidio .= \" z01_nome, \";\n $sSqlSubsidio .= \" z01_cgccpf \";\n $sSqlSubsidio .= \" from padsigapsubsidiosvereadores \"; \n $sSqlSubsidio .= \" inner join cgm on z01_numcgm = c16_numcgm \"; \n $sSqlSubsidio .= \" where c16_ano = {$iAno} \";\n $sSqlSubsidio .= \" and c16_mes <= $iMes\"; \n $sSqlSubsidio .= \" and c16_instit = {$sListaInstit}\";\n $sSqlSubsidio .= \" order by c16_ano, c16_mes\";\n $rsSubsidio = db_query($sSqlSubsidio); \n $iTotalLinhas = pg_num_rows($rsSubsidio);\n for ($i = 0; $i < $iTotalLinhas; $i++) {\n \n $sDiaMesAno = \"{$iAno}-\".str_pad($iMes, 2, \"0\", STR_PAD_LEFT).\"-\".str_pad($iDia, 2, \"0\", STR_PAD_LEFT);\n $oSubSidio = db_utils::fieldsMemory($rsSubsidio, $i);\n \n $oRetorno = new stdClass();\n $oRetorno->subCodigoEntidade = str_pad($this->iCodigoTCE, 4, \"0\", STR_PAD_LEFT);\n $oRetorno->subMesAnoMovimento = $sDiaMesAno;\n $iUltimoDiaMes = cal_days_in_month(CAL_GREGORIAN, $oSubSidio->c16_mes, $oSubSidio->c16_ano); \n $oRetorno->subMesAnoReferencia = $oSubSidio->c16_ano.\"-\".str_pad($oSubSidio->c16_mes, 2, \"0\", STR_PAD_LEFT).\"-\".\n str_pad($iUltimoDiaMes, 2, \"0\", STR_PAD_LEFT);\n $oRetorno->subNomeVereador = substr($oSubSidio->z01_nome, 0, 80); \n $oRetorno->subCPF = str_pad($oSubSidio->z01_cgccpf, 11, \"0\", STR_PAD_LEFT); \n $oRetorno->subMensal = $this->corrigeValor($oSubSidio->c16_subsidiomensal, 13); \n $oRetorno->subExtraordinario = $this->corrigeValor($oSubSidio->c16_subsidioextraordinario, 13); \n $oRetorno->subTotal = $this->corrigeValor(($oSubSidio->c16_subsidioextraordinario+\n $oSubSidio->c16_subsidiomensal), 13);\n array_push($this->aDados, $oRetorno); \n }\n return true;\n }"
] |
[
"0.6218609",
"0.6208445",
"0.6095678",
"0.6094518",
"0.5962135",
"0.5949691",
"0.5892973",
"0.57914925",
"0.5784341",
"0.57812345",
"0.5774842",
"0.5759243",
"0.57568556",
"0.5753836",
"0.57492834",
"0.5733572",
"0.5729997",
"0.5728258",
"0.5708516",
"0.56892407",
"0.5678984",
"0.56695855",
"0.5658981",
"0.56578505",
"0.5653834",
"0.56395566",
"0.56395006",
"0.5638566",
"0.56355083",
"0.5633007"
] |
0.6639695
|
0
|
Funcion que busca las notas de un estudiante en un arreglo de notas general
|
function obtenerNotasEstudiante($codigo_estudiante){
$notas_estudiante=array();
if(count($this->notas>0)&&!empty($this->notas))
{
foreach ($this->notas as $key => $row) {
if($row['COD_ESTUDIANTE']==$codigo_estudiante){
$notas_estudiante[]=$row;
unset($this->notas[$key]);
}
}
}
return $notas_estudiante;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function selectNotasByAlu($id){\n\t\t$link = openDb();\n\t\t$sql = \"SELECT not_valor, not_trime, disc_nome FROM ((notas n INNER JOIN aluno a ON n.alu_id=a.alu_id) INNER JOIN disciplina ds ON ds.disc_id=n.disc_id AND a.alu_id = '$id')\";\n\t\t$query = $link->query($sql);\n\t\t\n\t\t$cont = 1;\n\t\t$x\t = 0;\n\t\t$y\t = 0;\n\t\t$retorno = array();\n\n\t\twhile ($result = mysqli_fetch_array($query)) {\n\t\t\tif ($cont==1) {\n\t\t\t\t$retorno[$x][$y]=$result['disc_nome']; //Nome da disciplina\n\t\t\t\t$y+=1;\n\t\t\t\t$retorno[$x][$y]=$result['not_valor']; //Nota do primeiro Trimestre\n\t\t\t\t$y+=1;\n\t\t\t}\n\t\t\tif ($cont==2) {\n\t\t\t\t$retorno[$x][$y]=$result['not_valor']; //Nota do segundo Trimestre\n\t\t\t\t$y+=1;\n\t\t\t}\n\t\t\tif ($cont==3) {\n\t\t\t\t$retorno[$x][$y]=$result['not_valor']; //Nota do terceiro Trimestre\n\t\t\t\t$y+=1;\n\t\t\t\t//if(!$retorno[$x][1] == NULL && !$retorno[$x][2] == NULL && !$retorno[$x][3] == NULL){\n\t\t\t\t\t$retorno[$x][$y] = arredonda(number_format(($retorno[$x][1]+$retorno[$x][2]+$retorno[$x][3])/3,1, '.', ' ')); //Média das notas\n\t\t\t\t\tif($retorno[$x][$y] == 0){ $retorno[$x][$y] = NULL; }\n\t\t\t\t/*}else{\n\t\t\t\t\t$retorno[$x][$y] = NULL;\n\t\t\t\t}*/\n\t\t\t\t$y=0;\n\t\t\t\t$x+=1;\n\t\t\t\t$cont=0;\n\t\t\t}\n\t\t\t$cont+=1; //Esquema criado para arrumar as tuplas, (Disciplinas e Notas relacionadas na mesma linha)\n\t\t}\n\t\treturn $retorno;\n\t}",
"function niveles($area){\n\t\tif ($area->cveentidad2=='0') return 1;\n\t\tif ($area->cveentidad3=='0') return 2;\n\t\tif ($area->cveentidad4=='0') return 3;\n\t\tif ($area->cveentidad5=='0') return 4;\n\t\tif ($area->cveentidad6=='0') return 5;\n\t\tif ($area->cveentidad7=='0') return 6;\n\t}",
"function buscarEstudiantesNivelados($estudiantes,$estudiantes_clasificados){\n \n $k=0;\n\tunset ($this->notas);\n $this->notas = $this->obtenerNotas();\n if(count($estudiantes)>0)\n {\n foreach ($estudiantes as $key => $estudiante) {\n //buscamos las notas\n $reprobados = 0;\n $notas_estudiante = array();\n $notas_estudiante = $this->obtenerNotasEstudiante($estudiante['COD_ESTUDIANTE']);\n $reprobados = $this->verificarReprobados($notas_estudiante);\n unset($notas_estudiante);\n if($reprobados==0){\n $resultado = array( 'COD_ESTUDIANTE'=>$estudiante['COD_ESTUDIANTE'],\n 'COD_PROYECTO'=>$estudiante['COD_PROYECTO'],\n 'CLASIFICACION'=>'1',\n 'TIPO'=>$estudiante['TIPO']\n );\n $estudiantes_clasificados[] = $resultado;\n unset($estudiantes[$key]);\n }\n }\n }\n $resultado = array( 'ESTUDIANTES'=>$estudiantes,\n 'CLASIFICADOS'=>$estudiantes_clasificados);\n return $resultado;\n }",
"function buscarEspaciosReprobados($notaAprobatoria) {\r\n \r\n $reprobados=isset($reprobados)?$reprobados:'';\r\n $espacios=isset($reprobados)?$reprobados:'';\r\n \r\n if (is_array($this->espaciosCursados)){\r\n foreach ($this->espaciosCursados as $value) {\r\n if (isset($value['NOTA'])&&($value['NOTA']<$notaAprobatoria||$value['CODIGO_OBSERVACION']==20||$value['CODIGO_OBSERVACION']==23||$value['CODIGO_OBSERVACION']==25)){\r\n if ($value['CODIGO_OBSERVACION']==19||$value['CODIGO_OBSERVACION']==22||$value['CODIGO_OBSERVACION']==24)\r\n {\r\n }else\r\n {\r\n $espacios[]=$value['CODIGO'];\r\n }\r\n }\r\n }\r\n if(is_array($espacios)){\r\n \r\n $espacios= array_unique($espacios);\r\n if($this->datosEstudiante['IND_CRED']=='S'){\r\n \r\n foreach ($espacios as $key => $espacio) {\r\n foreach ($this->espaciosCursados as $cursado) {\r\n if($espacio==$cursado['CODIGO']){\r\n $reprobados[$key]['CODIGO']=$cursado['CODIGO'];\r\n $reprobados[$key]['CREDITOS']=(isset($cursado['CREDITOS'])?$cursado['CREDITOS']:0);\r\n }\r\n }\r\n\r\n }\r\n }else{\r\n $reprobados=$espacios;\r\n }\r\n return $reprobados; \r\n \r\n }else{\r\n return 0; \r\n }\r\n \r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n }",
"public function TipoNotaEnNotas($tipoNId){\n $origen=TipoNota::with(['notas',\n 'indicadores.materias_has_periodos.materias_has_niveles.niveles_has_anios.alumnos'])\n ->find($tipoNId);\n $alumnos=$origen->indicadores->materias_has_periodos->materias_has_niveles->niveles_has_anios->alumnos;\n $comparado=$origen->notas;\n $res='Se han rellenado Notas con: ';\n foreach ($alumnos as $val) {\n $encontrado=false;\n foreach ($origen->notas as $nota) {\n if ($nota->alumnos_id == $val->id) {\n $encontrado=true;\n }\n }\n if (!$encontrado) {\n $obj=new Notas;\n $obj->alumnos_id=$val->id;\n $obj->tipo_nota_id=$tipoNId;\n $obj->calificacion=0;\n $obj->save();\n $res.='; Notas ID: '.$obj->id.', Alumnos ID: '.$val->id.', TipoNota ID: '.$tipoNId.', Cal: 0';\n // Actualiza el promedio si hay modificaciones\n $alumind=new AlumInd;\n $alumind->addActProm($obj->alumnos_id,$origen->indicadores->id,'NUEVO');\n }\n }\n return $res;\n }",
"function verificarReprobados($notas_estudiante){\n $reprobados = 0;\n if(count($notas_estudiante)>0){\n foreach ($notas_estudiante as $key => $estudiantes) {\n if ((isset($estudiantes['NOTA'])?$estudiantes['NOTA']:0)<30 || $estudiantes['OBSERVACION']==20 || $estudiantes['OBSERVACION']==23 || $estudiantes['OBSERVACION']==25){\n $reprobados=1;\n break;\n }\n }\n }\n return $reprobados;\n }",
"function buscarEspaciosAprobados($notaAprobatoria){\r\n $aprobados=array();\r\n if(is_array($this->espaciosCursados))\r\n {\r\n foreach ($this->espaciosCursados as $value1)\r\n {\r\n if ((isset($value1['NOTA'])&&$value1['NOTA']>=$notaAprobatoria)||(isset($value1['CODIGO_OBSERVACION'])?$value1['CODIGO_OBSERVACION']:'')==19||(isset($value1['CODIGO_OBSERVACION'])?$value1['CODIGO_OBSERVACION']:'')==22||(isset($value1['CODIGO_OBSERVACION'])?$value1['CODIGO_OBSERVACION']:'')==24)\r\n {\r\n $aprobados[]=array('CODIGO'=>$value1['CODIGO'],'NIVEL'=>(isset($value1['NIVEL'])?$value1['NIVEL']:''),'CREDITOS'=>(isset($value1['CREDITOS'])?$value1['CREDITOS']:''));\r\n }\r\n }\r\n\r\n }else\r\n {\r\n $aprobados='';\r\n }\r\n return $aprobados;\r\n }",
"public function calculaMovimientos($insumos){\n\n\t\t$movimientos = [];\n\t\t$groups = [];\n\n\t\t//Calcula los lotes de los insumos a realizar movimientos utilizando el metodo fefo,\n\t\t//Si este posee lotes en los registros y su lote no ha sido especificado.\n\t\tforeach ($insumos as $insumo) {\n\n\t\t\tif( array_search($insumo['id'], array_column($movimientos, 'id')) !== false )\n\t\t\t\tcontinue;\n\n\t\t\tif( $this->hasLote($insumo) ){\n\n\t\t\t\t$insumoMovimientos = array_filter($insumos, function($element) use ($insumo){\n\t\t\t\t\treturn $element['id'] == $insumo['id'];\n\t\t\t\t});\n\n\t\t\t\tif( !empty($this->filterInsumosLote($insumoMovimientos, false)) ){\n\t\t\t\t\t$insumoMovimientos = $this->fefo($insumo['id'], $insumoMovimientos);\n\t\t\t\t}\n\n\t\t\t\t$movimientos = array_merge($movimientos, $insumoMovimientos);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tarray_push($movimientos, $insumo);\n\t\t\t}\n\t\t}\n\n\t\t//Agrupa los lotes de los movimientos de insumos.\n\t\tforeach ($movimientos as $movimiento){\n\n\t\t\tif(isset($movimiento['lote']) && !empty($movimiento['lote'])){\n\n\t\t\t\t$calculado = array_filter($groups, function($element) use ($movimiento){\n\t \t\t\t\treturn $element['id'] == $movimiento['id'] && $element['lote'] == $movimiento['lote'];\n\t\t\t\t});\n\n\t\t\t\tif( !empty($calculado) )\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$lotes = array_filter($movimientos, function($element) use ($movimiento){\n\t \t\t\t\treturn $element['id'] == $movimiento['id'] && $element['lote'] == $movimiento['lote'];\n\t\t\t\t});\n\n\t\t\t\t$despachado = 0;\n\t\t\t\t$solicitado = 0;\n\n\t\t\t\tforeach ($lotes as $lote) {\n\t\t\t\t\t$despachado += $lote['despachado'];\n\t\t\t\t\t$solicitado += $lote['solicitado'];\n\t\t\t\t}\n\n\t\t\t\t$movimiento['despachado'] = $despachado;\n\t\t\t\t$movimiento['solicitado'] = $solicitado;\n\t\t\t}\n\n\t\t\tarray_push($groups, $movimiento);\n\t\t}\n\n\t\t//Devuelve un arreglo con todos los movimientos de insumos a realizar\n\t\t//con lotes espeficicados y cantidades. Nota: Si no pose lote un movimiento de insumo en el arreglo\n\t\t//sera debido a que no posee lotes en los registros de lotes.\n\t\treturn $groups;\n\t}",
"function consultarNotas(){ \n $cadena_sql=$this->cadena_sql(\"notas\",$this->codProyecto);\n $estudiantes=$this->funcionGeneral->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql,\"busqueda\" );\n return $estudiantes;\n }",
"function obter_todas_noticias_ativas() {\n $this->db->where(array(\"status_noticia\"=>1));\n $this->db->order_by(\"data_noticia\", \"desc\");\n return $this->db->get('noticia');\n }",
"public function contAlumNormal($anio)\n { \n //$gradosMatTercerCiclo=[];$gradosVespertino=[];$gradosCompleto=[];\n //para contar alumnas en periodo normal\n //hay q filtrar por turnos Matutino,Vespertino y Completo\n $match=['anios_id'=>$anio,'turnos_id'=>1];\n $gradosMatutino=grado::where($match)->select('categoria','grado','seccion','capacidad','turnos_id','id')->orderBy('grado')->orderBy('seccion')->get()->toArray();\n //$countMat=count($gradosMatutino);\n $arreglo_grados_inscritos_matutino=[];\n for($i=0;$i<count($gradosMatutino);$i++){\n $gradoId=$gradosMatutino[$i]['id'];\n $busqueda=matricula::where('grados_id',$gradoId)->get();\n $cont=$busqueda->count();\n $gradoSeccion=$gradosMatutino[$i]['grado'].$gradosMatutino[$i]['seccion'];\n $aux=[\"gradoSeccion\"=>$gradoSeccion,\n \"cantidad\"=>$cont,\n \"categoria\"=>$gradosMatutino[$i]['categoria'],\n \"capacidad\"=>$gradosMatutino[$i]['capacidad'],\n \"turno\"=>\"matutino\",\n ];\n array_push($arreglo_grados_inscritos_matutino,$aux);\n }\n\n \n $match=['anios_id'=>$anio,'turnos_id'=>2];\n $gradosVespertino=grado::where($match)->select('categoria','grado','seccion','capacidad','turnos_id','id')->orderBy('grado')->orderBy('seccion')->get()->toArray();\n $arreglo_grados_inscritos_vespertino=[];\n for($i=0;$i<count($gradosVespertino);$i++){\n $gradoId=$gradosVespertino[$i]['id'];\n $busqueda=matricula::where('grados_id',$gradoId)->get();\n $cont=$busqueda->count();\n $gradoSeccion=$gradosVespertino[$i]['grado'].$gradosVespertino[$i]['seccion'];\n $aux=[\"gradoSeccion\"=>$gradoSeccion,\n \"cantidad\"=>$cont,\n \"categoria\"=>$gradosVespertino[$i]['categoria'],\n \"capacidad\"=>$gradosVespertino[$i]['capacidad'],\n \"turno\"=>\"Vespertino\", \n ];\n array_push($arreglo_grados_inscritos_vespertino,$aux);\n }\n\n //$countVesp=count($gradosVespertino);\n $match=['anios_id'=>$anio,'turnos_id'=>3];\n $gradosCompleto=grado::where($match)->select('categoria','grado','seccion','capacidad','turnos_id','id')->orderBy('grado')->orderBy('seccion')->get()->toArray();\n\n $arreglo_grados_inscritos_completo=[];\n for($i=0;$i<count($gradosCompleto);$i++){\n $gradoId=$gradosCompleto[$i]['id'];\n $busqueda=matricula::where('grados_id',$gradoId)->get();\n $cont=$busqueda->count();\n $gradoSeccion=$gradosCompleto[$i]['grado'].$gradosCompleto[$i]['seccion'];\n $aux=[\"gradoSeccion\"=>$gradoSeccion,\n \"cantidad\"=>$cont,\n \"categoria\"=>$gradosCompleto[$i]['categoria'],\n \"capacidad\"=>$gradosCompleto[$i]['capacidad'],\n \"turno\"=>\"completo\",\n ];\n array_push($arreglo_grados_inscritos_completo,$aux);\n }\n\n //$countComp=count($gradosCompleto);\n //dd($gradosCompleto);\n $arreglo_de_grados=[\"gradosMatutino\"=>$arreglo_grados_inscritos_matutino,\n \"gradosVespertino\"=>$arreglo_grados_inscritos_vespertino,\n \"gradosCompleto\"=>$arreglo_grados_inscritos_completo,\n \n ];\n //dd($arreglo_de_grados);\n //dd($arreglo_grados_inscritos_matutino);\n return $arreglo_de_grados;\n //$match=[''=>];\n //$nomMat=matricula::\n\n }",
"public function getNotasPorTutor($tutorId,$cedulaPasante='',$start='*',$limit='*',$tipoTutor='*',$carrera='*') {\r\n\t\t$aux = array();\r\n\t\t$i=0;\r\n\t\t$sqlTutor =\"\";\r\n\t\t$sqlNotas =\"\";\r\n\t\t$pasantia = new Pasantia();\r\n\t\t$total=0;\r\n\t\t$evaluacion = new Evaluacion();\r\n\r\n\t\t$datos=$evaluacion->getDetalleEvaluacion();\r\n\t\t$factores= array();\r\n\t\tfor ($j = 1; $j <= count($datos); $j++) {\r\n\t\t\t$factores[$j]=(float)(($datos[$j]['porcentaje'])/($datos[$j]['nroItems']*NOTA_INDIVIDUAL_MAXIMA));\r\n\t\t}\r\n\r\n\t\tswitch ($tipoTutor) {\r\n\t\t\tcase 'A':\r\n\t\t\t\t$total= $pasantia->contarPasantiasActivasTutor($tutorId, $tipoTutor);\r\n\t\t\t\t$sqlTutor = \" AND pa.tutorAcademico_id='$tutorId' \";\r\n\t\t\t\t$sqlNotas = \", SUM(IF(e.id=1,pe.nota,0))*$factores[1] AS notaInforme, SUM(IF(e.id=2,pe.nota,0))*$factores[2] AS notaEmpresaTA \";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'E':\r\n\t\t\t\t$total=$pasantia->contarPasantiasActivasTutor($tutorId, $tipoTutor);\r\n\t\t\t\t$sqlTutor = \" AND pa.tutorEmpresarial_id='$tutorId' \";\r\n\t\t\t\t$sqlNotas = \", SUM(IF(e.id=3,pe.nota,0))*$factores[3] AS notaEmpresaTE \";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\t$total= $pasantia->contarPasantiasActivas();\r\n\t\t\t\t$sqlNotas = \", SUM(IF(e.id=1,pe.nota,0))*$factores[1] AS notaInforme, SUM(IF(e.id=2,pe.nota,0))*$factores[2] AS notaEmpresaTA \";\r\n\t\t\t\t$sqlNotas .=\", SUM(IF(e.id=3,pe.nota,0))*$factores[3] AS notaEmpresaTE \";\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t$sql = \" SELECT p.id AS pasanteId, cedula, nombre, apellido, razonSocial \";\r\n\t\t$sql .= $sqlNotas;\r\n\t\t$sql .= \" FROM empresa em, pasantia pa, pasante p \";\r\n\t\t$sql .= \" LEFT JOIN pasanteevaluacion pe ON ( p.id =pe.pasante_id) \";\r\n\t\t$sql .= \" LEFT JOIN aspectoevaluacion ap ON (ap.id=pe.aspectoEvaluacion_id ) \";\r\n\t\t$sql .= \" LEFT JOIN evaluacion e ON (e.id=ap.evaluacion_id) \";\r\n\t\t$sql .= \" WHERE pa.empresa_id= em.id \";\r\n\t\t$sql .= \" AND p.id=pa.pasante_id \";\r\n\t\t$sql .= \" AND NOT (pa.estatus='F' AND pa.estatus='S') \";\r\n\t\tif ($carrera!='*'){\r\n\t\t\t$sql .= \" AND p.carrera_id='\".$carrera.\"' \";\r\n\t\t}\r\n\t\t$sql .= $sqlTutor;\r\n\t\tif ($cedulaPasante!=''){\r\n\t\t\t$sql .= \" AND p.cedula LIKE '$cedulaPasante%'\";\r\n\t\t}\r\n\t\t$sql .= \" GROUP BY p.id, cedula \";\r\n\t\t$sql .= \" ORDER BY cedula \";\r\n\t\tif ($start!='*' && $limit!='*'){\r\n\t\t\t$sql .= \" LIMIT \".$start.\",\".$limit.\" \";\r\n\t\t}\r\n\r\n\t\t$db = Db::rawConnect();\r\n\t\t$result = $db->query($sql);\r\n\t\twhile($row = $db->fetchArray($result)){\r\n\t\t\t$aux[$i]['id'] = $row['pasanteId'];\r\n\t\t\t$aux[$i]['cedula'] = $row['cedula'];\r\n\t\t\t$aux[$i]['nombre'] = utf8_encode($row['nombre']);\r\n\t\t\t$aux[$i]['apellido'] = utf8_encode($row['apellido']);\r\n\t\t\t$aux[$i]['razonSocial'] = utf8_encode($row['razonSocial']);\r\n\t\t\tswitch ($tipoTutor) {\r\n\t\t\t\tcase 'A':\r\n\t\t\t\t\t$aux[$i]['notaInforme'] = $row['notaInforme'];\r\n\t\t\t\t\t$aux[$i]['notaEmpresaTA'] = $row['notaEmpresaTA'];\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'E':\r\n\t\t\t\t\t$aux[$i]['notaEmpresaTE'] = $row['notaEmpresaTE'];\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\t$aux[$i]['notaInforme'] = $row['notaInforme'];\r\n\t\t\t\t\t$aux[$i]['notaEmpresaTA'] = $row['notaEmpresaTA'];\r\n\t\t\t\t\t$aux[$i]['notaEmpresaTE'] = $row['notaEmpresaTE'];\r\n\t\t\t\t\t$aux[$i]['acumulado'] =$row['notaInforme']+ $row['notaEmpresaTA']+ $row['notaEmpresaTE'];\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t$i++;\r\n\t\t}\r\n\r\n\t\treturn array('total'=>$total,\r\n\t\t\t\t\t'resultado' => $aux);\r\n\r\n\t}",
"public function ingresosGrifoNetoAnual($year){\n\n \t$egresos = Egreso::join('grifos','grifos.id','=','egresos.grifo_id')\n ->whereYear('fecha_egreso',$year)\n ->select( \n DB::raw('YEAR(fecha_egreso) as year'),\n DB::raw('-1*(sum(monto_egreso)) as monto'),\n 'grifos.razon_social as grifo'\n )\n ->groupBy('grifo')\n ->get();\n\n $ingresos = IngresoGrifo::join('grifos','grifos.id','=','ingreso_grifos.grifo_id')\n ->whereYear('ingreso_grifos.fecha_ingreso',$year) \n ->select( \n DB::raw('YEAR(fecha_ingreso) as year'),\n DB::raw('sum(monto_ingreso) as monto'),\n 'grifos.razon_social as grifo'\n )\n ->groupBy('grifo')\n ->get();\n \n $netos = collect([]); \n foreach ($ingresos as $ingreso) {\n foreach ($egresos as $egreso ) {\n if($ingreso->grifo==$egreso->grifo){\n $consolidado = $egreso->monto + $ingreso->monto;\n $consolidado = round( $consolidado, 2 );\n $neto =[ \n 'grifo' => $egreso->grifo,\n 'monto_neto' => $consolidado \n ]; \n $neto = (object)$neto; \n $netos->push($neto);\n }\n \n }\n \n }\n return $netos;\n }",
"public function TraeCalificacion($p)\n {\n $Notas = [];\n if(($this->ExisteCalificacion('M', 1, $p) && $this->ExisteCalificacion('M', 2, $p)))\n {\n $Notas = $this->TraeNotasPracticante($p);\n }\n else if($this->ExisteCalificacion('A', 1, $p) && $this->ExisteCalificacion('C', 1, $p) && $this->ExisteCalificacion('M', 2, $p))\n {\n $Notas = $this->TraeNotasPracticante($p);\n }\n else if($this->ExisteCalificacion('A', 2, $p) && $this->ExisteCalificacion('C', 2, $p) && $this->ExisteCalificacion('M', 1, $p))\n {\n $Notas = $this->TraeNotasPracticante($p);\n }\n else if($this->ExisteCalificacion('A', 1, $p) && $this->ExisteCalificacion('C', 1, $p) && $this->ExisteCalificacion('A', 2, $p) && $this->ExisteCalificacion('C', 2, $p))\n {\n $Notas = $this->TraeNotasPracticante($p);\n }\n return $Notas;\n }",
"function buscarEstudiantesConEspaciosReprobados($estudiantes,$estudiantes_clasificados){\n if(count($estudiantes)>0){\n foreach ($estudiantes as $key => $arreglo_estudiante) {\n $cantidad_reprobados = 0;\n \n\n $espacios_por_cursar = json_decode($arreglo_estudiante['ESPACIOS_POR_CURSAR'],true);\n $cantidad_reprobados = $this->contarReprobados($espacios_por_cursar);\n switch($cantidad_reprobados){\n case 1:\n $resultado = array( 'COD_ESTUDIANTE'=>$arreglo_estudiante['COD_ESTUDIANTE'],\n 'COD_PROYECTO'=>$arreglo_estudiante['COD_PROYECTO'],\n 'CLASIFICACION'=>'4',\n 'TIPO'=>$arreglo_estudiante['TIPO']\n );\n $estudiantes_clasificados[] = $resultado;\n unset($estudiantes[$key]);\n break;\n case 2:\n $resultado = array( 'COD_ESTUDIANTE'=>$arreglo_estudiante['COD_ESTUDIANTE'],\n 'COD_PROYECTO'=>$arreglo_estudiante['COD_PROYECTO'],\n 'CLASIFICACION'=>'5',\n 'TIPO'=>$arreglo_estudiante['TIPO']\n );\n $estudiantes_clasificados[] = $resultado;\n unset($estudiantes[$key]);\n break;\n case 3:\n $resultado = array( 'COD_ESTUDIANTE'=>$arreglo_estudiante['COD_ESTUDIANTE'],\n 'COD_PROYECTO'=>$arreglo_estudiante['COD_PROYECTO'],\n 'CLASIFICACION'=>'6',\n 'TIPO'=>$arreglo_estudiante['TIPO']\n );\n $estudiantes_clasificados[] = $resultado;\n unset($estudiantes[$key]);\n break;\n default:\n if($cantidad_reprobados>3){\n $resultado = array( 'COD_ESTUDIANTE'=>$arreglo_estudiante['COD_ESTUDIANTE'],\n 'COD_PROYECTO'=>$arreglo_estudiante['COD_PROYECTO'],\n 'CLASIFICACION'=>'7',\n 'TIPO'=>$arreglo_estudiante['TIPO']\n );\n $estudiantes_clasificados[] = $resultado;\n unset($estudiantes[$key]);\n }\n break;\n\n }\n }\n }\n $resultado = array( 'ESTUDIANTES'=>$estudiantes,\n 'CLASIFICADOS'=>$estudiantes_clasificados);\n return $resultado;\n }",
"public function categoriaInactivos(){\n if($this->nolaboral->V21_M >= 1)\n {\n return 1;\n }\n if($this->nolaboral->V8_M == 1 && $this->nolaboral->V9_M == 1 && $this->nolaboral->V10_M == 1)\n {\n return 2;\n }\n if($this->caracteristicas->CH10 == 1 && $this->PP01E == 2)\n {\n return 3;\n }\n if($this->PP01E == 2)\n {\n return 4;\n }\n if($this->caracteristicas->CH06 < 6)\n {\n return 5;\n }\n if($this->discapacidad())\n {\n return 6;\n }\n\n}",
"public function getNotciaSearch($paraula){\n $NoticiaTaula = new NoticiaTaula();\n $UsuariOk = array();\n $select = $this->select();\n $select->where('MATCH(username,Localidad,Tuvida,Aficiones) AGAINST(?)',$paraula);\n $users = $this->fetchAll($select);\n $count=0;\n foreach($users as $user){\n\n $UsuariOk[$count] = new Usuari($user->id_user, $user->nombre, $user->email, $user->username,$user->foto, $user->Localidad, $user->Tuvida,$user->Aficiones, $user->Data_neixament);\n $cantitat = $NoticiaTaula->cantitatUserFora($user->id_user);\n $UsuariOk[$count]->addNoticies($cantitat);\n $count++;\n }\n return $UsuariOk;\n }",
"function adivinarSexo($array_A){\n $datos=new ManejoDatos();\n $arrayBD =$datos->getEstiloSexoPromedioRecinto();\n if($array_A[0]=='DIVERGENTE'){\n $estilo=4;\n }\n if($array_A[0]=='CONVERGENTE'){\n $estilo=3;\n }\n if($array_A[0]=='ACOMODADOR'){\n $estilo=2;\n }\n if($array_A[0]=='ASIMILADOR'){\n $estilo=1;\n }\n $arrayA = array( $estilo, $array_A[1],($array_A[2] == \"Paraiso\" ? 1 : 2));\n foreach ($arrayBD as $elemento) {\n if($elemento['Estilo']=='DIVERGENTE'){\n $estiloBD=4;\n }\n if($elemento['Estilo']=='CONVERGENTE'){\n $estiloBD=3;\n }\n if($elemento['Estilo']=='ACOMODADOR'){\n $estiloBD=2;\n }\n if($elemento['Estilo']=='ASIMILADOR'){\n $estiloBD=1;\n }\n $arrayB = array($estiloBD, $elemento['Promedio'], $elemento['Recinto'] == \"Paraiso\" ? 1 : 2);\n $temporal = $this->distanciaEuclidiana($arrayA, $arrayB);\n if ($temporal < $this->distancia) {\n $this->distancia = $temporal;\n $this->temporal = $elemento['Sexo'];\n }\n }\n if($this->temporal=='M'){\n $this->temporal=\"Masculino\";\n return $this->temporal;\n }\n if($this->temporal=='F'){\n $this->temporal=\"Femenino\";\n return $this->temporal;\n }\n }",
"public function nequal_vencimiento($insumos){\n\n\t\t$errores = [];\n\n\t\tforeach($insumos as $insumo){\n\n\t\t\tif(!isset($insumo['lote']) || empty($insumo['lote']))\n\t\t\t\tcontinue;\n\n if(isset($insumo['fecha']) && !empty($insumo['fecha'])){\n\n $vencimiento = Lote::where('insumo', $insumo['id'])\n ->where('codigo', $insumo['lote'])\n ->where('deposito', Auth::user()->deposito)\n ->orderBy('id', 'desc')\n ->value('vencimiento');\n\n if($vencimiento and $vencimiento->ne(new Carbon($insumo['fecha']))){\n \tarray_push($errores, $insumo['id']);\n }\n }\n\t }\n\n\t return $errores;\n\t}",
"public function obtener_impuestos_validos($id, $tipo, $almacen = 0)\n {\n $sql = \"SELECT DISTINCT id_mov_tip FROM movimientos_cierre_caja where Id_cierre = '$id' and numero <> '' and tabla_mov = 'venta' \";\n\n $data = array();\n $detalleventaid = \"\";\n\n foreach ($this->connection->query($sql)->result() as $value1) {\n $detalleventaid = $detalleventaid . \",'\" . $value1->id_mov_tip . \"'\";\n }\n\n $detalleventaid = trim($detalleventaid, ',');\n $ventascierre = \"\";\n if (!empty($detalleventaid)) {\n $ventascierre = \" AND venta.id IN($detalleventaid) \";\n }\n\n $total_ventas = '';\n $total_ventas_sin_impuesto = '';\n //$condition = \" and almacen_id = '$almacen' \";\n $ventas = array();\n if (!empty($ventascierre)) {\n // busco impuestos de las facturas del cierre\n /* $total_ventas = \"SELECT DATE(venta.fecha) AS fecha_dia, venta.id,\n SUM((((detalle_venta.precio_venta - detalle_venta.descuento) * detalle_venta.impuesto ) / 100 ) * detalle_venta.unidades) AS impuesto, porciento, nombre_impuesto,\n SUM((((detalle_venta.precio_venta - detalle_venta.descuento) ) ) * detalle_venta.unidades) AS subtotal,\n (SUM((((detalle_venta.precio_venta - detalle_venta.descuento) ) ) * detalle_venta.unidades) + SUM((((detalle_venta.precio_venta - detalle_venta.descuento) * detalle_venta.impuesto ) / 100 ) * detalle_venta.unidades)) AS total\n FROM venta\n inner join detalle_venta on venta.id = detalle_venta.venta_id\n inner join impuesto on detalle_venta.impuesto = impuesto.porciento\n WHERE estado='0' and impuesto > 0 and almacen_id = '$almacen' $ventascierre group by nombre_impuesto \";\n echo \"<br>\".$total_ventas; die();*/\n //DETALLADO\n $total_ventas_impuestos = \"SELECT DATE(venta.fecha) AS fecha_dia, venta.id, detalle_venta.precio_venta, detalle_venta.descuento, detalle_venta.impuesto, detalle_venta.unidades, porciento, nombre_impuesto,\n (IF((detalle_venta.descripcion_producto = '0' OR detalle_venta.descripcion_producto = ''),0,IF((SUBSTRING_INDEX(SUBSTRING_INDEX(detalle_venta.descripcion_producto,'\\\"cantidadSindevolver\\\":',-1),',',1))=0,detalle_venta.unidades,(SELECT detalle_venta.unidades - (SUBSTRING_INDEX(SUBSTRING_INDEX(detalle_venta.descripcion_producto,'\\\"cantidadSindevolver\\\":',-1),',',1)))))) AS cantidades_devueltas\n FROM venta\n INNER JOIN detalle_venta ON venta.id = detalle_venta.venta_id\n INNER JOIN impuesto ON detalle_venta.impuesto = impuesto.porciento\n WHERE estado='0'\n AND impuesto > 0\n AND almacen_id = $almacen\n $ventascierre ORDER BY impuesto\";\n\n //echo $total_ventas_impuestos;\n\n $subtotal = 0;\n $total = 0;\n $impuesto = 0;\n $i = 0;\n $aux = 0;\n foreach ($this->connection->query($total_ventas_impuestos)->result() as $value) {\n if ($i == 0) {\n $aux = $value->porciento;\n $i = 1;\n }\n\n if ($aux != $value->porciento) {\n $aux = $value->porciento;\n $subtotal = 0;\n $total = 0;\n $impuesto = 0;\n }\n\n if ($aux == $value->porciento) {\n\n $impuesto += $this->opciones->redondear(((($value->precio_venta - $value->descuento) * $value->impuesto) / 100) * ($value->unidades - $value->cantidades_devueltas));\n $subtotal += $this->opciones->redondear(((($value->precio_venta - $value->descuento))) * ($value->unidades - $value->cantidades_devueltas));\n $total += $this->opciones->redondear((((($value->precio_venta - $value->descuento))) * ($value->unidades - $value->cantidades_devueltas)) + (((($value->precio_venta - $value->descuento) * $value->impuesto) / 100) * ($value->unidades - $value->cantidades_devueltas)));\n\n $ventas[$value->porciento] = array(\n 'porciento' => $value->porciento,\n 'nombre_impuesto' => $value->nombre_impuesto,\n 'impuesto' => $impuesto,\n 'subtotal' => $subtotal,\n 'total' => $total,\n );\n }\n }\n /* echo \"<br>impuesto=\".$impuesto;\n echo \"<br>subtotal=\".$subtotal;\n echo \"<br>total=\".$total;\n print_r($ventas);\n die(\"<br>sali\");*/\n }\n /*print_r($ventas);\n die();*/\n return $ventas;\n }",
"function listaAprovados($nota){\n return $aprovados = array_filter($nota, validaMedia);\n}",
"function voti_negativi() {\r\n $query = \"SELECT s.NomeStudente AS nome, s.CognomeStudente AS cognome FROM Sudente s INNER JOIN Voto v ON s.id_studente = v.id_studente WHERE v.Voto < 6 GROUP BY NomeStudente, CognomeStudente\";\r\n $risultato = $conn -> query($query);\r\n\r\n return $risultato;\r\n }",
"function buscarEstudiantesSinEspaciosReprobadosSemAnterior($estudiantes,$estudiantes_clasificados){\n if(!is_array($estudiantes_clasificados)){\n $estudiantes_clasificados= array();\n }\n if(count($estudiantes)>0)\n {\n foreach ($estudiantes as $key => $arreglo_estudiante)\n {\n $cantidad_reprobados = 0;\n $espacios_por_cursar = json_decode($arreglo_estudiante['ESPACIOS_POR_CURSAR'],true);\n $cantidad_reprobados = $this->contarReprobados($espacios_por_cursar);\n if($cantidad_reprobados==0)\n {\n $resultado = array( 'COD_ESTUDIANTE'=>$arreglo_estudiante['COD_ESTUDIANTE'],\n 'COD_PROYECTO'=>$arreglo_estudiante['COD_PROYECTO'],\n 'CLASIFICACION'=>'2',\n 'TIPO'=>$arreglo_estudiante['TIPO']\n );\n $estudiantes_clasificados[] = $resultado; \n unset($estudiantes[$key]);\n }\n }\n }\n $resultado = array( 'ESTUDIANTES'=>$estudiantes,\n 'CLASIFICADOS'=>$estudiantes_clasificados);\n return $resultado;\n }",
"public function getGiorniNonLavorativi() {\r\n $giorniNonLavorativi = Array();\r\n foreach ($this->getArrayWorkingPlanClinica()as $key => $value) {\r\n if ($value === NULL) {\r\n $giorniNonLavorativi[] = $key;\r\n }\r\n }\r\n return $giorniNonLavorativi;\r\n }",
"function get_listado_estactual($filtro=array())\n\t{ \n $concat='';\n if (isset($filtro['anio']['valor'])) {\n \t$udia=dt_mocovi_periodo_presupuestario::ultimo_dia_periodo_anio($filtro['anio']['valor']);\n $pdia=dt_mocovi_periodo_presupuestario::primer_dia_periodo_anio($filtro['anio']['valor']);\n\t\t} \n //que sea una designacion correspondiente al periodo seleccionado o anulada dentro del periodo \n $where=\" WHERE ((a.desde <= '\".$udia.\"' and (a.hasta >= '\".$pdia.\"' or a.hasta is null)) or (a.desde='\".$pdia.\"' and a.hasta is not null and a.hasta<a.desde))\";\n $where2=\" WHERE 1=1 \";//es para filtrar por estado. Lo hago al final de todo\n if (isset($filtro['uni_acad'])) {\n $concat=quote($filtro['uni_acad']['valor']);\n switch ($filtro['uni_acad']['condicion']) {\n case 'es_igual_a': $where.= \" AND a.uni_acad = \".quote($filtro['uni_acad']['valor']);break;\n case 'es_distinto_de': $where.= \" AND a.uni_acad <> \".quote($filtro['uni_acad']['valor']);break;\n }\n }\n //si el usuario esta asociado a un perfil de datos le aplica igual a su UA\n $con=\"select sigla from unidad_acad \";\n $con = toba::perfil_de_datos()->filtrar($con);\n $resul=toba::db('designa')->consultar($con);\n if(count($resul)<=1){//es usuario de una unidad academica\n $where.=\" and a.uni_acad = \".quote($resul[0]['sigla']);\n $concat=quote($resul[0]['sigla']);//para hacer el update de baja\n }\n if (isset($filtro['iddepto'])) {\n switch ($filtro['iddepto']['condicion']) {\n case 'es_igual_a': $where.= \" AND iddepto =\" .$filtro['iddepto']['valor'];break;\n case 'es_distinto_de': $where.= \" AND iddepto <>\" .$filtro['iddepto']['valor'];break;\n }\n }\n if (isset($filtro['por_permuta'])) {\n switch ($filtro['por_permuta']['condicion']) {\n case 'es_igual_a': $where.= \" AND a.por_permuta =\" .$filtro['por_permuta']['valor'];break;\n case 'es_distinto_de': $where.= \" AND a.por_permuta <>\" .$filtro['por_permuta']['valor'];break;\n }\n }\n if (isset($filtro['carac']['valor'])) {\n switch ($filtro['carac']['valor']) {\n case 'R':$c=\"'Regular'\";break;\n case 'O':$c=\"'Otro'\";break;\n case 'I':$c=\"'Interino'\";break;\n case 'S':$c=\"'Suplente'\";break;\n default:\n break;\n }\n switch ($filtro['carac']['condicion']) {\n case 'es_igual_a': $where.= \" AND a.carac=\".$c;break;\n case 'es_distinto_de': $where.= \" AND a.carac<>\".$c;break;\n }\t\n }\n if (isset($filtro['estado'])) {\n switch ($filtro['estado']['condicion']) {\n case 'es_igual_a': $where2.= \" and est like '\".$filtro['estado']['valor'].\"%'\";break;\n case 'es_distinto_de': $where2.= \" and est not like '\".$filtro['estado']['valor'].\"%'\";break;\n }\n }\n if (isset($filtro['legajo'])) {\n switch ($filtro['legajo']['condicion']) {\n case 'es_igual_a': $where.= \" and legajo = \".$filtro['legajo']['valor'];break;\n case 'es_mayor_que': $where.= \" and legajo > \".$filtro['legajo']['valor'];break;\n case 'es_mayor_igual_que': $where.= \" and legajo >= \".$filtro['legajo']['valor'];break;\n case 'es_menor_que': $where.= \" and legajo < \".$filtro['legajo']['valor'];break;\n case 'es_menor_igual_que': $where.= \" and legajo <= \".$filtro['legajo']['valor'];break;\n case 'es_distinto_de': $where.= \" and legajo <> \".$filtro['legajo']['valor'];break;\n case 'entre': $where.= \" and legajo >= \".$filtro['legajo']['valor']['desde'].\" and legajo <=\".$filtro['legajo']['valor']['hasta'];break;\n }\n } \n if (isset($filtro['docente_nombre'])) {\n switch ($filtro['docente_nombre']['condicion']) {\n case 'contiene': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) like LOWER('%\".$filtro['docente_nombre']['valor'].\"%')\";break;\n case 'no_contiene': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) not like LOWER('\".$filtro['docente_nombre']['valor'].\"')\";break;\n case 'comienza_con': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) like LOWER('\".$filtro['docente_nombre']['valor'].\"%')\";break;\n case 'termina_con': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) like LOWER('%\".$filtro['docente_nombre']['valor'].\"')\";break;\n case 'es_igual': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) == LOWER('\".$filtro['docente_nombre']['valor'].\"')\";break;\n case 'es_distinto': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) <> LOWER('\".$filtro['docente_nombre']['valor'].\"')\";break;\n }\n } \n if (isset($filtro['programa'])) {\n $sql=\"select * from mocovi_programa where id_programa=\".$filtro['programa']['valor'];\n $resul=toba::db('designa')->consultar($sql);\n switch ($filtro['programa']['condicion']) {\n case 'es_igual_a': $where.= \" AND programa =\".quote($resul[0]['nombre']);break;\n case 'es_distinto_de': $where.= \" AND programa <>\".quote($resul[0]['nombre']);break;\n }\n } \n if (isset($filtro['tipo_desig'])) {\n switch ($filtro['tipo_desig']['condicion']) {\n case 'es_igual_a': $where.=\" AND a.tipo_desig=\".$filtro['tipo_desig']['valor'];break;\n case 'es_distinto_de': $where.=\" AND a.tipo_desig <>\".$filtro['tipo_desig']['valor'];break;\n }\n }\n if (isset($filtro['anulada'])) {\n switch ($filtro['anulada']['valor']) {\n case '0': $where.=\" AND not (a.hasta is not null and a.hasta<a.desde)\";break;\n case '1': $where.=\" AND a.hasta is not null and a.hasta<a.desde \";break;\n }\n } \n if (isset($filtro['cat_estat'])) {\n switch ($filtro['cat_estat']['condicion']) {\n case 'es_igual_a': $where2.= \" and cat_estat=\".quote($filtro['cat_estat']['valor']);break;\n case 'es_distinto_de': $where2.= \" and cat_estat <>\".quote($filtro['cat_estat']['valor']);break;\n }\n }\n if (isset($filtro['dedic'])) {\n switch ($filtro['dedic']['condicion']) {\n case 'es_igual_a': $where2.= \" and dedic=\".$filtro['dedic']['valor'];break;\n case 'es_distinto_de': $where2.= \" and dedic<>\".$filtro['dedic']['valor'];break;\n }\n } \n //me aseguro de colocar en estado B todas las designaciones que tienen baja\n if($concat!=''){ \n $sql2=\" update designacion a set estado ='B' \"\n . \" where estado<>'B' and a.uni_acad=\".$concat\n .\" and exists (select * from novedad b\n where a.id_designacion=b.id_designacion \n and (b.tipo_nov=1 or b.tipo_nov=4))\";\n }\n \n //designaciones sin licencia UNION designaciones c/licencia sin norma UNION designaciones c/licencia c norma UNION reservas\n $sql=$this->armar_consulta($pdia,$udia,$filtro['anio']['valor']);\n\t\t//si el estado de la designacion es B entonces le pone estado B, si es <>B se fija si tiene licencia sin goce o cese\n// $sql= \"select id_designacion,docente_nombre,legajo,nro_cargo,anio_acad,desde,hasta,cat_mapuche,cat_mapuche_nombre,cat_estat,dedic,carac,check_presup,id_departamento,id_area,id_orientacion,uni_acad,emite_norma,nro_norma,tipo_norma,nro_540,observaciones,estado,porc,dias_lic,programa,costo_vale as costo,est,expediente,nro from(\"\n// . \"select sub2.*,case when t_no.tipo_nov in (1,4) then 'B('||coalesce(t_no.tipo_norma,'')||':'||coalesce(t_no.norma_legal,'')||')' else case when t_no.tipo_nov in (2,5) then 'L('||t_no.tipo_norma||':'||t_no.norma_legal||')' else sub2.estado end end as est,t_i.expediente,case when d.tipo_desig=2 then costo_reserva(d.id_designacion,costo,\".$filtro['anio']['valor'].\") else costo end as costo_vale \"\n// . \" ,case when t_nor.id_norma is null then '' else case when t_nor.link is not null or t_nor.link <>'' then '<a href='||chr(39)||t_nor.link||chr(39)|| ' target='||chr(39)||'_blank'||chr(39)||'>'||t_nor.nro_norma||'</a>' else cast(t_nor.nro_norma as text) end end as nro \"\n// . \"from (\"\n// .\"select sub.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, sub.desde, sub.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,sub.emite_norma, sub.nro_norma,sub.tipo_norma,nro_540,sub.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,costo,max(t_no.id_novedad) as id_novedad from (\"\n// .\"select distinct b.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, b.desde, b.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,emite_norma, b.nro_norma,b.tipo_norma,nro_540,b.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,case when (dias_des-dias_lic)>=0 then ((dias_des-dias_lic)*costo_diario*porc/100) else 0 end as costo\"\n// .\" from (\"\n// .\" select a.id_designacion,a.docente_nombre,a.legajo,a.nro_cargo,a.anio_acad, a.desde, a.hasta,a.cat_mapuche, a.cat_mapuche_nombre,a.cat_estat,a.dedic,a.carac,b.a.id_departamento, a.id_area,a.id_orientacion, a.uni_acad, a.emite_norma, a.nro_norma,a.tipo_norma,a.nro_540,a.observaciones,a.estado,programa,porc,a.costo_diario,check_presup,licencia,a.dias_des,a.dias_lic\".\n// \" from (\".$sql.\") a\"\n// .$where \n// .\") b \"\n// . \" )sub\"\n// . \" LEFT OUTER JOIN novedad t_no ON (sub.id_designacion=t_no.id_designacion and t_no.desde<='\".$udia.\"' and (t_no.hasta is null or t_no.hasta>='\".$pdia.\"' ))\"\n// . \" GROUP BY sub.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, sub.desde,sub.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,sub.emite_norma, sub.nro_norma,sub.tipo_norma,nro_540,sub.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,costo\" \n// . \")sub2\"//obtengo el id_novedad maximo\n// . \" LEFT OUTER JOIN novedad t_no on (t_no.id_novedad=sub2.id_novedad)\"//con el id_novedad maximo obtengo la novedad que predomina\n// .\" LEFT JOIN impresion_540 t_i ON (nro_540=t_i.id)\"//para agregar el expediente \n// .\" LEFT OUTER JOIN designacion d ON (sub2.id_designacion=d.id_designacion)\"//como no tengo el id de la norma tengo que volver a hacer join\n// .\" LEFT OUTER JOIN norma t_nor ON (d.id_norma=t_nor.id_norma)\"\n// . \")sub3\"\n// .$where2\n// . \" order by docente_nombre,desde\"; \n $sql= \"select id_designacion,docente_nombre,legajo,nro_cargo,anio_acad,desde,hasta,cat_mapuche,cat_mapuche_nombre,cat_estat,dedic,carac,check_presup,id_departamento,id_area,id_orientacion,uni_acad,emite_norma,nro_norma,tipo_norma,nro_540,tkd,observaciones,estado,porc,dias_lic,programa,costo_vale as costo,est,expediente,nro from(\"\n . \"select sub2.*,sub2.nro_540||'/'||t_i.anio as tkd,case when t_no.tipo_nov in (1,4) then 'B('||coalesce(t_no.tipo_norma,'')||':'||coalesce(t_no.norma_legal,'')||')' else case when t_no.tipo_nov in (2,5) then 'L('||t_no.tipo_norma||':'||t_no.norma_legal||')' else sub2.estado end end as est,t_i.expediente,case when d.tipo_desig=2 then costo_reserva(d.id_designacion,costo,\".$filtro['anio']['valor'].\") else costo end as costo_vale \"\n . \" ,case when t_nor.id_norma is null then '' else case when t_nor.link is not null or t_nor.link <>'' then '<a href='||chr(39)||t_nor.link||chr(39)|| ' target='||chr(39)||'_blank'||chr(39)||'>'||t_nor.nro_norma||'</a>' else cast(t_nor.nro_norma as text) end end as nro \"\n . \"from (\"\n .\"select sub.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, sub.desde, sub.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,sub.emite_norma, sub.nro_norma,sub.tipo_norma,nro_540,sub.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,costo,max(t_no.id_novedad) as id_novedad from (\"\n .\"select distinct b.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, b.desde, b.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,emite_norma, b.nro_norma,b.tipo_norma,nro_540,b.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,case when (dias_des-dias_lic)>=0 then ((dias_des-dias_lic)*costo_diario*porc/100) else 0 end as costo\"\n .\" from (\"\n .\" select a.id_designacion,a.por_permuta,a.docente_nombre,a.legajo,a.nro_cargo,a.anio_acad, a.desde, a.hasta,a.cat_mapuche, a.cat_mapuche_nombre,a.cat_estat,a.dedic,a.carac,t.iddepto,a.id_departamento, a.id_area,a.id_orientacion, a.uni_acad, a.emite_norma, a.nro_norma,a.tipo_norma,a.nro_540,a.observaciones,a.estado,programa,porc,a.costo_diario,a.check_presup,licencia,a.dias_des,a.dias_lic\".\n \" from (\".$sql.\") a\"\n . \" INNER JOIN designacion d ON (a.id_designacion=d.id_designacion)\"\n . \" LEFT OUTER JOIN departamento t ON (t.iddepto=d.id_departamento)\"\n .$where \n .\") b \"\n . \" )sub\"\n . \" LEFT OUTER JOIN novedad t_no ON (sub.id_designacion=t_no.id_designacion and t_no.desde<='\".$udia.\"' and (t_no.hasta is null or t_no.hasta>='\".$pdia.\"' ))\"\n . \" GROUP BY sub.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, sub.desde,sub.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,sub.emite_norma, sub.nro_norma,sub.tipo_norma,nro_540,sub.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,costo\" \n . \")sub2\"//obtengo el id_novedad maximo\n . \" LEFT OUTER JOIN novedad t_no on (t_no.id_novedad=sub2.id_novedad)\"//con el id_novedad maximo obtengo la novedad que predomina\n .\" LEFT JOIN impresion_540 t_i ON (nro_540=t_i.id)\"//para agregar el expediente \n .\" LEFT OUTER JOIN designacion d ON (sub2.id_designacion=d.id_designacion)\"//como no tengo el id de la norma tengo que volver a hacer join\n .\" LEFT OUTER JOIN norma t_nor ON (d.id_norma=t_nor.id_norma)\"\n . \")sub3\"\n .$where2\n . \" order by docente_nombre,desde\"; \n return toba::db('designa')->consultar($sql);\n\t}",
"function lancar_notas_aluno($id_federado){\n //pegar movimentos da faixa candidata\n $dados['aluno']= $this->coordenador->get_aluno_faixa($id_federado);\n \n \n $id_faixa = $dados['aluno']['0']['ordem']+1;\n \n $dados['movimentos'] = $this->coordenador->movimentos($id_faixa);\n $dados['ultimo_evento'] = $this->coordenador->get_ultimo_evento($id_federado);\n \n// $this->funcoes->imprimir($dados['movimentos']);\n $this->load->view('header');\n $this->load->view('/coordenador/lancar_notas_aluno',$dados);\n $this->load->view('footer');\n \n //preparar o prontuário com notas do aluno\n //inclui-lo automáticamente no evento de graduação\n \n }",
"public static function inferensi($nilaiIPK, $nilaiPenghasilan, $nilaiJarak, $nilaiTanggungan, $nilaiRumah, $nilaiMotor, $nilaiMobil, $nilaiListrik, $nilaiAir) {\n\n echo \"Rule yang digunakan : \\n\";\n $x = 0;\n $kondisi = [];\n\n for ($ip = 0; $ip < count($nilaiIPK); $ip++) {\n for ($pn = 0; $pn < count($nilaiPenghasilan); $pn++) {\n for ($jr = 0; $jr < count($nilaiJarak); $jr++) {\n for ($tg = 0; $tg < count($nilaiTanggungan); $tg++) {\n for ($rm = 0; $rm < count($nilaiRumah); $rm++) {\n for ($mt = 0; $mt < count($nilaiMotor); $mt++) {\n for ($mb = 0; $mb < count($nilaiMobil); $mb++) {\n for ($ls = 0; $ls < count($nilaiListrik); $ls++) {\n for ($ai = 0; $ai < count($nilaiAir); $ai++) {\n if (($nilaiIPK[$ip] > 0) && ($nilaiPenghasilan[$pn] > 0) && ($nilaiJarak[$jr] > 0) && ($nilaiTanggungan[$tg] > 0) && ($nilaiRumah[$rm] > 0) && ($nilaiMotor[$mt] > 0) && ($nilaiMobil[$mb] > 0) && ($nilaiListrik[$ls] > 0) && ($nilaiAir[$ai] > 0)) {\n $alpha[$x] = min($nilaiIPK[$ip], $nilaiPenghasilan[$pn], $nilaiJarak[$jr], $nilaiTanggungan[$tg], $nilaiRumah[$rm], $nilaiMotor[$mt], $nilaiMobil[$mb], $nilaiListrik[$ls], $nilaiAir[$ai]);\n if ($ip == 2 && $jr == 2 && $pn == 1 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 2 && $pn == 1 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 2 && $pn == 0 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 2 && $pn == 0 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 1 && $pn == 1 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 1 && $pn == 1 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 1 && $pn == 0 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 1 && $pn == 0 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 0 && $pn == 1 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 0 && $pn == 1 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 0 && $pn == 0 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 0 && $pn == 0 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else {\n $z[$x] = self::z_tidakDapat($alpha, $x);\n $kondisi[$x] = \"tidak dapat\";\n }\n echo \"IF IPK = {$nilaiIPK[$ip]} AND Penghasilan = {$nilaiPenghasilan[$pn]} AND Jarak = {$nilaiJarak[$jr]} AND Tanggungan = {$nilaiTanggungan[$tg]} AND Rumah = {$nilaiRumah[$rm]} AND Motor = {$nilaiMotor[$mt]} AND Mobil = {$nilaiMobil[$mb]} AND Listrik = {$nilaiListrik[$ls]} AND Air = {$nilaiAir[$ai]} THEN a_predikat = {$alpha[$x]} z = {$z[$x]} kondisi = {$kondisi[$x]} \\n\";\n $x++;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n self::defuzzifikasi($alpha, $z);\n }",
"private function pegandoDivsNoticia($divsInternas) {\n \n $divNoti = [];\n \n \n foreach ($divsInternas as $divInterna) {\n $classeInterna = $divInterna->getAttribute('class');\n if ($classeInterna == 'td_module_10 td_module_wrap td-animation-stack custom-module-100') {\n $divNoti[] = $divInterna->getElementsByTagName('div');\n }\n }\n return $divNoti;\n }",
"public function buscaTurnos($grado,$anio){\n //public function buscaTurnos($grado){\n $match = ['grado' => $grado, 'anios_id' => $anio];\n //$turnos=Grado::where('grado',$grado)->select('turnos_id')->groupBy('turnos_id')->get();\n $turnos=Grado::where($match)->select('turnos_id')->groupBy('turnos_id')->get();\n //$turnos_values=Arr::flatten($turnos);\n return $turnos;\n }",
"public function getSolusiIdeal()\n\t{\n\t\t$this->aMax = $this->aMin = array();\n\t\t$this->getNilaiTopKriteria();\n\t\t$this->getNilaiTopAlternatif();\n\t\t$this->getMatriksNormalisasiTerbobot();\n\t\t//melakukan iterasi utk setiap kriteria\n\t\tforeach($this->kriteria as $id_kriteria => $a_kriteria) {\n\t\t $this->aMax[$id_kriteria] = 0;\n\t\t $this->aMin[$id_kriteria] = 100;\n\t\t //melakukan iterasi utk setiap alternatif\n\t\t foreach($this->alternatif as $id_alternatif => $nilai){\n\t\t if($this->aMax[$id_kriteria] < $this->matriksNormalisasiTerbobotY[$id_alternatif][$id_kriteria]){\n\t\t $this->aMax[$id_kriteria] = $this->matriksNormalisasiTerbobotY[$id_alternatif][$id_kriteria];\n\t\t }\n\t\t if($this->aMin[$id_kriteria] > $this->matriksNormalisasiTerbobotY[$id_alternatif][$id_kriteria]){\n\t\t $this->aMin[$id_kriteria] = $this->matriksNormalisasiTerbobotY[$id_alternatif][$id_kriteria];\n\t\t }\n\t\t }\n\t\t} \n\t}"
] |
[
"0.64666075",
"0.6084702",
"0.6054431",
"0.59301764",
"0.5714532",
"0.5702778",
"0.5668956",
"0.5536406",
"0.5509622",
"0.5436066",
"0.5435305",
"0.54249156",
"0.54012036",
"0.5378048",
"0.53553724",
"0.5309331",
"0.5293672",
"0.5281085",
"0.52749443",
"0.5271281",
"0.52453727",
"0.52159727",
"0.5199738",
"0.5191633",
"0.5175328",
"0.516026",
"0.51579726",
"0.515588",
"0.5139789",
"0.51392645"
] |
0.6628318
|
0
|
Funcion que busca si tiene EA reprobados un estudiante dentro de un arreglo de notas
|
function verificarReprobados($notas_estudiante){
$reprobados = 0;
if(count($notas_estudiante)>0){
foreach ($notas_estudiante as $key => $estudiantes) {
if ((isset($estudiantes['NOTA'])?$estudiantes['NOTA']:0)<30 || $estudiantes['OBSERVACION']==20 || $estudiantes['OBSERVACION']==23 || $estudiantes['OBSERVACION']==25){
$reprobados=1;
break;
}
}
}
return $reprobados;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function buscarEspaciosReprobados($notaAprobatoria) {\r\n \r\n $reprobados=isset($reprobados)?$reprobados:'';\r\n $espacios=isset($reprobados)?$reprobados:'';\r\n \r\n if (is_array($this->espaciosCursados)){\r\n foreach ($this->espaciosCursados as $value) {\r\n if (isset($value['NOTA'])&&($value['NOTA']<$notaAprobatoria||$value['CODIGO_OBSERVACION']==20||$value['CODIGO_OBSERVACION']==23||$value['CODIGO_OBSERVACION']==25)){\r\n if ($value['CODIGO_OBSERVACION']==19||$value['CODIGO_OBSERVACION']==22||$value['CODIGO_OBSERVACION']==24)\r\n {\r\n }else\r\n {\r\n $espacios[]=$value['CODIGO'];\r\n }\r\n }\r\n }\r\n if(is_array($espacios)){\r\n \r\n $espacios= array_unique($espacios);\r\n if($this->datosEstudiante['IND_CRED']=='S'){\r\n \r\n foreach ($espacios as $key => $espacio) {\r\n foreach ($this->espaciosCursados as $cursado) {\r\n if($espacio==$cursado['CODIGO']){\r\n $reprobados[$key]['CODIGO']=$cursado['CODIGO'];\r\n $reprobados[$key]['CREDITOS']=(isset($cursado['CREDITOS'])?$cursado['CREDITOS']:0);\r\n }\r\n }\r\n\r\n }\r\n }else{\r\n $reprobados=$espacios;\r\n }\r\n return $reprobados; \r\n \r\n }else{\r\n return 0; \r\n }\r\n \r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n }",
"function cc_ho_vetrina($agenzia, $rif){\n\tglobal $invetrina;\n\t\n\t// $agenzia qua è il numero interno di Cometa\n\tif( isset( $invetrina[$agenzia] ) ){\t\t\n\t\t\n\t\tif ($invetrina[$agenzia]['imm'] == $rif) {\n\t\t\t// questo immobile è in vetrina\n\t\t\t$vetrina = '1';\n\t\t\tcc_import_immobili_error_log($rif.\" è in vetrina\");\n\t\t\t\n\t\t\t// vediamo se è lo stesso di quello che era già in vetrina o meno\n\t\t\t$oldrif = cc_get_rif_vetrina( substr($rif, 0, 2) );\n\t\t\tcc_import_immobili_error_log(\"oldrif: \".$oldrif);\n\t\t\t\n\t\t\t// se l'immobile attualemnte in vetrina non è questo tolgo quello attuale da vetrina\n\t\t\tif($oldrif != $rif) {\n\t\t\t\tcc_updateVetrina($oldrif); \n\t\t\t\tcc_import_immobili_error_log(\"Tolgo vetrina da \".$oldrif);\n\t\t\t}\n\t\t}else{\n\t\t\t$vetrina = '0';\n\t\t}\t\t\n\t\n\t}else{\n\t\t$vetrina = '0';\n\t}\n\t\n\treturn $vetrina;\n}",
"function adivinarSexo($array_A){\n $datos=new ManejoDatos();\n $arrayBD =$datos->getEstiloSexoPromedioRecinto();\n if($array_A[0]=='DIVERGENTE'){\n $estilo=4;\n }\n if($array_A[0]=='CONVERGENTE'){\n $estilo=3;\n }\n if($array_A[0]=='ACOMODADOR'){\n $estilo=2;\n }\n if($array_A[0]=='ASIMILADOR'){\n $estilo=1;\n }\n $arrayA = array( $estilo, $array_A[1],($array_A[2] == \"Paraiso\" ? 1 : 2));\n foreach ($arrayBD as $elemento) {\n if($elemento['Estilo']=='DIVERGENTE'){\n $estiloBD=4;\n }\n if($elemento['Estilo']=='CONVERGENTE'){\n $estiloBD=3;\n }\n if($elemento['Estilo']=='ACOMODADOR'){\n $estiloBD=2;\n }\n if($elemento['Estilo']=='ASIMILADOR'){\n $estiloBD=1;\n }\n $arrayB = array($estiloBD, $elemento['Promedio'], $elemento['Recinto'] == \"Paraiso\" ? 1 : 2);\n $temporal = $this->distanciaEuclidiana($arrayA, $arrayB);\n if ($temporal < $this->distancia) {\n $this->distancia = $temporal;\n $this->temporal = $elemento['Sexo'];\n }\n }\n if($this->temporal=='M'){\n $this->temporal=\"Masculino\";\n return $this->temporal;\n }\n if($this->temporal=='F'){\n $this->temporal=\"Femenino\";\n return $this->temporal;\n }\n }",
"function reprocesos($anho, $mes, $razon_reproceso)\r\n\t{\r\n\t\t$dia = date('d');\r\n\t\t$total_t = 0;\r\n\t\t$total_tr = 0;\r\n\t\t$total_tt = 0;\r\n\t\t$pedidos = array();\r\n\t\tif($mes == 'anual')\r\n\t\t{\r\n\t\t\t$fecha1 = $anho.'-01-01';\r\n\t\t\t$fecha2 = $anho.'-12-01';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$fecha1 = $anho.'-'.$mes.'-01';\r\n\t\t\t$fecha2 = $anho.'-'.$mes.'-31';\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t$SQL = '';\r\n\t\t$tabla = '';\r\n\t\t\r\n\t\tif(strtotime('2013-06-20') < strtotime($anho.'-'.$mes.'-'.$dia))\r\n\t\t{\r\n\t\t\tif('todos' != $razon_reproceso)\r\n\t\t\t{\r\n\t\t\t\t$tabla = ' ,reproceso_detalle reproc ';\r\n\t\t\t\t$SQL .= 'and ped.id_repro_deta = reproc.id_repro_deta';\r\n\t\t\t\t$SQL .= ' and reproc.id_repro_deta = \"'.$razon_reproceso.'\"';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//Buscar clientes que poseen reprocesos\r\n\t\t$Consulta = '\r\n\t\t\t\t\t\t\tselect distinct proc.id_cliente, codigo_cliente\r\n\t\t\t\t\t\t\tfrom procesos proc, pedido ped, cliente cli '.$tabla.'\r\n\t\t\t\t\t\t\twhere proc.id_proceso = ped.id_proceso\r\n\t\t\t\t\t\t\t\tand cli.id_cliente = proc.id_cliente\r\n\t\t\t\t\t\t\t\tand ped.fecha_entrega >= \"'.$fecha1.'\"\r\n\t\t\t\t\t\t\t\tand ped.fecha_entrega <= \"'.$fecha2.'\"\r\n\t\t\t\t\t\t\t\tand ped.id_tipo_trabajo = \"4\"\r\n\t\t\t\t\t\t\t\t'.$SQL.'\r\n\t\t\t\t\t\t\t\tand cli.id_grupo = \"'.$this->session->userdata('id_grupo').'\"\r\n\t\t\t\t\t\t\torder by id_cliente\r\n\t\t\t\t\t\t\t';\r\n\t\t\r\n\t\t$Resultado= $this->db->query($Consulta);\r\n\t\t$Info = $Resultado->result_array();\r\n\t\t\r\n\t\tforeach($Info as $Datos)\r\n\t\t{\r\n\t\t\t$pedidos[$Datos['id_cliente']]['id_cliente'] = $Datos['id_cliente'];\r\n\t\t\t$pedidos[$Datos['id_cliente']]['codigo_cliente'] = $Datos['codigo_cliente'];\r\n\r\n\t\t\t//Buscar reprocesos por cliente\r\n\t\t\t$Consulta2 = '\r\n\t\t\t\t\t\t\t\t\tselect count(id_cliente) as total\r\n\t\t\t\t\t\t\t\t\tfrom procesos proc, pedido ped '.$tabla.'\r\n\t\t\t\t\t\t\t\t\twhere proc.id_proceso = ped.id_proceso\r\n\t\t\t\t\t\t\t\t\tand ped.fecha_entrega >= \"'.$fecha1.'\"\r\n\t\t\t\t\t\t\t\t\tand ped.fecha_entrega <= \"'.$fecha2.'\"\r\n\t\t\t\t\t\t\t\t\tand ped.id_tipo_trabajo = \"4\"\r\n\t\t\t\t\t\t\t\t\t'.$SQL.'\r\n\t\t\t\t\t\t\t\t\tand id_cliente = \"'.$Datos['id_cliente'].'\"\r\n\t\t\t\t\t\t\t\t\torder by id_cliente';\r\n\t\t\t\r\n\t\t\t$Resultado2 = $this->db->query($Consulta2);\r\n\t\t\t$Info2 = $Resultado2->result_array();\r\n\t\t\tforeach($Info2 as $Datos2)\r\n\t\t\t{\r\n\t\t\t\t$total_r = $Datos2[\"total\"];\r\n\t\t\t\t$total_tt += $total_r;\r\n\t\t\t\t$pedidos[$Datos['id_cliente']]['total_reprocesos'] = $total_r;\r\n\t\t\t\t$pedidos[$Datos['id_cliente']]['num_reprocesos'] = $total_tt;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Total pedidos del cliente en el rango de fecha\r\n\t\t\t$Consulta3 = 'select count(id_cliente) as total_a\r\n\t\t\t\t\t\t\t\t\tfrom procesos proc, pedido ped\r\n\t\t\t\t\t\t\t\t\twhere proc.id_proceso = ped.id_proceso\r\n\t\t\t\t\t\t\t\t\tand ped.fecha_entrega >= \"'.$fecha1.'\"\r\n\t\t\t\t\t\t\t\t\tand ped.fecha_entrega <= \"'.$fecha2.'\"\r\n\t\t\t\t\t\t\t\t\tand id_cliente = \"'.$Datos['id_cliente'].'\"\r\n\t\t\t\t\t\t\t\t\torder by id_cliente';\r\n\t\t\t\r\n\t\t\t$Resultado3 = $this->db->query($Consulta3);\r\n\t\t\t$Info3 = $Resultado3->result_array();\r\n\t\t\tforeach($Info3 as $Datos3)\r\n\t\t\t{\r\n\t\t\t\t$total_t = $Datos3[\"total_a\"];\r\n\t\t\t\t$total_tr = $total_tr + $total_t;\r\n\t\t\t\t$porc = ($total_r * 100) / $total_t;\r\n\t\t\t\t$porc = round($porc * 100) / 100;\r\n\t\t\t\t$pedidos[$Datos['id_cliente']]['total_pedidos'] = $total_t;\r\n\t\t\t\t$pedidos[$Datos['id_cliente']]['porcentaje'] = $porc;\r\n\t\t\t\t$pedidos[$Datos['id_cliente']]['total_trabajos'] = $total_tr;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $pedidos;\r\n\t}",
"public function contAlumNormal($anio)\n { \n //$gradosMatTercerCiclo=[];$gradosVespertino=[];$gradosCompleto=[];\n //para contar alumnas en periodo normal\n //hay q filtrar por turnos Matutino,Vespertino y Completo\n $match=['anios_id'=>$anio,'turnos_id'=>1];\n $gradosMatutino=grado::where($match)->select('categoria','grado','seccion','capacidad','turnos_id','id')->orderBy('grado')->orderBy('seccion')->get()->toArray();\n //$countMat=count($gradosMatutino);\n $arreglo_grados_inscritos_matutino=[];\n for($i=0;$i<count($gradosMatutino);$i++){\n $gradoId=$gradosMatutino[$i]['id'];\n $busqueda=matricula::where('grados_id',$gradoId)->get();\n $cont=$busqueda->count();\n $gradoSeccion=$gradosMatutino[$i]['grado'].$gradosMatutino[$i]['seccion'];\n $aux=[\"gradoSeccion\"=>$gradoSeccion,\n \"cantidad\"=>$cont,\n \"categoria\"=>$gradosMatutino[$i]['categoria'],\n \"capacidad\"=>$gradosMatutino[$i]['capacidad'],\n \"turno\"=>\"matutino\",\n ];\n array_push($arreglo_grados_inscritos_matutino,$aux);\n }\n\n \n $match=['anios_id'=>$anio,'turnos_id'=>2];\n $gradosVespertino=grado::where($match)->select('categoria','grado','seccion','capacidad','turnos_id','id')->orderBy('grado')->orderBy('seccion')->get()->toArray();\n $arreglo_grados_inscritos_vespertino=[];\n for($i=0;$i<count($gradosVespertino);$i++){\n $gradoId=$gradosVespertino[$i]['id'];\n $busqueda=matricula::where('grados_id',$gradoId)->get();\n $cont=$busqueda->count();\n $gradoSeccion=$gradosVespertino[$i]['grado'].$gradosVespertino[$i]['seccion'];\n $aux=[\"gradoSeccion\"=>$gradoSeccion,\n \"cantidad\"=>$cont,\n \"categoria\"=>$gradosVespertino[$i]['categoria'],\n \"capacidad\"=>$gradosVespertino[$i]['capacidad'],\n \"turno\"=>\"Vespertino\", \n ];\n array_push($arreglo_grados_inscritos_vespertino,$aux);\n }\n\n //$countVesp=count($gradosVespertino);\n $match=['anios_id'=>$anio,'turnos_id'=>3];\n $gradosCompleto=grado::where($match)->select('categoria','grado','seccion','capacidad','turnos_id','id')->orderBy('grado')->orderBy('seccion')->get()->toArray();\n\n $arreglo_grados_inscritos_completo=[];\n for($i=0;$i<count($gradosCompleto);$i++){\n $gradoId=$gradosCompleto[$i]['id'];\n $busqueda=matricula::where('grados_id',$gradoId)->get();\n $cont=$busqueda->count();\n $gradoSeccion=$gradosCompleto[$i]['grado'].$gradosCompleto[$i]['seccion'];\n $aux=[\"gradoSeccion\"=>$gradoSeccion,\n \"cantidad\"=>$cont,\n \"categoria\"=>$gradosCompleto[$i]['categoria'],\n \"capacidad\"=>$gradosCompleto[$i]['capacidad'],\n \"turno\"=>\"completo\",\n ];\n array_push($arreglo_grados_inscritos_completo,$aux);\n }\n\n //$countComp=count($gradosCompleto);\n //dd($gradosCompleto);\n $arreglo_de_grados=[\"gradosMatutino\"=>$arreglo_grados_inscritos_matutino,\n \"gradosVespertino\"=>$arreglo_grados_inscritos_vespertino,\n \"gradosCompleto\"=>$arreglo_grados_inscritos_completo,\n \n ];\n //dd($arreglo_de_grados);\n //dd($arreglo_grados_inscritos_matutino);\n return $arreglo_de_grados;\n //$match=[''=>];\n //$nomMat=matricula::\n\n }",
"function selectNotasByAlu($id){\n\t\t$link = openDb();\n\t\t$sql = \"SELECT not_valor, not_trime, disc_nome FROM ((notas n INNER JOIN aluno a ON n.alu_id=a.alu_id) INNER JOIN disciplina ds ON ds.disc_id=n.disc_id AND a.alu_id = '$id')\";\n\t\t$query = $link->query($sql);\n\t\t\n\t\t$cont = 1;\n\t\t$x\t = 0;\n\t\t$y\t = 0;\n\t\t$retorno = array();\n\n\t\twhile ($result = mysqli_fetch_array($query)) {\n\t\t\tif ($cont==1) {\n\t\t\t\t$retorno[$x][$y]=$result['disc_nome']; //Nome da disciplina\n\t\t\t\t$y+=1;\n\t\t\t\t$retorno[$x][$y]=$result['not_valor']; //Nota do primeiro Trimestre\n\t\t\t\t$y+=1;\n\t\t\t}\n\t\t\tif ($cont==2) {\n\t\t\t\t$retorno[$x][$y]=$result['not_valor']; //Nota do segundo Trimestre\n\t\t\t\t$y+=1;\n\t\t\t}\n\t\t\tif ($cont==3) {\n\t\t\t\t$retorno[$x][$y]=$result['not_valor']; //Nota do terceiro Trimestre\n\t\t\t\t$y+=1;\n\t\t\t\t//if(!$retorno[$x][1] == NULL && !$retorno[$x][2] == NULL && !$retorno[$x][3] == NULL){\n\t\t\t\t\t$retorno[$x][$y] = arredonda(number_format(($retorno[$x][1]+$retorno[$x][2]+$retorno[$x][3])/3,1, '.', ' ')); //Média das notas\n\t\t\t\t\tif($retorno[$x][$y] == 0){ $retorno[$x][$y] = NULL; }\n\t\t\t\t/*}else{\n\t\t\t\t\t$retorno[$x][$y] = NULL;\n\t\t\t\t}*/\n\t\t\t\t$y=0;\n\t\t\t\t$x+=1;\n\t\t\t\t$cont=0;\n\t\t\t}\n\t\t\t$cont+=1; //Esquema criado para arrumar as tuplas, (Disciplinas e Notas relacionadas na mesma linha)\n\t\t}\n\t\treturn $retorno;\n\t}",
"function relacionamentoFalhasEquivalentes($valuerelacionamentos_ids, $db_storage, $serviceOuHost){\n\t$pai_id = $valuerelacionamentos_ids;\n\tif ($serviceOuHost == \"Host\"){\n\t\t//sec_to_time((now() - last_hard_state_change)) as last_hard_state_change_duration, \n\t\t$query = \"SELECT host_id as id, name, state, output, last_hard_state_change, name as host_name,(select GROUP_CONCAT(services.description SEPARATOR '<br/>') as services_afetados from services where services.host_id = hosts.host_id) services_afetados, notes FROM hosts WHERE host_id = \" . $pai_id;\n\t}else{\n\t\t$query = \"SELECT service_id as id, description as name, state, output, last_hard_state_change, (select hosts.name from hosts where hosts.host_id = services.host_id) as host_name, description as services_afetados, notes FROM services WHERE service_id = \" . $pai_id;\n\t}\n\t//$res = $this->db->query($query);\n\t$res = $db_storage->query($query);\n\t$tabRelacionamento = array();\n\twhile ($row = $res->fetch()) {\n\t\t$tabRelacionamento['id'] = $row['id'];\n\t\t$tabRelacionamento['name'] = $row['name'];\n\t\t//0 =\"OK\", 1 = \"WARNING\", 2 = \"CRITICAL\", 3 = \"UNKNOWN\"\n\t\t$tabRelacionamento['state'] = $row['state'];\n\t\t$tabRelacionamento['ic'] = $row['notes'];\n\t\t$tabRelacionamento['last_hard_state_change_duration'] = CentreonDuration::toString(time() - $row['last_hard_state_change']);\n\t\t$tabRelacionamento['output'] = $row['output'];\n\t\t$tabRelacionamento['last_hard_state_change'] = $row['last_hard_state_change'];\n\t\t$epoch = $tabRelacionamento['last_hard_state_change'];\n\t\t$dt = new DateTime(\"@$epoch\");\n\t\t$tabRelacionamento['last_hard_state_change'] = $dt->format('Y-m-d H:i:s');\n\t\t$tabRelacionamento['host_name'] = $row['host_name'];\n\t\t$tabRelacionamento['services_afetados'] = $row['services_afetados'];\n\t\t\n\t}\n\treturn $tabRelacionamento;\n}",
"function obtenerNotasEstudiante($codigo_estudiante){\n $notas_estudiante=array();\n if(count($this->notas>0)&&!empty($this->notas))\n {\n foreach ($this->notas as $key => $row) {\n if($row['COD_ESTUDIANTE']==$codigo_estudiante){\n $notas_estudiante[]=$row;\n unset($this->notas[$key]);\n }\n }\n }\n return $notas_estudiante;\n }",
"function en_rojo($anio){\n $ar=array();\n $ar['anio']=$anio;\n $sql=\"select sigla,descripcion from unidad_acad \";\n $sql = toba::perfil_de_datos()->filtrar($sql);\n $resul=toba::db('designa')->consultar($sql);\n $ar['uni_acad']=$resul[0]['sigla'];\n $res=$this->get_totales($ar);//monto1+monto2=gastado\n $band=false;\n $i=0;\n $long=count($res);\n while(!$band && $i<$long){\n \n if(($res[$i]['credito']-($res[$i]['monto1']+$res[$i]['monto2']))<-50){//if($gaste>$resul[$i]['cred']){\n $band=true;\n }\n \n $i++;\n }\n return $band;\n \n }",
"public function calcoloOrariDisponibili($eEsame, $workingPlanGiorno) {\r\n $vPrenotazione = USingleton::getInstance('VPrenotazione');\r\n $durata = $eEsame->getDurataEsame();\r\n $ora = substr($durata, 0, 2);\r\n $minuti = substr($durata, 3, 2);\r\n // la stringa durata deve essere convertita in un intervallo\r\n $durata = new DateInterval('PT' . \"$ora\" . 'H' . \"$minuti\" . 'M'); //PT sta per period time\r\n //all'interno di workingPlan ad ogni giorno è associato un oggetto con attributi Start, End, Pausa\r\n $oraInizio = $workingPlanGiorno->Start;\r\n $oraFine = $workingPlanGiorno->End;\r\n $oraInizioPausa = new DateTime($workingPlanGiorno->BreakStart); \r\n $oraFinePausa = new DateTime($workingPlanGiorno->BreakEnd);\r\n $orariPrenotazioni = Array();\r\n //converto la stringa $oraInizio in un oggetto Time\r\n $oraInizio = new DateTime($oraInizio);\r\n //converto la stringa $oraFine in un oggetto Time\r\n $oraFine = new DateTime($oraFine);\r\n $oraInizioEsame = $oraInizio;\r\n while ($oraInizioEsame <= $oraFine) {\r\n $oraFineEsame = clone $oraInizioEsame; // clono l'oggetto (quindi non ho un passaggio per riferimento)\r\n $oraFineEsame = $oraFineEsame->add($durata); // l'orario in cui termirebbe l'esame\r\n if($oraFineEsame <= $oraInizioPausa || $oraInizioEsame >= $oraFinePausa) // se l'orario non ricade all'interno dell'intervallo di pausa della clinica\r\n { //aggiungo l'orario disponibile successivo\r\n $orariPrenotazioni[] = $oraInizioEsame->format(\"H:i\");\r\n }\r\n //aggiungo un intervallo pari alla durata dell'esame all'orario disponibile precedente \r\n $oraInizioEsame = $oraInizioEsame->add($durata);\r\n };\r\n if ($oraInizioEsame > $oraFine) {\r\n array_pop($orariPrenotazioni);\r\n }\r\n // ora che ho tutti gli orari della giornata, cerco gli orari delle prenotazione già effettuate\r\n $data = $vPrenotazione->recuperaValore('data');\r\n $fPrenotazioni = USingleton::getInstance('FPrenotazione');\r\n $prenotazioni = $fPrenotazioni->cercaPrenotazioniEsameClinicaData($eEsame->getIDEsameEsame(), $this->_partitaIVA, $data);\r\n $orariPrenotati = Array();\r\n if (is_array($prenotazioni) || !is_bool($prenotazioni)) {\r\n foreach ($prenotazioni as $prenotazione) {\r\n foreach ($prenotazione as $key => $value) {\r\n if ($key === \"DataEOra\") {\r\n $value = substr($value, 11, 5);\r\n $orariPrenotati[] = $value;\r\n }\r\n }\r\n }\r\n } else {\r\n // errore\r\n }\r\n $orariDisponibili = array_diff($orariPrenotazioni, $orariPrenotati); //Compares array1 against one or more other arrays and returns the values in array1 that are not present in any of the other arrays. \r\n return $orari = Array('orari' => $orariDisponibili);\r\n }",
"function adivinarEstilo($array_A){\n $datos=new ManejoDatos();\n $arrayBD =$datos->getEstiloSexoPromedioRecinto();\n \n $arrayA = array($array_A[2] == \"Masculino\" ? 1 : 2, $array_A[1],($array_A[0] == \"Paraiso\" ? 1 : 2)); \n \n foreach ($arrayBD as $elemento) {\n \n $arrayB = array($elemento['Sexo'] == \"M\" ? 1 : 2, $elemento['Promedio'], $elemento['Recinto'] == \"Paraiso\" ? 1 : 2);\n $temporal = $this->distanciaEuclidiana($arrayA, $arrayB);\n if ($temporal < $this->distancia) {\n $this->distancia = $temporal;\n $this->temporal = $elemento['Estilo'];\n }\n }\n \n return $this->temporal;\n \n }",
"function analisaCaminho($lab, $qtdL, $qtdC, $pLI, $pCI, $pLF, $pCF, $pLA, $pCA){ \n if ($pLA == $pLF && $pCA == $pCF){\n exibelab($lab, $qtdL, $qtdC);\n }else{\n $lab[$pLA][$pCA] = 5;\n\n //define vizinhança\n for($c = -1; $c <= +1; $c++){\n for($l = -1; $l <= +1; $l++){\n $liA = $pLA+ $c; // linha atual\n $coA = $pCA+ $l; // coluna atual\n \n //verifica se está dentro dos limites\n if ( ($liA > 0 && $liA <=$qtdL-1) && ($coA > 0 && $coA <= $qtdC-1) ){ \n // verifica se EXISTE, e se é caminho ou saida\n if (isset($lab[$liA][$coA]) && ( $lab[$liA][$coA] == 0 || $lab[$liA][$coA] == 3 )){ \n // exclui diagonais\n if ($c * $l == 0){\n //exclui limites\n if ($lab[$liA][$coA] != 4){ \n analisaCaminho($lab, $qtdL, $qtdC, $pLI, $pCI, $pLF, $pCF, $liA,$coA);\n }\n }\n }\n } // fim limites\n \n }\n }\n // e se eu resetar o caminho aqui? \n }\n }",
"private function verificarConflictoFechas($dni,$fecha_ae,bool $finalizado){\n $q = DB::table('ae_datos as aed')->select('aee.*')\n ->join('ae_estado as aee','aee.id_autoexcluido','=','aed.id_autoexcluido')\n ->whereNull('aed.deleted_at')->whereNull('aee.deleted_at')\n ->where('aed.nro_dni','=',$dni);\n \n /*\n Agarra dos casos (el de abajo es el que se agregaria)\n \n fecha_ae fecha_cierre_ae\n ┌──────────────────────────────────────────────┐\n │ │\n │ │\n └──────────────────────────────────────────────┘\n $fecha_ae\n fecha_ae fecha_cierre_ae\n ┌──────────────────────────────────────────────┐\n │ │\n │ │\n └──────────────────────┘\n $fecha_ae\n */\n $dentro_algun_completo = (clone $q)->whereNull('aee.fecha_revocacion_ae')\n ->where('aee.fecha_ae','<=',$fecha_ae)->where('aee.fecha_cierre_ae','>=',$fecha_ae)\n ->count() > 0;\n if($dentro_algun_completo) return 1;\n \n /*\n Agarra dos casos (el de abajo es el que se agregaria)\n \n fecha_ae fecha_vencimiento\n ┌──────────────────────┐\n │ │\n │ │\n └──────────────────────────────────────────────┘\n $fecha_ae\n fecha_ae fecha_vencimiento\n ┌──────────────────────┐\n │ │\n │ │\n └──────────────────────┘\n $fecha_ae\n */\n $dentro_algun_finalizado = (clone $q)->whereNotNull('aee.fecha_revocacion_ae')\n ->where('aee.fecha_ae','<=',$fecha_ae)->where('aee.fecha_vencimiento','>=',$fecha_ae)\n ->count() > 0;\n if($dentro_algun_finalizado) return 2;\n \n $fecha_fin = null;\n {\n $fechas = AutoexclusionController::getInstancia(false)->generarFechas($fecha_ae);\n if($finalizado) $fecha_fin = $fechas->fecha_vencimiento;\n else $fecha_fin = $fechas->fecha_cierre_ae;\n }\n \n /*\n Agarra dos casos (el de abajo es el que se agregaria)\n fecha_ae fecha_cierre_ae\n ┌──────────────────────────────────────────────┐\n │ │\n │ │\n └──────────────────────┘\n $fecha_fin\n fecha_ae fecha_cierre_ae\n ┌──────────────────────────────────────────────┐\n │ │\n │ │\n └──────────────────────────────────────────────┘\n $fecha_fin\n */\n $se_extiende_dentro_de_alguno_ya_existente_completo = (clone $q)->whereNull('aee.fecha_revocacion_ae')\n ->where('aee.fecha_ae','<=',$fecha_fin)->where('aee.fecha_cierre_ae','>=',$fecha_fin)\n ->count() > 0;\n if($se_extiende_dentro_de_alguno_ya_existente_completo) return 3;\n \n /*\n Agarra dos casos (el de abajo es el que se agregaria)\n fecha_ae fecha_vencimiento\n ┌──────────────────────┐\n │ │\n │ │\n └──────────────────────┘\n $fecha_fin\n fecha_ae fecha_vencimiento\n ┌──────────────────────┐\n │ │\n │ │\n └──────────────────────────────────────────────┘\n $fecha_fin\n */\n $se_extiende_dentro_de_alguno_ya_existente_finalizado = (clone $q)->whereNotNull('aee.fecha_revocacion_ae')\n ->where('aee.fecha_ae','<=',$fecha_fin)->where('aee.fecha_vencimiento','>=',$fecha_fin)\n ->count() > 0;\n if($se_extiende_dentro_de_alguno_ya_existente_finalizado) return 4;\n \n return 0;\n }",
"function contarReprobados($espacios_por_cursar){\n $cantidad=0;\n if(count($espacios_por_cursar)>0){\n foreach ($espacios_por_cursar as $key => $espacio) {\n if($espacio['REPROBADO']==1){\n $cantidad++;\n \t }\n }\n }\n return $cantidad; \n }",
"function verificarSolapamiento($horario, $duracion, $idTeatroNuevaFuncion){\r\n $funcionTeatro = new FuncionTeatro('', '', '', '', '');\r\n $coleccionFuncionesTeatro = $funcionTeatro->listar(\"\");\r\n $cine = new Cine('','','','','','','');\r\n $coleccionCines = $cine->listar(\"\");\r\n $musical = new Musical('','','','','','','');\r\n $coleccionMusicales = $musical->listar(\"\");\r\n\r\n $retorno = false;\r\n\r\n list($horaFuncion, $minutosFuncion) = explode(\":\", $horario); //Extraigo la hora y los minutos separados por el \":\"\r\n $hora = intval($horaFuncion); //Convierto la hora de string a entero\r\n $minutos = intval($minutosFuncion); //Convierto los minutos de string a entero\r\n\r\n $horarioInicioFuncion = (($hora * 60) + $minutos); //Convierto el horario de INICIO de la nueva funcion a minutos\r\n $horarioCierreFuncion = $horarioInicioFuncion + $duracion; //Horario de CIERRE de la nueva funcion\r\n\r\n $horarioFuncionNueva = array('inicio'=>$horarioInicioFuncion, 'cierre'=>$horarioCierreFuncion);\r\n\r\n $coleccionHorarios = [];\r\n\r\n //Sumo los horarios de cada tipo\r\n $coleccionHorarios = armarColeccionHorarios($coleccionFuncionesTeatro, $idTeatroNuevaFuncion, $coleccionHorarios);\r\n $coleccionHorarios = armarColeccionHorarios($coleccionCines, $idTeatroNuevaFuncion, $coleccionHorarios);\r\n $coleccionHorarios = armarColeccionHorarios($coleccionMusicales, $idTeatroNuevaFuncion, $coleccionHorarios);\r\n\r\n if (count($coleccionHorarios)>0){\r\n $horarioDisponible = verificarHorario($horarioFuncionNueva, $coleccionHorarios);\r\n if ($horarioDisponible){\r\n $retorno = true;\r\n }\r\n } else {\r\n $retorno = true;\r\n }\r\n\r\n return $retorno;\r\n}",
"function matricularVehiculo(){\r\n $matricula _aleatoria = rand();\r\n\r\n $encontrado = false;\r\n for ($i=0; $i< count ($this->vehiculos) && ($encontrado==false); $i++) {\r\n if ($this->vehiculos[$i] != null) {\r\n if($this->vehiculos[$i]->getMatricula() =='') {}\r\n $this->vehiculos[$i]->getMatricula($matricula_aleatoria);\r\n $encontrado = true;\r\n $pos = $i;\r\n }\r\n }\r\n }",
"function agrega_emergencia_ctraslado (\n $_fecha,$_telefono,\n $_plan,$_horallam,\n $_socio,$_nombre,\n $_tiposocio,$_edad,$_sexo,\n $_identificacion,$_documento,\n $_calle,$_numero,\n $_piso,$_depto,\n $_casa,$_monoblok,\n $_barrio,$_entre1,\n $_entre2,$_localidad,\n $_referencia,$_zona,\n $_motivo1,\n $_color,\n $_observa1,$_observa2,\n $_opedesp ,\n\t\t\t\t\t\t\t$_nosocio1 , $_noedad1 , $_nosexo1, $_noiden1 , $_nodocum1 ,\n\t\t\t\t\t\t\t$_nosocio2 , $_noedad2 , $_nosexo2, $_noiden2 , $_nodocum2 ,\n\t\t\t\t\t\t\t$_nosocio3 , $_noedad3 , $_nosexo3, $_noiden3 , $_nodocum3 ,\n\t\t\t\t\t\t\t$_nosocio4 , $_noedad4 , $_nosexo4, $_noiden4 , $_nodocum4 ,\n\t\t\t\t\t\t\t$_nosocio5 , $_noedad5 , $_nosexo5, $_noiden5 , $_nodocum5 ,\n $_bandera_nosocio1 ,$_bandera_nosocio2 ,$_bandera_nosocio3 ,$_bandera_nosocio4 ,\n\t\t\t\t\t\t\t$_bandera_nosocio5 \n )\n{\n $moti_explode ['0'] = substr($_motivo1, 0, 1);\n $moti_explode ['1'] = substr($_motivo1, 1, 2);\n\n // CALCULO DE FECHA Y DIA EN QUE SE MUESTRA EL TRASLADO EN PANTALLA\n $fecha_aux = explode (\".\" ,$_fecha );\n $hora_aux = explode (\":\" ,$_horallam);\n\n $_dia_tr =$fecha_aux[2];\n $_mes_tr =$fecha_aux[1];\n $_anio_tr =$fecha_aux[0];\n $_hora_tr =$hora_aux[0];\n $_min_tr =$hora_aux[1];\n $_param_tr =12; // parametro para mostrar en pantalla\n \n $traslado_aux = restaTimestamp ($_dia_tr , $_mes_tr, $_anio_tr , $_hora_tr , $_min_tr , $_param_tr);\n //***********************************************************\n $_plan = $_plan + 0;\n $insert_atencion = '\n insert into atenciones_temp\n (fecha,telefono,plan,\n horallam,socio,\n nombre,tiposocio,\n edad,sexo,\n identificacion,documento,\n calle,numero,\n piso,depto,casa,\n monoblok,barrio,\n entre1,entre2,\n localidad,referencia,\n zona,motivo1,\n motivo2,\n color,observa1,\n observa2,operec,traslado_aux ,fechallam)\n\n values\n\n (\n \"'.$_fecha.'\" , \"'.$_telefono.'\" , \"'.$_plan.'\" ,\n \"'.$_horallam.'\",\"'.$_socio.'\",\n \"'.utf8_decode($_nombre).'\",\"'.$_tiposocio.'\",\n \"'.$_edad.'\",\"'.$_sexo.'\",\n \"'.utf8_decode($_identificacion).'\",\"'.$_documento.'\",\n \"'.utf8_decode($_calle).'\",\"'.utf8_decode($_numero).'\",\n \"'.utf8_decode($_piso).'\",\"'.utf8_decode($_depto).'\",\n \"'.utf8_decode($_casa).'\",\"'.utf8_decode($_monoblok).'\",\n \"'.utf8_decode($_barrio).'\",\"'.utf8_decode($_entre1).'\",\n \"'.utf8_decode($_entre2).'\",\"'.utf8_decode($_localidad).'\",\n \"'.utf8_decode($_referencia).'\",\"'.$_zona.'\",\n '.$moti_explode[0].',\n '.$moti_explode[1].','.$_color.',\n \"'.utf8_decode($_observa1).'\",\"'.utf8_decode($_observa2).'\",\n \"'.utf8_decode($_opedesp).'\", \"'.$traslado_aux.'\" , \"'.$_fecha.'\"\n )\n ';\n\n // insert de la emergencia en atenciones temp\n global $G_legajo , $parametros_js;\n $result = mysql_query($insert_atencion);\n if (!$result) {\n $boton = '<input type=\"button\" value=\"Error! modificar y presionar nuevamente\"\n\t\t\t onclick=\" check_emergencia(\n\t\t\t document.formulario.muestra_fecha.value,document.formulario.telefono.value,\n\t\t\t document.formulario.i_busca_plan.value,document.formulario.hora.value,\n\t\t\t document.formulario.td_padron_idpadron.value,document.formulario.td_padron_nombre.value,\n\t\t\t document.formulario.td_padron_tiposocio.value,document.formulario.td_padron_edad.value,\n\t\t\t document.formulario.td_padron_sexo.value,document.formulario.td_padron_identi.value,\n\t\t\t document.formulario.td_padron_docum.value,document.formulario.td_padron_calle.value,\n\t\t\t document.formulario.td_padron_nro.value,document.formulario.td_padron_piso.value,\n\t\t\t document.formulario.td_padron_depto.value,document.formulario.td_padron_casa.value,\n\t\t\t document.formulario.td_padron_mon.value,document.formulario.td_padron_barrio.value,\n\t\t\t document.formulario.td_padron_entre1.value,document.formulario.td_padron_entre2.value,\n\t\t\t document.formulario.td_padron_localidad.value,document.formulario.referencia.value,\n\t\t\t document.formulario.s_lista_zonas.value,document.formulario.i_busca_motivos.value,\n\t\t\t document.formulario.s_lista_colores.value,document.formulario.obs1.value,\n\t\t\t document.formulario.obs2.value,'.$G_legajo.' ,\n\t\t\t document.formulario.check_traslado.value , document.formulario.dia_traslado.value ,\n\t\t\t document.formulario.mes_traslado.value , document.formulario.anio_traslado.value ,\n\t\t\t document.formulario.hora_traslado.value , document.formulario.minuto_traslado.value ,\n\t\t\t\t\t '.$parametros_js.' \n \t );\"/> ';\n \n }else \n {\n $boton = '<input type=\"button\" value=\"CERRAR CON EXITO\" onclick=\"window.close();\"/>';\n \n\n\n\t // recupero id para hacer altas de clientes no apadronados\n\t $consulta_id = mysql_query ('select id from atenciones_temp\n\t where fecha = \"'.$_fecha.'\" and plan = \"'.$_plan.'\"\n\t and horallam = \"'.$_horallam.'\" and nombre = \"'.$_nombre.'\"\n\t and tiposocio = \"'.$_tiposocio.'\" and motivo1 = '.$moti_explode[0].'\n\t and motivo2 = '.$moti_explode[1]);\n\n\n\t $fetch_idatencion=mysql_fetch_array($consulta_id);\n\n\n\t\tif ($_bandera_nosocio1 == 1) { $insert_nosocio1 = mysql_query ('insert into clientes_nopadron (idatencion , nombre , edad , sexo , os , dni) values (\"'.$fetch_idatencion['id'].'\" , \"'.$_nosocio1.'\" , \"'.$_noedad1.'\" , \"'.$_nosexo1.'\" , \"'.$_noiden1.'\" , \"'.$_nodocum1.'\" ) '); }\n\t\tif ($_bandera_nosocio2 == 1) { $insert_nosocio2 = mysql_query ('insert into clientes_nopadron (idatencion , nombre , edad , sexo , os , dni) values (\"'.$fetch_idatencion['id'].'\" , \"'.$_nosocio2.'\" , \"'.$_noedad2.'\" , \"'.$_nosexo2.'\" , \"'.$_noiden2.'\" , \"'.$_nodocum2.'\" ) '); }\n\t\tif ($_bandera_nosocio3 == 1) { $insert_nosocio3 = mysql_query ('insert into clientes_nopadron (idatencion , nombre , edad , sexo , os , dni) values (\"'.$fetch_idatencion['id'].'\" , \"'.$_nosocio3.'\" , \"'.$_noedad3.'\" , \"'.$_nosexo3.'\" , \"'.$_noiden3.'\" , \"'.$_nodocum3.'\" ) '); }\n\t\tif ($_bandera_nosocio4 == 1) { $insert_nosocio4 = mysql_query ('insert into clientes_nopadron (idatencion , nombre , edad , sexo , os , dni) values (\"'.$fetch_idatencion['id'].'\" , \"'.$_nosocio4.'\" , \"'.$_noedad4.'\" , \"'.$_nosexo4.'\" , \"'.$_noiden4.'\" , \"'.$_nodocum4.'\" ) '); }\n\t\tif ($_bandera_nosocio5 == 1) { $insert_nosocio5 = mysql_query ('insert into clientes_nopadron (idatencion , nombre , edad , sexo , os , dni) values (\"'.$fetch_idatencion['id'].'\" , \"'.$_nosocio5.'\" , \"'.$_noedad5.'\" , \"'.$_nosexo5.'\" , \"'.$_noiden5.'\" , \"'.$_nodocum5.'\" ) '); }\n }\n // mysql_query($insert_atencion);\n $insert_atencion='';\n //$insert_atencion='';\n //instanciamos el objeto para generar la respuesta con ajax\n $respuesta = new xajaxResponse();\n //escribimos en la capa con id=\"respuesta\" el texto que aparece en $salida\n $respuesta->addAssign(\"mensaje_agrega\",\"innerHTML\",$boton);\n\n //tenemos que devolver la instanciaci�n del objeto xajaxResponse\n return $respuesta;\n}",
"public function isplata($iznos){\n\n $stanjesalimitom=$this->stanje+$this->limit;\n\n if($iznos<=$stanjesalimitom){\n // $novostanje=$stanjesalimitom-$iznos;\n //echo \"Vas iznos je isplacen<br>\";\n // echo \"Novo stanje na racunu je: \".$novostanje;\n if($iznos>$this->stanje){\n // ovde je kontrolno logika ako klijent ulazi u minus\n $zaduzenje=$iznos-$this->stanje;\n $this->limit-=$zaduzenje;\n $this->stanje=0;\n echo \"Vas iznos je isplacen<br>\";\n echo \"Usli ste u dozvoljeni minus, Vas limit iznosi jos: \".$this->limit;\n\n }else{\n // ako trazi manji iznos od stanja koje ima na racunu\n $this->stanje-=$iznos;\n echo \"Vas iznos je isplacen, novo stanje je: \".$this->stanje;\n }\n\n }else{\n echo \"Nemate dovoljno sredstava na racunu\";\n }\n\n\n\n}",
"function adivinarRecinto($array_A){\n $datos=new ManejoDatos();\n $arrayBD =$datos->getEstiloSexoPromedioRecinto();\n if($array_A[0]=='DIVERGENTE'){\n $estilo=4;\n }\n if($array_A[0]=='CONVERGENTE'){\n $estilo=3;\n }\n if($array_A[0]=='ACOMODADOR'){\n $estilo=2;\n }\n if($array_A[0]=='ASIMILADOR'){\n $estilo=1;\n }\n $arrayA = array( $estilo, $array_A[1],($array_A[2] == \"Masculino\" ? 1 : 2));\n foreach ($arrayBD as $elemento) {\n if($elemento['Estilo']=='DIVERGENTE'){\n $estiloBD=4;\n }\n if($elemento['Estilo']=='CONVERGENTE'){\n $estiloBD=3;\n }\n if($elemento['Estilo']=='ACOMODADOR'){\n $estiloBD=2;\n }\n if($elemento['Estilo']=='ASIMILADOR'){\n $estiloBD=1;\n }\n $arrayB = array($estiloBD, $elemento['Promedio'], $elemento['Sexo'] == \"M\" ? 1 : 2);\n $temporal = $this->distanciaEuclidiana($arrayA, $arrayB);\n if ($temporal < $this->distancia) {\n $this->distancia = $temporal;\n $this->temporal = $elemento['Recinto'];\n }\n }\n return $this->temporal;\n }",
"function niveles($area){\n\t\tif ($area->cveentidad2=='0') return 1;\n\t\tif ($area->cveentidad3=='0') return 2;\n\t\tif ($area->cveentidad4=='0') return 3;\n\t\tif ($area->cveentidad5=='0') return 4;\n\t\tif ($area->cveentidad6=='0') return 5;\n\t\tif ($area->cveentidad7=='0') return 6;\n\t}",
"function lancar_notas_aluno($id_federado){\n //pegar movimentos da faixa candidata\n $dados['aluno']= $this->coordenador->get_aluno_faixa($id_federado);\n \n \n $id_faixa = $dados['aluno']['0']['ordem']+1;\n \n $dados['movimentos'] = $this->coordenador->movimentos($id_faixa);\n $dados['ultimo_evento'] = $this->coordenador->get_ultimo_evento($id_federado);\n \n// $this->funcoes->imprimir($dados['movimentos']);\n $this->load->view('header');\n $this->load->view('/coordenador/lancar_notas_aluno',$dados);\n $this->load->view('footer');\n \n //preparar o prontuário com notas do aluno\n //inclui-lo automáticamente no evento de graduação\n \n }",
"function determinaFechosVazios()\n{\n\tglobal $mTransicoes, $lAlfabeto, $fechoVazio, $lEstados, $lTokens; \t\n\n\t//Variáveis\n\t$arrayEstados = NULL; //array com as diversas transições vazias de um mesmo estado\n\t$arrayEstados2 = NULL;\t\n\t$transConcatenadas = NULL; //array com a string inteira da transição, pode ter diversas transições vazias\n\n\techo \"------------------------------------<br>\";\n\techo \"Passo 1: Fechos dos estados<br>\";\n\t\n\tfor($i = 1; $i <= sizeof($lEstados); $i++) //determina o fecho para cada estado do autômato\n\t{ \n\t\t//echo \"Fecho de \".$lEstados[$i].\":<br>\";\n\t\t//echo \" Transicoes vazias: \".$mTransicoes[$lEstados[$i]][$lAlfabeto[0]].\"<br>\";\n\t\tif($mTransicoes[$lEstados[$i]][$lAlfabeto[0]] != '-') //mtransicoes[\"q0\"][\"e\"] != \"-\" \n\t\t{\n\t\t\t//echo \" Diferente de '-'<br>\";\n\t\t\t$fechoVazio[$lEstados[$i]][] = $lEstados[$i]; //coloca ele mesmo na lista //fechoVazio[\"q0\"][0] = \"q0'\n\t\t\t$lTokens = NULL; //limpa conteúdo de $lTokens\n\t\t\ttokeniza($mTransicoes[$lEstados[$i]][$lAlfabeto[0]]); //\"tokeniza\" vai deixar em $lTokens todos os estados de transição vazia\n\t\t\t$arrayEstados = $lTokens;\t\n\t\n\t\t\tfor($j = 0; $j < sizeof($arrayEstados); $j++)\n\t\t\t{\n\t\t\t\t//echo \" arrayEstados[$j] = \".$arrayEstados[$j].\"<br>\";\t\t\t\t\n\t\t\t\t//ve se o estado está no fecho, se não estiver coloca\n\t\t\t\tif(array_search($arrayEstados[$j], $fechoVazio[$lEstados[$i]]) == NULL \t\n\t\t\t\t\t\t\t\t&& $arrayEstados[$j] != '-'\n\t\t\t\t\t\t\t\t&& $arrayEstados[$j] != $fechoVazio[$lEstados[$i]][0])\t\n\t\t\t\t{ //o teste é igual a NULL, logo não achou o estado no fecho\n\t\t\t\t\t$fechoVazio[$lEstados[$i]][sizeof($fechoVazio[$lEstados[$i]])] = $arrayEstados[$j];\n\t\t\t\t\t//echo \" 1fechoVazio[$lEstados[$i]][\".sizeof($fechoVazio[$lEstados[$i]]).\"]: \".$arrayEstados[$j].\"<br>\";\n\t\t\t\t\t//agora precisamos ver as transições vazias do arrayEstados[$j]\n\t\t\t\t\t$lTokens = NULL; //limpa conteúdo de $lTokens\n\t\t\t\t\ttokeniza($mTransicoes[$arrayEstados[$j]][$lAlfabeto[0]]); \n\t\t\t\t\t$arrayEstados2 = NULL;\n\t\t\t\t\t$arrayEstados2 = $lTokens;\n\t\t\t\t\t//echo \" \";\t\n\t\t\t\t\t//echo \"transicao: \".$arrayEstados2[0].\"<br>\";\n\t\n\t\t\t\t\tfor($k = 0; $k < sizeof($arrayEstados2); $k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(array_search($arrayEstados2[$j], $fechoVazio[$lEstados[$i]]) == NULL \n\t\t\t\t\t\t\t\t\t\t&& $arrayEstados2[$j] != '-' \n\t\t\t\t\t\t\t\t\t\t&& $arrayEstados2[$j] != $fechoVazio[$lEstados[$i]][0])\t\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t$fechoVazio[$lEstados[$i]][sizeof($fechoVazio[$lEstados[$i]])] = $arrayEstados2[$k];\n\t\t\t\t\t\t\t//echo \" 2fechoVazio[$lEstados[$i]][\".sizeof($fechoVazio[$lEstados[$i]]).\"]: \".$arrayEstados2[$j].\"<br>\";\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} \t\n\t\t}\n\t\telse //estado sem transições vazias, logo o fecho vazio é vazio\n\t\t{\n\t\t\t$fechoVazio[$lEstados[$i]][] = $lEstados[$i]; //o fecho de um estado contém ele próprio sempre\n\t\t\t//echo \" Eh vazio, coloca so ele mesmo<br>\";\n\t\t}\n\t}\t\n\n\tfor($i = 1; $i <= sizeof($lEstados); $i++) //determina o fecho para cada estado do autômato\n\t{ \n\t\tsort($fechoVazio[$lEstados[$i]]);\n\t\techo $lEstados[$i].\": \";\n\t\tfor($j = 0; $j < sizeof($fechoVazio[$lEstados[$i]]); $j++)\n\t\t{\n\t\t\techo $fechoVazio[$lEstados[$i]][$j].\".\";\n\t\t}\n\t\techo \"<br>\";\n\t}\n\n\techo \"------------------------------------<br>\";\n\treturn;\n}",
"function getEstadisticaDetallado() {\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\t\tglobal $usr;\n\n\t\t# Variables para eventos especiales marcados por el cliente codigo 9.\n\t\t$event = new Event;\n\t\t$usr = new Usuario($current_usuario_id);\n\t\t$usr->__Usuario();\n\t\t$graficoSvg = new GraficoSVG();\n\n\n\t\t$timeZoneId = $usr->zona_horaria_id;\n\t\t$arrTime = Utiles::getNameZoneHor($timeZoneId); \t\t\n\t\t$timeZone = $arrTime[$timeZoneId];\n\t\t$tieneEvento = 'false';\n\t\t$arrayDateStart = array();\t\t\n\t\t$nameFunction = 'EstadisticaDet';\n\t\t$data = null;\n\t\t$ids = null;\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(($this->extra[\"imprimir\"])?REP_PATH_PRINTTEMPLATES:REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'comparativo_resumen.tpl');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TITULO_HORARIOS', 'bloque_titulo_horarios');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_MONITOR', 'es_primero_monitor');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_TOTAL', 'es_primero_total');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_PASOS', 'lista_pasos');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TABLA', 'bloque_tabla');\n\n\t\t$T->setVar('__item_orden', $this->extra[\"item_orden\"]);\n\t\t# Variables para mantenimiento.\n\t\t$T->setVar('__path_jquery_ui', REP_PATH_JQUERY_UI);\n\t\n\t\t$horarios = array($usr->getHorario($this->horario_id));\n\t\tif ($this->horario_id != 0) {\n\t\t\t$horarios[] = $usr->getHorario(0);\n\t\t}\n\n\t\t$orden = 1;\n\t\t$T->setVar('bloque_titulo_horarios', '');\n\t\tforeach ($horarios as $horario) {\n\n\t\t\t/* OBTENER LOS DATOS Y PARSEARLO */\n\t\t\t$sql = \"SELECT * FROM reporte.comparativo_resumen_parcial(\".\n\t\t\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\t\t\tpg_escape_string($this->objetivo_id).\", \".\n\t\t\t\t\tpg_escape_string($horario->horario_id).\",' \".\n\t\t\t\t\tpg_escape_string($this->timestamp->getInicioPeriodo()).\"', '\".\n\t\t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"')\";\n\t\t\t$res =& $mdb2->query($sql);\n// \t\t\tprint($sql);\n\t\t\tif (MDB2::isError($res)) {\n\t\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t$row = $res->fetchRow();\n\t\t\t$dom = new DomDocument();\n\t\t\t$dom->preserveWhiteSpace = false;\n\t\t\t$dom->loadXML($row[\"comparativo_resumen_parcial\"]);\n\t\t\t$xpath = new DOMXpath($dom);\n\t\t\tunset($row[\"comparativo_resumen_parcial\"]);\n\n\t\t\tif ($xpath->query('//detalle[@paso_orden]/estadisticas/estadistica')->length == 0) {\n\t\t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$conf_objetivo = $xpath->query('/atentus/resultados/propiedades/objetivos/objetivo')->item(0);\n\t\t\t$conf_pasos = $xpath->query(\"paso[@visible=1]\", $conf_objetivo);\n\t\t\t$conf_nodos = $xpath->query('//nodos/nodo');\n\n\t\t\tif(count($horarios) > 1) {\n\t\t\t\t$T->setVar('__item_horario', $this->extra[\"item_orden\"]);\n\t\t\t\t$T->setVar('__horario_orden', $orden);\n\t\t\t\t$T->setVar('__horario_nombre',$horario->nombre);\n\t\t\t\t$T->parse('bloque_titulo_horarios', 'BLOQUE_TITULO_HORARIOS', false);\n\t\t\t}\n\n\t\t\t\n\t\t\t# Obtención de los eventos especiales marcados por el cliente\n\t\t\tforeach ($xpath->query(\"/atentus/resultados/detalles_marcado/detalle/marcado\") as $tag_marcado) {\n\t\t\t$ids = $ids.','.$tag_marcado->getAttribute('mantenimiento_id');\n\t\t\t$marcado = true;\n\t\t\t}\t\t\n\t\t\t\n\t\t\t# Verifica que exista marcado evento cliente.\n\t\t\tif ($marcado == true) {\n\n\t\t\t\t$dataMant = $event->getData(substr($ids, 1), $timeZone);\n\t\t\t\t$character = array(\"{\", \"}\");\n\t\t\t\t$objetives = explode(',',str_replace($character,\"\",($dataMant[0]['objetivo_id'])));\n\t\t\t\t$tieneEvento = 'true';\n\t\t\t\t$encode = json_encode($dataMant);\n\t\t\t\t$nodoId = (string)0;\n\t\t\t\t$T->setVar('__tiene_evento', $tieneEvento);\n\t\t\t\t$T->setVar('__name', $nameFunction);\n\n\t\t\t}\n\n\t\t\t/* LISTA DE MONITORES */\n\t\t\t$linea = 1;\n\t\t\t$T->setVar('lista_pasos', '');\n\t\t\tforeach($conf_nodos as $conf_nodo) {\n\t\t\t\t$primero = true;\n\t\t\t\t$tag_nodo = $xpath->query('//detalle[@nodo_id='.$conf_nodo->getAttribute('nodo_id').']/estadisticas/estadistica')->item(0);\n\n\t\t\t\t/* LISTA DE PASOS */\n\t\t\t\tforeach($conf_pasos as $conf_paso) {\n\t\t\t\t\t$tag_dato = $xpath->query('//detalle[@nodo_id='.$conf_nodo->getAttribute('nodo_id').']/detalles/detalle[@paso_orden='.$conf_paso->getAttribute('paso_orden').']/estadisticas/estadistica')->item(0);\n\t\t\t\t\tif($tag_dato != null) {\n\t\t\t\t\t\t$T->setVar('__print_class', ($linea % 2 == 0)?\"celdaIteracion2\":\"celdaIteracion1\");\n\t\t\t\t\t\t$T->setVar('__class', ($linea % 2 == 0)?\"celdanegra15\":\"celdanegra10\");\n\n\t\t\t\t\t\t$T->setVar('es_primero_monitor', '');\n\t\t\t\t\t\t$T->setVar('es_primero_total', '');\n\t\t\t\t\t\tif ($primero) {\n\t\t\t\t\t\t\t$T->setVar('__monitor_nombre', $conf_nodo->getAttribute('nombre'));\n\t\t\t\t\t\t\t$T->setVar('__monitor_rowspan', $conf_pasos->length);\n\t\t\t\t\t\t\t$T->setVar('__monitor_total_monitoreo', $tag_nodo->getAttribute('cantidad'));\n\t\t\t\t\t\t\t$T->parse('es_primero_monitor', 'ES_PRIMERO_MONITOR', false);\n\t\t\t\t\t\t\t$T->parse('es_primero_total', 'ES_PRIMERO_TOTAL', false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$T->setVar('__paso_nombre', $conf_paso->getAttribute(\"nombre\"));\n\t\t\t\t\t\t$T->setVar('__paso_minimo', number_format($tag_dato->getAttribute('tiempo_min'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_maximo', number_format($tag_dato->getAttribute('tiempo_max'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_promedio', number_format($tag_dato->getAttribute('tiempo_prom'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_uptime', number_format($tag_dato->getAttribute('uptime'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_downtime', number_format($tag_dato->getAttribute('downtime'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_no_monitoreo', number_format($tag_dato->getAttribute('sin_monitoreo'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_evento_especial', number_format($tag_dato->getAttribute('marcado_cliente'), 3, ',', ''));\n\n\t\t\t\t\t\t$T->parse('lista_pasos', 'LISTA_PASOS', true);\n\t\t\t\t\t\t$primero = false;\n\t\t\t\t\t\t$linea++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$T->parse('bloque_tabla', 'BLOQUE_TABLA', true);\n\t\t\t$orden++;\n\t\t}\n\t\t$this->tiempo_expiracion = (strtotime($xpath->query(\"//fecha_expiracion\")->item(0)->nodeValue) - strtotime($xpath->query(\"//fecha\")->item(0)->nodeValue));\n\t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n\n\t\t# Agrega el acordeon cuando existan eventos.\n\t\tif (count($dataMant)>0){\n\t\t\t$this->resultado.= $graficoSvg->getAccordion($encode,$nameFunction);\n\t\t}\n\t\treturn $this->resultado;\n\t}",
"function control_suplente($desde,$hasta,$id_desig_suplente){\n //busco todas las licencias de la designacion que ingresa\n //novedades vigentes en el periodo\n $anio=date(\"Y\", strtotime($desde)); \n $pdia = dt_mocovi_periodo_presupuestario::primer_dia_periodo_anio($anio);\n $udia = dt_mocovi_periodo_presupuestario::ultimo_dia_periodo_anio($anio);\n $sql=\"SELECT distinct t_n.desde,t_n.hasta \n FROM novedad t_n\n WHERE t_n.id_designacion=$id_desig_suplente\n and t_n.tipo_nov in (2,3,5)\n and t_n.desde<='\".$udia.\"' and t_n.hasta>='\".$pdia.\"'\"\n . \" ORDER BY t_n.desde,t_n.hasta\"; \n $licencias=toba::db('designa')->consultar($sql);\n $i=0;$seguir=true;$long=count($licencias);$primera=true;\n while(($i<$long) and $seguir){\n if($primera){\n $a=$licencias[$i]['desde'];\n $b=$licencias[$i]['hasta'];\n $primera=false;\n }else{\n if($desde>=$licencias[$i]['desde']){\n $a=$licencias[$i]['desde'];\n $b=$licencias[$i]['hasta'];\n }\n if($hasta<=$licencias[$i]['hasta']){\n $seguir=false;\n }\n \n if(($licencias[$i]['desde']==date(\"Y-m-d\",strtotime($b.\"+ 1 days\"))) or ($licencias[$i]['desde']==$b)){\n $b=$licencias[$i]['hasta'];\n }\n }\n $i++;\n }\n if($long>0){\n if($desde>=$a and $hasta<=$b){\n return true;\n }else{\n return false;\n }\n }else{//no tiene novedades\n return false;\n }\n\n// $sql=\"select * from designacion t_d\"\n// . \" INNER JOIN novedad t_n ON (t_d.id_designacion=t_n.id_designacion and t_n.tipo_nov in (2,3,5) )\"\n// . \" where t_d.id_designacion=$id_desig_suplente\"\n// . \" and '\".$desde.\"'>=t_n.desde and '\".$hasta.\"'<=t_n.hasta\";\n// $res=toba::db('designa')->consultar($sql);\n// if(count($res)>0){\n// return true;\n// }else{\n// return false;\n// }\n }",
"function estadoTransicao($estadoAtual,$topoDaPilha, $i,$funcaoTransicao ,$quantidadeT){\n for($j=0;$j<$quantidadeT;$j++){\n if(($funcaoTransicao[$j][0]==$estadoAtual)&&($funcaoTransicao[$j][1]==$i)&&($funcaoTransicao[$j][2]==$topoDaPilha)){ \n $aux[0]=$funcaoTransicao[$j][3]; \n $aux[1]=$funcaoTransicao[$j][4];\n return $aux; \n } \n } \n }",
"public function ruta_critica()\n {\n $this->tpi_mas_dij();\n $this->tp_j();\n $this->ttj_menos_dij();\n $this->tt_i();\n\n // Identificaión de las actividades de la ruta crítica\n $this->identificacion();\n // TT¡ (2) = TP¡ (0)\n // TTj (3) = TPj (1)\n // TTj (3) - TT¡ (2) = TPj (1) - TP¡ (0) = d¡j\n $ruta_critica = [[]];\n $num_act = -1;\n $this->tablero->imprimir(false);\n for ($m = 0; $m < $this->d->_m; $m++) {\n for ($n = 0; $n < $this->d->_n; $n++) {\n if ($this->d->_datos[$m][$n] >= 0 && $n < $this->d->_n) {\n $num_act++;\n $ruta_critica[$num_act][0] = 0;\n if ($this->tablero->_datos[$num_act][3] !== $this->tablero->_datos[$num_act][1]) continue;\n if ($this->tablero->_datos[$num_act][4] !== $this->tablero->_datos[$num_act][2]) continue;\n if ($this->tablero->_datos[$num_act][4] - $this->tablero->_datos[$num_act][3] !== $this->d->_datos[$m][$n]) continue;\n if ($this->tablero->_datos[$num_act][2] - $this->tablero->_datos[$num_act][1] !== $this->d->_datos[$m][$n]) continue;\n //echo \"num: $num_act: \" . $this->tablero->_datos[$num_act][0] . ' ' . $this->tablero->_datos[$num_act][1] . ' '. $this->tablero->_datos[$num_act][2] . ' ' . $this->tablero->_datos[$num_act][3] . '<br>';\n //echo \"num: $num_act<br>\" ;\n $ruta_critica[$num_act][0] = 1;\n }\n }\n }\n $tablero_index = new Matriz([\n ['ACT','TPi', 'TPj', 'TTi', 'TTj', 'dij', 'ITij', 'FPij', 'HTij', 'HLij']\n ]);\n $RC = new Matriz($ruta_critica);\n $RC->imprimir(true);\n $tablero_index->imprimir(true);\n\n }",
"function revisaNuevo($data2, $compra, $inve){\n foreach ($data2 as $min1) {\n $art=$min1->CVE_ART;\n $mov=$min1->NUM_MOV;\n $this->query=\"SELECT count(num_mov) as movimientos FROM MINVE06 WHERE CVE_ART = '$art' and num_mov < $mov \";\n $res=$this->EjecutaQuerySimple();\n $rowM=ibase_fetch_object($res);\n $movs=$rowM->MOVIMIENTOS;\n if($movs == 0){\n $this->query=\"UPDATE MINVE06 SET COSTO_PROM_INI = 0, COSTO_PROM_fin = 0 WHERE NUM_MOV = $mov\";\n $this->queryActualiza();\n }\n\n $this->query=\"SELECT first 1 * FROM MINVE06 WHERE REFER = '$compra' \n AND CVE_ART = '$inve' \n and costeado_ff is null \n ORDER BY NUM_MOV ASC \";\n $res=$this->EjecutaQuerySimple();\n while ($tsarray=ibase_fetch_object($res)){\n $data3[]=$tsarray;\n }\n }\n return $data3;\n }",
"function ejecutarClasificacionEstudiantes($proyecto){\n $this->codProyecto=$proyecto;\n //buscamos estudiantes en prueba academica\n $estudiantes_clasificados = $this->consultarEstudiantesPruebaAcademica();\n //buscamos estudiantes que no estan en prueba academica\n $estudiantes = $this->consultarEstudiantesSinPrueba();\n //buscamos estudiantes con 1 y 2 espacios reprobados\n $resultado = $this->buscarEstudiantesConEspaciosReprobados($estudiantes, $estudiantes_clasificados);\n $estudiantes = $resultado['ESTUDIANTES'];\n $estudiantes_clasificados = $resultado['CLASIFICADOS'];\n unset($resultado);\n //buscamos estudiantes nivelados (sin ningun espacio reprobado)\n $resultado_nivelados = $this->buscarEstudiantesNivelados($estudiantes, $estudiantes_clasificados);\n $estudiantes = $resultado_nivelados['ESTUDIANTES'];\n $estudiantes_clasificados = $resultado_nivelados['CLASIFICADOS'];\n //buscamos estudiantes que no reprobaron el semestre anterior\n $resultado_semAnterior = $this->buscarEstudiantesSinEspaciosReprobadosSemAnterior($estudiantes, $estudiantes_clasificados);\n $resultadoFinal=$this->clasificarOtrosEstudiantes($resultado_semAnterior);\n //ordenar arreglo de estudiantes clasificados\n if(is_array($resultadoFinal)&&!empty($resultadoFinal))\n {\n $estudiantes_clasificados_final= $this->ordenarEstudiantesClasificados($resultadoFinal);\n $insercion = $this->insertarEstudiantesClasificados($estudiantes_clasificados_final);\n }else\n {\n $insercion=0;\n }\n return $insercion ;\n }",
"function enviarAlertasPQR($detalle, $numero) {\n\t\t$user = $this->session->userdata('id');\n\t\t$date = date(\"Y-m-d H:i:s\");\n\n\t\t$update = \"UPDATE Alerta SET Estado = 'C', Ejecutada = '$date' WHERE Tipo = 'PQ' AND Numero = '$numero'\";\n\t\t$this->db->query($update);\t\t\n\n\t\t$sql = \"INSERT INTO Alerta (UsuarioId, AsignadoA, Descripcion, Creada, Programada, Tipo, Estado, Numero)\n\t\tSELECT '$user', S.usuarioId, '$detalle', '$date', '$date', 'PQ', '', '$numero'\n\t\tFROM Segur S \n\t\t\tINNER JOIN PermisoSistema PS ON S.usuarioId = PS.UsuarioId OR S.perfilId = PS.PerfilId\n\t\tWHERE PS.Permiso = '3'\";\n\t\t$this->db->query($sql);\n\n\t\tif ($this->db->trans_status() === FALSE) {\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn 1;\n\t\t}\n\t}",
"public function getEtapasNaEscola() {\n\n $aEtapas = array();\n $oDaoCensoEtapas = db_utils::getDao(\"censoetapamodal\");\n $sCamposEtapasNaEscola = \"ed273_i_sequencia as codigo, \";\n $sCamposEtapasNaEscola .= \"ed273_i_codigo as codigo_Seq, \";\n $sCamposEtapasNaEscola .= \"ed273_i_modalidade as modalidade, \";\n $sCamposEtapasNaEscola .= \"ed273_c_etapa \";\n\n $sSqlEtapaModal = $oDaoCensoEtapas->sql_query(\"\", $sCamposEtapasNaEscola, \"ed273_i_sequencia\", \"\");\n $rsEtapaNaEscola = $oDaoCensoEtapas->sql_record($sSqlEtapaModal);\n $aEtapas = db_utils::getCollectionByRecord($rsEtapaNaEscola);\n $oDaoMatricula = db_utils::getDao(\"matricula\");\n foreach ($aEtapas as $oEtapa) {\n\n $sCamposModalidade = \" serie.ed11_i_codcenso as codigoetapa\";\n $oEtapa->etapa_na_escola = '0';\n $sWhereModalidade = \" turma.ed57_i_escola = {$this->iCodigoEscola} \";\n $sWhereModalidade .= \" AND calendario.ed52_i_ano = {$this->iAnoCenso}\";\n $sWhereModalidade .= \" AND ed60_c_situacao = 'MATRICULADO' \";\n $sWhereModalidade .= \" AND serie.ed11_i_codcenso in ({$oEtapa->ed273_c_etapa}) \";\n $sWhereModalidade .= \" AND ensino.ed10_i_tipoensino = {$oEtapa->modalidade}\";\n $sWhereModalidade .= \" AND ed60_d_datamatricula <= '{$this->dtBaseCenso}'\";\n $sSqlModalidade = $oDaoMatricula->sql_query(\"\", $sCamposModalidade, \"\", $sWhereModalidade);\n\n $rsModalidades = $oDaoMatricula->sql_record($sSqlModalidade);\n if ($oDaoMatricula->numrows > 0) {\n $oEtapa->etapa_na_escola = 1;\n }\n }\n return $aEtapas;\n }"
] |
[
"0.5842609",
"0.5792825",
"0.5772958",
"0.5714024",
"0.56945866",
"0.5633353",
"0.56112605",
"0.5595235",
"0.55952233",
"0.5589802",
"0.55895865",
"0.55723524",
"0.54913455",
"0.54910886",
"0.5480824",
"0.54762816",
"0.54687244",
"0.5453698",
"0.54370755",
"0.5427629",
"0.54160213",
"0.5409903",
"0.5404178",
"0.53705406",
"0.5362319",
"0.53599006",
"0.53587323",
"0.5358584",
"0.5335063",
"0.5322235"
] |
0.64288074
|
0
|
Funcion que busca los estudiantes que no reprobaron EA en el semestre anterior
|
function buscarEstudiantesSinEspaciosReprobadosSemAnterior($estudiantes,$estudiantes_clasificados){
if(!is_array($estudiantes_clasificados)){
$estudiantes_clasificados= array();
}
if(count($estudiantes)>0)
{
foreach ($estudiantes as $key => $arreglo_estudiante)
{
$cantidad_reprobados = 0;
$espacios_por_cursar = json_decode($arreglo_estudiante['ESPACIOS_POR_CURSAR'],true);
$cantidad_reprobados = $this->contarReprobados($espacios_por_cursar);
if($cantidad_reprobados==0)
{
$resultado = array( 'COD_ESTUDIANTE'=>$arreglo_estudiante['COD_ESTUDIANTE'],
'COD_PROYECTO'=>$arreglo_estudiante['COD_PROYECTO'],
'CLASIFICACION'=>'2',
'TIPO'=>$arreglo_estudiante['TIPO']
);
$estudiantes_clasificados[] = $resultado;
unset($estudiantes[$key]);
}
}
}
$resultado = array( 'ESTUDIANTES'=>$estudiantes,
'CLASIFICADOS'=>$estudiantes_clasificados);
return $resultado;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function findPagoDetalleActividadEconomica()\r\n\t\t{\r\n\t\t\t$codigoPresupuestario = self::getCodigoPresupuestarioActividadEconomica();\r\n\r\n\t\t\t$registers = [];\r\n\t\t\t// Pagos con periodos mayores a cero\r\n\t\t\t$registers = self::findPagoDetallePeriodoMayorCero($codigoPresupuestario, [1]);\r\n\t\t\tif ( !self::guardarConsultaRecaudacion($registers) ) {\r\n\t\t\t\tself::errorCargarData(Yii::t('backend', 'Actividad Economica periodo mayores a cero'));\r\n\t\t\t}\r\n\r\n\t\t\t$registers = [];\r\n\t\t\t// Pagos con periodos iguales a cero\r\n\t\t\t$registers = self::findPagoDetallePeriodoIgualCero($codigoPresupuestario, [1]);\r\n\t\t\tif ( !self::guardarConsultaRecaudacion($registers) ) {\r\n\t\t\t\tself::errorCargarData(Yii::t('backend', 'Actividad Economica periodo iguales a cero'));\r\n\t\t\t}\r\n\r\n\t\t}",
"function buscarEspaciosReprobados($notaAprobatoria) {\r\n \r\n $reprobados=isset($reprobados)?$reprobados:'';\r\n $espacios=isset($reprobados)?$reprobados:'';\r\n \r\n if (is_array($this->espaciosCursados)){\r\n foreach ($this->espaciosCursados as $value) {\r\n if (isset($value['NOTA'])&&($value['NOTA']<$notaAprobatoria||$value['CODIGO_OBSERVACION']==20||$value['CODIGO_OBSERVACION']==23||$value['CODIGO_OBSERVACION']==25)){\r\n if ($value['CODIGO_OBSERVACION']==19||$value['CODIGO_OBSERVACION']==22||$value['CODIGO_OBSERVACION']==24)\r\n {\r\n }else\r\n {\r\n $espacios[]=$value['CODIGO'];\r\n }\r\n }\r\n }\r\n if(is_array($espacios)){\r\n \r\n $espacios= array_unique($espacios);\r\n if($this->datosEstudiante['IND_CRED']=='S'){\r\n \r\n foreach ($espacios as $key => $espacio) {\r\n foreach ($this->espaciosCursados as $cursado) {\r\n if($espacio==$cursado['CODIGO']){\r\n $reprobados[$key]['CODIGO']=$cursado['CODIGO'];\r\n $reprobados[$key]['CREDITOS']=(isset($cursado['CREDITOS'])?$cursado['CREDITOS']:0);\r\n }\r\n }\r\n\r\n }\r\n }else{\r\n $reprobados=$espacios;\r\n }\r\n return $reprobados; \r\n \r\n }else{\r\n return 0; \r\n }\r\n \r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n }",
"function buscarEstudiantesConEspaciosReprobados($estudiantes,$estudiantes_clasificados){\n if(count($estudiantes)>0){\n foreach ($estudiantes as $key => $arreglo_estudiante) {\n $cantidad_reprobados = 0;\n \n\n $espacios_por_cursar = json_decode($arreglo_estudiante['ESPACIOS_POR_CURSAR'],true);\n $cantidad_reprobados = $this->contarReprobados($espacios_por_cursar);\n switch($cantidad_reprobados){\n case 1:\n $resultado = array( 'COD_ESTUDIANTE'=>$arreglo_estudiante['COD_ESTUDIANTE'],\n 'COD_PROYECTO'=>$arreglo_estudiante['COD_PROYECTO'],\n 'CLASIFICACION'=>'4',\n 'TIPO'=>$arreglo_estudiante['TIPO']\n );\n $estudiantes_clasificados[] = $resultado;\n unset($estudiantes[$key]);\n break;\n case 2:\n $resultado = array( 'COD_ESTUDIANTE'=>$arreglo_estudiante['COD_ESTUDIANTE'],\n 'COD_PROYECTO'=>$arreglo_estudiante['COD_PROYECTO'],\n 'CLASIFICACION'=>'5',\n 'TIPO'=>$arreglo_estudiante['TIPO']\n );\n $estudiantes_clasificados[] = $resultado;\n unset($estudiantes[$key]);\n break;\n case 3:\n $resultado = array( 'COD_ESTUDIANTE'=>$arreglo_estudiante['COD_ESTUDIANTE'],\n 'COD_PROYECTO'=>$arreglo_estudiante['COD_PROYECTO'],\n 'CLASIFICACION'=>'6',\n 'TIPO'=>$arreglo_estudiante['TIPO']\n );\n $estudiantes_clasificados[] = $resultado;\n unset($estudiantes[$key]);\n break;\n default:\n if($cantidad_reprobados>3){\n $resultado = array( 'COD_ESTUDIANTE'=>$arreglo_estudiante['COD_ESTUDIANTE'],\n 'COD_PROYECTO'=>$arreglo_estudiante['COD_PROYECTO'],\n 'CLASIFICACION'=>'7',\n 'TIPO'=>$arreglo_estudiante['TIPO']\n );\n $estudiantes_clasificados[] = $resultado;\n unset($estudiantes[$key]);\n }\n break;\n\n }\n }\n }\n $resultado = array( 'ESTUDIANTES'=>$estudiantes,\n 'CLASIFICADOS'=>$estudiantes_clasificados);\n return $resultado;\n }",
"function calcularSemestreEspacioMasAtrasado() {\r\n if (is_array($this->espaciosPlan))\r\n {\r\n if(is_array($this->espaciosAprobados)){\r\n foreach ($this->espaciosPlan as $key => $espaciosPlan) {\r\n foreach ($this->espaciosAprobados as $key2 => $espaciosAprobados) {\r\n if ($espaciosPlan==$espaciosAprobados)\r\n unset ($this->espaciosPlan[$key]);\r\n }\r\n }\r\n }\r\n }else{\r\n $this->mensaje[$this->datosEstudiante['CODIGO']][]=\"No existen espacios registrados en el plan de estudios del estudiante\";\r\n\r\n }\r\n return $this->espaciosPlan[0]['SEMESTRE'];\r\n }",
"function buscarEspaciosVistos(){\r\n $i=0;\r\n $espacios_vistos=isset($espacios_vistos)?$espacios_vistos:'';\r\n $espacios=isset($reprobados)?$reprobados:'';\r\n \r\n if(is_array($this->espaciosCursados)){\r\n foreach ($this->espaciosCursados as $espacio) {\r\n $espacios[$i]=$espacio[0];\r\n $i++;\r\n }\r\n }\r\n \r\n if(is_array($espacios)){\r\n $espacios= array_unique($espacios);\r\n if($this->datosEstudiante['IND_CRED']=='S'){\r\n foreach ($espacios as $key => $espacio) {\r\n foreach ($this->espaciosCursados as $cursado) {\r\n if($espacio==$cursado['CODIGO']){\r\n $espacios_vistos[$key]['CODIGO']=$cursado['CODIGO'];\r\n $espacios_vistos[$key]['CREDITOS']=(isset($cursado['CREDITOS'])?$cursado['CREDITOS']:0);\r\n }\r\n }\r\n }\r\n }else{\r\n $espacios_vistos=$espacios;\r\n }\r\n \r\n }\r\n return $espacios_vistos;\r\n }",
"function reprocesos($anho, $mes, $razon_reproceso)\r\n\t{\r\n\t\t$dia = date('d');\r\n\t\t$total_t = 0;\r\n\t\t$total_tr = 0;\r\n\t\t$total_tt = 0;\r\n\t\t$pedidos = array();\r\n\t\tif($mes == 'anual')\r\n\t\t{\r\n\t\t\t$fecha1 = $anho.'-01-01';\r\n\t\t\t$fecha2 = $anho.'-12-01';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$fecha1 = $anho.'-'.$mes.'-01';\r\n\t\t\t$fecha2 = $anho.'-'.$mes.'-31';\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t$SQL = '';\r\n\t\t$tabla = '';\r\n\t\t\r\n\t\tif(strtotime('2013-06-20') < strtotime($anho.'-'.$mes.'-'.$dia))\r\n\t\t{\r\n\t\t\tif('todos' != $razon_reproceso)\r\n\t\t\t{\r\n\t\t\t\t$tabla = ' ,reproceso_detalle reproc ';\r\n\t\t\t\t$SQL .= 'and ped.id_repro_deta = reproc.id_repro_deta';\r\n\t\t\t\t$SQL .= ' and reproc.id_repro_deta = \"'.$razon_reproceso.'\"';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//Buscar clientes que poseen reprocesos\r\n\t\t$Consulta = '\r\n\t\t\t\t\t\t\tselect distinct proc.id_cliente, codigo_cliente\r\n\t\t\t\t\t\t\tfrom procesos proc, pedido ped, cliente cli '.$tabla.'\r\n\t\t\t\t\t\t\twhere proc.id_proceso = ped.id_proceso\r\n\t\t\t\t\t\t\t\tand cli.id_cliente = proc.id_cliente\r\n\t\t\t\t\t\t\t\tand ped.fecha_entrega >= \"'.$fecha1.'\"\r\n\t\t\t\t\t\t\t\tand ped.fecha_entrega <= \"'.$fecha2.'\"\r\n\t\t\t\t\t\t\t\tand ped.id_tipo_trabajo = \"4\"\r\n\t\t\t\t\t\t\t\t'.$SQL.'\r\n\t\t\t\t\t\t\t\tand cli.id_grupo = \"'.$this->session->userdata('id_grupo').'\"\r\n\t\t\t\t\t\t\torder by id_cliente\r\n\t\t\t\t\t\t\t';\r\n\t\t\r\n\t\t$Resultado= $this->db->query($Consulta);\r\n\t\t$Info = $Resultado->result_array();\r\n\t\t\r\n\t\tforeach($Info as $Datos)\r\n\t\t{\r\n\t\t\t$pedidos[$Datos['id_cliente']]['id_cliente'] = $Datos['id_cliente'];\r\n\t\t\t$pedidos[$Datos['id_cliente']]['codigo_cliente'] = $Datos['codigo_cliente'];\r\n\r\n\t\t\t//Buscar reprocesos por cliente\r\n\t\t\t$Consulta2 = '\r\n\t\t\t\t\t\t\t\t\tselect count(id_cliente) as total\r\n\t\t\t\t\t\t\t\t\tfrom procesos proc, pedido ped '.$tabla.'\r\n\t\t\t\t\t\t\t\t\twhere proc.id_proceso = ped.id_proceso\r\n\t\t\t\t\t\t\t\t\tand ped.fecha_entrega >= \"'.$fecha1.'\"\r\n\t\t\t\t\t\t\t\t\tand ped.fecha_entrega <= \"'.$fecha2.'\"\r\n\t\t\t\t\t\t\t\t\tand ped.id_tipo_trabajo = \"4\"\r\n\t\t\t\t\t\t\t\t\t'.$SQL.'\r\n\t\t\t\t\t\t\t\t\tand id_cliente = \"'.$Datos['id_cliente'].'\"\r\n\t\t\t\t\t\t\t\t\torder by id_cliente';\r\n\t\t\t\r\n\t\t\t$Resultado2 = $this->db->query($Consulta2);\r\n\t\t\t$Info2 = $Resultado2->result_array();\r\n\t\t\tforeach($Info2 as $Datos2)\r\n\t\t\t{\r\n\t\t\t\t$total_r = $Datos2[\"total\"];\r\n\t\t\t\t$total_tt += $total_r;\r\n\t\t\t\t$pedidos[$Datos['id_cliente']]['total_reprocesos'] = $total_r;\r\n\t\t\t\t$pedidos[$Datos['id_cliente']]['num_reprocesos'] = $total_tt;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Total pedidos del cliente en el rango de fecha\r\n\t\t\t$Consulta3 = 'select count(id_cliente) as total_a\r\n\t\t\t\t\t\t\t\t\tfrom procesos proc, pedido ped\r\n\t\t\t\t\t\t\t\t\twhere proc.id_proceso = ped.id_proceso\r\n\t\t\t\t\t\t\t\t\tand ped.fecha_entrega >= \"'.$fecha1.'\"\r\n\t\t\t\t\t\t\t\t\tand ped.fecha_entrega <= \"'.$fecha2.'\"\r\n\t\t\t\t\t\t\t\t\tand id_cliente = \"'.$Datos['id_cliente'].'\"\r\n\t\t\t\t\t\t\t\t\torder by id_cliente';\r\n\t\t\t\r\n\t\t\t$Resultado3 = $this->db->query($Consulta3);\r\n\t\t\t$Info3 = $Resultado3->result_array();\r\n\t\t\tforeach($Info3 as $Datos3)\r\n\t\t\t{\r\n\t\t\t\t$total_t = $Datos3[\"total_a\"];\r\n\t\t\t\t$total_tr = $total_tr + $total_t;\r\n\t\t\t\t$porc = ($total_r * 100) / $total_t;\r\n\t\t\t\t$porc = round($porc * 100) / 100;\r\n\t\t\t\t$pedidos[$Datos['id_cliente']]['total_pedidos'] = $total_t;\r\n\t\t\t\t$pedidos[$Datos['id_cliente']]['porcentaje'] = $porc;\r\n\t\t\t\t$pedidos[$Datos['id_cliente']]['total_trabajos'] = $total_tr;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $pedidos;\r\n\t}",
"function buscarEstudiantesNivelados($estudiantes,$estudiantes_clasificados){\n \n $k=0;\n\tunset ($this->notas);\n $this->notas = $this->obtenerNotas();\n if(count($estudiantes)>0)\n {\n foreach ($estudiantes as $key => $estudiante) {\n //buscamos las notas\n $reprobados = 0;\n $notas_estudiante = array();\n $notas_estudiante = $this->obtenerNotasEstudiante($estudiante['COD_ESTUDIANTE']);\n $reprobados = $this->verificarReprobados($notas_estudiante);\n unset($notas_estudiante);\n if($reprobados==0){\n $resultado = array( 'COD_ESTUDIANTE'=>$estudiante['COD_ESTUDIANTE'],\n 'COD_PROYECTO'=>$estudiante['COD_PROYECTO'],\n 'CLASIFICACION'=>'1',\n 'TIPO'=>$estudiante['TIPO']\n );\n $estudiantes_clasificados[] = $resultado;\n unset($estudiantes[$key]);\n }\n }\n }\n $resultado = array( 'ESTUDIANTES'=>$estudiantes,\n 'CLASIFICADOS'=>$estudiantes_clasificados);\n return $resultado;\n }",
"function revisaNuevo($data2, $compra, $inve){\n foreach ($data2 as $min1) {\n $art=$min1->CVE_ART;\n $mov=$min1->NUM_MOV;\n $this->query=\"SELECT count(num_mov) as movimientos FROM MINVE06 WHERE CVE_ART = '$art' and num_mov < $mov \";\n $res=$this->EjecutaQuerySimple();\n $rowM=ibase_fetch_object($res);\n $movs=$rowM->MOVIMIENTOS;\n if($movs == 0){\n $this->query=\"UPDATE MINVE06 SET COSTO_PROM_INI = 0, COSTO_PROM_fin = 0 WHERE NUM_MOV = $mov\";\n $this->queryActualiza();\n }\n\n $this->query=\"SELECT first 1 * FROM MINVE06 WHERE REFER = '$compra' \n AND CVE_ART = '$inve' \n and costeado_ff is null \n ORDER BY NUM_MOV ASC \";\n $res=$this->EjecutaQuerySimple();\n while ($tsarray=ibase_fetch_object($res)){\n $data3[]=$tsarray;\n }\n }\n return $data3;\n }",
"function calcular_espacios_disponibles ($aula, $espacios){\n \n \n //creo un arreglo con todos los horarios de cursado por dia\n $horarios=$this->crear_horarios();\n $longitud=count($horarios);\n foreach ($espacios as $clave=>$espacio){\n $indice=0; //debe ir ahi porque el arreglo no esta ordenado\n $fin=FALSE;\n while(($indice < $longitud) && !$fin){\n \n if(strcmp(($horarios[$indice][0]), ($espacio['hora_inicio'])) == 0){\n// print_r(strcmp(($horarios[$indice][0]), ($espacio['hora_inicio'])));\n\n \n //para que el arreglo horarios pueda ser modificado en la rutina eliminar_horarios\n //hay que realizar un pasaje de parametros por referencia (&horarios)\n $this->eliminar_horario(&$horarios, $indice, $longitud, $espacio['hora_fin']);\n \n $fin=TRUE;\n \n //para volver a recorrer todo el arreglo de nuevo en la proxima iteracion.\n //Evita conflictos si el arreglo no esta ordenado.\n $indice=0;\n }\n else{\n $indice += 1;\n }\n }\n }\n return $horarios;\n }",
"public function otorgarPrestamo(){\n $fecha = date('d-m-y');\n $this->setFechaOtorgado($fecha);\n $cantidadCuotas = $this->getCantidadCuotas();\n $monto = $this->getMonto();\n $colObjCuota = array();\n for($i=0; $i<$cantidadCuotas; $i++){\n $montoCuota = $monto / $cantidadCuotas;\n $montoInteres = $this->calcularInteresPrestamo($i);\n $colObjCuota[$i] = new Cuota($i, $montoCuota, $montoInteres);\n }\n $this->setColObjCuota($colObjCuota);\n }",
"private function verificarConflictoFechas($dni,$fecha_ae,bool $finalizado){\n $q = DB::table('ae_datos as aed')->select('aee.*')\n ->join('ae_estado as aee','aee.id_autoexcluido','=','aed.id_autoexcluido')\n ->whereNull('aed.deleted_at')->whereNull('aee.deleted_at')\n ->where('aed.nro_dni','=',$dni);\n \n /*\n Agarra dos casos (el de abajo es el que se agregaria)\n \n fecha_ae fecha_cierre_ae\n ┌──────────────────────────────────────────────┐\n │ │\n │ │\n └──────────────────────────────────────────────┘\n $fecha_ae\n fecha_ae fecha_cierre_ae\n ┌──────────────────────────────────────────────┐\n │ │\n │ │\n └──────────────────────┘\n $fecha_ae\n */\n $dentro_algun_completo = (clone $q)->whereNull('aee.fecha_revocacion_ae')\n ->where('aee.fecha_ae','<=',$fecha_ae)->where('aee.fecha_cierre_ae','>=',$fecha_ae)\n ->count() > 0;\n if($dentro_algun_completo) return 1;\n \n /*\n Agarra dos casos (el de abajo es el que se agregaria)\n \n fecha_ae fecha_vencimiento\n ┌──────────────────────┐\n │ │\n │ │\n └──────────────────────────────────────────────┘\n $fecha_ae\n fecha_ae fecha_vencimiento\n ┌──────────────────────┐\n │ │\n │ │\n └──────────────────────┘\n $fecha_ae\n */\n $dentro_algun_finalizado = (clone $q)->whereNotNull('aee.fecha_revocacion_ae')\n ->where('aee.fecha_ae','<=',$fecha_ae)->where('aee.fecha_vencimiento','>=',$fecha_ae)\n ->count() > 0;\n if($dentro_algun_finalizado) return 2;\n \n $fecha_fin = null;\n {\n $fechas = AutoexclusionController::getInstancia(false)->generarFechas($fecha_ae);\n if($finalizado) $fecha_fin = $fechas->fecha_vencimiento;\n else $fecha_fin = $fechas->fecha_cierre_ae;\n }\n \n /*\n Agarra dos casos (el de abajo es el que se agregaria)\n fecha_ae fecha_cierre_ae\n ┌──────────────────────────────────────────────┐\n │ │\n │ │\n └──────────────────────┘\n $fecha_fin\n fecha_ae fecha_cierre_ae\n ┌──────────────────────────────────────────────┐\n │ │\n │ │\n └──────────────────────────────────────────────┘\n $fecha_fin\n */\n $se_extiende_dentro_de_alguno_ya_existente_completo = (clone $q)->whereNull('aee.fecha_revocacion_ae')\n ->where('aee.fecha_ae','<=',$fecha_fin)->where('aee.fecha_cierre_ae','>=',$fecha_fin)\n ->count() > 0;\n if($se_extiende_dentro_de_alguno_ya_existente_completo) return 3;\n \n /*\n Agarra dos casos (el de abajo es el que se agregaria)\n fecha_ae fecha_vencimiento\n ┌──────────────────────┐\n │ │\n │ │\n └──────────────────────┘\n $fecha_fin\n fecha_ae fecha_vencimiento\n ┌──────────────────────┐\n │ │\n │ │\n └──────────────────────────────────────────────┘\n $fecha_fin\n */\n $se_extiende_dentro_de_alguno_ya_existente_finalizado = (clone $q)->whereNotNull('aee.fecha_revocacion_ae')\n ->where('aee.fecha_ae','<=',$fecha_fin)->where('aee.fecha_vencimiento','>=',$fecha_fin)\n ->count() > 0;\n if($se_extiende_dentro_de_alguno_ya_existente_finalizado) return 4;\n \n return 0;\n }",
"function contarSemestresTranscurridos($semestre_ingreso){\r\n $cantidad='';\r\n $anio_actual=date('Y');\r\n if(date('m')<=6){\r\n $semestre_actual=1;\r\n }else{\r\n $semestre_actual=2;\r\n }\r\n $periodo_actual =$anio_actual.$semestre_actual;\r\n if($periodo_actual>=$semestre_ingreso){\r\n $cantidad = $this->calcularCantidadSemestres($semestre_ingreso,$periodo_actual);\r\n }\r\n if ($this->datosEstudiante['CARRERA']==97)\r\n $cantidad=round($cantidad/2);\r\n return $cantidad;\r\n }",
"function determinaFechosVazios()\n{\n\tglobal $mTransicoes, $lAlfabeto, $fechoVazio, $lEstados, $lTokens; \t\n\n\t//Variáveis\n\t$arrayEstados = NULL; //array com as diversas transições vazias de um mesmo estado\n\t$arrayEstados2 = NULL;\t\n\t$transConcatenadas = NULL; //array com a string inteira da transição, pode ter diversas transições vazias\n\n\techo \"------------------------------------<br>\";\n\techo \"Passo 1: Fechos dos estados<br>\";\n\t\n\tfor($i = 1; $i <= sizeof($lEstados); $i++) //determina o fecho para cada estado do autômato\n\t{ \n\t\t//echo \"Fecho de \".$lEstados[$i].\":<br>\";\n\t\t//echo \" Transicoes vazias: \".$mTransicoes[$lEstados[$i]][$lAlfabeto[0]].\"<br>\";\n\t\tif($mTransicoes[$lEstados[$i]][$lAlfabeto[0]] != '-') //mtransicoes[\"q0\"][\"e\"] != \"-\" \n\t\t{\n\t\t\t//echo \" Diferente de '-'<br>\";\n\t\t\t$fechoVazio[$lEstados[$i]][] = $lEstados[$i]; //coloca ele mesmo na lista //fechoVazio[\"q0\"][0] = \"q0'\n\t\t\t$lTokens = NULL; //limpa conteúdo de $lTokens\n\t\t\ttokeniza($mTransicoes[$lEstados[$i]][$lAlfabeto[0]]); //\"tokeniza\" vai deixar em $lTokens todos os estados de transição vazia\n\t\t\t$arrayEstados = $lTokens;\t\n\t\n\t\t\tfor($j = 0; $j < sizeof($arrayEstados); $j++)\n\t\t\t{\n\t\t\t\t//echo \" arrayEstados[$j] = \".$arrayEstados[$j].\"<br>\";\t\t\t\t\n\t\t\t\t//ve se o estado está no fecho, se não estiver coloca\n\t\t\t\tif(array_search($arrayEstados[$j], $fechoVazio[$lEstados[$i]]) == NULL \t\n\t\t\t\t\t\t\t\t&& $arrayEstados[$j] != '-'\n\t\t\t\t\t\t\t\t&& $arrayEstados[$j] != $fechoVazio[$lEstados[$i]][0])\t\n\t\t\t\t{ //o teste é igual a NULL, logo não achou o estado no fecho\n\t\t\t\t\t$fechoVazio[$lEstados[$i]][sizeof($fechoVazio[$lEstados[$i]])] = $arrayEstados[$j];\n\t\t\t\t\t//echo \" 1fechoVazio[$lEstados[$i]][\".sizeof($fechoVazio[$lEstados[$i]]).\"]: \".$arrayEstados[$j].\"<br>\";\n\t\t\t\t\t//agora precisamos ver as transições vazias do arrayEstados[$j]\n\t\t\t\t\t$lTokens = NULL; //limpa conteúdo de $lTokens\n\t\t\t\t\ttokeniza($mTransicoes[$arrayEstados[$j]][$lAlfabeto[0]]); \n\t\t\t\t\t$arrayEstados2 = NULL;\n\t\t\t\t\t$arrayEstados2 = $lTokens;\n\t\t\t\t\t//echo \" \";\t\n\t\t\t\t\t//echo \"transicao: \".$arrayEstados2[0].\"<br>\";\n\t\n\t\t\t\t\tfor($k = 0; $k < sizeof($arrayEstados2); $k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(array_search($arrayEstados2[$j], $fechoVazio[$lEstados[$i]]) == NULL \n\t\t\t\t\t\t\t\t\t\t&& $arrayEstados2[$j] != '-' \n\t\t\t\t\t\t\t\t\t\t&& $arrayEstados2[$j] != $fechoVazio[$lEstados[$i]][0])\t\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t$fechoVazio[$lEstados[$i]][sizeof($fechoVazio[$lEstados[$i]])] = $arrayEstados2[$k];\n\t\t\t\t\t\t\t//echo \" 2fechoVazio[$lEstados[$i]][\".sizeof($fechoVazio[$lEstados[$i]]).\"]: \".$arrayEstados2[$j].\"<br>\";\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} \t\n\t\t}\n\t\telse //estado sem transições vazias, logo o fecho vazio é vazio\n\t\t{\n\t\t\t$fechoVazio[$lEstados[$i]][] = $lEstados[$i]; //o fecho de um estado contém ele próprio sempre\n\t\t\t//echo \" Eh vazio, coloca so ele mesmo<br>\";\n\t\t}\n\t}\t\n\n\tfor($i = 1; $i <= sizeof($lEstados); $i++) //determina o fecho para cada estado do autômato\n\t{ \n\t\tsort($fechoVazio[$lEstados[$i]]);\n\t\techo $lEstados[$i].\": \";\n\t\tfor($j = 0; $j < sizeof($fechoVazio[$lEstados[$i]]); $j++)\n\t\t{\n\t\t\techo $fechoVazio[$lEstados[$i]][$j].\".\";\n\t\t}\n\t\techo \"<br>\";\n\t}\n\n\techo \"------------------------------------<br>\";\n\treturn;\n}",
"function get_listado_estactual($filtro=array())\n\t{ \n $concat='';\n if (isset($filtro['anio']['valor'])) {\n \t$udia=dt_mocovi_periodo_presupuestario::ultimo_dia_periodo_anio($filtro['anio']['valor']);\n $pdia=dt_mocovi_periodo_presupuestario::primer_dia_periodo_anio($filtro['anio']['valor']);\n\t\t} \n //que sea una designacion correspondiente al periodo seleccionado o anulada dentro del periodo \n $where=\" WHERE ((a.desde <= '\".$udia.\"' and (a.hasta >= '\".$pdia.\"' or a.hasta is null)) or (a.desde='\".$pdia.\"' and a.hasta is not null and a.hasta<a.desde))\";\n $where2=\" WHERE 1=1 \";//es para filtrar por estado. Lo hago al final de todo\n if (isset($filtro['uni_acad'])) {\n $concat=quote($filtro['uni_acad']['valor']);\n switch ($filtro['uni_acad']['condicion']) {\n case 'es_igual_a': $where.= \" AND a.uni_acad = \".quote($filtro['uni_acad']['valor']);break;\n case 'es_distinto_de': $where.= \" AND a.uni_acad <> \".quote($filtro['uni_acad']['valor']);break;\n }\n }\n //si el usuario esta asociado a un perfil de datos le aplica igual a su UA\n $con=\"select sigla from unidad_acad \";\n $con = toba::perfil_de_datos()->filtrar($con);\n $resul=toba::db('designa')->consultar($con);\n if(count($resul)<=1){//es usuario de una unidad academica\n $where.=\" and a.uni_acad = \".quote($resul[0]['sigla']);\n $concat=quote($resul[0]['sigla']);//para hacer el update de baja\n }\n if (isset($filtro['iddepto'])) {\n switch ($filtro['iddepto']['condicion']) {\n case 'es_igual_a': $where.= \" AND iddepto =\" .$filtro['iddepto']['valor'];break;\n case 'es_distinto_de': $where.= \" AND iddepto <>\" .$filtro['iddepto']['valor'];break;\n }\n }\n if (isset($filtro['por_permuta'])) {\n switch ($filtro['por_permuta']['condicion']) {\n case 'es_igual_a': $where.= \" AND a.por_permuta =\" .$filtro['por_permuta']['valor'];break;\n case 'es_distinto_de': $where.= \" AND a.por_permuta <>\" .$filtro['por_permuta']['valor'];break;\n }\n }\n if (isset($filtro['carac']['valor'])) {\n switch ($filtro['carac']['valor']) {\n case 'R':$c=\"'Regular'\";break;\n case 'O':$c=\"'Otro'\";break;\n case 'I':$c=\"'Interino'\";break;\n case 'S':$c=\"'Suplente'\";break;\n default:\n break;\n }\n switch ($filtro['carac']['condicion']) {\n case 'es_igual_a': $where.= \" AND a.carac=\".$c;break;\n case 'es_distinto_de': $where.= \" AND a.carac<>\".$c;break;\n }\t\n }\n if (isset($filtro['estado'])) {\n switch ($filtro['estado']['condicion']) {\n case 'es_igual_a': $where2.= \" and est like '\".$filtro['estado']['valor'].\"%'\";break;\n case 'es_distinto_de': $where2.= \" and est not like '\".$filtro['estado']['valor'].\"%'\";break;\n }\n }\n if (isset($filtro['legajo'])) {\n switch ($filtro['legajo']['condicion']) {\n case 'es_igual_a': $where.= \" and legajo = \".$filtro['legajo']['valor'];break;\n case 'es_mayor_que': $where.= \" and legajo > \".$filtro['legajo']['valor'];break;\n case 'es_mayor_igual_que': $where.= \" and legajo >= \".$filtro['legajo']['valor'];break;\n case 'es_menor_que': $where.= \" and legajo < \".$filtro['legajo']['valor'];break;\n case 'es_menor_igual_que': $where.= \" and legajo <= \".$filtro['legajo']['valor'];break;\n case 'es_distinto_de': $where.= \" and legajo <> \".$filtro['legajo']['valor'];break;\n case 'entre': $where.= \" and legajo >= \".$filtro['legajo']['valor']['desde'].\" and legajo <=\".$filtro['legajo']['valor']['hasta'];break;\n }\n } \n if (isset($filtro['docente_nombre'])) {\n switch ($filtro['docente_nombre']['condicion']) {\n case 'contiene': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) like LOWER('%\".$filtro['docente_nombre']['valor'].\"%')\";break;\n case 'no_contiene': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) not like LOWER('\".$filtro['docente_nombre']['valor'].\"')\";break;\n case 'comienza_con': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) like LOWER('\".$filtro['docente_nombre']['valor'].\"%')\";break;\n case 'termina_con': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) like LOWER('%\".$filtro['docente_nombre']['valor'].\"')\";break;\n case 'es_igual': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) == LOWER('\".$filtro['docente_nombre']['valor'].\"')\";break;\n case 'es_distinto': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) <> LOWER('\".$filtro['docente_nombre']['valor'].\"')\";break;\n }\n } \n if (isset($filtro['programa'])) {\n $sql=\"select * from mocovi_programa where id_programa=\".$filtro['programa']['valor'];\n $resul=toba::db('designa')->consultar($sql);\n switch ($filtro['programa']['condicion']) {\n case 'es_igual_a': $where.= \" AND programa =\".quote($resul[0]['nombre']);break;\n case 'es_distinto_de': $where.= \" AND programa <>\".quote($resul[0]['nombre']);break;\n }\n } \n if (isset($filtro['tipo_desig'])) {\n switch ($filtro['tipo_desig']['condicion']) {\n case 'es_igual_a': $where.=\" AND a.tipo_desig=\".$filtro['tipo_desig']['valor'];break;\n case 'es_distinto_de': $where.=\" AND a.tipo_desig <>\".$filtro['tipo_desig']['valor'];break;\n }\n }\n if (isset($filtro['anulada'])) {\n switch ($filtro['anulada']['valor']) {\n case '0': $where.=\" AND not (a.hasta is not null and a.hasta<a.desde)\";break;\n case '1': $where.=\" AND a.hasta is not null and a.hasta<a.desde \";break;\n }\n } \n if (isset($filtro['cat_estat'])) {\n switch ($filtro['cat_estat']['condicion']) {\n case 'es_igual_a': $where2.= \" and cat_estat=\".quote($filtro['cat_estat']['valor']);break;\n case 'es_distinto_de': $where2.= \" and cat_estat <>\".quote($filtro['cat_estat']['valor']);break;\n }\n }\n if (isset($filtro['dedic'])) {\n switch ($filtro['dedic']['condicion']) {\n case 'es_igual_a': $where2.= \" and dedic=\".$filtro['dedic']['valor'];break;\n case 'es_distinto_de': $where2.= \" and dedic<>\".$filtro['dedic']['valor'];break;\n }\n } \n //me aseguro de colocar en estado B todas las designaciones que tienen baja\n if($concat!=''){ \n $sql2=\" update designacion a set estado ='B' \"\n . \" where estado<>'B' and a.uni_acad=\".$concat\n .\" and exists (select * from novedad b\n where a.id_designacion=b.id_designacion \n and (b.tipo_nov=1 or b.tipo_nov=4))\";\n }\n \n //designaciones sin licencia UNION designaciones c/licencia sin norma UNION designaciones c/licencia c norma UNION reservas\n $sql=$this->armar_consulta($pdia,$udia,$filtro['anio']['valor']);\n\t\t//si el estado de la designacion es B entonces le pone estado B, si es <>B se fija si tiene licencia sin goce o cese\n// $sql= \"select id_designacion,docente_nombre,legajo,nro_cargo,anio_acad,desde,hasta,cat_mapuche,cat_mapuche_nombre,cat_estat,dedic,carac,check_presup,id_departamento,id_area,id_orientacion,uni_acad,emite_norma,nro_norma,tipo_norma,nro_540,observaciones,estado,porc,dias_lic,programa,costo_vale as costo,est,expediente,nro from(\"\n// . \"select sub2.*,case when t_no.tipo_nov in (1,4) then 'B('||coalesce(t_no.tipo_norma,'')||':'||coalesce(t_no.norma_legal,'')||')' else case when t_no.tipo_nov in (2,5) then 'L('||t_no.tipo_norma||':'||t_no.norma_legal||')' else sub2.estado end end as est,t_i.expediente,case when d.tipo_desig=2 then costo_reserva(d.id_designacion,costo,\".$filtro['anio']['valor'].\") else costo end as costo_vale \"\n// . \" ,case when t_nor.id_norma is null then '' else case when t_nor.link is not null or t_nor.link <>'' then '<a href='||chr(39)||t_nor.link||chr(39)|| ' target='||chr(39)||'_blank'||chr(39)||'>'||t_nor.nro_norma||'</a>' else cast(t_nor.nro_norma as text) end end as nro \"\n// . \"from (\"\n// .\"select sub.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, sub.desde, sub.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,sub.emite_norma, sub.nro_norma,sub.tipo_norma,nro_540,sub.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,costo,max(t_no.id_novedad) as id_novedad from (\"\n// .\"select distinct b.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, b.desde, b.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,emite_norma, b.nro_norma,b.tipo_norma,nro_540,b.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,case when (dias_des-dias_lic)>=0 then ((dias_des-dias_lic)*costo_diario*porc/100) else 0 end as costo\"\n// .\" from (\"\n// .\" select a.id_designacion,a.docente_nombre,a.legajo,a.nro_cargo,a.anio_acad, a.desde, a.hasta,a.cat_mapuche, a.cat_mapuche_nombre,a.cat_estat,a.dedic,a.carac,b.a.id_departamento, a.id_area,a.id_orientacion, a.uni_acad, a.emite_norma, a.nro_norma,a.tipo_norma,a.nro_540,a.observaciones,a.estado,programa,porc,a.costo_diario,check_presup,licencia,a.dias_des,a.dias_lic\".\n// \" from (\".$sql.\") a\"\n// .$where \n// .\") b \"\n// . \" )sub\"\n// . \" LEFT OUTER JOIN novedad t_no ON (sub.id_designacion=t_no.id_designacion and t_no.desde<='\".$udia.\"' and (t_no.hasta is null or t_no.hasta>='\".$pdia.\"' ))\"\n// . \" GROUP BY sub.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, sub.desde,sub.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,sub.emite_norma, sub.nro_norma,sub.tipo_norma,nro_540,sub.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,costo\" \n// . \")sub2\"//obtengo el id_novedad maximo\n// . \" LEFT OUTER JOIN novedad t_no on (t_no.id_novedad=sub2.id_novedad)\"//con el id_novedad maximo obtengo la novedad que predomina\n// .\" LEFT JOIN impresion_540 t_i ON (nro_540=t_i.id)\"//para agregar el expediente \n// .\" LEFT OUTER JOIN designacion d ON (sub2.id_designacion=d.id_designacion)\"//como no tengo el id de la norma tengo que volver a hacer join\n// .\" LEFT OUTER JOIN norma t_nor ON (d.id_norma=t_nor.id_norma)\"\n// . \")sub3\"\n// .$where2\n// . \" order by docente_nombre,desde\"; \n $sql= \"select id_designacion,docente_nombre,legajo,nro_cargo,anio_acad,desde,hasta,cat_mapuche,cat_mapuche_nombre,cat_estat,dedic,carac,check_presup,id_departamento,id_area,id_orientacion,uni_acad,emite_norma,nro_norma,tipo_norma,nro_540,tkd,observaciones,estado,porc,dias_lic,programa,costo_vale as costo,est,expediente,nro from(\"\n . \"select sub2.*,sub2.nro_540||'/'||t_i.anio as tkd,case when t_no.tipo_nov in (1,4) then 'B('||coalesce(t_no.tipo_norma,'')||':'||coalesce(t_no.norma_legal,'')||')' else case when t_no.tipo_nov in (2,5) then 'L('||t_no.tipo_norma||':'||t_no.norma_legal||')' else sub2.estado end end as est,t_i.expediente,case when d.tipo_desig=2 then costo_reserva(d.id_designacion,costo,\".$filtro['anio']['valor'].\") else costo end as costo_vale \"\n . \" ,case when t_nor.id_norma is null then '' else case when t_nor.link is not null or t_nor.link <>'' then '<a href='||chr(39)||t_nor.link||chr(39)|| ' target='||chr(39)||'_blank'||chr(39)||'>'||t_nor.nro_norma||'</a>' else cast(t_nor.nro_norma as text) end end as nro \"\n . \"from (\"\n .\"select sub.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, sub.desde, sub.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,sub.emite_norma, sub.nro_norma,sub.tipo_norma,nro_540,sub.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,costo,max(t_no.id_novedad) as id_novedad from (\"\n .\"select distinct b.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, b.desde, b.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,emite_norma, b.nro_norma,b.tipo_norma,nro_540,b.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,case when (dias_des-dias_lic)>=0 then ((dias_des-dias_lic)*costo_diario*porc/100) else 0 end as costo\"\n .\" from (\"\n .\" select a.id_designacion,a.por_permuta,a.docente_nombre,a.legajo,a.nro_cargo,a.anio_acad, a.desde, a.hasta,a.cat_mapuche, a.cat_mapuche_nombre,a.cat_estat,a.dedic,a.carac,t.iddepto,a.id_departamento, a.id_area,a.id_orientacion, a.uni_acad, a.emite_norma, a.nro_norma,a.tipo_norma,a.nro_540,a.observaciones,a.estado,programa,porc,a.costo_diario,a.check_presup,licencia,a.dias_des,a.dias_lic\".\n \" from (\".$sql.\") a\"\n . \" INNER JOIN designacion d ON (a.id_designacion=d.id_designacion)\"\n . \" LEFT OUTER JOIN departamento t ON (t.iddepto=d.id_departamento)\"\n .$where \n .\") b \"\n . \" )sub\"\n . \" LEFT OUTER JOIN novedad t_no ON (sub.id_designacion=t_no.id_designacion and t_no.desde<='\".$udia.\"' and (t_no.hasta is null or t_no.hasta>='\".$pdia.\"' ))\"\n . \" GROUP BY sub.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, sub.desde,sub.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,sub.emite_norma, sub.nro_norma,sub.tipo_norma,nro_540,sub.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,costo\" \n . \")sub2\"//obtengo el id_novedad maximo\n . \" LEFT OUTER JOIN novedad t_no on (t_no.id_novedad=sub2.id_novedad)\"//con el id_novedad maximo obtengo la novedad que predomina\n .\" LEFT JOIN impresion_540 t_i ON (nro_540=t_i.id)\"//para agregar el expediente \n .\" LEFT OUTER JOIN designacion d ON (sub2.id_designacion=d.id_designacion)\"//como no tengo el id de la norma tengo que volver a hacer join\n .\" LEFT OUTER JOIN norma t_nor ON (d.id_norma=t_nor.id_norma)\"\n . \")sub3\"\n .$where2\n . \" order by docente_nombre,desde\"; \n return toba::db('designa')->consultar($sql);\n\t}",
"function obtenerNotasEstudiante($codigo_estudiante){\n $notas_estudiante=array();\n if(count($this->notas>0)&&!empty($this->notas))\n {\n foreach ($this->notas as $key => $row) {\n if($row['COD_ESTUDIANTE']==$codigo_estudiante){\n $notas_estudiante[]=$row;\n unset($this->notas[$key]);\n }\n }\n }\n return $notas_estudiante;\n }",
"public function cambioEstado($servicios) {\n $hoy = getdate();\n $fecha = $hoy['year'] . '-' . $hoy['mon'] . '-' . $hoy['mday'] . ' ' . $hoy['hours'] . ':' . $hoy['minutes'] . ':' . $hoy['seconds'];\n $fecha = strtotime($fecha);\n $servicios_por_recoger = collect([]);\n if (count($servicios) > 0) {\n foreach ($servicios as $item) {\n $fecha_servicio = strtotime($item->fechafin);\n if ($fecha >= $fecha_servicio) {\n if ($item->estado == 'ENTREGADO') {\n $item->estado = \"RECOGER\";\n $item->save();\n }\n\n $horas = abs(($fecha - strtotime($item->fechafin)) / 3600);\n $operacion = $horas / 24;\n $dia = floor($operacion);\n $operacion = ($operacion - $dia) * 24;\n $horas = floor($operacion);\n $operacion = ($operacion - $horas) * 60;\n $minutos = floor($operacion);\n $str = '';\n if ($dia > 0) {\n $str = '<strong>' . $dia . '</strong> Dia(s) </br>';\n }\n\n if ($horas > 0) {\n $str .= '<strong>' . $horas . '</strong> Hora(s)</br>';\n }\n if ($minutos > 0) {\n $str .= '<strong>' . $minutos . '</strong> Minuto(s)</br>';\n }\n\n $item->tiempo = $str;\n\n $servicios_por_recoger[] = $item;\n } elseif ($item->estado == \"RECOGER\") {\n// $horas = abs(($fecha - strtotime($item->fechafin)) / 3600);\n// $minutos = '0.' . explode(\".\", $horas)[1];\n// $horas = floor($horas);\n// $minutos = floor($minutos * 60);\n $item->tiempo = \"Tiene permiso para recoger antes de tiempo\";\n $servicios_por_recoger[] = $item;\n }\n }\n }\n return $servicios_por_recoger;\n }",
"function getEstadisticaDetallado() {\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\t\tglobal $usr;\n\n\t\t# Variables para eventos especiales marcados por el cliente codigo 9.\n\t\t$event = new Event;\n\t\t$usr = new Usuario($current_usuario_id);\n\t\t$usr->__Usuario();\n\t\t$graficoSvg = new GraficoSVG();\n\n\n\t\t$timeZoneId = $usr->zona_horaria_id;\n\t\t$arrTime = Utiles::getNameZoneHor($timeZoneId); \t\t\n\t\t$timeZone = $arrTime[$timeZoneId];\n\t\t$tieneEvento = 'false';\n\t\t$arrayDateStart = array();\t\t\n\t\t$nameFunction = 'EstadisticaDet';\n\t\t$data = null;\n\t\t$ids = null;\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(($this->extra[\"imprimir\"])?REP_PATH_PRINTTEMPLATES:REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'comparativo_resumen.tpl');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TITULO_HORARIOS', 'bloque_titulo_horarios');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_MONITOR', 'es_primero_monitor');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_TOTAL', 'es_primero_total');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_PASOS', 'lista_pasos');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TABLA', 'bloque_tabla');\n\n\t\t$T->setVar('__item_orden', $this->extra[\"item_orden\"]);\n\t\t# Variables para mantenimiento.\n\t\t$T->setVar('__path_jquery_ui', REP_PATH_JQUERY_UI);\n\t\n\t\t$horarios = array($usr->getHorario($this->horario_id));\n\t\tif ($this->horario_id != 0) {\n\t\t\t$horarios[] = $usr->getHorario(0);\n\t\t}\n\n\t\t$orden = 1;\n\t\t$T->setVar('bloque_titulo_horarios', '');\n\t\tforeach ($horarios as $horario) {\n\n\t\t\t/* OBTENER LOS DATOS Y PARSEARLO */\n\t\t\t$sql = \"SELECT * FROM reporte.comparativo_resumen_parcial(\".\n\t\t\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\t\t\tpg_escape_string($this->objetivo_id).\", \".\n\t\t\t\t\tpg_escape_string($horario->horario_id).\",' \".\n\t\t\t\t\tpg_escape_string($this->timestamp->getInicioPeriodo()).\"', '\".\n\t\t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"')\";\n\t\t\t$res =& $mdb2->query($sql);\n// \t\t\tprint($sql);\n\t\t\tif (MDB2::isError($res)) {\n\t\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t$row = $res->fetchRow();\n\t\t\t$dom = new DomDocument();\n\t\t\t$dom->preserveWhiteSpace = false;\n\t\t\t$dom->loadXML($row[\"comparativo_resumen_parcial\"]);\n\t\t\t$xpath = new DOMXpath($dom);\n\t\t\tunset($row[\"comparativo_resumen_parcial\"]);\n\n\t\t\tif ($xpath->query('//detalle[@paso_orden]/estadisticas/estadistica')->length == 0) {\n\t\t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$conf_objetivo = $xpath->query('/atentus/resultados/propiedades/objetivos/objetivo')->item(0);\n\t\t\t$conf_pasos = $xpath->query(\"paso[@visible=1]\", $conf_objetivo);\n\t\t\t$conf_nodos = $xpath->query('//nodos/nodo');\n\n\t\t\tif(count($horarios) > 1) {\n\t\t\t\t$T->setVar('__item_horario', $this->extra[\"item_orden\"]);\n\t\t\t\t$T->setVar('__horario_orden', $orden);\n\t\t\t\t$T->setVar('__horario_nombre',$horario->nombre);\n\t\t\t\t$T->parse('bloque_titulo_horarios', 'BLOQUE_TITULO_HORARIOS', false);\n\t\t\t}\n\n\t\t\t\n\t\t\t# Obtención de los eventos especiales marcados por el cliente\n\t\t\tforeach ($xpath->query(\"/atentus/resultados/detalles_marcado/detalle/marcado\") as $tag_marcado) {\n\t\t\t$ids = $ids.','.$tag_marcado->getAttribute('mantenimiento_id');\n\t\t\t$marcado = true;\n\t\t\t}\t\t\n\t\t\t\n\t\t\t# Verifica que exista marcado evento cliente.\n\t\t\tif ($marcado == true) {\n\n\t\t\t\t$dataMant = $event->getData(substr($ids, 1), $timeZone);\n\t\t\t\t$character = array(\"{\", \"}\");\n\t\t\t\t$objetives = explode(',',str_replace($character,\"\",($dataMant[0]['objetivo_id'])));\n\t\t\t\t$tieneEvento = 'true';\n\t\t\t\t$encode = json_encode($dataMant);\n\t\t\t\t$nodoId = (string)0;\n\t\t\t\t$T->setVar('__tiene_evento', $tieneEvento);\n\t\t\t\t$T->setVar('__name', $nameFunction);\n\n\t\t\t}\n\n\t\t\t/* LISTA DE MONITORES */\n\t\t\t$linea = 1;\n\t\t\t$T->setVar('lista_pasos', '');\n\t\t\tforeach($conf_nodos as $conf_nodo) {\n\t\t\t\t$primero = true;\n\t\t\t\t$tag_nodo = $xpath->query('//detalle[@nodo_id='.$conf_nodo->getAttribute('nodo_id').']/estadisticas/estadistica')->item(0);\n\n\t\t\t\t/* LISTA DE PASOS */\n\t\t\t\tforeach($conf_pasos as $conf_paso) {\n\t\t\t\t\t$tag_dato = $xpath->query('//detalle[@nodo_id='.$conf_nodo->getAttribute('nodo_id').']/detalles/detalle[@paso_orden='.$conf_paso->getAttribute('paso_orden').']/estadisticas/estadistica')->item(0);\n\t\t\t\t\tif($tag_dato != null) {\n\t\t\t\t\t\t$T->setVar('__print_class', ($linea % 2 == 0)?\"celdaIteracion2\":\"celdaIteracion1\");\n\t\t\t\t\t\t$T->setVar('__class', ($linea % 2 == 0)?\"celdanegra15\":\"celdanegra10\");\n\n\t\t\t\t\t\t$T->setVar('es_primero_monitor', '');\n\t\t\t\t\t\t$T->setVar('es_primero_total', '');\n\t\t\t\t\t\tif ($primero) {\n\t\t\t\t\t\t\t$T->setVar('__monitor_nombre', $conf_nodo->getAttribute('nombre'));\n\t\t\t\t\t\t\t$T->setVar('__monitor_rowspan', $conf_pasos->length);\n\t\t\t\t\t\t\t$T->setVar('__monitor_total_monitoreo', $tag_nodo->getAttribute('cantidad'));\n\t\t\t\t\t\t\t$T->parse('es_primero_monitor', 'ES_PRIMERO_MONITOR', false);\n\t\t\t\t\t\t\t$T->parse('es_primero_total', 'ES_PRIMERO_TOTAL', false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$T->setVar('__paso_nombre', $conf_paso->getAttribute(\"nombre\"));\n\t\t\t\t\t\t$T->setVar('__paso_minimo', number_format($tag_dato->getAttribute('tiempo_min'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_maximo', number_format($tag_dato->getAttribute('tiempo_max'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_promedio', number_format($tag_dato->getAttribute('tiempo_prom'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_uptime', number_format($tag_dato->getAttribute('uptime'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_downtime', number_format($tag_dato->getAttribute('downtime'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_no_monitoreo', number_format($tag_dato->getAttribute('sin_monitoreo'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_evento_especial', number_format($tag_dato->getAttribute('marcado_cliente'), 3, ',', ''));\n\n\t\t\t\t\t\t$T->parse('lista_pasos', 'LISTA_PASOS', true);\n\t\t\t\t\t\t$primero = false;\n\t\t\t\t\t\t$linea++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$T->parse('bloque_tabla', 'BLOQUE_TABLA', true);\n\t\t\t$orden++;\n\t\t}\n\t\t$this->tiempo_expiracion = (strtotime($xpath->query(\"//fecha_expiracion\")->item(0)->nodeValue) - strtotime($xpath->query(\"//fecha\")->item(0)->nodeValue));\n\t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n\n\t\t# Agrega el acordeon cuando existan eventos.\n\t\tif (count($dataMant)>0){\n\t\t\t$this->resultado.= $graficoSvg->getAccordion($encode,$nameFunction);\n\t\t}\n\t\treturn $this->resultado;\n\t}",
"public function reprova()\n {\n $this -> estadoAtual -> reprova($this);\n }",
"function anteriorEstado(){\n $this->procedimiento = 'asis.ft_vacacion_ime';\n $this->transaccion = 'ASIS_ANTV_IME';\n $this->tipo_procedimiento = 'IME';\n //Define los parametros para la funcion\n $this->setParametro('id_proceso_wf', 'id_proceso_wf', 'int4');\n $this->setParametro('id_estado_wf', 'id_estado_wf', 'int4');\n $this->setParametro('obs', 'obs', 'text');\n $this->setParametro('estado_destino', 'estado_destino', 'varchar');\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n //Devuelve la respuesta\n return $this->respuesta;\n }",
"public function inicia_vacaciones() {\n\t\t$vacaciones = $this->solicitudes_model->getVacaciones();\n\n\t\t//var_dump($vacaciones);exit;\n\n\t\tforeach ($vacaciones as $solicitud) {\n\n\t\t\t//echo $solicitud->colaborador;\n\n\t\t\t//$solicitud = $this->solicitudes_model->getSolicitudById($registro->id);\n\t\t\t//$this->actualiza_dias_disponibles($solicitud);\n\n\t\t\t$diasSolicitados = $solicitud->dias;\n\n\t\t\t// if exists row with vacations by user\n\t\t\tif($acumulados = $this->solicitudes_model->getAcumulados($colaborador = $solicitud->colaborador)){\n\n\t\t\t\t$datos = array(\n\t\t\t\t\t\"dias_uno\" => $acumulados->dias_uno,\n\t\t\t\t\t\"dias_dos\" => $acumulados->dias_dos,\n\t\t\t\t\t\"vencimiento_uno\" => $acumulados->vencimiento_uno,\n\t\t\t\t\t\"vencimiento_dos\" => $acumulados->vencimiento_dos,\n\t\t\t\t\t\"dias_acumulados\" => $acumulados->dias_acumulados\n\t\t\t\t);\n\n\t\t\t\t$diasSolicitados*=(-1);\n\n\t\t\t\twhile(true){\n\n\t\t\t\t\tif($datos['dias_uno'] > 0){\n\t\t\t\t\t\t$datos['dias_uno'] = $datos['dias_uno'] + $diasSolicitados;\n\t\t\t\t\t\tif($datos['dias_uno'] >= 0){\n\t\t\t\t\t\t\t$datos['dias_acumulados'] = $datos['dias_acumulados'] + $diasSolicitados;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$diasSolicitados = $datos['dias_uno'];\n\t\t\t\t\t}elseif($datos['dias_dos'] > 0){\n\t\t\t\t\t\t$datos['dias_dos'] = $datos['dias_dos'] + $diasSolicitados;\n\t\t\t\t\t\t$datos['dias_uno'] = 0;\n\t\t\t\t\t\tif($datos['dias_dos'] >= 0){\n\t\t\t\t\t\t\t$datos['dias_acumulados'] = $datos['dias_acumulados'] + $diasSolicitados;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$diasSolicitados = $datos['dias_dos'];\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$datos['dias_acumulados'] = $datos['dias_acumulados'] + $diasSolicitados;\n\t\t\t\t\t\t$vs['dias_uno'] = 0;\n\t\t\t\t\t\t$vs['dias_dos'] = 0;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t$datos['vencimiento_uno'] = ($datos['dias_uno'] == 0) ? null : $datos['vencimiento_uno'];\n\t\t\t\t$datos['vencimiento_dos'] = ($datos['dias_dos'] == 0) ? null : $datos['vencimiento_dos'];\n\n\t\t\t\t$this->solicitudes_model->actualiza_dias_vacaciones($colaborador,$datos);\n\n\t\t\t}\n\t\t\t$this->solicitudes_model->useSolicitudVacation($solicitud->id);\n\t\t}\n\t\t//exit;\n\t}",
"function ejecutarClasificacionEstudiantes($proyecto){\n $this->codProyecto=$proyecto;\n //buscamos estudiantes en prueba academica\n $estudiantes_clasificados = $this->consultarEstudiantesPruebaAcademica();\n //buscamos estudiantes que no estan en prueba academica\n $estudiantes = $this->consultarEstudiantesSinPrueba();\n //buscamos estudiantes con 1 y 2 espacios reprobados\n $resultado = $this->buscarEstudiantesConEspaciosReprobados($estudiantes, $estudiantes_clasificados);\n $estudiantes = $resultado['ESTUDIANTES'];\n $estudiantes_clasificados = $resultado['CLASIFICADOS'];\n unset($resultado);\n //buscamos estudiantes nivelados (sin ningun espacio reprobado)\n $resultado_nivelados = $this->buscarEstudiantesNivelados($estudiantes, $estudiantes_clasificados);\n $estudiantes = $resultado_nivelados['ESTUDIANTES'];\n $estudiantes_clasificados = $resultado_nivelados['CLASIFICADOS'];\n //buscamos estudiantes que no reprobaron el semestre anterior\n $resultado_semAnterior = $this->buscarEstudiantesSinEspaciosReprobadosSemAnterior($estudiantes, $estudiantes_clasificados);\n $resultadoFinal=$this->clasificarOtrosEstudiantes($resultado_semAnterior);\n //ordenar arreglo de estudiantes clasificados\n if(is_array($resultadoFinal)&&!empty($resultadoFinal))\n {\n $estudiantes_clasificados_final= $this->ordenarEstudiantesClasificados($resultadoFinal);\n $insercion = $this->insertarEstudiantesClasificados($estudiantes_clasificados_final);\n }else\n {\n $insercion=0;\n }\n return $insercion ;\n }",
"function verificarReprobados($notas_estudiante){\n $reprobados = 0;\n if(count($notas_estudiante)>0){\n foreach ($notas_estudiante as $key => $estudiantes) {\n if ((isset($estudiantes['NOTA'])?$estudiantes['NOTA']:0)<30 || $estudiantes['OBSERVACION']==20 || $estudiantes['OBSERVACION']==23 || $estudiantes['OBSERVACION']==25){\n $reprobados=1;\n break;\n }\n }\n }\n return $reprobados;\n }",
"public function getOpcionesEstadosPosiblesDeCambio(){\n \t//return array('planificado' => 'Planificado','parcial' => 'Realizada Parcialmente','cancelado' => 'Cancelada', 'realizado' => 'Realizada');\n \tif($this->esPlanificada()){\n\t\t\treturn array('planificado' => 'Planificado','parcial' => 'Realizada Parcialmente','cancelado' => 'Cancelada');\n\t\t}\n\t\telseif($this->esParcial()){\n\t\t\treturn array('parcial' => 'Realizada Parcialmente','atrasado' => 'Atrasado','cancelado' => 'Cancelada', 'realizado' => 'Realizada');\n\t\t}\n\t\telseif($this->esAtrasada()){\n\t\t\treturn array('parcial' => 'Realizada Parcialmente','atrasado' => 'Atrasado','cancelado' => 'Cancelada', 'realizado' => 'Realizada');\n\t\t}\n\t\telseif($this->esCancelada()){\n\t\t\treturn array('cancelado' => 'Cancelada');\n\t\t}\n\t\telseif($this->esRealizada()){\n\t\t\treturn array('realizado' => 'Realizada');\n\t\t}\n\t\treturn array('planificado' => 'Planificado','parcial' => 'Realizada Parcialmente','cancelado' => 'Cancelada', 'realizado' => 'Realizada');\n\t}",
"public function refreshStageConvocados(){\n $contador=0;\n foreach($this->convocados as $convocado){\n if($convocado->updateStage())$contador++;\n }\n return $contador;\n }",
"function getEstadisticasElementos() {\n\t\tif (isset($this->extra[\"monitor_id\"]) and isset($this->extra[\"pagina\"])) {\n\t\t\t$this->resultado = $this->getDetalleEstadisticasElementos($this->extra[\"monitor_id\"], $this->extra[\"pagina\"], 1);\n\t\t\treturn;\n\t\t}\n\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\n\t\t/* OBTENER LOS DATOS Y PARSEARLO */\n\t\t$sql = \"SELECT foo.nodo_id FROM (\".\n\t\t\t \"SELECT DISTINCT unnest(_nodos_id) AS nodo_id FROM _nodos_id(\".\n\t\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\t\tpg_escape_string($this->objetivo_id).\",'\".\n\t\t\t\tpg_escape_string($this->timestamp->getInicioPeriodo()).\"','\".\n\t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"')) AS foo, nodo n \".\n\t\t\t \"WHERE foo.nodo_id=n.nodo_id ORDER BY orden\";\n\n\t\t$res =& $mdb2->query($sql);\n\t\tif (MDB2::isError($res)) {\n\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\texit();\n\t\t}\n\t\t$monitor_ids = array();\n\t\twhile ($row = $res->fetchRow()) {\n\t\t\t$monitor_ids[] = $row[\"nodo_id\"];\n\t\t}\n\n\t\t/* SI NO HAY DATOS MOSTRAR MENSAJE */\n\t\tif (count($monitor_ids) == 0) {\n\t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n\t\t\treturn;\n\t\t}\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'contenedor_tabla.tpl');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_CONTENEDORES', 'lista_contenedores');\n\n\t\t/* LISTA DE MONITORES */\n\t\t$orden = 1;\n\t\tforeach ($monitor_ids as $monitor_id) {\n\t\t\t$T->setVar('__contenido_id', 'elem_estadistica_'.$monitor_id);\n\t\t\t$T->setVar('__contenido_tabla', $this->getDetalleEstadisticasElementos($monitor_id, 1, $orden));\n\t\t\t$T->parse('lista_contenedores', 'LISTA_CONTENEDORES', true);\n\t\t\t$orden++;\n\t\t}\n\t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n\t}",
"public function vacation_expired() {\n\t\t$vacaciones = $this->solicitudes_model->getVacacionesExpired();\n\t\tforeach ($vacaciones as $registro) :\n\t\t\t$datos = array(\n\t\t\t\t//'dias_acumulados'=>((int)$registro->dias_acumulados - (int)$registro->dias_uno) + (int)$registro->dias_dos,\n\t\t\t\t'dias_acumulados' => (int)$registro->dias_acumulados - (int)$registro->dias_uno,\n\t\t\t\t'dias_uno' => $registro->dias_dos,\n\t\t\t\t'vencimiento_uno' => $registro->vencimiento_dos,\n\t\t\t\t'dias_dos' => null,\n\t\t\t\t'vencimiento_dos' => null,\n\t\t\t);\n\t\t\t$this->solicitudes_model->actualiza_dias_vacaciones($registro->colaborador,$datos);\n\t\tendforeach;\n\t}",
"function premier($nombre)\n{\n if($nombre > 10000){\n for($i = 1;$i <= $nombre; $i++)\n {\n $cpt=0;\n for($j=1;$j<=$i; $j++)\n {\n if($i%$j==0)\n {\n $cpt++;\n }\n }\n if($cpt==2)\n {\n $T1[] = $i;\n }\n } \n }else{\n echo \"<center>entrer un nombre superieur a 10 000<center>\";\n }\n\n $inferieurs = array();\n $superieurs= array();\n\n for($i=0;$i< count($T1); $i++)\n {\n if($T1[$i]< moyenne($T1))\n {\n $inferieurs[] = $T1[$i];\n }else{\n $superieurs[] = $T1[$i];\n }\n }\n\n $T = array\n (\n 'inferieur'=>$inferieurs,\n 'superieur'=>$superieurs\n );\n\n $_SESSION['T'] = $T1;\n\n $_SESSION['inferieur'] = $T['inferieur'];\n $_SESSION['superieur'] = $T['superieur'];\n}",
"public function valider_facture_stylimmo( Request $request, $compromis)\n{\n $numero = Facture::where([ ['type','stylimmo']])->max('numero') ;\n \n // la date d'une facture doit être supérieur ou égale à la facture précedente et/ou inférieure ou égale à la facture suivante\n\n // #1 dans ce bloc on réccupère les numéros de facture qui viennent avant et/ou après le numéro de la facture suivante.. afin de comparer les dates\n $next_numeros = Facture::where([ ['type','stylimmo'], ['numero','>',$request['numero']] ])->select(\"numero\")->orderBy('numero')->get()->toArray();\n $prev_numeros = Facture::where([ ['type','stylimmo'], ['numero','<',$request['numero']] ])->select(\"numero\")->orderBy('numero','desc')->get()->toArray();\n // $next_nums = array();\n $next_nums = null;\n $prev_nums = null;\n if($next_numeros != null){\n foreach ($next_numeros as $next) {\n $next_nums [] = $next['numero'] ;\n }\n }\n \n if($prev_numeros != null){\n foreach ($prev_numeros as $next) {\n $prev_nums [] = $next['numero'] ;\n }\n }\n\n // Dans ce bloc on compare les dates\n if($prev_nums != null && $next_nums != null){\n\n $prev_fact = Facture::where([ ['type','stylimmo'], ['numero',$prev_nums[0]] ])->first();\n $next_fact = Facture::where([ ['type','stylimmo'], ['numero',$next_nums[0]] ])->first();\n\n $prev_date = $prev_fact->date_facture->format('Y-m-d');\n $next_date = $next_fact->date_facture->format('Y-m-d');\n \n $request->validate([\n 'numero' => 'required|numeric|unique:factures',\n 'date_facture' => \"required|date|after_or_equal:$prev_date|before_or_equal:$next_date\",\n ]);\n\n }elseif($prev_nums != null && $next_nums == null){\n $prev_fact = Facture::where([ ['type','stylimmo'], ['numero',$prev_nums[0]] ])->first();\n $prev_date = $prev_fact->date_facture->format('Y-m-d');\n $request->validate([\n 'numero' => 'required|numeric|unique:factures',\n 'date_facture' => \"required|date|after_or_equal:$prev_date\",\n ]);\n \n }elseif($prev_nums == null && $next_nums != null){\n $next_fact = Facture::where([ ['type','stylimmo'], ['numero',$next_nums[0]] ])->first();\n $next_date = $next_fact->date_facture->format('Y-m-d');\n $request->validate([\n 'numero' => 'required|numeric|unique:factures',\n 'date_facture' => \"required|date|before_or_equal:$next_date\",\n ]);\n\n }\n else{\n\n }\n \n\n // dd($request['numero'].\" est compris entre \" .$prev_nums[0].\" et \".$next_nums[0]);\n\n \n\n $numero = $request->numero;\n $compromis = Compromis::where('id', Crypt::decrypt($compromis))->first();\n $mandataire = $compromis->user;\n // save la facture\n\n $tva = Tva::coefficient_tva();\n \n $facture = Facture::where([ ['type','stylimmo'],['compromis_id',$compromis->id],['a_avoir', false]])->first();\n\n\n // Si la facture n'est pas déjà crée\n \n // calcul du montant de la facture en fonction du type de partage s'il y'a partage \n \n $montant_ttc = $compromis->frais_agence;\n \n // Si on partage avec une agence externe\n if($compromis->est_partage_agent == true && $compromis->partage_reseau == false){\n // Si Styl et l'agence OU l'agence porte l'affaire chez le notaire, on ne facture facture pas la totalité des frais d'agence\n if($compromis->qui_porte_externe == 1 || $compromis->qui_porte_externe == 2){\n \n $montant_ttc = $montant_ttc * $compromis->pourcentage_agent / 100;\n }\n }\n \n $montant_ht = round ($montant_ttc/$tva ,2);\n \n if ($facture == null) {\n\n $facture = Facture::create([\n \"numero\"=> $numero,\n \"user_id\"=> $compromis->user_id,\n \"compromis_id\"=> $compromis->id,\n \"type\"=> \"stylimmo\",\n \"encaissee\"=> false,\n \"montant_ht\"=> $montant_ht,\n \"montant_ttc\"=> $montant_ttc,\n \"date_facture\"=> $request->date_facture,\n\n ]);\n\n \n $compromis->facture_stylimmo_valide = true;\n $compromis->update();\n\n // on sauvegarde la facture dans le repertoire du mandataire\n $path = storage_path('app/public/'.$mandataire->id.'/factures');\n\n if(!File::exists($path))\n File::makeDirectory($path, 0755, true);\n \n $pdf = PDF::loadView('facture.pdf_stylimmo',compact(['compromis','mandataire','facture']));\n $path = $path.'/facture_'.$facture->numero.'.pdf';\n $pdf->save($path);\n \n $facture->url = $path;\n $compromis->demande_facture = 2;\n $facture->update();\n $compromis->update();\n\n $nb_demande_facture = Compromis::where([['demande_facture',1],['archive',false]])->count();\n $admins = User::where('role','admin')->get();\n\n foreach ($admins as $admin) {\n $admin->demande_facture = $nb_demande_facture;\n $admin->update();\n }\n \n Mail::to($mandataire->email)->send(new EnvoyerFactureStylimmoMandataire($mandataire,$facture));\n // Mail::to(\"[email protected]\")->send(new EnvoyerFactureStylimmoMandataire($mandataire,$facture));\n\n\n $action = Auth::user()->nom.\" \".Auth::user()->prenom.\" a validé la facture stylimmo $facture->numero\";\n $user_id = Auth::user()->id;\n\n \n Historique::createHistorique( $user_id,$facture->id,\"facture\",$action );\n \n\n }else{\n $facture = Facture::where([ ['type','stylimmo'],['compromis_id',$compromis->id]])->first();\n // return view ('facture.generer_stylimmo',compact(['compromis','mandataire','facture']))->with('ok', __('Cette affaire a déjà une facture sans avoir') );\n\n }\n \n // fin save facture\n// dd(\"ee\");\n \n return view ('facture.generer_stylimmo',compact(['compromis','mandataire','facture','numero']))->with('ok', __('Facture envoyée au mandataire') );\n \n}",
"public function rifaiVetrine()\n\t\t{\n\t\t\tif( ($listaVetrine = array_keys($this->vetrine)) )\n\t\t\t\tforeach ($listaVetrine as $nomeVetrina)\n\t\t\t\t\tunset($this->vetrine[$nomeVetrina]['lastMod']);\n\t\t\t\n\t\t\t$this->salvaStatoInsiemeVetrine();\n\t\t}",
"function visites_pre_traitement($prev_visites) {\r\n\r\n\t# pour page hier\r\n\tif (!is_array($prev_visites)) {\r\n\t\treturn;\r\n\t}\r\n\r\n\t$temps = $prev_visites[0];\r\n\t$visites = $prev_visites[1];\r\n\t$visites_a = $prev_visites[2];\r\n\r\n\tif (count($temps)) {\r\n\t\tsort($temps);\r\n\t}\r\n\r\n\t$aff = '';\r\n\tif ($nb_articles = count($visites_a)) {\r\n\t\t$heure_f = date('H\\hi', $temps[0]);\r\n\t\t$date_f = date('d/m/Y', $temps[0]);\r\n\r\n\t\t$aff .= \"<div align='center' class='iconeoff verdana2 bold' style='clear:both;'>\\n\"\r\n\t\t\t. _T('actijour:depuis_date_visites_pg',\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'heure' => $heure_f,\r\n\t\t\t\t\t'date' => $date_f == date('d/m/Y') ? '' : '(' . $date_f . ')',\r\n\t\t\t\t\t'nb_visite' => $visites,\r\n\t\t\t\t\t'nb_articles' => $nb_articles\r\n\t\t\t\t))\r\n\t\t\t. \"\\n</div>\\n\";\r\n\t}\r\n\r\n\treturn $aff;\r\n}"
] |
[
"0.571798",
"0.56856173",
"0.5672155",
"0.56713504",
"0.56124645",
"0.55969065",
"0.5591763",
"0.55588937",
"0.5558756",
"0.55354166",
"0.55180633",
"0.5515676",
"0.55055434",
"0.5501564",
"0.54838836",
"0.5476944",
"0.54753476",
"0.5467101",
"0.5417499",
"0.54115635",
"0.54098344",
"0.5395297",
"0.53786755",
"0.5372722",
"0.53644454",
"0.53580177",
"0.5333315",
"0.53236383",
"0.5314929",
"0.52907336"
] |
0.60187346
|
0
|
Funcion que ordena los estudiantes clasificados por nivel y codigos de estudiantes
|
function ordenarEstudiantesClasificados($estudiantes_clasificados){
// Obtener una lista de columnas
foreach ($estudiantes_clasificados as $key => $row) {
$nivel[$key] = $row['CLASIFICACION'];
$codigos[$key] = $row['COD_ESTUDIANTE'];
}
// Ordenar los datos con nivel ascendente, codigos ascendente
// Agregar $datos como el último parámetro, para ordenar por la llave común
array_multisort($nivel, SORT_ASC, $codigos, SORT_ASC, $estudiantes_clasificados);
//adicionamos ID a cada estudiante
foreach ($estudiantes_clasificados as $key3 => $informacion){
$estudiantes_clasificados[$key3]['ID'] = $key3+1;
}
return $estudiantes_clasificados;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function categoriaInactivos(){\n if($this->nolaboral->V21_M >= 1)\n {\n return 1;\n }\n if($this->nolaboral->V8_M == 1 && $this->nolaboral->V9_M == 1 && $this->nolaboral->V10_M == 1)\n {\n return 2;\n }\n if($this->caracteristicas->CH10 == 1 && $this->PP01E == 2)\n {\n return 3;\n }\n if($this->PP01E == 2)\n {\n return 4;\n }\n if($this->caracteristicas->CH06 < 6)\n {\n return 5;\n }\n if($this->discapacidad())\n {\n return 6;\n }\n\n}",
"public function getOpcionesEstadosPosiblesDeCambio(){\n \t//return array('planificado' => 'Planificado','parcial' => 'Realizada Parcialmente','cancelado' => 'Cancelada', 'realizado' => 'Realizada');\n \tif($this->esPlanificada()){\n\t\t\treturn array('planificado' => 'Planificado','parcial' => 'Realizada Parcialmente','cancelado' => 'Cancelada');\n\t\t}\n\t\telseif($this->esParcial()){\n\t\t\treturn array('parcial' => 'Realizada Parcialmente','atrasado' => 'Atrasado','cancelado' => 'Cancelada', 'realizado' => 'Realizada');\n\t\t}\n\t\telseif($this->esAtrasada()){\n\t\t\treturn array('parcial' => 'Realizada Parcialmente','atrasado' => 'Atrasado','cancelado' => 'Cancelada', 'realizado' => 'Realizada');\n\t\t}\n\t\telseif($this->esCancelada()){\n\t\t\treturn array('cancelado' => 'Cancelada');\n\t\t}\n\t\telseif($this->esRealizada()){\n\t\t\treturn array('realizado' => 'Realizada');\n\t\t}\n\t\treturn array('planificado' => 'Planificado','parcial' => 'Realizada Parcialmente','cancelado' => 'Cancelada', 'realizado' => 'Realizada');\n\t}",
"protected function entidades(){\n\t\tfor($i=1; $i < 6;$i++) $niveis[$i] = \"nivel de busca {$i}\";\n\t\t$this->visualizacao->nivel = VComponente::montar(VComponente::caixaCombinacao, 'nivel', isset($_POST['nivel']) ? $_POST['nivel'] : 1 ,null,$niveis);\n\t\t$this->visualizacao->filtro = isset($_POST['filtro']) ? $_POST['filtro'] : null;\n\t\t$this->visualizacao->listagens = false;\n\t\tif(!$this->visualizacao->filtro) return;\n\t\t$d = dir(\".\");\n\t\t$negocios = new colecao();\n\t\t$controles = new colecao();\n\t\twhile (false !== ($arquivo = $d->read())) {\n\t\t\tif( is_dir($arquivo) && ($arquivo{0} !== '.') ){\n\t\t\t\tif(is_file($arquivo.'/classes/N'.ucfirst($arquivo).'.php')){\n\t\t\t\t\t$negocio = 'N'.ucfirst($arquivo);\n\t\t\t\t\t$obNegocio = new $negocio();\n\t\t\t\t\tif( $obNegocio instanceof negocioPadrao ) {\n\t\t\t\t\t\t$ordem[$arquivo] = array(\n\t\t\t\t\t\t\t'nome'=>$obNegocio->pegarInter()->pegarNome(),\n\t\t\t\t\t\t\t'caminho'=>$arquivo.'/classes/N'.ucfirst($arquivo).'.php'\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$negocios->$arquivo = $obNegocio;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$d->close();\n\t\tasort($ordem);\n\t\t$this->visualizacao->ordem = $ordem;\n\t\t$listagens = array();\n\t\tforeach($ordem as $idx => $arquivo){\n\t\t\t$obNegocio = $negocios->pegar($idx);\n\t\t\t$nome['controle'] = definicaoEntidade::controle($obNegocio, 'verPesquisa');\n\t\t\tif($this->exibirListagem($arquivo)){\n\t\t\t\t$colecao = $obNegocio->pesquisaGeral($this->pegarFiltro(),$this->pegarPagina(),isset($_POST['nivel']) ? $_POST['nivel'] : 1);\n\t\t\t\tcall_user_func_array(\"{$nome['controle']}::montarListagem\", array($this->visualizacao,$colecao,$this->pegarPagina(),$nome['controle']));\n\t\t\t\t$this->visualizacao->listagem->passarControle($nome['controle']);\n\t\t\t\tif($colecao->contarItens()){\n\t\t\t\t\t$listagens[$idx]['listagem'] = $this->visualizacao->listagem;\n\t\t\t\t\t$listagens[$idx]['ocorrencias'] = $colecao->contarItens();\n\t\t\t\t\t$listagens[$idx]['nome'] = $arquivo['nome'];\n\t\t\t\t\t$listagens[$idx]['controlePesquisa'] = $nome['controle'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tunset($this->visualizacao->listagem);\n\t\t$this->visualizacao->listagens = $listagens;\n\t}",
"public function estado(){\n if($this->entrev_realiz == 2)\n {\n return 0;\n }\n if($this->PP01A == 1 || $this->PP01B == 1)\n {\n return 1;\n }\n if($this->PP02B == 1)\n {\n return 2;\n }\n if($this->PP01E == 1 || $this->PP01E == 2 || $this->PP02F == 2)\n {\n return 3;\n }\n if($this->caracteristicas->CH06 < 10){\n return 4;\n }\n\n }",
"function dgd_testes_de_resistencia($nivel);",
"function porEstudiante($cod_clase, $cod_interno = null) {\n\t\t\t$estudiantes = TAsistencia::all($cod_clase);\n\t\t\tif($estudiantes == null)\n\t\t\t\treturn null;\n\t\t\t$asistencias = array();\n\t\t\tforeach ($estudiantes as $estudiante) {\n\t\t\t\t$asistencias[$estudiante['cod_interno']] = array('asiste' => $estudiante['asiste'], 'cod_motivo' => $estudiante['cod_motivo']);\n\t\t\t}\n\t\t\treturn $asistencias;\n\t\t}",
"function buscarEstudiantesConEspaciosReprobados($estudiantes,$estudiantes_clasificados){\n if(count($estudiantes)>0){\n foreach ($estudiantes as $key => $arreglo_estudiante) {\n $cantidad_reprobados = 0;\n \n\n $espacios_por_cursar = json_decode($arreglo_estudiante['ESPACIOS_POR_CURSAR'],true);\n $cantidad_reprobados = $this->contarReprobados($espacios_por_cursar);\n switch($cantidad_reprobados){\n case 1:\n $resultado = array( 'COD_ESTUDIANTE'=>$arreglo_estudiante['COD_ESTUDIANTE'],\n 'COD_PROYECTO'=>$arreglo_estudiante['COD_PROYECTO'],\n 'CLASIFICACION'=>'4',\n 'TIPO'=>$arreglo_estudiante['TIPO']\n );\n $estudiantes_clasificados[] = $resultado;\n unset($estudiantes[$key]);\n break;\n case 2:\n $resultado = array( 'COD_ESTUDIANTE'=>$arreglo_estudiante['COD_ESTUDIANTE'],\n 'COD_PROYECTO'=>$arreglo_estudiante['COD_PROYECTO'],\n 'CLASIFICACION'=>'5',\n 'TIPO'=>$arreglo_estudiante['TIPO']\n );\n $estudiantes_clasificados[] = $resultado;\n unset($estudiantes[$key]);\n break;\n case 3:\n $resultado = array( 'COD_ESTUDIANTE'=>$arreglo_estudiante['COD_ESTUDIANTE'],\n 'COD_PROYECTO'=>$arreglo_estudiante['COD_PROYECTO'],\n 'CLASIFICACION'=>'6',\n 'TIPO'=>$arreglo_estudiante['TIPO']\n );\n $estudiantes_clasificados[] = $resultado;\n unset($estudiantes[$key]);\n break;\n default:\n if($cantidad_reprobados>3){\n $resultado = array( 'COD_ESTUDIANTE'=>$arreglo_estudiante['COD_ESTUDIANTE'],\n 'COD_PROYECTO'=>$arreglo_estudiante['COD_PROYECTO'],\n 'CLASIFICACION'=>'7',\n 'TIPO'=>$arreglo_estudiante['TIPO']\n );\n $estudiantes_clasificados[] = $resultado;\n unset($estudiantes[$key]);\n }\n break;\n\n }\n }\n }\n $resultado = array( 'ESTUDIANTES'=>$estudiantes,\n 'CLASIFICADOS'=>$estudiantes_clasificados);\n return $resultado;\n }",
"function pegaEstados()\n {\n $lista_estados = array(\n 'ac' => 'Acre',\n 'al' => 'Alagoas',\n 'ap' => 'Amapá',\n 'am' => 'Amazonas',\n 'ba' => 'Bahia',\n 'ce' => 'Ceará',\n 'df' => 'Distrito Federal',\n 'es' => 'Espirito Santo',\n 'go' => 'Goiás',\n 'ma' => 'Maranhão',\n 'ms' => 'Mato Grosso do Sul',\n 'mt' => 'Mato Grosso',\n 'mg' => 'Minas Gerais',\n 'pa' => 'Pará',\n 'pb' => 'Paraíba',\n 'pr' => 'Paraná',\n 'pe' => 'Pernanbuco',\n 'pi' => 'Piauí',\n 'rj' => 'Rio de Janeiro',\n 'rn' => 'Rio Grande do Norte',\n 'rs' => 'Rio Grande do Sul',\n 'ro' => 'Rondônia',\n 'rr' => 'Roraima',\n 'sc' => 'Santa Catarina',\n 'sp' => 'São Paulo',\n 'se' => 'Sergipe',\n 'to' => 'Tocantis'\n );\n\n\n return $lista_estados;\n }",
"function buscarEstudiantesNivelados($estudiantes,$estudiantes_clasificados){\n \n $k=0;\n\tunset ($this->notas);\n $this->notas = $this->obtenerNotas();\n if(count($estudiantes)>0)\n {\n foreach ($estudiantes as $key => $estudiante) {\n //buscamos las notas\n $reprobados = 0;\n $notas_estudiante = array();\n $notas_estudiante = $this->obtenerNotasEstudiante($estudiante['COD_ESTUDIANTE']);\n $reprobados = $this->verificarReprobados($notas_estudiante);\n unset($notas_estudiante);\n if($reprobados==0){\n $resultado = array( 'COD_ESTUDIANTE'=>$estudiante['COD_ESTUDIANTE'],\n 'COD_PROYECTO'=>$estudiante['COD_PROYECTO'],\n 'CLASIFICACION'=>'1',\n 'TIPO'=>$estudiante['TIPO']\n );\n $estudiantes_clasificados[] = $resultado;\n unset($estudiantes[$key]);\n }\n }\n }\n $resultado = array( 'ESTUDIANTES'=>$estudiantes,\n 'CLASIFICADOS'=>$estudiantes_clasificados);\n return $resultado;\n }",
"function siguienteEstado(){\n $this->procedimiento = 'asis.ft_vacacion_ime';\n $this->transaccion = 'ASIS_SIGAV_IME';\n $this->tipo_procedimiento = 'IME';\n //Define los parametros para la funcion\n $this->setParametro('id_proceso_wf_act', 'id_proceso_wf_act', 'int4');\n $this->setParametro('id_estado_wf_act', 'id_estado_wf_act', 'int4');\n $this->setParametro('id_funcionario_usu', 'id_funcionario_usu', 'int4');\n $this->setParametro('id_tipo_estado', 'id_tipo_estado', 'int4');\n $this->setParametro('id_funcionario_wf', 'id_funcionario_wf', 'int4');\n $this->setParametro('id_depto_wf', 'id_depto_wf', 'int4');\n $this->setParametro('obs', 'obs', 'text');\n $this->setParametro('json_procesos', 'json_procesos', 'text');\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n //Devuelve la respuesta\n return $this->respuesta;\n }",
"function niveles($area){\n\t\tif ($area->cveentidad2=='0') return 1;\n\t\tif ($area->cveentidad3=='0') return 2;\n\t\tif ($area->cveentidad4=='0') return 3;\n\t\tif ($area->cveentidad5=='0') return 4;\n\t\tif ($area->cveentidad6=='0') return 5;\n\t\tif ($area->cveentidad7=='0') return 6;\n\t}",
"function getEstadosParqueo()\n{\n return array(\n array('codigo' => 'AVL', 'valor' => 'Disponible'),\n array('codigo' => 'OCP', 'valor' => 'Ocupado'),\n array('codigo' => 'RSV', 'valor' => 'Reservado'),\n );\n}",
"function adivinarSexo($array_A){\n $datos=new ManejoDatos();\n $arrayBD =$datos->getEstiloSexoPromedioRecinto();\n if($array_A[0]=='DIVERGENTE'){\n $estilo=4;\n }\n if($array_A[0]=='CONVERGENTE'){\n $estilo=3;\n }\n if($array_A[0]=='ACOMODADOR'){\n $estilo=2;\n }\n if($array_A[0]=='ASIMILADOR'){\n $estilo=1;\n }\n $arrayA = array( $estilo, $array_A[1],($array_A[2] == \"Paraiso\" ? 1 : 2));\n foreach ($arrayBD as $elemento) {\n if($elemento['Estilo']=='DIVERGENTE'){\n $estiloBD=4;\n }\n if($elemento['Estilo']=='CONVERGENTE'){\n $estiloBD=3;\n }\n if($elemento['Estilo']=='ACOMODADOR'){\n $estiloBD=2;\n }\n if($elemento['Estilo']=='ASIMILADOR'){\n $estiloBD=1;\n }\n $arrayB = array($estiloBD, $elemento['Promedio'], $elemento['Recinto'] == \"Paraiso\" ? 1 : 2);\n $temporal = $this->distanciaEuclidiana($arrayA, $arrayB);\n if ($temporal < $this->distancia) {\n $this->distancia = $temporal;\n $this->temporal = $elemento['Sexo'];\n }\n }\n if($this->temporal=='M'){\n $this->temporal=\"Masculino\";\n return $this->temporal;\n }\n if($this->temporal=='F'){\n $this->temporal=\"Femenino\";\n return $this->temporal;\n }\n }",
"public function cuartoNivel()\n {\n\n $imagenPrincipal = DB::table(\"foto_sub_actividades\")\n ->join(\"sub_actividades\", \"sub_actividades.id_sub_actividad\", \"=\", \"foto_sub_actividades.id_sub_actividad\")\n ->select(\n \"foto_sub_actividades.foto\",\n \"sub_actividades.nombre\",\n \"sub_actividades.descripcion\"\n )\n ->where([\n [\"sub_actividades.id_sub_actividad\", \"=\", 60],\n [\"foto_sub_actividades.tipo_foto\", \"=\", \"1\"]\n ])\n ->take(1)\n ->get();\n\n $imagenSecundaria = DB::table(\"foto_sub_actividades\")\n ->join(\"sub_actividades\", \"sub_actividades.id_sub_actividad\", \"=\", \"foto_sub_actividades.id_sub_actividad\")\n ->select(\n \"foto_sub_actividades.foto\",\n \"sub_actividades.nombre\",\n \"foto_sub_actividades.detalle\"\n )\n ->where([\n [\"sub_actividades.id_sub_actividad\", \"=\", 61],\n [\"foto_sub_actividades.tipo_foto\", \"=\", \"2\"]\n ])\n ->get();\n\n $ubicacions = DB::table(\"sub_actividades\")\n ->join(\"ubicacion_actividades\", \"ubicacion_actividades.id_ubicacion_actividad\", \"=\", \"sub_actividades.id_ubicacion_actividad\")\n ->select(\n \"ubicacion_actividades.nombre\",\n \"ubicacion_actividades.fx\",\n \"ubicacion_actividades.fy\"\n )\n ->where(\"sub_actividades.id_sub_actividad\", \"=\", 58)\n ->get();\n\n $resenas = DB::table(\"resena_sub_actividades\")\n ->join(\"sub_actividades\", \"sub_actividades.id_sub_actividad\", \"=\", \"resena_sub_actividades.id_sub_actividad\")\n ->select(\n \"resena_sub_actividades.nombre\",\n \"resena_sub_actividades.detalle\"\n )\n ->where(\"sub_actividades.id_sub_actividad\", \"=\", 58)\n ->get();\n\n\n $actividadesmas = DB::table(\"sub_actividades\")\n ->leftJoin(\"foto_sub_actividades\", \"foto_sub_actividades.id_sub_actividad\", \"=\", \"sub_actividades.id_sub_actividad\")\n ->leftJoin(\"resena_sub_actividades\", \"resena_sub_actividades.id_sub_actividad\", \"=\", \"sub_actividades.id_sub_actividad\")\n ->select(\n \"sub_actividades.id_sub_actividad\",\n \"sub_actividades.nombre\"\n )\n ->whereNotNull(['foto_sub_actividades.foto', \"resena_sub_actividades.nombre\"])\n ->where(\"sub_actividades.activo\", \"=\", \"1\")\n ->groupBy('sub_actividades.id_sub_actividad')\n ->inRandomOrder()->take(4)->get();\n\n\n return view('pagina.nev', compact('imagenPrincipal', 'imagenSecundaria', 'actividadesmas', 'resenas', 'ubicacions'));\n }",
"function buscarEspaciosVistos(){\r\n $i=0;\r\n $espacios_vistos=isset($espacios_vistos)?$espacios_vistos:'';\r\n $espacios=isset($reprobados)?$reprobados:'';\r\n \r\n if(is_array($this->espaciosCursados)){\r\n foreach ($this->espaciosCursados as $espacio) {\r\n $espacios[$i]=$espacio[0];\r\n $i++;\r\n }\r\n }\r\n \r\n if(is_array($espacios)){\r\n $espacios= array_unique($espacios);\r\n if($this->datosEstudiante['IND_CRED']=='S'){\r\n foreach ($espacios as $key => $espacio) {\r\n foreach ($this->espaciosCursados as $cursado) {\r\n if($espacio==$cursado['CODIGO']){\r\n $espacios_vistos[$key]['CODIGO']=$cursado['CODIGO'];\r\n $espacios_vistos[$key]['CREDITOS']=(isset($cursado['CREDITOS'])?$cursado['CREDITOS']:0);\r\n }\r\n }\r\n }\r\n }else{\r\n $espacios_vistos=$espacios;\r\n }\r\n \r\n }\r\n return $espacios_vistos;\r\n }",
"public function establecimientos4()\n\t{\t\n\t\t//-----------------------------------\n\t\t$data['estado'] \t\t= $this->input->post('estado');\n\t\t$departamento\t \t\t= $this->input->post('departamento');\n\t\t$localidad\t\t\t\t= $this->input->post('localidad');\n\t\t$escuela\t\t\t\t= $this->input->post('escuela');\n\t\t\n\t\t$data['localidad']\t\t= $this->input->post('localidad');\n\t\t$data['departamento']\t= $this->input->post('departamento');\n\t\t$data['escuela']\t\t= $this->input->post('escuela');\n\t\t\n\t\t//-----------------------------------\n\t\t$data['escuelas_localidad']\t\t\t=\t$this->opendatagov->datos_escuela($escuela);\n\t\t$escuela_localidad\t\t\t\t\t=\t$this->opendatagov->datos_escuela($escuela);\n\t\t\t\t\n\t\t//-----------------------------------\n\t\tforeach($escuela_localidad->result_array() as $row)\n\t { \n\t $cue = $row['Cue_Anexo'];\n\t }//fin de foreach de datos de la escuela\n\t\t$cue_anexo = substr($cue, 0, -2).'-'.substr($cue, -2);\n\t\t//------------------------------------------------------------\n\t\t$data['cursos_divisiones']\t\t\t=\t$this->opendatagov->datos_cursos($cue_anexo);\n\t\t$data['total']\t\t\t= $this->opendatagov->alumnos_escuela_total($cue_anexo);\n\t\t$data['femeninos']\t\t= $this->opendatagov->alumnos_escuela_femeninos($cue_anexo);\n\t\t$data['masculinos']\t\t= $this->opendatagov->alumnos_escuela_masculinos($cue_anexo);\n\t\t//------------------------------------------------------------\n\t\n\t\t$this->load->view('includes/header');\n\t\t$this->load->view('vista_establecimientos', $data);\n\t\t$this->load->view('includes/footer');\t\t\t\t\n\t}",
"function estudiante($codigoestudiante, $codigoperiodogeneral = '') {\n global $db;\n $query_estudiante = \"SELECT codigoestudiante, idestudiantegeneral, codigocarrera,\n\t\t\t\tsemestre, numerocohorte, codigotipoestudiante, codigosituacioncarreraestudiante, \n\t\t\t\tcodigoperiodo, codigojornada \n\t\t\t\tFROM estudiante\n\t\t\t\twhere codigoestudiante = '$codigoestudiante'\";\n $estudiante = $db->Execute($query_estudiante);\n $totalRows_estudiante = $estudiante->RecordCount();\n $row_estudiante = $estudiante->FetchRow();\n\n $this->setCodigoestudiante($row_estudiante['codigoestudiante']);\n $this->setIdestudiantegeneral($row_estudiante['idestudiantegeneral']);\n $this->setCodigocarrera($row_estudiante['codigocarrera']);\n $this->setSemestre($row_estudiante['semestre']);\n $this->setCodigotipoestudiante($row_estudiante['codigotipoestudiante']);\n $this->setCodigosituacioncarreraestudiante($row_estudiante['codigosituacioncarreraestudiante']);\n $this->setCodigoperiodo($row_estudiante['codigoperiodo']);\n $this->setCodigoperiodogeneral($codigoperiodogeneral);\n $this->setCodigojornada($row_estudiante['codigojornada']);\n\n $this->setIdprematricula();\n $this->setNumerocohorte();\n\n\n $this->estudiantegeneral($row_estudiante['idestudiantegeneral']);\n }",
"function obter_todas_noticias_ativas() {\n $this->db->where(array(\"status_noticia\"=>1));\n $this->db->order_by(\"data_noticia\", \"desc\");\n return $this->db->get('noticia');\n }",
"function ResumenEstadoCC(){\n $this->procedimiento='obingresos.ft_periodo_venta_sel';\n $this->transaccion='OBING_RESESTCC_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n $this->setCount(false);\n\n\n $this->setParametro('id_agencia','id_agencia','int4');\n\n\n\n //Definicion de la lista del resultado del query\n $this->captura('id_agencia','int4');\n $this->captura('tipo','varchar');\n $this->captura('moneda','varchar');\n $this->captura('monto','numeric');\n $this->captura('monto_mb','numeric');\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n\n\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }",
"function __procesarAsistenciaIndividual($cod_interno){\n \n\t\t\t$sql = \"SELECT * FROM \".Config::get(__CLASS__).\" WHERE cod_interno = '$cod_interno'\";\n\t\t\t$asistencias = DB::table_query($sql);\n\t\t\t$motivos = TMotivoInasistencia::motivos();\n\t\t\t$reporte = array();\n\t\t\t$reporte['asistencia'] = array_fill_keys(array('t','f'), 0);\n\t\t\t$reporte['motivos'] = array_fill_keys(array_keys($motivos), 0);\n\t\t\t$reporte['validez'] = array_fill_keys(array('t','f'), 0);\t\t\t\n\t\t\t$reporte['total'] = count($asistencias);\n\n\t\t\tforeach($asistencias as $asistencia){\n\t\t\t\t$reporte['asistencia'][$asistencia['asiste']]++;\n\t\t\t\tif($asistencia['asiste'] == 'f'){\n\t\t\t\t\t$cod_motivo = $asistencia['cod_motivo'];\n\t\t\t\t\t$reporte['motivos'][$cod_motivo]++;\n\t\t\t\t\t$reporte['validez'][$motivos[$cod_motivo]['valida']]++;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $reporte;\n\t\t}",
"function siguienteEstadoSolObligacion()\r\n {\r\n $this->procedimiento = 'tes.ft_solicitud_obligacion_pago_ime';\r\n $this->transaccion = 'TES_SOSIGESTOB_IME';\r\n $this->tipo_procedimiento = 'IME';\r\n\r\n //Define los parametros para la funcion\r\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\r\n $this->setParametro('id_proceso_wf_act', 'id_proceso_wf_act', 'int4');\r\n $this->setParametro('id_estado_wf_act', 'id_estado_wf_act', 'int4');\r\n $this->setParametro('id_funcionario_usu', 'id_funcionario_usu', 'int4');\r\n $this->setParametro('id_tipo_estado', 'id_tipo_estado', 'int4');\r\n $this->setParametro('id_funcionario_wf', 'id_funcionario_wf', 'int4');\r\n $this->setParametro('id_depto_wf', 'id_depto_wf', 'int4');\r\n $this->setParametro('id_depto_lb', 'id_depto_lb', 'int4');\r\n $this->setParametro('obs', 'obs', 'text');\r\n $this->setParametro('json_procesos', 'json_procesos', 'text');\r\n $this->setParametro('instruc_rpc', 'instruc_rpc', 'varchar');\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }",
"public function corregir_boletas_por_sector($sectores = 0, $mes = 0, $anio = 0)\n\t{\n\t\t// if($sectores == 0 )\n\t\t// \t$sectores = $this->input->post('select_tablet');\n\t\t// if($mes == 0 )\n\t\t// \t$mes = $this->input->post('mes');\n\t\t// if($anio == 0 )\n\t\t// \t$anio = $this->input->post('anio');\n\t\t// if($sectores === 0 )\n\t\t// \t{\n\t\t// \t\techo \"Error\";die();\n\t\t// \t}\n\t\t// elseif($sectores == \"A\")\n\t\t// \t$sectores = [ \"A\", \"Jardines del Sur\", \"Aberanstain\", \"Medina\", \"Salas\", \"Santa Barbara\" , \"V Elisa\"];\n\t\t// else $sectores = [ \"B\", \"C\", \"David\", \"ASENTAMIENTO OLMOS\", \"Zaldivar\" ];\n\t\t$todas_las_variables = $this->Nuevo_model->get_data(\"configuracion\");\n\t\t$mediciones_desde_query = $this->Nuevo_model->get_sectores_query_corregir($sectores, $mes, $anio );\n\t\t//var_dump($mediciones_desde_query);die();\n\t\tif($mediciones_desde_query != false)\n\t\t{\n\t\t\t$indice_actual = 0;\n\t\t\tforeach ($mediciones_desde_query as $key ) {\n\t\t\t\tif( ($key->Factura_MedicionAnterior == 0) && ($key->Factura_MedicionActual == 1) ) // bandera de tablet\n\t\t\t\t\tcontinue;\n\t\t\t\tif( ( floatval($key->Factura_PagoMonto) != floatval(0)) && ($key->Factura_PagoContado != NULL) && ($key->Factura_PagoContado != NULL) ) //si esta pagada no se re calcula\n\t\t\t\t\tcontinue;\n\t\t\t\tif( ($key->Conexion_Categoria == 1) || ($key->Conexion_Categoria == \"Familiar\") || ($key->Conexion_Categoria ==\"Familiar \") )\n\t\t\t\t{\n\t\t\t\t\t$precio_metros = $todas_las_variables[3]->Configuracion_Valor;\n\t\t\t\t\t$metros_basicos = $todas_las_variables[5]->Configuracion_Valor;\n\t\t\t\t\t$precio_bsico = $todas_las_variables[4]->Configuracion_Valor;\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t$precio_metros = $todas_las_variables[6]->Configuracion_Valor;\n\t\t\t\t\t$metros_basicos = $todas_las_variables[8]->Configuracion_Valor;\n\t\t\t\t\t$precio_bsico = $todas_las_variables[7]->Configuracion_Valor;\n\t\t\t\t}\n\t\t\t\t$anterior = $key->Factura_MedicionAnterior;\n\t\t\t\t$actual = $key->Factura_MedicionActual;\n\t\t\t\t$inputExcedente = intval($actual) - intval($anterior) - intval($metros_basicos);\n\t\t\t\tif($inputExcedente < 0 )\n\t\t\t\t\t$inputExcedente = 0;\n\t\t\t\t$importe_medicion = 0;\n\t\t\t\tif($inputExcedente == 0)\n\t\t\t\t\t$importe_medicion = 0;\n\t\t\t\telse $importe_medicion = floatval($precio_metros) * floatval($inputExcedente);\n\t\t\t\t//calculo el subtotal y total\n\t\t\t\t$sub_total = floatval($key->Factura_TarifaSocial) \n\t\t\t\t\t\t\t\t\t\t+ floatval($key->Factura_Deuda)\n\t\t\t\t\t\t\t\t\t\t+ floatval($key->Factura_ExcedentePrecio )\n\t\t\t\t\t\t\t\t\t\t+ floatval($key->Factura_CuotaSocial )\n\t\t\t\t\t\t\t\t\t\t+ floatval($key->Factura_Riego )\n\t\t\t\t\t\t\t\t\t\t+ floatval($key->Factura_PM_Cuota_Precio)\n\t\t\t\t\t\t\t\t\t\t+ floatval($key->Factura_PPC_Precio)\n\t\t\t\t\t\t\t\t\t\t+ floatval($key->Factura_Multa);\n\t\t\t\t$total = $sub_total;\n\t\t\t\t$bonificacion = 0;\n\t\t\t\tif($key->Conexion_Deuda == 0)\n\t\t\t\t\t\t//$bonificacion_pago_puntual = (floatval ($excedente) + floatval($tarifa_basica)) * floatval (5) / floatval(100) ;//con bonificacion\n\t\t\t\t\t\t$bonificacion = (floatval ($inputExcedente) + floatval($key->Factura_TarifaSocial)) * floatval (5) / floatval(100) ;//con bonificacion\n\t\t\t\t$total =\tfloatval($total)\n\t\t\t\t\t\t\t\t\t\t- floatval($key->Factura_Acuenta)\n\t\t\t\t\t\t\t\t\t\t- floatval($bonificacion);\n\t\t\t\t//vtos\n\t\t\t\t$vto_2_precio = floatval($total) + floatval($total) * floatval($todas_las_variables[18]->Configuracion_Valor);\n\t\t\t\t$vto_1_precio = $total;\n\t\t\t\t$indice_actual++;\n\t\t\t\t$datos_factura_nueva = array(\n\t\t\t\t\t'Factura_SubTotal' => floatval($sub_total),\n\t\t\t\t\t'Factura_Total' => floatval($total),\n\t\t\t\t\t'Factura_Vencimiento1_Precio' => floatval($vto_1_precio),\n\t\t\t\t\t'Factura_Vencimiento2_Precio' => floatval($vto_2_precio),\n\t\t\t\t\t'Factura_ExcedentePrecio' => floatval($importe_medicion),\n\t\t\t\t\t'Factura_Excedentem3' => $inputExcedente\n\t\t\t\t\t );\n\t\t\t\t$resultado[$indice_actual] = $this->Nuevo_model->update_data_tres_campos($datos_factura_nueva, $key->Conexion_Id, \"facturacion_nueva\",\"Factura_Conexion_Id\", \"Factura_Mes\", $mes, \"Factura_Año\", $anio);\n\t\t\t\tvar_dump($datos_factura_nueva,$key->Conexion_Id);\n\t\t\t}\n\t\t\tvar_dump($datos_factura_nueva);\n\t\t}\n\t\telse\n\t\t\tvar_dump(\"Error. no hay medciones para las variables\");\t\n\t}",
"public function getDirectriz()\n {\n $dir = false;\n if (self::getCod() === '110000') $dir='Enseñanzas Técnicas';\n if (self::getCod() === '120000') $dir='Enseñanzas Técnicas';\n if (self::getCod() === '210000') $dir='Enseñanzas Técnicas';\n if (self::getCod() === '220000') $dir='Ciencias Experimentales';\n if (self::getCod() === '230000') $dir='Ciencias Experimentales';\n if (self::getCod() === '240000') $dir='Ciencias de la Salud';\n if (self::getCod() === '250000') $dir='Ciencias Experimentales';\n if (self::getCod() === '310000') $dir='Ciencias Experimentales';\n if (self::getCod() === '320000') $dir='Ciencias de la Salud';\n if (self::getCod() === '330000') $dir='Enseñanzas Técnicas';\n if (self::getCod() === '510000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '520000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '530000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '540000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '550000') $dir='Humanidades';\n if (self::getCod() === '560000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '570000') $dir='Humanidades';\n if (self::getCod() === '580000') $dir='Humanidades';\n if (self::getCod() === '590000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '610000') $dir='Ciencias de la Salud';\n if (self::getCod() === '620000') $dir='Humanidades';\n if (self::getCod() === '630000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '710000') $dir='Humanidades';\n if (self::getCod() === '720000') $dir='Humanidades';\n return $dir;\n }",
"public function categoriaOcupacional()\n {\n if ($this->PP05A==1 && $this->PP05D==1){\n return 1;\n }\n if ($this->PP05A==1 && ($this->PP05D==2 || $this->PP05D==3)){\n return 2;\n }\n if ($this->PP05A==3){\n return 3;\n }\n if ($this->PP05A==2 && $this->PP05B==2 && $this->PP05B1==3){\n return 4;\n }\n // #Ns./Nr.\n // (me parece que es si no se completa: pp05a=null)\n }",
"function desglose_transito_por_tipo_envio($id_categoria) {\r\n\r\n\t$query = \"SELECT count(*) FROM tipoenvio\";\r\n\t$result = mysql_query($query);\r\n\t$row = mysql_fetch_array($result);\r\n\r\n\t$cant_tipo_envios = $row[0];\r\n\r\n\t$query = \"SELECT oi.id_tipo_envio, sum(oi.cantidad_pendiente) as pendiente\r\n\t\tFROM ordenitem oi join item i on oi.id_item = i.id_item join orden o on o.id_orden = oi.id_orden join tipoenvio te on te.id_tipo_envio = oi.id_tipo_envio\r\n\t\tWHERE i.id_categoria = $id_categoria and o.id_status = 1 and oi.cantidad_pendiente > 0\r\n\t\tGROUP BY oi.id_tipo_envio\r\n\t\tORDER BY te.orden, oi.id_tipo_envio\";\r\n\t$result = mysql_query($query);\r\n\r\n\t$count=0;\r\n\t$en_transito = array();\r\n\twhile ($row = mysql_fetch_array($result))\r\n\t{\r\n\t\tif($count==$row[0]) {\r\n\t\t\tarray_push($en_transito, array($row[0], $row[1]));\r\n\t\t}\r\n\t\telse {\r\n\t\t\twhile($count < $row[0])\r\n\t\t\t{\r\n\t\t\t\tarray_push($en_transito, array($count, 0));\r\n\t\t\t\t$count++;\r\n\t\t\t}\r\n\t\t\tarray_push($en_transito, array($row[0], $row[1]));\r\n\t\t}\r\n\r\n\t\t$count++;\r\n\t}\r\n\r\n\twhile($count < $cant_tipo_envios) {\r\n\t\tarray_push($en_transito, array($count, 0));\r\n\t\t$count++;\r\n\t}\r\n\r\n\t$codigo=\"\"; $trans_desc=0;\r\n\tforeach ($en_transito as $item)\r\n\t{\r\n\t\tif($item[0] > 0) {\r\n\t\t\t$codigo .= \"<td>$item[1]</td>\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$trans_desc = $item[1];\r\n\t\t}\r\n\t}\r\n\r\n\t$codigo .= \"<td>$trans_desc</td>\";\r\n\r\n\treturn $codigo;\r\n}",
"public function estadisticasPersonas()\n {\n $em = $this->getDoctrine()->getManager();\n\n $nacionalidades = $em->getRepository('SICBundle:AdminNacionalidad')->findAll();\n $stat_nacionalidad_jgf = array();\n $stat_nacionalidad_p = array();\n foreach ($nacionalidades as $nacionalidad) {\n array_push(\n $stat_nacionalidad_jgf, array(\n 'nacionalidad' => $nacionalidad->getNacionalidad(),\n 'quienes' => $em->getRepository('SICBundle:JefeGrupoFamiliar')->findBy(array('nacionalidad' => $nacionalidad->getId()))\n )\n );\n array_push(\n $stat_nacionalidad_p, array(\n 'nacionalidad' => $nacionalidad->getNacionalidad(),\n 'quienes' => $em->getRepository('SICBundle:Persona')->findBy(array('nacionalidad' => $nacionalidad->getId()))\n )\n );\n }\n\n $resp_cerradas = $em->getRepository('SICBundle:AdminRespCerrada')->findAll();\n $stat_cne_jgf = array();\n $stat_cne_p = array();\n foreach ($resp_cerradas as $resp) {\n array_push($stat_cne_jgf, array('resp' => $resp->getRespuesta(),'quienes' => $em->getRepository('SICBundle:JefeGrupoFamiliar')->findBy(array('cne' => $resp->getId()))));\n array_push($stat_cne_p, array('resp' => $resp->getRespuesta(),'quienes' => $em->getRepository('SICBundle:Persona')->findBy(array('cne' => $resp->getId()))));\n }\n \n $stat_empleado_jgf = array();\n foreach ($resp_cerradas as $resp) {\n array_push($stat_empleado_jgf, array('resp' => $resp->getRespuesta(),'quienes'=> $em->getRepository('SICBundle:JefeGrupoFamiliar')->findBy(array('trabajaActualmente' => $resp->getId()))));\n }\n\n $instruccion = $em->getRepository('SICBundle:AdminNivelInstruccion')->findAll();\n $stat_instruccion_jgf = array();\n $stat_instruccion_p = array();\n foreach ($instruccion as $elemento) {\n \t$whos = $em->getRepository('SICBundle:JefeGrupoFamiliar')->findBy(array('nivelInstruccion' => $elemento->getId()));\n\t\t\tif (sizeof($whos)>0) { array_push($stat_instruccion_jgf, array('nivel' => $elemento->getNombre(),'quienes'=> $whos)); }\n $whos = $em->getRepository('SICBundle:Persona')->findBy(array('gradoInstruccion' => $elemento->getId()));\n\t\t\tif (sizeof($whos)>0) { array_push($stat_instruccion_p, array('nivel' => $elemento->getNombre(),'quienes'=> $whos)); }\n }\n\n $profesiones = $em->getRepository('SICBundle:AdminProfesion')->findAll();\n $stat_profesiones_jgf = array();\n $stat_profesiones_p = array();\n foreach ($profesiones as $elemento) {\n \t$whos = $em->getRepository('SICBundle:JefeGrupoFamiliar')->findBy(array('profesion' => $elemento->getId()));\n \tif (sizeof($whos)) { array_push($stat_profesiones_jgf, array('profesion' => $elemento->getNombre(),'quienes'=> $whos)); }\n \t$whos = $em->getRepository('SICBundle:Persona')->findBy(array('profesion' => $elemento->getId()));\n \tif (sizeof($whos)) { array_push($stat_profesiones_p, array('profesion' => $elemento->getNombre(),'quienes'=> $whos)); }\n \n }\n\n $discapacidades = $em->getRepository('SICBundle:AdminIncapacidades')->findAll();\n $stat_discapacidades_jgf = array();\n $stat_discapacidades_p = array();\n foreach ($discapacidades as $elemento) {\n $whos = $em->getRepository('SICBundle:JefeGrupoFamiliar')->findBy(array('incapacitadoTipo' => $elemento->getId()));\n if(sizeof($whos) > 0){ array_push($stat_discapacidades_jgf, array('discapacidad' => $elemento->getIncapacidad(),'quienes'=> $whos)); }\n $whos = $em->getRepository('SICBundle:Persona')->findBy(array('incapacitadoTipo' => $elemento->getId()));\n if(sizeof($whos) > 0){ array_push($stat_discapacidades_p, array('discapacidad' => $elemento->getIncapacidad(),'quienes'=> $whos)); }\n \n }\n\n $pensionados = $em->getRepository('SICBundle:AdminPensionadoInstitucion')->findAll();\n $stat_pensionados_jgf = array();\n $stat_pensionados_p = array();\n foreach ($pensionados as $elemento) {\n array_push($stat_pensionados_jgf, array('pensionados' => $elemento->getNombre(),'quienes'=> $em->getRepository('SICBundle:JefeGrupoFamiliar')->findBy(array('pensionadoInstitucion' => $elemento->getId()))));\n array_push($stat_pensionados_p, array('pensionados' => $elemento->getNombre(),'quienes'=> $em->getRepository('SICBundle:Persona')->findBy(array('pensionadoInstitucion' => $elemento->getId()))));\n }\n\n return array(\n 'stat_nacionalidad_jgf' => $stat_nacionalidad_jgf,\n 'stat_nacionalidad_p' => $stat_nacionalidad_p,\n\n 'stat_cne_jgf' => $stat_cne_jgf,\n 'stat_cne_p' => $stat_cne_p,\n\n 'stat_instruccion_jgf' => $stat_instruccion_jgf,\n 'stat_instruccion_p' => $stat_instruccion_p,\n\n 'stat_profesiones_jgf' => $stat_profesiones_jgf,\n 'stat_profesiones_p' => $stat_profesiones_p,\n\n 'stat_empleado_jgf' => $stat_empleado_jgf,\n\n 'stat_discapacidades_jgf' => $stat_discapacidades_jgf,\n 'stat_discapacidades_p' => $stat_discapacidades_p,\n\n 'stat_pensionados_jgf' => $stat_pensionados_jgf,\n 'stat_pensionados_p' => $stat_pensionados_p,\n );\n }",
"public function intensidad(){\n if($this->PP03F < 35 && $this->PP03G == 1 && $this->PP03H == 1)\n {\n return 1;\n }\n if($this->caracteristicas->CH06 >= 10 && $this->PP03G == 1 && $this->PP01E == 5)\n {\n return 2;\n }\n if( $this->PP03F > 40)\n {\n return 3;\n }\n if($this->PP01E == 5)\n {\n return 4;\n }\n}",
"function ejecutarClasificacionEstudiantes($proyecto){\n $this->codProyecto=$proyecto;\n //buscamos estudiantes en prueba academica\n $estudiantes_clasificados = $this->consultarEstudiantesPruebaAcademica();\n //buscamos estudiantes que no estan en prueba academica\n $estudiantes = $this->consultarEstudiantesSinPrueba();\n //buscamos estudiantes con 1 y 2 espacios reprobados\n $resultado = $this->buscarEstudiantesConEspaciosReprobados($estudiantes, $estudiantes_clasificados);\n $estudiantes = $resultado['ESTUDIANTES'];\n $estudiantes_clasificados = $resultado['CLASIFICADOS'];\n unset($resultado);\n //buscamos estudiantes nivelados (sin ningun espacio reprobado)\n $resultado_nivelados = $this->buscarEstudiantesNivelados($estudiantes, $estudiantes_clasificados);\n $estudiantes = $resultado_nivelados['ESTUDIANTES'];\n $estudiantes_clasificados = $resultado_nivelados['CLASIFICADOS'];\n //buscamos estudiantes que no reprobaron el semestre anterior\n $resultado_semAnterior = $this->buscarEstudiantesSinEspaciosReprobadosSemAnterior($estudiantes, $estudiantes_clasificados);\n $resultadoFinal=$this->clasificarOtrosEstudiantes($resultado_semAnterior);\n //ordenar arreglo de estudiantes clasificados\n if(is_array($resultadoFinal)&&!empty($resultadoFinal))\n {\n $estudiantes_clasificados_final= $this->ordenarEstudiantesClasificados($resultadoFinal);\n $insercion = $this->insertarEstudiantesClasificados($estudiantes_clasificados_final);\n }else\n {\n $insercion=0;\n }\n return $insercion ;\n }",
"public function list_acciones_operativas(){ \n $data['menu']=$this->menu(9);\n $data['resp']=$this->session->userdata('funcionario');\n \n //$data['mod2']=count($this->model_configuracion->verif_modulo(2));\n\n $sw=$this->ppto_poa;\n $data['proyectos']=$this->list_pinversion($sw); /// Proyecto de Inversion\n $data['operacion']=$this->list_unidades_es($sw); /// Gasto corriente\n\n //// Asignacion Poa Presupuesto Inicial\n if($this->verif_ppto==0){\n $this->load->view('admin/mantenimiento/ptto_sigep/vlist_ope', $data);\n }\n //// Re-Asignacion Poa Presupuesto Final (Aprobado)\n else{\n $data['regionales']=$this->model_ptto_sigep->list_regionales();\n $this->load->view('admin/mantenimiento/ptto_sigep/reajustado_ptto', $data);\n }\n \n }",
"function getDados($codAtividade){\n\n }"
] |
[
"0.6417956",
"0.62577134",
"0.6169829",
"0.6150378",
"0.605964",
"0.6005738",
"0.5979097",
"0.59071517",
"0.590035",
"0.5888389",
"0.58432215",
"0.5837532",
"0.58314925",
"0.57667875",
"0.5716421",
"0.56992507",
"0.56984264",
"0.56844705",
"0.564921",
"0.56488657",
"0.5613073",
"0.56097436",
"0.5606884",
"0.5600962",
"0.5588516",
"0.55684185",
"0.5566127",
"0.5549294",
"0.5502613",
"0.5481588"
] |
0.66487277
|
0
|
Funcion que recorre los estudiantes clasificados para insertarlos en la tabla de la Base de datos
|
function insertarEstudiantesClasificados($estudiantes){
$cantidad = 0;
foreach ($estudiantes as $key => $datosEstudiante) {
$insertado = $this->adicionarMysqlEstudianteClasificacion($datosEstudiante);
if($insertado >0){
$cantidad++;
$insertado=0;
}
}
return $cantidad;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function insertarTablaInstancia(){\n\t\t$this->procedimiento='wf.ft_tabla_instancia_ime';\n\t\t$this->transaccion='WF_TABLAINS_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\n\t\t$this->setParametro('id_tabla','id_tabla','integer');\n\t\t$this->setParametro('tipo_estado','tipo_estado','varchar');\n\t\t$this->setParametro('tipo_proceso','tipo_proceso','varchar');\n\t\t//si es detalle se añade un parametro para el id del maestro\n\t\tif ($_SESSION['_wf_ins_'.$this->objParam->getParametro('tipo_proceso').'_'.$this->objParam->getParametro('tipo_estado')]['atributos']['vista_tipo'] != 'maestro') {\n\t\t\t\n\t\t\t$this->setParametro($_SESSION['_wf_ins_'.$this->objParam->getParametro('tipo_proceso').'_'.$this->objParam->getParametro('tipo_estado')]['atributos']['vista_campo_maestro'],\n\t\t\t\t\t\t\t\t$_SESSION['_wf_ins_'.$this->objParam->getParametro('tipo_proceso').'_'.$this->objParam->getParametro('tipo_estado')]['atributos']['vista_campo_maestro'],'integer');\n\t\t}\n\t\t//Define los parametros para la funcion\t\t\n\t\tforeach ($_SESSION['_wf_ins_'.$this->objParam->getParametro('tipo_proceso').'_'.$this->objParam->getParametro('tipo_estado')]['columnas'] as $value) {\n\t\t\t$this->setParametro($value['bd_nombre_columna'],$value['bd_nombre_columna'],$value['bd_tipo_columna']);\t\t\t\n\t\t}\t\t\t\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}",
"public function insertar($idordencompra, $nrofactura, $idproveedor, $idpersonal, $idsucursal, $idformapago, $idtipodoc, $iddeposito, \n $fecha_hora, $obs, $monto_compra, $idmercaderia, $cantidad, $precio, $total_exenta, $total_iva5, $total_iva10, $liq_iva5, $liq_iva10, $cuota){\n\n $sql = \"INSERT INTO compras (idordencompra, nrofactura, idproveedor, idpersonal, idsucursal, idformapago, idtipodocumento, iddeposito, fecha, obs, monto, cuotas, estado) \n VALUES ('$idordencompra', '$nrofactura', '$idproveedor', '$idpersonal', '$idsucursal', '$idformapago', '$idtipodoc', '$iddeposito', '$fecha_hora', '$obs', '$monto_compra', '$cuota', '1')\";\n \n $idcompranew = ejecutarConsulta_retornarID($sql);\n\n $num_elementos=0;\n $sw=true;\n\n while($num_elementos < count($idmercaderia)){\n\n $sql_detalle = \"INSERT INTO compras_detalle (idcompra, idmercaderia, cantidad, precio) \n VALUES ('$idcompranew', '$idmercaderia[$num_elementos]', '$cantidad[$num_elementos]', '$precio[$num_elementos]')\";\n ejecutarConsulta($sql_detalle) or $sw = false;\n\n $num_elementos =$num_elementos + 1;\n }\n\n //aca realimazamos la insercion en la tabla libro compras\n\n $sql2 = \"INSERT INTO libro_compras (idcompra, idproveedor, fecha, montoexenta, montoiva5, montoiva10, grabiva5, grabiva10, montopagado) \n VALUES ('$idcompranew', '$idproveedor', '$fecha_hora', '$total_exenta', '$total_iva5', '$total_iva10', '$liq_iva5', '$liq_iva10', '$monto_compra')\";\n\n ejecutarConsulta($sql2);\n\n //aca realizamos la insercion en la tabla cuentas a pagar \n\n if($idformapago == 1){\n $formaPago = 'CONTADO';\n }else{\n $formaPago = 'CREDITO';\n }\n\n $monto_cuota = $monto_compra / $cuota;\n\n $fecha = strtotime($fecha_hora);\n $fecha = date('Y-m-d H:i:s', $fecha);\n $cont = 0;\n\n for ($i=1; $i <= $cuota ; $i++) { \n\n if($i >= 2){\n $cont = $cont + 1;\n $fecha = date(\"Y-m-d H:i:s\", strtotime($fecha_hora. \"+ {$cont} month\"));\n }\n\n if($cuota == 1){\n $concepto = \"Cuota Nro. \". $i .\"/\". $cuota .\" \". $formaPago;\n }else{\n $concepto = \"Cuota Nro. \". $i .\"/\". $cuota .\" \". $formaPago .\" \". $cuota .\" MESES\";\n }\n\n $sql3 = \"INSERT INTO cuentas_a_pagar (idcompra, idproveedor, nrofactura, idnotacredidebi, totalcuota, nrocuota, montocuota, fechavto, obs, estado) \n VALUES ('$idcompranew', '$idproveedor', '$nrofactura', '0', '$cuota', '$i', '$monto_cuota', '$fecha','$concepto', '1')\";\n\n ejecutarConsulta($sql3);\n\n }\n\n $sql4 = \"UPDATE orden_compras SET estado = '2' WHERE idordencompra = '$idordencompra'\";\n ejecutarConsulta($sql4);\n\n return $sw;\n\n }",
"public function insert($datos_){\n $id=$datos_->getId();\n$nombre_proyecto=$datos_->getNombre_proyecto();\n$nombre_actividad=$datos_->getNombre_actividad();\n$modalidad_participacion=$datos_->getModalidad_participacion();\n$responsable=$datos_->getResponsable();\n$fecha_realizacion=$datos_->getFecha_realizacion();\n$producto=$datos_->getProducto();\n$semillero_id=$datos_->getSemillero_id()->getId();\n\n try {\n $sql= \"INSERT INTO `datos_`( `id`, `nombre_proyecto`, `nombre_actividad`, `modalidad_participacion`, `responsable`, `fecha_realizacion`, `producto`, `semillero_id`)\"\n .\"VALUES ('$id','$nombre_proyecto','$nombre_actividad','$modalidad_participacion','$responsable','$fecha_realizacion','$producto','$semillero_id')\";\n return $this->insertarConsulta($sql);\n } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n }\n }",
"public function insert($actividades_fuera);",
"function insertarTabla(){\n\t\t$this->procedimiento='wf.ft_tabla_ime';\n\t\t$this->transaccion='WF_tabla_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_tipo_proceso','id_tipo_proceso','int4');\n\t\t$this->setParametro('vista_id_tabla_maestro','vista_id_tabla_maestro','int4');\n\t\t$this->setParametro('bd_scripts_extras','bd_scripts_extras','text');\n\t\t$this->setParametro('vista_campo_maestro','vista_campo_maestro','varchar');\n\t\t$this->setParametro('vista_scripts_extras','vista_scripts_extras','text');\n\t\t$this->setParametro('bd_descripcion','bd_descripcion','text');\n\t\t$this->setParametro('vista_tipo','vista_tipo','varchar');\n\t\t$this->setParametro('menu_icono','menu_icono','varchar');\n\t\t$this->setParametro('menu_nombre','menu_nombre','varchar');\n\t\t$this->setParametro('vista_campo_ordenacion','vista_campo_ordenacion','varchar');\n\t\t$this->setParametro('vista_posicion','vista_posicion','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('menu_codigo','menu_codigo','varchar');\n\t\t$this->setParametro('bd_nombre_tabla','bd_nombre_tabla','varchar');\n\t\t$this->setParametro('bd_codigo_tabla','bd_codigo_tabla','varchar');\n\t\t$this->setParametro('vista_dir_ordenacion','vista_dir_ordenacion','varchar');\n\t\t$this->setParametro('vista_estados_new','vista_estados_new','varchar');\n\t\t$this->setParametro('vista_estados_delete','vista_estados_delete','varchar');\t\t\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}",
"public static function crearEstudiante($data,$acudiente)\n\t{ \n\n\n//insertamos el acudiente \n\nDB::table('acudiente')->insert(array(\n 'documentoPadre' => $acudiente['documentoPadre'],\n 'nombrePadre'=> $acudiente['nombrePadre'],\n \t'documentoMadre' => $acudiente['documentoMadre'],\n 'nombremadre'=> $acudiente['nombremadre'],\n 'apellidoPadre'=> $acudiente['apellidoPadre'],\n 'apellidoMadre'=> $acudiente['apellidoMadre'],\n \t'ocupacionMadre' => $acudiente['ocupacionMadre'],\n 'ocupacionPadre'=> $acudiente['ocupacionPadre'],\n \t'celularPadre' => $acudiente['celularPadre'],\n 'celularMadre'=> $acudiente['celularMadre'],\n\t\t\t'correoMadre' => $acudiente['correoMadre'],\n 'correoPadre'=> $acudiente['correoPadre'],\n \t'estadoCivil' => $acudiente['estadoCivil'],\n 'nombreAcu'=> $acudiente['nombreAcu'],\n\t\t\t'documentoAcu' => $acudiente['documentoAcu'],\n 'celularAcu'=> $acudiente['celularAcu'],\n 'ocupacion'=> $acudiente['ocupacion'], \n \t'correoAcu'=> $acudiente['correoAcu'], \n \t'parentesco'=>$acudiente['parentesco'] \n )); \n\n//realizamos una consulta a la tabla para sacar el id del acudiente\n$acudientes = DB::table('Acudiente')->get();\n$posicion=1;\nforeach ($acudientes as $acu) { \n if($acu->documentoAcu==$acudiente['documentoAcu'] )\n $posicion=$acu->idAcudiente; \n}\n\n\n\n//$date = new DateTime($data['fechaNac']);\n\n\n\nDB::table('Estudiante')->insert(array(\n 'documento' => $data['documento'],\n 'nombre'=> $data['nombre'],\n \t'apellido' => $data['apellido'],\n 'fechaNac'=> $data['fechaNac'],\n \t'expedicion' => $data['expedicion'],\n 'telefono'=> $data['telefono'],\n \t'celular' => $data['celular'],\n 'direccion'=> $data['direccion'],\n\t\t\t'peso' => $data['peso'],\n 'tipoSangre'=> $data['tipoSangre'],\n \t'anioActual' => $data['anioActual'],\n 'condicion'=> $data['condicion'],\n\t\t\t'religion' => $data['religion'],\n 'idGrado'=> $data['Grado'],\n 'Acudiente_idAcudiente'=>$posicion \n )); \n\n\n\n\n\n\t}",
"public function insertarContenedores(){\n\t\t\t#try{\n\t\t\t\n\t\t\t\t$PDOmysql = consulta();\n\t\t\t\t$PDOmysql->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n\t\t\t\t#Itera entre el array Contenedores, para insertarlo uno por uno.\n\t\t\t\tforeach ($this->contenedores as $contenedor) {\n\t\t\t\t\n\t\t\t\t\t#Se comprueba si el contenedor esta en la base de datos.\n\t\t\t\t\t$sql = 'select idContenedor from Contenedor where idContenedor = :contenedor';\n\t\t\t\t\t$stmt = $PDOmysql->prepare($sql);\n\t\t\t\t\t$stmt->bindParam(':contenedor', $contenedor->get_id());\n\t\t\t\t\t$stmt->execute();\n\t\t\t\t\t$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\t\t#La variable respuesta comprueba si existe o no el contendor.\n\t\t\t\t\t$respuesta = $stmt->rowCount() ? true : false;\n\t\t\t\t\t#Si respuesta es que no existe el contenedor aun en la base de datos.\n\t\t\t\t\tif(! $respuesta){\n\t\t\t\t\t\t#Inserta el contenedor.\n\t\t\t\t\t\t$sql = 'insert into Contenedor(idContenedor,Tipo) values(:contenedor, :tipo);';\n\t\t\t\t\t\t$stmt = $PDOmysql->prepare($sql);\n\t\t\t\t\t\t$stmt->bindParam(':contenedor', $contenedor->get_id()); #get_id() y get_tipo()\n\t\t\t\t\t\t$stmt->bindParam(':tipo', $contenedor->get_tipo());\t\t#son metodos de la clase contenedor.\n\t\t\t\t\t\t$stmt->execute();\n\t\t\t\t\t}\n\n\t\t\t\t\t$sql = 'SELECT Flete_idFlete, Contenedor \n\t\t\t\t\t\t\tfrom Contenedor_Viaje \n\t\t\t\t\t\t\twhere \n\t\t\t\t\t\t\tFlete_idFlete = :flete\n\t\t\t\t\t\t\tand\n\t\t\t\t\t\t\tContenedor = :contenedor';\n\n\n\t\t\t\t\t$stmt = $PDOmysql->prepare($sql);\n\t\t\t\t\t$stmt->bindParam(':contenedor', $contenedor->get_id());\n\t\t\t\t\t$stmt->bindParam(':flete', $this->flete);\n\t\t\t\t\t$stmt->execute();\n\t\t\t\t\t$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\t\t#La variable respuesta comprueba si existe o no el contendor.\n\t\t\t\t\t$respuesta = $stmt->rowCount() ? true : false;\n\n\t\t\t\t\tif(! $respuesta){\n\t\t\t\t\t\t#Incicializa el viaje para el flete, asignando contenedores al flete.\n\t\t\t\t\t\t$sql = 'insert into Contenedor_Viaje(WorkOrder,Booking,Flete_idFlete, Contenedor) values(:workorder, :booking, :flete, :contenedor);';\n\t\t\t\t\t\t$stmt = $PDOmysql->prepare($sql);\n\t\t\t\t\t\t$stmt->bindParam(':workorder', $contenedor->get_workorder());\n\t\t\t\t\t\t$stmt->bindParam(':booking', $contenedor->get_booking());\n\t\t\t\t\t\t$stmt->bindParam(':flete', $contenedor->get_flete());\n\t\t\t\t\t\t$stmt->bindParam(':contenedor', $contenedor->get_id());\n\t\t\t\t\t\t$stmt->execute();\n\t\t\t\t\t\t\t\t//Cada contenedor tiene un objeto ListaSellos.\n\t\t\t\t\t\t\t\t#Se manda a llamar al objeto, y este llama a su metodo insertar, para\n\t\t\t\t\t\t\t\t#añadir los sellos a la base de datos.\n\t\t\t\t\t\t\t\t#Esto se puede ya que cada contenedor conoce el flete al que pertenece.\n\t\t\t\t\t}\n\n\t\t\t\t\telse{\n\t\t\t\t\t\t$update = new Update;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$camposUpdate = array(\"statusA\" => 'Activo');\n\t\t\t\t\t\t$camposWhereUpdate = array(\"Flete_idFlete\" => $this->flete, \"Contenedor\" => $contenedor );\n\n\t\t\t\t\t\t$update->prepareUpdate(\"Contenedor_Viaje\", $camposUpdate, $camposWhereUpdate);\n\t\t\t\t\t\t$update->createUpdate();\n\t\t\t\t\t}\n\n\t\t\t\t\t$listaSellos = $contenedor->get_sellos();\n\t\t\t\t\tif($listaSellos){\n\t\t\t\t\t\t$listaSellos->insertar_sellos();\n\t\t\t\t\t}\t\t\n\n\t\t\t\t}\n\t\t\t#}catch(Exception $e){\n\n\t\t\t#}\n\n\t\t}",
"public function run()\n {\n \n\n \\DB::table('tblinstancia')->delete();\n \n \\DB::table('tblinstancia')->insert(array (\n 0 => \n array (\n 'id' => 1,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '1° Juzgado Civil',\n 'sigla' => '1JCI',\n 'tipo' => 'CI',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 1 => \n array (\n 'id' => 2,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '2° Juzgado Civil',\n 'sigla' => '2JCI',\n 'tipo' => 'CI',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 2 => \n array (\n 'id' => 3,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '3° Juzgado Civil',\n 'sigla' => '3JC',\n 'tipo' => 'CI',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 3 => \n array (\n 'id' => 4,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '1° Juzgado de Paz Letrado',\n 'sigla' => '2JPL',\n 'tipo' => 'PL',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 4 => \n array (\n 'id' => 5,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '2° Juzgado de Paz Letrado',\n 'sigla' => '3JPL',\n 'tipo' => 'PL',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 5 => \n array (\n 'id' => 6,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'EXHORTO',\n 'sigla' => 'EXH',\n 'tipo' => NULL,\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 6 => \n array (\n 'id' => 7,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Juzgado Mixto - MBJ Alto del Alianza',\n 'sigla' => 'JM-AA',\n 'tipo' => 'JM',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 7 => \n array (\n 'id' => 8,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Juz. Inv. Prep - MBJ AA',\n 'sigla' => '1JIP',\n 'tipo' => 'IP',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 8 => \n array (\n 'id' => 9,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Juz. Inv. Preparatoria - Sede Tarata',\n 'sigla' => 'JIP',\n 'tipo' => 'IP',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 9 => \n array (\n 'id' => 10,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '2° Juz. Inv. Prep. - FLAGRANCIA, OAF Y CEED',\n 'sigla' => '2JIP',\n 'tipo' => 'IP',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 10 => \n array (\n 'id' => 11,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Sala Penal de Apelaciones',\n 'sigla' => '1SAP',\n 'tipo' => 'SP',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 11 => \n array (\n 'id' => 12,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '5° Juzgado de Investigación Preparatoria - Flagrancia',\n 'sigla' => '5JIP',\n 'tipo' => 'IP',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 12 => \n array (\n 'id' => 13,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '1° Sala Civil',\n 'sigla' => 'SC',\n 'tipo' => 'SC',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 13 => \n array (\n 'id' => 14,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '1° Juzgado Unipersonal Supraprovincial',\n 'sigla' => '1JUN',\n 'tipo' => 'PU',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 14 => \n array (\n 'id' => 15,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Juzgado de Paz Letrado Laboral',\n 'sigla' => '1JPL',\n 'tipo' => 'PL',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 15 => \n array (\n 'id' => 16,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Juzgado de Trabajo Transitorio',\n 'sigla' => '1JTT',\n 'tipo' => 'LA',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 16 => \n array (\n 'id' => 17,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Juzgado Penal Colegiado Supraprovincial',\n 'sigla' => '1JPC',\n 'tipo' => 'JP',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 17 => \n array (\n 'id' => 18,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '3° Juzgado de Paz Letrado',\n 'sigla' => '3JPL',\n 'tipo' => 'PL',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 18 => \n array (\n 'id' => 19,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Sala Laboral Permanente',\n 'sigla' => 'SL',\n 'tipo' => 'SL',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 19 => \n array (\n 'id' => 20,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '2° Juzgado Unipersonal Supraprovincial - FLAGRANCIA, OAF Y CEED',\n 'sigla' => '2JUN',\n 'tipo' => 'PU',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 20 => \n array (\n 'id' => 21,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '1° Juzgado de Trabajo',\n 'sigla' => '1JT',\n 'tipo' => 'LA',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 21 => \n array (\n 'id' => 22,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '2° Juzgado Especializado de Trabajo',\n 'sigla' => '2JTR',\n 'tipo' => 'LA',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 22 => \n array (\n 'id' => 23,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '4° Juzgado de Investigación Preparatoria',\n 'sigla' => '4JIP',\n 'tipo' => 'IP',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 23 => \n array (\n 'id' => 24,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Juzgado Civil Transitorio',\n 'sigla' => '1JCT',\n 'tipo' => 'CI',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 24 => \n array (\n 'id' => 25,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '1° Juzgado de Familia',\n 'sigla' => '1JF',\n 'tipo' => 'FA',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 25 => \n array (\n 'id' => 26,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '2° Juzgado de Familia',\n 'sigla' => '2JF',\n 'tipo' => 'FA',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 26 => \n array (\n 'id' => 27,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Juzgado Mixto - Sede Locumba',\n 'sigla' => 'JM-JB',\n 'tipo' => 'JM',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 27 => \n array (\n 'id' => 28,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Juz. de Familia Tran. - MBJ GAL',\n 'sigla' => 'JFT-GAL',\n 'tipo' => 'FA',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 28 => \n array (\n 'id' => 29,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '6° Juzgado Inv. Preparatoria - DELITO AD. TRIB. MCDO. Y AMB',\n 'sigla' => '6JIP',\n 'tipo' => 'IP',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 29 => \n array (\n 'id' => 30,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '3° Juzgado de Trabajo',\n 'sigla' => '3JT',\n 'tipo' => 'LA',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 30 => \n array (\n 'id' => 31,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '4° Juzgado Civil',\n 'sigla' => '4JC',\n 'tipo' => 'CI',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 31 => \n array (\n 'id' => 32,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '2° Sala Civil',\n 'sigla' => '2SC',\n 'tipo' => 'SC',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 32 => \n array (\n 'id' => 33,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Juzgado Mixto - Tarata',\n 'sigla' => 'JM-TA',\n 'tipo' => 'JM',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 33 => \n array (\n 'id' => 34,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '3° Juzgado Unipersonal Supraprovincial',\n 'sigla' => '3JUN',\n 'tipo' => 'PU',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 34 => \n array (\n 'id' => 35,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '3° Juzgado de Investigación Preparatoria',\n 'sigla' => '3JIP',\n 'tipo' => 'IP',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 35 => \n array (\n 'id' => 36,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '1° Juzgado de Investigación Preparatoria',\n 'sigla' => '1JIP',\n 'tipo' => 'IP',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 36 => \n array (\n 'id' => 37,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '3° Juzgado de Familia',\n 'sigla' => '3JF',\n 'tipo' => 'FA',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 37 => \n array (\n 'id' => 38,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '4° Juzgado de Familia',\n 'sigla' => '4JF',\n 'tipo' => 'FA',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 38 => \n array (\n 'id' => 39,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Juz. Penal Liquidador (Ad. Funciones 5° JIP)- Sede Central',\n 'sigla' => '5JP',\n 'tipo' => 'JP',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 39 => \n array (\n 'id' => 40,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Juzgado Unipersonal - Sede Tarata',\n 'sigla' => 'JU',\n 'tipo' => NULL,\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 40 => \n array (\n 'id' => 41,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Juz. de Paz Letrado - MBJ Alto del Alianza',\n 'sigla' => 'JPL',\n 'tipo' => 'PL',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 41 => \n array (\n 'id' => 42,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Juz. de Paz Letrado - Sede Tarata',\n 'sigla' => 'JPL',\n 'tipo' => 'PL',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 42 => \n array (\n 'id' => 43,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Juz. Inv. Prep. - MBJ GAL',\n 'sigla' => '1JIP',\n 'tipo' => 'IP',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 43 => \n array (\n 'id' => 44,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Sala Penal Liquidadora(Ad. Func. Sala Penal Apelac.)',\n 'sigla' => '1SPL',\n 'tipo' => 'SP',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 44 => \n array (\n 'id' => 45,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Juzgado Penal Liquidador (AD Funciones 4° JIP)',\n 'sigla' => '1JPL',\n 'tipo' => 'JP',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 45 => \n array (\n 'id' => 46,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'OTROS',\n 'sigla' => 'OTR',\n 'tipo' => NULL,\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 46 => \n array (\n 'id' => 47,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Juzgado Mixto - Candarave',\n 'sigla' => 'JM-CA',\n 'tipo' => 'JM',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 47 => \n array (\n 'id' => 48,\n 'tblmodulo_id' => NULL,\n 'tbldepartamento_id' => 15,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '9° Juzgado de Familia',\n 'sigla' => '9JF',\n 'tipo' => 'FA',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 48 => \n array (\n 'id' => 49,\n 'tblmodulo_id' => NULL,\n 'tbldepartamento_id' => 15,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '10° Juzgado de Familia',\n 'sigla' => '10JF',\n 'tipo' => 'FA',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 49 => \n array (\n 'id' => 50,\n 'tblmodulo_id' => NULL,\n 'tbldepartamento_id' => 15,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '11° Juzgado de Familia',\n 'sigla' => '11JF',\n 'tipo' => 'FA',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 50 => \n array (\n 'id' => 51,\n 'tblmodulo_id' => NULL,\n 'tbldepartamento_id' => 15,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '12° Juzgado de Familia',\n 'sigla' => '12JF',\n 'tipo' => 'FA',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 51 => \n array (\n 'id' => 52,\n 'tblmodulo_id' => NULL,\n 'tbldepartamento_id' => 15,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '13° Juzgado de Familia',\n 'sigla' => '13JF',\n 'tipo' => 'FA',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 52 => \n array (\n 'id' => 53,\n 'tblmodulo_id' => NULL,\n 'tbldepartamento_id' => 15,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '14° Juzgado de Familia',\n 'sigla' => '14JF',\n 'tipo' => 'FA',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 53 => \n array (\n 'id' => 54,\n 'tblmodulo_id' => NULL,\n 'tbldepartamento_id' => 15,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '15° Juzgado de Familia',\n 'sigla' => '15JF',\n 'tipo' => 'FA',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 54 => \n array (\n 'id' => 55,\n 'tblmodulo_id' => NULL,\n 'tbldepartamento_id' => 15,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '16° Juzgado de Familia',\n 'sigla' => '16JF',\n 'tipo' => 'FA',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 55 => \n array (\n 'id' => 56,\n 'tblmodulo_id' => NULL,\n 'tbldepartamento_id' => 15,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '17° Juzgado de Familia',\n 'sigla' => '17JF',\n 'tipo' => 'FA',\n 'estadistica' => 0,\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 56 => \n array (\n 'id' => 57,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '1° JUZGADO DE FAMILIA - SEDE ANEXO 1',\n 'sigla' => '1JFSA1',\n 'tipo' => 'FA',\n 'estadistica' => 1,\n 'created_at' => '2019-02-14 23:21:48',\n 'updated_at' => '2019-02-14 23:21:48',\n 'deleted_at' => NULL,\n ),\n 57 => \n array (\n 'id' => 58,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '2° JUZGADO DE FAMILIA - SEDE JUZG. FAMILIA',\n 'sigla' => '2JFSJF',\n 'tipo' => 'FA',\n 'estadistica' => 1,\n 'created_at' => '2019-02-14 23:22:21',\n 'updated_at' => '2019-02-14 23:22:21',\n 'deleted_at' => NULL,\n ),\n 58 => \n array (\n 'id' => 59,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'JUZGADO DE FAMILIA - SEDE ANCÓN Y SANTA ROSA',\n 'sigla' => 'JFSA',\n 'tipo' => 'FA',\n 'estadistica' => 1,\n 'created_at' => '2019-02-14 23:22:49',\n 'updated_at' => '2019-08-28 10:05:59',\n 'deleted_at' => NULL,\n ),\n 59 => \n array (\n 'id' => 60,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'JUZGADO DE FAMILIA - SEDE MI PERÚ',\n 'sigla' => 'JFSMP',\n 'tipo' => 'FA',\n 'estadistica' => 1,\n 'created_at' => '2019-02-14 23:23:15',\n 'updated_at' => '2019-08-28 10:06:43',\n 'deleted_at' => NULL,\n ),\n 60 => \n array (\n 'id' => 61,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'JUZGADO DE FAMILIA - SEDE PACHACÚTEC',\n 'sigla' => 'JFSP',\n 'tipo' => 'FA',\n 'estadistica' => 1,\n 'created_at' => '2019-02-14 23:23:42',\n 'updated_at' => '2019-08-28 10:07:08',\n 'deleted_at' => NULL,\n ),\n 61 => \n array (\n 'id' => 62,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'JUZGADO CIVIL TRANSITORIO - SEDE ANCON',\n 'sigla' => 'JCTSA',\n 'tipo' => 'CI',\n 'estadistica' => 1,\n 'created_at' => '2019-02-14 23:23:42',\n 'updated_at' => '2019-06-20 20:17:31',\n 'deleted_at' => '2019-06-20 20:17:31',\n ),\n 62 => \n array (\n 'id' => 63,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Fiscalía Provincial Corporativa de Tacna 1°',\n 'sigla' => 'FPC-T1',\n 'tipo' => 'MP',\n 'estadistica' => 0,\n 'created_at' => '2019-02-18 15:26:06',\n 'updated_at' => '2019-02-18 15:33:15',\n 'deleted_at' => NULL,\n ),\n 63 => \n array (\n 'id' => 64,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Fiscalía Provincial Corporativa de Tacna 2°',\n 'sigla' => 'FPC-T2',\n 'tipo' => 'MP',\n 'estadistica' => 0,\n 'created_at' => '2019-02-18 15:26:07',\n 'updated_at' => '2019-02-18 15:33:07',\n 'deleted_at' => NULL,\n ),\n 64 => \n array (\n 'id' => 65,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Fiscalía Provincial Corporativa de Tacna 3°',\n 'sigla' => 'FPC-T3',\n 'tipo' => 'MP',\n 'estadistica' => 0,\n 'created_at' => '2019-02-18 15:30:54',\n 'updated_at' => '2019-02-18 16:02:42',\n 'deleted_at' => NULL,\n ),\n 65 => \n array (\n 'id' => 66,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Fiscalía Provincial Corporativa de Tacna 4°',\n 'sigla' => 'FPC-T4',\n 'tipo' => 'MP',\n 'estadistica' => 0,\n 'created_at' => '2019-02-18 15:31:23',\n 'updated_at' => '2019-02-18 16:02:57',\n 'deleted_at' => NULL,\n ),\n 66 => \n array (\n 'id' => 67,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Fiscalía Provincial Corporativa de Tacna 5°',\n 'sigla' => 'FPC-T5',\n 'tipo' => 'MP',\n 'estadistica' => 0,\n 'created_at' => '2019-02-18 15:31:44',\n 'updated_at' => '2019-02-18 16:02:22',\n 'deleted_at' => NULL,\n ),\n 67 => \n array (\n 'id' => 68,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Fiscalía Provincial Corporativa de Tacna 6°',\n 'sigla' => 'FPC-T6',\n 'tipo' => 'MP',\n 'estadistica' => 0,\n 'created_at' => '2019-02-18 15:32:21',\n 'updated_at' => '2019-02-18 16:02:48',\n 'deleted_at' => NULL,\n ),\n 68 => \n array (\n 'id' => 69,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Fiscalía Provincial Corporativa de Tacna 7°',\n 'sigla' => 'FPC-T7',\n 'tipo' => 'MP',\n 'estadistica' => 0,\n 'created_at' => '2019-02-18 15:26:06',\n 'updated_at' => '2019-02-18 15:33:15',\n 'deleted_at' => NULL,\n ),\n 69 => \n array (\n 'id' => 70,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Fiscalía Provincial Corporativa de Tacna 8°',\n 'sigla' => 'FPC-T8',\n 'tipo' => 'MP',\n 'estadistica' => 0,\n 'created_at' => '2019-02-18 15:26:06',\n 'updated_at' => '2019-02-18 15:33:15',\n 'deleted_at' => NULL,\n ),\n 70 => \n array (\n 'id' => 71,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Fiscalía Provincial Corporativa de Tacna 9°',\n 'sigla' => 'FPC-T9',\n 'tipo' => 'MP',\n 'estadistica' => 0,\n 'created_at' => '2019-02-18 15:26:06',\n 'updated_at' => '2019-02-18 15:33:15',\n 'deleted_at' => NULL,\n ),\n 71 => \n array (\n 'id' => 72,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Fiscalía Provincial Mixta Corporativa de Alto de la Alianza',\n 'sigla' => 'FP-AL',\n 'tipo' => 'MP',\n 'estadistica' => 0,\n 'created_at' => '2019-02-18 15:26:07',\n 'updated_at' => '2019-02-18 15:33:07',\n 'deleted_at' => NULL,\n ),\n 72 => \n array (\n 'id' => 73,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Fiscalía Provincial Mixta Corporativa de Gregorio Albarracín',\n 'sigla' => 'FP-GAL',\n 'tipo' => 'MP',\n 'estadistica' => 0,\n 'created_at' => '2019-02-18 15:30:54',\n 'updated_at' => '2019-02-18 16:02:42',\n 'deleted_at' => NULL,\n ),\n 73 => \n array (\n 'id' => 74,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Fiscalía Provincial Mixta Corporativa de Tarata',\n 'sigla' => 'FP-T',\n 'tipo' => 'MP',\n 'estadistica' => 0,\n 'created_at' => '2019-02-18 15:31:23',\n 'updated_at' => '2019-02-18 16:02:57',\n 'deleted_at' => NULL,\n ),\n 74 => \n array (\n 'id' => 75,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Fiscalía Provincial Mixta Corporativa de Candarave',\n 'sigla' => 'FP-C',\n 'tipo' => 'MP',\n 'estadistica' => 0,\n 'created_at' => '2019-02-18 15:31:44',\n 'updated_at' => '2019-02-18 16:02:22',\n 'deleted_at' => NULL,\n ),\n 75 => \n array (\n 'id' => 76,\n 'tblmodulo_id' => 30,\n 'tbldepartamento_id' => 23,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Fiscalía Provincial Mixta Corporativa de Jorge Basadre',\n 'sigla' => 'FP-JB',\n 'tipo' => 'MP',\n 'estadistica' => 0,\n 'created_at' => '2019-02-18 15:32:21',\n 'updated_at' => '2019-02-18 16:02:48',\n 'deleted_at' => NULL,\n ),\n 76 => \n array (\n 'id' => 77,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '1º Fiscalía Provincial Penal Corporativa de Ventanilla',\n 'sigla' => '1FPPCV',\n 'tipo' => 'MP',\n 'estadistica' => 0,\n 'created_at' => '2019-05-23 01:06:31',\n 'updated_at' => '2019-05-23 01:06:31',\n 'deleted_at' => NULL,\n ),\n 77 => \n array (\n 'id' => 78,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '2º Fiscalía Provincial Penal Corporativa de Ventanilla',\n 'sigla' => '2FPPCV',\n 'tipo' => 'MP',\n 'estadistica' => 0,\n 'created_at' => '2019-05-23 01:07:07',\n 'updated_at' => '2019-05-23 01:07:07',\n 'deleted_at' => NULL,\n ),\n 78 => \n array (\n 'id' => 79,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '3º Fiscalía Provincial Penal Corporativa de Ventanilla',\n 'sigla' => '3FPPCV',\n 'tipo' => 'MP',\n 'estadistica' => 0,\n 'created_at' => '2019-05-23 01:07:30',\n 'updated_at' => '2019-05-23 01:07:30',\n 'deleted_at' => NULL,\n ),\n 79 => \n array (\n 'id' => 80,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '4º Fiscalía Provincial Penal Corporativa de Ventanilla',\n 'sigla' => '4FPPCV',\n 'tipo' => 'MP',\n 'estadistica' => 0,\n 'created_at' => '2019-05-23 01:07:48',\n 'updated_at' => '2019-05-23 01:07:48',\n 'deleted_at' => NULL,\n ),\n 80 => \n array (\n 'id' => 81,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '5º Fiscalía Provincial Penal Corporativa de Ventanilla',\n 'sigla' => '5FPPCV',\n 'tipo' => 'MP',\n 'estadistica' => 0,\n 'created_at' => '2019-05-23 01:08:05',\n 'updated_at' => '2019-05-23 01:08:05',\n 'deleted_at' => NULL,\n ),\n 81 => \n array (\n 'id' => 82,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Fiscalía Provincial Penal Corporativa de Mi Perú',\n 'sigla' => 'FPPCMP',\n 'tipo' => 'MP',\n 'estadistica' => 0,\n 'created_at' => '2019-05-23 01:08:29',\n 'updated_at' => '2019-05-23 01:08:29',\n 'deleted_at' => NULL,\n ),\n 82 => \n array (\n 'id' => 83,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '1º Fiscalía Provincial Penal Corporativa de Santa Rosa - Ancón',\n 'sigla' => '1FPPCSRA',\n 'tipo' => 'MP',\n 'estadistica' => 0,\n 'created_at' => '2019-05-23 01:09:15',\n 'updated_at' => '2019-05-23 01:09:15',\n 'deleted_at' => NULL,\n ),\n 83 => \n array (\n 'id' => 84,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '2º Fiscalía Provincial Penal Corporativa de Santa Rosa - Ancón',\n 'sigla' => '2FPPCSRA',\n 'tipo' => 'MP',\n 'estadistica' => 0,\n 'created_at' => '2019-05-23 01:09:33',\n 'updated_at' => '2019-05-23 01:09:33',\n 'deleted_at' => NULL,\n ),\n 84 => \n array (\n 'id' => 85,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '3º Fiscalía Provincial Penal Corporativa de Santa Rosa - Ancón',\n 'sigla' => '3FPPCSRA',\n 'tipo' => 'MP',\n 'estadistica' => 0,\n 'created_at' => '2019-05-23 01:09:49',\n 'updated_at' => '2019-05-23 01:09:49',\n 'deleted_at' => NULL,\n ),\n 85 => \n array (\n 'id' => 86,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '1º Juzgado de Paz Letrado Ventanilla',\n 'sigla' => '1JPLV',\n 'tipo' => 'PL',\n 'estadistica' => 0,\n 'created_at' => '2019-05-23 01:12:35',\n 'updated_at' => '2019-05-23 01:12:35',\n 'deleted_at' => NULL,\n ),\n 86 => \n array (\n 'id' => 87,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '2º Juzgado de Paz Letrado Ventanilla',\n 'sigla' => '2JPLV',\n 'tipo' => 'PL',\n 'estadistica' => 0,\n 'created_at' => '2019-05-23 01:15:45',\n 'updated_at' => '2019-05-23 01:15:45',\n 'deleted_at' => NULL,\n ),\n 87 => \n array (\n 'id' => 88,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Juzgado de Paz Letrado de Trabajo Ventanilla',\n 'sigla' => 'JPLTV',\n 'tipo' => 'PL',\n 'estadistica' => 0,\n 'created_at' => '2019-05-23 01:16:32',\n 'updated_at' => '2019-05-23 01:16:32',\n 'deleted_at' => NULL,\n ),\n 88 => \n array (\n 'id' => 89,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Juzgado de Paz Letrado Mi Peru',\n 'sigla' => 'JPLMP',\n 'tipo' => 'PL',\n 'estadistica' => 0,\n 'created_at' => '2019-05-23 01:17:03',\n 'updated_at' => '2019-05-23 01:17:03',\n 'deleted_at' => NULL,\n ),\n 89 => \n array (\n 'id' => 90,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Juzgado de Paz Letrado Ancon y Santa Rosa',\n 'sigla' => 'JPLASR',\n 'tipo' => 'PL',\n 'estadistica' => 0,\n 'created_at' => '2019-05-23 01:17:45',\n 'updated_at' => '2019-05-23 01:17:45',\n 'deleted_at' => NULL,\n ),\n 90 => \n array (\n 'id' => 91,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Juzgado de Paz Letrado Pachacutec',\n 'sigla' => 'JPLP',\n 'tipo' => 'PL',\n 'estadistica' => 0,\n 'created_at' => '2019-05-23 01:18:20',\n 'updated_at' => '2019-05-23 01:18:20',\n 'deleted_at' => NULL,\n ),\n 91 => \n array (\n 'id' => 92,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Juzgado de Investigación Preparatoria Mi Peru',\n 'sigla' => 'JIPMP',\n 'tipo' => 'IP',\n 'estadistica' => 0,\n 'created_at' => '2019-05-23 01:20:59',\n 'updated_at' => '2019-05-23 01:20:59',\n 'deleted_at' => NULL,\n ),\n 92 => \n array (\n 'id' => 93,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Juzgado de Investigación Preparatoria Transitoria Mi Peru',\n 'sigla' => 'JIPTMP',\n 'tipo' => 'IP',\n 'estadistica' => 0,\n 'created_at' => '2019-05-23 01:21:23',\n 'updated_at' => '2019-05-23 01:21:23',\n 'deleted_at' => NULL,\n ),\n 93 => \n array (\n 'id' => 94,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Juzgado de Investigación Preparatoria Ancon y Santa Rosa',\n 'sigla' => 'JIPASR',\n 'tipo' => 'IP',\n 'estadistica' => 0,\n 'created_at' => '2019-05-23 01:21:53',\n 'updated_at' => '2019-05-23 01:21:53',\n 'deleted_at' => NULL,\n ),\n 94 => \n array (\n 'id' => 95,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Juzgado de Investigación Preparatoria Pachacutec',\n 'sigla' => 'JIPP',\n 'tipo' => 'IP',\n 'estadistica' => 0,\n 'created_at' => '2019-05-23 01:22:16',\n 'updated_at' => '2019-05-23 01:22:16',\n 'deleted_at' => NULL,\n ),\n 95 => \n array (\n 'id' => 96,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Juzgado Penal Unipersonal Mi Peru',\n 'sigla' => 'JPUMP',\n 'tipo' => 'PU',\n 'estadistica' => 0,\n 'created_at' => '2019-05-23 01:23:09',\n 'updated_at' => '2019-05-23 01:23:09',\n 'deleted_at' => NULL,\n ),\n 96 => \n array (\n 'id' => 97,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'Juzgado Penal Unipersonal Ancon y Santa Rosa',\n 'sigla' => 'JPUASR',\n 'tipo' => 'PU',\n 'estadistica' => 0,\n 'created_at' => '2019-05-23 01:23:45',\n 'updated_at' => '2019-05-23 01:23:45',\n 'deleted_at' => NULL,\n ),\n 97 => \n array (\n 'id' => 98,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '1º Juzgado Penal Unipersonal Transitorio Pachacutec',\n 'sigla' => '1JPUTP',\n 'tipo' => 'PU',\n 'estadistica' => 0,\n 'created_at' => '2019-05-23 01:24:55',\n 'updated_at' => '2019-05-23 01:24:55',\n 'deleted_at' => NULL,\n ),\n 98 => \n array (\n 'id' => 99,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => '2º Juzgado Penal Unipersonal Transitorio Pachacutec',\n 'sigla' => '2JPUTP',\n 'tipo' => 'PU',\n 'estadistica' => 0,\n 'created_at' => '2019-05-23 01:25:16',\n 'updated_at' => '2019-05-23 01:25:16',\n 'deleted_at' => NULL,\n ),\n 99 => \n array (\n 'id' => 100,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'JUZGADO DE FAMILIA - SEDE MI PERÚ',\n 'sigla' => 'JFMP',\n 'tipo' => 'FA',\n 'estadistica' => 0,\n 'created_at' => '2019-08-27 09:28:31',\n 'updated_at' => '2019-08-28 10:07:33',\n 'deleted_at' => '2019-08-28 10:07:33',\n ),\n 100 => \n array (\n 'id' => 101,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'JUZGADO DE FAMILIA - SEDE ANCÓN Y SANTA ROSA',\n 'sigla' => 'JFASR',\n 'tipo' => 'FA',\n 'estadistica' => 0,\n 'created_at' => '2019-08-27 09:29:16',\n 'updated_at' => '2019-08-28 10:06:14',\n 'deleted_at' => '2019-08-28 10:06:14',\n ),\n 101 => \n array (\n 'id' => 102,\n 'tblmodulo_id' => 33,\n 'tbldepartamento_id' => 7,\n 'tblprovincia_id' => NULL,\n 'tbldistrito_id' => NULL,\n 'nombre' => 'JUZGADO DE FAMILIA - SEDE PACHACÚTEC',\n 'sigla' => 'JFP',\n 'tipo' => 'FA',\n 'estadistica' => 0,\n 'created_at' => '2019-08-27 09:29:47',\n 'updated_at' => '2019-08-28 10:07:41',\n 'deleted_at' => '2019-08-28 10:07:41',\n ),\n ));\n \n \n }",
"static public function mdlIngresarInventario($tabla, $datos){\n\n \t\t$stmt = Conexion::conectar()->prepare(\"INSERT INTO $tabla(nombre, medida_ingreso, cantidad_alerta, costo_ideal ,codigo_barras, fecha, sincronizado ) VALUES (:nombre, :medida_ingreso, :cantidad_alerta, :costo_ideal ,:codigo_barras, :fecha , 0 )\");\n\n \n\t\t$stmt->bindParam(\":nombre\", $datos[\"nombre\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":medida_ingreso\", $datos[\"medida_ingreso\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":cantidad_alerta\", $datos[\"cantidad_alerta\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":costo_ideal\", $datos[\"costo_ideal\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":codigo_barras\", $datos[\"codigo_barras\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":fecha\", $datos[\"fecha\"], PDO::PARAM_STR);\n\t\t\n\n \t\tif( $stmt -> execute()) \n \t\t\treturn \"ok\";\n \t\telse \n \t\t\treturn \"error\";\n\n \t\t$stmt-> close();\n \t\t$stmt= null;\n \t}",
"public function inserirDados()\n\t\t{\n\t\t\t$insertIdoso = \"INSERT INTO idoso(logradouro,\n\t\t\t\t\t\t\t\t\t\ttipo_logradouro,\n\t\t\t\t\t\t\t\t\t\tnumero,\n\t\t\t\t\t\t\t\t\t\tcomplemento,\n\t\t\t\t\t\t\t\t\t\tbaiiro,\n\t\t\t\t\t\t\t\t\t\tcidade,\n\t\t\t\t\t\t\t\t\t\tuf,\n\t\t\t\t\t\t\t\t\t\tusuario_id_usuario)\n\t\t\t\t\t\t\t\tVALUES(:logradouro,\n\t\t\t\t\t\t\t\t\t\t:tipo_logradouro,\n\t\t\t\t\t\t\t\t\t\t:numero,\n\t\t\t\t\t\t\t\t\t\t:complemento,\n\t\t\t\t\t\t\t\t\t\t:baiiro,\n\t\t\t\t\t\t\t\t\t\t:cidade,\n\t\t\t\t\t\t\t\t\t\t:uf,\n\t\t\t\t\t\t\t\t\t\t:usuario_id_usuario)\";\n\n\t\t\t$stmt->pdo->prepare($insertIdoso);\n\t\t\t$stmt->bindParam(':logradouro', $this->logradouro);\n\t\t\t$stmt->bindParam(':tipo_logradouro', $this->tipo_logradouro);\n\t\t\t$stmt->bindParam(':numero', $this->numero);\n\t\t\t$stmt->bindParam(':complemento', $this->complemento);\n\t\t\t$stmt->bindParam(':bairro', $this->baiiro);\n\t\t\t$stmt->bindParam(':cidade', $this->cidade);\n\t\t\t$stmt->bindParam(':uf', $this->uf);\n\t\t\t$stmt->bindParam(':usuario_id_usuario', $this->buscarTodosDados());\n\n\t\t\tif($stmt->execute()) {\n\t\t\t\theader(\"Location: localhost:8001/contato\");\n\t\t\t} else {\n\t\t\t\tdie('Erro ao cadastrar');\n\t\t\t}\n\t\t}",
"static public function mdlIngresaritems($tabla, $datos){\n\t\t\n\t\t$stmt = Conexion::conectar()->prepare(\"INSERT INTO $tabla (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tid_programacion_anual\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,id_proyecto\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,id_accion_centra\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,id_entes\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,id_partida_presupuestaria\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,id_fuente_financiamiento\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,id_actvcomercial\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,id_municipio\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,id_estado\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,id_ccnu\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,especificacion\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,cantidad\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,i\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,ii\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,iii\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,iv\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,und\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,costo_unitario\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,precio_total\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,alicuota_iva\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,monto_iva\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,monto_total\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,ano\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,tipo\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,id_usuario\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,fecha\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,codigo ) \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tVALUES (:id_programacion_anual\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:id_proyecto\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:id_accion_centra\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:id_entes\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:id_partida_presupuestaria\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:id_fuente_financiamiento\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:id_actvcomercial\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:id_municipio\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:id_estado\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:id_ccnu\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:especificacion\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:cantidad\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:i\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:ii\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:iii\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:iv\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:und\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:costo_unitario\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:precio_total\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:alicuota_iva\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:monto_iva\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:monto_total\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:ano\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:tipo\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:id_usuario\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:fecha \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:codigo)\");\n\n$stmt->bindParam(\":id_programacion_anual\", $datos[\"id_programacion_anual\"], PDO::PARAM_STR);\n$stmt->bindParam(\":id_proyecto\", $datos[\"id_proyecto\"], PDO::PARAM_STR);\n$stmt->bindParam(\":id_accion_centra\", $datos[\"id_accion_centra\"], PDO::PARAM_STR);\n$stmt->bindParam(\":id_entes\", $datos[\"id_entes\"], PDO::PARAM_STR);\n$stmt->bindParam(\":id_partida_presupuestaria\", $datos[\"id_partida_presupuestaria\"], PDO::PARAM_STR);\n$stmt->bindParam(\":id_fuente_financiamiento\", $datos[\"id_fuente_financiamiento\"], PDO::PARAM_STR);\n$stmt->bindParam(\":id_actvcomercial\", $datos[\"id_actvcomercial\"], PDO::PARAM_STR);\n$stmt->bindParam(\":id_municipio\", $datos[\"id_municipio\"], PDO::PARAM_STR);\n$stmt->bindParam(\":id_estado\", $datos[\"id_estado\"], PDO::PARAM_STR);\n$stmt->bindParam(\":id_ccnu\", $datos[\"id_ccnu\"], PDO::PARAM_STR);\n$stmt->bindParam(\":especificacion\", $datos[\"especificacion\"], PDO::PARAM_STR);\n$stmt->bindParam(\":cantidad\", $datos[\"cantidad\"], PDO::PARAM_STR);\n$stmt->bindParam(\":i\", $datos[\"i\"], PDO::PARAM_STR);\n$stmt->bindParam(\":ii\", $datos[\"ii\"], PDO::PARAM_STR);\n$stmt->bindParam(\":iii\", $datos[\"iii\"], PDO::PARAM_STR);\n$stmt->bindParam(\":iv\", $datos[\"iv\"], PDO::PARAM_STR);\n$stmt->bindParam(\":und\", $datos[\"und\"], PDO::PARAM_STR);\n$stmt->bindParam(\":costo_unitario\", $datos[\"costo_unitario\"], PDO::PARAM_STR);\n$stmt->bindParam(\":precio_total\", $datos[\"precio_total\"], PDO::PARAM_STR);\n$stmt->bindParam(\":alicuota_iva\", $datos[\"alicuota_iva\"], PDO::PARAM_STR);\n$stmt->bindParam(\":monto_iva\", $datos[\"monto_iva\"], PDO::PARAM_STR);\n$stmt->bindParam(\":monto_total\", $datos[\"monto_total\"], PDO::PARAM_STR);\n$stmt->bindParam(\":ano\", $datos[\"ano\"], PDO::PARAM_STR);\n$stmt->bindParam(\":tipo\", $datos[\"tipo\"], PDO::PARAM_STR);\n$stmt->bindParam(\":id_usuario\", $datos[\"id_usuario\"], PDO::PARAM_STR);\n$stmt->bindParam(\":fecha\", $datos[\"fecha\"], PDO::PARAM_STR);\n$stmt->bindParam(\":codigo\", $datos[\"codigo\"], PDO::PARAM_STR);\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\n//var_dump($datos);\n//exit($datos);\nif($stmt->execute()){\n\n\treturn \"ok\";\n\n}else{\n\n\t$arr=$stmt->errorInfo();\n\treturn $arr[2];\n\n}\n\n$stmt->close();\n$stmt = null;\n\n}",
"public function insert($titulos){\n// $id=$titulos->getId();\n$descripcion=$titulos->getDescripcion();\n$universidad_id=$titulos->getUniversidad_id();\n$docente_id=$titulos->getDocente_id()->getId();\n\n try {\n $sql= \"INSERT INTO `titulos`( `descripcion`, `universidad`, `docente_id`)\"\n .\"VALUES ('$descripcion','$universidad_id','$docente_id')\";\n return $this->insertarConsulta($sql);\n } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n }\n }",
"function insert($bd,$data){\n$data_one = \"\";\n$data_two = \"\";\n$contador = count($data);\n$i = 1;\nforeach ($data as $key => $value) {\n\t\tif($i < $contador){\n\t\t\t$data_one .= $key.\",\";\n\t\t\t$data_two .= \":\".$key.\",\";\n\t\t}else{\n\t\t\t$data_one .= $key;\n\t\t\t$data_two .= \":\".$key;\n\t\t}\n\t\t$i++;\n}\n $sql = \"INSERT INTO \".$bd.\" (\".$data_one.\") VALUES (\".$data_two.\")\";\n$conexion = new ConexionOther();\n$stmt= $conexion->prepare($sql);\n$dato = $stmt->execute($data);\n//$stmt = null;\nreturn $dato;\n}",
"static public function mdlIngresarEntrada($tabla, $datos){\n\t\t\n\t\t\n\n\t\n\t$stmt = Conexion::conectar()->prepare(\"INSERT INTO $tabla(codigo, id_responsable, id_proveedor,id_comprobante,comprobante, secuencia, descripcion, productos,neto,impuesto,total_pagar,fecha_emision,fecha_vencimiento) VALUES (:codigo, :id_responsable, :id_proveedor,:id_comprobante,:comprobante, :secuencia, :descripcion, :productos,:neto,:impuesto,:total_pagar,:fecha_emision,:fecha_vencimiento)\");\n\t\n\t\t\t$stmt->bindParam(\":codigo\", $datos[\"codigo\"], PDO::PARAM_STR);\n\t\t\t$stmt->bindParam(\":id_responsable\", $datos[\"id_responsable\"], PDO::PARAM_INT);\n\t\t\t$stmt->bindParam(\":id_proveedor\", $datos[\"id_proveedor\"], PDO::PARAM_STR);\n\t\t\t$stmt->bindParam(\":id_comprobante\", $datos[\"id_comprobante\"], PDO::PARAM_INT);\n\t\t\t$stmt->bindParam(\":comprobante\", $datos[\"comprobante\"], PDO::PARAM_STR);\n\t\t\t$stmt->bindParam(\":secuencia\", $datos[\"secuencia\"], PDO::PARAM_STR);\n\t\t\t$stmt->bindParam(\":descripcion\", $datos[\"descripcion\"], PDO::PARAM_STR);\n\t\t\t$stmt->bindParam(\":productos\", $datos[\"productos\"], PDO::PARAM_STR);\n\t\t\t$stmt->bindParam(\":neto\", $datos[\"neto\"], PDO::PARAM_STR);\n\t\t\t$stmt->bindParam(\":impuesto\", $datos[\"impuesto\"], PDO::PARAM_STR);\n\t\t\t$stmt->bindParam(\":total_pagar\", $datos[\"total_pagar\"], PDO::PARAM_STR);\t\t\n\t\t\t$stmt->bindParam(\":fecha_emision\", $datos[\"fecha_emision\"], PDO::PARAM_STR);\t\t\n\t\t\t$stmt->bindParam(\":fecha_vencimiento\", $datos[\"fecha_vencimiento\"], PDO::PARAM_STR);\t\t\n\n\n\n\n\n\n\t\tif($stmt->execute()){\n\n\t\t\treturn \"ok\";\n\n\t\t\t\n\n\t\t}else{\n\n\t\t\treturn $stmt->errorInfo();\n\t\t\n\t\t}\n\n\t\t$stmt->close();\n\t\t$stmt = null;\n\n\t}",
"function insertarAsis(){\r\n\t\t\t$mysqli=$this->ConectarBD();\r\n\r\n\t\t\t$sql = \"SELECT * FROM actividades WHERE DNI LIKE '%\".$this->dni.\"%' AND COD_ACTIV LIKE '%\".$this->cod.\"%'\";\r\n\r\n\t\t\tif (!$result = $mysqli->query($sql)){\r\n\t\t\t\treturn 'ERR_CONN_BD';\r\n\t\t\t}\r\n\t\t\tif ($result->num_rows == 0){\r\n\t\t\t\t$sql = \"SELECT * FROM asistencia_usu WHERE FECHA LIKE '%\".$this->dia.\"%'\r\n \t\t\t\tAND COD_ACTIV LIKE '%\".$this->cod.\"%' AND DNI LIKE '%\".$this->dni.\"%'\r\n\t\t\t\tAND HORA LIKE '%\".$this->hora.\"%'\";\r\n\r\n\t\t\t\tif (!$result = $mysqli->query($sql)){\r\n\t\t\t\t\treturn 'ERR_CONN_BD';\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\r\n\t\t\t\t\tif ($result->num_rows == 0){\r\n\t\t\t\t\t\t$sql = \"INSERT INTO asistencia_usu (FECHA, ASISTENCIA, DNI, COD_ACTIV,HORA) VALUES ('\";\r\n\t\t\t\t\t\t$sql = $sql.\"$this->dia', '$this->asis', '$this->dni', '$this->cod', '$this->hora')\";\r\n\t\t\t\t\t\t$mysqli->query($sql);\r\n\t\t\t\t\t\treturn 'CONFIMR_INSERT';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\treturn 'DATA_EXISTS_ASIS';\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t$sql = \"SELECT * FROM asistencia_moni WHERE FECHA LIKE '%\".$this->dia.\"%'\r\n\t\t\t\tAND COD_ACTIV LIKE '%\".$this->cod.\"%' AND DNI LIKE '%\".$this->dni.\"%'\r\n\t\t\t\tAND HORA LIKE '%\".$this->hora.\"%'\";\r\n\r\n\t\t\t\tif (!$result = $mysqli->query($sql)){\r\n\t\t\t\t\treturn 'ERR_CONN_BD';\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\r\n\t\t\t\t\tif ($result->num_rows == 0){\r\n\t\t\t\t\t\t$sql = \"INSERT INTO asistencia_moni (FECHA, ASISTENCIA, DNI, COD_ACTIV,HORA) VALUES ('\";\r\n\t\t\t\t\t\t$sql = $sql.\"$this->dia', '$this->asis', '$this->dni', '$this->cod', '$this->hora')\";\r\n\t\t\t\t\t\t$mysqli->query($sql);\r\n\t\t\t\t\t\treturn 'CONFIMR_INSERT';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\treturn 'DATA_EXISTS_ASIS';\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}",
"public function insertarDatosCompra($datos){\n $con= new conectar();\n $conexion= $con->conexion();\n $sql= \"INSERT INTO compras_realizadas(idLog, fecha,nombre,precio)\n values('$datos[0]','$datos[1]','$datos[2]','$datos[3]')\"; \n return $result= mysqli_query($conexion, $sql); \n }",
"public function run()\n {\n //\n DB::table('cuota')->insert([\n [\n 'id_credito'=>'1',\n 'id_mora'=>'1',\n 'amortizacion'=>'55',\n 'monto_cuota'=>'255.13',\n 'fecha_pagada'=>'2018-02-03',\n 'fecha_programada'=>'2018-02-01'\n\n ],\n [\n 'id_credito'=>'1',\n 'id_mora'=>'3',\n 'amortizacion'=>'55',\n 'monto_cuota'=>'255.13',\n 'fecha_pagada'=>'2018-03-05',\n 'fecha_programada'=>'2018-03-01'\n ],\n [\n 'id_credito'=>'2',\n 'id_mora'=>'2',\n 'amortizacion'=>'30',\n 'monto_cuota'=>'174.31',\n 'fecha_pagada'=>'2020-05-06',\n 'fecha_programada'=>'2020-05-01'\n ],\n [\n 'id_credito'=>'3',\n 'id_mora'=>'4',\n 'amortizacion'=>'60',\n 'monto_cuota'=>'239.17',\n 'fecha_pagada'=>'2019-03-07',\n 'fecha_programada'=>'2019-03-01'\n ],\n [\n 'id_credito'=>'3',\n 'id_mora'=>'5',\n 'amortizacion'=>'60',\n 'monto_cuota'=>'239.17',\n 'fecha_pagada'=>'2019-04-04',\n 'fecha_programada'=>'2019-04-01'\n ]\n\n ]);\n }",
"public function run()\n {\n DB::table('professeurs')->insert([\n [\n 'nom_professeur' => 'AIT EI MEKKI',\n 'prenom_professeur' => 'Touria',\n 'service' => 192,\n 'id_statut' => 1,\n 'id_departement' => 1\n ],[\n 'nom_professeur' => 'AMGHAR',\n 'prenom_professeur' => 'Tassadit',\n 'service' => 168,\n 'id_statut' => 1,\n 'id_departement' => 1\n\n ],[ \n 'nom_professeur' => 'BARICHARD',\n 'prenom_professeur' => 'Vincent',\n 'service' => 192,\n 'id_statut' => 2,\n 'id_departement' => 1\n ],[ \n 'nom_professeur' => 'BASSEUR',\n 'prenom_professeur' => 'Mathieu',\n 'service' => 192,\n 'id_statut' => 2,\n 'id_departement' => 1\n ],[ \n 'nom_professeur' => 'DA MOTA',\n 'prenom_professeur' => 'Benoit',\n 'service' => 192,\n 'id_statut' => 2,\n 'id_departement' => 1\n ],[ \n 'nom_professeur' => 'DIEGUEZ',\n 'prenom_professeur' => 'Martin',\n 'service' => 160,\n 'id_statut' => 1,\n 'id_departement' => 1\n ],[ \n 'nom_professeur' => 'DUVAL',\n 'prenom_professeur' => 'Béatrice',\n 'service' => 192,\n 'id_statut' => 2,\n 'id_departement' => 1\n ],[\n 'nom_professeur' => 'GARCIA',\n 'prenom_professeur' => 'Laurent',\n 'service' => 192,\n 'id_statut' => 2,\n 'id_departement' => 1\n ],[\n 'nom_professeur' => 'GENEST',\n 'prenom_professeur' => 'David',\n 'service' => 192,\n 'id_statut' => 2,\n 'id_departement' => 1\n ],[\n 'nom_professeur' => 'GOEFFON',\n 'prenom_professeur' => 'Adrien',\n 'service' => 192,\n 'id_statut' => 1,\n 'id_departement' => 1\n ],[ \n 'nom_professeur' => 'GOUDET',\n 'prenom_professeur' => 'Olivier',\n 'service' => 192,\n 'id_statut' => 1,\n 'id_departement' => 1\n ],[ \n 'nom_professeur' => 'HAIMEZ',\n 'prenom_professeur' => 'Jean-Philippe',\n 'service' => 192,\n 'id_statut' => 2,\n 'id_departement' => 1\n ],[ \n 'nom_professeur' => 'HAO',\n 'prenom_professeur' => 'Jin-Kao',\n 'service' => 192,\n 'id_statut' => 1,\n 'id_departement' => 1\n ],[ \n 'nom_professeur' => 'HUNAULT',\n 'prenom_professeur' => 'Gilles',\n 'service' => 192,\n 'id_statut' => 1,\n 'id_departement' => 1\n ],[ \n 'nom_professeur' => 'LARDEUX',\n 'prenom_professeur' => 'Frédéric',\n 'service' => 192,\n 'id_statut' => 2,\n 'id_departement' => 1\n ],[ \n 'nom_professeur' => 'LEFEVRE',\n 'prenom_professeur' => 'Claire',\n 'service' => 192,\n 'id_statut' => 2,\n 'id_departement' => 1\n ],[ \n 'nom_professeur' => 'LESAINT',\n 'prenom_professeur' => 'David',\n 'service' => 192,\n 'id_statut' => 2,\n 'id_departement' => 1\n ],[ \n 'nom_professeur' => 'LOISEAU',\n 'prenom_professeur' => 'Stéphane',\n 'service' => 192,\n 'id_statut' => 1,\n 'id_departement' => 1\n ],[ \n 'nom_professeur' => 'MONFROY',\n 'prenom_professeur' => 'Eric',\n 'service' => 192,\n 'id_statut' => 1,\n 'id_departement' => 1\n ],[ \n 'nom_professeur' => 'RICHER',\n 'prenom_professeur' => 'Jean-Michel',\n 'service' => 192,\n 'id_statut' => 1,\n 'id_departement' => 1\n ],[ \n 'nom_professeur' => 'SAUBION',\n 'prenom_professeur' => 'Frédéric',\n 'service' => 192,\n 'id_statut' => 1,\n 'id_departement' => 1\n ],[ \n 'nom_professeur' => 'STEPHAN',\n 'prenom_professeur' => 'Igor',\n 'service' => 192,\n 'id_statut' => 2,\n 'id_departement' => 1\n ],[ \n 'nom_professeur' => 'WELSH',\n 'prenom_professeur' => 'Marie-Christine',\n 'service' => 365,\n 'id_statut' => 3,\n 'id_departement' => 1\n ],[ \n 'nom_professeur' => 'LEGEAY',\n 'prenom_professeur' => 'Marc',\n 'service' => 192,\n 'id_statut' => 2,\n 'id_departement' => 1\n ],[ \n 'nom_professeur' => 'JAMIN',\n 'prenom_professeur' => 'Antoine',\n 'service' => 192,\n 'id_statut' => 1,\n 'id_departement' => 1\n ],[ \n 'nom_professeur' => 'VASCONCELLOS',\n 'prenom_professeur' => 'Claudia',\n 'service' => 192,\n 'id_statut' => 2,\n 'id_departement' => 1\n ],[ \n 'nom_professeur' => 'LEGUY',\n 'prenom_professeur' => 'Jules',\n 'service' => 64,\n 'id_statut' => 5,\n 'id_departement' => 1\n ],[ \n 'nom_professeur' => 'GRELIER',\n 'prenom_professeur' => 'Cyril',\n 'service' => 64,\n 'id_statut' => 5,\n 'id_departement' => 1\n ],[ \n 'nom_professeur' => 'CHANTREIN',\n 'prenom_professeur' => 'Jean-Mathieu',\n 'service' => 96,\n 'id_statut' => 7,\n 'id_departement' => 1\n ],[ \n 'nom_professeur' => 'TODOSKOFF',\n 'prenom_professeur' => 'Alexis',\n 'service' => 96,\n 'id_statut' => 7,\n 'id_departement' => 1\n ],[ \n 'nom_professeur' => 'LEDUC',\n 'prenom_professeur' => 'Lionel',\n 'service' => 96,\n 'id_statut' => 7,\n 'id_departement' => 1\n ],[ \n 'nom_professeur' => 'TELETCHEA',\n 'prenom_professeur' => 'Stéphane',\n 'service' => 96,\n 'id_statut' => 7,\n 'id_departement' => 1\n ],[ \n 'nom_professeur' => 'DEVRED',\n 'prenom_professeur' => 'Caroline',\n 'service' => 192,\n 'id_statut' => 2,\n 'id_departement' => 1\n ],[ \n 'nom_professeur' => 'DELAVERNHE',\n 'prenom_professeur' => 'Florian',\n 'service' => 96,\n 'id_statut' => 7,\n 'id_departement' => 1\n ],[ \n 'nom_professeur' => 'LE CALVAR',\n 'prenom_professeur' => 'Théo',\n 'service' => 96,\n 'id_statut' => 7,\n 'id_departement' => 1\n ]\n ]);\n }",
"function insertarEstados($estado) {\r\n$sql = \"insert into tbestados(idestado,estado)\r\nvalues ('','\".($estado).\"')\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}",
"public function insertForosComentarios(){\n\t\tif($this->get_request_method() != \"POST\") $this->response('', 406);\n\n\t\t//get data sent\n\t\t$data = file_get_contents(\"php://input\");\n\t\t$parametros = $this->jsonDecode($data);\n\t\t$user = $parametros->user;\n\t\t$ses_id = $parametros->ses_id;\n\t\t$id_tema = $parametros->id_tema;\n\t\t$comentario = $parametros->comentario;\n\t\t$id_comentario_respuesta = $parametros->id_comentario_respuesta;\n\n\n\t\t// Session validation\n\t\tif ($this->checkSesId($ses_id, $user)){\n\t\t\t$foro = new foro();\n\t\t\tif ($foro->InsertComentario($id_tema,\n\t\t\t\t\t\t\t\t$comentario,\n\t\t\t\t\t\t\t\t$user,\n\t\t\t\t\t\t\t\tESTADO_COMENTARIOS_FORO,\n\t\t\t\t\t\t\t\t$id_comentario_respuesta)){\n\t\t\t\t$msg = array('status' => \"ok\", \"msg\" => \"Mensaje insertado\");\n\t\t\t\t$this->response($this->json($msg), 200);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Error al insertar\");\n\t\t\t\t$this->response($this->json($error), 400);\t\t\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Sesion incorrecta\");\n\t\t\t$this->response($this->json($error), 400);\t\t\n\t\t}\n\t}",
"public function insert(ParecerTrabalho $ParecerTrabalho) {\r\n $sql = \"INSERT INTO $this->table\"\r\n . \" (fk_revisor, datahora, status, fk_trabalho, seq,\"\r\n . \" status_introducao, status_objetivos,\"\r\n . \" status_metodologia, status_resultados, observacoes, observacoes_internas,\"\r\n . \" obs_introducao, obs_objetivos, obs_metodologia, obs_resultados) \"\r\n . \"VALUES\"\r\n . \" (:fkRevisor, :datahora, :status, :fkTrabalho, :seq,\"\r\n . \" :statusIntroducao, :statusObjetivos,\"\r\n . \" :statusMetodologia, :statusResultados, :observacoes, :observacoesInternas,\"\r\n . \" :obsIntroducao, :obsObjetivos, :obsMetodologia, :obsResultados)\";\r\n\r\n\r\n\r\n\r\n $fkRevisor = $ParecerTrabalho->getFkRevisor();\r\n $datahora = $ParecerTrabalho->getDatahora();\r\n $status = $ParecerTrabalho->getStatus();\r\n $fkTrabalho = $ParecerTrabalho->getFkTrabalho();\r\n $seq = $ParecerTrabalho->getSeq();\r\n $statusIntroducao = $ParecerTrabalho->getStatusIntroducao();\r\n $statusObjetivos = $ParecerTrabalho->getStatusObjetivos();\r\n $statusMetodologia = $ParecerTrabalho->getStatusMetodologia();\r\n $statusResultados = $ParecerTrabalho->getStatusResultados();\r\n $observacoes = $ParecerTrabalho->getObservacoes();\r\n $observacoesInternas = $ParecerTrabalho->getObservacoesInternas();\r\n $obsIntroducao = $ParecerTrabalho->getObsIntroducao();\r\n $obsObjetivos = $ParecerTrabalho->getObsObjetivos();\r\n $obsMetodologia = $ParecerTrabalho->getObsMetodologia();\r\n $obsResultados = $ParecerTrabalho->getObsResultados();\r\n\r\n $stmt = ConnectionFactory::prepare($sql);\r\n\r\n $stmt->bindParam(':fkRevisor', $fkRevisor);\r\n $stmt->bindParam(':datahora', $datahora);\r\n $stmt->bindParam(':status', $status);\r\n $stmt->bindParam(':fkTrabalho', $fkTrabalho);\r\n $stmt->bindParam(':seq', $seq);\r\n $stmt->bindParam(':statusIntroducao', $statusIntroducao);\r\n $stmt->bindParam(':statusObjetivos', $statusObjetivos);\r\n $stmt->bindParam(':statusMetodologia', $statusMetodologia);\r\n $stmt->bindParam(':statusResultados', $statusResultados);\r\n $stmt->bindParam(':observacoes', $observacoes);\r\n $stmt->bindParam(':observacoesInternas', $observacoesInternas);\r\n $stmt->bindParam(':obsIntroducao', $obsIntroducao);\r\n $stmt->bindParam(':obsObjetivos', $obsObjetivos);\r\n $stmt->bindParam(':obsMetodologia', $obsMetodologia);\r\n $stmt->bindParam(':obsResultados', $obsResultados);\r\n return $stmt->execute();\r\n }",
"static public function mdlIngresarCupos($tabla, $datos){\n\n\t\t$stmt = Conexion::conectar()->prepare(\"INSERT INTO $tabla(idEspecialidad, idAdmision) VALUES (:idEspecialidad, :idAdmision)\");\n\n\t\t$stmt->bindParam(\":idEspecialidad\", $datos[\"idEspecialidad\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":idAdmision\", $datos[\"idAdmision\"], PDO::PARAM_STR);\n\n\t\tif($stmt->execute()){\n\n\t\t\treturn \"ok\";\n\n\t\t}else{\n\n\t\t\treturn \"error\";\n\t\t\n\t\t}\n\n\t\t$stmt->close();\n\t\t$stmt = null;\n\n\t}",
"public function inserirDados($params) {\r\n \t$gerRiscoSelAdd = ($params['gerRiscoSelAdd'] != '')?explode(',', $params['gerRiscoSelAdd']):null;\r\n \t$gerRiscoSelRem = ($params['gerRiscoSelRem'] != '')?explode(',', $params['gerRiscoSelRem']):null;\r\n \t$transpSelAdd = ($params['transpSelAdd'] != '')?explode(',', $params['transpSelAdd']):null;\r\n \t$transpSelRem = ($params['transpSelRem'] != '')?explode(',', $params['transpSelRem']):null;\r\n\r\n \t// remove campos não utilizados no primeiro insert\r\n \t$params = $this->removeCamposPost($params);\r\n\r\n \t// adiciona usuoid e dt_criacao\r\n \t$params['embusuoid_inclusao'] = $this->usuoid;\r\n \t$params['embdt_cadastro'] = 'NOW()';\r\n\r\n \t$params['embusuoid_alteracao'] = $this->usuoid;\r\n \t$params['embdt_alteracao'] = 'NOW()';\r\n\r\n // se campo frota é desmarcado, seta como false\r\n $params['embfrota'] = ($params['embfrota'] == '')?'0':'1';\r\n\r\n \t// remove formatação cep\r\n \t$params['embcep'] = str_replace('-', '', $params['embcep']);\r\n\r\n // remove formatação cnpj\r\n $params['embcnpj'] = $this->formatarCNPJ($params['embcnpj'], false);\r\n\r\n \t// remove campo de id\r\n \tunset($params['emboid']);\r\n\r\n \t$fields = implode(',', array_keys($params));\r\n \t$values = strtoupper(strtr(str_replace(\"''\", 'null', \"'\".implode(\"','\", array_map('trim', array_values($params))).\"'\"), \"áéíóúâêôãõàèìòùçUüïö\",\"ÁÉÍÓÚÂÊÔÃÕÀÈÌÒÙÇÜÏÖ\"));\r\n\r\n \t$valNome = $this->validaEmbarcadorNome($params['embnome'], $params['emboid']);\r\n \t$valCNPJ = $this->validaEmbarcadorCNPJ($params['embcnpj'], $params['emboid']);\r\n\r\n \ttry{\r\n \t\t\r\n \t\t// valida nome antes de iniciar a transaction \t\t\r\n \t\tif(!$valNome) {\r\n \t\t\tthrow new Exception (\"Registro já cadastrado\");\r\n \t\t}\r\n\r\n \t\t// valida cnpj antes de iniciar a transaction \t\t\r\n \t\tif(!$valCNPJ) {\r\n \t\t\tthrow new Exception (\"Registro já cadastrado\");\r\n \t\t}\r\n\r\n \t\t// valida nome antes de iniciar a transaction \t\t\r\n \t\tif($params['embnome'] == '') {\r\n \t\t\tthrow new Exception (\"Preencha os campos obrigatórios\");\r\n \t\t}\r\n\r\n \t\t// valida segmento antes de iniciar a transaction \t\t\r\n \t\tif($params['embsegoid'] == '') {\r\n \t\t\tthrow new Exception (\"Preencha os campos obrigatórios\");\r\n \t\t}\r\n\r\n\t pg_query($this->conn, \"BEGIN\");\r\n \t\t$query = \"INSERT INTO embarcador\r\n\t\t\t\t\t\t\t\t\t($fields) \r\n\t\t\t\t\t\t\t\tVALUES \r\n\t\t\t\t\t\t\t\t\t($values)\r\n\t\t\t\t\t\t\t\tRETURNING \r\n\t\t\t\t\t\t\t\t\temboid\";\r\n\r\n\t\t\tif(!$sql = pg_query($this->conn, $query)){\r\n\t \tthrow new Exception (\"Houve um erro ao cadastrar o registro.\");\r\n\t }\t\r\n\r\n\t $idEmbarcador = pg_fetch_row($sql, 0); \r\n\t $idEmbarcador = $idEmbarcador[0]; \t \r\n\r\n\t // faz exclusões se necessário\r\n\t if(count($gerRiscoSelRem) > 0):\r\n\t \tforeach ($gerRiscoSelRem as $q) {\r\n\t \t\t$q = \"DELETE FROM \r\n\t\t\t\t\t\t\tembarcador_gerenciadora \r\n\t\t\t\t\t\t\tWHERE \r\n\t\t\t\t\t\t\t\tembggeroid = {$q}\";\r\n\r\n\t \t\tif(!pg_query($this->conn, $q)){\r\n\t \t\t\tthrow new Exception (\"Houve um erro ao excluir o registro.\");\r\n\t \t\t}\r\n\t \t}\t \t\r\n\t endif;\r\n\r\n\t if(count($transpSelRem) > 0):\t \r\n\t \tforeach ($transpSelRem as $q) {\r\n\t \t\t$q = \"DELETE FROM \r\n\t\t\t\t\t\t\tembarcador_transportadora \r\n\t\t\t\t\t\t\tWHERE \r\n\t\t\t\t\t\t\t\tembtclioid = {$q}\";\r\n\t \t\tif(!pg_query($this->conn, $q)){\r\n\t \t\t\tthrow new Exception (\"Houve um erro ao excluir o registro.\");\r\n\t \t\t}\r\n\t \t}\r\n\t endif;\r\n\t // fim exclusoes\r\n\r\n\t // faz inclusões se necessário\r\n\t if(count($gerRiscoSelAdd) > 0):\r\n\t \tforeach ($gerRiscoSelAdd as $q) {\r\n\t \t\t$q = \"INSERT INTO\r\n\t \t\t\t\tembarcador_gerenciadora\r\n\t \t\t\t\t(embgemboid,embggeroid,embgdt_cadastro,embgusuoid_inclusao)\r\n\t\t\t\t\t\t\tVALUES\r\n\t\t\t\t\t\t\t({$idEmbarcador},{$q},'NOW()',{$this->usuoid})\";\r\n\r\n\t \t\tif(!pg_query($this->conn, $q)){\r\n\t \t\t\tthrow new Exception (\"Houve um erro ao inserir o registro.\");\r\n\t \t\t}\r\n\t \t}\t \t\r\n\t endif;\r\n\r\n\t if(count($transpSelAdd) > 0):\r\n\t \tforeach ($transpSelAdd as $q) {\r\n\t \t\t$q = \"INSERT INTO\r\n\t \t\t\t\tembarcador_transportadora\r\n\t \t\t\t\t(embtemboid,embtclioid,embtdt_cadastro,embtusuoid_inclusao)\r\n\t\t\t\t\t\t\tVALUES\r\n\t\t\t\t\t\t\t({$idEmbarcador},{$q},'NOW()',{$this->usuoid})\";\r\n\r\n\t \t\tif(!pg_query($this->conn, $q)){\r\n\t \t\t\tthrow new Exception (\"Houve um erro ao inserir o registro.\");\r\n\t \t\t}\r\n\t \t}\t \t\r\n\t endif;\r\n\t // fim inclusões\r\n\r\n\t\t\t$mensagem = \"Registro cadastrado com sucesso.\";\r\n\t\t\t$acao = \"index\";\r\n\t\t\tpg_query($this->conn, \"END\"); \r\n\t\t}\r\n\t\tcatch (Exception $e) {\r\n\t pg_query($this->conn, \"ROLLBACK\");\r\n\t $mensagem = $e->getMessage();\r\n\t }\r\n\r\n\t $resultado['mensagem'] = $mensagem;\r\n\t $resultado['acao'] = $acao;\r\n\t return $resultado;\r\n \r\n }",
"Function donneefournisseurs()\r\n {\r\n echo \"copie des données de la table fournisseurs\";\r\n $req=\"INSERT INTO `\".Valorisation::$anneenouvelle.\"`.`fournisseurs` SELECT * FROM `\".Valorisation::$anneeancienne.\"`.`fournisseurs`\";\r\n Valorisation::$bddnew->query($req); \r\n }",
"public function run()\n {\n $usuario = DB::table('usuarios')->get()->first();\n\n DB::table('estados_civis')->insert([\n [\n 'id' => Str::orderedUuid(),\n 'nome' => 'Solteiro',\n 'slug' => 'solteiro',\n 'descricao' => 'É a pessoa que nunca se casou, independente se possui um relacionamento estável ou não',\n 'created_by' => $usuario->id,\n 'updated_by' => $usuario->id,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ],\n [\n 'id' => Str::orderedUuid(),\n 'nome' => 'Casado',\n 'slug' => 'casado',\n 'descricao' => 'É o indivíduo que possui uma união matrimonial através do casamento civil, independente do regime de bens adotado',\n 'created_by' => $usuario->id,\n 'updated_by' => $usuario->id,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ],\n [\n 'id' => Str::orderedUuid(),\n 'nome' => 'Separado',\n 'slug' => 'separado',\n 'descricao' => 'É quem não vive mais com o companheiro, porém ainda não está divorciado. A pessoa que está separada, pode decretar a separação judicial, para acabar com os deveres da sociedade conjugal',\n 'created_by' => $usuario->id,\n 'updated_by' => $usuario->id,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ],\n [\n 'id' => Str::orderedUuid(),\n 'nome' => 'Divorciado',\n 'slug' => 'divorciado',\n 'descricao' => 'É a pessoa que teve homologado seu pedido de divórcio através da justiça, ou de uma escritura',\n 'created_by' => $usuario->id,\n 'updated_by' => $usuario->id,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ],\n [\n 'id' => Str::orderedUuid(),\n 'nome' => 'Viúvo',\n 'slug' => 'viuvo',\n 'descricao' => 'É o indivíduo que o cônjuge (marido ou esposa) faleceu',\n 'created_by' => $usuario->id,\n 'updated_by' => $usuario->id,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ],\n ]);\n }",
"function guardadatos($datos)\n\t{\n\t\t//var_dump ($datos);\n\t\t\n\t\t$sqlver =\"SELECT MAX(C3F35A_NRO_FALL) AS C3F35A_NRO_FALL \n\t\t\t\tFROM CNPV_PERSONA_FALLECIDA\n WHERE\n C0I1_ENCUESTA= '\".$datos['formulario'].\"' AND C3F24_NROHOG= '1' \";\n\t\t$query = $this->db->query($sqlver);\n\t\t\n\t\tif ($query->num_rows() > 0){\n\t\t\tforeach($query->result() as $row)\n\t\t\t{\n\t\t\t\t$consecutivo=$row -> C3F35A_NRO_FALL+1;\n\t\t\t}\n\t\t}\n\t\t\n\t\techo $sql = \"INSERT INTO CNPV_PERSONA_FALLECIDA \n\t\t\t\t(C0I1_ENCUESTA, C3F24_NROHOG, C3F35A_NRO_FALL, C3F35B_SEXO_FALL, C3F35C_EDAD_FALL, C3F35D_CERT_DEFUN)\n\t\t\t\tVALUES ('\".$datos['formulario'].\"', '1', '\".$consecutivo.\"', '\".$datos['sexo'].\"', '\".$datos['edad'].\"', '\".$datos['certificado'].\"')\";\n\t\t$query = $this->db->query($sql);\n\t\t\n\t\t$sql=\"UPDATE CNPV_HOGAR SET\tC3H35_NRO_FALL='\".$datos['combocantidad'].\"' WHERE C0I1_ENCUESTA='\".$datos['formulario'].\"'\";\n\t\t$query = $this->db->query($sql);\n\t}",
"function Inserir() {\n if($this->GetClienteCPF($this->getCli_cpf())>0):\n echo '<div class=\"alert alert-danger\" id=\"erro_mostra\">Este CPF já esta cadastrado ';\n Sistema::VoltarPagina();\n echo '</div>';\n exit();\n endif;\n \n //se for maior que zero significa que exite algum email igual----------------------\n if($this->GetClienteEmail($this->getCli_email())>0):\n echo '<div class=\"alert alert-danger\" id=\"erro_mostra\">Este Email já esta cadastrado ';\n Sistema::VoltarPagina();\n echo '</div>';\n exit();\n endif;\n //Caso passou na verificação os dados serão gravados no banco-------------------------\n $query = \"INSERT INTO \".$this->prefix.\"clientes (cli_nome,\n cli_sobrenome,\n cli_data_nasc,\n cli_rg,\n cli_cpf,\n cli_ddd,\n cli_fone,\n cli_celular,\n cli_endereco,\n cli_numero,\n cli_bairro,\n cli_cidade,\n cli_uf,\n cli_cep,\n cli_email,\n cli_data_cad,\n cli_hora_cad,\n cli_pass) VALUES (:cli_nome,\n :cli_sobrenome,\n :cli_data_nasc,\n :cli_rg,\n :cli_cpf,\n :cli_ddd,\n :cli_fone,\n :cli_celular,\n :cli_endereco,\n :cli_numero,\n :cli_bairro,\n :cli_cidade,\n :cli_uf,\n :cli_cep,\n :cli_email,\n :cli_data_cad,\n :cli_hora_cad,\n :cli_senha)\";\n \n $params = array(\n ':cli_nome'=> $this->getCli_nome(),\n ':cli_sobrenome'=> $this->getCli_sobrenome(),\n ':cli_data_nasc'=> $this->getCli_data_nasc(),\n ':cli_rg'=> $this->getCli_rg(),\n ':cli_cpf'=> $this->getCli_cpf(),\n ':cli_ddd'=> $this->getCli_ddd(),\n ':cli_fone'=> $this->getCli_fone(),\n ':cli_celular'=> $this->getCli_celular(),\n ':cli_endereco'=> $this->getCli_endereco(),\n ':cli_numero'=> $this->getCli_numero(),\n ':cli_bairro'=> $this->getCli_bairro(),\n ':cli_cidade'=> $this->getCli_cidade(),\n ':cli_uf'=> $this->getCli_uf(),\n ':cli_cep'=> $this->getCli_cep(),\n ':cli_email'=> $this->getCli_email(),\n ':cli_data_cad'=> $this->getCli_data_cad(),\n ':cli_hora_cad'=> $this->getCli_hora_cad(),\n ':cli_senha'=> $this->getCli_senha(),\n \n \n );\n //echo $query;\n $this->ExecuteSQL($query, $params);\n \n \n }",
"function crear($datos){\t\t\r\n\t\t//Se guardan sus datos en un array asociativo, el cual cada id o key tiene que tener el mismo nombre de la columna de la tabla en la bd. Sino se hace asi se genera error\r\n\t\t$array = array(\r\n\t\t\t'name' => $datos[\"nombre\"],\r\n\t\t\t'idUsuario' => $datos[\"idUsuario\"],\r\n\t\t\t'hora_inicio' => $datos[\"horainicio\"],\r\n\t\t\t'hora_final' => $datos[\"horafinal\"]);\r\n\r\n\t\t$this->db->set('date_create', 'CURDATE()', FALSE);\r\n\t\t$this->db->set('time_create', 'curTime()', FALSE);\r\n\t\t$this->db->insert('turnos_laborales', $array);//Se llama a la funcion de insertar datos y se le pasa el array asociativo\t\r\n\t}",
"public function queryInsertCTT($dados){\n try{\n $ID = $dados['0'];\n $IDENTIFICADOR = $dados['1']; \n $DDDTEL = $dados['2'];\n $TEL = preg_replace(\"/[^0-9]/\", \"\",$dados['3']);\n $DDDCEL = $dados['4'];\n $CEL = preg_replace(\"/[^0-9]/\", \"\",$dados['5']);\n $EMAIL = $dados['6'];\n $STATUS = $dados['7'];\n $SQL = \"INSERT INTO `contato` (`id`, `identificador`, `dddTel`, `tel`, `dddCel`, `cel`, `email`, `status`) VALUES (?, ?, ?, ?, ?, ?, ?, ?)\"; \n $sqlCTT = $this->conecta->conectar()->prepare($SQL); \n $sqlCTT->bindParam(1, $ID, PDO::PARAM_STR);\n $sqlCTT->bindParam(2, $IDENTIFICADOR, PDO::PARAM_STR);\n $sqlCTT->bindParam(3, $DDDTEL, PDO::PARAM_STR);\n $sqlCTT->bindParam(4, $TEL, PDO::PARAM_STR);\n $sqlCTT->bindParam(5, $DDDCEL, PDO::PARAM_STR);\n $sqlCTT->bindParam(6, $CEL, PDO::PARAM_STR);\n $sqlCTT->bindParam(7, $EMAIL, PDO::PARAM_STR);\n $sqlCTT->bindParam(8, $STATUS, PDO::PARAM_STR);\n if($sqlCTT->execute()){\n return \"ok\";\n }else{\n return print_r($sqlCTT->errorInfo());\n }\n } catch (PDOException $ex) {\n return 'error '.$ex->getMessage();\n }\n }",
"static public function mdlIngresarCapacidadF($tabla, $datos){\n\n $stmt = Conexion::conectar()->prepare(\"INSERT INTO $tabla(Paciente, Cita, CF1, CF2, CF3, CF4, CF5, HC1, HC2, HC3, HC4, HC5, HC6, HC7, HC8, HC9,HC10, HC11,HC12, HC13, SG1, SG2, SG3, SG4, SG5, SG6, SG7, SG9,SG68, SH1, SU1, SF1, HA1, HA2, HA3, HA4, HA5, HA6, HA7, HA8, HA9, HA10, HA11, HA12, HA13, HA14, HA15, HA16, HA17, HA18, HA19, HA20, HA21, HA22, HA23, AF1, AF2, AF3, AF4, AF5, AF6, AF7, AF8, AF9, AF10, AF11) VALUES (:Paciente, :Cita, :CF1, :CF2,:CF3, :CF4, :CF5, :HC1, :HC2, :HC3, :HC4, :HC5, :HC6, :HC7, :HC8, :HC9,:HC10, :HC11,:HC12, :HC13, :SG1, :SG2, :SG3, :SG4, :SG5, :SG6, :SG7, :SG9, :SG68, :SH1, :SU1, :SF1, :HA1, :HA2, :HA3, :HA4, :HA5, :HA6, :HA7, :HA8, :HA9, :HA10, :HA11, :HA12, :HA13, :HA14, :HA15, :HA16, :HA17, :HA18, :HA19, :HA20, :HA21, :HA22, :HA23, :AF1, :AF2, :AF3, :AF4, :AF5, :AF6, :AF7, :AF8, :AF9, :AF10, :AF11 )\");\n\n $stmt->bindParam(\":Paciente\", $datos[\"Paciente\"], PDO::PARAM_STR);\n\n\n $stmt->bindParam(\":Cita\", $datos[\"Cita\"], PDO::PARAM_STR);\n $stmt->bindParam(\":CF1\", $datos[\"CF1\"], PDO::PARAM_STR);\n $stmt->bindParam(\":CF2\", $datos[\"CF2\"], PDO::PARAM_STR);\n $stmt->bindParam(\":CF3\", $datos[\"CF3\"], PDO::PARAM_STR);\n $stmt->bindParam(\":CF4\", $datos[\"CF4\"], PDO::PARAM_STR);\n $stmt->bindParam(\":CF5\", $datos[\"CF5\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HC1\", $datos[\"HC1\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HC2\", $datos[\"HC2\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HC3\", $datos[\"HC3\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HC4\", $datos[\"HC4\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HC5\", $datos[\"HC5\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HC6\", $datos[\"HC6\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HC7\", $datos[\"HC7\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HC8\", $datos[\"HC8\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HC9\", $datos[\"HC9\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HC10\", $datos[\"HC10\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HC11\", $datos[\"HC11\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HC12\", $datos[\"HC12\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HC13\", $datos[\"HC13\"], PDO::PARAM_STR);\n $stmt->bindParam(\":SG1\", $datos[\"SG1\"], PDO::PARAM_STR);\n $stmt->bindParam(\":SG2\", $datos[\"SG2\"], PDO::PARAM_STR);\n $stmt->bindParam(\":SG3\", $datos[\"SG3\"], PDO::PARAM_STR);\n $stmt->bindParam(\":SG4\", $datos[\"SG4\"], PDO::PARAM_STR);\n $stmt->bindParam(\":SG5\", $datos[\"SG5\"], PDO::PARAM_STR);\n $stmt->bindParam(\":SG6\", $datos[\"SG6\"], PDO::PARAM_STR);\n $stmt->bindParam(\":SG7\", $datos[\"SG7\"], PDO::PARAM_STR);\n $stmt->bindParam(\":SG68\", $datos[\"SG68\"], PDO::PARAM_STR);\n $stmt->bindParam(\":SG9\", $datos[\"SG9\"], PDO::PARAM_STR);\n $stmt->bindParam(\":SH1\", $datos[\"SH1\"], PDO::PARAM_STR);\n $stmt->bindParam(\":SU1\", $datos[\"SU1\"], PDO::PARAM_STR);\n $stmt->bindParam(\":SF1\", $datos[\"SF1\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HA1\", $datos[\"HA1\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HA2\", $datos[\"HA2\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HA3\", $datos[\"HA3\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HA4\", $datos[\"HA4\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HA5\", $datos[\"HA5\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HA6\", $datos[\"HA6\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HA7\", $datos[\"HA7\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HA8\", $datos[\"HA8\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HA9\", $datos[\"HA9\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HA10\", $datos[\"HA10\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HA11\", $datos[\"HA11\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HA12\", $datos[\"HA12\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HA13\", $datos[\"HA13\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HA14\", $datos[\"HA14\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HA15\", $datos[\"HA15\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HA16\", $datos[\"HA16\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HA17\", $datos[\"HA17\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HA18\", $datos[\"HA18\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HA19\", $datos[\"HA19\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HA20\", $datos[\"HA20\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HA21\", $datos[\"HA21\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HA22\", $datos[\"HA22\"], PDO::PARAM_STR);\n $stmt->bindParam(\":HA23\", $datos[\"HA23\"], PDO::PARAM_STR);\n $stmt->bindParam(\":AF1\", $datos[\"AF1\"], PDO::PARAM_STR);\n $stmt->bindParam(\":AF2\", $datos[\"AF2\"], PDO::PARAM_STR);\n $stmt->bindParam(\":AF3\", $datos[\"AF3\"], PDO::PARAM_STR);\n $stmt->bindParam(\":AF4\", $datos[\"AF4\"], PDO::PARAM_STR);\n $stmt->bindParam(\":AF5\", $datos[\"AF5\"], PDO::PARAM_STR);\n $stmt->bindParam(\":AF6\", $datos[\"AF6\"], PDO::PARAM_STR);\n $stmt->bindParam(\":AF7\", $datos[\"AF7\"], PDO::PARAM_STR);\n $stmt->bindParam(\":AF8\", $datos[\"AF8\"], PDO::PARAM_STR);\n $stmt->bindParam(\":AF9\", $datos[\"AF9\"], PDO::PARAM_STR);\n $stmt->bindParam(\":AF10\", $datos[\"AF10\"], PDO::PARAM_STR);\n $stmt->bindParam(\":AF11\", $datos[\"AF11\"], PDO::PARAM_STR);\n \n\n \n\n\n\n \n \n\n if($stmt->execute()){\n\n return \"ok\";\n\n }else{\n\n return \"error\";\n \n }\n\n $stmt->close();\n $stmt = null;\n\n}"
] |
[
"0.66240513",
"0.64594024",
"0.64118314",
"0.6410553",
"0.64053124",
"0.639336",
"0.6390423",
"0.63664275",
"0.63372236",
"0.6325736",
"0.6309955",
"0.63068634",
"0.6296636",
"0.6287814",
"0.6280536",
"0.6246873",
"0.6242694",
"0.6223576",
"0.6197108",
"0.6195615",
"0.61865693",
"0.6184766",
"0.6182858",
"0.6175149",
"0.61744547",
"0.61568576",
"0.6153095",
"0.6147151",
"0.61313313",
"0.613036"
] |
0.64849406
|
1
|
Write the start of the sheet we will be adding data to.
|
public function start_sheet($columns) {
if ($this->sheetstarted) {
echo ",";
} else {
$this->sheetstarted = true;
}
$this->sheetdatadded = false;
echo "[";
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function addNewSheet();",
"public function addNewSheetAndMakeItCurrent();",
"abstract public function addNewSheet();",
"private function writeHeader(): void\n {\n $record = 0x0014; // Record identifier\n\n /* removing for now\n // need to fix character count (multibyte!)\n if (strlen($this->phpSheet->getHeaderFooter()->getOddHeader()) <= 255) {\n $str = $this->phpSheet->getHeaderFooter()->getOddHeader(); // header string\n } else {\n $str = '';\n }\n */\n\n $recordData = StringHelper::UTF8toBIFF8UnicodeLong($this->phpSheet->getHeaderFooter()->getOddHeader());\n $length = strlen($recordData);\n\n $header = pack('vv', $record, $length);\n\n $this->append($header . $recordData);\n }",
"private function initExcel()\n {\n $this->savePointer = function () {\n $arrayData = [];\n $arrayData[] = $this->headerRow;\n for ($i = 0; i < count($this->body); $i ++) {\n $arrayData[] = $this->body[$i];\n }\n $this->dataCollection->getActiveSheet()->fromArray($arrayData, NULL,\n 'A1');\n $writer = new Xlsx($this->dataCollection);\n $writer->save($this->reportPath);\n $this->dataCollection->disconnectWorksheets();\n unset($this->dataCollection);\n header('Content-type: application/vnd.ms-excel');\n header(\n 'Content-Disposition: attachment; filename=' . $this->reportTitle .\n '.xls');\n };\n }",
"function print_header(){\n\t\tglobal $worksheet, $xlsRow, $COM_LEVEL_SALP;\n\n\t\t$worksheet->set_column(0, 0, 6);\n\t\t$worksheet->set_column(1, 1, 20);\n\t\t$worksheet->set_column(2, 2, 25);\n\t\t$worksheet->set_column(3, 3, 50);\n\t\t$worksheet->set_column(4, 4, 15);\n\t\t$worksheet->set_column(5, 5, 15);\n\t\t$worksheet->set_column(6, 6, 15);\n\t\t$worksheet->set_column(7, 7, 15);\n\t\t$worksheet->set_column(8, 8, 35);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"เลขประจำตัวประชาชน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"ชื่อ-นามสกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"ตำแหน่ง/สังกัด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"เลขที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 5, \"อัตราเงินเดือน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 6, \"เงินตอบแทน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 8, \"หมายเหตุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"ตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"ที่เต็มขั้น\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"ร้อยละ 2 (บาท)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"ร้อยละ 4 (บาท)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t}",
"protected function _writeHeader() {\n $this->stream->write(\n implode ($this->colDelim, array_values ($this->colName))\n );\n // Insert Newline\n $this->stream->write($this->lineDelim);\n $this->headerWritten= TRUE;\n }",
"function sheetSetUp(){\n $client = getClient();\n\n //running a check to see if the file exist on google drive or not\n if (!file_exists('info')){\n\n $service = new Google_Service_Sheets($client);\n\n } else{\n\n echo' Already exist! Please contact your Admin';\n }\n\n\n $spreadsheet = new Google_Service_Sheets_Spreadsheet();\n $name = new Google_Service_Sheets_SpreadsheetProperties();\n\n $title = 'Info';\n $name->setTitle($title);\n $spreadsheet->setProperties($name);\n\n\n\n $sheet = new Google_Service_Sheets_Sheet();\n $grid_data = new Google_Service_Sheets_GridData();\n\n $cells = [];\n\n //this is where the values are coming from\n $info_arr = getTables();\n\n //this works now from our database\n foreach($info_arr as $key => $datatables){\n foreach($datatables as $dt) {\n $row_data = new Google_Service_Sheets_RowData();\n $cell_data = new Google_Service_Sheets_CellData();\n $extend_value = new Google_Service_Sheets_ExtendedValue();\n\n\n $extend_value->setStringValue($dt);\n $cell_data->setUserEnteredValue($extend_value);\n array_push($cells, $cell_data);\n $row_data->setValues($cells);\n $grid_data->setRowData([$row_data]);\n $sheet->setData($grid_data);\n };\n };\n\n //sets the sheet with the info\n $spreadsheet->setSheets([$sheet]);\n //creates the spreadsheet with the info in it\n $service->spreadsheets->create($spreadsheet);\n\n}",
"function print_header(){\n\t\tglobal $worksheet, $xlsRow;\n\n\t\t$worksheet->set_column(0, 0, 10);\n\t\t$worksheet->set_column(1, 1, 25);\n\t\t$worksheet->set_column(2, 2, 30);\n\t\t$worksheet->set_column(3, 3, 20);\n\t\t$worksheet->set_column(4, 4, 30);\n\t\t$worksheet->set_column(5, 5, 15);\n\t\t$worksheet->set_column(6, 6, 20);\n\t\t$worksheet->set_column(7, 7, 30);\n\t\t$worksheet->set_column(8, 8, 30);\n\t\t$worksheet->set_column(9, 9, 20);\n\t\t$worksheet->set_column(10, 10, 10);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"ชื่อ-สกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"สาขาวิชา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"ระดับการศึกษา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"สถานศึกษา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 5, \"ประเทศ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 6, \"ตำแหน่ง/ระดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"สังกัด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"ชื่อทุน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 9, \"ระยะเวลา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 10, \"จำนวนวัน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t}",
"public function start_sheet($columns) {\n echo \"<table border=1 cellspacing=0 cellpadding=3>\";\n echo \\html_writer::start_tag('tr');\n foreach ($columns as $k => $v) {\n echo \\html_writer::tag('th', $v);\n }\n echo \\html_writer::end_tag('tr');\n }",
"public function addNewSheetAndMakeItCurrent()\n {\n $worksheet = $this->addNewSheet();\n $this->setCurrentWorksheet($worksheet);\n\n return $worksheet;\n }",
"function print_header(){\n\t\tglobal $worksheet, $xlsRow;\n\t\tglobal $heading_name,$ORG_TITLE;\n\t\t\n\t\t$worksheet->set_column(0, 0, 5);\n\t\t$worksheet->set_column(1, 1, 40);\n\t\t$worksheet->set_column(2, 2, 27);\n\t\t$worksheet->set_column(3, 3, 25);\n\t\t$worksheet->set_column(4, 4, 12);\n\t\t$worksheet->set_column(5, 5, 5);\n\t\t$worksheet->set_column(6, 6, 4);\n\t\t$worksheet->set_column(7, 7, 4);\n\t\t$worksheet->set_column(8, 8, 4);\n\t\t$worksheet->set_column(9, 9, 4);\n\t\t$worksheet->set_column(10, 10, 4);\n\t\t$worksheet->set_column(11, 11, 4);\n\t\t$worksheet->set_column(12, 12, 18);\n\t\t$worksheet->set_column(13, 13, 25);\n\t\t$worksheet->set_column(14, 14, 5);\n\t\t$worksheet->set_column(15, 15, 8);\n\t\t$worksheet->set_column(16, 16, 28);\n\t\t$worksheet->set_column(17, 17, 15);\n\t\t$worksheet->set_column(18, 18, 20);\n\t\t$worksheet->set_column(19, 19, 12);\n\t\t$worksheet->set_column(20, 20, 8);\n\t\t$worksheet->set_column(21, 21, 12);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"(1)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"(2)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"(3)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"(4)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"(5)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"(6)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 9, \"(7)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 10, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 11, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 12, \"(8)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 13, \"(9)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 14, \"(10)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 15, \"(11)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 16, \"(12)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 17,\"(13)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 18, \"(14)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 19, \"(15)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 20, \"(16)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 21, \"(17)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"ชื่อส่วนราชการ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"เลข\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\",0));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 9, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"L\", 0));\n\t\t$worksheet->write($xlsRow, 10, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 11, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 12, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 13, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 14, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 15, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 16, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 17, \"พื้นที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 18, \"วุฒิการศึกษา/\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 19, \"อัตรา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 20, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 21, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"ชื่อ-สกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"ประจำตัว\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"เพศ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"เกิด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 9, \"บรรจุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 10, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 11, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 12, \"หมวด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 13, \"ชื่อตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 14, \"ชั้น\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 15, \"ตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 16, \"ส่วนกลาง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 17, \"ปฏิบัติงาน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 18, \"ประกาศนียบัตร\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 19, \"เงินเดือน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 20, \"ปีที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\t\t\n\t\t$worksheet->write($xlsRow, 21, \"หมายเหตุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\t\t\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 1, \"$ORG_TITLE\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"เขต/แขวง/ศูนย์\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"ประชาชน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"ว\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"ด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"ป\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 9, \"ว\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 10, \"ด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 11, \"ป\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 12, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 13, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 14, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 15, \"เลขที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 16, \"/ภูมิภาค\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 17, \"(จังหวัด)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 18, \"เฉพาะทาง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 19, \"ปัจจุบัน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 20, \"เกษียณ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 21, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t}",
"private function writeSetup(): void\n {\n $record = 0x00A1; // Record identifier\n $length = 0x0022; // Number of bytes to follow\n\n $iPaperSize = $this->phpSheet->getPageSetup()->getPaperSize(); // Paper size\n $iScale = $this->phpSheet->getPageSetup()->getScale() ?: 100; // Print scaling factor\n\n $iPageStart = 0x01; // Starting page number\n $iFitWidth = (int) $this->phpSheet->getPageSetup()->getFitToWidth(); // Fit to number of pages wide\n $iFitHeight = (int) $this->phpSheet->getPageSetup()->getFitToHeight(); // Fit to number of pages high\n $iRes = 0x0258; // Print resolution\n $iVRes = 0x0258; // Vertical print resolution\n\n $numHdr = $this->phpSheet->getPageMargins()->getHeader(); // Header Margin\n\n $numFtr = $this->phpSheet->getPageMargins()->getFooter(); // Footer Margin\n $iCopies = 0x01; // Number of copies\n\n // Order of printing pages\n $fLeftToRight = $this->phpSheet->getPageSetup()->getPageOrder() === PageSetup::PAGEORDER_DOWN_THEN_OVER\n ? 0x0 : 0x1;\n // Page orientation\n $fLandscape = ($this->phpSheet->getPageSetup()->getOrientation() == PageSetup::ORIENTATION_LANDSCAPE)\n ? 0x0 : 0x1;\n\n $fNoPls = 0x0; // Setup not read from printer\n $fNoColor = 0x0; // Print black and white\n $fDraft = 0x0; // Print draft quality\n $fNotes = 0x0; // Print notes\n $fNoOrient = 0x0; // Orientation not set\n $fUsePage = 0x0; // Use custom starting page\n\n $grbit = $fLeftToRight;\n $grbit |= $fLandscape << 1;\n $grbit |= $fNoPls << 2;\n $grbit |= $fNoColor << 3;\n $grbit |= $fDraft << 4;\n $grbit |= $fNotes << 5;\n $grbit |= $fNoOrient << 6;\n $grbit |= $fUsePage << 7;\n\n $numHdr = pack('d', $numHdr);\n $numFtr = pack('d', $numFtr);\n if (self::getByteOrder()) { // if it's Big Endian\n $numHdr = strrev($numHdr);\n $numFtr = strrev($numFtr);\n }\n\n $header = pack('vv', $record, $length);\n $data1 = pack('vvvvvvvv', $iPaperSize, $iScale, $iPageStart, $iFitWidth, $iFitHeight, $grbit, $iRes, $iVRes);\n $data2 = $numHdr . $numFtr;\n $data3 = pack('v', $iCopies);\n $this->append($header . $data1 . $data2 . $data3);\n }",
"function setHeader($file_name){\t\n\t\t// echo date('H:i:s') , \" Set header/footer\" , EOL;\n\t\t$this->objPHPExcel->getActiveSheet()->getHeaderFooter()->setOddHeader('&L&G&C&HPlease treat this document as confidential!');\n\t\t$this->objPHPExcel->getActiveSheet()->getHeaderFooter()->setOddFooter('&L&B' . $this->objPHPExcel->getProperties()->getTitle() . '&RPage &P of &N');\n\t\t// Set page orientation and size\n\t\t$this->objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE);\n\t\t$this->objPHPExcel->getActiveSheet()->getPageSetup()->setPaperSize(PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4);\n\t\t// Rename worksheet\n\t\t// echo date('H:i:s') , \" Rename worksheet\" , EOL;\n\t\t$this->objPHPExcel->getActiveSheet()->setTitle($file_name);\n\t\t// Set active sheet index to the first sheet, so Excel opens this as the first sheet\n\t\t$this->objPHPExcel->setActiveSheetIndex(0);\n\t\t// download the excel file\n\t\t$this->output($file_name);\n\t}",
"public function beginLabelSheet ()\r\n {\r\n $this->label_column = 1;\r\n $this->label_row = 1;\r\n return '\r\n <div class=\"labelpage\">\r\n <div class=\"labelrow\">\r\n <div class=\"labelbody\">';\r\n }",
"function saveInGoogleSheets($data) {\n $client = getGoogleClient();\n $sheets = new \\Google_Service_Sheets($client);\n\n // Create a new row value\n $valueRange = new \\Google_Service_Sheets_ValueRange();\n $valueRange->setValues(array(\n 'values' => array(date_format(date_create(), DATE_ISO8601), $data['name'], $data['email'], $data['contactno'])\n ));\n\n // Inset new row into Google Sheets\n $sheets->spreadsheets_values->append(SPREADSHEET_ID, SPREADSHEET_RANGE, $valueRange, array(\n 'valueInputOption' => 'USER_ENTERED'\n ));\n}",
"private function startDocumentSchema() {\n $this->xmlSchema = '<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n <?mso-application progid=\"Excel.Sheet\"?>\n <Workbook\n xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"\n xmlns:o=\"urn:schemas-microsoft-com:office:office\"\n xmlns:x=\"urn:schemas-microsoft-com:office:excel\"\n xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\"\n xmlns:html=\"http://www.w3.org/TR/REC-html40\">\n ';\n }",
"function createWorkbook($recordset, $StartDay, $EndDay)\n{\n\n global $objPHPExcel;\n $objPHPExcel->createSheet(1);\n $objPHPExcel->createSheet(2);\n\n $objPHPExcel->getDefaultStyle()->getFont()->setSize(7);\n\n // Set document properties\n $objPHPExcel->getProperties()->setCreator(\"HTC\")\n ->setLastModifiedBy(\"HTC\")\n ->setTitle(\"HTC - State Fair Schedule \" . date(\"Y\"))\n ->setSubject(\"State Fair Schedule \" . date(\"Y\"))\n ->setDescription(\"State Fair Schedule \" . date(\"Y\"));\n\n addHeaders($StartDay, $EndDay);\n addTimes($StartDay,$EndDay);\n // Add some data\n addWorksheetData($recordset);\n\n\n // adding data required for spreadsheet to work properly\n addStaticData();\n\n // Rename worksheet\n $objPHPExcel->setActiveSheetIndex(2)->setTitle('Overnight');\n $objPHPExcel->setActiveSheetIndex(1)->setTitle('Night');\n $objPHPExcel->setActiveSheetIndex(0)->setTitle('Morning');\n\n\n\n $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');\n\n $objWriter->save('../Export/excel/Schedule' . date(\"Y\") . '.xls');\n\n return 'Schedule' . date(\"Y\") . '.xls';\n\n}",
"public function addWorksheet($worksheet) {\n array_push($this->worksheets, $worksheet);\n }",
"private function writeHeader()\n {\n $this->write(AvroDataIO::magic());\n $this->datum_writer->writeData(\n AvroDataIO::metadataSchema(),\n $this->metadata,\n $this->encoder\n );\n $this->write($this->sync_marker);\n }",
"public function basic2(){\n // Create new Spreadsheet object\n $spreadsheet = new Spreadsheet();\n\n // Set document properties\n\n $spreadsheet->getProperties()->setCreator('Maarten Balliauw')\n ->setLastModifiedBy('Maarten Balliauw')\n ->setTitle('Office 2007 XLSX Test Document')\n ->setSubject('Office 2007 XLSX Test Document')\n ->setDescription('Test document for Office 2007 XLSX, generated using PHP classes.')\n ->setKeywords('office 2007 openxml php')\n ->setCategory('Test result file');\n\n// Add some data\n $spreadsheet->setActiveSheetIndex(0)\n ->setCellValue('A1', 'Hello')\n ->setCellValue('B2', 'world!')\n ->setCellValue('C1', 'Hello')\n ->setCellValue('D2', 'world!');\n\n// Miscellaneous glyphs, UTF-8\n $spreadsheet->setActiveSheetIndex(0)\n ->setCellValue('A4', 'Miscellaneous glyphs')\n ->setCellValue('A5', 'éàèùâêîôûëïüÿäöüç');\n\n// Rename worksheet\n $spreadsheet->getActiveSheet()->setTitle('Simple');\n\n// Set active sheet index to the first sheet, so Excel opens this as the first sheet\n $spreadsheet->setActiveSheetIndex(0);\n\n// Redirect output to a client’s web browser (Ods)\n header('Content-Type: application/vnd.oasis.opendocument.spreadsheet');\n header('Content-Disposition: attachment;filename=\"01simple.ods\"');\n header('Cache-Control: max-age=0');\n// If you're serving to IE 9, then the following may be needed\n header('Cache-Control: max-age=1');\n\n// If you're serving to IE over SSL, then the following may be needed\n header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past\n header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified\n header('Cache-Control: cache, must-revalidate'); // HTTP/1.1\n header('Pragma: public'); // HTTP/1.0\n\n $writer = IOFactory::createWriter($spreadsheet, 'Ods');\n $writer->save('php://output');\n exit;\n\n }",
"public function Header(){\n\t\t$this->lineFeed(10);\n\t}",
"function createHourLogSheet($name, $data, &$workBook, $ambs){\n\t$file = 0;\n\t$excel = 1;\n\n\t$cols = array('Log ID', 'Date', 'Date Logged', 'Ambassador', 'Event Name', 'Hours', 'People', 'Schools', 'Experience', 'Questions', 'Would make your job better', 'Improvements you could make');\n\t$entries = array('id', 'eventDate', 'logTime', 'ambassador', 'eventName', 'hours', 'peopleInteracted', 'otherSchools', 'experience', 'questions', 'madeJobBetter', 'improvements');\n\n\t$numSemesterTours = count($data);\n\tif($excel)\n\t\t$tourSheet = & $workBook->add_worksheet($name. ' Hours');\n\tif($file)\n\t\tfwrite($f, \"\\nWorksheet: $name Tours\\n\");\n\t$numCols = count($cols);\n\n\t//Set the column widths\n\tfor($col = 0; $col < $numCols; $col++){\n\t\t$colName = $cols[$col];\n\t\t$colRef = $entries[$col];\t\n\t\t$maxWidth = getTextWidth($colName);\n\t\tif($excel)\n\t\t\t$tourSheet->write_string(0, $col, $colName);\n\t\tif($file)\n\t\t\tfwrite($f, \"Row: 0, Col: $col, $colRef: $colName, width:$maxWidth\\t\");\n\n\t\tfor($logNum = 0; $logNum < $numSemesterTours; $logNum++){\n\t\t\t$text = $data[$logNum][$colRef];\n\t\t\tif($colRef == 'ambassador')\n\t\t\t{\n\t\t\t\t$text = $ambs[\"$text\"]['name'];\n\t\t\t}\n\t\t\t$width = getTextWidth($text);\n\t\t\tif($width > $maxWidth){\n\t\t\t\t$maxWidth = $width;\n\t\t\t}\n\t\t\t/*\n\t\t\t //formats do not work at the moment\n\t\t\t if($col == 0){\n\t\t\t\t$tourSheet->set_row($logNum + 1, NULL, $formatOffset + ($tour % 2));\n\t\t\t}\n\t\t\t*/\n\t\t}\n\t\tif($file)\n\t\t\tfwrite($f, \"\\n\");\n\t\tif($excel)\n\t\t\t$tourSheet->set_column($col, $col, $maxWidth * (2.0/3.0));\n\t}\n\n\t//Now we just add all the logs to the right page\n\tfor($col = 0; $col < $numCols; $col++){\n\t\t$colRef = $entries[$col];\n\t\tfor($logNum = 0; $logNum < $numSemesterTours; $logNum++){\n\t\t\t$text = $data[$logNum][$colRef];\n\t\t\tif($colRef == 'ambassador')\n\t\t\t{\n\t\t\t\t$text = $ambs[\"$text\"]['name'];\n\t\t\t}\n if(is_numeric($text)){\n \tif ($colRef == 'hours') {\n $tourSheet->write_number($logNum + 1, $col, floatval($text));\n }\n else {\n\t\t\t\t $tourSheet->write_number($logNum + 1, $col, intval($text));\n }\n\t\t\t} else {\n\t\t\t\t$tourSheet->write_string($logNum + 1, $col, $text);\n\t\t\t}\n\t\t}\n\t}\n}",
"protected function writeHeader()\n {\n fwrite( $this->fd,\n \"<?php\\n\" );\n }",
"private function writeProtect(): void\n {\n // Exit unless sheet protection has been specified\n if ($this->phpSheet->getProtection()->getSheet() !== true) {\n return;\n }\n\n $record = 0x0012; // Record identifier\n $length = 0x0002; // Bytes to follow\n\n $fLock = 1; // Worksheet is protected\n\n $header = pack('vv', $record, $length);\n $data = pack('v', $fLock);\n\n $this->append($header . $data);\n }",
"protected function addheader($filename)\n {\n $excelObject = PHPExcel_IOFactory::load($filename);\n //$excelObject = new PHPExcel();\n $excelObject->getProperties()\n ->setCreator(\"Gemstracker\")\n ->setLastModifiedBy(\"Gemstracker\")\n ->setTitle($this->model->getName());\n\n $activeSheet = $excelObject->getActiveSheet();\n\n $columnHeaders = $this->getColumnHeaders();\n $row = 1;\n\n $exportName = $this->getName();\n\n $i=0;\n $cell = 'A1';\n foreach($columnHeaders as $columnName=>$columnHeader) {\n $column = $this->getColumn($i);\n $cell = $column . $row;\n if (isset($this->data[$exportName]) && isset($this->data[$exportName]['format']) && in_array('formatVariable', $this->data[$exportName]['format'])) {\n $activeSheet->setCellValue($cell, $columnHeader);\n } else {\n $activeSheet->setCellValue($cell, $columnName);\n }\n if ($excelCellSize = $this->model->get($columnName, 'excelCellSize')) {\n $activeSheet->getColumnDimension($column)->setWidth($excelCellSize);\n } else {\n $activeSheet->getColumnDimension($column)->setAutoSize(true);\n }\n $i++;\n }\n\n $activeSheet->getStyle(\"A1:$cell\")->getFont()->setBold(true);\n\n $objWriter = PHPExcel_IOFactory::createWriter($excelObject, \"Excel2007\");\n $objWriter->save($filename);\n }",
"private function writeMergedCells(): void\n {\n $mergeCells = $this->phpSheet->getMergeCells();\n $countMergeCells = count($mergeCells);\n\n if ($countMergeCells == 0) {\n return;\n }\n\n // maximum allowed number of merged cells per record\n $maxCountMergeCellsPerRecord = 1027;\n\n // record identifier\n $record = 0x00E5;\n\n // counter for total number of merged cells treated so far by the writer\n $i = 0;\n\n // counter for number of merged cells written in record currently being written\n $j = 0;\n\n // initialize record data\n $recordData = '';\n\n // loop through the merged cells\n foreach ($mergeCells as $mergeCell) {\n ++$i;\n ++$j;\n\n // extract the row and column indexes\n $range = Coordinate::splitRange($mergeCell);\n [$first, $last] = $range[0];\n [$firstColumn, $firstRow] = Coordinate::indexesFromString($first);\n [$lastColumn, $lastRow] = Coordinate::indexesFromString($last);\n\n $recordData .= pack('vvvv', $firstRow - 1, $lastRow - 1, $firstColumn - 1, $lastColumn - 1);\n\n // flush record if we have reached limit for number of merged cells, or reached final merged cell\n if ($j == $maxCountMergeCellsPerRecord || $i == $countMergeCells) {\n $recordData = pack('v', $j) . $recordData;\n $length = strlen($recordData);\n $header = pack('vv', $record, $length);\n $this->append($header . $recordData);\n\n // initialize for next record, if any\n $recordData = '';\n $j = 0;\n }\n }\n }",
"private function writePanes(): void\n {\n if (!$this->phpSheet->getFreezePane()) {\n // thaw panes\n return;\n }\n\n [$column, $row] = Coordinate::indexesFromString($this->phpSheet->getFreezePane());\n $x = $column - 1;\n $y = $row - 1;\n\n [$leftMostColumn, $topRow] = Coordinate::indexesFromString($this->phpSheet->getTopLeftCell() ?? '');\n //Coordinates are zero-based in xls files\n $rwTop = $topRow - 1;\n $colLeft = $leftMostColumn - 1;\n\n $record = 0x0041; // Record identifier\n $length = 0x000A; // Number of bytes to follow\n\n // Determine which pane should be active. There is also the undocumented\n // option to override this should it be necessary: may be removed later.\n $pnnAct = 0;\n if ($x != 0 && $y != 0) {\n $pnnAct = 0; // Bottom right\n }\n if ($x != 0 && $y == 0) {\n $pnnAct = 1; // Top right\n }\n if ($x == 0 && $y != 0) {\n $pnnAct = 2; // Bottom left\n }\n if ($x == 0 && $y == 0) {\n $pnnAct = 3; // Top left\n }\n\n $this->activePane = $pnnAct; // Used in writeSelection\n\n $header = pack('vv', $record, $length);\n $data = pack('vvvvv', $x, $y, $rwTop, $colLeft, $pnnAct);\n $this->append($header . $data);\n }",
"public function StartReport(){\n $this->AliasNbPages();\n $this->AddPage();\n $this->SetAutoPageBreak(true, 11);\n $this->SetTextColor(0);\n }",
"function createTourLogSheet($name, $data, &$workBook, $writeStats){\n\t$file = 0;\n\t$excel = 1;\n\t$cols = array('Tour ID', 'Date/Time', 'Majors', 'Student', 'Parent', 'People', 'School', 'Year', 'City', 'State', 'Email', 'Phone', 'Tour Status', 'Comments from Family', 'Comments from Ambassadors');\n\t$entries = array('id', 'tourTime', 'majorsOfInterest', 'studentName', 'parentName', 'numPeople', 'school', 'yearInSchool', 'city', 'state', 'email', 'phone', 'status', 'tourComments', 'ambComments');\n\n\t$tourDayCounts = array_fill(0, 7, 0);\n\t$tourWeekCounts = array_fill(0, 53, 0);\n\t$tourDateCounts = array_fill(0, 53, null);\n\t$weekStrings = array();\n\t$numSemesterTours = count($data);\n\t$timeStringLength = 0;\n\tif($excel)\n\t\t$tourSheet = & $workBook->add_worksheet($name. ' Tours');\n\tif($file)\n\t\tfwrite($f, \"\\nWorksheet: $name Tours\\n\");\n\t$numCols = count($cols);\n\tfor($col = 0; $col < $numCols; $col++){\n\t\t$colName = $cols[$col];\n\t\t$colRef = $entries[$col];\n\t\t$maxWidth = getTextWidth($colName);\n\t\tif($excel)\n\t\t\t$tourSheet->write_string(0, $col, $colName);\n\t\tif($file)\n\t\t\tfwrite($f, \"Row: 0, Col: $col, $colRef: $colName, width:$maxWidth\\t\");\n\n\t\tfor($tour = 0; $tour < $numSemesterTours; $tour++){\n\t\t\t$text = $data[$tour][$colRef];\n\t\t\t$width = getTextWidth($text);\n\t\t\tif($width > $maxWidth){\n\t\t\t\t$maxWidth = $width;\n\t\t\t}\n\n\t\t\tif($excel){\n\t\t\t\tif(is_numeric($text)){\n\t\t\t\t\t$tourSheet->write_number($tour + 1, $col, intval($text));\n\t\t\t\t} else {\n\t\t\t\t\t$tourSheet->write_string($tour + 1, $col, $text);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($file)\n\t\t\t\tfwrite($f, \"Row: $tour, Col: $col, val: $text, width: $width\\t\");\n\n\t\t\t/*\n\t\t\t //formats do not work at the moment\n\t\t\t if($col == 0){\n\t\t\t\t$tourSheet->set_row($tour + 1, NULL, $formatOffset + ($tour % 2));\n\t\t\t}\n\t\t\t*/\n\t\t}\n\t\tif($file)\n\t\t\tfwrite($f, \"\\n\");\n\t\tif($excel)\n\t\t\t$tourSheet->set_column($col, $col, $maxWidth * (2.0/3.0));\n\t}\n\n\tfor($tour = 0; $tour < $numSemesterTours; $tour++){\n\t\tif($file)\n\t\t\tfwrite($f, \"Week 03: \".$tourWeekCounts[\"03\"].\"\\n\");\n\t\t//and now we add each tour to the stats\n\t\t$timestamp = strtotime($data[$tour]['tourTime']);\n\t\tif($file)\n\t\t\tfwrite($f, \"timestamp: $timestamp Time:\".$tour['tourTime'].\" Week: \".date('W', $timestamp).\"\\n\");\n\t\tif(($timestamp == false) || ($timestamp == -1)) continue;\n\t\t$tourDOW = intval(date('w', $timestamp));\n\t\t$tourDayCounts[\"$tourDOW\"] += 1;\n\t\t$tourWeek = intval(date('W', $timestamp));\n\t\t$tourWeekCounts[\"$tourWeek\"] += 1;\n\t\tif($tourDateCounts[\"$tourWeek\"] == null){\n\t\t\t$tourDateCounts[\"$tourWeek\"] = array_fill(0,7,0);\n\t\t}\n\t\t$tourDateCounts[\"$tourWeek\"][\"$tourDOW\"] += 1;\n\n\t\t//and create the date string for this week if it doesn't exist already\n\t\tif(!array_key_exists($tourWeek, $weekStrings)){\n\t\t\t$timeInfo = getdate($timestamp);\n\t\t\t$sunTimestamp = mktime(0,0,0, $timeInfo['mon'], $timeInfo['mday'] - $tourDOW, $timeInfo['year']);\n\t\t\t$satTimestamp = mktime(0,0,0, $timeInfo['mon'], $timeInfo['mday'] - $tourDOW + 6, $timeInfo['year']);\n\t\t\tif(date('M', $sunTimestamp) == date('M', $satTimestamp)){\n\t\t\t\t$timeStr = date('M j', $sunTimestamp) . ' - ' . date('j', $satTimestamp);\n\t\t\t} else {\n\t\t\t\t$timeStr = date('M j', $sunTimestamp) . ' - ' . date('M j', $satTimestamp);\n\t\t\t}\n\t\t\t$weekStrings[\"$tourWeek\"] = $timeStr;\n\t\t\t$tsl = getTextWidth($timeStr);\n\t\t\tif($tsl > $timeStringLength) $timeStringLength = $tsl;\n\t\t}\n\t}\n\n\tif(!$writeStats) return;\n\n\tif($excel)\n\t\t$statsSheet = &$workBook->add_worksheet($name.' Stats');\n\n\t//fill the column headers and set the the column widths\n\t$statsSheet->set_column(0, 0, $timeStringLength * (2.0/3.0));\n\t$statsSheet->write_string(0, 1, \"Monday\");\n\t$statsSheet->set_column(1, 1, getTextWidth(\"Monday\") * (2.0/3.0));\n\t$statsSheet->write_string(0, 2, \"Tuesday\");\n\t$statsSheet->set_column(2, 2, getTextWidth(\"Tuesday\") * (2.0/3.0));\n\t$statsSheet->write_string(0, 3, \"Wednesday\");\n\t$statsSheet->set_column(3, 3, getTextWidth(\"Wednesday\") * (2.0/3.0));\n\t$statsSheet->write_string(0, 4, \"Thursday\");\n\t$statsSheet->set_column(4, 4, getTextWidth(\"Thursday\") * (2.0/3.0));\n\t$statsSheet->write_string(0, 5, \"Friday\");\n\t$statsSheet->set_column(5, 5, getTextWidth(\"Friday\") * (2.0/3.0));\n\t$statsSheet->write_string(0, 6, \"Total\");\n\t$statsSheet->set_column(6, 6, getTextWidth(\"Total\") * (2.0/3.0));\n\n\t//then start populating all the data from the tours\n\t$numWeeks = count($tourDateCounts);\n\t$displayWeek = 0;\n\t//write the counts for each week\n\tfor($week = 0; $week < $numWeeks; $week++){\n\t\tif($file){\n\t\t\tfwrite($f, \"Week $week, Tours \".$tourWeekCounts[$week].\"\\n\");\n\t\t\tfor($i = 0; $i < 7; $i++){\n\t\t\t\tfwrite($f, \"Day $i, Tours \".$tourDateCounts[$week][$i].\"\\n\");\n\t\t\t}\n\t\t}\n\t\tif($tourWeekCounts[$week] == 0) continue;\n\t\t$statsSheet->write_string($displayWeek+1, 0, $weekStrings[$week]);\n\t\tfor($day = 1; $day < 6; $day++){\n\t\t\tif($excel)\n\t\t\t\t$statsSheet->write_number($displayWeek + 1, $day, $tourDateCounts[$week][$day]);\n\t\t\tif($file)\n\t\t\t\tfwrite($f, \"Week $week, Day $day, Tours \".$tourDateCounts[$week][$day].\"\\n\");\n\t\t}\n\t\t//write the totals for each week\n\t\tif($excel)\n\t\t\t$statsSheet->write_number($displayWeek + 1, 6, $tourWeekCounts[$week]);\n\t\tif($file)\n\t\t\tfwrite($f, \"Week $week, Total Tours \".$tourWeekCounts[$week].\"\\n\");\n\t\t$displayWeek++;\n\t}\n\t//then write the totals for the semester\n\tfor($day = 1; $day < 6; $day++){\n\t\tif($excel)\n\t\t\t$statsSheet->write_number($displayWeek + 1, $day, $tourDayCounts[$day]);\n\t\tif($file)\n\t\t\tfwrite($f, \"Day $day, Total Tours \".$tourDayCounts[$day].\"\\n\");\n\t}\n\n\tif($excel)\n\t\t$statsSheet->write_number($displayWeek + 1, 6, $numSemesterTours);\n\tif($file)\n\t\tfwrite($f, \"Total Tours: $numSemesterTours\\n\");\n\n\tunset($tourDayCounts);\n\tunset($tourWeekCounts);\n\tunset($tourDateCounts);\n\tunset($weekStrings);\n}"
] |
[
"0.6542814",
"0.6337713",
"0.62140524",
"0.57222587",
"0.5678176",
"0.5599824",
"0.55768526",
"0.5555556",
"0.550592",
"0.5461196",
"0.5458305",
"0.5426933",
"0.5333455",
"0.5278608",
"0.5272833",
"0.5269869",
"0.5250138",
"0.5242245",
"0.5238856",
"0.52183473",
"0.52163035",
"0.5184787",
"0.5165888",
"0.5165688",
"0.5146934",
"0.5101535",
"0.5044898",
"0.5039537",
"0.5037846",
"0.5033003"
] |
0.66617155
|
0
|
Get the attached point player
|
public function get_point_owner()
{
$player_obj = User::find($this->player_id);
return $player_obj;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function getPlayer()\n {\n return $this->participation->getPlayer();\n }",
"public function getPlayer()\n {\n return $this->player;\n }",
"public function getPlayer()\n {\n return $this->player;\n }",
"public function getPlayer()\n {\n return $this->player;\n }",
"public function getPlayer()\n\t{\n\t\treturn $this->player;\n\t}",
"public function getPlayer()\n {\n return $this->get(self::_PLAYER);\n }",
"public function getPlayer()\n {\n return $this->get(self::_PLAYER);\n }",
"public function getPlayer();",
"public function point()\n {\n \treturn $this->club ? $this->club->point : null;\n }",
"public function getPlayer() {\n return $this->db->getPlayerById($this->playerId);\n }",
"public function player() : Player\n {\n return $this->player;\n }",
"public function getPlayer()\n {\n return $this->hasOne(Player::class, ['id' => 'player_id']);\n }",
"public function getPlayer()\n {\n return $this->hasOne(Player::class, ['id' => 'player_id']);\n }",
"public function getGuildpoint()\n {\n return $this->get(self::_GUILDPOINT);\n }",
"public function getHostPlayer() {\n return $this->hostPlayer;\n }",
"public function getMe()\n {\n return $this->players[$this->myId];\n }",
"public function getPlayer() {\n\t\tif($this->practice)\n\t\t\treturn $this->practice->golfer;\n\n\t\treturn $this->registration->competition->rule->team_score ? $this->registration->team : $this->registration->golfer;\n\t}",
"public function player() {\n\t\treturn $this->hasOne('App\\Models\\Player', 'id', 'player_id');\n\t}",
"public function player()\n {\n return $this->hasOne('App\\Models\\Player');\n }",
"public function getMarkedPlayer(): Player\n {\n return $this->players[$this->getPlayerIndexMarker()];\n }",
"public function getPlayerOnMove() {\n\t\t$playerRepository = new PlayerRepository();\n\t\tif ($this['inter_turn']) {\n\t\t\treturn $playerRepository->getOneById($this['inter_turn']);\n\t\t} else {\n\t\t\treturn $this->getPlayerOnTurn();\n\t\t}\n\t}",
"public function getIdPlayer()\n {\n return $this->idPlayer;\n }",
"public function getPlayerId(){\n\t\treturn $this->playerId;\n\t}",
"public function getPlayer_id() {\n return $this->getValue('player_id');\n }",
"public function getSkillPoint()\n {\n return $this->get(self::_SKILL_POINT);\n }",
"public function getSkillPoint()\n {\n return $this->get(self::_SKILL_POINT);\n }",
"public function getPlayerOnTurn() {\n\t\tif ($this['turn']) {\n\t\t\t$playerRepository = new PlayerRepository();\n\t\t\treturn $playerRepository->getOneById($this['turn']);\n\t\t}\n\t\treturn NULL;\n\t}",
"public function getPlayerId()\n {\n return $this->playerId;\n }",
"public function player()\n {\n return $this->hasOne('Bitaac\\Contracts\\Player', 'id', 'player_id');\n }",
"public function getPlayerId() {\n return $this->playerId;\n }"
] |
[
"0.73269236",
"0.71728635",
"0.71728635",
"0.71728635",
"0.711703",
"0.7102838",
"0.7102838",
"0.7053343",
"0.6950596",
"0.66201365",
"0.65975463",
"0.65276724",
"0.65276724",
"0.64928925",
"0.64550966",
"0.63238615",
"0.61848855",
"0.6153608",
"0.6117377",
"0.61102146",
"0.61022294",
"0.6075265",
"0.60682964",
"0.60313946",
"0.5998838",
"0.5998838",
"0.59680855",
"0.591298",
"0.59089357",
"0.5892606"
] |
0.7331975
|
0
|
/////////////////////// Allergies // ////////////////////// Operation listsAllergiesGet Fetch Regimen allergies (for select options).
|
public function listsAllergiesGet()
{
$response = Allergies::all();
return response()->json($response, 200);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function listsAllergiesByIdGet($allergy_id)\r\n {\r\n $response = Allergies::findOrFail($allergy_id);\r\n return response()->json($response, 200);\r\n }",
"public function allergies()\n {\n return $this->belongsToMany(Allergy::class);\n }",
"public function allergies()\n {\n return $this->belongsToJson(Allergy::class,'allergy_ids');\n }",
"public function get_all_registered()\n {\n }",
"public function get_all_registered()\n {\n }",
"public function get_all()\n\t{\n\t\t$db = $this->db_connection->get_connection();\n\n $sql = \"SELECT id, realtor, manager FROM settings_reserve ORDER BY id DESC\";\n\n \t$query = $db->prepare($sql);\n\n\t\tif ($query->execute()) {\n\t\t\treturn $query->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t} else {\n\t\t\thttp_response_code(500);\n\t\t\t$this->validator->check_response();\n\t\t}\n\t}",
"function getAgencyListForDropdownCom() {\n\t\tglobal $dbh;\n\t\t$agencies = array();\n\t\t\n\t\t$sql = \"SELECT AgentId, AgncyCity FROM Agencies\";\n\t\ttry {\n\t\t\tgetDBConnection();\n\t\t\t\n\t\t\t$result = mysqli_query($dbh, $sql);\n\t\t\t\n\t\t\tif(!$result) {\n\t\t\t\tprint(\"Query failed: \" . mysqli_errno($dbh) . \"--\" . mysqli_error($dbh) . \"<br/>\");\n\t\t\t\texit();\n\t\t\t}\n\t\t\t\n\t\t\twhile ($values = mysqli_fetch_object($result)) {\n\t\t\t\t$agency = new Agency();\n\t\t\t\t$agency -> setAgency($values);\n\t\t\t\tarray_push($agencies, $agency);\n\t\t\t}\n\n\t\t\treturn $agencies;\n\t\t\t\n\t\t} catch (Exception $e){\n\t\t\tprint \"<br/> $e\";\n\t\t} finally {\n\t\t\tcloseDBConnection();\n\t\t}\n\t}",
"public function showAllAgent(Request $request)\n {\n $agent_specialists = AgentActivation::get();\n foreach($agent_specialists as $key => $agent){\n $agent_specialists[$key]->fullname = $agent->first_name.' '.$agent->last_name;\n }\n if($request->is('api/*')){\n return Response()->json($agent_specialists);\n }\n return view('home.agent_list');\n }",
"public function getRegencies() {\n\t\t$db\t\t= $this->_db;\n\t\t\n\t\t// Create a new query object.\n\t\t$query\t= $db->getQuery(true);\n\t\t$query->select($db->quoteName(array('a.id', 'a.name', 'a.type', 'a.short_name', 'a.iso_code')));\n\t\t$query->from($db->quoteName('#__gtpihpssurvey_ref_regencies', 'a'));\n\t\t$query->order($db->quoteName('a.id') . ' asc');\n\t\t//$query->where($db->quoteName('a.published') . ' = 1');\n\t\t//echo nl2br(str_replace('#__','pihps_',$query));\n\t\t$db->setQuery($query);\n\t\t$data = $db->loadObjectList('id');\n\n\t\tforeach ($data as &$item) {\n\t\t\t$item->name = sprintf(JText::_('COM_GTPIHPS_'.strtoupper($item->type)), trim($item->name));\n\t\t}\n\n\t\treturn $data;\n\t}",
"public function getAllergyList($patient_id)\r\n {\r\n try{ \r\n $patient_id = encrypt_decrypt('decrypt',$patient_id);\r\n } catch (\\Exception $e) {\r\n abort(404);\r\n exit;\r\n }\r\n $active = '';\r\n $previous_allergies = $this->allergy->allergyLists($patient_id);\r\n $type = 'case_load';\r\n if(request()->is_careplan)\r\n $is_careplan = 1;\r\n else\r\n $is_careplan = 0;\r\n $html = view('patients.allergies.allergies_listing',compact('active', 'previous_allergies', 'patient_id','type','is_careplan'))->render(); \r\n return response()->json(['message' => trans('message.listing_found'), 'html' => $html], 200);\r\n }",
"public function getall() {\n\n\t\techo json_encode(array_merge($this->response, Person::getall()));\n\n\t}",
"public static function getAll() {}",
"public static function getAll();",
"public static function getAll();",
"function get_all_get(){\n $result = $this->lecturers_model->get_all();\n $this->response($result); \n\n }",
"public static function getRegencies() {\n\t\t$db = JFactory::getDBO();\n\n\t\t// Create a new query object.\n\t\t$query = $db->getQuery(true);\n\n\t\t$query->select($db->quoteName('a.id', 'value'));\n\t\t$query->select($db->quoteName('a.name', 'text'));\n\t\t$query->from($db->quoteName('#__gtpihpssurvey_ref_regencies', 'a'));\n\t\t\n\t\t$query->where($db->quoteName('a.published') . ' = 1');\n\t\t\n\t\t$db->setQuery($query);\n\t\t$data = $db->loadObjectList();\n\n\t\tarray_unshift($data, (object) array(\n\t\t\t'value' => 0,\n\t\t\t'text' => 'Semua Kabupaten/Kota'\n\t\t));\n\n\t\treturn $data;\n\t}",
"function getBuildingList() {\n return getAll(\"SELECT * FROM building\");\n}",
"public function selectAll() {\n\t\t$employees = $this->employee->all();\n\n\t\t$data = array();\n\t\tforeach ($employees as $employee) {\n\t\t\t$data[] = array(\n\t\t\t\t'name' => $employee->name . ' (' . $employee->contact_number . ')',\n\t\t\t\t'id' => $employee->id,\n\t\t\t);\n\t\t}\n\n\t\treturn $data;\n\t}",
"public function getAllEmployers();",
"public function getAllOfficeEmployers();",
"public function junglehunter_get_all() {\n return rest_ensure_response(JungleHunter_Database::junglehunter_get_all());\n }",
"public function getAll() {\n $list = $this->_tableGw->select();\n return $list;\n }",
"public function getAllBusinesses() {\n\t\t$em = $this->getEntityManager();\n\t\t$businesses = $em->createQueryBuilder()\n\t\t\t->select('b.businessID,b.costCenter,b.name')\n\t\t\t->from('Business', 'b')\n\t\t\t->orderBy('b.name')\n\t\t\t->getQuery()\n\t\t\t->getResult();\n\t\t\n\t\t$response = array(\n\t\t\t\"businesses\" => $businesses\n\t\t);\n\t\t\n\t\treturn $this->respond($response);\n\t}",
"public static function getAll()\n {\n $database = DatabaseFactory::getFactory()->getConnection();\n\n $sql = \"SELECT region_id, region_name FROM region\";\n $query = $database->prepare($sql);\n $query->execute();\n\n // fetchAll() is the PDO method that gets all result rows\n return $query->fetchAll();\n }",
"public function getAllClients($db){\n \n $sql = \"SELECT * FROM client_registrations\";\n\n $pst = $db->prepare($sql);\n $pst->execute();\n\n $Clients = $pst->fetchAll(PDO::FETCH_OBJ);\n\n\n return $Clients;\n }",
"public static function getAll(): array;",
"function get_all_genders()\n\t\t{\n\t\t\t$query=\"SELECT * from tbl_gender\";\n\t\t\t$result = execute_query($query);\n\t\t\treturn new readonlyresultset($result);\n\t\t}",
"public function getAggsByList() {\n return $this->_get(6);\n }",
"public function get_all_countries_list()\n\t {\n\t \t$query=$this->ApiModel->get_all_countries();\n\t \techo json_encode($query);\n\t }",
"public function get_all ();"
] |
[
"0.7039627",
"0.6312185",
"0.62777996",
"0.59698176",
"0.5969722",
"0.5910252",
"0.5785692",
"0.5767983",
"0.57556534",
"0.5708979",
"0.56845784",
"0.56683016",
"0.56630504",
"0.56630504",
"0.5655215",
"0.5644743",
"0.5632576",
"0.56238705",
"0.5619764",
"0.55807525",
"0.5576142",
"0.5539158",
"0.5522528",
"0.5518112",
"0.5517334",
"0.55132914",
"0.5507149",
"0.54826117",
"0.5479945",
"0.54681057"
] |
0.7739841
|
0
|
Operation listsAllergiesAllergyIdGet Fetch Allergy specified by allergyId.
|
public function listsAllergiesByIdGet($allergy_id)
{
$response = Allergies::findOrFail($allergy_id);
return response()->json($response, 200);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function listsAllergiesGet()\r\n {\r\n $response = Allergies::all(); \r\n return response()->json($response, 200); \r\n }",
"public function getAllergyList($patient_id)\r\n {\r\n try{ \r\n $patient_id = encrypt_decrypt('decrypt',$patient_id);\r\n } catch (\\Exception $e) {\r\n abort(404);\r\n exit;\r\n }\r\n $active = '';\r\n $previous_allergies = $this->allergy->allergyLists($patient_id);\r\n $type = 'case_load';\r\n if(request()->is_careplan)\r\n $is_careplan = 1;\r\n else\r\n $is_careplan = 0;\r\n $html = view('patients.allergies.allergies_listing',compact('active', 'previous_allergies', 'patient_id','type','is_careplan'))->render(); \r\n return response()->json(['message' => trans('message.listing_found'), 'html' => $html], 200);\r\n }",
"public function allergies()\n {\n return $this->belongsToJson(Allergy::class,'allergy_ids');\n }",
"public function allergies()\n {\n return $this->belongsToMany(Allergy::class);\n }",
"public function getAllergyDetail($patient_id,Request $request)\r\n {\r\n try{\r\n $patient_id = encrypt_decrypt('decrypt',$patient_id);\r\n $id = encrypt_decrypt('decrypt',$request->id);\r\n\r\n } catch (\\Exception $e) {\r\n abort(404);\r\n exit;\r\n }\r\n $allergy = $this->allergy->allergyDetail($id);\r\n\r\n $type = 'case_load';\r\n $html = view('patients.allergies.allergy_history',compact('active', 'allergy'))->render();\r\n return $this->respond(['message' => '', 'html' => $html]);\r\n }",
"public function showDrugAllergies(Patient $patient, DrugAllergies $drugAllergies)\n {\n //$this->authorize('view',$patient);\n Patient::class;\n $patient = $drugAllergies->where('patient_id', $patient['id'])->get();\n return response()->json(new DrugAllergiesCollection($patient), 200);\n }",
"public function postAllergySave(PatientAllergyRequest $request)\r\n {\r\n $response = $this->allergy->addAllergy($request); \r\n if ($response) {\r\n $previous_allergies = $this->allergy->allergyLists($request->patient_id);\r\n $type = 'case_load';\r\n $is_careplan = 0;\r\n $html = view('patients.allergies.allergies_listing',compact('active', 'previous_allergies', 'patient_id','type','is_careplan'))->render();\r\n\r\n\r\n $message = trans('message.allergy_created_successfully');\r\n if($request->action != 'add') {\r\n $message = trans('message.allergy_updated_successfully');\r\n }\r\n\r\n $request->session()->flash('message.level','success');\r\n $request->session()->flash('message.content',$message);\r\n return $this->respond([\r\n 'message'=> $message,\r\n 'html' => $html\r\n ]);\r\n }\r\n \r\n $request->session()->flash('message.level','danger');\r\n $request->session()->flash('message.content',trans('message.error_medication_created'));\r\n return response()->json(['message'=>trans('message.error_medication_created')],200);\r\n }",
"public function readAllergy()\n {\n $query = \"select group_concat(Allergy.name) as allergy from Student\n inner join Student_Allergy on Student_Allergy.student_ID = Student.ID\n inner join Allergy on Allergy.ID = Student_Allergy.allergy_ID\n where Student.ID = ?\";\n\n $stmt = $this->conn->prepare($query);\n // bind data\n $stmt->bindParam(1, $this->ID);\n\n $stmt->execute();\n\n return $stmt;\n }",
"public function getAllIDinOrg($getHealthOrgId){\n return $this->select(\"user_id\")\n ->where(\"business_id\", $getHealthOrgId)\n ->get()\n ->toArray();\n }",
"public function listsIllnessesByIdGet($illness_id)\r\n {\r\n $response = Illnesses::findOrFail($illness_id);\r\n return response()->json($response, 200);\r\n }",
"public function getAllAgencies($id) { \n $select = $this->select();\n $select->where(\"user_id = '\".$id.\"' and status=0\" );\n $select->order('id ASC');\n \t\t\t\n\t\treturn $this->fetchAll($select)->toArray();\n\t\t\n }",
"public function from_hospital_info($referral_id){\n\t\tglobal $con;\n\t\t$hos_id=\"\";\n\t\t$query=\"SELECT from_hospital_id FROM referrals WHERE referral_id=\\\"$referral_id\\\" LIMIT 1\";\n\t\t$result=array();\n\t\t$result=$this->select($con,$query);\n\t\tforeach ($result as $key => $value) {\n\t\t\t$hos_id=$value['from_hospital_id'];\n\t\t}\n\t\t//select hospital info\n\t\tunset($result);\n\t\t$query1=\"SELECT hospitals.*,hospital_regions.region_title \n\t\t\t\t \tFROM hospitals JOIN hospital_regions ON\n\t\t \t\t\t\thospitals.location=hospital_regions.id \n\t\t \t\t\t\t\tWHERE hospital_id=\\\"$hos_id\\\"\";\n\n\t\t$result=$this->select($con,$query1);\n\t\treturn $result;\n\t}",
"private function getLenders($loan_id) {\n\t\t// Retrieve from DB details about bids, join with profile and return info about each lender.\n\t\treturn DB::table('bids')\n\t\t\t\t\t -> join ('profile', 'bids.user_id', '=', 'profile.id')\n\t\t\t\t\t -> select ('bids.bid_id', 'profile.fname', 'profile.lname', 'profile.streetno', 'profile.street', 'profile.suburb', 'profile.state', 'profile.postcode', 'bids.bid_amount')\n\t\t\t\t\t -> where ('bids.loan_id', '=', $loan_id)\n\t\t\t\t\t -> orderBy ('profile.lname', 'ASC')\n\t\t\t\t\t -> get(); // Returns array.\n\t}",
"public function getConsultantBookings($consultantId)\n {\n $this->logger->info(\"get all active consultant bookings\");\n\n return $this->em->getRepository(\"SkedAppCoreBundle:Booking\")\n ->getAllConsultantBookings($consultantId);\n }",
"public function show($medical_id)\n {\n return $this->allergies->where($medical_id);\n \n }",
"public function to_hospital_info($referral_id){\n\t\tglobal $con;\n\t\t$hos_id=\"\";\n\t\t$query=\"SELECT to_hospital_id FROM referrals WHERE referral_id=\\\"$referral_id\\\" LIMIT 1\";\n\t\t$result=array();\n\t\t$result=$this->select($con,$query);\n\t\tforeach ($result as $key => $value) {\n\t\t\t$hos_id=$value['to_hospital_id'];\n\t\t}\n\t\t//select hospital info\n\t\tunset($result);\n\t\t$query1=\"SELECT hospitals.*,hospital_regions.region_title \n\t\t\t\t \tFROM hospitals JOIN hospital_regions ON\n\t\t \t\t\t\thospitals.location=hospital_regions.id \n\t\t \t\t\t\t\tWHERE hospital_id=\\\"$hos_id\\\"\";\n\n\t\t$result=$this->select($con,$query1);\n\t\treturn $result;\n\t}",
"public function get_holidays($id = '*') {\n $loc_holdidays = Yii::app()->db->createCommand()\n ->select('l.loc_name, h.hol_name, h.hol_description, h.hol_date')\n ->from('shop_control.shop_holidays sh, locations l, holidays h')\n ->where('l.loc_id = sh.loc_id and sh.hol_id = h.hol_id')\n ->queryAll();\n\n return $loc_holdidays;\n }",
"function getRatingAgencyById($id) {\n global $RATING_AGENCY_BY_ID_SQL;\n \n $SQL = sprintf($RATING_AGENCY_BY_ID_SQL, $id);\n $result = mysql_query($SQL);\n\n $agency = array();\n if (mysql_num_rows($result) == 0) {\n return $agency;\n }\n \n $row = mysql_fetch_array($result);\n \n $agency['id'] = $row['raid'];\n $agency['name'] = $row['name'];\n $agency['fullName'] = $row['fullName'];\n \n return $agency;\n}",
"public function get_other_referral_info($referral_id){\n\t\tglobal $con;\n\t\t$query=\"SELECT referrals.physician_name,referrals.physician_phone,referrals.mode_of_transport,referrals.receive_department,referral_attachments.* \n\t\tFROM referrals JOIN referral_attachments\n\t\t\tON referrals.referral_id=referral_attachments.referral_id \n\t\t\t\t\t\tWHERE referrals.referral_id=\\\"$referral_id\\\"\";\n\t\t$result=array();\n\t\t$result=$this->select($con,$query);\n\t\treturn $result;\n\t}",
"function getAllWithDagindelingWhereDagindelingId($dagindelingId){\n $this->db->where('dagindelingId', $dagindelingId);\n $query = $this->db->get('taak');\n $taken = $query->result();\n \n $this->load->model('dagindeling_model');\n $this->load->model('locatie_model');\n foreach ($taken as $taak) {\n $taak->dagindeling = $this->dagindeling_model->getByTaak($taak->dagindelingId);\n $taak->locatie = $this->locatie_model->getById($taak->locatieId);\n }\n return $taken;\n }",
"public function getAll()\n {\n $data_detail = ModelHotelDetails::with('hotel')->get();\n return $data_detail;\n }",
"function getGalley($id) {\n\t\t$galleyDao = \\DAORegistry::getDAO('ArticleGalleyDAO');\n\t\t$galley = $galleyDao->getGalley($id);\n\t\tif (method_exists($galley, 'getArticleId')) {\n\t\t\t$this->registerGalleys($galley, $galley->getArticleId());\n\t\t} else {\n\t\t\t$this->log->log(\"could not get galley nr \" . $id);\n\t\t}\n\t}",
"public function getHotelById($id, $withDeleted = false)\n {\n if ($withDeleted) {\n return $this->select('hotel_list.*, GROUP_CONCAT(hotel_facilities.facility_id) AS facilities')\n ->join('hotel_facilities', 'hotel_list.id = hotel_facilities.hotel_id')\n ->groupBy('hotel_facilities.hotel_id')\n ->withDeleted()\n ->find($id);\n }\n\n return $this->select('hotel_list.*, GROUP_CONCAT(hotel_facilities.facility_id) AS facilities')\n ->join('hotel_facilities', 'hotel_list.id = hotel_facilities.hotel_id')\n ->groupBy('hotel_facilities.hotel_id')\n ->find($id);\n }",
"public function get_emergency_contacts($individual_id)\n\t{\n\t\t//retrieve all users\n\t\t$this->db->from('individual_emergency, relationship');\n\t\t$this->db->select('*');\n\t\t$this->db->where('individual_emergency.individual_id = '.$individual_id.' AND individual_emergency.relationship_id = relationship.relationship_id');\n\t\t$this->db->order_by('individual_emergency_fname');\n\t\t$query = $this->db->get();\n\t\t\n\t\treturn $query;\n\t}",
"function get_rombel($id)\n {\n return $this->db->get_where('rombel',array('id'=>$id))->row_array();\n }",
"function getAllWhereDagindeling($dagindelingId){\n $this->db->where('dagindelingid', $dagindelingId);\n $query = $this->db->get('taak');\n return $query->result();\n }",
"public static function get_all_by_room($id)\n\t{\n\t\ttry\n\t\t{\n\t\t\treturn DB::table('devices')\n\t\t\t\t->where('room_id', '=', $id)\n\t\t\t\t->get();\n\t\t}\n\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tLog::write('error', $e->getMessage());\n\t\t\tthrow $e;\n\t\t}\n\t}",
"public function updateAllergyStatus(AllergyStatusRequest $request)\r\n {\r\n $allergy = $this->allergy->changeStatus($request);\r\n $message = trans('message.allergy_started_successfully');\r\n\r\n if(!$allergy->status) {\r\n $message = trans('message.allergy_discontinued_successfully');\r\n }\r\n\r\n return $this->respond([\r\n 'status' => 'success',\r\n 'message'=> $message\r\n ]);\r\n }",
"public function get(string $offerId): EbayOfferDetailsWithAll\n {\n return $this->client->request('getOffer', 'GET', \"offer/{$offerId}\",\n [\n ]\n );\n }",
"public function getAllAttendances($id){\n\t\t$query = \"SELECT * FROM attendance where studentId=\".$id;\n\t\t$dbcontroller = new DBController();\n\t\t$this->attendance = $dbcontroller->executeSelectQuery($query);\n\t\treturn $this->attendance;\n }"
] |
[
"0.595884",
"0.5797597",
"0.56973153",
"0.56795895",
"0.56427264",
"0.53042364",
"0.50950235",
"0.5090938",
"0.5004022",
"0.49151182",
"0.4860501",
"0.47468525",
"0.4746042",
"0.47344777",
"0.47134843",
"0.46292096",
"0.45949715",
"0.45899653",
"0.4585572",
"0.456912",
"0.4556109",
"0.4484948",
"0.44634736",
"0.44614145",
"0.44399917",
"0.44379255",
"0.4433966",
"0.44249764",
"0.44145367",
"0.4413278"
] |
0.72251725
|
0
|
Operation listsCategoriesPost create a Category.
|
public function listsCategoriesPost()
{
$input = Request::all();
$new_catgory = Category::create($input);
if($new_catgory){
return response()->json(['msg' => 'Created Category'], 200);
}else{
return response('Oops, seems like something went wrong while trying to create a category');
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function Categories($optParams = array()) {\n $params = array();\n $params = array_merge($params, $optParams);\n $data = $this->__call('Categories', array($params));\n if ($this->useObjects()) {\n return new CategoriesResponse($data);\n } else {\n return $data;\n }\n }",
"public function create()\n {\n $categories = Category::all();\n return view(\"post/create\", compact(\"categories\"));\n }",
"public function create(Request $request, Category $category)\n {\n $categoriesToArray = [];\n $post = Post::class;\n // get categories without children\n $categories = $category->has('children', '=', 0)->get()->toArray();\n foreach ($categories as $cat) {\n $categoriesToArray[$cat['id']] = $cat['name'];\n }\n\n return view('posts.create',[\n 'post' => $post,\n 'categories' => $categoriesToArray\n ]);\n }",
"public function getCategories()\n {\n list($response) = $this->getCategoriesWithHttpInfo();\n return $response;\n }",
"public function create()\n {\n $categories = category::all();\n return view('admin.posts.add',compact('categories'));\n }",
"public function create()\n {\n $categories = Category::all();\n return view('post.create', compact('categories'));\n }",
"public function store(CreatePostCategoryRequest $request)\n {\n $input = $request->all();\n\n $postCategory = $this->postCategoryRepository->create($input);\n\n Flash::success('Post Category saved successfully.');\n\n return redirect(route('admin.postCategories.index'));\n }",
"public function create()\n {\n $categories = $this->categoryRepository->getAll();\n\n return view('post.create', compact('categories'));\n }",
"public function create()\n {\n $categories = Category::all();\n\n return view('posts.create', compact('categories'));\n }",
"public function create()\n {\n $categories = Category::all();\n\n return view('posts.create')->with($categories);\n }",
"public function create(){\n $listcat=Blog_categories::all();\n return view ('blog_posts.create',['categories'=>$listcat]);\n }",
"public function create()\n {\n $categories = Category::all();\n return view('Post.create')->with([\"categories\"=> $categories]);\n }",
"function createCategories()\n {\n $currentCategories = $this->loadCategories();\n\n foreach ($this->categories as $category)\n {\n // Skip adding category if it already exists\n if (in_array($category, $currentCategories))\n {\n continue;\n }\n\n // Create a copy of the template array for category properties\n $data = array_merge($this->categoryTemplate);\n\n // Set the category description from the translation key in en-GB.com_cajobboard.sys.ini\n // remove any spaces from the category title when building the translation key\n $data['title'] = Text::_('COM_CAJOBBOARD_CATEGORY_TITLE_' . strtoupper(str_replace(' ', '', $category)));\n\n $data['description'] = $data['title'];\n\n // Initialize a new category\n $category = Table::getInstance('Category');\n\n // Bind passed category parameters to Category model\n $category->bind($data);\n\n // setLocation(integer $referenceId, string $position = 'after')\n $category->setLocation($category->getRootId(), 'last-child');\n\n // Check to make sure our data is valid. check() will auto generate alias if not set above.\n if (!$category->check())\n {\n throw new \\Exception($category->getError(), 500);\n\n return false;\n }\n\n // Store the category\n if (!$category->store(true))\n {\n throw new \\Exception($category->getError(), 500);\n\n return false;\n }\n\n // Build the path for our category and set it in the database\n $category->rebuildPath($category->id);\n }\n\n Table::getInstance('Category')->rebuild();\n }",
"public function create()\n {\n $categories = Category::all();\n return view('admin.posts.create',compact('categories'));\n }",
"public function create()\n {\n $categories = Category::all();\n return view('posts.create', compact('categories'));\n }",
"public function create()\n {\n $categories = Category::all();\n return view('posts.create', compact('categories'));\n }",
"function wp_create_categories($categories, $post_id = '')\n {\n }",
"public function create()\n {\n $categories = Category::all();\n return view('posts.create')->withCategories($categories);\n }",
"public function create()\n {\n $categories=$this->getCategories();\n\n return view('admin.posts.create',['categories'=>$categories]);\n }",
"public function create()\n {\n $blogPostCategories = BlogPostCategory::all();\n return view('admin.blog_post.create',compact('blogPostCategories'));\n }",
"public function create()\n {\n $categories = Category::all();\n return view('posts.create',compact('categories'));\n\n }",
"public function create()\n {\n return view('admin.post_categories.create');\n }",
"public function create()\n {\n return view('admin.post_categories.create');\n }",
"public function create()\n\t{\n $categories = Category::lists('name', 'id');\n\n return View::make('admin.posts.create', [ 'categories' => $categories ]);\n\t}",
"public function create() {\n $categorias = Category::all();\n return view('posts.create', ['categorias'=>$categorias]);\n }",
"public static function create()\n {\n if(isset($_POST['create_post']) && Html::form()->validate())\n {\n $postId = Blog::post()->insert(array(\n 'user_id' => User::current()->id,\n 'title' => $_POST['title'],\n 'slug' => String::slugify($_POST['title']),\n 'body' => $_POST['body']\n ));\n\n if($postId)\n {\n foreach($_POST['category_id'] as $catId)\n {\n Db::table('categories_posts')->insert(array(\n 'category_id' => $catId,\n 'post_id' => $postId\n ));\n }\n\n Message::ok('Post created successfully.');\n $_POST = array(); // Clear form\n }\n else\n Message::error('Error creating post. Please try again.');\n }\n\n $formData[] = array(\n 'fields' => array(\n 'title' => array(\n 'title' => 'Title',\n 'type' => 'text',\n 'validate' => array('required')\n ),\n 'body' => array(\n 'title' => 'Body',\n 'type' => 'textarea',\n 'attributes' => array('class' => 'tinymce')\n ),\n 'category_id[]' => array(\n 'title' => 'Category',\n 'type' => 'select',\n 'options' => self::_getSelectCategories(),\n 'attributes' => array(\n 'multiple' => 'multiple'\n ),\n 'validate' => array('required')\n ),\n 'create_post' => array(\n 'type' => 'submit',\n 'value' => 'Create Post'\n )\n )\n );\n\n return array(\n 'title' => 'Create Post',\n 'content' => Html::form()->build($formData)\n );\n }",
"public function create()\n {\n\n $categories= Category::all();\n\n\n\n return view('page.new-post',compact('categories'));\n }",
"public function create()\n {\n $categories = Category::pluck('name', 'id');\n return view('post.create', compact('categories'));\n }",
"public function create()\n {\n $categories = Category::select('id', 'name')->get();\n return view('post.create', compact('categories'));\n }",
"public function create()\n {\n return view('post.create', [\n 'categories' => Category::all(['id', 'name'])\n ]);\n }"
] |
[
"0.5802758",
"0.56355363",
"0.557231",
"0.552287",
"0.5436962",
"0.5377538",
"0.5362839",
"0.5318857",
"0.53150046",
"0.53041315",
"0.53000414",
"0.52987325",
"0.5282805",
"0.52791685",
"0.52749455",
"0.52749455",
"0.52475005",
"0.52458733",
"0.52421254",
"0.5225649",
"0.5216875",
"0.5213756",
"0.5213756",
"0.5211681",
"0.5171667",
"0.51671916",
"0.5149813",
"0.5136646",
"0.51349604",
"0.51337695"
] |
0.6061499
|
0
|
Operation listsCategoriesCategoryIdDelete Deletes a Category specified by serviceId.
|
public function listsCategoriesDelete($category_id)
{
Category::destroy($category_id);
return response()->json(['msg' => 'deleted Category'], 200);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function destroy(CategoryRequest $request, $id, CategoryService $service)\n {\n return $service->delete($id);\n }",
"public function deleteAllByCategoryId($id)\n {\n return $this->deleteByColumn('category_Id', $id);\n }",
"public function postDeleteCharacterCategory(Request $request, CharacterCategoryService $service, $id)\n {\n if($id && $service->deleteCharacterCategory(CharacterCategory::find($id))) {\n flash('Category deleted successfully.')->success();\n }\n else {\n foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();\n }\n return redirect()->to('admin/data/character-categories');\n }",
"function deleteCourseCategoryByCategoryId($CategoryId){\n return $this->delete(\"CategoryId=$CategoryId\");\n }",
"public function deleteCategoryById($categoryId)\n {\n $category = Category::findOrFail($categoryId);\n\n $category->delete();\n\n $this->imageServices->deleteImage($category->image);\n\n// $this->menuServices->deleteCategoryFromMenu($category->slug, $category->system_link_type_id);\n\n return 'Delete category \"' . $category->name . '\" successful';\n }",
"public function getUniverseCategoriesCategoryId($categoryId, $datasource = 'tranquility', $language = 'en-us', $userAgent = null, $xUserAgent = null)\n {\n list($response) = $this->getUniverseCategoriesCategoryIdWithHttpInfo($categoryId, $datasource, $language, $userAgent, $xUserAgent);\n return $response;\n }",
"public static function deleteCategory($categoryId)\n\t{\n\t\t\t$category = Category::find($categoryId);\n\t\t\t$category->delete();\n\t}",
"public function actionCategoryDelete()\n {\n $this->_assertCanManageCategories();\n\n $category_id = $this->_input->filterSingle('faq_id', XenForo_Input::UINT);\n\n // Delete category\n $dw = XenForo_DataWriter::create('Iversia_FAQ_DataWriter_Category');\n $dw->setExistingData($category_id);\n $dw->delete();\n\n // Delete associated questions\n $this->_getQuestionModel()->deleteOrphanQuestions($category_id);\n\n return $this->responseRedirect(\n XenForo_ControllerResponse_Redirect::SUCCESS,\n XenForo_Link::buildPublicLink('faq'),\n new XenForo_Phrase('iversia_faq_category_deleted')\n );\n }",
"function deleteCourseCategory($CourseId,$CategoryId){\n return $this->delete(array(\"CourseId = ?\"=>$CourseId ,\"CategoryId = ?\"=>$CategoryId));\n }",
"public function Categories($optParams = array()) {\n $params = array();\n $params = array_merge($params, $optParams);\n $data = $this->__call('Categories', array($params));\n if ($this->useObjects()) {\n return new CategoriesResponse($data);\n } else {\n return $data;\n }\n }",
"public function categories_delete($app, $collection_id = null, $category_id = null) {\n\t\t//Delete category\n\t\t$success = Category::delete($category_id);\n\n\t\treturn $app->toJSON(['status' => $success]);\n\t}",
"public function delete_products_category($id)\n {\n $this->db->delete('productos_categorias', array('idOfertas'=>$id));\n }",
"public function delCategory($id_category)\n\t\t{\n\t\t\t$sql = \"DELETE FROM tbl_category_products WHERE id_category = :id_category\";\n\t\t\t$pre = $this->pdo->prepare($sql);\n\n\t\t\t$pre->bindParam(':id_category', $id_category);\n\n\t\t\treturn $pre->execute();\n\n\t\t}",
"public function deleteCategory($id)\n {\n $this->deleteCategoryWithHttpInfo($id);\n }",
"public static function deleteCategory($id)\n {\n \t$query = \"DELETE FROM categories WHERE id = :id\";\n \t$result = DB::delete($query, ['id' => $id]);\n\n \treturn $result;\n }",
"public function deleteCategory(int $id): void\n {\n }",
"public function categoryDelete(int $id): void\n {\n $categoryManager = new CategoryManager($this->getPdo());\n $categoryManager->deleteCategory($id);\n\n header('Location: /staff');\n }",
"public function CategoriesDelete($id)\n {\n $categorie = Categorie::find($id);\n $categorie->delete();\n\n return redirect()->route('showCategories');\n }",
"public function delCategory($idCategoria){\n\t\t$query = \"DELETE FROM final_categoria WHERE idCategoria = '\".$idCategoria.\"'\";\n\t\treturn $this->con->action($query);\n\t}",
"public function deleteCategory(Request $request, $id)\n {\n $this->authorize('delete');\n $category = Category::find($id);\n\n $category->delete();\n\n $request->session()->flash('success-message', 'Product deleted successfully');\n return redirect()->back();\n }",
"public function deleteCategory($id)\n {\n\n Category::findOrFail($id)->delete();\n $this->success_message = 'Category deleted successfully!';\n\n }",
"public function delete(Categories $productCategories)\n {\n $this->productCategoriesDao->getEntityManager()->remove($productCategories);\n $this->productCategoriesDao->getEntityManager()->flush();\n }",
"public function deleteCategory($id) {\n\t\t$stmt = $mysqli->prepare(\"DELETE FROM categorie WHERE cat_id = ?\");\n\t\t$stmt->bind_param('i', $id);\n\t\t$stmt->execute();\n\t\t$stmt->close();\n\t}",
"public function deleteCategory($intCategoryID)\n\t{\n\t\t\n\t\t$intDeleteID = $this->delete(\"category_id = $intCategoryID\");\n\t\treturn $intDeleteID;\n\t}",
"public function delete_category($id) {\n $this->category();\n\n $connection = new Database(\"sbrettsc_db\");\n $connection->do_sql(\"DELETE FROM category WHERE id = \" . $id);\n $this->index();\n\n }",
"public function delete($categoryId)\n {\n $category = Category::find($categoryId);\n $category->delete();\n $this->redirect('category-list');\n }",
"public function cdeleteAction($categoryId, Request $request)\n {\n $category = $this->categoryRepository->findCategoryById($categoryId);\n\n $ids = \\array_filter(\\explode(',', $request->get('ids')));\n foreach ($ids as $id) {\n $keyword = $this->keywordRepository->findById($id);\n $this->keywordManager->delete($keyword, $category);\n }\n\n $this->entityManager->flush();\n\n return $this->handleView($this->view());\n }",
"public function deleteCategory( $categoryId )\n {\n $this->categoryDao->deleteById($categoryId);\n \n $key = BOL_LanguageService::getInstance()->findKey('virtualgifts', 'category_' . $categoryId);\n \n if ( $key )\n {\n BOL_LanguageService::getInstance()->deleteKey($key->id, true);\n }\n \n return true;\n }",
"public static function deleteCategory($id)\n {\n // get db\n $db = BackendModel::getContainer()->get('database');\n\n // get item\n $item = self::getCategory($id);\n\n // build extra\n $extra = array('id' => $item['extra_id'],\n 'module' => 'Slideshow',\n 'type' => 'block',\n 'action' => 'Category');\n\n // delete extra\n $db->delete(\n 'modules_extras',\n 'id = ? AND module = ? AND type = ? AND action = ?',\n array($extra['id'], $extra['module'], $extra['type'], $extra['action'])\n );\n\n // delete the record\n $db->delete('slideshow_categories', 'id = ?', array((int) $id));\n }",
"public function restMarketsEbayCategoriesIdGet($id)\n {\n list($response) = $this->restMarketsEbayCategoriesIdGetWithHttpInfo($id);\n return $response;\n }"
] |
[
"0.55350846",
"0.54552746",
"0.53703773",
"0.53353035",
"0.52309567",
"0.5163925",
"0.51415443",
"0.49868053",
"0.49801967",
"0.49767277",
"0.49701187",
"0.49353734",
"0.48891267",
"0.48820347",
"0.4878917",
"0.4768682",
"0.47651532",
"0.4756056",
"0.47391358",
"0.4728307",
"0.47010687",
"0.46921432",
"0.46894804",
"0.46881247",
"0.46730828",
"0.46670336",
"0.46583247",
"0.4634296",
"0.4625641",
"0.45832604"
] |
0.5531987
|
1
|
/////////////////////// Counties // ////////////////////// Operation listsCountiesGet Fetch Regimen Counties (for select options).
|
public function listsCountiesget()
{
$response = County::all();
return response()->json($response, 200);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private function _counties()\n\t{\n\t\t$counties = ORM::factory('county')\n\t\t\t->orderby('county_name')\n\t\t\t->find_all();\n\n\t\treturn $counties;\n\t}",
"public function getCounties()\n {\n return $this->counties;\n }",
"public function counties()\n {\n $name = County::get();\n return view('counties')->with('counties', $name);\n }",
"public function listsCountiesByIdget($county)\r\n {\r\n $county = County::findOrFail($county);\r\n return response()->json($county, 200);\r\n }",
"public function listsSubcountiesget()\r\n {\r\n $response = Sub_county::get();\r\n return response()->json($response, 200);\r\n }",
"public function counties()\n {\n return $this->hasMany('App\\SelectedCounty');\n }",
"public function index()\n {\n return CountyResource::collection(County::all());\n }",
"public function setCounties(array $counties)\n {\n $this->counties = $counties;\n\n return $this;\n }",
"public function index(Request $request)\n {\n $requestData = [\n 'paginate' => true,\n 'per_page' => 10\n ];\n $items = $this->countyService->all($requestData);\n return view('counties.index', compact('items'));\n }",
"public function cities_get()\n {\n $em = $this->doctrine->em;\n $citiesRepo = $em->getRepository('Entities\\City');\n $cities = $citiesRepo->findAll();\n foreach ($cities as $city) {\n $city->servicesCount = $city->getServices()->count();\n }\n $response[\"data\"] = $cities;\n $response[\"count\"] = count($cities);\n $this->set_response($response, REST_Controller::HTTP_OK);\n\n }",
"public function listsCountiesput($county)\r\n {\r\n $input = Request::all();\r\n $county = County::findOrFail($county);\r\n $county->update(['name' => $input['name']]);\r\n if($county->save()){\r\n return response()->json(['msg' => 'Updated County', 'updated county' => $county], 200);\r\n }else{\r\n return response('Could not update a County');\r\n }\r\n }",
"function wc_ie_counties_add_counties( $states ) {\r\n\t$states['IE'] = array(\r\n\t\t'Carlow' => 'Carlow',\r\n\t\t'Cavan' => 'Cavan',\r\n\t\t'Clare' => 'Clare',\r\n\t\t'Cork' => 'Cork',\r\n\t\t'Donegal' => 'Donegal',\r\n\t\t'Dublin' => 'Dublin',\r\n\t\t'Galway' => 'Galway',\r\n\t\t'Kerry' => 'Kerry',\r\n\t\t'Kildare' => 'Kildare',\r\n\t\t'Kilkenny' => 'Kilkenny',\r\n\t\t'Laois' => 'Laois',\r\n\t\t'Leitrim' => 'Leitrim',\r\n\t\t'Limerick' => 'Limerick',\r\n\t\t'Longford' => 'Longford',\r\n\t\t'Louth' => 'Louth',\r\n\t\t'Mayo' => 'Mayo',\r\n\t\t'Meath' => 'Meath',\r\n\t\t'Monaghan' => 'Monaghan',\r\n\t\t'Offaly' => 'Offaly',\r\n\t\t'Roscommon' => 'Roscommon',\r\n\t\t'Sligo' => 'Sligo',\r\n\t\t'Tipperary' => 'Tipperary',\r\n\t\t'Waterford' => 'Waterford',\r\n\t\t'Westmeath' => 'Westmeath',\r\n\t\t'Wexford' => 'Wexford',\r\n\t\t'Wicklow' => 'Wicklow',\r\n\t);\r\n\treturn $states;\r\n}",
"public function sub_county(){\r\n $response = Sub_county::all();\r\n return response()->json($response, 200);\r\n }",
"public function listsCountiespost()\r\n {\r\n $input = Request::all();\r\n $new_county = County::create($input);\r\n if($new_county){\r\n return response()->json(['msg' => 'Created County', 'county' => $new_county], 200);\r\n }else{\r\n return response('Could not save county');\r\n }\r\n }",
"public function index()\n {\n return new CountyCollection(\n CountyResource::collection(\n County::all()\n )\n );\n }",
"public function index()\n {\n //\n $counties = County::all();\n return view('counties.index',array('title'=>'Counties','counties'=>$counties));\n }",
"public function getAllCounties($conditions) {\n $counties = [];\n\n $state = Arrays::GetValue($conditions, self::C_STATE, null);\n\n if (isset($state)) {\n $values = DB::table(self::TABLE_NAME)\n ->select(self::C_COUNTY)\n ->distinct()\n ->whereRaw('state=? OR stateFullName=?', [$state, $state])\n ->get();\n\n foreach ($values as $value) {\n $county = ucwords(strtolower($value->county));\n $counties[$county] = $county;\n }\n }\n\n return $counties;\n }",
"public function listsCountiesdelete($county)\r\n {\r\n County::destroy($county);\r\n return response()->json(['msg' => 'deleted County'], 200);\r\n }",
"public function lists()\n {\n $industry = new Industry();\n\n $output = $industry->industryLists();\n\n return response()->json(['industries' => $output ]);\n }",
"function GetCountries()\n\t{\n\t\t$result = $this->sendRequest(\"GetCountries\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}",
"public function getCustomerCountryList()\n {\n $customerCountryList = DB::table('country')\n ->join('city', 'country.country_id', '=', 'city.country_id')\n ->join('address', 'city.city_id', '=', 'address.city_id')\n ->join('customer', 'customer.address_id', '=', 'address.address_id')\n ->select(DB::raw('country.country, COUNT(customer.*)'))\n ->groupBy('country.country')\n ->orderBy('country')\n ->get();\n\n return response()->json([\n 'success' => true,\n 'message' => 'Customers country list',\n 'data' => $customerCountryList\n ]);\n }",
"public function getCountsList(){\n return $this->_get(6);\n }",
"function wc_uk_counties_add_counties( $states ) {\n\n $states['GB'] = array(\n 'AV' => 'Avon',\n 'BE' => 'Bedfordshire',\n 'BK' => 'Berkshire',\n 'BU' => 'Buckinghamshire',\n 'CA' => 'Cambridgeshire',\n 'CH' => 'Cheshire',\n 'CL' => 'Cleveland',\n 'CO' => 'Cornwall',\n 'CD' => 'County Durham',\n 'CU' => 'Cumbria',\n 'DE' => 'Derbyshire',\n 'DV' => 'Devon',\n 'DO' => 'Dorset',\n 'ES' => 'East Sussex',\n 'EX' => 'Essex',\n 'GL' => 'Gloucestershire',\n 'HA' => 'Hampshire',\n 'HE' => 'Herefordshire',\n 'HT' => 'Hertfordshire',\n 'IW' => 'Isle of Wight',\n 'KE' => 'Kent',\n 'LA' => 'Lancashire',\n 'LE' => 'Leicestershire',\n 'LI' => 'Lincolnshire',\n 'LO' => 'London',\n 'ME' => 'Merseyside',\n 'MI' => 'Middlesex',\n 'NO' => 'Norfolk',\n 'NH' => 'North Humberside',\n 'NY' => 'North Yorkshire',\n 'NS' => 'Northamptonshire',\n 'NL' => 'Northumberland',\n 'NT' => 'Nottinghamshire',\n 'OX' => 'Oxfordshire',\n 'SH' => 'Shropshire',\n 'SO' => 'Somerset',\n 'SM' => 'South Humberside',\n 'SY' => 'South Yorkshire',\n 'SF' => 'Staffordshire',\n 'SU' => 'Suffolk',\n 'SR' => 'Surrey',\n 'TW' => 'Tyne and Wear',\n 'WA' => 'Warwickshire',\n 'WM' => 'West Midlands',\n 'WS' => 'West Sussex',\n 'WY' => 'West Yorkshire',\n 'WI' => 'Wiltshire',\n 'WO' => 'Worcestershire',\n 'ABD' => 'Scotland / Aberdeenshire',\n 'ANS' => 'Scotland / Angus',\n 'ARL' => 'Scotland / Argyle & Bute',\n 'AYR' => 'Scotland / Ayrshire',\n 'CLK' => 'Scotland / Clackmannanshire',\n 'DGY' => 'Scotland / Dumfries & Galloway',\n 'DNB' => 'Scotland / Dunbartonshire',\n 'DDE' => 'Scotland / Dundee',\n 'ELN' => 'Scotland / East Lothian',\n 'EDB' => 'Scotland / Edinburgh',\n 'FIF' => 'Scotland / Fife',\n 'GGW' => 'Scotland / Glasgow',\n 'HLD' => 'Scotland / Highland',\n 'LKS' => 'Scotland / Lanarkshire',\n 'MLN' => 'Scotland / Midlothian',\n 'MOR' => 'Scotland / Moray',\n 'OKI' => 'Scotland / Orkney',\n 'PER' => 'Scotland / Perth and Kinross',\n 'RFW' => 'Scotland / Renfrewshire',\n 'SB' => 'Scotland / Scottish Borders',\n 'SHI' => 'Scotland / Shetland Isles',\n 'STI' => 'Scotland / Stirling',\n 'WLN' => 'Scotland / West Lothian',\n 'WIS' => 'Scotland / Western Isles',\n 'AGY' => 'Wales / Anglesey',\n 'GNT' => 'Wales / Blaenau Gwent',\n 'CP' => 'Wales / Caerphilly',\n 'CF' => 'Wales / Cardiff',\n 'CAE' => 'Wales / Carmarthenshire',\n 'CR' => 'Wales / Ceredigion',\n 'CW' => 'Wales / Conwy',\n 'DEN' => 'Wales / Denbighshire',\n 'FLN' => 'Wales / Flintshire',\n 'GLA' => 'Wales / Glamorgan',\n 'GWN' => 'Wales / Gwynedd',\n 'MT' => 'Wales / Merthyr Tydfil',\n 'MON' => 'Wales / Monmouthshire',\n 'PT' => 'Wales / Neath Port Talbot',\n 'NP' => 'Wales / Newport',\n 'PEM' => 'Wales / Pembrokeshire',\n 'POW' => 'Wales / Powys',\n 'RT' => 'Wales / Rhondda Cynon Taff',\n 'SS' => 'Wales / Swansea',\n 'TF' => 'Wales / Torfaen',\n 'WX' => 'Wales / Wrexham',\n 'ANT' => 'Northern Ireland / County Antrim',\n 'ARM' => 'Northern Ireland / County Armagh',\n 'DOW' => 'Northern Ireland / County Down',\n 'FER' => 'Northern Ireland / County Fermanagh',\n 'LDY' => 'Northern Ireland / County Londonderry',\n 'TYR' => 'Northern Ireland / County Tyrone',\n );\n return $states;\n\n}",
"public function countryList ( Request $request ) {\n $countries = Country::all();\n return response()->json([\n \"response\" => $countries\n ]);\n }",
"public function getCountriesCount() {\n $db = database::getDB();\n $query = \"SELECT COUNT(*) FROM countries ORDER BY id ASC\";\n $data = $db->query($query);\n return $data;\n }",
"public function actionCountries()\n {\n $continentId = Yii::$app->request->get(\"continentId\");\n $countries = Country::getAvailable( $continentId );\n echo json_encode( $countries );\n Yii::$app->end(200);\n }",
"public function getCities(Request $request) {\n\n $cities = CityModel::where('state_id', $request->state_id)->get();\n\n return response()->json($cities);\n }",
"public function listsSubcountiesByIdget($sub_county_id)\r\n {\r\n $sub_county = Sub_county::findOrFail($sub_county_id);\r\n return response()->json($sub_county, 200);\r\n }",
"public function index($order = 'county_name', $order_method = 'ASC') \r\n\t{\r\n\t\t$where = 'counties.branch_code = \\''.$this->session->userdata('branch_code').'\\'';\r\n\t\t$table = 'counties';\r\n\t\t//pagination\r\n\t\t$segment = 5;\r\n\t\t$this->load->library('pagination');\r\n\t\t$config['base_url'] = site_url().'admin-administration/counties/'.$order.'/'.$order_method;\r\n\t\t$config['total_rows'] = $this->users_model->count_items($table, $where);\r\n\t\t$config['uri_segment'] = $segment;\r\n\t\t$config['per_page'] = 20;\r\n\t\t$config['num_links'] = 5;\r\n\t\t\r\n\t\t$config['full_tag_open'] = '<ul class=\"pagination pull-right\">';\r\n\t\t$config['full_tag_close'] = '</ul>';\r\n\t\t\r\n\t\t$config['first_tag_open'] = '<li>';\r\n\t\t$config['first_tag_close'] = '</li>';\r\n\t\t\r\n\t\t$config['last_tag_open'] = '<li>';\r\n\t\t$config['last_tag_close'] = '</li>';\r\n\t\t\r\n\t\t$config['next_tag_open'] = '<li>';\r\n\t\t$config['next_link'] = 'Next';\r\n\t\t$config['next_tag_close'] = '</span>';\r\n\t\t\r\n\t\t$config['prev_tag_open'] = '<li>';\r\n\t\t$config['prev_link'] = 'Prev';\r\n\t\t$config['prev_tag_close'] = '</li>';\r\n\t\t\r\n\t\t$config['cur_tag_open'] = '<li class=\"active\"><a href=\"#\">';\r\n\t\t$config['cur_tag_close'] = '</a></li>';\r\n\t\t\r\n\t\t$config['num_tag_open'] = '<li>';\r\n\t\t$config['num_tag_close'] = '</li>';\r\n\t\t$this->pagination->initialize($config);\r\n\t\t\r\n\t\t$page = ($this->uri->segment($segment)) ? $this->uri->segment($segment) : 0;\r\n $v_data[\"links\"] = $this->pagination->create_links();\r\n\t\t$query = $this->counties_model->get_all_counties($table, $where, $config[\"per_page\"], $page, $order, $order_method);\r\n\t\t\r\n\t\t//change of order method \r\n\t\tif($order_method == 'DESC')\r\n\t\t{\r\n\t\t\t$order_method = 'ASC';\r\n\t\t}\r\n\t\t\r\n\t\telse\r\n\t\t{\r\n\t\t\t$order_method = 'DESC';\r\n\t\t}\r\n\t\t\r\n\t\t$data['title'] = 'counties';\r\n\t\t$v_data['title'] = $data['title'];\r\n\t\t\r\n\t\t$v_data['order'] = $order;\r\n\t\t$v_data['order_method'] = $order_method;\r\n\t\t$v_data['query'] = $query;\r\n\t\t$v_data['page'] = $page;\r\n\t\t$data['content'] = $this->load->view('counties/all_counties', $v_data, true);\r\n\t\t\r\n\t\t$this->load->view('admin/templates/general_page', $data);\r\n\t}",
"public function importUsaLevelCounties()\n {\n return $this->importData('USA_adm/USA_adm2.shp', 0);\n }"
] |
[
"0.7207413",
"0.6893629",
"0.6734384",
"0.67228216",
"0.6524391",
"0.6274878",
"0.60986376",
"0.6012208",
"0.5928073",
"0.58506906",
"0.5739985",
"0.5724558",
"0.5716873",
"0.5714868",
"0.56555265",
"0.56522083",
"0.56190306",
"0.55951524",
"0.5439685",
"0.5424731",
"0.5422514",
"0.5413652",
"0.5317547",
"0.5258549",
"0.521461",
"0.5158544",
"0.51550764",
"0.5143442",
"0.5126081",
"0.51214516"
] |
0.7344131
|
0
|
Operation listsCountiesCountyIdGet Fetch County specified by CountyId.
|
public function listsCountiesByIdget($county)
{
$county = County::findOrFail($county);
return response()->json($county, 200);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function listsCountiesget()\r\n {\r\n $response = County::all();\r\n return response()->json($response, 200);\r\n }",
"public function filterByCountyId($countyId = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($countyId)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $countyId)) {\n $countyId = str_replace('*', '%', $countyId);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(ZipToCityPeer::COUNTY_ID, $countyId, $comparison);\n }",
"private function _counties()\n\t{\n\t\t$counties = ORM::factory('county')\n\t\t\t->orderby('county_name')\n\t\t\t->find_all();\n\n\t\treturn $counties;\n\t}",
"public function index()\n {\n return CountyResource::collection(County::all());\n }",
"public function show($id)\n {\n return new CountyResource(\n County::find($id)\n );\n }",
"public function listsSubcountiesByIdget($sub_county_id)\r\n {\r\n $sub_county = Sub_county::findOrFail($sub_county_id);\r\n return response()->json($sub_county, 200);\r\n }",
"public function counties()\n {\n return $this->hasMany('App\\SelectedCounty');\n }",
"public function counties()\n {\n $name = County::get();\n return view('counties')->with('counties', $name);\n }",
"public function listsCountiesdelete($county)\r\n {\r\n County::destroy($county);\r\n return response()->json(['msg' => 'deleted County'], 200);\r\n }",
"public function listsCountiesput($county)\r\n {\r\n $input = Request::all();\r\n $county = County::findOrFail($county);\r\n $county->update(['name' => $input['name']]);\r\n if($county->save()){\r\n return response()->json(['msg' => 'Updated County', 'updated county' => $county], 200);\r\n }else{\r\n return response('Could not update a County');\r\n }\r\n }",
"public function getParishesToCounty( $county ) {\r\n $key = md5('parishesCounty' . $county);\r\n if (!$data = $this->_cache->load( $key )) {\r\n $select = $this->select()\r\n ->from($this->_name, array(\r\n 'osID', 'label' => 'CONCAT(label,\" (\",type,\")\")'\r\n ))\r\n ->order('label DESC')\r\n ->where('countyID =?', (int) $county);\r\n $data = $this->getAdapter()->fetchPairs($select);\r\n $this->_cache->save($data, $key);\r\n }\r\n return $data;\r\n }",
"public function show($id)\n {\n return County::with('hascities')->where('id', $id)->get();\n }",
"public function activate_county($county_id)\r\n\t{\r\n\t\t$this->counties_model->activate_county($county_id);\r\n\t\t$this->session->set_userdata('success_message', 'county activated successfully');\r\n\t\t\r\n\t\tredirect('gbm-administration/counties');\r\n\t}",
"public function listsSubcountiesget()\r\n {\r\n $response = Sub_county::get();\r\n return response()->json($response, 200);\r\n }",
"public function delete_county($county_id)\r\n\t{\r\n\t\t$this->counties_model->delete_county($county_id);\r\n\t\t$this->session->set_userdata('success_message', 'county has been deleted');\r\n\t\t\r\n\t\tredirect('gbm-administration/counties');\r\n\t}",
"public function index()\n {\n return new CountyCollection(\n CountyResource::collection(\n County::all()\n )\n );\n }",
"public function deactivate_county($county_id)\r\n\t{\r\n\t\t$this->counties_model->deactivate_county($county_id);\r\n\t\t$this->session->set_userdata('success_message', 'county disabled successfully');\r\n\t\t\r\n\t\tredirect('gbm-administration/counties');\r\n\t}",
"public function getZipcodesFromCounty($county, $state) {\n if (!isset($county) || !isset($state)) {\n return [];\n }\n\n $zipcodes = [];\n $values = DB::table(self::TABLE_NAME)\n ->select(self::C_ZIPCODE)\n ->where(self::C_COUNTY, 'like', $county)\n ->whereRaw('state=?', [$state])\n ->get();\n\n foreach($values as $value) {\n if (isset($value->ZipCode)) { $zipcodes[] = $value->ZipCode; }\n }\n\n return $zipcodes;\n }",
"public function index(County $county)\n {\n $locations = $county->locations()->orderByRaw('name')->paginate(4);\n return view('locations.index', compact('locations', 'county'));\n }",
"public function getCountyCityList($slug) {\n \n $county_id = $this->getCountyID($slug);\n if(!isset($county_id))\n throw new CHttpException(400, 'This county does not exist');\n \n $county_name = $this->getCountyName($slug);\n $str = '<a class=\"list-group-item\" href=\"'. Yii::app()->createUrl('county/countycities', array('slug'=>$slug)) . '\"><strong>'. $county_name . '</strong></a>';\n \n $cities = City::model()->getCityList($county_id);\n foreach ($cities as $city) {\n $str .= '<a class=\"list-group-item\" href=\"'. Yii::app()->createUrl('county/cities', array('slug'=>$slug,'city_slug'=>$city->slug)) . '\">'. $city->name . '</a>';\n }\n return $str;\n }",
"public function sub_county(){\r\n $response = Sub_county::all();\r\n return response()->json($response, 200);\r\n }",
"function getCountynameById( $stateId )\n\t{\n\t\t$q = \"SELECT name FROM title_dev_counties WHERE id = \".$stateId;\n\t\t$r = $this -> db -> getSingleRecord( $q );\n\t\tif( $r != false )\n\t\t\treturn $r['name'];\n\t\telse\n\t\t\treturn false;\n\t}",
"public function show($id)\n {\n //\n $county= County::findOrFail($id);\n return view('counties.show',array('county'=>$county));\n }",
"public function show($id)\n {\n $item = $this->countyService->find($id);\n\n if (request()->wantsJson()) {\n return response()->json([\n 'data' => $item,\n ]);\n }\n\n return view('counties.show', compact('item'));\n }",
"public function getCities($id)\n {\n return $cities = DB::select('select id,name from cities where state_id = :state_id', ['state_id' => $id]);\n }",
"public function county()\n {\n return $this->belongsTo('App\\County', 'county_id');\n }",
"public function edit_county($county_id) \r\n\t{\r\n\t\t//form validation rules\r\n\t\t$this->form_validation->set_rules('county_name', 'county Name', 'required|xss_clean');\r\n\t\t$this->form_validation->set_rules('county_status', 'county Status', 'required|xss_clean');\r\n\t\t\r\n\t\t//if form has been submitted\r\n\t\tif ($this->form_validation->run())\r\n\t\t{\r\n\t\t\t//update county\r\n\t\t\tif($this->counties_model->update_county($county_id))\r\n\t\t\t{\r\n\t\t\t\t$this->session->set_userdata('success_message', 'county updated successfully');\r\n\t\t\t\tredirect('gbm-administration/counties');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->session->set_userdata('error_message', 'Could not update county. Please try again');\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//open the add new county\r\n\t\t$data['title'] = 'Edit county';\r\n\t\t$v_data['title'] = $data['title'];\r\n\t\t\r\n\t\t//select the county from the database\r\n\t\t$query = $this->counties_model->get_county($county_id);\r\n\t\t\r\n\t\t$v_data['county'] = $query->result();\r\n\t\t\r\n\t\t$data['content'] = $this->load->view('counties/edit_county', $v_data, true);\r\n\t\t\r\n\t\t$this->load->view('admin/templates/general_page', $data);\r\n\t}",
"public function getCounties()\n {\n return $this->counties;\n }",
"public function update(CountyUpdateRequest $request, $id)\n {\n try {\n $item = $this->countyService->update($request->all(), $id);\n\n $response = [\n 'message' => 'Item updated successfully',\n 'data' => $item->toArray(),\n ];\n } catch (\\Exception $e) {\n $response = [\n 'message' => \"Error while updating item!\"\n ];\n }\n\n Session::flash('message', $response['message']);\n\n return redirect()->back();\n }",
"public function index()\n {\n //\n $counties = County::all();\n return view('counties.index',array('title'=>'Counties','counties'=>$counties));\n }"
] |
[
"0.6411751",
"0.6388202",
"0.62550956",
"0.6161329",
"0.6101693",
"0.6023686",
"0.59025943",
"0.59008825",
"0.58926094",
"0.5769245",
"0.5742526",
"0.5723822",
"0.56680435",
"0.56505626",
"0.5640355",
"0.5589865",
"0.55817086",
"0.5567479",
"0.5552411",
"0.55369467",
"0.5522983",
"0.55090684",
"0.54488266",
"0.5273814",
"0.5228624",
"0.5215722",
"0.51946056",
"0.5143261",
"0.5091829",
"0.5083763"
] |
0.7628794
|
0
|
Operation listsCountiesPost create a County.
|
public function listsCountiespost()
{
$input = Request::all();
$new_county = County::create($input);
if($new_county){
return response()->json(['msg' => 'Created County', 'county' => $new_county], 200);
}else{
return response('Could not save county');
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function listsCountiesput($county)\r\n {\r\n $input = Request::all();\r\n $county = County::findOrFail($county);\r\n $county->update(['name' => $input['name']]);\r\n if($county->save()){\r\n return response()->json(['msg' => 'Updated County', 'updated county' => $county], 200);\r\n }else{\r\n return response('Could not update a County');\r\n }\r\n }",
"public function listsSubcountiespost()\r\n {\r\n $input = Request::all();\r\n $new_sub_county= Sub_county::create($input);\r\n if($new_sub_county){\r\n return response()->json(['msg' => 'Created Subcounty', 'Subcounty' => $new_sub_county], 200);\r\n }else{\r\n return response('Could not save Subcounty');\r\n }\r\n }",
"public function create(County $county)\n {\n abort_unless(Auth::check(), 401, 'You have to be logged in to create a city.');\n\n\t\treturn view('cities/create', ['county'=>$county]);\n }",
"public function listsCountiesByIdget($county)\r\n {\r\n $county = County::findOrFail($county);\r\n return response()->json($county, 200);\r\n }",
"public function create(County $county)\n {\n\n return view('locations.create', compact('county'));\n }",
"public function index()\n {\n return new CountyCollection(\n CountyResource::collection(\n County::all()\n )\n );\n }",
"public function listsCountiesget()\r\n {\r\n $response = County::all();\r\n return response()->json($response, 200);\r\n }",
"public function store(CountyCreateRequest $request)\n {\n try {\n\n $item = $this->countyService->create($request->all());\n\n $response = [\n 'message' => 'Item created.',\n 'data' => $item->toArray(),\n ];\n\n if ($request->wantsJson()) {\n return response()->json($response);\n }\n\n return redirect()->back()->with('message', $response['message']);\n } catch (\\Exception $e) {\n dd($e->getMessage());\n }\n }",
"public function index()\n {\n return CountyResource::collection(County::all());\n }",
"public function counties()\n {\n $name = County::get();\n return view('counties')->with('counties', $name);\n }",
"public function listsCountiesdelete($county)\r\n {\r\n County::destroy($county);\r\n return response()->json(['msg' => 'deleted County'], 200);\r\n }",
"private function _counties()\n\t{\n\t\t$counties = ORM::factory('county')\n\t\t\t->orderby('county_name')\n\t\t\t->find_all();\n\n\t\treturn $counties;\n\t}",
"public function create()\n {\n //\nreturn view('counties.create',array('title'=>'Add New County'));\n\n }",
"public function getCountyCityList($slug) {\n \n $county_id = $this->getCountyID($slug);\n if(!isset($county_id))\n throw new CHttpException(400, 'This county does not exist');\n \n $county_name = $this->getCountyName($slug);\n $str = '<a class=\"list-group-item\" href=\"'. Yii::app()->createUrl('county/countycities', array('slug'=>$slug)) . '\"><strong>'. $county_name . '</strong></a>';\n \n $cities = City::model()->getCityList($county_id);\n foreach ($cities as $city) {\n $str .= '<a class=\"list-group-item\" href=\"'. Yii::app()->createUrl('county/cities', array('slug'=>$slug,'city_slug'=>$city->slug)) . '\">'. $city->name . '</a>';\n }\n return $str;\n }",
"public function index(County $county)\n {\n $locations = $county->locations()->orderByRaw('name')->paginate(4);\n return view('locations.index', compact('locations', 'county'));\n }",
"public function setCounties(array $counties)\n {\n $this->counties = $counties;\n\n return $this;\n }",
"public function getParishesToCounty( $county ) {\r\n $key = md5('parishesCounty' . $county);\r\n if (!$data = $this->_cache->load( $key )) {\r\n $select = $this->select()\r\n ->from($this->_name, array(\r\n 'osID', 'label' => 'CONCAT(label,\" (\",type,\")\")'\r\n ))\r\n ->order('label DESC')\r\n ->where('countyID =?', (int) $county);\r\n $data = $this->getAdapter()->fetchPairs($select);\r\n $this->_cache->save($data, $key);\r\n }\r\n return $data;\r\n }",
"public function create()\n {\n $counties = County::all();\n\n return view('apartments.create', compact('counties'));\n }",
"public function index()\n {\n //\n $counties = County::all();\n return view('counties.index',array('title'=>'Counties','counties'=>$counties));\n }",
"public function add_county() \r\n\t{\r\n\t\t//form validation rules\r\n\t\t$this->form_validation->set_rules('county_name', 'county Name', 'required|xss_clean');\r\n\t\t$this->form_validation->set_rules('county_status', 'county Status', 'required|xss_clean');\r\n\t\t\r\n\t\t//if form has been submitted\r\n\t\tif ($this->form_validation->run())\r\n\t\t{\r\n\t\t\tif($this->counties_model->add_county())\r\n\t\t\t{\r\n\t\t\t\t$this->session->set_userdata('success_message', 'county added successfully');\r\n\t\t\t\tredirect('gbm-administration/counties');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->session->set_userdata('error_message', 'Could not add county. Please try again');\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$data['title'] = 'Add county';\r\n\t\t$v_data['title'] = $data['title'];\r\n\t\t$data['content'] = $this->load->view('counties/add_county', $v_data, true);\r\n\t\t$this->load->view('admin/templates/general_page', $data);\r\n\t}",
"public function counties()\n {\n return $this->hasMany('App\\SelectedCounty');\n }",
"public function store(Request $request)\n {\n $county = new County;\n\n $county->fill(\n $request->all()\n );\n\n $county->save();\n\n return new CountyResource(\n $county\n );\n }",
"public function county_sidebar()\n\t{\n\t\t$box = View::factory('iebc/sidebar');\n\t\t$box->counties = self::_counties();\n\t\t$box->render(TRUE);\n\t}",
"function wc_ie_counties_add_counties( $states ) {\r\n\t$states['IE'] = array(\r\n\t\t'Carlow' => 'Carlow',\r\n\t\t'Cavan' => 'Cavan',\r\n\t\t'Clare' => 'Clare',\r\n\t\t'Cork' => 'Cork',\r\n\t\t'Donegal' => 'Donegal',\r\n\t\t'Dublin' => 'Dublin',\r\n\t\t'Galway' => 'Galway',\r\n\t\t'Kerry' => 'Kerry',\r\n\t\t'Kildare' => 'Kildare',\r\n\t\t'Kilkenny' => 'Kilkenny',\r\n\t\t'Laois' => 'Laois',\r\n\t\t'Leitrim' => 'Leitrim',\r\n\t\t'Limerick' => 'Limerick',\r\n\t\t'Longford' => 'Longford',\r\n\t\t'Louth' => 'Louth',\r\n\t\t'Mayo' => 'Mayo',\r\n\t\t'Meath' => 'Meath',\r\n\t\t'Monaghan' => 'Monaghan',\r\n\t\t'Offaly' => 'Offaly',\r\n\t\t'Roscommon' => 'Roscommon',\r\n\t\t'Sligo' => 'Sligo',\r\n\t\t'Tipperary' => 'Tipperary',\r\n\t\t'Waterford' => 'Waterford',\r\n\t\t'Westmeath' => 'Westmeath',\r\n\t\t'Wexford' => 'Wexford',\r\n\t\t'Wicklow' => 'Wicklow',\r\n\t);\r\n\treturn $states;\r\n}",
"public function store(LocationsRequest $locationRequest, County $county)\n {\n// $locationRequest['slug'] = Str::slug($locationRequest->name, '-');\n $county->locations()->create($locationRequest->all());\n return redirect()->route('backend.counties.locations.index', $county);\n }",
"public function index(Request $request)\n {\n $requestData = [\n 'paginate' => true,\n 'per_page' => 10\n ];\n $items = $this->countyService->all($requestData);\n return view('counties.index', compact('items'));\n }",
"public function store(Request $request)\n {\n //\n $counties = Input::all();\n $newcounty = County::create($counties); \n Session::flash('message', 'County successfully added!');\n return redirect()->back();\n }",
"public function sub_county(){\r\n $response = Sub_county::all();\r\n return response()->json($response, 200);\r\n }",
"public function run()\n {\n $counties = ['Harju Maakond', 'Pärnu Maakond', 'Tartu Maakond'];\n foreach($counties as $name) {\n $county = new \\App\\County();\n $county->county = $name;\n $county->save();\n }\n }",
"private function fakeCountries(int $numberOfCounteries)\n {\n for ($i = 0; $i < $numberOfCounteries; $i++) {\n $countryId = model('CategoryModel')->insert([\n 'name' => static::faker()->country(),\n ], true);\n\n $this->fakeStates($countryId, 5);\n }\n }"
] |
[
"0.64705056",
"0.6422892",
"0.60792387",
"0.5878805",
"0.57709575",
"0.56969523",
"0.5661649",
"0.56566757",
"0.56274134",
"0.56071794",
"0.555112",
"0.55459476",
"0.5452182",
"0.5386132",
"0.5380163",
"0.52880526",
"0.5193068",
"0.5123231",
"0.51114434",
"0.5100993",
"0.5057309",
"0.502605",
"0.5021814",
"0.49902266",
"0.4961053",
"0.49561816",
"0.49015474",
"0.4786241",
"0.478446",
"0.47731832"
] |
0.72901547
|
0
|
Operation listsCountiesCountyIdPut Update an existing County.
|
public function listsCountiesput($county)
{
$input = Request::all();
$county = County::findOrFail($county);
$county->update(['name' => $input['name']]);
if($county->save()){
return response()->json(['msg' => 'Updated County', 'updated county' => $county], 200);
}else{
return response('Could not update a County');
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function update(CountyUpdateRequest $request, $id)\n {\n try {\n $item = $this->countyService->update($request->all(), $id);\n\n $response = [\n 'message' => 'Item updated successfully',\n 'data' => $item->toArray(),\n ];\n } catch (\\Exception $e) {\n $response = [\n 'message' => \"Error while updating item!\"\n ];\n }\n\n Session::flash('message', $response['message']);\n\n return redirect()->back();\n }",
"public function update(Request $request, $id)\n {\n $county = County::find($id);\n $county->fill(\n $request->all()\n );\n $county->save();\n\n return new CountyResource(\n $county\n );\n }",
"public function listsCountiesByIdget($county)\r\n {\r\n $county = County::findOrFail($county);\r\n return response()->json($county, 200);\r\n }",
"public function activate_county($county_id)\r\n\t{\r\n\t\t$this->counties_model->activate_county($county_id);\r\n\t\t$this->session->set_userdata('success_message', 'county activated successfully');\r\n\t\t\r\n\t\tredirect('gbm-administration/counties');\r\n\t}",
"public function edit_county($county_id) \r\n\t{\r\n\t\t//form validation rules\r\n\t\t$this->form_validation->set_rules('county_name', 'county Name', 'required|xss_clean');\r\n\t\t$this->form_validation->set_rules('county_status', 'county Status', 'required|xss_clean');\r\n\t\t\r\n\t\t//if form has been submitted\r\n\t\tif ($this->form_validation->run())\r\n\t\t{\r\n\t\t\t//update county\r\n\t\t\tif($this->counties_model->update_county($county_id))\r\n\t\t\t{\r\n\t\t\t\t$this->session->set_userdata('success_message', 'county updated successfully');\r\n\t\t\t\tredirect('gbm-administration/counties');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->session->set_userdata('error_message', 'Could not update county. Please try again');\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//open the add new county\r\n\t\t$data['title'] = 'Edit county';\r\n\t\t$v_data['title'] = $data['title'];\r\n\t\t\r\n\t\t//select the county from the database\r\n\t\t$query = $this->counties_model->get_county($county_id);\r\n\t\t\r\n\t\t$v_data['county'] = $query->result();\r\n\t\t\r\n\t\t$data['content'] = $this->load->view('counties/edit_county', $v_data, true);\r\n\t\t\r\n\t\t$this->load->view('admin/templates/general_page', $data);\r\n\t}",
"public function update(Request $request, $id)\n {\n //\n $county = County::findOrFail($id);\n $input = $request->all();\n $county->fill($input)->save();\n Session::flash('message', 'County successfully updated!');\n\n return redirect()->back();\n }",
"public function delete_county($county_id)\r\n\t{\r\n\t\t$this->counties_model->delete_county($county_id);\r\n\t\t$this->session->set_userdata('success_message', 'county has been deleted');\r\n\t\t\r\n\t\tredirect('gbm-administration/counties');\r\n\t}",
"public function deactivate_county($county_id)\r\n\t{\r\n\t\t$this->counties_model->deactivate_county($county_id);\r\n\t\t$this->session->set_userdata('success_message', 'county disabled successfully');\r\n\t\t\r\n\t\tredirect('gbm-administration/counties');\r\n\t}",
"public function listsCountiesdelete($county)\r\n {\r\n County::destroy($county);\r\n return response()->json(['msg' => 'deleted County'], 200);\r\n }",
"public function setCounties(array $counties)\n {\n $this->counties = $counties;\n\n return $this;\n }",
"public function update(Request $request, $id)\n {\n\n if (!empty($request->name)) {\n $county = County::find($request->countyid);\n $city = City::updateOrCreate(\n ['id' => $id],\n ['id' => $id, 'name' => $request->name]\n\n );\n $message = [\n 'message' => 'You successfully updated the city name to ' . $request->name\n ];\n return response(json_encode($message));\n } else {\n $errors = [\n 'message' => 'You have to add a city name'\n ];\n return response(json_encode($errors));\n }\n\n }",
"public function listsSubcountiesput($sub_county_id)\r\n {\r\n $input = Request::all();\r\n $sub_county = Sub_county::findOrFail($sub_county_id);\r\n $sub_county->update(['name' => $input['name']]);\r\n if($sub_county->save()){\r\n return response()->json(['msg' => 'Updated Sub_county', 'updated Sub_county' => $sub_county], 200);\r\n }else{\r\n return response('Could not update a Sub_county');\r\n }\r\n }",
"public function listsCountiespost()\r\n {\r\n $input = Request::all();\r\n $new_county = County::create($input);\r\n if($new_county){\r\n return response()->json(['msg' => 'Created County', 'county' => $new_county], 200);\r\n }else{\r\n return response('Could not save county');\r\n }\r\n }",
"public function filterByCountyId($countyId = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($countyId)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $countyId)) {\n $countyId = str_replace('*', '%', $countyId);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(ZipToCityPeer::COUNTY_ID, $countyId, $comparison);\n }",
"public function add_county() \r\n\t{\r\n\t\t//form validation rules\r\n\t\t$this->form_validation->set_rules('county_name', 'county Name', 'required|xss_clean');\r\n\t\t$this->form_validation->set_rules('county_status', 'county Status', 'required|xss_clean');\r\n\t\t\r\n\t\t//if form has been submitted\r\n\t\tif ($this->form_validation->run())\r\n\t\t{\r\n\t\t\tif($this->counties_model->add_county())\r\n\t\t\t{\r\n\t\t\t\t$this->session->set_userdata('success_message', 'county added successfully');\r\n\t\t\t\tredirect('gbm-administration/counties');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->session->set_userdata('error_message', 'Could not add county. Please try again');\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$data['title'] = 'Add county';\r\n\t\t$v_data['title'] = $data['title'];\r\n\t\t$data['content'] = $this->load->view('counties/add_county', $v_data, true);\r\n\t\t$this->load->view('admin/templates/general_page', $data);\r\n\t}",
"public function counties()\n {\n $name = County::get();\n return view('counties')->with('counties', $name);\n }",
"public function store(CountyCreateRequest $request)\n {\n try {\n\n $item = $this->countyService->create($request->all());\n\n $response = [\n 'message' => 'Item created.',\n 'data' => $item->toArray(),\n ];\n\n if ($request->wantsJson()) {\n return response()->json($response);\n }\n\n return redirect()->back()->with('message', $response['message']);\n } catch (\\Exception $e) {\n dd($e->getMessage());\n }\n }",
"public function update(Request $request, $id)\n {\n $cities = cities::find($id);\n $cities->cities = $request->input('cities');\n $cities->save();\n\n return redirect('/cities');\n }",
"public function listsCountiesget()\r\n {\r\n $response = County::all();\r\n return response()->json($response, 200);\r\n }",
"public function show($id)\n {\n return new CountyResource(\n County::find($id)\n );\n }",
"public function update(Request $request, $id)\n {\n \n $industry = Industry::find($id); \n\n $industry->country = $request->country; \n $industry->postal_code = $request->postal_code; \n $industry->industry = $request->industry; \n \n $industry->save();\n }",
"function wc_ie_counties_add_counties( $states ) {\r\n\t$states['IE'] = array(\r\n\t\t'Carlow' => 'Carlow',\r\n\t\t'Cavan' => 'Cavan',\r\n\t\t'Clare' => 'Clare',\r\n\t\t'Cork' => 'Cork',\r\n\t\t'Donegal' => 'Donegal',\r\n\t\t'Dublin' => 'Dublin',\r\n\t\t'Galway' => 'Galway',\r\n\t\t'Kerry' => 'Kerry',\r\n\t\t'Kildare' => 'Kildare',\r\n\t\t'Kilkenny' => 'Kilkenny',\r\n\t\t'Laois' => 'Laois',\r\n\t\t'Leitrim' => 'Leitrim',\r\n\t\t'Limerick' => 'Limerick',\r\n\t\t'Longford' => 'Longford',\r\n\t\t'Louth' => 'Louth',\r\n\t\t'Mayo' => 'Mayo',\r\n\t\t'Meath' => 'Meath',\r\n\t\t'Monaghan' => 'Monaghan',\r\n\t\t'Offaly' => 'Offaly',\r\n\t\t'Roscommon' => 'Roscommon',\r\n\t\t'Sligo' => 'Sligo',\r\n\t\t'Tipperary' => 'Tipperary',\r\n\t\t'Waterford' => 'Waterford',\r\n\t\t'Westmeath' => 'Westmeath',\r\n\t\t'Wexford' => 'Wexford',\r\n\t\t'Wicklow' => 'Wicklow',\r\n\t);\r\n\treturn $states;\r\n}",
"public function update(CountryCityRequest $request, $id)\n {\n $countryCity = City::findOrFail($id);\n $countryCity->deleteTranslations();\n $available_locales = \\Localization::getLocales();\n foreach ($available_locales as $locale => $value){\n $countryCity->translateOrNew($locale)->name = $request['name_'.$locale];\n }//end for each\n if ($request->parent_id||$request->parent_id==\"0\"){\n $countryCity->parent_id = $request->parent_id;\n }\n $countryCity->save();\n session()->flash('message', trans('sweet_alert.updated_successfully'));\n\n return redirect(route('countries-cities.index'));\n }",
"public function index()\n {\n return CountyResource::collection(County::all());\n }",
"public function counties()\n {\n return $this->hasMany('App\\SelectedCounty');\n }",
"public function store(Request $request)\n {\n $county = new County;\n\n $county->fill(\n $request->all()\n );\n\n $county->save();\n\n return new CountyResource(\n $county\n );\n }",
"private function _counties()\n\t{\n\t\t$counties = ORM::factory('county')\n\t\t\t->orderby('county_name')\n\t\t\t->find_all();\n\n\t\treturn $counties;\n\t}",
"public function update(Request $request, City $cities)\n {\n //\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required|max:255',\n ]);\n $township = Township::find($id);\n\n $township->name = request('name');\n $township->city_id = request('city_id');\n $township->user_id = Auth::user()->id;\n $township->save();\n\n return response()->json([\n 'message' => 'City updated successfully!'\n ],200);\n }",
"public function update(FacilityRequest $request, $id)\n\t{\n\t\t$town = Facility::findOrFail($id);\n $town->code = $request->code;\n $town->name = $request->name;\n $town->facility_type_id = $request->facility_type;\n $town->facility_owner_id = $request->facility_owner;\n $town->reporting_site = $request->reporting_site;\n $town->sub_county_id = $request->sub_county;\n $town->nearest_town = $request->nearest_town;\n $town->landline = $request->landline;\n $town->mobile = $request->mobile;\n $town->email = $request->email;\n $town->address = $request->address;\n $town->in_charge = $request->in_charge;\n $town->operational_status = $request->operational_status;\n $town->latitude = $request->latitude;\n $town->longitude = $request->longitude;\n $town->user_id = Auth::user()->id;\n $town->save();\n\n return redirect('facility')->with('message', 'Facility updated successfully.');\n\t}"
] |
[
"0.6613907",
"0.61054057",
"0.59276503",
"0.5797961",
"0.5748207",
"0.56337583",
"0.5493257",
"0.5467636",
"0.53474087",
"0.51756084",
"0.5142589",
"0.5112036",
"0.49510828",
"0.4927793",
"0.4924777",
"0.48722243",
"0.48413017",
"0.48361295",
"0.48299786",
"0.482885",
"0.4822444",
"0.48109615",
"0.47952542",
"0.4783075",
"0.4776108",
"0.47194618",
"0.47185308",
"0.4681344",
"0.46704602",
"0.46597517"
] |
0.66970026
|
0
|
Operation listsCountiesCountyIdDelete Deletes a County specified by serviceId.
|
public function listsCountiesdelete($county)
{
County::destroy($county);
return response()->json(['msg' => 'deleted County'], 200);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function delete_county($county_id)\r\n\t{\r\n\t\t$this->counties_model->delete_county($county_id);\r\n\t\t$this->session->set_userdata('success_message', 'county has been deleted');\r\n\t\t\r\n\t\tredirect('gbm-administration/counties');\r\n\t}",
"public function destroy($id)\n {\n return County::destroy($id);\n }",
"public function deactivate_county($county_id)\r\n\t{\r\n\t\t$this->counties_model->deactivate_county($county_id);\r\n\t\t$this->session->set_userdata('success_message', 'county disabled successfully');\r\n\t\t\r\n\t\tredirect('gbm-administration/counties');\r\n\t}",
"public function listsSubcountiesdelete($sub_county_id)\r\n {\r\n Sub_county::destroy($sub_county_id);\r\n return response()->json(['msg' => 'deleted Subcounty'], 200);\r\n }",
"public function listsCountiesByIdget($county)\r\n {\r\n $county = County::findOrFail($county);\r\n return response()->json($county, 200);\r\n }",
"public function destroy($id)\n {\n //\n $county = County::findOrFail($id);\n $county->delete();\n Session::flash('message', 'County successfully deleted!');\n\n return redirect()->route('county.destroy');\n\n }",
"public function filterByCountyId($countyId = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($countyId)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $countyId)) {\n $countyId = str_replace('*', '%', $countyId);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(ZipToCityPeer::COUNTY_ID, $countyId, $comparison);\n }",
"public function deleteById($coinsId);",
"public function deleteHospitalByCounty(string $name)\n {\n return Hospital::query()->where('county', $name)->delete();\n }",
"public function deleteCOI($coiId) {\r\n $coi = $this->getCoiById($coiId);\r\n $coi->delete();\r\n\r\n foreach($this->coi as $key=>$coi) {\r\n if($coi->coiId == $coiId) {\r\n unset($this->coi[$key]); //disassociate it from the internal array\r\n\r\n }\r\n }\r\n }",
"public function destroy($id)\n {\n $deleted = $this->countyService->delete($id);\n\n if (request()->wantsJson()) {\n return response()->json([\n 'message' => 'Item deleted.',\n 'deleted' => $deleted,\n ]);\n }\n\n return redirect()->back()->with('message', 'Item deleted.');\n }",
"public function delete($id)\n {\n Assert::integerish($id, __METHOD__ . 'expects $id to be an integer');\n return $this->call('DELETE', \"/shipping/services/{$id}.json\");\n }",
"function delete($id)\n\t{\n\t\t$this->db->where('id', $id);\n\t\t$this->db->delete('cities');\n\t\t\n\t}",
"public function update(CountyUpdateRequest $request, $id)\n {\n try {\n $item = $this->countyService->update($request->all(), $id);\n\n $response = [\n 'message' => 'Item updated successfully',\n 'data' => $item->toArray(),\n ];\n } catch (\\Exception $e) {\n $response = [\n 'message' => \"Error while updating item!\"\n ];\n }\n\n Session::flash('message', $response['message']);\n\n return redirect()->back();\n }",
"public function activate_county($county_id)\r\n\t{\r\n\t\t$this->counties_model->activate_county($county_id);\r\n\t\t$this->session->set_userdata('success_message', 'county activated successfully');\r\n\t\t\r\n\t\tredirect('gbm-administration/counties');\r\n\t}",
"public function actionDelete($city_id, $country_id)\n {\n $this->findModel($city_id, $country_id)->delete();\n\n //delete all customer address\n CustomerAddress::deleteAll(['city_id' => $city_id]);\n\n //delete customer cart - area_id\n CustomerCart::deleteAll('area_id in (select area_id from {{%location}}\n where city_id = \"'.$city_id.'\")');\n\n //delete all location - city_id\n Location::deleteAll(['city_id' => $city_id]);\n\n //delete all vendor location - city_id\n VendorLocation::deleteAll(['city_id' => $city_id]);\n\n Yii::$app->session->setFlash('success', 'Governorate deleted successfully!');\n return $this->redirect(['index']);\n\n }",
"public function deleteTransferBeneficiary(int $beneficiaryId): array\n {\n return $this->httpClient()->delete(\n url: FlutterwaveConstant::BENEFICIARY_ENDPOINT.$beneficiaryId,\n );\n }",
"public static function delete_customer( $id ) {\r\n\t\tglobal $wpdb;\r\n\r\n\t\t$wpdb->delete(\r\n\t\t\t\"{$wpdb->prefix}customers\",\r\n\t\t\t[ 'id' => $id ],\r\n\t\t\t[ '%d' ]\r\n\t\t);\r\n\t}",
"public function listsCountiesput($county)\r\n {\r\n $input = Request::all();\r\n $county = County::findOrFail($county);\r\n $county->update(['name' => $input['name']]);\r\n if($county->save()){\r\n return response()->json(['msg' => 'Updated County', 'updated county' => $county], 200);\r\n }else{\r\n return response('Could not update a County');\r\n }\r\n }",
"public function counties()\n {\n return $this->hasMany('App\\SelectedCounty');\n }",
"function deleteCity($id)\r\n {\r\n try\r\n {\r\n \r\n if(checkForNumeric($id) && !checkIfCityInUse($id))\r\n {\r\n $admin_id=$_SESSION['edmsAdminSession']['admin_id'];\r\n $sql=\"DELETE FROM\r\n\t\t\t edms_city\r\n\t\t\t WHERE city_id=$id\";\r\n dbQuery($sql);\r\n return \"success\";\r\n }\r\n else\r\n {\r\n return \"error\";\r\n }\r\n\r\n }\r\n\r\n catch(Exception $e)\r\n {\r\n }\r\n\r\n }",
"public function delete($id)\n {\n $sentence = new SentenceUtil();\n $sentence->addCommand(\"/ip/hotspot/cookie/remove\");\n $sentence->where(\".id\", \"=\", $id);\n $enable = $this->talker->send($sentence);\n return \"Sucsess\";\n }",
"public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect([\n 'counter-list', \n 'CounterDataSearch[flat_id]' => Yii::$app->request->get('CounterDataSearch')['flat_id'],\n 'CounterDataSearch[service_id]' => Yii::$app->request->get('CounterDataSearch')['service_id'],\n ]);\n }",
"public function delete_menu($id) {\r\n return $this->db->delete('countries', array('id' => $id));\r\n }",
"public function delete($id)\n {\n try {\n $this->repository->delete($id);\n } catch (Exception $e) {\n // flash(trans('messages.error.deleted'))->error();\n return back();\n }\n\n // flash(trans('messages.city.deleted', ['cityId' => $id]))->success();\n\n return redirect('dividends');\n }",
"public static function delete($id){\r\n Client::delete()->where('id', $id)->execute();\r\n }",
"public function delete($cid);",
"public function delete($cid);",
"public function destroy($id)\n {\n $countries = $this->countriesRepository->findWithoutFail($id);\n\n if (empty($countries)) {\n Flash::error('Countries not found');\n\n return redirect(route('countries.index'));\n }\n\n $this->countriesRepository->delete($id);\n\n Flash::success('Countries deleted successfully.');\n\n return redirect(route('countries.index'));\n }",
"public function deleteClient($id,$db)\n {\n\n $sql = \"DELETE FROM client_registrations WHERE id = :id\";\n $pst = $db->prepare($sql);\n $pst->bindParam (':id',$id);\n $count = $pst->execute();\n\n return $count;\n\n }"
] |
[
"0.6929945",
"0.567294",
"0.5572473",
"0.54534566",
"0.529003",
"0.52159417",
"0.51887715",
"0.4990734",
"0.48483366",
"0.4810815",
"0.4806203",
"0.4749939",
"0.47427684",
"0.46994966",
"0.46911892",
"0.46680415",
"0.46588436",
"0.46486816",
"0.46395704",
"0.46153843",
"0.45634553",
"0.45484462",
"0.45134473",
"0.44632018",
"0.44622308",
"0.44615647",
"0.44419903",
"0.44419903",
"0.4439536",
"0.4412248"
] |
0.660802
|
1
|
/////////////////////// CountiesSubcounties // ///////////////////// Operation listsSubcountiesGet Fetch Regimen Subcounties (for select options).
|
public function listsSubcountiesget()
{
$response = Sub_county::get();
return response()->json($response, 200);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function listsSubcountiesByIdget($sub_county_id)\r\n {\r\n $sub_county = Sub_county::findOrFail($sub_county_id);\r\n return response()->json($sub_county, 200);\r\n }",
"public function sub_county(){\r\n $response = Sub_county::all();\r\n return response()->json($response, 200);\r\n }",
"public function listsSubcountiesdelete($sub_county_id)\r\n {\r\n Sub_county::destroy($sub_county_id);\r\n return response()->json(['msg' => 'deleted Subcounty'], 200);\r\n }",
"public function allsubcategories_get()\n {\n $em = $this->doctrine->em;\n $subcategoriesRepo = $em->getRepository('Entities\\Subcategory');\n $subcategories = $subcategoriesRepo->findAll();\n foreach ($subcategories as $subcategory) {\n $subcategory->servicesCount = $subcategory->getServices()->count();\n }\n $response[\"data\"] = $subcategories;\n $response[\"count\"] = count($subcategories);\n $this->set_response($response, REST_Controller::HTTP_OK);\n\n }",
"public function listsSubcountiesput($sub_county_id)\r\n {\r\n $input = Request::all();\r\n $sub_county = Sub_county::findOrFail($sub_county_id);\r\n $sub_county->update(['name' => $input['name']]);\r\n if($sub_county->save()){\r\n return response()->json(['msg' => 'Updated Sub_county', 'updated Sub_county' => $sub_county], 200);\r\n }else{\r\n return response('Could not update a Sub_county');\r\n }\r\n }",
"public function getSubsidylist()\n {\n return view(\"Client::Ipage.subsidylist\");\n }",
"public function listsSubcountiespost()\r\n {\r\n $input = Request::all();\r\n $new_sub_county= Sub_county::create($input);\r\n if($new_sub_county){\r\n return response()->json(['msg' => 'Created Subcounty', 'Subcounty' => $new_sub_county], 200);\r\n }else{\r\n return response('Could not save Subcounty');\r\n }\r\n }",
"function get_subcategories_list() {\n $query = $this->db->get('subcategories');\n return $query->result_array();\n }",
"public static function getListSubcategoria($subs){\n return CHtml::listData($subs,'id_subcategoria','nombre');\n }",
"public function get_subtypes()\n {\n }",
"public function topSubcategories_get()\n {\n $em = $this->doctrine->em;\n $subcategoriesRepo = $em->getRepository('Entities\\Subcategory');\n\n $subcategories = $subcategoriesRepo->findBy(array(), array('visits' => 'DESC'), 10);\n\n if ($subcategories) {\n $response[\"desc\"] = \"Subcategorias mas visitadas \";\n $response[\"count\"] = count($subcategories);\n $response[\"data\"] = $subcategories;\n } else {\n $response[\"desc\"] = 'No existen subcategorias mas visitadas';\n $response[\"count\"] = 0;\n $response[\"data\"] = array();\n }\n $this->set_response($response, REST_Controller::HTTP_OK);\n }",
"public function getSubCatList()\r\n {\r\n\t\t$productId = $_POST['productId'];\r\n\t\r\n\t\t// GEtting subcategories against categoryid\r\n\t\t$ajaxSubCategoriesArray = $this->Product->SubCategory->find('list', array('conditions'=>array('SubCategory.category_id'=>$productId)));\r\n\t\r\n\t\t$select = '<div class=\"input select\">\r\n\t\t<label for=\"ProductSubCategoryId\">Sub Category</label>\r\n\t\t<select name=\"data[Product][sub_category_id]\" id=\"ProductSubCategoryId\">\r\n\t\t<option value=\"0\">Please select</option>';\r\n\t\r\n\t\tforeach($ajaxSubCategoriesArray as $key => $subCategories) \r\n\t\t{\r\n\t\t\t$select .= '<option value=\"'.$key.'\">'.$subCategories.'</option>';\r\n\t\t}\r\n\t\t\r\n\t\t$select .= '</select></div>';\r\n\t\techo $select;\r\n\t\texit;\r\n }",
"public function listsCountiesByIdget($county)\r\n {\r\n $county = County::findOrFail($county);\r\n return response()->json($county, 200);\r\n }",
"public function getSubSpecs();",
"public function get_subsec()\n\t{\n\t\t$section_id = $this->input->post('section_id');\n\t\t$subsection['subsec'] = $this->reports->get_subsec($section_id);\n\t\techo json_encode($subsection);\n\t}",
"public function getComboSubservicios()\n {\n return $this->comboSubservicios;\n }",
"public function getSubdivisionList();",
"function _get_regions_subregions(){\n $this->gen_contents['regions'] = $this->admin_career_event_model->dbSelectAllRegions();\n $arr_data = $this->admin_career_event_model->dbSelectAllSubRegions();\n $this->gen_contents['raw_subregion']= $arr_data;\n $id \t\t\t\t\t= 0;\n $arr_subregion\t\t\t\t= array();\n\n foreach ($arr_data as $value){\n if($id != $value->regionid){\n $id = $value->regionid;\n $arr_subregion['R'][$id] = array();\n }\n $arr_subregion['R'][$id][] = array('id' =>$value->id,'name'=>$value->sub_name);\n }\n //gets all the region and subregion for the purpose of displaying filter\n //used to diaply subregion using jason array \t\t\t\t\n $this->gen_contents['json_array'] \t= json_encode($arr_subregion);\n\t\t\t\n\t\t}",
"public function get_list_sub_array()\n {\n \tif ( $this->voucher_master_id != \"\" || $this->voucher_master_id != gINVALID && $this->voucher_master_id >0) {\n\n\t \t$sub_vouchers = array();\n\t\t\t$strSQL = \"SELECT V.voucher_id ,V.voucher_name AS voucher\"; \n\t\t\t$strSQL .= \" FROM voucher V\";\n\t\t\t$strSQL .= \" WHERE V.fy_id = '\".$this->current_fy_id.\"' AND V.voucher_master_id = '\".$this->voucher_master_id.\"'\";\n\t\t\tmysql_query(\"SET NAMES utf8\");\n\t\t\t$rsRES = mysql_query($strSQL,$this->connection) or die(mysql_error(). $strSQL );\n\t\t\tif ( mysql_num_rows($rsRES) > 0 )\n\t\t\t{\n\t\t\t\twhile ( list ($id,$name) = mysql_fetch_row($rsRES) ){\n\t\t\t\t\t$sub_vouchers[$id] =$name;\n\t \t\t}\n\t return $sub_vouchers;\n\t \t}else{\n\t\t\t\t$this->error_number = 4;\n\t\t\t\t$this->error_description=\"Can't list Sub Vouchers\";\n\t\t\t\treturn false;\n\t \t}\n\t }else{\n\t \treturn false;\n\t }\n }",
"public function getPopularSubcategories()\n {\n\n //return $this->popular_subcategories;\n\n if ($this->popular_subcategories)\n {\n $subcats = Subcategory::whereIn('id', explode(',', $this->popular_subcategories))->get();\n\n $output = [];\n foreach ($subcats as $subcat) {\n $output[] = [\n 'name' => $subcat->name,\n ];\n }\n\n return $output;\n }\n else\n {\n return [];\n }\n }",
"public function get_sub_category_list()\n\t{\n\t\t$result = $this->db->from(\"category\")->where(array(\"category_status\" => 1,\"type\"=>2))->orderby(\"category_name\",\"ASC\")->get();\n\t\treturn $result;\n\t}",
"public function getSubItems() {\n return $this->subItems;\n }",
"public function getSubusers()\n\t{\n\t\treturn $this->getObjectArray('subusers', null, 'user', array());\n\t}",
"public function getCitiesBySubregionAction(Request $request) {\n $em = $this->getDoctrine()->getManager();\n $subregionId = $request->get('subregionId');\n $type = $request->get('type');\n $typeClass = $request->get('typeClass');\n\n $cities = $em->getRepository('AppBundle:City')->getBySubregion($subregionId);\n\n $response = $this->render('AppBundle:Location/ajax:cities.html.twig', array(\n 'cities' => $cities,\n 'type' => $type,\n 'typeClass'=> $typeClass\n ))->getContent();\n\n return new Response(json_encode($response));\n }",
"protected function getSubClients()\n\t{\n\t\tif( !isset( $this->subclients ) )\n\t\t{\n\t\t\t$this->subclients = [];\n\n\t\t\tforeach( $this->getSubClientNames() as $name ) {\n\t\t\t\t$this->subclients[$name] = $this->getSubClient( $name );\n\t\t\t}\n\t\t}\n\n\t\treturn $this->subclients;\n\t}",
"public function listsCountiesget()\r\n {\r\n $response = County::all();\r\n return response()->json($response, 200);\r\n }",
"public function get_subsec()\n\t{\n\t\t$section_id = $this->input->post('section_id');\n\t\t$subsection['subsec'] = $this->file_maintenance_model->get_subsec($section_id);\n\t\techo json_encode($subsection);\n\t}",
"private function _counties()\n\t{\n\t\t$counties = ORM::factory('county')\n\t\t\t->orderby('county_name')\n\t\t\t->find_all();\n\n\t\treturn $counties;\n\t}",
"public function sublistcombo()\n\t{\n\t\techo'\n\t\t\t<select name=\"sublistcombo\" style=\"width: 180px;\">\n\t\t\t\t\t\n\t\t\t <option value=\"None\">None</option>\n\t\t\t <option value=\"Hindi\">Hindi</option>\n\t\t\t <option value=\"English\">English</option>\n\t\t\t <option value=\"Maths\">Maths</option>\n\t\t\t <option value=\"Social Science\">Social Science</option>\n\t\t\t <option value=\"General Science\">General Science</option>\n\t\t\t <option value=\"Sanscrit\">Sanscrit</option>\n\t\t\t <option value=\"Computer Science\">Computer Science</option>\n\t\t\t <option value=\"Physics\">Physics</option>\n\t\t\t <option value=\"Chemistry\">Chemistry</option>\n\t\t\t <option value=\"Higher Math\">Higher Math</option>\n\t\t\t <option value=\"Biology\">Biology</option>\n\t\t\t <option value=\"Sociology\">Sociology</option>\n\t\t\t <option value=\"Economics\">Economics</option>\n\t\t\t <option value=\"Accounts\">Accounts</option>\n\t\t\t <option value=\"History\">History</option>\n\t\t\t <option value=\"Finance\">Finance</option>\n\t\t\t <option value=\"Statistics\">Statistics</option>\n\t\t\t <option value=\"Civics\">Civics</option>\n\t\t\t <option value=\"Music\">Music</option>\n\t\t\t</select>\n\n\n\t\t';\n\t}",
"private function getAll(Subgenre $model){\n $subgenres = $model->with('genre')->get();\n\n return $subgenres;\n }"
] |
[
"0.73813194",
"0.6529685",
"0.63254327",
"0.6238333",
"0.62291646",
"0.6221065",
"0.61865133",
"0.61659855",
"0.60249865",
"0.6004715",
"0.6002423",
"0.5888958",
"0.5850746",
"0.58297294",
"0.5785047",
"0.5736126",
"0.5730608",
"0.5713187",
"0.5685142",
"0.5625648",
"0.56019795",
"0.54875964",
"0.54796857",
"0.54769605",
"0.54750454",
"0.54744154",
"0.5446762",
"0.54377574",
"0.5380155",
"0.53767973"
] |
0.8057983
|
0
|
Operation listsSubcountiesSub_countyIdGet Fetch Sub_county specified by Sub_countyId.
|
public function listsSubcountiesByIdget($sub_county_id)
{
$sub_county = Sub_county::findOrFail($sub_county_id);
return response()->json($sub_county, 200);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function listsSubcountiesget()\r\n {\r\n $response = Sub_county::get();\r\n return response()->json($response, 200);\r\n }",
"public function listsSubcountiesput($sub_county_id)\r\n {\r\n $input = Request::all();\r\n $sub_county = Sub_county::findOrFail($sub_county_id);\r\n $sub_county->update(['name' => $input['name']]);\r\n if($sub_county->save()){\r\n return response()->json(['msg' => 'Updated Sub_county', 'updated Sub_county' => $sub_county], 200);\r\n }else{\r\n return response('Could not update a Sub_county');\r\n }\r\n }",
"public function listsSubcountiesdelete($sub_county_id)\r\n {\r\n Sub_county::destroy($sub_county_id);\r\n return response()->json(['msg' => 'deleted Subcounty'], 200);\r\n }",
"public function listsCountiesByIdget($county)\r\n {\r\n $county = County::findOrFail($county);\r\n return response()->json($county, 200);\r\n }",
"public function sub_county(){\r\n $response = Sub_county::all();\r\n return response()->json($response, 200);\r\n }",
"public function listsSubcountiespost()\r\n {\r\n $input = Request::all();\r\n $new_sub_county= Sub_county::create($input);\r\n if($new_sub_county){\r\n return response()->json(['msg' => 'Created Subcounty', 'Subcounty' => $new_sub_county], 200);\r\n }else{\r\n return response('Could not save Subcounty');\r\n }\r\n }",
"public function get_sub_cat($sub_cat_id = ''){\n\t\tif($sub_cat_id !== ''){\n\t\t\t// getting specific sub category if sub category id is passed in parameter\n\t\t\t$query = $this->db->get_where('sub_categories', array('id' => $sub_cat_id));\n\t\t\treturn $query->row();\n\t\t}\n\t\t// getting all sub categories\n\t\t$query = $this->db->get('sub_categories');\n\t\treturn $query->result();\n\t}",
"public static function getListSubcategoria($subs){\n return CHtml::listData($subs,'id_subcategoria','nombre');\n }",
"public function actionSubCategory($id) {\n\t\t$data = [ ];\n\t\t$models = SubCategory::find ()->where ( [ \n\t\t\t\t'category_id' => $id \n\t\t] )->all ();\n\t\t\n\t\tif ($models) {\n\t\t\tforeach ( $models as $model ) {\n\t\t\t\t$data ['list'] [] = $model->asJson ( true );\n\t\t\t}\n\t\t\t$data ['status'] = self::API_OK;\n\t\t} else {\n\t\t\t\n\t\t\t$data ['error'] = \"Not Found\";\n\t\t}\n\t\treturn $this->sendResponse ( $data );\n\t}",
"public function Sub_category_list($category_id)\n\t{\n\t\t$sQuery = \"SELECT * FROM sub_category WHERE main_cat_id = '$category_id' AND status='Active'\";\n\t\t$cat_result = $this->db->query($sQuery);\n\n\t\t$category_result = $cat_result->result();\n\t\t$category_count = $cat_result->num_rows();\n\n\t\tif($cat_result->num_rows()>0)\n\t\t{\n\t\t\t$response = array(\"status\" => \"success\", \"msg\" => \"Sub Category list\", \"sub_category_count\" => $category_count, \"sub_category_list\"=>$category_result);\n\t\t} else {\n\t\t\t$response = array(\"status\" => \"error\", \"msg\" => \"Category Not Found\");\n\t\t}\n\n\t\treturn $response;\n\t}",
"public function getsubcatalogueinfo($iCatalogueSubId)\n {\n $this->db->select('');\n $this->db->from('r_app_catalogue_sub_catagory');\n $this->db->where('iCatalogueSubId',$iCatalogueSubId);\n $query = $this->db->get();\n return $query->row_array();\n }",
"public function sub( $sub_id = '' ) {\n // Bail if we don't get a sub id.\n if ( $sub_id == '' )\n return false;\n\n $sub_var = 'sub_' . $sub_id;\n // Check to see if an object for this sub already exists.\n // Create one if it doesn't exist.\n if ( ! isset( self::$instance->$sub_var ) )\n self::$instance->$sub_var = new NF_Sub( $sub_id );\n\n return self::$instance->$sub_var;\n }",
"public function deactivate_county($county_id)\r\n\t{\r\n\t\t$this->counties_model->deactivate_county($county_id);\r\n\t\t$this->session->set_userdata('success_message', 'county disabled successfully');\r\n\t\t\r\n\t\tredirect('gbm-administration/counties');\r\n\t}",
"public function getSubcategory_id()\n {\n return $this->subcategory_id;\n }",
"function particularsubcatlist($id)\n\t{\n\t\t$getParsubproduct=\"SELECT * from product_sub_category where pr_sub_id = $id\";\n\t\t$subproduct_data=$this->get_results( $getParsubproduct );\n\t\treturn $subproduct_data;\n\t}",
"public function getSubuser($id)\n\t{\n\t\t$subusers = $this->getSubusers();\n\n\t\treturn ColoCrossing_Utility::getObjectFromCollectionById($subusers, $id);\n\t}",
"public function subcategories_get($category_id)\n {\n $em = $this->doctrine->em;\n $subcategoriesRepo = $em->getRepository('Entities\\Subcategory');\n $subcategories = $subcategoriesRepo->findBy(array('category' => $category_id));\n $category = $em->find('Entities\\Category', $category_id);\n if ($category) {\n $response[\"desc\"] = 'Subcategorias de la categoria: ' . $category->getTitle();\n $response[\"parent\"] = $category;\n $response[\"count\"] = count($subcategories);\n $response[\"data\"] = $subcategories;\n } else {\n $response[\"desc\"] = 'Categoria no encontrada';\n $response[\"parent\"] = null;\n $response[\"count\"] = 0;\n $response[\"data\"] = array();\n\n }\n $this->set_response($response, REST_Controller::HTTP_OK);\n }",
"public function get_sub_categories($id)\n\t{\n\t\t$data = $this->categories->get_sub_categories_of_parent_category($id);\n\t\techo json_encode($data);\n\t}",
"public function getSubcategoryId() {\r\n return $this->subcategoryId;\r\n }",
"function get_subcategories_list() {\n $query = $this->db->get('subcategories');\n return $query->result_array();\n }",
"public function getSubCategory()\n {\n if (array_key_exists(\"subCategory\", $this->_propDict)) {\n if (is_a($this->_propDict[\"subCategory\"], \"\\Beta\\Microsoft\\Graph\\SecurityNamespace\\Model\\SubCategory\") || is_null($this->_propDict[\"subCategory\"])) {\n return $this->_propDict[\"subCategory\"];\n } else {\n $this->_propDict[\"subCategory\"] = new SubCategory($this->_propDict[\"subCategory\"]);\n return $this->_propDict[\"subCategory\"];\n }\n }\n return null;\n }",
"public function getSubCategoryById($id)\n {\n $this->db->query(\"SELECT * FROM subcategories sc join categories c on sc.id_cat = c.id WHERE id = :id\");\n\n $this->db->bind(':id', $id);\n\n $row = $this->db->single();\n\n return $row;\n }",
"public function subcategory($subcategory_id)\n {\n $subcategory = Subcategory::findOrFail($subcategory_id);\n\n // SELECT * FROM `categories` WHERE `id` = $subcategory->category_id LIMIT 1\n $category = Category::find($subcategory->category_id);\n\n $books = Book::where('subcategory_id', $subcategory_id)->orderBy('title')->get();\n\n return view('eshop.subcategory', compact('subcategory', 'category', 'books'));\n }",
"public function setSubchannelId($var)\n {\n GPBUtil::checkInt64($var);\n $this->subchannelId = $var;\n\n return $this;\n }",
"public function getSubsidylist()\n {\n return view(\"Client::Ipage.subsidylist\");\n }",
"public function list_subCategory($category_id){\n $sqlQuery=\"select *,sidhus_category.cat_name from sidhus_subcategory inner join sidhus_category on sidhus_category.category_id=sidhus_subcategory.category_id where sidhus_subcategory.category_id = \". $category_id;\n //$sqlQuery= \"select * from make_an_offer INNER JOIN sell_product ON sell_product.sell_id=make_an_offer.product_id where sell_product.customer_id = \". $customer_id;\n $result=$this->con->query($sqlQuery);\n $this->con->close();\n return $result;\n }",
"public function getParishesToCounty( $county ) {\r\n $key = md5('parishesCounty' . $county);\r\n if (!$data = $this->_cache->load( $key )) {\r\n $select = $this->select()\r\n ->from($this->_name, array(\r\n 'osID', 'label' => 'CONCAT(label,\" (\",type,\")\")'\r\n ))\r\n ->order('label DESC')\r\n ->where('countyID =?', (int) $county);\r\n $data = $this->getAdapter()->fetchPairs($select);\r\n $this->_cache->save($data, $key);\r\n }\r\n return $data;\r\n }",
"public function get_subscriptions_from_uid($uid) {\r\n $query = '\r\n -- get sections where the user is subcribed\r\n SELECT user_subscr.sid\r\n FROM user_subscr INNER JOIN user ON user.uid=user_subscr.uid\r\n WHERE user.uid=:uid;\r\n ';\r\n return $this->dbh->fetch_list($query, [ ':uid' => $uid ]);\r\n }",
"public function get_subsec()\n\t{\n\t\t$section_id = $this->input->post('section_id');\n\t\t$subsection['subsec'] = $this->reports->get_subsec($section_id);\n\t\techo json_encode($subsection);\n\t}",
"public function getSubCatList()\r\n {\r\n\t\t$productId = $_POST['productId'];\r\n\t\r\n\t\t// GEtting subcategories against categoryid\r\n\t\t$ajaxSubCategoriesArray = $this->Product->SubCategory->find('list', array('conditions'=>array('SubCategory.category_id'=>$productId)));\r\n\t\r\n\t\t$select = '<div class=\"input select\">\r\n\t\t<label for=\"ProductSubCategoryId\">Sub Category</label>\r\n\t\t<select name=\"data[Product][sub_category_id]\" id=\"ProductSubCategoryId\">\r\n\t\t<option value=\"0\">Please select</option>';\r\n\t\r\n\t\tforeach($ajaxSubCategoriesArray as $key => $subCategories) \r\n\t\t{\r\n\t\t\t$select .= '<option value=\"'.$key.'\">'.$subCategories.'</option>';\r\n\t\t}\r\n\t\t\r\n\t\t$select .= '</select></div>';\r\n\t\techo $select;\r\n\t\texit;\r\n }"
] |
[
"0.71630156",
"0.6952789",
"0.66561115",
"0.65544057",
"0.6393898",
"0.5591124",
"0.5552682",
"0.5517448",
"0.55136937",
"0.5487054",
"0.54670656",
"0.5463791",
"0.53963065",
"0.5357395",
"0.535676",
"0.5295034",
"0.527869",
"0.5249631",
"0.52477926",
"0.5240212",
"0.5238332",
"0.5209833",
"0.51838744",
"0.5151465",
"0.51388615",
"0.51382524",
"0.5094428",
"0.5091643",
"0.5090618",
"0.5083492"
] |
0.8150398
|
0
|
Operation listsSubcountiesPost create a Sub_county.
|
public function listsSubcountiespost()
{
$input = Request::all();
$new_sub_county= Sub_county::create($input);
if($new_sub_county){
return response()->json(['msg' => 'Created Subcounty', 'Subcounty' => $new_sub_county], 200);
}else{
return response('Could not save Subcounty');
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function listsSubcountiesput($sub_county_id)\r\n {\r\n $input = Request::all();\r\n $sub_county = Sub_county::findOrFail($sub_county_id);\r\n $sub_county->update(['name' => $input['name']]);\r\n if($sub_county->save()){\r\n return response()->json(['msg' => 'Updated Sub_county', 'updated Sub_county' => $sub_county], 200);\r\n }else{\r\n return response('Could not update a Sub_county');\r\n }\r\n }",
"public function listsSubcountiesget()\r\n {\r\n $response = Sub_county::get();\r\n return response()->json($response, 200);\r\n }",
"public function listsSubcountiesByIdget($sub_county_id)\r\n {\r\n $sub_county = Sub_county::findOrFail($sub_county_id);\r\n return response()->json($sub_county, 200);\r\n }",
"public function listsSubcountiesdelete($sub_county_id)\r\n {\r\n Sub_county::destroy($sub_county_id);\r\n return response()->json(['msg' => 'deleted Subcounty'], 200);\r\n }",
"public function sub_county(){\r\n $response = Sub_county::all();\r\n return response()->json($response, 200);\r\n }",
"public function listsCountiesput($county)\r\n {\r\n $input = Request::all();\r\n $county = County::findOrFail($county);\r\n $county->update(['name' => $input['name']]);\r\n if($county->save()){\r\n return response()->json(['msg' => 'Updated County', 'updated county' => $county], 200);\r\n }else{\r\n return response('Could not update a County');\r\n }\r\n }",
"public function listsCountiesByIdget($county)\r\n {\r\n $county = County::findOrFail($county);\r\n return response()->json($county, 200);\r\n }",
"public function listsCountiespost()\r\n {\r\n $input = Request::all();\r\n $new_county = County::create($input);\r\n if($new_county){\r\n return response()->json(['msg' => 'Created County', 'county' => $new_county], 200);\r\n }else{\r\n return response('Could not save county');\r\n }\r\n }",
"public function createSubCategory() {\n //\n $publishedCategories = Category::where('publicationStatus', 1)->get();\n return view('admin.subcategory.createSubCategory', ['publishedCategories' => $publishedCategories]);\n }",
"public static function getListSubcategoria($subs){\n return CHtml::listData($subs,'id_subcategoria','nombre');\n }",
"public function getSubCatList()\r\n {\r\n\t\t$productId = $_POST['productId'];\r\n\t\r\n\t\t// GEtting subcategories against categoryid\r\n\t\t$ajaxSubCategoriesArray = $this->Product->SubCategory->find('list', array('conditions'=>array('SubCategory.category_id'=>$productId)));\r\n\t\r\n\t\t$select = '<div class=\"input select\">\r\n\t\t<label for=\"ProductSubCategoryId\">Sub Category</label>\r\n\t\t<select name=\"data[Product][sub_category_id]\" id=\"ProductSubCategoryId\">\r\n\t\t<option value=\"0\">Please select</option>';\r\n\t\r\n\t\tforeach($ajaxSubCategoriesArray as $key => $subCategories) \r\n\t\t{\r\n\t\t\t$select .= '<option value=\"'.$key.'\">'.$subCategories.'</option>';\r\n\t\t}\r\n\t\t\r\n\t\t$select .= '</select></div>';\r\n\t\techo $select;\r\n\t\texit;\r\n }",
"public function listsCountiesdelete($county)\r\n {\r\n County::destroy($county);\r\n return response()->json(['msg' => 'deleted County'], 200);\r\n }",
"public function created(SubCategories $subCategories)\n {\n //\n }",
"public function getParishesToCounty( $county ) {\r\n $key = md5('parishesCounty' . $county);\r\n if (!$data = $this->_cache->load( $key )) {\r\n $select = $this->select()\r\n ->from($this->_name, array(\r\n 'osID', 'label' => 'CONCAT(label,\" (\",type,\")\")'\r\n ))\r\n ->order('label DESC')\r\n ->where('countyID =?', (int) $county);\r\n $data = $this->getAdapter()->fetchPairs($select);\r\n $this->_cache->save($data, $key);\r\n }\r\n return $data;\r\n }",
"public function bySubCategory($subCategoryId)\n {\n $products = Product::where('p_sub_c_id', $subCategoryId)->paginate(9);\n $Category = Category::orderby('c_name', 'asc')->get();\n foreach($Category as $category){\n $allCategory[$category->c_name] = SubCategory::where('sc_c_id', $category->c_id)->get();\n }\n \n $data = [\n 'allCategory' => $allCategory,\n 'Products' => $products\n ];\n\n\n return view('frontend.category', $data);\n }",
"public function index(County $county)\n {\n $locations = $county->locations()->orderByRaw('name')->paginate(4);\n return view('locations.index', compact('locations', 'county'));\n }",
"public function create(County $county)\n {\n\n return view('locations.create', compact('county'));\n }",
"public function getCountyCityList($slug) {\n \n $county_id = $this->getCountyID($slug);\n if(!isset($county_id))\n throw new CHttpException(400, 'This county does not exist');\n \n $county_name = $this->getCountyName($slug);\n $str = '<a class=\"list-group-item\" href=\"'. Yii::app()->createUrl('county/countycities', array('slug'=>$slug)) . '\"><strong>'. $county_name . '</strong></a>';\n \n $cities = City::model()->getCityList($county_id);\n foreach ($cities as $city) {\n $str .= '<a class=\"list-group-item\" href=\"'. Yii::app()->createUrl('county/cities', array('slug'=>$slug,'city_slug'=>$city->slug)) . '\">'. $city->name . '</a>';\n }\n return $str;\n }",
"function suprsubcategry(){\n\t\t\t$this->layout = 'ajax';\n\t\t\t$this->loadModel('Category');\n\t\t\t$cateid = $_REQUEST['cate_id'];\n\t\t\t$suprsub = $_REQUEST['suprsub'];\n\t\t\t\n\t\t\t$catsdata = array();\n\t\t\tif($suprsub == 'yes'){\n\t\t\t\t$catsdata = $this->Category->find('all',array('conditions'=>array('category_parent'=>$cateid,'category_sub_parent'=>0)));\n\t\t\t}else{\n\t\t\t\t$catsdata = $this->Category->find('all',array('conditions'=>array('category_sub_parent'=>$cateid)));\n\t\t\t}\n\t\t\t\n\t\t\tif(!empty($catsdata)){\n\t\t\t\tforeach($catsdata as $cts){\n\t\t\t\t\t$cats_arr[] = array('ID'=>$cts['Category']['id'],'Name'=>$cts['Category']['category_name']);\n\t\t\t\t}\n\t\t\t\t// [ { \"ID\" :\"1\", \"Name\":\"Scott\"},{ \"ID\":\"2\", \"Name\":\"Jon\"} ]\n\t\t\t\t// print_r($cats_arr);\n\t\t\t\techo json_encode($cats_arr);\n\t\t\t}else{\n\t\t\t\techo 0;\n\t\t\t}\n\t\t\tdie;\n\t\t}",
"public function county_sidebar()\n\t{\n\t\t$box = View::factory('iebc/sidebar');\n\t\t$box->counties = self::_counties();\n\t\t$box->render(TRUE);\n\t}",
"public function getSubsidylist()\n {\n return view(\"Client::Ipage.subsidylist\");\n }",
"public function add_county() \r\n\t{\r\n\t\t//form validation rules\r\n\t\t$this->form_validation->set_rules('county_name', 'county Name', 'required|xss_clean');\r\n\t\t$this->form_validation->set_rules('county_status', 'county Status', 'required|xss_clean');\r\n\t\t\r\n\t\t//if form has been submitted\r\n\t\tif ($this->form_validation->run())\r\n\t\t{\r\n\t\t\tif($this->counties_model->add_county())\r\n\t\t\t{\r\n\t\t\t\t$this->session->set_userdata('success_message', 'county added successfully');\r\n\t\t\t\tredirect('gbm-administration/counties');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->session->set_userdata('error_message', 'Could not add county. Please try again');\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$data['title'] = 'Add county';\r\n\t\t$v_data['title'] = $data['title'];\r\n\t\t$data['content'] = $this->load->view('counties/add_county', $v_data, true);\r\n\t\t$this->load->view('admin/templates/general_page', $data);\r\n\t}",
"public function get_sub_category_list()\n\t{\n\t\t$result = $this->db->from(\"category\")->where(array(\"category_status\" => 1,\"type\"=>2))->orderby(\"category_name\",\"ASC\")->get();\n\t\treturn $result;\n\t}",
"public function getPostCountForSubcategory($subcategory)\n {\n $returnValue = null;\n\n // section -64--88-0-2-443ef2c5:15f39ed6002:-8000:0000000000000C36 begin\n $this->Database = new Database();\n\n $sql = $this->Database->prepare(\"SELECT count(*) FROM forum_post WHERE sub_category_id = ?\");\n $sql->execute(array(\n $subcategory\n ));\n\n $returnValue = $sql->fetchColumn();\n // section -64--88-0-2-443ef2c5:15f39ed6002:-8000:0000000000000C36 end\n\n return $returnValue;\n }",
"public function allsubcategories_get()\n {\n $em = $this->doctrine->em;\n $subcategoriesRepo = $em->getRepository('Entities\\Subcategory');\n $subcategories = $subcategoriesRepo->findAll();\n foreach ($subcategories as $subcategory) {\n $subcategory->servicesCount = $subcategory->getServices()->count();\n }\n $response[\"data\"] = $subcategories;\n $response[\"count\"] = count($subcategories);\n $this->set_response($response, REST_Controller::HTTP_OK);\n\n }",
"public static function menu_subpage_categories(){\n \t\t\n\t\t\tadd_submenu_page('edit.php?post_type='.self::$post_type, \n\t\t\t\t\t\t\t self::$page_title_category, \n\t\t\t\t\t\t\t 'Menu Listing', \n\t\t\t\t\t\t\t self::$capability,\n\t\t\t\t\t\t\t 'menu_listings',\n\t\t\t\t\t \t array( __CLASS__, 'menu_generator_listing'));\n\t\t\n\t\t}",
"public function sub_categories()\n\t{ \n\n\t\tif ($this->input->is_ajax_request()) {\n\t\t\t$main_cat_id = $_POST['main_cat_id'];\n\n\t\t\t$sub_categories = $this->cat_model->GetWhere(\"categories\", \"title\", \"ASC\", array('main_cat_id'=> $main_cat_id)); \n\n\t\t\tif (isset($sub_categories) && count($sub_categories) != 0) {\n\t\t\t\t$id=\"sub_cat_id\".$main_cat_id;\n\t\t\t\t$div=\"div_\".$main_cat_id;\n\t\t\t\techo '<select id=\"'.$id.'\" onclick=\"get_sub_category('.$main_cat_id.');\">';\n\t\t\t\techo '<option disabled selected>Select Sub category</option>';\n\n\t\t\t\tforeach ($sub_categories as $cat) {\t\t\t\t\n\t\t\t\t\techo '<option value=\"'.$cat->id.'\">'.$cat->title.'</option>';\n\t\t\t\t}\n\t\t\t\techo '</select><div id=\"'.$div.'\"> </div><br>';\n\n\n\t\t\t}\n\n\n\t\t} \n\t}",
"function get_subcategories_list() {\n $query = $this->db->get('subcategories');\n return $query->result_array();\n }",
"public function show(SubCategory $sub_categories)\n {\n //\n }",
"public function topSubcategories_get()\n {\n $em = $this->doctrine->em;\n $subcategoriesRepo = $em->getRepository('Entities\\Subcategory');\n\n $subcategories = $subcategoriesRepo->findBy(array(), array('visits' => 'DESC'), 10);\n\n if ($subcategories) {\n $response[\"desc\"] = \"Subcategorias mas visitadas \";\n $response[\"count\"] = count($subcategories);\n $response[\"data\"] = $subcategories;\n } else {\n $response[\"desc\"] = 'No existen subcategorias mas visitadas';\n $response[\"count\"] = 0;\n $response[\"data\"] = array();\n }\n $this->set_response($response, REST_Controller::HTTP_OK);\n }"
] |
[
"0.67372507",
"0.65185547",
"0.64951605",
"0.6240408",
"0.5815186",
"0.5628058",
"0.538993",
"0.52892286",
"0.5203516",
"0.5158326",
"0.5127204",
"0.5027538",
"0.49125627",
"0.48279107",
"0.48248267",
"0.47879857",
"0.47810322",
"0.47621554",
"0.47349063",
"0.47263882",
"0.4722909",
"0.47190604",
"0.4707508",
"0.46715117",
"0.46692896",
"0.46552622",
"0.4647684",
"0.46295947",
"0.46177736",
"0.46121168"
] |
0.7338918
|
0
|
Operation listsSubcountiesSub_countyIdPut Update an existing Sub_county.
|
public function listsSubcountiesput($sub_county_id)
{
$input = Request::all();
$sub_county = Sub_county::findOrFail($sub_county_id);
$sub_county->update(['name' => $input['name']]);
if($sub_county->save()){
return response()->json(['msg' => 'Updated Sub_county', 'updated Sub_county' => $sub_county], 200);
}else{
return response('Could not update a Sub_county');
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function listsSubcountiesByIdget($sub_county_id)\r\n {\r\n $sub_county = Sub_county::findOrFail($sub_county_id);\r\n return response()->json($sub_county, 200);\r\n }",
"public function listsSubcountiesdelete($sub_county_id)\r\n {\r\n Sub_county::destroy($sub_county_id);\r\n return response()->json(['msg' => 'deleted Subcounty'], 200);\r\n }",
"public function listsCountiesput($county)\r\n {\r\n $input = Request::all();\r\n $county = County::findOrFail($county);\r\n $county->update(['name' => $input['name']]);\r\n if($county->save()){\r\n return response()->json(['msg' => 'Updated County', 'updated county' => $county], 200);\r\n }else{\r\n return response('Could not update a County');\r\n }\r\n }",
"public function edit_county($county_id) \r\n\t{\r\n\t\t//form validation rules\r\n\t\t$this->form_validation->set_rules('county_name', 'county Name', 'required|xss_clean');\r\n\t\t$this->form_validation->set_rules('county_status', 'county Status', 'required|xss_clean');\r\n\t\t\r\n\t\t//if form has been submitted\r\n\t\tif ($this->form_validation->run())\r\n\t\t{\r\n\t\t\t//update county\r\n\t\t\tif($this->counties_model->update_county($county_id))\r\n\t\t\t{\r\n\t\t\t\t$this->session->set_userdata('success_message', 'county updated successfully');\r\n\t\t\t\tredirect('gbm-administration/counties');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->session->set_userdata('error_message', 'Could not update county. Please try again');\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//open the add new county\r\n\t\t$data['title'] = 'Edit county';\r\n\t\t$v_data['title'] = $data['title'];\r\n\t\t\r\n\t\t//select the county from the database\r\n\t\t$query = $this->counties_model->get_county($county_id);\r\n\t\t\r\n\t\t$v_data['county'] = $query->result();\r\n\t\t\r\n\t\t$data['content'] = $this->load->view('counties/edit_county', $v_data, true);\r\n\t\t\r\n\t\t$this->load->view('admin/templates/general_page', $data);\r\n\t}",
"public function sub_county(){\r\n $response = Sub_county::all();\r\n return response()->json($response, 200);\r\n }",
"public function listsSubcountiespost()\r\n {\r\n $input = Request::all();\r\n $new_sub_county= Sub_county::create($input);\r\n if($new_sub_county){\r\n return response()->json(['msg' => 'Created Subcounty', 'Subcounty' => $new_sub_county], 200);\r\n }else{\r\n return response('Could not save Subcounty');\r\n }\r\n }",
"public function activate_county($county_id)\r\n\t{\r\n\t\t$this->counties_model->activate_county($county_id);\r\n\t\t$this->session->set_userdata('success_message', 'county activated successfully');\r\n\t\t\r\n\t\tredirect('gbm-administration/counties');\r\n\t}",
"public function deactivate_county($county_id)\r\n\t{\r\n\t\t$this->counties_model->deactivate_county($county_id);\r\n\t\t$this->session->set_userdata('success_message', 'county disabled successfully');\r\n\t\t\r\n\t\tredirect('gbm-administration/counties');\r\n\t}",
"public function listsSubcountiesget()\r\n {\r\n $response = Sub_county::get();\r\n return response()->json($response, 200);\r\n }",
"public function listsCountiesByIdget($county)\r\n {\r\n $county = County::findOrFail($county);\r\n return response()->json($county, 200);\r\n }",
"public function update(Request $request, Subcategory $subcategory)\n {\n $categories = Category::all();\n\n $subcategory->name = request('name');\n foreach($categories as $category){\n if($category->name == request('cat')){\n $subcategory->categories_id = $category->id;\n }\n }\n $subcategory->save();\n\n return redirect('cms/categories')->with('success', 'Subcategory was updated succesfully');\n }",
"public function update(CountyUpdateRequest $request, $id)\n {\n try {\n $item = $this->countyService->update($request->all(), $id);\n\n $response = [\n 'message' => 'Item updated successfully',\n 'data' => $item->toArray(),\n ];\n } catch (\\Exception $e) {\n $response = [\n 'message' => \"Error while updating item!\"\n ];\n }\n\n Session::flash('message', $response['message']);\n\n return redirect()->back();\n }",
"public function delete_county($county_id)\r\n\t{\r\n\t\t$this->counties_model->delete_county($county_id);\r\n\t\t$this->session->set_userdata('success_message', 'county has been deleted');\r\n\t\t\r\n\t\tredirect('gbm-administration/counties');\r\n\t}",
"public function update(Request $request, $id)\n {\n $county = County::find($id);\n $county->fill(\n $request->all()\n );\n $county->save();\n\n return new CountyResource(\n $county\n );\n }",
"public function update(Request $request, SubCategory $subCategory)\n {\n $subCategory->name = $request->input('name');\n $subCategory->slug_name = str_slug($request->input('name'));\n $subCategory->save();\n\n return redirect()->route('sub_categories.index')->with('status', 'Created Successfully');\n }",
"public function update(SubCategoryCRUDRequest $request, $id) {\n $validated = $request->validated();\n\n $subcategory = ProductSubCategory::find($id);\n\n $subcategory->name = $validated['name'];\n $subcategory->product_categories_id = $validated['product_categories_id'];\n\n $subcategory->save();\n\n return Response::json($subcategory);\n }",
"public function updated(SubCategories $subCategories)\n {\n //\n }",
"public function updateSubCategory(Request $request) {\n //\n $subCategory = subCategory::find($request->subCategoryId);\n $subCategory->subCategoryName = $request->subCategoryName;\n $subCategory->subCategoryTitle = $request->subCategoryTitle;\n $subCategory->publicationStatus = $request->publicationStatus;\n $subCategory->save();\n return redirect('/manage/sub-category')->with('message', 'SubCategory Updated Successfully');\n }",
"public function update(EditSlWholesaleDiscountBySubFamilyRequest $request, $idSubFamily)\n {\n $response = DB::transaction(function() use (&$request, $idSubFamily) {\n $this->crudSlWholesaleDiscountBySubFamilyService->update($idSubFamily, $request);\n return CustomResponse::ok(['message' => 'Actualizado con éxito']);\n });\n return response()->json($response, $response['http_status_code']);\n }",
"public function update(Request $request, $id)\n {\n \n $data = array();\n $data['subcategory_name'] = $request->subcategory_name;\n $data['category_id'] = $request->category_id;\n DB::table('subcategories')->where('id',$id)->update($data);\n }",
"public function update(CreateSubCategoryRequest $request, $slug)\n {\n $subCategory = SubCategory::where('slug', $slug)->firstOrFail();\n\n $data = $request->only(['name', 'slug', 'category_id']);\n\n $subCategory->update($data);\n\n session()->flash('success', 'Sub-Category updated successfully!');\n\n return redirect(route('subcategories.index'));\n }",
"public function update(Request $request, $id)\n {\n $v = Validator::make($request->all(), [\n 'name' => 'required|max:255',\n 'category_id' => 'required',\n 'facilities' => 'required'\n ]);\n\n if ($v->fails())\n {\n return redirect()->back()->withInput($request->input())->withErrors($v->errors());\n }\n $subcategory = Subcategory::findOrFail($id);\n $inputs = $request->all();\n $subcategory->update($inputs);\n if(isset($inputs['facilities']) && count($inputs['facilities'])){\n $db_facilities = $subcategory->facilities->lists('id')->toArray();\n\n foreach ($inputs['facilities'] as $facility) {\n if(in_array($facility, $db_facilities))\n unset($db_facilities[array_search($facility, $db_facilities)]);\n else\n $subcategory->facilities()->attach($facility);\n }\n\n if(!empty($db_facilities))\n $subcategory->facilities()->detach($db_facilities);\n }\n session()->flash('flash_message', 'Subcategory updated!');\n return redirect('subcategories');\n }",
"public function setSubtotalInvoiced($subtotalInvoiced);",
"public function add_county() \r\n\t{\r\n\t\t//form validation rules\r\n\t\t$this->form_validation->set_rules('county_name', 'county Name', 'required|xss_clean');\r\n\t\t$this->form_validation->set_rules('county_status', 'county Status', 'required|xss_clean');\r\n\t\t\r\n\t\t//if form has been submitted\r\n\t\tif ($this->form_validation->run())\r\n\t\t{\r\n\t\t\tif($this->counties_model->add_county())\r\n\t\t\t{\r\n\t\t\t\t$this->session->set_userdata('success_message', 'county added successfully');\r\n\t\t\t\tredirect('gbm-administration/counties');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->session->set_userdata('error_message', 'Could not add county. Please try again');\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$data['title'] = 'Add county';\r\n\t\t$v_data['title'] = $data['title'];\r\n\t\t$data['content'] = $this->load->view('counties/add_county', $v_data, true);\r\n\t\t$this->load->view('admin/templates/general_page', $data);\r\n\t}",
"public function edit(SubCourse $subCourse)\n {\n\n }",
"public function auEssLookupSuburb($suburb, $state, $post_code, $employee_id, $country_id = null, string $contentType = self::contentTypes['auEssLookupSuburb'][0])\n {\n list($response) = $this->auEssLookupSuburbWithHttpInfo($suburb, $state, $post_code, $employee_id, $country_id, $contentType);\n return $response;\n }",
"public function update(SubCategoriesRequest $request)\n {\n $main_id = $request->input('main_id');\n $main_CatName = $request->input('main_CatName');\n $current_timestamp = Carbon::now()->timestamp;\n $slug = $request->input('sCat_slug');\n $s_cat = SubCategories::whereSlug($slug)->first();\n $s_cat->name =$request->input('sCat_name');\n $s_cat->updated_at = $current_timestamp;\n $s_cat->save();\n return redirect('/admin/'.$main_id.'/'.$main_CatName.'/sub_category') ->with('status','The Sub Category has been updated');\n }",
"public function update(Request $request,$subcategories)\n {\n $subcategories=Subcategory::find($subcategories);\n $subcategories->fill($request->only([\n 'name',\n 'description',\n 'category_id'\n ]));\n\n if($subcategories->isClean())\n return $this->errorResponse('Sory u should specific diffrent Values ',422);\n\n $subcategories->save();\n return $this->showOne($subcategories);\n }",
"public function setBaseSubtotalInvoiced($baseSubtotalInvoiced);",
"public function update(Request $request, $id)\n {\n $subCategory = SubCategory::find($id);\n\n $this->validate($request, [\n 'name'=>'required|min:3',\n 'category_id'=>'required|not_in:0'\n ]);\n\n $subCategory->name = $request->name;\n $subCategory->category_id = $request->category_id;\n\n $subCategory->save();\n\n notify()->success('Sub Category updated successfully!');\n return redirect()->route('sub-category.index');\n }"
] |
[
"0.6135902",
"0.56060266",
"0.55429476",
"0.5532568",
"0.52962965",
"0.5292696",
"0.5192137",
"0.5162546",
"0.5156412",
"0.5145326",
"0.50745755",
"0.50298804",
"0.4930535",
"0.47168145",
"0.47123647",
"0.4693829",
"0.46557134",
"0.46508306",
"0.46080992",
"0.45672634",
"0.4537085",
"0.45308667",
"0.4512464",
"0.45124626",
"0.4481878",
"0.4456306",
"0.4451973",
"0.44383043",
"0.4437679",
"0.44201434"
] |
0.70711195
|
0
|
Operation listsSubcountiesSub_countyIdDelete Deletes a Sub_county specified by serviceId.
|
public function listsSubcountiesdelete($sub_county_id)
{
Sub_county::destroy($sub_county_id);
return response()->json(['msg' => 'deleted Subcounty'], 200);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function delete_county($county_id)\r\n\t{\r\n\t\t$this->counties_model->delete_county($county_id);\r\n\t\t$this->session->set_userdata('success_message', 'county has been deleted');\r\n\t\t\r\n\t\tredirect('gbm-administration/counties');\r\n\t}",
"public function listsCountiesdelete($county)\r\n {\r\n County::destroy($county);\r\n return response()->json(['msg' => 'deleted County'], 200);\r\n }",
"public function listsSubcountiesByIdget($sub_county_id)\r\n {\r\n $sub_county = Sub_county::findOrFail($sub_county_id);\r\n return response()->json($sub_county, 200);\r\n }",
"public function listsSubcountiesput($sub_county_id)\r\n {\r\n $input = Request::all();\r\n $sub_county = Sub_county::findOrFail($sub_county_id);\r\n $sub_county->update(['name' => $input['name']]);\r\n if($sub_county->save()){\r\n return response()->json(['msg' => 'Updated Sub_county', 'updated Sub_county' => $sub_county], 200);\r\n }else{\r\n return response('Could not update a Sub_county');\r\n }\r\n }",
"public function deactivate_county($county_id)\r\n\t{\r\n\t\t$this->counties_model->deactivate_county($county_id);\r\n\t\t$this->session->set_userdata('success_message', 'county disabled successfully');\r\n\t\t\r\n\t\tredirect('gbm-administration/counties');\r\n\t}",
"public static function deleteSubaffittiById($IdSubaffitto)\n {\n SubaffittiPostazioneQuery::create()\n ->filterByIdSubaffittoPostazione($IdSubaffitto)\n ->delete();\n }",
"public function DeleteFacultyStdSub($id) {\n $this->db->where('faculty_id', $id);\n return $this->db->delete('faculty_std_sub');\n }",
"public function deleteSubCategory()\n {\n //Data\n $subCategoryData = $this->loadData('sub_category_required');\n //Steps\n $this->categoryHelper()->createCategory($subCategoryData);\n //Verifying\n $this->assertMessagePresent('success', 'success_saved_category');\n $this->categoryHelper()->checkCategoriesPage();\n //Steps\n $this->categoryHelper()->selectCategory($subCategoryData['parent_category'] . '/' . $subCategoryData['name']);\n $this->categoryHelper()->deleteCategory('delete_category', 'confirm_delete');\n $this->assertMessagePresent('success', 'success_deleted_category');\n }",
"public function deleteSubReq($subReqid)\n {\n // Make the query \n $q = \"DELETE FROM subrequests WHERE id_subrequest = {$subReqid} LIMIT 1\";\n\n // Execute the query:\n $this->_dbObject->query($q);\n\n // If the query ran ok.\n if($this->_dbObject->getNumRowsAffected() == 1) {\n // Print a message\n echo '<div class=\"alert alert-success\">This subrequest has been deleted successfully</div>';\n }\n else { // If the query did not run ok.\n echo '<div class=\"alert alert-error\">The subrequest was not deleted</div>';\n }\n }",
"public function delete_sub_catalogue($iCatalogueSubId)\n {\n $this->db->where('iCatalogueSubId',$iCatalogueSubId);\n $this->db->delete('r_app_catalogue_sub_catagory');\n return true;\n }",
"public function deleted(SubCategories $subCategories)\n {\n $subCategories->categories()->delete();\n }",
"public function listsSubcountiesget()\r\n {\r\n $response = Sub_county::get();\r\n return response()->json($response, 200);\r\n }",
"public function deleteSubcode($coupon_id, $coupon_subcode)\r\n {\r\n return $this->__deleteSubcode($coupon_id, $coupon_subcode);\r\n }",
"public function deleteSubCategory($id) {\n $subCategory = subCategory::where('id', $id)->first();\n $subCategory->delete();\n return redirect('/manage/sub-category')->with('message', ' Successfully Deleted');\n }",
"public function listsCountiesByIdget($county)\r\n {\r\n $county = County::findOrFail($county);\r\n return response()->json($county, 200);\r\n }",
"public function destroy($idSubFamily)\n {\n }",
"public function deleteUser($userId, &$deletedSubUsers)\n {\n // TODO: Implement deleteUser() method.\n }",
"public function unsubscribe($subId)\n {\n $this->subscriptions->forget($subId);\n }",
"public function delete_sub_cat($sub_cat_id = ''){\n\t\t$query = $this->db->delete('sub_categories', array('id' => $sub_cat_id));\n\t\treturn $query;\n\t}",
"public function destroy($id)\n {\n return County::destroy($id);\n }",
"function delete($id) {\n $this->db->where('id', $id);\n $this->db->delete('sub_categories');\n }",
"public function destroy($id)\n {\n //\n $county = County::findOrFail($id);\n $county->delete();\n Session::flash('message', 'County successfully deleted!');\n\n return redirect()->route('county.destroy');\n\n }",
"public function delete_sub_sub_category()\n\t{\n\t\t$sub_sub_category_id = $this->input->post('sub_sub_category_id');\n\n\t\t$this->load->model('Admin_functions_model');\n\t\tif( $this->Admin_functions_model->delete_the_sub_sub_category($sub_sub_category_id) )\n\t\t{\n\t\t\t$this->session->set_flashdata('feedback', 'Sub Sub Category deleted successfully');\n\t\t\t$this->session->set_flashdata('feedback_class', 'alert-success');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->session->set_flashdata('feedback', 'Failed to delete, Please try again');\n\t\t\t$this->session->set_flashdata('feedback_class', 'alert-danger');\n\t\t}\n\n\t\treturn redirect('Admin_functions/class_room_training');\n\t}",
"public function deleteRecordById($subattr_id)\n {\n $this->delete(['id' => $subattr_id]);\n }",
"public function destroySubtag(int $id)\n {\n $this->repository->deleteSubtag($id);\n return response()->json(['message' => 'delete subtag successfully'], 200);\n }",
"public function edit_county($county_id) \r\n\t{\r\n\t\t//form validation rules\r\n\t\t$this->form_validation->set_rules('county_name', 'county Name', 'required|xss_clean');\r\n\t\t$this->form_validation->set_rules('county_status', 'county Status', 'required|xss_clean');\r\n\t\t\r\n\t\t//if form has been submitted\r\n\t\tif ($this->form_validation->run())\r\n\t\t{\r\n\t\t\t//update county\r\n\t\t\tif($this->counties_model->update_county($county_id))\r\n\t\t\t{\r\n\t\t\t\t$this->session->set_userdata('success_message', 'county updated successfully');\r\n\t\t\t\tredirect('gbm-administration/counties');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->session->set_userdata('error_message', 'Could not update county. Please try again');\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//open the add new county\r\n\t\t$data['title'] = 'Edit county';\r\n\t\t$v_data['title'] = $data['title'];\r\n\t\t\r\n\t\t//select the county from the database\r\n\t\t$query = $this->counties_model->get_county($county_id);\r\n\t\t\r\n\t\t$v_data['county'] = $query->result();\r\n\t\t\r\n\t\t$data['content'] = $this->load->view('counties/edit_county', $v_data, true);\r\n\t\t\r\n\t\t$this->load->view('admin/templates/general_page', $data);\r\n\t}",
"protected function delSubs(Sub $subModel, $id){\n\n $data['id'] = $id;\n\n if(Auth::check()){\n\n $subModel->delSubs($data);\n return redirect()->back()->with('successadmin', 'Deleted User!');\n }\n\n return redirect()->back()->with('errorsadmin', 'Error!');;\n\n }",
"public function delSubC($id, $idMain) {\n\n\t $n=DB::table('subCategories')->where('idSubCategory', $id)->delete();\n\n\t\t if($n!==\"\") {\n\t\t Session::put('ScateDelMsz', 'Sub Category Deleted Successfully.');\n\t\t \treturn Redirect::to('admin/category?caseC=listSubC&IdC='.$idMain);\n\t\t }\n\t\t else{\n\t\t Session::put('ScateDelMsz', 'Sub Category Not Deleted.');\n\t\t \treturn Redirect::to('admin/category?caseC=listSubC&IdC='.$idMain);\n\t\t }\n\n\t }",
"public function destroy($id)\n {\n $subcategory = Subcategory::find($id); \n $subcategory->delete();\n session()->flash('flash_message', 'Subcategory deleted!');\n return redirect('subcategories');\n }",
"public function delete_sub_classes($id)\n {\n $table = $this->return_table();\n $this->db->where('id', $id);\n return $this->db->delete($table);\n }"
] |
[
"0.6785318",
"0.6077803",
"0.5870606",
"0.5745355",
"0.5624537",
"0.54211974",
"0.5244325",
"0.51165885",
"0.5099638",
"0.5063199",
"0.50436234",
"0.5035343",
"0.50105846",
"0.4961896",
"0.49454147",
"0.48786274",
"0.4847618",
"0.48106202",
"0.47562337",
"0.47545204",
"0.47053075",
"0.4676274",
"0.46758783",
"0.46474934",
"0.46417943",
"0.46263754",
"0.45997915",
"0.45763463",
"0.45664528",
"0.45595893"
] |
0.7242012
|
0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.